diff --git a/.dockerignore b/.dockerignore index a57f9f33c..8092015d1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,7 +8,6 @@ Dockerfile* LICENSE Procfile app-minimal -assets coverage node_modules test diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 44b896103..d99b31132 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -34,7 +34,13 @@ jobs: - name: Install dependencies (yarn) run: pnpm i - name: Build assets - run: npm run build:all + run: npm run build + - name: Commit files + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git status + git diff-index --quiet HEAD || (git commit -m "chore: auto build" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master) - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1793bb0bb..1d92ad8a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,32 +104,6 @@ jobs: run: pnpm run vitest puppeteer env: ${{ fromJSON(matrix.chromium.environment) }} - docs: - runs-on: ubuntu-latest - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - node-version: [ 18, 20, 21 ] - defaults: - run: - working-directory: website - name: Build docs on Node ${{ matrix.node-version }} - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v3 - with: - version: 8 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - cache-dependency-path: website/pnpm-lock.yaml - - run: pnpm i - - name: Build docs - run: pnpm run build - working-directory: website - all: runs-on: ubuntu-latest timeout-minutes: 5 @@ -149,7 +123,7 @@ jobs: cache: 'pnpm' - run: pnpm i - name: Build radar and maintainer - run: npm run build:all + run: npm run build automerge: if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request' diff --git a/.gitignore b/.gitignore index a5c841183..3d4554311 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ *.iml app-minimal/ -assets/build/ coverage docs/.vuepress/dist node_modules diff --git a/Dockerfile b/Dockerfile index 6698a4a52..bb890b1c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,17 +39,17 @@ WORKDIR /ver COPY ./package.json /app/ RUN \ set -ex && \ - grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version && \ - grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ - grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version + grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version + # grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ + # grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version # --------------------------------------------------------------------------------------------------------------------- FROM node:21-bookworm-slim AS docker-minifier # The stage is used to further reduce the image size by removing unused files. -WORKDIR /minifier -COPY --from=dep-version-parser /ver/* /minifier/ +WORKDIR /app +# COPY --from=dep-version-parser /ver/* /minifier/ # ARG USE_CHINA_NPM_REGISTRY=0 # RUN \ @@ -73,6 +73,7 @@ RUN \ # rm -rf /app/node_modules /app/scripts && \ # mv /app/app-minimal/node_modules /app/ && \ # rm -rf /app/app-minimal && \ + npm run build && \ ls -la /app && \ du -hd1 /app diff --git a/lib/app.ts b/lib/app.ts index df4dc45b0..782c938f3 100644 --- a/lib/app.ts +++ b/lib/app.ts @@ -15,8 +15,8 @@ import parameter from '@/middleware/parameter'; import logger from '@/utils/logger'; -import initRoutes from '@/init-routes'; import { notFoundHandler, errorHandler } from '@/errors'; +import registry from '@/registry'; process.on('uncaughtException', (e) => { logger.error('uncaughtException: ' + e); @@ -36,7 +36,7 @@ app.use(antiHotlink); app.use(parameter); app.use(cache); -initRoutes(app); +registry(app); app.notFound(notFoundHandler); app.onError(errorHandler); diff --git a/lib/init-routes.ts b/lib/init-routes.ts deleted file mode 100644 index d59ccdb2d..000000000 --- a/lib/init-routes.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { directoryImport } from 'directory-import'; -import type { Hono, Handler } from 'hono'; -import { serveStatic } from '@hono/node-server/serve-static'; -import * as path from 'node:path'; - -import index from '@/routes/index'; -import robotstxt from '@/routes/robots.txt'; -import test from '@/routes/test/router'; - -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - -type Root = { - get: (routePath: string, filePath: string) => void; -}; - -const routes: Record void> = {}; - -if (process.env.NODE_ENV === 'test') { - routes.test = test; -} else { - const imports = directoryImport({ - targetDirectoryPath: path.join(__dirname, './routes'), - importPattern: /router\.ts$/, - }); - for (const path in imports) { - const name = path.split('/').find(Boolean); - if (name) { - routes[name] = ( - imports[path] as { - default: (root: Root) => void; - } - ).default; - } - } -} - -export default function (app: Hono) { - for (const name in routes) { - const subApp = app.basePath(`/${name}`); - routes[name]({ - get: (routePath, filePath) => { - const wrapedHandler: Handler = async (ctx, ...args) => { - if (!ctx.get('data')) { - const { default: handler } = await import(path.join(__dirname, 'routes', name, filePath)); - await handler(ctx, ...args); - } - }; - subApp.get(routePath, wrapedHandler); - }, - }); - } - - // routes without rss data - app.get('/', index); - app.get('/robots.txt', robotstxt); - - app.use( - '/*', - serveStatic({ - root: './lib/assets', - rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path), - }) - ); -} diff --git a/lib/init-routes.test.ts b/lib/registry.test.ts similarity index 100% rename from lib/init-routes.test.ts rename to lib/registry.test.ts diff --git a/lib/registry.ts b/lib/registry.ts new file mode 100644 index 000000000..cb5aef1bb --- /dev/null +++ b/lib/registry.ts @@ -0,0 +1,122 @@ +import type { Namespace, Route } from '@/types'; +import { directoryImport } from 'directory-import'; +import type { Hono, Handler } from 'hono'; +import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { serveStatic } from '@hono/node-server/serve-static'; + +import index from '@/routes/index'; +import robotstxt from '@/routes/robots.txt'; +import { namespace as testNamespace } from './routes/test/namespace'; +import { route as testRoute } from '@/routes/test/index'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +let modules: Record = {}; +let namespaces: Record< + string, + Namespace & { + routes: Record< + string, + Route & { + location: string; + } + >; + } +> = {}; + +switch (process.env.NODE_ENV) { + case 'test': + modules = { + '/test/namespace.ts': { + namespace: testNamespace, + }, + '/test/index.ts': { + route: testRoute, + }, + }; + break; + case 'production': + // eslint-disable-next-line n/no-unpublished-require + namespaces = require('../assets/build/routes.json'); + break; + default: + modules = directoryImport({ + targetDirectoryPath: path.join(__dirname, './routes'), + importPattern: /\.ts$/, + }) as typeof modules; +} + +if (Object.keys(modules).length) { + for (const module in modules) { + const content = modules[module] as + | { + route: Route; + } + | { + namespace: Namespace; + }; + const namespace = module.split('/')[1]; + if ('namespace' in content) { + namespaces[namespace] = Object.assign( + { + routes: {}, + }, + namespaces[namespace], + content.namespace + ); + } else if ('route' in content) { + if (!namespaces[namespace]) { + namespaces[namespace] = { + name: namespace, + routes: {}, + }; + } + if (Array.isArray(content.route.path)) { + for (const path of content.route.path) { + namespaces[namespace].routes[path] = { + ...content.route, + location: module.split('/').slice(2).join('/'), + }; + } + } else { + namespaces[namespace].routes[content.route.path] = { + ...content.route, + location: module.split('/').slice(2).join('/'), + }; + } + } + } +} + +export { namespaces }; + +export default function (app: Hono) { + for (const namespace in namespaces) { + const subApp = app.basePath(`/${namespace}`); + for (const path in namespaces[namespace].routes) { + const wrapedHandler: Handler = async (ctx) => { + if (!ctx.get('data')) { + if (typeof namespaces[namespace].routes[path].handler !== 'function') { + const { route } = await import(`./routes/${namespace}/${namespaces[namespace].routes[path].location}`); + namespaces[namespace].routes[path].handler = route.handler; + } + ctx.set('data', await namespaces[namespace].routes[path].handler(ctx)); + } + }; + subApp.get(path, wrapedHandler); + } + } + + // routes without rss data + app.get('/', index); + app.get('/robots.txt', robotstxt); + + app.use( + '/*', + serveStatic({ + root: './lib/assets', + rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path), + }) + ); +} diff --git a/lib/routes/0818tuan/index.ts b/lib/routes/0818tuan/index.ts index 500385be9..436d28bc7 100644 --- a/lib/routes/0818tuan/index.ts +++ b/lib/routes/0818tuan/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:listId?', + categories: ['shopping'], + example: '/0818tuan', + parameters: { listId: '活动分类,见下表,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['TonyRL'], + handler, + description: `| 最新线报 | 实测活动 | 优惠券 | + | -------- | -------- | ------ | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const baseUrl = 'http://www.0818tuan.com'; const listId = ctx.req.param('listId') || '1'; const url = `${baseUrl}/list-${listId}-0.html`; @@ -39,10 +61,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, image: 'http://www.0818tuan.com/favicon.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/0818tuan/maintainer.ts b/lib/routes/0818tuan/maintainer.ts deleted file mode 100644 index baf40743e..000000000 --- a/lib/routes/0818tuan/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:listId?': ['TonyRL'], -}; diff --git a/lib/routes/0818tuan/namespace.ts b/lib/routes/0818tuan/namespace.ts new file mode 100644 index 000000000..0823033af --- /dev/null +++ b/lib/routes/0818tuan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '0818 团', + url: '0818tuan.com', +}; diff --git a/lib/routes/0818tuan/radar.ts b/lib/routes/0818tuan/radar.ts deleted file mode 100644 index a643eaddc..000000000 --- a/lib/routes/0818tuan/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '0818tuan.com': { - _name: '0818 团', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/shopping#0818-tuan', - source: ['/:listId', '/'], - target: (params) => `/0818tuan${params.listId ? '/' + params.listId.replace('list-', '').replace('-0.html', '') : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/0818tuan/router.ts b/lib/routes/0818tuan/router.ts deleted file mode 100644 index ed0e3c394..000000000 --- a/lib/routes/0818tuan/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:listId?', './index'); -}; diff --git a/lib/routes/12306/index.ts b/lib/routes/12306/index.ts index 8721c19af..9f3aaaab0 100644 --- a/lib/routes/12306/index.ts +++ b/lib/routes/12306/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -49,7 +50,25 @@ function getStationInfo(stationName) { }); } -export default async (ctx) => { +export const route: Route = { + path: '/:date/:from/:to/:type?', + categories: ['travel'], + example: '/12306/2022-02-19/重庆/永川东', + parameters: { date: '时间,格式为(YYYY-MM-DD)', from: '始发站', to: '终点站', type: '售票类型,成人和学生可选,默认为成人' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '售票信息', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const date = ctx.req.param('date'); const fromStationInfo = await getStationInfo(ctx.req.param('from')); const toStationInfo = await getStationInfo(ctx.req.param('to')); @@ -104,9 +123,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${fromStationInfo.name} → ${toStationInfo.name} ${date}`, link: linkUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/12306/maintainer.ts b/lib/routes/12306/maintainer.ts deleted file mode 100644 index 3f66b04a7..000000000 --- a/lib/routes/12306/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:date/:from/:to/:type?': ['Fatpandac'], - '/zxdt/:id?': ['LogicJake'], -}; diff --git a/lib/routes/12306/namespace.ts b/lib/routes/12306/namespace.ts new file mode 100644 index 000000000..e7b13a5df --- /dev/null +++ b/lib/routes/12306/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '12306', + url: 'kyfw.12306.cn', +}; diff --git a/lib/routes/12306/radar.ts b/lib/routes/12306/radar.ts deleted file mode 100644 index e81f398d3..000000000 --- a/lib/routes/12306/radar.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - '12306.cn': { - _name: '12306', - kyfw: [ - { - title: '售票信息', - docs: 'https://docs.rsshub.app/routes/travel#12306-shou-shu-piao-piao-xin-shen-xi', - source: ['/', '/otn/leftTicket/init'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - const from = searchParams.get('fs').split(',')[0]; - const to = searchParams.get('ts').split(',')[0]; - const date = searchParams.get('date'); - - return `/12306/${date}/${from}/${to}`; - }, - }, - ], - www: [ - { - title: '最新动态', - docs: 'https://docs.rsshub.app/routes/travel#12306-zui-cuo-xin-dong-tai', - source: ['/', '/mormhweb/1/:id/index_fl.html'], - target: '/12306/zxdt/:id', - }, - ], - }, -}; diff --git a/lib/routes/12306/router.ts b/lib/routes/12306/router.ts deleted file mode 100644 index e986b4842..000000000 --- a/lib/routes/12306/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:date/:from/:to/:type?', './index'); - router.get('/zxdt/:id?', './zxdt'); -}; diff --git a/lib/routes/12306/zxdt.ts b/lib/routes/12306/zxdt.ts index 164159352..df7043de5 100644 --- a/lib/routes/12306/zxdt.ts +++ b/lib/routes/12306/zxdt.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import * as url from 'node:url'; -export default async (ctx) => { +export const route: Route = { + path: '/zxdt/:id?', + categories: ['travel'], + example: '/12306/zxdt', + parameters: { id: '铁路局id,可在 URL 中找到,不填默认显示所有铁路局动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.12306.cn/', 'www.12306.cn/mormhweb/1/:id/index_fl.html'], + target: '/zxdt/:id', + }, + name: '最新动态', + maintainers: ['LogicJake'], + handler, + url: 'www.12306.cn/', +}; + +async function handler(ctx) { const id = ctx.req.param('id') || -1; const link = id === -1 ? 'https://www.12306.cn/mormhweb/zxdt/index_zxdt.html' : `https://www.12306.cn/mormhweb/1/${id}/index_fl.html`; @@ -51,9 +75,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${name}最新动态`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/141jav/index.ts b/lib/routes/141jav/index.ts index 8c535de70..2daa0421b 100644 --- a/lib/routes/141jav/index.ts +++ b/lib/routes/141jav/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://www.141jav.com'; const currentUrl = `${rootUrl}${getSubPath(ctx)}`; @@ -67,9 +75,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `141JAV - ${$('title').text().split('-')[0].trim()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/141jav/maintainer.ts b/lib/routes/141jav/maintainer.ts deleted file mode 100644 index 66c2e93d4..000000000 --- a/lib/routes/141jav/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:keyword?': ['cgkings', 'nczitzk'], -}; diff --git a/lib/routes/141jav/namespace.ts b/lib/routes/141jav/namespace.ts new file mode 100644 index 000000000..0c6a56916 --- /dev/null +++ b/lib/routes/141jav/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '141JAV', + url: '141jav.com', + description: `:::tip +官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141jav.com/feeds/](https://141jav.com/feeds/) +:::`, +}; diff --git a/lib/routes/141jav/radar.ts b/lib/routes/141jav/radar.ts deleted file mode 100644 index 43e5aa0df..000000000 --- a/lib/routes/141jav/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - '141jav.com': { - _name: '141JAV', - '.': [ - { - title: '今日种子', - docs: 'https://docs.rsshub.app/routes/multimedia#141jav', - source: '/', - target: (params, url, document) => { - const today = document.querySelector('div.card.mb-1.card-overview').dataset.date.replaceAll('-', ''); - return `/141jav/day/${today}`; - }, - }, - { - title: '今日演员', - docs: 'https://docs.rsshub.app/routes/multimedia#141jav', - source: '/', - target: (params, url, document) => { - const star = document.querySelector('div.card-content > div > a').getAttribute('href'); - return `/141jav${star}`; - }, - }, - { - title: '页面种子', - docs: 'https://docs.rsshub.app/routes/multimedia#141jav', - source: ['/:type', '/:type/:key', '/:type/:key/:morekey'], - target: (params, url, document) => { - const itype = params.morekey === undefined ? params.type : params.type === 'tag' ? 'tag' : 'day'; - let ikey = `${itype === 'day' ? params.type : ''}${params.key || ''}${itype === 'tag' && params.morekey !== undefined ? '%2F' : ''}${params.morekey || ''}`; - if (ikey === '' && itype === 'tag') { - ikey = document.querySelector('div.thumbnail.is-inline > a').getAttribute('href').replace('/tag/', '').replaceAll('/', '%2F'); - } else if (ikey === '' && itype === 'actress') { - ikey = document.querySelector('div.card > a').getAttribute('href').replace('/actress/', ''); - } - return `/141jav/${itype}/${ikey}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/141jav/router.ts b/lib/routes/141jav/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/141jav/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/141ppv/index.ts b/lib/routes/141ppv/index.ts index c43c9294a..ab65dfcf6 100644 --- a/lib/routes/141ppv/index.ts +++ b/lib/routes/141ppv/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://www.141ppv.com'; const currentUrl = `${rootUrl}${getSubPath(ctx)}`; @@ -70,9 +78,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `141PPV - ${$('title').text().split('-')[0].trim()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/141ppv/maintainer.ts b/lib/routes/141ppv/maintainer.ts deleted file mode 100644 index 66c2e93d4..000000000 --- a/lib/routes/141ppv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:keyword?': ['cgkings', 'nczitzk'], -}; diff --git a/lib/routes/141ppv/namespace.ts b/lib/routes/141ppv/namespace.ts new file mode 100644 index 000000000..73c2292c5 --- /dev/null +++ b/lib/routes/141ppv/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '141PPV', + url: '141ppv.com', + description: `:::tip +官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141ppv.com/feeds/](https://141ppv.com/feeds/) +:::`, +}; diff --git a/lib/routes/141ppv/radar.ts b/lib/routes/141ppv/radar.ts deleted file mode 100644 index b4f0a47fd..000000000 --- a/lib/routes/141ppv/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - '141ppv.com': { - _name: '141JAV', - '.': [ - { - title: '今日种子', - docs: 'https://docs.rsshub.app/routes/multimedia#141ppv', - source: '/', - target: (params, url, document) => { - const today = document.querySelector('div.card.mb-1.card-overview').dataset.date.replaceAll('-', ''); - return `/141ppv/day/${today}`; - }, - }, - { - title: '今日演员', - docs: 'https://docs.rsshub.app/routes/multimedia#141ppv', - source: '/', - target: (params, url, document) => { - const star = document.querySelector('div.card-content > div > a').getAttribute('href'); - return `/141ppv${star}`; - }, - }, - { - title: '页面种子', - docs: 'https://docs.rsshub.app/routes/multimedia#141ppv', - source: ['/:type', '/:type/:key', '/:type/:key/:morekey'], - target: (params, url, document) => { - const itype = params.morekey === undefined ? params.type : params.type === 'tag' ? 'tag' : 'day'; - let ikey = `${itype === 'day' ? params.type : ''}${params.key || ''}${itype === 'tag' && params.morekey !== undefined ? '%2F' : ''}${params.morekey || ''}`; - if (ikey === '' && itype === 'tag') { - ikey = document.querySelector('div.thumbnail.is-inline > a').getAttribute('href').replace('/tag/', '').replaceAll('/', '%2F'); - } else if (ikey === '' && itype === 'actress') { - ikey = document.querySelector('div.card > a').getAttribute('href').replace('/actress/', ''); - } - return `/141ppv/${itype}/${ikey}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/141ppv/router.ts b/lib/routes/141ppv/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/141ppv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/163/ds.ts b/lib/routes/163/ds.ts index 9dd48fae3..2ba16518f 100644 --- a/lib/routes/163/ds.ts +++ b/lib/routes/163/ds.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import * as path from 'node:path'; const root_url = 'https://inf.ds.163.com'; -export default async (ctx) => { +export const route: Route = { + path: '/ds/:id', + categories: ['game'], + example: '/163/ds/63dfbaf4117741daaf73404601165843', + parameters: { id: '用户ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ds.163.com/user/:id'], + }, + name: '用户发帖', + maintainers: ['luyuhuang'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const current_url = `${root_url}/v1/web/feed/basic/getSomeOneFeeds?feedTypes=1,2,3,4,6,7,10,11&someOneUid=${id}`; @@ -28,9 +50,9 @@ export default async (ctx) => { pubDate: parseDate(feed.updateTime), })); - ctx.set('data', { + return { title: `${response.data.result.userInfos[0].user.nick} 的动态`, link: `https://ds.163.com/user/${id}`, item: list, - }); -}; + }; +} diff --git a/lib/routes/163/dy.ts b/lib/routes/163/dy.ts index e9fd1d23b..4386eccb3 100644 --- a/lib/routes/163/dy.ts +++ b/lib/routes/163/dy.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { parseDyArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/dy/:id', + categories: ['new-media'], + example: '/163/dy/W4983108759592548559', + parameters: { id: '网易号 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '更新', + maintainers: ['HendricksZheng'], + handler, + description: `1. 在[网易号搜索页面](https://dy.163.com/v2/media/tosearch.html) 搜索想要订阅的网易号。 + 2. 打开网易号的任意文章。 + 3. 查看源代码,搜索 \`data-wemediaid\`,查看紧随其后的引号内的属性值(类似 \`W1966190042455428950\`)即为网易号 ID。`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`https://dy.163.com/v2/article/list.do?pageNo=1&wemediaId=${id}&size=10`); @@ -20,11 +42,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((e) => parseDyArticle(charset, e, cache.tryGet))); - ctx.set('data', { + return { title: `网易号 - ${list[0].author}`, link: items[0].feedLink, description: items[0].feedDescription, image: items[0].feedImage, item: items, - }); -}; + }; +} diff --git a/lib/routes/163/dy2.ts b/lib/routes/163/dy2.ts index 66ee62170..50d7ebf90 100644 --- a/lib/routes/163/dy2.ts +++ b/lib/routes/163/dy2.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,27 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { parseDyArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/dy2/:id', + categories: ['new-media'], + example: '/163/dy2/T1555591616739', + parameters: { id: 'id,该网易号主页网址最后一项html的文件名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '网易号(通用)', + maintainers: ['mjysci'], + handler, + description: `优先使用方法一,若是网易号搜索页面搜不到的小众网易号(文章页面不含\`data-wemediaid\`)则可使用此法。 +触发反爬会只抓取到标题,建议自建。`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ?? 30; const url = `https://www.163.com/dy/media/${id}.html`; @@ -32,12 +53,12 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseDyArticle(charset, item, cache.tryGet))); - ctx.set('data', { + return { title: `${$('head title').text()} - 网易号`, link: url, description: $('.icon_line.desc').text(), image: $('.head_img').attr('src'), item: items, author: $('h2').text(), - }); -}; + }; +} diff --git a/lib/routes/163/exclusive.ts b/lib/routes/163/exclusive.ts index cebf4e1cf..d956ad47e 100644 --- a/lib/routes/163/exclusive.ts +++ b/lib/routes/163/exclusive.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -76,7 +77,46 @@ const ids = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/exclusive/:id?', + categories: ['new-media'], + example: '/163/exclusive/qsyk', + parameters: { id: '栏目, 默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['3g.163.com/touch/exclusive/sub/:id'], + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 分类 | 编号 | + | -------- | ---- | + | 首页 | | + | 轻松一刻 | qsyk | + | 槽值 | cz | + | 人间 | rj | + | 大国小民 | dgxm | + | 三三有梗 | ssyg | + | 数读 | sd | + | 看客 | kk | + | 下划线 | xhx | + | 谈心社 | txs | + | 哒哒 | dd | + | 胖编怪聊 | pbgl | + | 曲一刀 | qyd | + | 今日之声 | jrzs | + | 浪潮 | lc | + | 沸点 | fd |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'https://3g.163.com'; @@ -144,9 +184,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `网易独家 - ${ids[id].title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/163/maintainer.ts b/lib/routes/163/maintainer.ts deleted file mode 100644 index 041dbeeb5..000000000 --- a/lib/routes/163/maintainer.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - '/exclusive/:id?': ['nczitzk'], - '/ds/:id': ['luyuhuang'], - '/dy/:id': ['HendricksZheng'], - '/dy2/:id': ['mjysci'], - - '/music/artist/:id': ['metowolf'], - '/music/artist/songs/:id': ['ZhongMingKun'], - '/music/djradio/:id': ['magic-akari'], - '/music/playlist/:id': ['DIYgod'], - '/music/user/events/:id': ['Master-Hash'], - '/music/user/playlist/:uid': ['DIYgod'], - '/music/user/playrecords/:uid/:type?': ['alfredcai'], - - '/news/rank/:category?/:type?/:time?': ['nczitzk'], - '/news/special/:type?': ['nczitzk'], - '/open/vip': ['hoilc'], - '/renjian/:category?': ['nczitzk'], - '/today/:need_content?': ['nczitzk'], -}; diff --git a/lib/routes/163/music/artist-songs.ts b/lib/routes/163/music/artist-songs.ts index 07317d37a..4f82ba457 100644 --- a/lib/routes/163/music/artist-songs.ts +++ b/lib/routes/163/music/artist-songs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,25 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/music/artist/songs/:id', + categories: ['multimedia'], + example: '/163/music/artist/songs/2116', + parameters: { id: '歌手 id, 可在歌手详情页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '歌手歌曲', + maintainers: ['ZhongMingKun'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { data } = await got(`https://music.163.com/api/v1/artist/songs`, { @@ -33,10 +52,10 @@ export default async (ctx) => { link: `https://music.163.com/#/song?id=${song.id}`, })); - ctx.set('data', { + return { title: `${artist.name} - 歌手歌曲`, link: `https://music.163.com/#/artist?id=${id}`, description: `网易云音乐 - 歌手歌曲 - ${artist.name}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/163/music/artist.ts b/lib/routes/163/music/artist.ts index de3a60871..54f0946a1 100644 --- a/lib/routes/163/music/artist.ts +++ b/lib/routes/163/music/artist.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,25 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/music/artist/:id', + categories: ['multimedia'], + example: '/163/music/artist/2116', + parameters: { id: '歌手 id, 可在歌手详情页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '歌手专辑', + maintainers: ['metowolf'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`https://music.163.com/api/artist/albums/${id}`, { @@ -16,7 +35,7 @@ export default async (ctx) => { const data = response.data; - ctx.set('data', { + return { title: data.artist.name, link: `https://music.163.com/#/artist/album?id=${id}`, description: `网易云音乐歌手专辑 - ${data.artist.name}`, @@ -38,5 +57,5 @@ export default async (ctx) => { author: singer, }; }), - }); -}; + }; +} diff --git a/lib/routes/163/music/djradio.ts b/lib/routes/163/music/djradio.ts index 43835d147..985e2bbdf 100644 --- a/lib/routes/163/music/djradio.ts +++ b/lib/routes/163/music/djradio.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,25 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/music/djradio/:id', + categories: ['multimedia'], + example: '/163/music/djradio/347317067', + parameters: { id: '节目 id, 可在电台节目页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '电台节目', + maintainers: ['magic-akari'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const ProcessFeed = (limit, offset) => @@ -65,7 +84,7 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: radio.name, link: `https://music.163.com/djradio?id=${id}`, subtitle: radio.desc, @@ -77,5 +96,5 @@ export default async (ctx) => { itunes_author: dj.nickname, itunes_category: radio.category, item: items.flat(), - }); -}; + }; +} diff --git a/lib/routes/163/music/maintainer.ts b/lib/routes/163/music/maintainer.ts deleted file mode 100644 index 131c73786..000000000 --- a/lib/routes/163/music/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/events/:id': ['Master-Hash'], -}; diff --git a/lib/routes/163/music/playlist.ts b/lib/routes/163/music/playlist.ts index a62f63bd7..5a7861217 100644 --- a/lib/routes/163/music/playlist.ts +++ b/lib/routes/163/music/playlist.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,25 @@ import { config } from '@/config'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/music/playlist/:id', + categories: ['multimedia'], + example: '/163/music/playlist/35798529', + parameters: { id: '歌单 id, 可在歌单页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '歌单歌曲', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { if (!config.ncm || !config.ncm.cookies) { throw new Error('163 Music RSS is disabled due to the lack of relevant config'); } @@ -34,7 +53,7 @@ export default async (ctx) => { }); const songs = songinfo.data.songs; - ctx.set('data', { + return { title: data.name, link: `https://music.163.com/#/playlist?id=${id}`, description: `网易云音乐歌单 - ${data.name}`, @@ -54,5 +73,5 @@ export default async (ctx) => { author: singer, }; }), - }); -}; + }; +} diff --git a/lib/routes/163/music/userevents.ts b/lib/routes/163/music/userevents.ts index 374d33d4c..d510e4602 100644 --- a/lib/routes/163/music/userevents.ts +++ b/lib/routes/163/music/userevents.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,14 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; const renderDescription = (info) => art(path.join(__dirname, '../templates/music/userevents.art'), info); -export default async (ctx) => { +export const route: Route = { + path: '/music/user/events/:id', + name: 'Unknown', + maintainers: ['Master-Hash'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`https://music.163.com/api/event/get/${id}`, { @@ -18,7 +26,7 @@ export default async (ctx) => { const { data } = response; const { nickname, signature, avatarUrl } = data.events[0].user; - ctx.set('data', { + return { title: `${nickname}的云村动态`, link: `https://music.163.com/#/user/event?id=${id}`, description: `网易云音乐用户动态 - ${signature}`, @@ -51,5 +59,5 @@ export default async (ctx) => { comments: item.info.commentCount, }; }), - }); -}; + }; +} diff --git a/lib/routes/163/music/userplaylist.ts b/lib/routes/163/music/userplaylist.ts index 5ada651c1..87fd929cb 100644 --- a/lib/routes/163/music/userplaylist.ts +++ b/lib/routes/163/music/userplaylist.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,25 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/music/user/playlist/:uid', + categories: ['multimedia'], + example: '/163/music/user/playlist/45441555', + parameters: { uid: '用户 uid, 可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户歌单', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const response = await got.post('https://music.163.com/api/user/playlist', { @@ -25,7 +44,7 @@ export default async (ctx) => { const { nickname, signature, avatarUrl } = creator; - ctx.set('data', { + return { title: `${nickname} 的所有歌单`, link: `https://music.163.com/user/home?id=${uid}`, subtitle: signature, @@ -55,5 +74,5 @@ export default async (ctx) => { category: pl.tags, }; }), - }); -}; + }; +} diff --git a/lib/routes/163/music/userplayrecords.ts b/lib/routes/163/music/userplayrecords.ts index 3f7476649..1b85c748e 100644 --- a/lib/routes/163/music/userplayrecords.ts +++ b/lib/routes/163/music/userplayrecords.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -40,7 +41,25 @@ function getItem(records) { }); } -export default async (ctx) => { +export const route: Route = { + path: '/music/user/playrecords/:uid/:type?', + categories: ['multimedia'], + example: '/163/music/user/playrecords/45441555/1', + parameters: { uid: '用户 uid, 可在用户主页 URL 中找到', type: '排行榜类型,0所有时间(默认),1最近一周' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户听歌排行', + maintainers: ['alfredcai'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const type = Number.parseInt(ctx.req.param('type')) || 0; @@ -49,10 +68,10 @@ export default async (ctx) => { const records = type === 1 ? response.data.weekData : response.data.allData; - ctx.set('data', { + return { title: `${type === 1 ? '听歌榜单(最近一周)' : '听歌榜单(所有时间}'} - ${uid}}`, link: `https://music.163.com/user/home?id=${uid}`, updated: response.headers.date, item: getItem(records), - }); -}; + }; +} diff --git a/lib/routes/163/namespace.ts b/lib/routes/163/namespace.ts new file mode 100644 index 000000000..4005a73ca --- /dev/null +++ b/lib/routes/163/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '网易公开课', + url: '163.com', + description: `:::tip +部分歌单及听歌排行信息为登陆后可见,自建时将环境变量\`NCM_COOKIES\`设为登陆后的 Cookie 值,即可正常获取。 +:::`, +}; diff --git a/lib/routes/163/news/rank.ts b/lib/routes/163/news/rank.ts index 6cc37f65a..be2be0968 100644 --- a/lib/routes/163/news/rank.ts +++ b/lib/routes/163/news/rank.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -76,7 +77,42 @@ const timeRange = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/rank/:category?/:type?/:time?', + categories: ['new-media'], + example: '/163/news/rank/whole/click/day', + parameters: { + category: '新闻分类,参见下表,默认为“全站”', + type: '排行榜类型,“点击榜”对应`click`,“跟贴榜”对应`follow`,默认为“点击榜”', + time: '统计时间,“1小时”对应`hour`,“24小时”对应`day`,“本周”对应`week`,“本月”对应`month`,默认为“24小时”', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '排行榜', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 全站新闻 **点击榜** 的统计时间仅包含 “24 小时”、“本周”、“本月”,不包含 “1 小时”。即可用的\`time\`参数为\`day\`、\`week\`、\`month\`。 + + 其他分类 **点击榜** 的统计时间仅包含 “1 小时”、“24 小时”、“本周”。即可用的\`time\`参数为\`hour\`、\`day\`、\`week\`。 + + 而所有分类(包括全站)的 **跟贴榜** 的统计时间皆仅包含 “24 小时”、“本周”、“本月”。即可用的\`time\`参数为\`day\`、\`week\`、\`month\`。 + ::: + + 新闻分类: + + | 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 | + | ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- | + | whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || 'whole'; const type = ctx.req.param('type') || 'click'; const time = ctx.req.param('time') || 'day'; @@ -148,9 +184,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `网易新闻${timeRange[time].title}${type === 'click' ? '点击' : '跟帖'}榜 - ${cfg.title}`, link: currentUrl, item: items.filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/163/news/special.ts b/lib/routes/163/news/special.ts index fbc97c929..bbf0d051b 100644 --- a/lib/routes/163/news/special.ts +++ b/lib/routes/163/news/special.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -19,7 +20,28 @@ const typeMap = { 14: '浪潮', 15: '沸点', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/special/:type?', + categories: ['new-media'], + example: '/163/news/special/1', + parameters: { type: '栏目' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专栏', + maintainers: ['nczitzk'], + handler, + description: `| 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 | + | -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- | + | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |`, +}; + +async function handler(ctx) { if (!ctx.req.param('type')) { throw new Error('Bad parameter. See https://docs.rsshub.app/routes/game#wang-yi-da-shen'); } @@ -107,9 +129,9 @@ export default async (ctx) => { const selectedTypeName = typeMap[selectedType]; - ctx.set('data', { + return { title: selectedTypeName ? `${selectedTypeName} - 网易专栏` : '网易专栏', link: 'https://3g.163.com/touch/exclusive/?referFrom=163', item: items, - }); -}; + }; +} diff --git a/lib/routes/163/open/vip.ts b/lib/routes/163/open/vip.ts index 0c602e692..b38c02d3c 100644 --- a/lib/routes/163/open/vip.ts +++ b/lib/routes/163/open/vip.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/open/vip', + categories: ['study'], + example: '/163/open/vip', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vip.open.163.com/'], + }, + name: '精品课程', + maintainers: ['hoilc'], + handler, + url: 'vip.open.163.com/', +}; + +async function handler() { const url = 'https://vip.open.163.com'; const list_response = await got(url); @@ -59,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '网易公开课 - 精品课程', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/163/radar.ts b/lib/routes/163/radar.ts deleted file mode 100644 index 720e88e1d..000000000 --- a/lib/routes/163/radar.ts +++ /dev/null @@ -1,155 +0,0 @@ -const dy2 = { - title: '网易号(通用)', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-hao', - source: ['/dy/media/:id', '/news/sub/:id'], - target: (params) => `/163/dy2/${params.id.replace('.html', '')}`, -}; - -export default { - '163.com': { - _name: '网易', - '.': [dy2], - '3g': [ - dy2, - { - title: '独家栏目', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-du-jia-lan-mu', - source: ['/touch/exclusive/sub/:id'], - target: '/163/exclusive/:id?', - }, - ], - 'c.m': [dy2], - ds: [ - { - title: '大神', - docs: 'https://docs.rsshub.app/routes/game#wang-yi-da-shen', - source: '/user/:id', - target: '/163/ds/:id', - }, - ], - m: [ - { - title: '今日关注', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-xin-wen-jin-ri-guan-zhu', - source: ['/'], - target: '/163/today', - }, - ], - music: [ - { - title: '云音乐 - 用户歌单', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/', - target: (params, url) => { - const id = new URL(url).hash.match(/home\?id=(.*)/)[1]; - return id ? `/163/music/user/playlist/${id}` : ''; - }, - }, - { - title: '云音乐 - 歌单歌曲', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/', - target: (params, url) => { - const id = new URL(url).hash.match(/playlist\?id=(.*)/)[1]; - return id ? `/163/music/playlist/${id}` : ''; - }, - }, - { - title: '云音乐 - 歌手专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/', - target: (params, url) => { - const id = new URL(url).hash.match(/album\?id=(.*)/)[1]; - return id ? `/163/music/artist/${id}` : ''; - }, - }, - { - title: '云音乐 - 歌手歌曲', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/', - target: (_params, url) => { - const id = new URL(url).hash.match(/artist\?id=(.*)/)[1]; - return id ? `/163/music/artist/songs/${id}` : ''; - }, - }, - { - title: '云音乐 - 电台节目', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/', - target: (params, url) => { - const id = new URL(url).hash.match(/djradio\?id=(.*)/)[1]; - return id ? `/163/music/djradio/${id}` : ''; - }, - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue-yong-hu-dong-tai', - source: ['/'], - target: (_, url) => { - const id = new URL(url).hash.match(/event\?id=(.*)/)[1]; - return id ? `/163/music/user/events/${id}` : ''; - }, - }, - ], - news: [ - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-xin-wen-pai-hang-bang', - }, - ], - renjian: [ - { - title: '人间', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-xin-wen-ren-jian', - source: ['/:category', '/'], - target: '/163/renjian/:category?', - }, - ], - 'vip.open': [ - { - title: '公开课 精品课程', - docs: 'https://docs.rsshub.app/routes/study#wang-yi-gong-kai-ke', - source: ['/'], - target: '/163/open/vip', - }, - ], - 'wp.m': [ - { - title: '今日关注', - docs: 'https://docs.rsshub.app/routes/new-media#wang-yi-xin-wen', - source: ['/163/html/newsapp/todayFocus/index.html', '/'], - target: '/163/today', - }, - ], - 'y.music': [ - { - title: '云音乐 - 用户歌单', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/m/user', - target: (params, url) => `/163/music/user/playlist/${new URL(url).searchParams.get('id')}`, - }, - { - title: '云音乐 - 歌单歌曲', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/m/playlist', - target: (params, url) => `/163/music/playlist/${new URL(url).searchParams.get('id')}`, - }, - { - title: '云音乐 - 歌手专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: '/m/album', - target: (params, url) => `/163/music/artist/${new URL(url).searchParams.get('id')}`, - }, - { - title: '云音乐 - 电台节目', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue', - source: ['/m/radio', '/m/djradio'], - target: (params, url) => `/163/music/djradio/${new URL(url).searchParams.get('id')}`, - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/multimedia#wang-yi-yun-yin-yue-yong-hu-dong-tai', - }, - ], - }, -}; diff --git a/lib/routes/163/renjian.ts b/lib/routes/163/renjian.ts index a50a5d2f2..9c4d822a1 100644 --- a/lib/routes/163/renjian.ts +++ b/lib/routes/163/renjian.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -13,7 +14,31 @@ const titles = { kanke: '看客', }; -export default async (ctx) => { +export const route: Route = { + path: '/renjian/:category?', + categories: ['new-media'], + example: '/163/renjian/texie', + parameters: { category: '分类,见下表,默认为特写' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['renjian.163.com/:category', 'renjian.163.com/'], + }, + name: '人间', + maintainers: ['nczitzk'], + handler, + description: `| 特写 | 记事 | 大写 | 好读 | 看客 | + | ----- | ----- | ----- | ----- | ----- | + | texie | jishi | daxie | haodu | kanke |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'texie'; const rootUrl = 'https://renjian.163.com'; @@ -70,9 +95,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `人间 - ${titles[category]} - 网易新闻`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/163/router.ts b/lib/routes/163/router.ts deleted file mode 100644 index 8a4372fa1..000000000 --- a/lib/routes/163/router.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default (router) => { - router.get('/exclusive/:id?', './exclusive'); - router.get('/ds/:id', './ds'); - router.get('/dy/:id', './dy'); - router.get('/dy2/:id', './dy2'); - - router.get('/music/artist/:id', './music/artist'); - router.get('/music/artist/songs/:id', './music/artist-songs'); - router.get('/music/djradio/:id', './music/djradio'); - router.get('/music/playlist/:id', './music/playlist'); - router.get('/music/user/events/:id', './music/userevents'); - router.get('/music/user/playlist/:uid', './music/userplaylist'); - router.get('/music/user/playrecords/:uid/:type?', './music/userplayrecords'); - - router.get('/news/rank/:category?/:type?/:time?', './news/rank'); - router.get('/news/special/:type?', './news/special'); - router.get('/open/vip', './open/vip'); - router.get('/renjian/:category?', './renjian'); - router.get('/today/:need_content?', './today'); -}; diff --git a/lib/routes/163/today.ts b/lib/routes/163/today.ts index f70cfdf82..fc4c0443f 100644 --- a/lib/routes/163/today.ts +++ b/lib/routes/163/today.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/today/:need_content?', + categories: ['new-media'], + example: '/163/today', + parameters: { need_content: '需要获取全文,填写 true/yes 表示需要,默认需要' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wp.m.163.com/163/html/newsapp/todayFocus/index.html', 'wp.m.163.com/'], + target: '/today', + }, + name: '今日关注', + maintainers: ['nczitzk'], + handler, + url: 'wp.m.163.com/163/html/newsapp/todayFocus/index.html', + description: `:::tip + 参数 **需要获取全文** 设置为 \`true\` \`yes\` \`t\` \`y\` 等值后,RSS 会携带该新闻条目的对应全文。 + :::`, +}; + +async function handler(ctx) { const needContent = /t|y/i.test(ctx.req.param('need_content') ?? 'true'); const rootUrl = 'https://gw.m.163.com'; @@ -48,9 +75,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: '今日关注 - 网易新闻', link: 'https://wp.m.163.com/163/html/newsapp/todayFocus/index.html', item: items, - }); -}; + }; +} diff --git a/lib/routes/18comic/album.ts b/lib/routes/18comic/album.ts index 1509af63a..149dcb7a9 100644 --- a/lib/routes/18comic/album.ts +++ b/lib/routes/18comic/album.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,32 @@ import { parseDate } from '@/utils/parse-date'; import { defaultDomain, getRootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/album/:id', + categories: ['anime'], + example: '/18comic/album/292282', + parameters: { id: '专辑 id,可在专辑页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jmcomic.group/'], + }, + name: '专辑', + maintainers: ['nczitzk'], + handler, + url: 'jmcomic.group/', + description: `:::tip + 专辑 id 不包括 URL 中标题的部分。 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { domain = defaultDomain } = ctx.req.query(); const rootUrl = getRootUrl(domain); @@ -70,10 +96,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, description: $('meta[property="og:description"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/18comic/blogs.ts b/lib/routes/18comic/blogs.ts index 6e703c2ae..0a28b4909 100644 --- a/lib/routes/18comic/blogs.ts +++ b/lib/routes/18comic/blogs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,34 @@ import { parseDate } from '@/utils/parse-date'; import { defaultDomain, getRootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/blogs/:category?', + categories: ['anime'], + example: '/18comic/blogs', + parameters: { category: '分类,见下表,默认为空即全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jmcomic.group/'], + }, + name: '文庫', + maintainers: ['nczitzk'], + handler, + url: 'jmcomic.group/', + description: `分类 + + | 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 | + | ---- | -------- | -------- | -------- | -------- | + | | dinner | raiders | jg | figure |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const { domain = defaultDomain } = ctx.req.query(); const rootUrl = getRootUrl(domain); @@ -56,12 +84,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title') .text() .replace(/最新的/, $('.article-nav .active').text()), link: currentUrl, item: items, description: $('meta[property="og:description"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/18comic/index.ts b/lib/routes/18comic/index.ts index da6eaaf9b..c8f144f09 100644 --- a/lib/routes/18comic/index.ts +++ b/lib/routes/18comic/index.ts @@ -1,6 +1,51 @@ +import { Route } from '@/types'; import { defaultDomain, getRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:time?/:order?/:keyword?', + categories: ['anime'], + example: '/18comic', + parameters: { category: '分类,见下表,默认为 `all` 即全部', time: '时间范围,见下表,默认为 `a` 即全部', order: '排列顺序,见下表,默认为 `mr` 即最新', keyword: '关键字,见下表,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jmcomic.group/'], + }, + name: '成人 A 漫', + maintainers: ['nczitzk'], + handler, + url: 'jmcomic.group/', + description: `分类 + + | 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | + | ---- | -------- | ------ | ------ | ------ | ----- | ------ | + | all | another | doujin | hanman | meiman | short | single | + + 时间范围 + + | 全部 | 今天 | 这周 | 本月 | + | ---- | ---- | ---- | ---- | + | a | t | w | m | + + 排列顺序 + + | 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 | + | ---- | ---------- | -------- | -------- | -------- | -------- | + | mr | mv | mp | tr | md | tf | + + 关键字(供参考) + + | YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 | + | ---- | ------ | --- | ---- | -- | ---- |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const keyword = ctx.req.param('keyword') ?? ''; const time = ctx.req.param('time') ?? 'a'; @@ -11,4 +56,4 @@ export default async (ctx) => { const currentUrl = `${rootUrl}/albums${category === 'all' ? '' : `/${category}`}${keyword ? `?screen=${keyword}` : '?'}${time === 'a' ? '' : `&t=${time}`}${order === 'mr' ? '' : `&o=${order}`}`; ctx.set('data', await ProcessItems(ctx, currentUrl, rootUrl)); -}; +} diff --git a/lib/routes/18comic/maintainer.ts b/lib/routes/18comic/maintainer.ts deleted file mode 100644 index 6966c2966..000000000 --- a/lib/routes/18comic/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/album/:id': ['nczitzk'], - '/blogs/:category?': ['nczitzk'], - '/search/:option?/:category?/:time?/:order?/:keyword?': ['nczitzk'], - '/:category?/:time?/:order?/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/18comic/namespace.ts b/lib/routes/18comic/namespace.ts new file mode 100644 index 000000000..e910cb8fb --- /dev/null +++ b/lib/routes/18comic/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '禁漫天堂', + url: '18comic.org', + description: `:::tip +禁漫天堂有多个备用域名,本路由默认使用域名 \`https://jmcomic.me\`,若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://jmcomic1.me\`,则在所有禁漫天堂路由最后加上 \`?domain=jmcomic1.me\` 即可,此时路由为 [\`/18comic?domain=jmcomic1.me\`](https://rsshub.app/18comic?domain=jmcomic1.me) +:::`, +}; diff --git a/lib/routes/18comic/radar.ts b/lib/routes/18comic/radar.ts deleted file mode 100644 index 9107861dd..000000000 --- a/lib/routes/18comic/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -const _18comic = { - _name: '禁漫天堂', - '.': [ - { - title: '成人 A 漫', - docs: 'https://docs.rsshub.app/routes/anime#jin-man-tian-tang-cheng-ren-a-man', - source: ['/'], - target: '/18comic/:category?/:time?/:order?/:keyword?', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/anime#jin-man-tian-tang-sou-suo', - source: ['/'], - target: '/18comic/search/:option?/:category?:keyword?/:time?/:order?', - }, - { - title: '专辑', - docs: 'https://docs.rsshub.app/routes/anime#jin-man-tian-tang-zhuan-ji', - source: ['/'], - target: '/18comic/album/:id', - }, - { - title: '文庫', - docs: 'https://docs.rsshub.app/routes/anime#jin-man-tian-tang-wen-ku', - source: ['/'], - target: '/18comic/blogs/:category?', - }, - ], -}; - -export default { - '18comic.org': _18comic, - '18comic.vip': _18comic, - // - 'jmcomic.me': _18comic, - 'jmcomic1.me': _18comic, - // - 'jmcomic.rocks': _18comic, - 'jmcomic1.rocks': _18comic, - 'jmcomic.group': _18comic, -}; diff --git a/lib/routes/18comic/router.ts b/lib/routes/18comic/router.ts deleted file mode 100644 index 7ca981aec..000000000 --- a/lib/routes/18comic/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/album/:id', './album'); - router.get('/blogs/:category?', './blogs'); - router.get('/search/:option?/:category?/:keyword?/:time?/:order?', './search'); - router.get('/:category?/:time?/:order?/:keyword?', './index'); -}; diff --git a/lib/routes/18comic/search.ts b/lib/routes/18comic/search.ts index 0ead59784..2e2bcbadf 100644 --- a/lib/routes/18comic/search.ts +++ b/lib/routes/18comic/search.ts @@ -1,6 +1,39 @@ +import { Route } from '@/types'; import { defaultDomain, getRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:option?/:category?/:keyword?/:time?/:order?', + categories: ['anime'], + example: '/18comic/search/photos/all/NTR', + parameters: { + option: '选项,可选 `video` 和 `photos`,默认为 `photos`', + category: '分类,同上表,默认为 `all` 即全部', + keyword: '关键字,同上表,默认为空', + time: '时间范围,同上表,默认为 `a` 即全部', + order: '排列顺序,同上表,默认为 `mr` 即最新', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jmcomic.group/'], + target: '/:category?/:time?/:order?/:keyword?', + }, + name: '搜索', + maintainers: [], + handler, + url: 'jmcomic.group/', + description: `:::tip + 关键字必须超过两个字,这是来自网站的限制。 + :::`, +}; + +async function handler(ctx) { const option = ctx.req.param('option') ?? 'photos'; const category = ctx.req.param('category') ?? 'all'; const keyword = ctx.req.param('keyword') ?? ''; @@ -12,4 +45,4 @@ export default async (ctx) => { const currentUrl = `${rootUrl}/search/${option}${category === 'all' ? '' : `/${category}`}${keyword ? `?search_query=${keyword}` : '?'}${time === 'a' ? '' : `&t=${time}`}${order === 'mr' ? '' : `&o=${order}`}`; ctx.set('data', await ProcessItems(ctx, currentUrl, rootUrl)); -}; +} diff --git a/lib/routes/19lou/index.ts b/lib/routes/19lou/index.ts index 97be42443..ca36be62c 100644 --- a/lib/routes/19lou/index.ts +++ b/lib/routes/19lou/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,40 @@ const setCookie = function (cookieName, cookieValue, seconds, path, domain, secu return [encodeURI(cookieName), '=', encodeURI(cookieValue), expires ? '; expires=' + expires.toGMTString() : '', path ? '; path=' + path : '/', domain ? '; domain=' + domain : '', secure ? '; secure' : ''].join(''); }; -export default async (ctx) => { +export const route: Route = { + path: '/:city?', + categories: ['bbs'], + example: '/19lou/jiaxing', + parameters: { city: '分类,见下表,默认为 www,即杭州' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '头条', + maintainers: ['nczitzk'], + handler, + description: `| 杭州 | 台州 | 嘉兴 | 宁波 | 湖州 | + | ---- | ------- | ------- | ------ | ------ | + | www | taizhou | jiaxing | ningbo | huzhou | + + | 绍兴 | 湖州 | 温州 | 金华 | 舟山 | + | -------- | ------ | ------- | ------ | -------- | + | shaoxing | huzhou | wenzhou | jinhua | zhoushan | + + | 衢州 | 丽水 | 义乌 | 萧山 | 余杭 | + | ------ | ------ | ---- | -------- | ------ | + | quzhou | lishui | yiwu | xiaoshan | yuhang | + + | 临安 | 富阳 | 桐庐 | 建德 | 淳安 | + | ----- | ------ | ------ | ------ | ------ | + | linan | fuyang | tonglu | jiande | chunan |`, +}; + +async function handler(ctx) { const city = ctx.req.param('city') ?? 'www'; if (!isValidHost(city)) { throw new Error('Invalid city'); @@ -71,9 +105,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text().split('-')[0], link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/19lou/maintainer.ts b/lib/routes/19lou/maintainer.ts deleted file mode 100644 index 9e97ccc21..000000000 --- a/lib/routes/19lou/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:city?': ['nczitzk'], -}; diff --git a/lib/routes/19lou/namespace.ts b/lib/routes/19lou/namespace.ts new file mode 100644 index 000000000..fdb482029 --- /dev/null +++ b/lib/routes/19lou/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '19 楼', + url: '19lou.com', +}; diff --git a/lib/routes/19lou/radar.ts b/lib/routes/19lou/radar.ts deleted file mode 100644 index 096243acc..000000000 --- a/lib/routes/19lou/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - '19lou.com': { - _name: '19 楼', - '.': [ - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/bbs#19-lou-tou-tiao', - source: ['/'], - target: (params, url) => `/19lou/${new URL(url).toString().match(/\/\/(.*?)\.19lou/)[1]}`, - }, - ], - www: [ - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/bbs#19-lou-tou-tiao', - source: ['/'], - target: '/19lou/www', - }, - ], - jiaxing: [ - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/bbs#19-lou-tou-tiao', - source: ['/'], - target: '/19lou/jiaxing', - }, - ], - }, -}; diff --git a/lib/routes/19lou/router.ts b/lib/routes/19lou/router.ts deleted file mode 100644 index 578ff1b74..000000000 --- a/lib/routes/19lou/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:city?', './index'); -}; diff --git a/lib/routes/1lou/index.ts b/lib/routes/1lou/index.ts index 8cbf4389b..ce3509710 100644 --- a/lib/routes/1lou/index.ts +++ b/lib/routes/1lou/index.ts @@ -1,10 +1,42 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:path?', + categories: ['multimedia'], + example: '/1lou/search-繁花.htm', + parameters: { path: '路径信息在URL里找到,主页为 index' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['1lou.me/:path'], + target: '/:path', + }, + name: '搜索', + maintainers: ['falling'], + handler, + description: `:::tip + 将 1lou.me/ 后的内容作为参数传入到 path 即可 + + [www.1lou.me/search - 繁花.htm](http://www.1lou.me/search-繁花.htm) --> /1lou/search - 繁花.htm + + [www.1lou.me/forum-1.htm](http://www.1lou.me/forum-1.htm) --> /1lou/forum-1.htm + + [www.1lou.me/](http://www.1lou.me/) --> /1lou/ + :::`, +}; + +async function handler(ctx) { const path = ctx.req.param('path') ?? ''; const rootUrl = `https://www.1lou.me`; const currentUrl = `${rootUrl}/${path}`; @@ -46,9 +78,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '1Lou', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/1lou/maintainer.ts b/lib/routes/1lou/maintainer.ts deleted file mode 100644 index 747629cc2..000000000 --- a/lib/routes/1lou/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path?': ['falling'], -}; diff --git a/lib/routes/1lou/namespace.ts b/lib/routes/1lou/namespace.ts new file mode 100644 index 000000000..388f617e4 --- /dev/null +++ b/lib/routes/1lou/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BT 之家 1LOU 站', + url: '1lou.me', +}; diff --git a/lib/routes/1lou/radar.ts b/lib/routes/1lou/radar.ts deleted file mode 100644 index 2b3aebe34..000000000 --- a/lib/routes/1lou/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '1lou.me': { - _name: 'BT之家 1LOU站', - '.': [ - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#bt-zhi-jia-1lou-zhan', - source: ['/:path'], - target: '/1lou/:path', - }, - ], - }, -}; diff --git a/lib/routes/1lou/router.ts b/lib/routes/1lou/router.ts deleted file mode 100644 index 9bc8c038a..000000000 --- a/lib/routes/1lou/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:path?', './index'); -}; diff --git a/lib/routes/1point3acres/blog.ts b/lib/routes/1point3acres/blog.ts index a17d0675b..f2f88a3b3 100644 --- a/lib/routes/1point3acres/blog.ts +++ b/lib/routes/1point3acres/blog.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:category?', + categories: ['bbs'], + example: '/1point3acres/blog', + parameters: { category: '分类,见下表,可在对应分类页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['blog.1point3acres.com/:category'], + }, + name: '博客', + maintainers: ['nczitzk'], + handler, + description: `| 留学申请 | 找工求职 | 生活攻略 | 投资理财 | 签证移民 | 时政要闻 | + | ---------- | -------- | --------- | -------- | -------- | -------- | + | studyinusa | career | lifestyle | invest | visa | news |`, +}; + +async function handler(ctx) { const categoryMap = { studyinusa: { title: '留学申请', @@ -59,9 +84,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${category ? `${categoryMap[category].title} | ` : ''}美国留学就业生活攻略`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/1point3acres/category.ts b/lib/routes/1point3acres/category.ts index 31b6e7214..280070d16 100644 --- a/lib/routes/1point3acres/category.ts +++ b/lib/routes/1point3acres/category.ts @@ -1,7 +1,44 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, types, ProcessThreads } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:id?/:type?/:order?', + categories: ['bbs'], + example: '/1point3acres/category/h1b', + parameters: { id: '标签 id,默认为全部', type: '帖子分类, 见下表,默认为 hot,即热门帖子', order: '排序方式,见下表,默认为空,即最新回复' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['instant.1point3acres.com/section/:id', 'instant.1point3acres.com/'], + }, + name: '标签', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 更多标签可以在 [标签列表](https://instant.1point3acres.com/tags) 中找到。 + ::: + + 分类 + + | 热门帖子 | 最新帖子 | + | -------- | -------- | + | hot | new | + + 排序方式 + + | 最新回复 | 最新发布 | + | -------- | -------- | + | | post |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const type = ctx.req.param('type') ?? 'hot'; const order = ctx.req.param('order') ?? ''; @@ -10,9 +47,9 @@ export default async (ctx) => { const currentUrl = `${rootUrl}${id ? `/category/${id}` : ''}`; const apiUrl = `${apiRootUrl}/api${id ? `/tags/${id}/` : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; - ctx.set('data', { + return { title: `一亩三分地 - ${id}${types[type]}`, link: currentUrl, item: await ProcessThreads(cache.tryGet, apiUrl, order), - }); -}; + }; +} diff --git a/lib/routes/1point3acres/maintainer.ts b/lib/routes/1point3acres/maintainer.ts deleted file mode 100644 index 308be5753..000000000 --- a/lib/routes/1point3acres/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/blog/:category?': ['nczitzk'], - '/category/:id?/:type?/:order?': ['nczitzk'], - '/offer/:year?/:major?/:school?': ['EthanWng97'], - '/post/:type?/:order?': ['EthanWng97', 'DIYgod', 'nczitzk'], - '/section/:id?/:type?/:order?': ['nczitzk'], - '/user/:id/posts': ['Maecenas'], - '/user/:id/threads': ['Maecenas'], -}; diff --git a/lib/routes/1point3acres/namespace.ts b/lib/routes/1point3acres/namespace.ts new file mode 100644 index 000000000..f1af63dc7 --- /dev/null +++ b/lib/routes/1point3acres/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '一亩三分地', + url: 'blog.1point3acres.com', +}; diff --git a/lib/routes/1point3acres/offer.ts b/lib/routes/1point3acres/offer.ts index 03764105f..201b52c93 100644 --- a/lib/routes/1point3acres/offer.ts +++ b/lib/routes/1point3acres/offer.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,38 @@ import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/offer/:year?/:major?/:school?', + categories: ['bbs'], + example: '/1point3acres/offer/12/null/CMU', + parameters: { year: '录取年份 id,空为null', major: '录取专业 id,空为null', school: '录取学校 id,空为null' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['offer.1point3acres.com/'], + target: '/offer', + }, + name: '录取结果', + maintainers: ['EthanWng97'], + handler, + url: 'offer.1point3acres.com/', + description: `:::tip[三个 id 获取方式] + 1. 打开 [https://offer.1point3acres.com](https://offer.1point3acres.com) + 2. 打开控制台 + 3. 切换到 Network 面板 + 4. 点击 搜索 按钮 + 5. 点击 results?ps=15\&pg=1 POST 请求 + 6. 找到 Request Payload 请求参数,例如 \`filters: {planyr: "13", planmajor: "1", outname_w: "ACADIAU"}\` ,则三个 id 分别为: 13,1,ACADIAU + :::`, +}; + +async function handler(ctx) { // year 2017-2022 // 2017:6 2018:11 2019:12 2020:13 2021:14 2022:15 // CS:1 MIS:2 @@ -56,7 +88,7 @@ export default async (ctx) => { // }, // }); // const tid = responseBasic_1.data.background.tid; - ctx.set('data', { + return { title: '录取结果 - 一亩三分地', link: 'https://offer.1point3acres.com', item: data.map((item) => ({ @@ -68,5 +100,5 @@ export default async (ctx) => { link: 'https://offer.1point3acres.com', guid: `1point3acres:offer:${year}:${major}:${school}:${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/1point3acres/radar.ts b/lib/routes/1point3acres/radar.ts deleted file mode 100644 index 15cad5272..000000000 --- a/lib/routes/1point3acres/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - '1point3acres.com': { - _name: '一亩三分地', - blog: [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/:category'], - target: '/1point3acres/blog/:category?', - }, - ], - instant: [ - { - title: '帖子', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/'], - target: '/1point3acres/thread/:type?/:order?', - }, - { - title: '分区', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/section/:id', '/'], - target: '/1point3acres/section/:id?/:type?/:order?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/section/:id', '/'], - target: '/1point3acres/category/:id?/:type?/:order?', - }, - { - title: '用户主题帖', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/profile/:id', '/'], - target: '/1point3acres/user/:id/threads', - }, - { - title: '用户回帖', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/profile/:id', '/'], - target: '/1point3acres/user/:id/posts', - }, - ], - offer: [ - { - title: '录取结果', - docs: 'https://docs.rsshub.app/routes/bbs#yi-mu-san-fen-di', - source: ['/'], - target: '/1point3acres/offer', - }, - ], - }, -}; diff --git a/lib/routes/1point3acres/router.ts b/lib/routes/1point3acres/router.ts deleted file mode 100644 index e5f05a224..000000000 --- a/lib/routes/1point3acres/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/blog/:category?', './blog'); - router.get('/category/:id?/:type?/:order?', './category'); - router.get('/offer/:year?/:major?/:school?', './offer'); - router.get('/post/:type?/:order?', './thread'); - router.get('/section/:id?/:type?/:order?', './section'); - router.get('/thread/:type?/:order?', './thread'); - router.get('/user/:id/posts', './user/post'); - router.get('/user/:id/threads', './user/thread'); -}; diff --git a/lib/routes/1point3acres/section.ts b/lib/routes/1point3acres/section.ts index d1eddbde7..6d2fde55e 100644 --- a/lib/routes/1point3acres/section.ts +++ b/lib/routes/1point3acres/section.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, types, ProcessThreads } from './utils'; @@ -12,7 +13,52 @@ const sections = { 265: '签证移民', }; -export default async (ctx) => { +export const route: Route = { + path: '/section/:id?/:type?/:order?', + categories: ['bbs'], + example: '/1point3acres/section/345', + parameters: { id: '分区 id,见下表,默认为全部', type: '帖子分类, 见下表,默认为 hot,即热门帖子', order: '排序方式,见下表,默认为空,即最新回复' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['instant.1point3acres.com/section/:id', 'instant.1point3acres.com/'], + }, + name: '分区', + maintainers: ['nczitzk'], + handler, + description: `分区 + + | 分区 | id | + | -------- | --- | + | 留学申请 | 257 | + | 世界公民 | 379 | + | 投资理财 | 400 | + | 生活干货 | 31 | + | 职场达人 | 345 | + | 人际关系 | 391 | + | 海外求职 | 38 | + | 签证移民 | 265 | + + 分类 + + | 热门帖子 | 最新帖子 | + | -------- | -------- | + | hot | new | + + 排序方式 + + | 最新回复 | 最新发布 | + | -------- | -------- | + | | post |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const type = ctx.req.param('type') ?? 'hot'; const order = ctx.req.param('order') ?? ''; @@ -21,9 +67,9 @@ export default async (ctx) => { const currentUrl = `${rootUrl}${id ? (isNaN(id) ? `/category/${id}` : `/section/${id}`) : ''}`; const apiUrl = `${apiRootUrl}/api${id ? (isNaN(id) ? `/tags/${id}/` : `/forums/${id}/`) : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; - ctx.set('data', { + return { title: `一亩三分地 - ${Object.hasOwn(sections, id) ? sections[id] : id}${types[type]}`, link: currentUrl, item: await ProcessThreads(cache.tryGet, apiUrl, order), - }); -}; + }; +} diff --git a/lib/routes/1point3acres/thread.ts b/lib/routes/1point3acres/thread.ts index 97fdb49c3..85f41248d 100644 --- a/lib/routes/1point3acres/thread.ts +++ b/lib/routes/1point3acres/thread.ts @@ -1,16 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, types, ProcessThreads } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/post/:type?/:order?', '/thread/:type?/:order?'], + name: 'Unknown', + maintainers: ['EthanWng97', 'DIYgod', 'nczitzk'], + handler, + url: 'instant.1point3acres.com/', + description: `分类 + + | 热门帖子 | 最新帖子 | + | -------- | -------- | + | hot | new | + + 排序方式 + + | 最新回复 | 最新发布 | + | -------- | -------- | + | | post |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'hot'; const order = ctx.req.param('order') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; const apiUrl = `${apiRootUrl}/api/threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; - ctx.set('data', { + return { title: `一亩三分地 - ${types[type]}`, link: rootUrl, item: await ProcessThreads(cache.tryGet, apiUrl, order), - }); -}; + }; +} diff --git a/lib/routes/1point3acres/user/post.ts b/lib/routes/1point3acres/user/post.ts index 0dbd420b6..430e12ce1 100644 --- a/lib/routes/1point3acres/user/post.ts +++ b/lib/routes/1point3acres/user/post.ts @@ -1,12 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/posts', + categories: ['bbs'], + example: '/1point3acres/user/1/posts', + parameters: { id: '用户 id,可在 Instant 版网站的个人主页 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['instant.1point3acres.com/profile/:id', 'instant.1point3acres.com/'], + }, + name: '用户回帖', + maintainers: ['Maecenas'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { posts } = (await got.get(`https://instant.1point3acres.com/v2/api/user/post?pg=1&ps=10&user_id=${id}`)).data; const [{ author_name: author }] = posts; - ctx.set('data', { + return { title: `${author}的回复 - 一亩三分地`, link: `https://instant.1point3acres.com/profile/${id}`, description: `${author}的回复 - 一亩三分地`, @@ -17,5 +39,5 @@ export default async (ctx) => { pubDate: new Date(item.create_time + ' GMT+8').toUTCString(), link: `https://instant.1point3acres.com/thread/${item.thread_id}/post/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/1point3acres/user/thread.ts b/lib/routes/1point3acres/user/thread.ts index e37d23a11..4cf94ae2e 100644 --- a/lib/routes/1point3acres/user/thread.ts +++ b/lib/routes/1point3acres/user/thread.ts @@ -1,12 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/threads', + categories: ['bbs'], + example: '/1point3acres/user/1/threads', + parameters: { id: '用户 id,可在 Instant 版网站的个人主页 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['instant.1point3acres.com/profile/:id', 'instant.1point3acres.com/'], + }, + name: '用户主题帖', + maintainers: ['Maecenas'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { threads } = (await got.get(`https://instant.1point3acres.com/v2/api/user/thread?pg=1&ps=10&user_id=${id}`)).data; const [{ author_name: author }] = threads; - ctx.set('data', { + return { title: `${author}的主题帖 - 一亩三分地`, link: `https://instant.1point3acres.com/profile/${id}`, description: `${author}的主题帖 - 一亩三分地`, @@ -17,5 +39,5 @@ export default async (ctx) => { pubDate: new Date(item.update_time + ' GMT+8').toUTCString(), link: `https://instant.1point3acres.com/thread/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/2048/index.ts b/lib/routes/2048/index.ts index a112777f3..8674ab5bc 100644 --- a/lib/routes/2048/index.ts +++ b/lib/routes/2048/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,60 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['multimedia'], + example: '/2048/2', + parameters: { id: '板块 ID, 见下表,默认为最新合集,即 `3`,亦可在 URL 中找到, 例如, `thread.php?fid-3.html`中, 板块 ID 为`3`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: '论坛', + maintainers: ['nczitzk'], + handler, + description: `| 最新合集 | 亞洲無碼 | 日本騎兵 | 歐美新片 | 國內原創 | 中字原創 | 三級寫真 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 3 | 4 | 5 | 13 | 15 | 16 | 18 | + + | 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area | + | ------- | ---------- | ---------- | ---------- | ------------------------ | + | 116 | 114 | 96 | 97 | 119 | + + | 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 23 | 24 | 25 | 26 | 27 | 28 | 135 | + + | 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 | + | -------- | -------- | -------- | -------- | ------- | -------- | -------- | + | 21 | 274 | 276 | 277 | 278 | 29 | | + + | 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 213 | 94 | 283 | 111 | 88 | 131 | 180 | + + | 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 72 | 272 | 195 | 280 | 79 | 216 | 76 | + + | 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 | + | -------- | -------- | ------ | -------- | -------- | ------------ | + | 43 | 67 | 66 | 55 | 78 | 279 | + + | 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 | + | -------- | -------- | -------- | -------- | -------- | ------------ | + | 48 | 103 | 50 | 54 | 100 | 109 | + + | 聚友客栈 | 坛友自售 | + | -------- | -------- | + | 57 | 136 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '2'; const rootUrl = 'https://hjd2048.com'; @@ -108,9 +162,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('#main #breadCrumb a').last().text()} - 2048核基地`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/2048/maintainer.ts b/lib/routes/2048/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/2048/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/2048/namespace.ts b/lib/routes/2048/namespace.ts new file mode 100644 index 000000000..59ad6958d --- /dev/null +++ b/lib/routes/2048/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '2048 核基地', + url: 'hjd2048.com', +}; diff --git a/lib/routes/2048/radar.ts b/lib/routes/2048/radar.ts deleted file mode 100644 index 3acab931c..000000000 --- a/lib/routes/2048/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hjd2048.com': { - _name: '2048 核基地', - '.': [ - { - title: '论坛', - docs: 'https://docs.rsshub.app/routes/multimedia#2048-he-ji-di', - source: ['/2048/thread.php?fid-3.html'], - target: (_, url) => `/2048/${url.match(/fid-(\d+?)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/2048/router.ts b/lib/routes/2048/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/2048/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/2cycd/index.ts b/lib/routes/2cycd/index.ts index d0d355ae7..4cb76df1b 100644 --- a/lib/routes/2cycd/index.ts +++ b/lib/routes/2cycd/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,14 @@ import iconv from 'iconv-lite'; // http://www.2cycd.com/forum.php?mod=forumdisplay&fid=43&orderby=dateline -export default async (ctx) => { +export const route: Route = { + path: '/:fid/:sort?', + name: 'Unknown', + maintainers: ['shelken'], + handler, +}; + +async function handler(ctx) { const fid = ctx.req.param('fid') ?? '43'; const sort = ctx.req.param('sort') ?? 'dateline'; @@ -50,9 +58,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/2cycd/maintainer.ts b/lib/routes/2cycd/maintainer.ts deleted file mode 100644 index e10eebed8..000000000 --- a/lib/routes/2cycd/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:fid/:sort?': ['shelken'], -}; diff --git a/lib/routes/2cycd/namespace.ts b/lib/routes/2cycd/namespace.ts new file mode 100644 index 000000000..4b264b1b8 --- /dev/null +++ b/lib/routes/2cycd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '二次元虫洞', + url: '2cycd.com', +}; diff --git a/lib/routes/2cycd/radar.ts b/lib/routes/2cycd/radar.ts deleted file mode 100644 index be0c2a830..000000000 --- a/lib/routes/2cycd/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - '2cycd.com': { - _name: '二次元虫洞', - '.': [ - { - title: '板块', - docs: 'https://docs.rsshub.app/routes/bbs#er-ci-yuan-chong-dong', - source: '/:path', - target: (params, url) => { - let pid, sort; - const static_matched = params.path.match(/forum-(\d+)-\d+.html/); - if (static_matched) { - pid = static_matched[1]; - } else if (params.path === 'forum.php') { - pid = new URL(url).searchParams.get('fid'); - sort = new URL(url).searchParams.get('orderby'); - } else { - return false; - } - return `/2cycd/${pid}/${sort ?? 'dateline'}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/2cycd/router.ts b/lib/routes/2cycd/router.ts deleted file mode 100644 index e6c7f9831..000000000 --- a/lib/routes/2cycd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:fid/:sort?', './index'); -}; diff --git a/lib/routes/36kr/hot-list.ts b/lib/routes/36kr/hot-list.ts index 7ee7dd248..377fba21d 100644 --- a/lib/routes/36kr/hot-list.ts +++ b/lib/routes/36kr/hot-list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -23,7 +24,32 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/hot-list/:category?', + categories: ['new-media'], + example: '/36kr/hot-list', + parameters: { category: '分类,默认为24小时热榜' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['36kr.com/hot-list/:category', '36kr.com/'], + target: '/hot-list/:category', + }, + name: '资讯热榜', + maintainers: ['nczitzk'], + handler, + description: `| 24 小时热榜 | 资讯人气榜 | 资讯综合榜 | 资讯收藏榜 | + | ----------- | ---------- | ---------- | ---------- | + | 24 | renqi | zonghe | shoucang |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '24'; const currentUrl = category === '24' ? rootUrl : `${rootUrl}/hot-list/catalog`; @@ -52,9 +78,9 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => ProcessItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `36氪 - ${categories[category].title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/36kr/index.ts b/lib/routes/36kr/index.ts index ccd9892ea..b29827e22 100644 --- a/lib/routes/36kr/index.ts +++ b/lib/routes/36kr/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -15,7 +16,14 @@ const shortcuts = { '/information/workplace': '/information/web_zhichang', }; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx) .replace(/^\/news(?!flashes)/, '/information') .replace(/\/search\/article/, '/search/articles'); @@ -49,9 +57,9 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => ProcessItem(item, cache.tryGet))); } - ctx.set('data', { + return { title: `36氪 - ${$('title').text().split('_')[0]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/36kr/maintainer.ts b/lib/routes/36kr/maintainer.ts deleted file mode 100644 index e599e7e3b..000000000 --- a/lib/routes/36kr/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/hot-list/:category?': ['nczitzk'], - '/information/:category?': ['nczitzk'], - '/motif/:id': ['nczitzk'], - '/newsflashes': ['hillerliao', 'nczitzk'], - '/search/articles/:keyword': ['xyqfer', 'kt286', 'nczitzk'], - '/search/newsflashes/:keyword': ['nczitzk'], - '/topics/:id': ['nczitzk'], - '/user/:id': ['nczitzk'], -}; diff --git a/lib/routes/36kr/namespace.ts b/lib/routes/36kr/namespace.ts new file mode 100644 index 000000000..5501ecc1c --- /dev/null +++ b/lib/routes/36kr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '36kr', + url: '36kr.com', +}; diff --git a/lib/routes/36kr/radar.ts b/lib/routes/36kr/radar.ts deleted file mode 100644 index 5b73ad942..000000000 --- a/lib/routes/36kr/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - '36kr.com': { - _name: '36氪', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-zi-xun', - source: ['/information/:category', '/'], - target: '/36kr/information/:category', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-kuai-xun', - source: ['/newsflashes', '/'], - target: '/36kr/newsflashes', - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-yong-hu-wen-zhang', - source: ['/user/:id', '/'], - target: '/36kr/user/:id', - }, - { - title: '主题文章', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-zhu-ti-wen-zhang', - source: ['/motif/:id', '/'], - target: '/36kr/motif/:id', - }, - { - title: '专题文章', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-zhuan-ti-wen-zhang', - source: ['/topics/:id', '/'], - target: '/36kr/topics/:id', - }, - { - title: '搜索文章', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-sou-suo-wen-zhang', - source: ['/search/articles/:keyword', '/'], - target: '/36kr/search/articles/:keyword', - }, - { - title: '搜索快讯', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-sou-suo-kuai-xun', - source: ['/search/newsflashes/:keyword', '/'], - target: '/36kr/search/newsflashes/:keyword', - }, - { - title: '资讯热榜', - docs: 'https://docs.rsshub.app/routes/new-media#36kr-zi-xun-re-bang', - source: ['/hot-list/:category', '/'], - target: '/36kr/hot-list/:category', - }, - ], - }, -}; diff --git a/lib/routes/36kr/router.ts b/lib/routes/36kr/router.ts deleted file mode 100644 index 4ec00c4c2..000000000 --- a/lib/routes/36kr/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/hot-list/:category?', './hot-list'); - router.get('*', './index'); -}; diff --git a/lib/routes/3dmgame/game.ts b/lib/routes/3dmgame/game.ts index 1ffb15265..e03e37b06 100644 --- a/lib/routes/3dmgame/game.ts +++ b/lib/routes/3dmgame/game.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:name/:type?', + radar: { + source: ['3dmgame.com/games/:name/:type'], + }, + name: 'Unknown', + maintainers: ['sinchang', 'jacky2001114', 'HenryQW'], + handler, +}; + +async function handler(ctx) { const { name, type = 'news' } = ctx.req.param(); const url = `https://www.3dmgame.com/games/${name}/${type}/`; @@ -26,10 +37,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text().split('_')[0], description: $('head meta[name="Description"]').attr('content'), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/3dmgame/maintainer.ts b/lib/routes/3dmgame/maintainer.ts deleted file mode 100644 index 6f0683ff9..000000000 --- a/lib/routes/3dmgame/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:category?': ['zhboner'], - '/:name/:type?': ['sinchang', 'jacky2001114', 'HenryQW'], -}; diff --git a/lib/routes/3dmgame/namespace.ts b/lib/routes/3dmgame/namespace.ts new file mode 100644 index 000000000..471319744 --- /dev/null +++ b/lib/routes/3dmgame/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '3DMGame', + url: '3dmgame.com', +}; diff --git a/lib/routes/3dmgame/news-center.ts b/lib/routes/3dmgame/news-center.ts index 21aa55327..c3d95387e 100644 --- a/lib/routes/3dmgame/news-center.ts +++ b/lib/routes/3dmgame/news-center.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,31 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['game'], + example: '/3dmgame/news', + parameters: { category: '分类名或 ID,见下表,默认为新闻推荐,ID 可从分类 URL 中找到,如 Steam 为 `22221`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['3dmgame.com/news/:category?', '3dmgame.com/news'], + }, + name: '新闻中心', + maintainers: ['zhboner'], + handler, + description: `| 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 | + | -------- | -------- | -------- | -------- | ----------- | + | | game | acg | next | news\_36\_1 |`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const isArcPost = category && !isNaN(category); // https://www.3dmgame.com/news/\d+/ const url = `https://www.3dmgame.com/${category && category !== 'news_36_1' ? 'news/' : ''}${category ?? 'news'}/`; @@ -34,10 +59,10 @@ export default async (ctx) => { const out = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '3DM - ' + $('title').text().split('_')[0], description: $('meta[name="Description"]').attr('content'), link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/3dmgame/radar.ts b/lib/routes/3dmgame/radar.ts deleted file mode 100644 index 6e30c22bc..000000000 --- a/lib/routes/3dmgame/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '3dmgame.com': { - _name: '3DMGame', - '.': [ - { - title: '新闻中心', - docs: 'https://docs.rsshub.app/routes/game#3dmgame', - source: ['/news/:category?', '/news'], - target: '/3dmgame/news/:category?', - }, - { - title: '游戏资讯', - docs: 'https://docs.rsshub.app/routes/game#3dmgame', - source: ['/games/:name/:type'], - target: '/3dmgame/:name/:type?', - }, - ], - }, -}; diff --git a/lib/routes/3dmgame/router.ts b/lib/routes/3dmgame/router.ts deleted file mode 100644 index 247a4d550..000000000 --- a/lib/routes/3dmgame/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news-center'); - router.get('/:name/:type?', './game'); -}; diff --git a/lib/routes/423down/index.ts b/lib/routes/423down/index.ts index 4384c5f07..dd754109a 100644 --- a/lib/routes/423down/index.ts +++ b/lib/routes/423down/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -65,7 +66,14 @@ const titleMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category/:type?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category, type } = ctx.req.param(); const url = `${rootUrl}/${categeoryMap[category][type]}`; @@ -107,9 +115,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `423down-${titleMap[category][type]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/423down/maintainer.ts b/lib/routes/423down/maintainer.ts deleted file mode 100644 index 720a7dc7c..000000000 --- a/lib/routes/423down/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category/:type': ['Fatpandac'], -}; diff --git a/lib/routes/423down/namespace.ts b/lib/routes/423down/namespace.ts new file mode 100644 index 000000000..f72c2e10f --- /dev/null +++ b/lib/routes/423down/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '423Down', + url: 'www.423down.com', +}; diff --git a/lib/routes/423down/radar.ts b/lib/routes/423down/radar.ts deleted file mode 100644 index 80992eed7..000000000 --- a/lib/routes/423down/radar.ts +++ /dev/null @@ -1,193 +0,0 @@ -export default { - '423down.com': { - _name: '423down', - www: [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/', - target: '/423down/index/all', - }, - { - title: '安卓软件', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'apk') { - return '/423down/android/apk'; - } - }, - }, - { - title: '原创软件', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'zd423') { - return '/423down/computer/originalsoft'; - } - }, - }, - { - title: '媒体播放', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'multimedia') { - return '/423down/computer/multimedia'; - } - }, - }, - { - title: '网页浏览', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'browser') { - return '/423down/computer/browser'; - } - }, - }, - { - title: '图形图像', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'image') { - return '/423down/computer/image'; - } - }, - }, - { - title: '聊天软件', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'im') { - return '/423down/computer/im'; - } - }, - }, - { - title: '办公软件', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'work') { - return '/423down/computer/work'; - } - }, - }, - { - title: '上传下载', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'down') { - return '/423down/computer/down'; - } - }, - }, - { - title: '系统辅助', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'systemsoft') { - return '/423down/computer/systemsoft'; - } - }, - }, - { - title: '系统必备', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'systemplus') { - return '/423down/computer/systemplus'; - } - }, - }, - { - title: '安全软件', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'security') { - return '/423down/computer/security'; - } - }, - }, - { - title: '补丁相关', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'patch') { - return '/423down/computer/patch'; - } - }, - }, - { - title: '硬件相关', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'hardwork') { - return '/423down/computer/hardware'; - } - }, - }, - { - title: 'windows 11', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'win11') { - return '/423down/os/win11'; - } - }, - }, - { - title: 'windows 10', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'win10') { - return '/423down/os/win10'; - } - }, - }, - { - title: 'windows 7', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'win7') { - return '/423down/os/win7'; - } - }, - }, - { - title: 'windows xp', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'winxp') { - return '/423down/os/winxp'; - } - }, - }, - { - title: 'windows pe', - docs: 'https://docs.rsshub.app/routes/bbs#423down', - source: '/:type', - target: (params) => { - if (params.type === 'winpe') { - return '/423down/os/winpe'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/423down/router.ts b/lib/routes/423down/router.ts deleted file mode 100644 index 4f00f6c84..000000000 --- a/lib/routes/423down/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category/:type?', './index'); -}; diff --git a/lib/routes/4gamers/category.ts b/lib/routes/4gamers/category.ts index dcd62cb9c..cfb2b0b6e 100644 --- a/lib/routes/4gamers/category.ts +++ b/lib/routes/4gamers/category.ts @@ -1,8 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseList, parseItem, getCategories } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/', '/category/:category'], + radar: { + source: ['www.4gamers.com.tw/news', 'www.4gamers.com.tw/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'www.4gamers.com.tw/news', + url: 'www.4gamers.com.tw/news', +}; + +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; @@ -24,9 +38,9 @@ export default async (ctx) => { categoryName = categories.find((c) => c.id === Number.parseInt(category)).name; } - ctx.set('data', { + return { title: `4Gamers - ${categoryName}`, link: `https://www.4gamers.com.tw/news${isLatest ? '' : `/category/${category}/${categoryName}`}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/4gamers/maintainer.ts b/lib/routes/4gamers/maintainer.ts deleted file mode 100644 index 12f632d74..000000000 --- a/lib/routes/4gamers/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/': ['TonyRL'], - '/category/:category': ['hoilc'], - '/tag/:tag': ['hoilc'], - '/topic/:topic': ['bestpika'], -}; diff --git a/lib/routes/4gamers/namespace.ts b/lib/routes/4gamers/namespace.ts new file mode 100644 index 000000000..f133378e3 --- /dev/null +++ b/lib/routes/4gamers/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '4Gamers', + url: 'www.4gamers.com.tw', +}; diff --git a/lib/routes/4gamers/radar.ts b/lib/routes/4gamers/radar.ts deleted file mode 100644 index 290c26c9a..000000000 --- a/lib/routes/4gamers/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - '4gamers.com.tw': { - _name: '4Gamers', - www: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/game#4gamers', - source: ['/news', '/'], - target: '/4gamers', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/game#4gamers', - source: ['/news/category/:category/:categoryName'], - target: '/4gamers/category/:category', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/game#4gamers', - source: ['/news/tag/:tag'], - target: '/4gamers/tag/:tag', - }, - { - title: '主題', - docs: 'https://docs.rsshub.app/routes/game#4gamers', - source: ['/news/option-cfg/:topic'], - target: '/4gamers/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/4gamers/router.ts b/lib/routes/4gamers/router.ts deleted file mode 100644 index 85dc5c61a..000000000 --- a/lib/routes/4gamers/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/', './category'); - router.get('/category/:category', './category'); - router.get('/tag/:tag', './tag'); - router.get('/topic/:topic', './topic'); -}; diff --git a/lib/routes/4gamers/tag.ts b/lib/routes/4gamers/tag.ts index 8ac0a9bc6..6973130ad 100644 --- a/lib/routes/4gamers/tag.ts +++ b/lib/routes/4gamers/tag.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['game'], + example: '/4gamers/tag/限時免費', + parameters: { tag: '标签名,可在标签 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.4gamers.com.tw/news/tag/:tag'], + }, + name: '标签', + maintainers: ['hoilc'], + handler, + url: 'www.4gamers.com.tw/news', +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; @@ -16,9 +39,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseItem(item)))); - ctx.set('data', { + return { title: `4Gamers - #${tag}`, link: `https://www.4gamers.com.tw/news/tag/${tag}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/4gamers/topic.ts b/lib/routes/4gamers/topic.ts index 1c5b1262a..e03861aa3 100644 --- a/lib/routes/4gamers/topic.ts +++ b/lib/routes/4gamers/topic.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['game'], + example: '/4gamers/topic/gentlemen-topic', + parameters: { topic: '主题,可在首页上方页面内找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.4gamers.com.tw/news/option-cfg/:topic'], + }, + name: '主題', + maintainers: ['bestpika'], + handler, + url: 'www.4gamers.com.tw/news', +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; @@ -15,9 +38,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseItem(item)))); - ctx.set('data', { + return { title: `4Gamers - ${topic}`, link: `https://www.4gamers.com.tw/news/option-cfg/${topic}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/4ksj/forum.ts b/lib/routes/4ksj/forum.ts index a54ff7eeb..c10c8b0e8 100644 --- a/lib/routes/4ksj/forum.ts +++ b/lib/routes/4ksj/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id?', + categories: ['multimedia'], + example: '/4ksj/forum', + parameters: { id: '分类 id,默认为最新4K电影' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 若订阅 [最新 4K 电影](https://www.4ksj.com/forum-2-1.html),网址为 \`https://www.4ksj.com/forum-2-1.html\`。截取 \`https://www.4ksj.com/forum-\` 到末尾 \`.html\` 的部分 \`2-1\` 作为参数,此时路由为 [\`/4ksj/forum/2-1\`](https://rsshub.app/4ksj/forum/2-1)。 + + 若订阅子分类 [Dolby Vision 纪录片 4K 电影](https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html),网址为 \`https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html\`。截取 \`https://www.4ksj.com/forum-\` 到末尾 \`.html\` 的部分 \`4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1\` 作为参数,此时路由为 [\`/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1\`](https://rsshub.app/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1)。 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '2-1'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; @@ -108,12 +132,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `4k世界 - ${$('#fontsearch ul.cl li.a') .toArray() .map((a) => $(a).text()) .join('+')}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/4ksj/maintainer.ts b/lib/routes/4ksj/maintainer.ts deleted file mode 100644 index 43966ad62..000000000 --- a/lib/routes/4ksj/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/forum/:id?': ['nczitzk'], -}; diff --git a/lib/routes/4ksj/namespace.ts b/lib/routes/4ksj/namespace.ts new file mode 100644 index 000000000..1965e275f --- /dev/null +++ b/lib/routes/4ksj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '4k 世界', + url: '4ksj.com', +}; diff --git a/lib/routes/4ksj/radar.ts b/lib/routes/4ksj/radar.ts deleted file mode 100644 index 029ff8a97..000000000 --- a/lib/routes/4ksj/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '4ksj.com': { - _name: '4k 世界', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#4k-shi-jie-fen-lei', - source: ['/forum-2-1.html', '/'], - target: (params, url) => `/4ksj/forum/${new URL(url).href.match(/\/forum-([\w-]+)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/4ksj/router.ts b/lib/routes/4ksj/router.ts deleted file mode 100644 index fbe01a2d7..000000000 --- a/lib/routes/4ksj/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/forum/:id?', './forum'); -}; diff --git a/lib/routes/500px/maintainer.ts b/lib/routes/500px/maintainer.ts deleted file mode 100644 index c8c393ff1..000000000 --- a/lib/routes/500px/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tribe/set/:id': ['TonyRL'], - '/user/works/:id': ['TonyRL'], -}; diff --git a/lib/routes/500px/namespace.ts b/lib/routes/500px/namespace.ts new file mode 100644 index 000000000..e4783d9aa --- /dev/null +++ b/lib/routes/500px/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '500px 摄影社区', + url: '500px.com.cn', +}; diff --git a/lib/routes/500px/radar.ts b/lib/routes/500px/radar.ts deleted file mode 100644 index 0721fd07d..000000000 --- a/lib/routes/500px/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '500px.com.cn': { - _name: '500px 摄影社区', - '.': [ - { - title: '部落影集', - docs: 'https://docs.rsshub.app/routes/picture#500px-she-ying-she-qu', - source: ['/page/tribe/detail'], - target: (_, url) => `/500px/tribe/set/${url.searchParams.get('tribeId')}`, - }, - { - title: '摄影师作品', - docs: 'https://docs.rsshub.app/routes/picture#500px-she-ying-she-qu', - source: ['/:id', '/community/user-details/:id', '/community/user-details/:id/*'], - target: '/500px/user/works/:id', - }, - ], - }, -}; diff --git a/lib/routes/500px/router.ts b/lib/routes/500px/router.ts deleted file mode 100644 index 915d40205..000000000 --- a/lib/routes/500px/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/tribe/set/:id', './tribe-set'); - router.get('/user/works/:id', './user'); -}; diff --git a/lib/routes/500px/tribe-set.ts b/lib/routes/500px/tribe-set.ts index 0dcba68af..a53512e87 100644 --- a/lib/routes/500px/tribe-set.ts +++ b/lib/routes/500px/tribe-set.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,25 @@ import * as path from 'node:path'; import { baseUrl, getTribeDetail, getTribeSets } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tribe/set/:id', + categories: ['picture'], + example: '/500px/tribe/set/f5de0b8aa6d54ec486f5e79616418001', + parameters: { id: '部落 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '部落影集', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 100; @@ -23,11 +42,11 @@ export default async (ctx) => { link: `${baseUrl}/community/set/${item.id}/details`, })); - ctx.set('data', { + return { title: tribe.name, description: `${tribe.watchword} - ${tribe.introduce}`, link: `${baseUrl}/page/tribe/detail?tribeId=${id}&pagev=set`, image: tribe.avatar.a1, item: items, - }); -}; + }; +} diff --git a/lib/routes/500px/user.ts b/lib/routes/500px/user.ts index 59be7c5a8..2a778f21f 100644 --- a/lib/routes/500px/user.ts +++ b/lib/routes/500px/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import * as path from 'node:path'; import { baseUrl, getUserInfoFromUsername, getUserInfoFromId, getUserWorks } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/works/:id', + categories: ['picture'], + example: '/500px/user/works/hujunli', + parameters: { id: '摄影师 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['500px.com.cn/:id', '500px.com.cn/community/user-details/:id', '500px.com.cn/community/user-details/:id/*'], + }, + name: '摄影师作品', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { let { id } = ctx.req.param(); const limit = Number.parseInt(ctx.req.query('limit')) || 100; @@ -26,11 +48,11 @@ export default async (ctx) => { link: `${baseUrl}/community/photo-details/${item.id}`, })); - ctx.set('data', { + return { title: userInfo.nickName, description: userInfo.about, image: userInfo.avatar.a1, link: `${baseUrl}/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/50forum/maintainer.ts b/lib/routes/50forum/maintainer.ts deleted file mode 100644 index 3e2b15e63..000000000 --- a/lib/routes/50forum/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['sddiky'], -}; diff --git a/lib/routes/50forum/namespace.ts b/lib/routes/50forum/namespace.ts new file mode 100644 index 000000000..7774e24e5 --- /dev/null +++ b/lib/routes/50forum/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '经济 50 人论坛', + url: '50forum.org.cn', +}; diff --git a/lib/routes/50forum/radar.ts b/lib/routes/50forum/radar.ts deleted file mode 100644 index 0286c23dc..000000000 --- a/lib/routes/50forum/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '50forum.org.cn': { - _name: '经济 50 人论坛', - '.': [ - { - title: '专家文章', - docs: 'https://docs.rsshub.app/routes/study#jing-ji-50-ren-lun-tan', - source: ['/home/article/index/category/zhuanjia.html', '/'], - target: '/50forum', - }, - ], - }, -}; diff --git a/lib/routes/50forum/router.ts b/lib/routes/50forum/router.ts deleted file mode 100644 index 614635cd7..000000000 --- a/lib/routes/50forum/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './zhuanjia'); -}; diff --git a/lib/routes/50forum/zhuanjia.ts b/lib/routes/50forum/zhuanjia.ts index dc9be176a..aa9cc313c 100644 --- a/lib/routes/50forum/zhuanjia.ts +++ b/lib/routes/50forum/zhuanjia.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['50forum.org.cn/home/article/index/category/zhuanjia.html', '50forum.org.cn/'], + target: '', + }, + name: 'Unknown', + maintainers: ['sddiky'], + handler, + url: '50forum.org.cn/home/article/index/category/zhuanjia.html', +}; + +async function handler() { const rootUrl = 'http://www.50forum.org.cn'; const response = await got({ method: 'get', @@ -43,10 +56,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: `中国经济50人论坛专家文章`, link: 'http://www.50forum.org.cn/home/article/index/category/zhuanjia.html', description: '中国经济50人论坛专家文章', item: out, - }); -}; + }; +} diff --git a/lib/routes/52hrtt/index.ts b/lib/routes/52hrtt/index.ts index 8e8df76fd..10839a243 100644 --- a/lib/routes/52hrtt/index.ts +++ b/lib/routes/52hrtt/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:area?/:type?', + categories: ['new-media'], + example: '/52hrtt/global', + parameters: { area: '地区,默认为全球', type: '分类,默认为新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + description: `地区和分类皆可在浏览器地址栏中找到,下面是一个例子。 + + 访问华人头条全球站的国际分类,会跳转到 \`https://www.52hrtt.com/global/n/w?infoTypeId=A1459145516533\`。其中 \`global\` 即为 **全球** 对应的地区代码,\`A1459145516533\` 即为 **国际** 对应的分类代码。`, +}; + +async function handler(ctx) { const area = ctx.req.param('area') ?? 'global'; const type = ctx.req.param('type') ?? ''; @@ -49,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${response.data.data.area.areaName} - ${$('.router-link-active').eq(0).text()} - 华人头条`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/52hrtt/maintainer.ts b/lib/routes/52hrtt/maintainer.ts deleted file mode 100644 index bed810cba..000000000 --- a/lib/routes/52hrtt/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/symposium/:id?/:classId?': ['nczitzk'], - '/:area?/:type?': ['nczitzk'], -}; diff --git a/lib/routes/52hrtt/namespace.ts b/lib/routes/52hrtt/namespace.ts new file mode 100644 index 000000000..bbd7776ca --- /dev/null +++ b/lib/routes/52hrtt/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '52hrtt 华人头条', + url: '52hrtt.com', +}; diff --git a/lib/routes/52hrtt/radar.ts b/lib/routes/52hrtt/radar.ts deleted file mode 100644 index 55b06b3b1..000000000 --- a/lib/routes/52hrtt/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '52hrtt.com': { - _name: '52hrtt 华人头条', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#52hrtt-hua-ren-tou-tiao', - source: '/', - target: (_params, url) => `/52hrtt/${new URL(url).searchParams.get('infoTypeId')}`, - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#52hrtt-hua-ren-tou-tiao', - source: '/global/n/w/symposium/:id', - target: '/52hrtt/symposium/:id', - }, - ], - }, -}; diff --git a/lib/routes/52hrtt/router.ts b/lib/routes/52hrtt/router.ts deleted file mode 100644 index 423fec16f..000000000 --- a/lib/routes/52hrtt/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/symposium/:id?/:classId?', './symposium'); - router.get('/:area?/:type?', './'); -}; diff --git a/lib/routes/52hrtt/symposium.ts b/lib/routes/52hrtt/symposium.ts index 81cdfe691..a4c3fbaa8 100644 --- a/lib/routes/52hrtt/symposium.ts +++ b/lib/routes/52hrtt/symposium.ts @@ -1,10 +1,40 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/symposium/:id?/:classId?', + categories: ['new-media'], + example: '/52hrtt/symposium/F1626082387819', + parameters: { id: '专题 id', classId: '子分类 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['52hrtt.com/global/n/w/symposium/:id'], + target: '/symposium/:id', + }, + name: '专题', + maintainers: ['nczitzk'], + handler, + description: `专题 id 和 子分类 id 皆可在浏览器地址栏中找到,下面是一个例子。 + + 访问 “邱毅看平潭” 专题,会跳转到 \`https://www.52hrtt.com/global/n/w/symposium/F1626082387819\`。其中 \`F1626082387819\` 即为 **专题 id** 对应的地区代码。 + + :::tip + 更多的专题可以点击 [这里](https://www.52hrtt.com/global/n/w/symposium) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const classId = ctx.req.param('classId') ?? ''; @@ -49,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/56kog/class.ts b/lib/routes/56kog/class.ts index e45055d59..b049ce228 100644 --- a/lib/routes/56kog/class.ts +++ b/lib/routes/56kog/class.ts @@ -1,11 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, fetchItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/class/:category?', + categories: ['reading'], + example: '/56kog/class/1_1', + parameters: { category: '分类,见下表,默认为玄幻魔法' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) | + | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | + | 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 | + + | [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) | + | ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | + | 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 |`, +}; + +async function handler(ctx) { const { category = '1_1' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; const currentUrl = new URL(`class/${category}.html`, rootUrl).href; ctx.set('data', await fetchItems(limit, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/56kog/maintainer.ts b/lib/routes/56kog/maintainer.ts deleted file mode 100644 index 81a828342..000000000 --- a/lib/routes/56kog/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/class/:category?': ['nczitzk'], - '/top/:category?': ['nczitzk'], -}; diff --git a/lib/routes/56kog/namespace.ts b/lib/routes/56kog/namespace.ts new file mode 100644 index 000000000..52f077338 --- /dev/null +++ b/lib/routes/56kog/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '明月中文网', + url: '56kog.com', +}; diff --git a/lib/routes/56kog/radar.ts b/lib/routes/56kog/radar.ts deleted file mode 100644 index 7f05b7eb5..000000000 --- a/lib/routes/56kog/radar.ts +++ /dev/null @@ -1,85 +0,0 @@ -export default { - '56kog.com': { - _name: '明月中文网', - '.': [ - { - title: '玄幻魔法', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/1_1.html'], - target: '/56kog/class/1_1', - }, - { - title: '武侠修真', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/2_1.html'], - target: '/56kog/class/2_1', - }, - { - title: '历史军事', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/4_1.html'], - target: '/56kog/class/4_1', - }, - { - title: '侦探推理', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/5_1.html'], - target: '/56kog/class/5_1', - }, - { - title: '网游动漫', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/6_1.html'], - target: '/56kog/class/6_1', - }, - { - title: '恐怖灵异', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/8_1.html'], - target: '/56kog/class/8_1', - }, - { - title: '都市言情', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/3_1.html'], - target: '/56kog/class/3_1', - }, - { - title: '科幻', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/7_1.html'], - target: '/56kog/class/7_1', - }, - { - title: '女生小说', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/9_1.html'], - target: '/56kog/class/9_1', - }, - { - title: '其他', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-fen-lei', - source: ['/class/10_1.html'], - target: '/56kog/class/10_1', - }, - { - title: '周点击榜', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan', - source: ['/top/weekvisit_1.html'], - target: '/56kog/top/weekvisit', - }, - { - title: '总收藏榜', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan', - source: ['/top/goodnum_1.html'], - target: '/56kog/top/goodnum', - }, - { - title: '最新入库', - docs: 'https://docs.rsshub.app/routes/reading#ming-yue-zhong-wen-wang-bang-dan', - source: ['/top/postdate_1.html'], - target: '/56kog/top/postdate', - }, - ], - }, -}; diff --git a/lib/routes/56kog/router.ts b/lib/routes/56kog/router.ts deleted file mode 100644 index bf2d5452e..000000000 --- a/lib/routes/56kog/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/class/:category?', './class'); - router.get('/top/:category?', './top'); -}; diff --git a/lib/routes/56kog/top.ts b/lib/routes/56kog/top.ts index c0472c594..5ab6b2f7e 100644 --- a/lib/routes/56kog/top.ts +++ b/lib/routes/56kog/top.ts @@ -1,11 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, fetchItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/top/:category?', + categories: ['reading'], + example: '/56kog/top/weekvisit', + parameters: { category: '分类,见下表,默认为周点击榜' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '榜单', + maintainers: ['nczitzk'], + handler, + description: `| [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) | + | ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | + | weekvisit | goodnum | postdate |`, +}; + +async function handler(ctx) { const { category = 'weekvisit' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; const currentUrl = new URL(`top/${category.split(/_/)[0]}_1.html`, rootUrl).href; ctx.set('data', await fetchItems(limit, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/591/list.ts b/lib/routes/591/list.ts index d97b6836f..6646a066d 100644 --- a/lib/routes/591/list.ts +++ b/lib/routes/591/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -106,7 +107,28 @@ async function getHouseList(houseListURL) { const renderHouse = (house) => art(path.join(__dirname, 'templates/house.art'), { house }); -export default async (ctx) => { +export const route: Route = { + path: '/:country/rent/:query?', + categories: ['other'], + example: '/591/tw/rent/order=posttime&orderType=desc', + parameters: { country: 'Country code. Only tw is supported now', query: 'Query Parameters' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Rental house', + maintainers: ['Yukaii'], + handler, + description: `:::tip + Copy the URL of the 591 filter housing page and remove the front part \`https://rent.591.com.tw/?\`, you will get the query parameters. + :::`, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; const country = ctx.req.param('country') ?? 'tw'; @@ -134,14 +156,14 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '591 租屋 - 自訂查詢', link: queryUrl, description: `591 租屋 - 自訂查詢, query: ${query}`, item: items, - }); + }; ctx.set('json', { houses, }); -}; +} diff --git a/lib/routes/591/maintainer.ts b/lib/routes/591/maintainer.ts deleted file mode 100644 index 30c629343..000000000 --- a/lib/routes/591/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:country/rent/:query?': ['Yukaii'], -}; diff --git a/lib/routes/591/namespace.ts b/lib/routes/591/namespace.ts new file mode 100644 index 000000000..a27fcf5d5 --- /dev/null +++ b/lib/routes/591/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '591 Rental house', + url: 'rent.591.com.tw', +}; diff --git a/lib/routes/591/radar.ts b/lib/routes/591/radar.ts deleted file mode 100644 index 74a8a0656..000000000 --- a/lib/routes/591/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - '591.com.tw': { - _name: '591 租屋網', - rent: [ - { - title: '所有物件', - docs: 'https://docs.rsshub.app/routes/other#591-zu-wu-wang', - source: ['/'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/591/tw/rent/${searchParams.toString()}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/591/router.ts b/lib/routes/591/router.ts deleted file mode 100644 index 3f0585580..000000000 --- a/lib/routes/591/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:country/rent/:query?', './list'); -}; diff --git a/lib/routes/5eplay/index.ts b/lib/routes/5eplay/index.ts index 86e81b640..39c3921ac 100644 --- a/lib/routes/5eplay/index.ts +++ b/lib/routes/5eplay/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import zlib from 'zlib'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; import { getAcwScV2ByArg1 } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/article', + categories: ['game'], + example: '/5eplay/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['csgo.5eplay.com/', 'csgo.5eplay.com/article'], + }, + name: '新闻列表', + maintainers: ['Dlouxgit'], + handler, + url: 'csgo.5eplay.com/', +}; + +async function handler() { const rootUrl = 'https://csgo.5eplay.com/'; const apiUrl = `${rootUrl}api/article?page=1&type_id=0&time=0&order_by=0`; const articleUrl = `${rootUrl}article`; @@ -93,9 +116,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '5EPLAY', link: 'https://csgo.5eplay.com/article', item: items, - }); -}; + }; +} diff --git a/lib/routes/5eplay/maintainer.ts b/lib/routes/5eplay/maintainer.ts deleted file mode 100644 index ff471506f..000000000 --- a/lib/routes/5eplay/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/article': ['Dlouxgit'], -}; diff --git a/lib/routes/5eplay/namespace.ts b/lib/routes/5eplay/namespace.ts new file mode 100644 index 000000000..b48fc2733 --- /dev/null +++ b/lib/routes/5eplay/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '5EPLAY', + url: 'csgo.5eplay.com', +}; diff --git a/lib/routes/5eplay/radar.ts b/lib/routes/5eplay/radar.ts deleted file mode 100644 index 51fae9085..000000000 --- a/lib/routes/5eplay/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '5eplay.com': { - _name: '5EPLAY', - csgo: [ - { - title: '新闻列表', - docs: 'https://docs.rsshub.app/routes/game#5eplay-xin-wen-lie-biao', - source: ['/', '/article'], - target: '/5eplay/article', - }, - ], - }, -}; diff --git a/lib/routes/5eplay/router.ts b/lib/routes/5eplay/router.ts deleted file mode 100644 index a45fe4249..000000000 --- a/lib/routes/5eplay/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/article', '.'); -}; diff --git a/lib/routes/6park/index.ts b/lib/routes/6park/index.ts index b48fc200e..8a63fd9e0 100644 --- a/lib/routes/6park/index.ts +++ b/lib/routes/6park/index.ts @@ -1,10 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:type?/:keyword?', + radar: { + source: ['club.6parkbbs.com/:id/index.php', 'club.6parkbbs.com/'], + target: '/:id?', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'chan1'; const type = ctx.req.param('type') ?? ''; const keyword = ctx.req.param('keyword') ?? ''; @@ -58,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/6park/maintainer.ts b/lib/routes/6park/maintainer.ts deleted file mode 100644 index 84cb5ee4a..000000000 --- a/lib/routes/6park/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/:id?': ['nczitzk'], - '/:id/gold': ['nczitzk'], - '/:id/keywords/:keyword?': ['nczitzk'], - '/news/:site?/:id?': ['nczitzk'], - '/news/newspark/gold': ['nczitzk'], - '/news/newspark/keywords/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/6park/namespace.ts b/lib/routes/6park/namespace.ts new file mode 100644 index 000000000..f549c08fd --- /dev/null +++ b/lib/routes/6park/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '留园网', + url: 'club.6parkbbs.com', +}; diff --git a/lib/routes/6park/news.ts b/lib/routes/6park/news.ts index b10b8cba2..0523b2667 100644 --- a/lib/routes/6park/news.ts +++ b/lib/routes/6park/news.ts @@ -1,10 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:site?/:id?/:keyword?', + radar: { + source: ['club.6parkbbs.com/:id/index.php', 'club.6parkbbs.com/'], + target: '/:id?', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const site = ctx.req.param('site') ?? 'newspark'; const id = ctx.req.param('id') ?? ''; const keyword = ctx.req.param('keyword') ?? ''; @@ -67,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/6park/radar.ts b/lib/routes/6park/radar.ts deleted file mode 100644 index 579225bae..000000000 --- a/lib/routes/6park/radar.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default { - '6parkbbs.com': { - _name: '留园网', - club: [ - { - title: '分站', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/:id/index.php', '/'], - target: '/6park/:id?', - }, - { - title: '精华区', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/:id/index.php', '/'], - target: '/6park/:id/gold', - }, - { - title: '搜索关键字', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/:id/index.php', '/'], - target: (params, url) => `/6park/:id/keywords/${new URL(url).searchParams.get('keywords')}`, - }, - ], - local: [ - { - title: '新闻栏目', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/index.php', '/'], - target: (params, url) => `/6park/news/local/${new URL(url).searchParams.get('type_id')}`, - }, - { - title: '头条精选', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/index.php', '/'], - target: '/6park/news/newspark/gold', - }, - { - title: '新闻搜索', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/index.php', '/'], - target: (params, url) => `/6park/news/newspark/keywords/${new URL(url).searchParams.get('keywords')}`, - }, - ], - newspark: [ - { - title: '新闻栏目', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/newspark/index.php', '/'], - target: (params, url) => `/6park/news/newspark/${new URL(url).searchParams.get('type')}`, - }, - { - title: '头条精选', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/newspark/index.php', '/'], - target: '/6park/news/newspark/gold', - }, - { - title: '新闻搜索', - docs: 'https://docs.rsshub.app/routes/new-media#liu-yuan-wang', - source: ['/newspark/index.php', '/'], - target: (params, url) => `/6park/news/newspark/keywords/${new URL(url).searchParams.get('keywords')}`, - }, - ], - }, -}; diff --git a/lib/routes/6park/router.ts b/lib/routes/6park/router.ts deleted file mode 100644 index ec1bfd6e4..000000000 --- a/lib/routes/6park/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:site?/:id?/:keyword?', './news'); - router.get('/:id?/:type?/:keyword?', './'); -}; diff --git a/lib/routes/6v123/latest-movies.ts b/lib/routes/6v123/latest-movies.ts index 563d9dc6f..fcb815028 100644 --- a/lib/routes/6v123/latest-movies.ts +++ b/lib/routes/6v123/latest-movies.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { processItems } from './utils'; const baseURL = 'https://www.hao6v.cc/gvod/zx.html'; -export default async (ctx) => { +export const route: Route = { + path: '/latestMovies', + categories: ['multimedia'], + example: '/6v123/latestMovies', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hao6v.com/', 'hao6v.com/gvod/zx.html'], + }, + name: '最新电影', + maintainers: ['tc9011'], + handler, + url: 'hao6v.com/', +}; + +async function handler(ctx) { const item = await processItems(ctx, baseURL); - ctx.set('data', { + return { title: '6v电影-最新电影', link: baseURL, description: '6v最新电影RSS', item, - }); -}; + }; +} diff --git a/lib/routes/6v123/latest-tvseries.ts b/lib/routes/6v123/latest-tvseries.ts index 4ac742dd7..c530b91b0 100644 --- a/lib/routes/6v123/latest-tvseries.ts +++ b/lib/routes/6v123/latest-tvseries.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { processItems } from './utils'; const baseURL = 'https://www.hao6v.tv/gvod/dsj.html'; -export default async (ctx) => { +export const route: Route = { + path: '/latestTVSeries', + categories: ['multimedia'], + example: '/6v123/latestTVSeries', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hao6v.com/', 'hao6v.com/gvod/dsj.html'], + }, + name: '最新电视剧', + maintainers: ['tc9011'], + handler, + url: 'hao6v.com/', +}; + +async function handler(ctx) { const item = await processItems(ctx, baseURL); - ctx.set('data', { + return { title: '6v电影-最新电影', link: baseURL, description: '6v最新电影RSS', item, - }); -}; + }; +} diff --git a/lib/routes/6v123/maintainer.ts b/lib/routes/6v123/maintainer.ts deleted file mode 100644 index 07f3bd1af..000000000 --- a/lib/routes/6v123/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/latestMovies': ['tc9011'], - '/latestTVSeries': ['tc9011'], -}; diff --git a/lib/routes/6v123/namespace.ts b/lib/routes/6v123/namespace.ts new file mode 100644 index 000000000..6a83d25a4 --- /dev/null +++ b/lib/routes/6v123/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '6v 电影', + url: 'hao6v.cc', +}; diff --git a/lib/routes/6v123/radar.ts b/lib/routes/6v123/radar.ts deleted file mode 100644 index 715cf04c7..000000000 --- a/lib/routes/6v123/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -const radarConfig = { - _name: '6v电影', - '.': [ - { - title: '最新电影', - docs: 'https://docs.rsshub.app/routes/multimedia#6v-dian-ying', - source: ['/', '/gvod/zx.html'], - target: '/6v123/latestMovies', - }, - { - title: '最新电视剧', - docs: 'https://docs.rsshub.app/routes/multimedia#6v-dian-ying', - source: ['/', '/gvod/dsj.html'], - target: '/6v123/latestTVSeries', - }, - ], -}; - -export default { - 'hao6v.cc': radarConfig, - 'hao6v.tv': radarConfig, - 'hao6v.com': radarConfig, -}; diff --git a/lib/routes/6v123/router.ts b/lib/routes/6v123/router.ts deleted file mode 100644 index 14e612b98..000000000 --- a/lib/routes/6v123/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/latestMovies', './latest-movies'); - router.get('/latestTVSeries', './latest-tvseries'); -}; diff --git a/lib/routes/78dm/index.ts b/lib/routes/78dm/index.ts index c1b3d7e0c..6a8c20cd6 100644 --- a/lib/routes/78dm/index.ts +++ b/lib/routes/78dm/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://www.78dm.net'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/news' : /\/\d+$/.test(getSubPath(ctx)) ? `${getSubPath(ctx)}.html` : getSubPath(ctx)}`; @@ -71,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `78动漫 - ${$('title').text().split('_')[0]} - ${$('.actived').first().text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/78dm/maintainer.ts b/lib/routes/78dm/maintainer.ts deleted file mode 100644 index 9e733dd2a..000000000 --- a/lib/routes/78dm/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/eval_list/:path+': ['nczitzk'], - '/ht_list/:path+': ['nczitzk'], - '/news/:path+': ['nczitzk'], -}; diff --git a/lib/routes/78dm/namespace.ts b/lib/routes/78dm/namespace.ts new file mode 100644 index 000000000..b73666bb4 --- /dev/null +++ b/lib/routes/78dm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '78 动漫', + url: '78dm.net', +}; diff --git a/lib/routes/78dm/radar.ts b/lib/routes/78dm/radar.ts deleted file mode 100644 index 15980b541..000000000 --- a/lib/routes/78dm/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - '78dm.net': { - _name: '78动漫', - '.': [ - { - title: '新品速递', - docs: 'https://docs.rsshub.app/routes/anime#78-dong-man-xin-pin-su-di', - source: ['/news', '/'], - target: (params, url) => - `/78dm${new URL(url) - .toString() - .match(/78dm\.net(.*)$/)[1] - .replace(/\.html$/, '')}`, - }, - { - title: '精彩评测', - docs: 'https://docs.rsshub.app/routes/anime#78-dong-man-jing-cai-ping-ce', - source: ['/eval_list', '/'], - target: (params, url) => - `/78dm${new URL(url) - .toString() - .match(/78dm\.net(.*)$/)[1] - .replace(/\.html$/, '')}`, - }, - { - title: '新品速递', - docs: 'https://docs.rsshub.app/routes/anime#78-dong-man-hao-tie-tui-jian', - source: ['/ht_list', '/'], - target: (params, url) => - `/78dm${new URL(url) - .toString() - .match(/78dm\.net(.*)$/)[1] - .replace(/\.html$/, '')}`, - }, - ], - }, -}; diff --git a/lib/routes/78dm/router.ts b/lib/routes/78dm/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/78dm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/7mmtv/index.ts b/lib/routes/7mmtv/index.ts index 41a3dc0c9..7822aae03 100644 --- a/lib/routes/7mmtv/index.ts +++ b/lib/routes/7mmtv/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,46 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/:category?/:type?', + categories: ['multimedia'], + example: '/7mmtv/zh/censored_list/all', + parameters: { language: 'Language, see below, `en` as English by default', category: 'Category, see below, `censored_list` as Censored by default', type: 'Server, see below, all server by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `**Language** + + | English | 日本語 | 한국의 | 中文 | + | ------- | ------ | ------ | ---- | + | en | ja | ko | zh | + + **Category** + + | Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics | + | -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ | + | chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list | + + | Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random | + | --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- | + | chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random | + + **Server** + + | All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) | + | ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ | + | all | 21 | 30 | 28 | 29 | 17 | 34 | 33 |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'en'; const category = ctx.req.param('category') ?? 'censored_list'; const type = ctx.req.param('type') ?? 'all'; @@ -71,12 +111,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title') .text() .replace(/ - Watch JAV Online/, ''), link: currentUrl, item: items, description: $('meta[name="description"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/7mmtv/maintainer.ts b/lib/routes/7mmtv/maintainer.ts deleted file mode 100644 index 6cc6a6dd9..000000000 --- a/lib/routes/7mmtv/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:language?/:category?/:type?': ['nczitzk'], - '/:language?/:category?/:id?': ['nczitzk'], -}; diff --git a/lib/routes/7mmtv/namespace.ts b/lib/routes/7mmtv/namespace.ts new file mode 100644 index 000000000..b3896a64e --- /dev/null +++ b/lib/routes/7mmtv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '7mmtv', + url: '7mmtv.tv', +}; diff --git a/lib/routes/7mmtv/radar.ts b/lib/routes/7mmtv/radar.ts deleted file mode 100644 index 4d191cd67..000000000 --- a/lib/routes/7mmtv/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '7mmtv.tv': { - _name: '7mmtv.tv', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#7mmtv-fen-lei', - source: ['/'], - target: (params, url) => `/7mmtv/${new URL(url).toString().match(/\/(en|ja|ko|zh)\/([\w-]+\/){0,2}/)[1]}`, - }, - { - title: '制作商', - docs: 'https://docs.rsshub.app/routes/multimedia#7mmtv-zhi-zuo-shang', - source: ['/'], - target: (params, url) => `/7mmtv/${new URL(url).toString().match(/\/(en|ja|ko|zh)\/([\w-]+\/){0,2}/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/7mmtv/router.ts b/lib/routes/7mmtv/router.ts deleted file mode 100644 index 49e420246..000000000 --- a/lib/routes/7mmtv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language?/:category?/:type?', './index'); -}; diff --git a/lib/routes/81/81rc/index.ts b/lib/routes/81/81rc/index.ts index 1cd637595..fe56b0af5 100644 --- a/lib/routes/81/81rc/index.ts +++ b/lib/routes/81/81rc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/81rc/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const thePath = getSubPath(ctx).replace(/^\/81rc/, ''); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -48,7 +56,7 @@ export default async (ctx) => { const icon = $('link[rel="icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `军队人才网 - ${$('div.left-word') .find('a') @@ -60,5 +68,5 @@ export default async (ctx) => { language: 'zh-cn', icon, logo: icon, - }); -}; + }; +} diff --git a/lib/routes/81/maintainer.ts b/lib/routes/81/maintainer.ts deleted file mode 100644 index 6b04b6e1f..000000000 --- a/lib/routes/81/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/81rc/:path+': ['nczitzk'], -}; diff --git a/lib/routes/81/namespace.ts b/lib/routes/81/namespace.ts new file mode 100644 index 000000000..4bcdc8156 --- /dev/null +++ b/lib/routes/81/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国军网', + url: '81rc.81.cn', +}; diff --git a/lib/routes/81/radar.ts b/lib/routes/81/radar.ts deleted file mode 100644 index ecf4adee8..000000000 --- a/lib/routes/81/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - '81.cn': { - _name: '中国军网', - '81rc': [ - { - title: '军队人才网', - docs: 'https://docs.rsshub.app/routes/government#zhon-guo-jun-wang-jun-dui-ren-cai-wang', - source: ['/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/81rc\.81\.cn(.*?)/).replace(/\/index\.html$/, ''); - - return `/81/81rc${path === '/' ? '' : path}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/81/router.ts b/lib/routes/81/router.ts deleted file mode 100644 index 2bb14d40d..000000000 --- a/lib/routes/81/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/81rc/*', './81rc'); -}; diff --git a/lib/routes/8264/list.ts b/lib/routes/8264/list.ts index 339575922..c652bfb48 100644 --- a/lib/routes/8264/list.ts +++ b/lib/routes/8264/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,82 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:id?', + categories: ['bbs'], + example: '/8264/list/751', + parameters: { id: '列表 id,见下表,默认为 751,即热门推荐' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '列表', + maintainers: ['nczitzk'], + handler, + description: `| 热门推荐 | 户外知识 | 户外装备 | + | -------- | -------- | -------- | + | 751 | 238 | 204 | + +
+ 更多列表 + + #### 热门推荐 + + | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 489 | 733 | 746 | 902 | 914 | 934 | 935 | + + #### 户外知识 + + | 徒步 | 露营 | 安全急救 | 领队 | 登雪山 | + | ---- | ---- | -------- | ---- | ------ | + | 242 | 950 | 931 | 920 | 915 | + + | 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 | + | ---- | ---- | ---- | ---- | -------- | + | 916 | 917 | 918 | 919 | 921 | + + | 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 | + | ---- | ---- | ---- | ---- | ---- | + | 951 | 952 | 953 | 966 | 967 | + + | 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 | + | -------- | ------ | ---- | -------- | ------ | + | 968 | 969 | 970 | 973 | 971 | + + | 游泳 | 溯溪 | 健身 | 瑜伽 | + | ---- | ---- | ---- | ---- | + | 974 | 975 | 976 | 977 | + + #### 户外装备 + + | 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 | + | ---- | ------ | ------ | ------ | ------ | + | 209 | 923 | 924 | 925 | 926 | + + | 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 | + | ------ | ---- | ------ | ------ | ------ | + | 927 | 929 | 211 | 928 | 930 | + + | 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 | + | -------- | ------ | ------ | ---- | ---- | + | 933 | 932 | 220 | 208 | 212 | + + | 炉具 | 灯具 | 水具 | 面料 | 背包 | + | ---- | ---- | ---- | ---- | ---- | + | 792 | 218 | 219 | 222 | 207 | + + | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | + | ------ | -------- | -------- | -------- | + | 214 | 216 | 215 | 223 | +
`, +}; + +async function handler(ctx) { const { id = '751' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -82,7 +158,7 @@ export default async (ctx) => { const description = $('meta[name="description"]').prop('content').trim(); const icon = new URL('favicon', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('span.country, h2').text()} - ${description.split(',').pop()}`, link: currentUrl, @@ -92,5 +168,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="keywords"]').prop('content').trim(), author: $('meta[name="author"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/8264/maintainer.ts b/lib/routes/8264/maintainer.ts deleted file mode 100644 index d177a6252..000000000 --- a/lib/routes/8264/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/list/:id?': ['nczitzk'], -}; diff --git a/lib/routes/8264/namespace.ts b/lib/routes/8264/namespace.ts new file mode 100644 index 000000000..3d2cf0432 --- /dev/null +++ b/lib/routes/8264/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '8264', + url: '8264.com', +}; diff --git a/lib/routes/8264/radar.ts b/lib/routes/8264/radar.ts deleted file mode 100644 index 85d52ab0c..000000000 --- a/lib/routes/8264/radar.ts +++ /dev/null @@ -1,355 +0,0 @@ -export default { - '8264.com': { - _name: '8264', - '.': [ - { - title: '热门推荐', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/751'], - target: '/8264/list/751', - }, - { - title: '户外知识', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/238'], - target: '/8264/list/238', - }, - { - title: '户外装备', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/204'], - target: '/8264/list/204', - }, - { - title: '业界', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/489'], - target: '/8264/list/489', - }, - { - title: '国际', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/733'], - target: '/8264/list/733', - }, - { - title: '专访', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/746'], - target: '/8264/list/746', - }, - { - title: '图说', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/902'], - target: '/8264/list/902', - }, - { - title: '户外', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/914'], - target: '/8264/list/914', - }, - { - title: '登山', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/934'], - target: '/8264/list/934', - }, - { - title: '攀岩', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/935'], - target: '/8264/list/935', - }, - { - title: '徒步', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/242'], - target: '/8264/list/242', - }, - { - title: '露营', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/950'], - target: '/8264/list/950', - }, - { - title: '安全急救', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/931'], - target: '/8264/list/931', - }, - { - title: '领队', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/920'], - target: '/8264/list/920', - }, - { - title: '登雪山', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/915'], - target: '/8264/list/915', - }, - { - title: '攀岩', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/916'], - target: '/8264/list/916', - }, - { - title: '骑行', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/917'], - target: '/8264/list/917', - }, - { - title: '跑步', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/918'], - target: '/8264/list/918', - }, - { - title: '滑雪', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/919'], - target: '/8264/list/919', - }, - { - title: '水上运动', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/921'], - target: '/8264/list/921', - }, - { - title: '钓鱼', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/951'], - target: '/8264/list/951', - }, - { - title: '潜水', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/952'], - target: '/8264/list/952', - }, - { - title: '攀冰', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/953'], - target: '/8264/list/953', - }, - { - title: '冲浪', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/966'], - target: '/8264/list/966', - }, - { - title: '网球', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/967'], - target: '/8264/list/967', - }, - { - title: '绳索知识', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/968'], - target: '/8264/list/968', - }, - { - title: '高尔夫', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/969'], - target: '/8264/list/969', - }, - { - title: '马术', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/970'], - target: '/8264/list/970', - }, - { - title: '户外摄影', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/973'], - target: '/8264/list/973', - }, - { - title: '羽毛球', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/971'], - target: '/8264/list/971', - }, - { - title: '游泳', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/974'], - target: '/8264/list/974', - }, - { - title: '溯溪', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/975'], - target: '/8264/list/975', - }, - { - title: '健身', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/976'], - target: '/8264/list/976', - }, - { - title: '瑜伽', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/977'], - target: '/8264/list/977', - }, - { - title: '服装', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/209'], - target: '/8264/list/209', - }, - { - title: '冲锋衣', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/923'], - target: '/8264/list/923', - }, - { - title: '抓绒衣', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/924'], - target: '/8264/list/924', - }, - { - title: '皮肤衣', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/925'], - target: '/8264/list/925', - }, - { - title: '速干衣', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/926'], - target: '/8264/list/926', - }, - { - title: '羽绒服', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/927'], - target: '/8264/list/927', - }, - { - title: '软壳', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/929'], - target: '/8264/list/929', - }, - { - title: '户外鞋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/211'], - target: '/8264/list/211', - }, - { - title: '登山鞋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/928'], - target: '/8264/list/928', - }, - { - title: '徒步鞋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/930'], - target: '/8264/list/930', - }, - { - title: '越野跑鞋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/933'], - target: '/8264/list/933', - }, - { - title: '溯溪鞋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/932'], - target: '/8264/list/932', - }, - { - title: '登山杖', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/220'], - target: '/8264/list/220', - }, - { - title: '帐篷', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/208'], - target: '/8264/list/208', - }, - { - title: '睡袋', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/212'], - target: '/8264/list/212', - }, - { - title: '炉具', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/792'], - target: '/8264/list/792', - }, - { - title: '灯具', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/218'], - target: '/8264/list/218', - }, - { - title: '水具', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/219'], - target: '/8264/list/219', - }, - { - title: '面料', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/222'], - target: '/8264/list/222', - }, - { - title: '背包', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/207'], - target: '/8264/list/207', - }, - { - title: '防潮垫', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/214'], - target: '/8264/list/214', - }, - { - title: '电子导航', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/216'], - target: '/8264/list/216', - }, - { - title: '冰岩绳索', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/215'], - target: '/8264/list/215', - }, - { - title: '综合装备', - docs: 'https://docs.rsshub.app/routes/new-media#8264-lie-biao', - source: ['/list/223'], - target: '/8264/list/223', - }, - ], - }, -}; diff --git a/lib/routes/8264/router.ts b/lib/routes/8264/router.ts deleted file mode 100644 index aa6d88a43..000000000 --- a/lib/routes/8264/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/list/:id?', './list'); -}; diff --git a/lib/routes/8kcos/cat.ts b/lib/routes/8kcos/cat.ts index 32607dac0..60fb478b1 100644 --- a/lib/routes/8kcos/cat.ts +++ b/lib/routes/8kcos/cat.ts @@ -1,16 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -export default async (ctx) => { +export const route: Route = { + path: '/cat/:cat{.+}?', + radar: { + source: ['8kcosplay.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: '8kcosplay.com/', +}; + +async function handler(ctx) { const limit = Number.parseInt(ctx.req.query('limit')); const { cat = '8kasianidol' } = ctx.req.param(); const url = `${SUB_URL}category/${cat}/`; const resp = await got(url); const $ = load(resp.body); const itemRaw = $('li.item').toArray(); - ctx.set('data', { + return { title: `${SUB_NAME_PREFIX}-${$('span[property=name]:not(.hide)').text()}`, link: url, item: await Promise.all( @@ -19,5 +32,5 @@ export default async (ctx) => { return cache.tryGet(href, () => loadArticle(href)); }) ), - }); -}; + }; +} diff --git a/lib/routes/8kcos/latest.ts b/lib/routes/8kcos/latest.ts index 096114346..e5043e389 100644 --- a/lib/routes/8kcos/latest.ts +++ b/lib/routes/8kcos/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,11 +6,34 @@ import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; const url = SUB_URL; -export default async (ctx) => { +export const route: Route = { + path: '/', + categories: ['picture'], + example: '/8kcos/', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['8kcosplay.com/'], + target: '', + }, + name: '最新', + maintainers: ['KotoriK'], + handler, + url: '8kcosplay.com/', +}; + +async function handler(ctx) { const limit = Number.parseInt(ctx.req.query('limit')); const response = await got(url); const itemRaw = load(response.body)('ul.post-loop li.item').toArray(); - ctx.set('data', { + return { title: `${SUB_NAME_PREFIX}-最新`, link: url, item: @@ -20,5 +44,5 @@ export default async (ctx) => { return cache.tryGet(href, () => loadArticle(href)); }) )), - }); -}; + }; +} diff --git a/lib/routes/8kcos/maintainer.ts b/lib/routes/8kcos/maintainer.ts deleted file mode 100644 index ad264e262..000000000 --- a/lib/routes/8kcos/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/': ['KotoriK'], - '/cat/:cat*': ['KotoriK'], - '/tag/:tag': ['KotoriK'], -}; diff --git a/lib/routes/8kcos/namespace.ts b/lib/routes/8kcos/namespace.ts new file mode 100644 index 000000000..15e6c6a13 --- /dev/null +++ b/lib/routes/8kcos/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '8KCosplay', + url: '8kcosplay.com', +}; diff --git a/lib/routes/8kcos/radar.ts b/lib/routes/8kcos/radar.ts deleted file mode 100644 index 63f29b15e..000000000 --- a/lib/routes/8kcos/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - '8kcosplay.com': { - _name: '8KCosplay', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/picture#8kcosplay', - source: ['/'], - target: '/8kcos', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/picture#8kcosplay', - source: ['/category/:cat*'], - target: (params, url) => `/8kcos/cat/${new URL(url).pathname}`, - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/picture#8kcosplay', - source: ['/tag/:tag'], - target: '/8kcos/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/8kcos/router.ts b/lib/routes/8kcos/router.ts deleted file mode 100644 index 8c973affa..000000000 --- a/lib/routes/8kcos/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/', './latest'); - router.get('/cat/:cat{.+}?', './cat'); - router.get('/tag/:tag', './tag'); -}; diff --git a/lib/routes/8kcos/tag.ts b/lib/routes/8kcos/tag.ts index 7f7a2e2ce..0750c882d 100644 --- a/lib/routes/8kcos/tag.ts +++ b/lib/routes/8kcos/tag.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['picture'], + example: '/8kcos/tag/cosplay', + parameters: { tag: '标签名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['8kcosplay.com/tag/:tag'], + }, + name: '标签', + maintainers: ['KotoriK'], + handler, + url: '8kcosplay.com/', +}; + +async function handler(ctx) { const limit = Number.parseInt(ctx.req.query('limit')); const tag = ctx.req.param('tag'); const url = `${SUB_URL}tag/${tag}/`; @@ -11,7 +34,7 @@ export default async (ctx) => { const $ = load(resp.body); const itemRaw = $('li.item').toArray(); - ctx.set('data', { + return { title: `${SUB_NAME_PREFIX}-${$('span[property=name]:not(.hide)').text()}`, link: url, item: await Promise.all( @@ -20,5 +43,5 @@ export default async (ctx) => { return cache.tryGet(href, () => loadArticle(href)); }) ), - }); -}; + }; +} diff --git a/lib/routes/8world/index.ts b/lib/routes/8world/index.ts index 69e5191b0..603050800 100644 --- a/lib/routes/8world/index.ts +++ b/lib/routes/8world/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx) === '/' ? '/realtime' : getSubPath(ctx); const rootUrl = 'https://www.8world.com'; @@ -51,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/8world/maintainer.ts b/lib/routes/8world/maintainer.ts deleted file mode 100644 index 8a78c4450..000000000 --- a/lib/routes/8world/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:category?': ['nczitzk'], - '/topic/:id': ['nczitzk'], -}; diff --git a/lib/routes/8world/namespace.ts b/lib/routes/8world/namespace.ts new file mode 100644 index 000000000..d65a6da2d --- /dev/null +++ b/lib/routes/8world/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '8 视界', + url: '8world.com', +}; diff --git a/lib/routes/8world/radar.ts b/lib/routes/8world/radar.ts deleted file mode 100644 index 63c2d3d95..000000000 --- a/lib/routes/8world/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '8world.com': { - _name: '8视界', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#8-shi-jie-fen-lei', - source: ['/:category', '/'], - target: '/8world/:category?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#8-shi-jie-biao-qian', - source: ['/topic/:id', '/'], - target: '/8world/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/8world/router.ts b/lib/routes/8world/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/8world/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/91porn/author.ts b/lib/routes/91porn/author.ts index bfb2ea58f..9a4efdb59 100644 --- a/lib/routes/91porn/author.ts +++ b/lib/routes/91porn/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { domainValidation } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:uid/:lang?', + categories: ['multimedia'], + example: '/91porn/author/2d6d2iWm4vVCwqujAZbSrKt2QJCbbaObv9HQ21Zo8wGJWudWBg', + parameters: { uid: 'Author ID, can be found in URL', lang: 'Language, see above, `en_US` by default ' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['91porn.com/index.php'], + target: '', + }, + name: 'Author', + maintainers: ['TonyRL'], + handler, + url: '91porn.com/index.php', +}; + +async function handler(ctx) { const { domain = '91porn.com' } = ctx.req.query(); const { uid, lang = 'en_US' } = ctx.req.param(); const siteUrl = `https://${domain}/uvideos.php?UID=${uid}&type=public`; @@ -56,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.login_register_header').text()} - 91porn`, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/91porn/index.ts b/lib/routes/91porn/index.ts index 51cd9fe9d..4dbe9e9a2 100644 --- a/lib/routes/91porn/index.ts +++ b/lib/routes/91porn/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,33 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { domainValidation } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:lang?', + categories: ['multimedia'], + example: '/91porn', + parameters: { lang: 'Language, see below, `en_US` by default ' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['91porn.com/index.php'], + target: '', + }, + name: 'Hot Video Today', + maintainers: ['TonyRL'], + handler, + url: '91porn.com/index.php', + description: `| English | 简体中文 | 繁體中文 | + | ------- | -------- | -------- | + | en\_US | cn\_CN | zh\_ZH |`, +}; + +async function handler(ctx) { const { domain = '91porn.com' } = ctx.req.query(); const siteUrl = `https://${domain}/index.php`; const { lang = 'en_US' } = ctx.req.param(); @@ -56,9 +83,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.login_register_header').text()} - 91porn`, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/91porn/maintainer.ts b/lib/routes/91porn/maintainer.ts deleted file mode 100644 index 01bba016e..000000000 --- a/lib/routes/91porn/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/author/:uid/:lang?': ['TonyRL'], - '/:lang?': ['TonyRL'], -}; diff --git a/lib/routes/91porn/namespace.ts b/lib/routes/91porn/namespace.ts new file mode 100644 index 000000000..d9c38b15c --- /dev/null +++ b/lib/routes/91porn/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '91porn', + url: '91porn.com', + description: `:::tip +91porn has multiple backup domains, routes use the permanent domain \`https://91porn.com\` by default. If the domain is not accessible, you can add \`?domain=\` to specify the domain to be used. If you want to specify the backup domain to \`https://0122.91p30.com\`, you can add \`?domain=0122.91p30.com\` to the end of all 91porn routes, then the route will become [\`/91porn?domain=0122.91p30.com\`](https://rsshub.app/91porn?domain=0122.91p30.com) +:::`, +}; diff --git a/lib/routes/91porn/radar.ts b/lib/routes/91porn/radar.ts deleted file mode 100644 index 06f217c5c..000000000 --- a/lib/routes/91porn/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '91porn.com': { - _name: '91porn', - '.': [ - { - title: '今日排行', - docs: 'https://docs.rsshub.app/routes/multimedia#91porn', - source: ['/index.php'], - target: '/91porn', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/multimedia#91porn', - source: ['/uvideos.php'], - target: (_params, url) => `/91porn/author/${new URL(url).searchParams.get('UID')}`, - }, - ], - }, -}; diff --git a/lib/routes/91porn/router.ts b/lib/routes/91porn/router.ts deleted file mode 100644 index e29f710fd..000000000 --- a/lib/routes/91porn/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/author/:uid/:lang?', './author'); - router.get('/:lang?', './index'); -}; diff --git a/lib/routes/95mm/category.ts b/lib/routes/95mm/category.ts index 5c8940d84..a2cb06fff 100644 --- a/lib/routes/95mm/category.ts +++ b/lib/routes/95mm/category.ts @@ -1,6 +1,32 @@ +import { Route } from '@/types'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['picture'], + example: '/95mm/category/1', + parameters: { category: '集合,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['95mm.org/'], + }, + name: '集合', + maintainers: ['nczitzk'], + handler, + url: '95mm.org/', + description: `| 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 | + | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | + | 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 |`, +}; + +async function handler(ctx) { const categories = { 1: '清纯唯美', 2: '摄影私房', @@ -17,4 +43,4 @@ export default async (ctx) => { const currentUrl = `${rootUrl}/category-${category}/list-1/index.html?page=1`; ctx.set('data', await ProcessItems(ctx, categories[category], currentUrl)); -}; +} diff --git a/lib/routes/95mm/maintainer.ts b/lib/routes/95mm/maintainer.ts deleted file mode 100644 index ebf755c62..000000000 --- a/lib/routes/95mm/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/tab/:tab?': ['nczitzk'], - '/tag/:tag': ['nczitzk'], - '/category/:category': ['nczitzk'], -}; diff --git a/lib/routes/95mm/namespace.ts b/lib/routes/95mm/namespace.ts new file mode 100644 index 000000000..1b4f81d33 --- /dev/null +++ b/lib/routes/95mm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MM 范', + url: '95mm.org', +}; diff --git a/lib/routes/95mm/radar.ts b/lib/routes/95mm/radar.ts deleted file mode 100644 index 4949534c6..000000000 --- a/lib/routes/95mm/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - '95mm.org': { - _name: 'MM范', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/picture#mm-fan-fen-lei', - source: '/', - target: '/95mm/tab/:tab?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/picture#mm-fan-biao-qian', - source: '/', - target: '/95mm/tag/:tag', - }, - { - title: '集合', - docs: 'https://docs.rsshub.app/routes/picture#mm-fan-ji-he', - source: '/', - target: '/95mm/category/:category', - }, - ], - }, -}; diff --git a/lib/routes/95mm/router.ts b/lib/routes/95mm/router.ts deleted file mode 100644 index 3dac4a667..000000000 --- a/lib/routes/95mm/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/tab/:tab?', './tab'); - router.get('/tag/:tag', './tag'); - router.get('/category/:category', './category'); -}; diff --git a/lib/routes/95mm/tab.ts b/lib/routes/95mm/tab.ts index 44fab7df1..aca222ccd 100644 --- a/lib/routes/95mm/tab.ts +++ b/lib/routes/95mm/tab.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tab/:tab?', + categories: ['picture'], + example: '/95mm/tab/热门', + parameters: { tab: '分类,见下表,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['95mm.org/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + url: '95mm.org/', + description: `| 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, +}; + +async function handler(ctx) { const tab = ctx.req.param('tab') ?? '最新'; const currentUrl = `${rootUrl}/home-ajax/index.html?tabcid=${tab}&page=1`; ctx.set('data', await ProcessItems(ctx, tab, currentUrl)); -}; +} diff --git a/lib/routes/95mm/tag.ts b/lib/routes/95mm/tag.ts index 77491f35c..e311f60a7 100644 --- a/lib/routes/95mm/tag.ts +++ b/lib/routes/95mm/tag.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['picture'], + example: '/95mm/tag/黑丝', + parameters: { tag: '标签,可在对应标签页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['95mm.org/'], + }, + name: '标签', + maintainers: ['nczitzk'], + handler, + url: '95mm.org/', +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const currentUrl = `${rootUrl}/tag-${tag}/page-1/index.html`; ctx.set('data', await ProcessItems(ctx, tag, currentUrl)); -}; +} diff --git a/lib/routes/9to5/maintainer.ts b/lib/routes/9to5/maintainer.ts deleted file mode 100644 index 9bcb8303f..000000000 --- a/lib/routes/9to5/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/9to5/:subsite/:tag?': ['HenryQW'], -}; diff --git a/lib/routes/9to5/namespace.ts b/lib/routes/9to5/namespace.ts new file mode 100644 index 000000000..2e757a1c1 --- /dev/null +++ b/lib/routes/9to5/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '9To5', + url: '9to5toys.com', +}; diff --git a/lib/routes/9to5/radar.ts b/lib/routes/9to5/radar.ts deleted file mode 100644 index 375c5685c..000000000 --- a/lib/routes/9to5/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - '9to5toys.com': { - _name: '9to5', - '.': [ - { - title: 'Toys 分站', - docs: 'https://docs.rsshub.app/routes/new-media#9to5', - source: ['/', '/guides/:tag'], - target: '/9to5/toys/:tag?', - }, - ], - }, - '9to5mac.com': { - _name: '9to5', - '.': [ - { - title: 'Mac 分站', - docs: 'https://docs.rsshub.app/routes/new-media#9to5', - source: ['/', '/guides/:tag'], - target: '/9to5/mac/:tag?', - }, - ], - }, - '9to5google.com': { - _name: '9to5', - '.': [ - { - title: 'Google 分站', - docs: 'https://docs.rsshub.app/routes/new-media#9to5', - source: ['/', '/guides/:tag'], - target: '/9to5/google/:tag?', - }, - ], - }, -}; diff --git a/lib/routes/9to5/router.ts b/lib/routes/9to5/router.ts deleted file mode 100644 index 6983d696d..000000000 --- a/lib/routes/9to5/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:subsite/:tag?', './subsite'); -}; diff --git a/lib/routes/9to5/subsite.ts b/lib/routes/9to5/subsite.ts index 793679bfd..45f0d6290 100644 --- a/lib/routes/9to5/subsite.ts +++ b/lib/routes/9to5/subsite.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:subsite/:tag?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let title = '9To5', link, description; @@ -62,10 +70,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, description, item: items, - }); -}; + }; +} diff --git a/lib/routes/a9vg/a9vg.ts b/lib/routes/a9vg/a9vg.ts index 6dddbaa52..72e2b3e65 100644 --- a/lib/routes/a9vg/a9vg.ts +++ b/lib/routes/a9vg/a9vg.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['a9vg.com/list/news', 'a9vg.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['monnerHenster'], + handler, + url: 'a9vg.com/list/news', +}; + +async function handler() { const baseUrl = 'http://www.a9vg.com'; const link = `${baseUrl}/list/news`; const { data } = await got(link); @@ -21,10 +34,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'A9VG 电玩部落', link, description: $('meta[name="description"]').attr('content'), item: list, - }); -}; + }; +} diff --git a/lib/routes/a9vg/maintainer.ts b/lib/routes/a9vg/maintainer.ts deleted file mode 100644 index dd5f32e74..000000000 --- a/lib/routes/a9vg/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['monnerHenster'], -}; diff --git a/lib/routes/a9vg/namespace.ts b/lib/routes/a9vg/namespace.ts new file mode 100644 index 000000000..074bd1620 --- /dev/null +++ b/lib/routes/a9vg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'A9VG 电玩部落', + url: 'a9vg.com', +}; diff --git a/lib/routes/a9vg/radar.ts b/lib/routes/a9vg/radar.ts deleted file mode 100644 index ca9d0898a..000000000 --- a/lib/routes/a9vg/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'a9vg.com': { - _name: 'A9VG 电玩部落', - '.': [ - { - title: '游戏新闻', - docs: 'https://docs.rsshub.app/routes/game#a9vg-dian-wan-bu-luo', - source: ['/list/news', '/'], - target: '/a9vg', - }, - ], - }, -}; diff --git a/lib/routes/a9vg/router.ts b/lib/routes/a9vg/router.ts deleted file mode 100644 index 052f98ba3..000000000 --- a/lib/routes/a9vg/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './a9vg'); -}; diff --git a/lib/routes/aamacau/index.ts b/lib/routes/aamacau/index.ts index 805945303..000cc2869 100644 --- a/lib/routes/aamacau/index.ts +++ b/lib/routes/aamacau/index.ts @@ -1,9 +1,43 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:id?', + categories: ['new-media'], + example: '/aamacau', + parameters: { category: '分类,见下表,默认为即時報道', id: 'id,可在对应页面 URL 中找到,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['aamacau.com/'], + }, + name: '话题', + maintainers: [], + handler, + url: 'aamacau.com/', + description: `| 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 | + | ------------ | ----------- | ---------- | -------- | -------- | -------- | + | breakingnews | weeklytopic | culture | press | case | special | + + :::tip + 除了直接订阅分类全部文章(如 [每週專題](https://aamacau.com/topics/weeklytopic) 的对应路由为 [/aamacau/weeklytopic](https://rsshub.app/aamacau/weeklytopic)),你也可以订阅特定的专题,如 [【9-12】2021 澳門立法會選舉](https://aamacau.com/topics/【9-12】2021澳門立法會選舉) 的对应路由为 [/【9-12】2021 澳門立法會選舉](https://rsshub.app/aamacau/【9-12】2021澳門立法會選舉)。 + + 分类中的专题也可以单独订阅,如 [新聞事件](https://aamacau.com/topics/case) 中的 [「武漢肺炎」新聞檔案](https://aamacau.com/topics/case/「武漢肺炎」新聞檔案) 对应路由为 [/case/「武漢肺炎」新聞檔案](https://rsshub.app/aamacau/case/「武漢肺炎」新聞檔案)。 + + 同理,其他分类同上例子也可以订阅特定的单独专题。 + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'topics'; const id = ctx.req.param('id') ?? ''; @@ -49,9 +83,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/aamacau/maintainer.ts b/lib/routes/aamacau/maintainer.ts deleted file mode 100644 index a9d2b99b2..000000000 --- a/lib/routes/aamacau/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/aamacau/:category?/:id?': ['nczitzk'], -}; diff --git a/lib/routes/aamacau/namespace.ts b/lib/routes/aamacau/namespace.ts new file mode 100644 index 000000000..afc407e64 --- /dev/null +++ b/lib/routes/aamacau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '論盡媒體 AllAboutMacau Media', + url: 'aamacau.com', +}; diff --git a/lib/routes/aamacau/radar.ts b/lib/routes/aamacau/radar.ts deleted file mode 100644 index 75e2e4923..000000000 --- a/lib/routes/aamacau/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'aamacau.com': { - _name: '論盡媒體 AllAboutMacau Media', - '.': [ - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/new-media#lun-jin-mei-ti-allaboutmacau-media-hua-ti', - source: ['/'], - target: '/:category?/:id?', - }, - ], - }, -}; diff --git a/lib/routes/aamacau/router.ts b/lib/routes/aamacau/router.ts deleted file mode 100644 index 053ae4cee..000000000 --- a/lib/routes/aamacau/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:id?', './index'); -}; diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index 57df64f9a..5389a8b0a 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,18 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + radar: { + source: ['abc.net.au/:category*'], + target: '/:category', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'news/justin' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -149,7 +161,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').first().text(), link: currentUrl, @@ -161,5 +173,5 @@ export default async (ctx) => { subtitle: $('meta[property="og:title"]').prop('content'), author: $('meta[name="generator"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/abc/maintainer.ts b/lib/routes/abc/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/abc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/abc/namespace.ts b/lib/routes/abc/namespace.ts new file mode 100644 index 000000000..19568cd0e --- /dev/null +++ b/lib/routes/abc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ABC News', + url: 'abc.net.au', +}; diff --git a/lib/routes/abc/radar.ts b/lib/routes/abc/radar.ts deleted file mode 100644 index a1a38e90f..000000000 --- a/lib/routes/abc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'abc.net.au': { - _name: 'ABC News', - '.': [ - { - title: 'Channel & Topic', - docs: 'https://docs.rsshub.app/routes/traditional-media#abc-news', - source: ['/:category*'], - target: '/abc/:category', - }, - ], - }, -}; diff --git a/lib/routes/abc/router.ts b/lib/routes/abc/router.ts deleted file mode 100644 index acb19ed1b..000000000 --- a/lib/routes/abc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/abmedia/category.ts b/lib/routes/abmedia/category.ts index 31623f5dd..eadf8525a 100644 --- a/lib/routes/abmedia/category.ts +++ b/lib/routes/abmedia/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,32 @@ const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; const getCategoryId = (category) => got.get(`${cateAPIUrl}?slug=${category}`).then((res) => res.data[0].id); -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/abmedia/technology-development', + parameters: { category: '类别,默认为产品技术' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.abmedia.io/category/:catehory'], + target: '/:category', + }, + name: '类别', + maintainers: [], + handler, + description: `参数可以从链接中拿到,如: + + \`https://www.abmedia.io/category/technology-development\` 对应 \`/abmedia/technology-development\``, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'technology-development'; const limit = ctx.req.param('limit') ?? 25; const categoryId = await getCategoryId(category); @@ -22,9 +48,9 @@ export default async (ctx) => { pubDate: parseDate(item.date), })); - ctx.set('data', { + return { title: `abmedia - ${category}`, link: `${rootUrl}/category/${category}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/abmedia/index.ts b/lib/routes/abmedia/index.ts index 1bb71e38e..031adf34e 100644 --- a/lib/routes/abmedia/index.ts +++ b/lib/routes/abmedia/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.abmedia.io'; const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; -export default async (ctx) => { +export const route: Route = { + path: '/index', + categories: ['new-media'], + example: '/abmedia/index', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.abmedia.io/'], + }, + name: '首页最新新闻', + maintainers: [], + handler, + url: 'www.abmedia.io/', +}; + +async function handler(ctx) { const limit = ctx.req.param('limit') ?? 10; const url = `${postsAPIUrl}?per_page=${limit}`; @@ -18,9 +41,9 @@ export default async (ctx) => { pubDate: parseDate(item.date), })); - ctx.set('data', { + return { title: 'ABMedia - 最新消息', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/abmedia/maintainer.ts b/lib/routes/abmedia/maintainer.ts deleted file mode 100644 index 9d2402018..000000000 --- a/lib/routes/abmedia/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/abmedia/:category?': ['Fatpandac'], -}; diff --git a/lib/routes/abmedia/namespace.ts b/lib/routes/abmedia/namespace.ts new file mode 100644 index 000000000..b1b909fdd --- /dev/null +++ b/lib/routes/abmedia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '链新闻 ABMedia', + url: 'www.abmedia.io', +}; diff --git a/lib/routes/abmedia/radar.ts b/lib/routes/abmedia/radar.ts deleted file mode 100644 index 473287f0f..000000000 --- a/lib/routes/abmedia/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'abmedia.io': { - _name: 'abmedia.io', - www: [ - { - title: '首页最新新闻', - docs: 'https://docs.rsshub.app/routes/new-media#lian-xin-wen-abmedia-shou-ye-zui-xin-xin-wen', - source: ['/'], - target: '/abmedia/index', - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#lian-xin-wen-abmedia-lei-bie', - source: ['/category/:catehory'], - target: '/abmedia/:category', - }, - ], - }, -}; diff --git a/lib/routes/abmedia/router.ts b/lib/routes/abmedia/router.ts deleted file mode 100644 index 5e4b7f6b5..000000000 --- a/lib/routes/abmedia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/index', './index'); - router.get('/:category?', './category'); -}; diff --git a/lib/routes/abskoop/index.ts b/lib/routes/abskoop/index.ts index abc26382c..127275006 100644 --- a/lib/routes/abskoop/index.ts +++ b/lib/routes/abskoop/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['ahhhhfs.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['zhenhappy'], + handler, + url: 'ahhhhfs.com/', +}; + +async function handler(ctx) { const response = await got({ method: 'get', url: 'https://www.ahhhhfs.com/wp-json/wp/v2/posts', @@ -38,11 +51,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'ahhhhfs-A姐分享', link: 'https://www.ahhhhfs.com', description: 'A姐分享,分享各种网络云盘资源、BT种子、高清电影电视剧和羊毛福利,收集各种有趣实用的软件和APP的下载、安装、使用方法,发现一些稀奇古怪的的网站,折腾一些有趣实用的教程,关注谷歌苹果等互联网最新的资讯动态,探索新领域,发现新美好,分享小快乐。', item: items, - }); -}; + }; +} diff --git a/lib/routes/abskoop/maintainer.ts b/lib/routes/abskoop/maintainer.ts deleted file mode 100644 index 138d8ce23..000000000 --- a/lib/routes/abskoop/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['zhenhappy'], -}; diff --git a/lib/routes/abskoop/namespace.ts b/lib/routes/abskoop/namespace.ts new file mode 100644 index 000000000..ab54b3e35 --- /dev/null +++ b/lib/routes/abskoop/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'A 姐分享', + url: 'nsfw.abskoop.com', +}; diff --git a/lib/routes/abskoop/nsfw.ts b/lib/routes/abskoop/nsfw.ts index cd31412a3..3067558d0 100644 --- a/lib/routes/abskoop/nsfw.ts +++ b/lib/routes/abskoop/nsfw.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/nsfw', + radar: { + source: ['ahhhhfs.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'ahhhhfs.com/', +}; + +async function handler(ctx) { const response = await got({ method: 'get', url: 'https://nsfw.abskoop.com/wp-json/wp/v2/posts', @@ -21,11 +34,11 @@ export default async (ctx) => { category: [...new Set(item._embedded['wp:term'].flatMap((i) => i.map((j) => j.name)))], })); - ctx.set('data', { + return { title: 'ahhhhfs-A姐分享NSFW', link: 'https://nsfw.ahhhhfs.com/articles-archive', description: 'A姐分享NSFW,分享各种网络云盘资源、BT种子、磁力链接、高清电影电视剧和羊毛福利,收集各种有趣实用的软件和APP的下载、安装、使用方法,发现一些稀奇古怪的的网站,折腾一些有趣实用的教程,关注谷歌苹果等互联网最新的资讯动态,探索新领域,发现新美好,分享小快乐。', item: list, - }); -}; + }; +} diff --git a/lib/routes/abskoop/radar.ts b/lib/routes/abskoop/radar.ts deleted file mode 100644 index 2b79536a5..000000000 --- a/lib/routes/abskoop/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'abskoop.com': { - _name: 'A姐分享', - nsfw: [ - { - title: 'NSFW 存档列表', - docs: 'https://docs.rsshub.app/routes/multimedia#a-jie-fen-xiang', - source: ['/articles-archive', '/'], - target: '/abskoop', - }, - ], - }, - 'ahhhhfs.com': { - _name: 'A姐分享', - '.': [ - { - title: '存档列表', - docs: 'https://docs.rsshub.app/routes/multimedia#a-jie-fen-xiang', - source: ['/'], - target: '/abskoop', - }, - ], - }, -}; diff --git a/lib/routes/abskoop/router.ts b/lib/routes/abskoop/router.ts deleted file mode 100644 index 8340f2e72..000000000 --- a/lib/routes/abskoop/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/nsfw', './nsfw'); -}; diff --git a/lib/routes/acfun/article.ts b/lib/routes/acfun/article.ts index 1d1c8d8b3..709ce97e7 100644 --- a/lib/routes/acfun/article.ts +++ b/lib/routes/acfun/article.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -33,7 +34,36 @@ const categoryMap = { const sortTypeEnum = new Set(['createTime', 'lastCommentTime', 'hotScore']); const timeRangeEnum = new Set(['all', 'oneDay', 'threeDay', 'oneWeek', 'oneMonth']); -export default async (ctx) => { +export const route: Route = { + path: '/article/:categoryId/:sortType?/:timeRange?', + categories: ['anime'], + example: '/acfun/article/110', + parameters: { categoryId: '分区 ID,见下表', sortType: '排序,见下表,默认为 `createTime`', timeRange: '时间范围,见下表,仅在排序是 `hotScore` 有效,默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['TonyRL'], + handler, + description: `| 二次元画师 | 综合 | 生活情感 | 游戏 | 动漫文化 | 漫画文学 | + | ---------- | ---- | -------- | ---- | -------- | -------- | + | 184 | 110 | 73 | 164 | 74 | 75 | + + | 最新发表 | 最新动态 | 最热文章 | + | ---------- | --------------- | -------- | + | createTime | lastCommentTime | hotScore | + + | 时间不限 | 24 小时 | 三天 | 一周 | 一个月 | + | -------- | ------- | -------- | ------- | -------- | + | all | oneDay | threeDay | oneWeek | oneMonth |`, +}; + +async function handler(ctx) { const { categoryId, sortType = 'createTime', timeRange = 'all' } = ctx.req.param(); if (!categoryMap[categoryId]) { throw new Error(`Invalid category Id: ${categoryId}`); @@ -93,9 +123,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: categoryMap[categoryId].title, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/acfun/bangumi.ts b/lib/routes/acfun/bangumi.ts index cf0a9daae..34774763f 100644 --- a/lib/routes/acfun/bangumi.ts +++ b/lib/routes/acfun/bangumi.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bangumi/:id', + categories: ['anime'], + example: '/acfun/bangumi/5022158', + parameters: { id: '番剧 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '番剧', + maintainers: ['xyqfer'], + handler, + description: `:::tip +番剧 id 不包含开头的 aa。 +例如:\`https://www.acfun.cn/bangumi/aa5022158\` 的番剧 id 是 5022158,不包括开头的 aa。 +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `https://www.acfun.cn/bangumi/aa${id}`; @@ -13,7 +36,7 @@ export default async (ctx) => { const bangumiData = JSON.parse(bangumiPage.data.match(/window.bangumiData = (.*?);\n/)[1]); const bangumiList = JSON.parse(bangumiPage.data.match(/window.bangumiList = (.*?);\n/)[1]); - ctx.set('data', { + return { title: bangumiData.bangumiTitle, link: url, description: bangumiData.bangumiIntro, @@ -24,5 +47,5 @@ export default async (ctx) => { link: `http://www.acfun.cn/bangumi/aa${id}_36188_${item.itemId}`, pubDate: parseDate(item.updateTime, 'x'), })), - }); -}; + }; +} diff --git a/lib/routes/acfun/maintainer.ts b/lib/routes/acfun/maintainer.ts deleted file mode 100644 index 38cd03094..000000000 --- a/lib/routes/acfun/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/article/:categoryId/:sortType?/:timeRange?': ['TonyRL'], - '/bangumi/:id': ['xyqfer'], - '/user/video/:uid': ['wdssmq'], -}; diff --git a/lib/routes/acfun/namespace.ts b/lib/routes/acfun/namespace.ts new file mode 100644 index 000000000..5e4be56b6 --- /dev/null +++ b/lib/routes/acfun/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AcFun', + url: 'www.acfun.cn', +}; diff --git a/lib/routes/acfun/radar.ts b/lib/routes/acfun/radar.ts deleted file mode 100644 index 80b8c65a2..000000000 --- a/lib/routes/acfun/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'acfun.cn': { - _name: 'AcFun', - www: [ - { - title: '番剧', - docs: 'https://docs.rsshub.app/routes/anime#acfun-fan-ju', - source: '/bangumi/:id', - target: (params) => `/acfun/bangumi/${params.id.replace('aa', '')}`, - }, - { - title: '用户投稿', - docs: 'https://docs.rsshub.app/routes/anime#acfun-yong-hu-tou-gao', - source: '/u/:id', - target: '/acfun/user/video/:id', - }, - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/anime#acfun', - source: '/v/:categoryId/index.htm', - target: (params) => `/acfun/article/${params.categoryId.replace('list', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/acfun/router.ts b/lib/routes/acfun/router.ts deleted file mode 100644 index 1ee007347..000000000 --- a/lib/routes/acfun/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/article/:categoryId/:sortType?/:timeRange?', './article'); - router.get('/bangumi/:id', './bangumi'); - router.get('/user/video/:uid', './video'); -}; diff --git a/lib/routes/acfun/video.ts b/lib/routes/acfun/video.ts index f4b7cf4f5..4edb1a353 100644 --- a/lib/routes/acfun/video.ts +++ b/lib/routes/acfun/video.ts @@ -1,8 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/video/:uid', + radar: { + source: ['www.acfun.cn/u/:id'], + target: '/user/video/:id', + }, + name: 'Unknown', + maintainers: ['wdssmq'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const url = `https://www.acfun.cn/u/${uid}`; const host = 'https://www.acfun.cn'; @@ -21,7 +33,7 @@ export default async (ctx) => { .text() .match(/.user-photo{\n\s*background:url\((.*)\) 0% 0% \/ 100% no-repeat;/)[1]; - ctx.set('data', { + return { title, link: url, description, @@ -41,5 +53,5 @@ export default async (ctx) => { pubDate: parseDate(itemDate, 'YYYY/MM/DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/acg17/maintainer.ts b/lib/routes/acg17/maintainer.ts deleted file mode 100644 index a6ef3144d..000000000 --- a/lib/routes/acg17/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/post/all': ['SunBK201'], -}; diff --git a/lib/routes/acg17/namespace.ts b/lib/routes/acg17/namespace.ts new file mode 100644 index 000000000..161fe01ca --- /dev/null +++ b/lib/routes/acg17/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ACG17', + url: 'acg17.com', +}; diff --git a/lib/routes/acg17/post.ts b/lib/routes/acg17/post.ts index 8f54088da..1485b6f2c 100644 --- a/lib/routes/acg17/post.ts +++ b/lib/routes/acg17/post.ts @@ -1,12 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const host = 'http://acg17.com'; -export default async (ctx) => { +export const route: Route = { + path: '/post/all', + categories: ['anime'], + example: '/acg17/post/all', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['acg17.com/post'], + }, + name: '全部文章', + maintainers: ['SunBK201'], + handler, + url: 'acg17.com/post', +}; + +async function handler() { const response = await got(`${host}/wp-json/wp/v2/posts?per_page=30`); const list = response.data; - ctx.set('data', { + return { title: `ACG17 - 全部文章`, link: `${host}/blog`, description: 'ACG17 - 全部文章', @@ -16,5 +39,5 @@ export default async (ctx) => { pubDate: parseDate(item.date_gmt), description: item.content.rendered, })), - }); -}; + }; +} diff --git a/lib/routes/acg17/radar.ts b/lib/routes/acg17/radar.ts deleted file mode 100644 index 598eb24a6..000000000 --- a/lib/routes/acg17/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'acg17.com': { - _name: 'ACG17', - '.': [ - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/anime#acg17', - source: ['/post'], - target: '/acg17/post/all', - }, - ], - }, -}; diff --git a/lib/routes/acg17/router.ts b/lib/routes/acg17/router.ts deleted file mode 100644 index 486f5842c..000000000 --- a/lib/routes/acg17/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/post/all', './post'); -}; diff --git a/lib/routes/acpaa/index.ts b/lib/routes/acpaa/index.ts index eec9d8a66..37e141e49 100644 --- a/lib/routes/acpaa/index.ts +++ b/lib/routes/acpaa/index.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:name?', + categories: ['other'], + example: '/acpaa', + parameters: { id: '标签 id,默认为 1,可在对应标签页 URL 中找到', name: '标签名称,默认为重要通知,可在对应标签页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '标签', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { id = '1', name = '重要通知' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -46,7 +65,7 @@ export default async (ctx) => { const author = $('title').text().replaceAll('-', ''); const subtitle = $('span.myTitle').text().trim(); - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -54,5 +73,5 @@ export default async (ctx) => { language: 'zh', subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/acpaa/maintainer.ts b/lib/routes/acpaa/maintainer.ts deleted file mode 100644 index 42deb57de..000000000 --- a/lib/routes/acpaa/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?/:name?': ['nczitzk'], -}; diff --git a/lib/routes/acpaa/namespace.ts b/lib/routes/acpaa/namespace.ts new file mode 100644 index 000000000..5a7db88fa --- /dev/null +++ b/lib/routes/acpaa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中华全国专利代理师协会', + url: 'acpaa.cn', +}; diff --git a/lib/routes/acpaa/radar.ts b/lib/routes/acpaa/radar.ts deleted file mode 100644 index e9cebf32d..000000000 --- a/lib/routes/acpaa/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'acpaa.cn': { - _name: '中华全国专利代理师协会', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/other#zhong-hua-quan-guo-zhuan-li-dai-li-shi-xie-hui', - source: ['/article/taglist.jhtml'], - target: (url) => { - url = new URL(url); - const id = url.searchParams.get('id'); - const name = url.searchParams.get('name'); - - return `/acpaa${id ? `/${id}${name ? `/${name}` : ''}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/acpaa/router.ts b/lib/routes/acpaa/router.ts deleted file mode 100644 index 736d8da35..000000000 --- a/lib/routes/acpaa/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?/:name?', './'); -}; diff --git a/lib/routes/acs/journal.ts b/lib/routes/acs/journal.ts index 2d26b0370..e52f06cc5 100644 --- a/lib/routes/acs/journal.ts +++ b/lib/routes/acs/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,17 @@ import * as path from 'node:path'; import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/journal/:id', + radar: { + source: ['pubs.acs.org/journal/:id', 'pubs.acs.org/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'https://pubs.acs.org'; @@ -70,9 +81,9 @@ export default async (ctx) => { await browser.close(); - ctx.set('data', { + return { title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/acs/maintainer.ts b/lib/routes/acs/maintainer.ts deleted file mode 100644 index 257956556..000000000 --- a/lib/routes/acs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/journal/:id': ['nczitzk'], -}; diff --git a/lib/routes/acs/namespace.ts b/lib/routes/acs/namespace.ts new file mode 100644 index 000000000..5ae767685 --- /dev/null +++ b/lib/routes/acs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'pubs.acs.org', +}; diff --git a/lib/routes/acs/radar.ts b/lib/routes/acs/radar.ts deleted file mode 100644 index 7be715f62..000000000 --- a/lib/routes/acs/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'acs.org': { - _name: 'American Chemistry Society', - pubs: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#american-chemistry-society', - source: ['/journal/:id', '/'], - target: '/acs/journal/:id', - }, - ], - }, -}; diff --git a/lib/routes/acs/router.ts b/lib/routes/acs/router.ts deleted file mode 100644 index 7026d3b4d..000000000 --- a/lib/routes/acs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journal/:id', './journal'); -}; diff --git a/lib/routes/aeaweb/index.ts b/lib/routes/aeaweb/index.ts index c1ea0379d..cf13dbb70 100644 --- a/lib/routes/aeaweb/index.ts +++ b/lib/routes/aeaweb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,33 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['journal'], + example: '/aeaweb/aer', + parameters: { id: 'Journal id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['aeaweb.org/journals/:id', 'aeaweb.org/'], + }, + name: 'Journal', + maintainers: ['nczitzk'], + handler, + description: `The URL of the journal [American Economic Review](https://www.aeaweb.org/journals/aer) is \`https://www.aeaweb.org/journals/aer\`, where \`aer\` is the id of the journal, so the route for this journal is \`/aeaweb/aer\`. + + :::tip + More jounals can be found in [AEA Journals](https://www.aeaweb.org/journals). + :::`, +}; + +async function handler(ctx) { let id = ctx.req.param('id'); const rootUrl = 'https://www.aeaweb.org'; @@ -76,10 +103,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, description, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/aeaweb/maintainer.ts b/lib/routes/aeaweb/maintainer.ts deleted file mode 100644 index 6fcb97f14..000000000 --- a/lib/routes/aeaweb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['nczitzk'], -}; diff --git a/lib/routes/aeaweb/namespace.ts b/lib/routes/aeaweb/namespace.ts new file mode 100644 index 000000000..be041366e --- /dev/null +++ b/lib/routes/aeaweb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'American Economic Association', + url: 'aeaweb.org', +}; diff --git a/lib/routes/aeaweb/radar.ts b/lib/routes/aeaweb/radar.ts deleted file mode 100644 index 127e14d9f..000000000 --- a/lib/routes/aeaweb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'aeaweb.org': { - _name: 'American Economic Association', - '.': [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#american-economic-association-journal', - source: ['/journals/:id', '/'], - target: '/aeaweb/:id', - }, - ], - }, -}; diff --git a/lib/routes/aeaweb/router.ts b/lib/routes/aeaweb/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/aeaweb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/aeon/category.ts b/lib/routes/aeon/category.ts index 913647ec5..d2b147c52 100644 --- a/lib/routes/aeon/category.ts +++ b/lib/routes/aeon/category.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { getData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['new-media'], + example: '/aeon/category/philosophy', + parameters: { category: 'Category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['aeon.aeon.co/:category'], + }, + name: 'Categories', + maintainers: ['emdoe'], + handler, + description: `Supported categories: Philosophy, Science, Psychology, Society, and Culture.`, +}; + +async function handler(ctx) { const url = `https://aeon.co/${ctx.req.param('category')}`; const { data: response } = await got(url); const $ = load(response); @@ -18,10 +41,10 @@ export default async (ctx) => { const items = await getData(ctx, list); - ctx.set('data', { + return { title: `AEON | ${data.props.pageProps.section.title}`, link: url, description: data.props.pageProps.section.metaDescription, item: items, - }); -}; + }; +} diff --git a/lib/routes/aeon/maintainer.ts b/lib/routes/aeon/maintainer.ts deleted file mode 100644 index 649b7d20a..000000000 --- a/lib/routes/aeon/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/category/:category': ['emdoe'], - '/:type': ['emdoe'], -}; diff --git a/lib/routes/aeon/namespace.ts b/lib/routes/aeon/namespace.ts new file mode 100644 index 000000000..7f20c03a8 --- /dev/null +++ b/lib/routes/aeon/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AEON', + url: 'aeon.aeon.co', +}; diff --git a/lib/routes/aeon/radar.ts b/lib/routes/aeon/radar.ts deleted file mode 100644 index 64257e73d..000000000 --- a/lib/routes/aeon/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'aeon.co': { - _name: 'AEON', - aeon: [ - { - title: 'Types (Essays, Videos, or Audio)', - docs: 'https://docs.rsshub.app/routes/new-media##aeon', - source: ['/:type'], - target: '/aeon/:type', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/new-media##aeon', - source: ['/:category'], - target: '/aeon/category/:category', - }, - ], - }, -}; diff --git a/lib/routes/aeon/router.ts b/lib/routes/aeon/router.ts deleted file mode 100644 index 2f9b26e3f..000000000 --- a/lib/routes/aeon/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/category/:category', './category'); - router.get('/:type', './type'); -}; diff --git a/lib/routes/aeon/type.ts b/lib/routes/aeon/type.ts index b2c575901..41c671db4 100644 --- a/lib/routes/aeon/type.ts +++ b/lib/routes/aeon/type.ts @@ -1,8 +1,35 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { getData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:type', + categories: ['new-media'], + example: '/aeon/essays', + parameters: { type: 'Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['aeon.aeon.co/:type'], + }, + name: 'Types', + maintainers: ['emdoe'], + handler, + description: `Supported types: Essays, Videos, and Audio. + + Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top. + + However, The content generated under \`audio\` does not contain links to audio files.`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const binaryType = type === 'videos' ? 'videos' : 'essays'; const capitalizedType = type.charAt(0).toUpperCase() + type.slice(1); @@ -21,9 +48,9 @@ export default async (ctx) => { const items = await getData(ctx, list); - ctx.set('data', { + return { title: `AEON | ${capitalizedType}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/agefans/detail.ts b/lib/routes/agefans/detail.ts index 0fb4d508e..5af964dde 100644 --- a/lib/routes/agefans/detail.ts +++ b/lib/routes/agefans/detail.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/detail/:id', + categories: ['anime'], + example: '/agefans/detail/20200035', + parameters: { id: '番剧 id,对应详情 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agemys.org/detail/:id'], + }, + name: '番剧详情', + maintainers: ['s2marine'], + handler, +}; + +async function handler(ctx) { const response = await got(`${rootUrl}/detail/${ctx.req.param('id')}`); const $ = load(response.data); @@ -22,10 +44,10 @@ export default async (ctx) => { }) .reverse(); - ctx.set('data', { + return { title: `AGE动漫 - ${ldJson.name}`, link: `${rootUrl}/detail/${ctx.req.param('id')}`, description: ldJson.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/agefans/maintainer.ts b/lib/routes/agefans/maintainer.ts deleted file mode 100644 index 62eeee2be..000000000 --- a/lib/routes/agefans/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/detail/:id': ['s2marine'], - '/update': ['nczitzk'], -}; diff --git a/lib/routes/agefans/namespace.ts b/lib/routes/agefans/namespace.ts new file mode 100644 index 000000000..faf0ed192 --- /dev/null +++ b/lib/routes/agefans/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AGE 动漫', + url: 'agemys.cc', +}; diff --git a/lib/routes/agefans/radar.ts b/lib/routes/agefans/radar.ts deleted file mode 100644 index 84395149c..000000000 --- a/lib/routes/agefans/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -const ageFans = { - _name: 'AGE动漫', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/routes/anime#age-dong-man', - source: ['/update', '/'], - target: '/agefans/update', - }, - { - title: '番剧详情', - docs: 'https://docs.rsshub.app/routes/anime#age-dong-man', - source: ['/detail/:id'], - target: '/agefans/detail/:id', - }, - ], -}; - -export default { - 'agemys.cc': ageFans, - 'agemys.org': ageFans, -}; diff --git a/lib/routes/agefans/router.ts b/lib/routes/agefans/router.ts deleted file mode 100644 index 90dcb2b32..000000000 --- a/lib/routes/agefans/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/detail/:id', './detail'); - router.get('/update', './update'); -}; diff --git a/lib/routes/agefans/update.ts b/lib/routes/agefans/update.ts index 2099f4e39..18bdf6c9c 100644 --- a/lib/routes/agefans/update.ts +++ b/lib/routes/agefans/update.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/update', + categories: ['anime'], + example: '/agefans/update', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agemys.org/update', 'agemys.org/'], + }, + name: '最近更新', + maintainers: ['nczitzk'], + handler, + url: 'agemys.org/update', +}; + +async function handler() { const currentUrl = `${rootUrl}/update`; const response = await got(currentUrl); @@ -42,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/agirls/index.ts b/lib/routes/agirls/index.ts index 6447ed91e..45369f0d4 100644 --- a/lib/routes/agirls/index.ts +++ b/lib/routes/agirls/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/agirls/app', + parameters: { category: '分类,默认为最新文章,可在对应主题页的 URL 中找到,下表仅列出部分' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agirls.aotter.net/posts/:category'], + target: '/:category', + }, + name: '分类', + maintainers: ['TonyRL'], + handler, + description: `| App 评测 | 手机开箱 | 笔电开箱 | 3C 周边 | 教学小技巧 | 科技情报 | + | -------- | -------- | -------- | ----------- | ---------- | -------- | + | app | phone | computer | accessories | tutorial | techlife |`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const link = `${baseUrl}/posts${category ? `/${category}` : ''}`; const response = await got(link); @@ -22,11 +48,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseArticle(item)))); - ctx.set('data', { + return { title: $('head title').text().trim(), link, description: $('head meta[name=description]').attr('content'), item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/agirls/maintainer.ts b/lib/routes/agirls/maintainer.ts deleted file mode 100644 index ebe8b6a05..000000000 --- a/lib/routes/agirls/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/topic/:topic': ['TonyRL'], - '/topic_list': ['TonyRL'], - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/agirls/namespace.ts b/lib/routes/agirls/namespace.ts new file mode 100644 index 000000000..339faebbd --- /dev/null +++ b/lib/routes/agirls/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '电獭少女', + url: 'agirls.aotter.net', +}; diff --git a/lib/routes/agirls/radar.ts b/lib/routes/agirls/radar.ts deleted file mode 100644 index 8d840c93f..000000000 --- a/lib/routes/agirls/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'aotter.net': { - _name: '電獺少女', - agirls: [ - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv', - source: ['/posts/:category'], - target: '/agirls/:category', - }, - { - title: '精選主題列表', - docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv', - source: ['/', '/topic'], - target: '/agirls/topic_list', - }, - { - title: '精选主题', - docs: 'https://docs.rsshub.app/routes/new-media#dian-ta-shao-nv', - source: ['/topic/:topic'], - target: '/agirls/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/agirls/router.ts b/lib/routes/agirls/router.ts deleted file mode 100644 index 672901d57..000000000 --- a/lib/routes/agirls/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/topic/:topic', './topic'); - router.get('/topic_list', './topic-list'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/agirls/topic-list.ts b/lib/routes/agirls/topic-list.ts index 7d35b54a7..9da39fa12 100644 --- a/lib/routes/agirls/topic-list.ts +++ b/lib/routes/agirls/topic-list.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic_list', + categories: ['new-media'], + example: '/agirls/topic_list', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agirls.aotter.net/', 'agirls.aotter.net/topic'], + }, + name: '当前精选主题列表', + maintainers: ['TonyRL'], + handler, + url: 'agirls.aotter.net/', +}; + +async function handler() { const category = 'topic'; const link = `${baseUrl}/${category}`; @@ -21,11 +44,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text().trim(), link, description: $('head meta[name=description]').attr('content'), item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/agirls/topic.ts b/lib/routes/agirls/topic.ts index 46d71e8ef..9f62d4c49 100644 --- a/lib/routes/agirls/topic.ts +++ b/lib/routes/agirls/topic.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['new-media'], + example: '/agirls/topic/AppleWatch', + parameters: { topic: '精选主题,可通过下方精选主题列表获得' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agirls.aotter.net/topic/:topic'], + }, + name: '精选主题', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const link = `${baseUrl}/topic/${topic}`; const response = await got(link); @@ -22,11 +44,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseArticle(item)))); - ctx.set('data', { + return { title: $('head title').text().trim(), link, description: ldJson['@graph'][0].description, item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/agora0/index.ts b/lib/routes/agora0/index.ts index 5ca24ae56..1f0b7168e 100644 --- a/lib/routes/agora0/index.ts +++ b/lib/routes/agora0/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/agora0/initium', + parameters: { category: '分类,见下表,默认为 initium,即端传媒' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agora0.gitlab.io/blog/:category', 'agora0.gitlab.io/'], + target: '/:category', + }, + name: '零博客', + maintainers: ['nczitzk'], + handler, + description: `| muitinⒾ | aidemnⒾ | srettaⓂ | qⓅ | sucoⓋ | + | ------- | ------- | -------- | -- | ----- | + | initium | inmedia | matters | pq | vocus |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'initium'; const rootUrl = 'https://agora0.gitlab.io'; @@ -47,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/agora0/maintainer.ts b/lib/routes/agora0/maintainer.ts deleted file mode 100644 index 45c8f71d3..000000000 --- a/lib/routes/agora0/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/pen0': ['TonyRL'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/agora0/namespace.ts b/lib/routes/agora0/namespace.ts new file mode 100644 index 000000000..51fe8e88b --- /dev/null +++ b/lib/routes/agora0/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AG⓪RA', + url: 'agorahub.github.io', +}; diff --git a/lib/routes/agora0/pen0.ts b/lib/routes/agora0/pen0.ts index 3f0ce2e94..4e6cb2ada 100644 --- a/lib/routes/agora0/pen0.ts +++ b/lib/routes/agora0/pen0.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/pen0', + categories: ['new-media'], + example: '/agora0/pen0', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['agorahub.github.io/pen0'], + }, + name: '共和報', + maintainers: ['TonyRL'], + handler, + url: 'agorahub.github.io/pen0', +}; + +async function handler() { const baseUrl = 'https://agorahub.github.io'; const response = await got(`${baseUrl}/pen0/`); const $ = load(response.data); @@ -34,11 +57,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link: response.url, image: $('link[rel="apple-touch-icon"]').attr('href'), item: items, - }); -}; + }; +} diff --git a/lib/routes/agora0/radar.ts b/lib/routes/agora0/radar.ts deleted file mode 100644 index e1dcfd41b..000000000 --- a/lib/routes/agora0/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'github.io': { - _name: 'GitHub', - agorahub: [ - { - title: '共和報', - docs: 'https://docs.rsshub.app/routes/new-media#ag0ra', - source: ['/pen0'], - target: '/agora0/pen0', - }, - ], - }, - 'gitlab.io': { - _name: 'GitLab', - agora0: [ - { - title: '零博客', - docs: 'https://docs.rsshub.app/routes/new-media#ag0ra', - source: ['/blog/:category', '/'], - target: '/agora0/:category', - }, - ], - }, -}; diff --git a/lib/routes/agora0/router.ts b/lib/routes/agora0/router.ts deleted file mode 100644 index 1dbe8bd1b..000000000 --- a/lib/routes/agora0/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/pen0', './pen0'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/ahjzu/maintainer.ts b/lib/routes/ahjzu/maintainer.ts deleted file mode 100644 index 4f233a7cf..000000000 --- a/lib/routes/ahjzu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['Yuk-0v0'], -}; diff --git a/lib/routes/ahjzu/namespace.ts b/lib/routes/ahjzu/namespace.ts new file mode 100644 index 000000000..2efc11070 --- /dev/null +++ b/lib/routes/ahjzu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '安徽建筑大学', + url: 'news.ahjzu.edu.cn', +}; diff --git a/lib/routes/ahjzu/news.ts b/lib/routes/ahjzu/news.ts index f04646f89..18b3ea4e9 100644 --- a/lib/routes/ahjzu/news.ts +++ b/lib/routes/ahjzu/news.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['university'], + example: '/ahjzu/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.ahjzu.edu.cn/20/list.htm'], + }, + name: '通知公告', + maintainers: ['Yuk-0v0'], + handler, + url: 'news.ahjzu.edu.cn/20/list.htm', +}; + +async function handler() { const rootUrl = 'https://www.ahjzu.edu.cn'; const currentUrl = 'https://www.ahjzu.edu.cn/20/list.htm'; @@ -49,10 +72,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '安建大-通知公告', description: '安徽建筑大学-通知公告', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ahjzu/radar.ts b/lib/routes/ahjzu/radar.ts deleted file mode 100644 index 916550713..000000000 --- a/lib/routes/ahjzu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ahjzu.edu.cn': { - _name: '安徽建筑大学', - news: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#an-hui-jian-zhu-da-xue', - source: '/20/list.htm', - target: '/ahjzu/news', - }, - ], - }, -}; diff --git a/lib/routes/ahjzu/router.ts b/lib/routes/ahjzu/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/ahjzu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/aicaijing/index.ts b/lib/routes/aicaijing/index.ts index c437003e2..6c7e7519d 100644 --- a/lib/routes/aicaijing/index.ts +++ b/lib/routes/aicaijing/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:id?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'latest'; const id = ctx.req.param('id') ?? 14; @@ -68,9 +76,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `AI 财经社 - ${categories[category].title}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/aicaijing/maintainer.ts b/lib/routes/aicaijing/maintainer.ts deleted file mode 100644 index d3f85452e..000000000 --- a/lib/routes/aicaijing/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cover': ['nczitzk'], - '/information/:id?': ['nczitzk'], - '/latest': ['nczitzk'], - '/recommend': ['nczitzk'], -}; diff --git a/lib/routes/aicaijing/namespace.ts b/lib/routes/aicaijing/namespace.ts new file mode 100644 index 000000000..f338f73bd --- /dev/null +++ b/lib/routes/aicaijing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AI 财经社', + url: 'www.aicaijing.com', +}; diff --git a/lib/routes/aicaijing/radar.ts b/lib/routes/aicaijing/radar.ts deleted file mode 100644 index effcef1e8..000000000 --- a/lib/routes/aicaijing/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'aicaijing.com': { - _name: 'AI 财经社', - www: [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/finance#ai-cai-jing-she-zui-xin-wen-zhang', - source: ['/'], - target: '/aicaijing/latest', - }, - { - title: '封面文章', - docs: 'https://docs.rsshub.app/routes/finance#ai-cai-jing-she-feng-mian-wen-zhang', - source: ['/'], - target: '/aicaijing/cover', - }, - { - title: '推荐资讯', - docs: 'https://docs.rsshub.app/routes/finance#ai-cai-jing-she-tui-jian-zi-xun', - source: ['/'], - target: '/aicaijing/recommend', - }, - { - title: '热点 & 深度', - docs: 'https://docs.rsshub.app/routes/finance#ai-cai-jing-she-re-dian-shen-du', - source: ['/information/:id', '/'], - target: '/aicaijing/information/:id?', - }, - ], - }, -}; diff --git a/lib/routes/aicaijing/router.ts b/lib/routes/aicaijing/router.ts deleted file mode 100644 index 611f80b11..000000000 --- a/lib/routes/aicaijing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:id?', './'); -}; diff --git a/lib/routes/aiea/index.ts b/lib/routes/aiea/index.ts index 3a2c15779..b166cdc5a 100644 --- a/lib/routes/aiea/index.ts +++ b/lib/routes/aiea/index.ts @@ -1,6 +1,30 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/seminars/:period', + categories: ['study'], + example: '/aiea/seminars/upcoming', + parameters: { period: 'Time frame' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Seminar Series', + maintainers: ['zxx-457'], + handler, + description: `| Time frame | + | ---------- | + | upcoming | + | past | + | both |`, +}; + +async function handler(ctx) { const link = 'http://www.aiea.org/0504'; const period = ctx.req.param('period') ?? ''; @@ -39,4 +63,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/aiea/maintainer.ts b/lib/routes/aiea/maintainer.ts deleted file mode 100644 index 8715c2853..000000000 --- a/lib/routes/aiea/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/seminars/:period': ['zxx-457'], -}; diff --git a/lib/routes/aiea/namespace.ts b/lib/routes/aiea/namespace.ts new file mode 100644 index 000000000..affb227c1 --- /dev/null +++ b/lib/routes/aiea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Asian Innovation and Entrepreneurship Association', + url: 'www.aiea.org', +}; diff --git a/lib/routes/aiea/radar.ts b/lib/routes/aiea/radar.ts deleted file mode 100644 index 33be5477f..000000000 --- a/lib/routes/aiea/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'aiea.org': { - _name: 'Asian Innovation and Entrepreneurship Association', - www: [ - { - title: 'Seminar Series', - docs: 'https://docs.rsshub.app/routes/study#AIEA-Seminar-Series', - source: ['/0504', '/'], - target: '/aiea/seminars/upcoming', - }, - ], - }, -}; diff --git a/lib/routes/aiea/router.ts b/lib/routes/aiea/router.ts deleted file mode 100644 index 56f7ab431..000000000 --- a/lib/routes/aiea/router.ts +++ /dev/null @@ -1 +0,0 @@ -export default (router) => router.get('/seminars/:period', '.'); diff --git a/lib/routes/aijishu/index.ts b/lib/routes/aijishu/index.ts index bd0e989f6..bb2f26110 100644 --- a/lib/routes/aijishu/index.ts +++ b/lib/routes/aijishu/index.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:type/:name?', + categories: ['programming'], + example: '/aijishu/channel/ai', + parameters: { type: '文章类型,可以取值如下', name: '名字,取自URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道、专栏、用户', + maintainers: [], + handler, + description: `| type | 说明 | + | ------- | ---- | + | channel | 频道 | + | blog | 专栏 | + | u | 用户 |`, +}; + +async function handler(ctx) { const { type, name = 'newest' } = ctx.req.param(); const u = name === 'newest' ? `https://aijishu.com/` : `https://aijishu.com/${type}/${name}`; const html = await got(u); @@ -18,9 +42,9 @@ export default async (ctx) => { const items = await Promise.all(list.filter((item) => item?.url?.startsWith('/a/') || item?.object?.url.startsWith('/a/')).map((item) => utils.parseArticle(item))); - ctx.set('data', { + return { title: title.split(' - ').slice(0, 2).join(' - '), link: u, item: items, - }); -}; + }; +} diff --git a/lib/routes/aijishu/maintainer.ts b/lib/routes/aijishu/maintainer.ts deleted file mode 100644 index b144b1739..000000000 --- a/lib/routes/aijishu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/blog/:name': ['bigfei'], - '/channel/:name': ['bigfei'], - '/u/:name': ['bigfei'], -}; diff --git a/lib/routes/aijishu/namespace.ts b/lib/routes/aijishu/namespace.ts new file mode 100644 index 000000000..971883a85 --- /dev/null +++ b/lib/routes/aijishu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '极术社区', + url: 'www.aijishu', +}; diff --git a/lib/routes/aijishu/radar.ts b/lib/routes/aijishu/radar.ts deleted file mode 100644 index ac77bc99b..000000000 --- a/lib/routes/aijishu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - aijishu: { - _name: '极术社区', - www: [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/programming#ji-shu-she-qu', - source: ['/channel/:name'], - target: '/aijishu/channel/:name', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/programming#ji-shu-she-qu', - source: ['/u/:name'], - target: '/aijishu/u/:name', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/programming#ji-shu-she-qu', - source: ['/blog/:name'], - target: '/aijishu/blog/:name', - }, - ], - }, -}; diff --git a/lib/routes/aijishu/router.ts b/lib/routes/aijishu/router.ts deleted file mode 100644 index 6fa12feeb..000000000 --- a/lib/routes/aijishu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type/:name?', '.'); -}; diff --git a/lib/routes/ainvest/article.ts b/lib/routes/ainvest/article.ts index 9c13fc101..2853f79f1 100644 --- a/lib/routes/ainvest/article.ts +++ b/lib/routes/ainvest/article.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { getHeaders, randomString, encryptAES, decryptAES } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/article', + categories: ['finance'], + example: '/ainvest/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ainvest.com/news'], + }, + name: 'Latest Article', + maintainers: ['TonyRL'], + handler, + url: 'ainvest.com/news', +}; + +async function handler(ctx) { const key = randomString(16); const { data: response } = await got.post('https://api.ainvest.com/gw/socialcenter/v1/edu/article/listArticle', { @@ -33,10 +56,10 @@ export default async (ctx) => { category: [item.nickName, ...item.tags.map((tag) => tag.code)], })); - ctx.set('data', { + return { title: 'AInvest - Latest Articles', link: 'https://www.ainvest.com/news', language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/ainvest/maintainer.ts b/lib/routes/ainvest/maintainer.ts deleted file mode 100644 index 948ad436d..000000000 --- a/lib/routes/ainvest/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/article': ['TonyRL'], - '/news': ['TonyRL'], -}; diff --git a/lib/routes/ainvest/namespace.ts b/lib/routes/ainvest/namespace.ts new file mode 100644 index 000000000..e220878f4 --- /dev/null +++ b/lib/routes/ainvest/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AInvest', + url: 'ainvest.com', +}; diff --git a/lib/routes/ainvest/news.ts b/lib/routes/ainvest/news.ts index 41bbcbd44..1cf829e33 100644 --- a/lib/routes/ainvest/news.ts +++ b/lib/routes/ainvest/news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { getHeaders, randomString, decryptAES } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['finance'], + example: '/ainvest/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ainvest.com/news'], + }, + name: 'Latest News', + maintainers: ['TonyRL'], + handler, + url: 'ainvest.com/news', +}; + +async function handler(ctx) { const key = randomString(16); const { data: response } = await got('https://api.ainvest.com/gw/news_f10/v1/newsFlash/getNewsData', { @@ -30,10 +53,10 @@ export default async (ctx) => { comments: item.commentCount, })); - ctx.set('data', { + return { title: 'AInvest - Latest News', link: 'https://www.ainvest.com/news', language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/ainvest/radar.ts b/lib/routes/ainvest/radar.ts deleted file mode 100644 index 4eea26daf..000000000 --- a/lib/routes/ainvest/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'ainvest.com': { - _name: 'AInvest', - '.': [ - { - title: 'Latest Article', - docs: 'https://docs.rsshub.app/routes/finance#ainvest', - source: ['/news'], - target: '/ainvest/article', - }, - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/finance#ainvest', - source: ['/news'], - target: '/ainvest/news', - }, - ], - }, -}; diff --git a/lib/routes/ainvest/router.ts b/lib/routes/ainvest/router.ts deleted file mode 100644 index be8a3e99f..000000000 --- a/lib/routes/ainvest/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/article', './article'); - router.get('/news', './news'); -}; diff --git a/lib/routes/aip/journal-pupp.ts b/lib/routes/aip/journal-pupp.ts index b9f578d45..aca60597b 100644 --- a/lib/routes/aip/journal-pupp.ts +++ b/lib/routes/aip/journal-pupp.ts @@ -51,10 +51,10 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: list, allowEmpty: true, - }); + }; }; diff --git a/lib/routes/aip/journal.ts b/lib/routes/aip/journal.ts index 04e1d2598..591754ab2 100644 --- a/lib/routes/aip/journal.ts +++ b/lib/routes/aip/journal.ts @@ -1,8 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { renderDesc } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:pub/:jrn', + categories: ['journal'], + example: '/aip/aapt/ajp', + parameters: { pub: 'Publisher id', jrn: 'Journal id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['pubs.aip.org/:pub/:jrn'], + }, + name: 'Journal', + maintainers: ['Derekmini', 'auto-bot-ty'], + handler, + description: `Refer to the URL format \`pubs.aip.org/:pub/:jrn\` + + :::tip + More jounals can be found in [AIP Publications](https://publishing.aip.org/publications/find-the-right-journal). + :::`, +}; + +async function handler(ctx) { const pub = ctx.req.param('pub'); const jrn = ctx.req.param('jrn'); const host = `https://pubs.aip.org`; @@ -46,10 +73,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: list, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/aip/maintainer.ts b/lib/routes/aip/maintainer.ts deleted file mode 100644 index e505464b9..000000000 --- a/lib/routes/aip/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:pub/:jrn': ['Derekmini', 'auto-bot-ty'], -}; diff --git a/lib/routes/aip/namespace.ts b/lib/routes/aip/namespace.ts new file mode 100644 index 000000000..df63b4269 --- /dev/null +++ b/lib/routes/aip/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'American Institute of Physics', + url: 'pubs.aip.org', +}; diff --git a/lib/routes/aip/radar.ts b/lib/routes/aip/radar.ts deleted file mode 100644 index b93afade0..000000000 --- a/lib/routes/aip/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'aip.org': { - _name: 'American Institute of Physics', - pubs: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#american-institute-of-physics', - source: '/:pub/:jrn', - target: '/aip/:pub/:jrn', - }, - ], - }, -}; diff --git a/lib/routes/aip/router.ts b/lib/routes/aip/router.ts deleted file mode 100644 index b3ad0e5bf..000000000 --- a/lib/routes/aip/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:pub/:jrn', './journal'); - // router.get('/:pub/:jrn', './journal-pupp'); // Switch to this route if the official website blocks the "got" method. -}; diff --git a/lib/routes/airchina/index.ts b/lib/routes/airchina/index.ts index a019b490c..21d874846 100644 --- a/lib/routes/airchina/index.ts +++ b/lib/routes/airchina/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import buildData from '@/utils/common-config'; const baseUrl = 'https://www.airchina.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/announcement', + categories: ['travel'], + example: '/airchina/announcement', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.airchina.com.cn/'], + }, + name: '服务公告', + maintainers: ['LandonLi'], + handler, + url: 'www.airchina.com.cn/', +}; + +async function handler(ctx) { const link = `${baseUrl}/cn/info/new-service/service_announcement.shtml`; const data = await buildData({ link, @@ -36,4 +59,4 @@ export default async (ctx) => { ); ctx.set('data', data); -}; +} diff --git a/lib/routes/airchina/maintainer.ts b/lib/routes/airchina/maintainer.ts deleted file mode 100644 index 4b4896695..000000000 --- a/lib/routes/airchina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/announcement': ['LandonLi'], -}; diff --git a/lib/routes/airchina/namespace.ts b/lib/routes/airchina/namespace.ts new file mode 100644 index 000000000..37331fbb2 --- /dev/null +++ b/lib/routes/airchina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国国际航空公司', + url: 'www.airchina.com.cn', +}; diff --git a/lib/routes/airchina/radar.ts b/lib/routes/airchina/radar.ts deleted file mode 100644 index 9534a9379..000000000 --- a/lib/routes/airchina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'airchina.com.cn': { - _name: '中国国际航空公司', - www: [ - { - title: '服务公告', - docs: 'https://docs.rsshub.app/routes/travel#zhong-guo-guo-ji-hang-kong-gong-si', - source: '/', - target: '/airchina/announcement', - }, - ], - }, -}; diff --git a/lib/routes/airchina/router.ts b/lib/routes/airchina/router.ts deleted file mode 100644 index 677dfd592..000000000 --- a/lib/routes/airchina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/announcement', './index'); -}; diff --git a/lib/routes/aisixiang/column.ts b/lib/routes/aisixiang/column.ts index 4e799f7dc..409cd2928 100644 --- a/lib/routes/aisixiang/column.ts +++ b/lib/routes/aisixiang/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,25 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, ossUrl, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['reading'], + example: '/aisixiang/column/722', + parameters: { id: '栏目 ID, 可在对应栏目 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['HenryQW', 'nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -34,7 +53,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { item: await ProcessFeed(limit, cache.tryGet, items), title: `爱思想 - ${title}`, link: currentUrl, @@ -42,5 +61,5 @@ export default async (ctx) => { language: 'zh-cn', image: new URL('images/logo.jpg', ossUrl).href, subtitle: title, - }); -}; + }; +} diff --git a/lib/routes/aisixiang/maintainer.ts b/lib/routes/aisixiang/maintainer.ts deleted file mode 100644 index 8c7f9293e..000000000 --- a/lib/routes/aisixiang/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/column/:id': ['HenryQW', 'nczitzk'], - '/ranking/:id?/:period?': ['HenryQW', 'nczitzk'], - '/toplist/:id?/:period?': ['nczitzk'], - '/thinktank/:id/:type?': ['hoilc', 'nczitzk'], - '/zhuanti/:id': ['nczitzk'], -}; diff --git a/lib/routes/aisixiang/namespace.ts b/lib/routes/aisixiang/namespace.ts new file mode 100644 index 000000000..c74ac9965 --- /dev/null +++ b/lib/routes/aisixiang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '爱思想', + url: 'aisixiang.com', +}; diff --git a/lib/routes/aisixiang/radar.ts b/lib/routes/aisixiang/radar.ts deleted file mode 100644 index 4cdea7265..000000000 --- a/lib/routes/aisixiang/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'aisixiang.com': { - _name: '爱思想', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/reading#ai-si-xiang', - source: ['/data/search', '/'], - target: (params, url) => `/aisixiang/column/${new URL(url).searchParams.get('column')}`, - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/reading#ai-si-xiang', - source: ['/zhuanti', '/'], - target: (params, url) => `/aisixiang/zhuanti/${new URL(url).href.match(/\/zhuanti\/(.*?)\.html/)[1]}`, - }, - { - title: '排行', - docs: 'https://docs.rsshub.app/routes/reading#ai-si-xiang', - source: ['/toplist', '/'], - target: (params, url) => { - const id = new URL(url).searchParams.get('id'); - const period = new URL(url).searchParams.get('period'); - return `/aisixiang/toplist${id ? `/${id}${(id === '1' || !id) && period ? `/${period}` : ''}` : ''}`; - }, - }, - { - title: '思想库(专栏)', - docs: 'https://docs.rsshub.app/routes/reading#ai-si-xiang', - source: ['/thinktank', '/'], - target: (params, url) => `/aisixiang/thinktank/${new URL(url).href.match(/thinktank\/(.*)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/aisixiang/router.ts b/lib/routes/aisixiang/router.ts deleted file mode 100644 index 868acffb2..000000000 --- a/lib/routes/aisixiang/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/column/:id', './column'); - router.get('/ranking/:id?/:period?', './toplist'); - router.get('/toplist/:id?/:period?', './toplist'); - router.get('/thinktank/:id/:type?', './thinktank'); - router.get('/zhuanti/:id', './zhuanti'); -}; diff --git a/lib/routes/aisixiang/thinktank.ts b/lib/routes/aisixiang/thinktank.ts index c9a5882c1..861d0a8d3 100644 --- a/lib/routes/aisixiang/thinktank.ts +++ b/lib/routes/aisixiang/thinktank.ts @@ -1,10 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, ossUrl, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/thinktank/:id/:type?', + categories: ['reading'], + example: '/aisixiang/thinktank/WuQine/论文', + parameters: { id: '专栏 ID,一般为作者拼音,可在URL中找到', type: '栏目类型,参考下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '思想库(专栏)', + maintainers: ['hoilc', 'nczitzk'], + handler, + description: `| 论文 | 时评 | 随笔 | 演讲 | 访谈 | 著作 | 读书 | 史论 | 译作 | 诗歌 | 书信 | 科学 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, +}; + +async function handler(ctx) { const { id, type = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -38,7 +59,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { item: await ProcessFeed(limit, cache.tryGet, items), title: `爱思想 - ${title}`, link: currentUrl, @@ -46,5 +67,5 @@ export default async (ctx) => { language: 'zh-cn', image: new URL('images/logo_thinktank.jpg', ossUrl).href, subtitle: title, - }); -}; + }; +} diff --git a/lib/routes/aisixiang/toplist.ts b/lib/routes/aisixiang/toplist.ts index 1232d778f..77b123db8 100644 --- a/lib/routes/aisixiang/toplist.ts +++ b/lib/routes/aisixiang/toplist.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,17 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, ossUrl, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/ranking/:id?/:period?', '/toplist/:id?/:period?'], + name: 'Unknown', + maintainers: ['HenryQW', 'nczitzk'], + handler, + description: `| 文章点击排行 | 最近更新文章 | 文章推荐排行 | + | ------------ | ------------ | ------------ | + | 1 | 10 | 11 |`, +}; + +async function handler(ctx) { const { id = '1', period = '1' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -33,12 +44,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { item: await ProcessFeed(limit, cache.tryGet, items), title: `爱思想 - ${title}`, link: currentUrl, language: 'zh-cn', image: new URL('images/logo_toplist.jpg', ossUrl).href, subtitle: title, - }); -}; + }; +} diff --git a/lib/routes/aisixiang/zhuanti.ts b/lib/routes/aisixiang/zhuanti.ts index bf992209a..4dd4c21cb 100644 --- a/lib/routes/aisixiang/zhuanti.ts +++ b/lib/routes/aisixiang/zhuanti.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, ossUrl, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/zhuanti/:id', + categories: ['reading'], + example: '/aisixiang/zhuanti/211', + parameters: { id: '专题 ID, 可在对应专题 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专题', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 更多专题请见 [关键词](http://www.aisixiang.com/zhuanti/) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -34,7 +56,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { item: await ProcessFeed(limit, cache.tryGet, items), title: `爱思想 - ${title}`, link: currentUrl, @@ -42,5 +64,5 @@ export default async (ctx) => { language: 'zh-cn', image: new URL('images/logo_zhuanti.jpg', ossUrl).href, subtitle: title, - }); -}; + }; +} diff --git a/lib/routes/ajmide/index.ts b/lib/routes/ajmide/index.ts index 6ab15dd41..6c24803c7 100644 --- a/lib/routes/ajmide/index.ts +++ b/lib/routes/ajmide/index.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['multimedia'], + example: '/ajmide/10603594', + parameters: { id: '播客 id,可以从播客页面 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '播客', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.param('limit') ?? 25; const playListAPI = `https://a.ajmide.com/v3/getBrandContentList.php?brandId=${id}&c=${limit}&i=0`; @@ -19,11 +38,11 @@ export default async (ctx) => { enclosure_type: 'audio/x-m4a', })); - ctx.set('data', { + return { title: data[0].brandName, link: `https://m.ajmide.com/m/brand?id=${id}`, itunes_author: data[0].author_info.nick, image: data[0].brandImgPath, item: items, - }); -}; + }; +} diff --git a/lib/routes/ajmide/maintainer.ts b/lib/routes/ajmide/maintainer.ts deleted file mode 100644 index 3b397ce82..000000000 --- a/lib/routes/ajmide/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['Fatpandac'], -}; diff --git a/lib/routes/ajmide/namespace.ts b/lib/routes/ajmide/namespace.ts new file mode 100644 index 000000000..1ec1cd921 --- /dev/null +++ b/lib/routes/ajmide/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '阿基米德 FM', + url: 'm.ajmide.com', +}; diff --git a/lib/routes/ajmide/radar.ts b/lib/routes/ajmide/radar.ts deleted file mode 100644 index 16e015cd9..000000000 --- a/lib/routes/ajmide/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'ajmide.com': { - _name: '阿基米德FM', - m: [ - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/multimedia#a-ji-mi-de-fm-bo-ke', - source: ['/m/brand'], - target: (_, url) => { - const id = new URL(url).searchParams.get('id'); - return `/ajmide/${id}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/ajmide/router.ts b/lib/routes/ajmide/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/ajmide/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/aliresearch/information.ts b/lib/routes/aliresearch/information.ts index 38670d543..46b103e5c 100644 --- a/lib/routes/aliresearch/information.ts +++ b/lib/routes/aliresearch/information.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/information/:type?', + categories: ['new-media'], + example: '/aliresearch/information', + parameters: { type: '类型,见下表,默认为新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['aliresearch.com/cn/information', 'aliresearch.com/'], + target: '/information', + }, + name: '资讯', + maintainers: ['nczitzk'], + handler, + url: 'aliresearch.com/cn/information', + description: `| 新闻 | 观点 | 案例 | + | ---- | ---- | ---- |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? '新闻'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -50,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `阿里研究院 - ${type}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/aliresearch/maintainer.ts b/lib/routes/aliresearch/maintainer.ts deleted file mode 100644 index 64a73339b..000000000 --- a/lib/routes/aliresearch/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/information/:type?': ['nczitzk'], -}; diff --git a/lib/routes/aliresearch/namespace.ts b/lib/routes/aliresearch/namespace.ts new file mode 100644 index 000000000..94b92cc69 --- /dev/null +++ b/lib/routes/aliresearch/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '阿里研究院', + url: 'aliresearch.com', +}; diff --git a/lib/routes/aliresearch/radar.ts b/lib/routes/aliresearch/radar.ts deleted file mode 100644 index 00e940250..000000000 --- a/lib/routes/aliresearch/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'aliresearch.com': { - _name: '阿里研究院', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#a-li-yan-jiu-yuan', - source: ['/cn/information', '/'], - target: '/aliresearch/information', - }, - ], - }, -}; diff --git a/lib/routes/aliresearch/router.ts b/lib/routes/aliresearch/router.ts deleted file mode 100644 index 81356dd42..000000000 --- a/lib/routes/aliresearch/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/information/:type?', './information'); -}; diff --git a/lib/routes/alistapart/index.ts b/lib/routes/alistapart/index.ts index d9b6a6ef3..6c1f3d935 100644 --- a/lib/routes/alistapart/index.ts +++ b/lib/routes/alistapart/index.ts @@ -1,13 +1,26 @@ +import { Route } from '@/types'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['alistapart.com/articles/'], + target: '', + }, + name: 'Unknown', + maintainers: ['Rjnishant530'], + handler, + url: 'alistapart.com/articles/', +}; + +async function handler() { const baseUrl = 'https://alistapart.com'; const route = '/wp-json/wp/v2/article?_embed'; const data = await getData(`${baseUrl}${route}`); const items = await getList(data); - ctx.set('data', { + return { title: 'A List Apart', link: `${baseUrl}/articles`, item: items, @@ -15,5 +28,5 @@ export default async (ctx) => { logo: 'https://i0.wp.com/alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg?fit=192,192&ssl=1', icon: 'https://i0.wp.com/alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg?fit=32,32&ssl=1', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/alistapart/maintainer.ts b/lib/routes/alistapart/maintainer.ts deleted file mode 100644 index cb79c0882..000000000 --- a/lib/routes/alistapart/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['Rjnishant530'], - '/:topic': ['Rjnishant530'], -}; diff --git a/lib/routes/alistapart/namespace.ts b/lib/routes/alistapart/namespace.ts new file mode 100644 index 000000000..99712be45 --- /dev/null +++ b/lib/routes/alistapart/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'A List Apart', + url: 'alistapart.com', +}; diff --git a/lib/routes/alistapart/radar.ts b/lib/routes/alistapart/radar.ts deleted file mode 100644 index 4a8738c87..000000000 --- a/lib/routes/alistapart/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'alistapart.com': { - _name: 'A List Apart', - '.': [ - { - title: 'Articles', - docs: 'https://docs.rsshub.app/routes/programming#a-list-apart', - source: ['/articles/'], - target: '/alistapart', - }, - { - title: 'Topics', - docs: 'https://docs.rsshub.app/routes/programming#a-list-apart', - source: ['/blog/topic/:topic'], - target: '/alistapart/:topic', - }, - ], - }, -}; diff --git a/lib/routes/alistapart/router.ts b/lib/routes/alistapart/router.ts deleted file mode 100644 index 38d40b361..000000000 --- a/lib/routes/alistapart/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/:topic', './topic'); -}; diff --git a/lib/routes/alistapart/topic.ts b/lib/routes/alistapart/topic.ts index 58fc2ccdf..0d29986ae 100644 --- a/lib/routes/alistapart/topic.ts +++ b/lib/routes/alistapart/topic.ts @@ -1,6 +1,76 @@ +import { Route } from '@/types'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:topic', + categories: ['programming'], + example: '/alistapart/application-development', + parameters: { topic: 'Any Topic or from the table below. Defaults to All Articles' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['alistapart.com/blog/topic/:topic'], + }, + name: 'Topics', + maintainers: ['Rjnishant530'], + handler, + url: 'alistapart.com/articles/', + description: `You have the option to utilize the main heading or use individual categories as topics for the path. + + | **Code** | *code* | + | --------------------------- | ------------------------- | + | **Application Development** | *application-development* | + | **Browsers** | *browsers* | + | **CSS** | *css* | + | **HTML** | *html* | + | **JavaScript** | *javascript* | + | **The Server Side** | *the-server-side* | + + | **Content** | *content* | + | -------------------- | ------------------ | + | **Community** | *community* | + | **Content Strategy** | *content-strategy* | + | **Writing** | *writing* | + + | **Design** | *design* | + | -------------------------- | ---------------------- | + | **Brand Identity** | *brand-identity* | + | **Graphic Design** | *graphic-design* | + | **Layout & Grids** | *layout-grids* | + | **Mobile/Multidevice** | *mobile-multidevice* | + | **Responsive Design** | *responsive-design* | + | **Typography & Web Fonts** | *typography-web-fonts* | + + | **Industry & Business** | *industry-business* | + | ----------------------- | ------------------- | + | **Business** | *business* | + | **Career** | *career* | + | **Industry** | *industry* | + | **State of the Web** | *state-of-the-web* | + + | **Process** | *process* | + | ---------------------- | -------------------- | + | **Creativity** | *creativity* | + | **Project Management** | *project-management* | + | **Web Strategy** | *web-strategy* | + | **Workflow & Tools** | *workflow-tools* | + + | **User Experience** | *user-experience* | + | ---------------------------- | -------------------------- | + | **Accessibility** | *accessibility* | + | **Information Architecture** | *information-architecture* | + | **Interaction Design** | *interaction-design* | + | **Usability** | *usability* | + | **User Research** | *user-research* |`, +}; + +async function handler(ctx) { const baseUrl = 'https://alistapart.com'; const searchRoute = '/wp-json/wp/v2/categories?slug='; const articleRoute = '/wp-json/wp/v2/article?categories='; @@ -9,7 +79,7 @@ export default async (ctx) => { const data = await getData(`${baseUrl}${articleRoute}${id}&_embed`); const items = await getList(data); - ctx.set('data', { + return { title: 'A List Apart', link: `${baseUrl}/blog/topic/${topic}`, item: items, @@ -17,5 +87,5 @@ export default async (ctx) => { logo: 'https://i0.wp.com/alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg?fit=192,192&ssl=1', icon: 'https://i0.wp.com/alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg?fit=32,32&ssl=1', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/aliyun/database-month.ts b/lib/routes/aliyun/database-month.ts index bc407336e..71c5aa76d 100644 --- a/lib/routes/aliyun/database-month.ts +++ b/lib/routes/aliyun/database-month.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/database_month', + categories: ['programming'], + example: '/aliyun/database_month', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mysql.taobao.org/monthly', 'mysql.taobao.org/'], + }, + name: '数据库内核月报', + maintainers: ['junbaor'], + handler, + url: 'mysql.taobao.org/monthly', +}; + +async function handler() { const url = 'http://mysql.taobao.org/monthly/'; const response = await got({ method: 'get', url }); const $ = load(response.data); @@ -33,9 +56,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: result.reverse(), - }); -}; + }; +} diff --git a/lib/routes/aliyun/developer/group.ts b/lib/routes/aliyun/developer/group.ts index 74cb5a150..878f0b59b 100644 --- a/lib/routes/aliyun/developer/group.ts +++ b/lib/routes/aliyun/developer/group.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/developer/group/:type', + categories: ['programming'], + example: '/aliyun/developer/group/alitech', + parameters: { type: '对应技术领域分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['developer.aliyun.com/group/:type'], + }, + name: '开发者社区 - 主题', + maintainers: ['umm233'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const link = `https://developer.aliyun.com/group/${type}`; @@ -26,7 +48,7 @@ export default async (ctx) => { const desc = $('div[class="header-information"]').find('span').last().text().trim(); const list = $('ul[class^="content-tab-list"] > li'); - ctx.set('data', { + return { title: `阿里云开发者社区-${title}`, link, description: desc, @@ -45,5 +67,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/aliyun/maintainer.ts b/lib/routes/aliyun/maintainer.ts deleted file mode 100644 index c172023fe..000000000 --- a/lib/routes/aliyun/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/database_month': ['junbaor'], - '/developer/group/:type': ['umm233'], - '/notice/:type?': ['muzea'], -}; diff --git a/lib/routes/aliyun/namespace.ts b/lib/routes/aliyun/namespace.ts new file mode 100644 index 000000000..076801732 --- /dev/null +++ b/lib/routes/aliyun/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '阿里云', + url: 'developer.aliyun.com', +}; diff --git a/lib/routes/aliyun/notice.ts b/lib/routes/aliyun/notice.ts index 73a8fdaa6..d897de5b1 100644 --- a/lib/routes/aliyun/notice.ts +++ b/lib/routes/aliyun/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,32 @@ const typeMap = { * * @param ctx {import('koa').Context} */ -export default async (ctx) => { +export const route: Route = { + path: '/notice/:type?', + categories: ['programming'], + example: '/aliyun/notice', + parameters: { type: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公告', + maintainers: ['muzea'], + handler, + description: `| 类型 | type | + | -------- | ---- | + | 全部 | | + | 升级公告 | 1 | + | 安全公告 | 2 | + | 备案公告 | 3 | + | 其他 | 4 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `https://help.aliyun.com/noticelist/${typeMap[type] || typeMap[0]}.html`; const response = await got({ method: 'get', url }); @@ -49,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text().trim(), link: url, item: result, - }); -}; + }; +} diff --git a/lib/routes/aliyun/radar.ts b/lib/routes/aliyun/radar.ts deleted file mode 100644 index 381192566..000000000 --- a/lib/routes/aliyun/radar.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default { - 'aliyun.com': { - _name: '阿里云', - developer: [ - { - title: '开发者社区 - 主题', - docs: 'https://docs.rsshub.app/routes/programming#a-li-yun', - source: ['/group/:type'], - target: '/aliyun/developer/group/:type', - }, - ], - help: [ - { - title: '公告', - docs: 'https://docs.rsshub.app/routes/programming#a-li-yun', - source: ['/noticelist/:type', '/'], - target: (params) => `/aliyun/notice${params.type ? '/' + params.type.replace('.html', '') : ''}`, - }, - ], - }, - 'taobao.org': { - _name: '阿里云', - mysql: [ - { - title: '数据库内核月报', - docs: 'https://docs.rsshub.app/routes/programming#a-li-yun', - source: ['/monthly', '/'], - target: '/aliyun/database_month', - }, - ], - }, -}; diff --git a/lib/routes/aliyun/router.ts b/lib/routes/aliyun/router.ts deleted file mode 100644 index a2a79c910..000000000 --- a/lib/routes/aliyun/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/database_month', './database-month'); - router.get('/developer/group/:type', './developer/group'); - router.get('/notice/:type?', './notice'); -}; diff --git a/lib/routes/aljazeera/index.ts b/lib/routes/aljazeera/index.ts index f150cc1a7..1bf0fa10e 100644 --- a/lib/routes/aljazeera/index.ts +++ b/lib/routes/aljazeera/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -24,7 +25,14 @@ const languages = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = getSubPath(ctx) === '/' ? ['arabic'] : getSubPath(ctx).replace(/^\//, '').split('/'); if (!Object.hasOwn(languages, params[0])) { @@ -84,9 +92,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').first().text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/aljazeera/maintainer.ts b/lib/routes/aljazeera/maintainer.ts deleted file mode 100644 index 7dd2e513e..000000000 --- a/lib/routes/aljazeera/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/:language?/:category?': ['nczitzk'], - '/:language?/tag/:id': ['nczitzk'], - '/:language?/rss': ['nczitzk'], -}; diff --git a/lib/routes/aljazeera/namespace.ts b/lib/routes/aljazeera/namespace.ts new file mode 100644 index 000000000..22d73564b --- /dev/null +++ b/lib/routes/aljazeera/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Aljazeera 半岛电视台', + url: 'aljazeera.com', +}; diff --git a/lib/routes/aljazeera/radar.ts b/lib/routes/aljazeera/radar.ts deleted file mode 100644 index fbee76531..000000000 --- a/lib/routes/aljazeera/radar.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default { - 'aljazeera.com': { - _name: 'Aljazeera 半岛电视台', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-xin-wen', - source: ['/:category', '/'], - target: '/aljazeera/english/:category', - }, - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-biao-qian', - source: ['/tag/:id', '/'], - target: '/aljazeera/english/tag/:id', - }, - { - title: 'Official RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-guan-fang-rss', - source: ['/xml/rss/all.xml', '/'], - target: '/aljazeera/english/rss', - }, - ], - }, - 'aljazeera.net': { - _name: 'Aljazeera 半岛电视台', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-xin-wen', - source: ['/:category', '/'], - target: '/aljazeera/arbric/:category', - }, - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-biao-qian', - source: ['/tag/:id', '/'], - target: '/aljazeera/arbric/tag/:id', - }, - { - title: 'Official RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-guan-fang-rss', - source: ['/rss', '/'], - target: '/aljazeera/arbric/rss', - }, - ], - chinese: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-xin-wen', - source: ['/:category', '/'], - target: '/aljazeera/chinese/:category', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/traditional-media#aljazeera-ban-dao-dian-shi-tai-biao-qian', - source: ['/tag/:id', '/'], - target: '/aljazeera/chinese/tag/:id', - }, - ], - }, -}; diff --git a/lib/routes/aljazeera/router.ts b/lib/routes/aljazeera/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/aljazeera/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/ally/maintainer.ts b/lib/routes/ally/maintainer.ts deleted file mode 100644 index a3be3ef66..000000000 --- a/lib/routes/ally/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/rail/:category?/:topic?': ['Rongronggg9'], -}; diff --git a/lib/routes/ally/namespace.ts b/lib/routes/ally/namespace.ts new file mode 100644 index 000000000..f69681f84 --- /dev/null +++ b/lib/routes/ally/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '艾莱资讯', + url: 'rail.ally.net.cn', +}; diff --git a/lib/routes/ally/radar.ts b/lib/routes/ally/radar.ts deleted file mode 100644 index 455e94517..000000000 --- a/lib/routes/ally/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ally.net.cn': { - _name: '艾莱资讯', - rail: [ - { - title: '世界轨道交通资讯网', - docs: 'https://docs.rsshub.app/routes/new-media#ai-lai-zi-xun', - source: ['/', '/html/:category?/:topic?'], - target: '/ally/rail/:category?/:topic?', - }, - ], - }, -}; diff --git a/lib/routes/ally/rail.ts b/lib/routes/ally/rail.ts index d1328889d..964238eb7 100644 --- a/lib/routes/ally/rail.ts +++ b/lib/routes/ally/rail.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/rail/:category?/:topic?', + categories: ['new-media'], + example: '/ally/rail/hyzix/chengguijiaotong/', + parameters: { category: '分类,可在 URL 中找到;略去则抓取首页', topic: '话题,可在 URL 中找到;并非所有页面均有此字段' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rail.ally.net.cn/', 'rail.ally.net.cn/html/:category?/:topic?'], + }, + name: '世界轨道交通资讯网', + maintainers: ['Rongronggg9'], + handler, + url: 'rail.ally.net.cn/', + description: `:::tip + 默认抓取前 20 条,可通过 \`?limit=\` 改变。 + :::`, +}; + +async function handler(ctx) { // http://rail.ally.net.cn/sitemap.html const { category, topic } = ctx.req.param(); const rootUrl = 'http://rail.ally.net.cn'; @@ -100,10 +126,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `世界轨道交通资讯网 - ${title}`, link: pageUrl, item: items, description: $('head > meta[name="description"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/ally/router.ts b/lib/routes/ally/router.ts deleted file mode 100644 index f4ce96520..000000000 --- a/lib/routes/ally/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/rail/:category?/:topic?', './rail'); -}; diff --git a/lib/routes/alternativeto/maintainer.ts b/lib/routes/alternativeto/maintainer.ts deleted file mode 100644 index 4a18c74cb..000000000 --- a/lib/routes/alternativeto/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/software/:name/:routeParams?': ['JimenezLi'], - '/platform/:name/:routeParams?': ['JimenezLi'], -}; diff --git a/lib/routes/alternativeto/namespace.ts b/lib/routes/alternativeto/namespace.ts new file mode 100644 index 000000000..973d11869 --- /dev/null +++ b/lib/routes/alternativeto/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AlternativeTo', + url: 'www.alternativeto.net', +}; diff --git a/lib/routes/alternativeto/platform.ts b/lib/routes/alternativeto/platform.ts index ee7086c60..6636af5c6 100644 --- a/lib/routes/alternativeto/platform.ts +++ b/lib/routes/alternativeto/platform.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseURL, puppeteerGet } from './utils'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/platform/:name/:routeParams?', + categories: ['programming'], + example: '/alternativeto/platform/firefox', + parameters: { name: 'Platform name', routeParams: 'Filters of software type' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.alternativeto.net/platform/:name'], + target: '/platform/:name', + }, + name: 'Platform Software', + maintainers: ['JimenezLi'], + handler, + description: `> routeParms can be copied from original site URL, example: \`/alternativeto/platform/firefox/license=free\``, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const query = new URLSearchParams(ctx.req.param('routeParams')); const link = `https://alternativeto.net/platform/${name}/?${query.toString()}`; @@ -11,7 +35,7 @@ export default async (ctx) => { const html = await puppeteerGet(link, cache); const $ = load(html); - ctx.set('data', { + return { title: $('.Heading_h1___Cf5Y').text().trim(), description: $('.intro-text').text().trim(), link, @@ -29,5 +53,5 @@ export default async (ctx) => { description, }; }), - }); -}; + }; +} diff --git a/lib/routes/alternativeto/radar.ts b/lib/routes/alternativeto/radar.ts deleted file mode 100644 index 6f6a4bd82..000000000 --- a/lib/routes/alternativeto/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'alternativeto.net': { - _name: 'AlternativeTo', - www: [ - { - title: 'Software Alternatives', - docs: 'https://docs.rsshub.app/routes/programming#alternativeto-software-alternatives', - source: '/software/:name', - target: '/software/:name', - }, - { - title: 'Platform Software', - docs: 'https://docs.rsshub.app/routes/programming#alternativeto-platform-software', - source: '/platform/:name', - target: '/platform/:name', - }, - ], - }, -}; diff --git a/lib/routes/alternativeto/router.ts b/lib/routes/alternativeto/router.ts deleted file mode 100644 index c834c976e..000000000 --- a/lib/routes/alternativeto/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/software/:name/:routeParams?', './software'); - router.get('/platform/:name/:routeParams?', './platform'); -}; diff --git a/lib/routes/alternativeto/software.ts b/lib/routes/alternativeto/software.ts index f3ac2e50c..b7c96b61e 100644 --- a/lib/routes/alternativeto/software.ts +++ b/lib/routes/alternativeto/software.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseURL, puppeteerGet } from './utils'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/software/:name/:routeParams?', + categories: ['programming'], + example: '/alternativeto/software/cpp', + parameters: { name: 'Software name', routeParams: 'Filters of software type' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.alternativeto.net/software/:name'], + target: '/software/:name', + }, + name: 'Software Alternatives', + maintainers: ['JimenezLi'], + handler, + description: `> routeParms can be copied from original site URL, example: \`/alternativeto/software/cpp/license=opensource&platform=windows\``, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const query = new URLSearchParams(ctx.req.param('routeParams')); const link = `https://alternativeto.net/software/${name}/?${query.toString()}`; @@ -11,7 +35,7 @@ export default async (ctx) => { const html = await puppeteerGet(link, cache); const $ = load(html); - ctx.set('data', { + return { title: $('.Heading_h1___Cf5Y').text().trim(), description: $('.intro-text').text().trim(), link, @@ -29,5 +53,5 @@ export default async (ctx) => { description, }; }), - }); -}; + }; +} diff --git a/lib/routes/altervista/radar.ts b/lib/routes/altervista/radar.ts deleted file mode 100644 index 09ca561cb..000000000 --- a/lib/routes/altervista/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'altervista.org': { - _name: 'Altervista', - hyp3rlinx: [ - { - title: 'hyp3rlinx blog', - docs: 'https://docs.rsshub.app/', - source: ['/'], - target: '/rsshub/transform/html/http%3A%2F%2Fhyp3rlinx.altervista.org%2F/item=table[border=%221%22]%20tr%20td%20a', - }, - ], - }, -}; diff --git a/lib/routes/amazon/awsblogs.ts b/lib/routes/amazon/awsblogs.ts index 6e95d15a0..8fcdc32f0 100644 --- a/lib/routes/amazon/awsblogs.ts +++ b/lib/routes/amazon/awsblogs.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/awsblogs/:locale?', + name: 'Unknown', + maintainers: ['HankChow'], + handler, +}; + +async function handler(ctx) { const locale = ctx.req.param('locale') ?? 'zh_CN'; const response = await got({ @@ -10,7 +18,7 @@ export default async (ctx) => { const items = response.data.items; - ctx.set('data', { + return { title: 'AWS Blog', link: 'https://aws.amazon.com/blogs/', description: 'AWS Blog 更新', @@ -23,5 +31,5 @@ export default async (ctx) => { link: item.item.additionalFields.link, author: item.item.additionalFields.contributors, })), - }); -}; + }; +} diff --git a/lib/routes/amazon/kindle-software-updates.ts b/lib/routes/amazon/kindle-software-updates.ts index 74ed721b4..4656772bd 100644 --- a/lib/routes/amazon/kindle-software-updates.ts +++ b/lib/routes/amazon/kindle-software-updates.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,25 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { load } from 'cheerio'; const host = 'https://www.amazon.com'; -export default async (ctx) => { +export const route: Route = { + path: '/kindle/software-updates', + categories: ['program-update'], + example: '/amazon/kindle/software-updates', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Kindle Software Updates', + maintainers: ['EthanWng97'], + handler, +}; + +async function handler() { const url = host + '/gp/help/customer/display.html'; const nodeIdValue = 'GKMQC26VQQMM8XSW'; const response = await got({ @@ -33,7 +52,7 @@ export default async (ctx) => { return data; }) .get(); - ctx.set('data', { + return { title: 'Kindle E-Reader Software Updates', link: `${url}?nodeId=${nodeIdValue}`, description: 'Kindle E-Reader Software Updates', @@ -47,5 +66,5 @@ export default async (ctx) => { guid: item.title + ' - ' + item.version, link: item.link, })), - }); -}; + }; +} diff --git a/lib/routes/amazon/maintainer.ts b/lib/routes/amazon/maintainer.ts deleted file mode 100644 index 6a1cd1ab3..000000000 --- a/lib/routes/amazon/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/awsblogs/:locale?': ['HankChow'], - '/kindle/software-updates': ['EthanWng97'], -}; diff --git a/lib/routes/amazon/namespace.ts b/lib/routes/amazon/namespace.ts new file mode 100644 index 000000000..5e5086e0c --- /dev/null +++ b/lib/routes/amazon/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Amazon', + url: 'amazon.com', +}; diff --git a/lib/routes/amazon/radar.ts b/lib/routes/amazon/radar.ts deleted file mode 100644 index 5b4cba9ea..000000000 --- a/lib/routes/amazon/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'amazon.com': { - _name: 'Amazon', - '.': [ - { - title: 'Kindle 软件更新', - docs: 'https://docs.rsshub.app/routes/program-update#amazon', - source: ['/gp/help/customer/display.html'], - target: (_, url) => { - const nodeId = new URL(url).searchParams.get('nodeId'); - if (nodeId === 'GKMQC26VQQMM8XSW') { - return '/amazon/kindle/software-updates'; - } - }, - }, - ], - aws: [ - { - title: 'AWS blogs', - docs: 'https://docs.rsshub.app/routes/blogs#amazon', - }, - ], - }, -}; diff --git a/lib/routes/amazon/router.ts b/lib/routes/amazon/router.ts deleted file mode 100644 index 9a3c86b5e..000000000 --- a/lib/routes/amazon/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/awsblogs/:locale?', './awsblogs'); - router.get('/kindle/software-updates', './kindle-software-updates'); -}; diff --git a/lib/routes/android/maintainer.ts b/lib/routes/android/maintainer.ts deleted file mode 100644 index 84a7d1300..000000000 --- a/lib/routes/android/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/platform-tools-releases': ['nczitzk'], -}; diff --git a/lib/routes/android/namespace.ts b/lib/routes/android/namespace.ts new file mode 100644 index 000000000..6e719bce7 --- /dev/null +++ b/lib/routes/android/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Android', + url: 'developer.android.com', +}; diff --git a/lib/routes/android/platform-tools-releases.ts b/lib/routes/android/platform-tools-releases.ts index 1eaf72d10..be8f88c1f 100644 --- a/lib/routes/android/platform-tools-releases.ts +++ b/lib/routes/android/platform-tools-releases.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/platform-tools-releases', + categories: ['program-update'], + example: '/android/platform-tools-releases', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['developer.android.com/studio/releases/platform-tools', 'developer.android.com/'], + }, + name: 'SDK Platform Tools release notes', + maintainers: ['nczitzk'], + handler, + url: 'developer.android.com/studio/releases/platform-tools', +}; + +async function handler() { const rootUrl = 'https://developer.android.com'; const currentUrl = `${rootUrl}/studio/releases/platform-tools`; @@ -39,9 +62,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/android/radar.ts b/lib/routes/android/radar.ts deleted file mode 100644 index 92951d69c..000000000 --- a/lib/routes/android/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'android.com': { - _name: 'Android Developers', - developer: [ - { - title: 'SDK Platform Tools release notes', - docs: 'https://docs.rsshub.app/routes/program-update#android-sdk-platform-tools-release-notes', - source: ['/studio/releases/platform-tools', '/'], - target: '/android/platform-tools-releases', - }, - ], - }, -}; diff --git a/lib/routes/android/router.ts b/lib/routes/android/router.ts deleted file mode 100644 index e732b467e..000000000 --- a/lib/routes/android/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/platform-tools-releases', './platform-tools-releases'); -}; diff --git a/lib/routes/annualreviews/index.ts b/lib/routes/annualreviews/index.ts index 5a078badd..9bca7909b 100644 --- a/lib/routes/annualreviews/index.ts +++ b/lib/routes/annualreviews/index.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['journal'], + example: '/annualreviews/anchem', + parameters: { id: 'Journal id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['annualreviews.org/journal/:id', 'annualreviews.org/'], + }, + name: 'Journal', + maintainers: ['nczitzk'], + handler, + description: `The URL of the journal [Annual Review of Analytical Chemistry](https://www.annualreviews.org/journal/anchem) is \`https://www.annualreviews.org/journal/anchem\`, where \`anchem\` is the id of the journal, so the route for this journal is \`/annualreviews/anchem\`. + + :::tip + More jounals can be found in [Browse Journals](https://www.annualreviews.org/action/showPublications). + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.annualreviews.org'; @@ -57,7 +84,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title') .first() .text() @@ -65,5 +92,5 @@ export default async (ctx) => { description: $('subtitle').first().text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/annualreviews/maintainer.ts b/lib/routes/annualreviews/maintainer.ts deleted file mode 100644 index 6fcb97f14..000000000 --- a/lib/routes/annualreviews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['nczitzk'], -}; diff --git a/lib/routes/annualreviews/namespace.ts b/lib/routes/annualreviews/namespace.ts new file mode 100644 index 000000000..bcbac1318 --- /dev/null +++ b/lib/routes/annualreviews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Annual Reviews', + url: 'annualreviews.org', +}; diff --git a/lib/routes/annualreviews/radar.ts b/lib/routes/annualreviews/radar.ts deleted file mode 100644 index f8753f0e7..000000000 --- a/lib/routes/annualreviews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'annualreviews.org': { - _name: 'Annual Reviews', - '.': [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#annual-reviews-journal', - source: ['/journal/:id', '/'], - target: '/annualreviews/:id', - }, - ], - }, -}; diff --git a/lib/routes/annualreviews/router.ts b/lib/routes/annualreviews/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/annualreviews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/anquanke/category.ts b/lib/routes/anquanke/category.ts index 73bf77399..1554e1d82 100644 --- a/lib/routes/anquanke/category.ts +++ b/lib/routes/anquanke/category.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:category/:fulltext?', + categories: ['programming'], + example: '/anquanke/week', + parameters: { category: '分类订阅', fulltext: '是否获取全文,如需获取全文参数传入 `quanwen` 或 `fulltext`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类订阅', + maintainers: ['qwertyuiop6'], + handler, + description: `| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 | + | ---------------- | -------- | --------- | ---- | ---- | ---- | + | week | activity | knowledge | news | job | tool |`, +}; + +async function handler(ctx) { const api = 'https://api.anquanke.com/data/v1/posts?size=10&page=1&category='; const type = ctx.req.param('category'); const fulltext = ctx.req.param('fulltext'); @@ -32,9 +54,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `安全客-${dataArray[0].category_name}`, link: `https://www.anquanke.com/${type === 'week' ? 'week-list' : type}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/anquanke/maintainer.ts b/lib/routes/anquanke/maintainer.ts deleted file mode 100644 index f8115468e..000000000 --- a/lib/routes/anquanke/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - // '/vul': ['qwertyuiop6'], - '/:category/:fulltext?': ['qwertyuiop6'], -}; diff --git a/lib/routes/anquanke/namespace.ts b/lib/routes/anquanke/namespace.ts new file mode 100644 index 000000000..8373e6e9d --- /dev/null +++ b/lib/routes/anquanke/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '安全客', + url: 'anquanke.com', + description: `:::tip +官方提供了混合的主页资讯 RSS: [https://api.anquanke.com/data/v1/rss](https://api.anquanke.com/data/v1/rss) +:::`, +}; diff --git a/lib/routes/anquanke/radar.ts b/lib/routes/anquanke/radar.ts deleted file mode 100644 index cc11613f5..000000000 --- a/lib/routes/anquanke/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'anquanke.com': { - _name: '安全客', - '.': [ - { - title: '分类订阅', - docs: 'https://docs.rsshub.app/routes/programming#an-quan-ke', - source: ['/:category', '/'], - target: (params) => `/anquanke/${params.category === 'week-list' ? 'week' : params.category}`, - }, - ], - }, -}; diff --git a/lib/routes/anquanke/router.ts b/lib/routes/anquanke/router.ts deleted file mode 100644 index 9e83217f8..000000000 --- a/lib/routes/anquanke/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - // router.get('/vul', './vul'); // 404 - router.get('/:category/:fulltext?', './category'); -}; diff --git a/lib/routes/anquanke/vul.ts b/lib/routes/anquanke/vul.ts index e77742cd5..f50bb86b7 100644 --- a/lib/routes/anquanke/vul.ts +++ b/lib/routes/anquanke/vul.ts @@ -2,7 +2,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export default async () => { const url = 'https://www.anquanke.com'; const response = await got(`${url}/vul`); @@ -26,9 +26,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '安全客-漏洞cve报告', link: 'https://www.anquanke.com/vul', item: items, - }); + }; }; diff --git a/lib/routes/apache/apisix/blog.ts b/lib/routes/apache/apisix/blog.ts index 6cf820db5..d1b65259a 100644 --- a/lib/routes/apache/apisix/blog.ts +++ b/lib/routes/apache/apisix/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -22,11 +23,29 @@ async function getArticles() { }); } -export default async (ctx) => { +export const route: Route = { + path: '/apisix/blog', + categories: ['blog'], + example: '/apache/apisix/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'APISIX 博客', + maintainers: ['aneasystone'], + handler, +}; + +async function handler() { const articles = await getArticles(); - ctx.set('data', { + return { title: 'Blog | Apache APISIX', link: 'https://apisix.apache.org/zh/blog/', item: articles, - }); -}; + }; +} diff --git a/lib/routes/apache/maintainer.ts b/lib/routes/apache/maintainer.ts deleted file mode 100644 index 65b7db28d..000000000 --- a/lib/routes/apache/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/apisix/blog': ['aneasystone'], -}; diff --git a/lib/routes/apache/namespace.ts b/lib/routes/apache/namespace.ts new file mode 100644 index 000000000..a55184404 --- /dev/null +++ b/lib/routes/apache/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Apache', + url: 'apisix.apache.org', +}; diff --git a/lib/routes/apache/radar.ts b/lib/routes/apache/radar.ts deleted file mode 100644 index 37ec733ad..000000000 --- a/lib/routes/apache/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'apache.org': { - _name: 'Apache', - apisix: [ - { - title: 'APISIX 博客', - docs: 'https://docs.rsshub.app/routes/blog#apache', - source: ['/zh/blog'], - target: () => '/apache/apisix/blog', - }, - ], - }, -}; diff --git a/lib/routes/apache/router.ts b/lib/routes/apache/router.ts deleted file mode 100644 index c65672310..000000000 --- a/lib/routes/apache/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/apisix/blog', './apisix/blog'); -}; diff --git a/lib/routes/apiseven/blog.ts b/lib/routes/apiseven/blog.ts index 4cdbed77a..910db1836 100644 --- a/lib/routes/apiseven/blog.ts +++ b/lib/routes/apiseven/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,25 @@ async function getArticles() { })); } -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/apiseven/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '博客', + maintainers: ['aneasystone'], + handler, +}; + +async function handler() { const articles = await getArticles(); const items = await Promise.all( articles.map((item) => @@ -41,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '博客 | 支流科技', link: 'https://www.apiseven.com/blog', item: items, - }); -}; + }; +} diff --git a/lib/routes/apiseven/maintainer.ts b/lib/routes/apiseven/maintainer.ts deleted file mode 100644 index 1663d20b9..000000000 --- a/lib/routes/apiseven/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['aneasystone'], -}; diff --git a/lib/routes/apiseven/namespace.ts b/lib/routes/apiseven/namespace.ts new file mode 100644 index 000000000..fb3d425ce --- /dev/null +++ b/lib/routes/apiseven/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '支流科技', + url: 'apiseven.com', +}; diff --git a/lib/routes/apiseven/radar.ts b/lib/routes/apiseven/radar.ts deleted file mode 100644 index 7140989b3..000000000 --- a/lib/routes/apiseven/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'apiseven.com': { - _name: '支流科技', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#zhi-liu-ke-ji', - source: ['/blog'], - target: () => '/apiseven/blog', - }, - ], - }, -}; diff --git a/lib/routes/apiseven/router.ts b/lib/routes/apiseven/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/apiseven/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/apkpure/maintainer.ts b/lib/routes/apkpure/maintainer.ts deleted file mode 100644 index 0910dbfcf..000000000 --- a/lib/routes/apkpure/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/versions/:pkg/:region?': ['maple3142'], -}; diff --git a/lib/routes/apkpure/namespace.ts b/lib/routes/apkpure/namespace.ts new file mode 100644 index 000000000..b26ba635b --- /dev/null +++ b/lib/routes/apkpure/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'APKPure', + url: 'apkpure.com', +}; diff --git a/lib/routes/apkpure/radar.ts b/lib/routes/apkpure/radar.ts deleted file mode 100644 index 1c4737419..000000000 --- a/lib/routes/apkpure/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'apkpure.com': { - _name: 'APKPure', - '.': [ - { - title: '所有版本', - docs: 'https://docs.rsshub.app/routes/program-update#apkpure', - source: ['/:region/:stuff/:pkg/versions', '/:stuff/:pkg/versions', '/:stuff/:pkg'], - target: (params) => `/apkpure/versions/${params.pkg}${params.region ? `/${params.region}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/apkpure/router.ts b/lib/routes/apkpure/router.ts deleted file mode 100644 index 65271e3ce..000000000 --- a/lib/routes/apkpure/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/versions/:pkg/:region?', './versions'); -}; diff --git a/lib/routes/apkpure/versions.ts b/lib/routes/apkpure/versions.ts index f1b40401b..793db24b3 100644 --- a/lib/routes/apkpure/versions.ts +++ b/lib/routes/apkpure/versions.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/versions/:pkg/:region?', + categories: ['program-update'], + example: '/apkpure/versions/jp.co.craftegg.band/jp', + parameters: { pkg: 'Package name', region: 'Region code, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Versions', + maintainers: ['maple3142'], + handler, +}; + +async function handler(ctx) { const { pkg, region = 'en' } = ctx.req.param(); const baseUrl = 'https://apkpure.com'; const link = `${baseUrl}/${region}/${pkg}/versions`; @@ -38,12 +57,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('.ver-top-h1').text(), description: $('.ver-top-title p').text(), image: img.href, language: region ?? 'en', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/apnews/maintainer.ts b/lib/routes/apnews/maintainer.ts deleted file mode 100644 index 67626ab93..000000000 --- a/lib/routes/apnews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topics/:topic?': ['zoenglinghou', 'mjysci', 'TonyRL'], -}; diff --git a/lib/routes/apnews/namespace.ts b/lib/routes/apnews/namespace.ts new file mode 100644 index 000000000..cdaed3fb5 --- /dev/null +++ b/lib/routes/apnews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AP News', + url: 'apnews.com', +}; diff --git a/lib/routes/apnews/radar.ts b/lib/routes/apnews/radar.ts deleted file mode 100644 index 0f0ca1a90..000000000 --- a/lib/routes/apnews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'apnews.com': { - _name: 'AP News', - '.': [ - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/traditional-media#ap-news', - source: '/hub/:topic', - target: '/apnews/topics/:topic', - }, - ], - }, -}; diff --git a/lib/routes/apnews/router.ts b/lib/routes/apnews/router.ts deleted file mode 100644 index 5fe41a172..000000000 --- a/lib/routes/apnews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topics/:topic?', './topics'); -}; diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index 81e700607..0bba50f79 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; const HOME_PAGE = 'https://apnews.com'; -export default async (ctx) => { +export const route: Route = { + path: '/topics/:topic?', + categories: ['traditional-media'], + example: '/apnews/topics/apf-topnews', + parameters: { topic: 'Topic name, can be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`, `trending-news` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apnews.com/hub/:topic'], + target: '/topics/:topic', + }, + name: 'Topics', + maintainers: ['zoenglinghou', 'mjysci', 'TonyRL'], + handler, +}; + +async function handler(ctx) { const { topic = 'trending-news' } = ctx.req.param(); const url = `${HOME_PAGE}/hub/${topic}`; const response = await got(url); @@ -35,11 +58,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), description: $("meta[property='og:description']").text(), link: url, item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/app-center/maintainer.ts b/lib/routes/app-center/maintainer.ts deleted file mode 100644 index cfa2a5d7e..000000000 --- a/lib/routes/app-center/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/release/:user/:app/:distribution_group': ['Rongronggg9'], -}; diff --git a/lib/routes/app-center/namespace.ts b/lib/routes/app-center/namespace.ts new file mode 100644 index 000000000..e5efc0352 --- /dev/null +++ b/lib/routes/app-center/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'App Center', + url: 'install.appcenter.ms', +}; diff --git a/lib/routes/app-center/radar.ts b/lib/routes/app-center/radar.ts deleted file mode 100644 index 655d656dd..000000000 --- a/lib/routes/app-center/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'appcenter.ms': { - _name: 'App Center', - install: [ - { - title: 'App Center Release', - docs: 'https://docs.rsshub.app/routes/program-update#app-center', - source: ['/users/:user/apps/:app/distribution_groups/:distribution_group', '/orgs/:user/apps/:app/distribution_groups/:distribution_group'], - target: '/app-center/release/:user/:app/:distribution_group', - }, - ], - }, -}; diff --git a/lib/routes/app-center/release.ts b/lib/routes/app-center/release.ts index d2b42376c..2862758cf 100644 --- a/lib/routes/app-center/release.ts +++ b/lib/routes/app-center/release.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,31 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import MarkdownIt from 'markdown-it'; -export default async (ctx) => { +export const route: Route = { + path: '/release/:user/:app/:distribution_group', + categories: ['program-update'], + example: '/app-center/release/cloudflare/1.1.1.1-windows/beta', + parameters: { user: 'User', app: 'App name', distribution_group: 'Distribution group' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group', 'install.appcenter.ms/orgs/:user/apps/:app/distribution_groups/:distribution_group'], + }, + name: 'Release', + maintainers: ['Rongronggg9'], + handler, + description: `:::tip + The parameters can be extracted from the Release page URL: \`https://install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group\` + :::`, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const app = ctx.req.param('app'); const distribution_group = ctx.req.param('distribution_group'); @@ -114,11 +139,11 @@ export default async (ctx) => { const icon = items && items[0]._feed_icon; // if it is an empty feed, would not raise an error here const title = items && items[0]._feed_title; - ctx.set('data', { + return { title, link, description: title, image: icon, item: items, - }); -}; + }; +} diff --git a/lib/routes/app-center/router.ts b/lib/routes/app-center/router.ts deleted file mode 100644 index d8dd2a29f..000000000 --- a/lib/routes/app-center/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/release/:user/:app/:distribution_group', './release'); -}; diff --git a/lib/routes/apple/apps.ts b/lib/routes/apple/apps.ts index 21587c346..80dd150a3 100644 --- a/lib/routes/apple/apps.ts +++ b/lib/routes/apple/apps.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -14,7 +15,36 @@ const platforms = { tvos: 'appletvos', }; -export default async (ctx) => { +export const route: Route = { + path: '/apps/update/:country/:id/:platform?', + categories: ['program-update'], + 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' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apps.apple.com/:country/app/:appSlug/:id', 'apps.apple.com/:country/app/:id'], + target: '/apps/update/:country/:id', + }, + name: 'App Update', + maintainers: ['EkkoG', 'nczitzk'], + handler, + description: `| All | iOS | macOS | tvOS | + | --- | --- | ----- | ---- | + | | iOS | macOS | tvOS | + + :::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). + :::`, +}; + +async function handler(ctx) { const { country, id } = ctx.req.param(); let { platform } = ctx.req.param(); @@ -87,7 +117,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -99,9 +129,9 @@ export default async (ctx) => { subtitle: appName, author: artistName, allowEmpty: true, - }); + }; ctx.set('json', { appData, }); -}; +} diff --git a/lib/routes/apple/exchange-repair.ts b/lib/routes/apple/exchange-repair.ts index 9a3852ddc..7c47aec50 100644 --- a/lib/routes/apple/exchange-repair.ts +++ b/lib/routes/apple/exchange-repair.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const host = 'https://support.apple.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/exchange_repair/:country?', + categories: ['other'], + example: '/apple/exchange_repair', + parameters: { country: 'country code in apple.com URL (exception: for `United States` please use `us`), default to China `cn`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['support.apple.com/:country/service-programs'], + target: '/exchange_repair/:country', + }, + name: 'Exchange and Repair Extension Programs', + maintainers: ['metowolf', 'HenryQW', 'kt286'], + handler, +}; + +async function handler(ctx) { const country = ctx.req.param('country') ?? ''; const link = new URL(`${country}/service-programs`, host).href; @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Apple - ${$('h1.as-center').text()}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/apple/maintainer.ts b/lib/routes/apple/maintainer.ts deleted file mode 100644 index d0eda00cb..000000000 --- a/lib/routes/apple/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/apps/update/:country/:id/:platform?': ['EkkoG', 'nczitzk'], - '/exchange_repair/:country?': ['metowolf', 'HenryQW', 'kt286'], -}; diff --git a/lib/routes/apple/namespace.ts b/lib/routes/apple/namespace.ts new file mode 100644 index 000000000..c9a524f20 --- /dev/null +++ b/lib/routes/apple/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Apple', + url: 'apps.apple.com', +}; diff --git a/lib/routes/apple/radar.ts b/lib/routes/apple/radar.ts deleted file mode 100644 index f82910235..000000000 --- a/lib/routes/apple/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'apple.com': { - _name: 'Apple', - apps: [ - { - title: 'App Update', - docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store-app-update', - source: ['/:country/app/:appSlug/:id', '/:country/app/:id'], - target: '/apple/apps/update/:country/:id', - }, - ], - support: [ - { - title: '换和维修扩展计划', - docs: 'https://docs.rsshub.app/routes/other#apple', - source: ['/:country/service-programs'], - target: '/apple/exchange_repair/:country', - }, - ], - }, -}; diff --git a/lib/routes/apple/router.ts b/lib/routes/apple/router.ts deleted file mode 100644 index e7b5f1bd5..000000000 --- a/lib/routes/apple/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/apps/update/:country/:id/:platform?', './apps'); - router.get('/exchange_repair/:country?', './exchange-repair'); -}; diff --git a/lib/routes/appleinsider/index.ts b/lib/routes/appleinsider/index.ts index 394d84001..8164f1d07 100644 --- a/lib/routes/appleinsider/index.ts +++ b/lib/routes/appleinsider/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/appleinsider', + parameters: { category: 'Category, see below, News by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['appleinsider.com/:category', 'appleinsider.com/'], + target: '/:category', + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `| News | Reviews | How-tos | + | ---- | ------- | ------- | + | | reviews | how-to |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://appleinsider.com'; @@ -52,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/appleinsider/maintainer.ts b/lib/routes/appleinsider/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/appleinsider/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/appleinsider/namespace.ts b/lib/routes/appleinsider/namespace.ts new file mode 100644 index 000000000..b4ac79aa6 --- /dev/null +++ b/lib/routes/appleinsider/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AppleInsider', + url: 'appleinsider.com', +}; diff --git a/lib/routes/appleinsider/radar.ts b/lib/routes/appleinsider/radar.ts deleted file mode 100644 index ac2e53d09..000000000 --- a/lib/routes/appleinsider/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'appleinsider.com': { - _name: 'AppleInsider', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#appleinsider-fen-lei', - source: ['/:category', '/'], - target: '/appleinsider/:category', - }, - ], - }, -}; diff --git a/lib/routes/appleinsider/router.ts b/lib/routes/appleinsider/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/appleinsider/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/appstore/in-app-purchase.ts b/lib/routes/appstore/in-app-purchase.ts index 1a293ae9d..691396b36 100644 --- a/lib/routes/appstore/in-app-purchase.ts +++ b/lib/routes/appstore/in-app-purchase.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import * as url from 'node:url'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/iap/:country/:id', + categories: ['program-update'], + example: '/appstore/iap/us/id953286746', + parameters: { + country: 'App Store Country, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `us`', + id: 'App Store app id, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `id953286746`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'In-App-Purchase Price Drop Alert', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const country = ctx.req.param('country'); const id = ctx.req.param('id'); const link = `https://apps.apple.com/${country}/app/${id}`; @@ -50,9 +72,9 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title, link, item, - }); -}; + }; +} diff --git a/lib/routes/appstore/maintainer.ts b/lib/routes/appstore/maintainer.ts deleted file mode 100644 index 9566c6b2d..000000000 --- a/lib/routes/appstore/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/price/:country/:type/:id': ['HenryQW'], - '/iap/:country/:id': ['HenryQW'], - '/xianmian': ['Andiedie'], -}; diff --git a/lib/routes/appstore/namespace.ts b/lib/routes/appstore/namespace.ts new file mode 100644 index 000000000..4561b7834 --- /dev/null +++ b/lib/routes/appstore/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'App Store/Mac App Store', + url: 'apps.apple.com', +}; diff --git a/lib/routes/appstore/price.ts b/lib/routes/appstore/price.ts index 785b5edc7..eec0d4441 100644 --- a/lib/routes/appstore/price.ts +++ b/lib/routes/appstore/price.ts @@ -1,6 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import currency from 'currency-symbol-map'; -export default async (ctx) => { +export const route: Route = { + path: '/price/:country/:type/:id', + categories: ['program-update'], + example: '/appstore/price/us/mac/id1152443474', + parameters: { + country: 'App Store Country, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `us`', + type: 'App type,either `iOS` or `mac`', + id: 'App Store app id, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `id1152443474`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apps.apple.com/'], + }, + name: 'Price Drop', + maintainers: ['HenryQW'], + handler, + url: 'apps.apple.com/', +}; + +async function handler(ctx) { const country = ctx.req.param('country'); const type = ctx.req.param('type').toLowerCase() === 'mac' ? 'macapps' : 'apps'; const id = ctx.req.param('id').replace('id', ''); @@ -17,10 +44,10 @@ export default async (ctx) => { if (!res.data.results) { const unsupported = '当前 app 未被收录. Price monitor is not available for this app.'; - ctx.set('data', { + return { title: unsupported, item: [{ title: unsupported }], - }); + }; return; } @@ -44,10 +71,10 @@ export default async (ctx) => { }; item.push(single); } - ctx.set('data', { + return { title, link, item, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/appstore/radar.ts b/lib/routes/appstore/radar.ts deleted file mode 100644 index 5eb00f836..000000000 --- a/lib/routes/appstore/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'apple.com': { - _name: 'Apple', - apps: [ - { - title: '价格更新', - docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store', - source: ['/'], - target: '/appstore/price/:country/:type/:id', - }, - ], - }, - 'app.so': { - _name: '鲜面连线', - '.': [ - { - title: '限免应用', - docs: 'https://docs.rsshub.app/routes/program-update#app-store-mac-app-store', - source: ['/xianmian'], - target: '/appstore/xianmian', - }, - ], - }, -}; diff --git a/lib/routes/appstore/router.ts b/lib/routes/appstore/router.ts deleted file mode 100644 index 064fca7f3..000000000 --- a/lib/routes/appstore/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/xianmian', './xianmian'); - router.get('/iap/:country/:id', './in-app-purchase'); - router.get('/price/:country/:type/:id', './price'); -}; diff --git a/lib/routes/appstore/xianmian.ts b/lib/routes/appstore/xianmian.ts index a95cfca21..82dc8efe4 100644 --- a/lib/routes/appstore/xianmian.ts +++ b/lib/routes/appstore/xianmian.ts @@ -1,12 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xianmian', + categories: ['program-update'], + example: '/appstore/xianmian', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['app.so/xianmian'], + }, + name: '每日精品限免 / 促销应用(鲜面连线 by AppSo)', + maintainers: ['Andiedie'], + handler, + url: 'app.so/xianmian', +}; + +async function handler() { const { data: { objects: data }, } = await got.get('https://app.so/api/v5/appso/discount/?platform=web&limit=10'); - ctx.set('data', { + return { title: '每日精品限免 / 促销应用', link: 'http://app.so/xianmian/', description: '鲜面连线 by AppSo:每日精品限免 / 促销应用', @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(item.updated_at * 1000), link: item.app.download_link[0].link, })), - }); -}; + }; +} diff --git a/lib/routes/aqara/community.ts b/lib/routes/aqara/community.ts index 6a235812e..dfeaf2a8a 100644 --- a/lib/routes/aqara/community.ts +++ b/lib/routes/aqara/community.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/community/:id?/:keyword?', + categories: ['other'], + example: '/aqara/community', + parameters: { id: '分类 id,可在对应分类页 URL 中找到,默认为全部', keyword: '关键字,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '社区', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const keyword = ctx.req.param('keyword') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -23,10 +42,10 @@ export default async (ctx) => { author: item.user.nickname, })); - ctx.set('data', { + return { title: 'Aqara社区', link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/aqara/maintainer.ts b/lib/routes/aqara/maintainer.ts deleted file mode 100644 index 9859e9352..000000000 --- a/lib/routes/aqara/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/community/:id?/:keyword?': ['nczitzk'], - '/:region/news': ['nczitzk'], - '/:region/blog': ['nczitzk'], - '/:region/category/:id': ['nczitzk'], - '/:region/tag/:id': ['nczitzk'], -}; diff --git a/lib/routes/aqara/namespace.ts b/lib/routes/aqara/namespace.ts new file mode 100644 index 000000000..e14ff7284 --- /dev/null +++ b/lib/routes/aqara/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Aqara', + url: 'aqara.com', +}; diff --git a/lib/routes/aqara/news.ts b/lib/routes/aqara/news.ts index fab74cfdb..f812916c7 100644 --- a/lib/routes/aqara/news.ts +++ b/lib/routes/aqara/news.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cn/news', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 35; const rootUrl = 'https://www.aqara.cn'; @@ -40,7 +48,7 @@ export default async (ctx) => { const icon = $('link[rel="shortcut icon"]').prop('href').split('?')[0]; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -50,5 +58,5 @@ export default async (ctx) => { icon, logo: icon, author: $('meta[name="author"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/aqara/post.ts b/lib/routes/aqara/post.ts index d89d218fb..ca35c1ea3 100644 --- a/lib/routes/aqara/post.ts +++ b/lib/routes/aqara/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const rootUrl = 'https://aqara.com'; @@ -81,7 +89,7 @@ export default async (ctx) => { const icon = $('link[rel="apple-touch-icon"]').first().prop('href'); const title = $('meta[property="og:site_name"]').prop('content') ?? 'Aqara'; - ctx.set('data', { + return { item: items, title: `${title}${filterName ? ` - ${filterName}` : ''}`, link: currentUrl, @@ -92,5 +100,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[property="og:type"]').prop('content'), author: title, - }); -}; + }; +} diff --git a/lib/routes/aqara/radar.ts b/lib/routes/aqara/radar.ts deleted file mode 100644 index 0a47af03c..000000000 --- a/lib/routes/aqara/radar.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default { - 'aqara.com': { - _name: 'Aqara', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/other#aqara-xin-wen', - source: ['/:region/about-us/news', '/news'], - target: '/aqara/:region/news', - }, - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/other#aqara-bo-ke', - source: ['/:region/blog'], - target: '/aqara/:region/blog', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/other#aqara-fen-lei', - source: ['/:region/category/:id'], - target: '/aqara/:region/category/:id', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/other#aqara-biao-qian', - source: ['/:region/tag/:id'], - target: '/aqara/:region/tag/:id', - }, - ], - community: [ - { - title: '社区', - docs: 'https://docs.rsshub.app/routes/other#aqara-she-qu', - source: ['/pc', '/'], - target: (params, url) => `/aqara/community/${new URL(url).searchParams.get('id')}`, - }, - ], - }, -}; diff --git a/lib/routes/aqara/region.ts b/lib/routes/aqara/region.ts index 5ba4f259f..e3c20484d 100644 --- a/lib/routes/aqara/region.ts +++ b/lib/routes/aqara/region.ts @@ -1,4 +1,12 @@ -export default (ctx) => { +import { Route } from '@/types'; +export const route: Route = { + path: '/:region/:type?', + name: 'Unknown', + maintainers: [], + handler, +}; + +function handler(ctx) { const types = { news: 'press-release', blog: 'article', @@ -7,4 +15,4 @@ export default (ctx) => { const { region = 'en', type = 'news' } = ctx.req.param(); const redirectTo = `/aqara/${region}/category/${types[type]}`; ctx.redirect(redirectTo); -}; +} diff --git a/lib/routes/aqara/router.ts b/lib/routes/aqara/router.ts deleted file mode 100644 index 937bf79ae..000000000 --- a/lib/routes/aqara/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cn/news', './news'); - router.get('/community/:id?/:keyword?', './community'); - router.get('/:region/:type?', './region'); - router.get('*', './post'); -}; diff --git a/lib/routes/arcteryx/maintainer.ts b/lib/routes/arcteryx/maintainer.ts deleted file mode 100644 index 70ca6b324..000000000 --- a/lib/routes/arcteryx/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/new-arrivals/:country/:gender': ['EthanWng97'], - '/outlet/:country/:gender': ['EthanWng97'], - '/regear/new-arrivals': ['EthanWng97'], -}; diff --git a/lib/routes/arcteryx/namespace.ts b/lib/routes/arcteryx/namespace.ts new file mode 100644 index 000000000..0ada8bdaa --- /dev/null +++ b/lib/routes/arcteryx/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Arcteryx', + url: 'arcteryx.com', +}; diff --git a/lib/routes/arcteryx/new-arrivals.ts b/lib/routes/arcteryx/new-arrivals.ts index ab922491d..fe7c0d1c1 100644 --- a/lib/routes/arcteryx/new-arrivals.ts +++ b/lib/routes/arcteryx/new-arrivals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,43 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { generateRssData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/new-arrivals/:country/:gender', + categories: ['shopping'], + example: '/arcteryx/new-arrivals/us/mens', + parameters: { country: 'country', gender: 'gender' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['arcteryx.com/:country/en/c/:gender/new-arrivals'], + }, + name: 'New Arrivals', + maintainers: ['EthanWng97'], + handler, + description: `Country + + | United States | Canada | United Kingdom | + | ------------- | ------ | -------------- | + | us | ca | gb | + + gender + + | male | female | + | ---- | ------ | + | mens | womens | + + :::tip + Parameter \`country\` can be found within the url of \`Arcteryx\` website. + :::`, +}; + +async function handler(ctx) { const { country, gender } = ctx.req.param(); const host = `https://arcteryx.com/${country}/en/`; const url = `${host}api/fredhopper/query`; @@ -23,7 +60,7 @@ export default async (ctx) => { }); const items = response.data.universes.universe[1]['items-section'].items.item.map((item, index, arr) => generateRssData(item, index, arr, country)); - ctx.set('data', { + return { title: `Arcteryx - New Arrivals(${country.toUpperCase()}) - ${gender.toUpperCase()}`, link: pageUrl, description: `Arcteryx - New Arrivals(${country.toUpperCase()}) - ${gender.toUpperCase()}`, @@ -34,5 +71,5 @@ export default async (ctx) => { item, }), })), - }); -}; + }; +} diff --git a/lib/routes/arcteryx/outlet.ts b/lib/routes/arcteryx/outlet.ts index d7e1db5d3..c58bb3ddc 100644 --- a/lib/routes/arcteryx/outlet.ts +++ b/lib/routes/arcteryx/outlet.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,43 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { generateRssData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/outlet/:country/:gender', + categories: ['shopping'], + example: '/arcteryx/outlet/us/mens', + parameters: { country: 'country', gender: 'gender' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['outlet.arcteryx.com/:country/en/c/:gender'], + }, + name: 'Outlet', + maintainers: ['EthanWng97'], + handler, + description: `Country + + | United States | Canada | United Kingdom | + | ------------- | ------ | -------------- | + | us | ca | gb | + + gender + + | male | female | + | ---- | ------ | + | mens | womens | + + :::tip + Parameter \`country\` can be found within the url of \`Arcteryx\` website. + :::`, +}; + +async function handler(ctx) { const { country, gender } = ctx.req.param(); const host = `https://outlet.arcteryx.com/${country}/en/`; const url = `${host}api/fredhopper/query`; @@ -25,7 +62,7 @@ export default async (ctx) => { }); const items = response.data.universes.universe[1]['items-section'].items.item.map((item, index, arr) => generateRssData(item, index, arr, country)); - ctx.set('data', { + return { title: `Arcteryx - Outlet(${country.toUpperCase()}) - ${gender.toUpperCase()}`, link: pageUrl, description: `Arcteryx - Outlet(${country.toUpperCase()}) - ${gender.toUpperCase()}`, @@ -36,5 +73,5 @@ export default async (ctx) => { item, }), })), - }); -}; + }; +} diff --git a/lib/routes/arcteryx/radar.ts b/lib/routes/arcteryx/radar.ts deleted file mode 100644 index ab78cec93..000000000 --- a/lib/routes/arcteryx/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'arcteryx.com': { - _name: 'Arcteryx', - '.': [ - { - title: '新发布', - docs: 'https://docs.rsshub.app/routes/shopping#arcteryx', - source: ['/:country/en/c/:gender/new-arrivals'], - target: '/arcteryx/new-arrivals/:country/:gender', - }, - ], - outlet: [ - { - title: 'Outlet', - docs: 'https://docs.rsshub.app/routes/shopping#arcteryx', - source: ['/:country/en/c/:gender'], - target: '/arcteryx/outlet/:country/:gender', - }, - ], - regear: [ - { - title: 'Regear 新发布', - docs: 'https://docs.rsshub.app/routes/shopping#arcteryx', - source: ['/shop/new-arrivals', '/'], - target: '/arcteryx/regear/new-arrivals', - }, - ], - }, -}; diff --git a/lib/routes/arcteryx/regear-new-arrivals.ts b/lib/routes/arcteryx/regear-new-arrivals.ts index d58f41f86..09c1bca29 100644 --- a/lib/routes/arcteryx/regear-new-arrivals.ts +++ b/lib/routes/arcteryx/regear-new-arrivals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ const host = 'https://www.regear.arcteryx.com'; function getUSDPrice(number) { return (number / 100).toLocaleString('en-US', { style: 'currency', currency: 'USD' }); } -export default async (ctx) => { +export const route: Route = { + path: '/regear/new-arrivals', + categories: ['shopping'], + example: '/arcteryx/regear/new-arrivals', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['regear.arcteryx.com/shop/new-arrivals', 'regear.arcteryx.com/'], + }, + name: 'Regear New Arrivals', + maintainers: ['EthanWng97'], + handler, + url: 'regear.arcteryx.com/shop/new-arrivals', +}; + +async function handler() { const url = `${host}/shop/new-arrivals`; const response = await got({ method: 'get', @@ -39,7 +62,7 @@ export default async (ctx) => { return data; }); - ctx.set('data', { + return { title: 'Arcteryx - Regear - New Arrivals', link: url, description: 'Arcteryx - Regear - New Arrivals', @@ -48,5 +71,5 @@ export default async (ctx) => { link: item.link, description: item.description, })), - }); -}; + }; +} diff --git a/lib/routes/arcteryx/router.ts b/lib/routes/arcteryx/router.ts deleted file mode 100644 index 1fa99517d..000000000 --- a/lib/routes/arcteryx/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/new-arrivals/:country/:gender', './new-arrivals'); - router.get('/outlet/:country/:gender', './outlet'); - router.get('/regear/new-arrivals', './regear-new-arrivals'); -}; diff --git a/lib/routes/arknights/announce.ts b/lib/routes/arknights/announce.ts index 286675c2b..505601307 100644 --- a/lib/routes/arknights/announce.ts +++ b/lib/routes/arknights/announce.ts @@ -1,9 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/announce/:platform?/:group?', + categories: ['game'], + example: '/arknights/announce', + parameters: { platform: '平台,默认为 Android', group: '分组,默认为 ALL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '游戏内公告', + maintainers: ['swwind'], + handler, + description: `平台 + + | 安卓服 | iOS 服 | B 服 | + | :-----: | :----: | :------: | + | Android | IOS | Bilibili | + + 分组 + + | 全部 | 系统公告 | 活动公告 | + | :--: | :------: | :------: | + | ALL | SYSTEM | ACTIVITY |`, +}; + +async function handler(ctx) { const { platform = 'Android', group = 'ALL' } = ctx.req.param(); let { @@ -48,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `《明日方舟》${group === 'SYSTEM' ? '系统' : group === 'ACTIVITY' ? '活动' : '全部'}公告`, link: 'https://ak.hypergryph.com/', item: announceList, - }); -}; + }; +} diff --git a/lib/routes/arknights/japan.ts b/lib/routes/arknights/japan.ts index 967807b85..a83fe94d0 100644 --- a/lib/routes/arknights/japan.ts +++ b/lib/routes/arknights/japan.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/japan', + categories: ['game'], + example: '/arknights/japan', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ak.arknights.jp/news', 'ak.arknights.jp/'], + }, + name: 'アークナイツ (日服新闻)', + maintainers: ['ofyark'], + handler, + url: 'ak.arknights.jp/news', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://www.arknights.jp:10014/news?lang=ja&limit=9&page=1', @@ -15,11 +38,11 @@ export default async (ctx) => { link: `https://www.arknights.jp/news/${item.id}`, })); - ctx.set('data', { + return { title: 'アークナイツ', link: 'https://www.arknights.jp/news', description: 'アークナイツ ニュース', language: 'ja', item: newsList, - }); -}; + }; +} diff --git a/lib/routes/arknights/maintainer.ts b/lib/routes/arknights/maintainer.ts deleted file mode 100644 index 444fe66d3..000000000 --- a/lib/routes/arknights/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/announce/:platform?/:group?': ['swwind'], - '/japan': ['ofyark'], - '/news': ['Astrian'], -}; diff --git a/lib/routes/arknights/namespace.ts b/lib/routes/arknights/namespace.ts new file mode 100644 index 000000000..1750ce795 --- /dev/null +++ b/lib/routes/arknights/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '明日方舟', + url: 'ak.arknights.jp', +}; diff --git a/lib/routes/arknights/news.ts b/lib/routes/arknights/news.ts index 598a58cf8..5a1204258 100644 --- a/lib/routes/arknights/news.ts +++ b/lib/routes/arknights/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/arknights/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ak-conf.hypergryph.com/*'], + }, + name: '游戏公告与新闻', + maintainers: ['Astrian'], + handler, + url: 'ak-conf.hypergryph.com/*', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://ak.hypergryph.com/news.html', @@ -35,9 +58,9 @@ export default async (ctx) => { .get() ); - ctx.set('data', { + return { title: '《明日方舟》游戏公告与新闻', link: 'https://ak.hypergryph.com/news.html', item: newslist, - }); -}; + }; +} diff --git a/lib/routes/arknights/radar.ts b/lib/routes/arknights/radar.ts deleted file mode 100644 index 946400993..000000000 --- a/lib/routes/arknights/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - 'arknights.jp': { - _name: '明日方舟', - ak: [ - { - title: 'アークナイツ(日服新闻)', - docs: 'https://docs.rsshub.app/routes/game#ming-ri-fang-zhou', - source: ['/news', '/'], - target: '/arknights/japan', - }, - ], - }, - 'hypergryph.com': { - _name: '明日方舟', - ak: [ - { - title: '游戏公告与新闻', - docs: 'https://docs.rsshub.app/routes/game#ming-ri-fang-zhou', - source: ['/news.html', '/'], - target: '/arknights/news', - }, - ], - 'ak-conf': [ - { - title: '游戏内公告', - docs: 'https://docs.rsshub.app/routes/game#ming-ri-fang-zhou', - source: ['/*'], - target: '/arknights/news', - }, - ], - 'monster-siren': [ - { - title: '塞壬唱片', - docs: 'https://docs.rsshub.app/routes/game#ming-ri-fang-zhou', - source: ['/info', '/'], - target: '/siren/news', - }, - ], - }, -}; diff --git a/lib/routes/arknights/router.ts b/lib/routes/arknights/router.ts deleted file mode 100644 index cc9a72280..000000000 --- a/lib/routes/arknights/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - // 《明日方舟》游戏内公告 - router.get('/announce/:platform?/:group?', './announce'); - // アークナイツ(明日方舟日服) - router.get('/japan', './japan'); - // 《明日方舟》游戏公告与新闻 - router.get('/news', './news'); -}; diff --git a/lib/routes/artstation/maintainer.ts b/lib/routes/artstation/maintainer.ts deleted file mode 100644 index e10039a10..000000000 --- a/lib/routes/artstation/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:handle': ['TonyRL'], -}; diff --git a/lib/routes/artstation/namespace.ts b/lib/routes/artstation/namespace.ts new file mode 100644 index 000000000..48d714be2 --- /dev/null +++ b/lib/routes/artstation/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ArtStation', + url: 'www.artstation.com', +}; diff --git a/lib/routes/artstation/radar.ts b/lib/routes/artstation/radar.ts deleted file mode 100644 index 9c5b031b8..000000000 --- a/lib/routes/artstation/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'artstation.com': { - _name: 'ArtStation', - www: [ - { - title: 'Artist Profolio', - docs: 'https://docs.rsshub.app/picture#artstation', - source: ['/:handle'], - target: '/artstation/:handle', - }, - ], - }, -}; diff --git a/lib/routes/artstation/router.ts b/lib/routes/artstation/router.ts deleted file mode 100644 index e5ba33ae4..000000000 --- a/lib/routes/artstation/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:handle', './user'); -}; diff --git a/lib/routes/artstation/user.ts b/lib/routes/artstation/user.ts index 306ddfd4e..197814005 100644 --- a/lib/routes/artstation/user.ts +++ b/lib/routes/artstation/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/:handle', + categories: ['picture'], + example: '/artstation/wlop', + parameters: { handle: 'Artist handle, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.artstation.com/:handle'], + }, + name: 'Artist Profolio', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const handle = ctx.req.param('handle'); const headers = { @@ -90,7 +112,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${userData.full_name} - ArtStation`, description: userData.headline, link: userData.permalink, @@ -98,5 +120,5 @@ export default async (ctx) => { icon: userData.large_avatar_url, image: userData.default_cover_url, item: items, - }); -}; + }; +} diff --git a/lib/routes/asiantolick/index.ts b/lib/routes/asiantolick/index.ts index 18646552c..0bb4262ed 100644 --- a/lib/routes/asiantolick/index.ts +++ b/lib/routes/asiantolick/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + radar: { + source: ['asiantolick.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'asiantolick.com/', +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 24; @@ -102,7 +115,7 @@ export default async (ctx) => { const title = $('title').text().split(/-/)[0].trim(); const icon = $('link[rel="icon"]').first().prop('href'); - ctx.set('data', { + return { item: items, title: title === 'Asian To Lick' ? title : `Asian To Lick - ${title}`, link: currentUrl, @@ -113,5 +126,5 @@ export default async (ctx) => { logo: icon, subtitle: title, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/asiantolick/maintainer.ts b/lib/routes/asiantolick/maintainer.ts deleted file mode 100644 index 90e83575a..000000000 --- a/lib/routes/asiantolick/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/': ['nczitzk'], - '/category/:id': ['nczitzk'], - '/page/news': ['nczitzk'], - '/page/:id': ['nczitzk'], - '/search/:keyword': ['nczitzk'], - '/tag/:id': ['nczitzk'], -}; diff --git a/lib/routes/asiantolick/namespace.ts b/lib/routes/asiantolick/namespace.ts new file mode 100644 index 000000000..277a3e082 --- /dev/null +++ b/lib/routes/asiantolick/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Asian to lick', + url: 'asiantolick.com', +}; diff --git a/lib/routes/asiantolick/radar.ts b/lib/routes/asiantolick/radar.ts deleted file mode 100644 index 4bcffe076..000000000 --- a/lib/routes/asiantolick/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'asiantolick.com': { - _name: 'Asian to lick', - '.': [ - { - title: 'Top rated', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-top-rated', - source: ['/'], - target: '/asiantolick', - }, - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-news', - source: ['/page/news'], - target: '/asiantolick/page/news', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-category', - source: ['/'], - target: (params, url) => { - url = new URL(url); - const id = url.href.match(/\/category\/(\w+)/)[1]; - - return `/asiantolick${id ? `/category/${id}` : ''}`; - }, - }, - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-tag', - source: ['/'], - target: (params, url) => { - url = new URL(url); - const id = url.href.match(/\/tag\/(\w+)/)[1]; - - return `/asiantolick${id ? `/tag/${id}` : ''}`; - }, - }, - { - title: 'Search', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-search', - source: ['/search/:keyword'], - target: '/asiantolick/search/:keyword', - }, - { - title: 'Page', - docs: 'https://docs.rsshub.app/routes/picture#asian-to-lick-page', - source: ['/page/:id'], - target: '/asiantolick/page/:id', - }, - ], - }, -}; diff --git a/lib/routes/asiantolick/router.ts b/lib/routes/asiantolick/router.ts deleted file mode 100644 index acb19ed1b..000000000 --- a/lib/routes/asiantolick/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/asus/bios.ts b/lib/routes/asus/bios.ts index 8a7aef44c..be60b63fc 100644 --- a/lib/routes/asus/bios.ts +++ b/lib/routes/asus/bios.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,7 +17,29 @@ const getProductID = async (model) => { }; }; -export default async (ctx) => { +export const route: Route = { + path: '/bios/:model', + categories: ['program-update'], + example: '/asus/bios/RT-AX88U', + parameters: { model: 'Model, can be found in product page' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['asus.com.cn/'], + }, + name: 'BIOS', + maintainers: ['Fatpandac'], + handler, + url: 'asus.com.cn/', +}; + +async function handler(ctx) { const model = ctx.req.param('model'); const { productID, url } = await getProductID(model); const biosAPI = `https://www.asus.com.cn/support/api/product.asmx/GetPDBIOS?website=cn&model=${model}&pdid=${productID}&sitelang=cn`; @@ -34,9 +57,9 @@ export default async (ctx) => { link: url, })); - ctx.set('data', { + return { title: `${model} BIOS`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/asus/gpu-tweak.ts b/lib/routes/asus/gpu-tweak.ts index cb3d3d261..3c0d593c0 100644 --- a/lib/routes/asus/gpu-tweak.ts +++ b/lib/routes/asus/gpu-tweak.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const pageUrl = 'https://www.asus.com/campaign/GPU-Tweak-III/tw/index.php'; -export default async (ctx) => { +export const route: Route = { + path: '/gpu-tweak', + categories: ['program-update'], + example: '/asus/gpu-tweak', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['asus.com/campaign/GPU-Tweak-III/*', 'asus.com/'], + }, + name: 'GPU Tweak', + maintainers: ['TonyRL'], + handler, + url: 'asus.com/campaign/GPU-Tweak-III/*', +}; + +async function handler() { const response = await got(pageUrl); const $ = load(response.data); @@ -20,12 +43,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), image: new URL($('head link[rel="shortcut icon"]').attr('href'), pageUrl).href, link: pageUrl, item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/asus/maintainer.ts b/lib/routes/asus/maintainer.ts deleted file mode 100644 index 33be88fc4..000000000 --- a/lib/routes/asus/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/bios/:model': ['Fatpandac'], - '/gpu-tweak': ['TonyRL'], -}; diff --git a/lib/routes/asus/namespace.ts b/lib/routes/asus/namespace.ts new file mode 100644 index 000000000..a8df4f686 --- /dev/null +++ b/lib/routes/asus/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ASUS', + url: 'asus.com.cn', +}; diff --git a/lib/routes/asus/radar.ts b/lib/routes/asus/radar.ts deleted file mode 100644 index 77128b348..000000000 --- a/lib/routes/asus/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'asus.com.cn': { - _name: 'Asus 华硕', - '.': [ - { - title: '固件', - docs: 'https://docs.rsshub.app/routes/program-update#hua-shuo', - source: ['/'], - target: '/asus/bios/:model', - }, - ], - }, - 'asus.com': { - _name: 'ASUS', - '.': [ - { - title: 'GPU Tweak', - docs: 'https://docs.rsshub.app/routes/program-update#hua-shuo', - source: ['/campaign/GPU-Tweak-III/*', '/'], - target: '/asus/gpu-tweak', - }, - ], - }, -}; diff --git a/lib/routes/asus/router.ts b/lib/routes/asus/router.ts deleted file mode 100644 index d809f7362..000000000 --- a/lib/routes/asus/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/bios/:model', './bios'); - router.get('/gpu-tweak', './gpu-tweak'); -}; diff --git a/lib/routes/atcoder/contest.ts b/lib/routes/atcoder/contest.ts index 03247a4c9..ebaf26a37 100644 --- a/lib/routes/atcoder/contest.ts +++ b/lib/routes/atcoder/contest.ts @@ -1,9 +1,47 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/contest/:language?/:rated?/:category?/:keyword?', + categories: ['programming'], + example: '/atcoder/contest', + parameters: { language: 'Language, `jp` as Japanese or `en` as English, English by default', rated: 'Rated Range, see below, all by default', category: 'Category, see below, all by default', keyword: 'Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Contests Archive', + maintainers: ['nczitzk'], + handler, + description: `Rated Range + + | ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) | + | ---------------------------- | ---------------------------- | ---------------------------- | + | 1 | 2 | 3 | + + Category + + | All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) | + | --- | ----------------------- | ------------ | ------------------- | + | 0 | 6 | 50 | 101 | + + | JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) | + | ----------- | -------------------- | ------------------------- | + | 200 | 1000 | 1001 | + + | Sponsored Parallel(unrated) | Optimization Contest | + | --------------------------- | -------------------- | + | 1002 | 1200 |`, +}; + +async function handler(ctx) { const status = ['action', 'upcoming', 'recent']; const language = ctx.req.param('language') ?? 'en'; @@ -56,10 +94,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: String(isStatus ? `${$(`#contest-table-${rated} h3`).text()} - AtCoder` : $('title').text()), link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/atcoder/maintainer.ts b/lib/routes/atcoder/maintainer.ts deleted file mode 100644 index 9df4d6be1..000000000 --- a/lib/routes/atcoder/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/post/:language?/:keyword?': ['nczitzk'], - '/contest/:language?/:rated?/:category?/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/atcoder/namespace.ts b/lib/routes/atcoder/namespace.ts new file mode 100644 index 000000000..0f4fa427f --- /dev/null +++ b/lib/routes/atcoder/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AtCoder', + url: 'atcoder.jp', +}; diff --git a/lib/routes/atcoder/post.ts b/lib/routes/atcoder/post.ts index c735a53ff..01ce18ee5 100644 --- a/lib/routes/atcoder/post.ts +++ b/lib/routes/atcoder/post.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/post/:language?/:keyword?', + categories: ['programming'], + example: '/atcoder/post', + parameters: { language: 'Language, `jp` as Japanese or `en` as English, English by default', keyword: 'Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Posts', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'en'; const keyword = ctx.req.param('keyword') ?? ''; @@ -30,9 +49,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${keyword ? `[${keyword}] - ` : ''}${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/atcoder/radar.ts b/lib/routes/atcoder/radar.ts deleted file mode 100644 index 60d94c1e5..000000000 --- a/lib/routes/atcoder/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'atcoder.jp': { - _name: 'AtCoder', - '.': [ - { - title: 'Posts', - docs: 'https://docs.rsshub.app/routes/programming#atcoder-posts', - source: ['/posts', '/'], - target: (params, url) => `/atcoder/post/${new URL(url).searchParams.get('lang') ?? 'en'}/${new URL(url).searchParams.get('keyword') ?? ''}`, - }, - { - title: 'Contests', - docs: 'https://docs.rsshub.app/routes/programming#atcoder-contests', - source: ['/contests/archive', '/contests'], - target: (params, url) => - `/atcoder/content/${new URL(url).searchParams.get('lang') ?? 'en'}/${new URL(url).searchParams.get('ratedType') ?? '0'}/${new URL(url).searchParams.get('category') ?? '0'}/${ - new URL(url).searchParams.get('keyword') ?? '' - }`, - }, - ], - }, -}; diff --git a/lib/routes/atcoder/router.ts b/lib/routes/atcoder/router.ts deleted file mode 100644 index 69bede3cd..000000000 --- a/lib/routes/atcoder/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/post/:language?/:keyword?', './post'); - router.get('/contest/:language?/:rated?/:category?/:keyword?', './contest'); -}; diff --git a/lib/routes/auto-stats/index.ts b/lib/routes/auto-stats/index.ts index d94907eac..87d4089fd 100644 --- a/lib/routes/auto-stats/index.ts +++ b/lib/routes/auto-stats/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import iconv from 'iconv-lite'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['other'], + example: '/auto-stats', + parameters: { category: '分类,见下表,默认为信息快递' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 信息快递 | 工作动态 | 专题分析 | + | -------- | -------- | -------- | + | xxkd | gzdt | ztfx |`, +}; + +async function handler(ctx) { const { category = 'xxkd' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -53,7 +75,7 @@ export default async (ctx) => { const subtitle = $('title').text().split(/——/).pop(); const image = new URL('images/logo.jpg', rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -62,5 +84,5 @@ export default async (ctx) => { image, subtitle, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/auto-stats/maintainer.ts b/lib/routes/auto-stats/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/auto-stats/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/auto-stats/namespace.ts b/lib/routes/auto-stats/namespace.ts new file mode 100644 index 000000000..54adee1c7 --- /dev/null +++ b/lib/routes/auto-stats/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国汽车工业协会统计信息网', + url: 'auto-stats.org.cn', +}; diff --git a/lib/routes/auto-stats/radar.ts b/lib/routes/auto-stats/radar.ts deleted file mode 100644 index 2b6500082..000000000 --- a/lib/routes/auto-stats/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'auto-stats.org.cn': { - _name: '中国汽车工业协会统计信息网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-xie-hui-tong-ji-xin-xi-wang-fen-lei', - source: ['/:category'], - target: (params) => { - const category = params.category; - - return `/auto-stats${category ? `/${category.replace(/\.asp$/, '')}` : ''}`; - }, - }, - { - title: '信息快递', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-xie-hui-tong-ji-xin-xi-wang-fen-lei', - source: ['/xxkd.asp'], - target: '/auto-stats/xxkd', - }, - { - title: '工作动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-xie-hui-tong-ji-xin-xi-wang-fen-lei', - source: ['/gzdt.asp'], - target: '/auto-stats/gzdt', - }, - { - title: '专题分析', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-xie-hui-tong-ji-xin-xi-wang-fen-lei', - source: ['/ztfx.asp'], - target: '/auto-stats/ztfx', - }, - ], - }, -}; diff --git a/lib/routes/auto-stats/router.ts b/lib/routes/auto-stats/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/auto-stats/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/baai/comments.ts b/lib/routes/baai/comments.ts index a364feb77..b44421e3e 100644 --- a/lib/routes/baai/comments.ts +++ b/lib/routes/baai/comments.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { baseUrl, apiHost } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hub/comments', + categories: ['programming'], + example: '/baai/hub/comments', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hub.baai.ac.cn/comments', 'hub.baai.ac.cn/'], + }, + name: '智源社区 - 评论', + maintainers: ['TonyRL'], + handler, + url: 'hub.baai.ac.cn/comments', +}; + +async function handler(ctx) { const responses = await got.all( Array.from( { @@ -26,9 +49,9 @@ export default async (ctx) => { guid: `baai:hub:comments:${item.id}`, })); - ctx.set('data', { + return { title: '评论 - 智源社区', link: `${baseUrl}/comments`, item: items, - }); -}; + }; +} diff --git a/lib/routes/baai/events.ts b/lib/routes/baai/events.ts index 8d09b7c99..47dd12d65 100644 --- a/lib/routes/baai/events.ts +++ b/lib/routes/baai/events.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, apiHost, parseEventDetail, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hub/events', + categories: ['programming'], + example: '/baai/hub/events', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hub.baai.ac.cn/events', 'hub.baai.ac.cn/'], + }, + name: '智源社区 - 活动', + maintainers: ['TonyRL'], + handler, + url: 'hub.baai.ac.cn/events', +}; + +async function handler(ctx) { const responses = await got.all( Array.from( { @@ -25,9 +48,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '活动 - 智源社区', link: `${baseUrl}/events`, item: items, - }); -}; + }; +} diff --git a/lib/routes/baai/hub.ts b/lib/routes/baai/hub.ts index 2f5789edc..6906534ec 100644 --- a/lib/routes/baai/hub.ts +++ b/lib/routes/baai/hub.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, apiHost, parseEventDetail, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/hub/:tagId/:sort?/:range?', '/hub/:tagId/:sort?', '/hub/:sort?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { tagId, sort = 'new', range } = ctx.req.param(); let title, description, brief, iconUrl; @@ -50,11 +58,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title ? `${title} - ` : ''}${description ? `${description} - ` : ''}智源社区`, description: brief, link: `${baseUrl}/?${tagId ? `tag_id=${tagId}&` : ''}sort=${sort}${range ? `&time_range=${range}` : ''}`, image: iconUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/baai/maintainer.ts b/lib/routes/baai/maintainer.ts deleted file mode 100644 index 29d891d0f..000000000 --- a/lib/routes/baai/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/hub/comments': ['TonyRL'], - '/hub/events': ['TonyRL'], - '/hub/:tagId?/:sort?/:range?': ['TonyRL'], -}; diff --git a/lib/routes/baai/namespace.ts b/lib/routes/baai/namespace.ts new file mode 100644 index 000000000..409fd300b --- /dev/null +++ b/lib/routes/baai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京智源人工智能研究院', + url: 'hub.baai.ac.cn', +}; diff --git a/lib/routes/baai/radar.ts b/lib/routes/baai/radar.ts deleted file mode 100644 index 4d8a5b3cb..000000000 --- a/lib/routes/baai/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'baai.ac.cn': { - _name: '北京智源人工智能研究院', - hub: [ - { - title: '智源社区', - docs: 'https://docs.rsshub.app/routes/programming#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan', - source: ['/'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - const tagId = searchParams.get('tag_id'); - const sort = searchParams.get('sort'); - const range = searchParams.get('time_range'); - return `/baai/hub${tagId ? `/${tagId}` : ''}${sort ? `/${sort}` : ''}${range ? `/${range}` : ''}`; - }, - }, - { - title: '活动 - 智源社区', - docs: 'https://docs.rsshub.app/routes/programming#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan', - source: ['/events', '/'], - target: '/baai/hub/events', - }, - { - title: '评论 - 智源社区', - docs: 'https://docs.rsshub.app/routes/programming#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan', - source: ['/comments', '/'], - target: '/baai/hub/comments', - }, - ], - }, -}; diff --git a/lib/routes/baai/router.ts b/lib/routes/baai/router.ts deleted file mode 100644 index e8565078a..000000000 --- a/lib/routes/baai/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/hub/comments', './comments'); - router.get('/hub/events', './events'); - router.get('/hub/:tagId/:sort?/:range?', './hub'); - router.get('/hub/:tagId/:sort?', './hub'); - router.get('/hub/:sort?', './hub'); -}; diff --git a/lib/routes/backlinko/blog.ts b/lib/routes/backlinko/blog.ts index ef5edfbde..8540dfb56 100644 --- a/lib/routes/backlinko/blog.ts +++ b/lib/routes/backlinko/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/backlinko/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['backlinko.com/blog', 'backlinko.com/'], + }, + name: 'Blog', + maintainers: ['TonyRL'], + handler, + url: 'backlinko.com/blog', +}; + +async function handler() { const baseUrl = 'https://backlinko.com'; const { data: response, url: link } = await got(`${baseUrl}/blog`); @@ -35,11 +58,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: pageProps.page.seo.title, description: pageProps.page.seo.metaDesc, link, language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/backlinko/maintainer.ts b/lib/routes/backlinko/maintainer.ts deleted file mode 100644 index f50adae69..000000000 --- a/lib/routes/backlinko/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['TonyRL'], -}; diff --git a/lib/routes/backlinko/namespace.ts b/lib/routes/backlinko/namespace.ts new file mode 100644 index 000000000..8ad09707c --- /dev/null +++ b/lib/routes/backlinko/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Backlinko', + url: 'backlinko.com', +}; diff --git a/lib/routes/backlinko/radar.ts b/lib/routes/backlinko/radar.ts deleted file mode 100644 index 14bb6a9ff..000000000 --- a/lib/routes/backlinko/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'backlinko.com': { - _name: 'Backlinko', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/blog#backlinko', - source: ['/blog', '/'], - target: '/backlinko/blog', - }, - ], - }, -}; diff --git a/lib/routes/backlinko/router.ts b/lib/routes/backlinko/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/backlinko/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/bad/index.ts b/lib/routes/bad/index.ts index 9455156ce..9df29dcd7 100644 --- a/lib/routes/bad/index.ts +++ b/lib/routes/bad/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://bad.news'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '' : getSubPath(ctx)}`; @@ -51,9 +59,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Bad.news - ${$('.active').text()}${$('.selected').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bad/maintainer.ts b/lib/routes/bad/maintainer.ts deleted file mode 100644 index 2543f2e41..000000000 --- a/lib/routes/bad/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path+': ['nczitzk'], -}; diff --git a/lib/routes/bad/namespace.ts b/lib/routes/bad/namespace.ts new file mode 100644 index 000000000..56c2be9f9 --- /dev/null +++ b/lib/routes/bad/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bad.news', + url: 'bad.news', +}; diff --git a/lib/routes/bad/radar.ts b/lib/routes/bad/radar.ts deleted file mode 100644 index 09beaa52b..000000000 --- a/lib/routes/bad/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bad.news': { - _name: 'Bad.news', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/new-media#bad-news-tong-yong', - source: ['/'], - target: (params, url) => `/bad${new URL(url).href.match(/bad\.news(.*?)/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/bad/router.ts b/lib/routes/bad/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/bad/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/baidu/gushitong/index.ts b/lib/routes/baidu/gushitong/index.ts index 00a3acd9b..a2d3e5b3a 100644 --- a/lib/routes/baidu/gushitong/index.ts +++ b/lib/routes/baidu/gushitong/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ const STATUS_MAP = { down: '下跌', }; -export default async (ctx) => { +export const route: Route = { + path: '/gushitong/index', + categories: ['finance'], + example: '/baidu/gushitong/index', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gushitong.baidu.com/'], + }, + name: '首页指数', + maintainers: ['CaoMeiYouRen'], + handler, + url: 'gushitong.baidu.com/', +}; + +async function handler() { const response = await got('https://finance.pae.baidu.com/api/indexbanner?market=ab&finClientType=pc'); const item = response.data.Result.map((e) => ({ title: e.name, @@ -21,11 +44,11 @@ export default async (ctx) => { }), link: `https://gushitong.baidu.com/index/${e.market}-${e.code}`, })); - ctx.set('data', { + return { title: '百度股市通', description: '百度股市通,汇聚全球金融市场的股票、基金、外汇、期货等实时行情,7*24小时覆盖专业财经资讯,提供客观、准确、及时、全面的沪深港美上市公司股价、财务、股东、分红等信息,让用户在复杂的金融市场,更简单的获取投资信息。', link: 'https://gushitong.baidu.com/', item, - }); -}; + }; +} diff --git a/lib/routes/baidu/maintainer.ts b/lib/routes/baidu/maintainer.ts deleted file mode 100644 index f0a6d38fd..000000000 --- a/lib/routes/baidu/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/gushitong/index': ['CaoMeiYouRen'], - '/search/:keyword': ['CaoMeiYouRen'], - '/tieba/forum/good/:kw/:cid?/:sortBy?': ['u3u'], - '/tieba/forum/:kw/:sortBy?': ['u3u'], - '/tieba/post/:id': ['u3u'], - '/tieba/post/lz/:id': ['u3u'], - '/tieba/search/:qw/:routeParams?': ['JimenezLi'], - '/tieba/user/:uid': ['igxlin', 'nczitzk'], - '/top/:board?': ['xyqfer'], -}; diff --git a/lib/routes/baidu/namespace.ts b/lib/routes/baidu/namespace.ts new file mode 100644 index 000000000..262deb052 --- /dev/null +++ b/lib/routes/baidu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '百度', + url: 'www.baidu.com', +}; diff --git a/lib/routes/baidu/radar.ts b/lib/routes/baidu/radar.ts deleted file mode 100644 index e2a55ffc2..000000000 --- a/lib/routes/baidu/radar.ts +++ /dev/null @@ -1,93 +0,0 @@ -export default { - 'baidu.com': { - _name: '百度', - www: [ - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/other#bai-du-sou-suo', - source: ['/'], - target: (params, url) => { - const keyword = new URL(url).searchParams.get('wd'); - return `/baidu/search/${keyword}`; - }, - }, - ], - gushitong: [ - { - title: '首页指数', - docs: 'https://docs.rsshub.app/routes/finance#bai-du-gu-shi-tong', - source: ['/'], - target: '/baidu/gushitong/index', - }, - ], - tieba: [ - { - title: '帖子列表', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: 'f', - target: (params, url) => { - const type = new URL(url).searchParams.get('tab'); - if (!type || type === 'main') { - return `/baidu/tieba/forum/${new URL(url).searchParams.get('kw')}`; - } - }, - }, - { - title: '精品帖子', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: 'f', - target: (params, url) => { - const type = new URL(url).searchParams.get('tab'); - if (type === 'good') { - return `/baidu/tieba/forum/good/${new URL(url).searchParams.get('kw')}`; - } - }, - }, - { - title: '帖子动态', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: '/p/:id', - target: '/baidu/tieba/post/:id', - }, - { - title: '只看楼主', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: '/p/:id', - target: '/baidu/tieba/post/lz/:id', - }, - { - title: '用户帖子', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: '/home/main', - target: (params, url) => { - const uid = new URL(url).searchParams.get('un'); - if (uid) { - return `/baidu/tieba/user/${uid}`; - } - }, - }, - { - title: '贴吧搜索', - docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba', - source: '/f/search/res', - target: (params, url) => { - const searchParams = new URL(url).searchParams; - const qw = searchParams.get('qw'); - const kw = searchParams.get('kw'); - if (qw) { - const route = `/baidu/tieba/search/${qw}`; - return kw ? `${route}/kw=${kw}` : route; - } - }, - }, - ], - top: [ - { - title: '热搜榜单', - docs: 'https://docs.rsshub.app/routes/other#bai-du-re-sou-bang-dan', - source: ['/board'], - target: (_, url) => `/baidu/top/${new URL(url).searchParams.get('tab')}`, - }, - ], - }, -}; diff --git a/lib/routes/baidu/router.ts b/lib/routes/baidu/router.ts deleted file mode 100644 index 32a203881..000000000 --- a/lib/routes/baidu/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/gushitong/index', './gushitong'); - router.get('/search/:keyword', './search'); - router.get('/tieba/forum/good/:kw/:cid?/:sortBy?', './tieba/forum'); - router.get('/tieba/forum/:kw/:sortBy?', './tieba/forum'); - router.get('/tieba/post/:id', './tieba/post'); - router.get('/tieba/post/lz/:id', './tieba/post'); - router.get('/tieba/search/:qw/:routeParams?', './tieba/search'); - router.get('/tieba/user/:uid', './tieba/user'); - router.get('/top/:board?', './top'); -}; diff --git a/lib/routes/baidu/search.ts b/lib/routes/baidu/search.ts index 588f9a5fa..ab54056f3 100644 --- a/lib/routes/baidu/search.ts +++ b/lib/routes/baidu/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,25 @@ import * as path from 'node:path'; const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['other'], + example: '/baidu/search/rss', + parameters: { keyword: '搜索关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const url = `https://www.baidu.com/s?wd=${encodeURIComponent(keyword)}`; const key = `baidu-search:${url}`; @@ -49,10 +68,10 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: `${keyword} - 百度搜索`, description: `${keyword} - 百度搜索`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/baidu/tieba/forum.ts b/lib/routes/baidu/tieba/forum.ts index 5baa32120..bf4298918 100644 --- a/lib/routes/baidu/tieba/forum.ts +++ b/lib/routes/baidu/tieba/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,25 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/tieba/forum/good/:kw/:cid?/:sortBy?', '/tieba/forum/:kw/:sortBy?'], + categories: ['bbs'], + example: '/baidu/tieba/forum/good/女图', + parameters: { kw: '吧名', cid: '精品分类,默认为 `0`(全部分类),如果不传 `cid` 则获取全部分类', sortBy: '排序方式:`created`, `replied`。默认为 `created`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '精品帖子', + maintainers: ['u3u'], + handler, +}; + +async function handler(ctx) { // sortBy: created, replied const { kw, cid = '0', sortBy = 'created' } = ctx.req.param(); @@ -58,10 +77,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${kw}吧`, description: load(data)('meta[name="description"]').attr('content'), link: `https://tieba.baidu.com/f?kw=${encodeURIComponent(kw)}`, item: list, - }); -}; + }; +} diff --git a/lib/routes/baidu/tieba/post.ts b/lib/routes/baidu/tieba/post.ts index a9b2ede0c..4debbdedf 100644 --- a/lib/routes/baidu/tieba/post.ts +++ b/lib/routes/baidu/tieba/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -31,7 +32,28 @@ async function getPost(id, lz = 0, pn = 7e6) { return data; } -export default async (ctx) => { +export const route: Route = { + path: ['/tieba/post/:id', '/tieba/post/lz/:id'], + categories: ['bbs'], + example: '/baidu/tieba/post/686961453', + parameters: { id: '帖子 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tieba.baidu.com/p/:id'], + }, + name: '帖子动态', + maintainers: ['u3u'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const lz = ctx.req.path.includes('lz') ? 1 : 0; const html = await getPost(id, lz); @@ -40,7 +62,7 @@ export default async (ctx) => { // .substr(3); const list = $('.p_postlist > [data-field]:not(:has(.ad_bottom_view))'); - ctx.set('data', { + return { title: lz ? `【只看楼主】${title}` : title, link: `https://tieba.baidu.com/p/${id}?see_lz=${lz}`, description: `${title}的最新回复`, @@ -79,5 +101,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/baidu/tieba/search.ts b/lib/routes/baidu/tieba/search.ts index 93367486f..0f8782b3e 100644 --- a/lib/routes/baidu/tieba/search.ts +++ b/lib/routes/baidu/tieba/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,33 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/tieba/search/:qw/:routeParams?', + categories: ['bbs'], + example: '/baidu/tieba/search/neuro', + parameters: { qw: '搜索关键词', routeParams: '额外参数;请参阅以下说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '贴吧搜索', + maintainers: ['JimenezLi'], + handler, + description: `| 键 | 含义 | 接受的值 | 默认值 | + | ------------ | ---------------------------------------------------------- | ------------- | ------ | + | kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 | + | only\_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 | + | rn | 返回条目的数量 | 1-20 | 20 | + | sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 | + + 用例:\`/baidu/tieba/search/neuro/kw=neurosama&only_thread=1&sm=2\``, +}; + +async function handler(ctx) { const qw = ctx.req.param('qw'); const query = new URLSearchParams(ctx.req.param('routeParams')); query.set('ie', 'utf-8'); @@ -28,7 +55,7 @@ export default async (ctx) => { const $ = load(data); const resultList = $('div.s_post'); - ctx.set('data', { + return { title: `${qw} - ${query.get('kw') || '百度贴'}吧搜索`, link, item: resultList.toArray().map((element) => { @@ -62,5 +89,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/baidu/tieba/user.ts b/lib/routes/baidu/tieba/user.ts index 3df50f256..73448bddb 100644 --- a/lib/routes/baidu/tieba/user.ts +++ b/lib/routes/baidu/tieba/user.ts @@ -1,9 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/tieba/user/:uid', + categories: ['bbs'], + example: '/baidu/tieba/user/斗鱼游戏君', + parameters: { uid: '用户 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户帖子', + maintainers: ['igxlin', 'nczitzk'], + handler, + description: `用户 ID 可以通过打开用户的主页后查看地址栏的 \`un\` 字段来获取。`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const response = await got(`https://tieba.baidu.com/home/main?un=${uid}`); @@ -14,7 +34,7 @@ export default async (ctx) => { const list = $('div.n_right.clearfix'); let imgurl; - ctx.set('data', { + return { title: `${name} 的贴吧`, link: `https://tieba.baidu.com/home/main?un=${uid}`, item: @@ -29,5 +49,5 @@ export default async (ctx) => { link: item.find('div.thread_name a').attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/baidu/top.ts b/lib/routes/baidu/top.ts index f9fed2fc2..443e6e011 100644 --- a/lib/routes/baidu/top.ts +++ b/lib/routes/baidu/top.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,28 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/top/:board?', + categories: ['other'], + example: '/baidu/top', + parameters: { board: '榜单,默认为 `realtime`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热搜榜单', + maintainers: ['xyqfer'], + handler, + description: `| 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 | + | -------- | ------ | ------ | -------- | ------ | ------ | + | realtime | novel | movie | teleplay | car | game |`, +}; + +async function handler(ctx) { const { board = 'realtime' } = ctx.req.param(); const link = `https://top.baidu.com/board?tab=${board}`; const { data: response } = await got(link); @@ -28,10 +50,10 @@ export default async (ctx) => { link: item.rawUrl, })); - ctx.set('data', { + return { title: `${data.curBoardName} - 百度热搜`, description: $('meta[name="description"]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bandcamp/live.ts b/lib/routes/bandcamp/live.ts index 1179f9e60..ebdca5e84 100644 --- a/lib/routes/bandcamp/live.ts +++ b/lib/routes/bandcamp/live.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/live', + categories: ['multimedia'], + example: '/bandcamp/live', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bandcamp.com/live_schedule'], + }, + name: 'Upcoming Live Streams', + maintainers: ['nczitzk'], + handler, + url: 'bandcamp.com/live_schedule', +}; + +async function handler() { const rootUrl = 'https://bandcamp.com'; const currentUrl = `${rootUrl}/live_schedule`; const response = await got({ @@ -33,9 +56,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bandcamp/maintainer.ts b/lib/routes/bandcamp/maintainer.ts deleted file mode 100644 index 1e3f7cfaf..000000000 --- a/lib/routes/bandcamp/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/tag/:tag?': ['nczitzk'], - '/live': ['nczitzk'], - '/weekly': ['nczitzk'], -}; diff --git a/lib/routes/bandcamp/namespace.ts b/lib/routes/bandcamp/namespace.ts new file mode 100644 index 000000000..70a481f47 --- /dev/null +++ b/lib/routes/bandcamp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bandcamp', + url: 'bandcamp.com', +}; diff --git a/lib/routes/bandcamp/radar.ts b/lib/routes/bandcamp/radar.ts deleted file mode 100644 index 924d2cec3..000000000 --- a/lib/routes/bandcamp/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'bandcamp.com': { - _name: 'Bandcamp', - '.': [ - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/multimedia#bandcamp', - source: ['/tag/:tag'], - target: '/bandcamp/tag/:tag', - }, - { - title: 'Upcoming Live Streams', - docs: 'https://docs.rsshub.app/routes/multimedia#bandcamp-upcoming-live-streams', - source: ['/live_schedule'], - target: '/bandcamp/live', - }, - { - title: 'Weekly', - docs: 'https://docs.rsshub.app/routes/multimedia#bandcamp', - source: ['/'], - target: '/bandcamp/weekly', - }, - ], - }, -}; diff --git a/lib/routes/bandcamp/router.ts b/lib/routes/bandcamp/router.ts deleted file mode 100644 index 129888253..000000000 --- a/lib/routes/bandcamp/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/tag/:tag?', './tag'); - router.get('/live', './live'); - router.get('/weekly', './weekly'); -}; diff --git a/lib/routes/bandcamp/tag.ts b/lib/routes/bandcamp/tag.ts index efbd73d36..1a86e1d77 100644 --- a/lib/routes/bandcamp/tag.ts +++ b/lib/routes/bandcamp/tag.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag?', + categories: ['multimedia'], + example: '/bandcamp/tag/united-kingdom', + parameters: { tag: 'Tag, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bandcamp.com/tag/:tag'], + target: '/tag/:tag', + }, + name: 'Tag', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const rootUrl = 'https://bandcamp.com'; @@ -39,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bandcamp/weekly.ts b/lib/routes/bandcamp/weekly.ts index b154c39c4..a170d456e 100644 --- a/lib/routes/bandcamp/weekly.ts +++ b/lib/routes/bandcamp/weekly.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly', + categories: ['multimedia'], + example: '/bandcamp/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bandcamp.com/'], + }, + name: 'Weekly', + maintainers: ['nczitzk'], + handler, + url: 'bandcamp.com/', +}; + +async function handler() { const rootUrl = 'https://bandcamp.com'; const apiUrl = `${rootUrl}/api/bcweekly/3/list`; const response = await got({ @@ -24,9 +47,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: 'Bandcamp Weekly', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bangumi/maintainer.ts b/lib/routes/bangumi/maintainer.ts deleted file mode 100644 index fb40073d9..000000000 --- a/lib/routes/bangumi/maintainer.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - // bangumi.moe - '/moe': ['nczitzk'], - '/moe/:tags?': ['nczitzk'], - // bangumi.online - '/online': ['devinmugen'], - // bangumi.tv - '/tv/calendar/today': ['magic-akari'], - '/tv/followrank': ['honue'], - '/tv/group/:id': ['SettingDust'], - '/tv/person/:id': ['ylc395'], - '/tv/subject/:id': ['SettingDust'], - '/tv/subject/:id/blogs': ['ylc395'], - '/tv/subject/:id/comments': ['ylc395'], - '/tv/subject/:id/topics': ['ylc395'], - '/tv/subject/:id/:type?/:showOriginalName?': ['JimenezLi'], - '/tv/topic/:id': ['ylc395'], - '/tv/user/blog/:id': ['nczitzk'], - '/tv/user/wish/:id': ['honue'], -}; diff --git a/lib/routes/bangumi/moe/index.ts b/lib/routes/bangumi/moe/index.ts index 33b5e931d..52abfd215 100644 --- a/lib/routes/bangumi/moe/index.ts +++ b/lib/routes/bangumi/moe/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/moe/*', + radar: { + source: ['bangumi.moe/'], + target: '/moe', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'bangumi.moe/', +}; + +async function handler(ctx) { const isLatest = getSubPath(ctx) === '/moe'; const rootUrl = 'https://bangumi.moe'; @@ -85,10 +98,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '萌番组 Bangumi Moe', link: isLatest || items.length === 0 ? rootUrl : `${rootUrl}/search/${tag_id.join('+')}`, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/bangumi/namespace.ts b/lib/routes/bangumi/namespace.ts new file mode 100644 index 000000000..c2670f8bc --- /dev/null +++ b/lib/routes/bangumi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'アニメ新番組', + url: 'bangumi.moe', +}; diff --git a/lib/routes/bangumi/online/online.ts b/lib/routes/bangumi/online/online.ts index 12a98dbcb..b50f2edca 100644 --- a/lib/routes/bangumi/online/online.ts +++ b/lib/routes/bangumi/online/online.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/online', + categories: ['anime'], + example: '/bangumi/online', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bangumi.online/'], + }, + name: 'Unknown', + maintainers: ['devinmugen'], + handler, + url: 'bangumi.online/', +}; + +async function handler() { const url = 'https://api.bangumi.online/serve/home'; const response = await got.post(url); @@ -23,9 +46,9 @@ export default async (ctx) => { pubDate: parseDate(item.create_time), })); - ctx.set('data', { + return { title: 'アニメ新番組', link: 'https://bangumi.online', item: items, - }); -}; + }; +} diff --git a/lib/routes/bangumi/radar.ts b/lib/routes/bangumi/radar.ts deleted file mode 100644 index de30c50ca..000000000 --- a/lib/routes/bangumi/radar.ts +++ /dev/null @@ -1,104 +0,0 @@ -const bangumiTV = { - _name: 'Bangumi 番组计划', - '.': [ - { - title: '小组话题', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/group/:id', - target: '/bangumi/tv/group/:id', - }, - { - title: '小组话题的新回复', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/group/topic/:id', - target: '/bangumi/tv/topic/:id', - }, - { - title: '现实人物的新作品', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/person/:id', - target: '/bangumi/tv/person/:id', - }, - { - title: '用户日志', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/user/:id', - target: '/bangumi/tv/user/blog/:id', - }, - { - title: '条目的讨论', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/subject/:id', - target: '/bangumi/tv/subject/:id/topics', - }, - { - title: '条目的评论', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/subject/:id', - target: '/bangumi/tv/subject/:id/blogs', - }, - { - title: '条目的章节', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/subject/:id', - target: '/bangumi/tv/subject/:id', - }, - { - title: '条目的吐槽箱', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/subject/:id', - target: '/bangumi/tv/subject/:id/comments', - }, - { - title: '放送列表', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/calendar', - target: '/bangumi/tv/calendar/today', - }, - { - title: '成员关注动画榜', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/anime', - target: '/bangumi/tv/followrank', - }, - { - title: '用户想看', - docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua', - source: '/anime/list/:id/wish', - target: '/bangumi/tv/user/wish/:id', - }, - ], -}; - -export default { - 'bangumi.moe': { - _name: '萌番組', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/anime#meng-fan-zu-zui-xin', - source: ['/'], - target: '/bangumi/moe', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/anime#meng-fan-zu-biao-qian', - source: ['/search/index'], - target: '/bangumi/moe/:tags?', - }, - ], - }, - 'bangumi.online': { - _name: 'アニメ新番組', - '.': [ - { - title: '當季新番', - docs: 'https://docs.rsshub.app/routes/anime#アニメ-xin-fan-zu-dang-ji-xin-fan', - source: ['/'], - target: '/bangumi/online', - }, - ], - }, - 'bangumi.tv': bangumiTV, - 'bgm.tv': bangumiTV, -}; diff --git a/lib/routes/bangumi/router.ts b/lib/routes/bangumi/router.ts deleted file mode 100644 index 52a0b8a5c..000000000 --- a/lib/routes/bangumi/router.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (router) => { - // bangumi.moe - router.get('/moe/*', './moe/index'); - // bangumi.online - router.get('/online', './online/online'); - // bangumi.tv - router.get('/tv/calendar/today', './tv/calendar/today'); - router.get('/tv/followrank', './tv/other/followrank'); - router.get('/tv/group/:id', './tv/group/topic'); - router.get('/tv/person/:id', './tv/person'); - router.get('/tv/subject/:id/:type?/:showOriginalName?', './tv/subject'); - router.get('/tv/topic/:id', './tv/group/reply'); - router.get('/tv/user/blog/:id', './tv/user/blog'); - router.get('/tv/user/wish/:id', './tv/user/wish'); -}; diff --git a/lib/routes/bangumi/tv/calendar/today.ts b/lib/routes/bangumi/tv/calendar/today.ts index fe6863b52..5d00e1d64 100644 --- a/lib/routes/bangumi/tv/calendar/today.ts +++ b/lib/routes/bangumi/tv/calendar/today.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import getData from './_base'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/calendar/today', + categories: ['anime'], + example: '/bangumi/tv/calendar/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/calendar'], + }, + name: '放送列表', + maintainers: ['magic-akari'], + handler, + url: 'bgm.tv/calendar', +}; + +async function handler() { const [list, data] = await getData(cache.tryGet); const siteMeta = data.siteMeta; @@ -26,7 +49,7 @@ export default async (ctx) => { bgm.image = images[bgm.bgmId]; } - ctx.set('data', { + return { title: 'bangumi 每日放送', link: 'https://bgm.tv/calendar', item: todayBgm.map((bgm) => { @@ -63,5 +86,5 @@ export default async (ctx) => { content: { html }, }; }), - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/group/reply.ts b/lib/routes/bangumi/tv/group/reply.ts index bf1d8a41a..1e9a484d3 100644 --- a/lib/routes/bangumi/tv/group/reply.ts +++ b/lib/routes/bangumi/tv/group/reply.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/topic/:id', + categories: ['anime'], + example: '/bangumi/tv/topic/367032', + parameters: { id: '话题 id, 在话题页面地址栏查看' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/group/topic/:id'], + }, + name: '小组话题的新回复', + maintainers: ['ylc395'], + handler, +}; + +async function handler(ctx) { // bangumi.tv未提供获取小组话题的API,因此仍需要通过抓取网页来获取 const topicID = ctx.req.param('id'); const link = `https://bgm.tv/group/topic/${topicID}`; @@ -42,7 +64,7 @@ export default async (ctx) => { link, }; - ctx.set('data', { + return { title: `${title}的最新回复`, link, item: [ @@ -55,5 +77,5 @@ export default async (ctx) => { })), postTopic, ], - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/group/topic.ts b/lib/routes/bangumi/tv/group/topic.ts index 65ff39817..32243f49f 100644 --- a/lib/routes/bangumi/tv/group/topic.ts +++ b/lib/routes/bangumi/tv/group/topic.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const base_url = 'https://bgm.tv'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/group/:id', + categories: ['anime'], + example: '/bangumi/tv/group/boring', + parameters: { id: '小组 id, 在小组页面地址栏查看' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/group/:id'], + }, + name: '小组话题', + maintainers: ['SettingDust'], + handler, +}; + +async function handler(ctx) { const groupID = ctx.req.param('id'); const link = `${base_url}/group/${groupID}/forum`; const { data: html } = await got(link); @@ -32,9 +54,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/other/followrank.ts b/lib/routes/bangumi/tv/other/followrank.ts index a7268fca0..dd03938a6 100644 --- a/lib/routes/bangumi/tv/other/followrank.ts +++ b/lib/routes/bangumi/tv/other/followrank.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/followrank', + categories: ['anime'], + example: '/bangumi/tv/followrank', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/anime'], + }, + name: '成员关注动画榜', + maintainers: ['honue'], + handler, + url: 'bgm.tv/anime', +}; + +async function handler() { const url = 'https://bgm.tv/anime'; const response = await got({ url, @@ -33,10 +56,10 @@ export default async (ctx) => { })), ]; - ctx.set('data', { + return { title: 'Bangumi 成员关注动画榜', link: url, item: items, description: `Bangumi 首页-成员关注动画榜`, - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/person/index.ts b/lib/routes/bangumi/tv/person/index.ts index b81da07d6..6355959d8 100644 --- a/lib/routes/bangumi/tv/person/index.ts +++ b/lib/routes/bangumi/tv/person/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/person/:id', + categories: ['anime'], + example: '/bangumi/tv/person/32943', + parameters: { id: '人物 id, 在人物页面的地址栏查看' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/person/:id'], + }, + name: '现实人物的新作品', + maintainers: ['ylc395'], + handler, +}; + +async function handler(ctx) { // bangumi.tv未提供获取“人物信息”的API,因此仍需要通过抓取网页来获取 const personID = ctx.req.param('id'); const link = `https://bgm.tv/person/${personID}/works?sort=date`; @@ -22,7 +44,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${personName}参与的作品`, link, item: works.map((c) => { @@ -34,5 +56,5 @@ export default async (ctx) => { pubDate: match ? parseDate(match[1], ['YYYY-MM-DD', 'YYYY-M-D']) : null, }; }), - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/subject/index.ts b/lib/routes/bangumi/tv/subject/index.ts index 218567c1e..92c05922c 100644 --- a/lib/routes/bangumi/tv/subject/index.ts +++ b/lib/routes/bangumi/tv/subject/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import getComments from './comments'; import getFromAPI from './offcial-subject-api'; import getEps from './ep'; import { queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/subject/:id/:type?/:showOriginalName?', + categories: ['anime'], + example: '/bangumi/tv/subject/328609/ep/true', + parameters: { id: '条目 id, 在条目页面的地址栏查看', type: '条目类型,可选值为 `ep`, `comments`, `blogs`, `topics`,默认为 `ep`', showOriginalName: '显示番剧标题原名,可选值 0/1/false/true,默认为 false' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/subject/:id'], + target: '/tv/subject/:id', + }, + name: '条目的通用路由格式', + maintainers: ['JimenezLi'], + handler, + description: `:::warning + 此通用路由仅用于对路由参数的描述,具体信息请查看下方与条目相关的路由 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const type = ctx.req.param('type') || 'ep'; const showOriginalName = queryToBoolean(ctx.req.param('showOriginalName')); @@ -25,4 +51,4 @@ export default async (ctx) => { throw new Error(`暂不支持对${type}的订阅`); } ctx.set('data', response); -}; +} diff --git a/lib/routes/bangumi/tv/user/blog.ts b/lib/routes/bangumi/tv/user/blog.ts index 412ad9e8e..369b5e4de 100644 --- a/lib/routes/bangumi/tv/user/blog.ts +++ b/lib/routes/bangumi/tv/user/blog.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/user/blog/:id', + categories: ['anime'], + example: '/bangumi/tv/user/blog/sai', + parameters: { id: '用户 id, 在用户页面地址栏查看' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/user/:id'], + }, + name: '用户日志', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const currentUrl = `https://bgm.tv/user/${ctx.req.param('id')}/blog`; const response = await got({ method: 'get', @@ -36,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bangumi/tv/user/wish.ts b/lib/routes/bangumi/tv/user/wish.ts index 06aaaa45a..cc378b8b7 100644 --- a/lib/routes/bangumi/tv/user/wish.ts +++ b/lib/routes/bangumi/tv/user/wish.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/user/wish/:id', + categories: ['anime'], + example: '/bangumi/tv/user/wish/sai', + parameters: { id: '用户 id, 在用户页面地址栏查看' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bgm.tv/anime/list/:id/wish'], + }, + name: '用户想看', + maintainers: ['honue'], + handler, +}; + +async function handler(ctx) { const userid = ctx.req.param('id'); const url = `https://bgm.tv/anime/list/${userid}/wish`; const response = await got({ @@ -29,10 +51,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${username}想看的动画`, link: url, item: items, description: `${username}想看的动画列表`, - }); -}; + }; +} diff --git a/lib/routes/baozimh/index.ts b/lib/routes/baozimh/index.ts index cbaffcbc6..50d34f327 100644 --- a/lib/routes/baozimh/index.ts +++ b/lib/routes/baozimh/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import * as path from 'node:path'; const rootUrl = 'https://www.baozimh.com'; -export default async (ctx) => { +export const route: Route = { + path: '/comic/:name', + categories: ['anime'], + example: '/baozimh/comic/guowangpaiming-shiricaofu', + parameters: { name: '漫画名称,在漫画链接可以得到(`comic/` 后的那段)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.baozimh.com/comic/:name'], + }, + name: '订阅漫画', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const url = `${rootUrl}/comic/${name}`; @@ -45,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `包子漫画-${comicTitle}`, description: $('.comics-detail__desc').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/baozimh/maintainer.ts b/lib/routes/baozimh/maintainer.ts deleted file mode 100644 index dbff47a04..000000000 --- a/lib/routes/baozimh/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/comic/:name': ['Fatpandac'], -}; diff --git a/lib/routes/baozimh/namespace.ts b/lib/routes/baozimh/namespace.ts new file mode 100644 index 000000000..bc361ba5d --- /dev/null +++ b/lib/routes/baozimh/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '包子漫画', + url: 'www.baozimh.com', +}; diff --git a/lib/routes/baozimh/radar.ts b/lib/routes/baozimh/radar.ts deleted file mode 100644 index 6bec1b276..000000000 --- a/lib/routes/baozimh/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'baozimh.com': { - _name: '包子漫画', - www: [ - { - title: '订阅漫画', - docs: 'https://docs.rsshub.app/routes/multimedia#bandcamp-upcoming-live-streams', - source: '/comic/:name', - target: '/baozimh/comic/:name', - }, - ], - }, -}; diff --git a/lib/routes/baozimh/router.ts b/lib/routes/baozimh/router.ts deleted file mode 100644 index 805c4ae71..000000000 --- a/lib/routes/baozimh/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/comic/:name', './index'); -}; diff --git a/lib/routes/barronschina/index.ts b/lib/routes/barronschina/index.ts index 81a6f908c..87d551508 100644 --- a/lib/routes/barronschina/index.ts +++ b/lib/routes/barronschina/index.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['finance'], + example: '/barronschina', + parameters: { id: '栏目 id,默认为快讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['barronschina.com.cn/'], + target: '/:category?', + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + url: 'barronschina.com.cn/', + description: `:::tip + 栏目 id 留空则返回快讯,在对应页地址栏 \`columnId=\` 后可以看到。 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'http://www.barronschina.com.cn'; @@ -63,9 +90,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text().split(',')[0], link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/barronschina/maintainer.ts b/lib/routes/barronschina/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/barronschina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/barronschina/namespace.ts b/lib/routes/barronschina/namespace.ts new file mode 100644 index 000000000..9b5e286a6 --- /dev/null +++ b/lib/routes/barronschina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '巴伦周刊中文版', + url: 'barronschina.com.cn', +}; diff --git a/lib/routes/barronschina/radar.ts b/lib/routes/barronschina/radar.ts deleted file mode 100644 index 92f6ae66f..000000000 --- a/lib/routes/barronschina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'barronschina.com.cn': { - _name: '巴伦周刊中文版', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/finance#ba-lun-zhou-kan-zhong-wen-ban-lan-mu', - source: ['/'], - target: '/barronschina/:category?', - }, - ], - }, -}; diff --git a/lib/routes/barronschina/router.ts b/lib/routes/barronschina/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/barronschina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/bast/index.ts b/lib/routes/bast/index.ts index 4645460cd..0e92e74be 100644 --- a/lib/routes/bast/index.ts +++ b/lib/routes/bast/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const colPath = getSubPath(ctx).replace(/^\//, '') || '32942'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -68,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bast/maintainer.ts b/lib/routes/bast/maintainer.ts deleted file mode 100644 index 2543f2e41..000000000 --- a/lib/routes/bast/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path+': ['nczitzk'], -}; diff --git a/lib/routes/bast/namespace.ts b/lib/routes/bast/namespace.ts new file mode 100644 index 000000000..4bc5c4878 --- /dev/null +++ b/lib/routes/bast/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京市科学技术协会', + url: 'bast.net.cn', +}; diff --git a/lib/routes/bast/radar.ts b/lib/routes/bast/radar.ts deleted file mode 100644 index 100f73616..000000000 --- a/lib/routes/bast/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bast.net.cn': { - _name: '北京市科学技术协会', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/new-media#bei-jing-shi-ke-xue-ji-shu-xie-hui-tong-yong', - source: ['/col', '/'], - target: (params, url) => `/bast/${new URL(url).href.match(/bast\.net\.cn\/(.*)/)[1].replace(/\/index\.html/, '')}`, - }, - ], - }, -}; diff --git a/lib/routes/bast/router.ts b/lib/routes/bast/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/bast/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/bbc/index.ts b/lib/routes/bbc/index.ts index b7f6ae8ea..fbf3930b2 100644 --- a/lib/routes/bbc/index.ts +++ b/lib/routes/bbc/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:site?/:channel?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let feed, title, link; // 为了向下兼容,这里 site 对应的是中文网文档中的 lang,英文网文档中的 channel @@ -69,11 +77,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, image: 'https://www.bbc.com/favicon.ico', description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/bbc/maintainer.ts b/lib/routes/bbc/maintainer.ts deleted file mode 100644 index ef543e64a..000000000 --- a/lib/routes/bbc/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:channel': ['HenryQW', 'DIYgod'], - '/:lang/:channel?': ['HenryQW'], -}; diff --git a/lib/routes/bbc/namespace.ts b/lib/routes/bbc/namespace.ts new file mode 100644 index 000000000..59f6de83e --- /dev/null +++ b/lib/routes/bbc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BBC', + url: 'bbc.com', +}; diff --git a/lib/routes/bbc/radar.ts b/lib/routes/bbc/radar.ts deleted file mode 100644 index c85140d12..000000000 --- a/lib/routes/bbc/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'bbc.com': { - _name: 'BBC', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#bbc', - }, - ], - }, -}; diff --git a/lib/routes/bbc/router.ts b/lib/routes/bbc/router.ts deleted file mode 100644 index 8f6a333a5..000000000 --- a/lib/routes/bbc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:site?/:channel?', './index'); -}; diff --git a/lib/routes/bbcnewslabs/maintainer.ts b/lib/routes/bbcnewslabs/maintainer.ts deleted file mode 100644 index 3f246ecce..000000000 --- a/lib/routes/bbcnewslabs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['elxy'], -}; diff --git a/lib/routes/bbcnewslabs/namespace.ts b/lib/routes/bbcnewslabs/namespace.ts new file mode 100644 index 000000000..5bb42bfa8 --- /dev/null +++ b/lib/routes/bbcnewslabs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BBC News Labs', + url: 'bbcnewslabs.co.uk', +}; diff --git a/lib/routes/bbcnewslabs/news.ts b/lib/routes/bbcnewslabs/news.ts index 9eda00460..8acef2e57 100644 --- a/lib/routes/bbcnewslabs/news.ts +++ b/lib/routes/bbcnewslabs/news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['programming'], + example: '/bbcnewslabs/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bbcnewslabs.co.uk/'], + }, + name: 'News', + maintainers: ['elxy'], + handler, + url: 'bbcnewslabs.co.uk/', +}; + +async function handler() { const rootUrl = 'https://bbcnewslabs.co.uk'; const response = await got({ method: 'get', @@ -23,9 +46,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: 'News - BBC News Labs', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bbcnewslabs/radar.ts b/lib/routes/bbcnewslabs/radar.ts deleted file mode 100644 index 895cedb14..000000000 --- a/lib/routes/bbcnewslabs/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bbcnewslabs.co.uk': { - _name: 'BBC News Labs', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/programming#bbc-news-labs', - source: '/', - target: '/bbcnewslabs/news', - }, - ], - }, -}; diff --git a/lib/routes/bbcnewslabs/router.ts b/lib/routes/bbcnewslabs/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/bbcnewslabs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/bdys/index.ts b/lib/routes/bdys/index.ts index 43fb13f44..a4b6daeff 100644 --- a/lib/routes/bdys/index.ts +++ b/lib/routes/bdys/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -14,7 +15,90 @@ import { config } from '@/config'; // Visit https://www.bdys.me for the list of domains const allowDomains = new Set(['52bdys.com', 'bde4.icu', 'bdys01.com']); -export default async (ctx) => { +export const route: Route = { + path: '/:caty?/:type?/:area?/:year?/:order?', + categories: ['multimedia'], + example: '/bdys', + parameters: { + caty: '影视类型,见下表,默认为 `all` 即不限', + type: '资源分类,见下表,默认为 `all` 即不限', + area: '制片地区,见下表,默认为 `all` 即不限', + year: '上映时间,此处填写年份不小于2000,默认为 `all` 即不限', + order: '影视排序,见下表,默认为更新时间', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['nczitzk'], + handler, + description: `#### 资源分类 + + | 不限 | 电影 | 电视剧 | + | ---- | ---- | ------ | + | all | 0 | 1 | + + #### 影视类型 + + | 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 | + | ---- | ------- | ------ | ---- | ------ | ------ | + | all | dongzuo | aiqing | xiju | kehuan | kongbu | + + | 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 | + | --------- | ----- | ------ | ------ | ------- | -------- | + | zhanzheng | wuxia | mohuan | juqing | donghua | jingsong | + + | 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 | + | -- | ------ | ------ | ------- | ----- | -------- | + | 3D | zainan | xuanyi | jingfei | wenyi | qingchun | + + | 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 | + | ------- | ------ | ---- | -------- | ------ | ----- | + | maoxian | fanzui | jilu | guzhuang | qihuan | guoyu | + + | 综艺 | 历史 | 运动 | 原创压制 | + | ------ | ----- | ------- | ---------- | + | zongyi | lishi | yundong | yuanchuang | + + | 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 | + | ----- | ----- | ---------- | ---- | ------ | ---- | + | meiju | hanju | guoju | riju | yingju | deju | + + | 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 | + | ---- | ---- | ----- | ------- | -------- | ----- | + | eju | baju | jiaju | spanish | yidaliju | taiju | + + | 港台剧 | 法剧 | 澳剧 | + | --------- | ---- | ---- | + | gangtaiju | faju | aoju | + + #### 制片地区 + + | 大陆 | 中国香港 | 中国台湾 | + | ---- | -------- | -------- | + + | 美国 | 英国 | 日本 | 韩国 | 法国 | + | ---- | ---- | ---- | ---- | ---- | + + | 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 | + | ---- | ---- | ------ | ------ | -------- | + + | 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 | + | ------ | ---- | ---- | ---- | ------ | ------ | + + #### 影视排序 + + | 更新时间 | 豆瓣评分 | + | -------- | -------- | + | 0 | 1 |`, +}; + +async function handler(ctx) { const caty = ctx.req.param('caty') || 'all'; const type = ctx.req.param('type') || 'all'; const area = ctx.req.param('area') || 'all'; @@ -94,9 +178,9 @@ export default async (ctx) => { items.push(data); } - ctx.set('data', { + return { title: '哔嘀影视', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bdys/maintainer.ts b/lib/routes/bdys/maintainer.ts deleted file mode 100644 index 696501546..000000000 --- a/lib/routes/bdys/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:caty?/:type?/:area?/:year?/:order?': ['nczitzk'], -}; diff --git a/lib/routes/bdys/namespace.ts b/lib/routes/bdys/namespace.ts new file mode 100644 index 000000000..d810d855c --- /dev/null +++ b/lib/routes/bdys/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哔嘀影视', + url: '52bdys.com', + description: `:::tip +哔嘀影视有多个备用域名,路由默认使用域名 \`https://bdys01.com\`。若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://bde4.icu\`,则在所有哔嘀影视路由最后加上 \`?domain=bde4.icu\` 即可,此时路由为 [\`/bdys?domain=bde4.icu\`](https://rsshub.app/bdys?domain=bde4.icu) +:::`, +}; diff --git a/lib/routes/bdys/radar.ts b/lib/routes/bdys/radar.ts deleted file mode 100644 index 593f3ac55..000000000 --- a/lib/routes/bdys/radar.ts +++ /dev/null @@ -1,20 +0,0 @@ -const bdys = { - _name: '哔嘀影视', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/multimedia#bi-di-ying-shi', - source: ['/s/:caty'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/bdys/${params.caty}/${searchParams.get('type') || 'all'}/${searchParams.get('area') || 'all'}/${searchParams.get('year') || 'all'}/${searchParams.get('order') || '0'}`; - }, - }, - ], -}; - -export default { - '52bdys.com': bdys, - 'bde4.icu': bdys, - 'bdys01.com': bdys, -}; diff --git a/lib/routes/bdys/router.ts b/lib/routes/bdys/router.ts deleted file mode 100644 index 320452cf0..000000000 --- a/lib/routes/bdys/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:caty?/:type?/:area?/:year?/:order?', './index'); -}; diff --git a/lib/routes/behance/maintainer.ts b/lib/routes/behance/maintainer.ts deleted file mode 100644 index 1653747d4..000000000 --- a/lib/routes/behance/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:user/:type?': ['MisteryMonster'], -}; diff --git a/lib/routes/behance/namespace.ts b/lib/routes/behance/namespace.ts new file mode 100644 index 000000000..07fcc852a --- /dev/null +++ b/lib/routes/behance/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Behance', + url: 'www.behance.net', +}; diff --git a/lib/routes/behance/radar.ts b/lib/routes/behance/radar.ts deleted file mode 100644 index f7d70142f..000000000 --- a/lib/routes/behance/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'behance.net': { - _name: 'Behance', - www: [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/design#behance-yong-hu-zuo-pin', - source: ['/:user', '/:user/:types', '/gallery/:galleryid/:galleryname'], - target: (params, url, document) => { - let type = ''; - if (params.types && params.types.match('appreciated')) { - type = '/appreciated'; - } - const uid = /gallery\/\d+/.test(url) - ? document && document.querySelector('.e2e-project-avatar').childNodes[0].attributes[1].value.match(/behance.net\/(.*)/)[1] - : document && document.querySelector('html').innerHTML.match(/([^/]+)\/insights/)[1]; - - return `/behance/${uid}${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/behance/router.ts b/lib/routes/behance/router.ts deleted file mode 100644 index 831b60dc3..000000000 --- a/lib/routes/behance/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:user/:type?', './user'); -}; diff --git a/lib/routes/behance/user.ts b/lib/routes/behance/user.ts index 2e367b46c..35e61a4dc 100644 --- a/lib/routes/behance/user.ts +++ b/lib/routes/behance/user.ts @@ -1,9 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:user/:type?', + categories: ['design'], + example: '/behance/mishapetrick', + parameters: { user: 'username', type: 'type, `projects` or `appreciated`, `projects` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Works', + maintainers: ['MisteryMonster'], + handler, + description: `Behance user's profile URL, like [https://www.behance.net/mishapetrick](https://www.behance.net/mishapetrick) the username will be \`mishapetrick\`。`, +}; + +async function handler(ctx) { const user = ctx.req.param('user') ?? ''; const type = ctx.req.param('type') ?? 'projects'; @@ -50,7 +70,7 @@ export default async (ctx) => { return description; }) ); - ctx.set('data', { + return { title: `${data.profile.owner.first_name} ${data.profile.owner.last_name}'s ${type}`, link: data.profile.owner.url, item: list.map((item, index) => { @@ -64,5 +84,5 @@ export default async (ctx) => { pubDate: parseDate(item.published_on * 1000), }; }), - }); -}; + }; +} diff --git a/lib/routes/bellroy/maintainer.ts b/lib/routes/bellroy/maintainer.ts deleted file mode 100644 index 24f519ee8..000000000 --- a/lib/routes/bellroy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/new-releases': ['EthanWng97'], -}; diff --git a/lib/routes/bellroy/namespace.ts b/lib/routes/bellroy/namespace.ts new file mode 100644 index 000000000..de98f41da --- /dev/null +++ b/lib/routes/bellroy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bellroy', + url: 'bellroy.com', +}; diff --git a/lib/routes/bellroy/new-releases.ts b/lib/routes/bellroy/new-releases.ts index 3b8e372ae..dd16f3d2f 100644 --- a/lib/routes/bellroy/new-releases.ts +++ b/lib/routes/bellroy/new-releases.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/new-releases', + categories: ['shopping'], + example: '/bellroy/new-releases', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bellroy.com/collection/new-releases', 'bellroy.com/'], + }, + name: 'New Releases', + maintainers: ['EthanWng97'], + handler, + url: 'bellroy.com/collection/new-releases', +}; + +async function handler() { const host = 'https://bellroy.com'; const url = 'https://production.products.boobook-services.com/products'; const response = await got({ @@ -14,7 +37,7 @@ export default async (ctx) => { }); const data = response.data.products; - ctx.set('data', { + return { title: 'Bellroy - New Releases', link: 'https://bellroy.com/collection/new-releases', description: 'Bellroy - New Releases', @@ -22,5 +45,5 @@ export default async (ctx) => { title: item.attributes.name + ' - ' + item.attributes.dimensions.color, link: host + item.attributes.canonical_uri, })), - }); -}; + }; +} diff --git a/lib/routes/bellroy/radar.ts b/lib/routes/bellroy/radar.ts deleted file mode 100644 index 23fae55a0..000000000 --- a/lib/routes/bellroy/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bellroy.com': { - _name: 'Bellroy', - '.': [ - { - title: '新发布', - docs: 'https://docs.rsshub.app/routes/shopping#bellroy', - source: ['/collection/new-releases', '/'], - target: '/bellroy/new-releases', - }, - ], - }, -}; diff --git a/lib/routes/bellroy/router.ts b/lib/routes/bellroy/router.ts deleted file mode 100644 index bff3ebf29..000000000 --- a/lib/routes/bellroy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new-releases', './new-releases'); -}; diff --git a/lib/routes/bendibao/maintainer.ts b/lib/routes/bendibao/maintainer.ts deleted file mode 100644 index 13ca6b82b..000000000 --- a/lib/routes/bendibao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:city': ['nczitzk'], -}; diff --git a/lib/routes/bendibao/namespace.ts b/lib/routes/bendibao/namespace.ts new file mode 100644 index 000000000..62a7d9153 --- /dev/null +++ b/lib/routes/bendibao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '本地宝', + url: 'bendibao.com', +}; diff --git a/lib/routes/bendibao/news.ts b/lib/routes/bendibao/news.ts index 11608fd66..7a20683f9 100644 --- a/lib/routes/bendibao/news.ts +++ b/lib/routes/bendibao/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,39 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:city', + categories: ['new-media'], + example: '/bendibao/news/bj', + parameters: { city: '城市缩写,可在该城市页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bendibao.com/'], + }, + name: '焦点资讯', + maintainers: ['nczitzk'], + handler, + url: 'bendibao.com/', + description: `| 城市名 | 缩写 | + | ------ | ---- | + | 北京 | bj | + | 上海 | sh | + | 广州 | gz | + | 深圳 | sz | + + 更多城市请参见 [这里](http://www.bendibao.com/city.htm) + + > **香港特别行政区** 和 **澳门特别行政区** 的本地宝城市页面不更新资讯。`, +}; + +async function handler(ctx) { const city = ctx.req.param('city'); if (!isValidHost(city)) { throw new Error('Invalid city'); @@ -102,9 +135,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bendibao/radar.ts b/lib/routes/bendibao/radar.ts deleted file mode 100644 index f1a3f5ea0..000000000 --- a/lib/routes/bendibao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bendibao.com': { - _name: '本地宝', - '.': [ - { - title: '焦点资讯', - docs: 'https://docs.rsshub.app/routes/new-media#ben-di-bao-jiao-dian-zi-xun', - source: '/', - target: '/bendibao/news/:city', - }, - ], - }, -}; diff --git a/lib/routes/bendibao/router.ts b/lib/routes/bendibao/router.ts deleted file mode 100644 index b9fc4def1..000000000 --- a/lib/routes/bendibao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:city', './news'); -}; diff --git a/lib/routes/bgmlist/maintainer.ts b/lib/routes/bgmlist/maintainer.ts deleted file mode 100644 index 9a6201ccd..000000000 --- a/lib/routes/bgmlist/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/onair/:lang?': ['x2cf'], -}; diff --git a/lib/routes/bgmlist/namespace.ts b/lib/routes/bgmlist/namespace.ts new file mode 100644 index 000000000..306f9a9c6 --- /dev/null +++ b/lib/routes/bgmlist/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '番组放送', + url: 'bgmlist.com', +}; diff --git a/lib/routes/bgmlist/onair.ts b/lib/routes/bgmlist/onair.ts index 9c64bfe36..10aba10d4 100644 --- a/lib/routes/bgmlist/onair.ts +++ b/lib/routes/bgmlist/onair.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,12 +7,30 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/onair/:lang?', + categories: ['anime'], + example: '/bgmlist/onair/zh-Hans', + parameters: { lang: '语言' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '开播提醒', + maintainers: ['x2cf'], + handler, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang'); const { data: sites } = await got('https://bgmlist.com/api/v1/bangumi/site'); const { data } = await got('https://bgmlist.com/api/v1/bangumi/onair'); - ctx.set('data', { + return { title: '番组放送 开播提醒', link: 'https://bgmlist.com/', item: data.items.map((item) => { @@ -31,5 +50,5 @@ export default async (ctx) => { guid: item.id, }; }), - }); -}; + }; +} diff --git a/lib/routes/bgmlist/radar.ts b/lib/routes/bgmlist/radar.ts deleted file mode 100644 index e56abd383..000000000 --- a/lib/routes/bgmlist/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bgmlist.com': { - _name: '番组放送', - '.': [ - { - title: '开播提醒', - docs: 'https://docs.rsshub.app/routes/anime#fan-zu-fang-song', - source: ['/'], - target: '/bgmlist/onair/zh-Hans', - }, - ], - }, -}; diff --git a/lib/routes/bgmlist/router.ts b/lib/routes/bgmlist/router.ts deleted file mode 100644 index f6ac19a0d..000000000 --- a/lib/routes/bgmlist/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/onair/:lang?', './onair'); -}; diff --git a/lib/routes/bigquant/collections.ts b/lib/routes/bigquant/collections.ts index 304f50c85..64b2b7c93 100644 --- a/lib/routes/bigquant/collections.ts +++ b/lib/routes/bigquant/collections.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; @@ -5,7 +6,29 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/collections', + categories: ['finance'], + example: '/bigquant/collections', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bigquant.com/'], + }, + name: '专题报告', + maintainers: ['nczitzk'], + handler, + url: 'bigquant.com/', +}; + +async function handler() { const rootUrl = 'https://bigquant.com'; const currentUrl = `${rootUrl}/wiki/api/documents.list`; @@ -28,9 +51,9 @@ export default async (ctx) => { pubDate: parseDate(item.publishedAt), })); - ctx.set('data', { + return { title: '专题报告 - AI量化知识库 - BigQuant', link: `${rootUrl}/wiki/collections/c6874e5d-7f45-4e90-8cd9-5e43df3b44ef`, item: items, - }); -}; + }; +} diff --git a/lib/routes/bigquant/maintainer.ts b/lib/routes/bigquant/maintainer.ts deleted file mode 100644 index 5bfb8b7b7..000000000 --- a/lib/routes/bigquant/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/collections': ['nczitzk'], -}; diff --git a/lib/routes/bigquant/namespace.ts b/lib/routes/bigquant/namespace.ts new file mode 100644 index 000000000..ededdee2d --- /dev/null +++ b/lib/routes/bigquant/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BigQuant', + url: 'bigquant.com', +}; diff --git a/lib/routes/bigquant/radar.ts b/lib/routes/bigquant/radar.ts deleted file mode 100644 index cc51c240e..000000000 --- a/lib/routes/bigquant/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bigquant.com': { - _name: 'BigQuant', - '.': [ - { - title: '专题报告', - docs: 'https://docs.rsshub.app/routes/finance#bigquant-zhuan-ti-bao-gao', - source: '/', - target: '/bigquant/collections', - }, - ], - }, -}; diff --git a/lib/routes/bigquant/router.ts b/lib/routes/bigquant/router.ts deleted file mode 100644 index 80d64c6b3..000000000 --- a/lib/routes/bigquant/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/collections', './collections'); -}; diff --git a/lib/routes/bilibili/app.ts b/lib/routes/bilibili/app.ts index 35b388ddd..f42c7dd78 100644 --- a/lib/routes/bilibili/app.ts +++ b/lib/routes/bilibili/app.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; const config = { @@ -8,7 +9,28 @@ const config = { android_tv_yst: 'TV 版', }; -export default async (ctx) => { +export const route: Route = { + path: '/app/:id?', + categories: ['program-update'], + example: '/bilibili/app/android', + parameters: { id: '客户端 id,见下表,默认为安卓版' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '更新情报', + maintainers: ['nczitzk'], + handler, + description: `| 安卓版 | iPhone 版 | iPad HD 版 | UWP 版 | TV 版 | +| ------- | --------- | ---------- | ------ | ---------------- | +| android | iphone | ipad | win | android\_tv\_yst |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') || 'android'; const rootUrl = 'https://app.bilibili.com'; @@ -25,9 +47,9 @@ export default async (ctx) => { description: `
  • ${item.desc.split('\n-').join('
  • -')}
  • `, })); - ctx.set('data', { + return { title: `哔哩哔哩更新情报 - ${config[id]}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bilibili/article.ts b/lib/routes/bilibili/article.ts index e9bd984b0..2f88b8d45 100644 --- a/lib/routes/bilibili/article.ts +++ b/lib/routes/bilibili/article.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/article/:uid', + categories: ['social-media'], + example: '/bilibili/user/article/334958638', + parameters: { uid: '用户 id, 可在 UP 主主页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + }, + name: 'UP 主专栏', + maintainers: ['lengthmin', 'Qixingchen'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const name = await cache.getUsernameFromUID(uid); const response = await got({ @@ -29,10 +51,10 @@ export default async (ctx) => { return single; }) ); - ctx.set('data', { + return { title, link, description, item, - }); -}; + }; +} diff --git a/lib/routes/bilibili/audio.ts b/lib/routes/bilibili/audio.ts index 62b67c2d6..5071ac56c 100644 --- a/lib/routes/bilibili/audio.ts +++ b/lib/routes/bilibili/audio.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; const audio = 'https://www.bilibili.com/audio/au'; -export default async (ctx) => { +export const route: Route = { + path: '/audio/:id', + categories: ['social-media'], + example: '/bilibili/audio/10624', + parameters: { id: '歌单 id, 可在歌单页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '歌单', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = Number.parseInt(ctx.req.param('id')); const link = `https://www.bilibili.com/audio/am${id}`; @@ -33,10 +52,10 @@ export default async (ctx) => { return single; }); - ctx.set('data', { + return { title, link, description: introduction, item: out, - }); -}; + }; +} diff --git a/lib/routes/bilibili/bangumi.ts b/lib/routes/bilibili/bangumi.ts index deabec6a1..7e2ee8fe8 100644 --- a/lib/routes/bilibili/bangumi.ts +++ b/lib/routes/bilibili/bangumi.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: ['/bangumi/:seasonid', '/bangumi/media/:mediaid'], + name: 'Unknown', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { let seasonid = ctx.req.param('seasonid'); const mediaid = ctx.req.param('mediaid'); @@ -42,11 +50,11 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: mediaData?.mediaInfo.title, link: `https://www.bilibili.com/bangumi/media/md${mediaData?.mediaInfo.media_id}/`, image: mediaData?.mediaInfo.cover, description: mediaData?.mediaInfo.evaluate, item: episodes, - }); -}; + }; +} diff --git a/lib/routes/bilibili/coin.ts b/lib/routes/bilibili/coin.ts index e79a0d810..d8a1bf58d 100644 --- a/lib/routes/bilibili/coin.ts +++ b/lib/routes/bilibili/coin.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/coin/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/coin/208259', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/coin/:uid', + }, + name: 'UP 主投币视频', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); @@ -20,7 +43,7 @@ export default async (ctx) => { throw new Error(message ?? code); } - ctx.set('data', { + return { title: `${name} 的 bilibili 投币视频`, link: `https://space.bilibili.com/${uid}`, description: `${name} 的 bilibili 投币视频`, @@ -31,5 +54,5 @@ export default async (ctx) => { link: item.time > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/danmaku.ts b/lib/routes/bilibili/danmaku.ts index 870dceb89..997e54daf 100644 --- a/lib/routes/bilibili/danmaku.ts +++ b/lib/routes/bilibili/danmaku.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import cache from './cache'; import got from '@/utils/got'; @@ -11,7 +12,25 @@ const processFloatTime = (time) => { return `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; }; -export default async (ctx) => { +export const route: Route = { + path: '/video/danmaku/:bvid/:pid?', + categories: ['social-media'], + example: '/bilibili/video/danmaku/BV1vA411b7ip/1', + parameters: { bvid: '视频AV号,可在视频页 URL 中找到', pid: '分P号,不填默认为1' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '视频弹幕', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { let bvid = ctx.req.param('bvid'); let aid; if (!bvid.startsWith('BV')) { @@ -45,7 +64,7 @@ export default async (ctx) => { danmakuList = danmakuList.reverse().slice(0, limit); - ctx.set('data', { + return { title: `${videoName} 的 弹幕动态`, link, description: `${videoName} 的 弹幕动态`, @@ -55,5 +74,5 @@ export default async (ctx) => { guid: `${cid}-${item.p.split(',')[4]}-${item.p.split(',')[7]}`, link, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index a8015a874..46456c456 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import JSONbig from 'json-bigint'; @@ -67,7 +68,43 @@ import cacheIn from './cache'; - cover 直播间封面 */ -export default async (ctx) => { +export const route: Route = { + path: '/user/dynamic/:uid/:routeParams?', + categories: ['social-media'], + example: '/bilibili/user/dynamic/2267573', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', routeParams: '额外参数;请参阅以下说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/dynamic/:uid', + }, + name: 'UP 主动态', + maintainers: ['DIYgod', 'zytomorrow', 'CaoMeiYouRen', 'JimenezLi'], + handler, + description: `| 键 | 含义 | 接受的值 | 默认值 | + | ------------ | --------------------------------- | -------------- | ------ | + | showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | + | disableEmbed | 关闭内嵌视频 | 0/1/true/false | false | + | useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | + | directLink | 使用内容直链 | 0/1/true/false | false | + + 用例:\`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1\` + + :::tip[动态的专栏显示全文] + 动态的专栏显示全文请使用通用参数里的 \`mode=fulltext\` + + 举例: bilibili 专栏全文输出 /bilibili/user/dynamic/2267573/?mode=fulltext + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false); @@ -236,11 +273,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${author} 的 bilibili 动态`, link: `https://space.bilibili.com/${uid}/dynamic`, description: `${author} 的 bilibili 动态`, image: face, item: items, - }); -}; + }; +} diff --git a/lib/routes/bilibili/fav.ts b/lib/routes/bilibili/fav.ts index 849b191c0..0316ee172 100644 --- a/lib/routes/bilibili/fav.ts +++ b/lib/routes/bilibili/fav.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/fav/:uid/:fid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/fav/756508/50948568', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', fid: '收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'UP 主非默认收藏夹', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { const fid = ctx.req.param('fid'); const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); @@ -23,7 +42,7 @@ export default async (ctx) => { const userName = data.info.upper.name; const favName = data.info.title; - ctx.set('data', { + return { title: `${userName} 的 bilibili 收藏夹 ${favName}`, link: `https://space.bilibili.com/${uid}/#/favlist?fid=${fid}`, description: `${userName} 的 bilibili 收藏夹 ${favName}`, @@ -37,5 +56,5 @@ export default async (ctx) => { link: item.fav_time > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.id}`, author: item.upper.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/followers.ts b/lib/routes/bilibili/followers.ts index ba9ee195e..a218408c1 100644 --- a/lib/routes/bilibili/followers.ts +++ b/lib/routes/bilibili/followers.ts @@ -1,8 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/user/followers/:uid/:loginUid', + categories: ['social-media'], + example: '/bilibili/user/followers/2267573/3', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', loginUid: '用于登入的用户id,需要配置对应的 Cookie 值' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/followers/:uid', + }, + name: 'UP 主粉丝', + maintainers: ['Qixingchen'], + handler, + description: `:::warning + UP 主粉丝现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const loginUid = ctx.req.param('loginUid'); @@ -35,7 +61,7 @@ export default async (ctx) => { } const data = response.data.data.list; - ctx.set('data', { + return { title: `${name} 的 bilibili 粉丝`, link: `https://space.bilibili.com/${uid}/#/fans/fans`, description: `${name} 的 bilibili 粉丝`, @@ -45,5 +71,5 @@ export default async (ctx) => { pubDate: new Date(item.mtime * 1000), link: `https://space.bilibili.com/${item.mid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/followings-article.ts b/lib/routes/bilibili/followings-article.ts index 0d5969065..aabba3757 100644 --- a/lib/routes/bilibili/followings-article.ts +++ b/lib/routes/bilibili/followings-article.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/followings/article/:uid', + categories: ['social-media'], + example: '/bilibili/followings/article/99800931', + parameters: { uid: '用户 id' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户关注专栏', + maintainers: ['woshiluo'], + handler, + description: `:::warning + 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = String(ctx.req.param('uid')); const name = await cache.getUsernameFromUID(uid); @@ -40,9 +62,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${name} 关注专栏动态`, link: `https://t.bilibili.com/?tab=64`, item: out, - }); -}; + }; +} diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index abb1b542f..4430d0271 100644 --- a/lib/routes/bilibili/followings-dynamic.ts +++ b/lib/routes/bilibili/followings-dynamic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; @@ -6,7 +7,28 @@ import JSONbig from 'json-bigint'; import { fallback, queryToBoolean } from '@/utils/readable-social'; import querystring from 'querystring'; -export default async (ctx) => { +export const route: Route = { + path: '/followings/dynamic/:uid/:routeParams?', + categories: ['social-media'], + example: '/bilibili/followings/dynamic/109937383', + parameters: { uid: '用户 id', routeParams: '额外参数;请参阅 [#UP 主动态](#bilibili-up-zhu-dong-tai) 的说明和表格' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户关注动态', + maintainers: ['TigerCubDen', 'JimenezLi'], + handler, + description: `:::warning + 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = String(ctx.req.param('uid')); const routeParams = querystring.parse(ctx.req.param('routeParams')); @@ -143,10 +165,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${name} 关注的动态`, link: `https://t.bilibili.com`, description: `${name} 关注的动态`, item: items, - }); -}; + }; +} diff --git a/lib/routes/bilibili/followings-video.ts b/lib/routes/bilibili/followings-video.ts index 8c6ef292c..c5abb3473 100644 --- a/lib/routes/bilibili/followings-video.ts +++ b/lib/routes/bilibili/followings-video.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/followings/video/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/followings/video/2267573', + parameters: { uid: '用户 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户关注视频动态', + maintainers: ['LogicJake'], + handler, + description: `:::warning + 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = String(ctx.req.param('uid')); const disableEmbed = ctx.req.param('disableEmbed'); const name = await cache.getUsernameFromUID(uid); @@ -38,9 +60,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${name} 关注视频动态`, link: `https://t.bilibili.com/?tab=8`, item: out, - }); -}; + }; +} diff --git a/lib/routes/bilibili/followings.ts b/lib/routes/bilibili/followings.ts index fdf5ac3b2..bdec67c05 100644 --- a/lib/routes/bilibili/followings.ts +++ b/lib/routes/bilibili/followings.ts @@ -1,8 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/user/followings/:uid/:loginUid', + categories: ['social-media'], + example: '/bilibili/user/followings/2267573/3', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', loginUid: '用于登入的用户id,需要配置对应的 Cookie 值' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/followings/:uid', + }, + name: 'UP 主关注用户', + maintainers: ['Qixingchen'], + handler, + description: `:::warning + UP 主关注用户现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const loginUid = ctx.req.param('loginUid'); const cookie = config.bilibili.cookies[loginUid]; if (cookie === undefined) { @@ -38,7 +64,7 @@ export default async (ctx) => { } const data = response.data.data.list; - ctx.set('data', { + return { title: `${name} 的 bilibili 关注`, link: `https://space.bilibili.com/${uid}/#/fans/follow`, description: `${name} 的 bilibili 关注`, @@ -48,5 +74,5 @@ export default async (ctx) => { pubDate: new Date(item.mtime * 1000), link: `https://space.bilibili.com/${item.mid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/hot-search.ts b/lib/routes/bilibili/hot-search.ts index 9b05458bf..3080329d2 100644 --- a/lib/routes/bilibili/hot-search.ts +++ b/lib/routes/bilibili/hot-search.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hot-search', + categories: ['social-media'], + example: '/bilibili/hot-search', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.bilibili.com/'], + }, + name: '热搜', + maintainers: ['CaoMeiYouRen'], + handler, + url: 'www.bilibili.com/', +}; + +async function handler() { const wbiVerifyString = await cache.getWbiVerifyString(); const params = utils.addWbiVerifyInfo('limit=10&platform=web', wbiVerifyString); const url = `https://api.bilibili.com/x/web-interface/wbi/search/square?${params}`; @@ -16,7 +39,7 @@ export default async (ctx) => { const trending = response?.data?.data?.trending; const title = trending?.title; const list = trending?.list || []; - ctx.set('data', { + return { title, link: url, description: 'bilibili热搜', @@ -25,5 +48,5 @@ export default async (ctx) => { description: `${item.keyword}
    ${item.icon ? `` : ''}`, link: item.link || item.goto || `https://search.bilibili.com/all?${new URLSearchParams({ keyword: item.keyword })}&from_source=webtop_search`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/like.ts b/lib/routes/bilibili/like.ts index 41f15ea7d..3f4b6d785 100644 --- a/lib/routes/bilibili/like.ts +++ b/lib/routes/bilibili/like.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/like/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/like/208259', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/like/:uid', + }, + name: 'UP 主点赞视频', + maintainers: ['ygguorun'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); @@ -20,7 +43,7 @@ export default async (ctx) => { throw new Error(message ?? code); } - ctx.set('data', { + return { title: `${name} 的 bilibili 点赞视频`, link: `https://space.bilibili.com/${uid}`, description: `${name} 的 bilibili 点赞视频`, @@ -31,5 +54,5 @@ export default async (ctx) => { link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/link-news.ts b/lib/routes/bilibili/link-news.ts index 1d02e87f6..04bd0d4b2 100644 --- a/lib/routes/bilibili/link-news.ts +++ b/lib/routes/bilibili/link-news.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/link/news/:product', + categories: ['social-media'], + example: '/bilibili/link/news/live', + parameters: { product: '公告分类, 包括 直播:live 小视频:vc 相簿:wh' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'link 公告', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { const product = ctx.req.param('product'); let productTitle = ''; @@ -26,7 +45,7 @@ export default async (ctx) => { }); const data = response.data.data.items; - ctx.set('data', { + return { title: `bilibili ${productTitle}公告`, link: `https://link.bilibili.com/p/eden/news#/?tab=${product}&tag=all&page_no=1`, description: `bilibili ${productTitle}公告`, @@ -38,5 +57,5 @@ export default async (ctx) => { pubDate: new Date(item.ctime.replace(' ', 'T') + '+08:00').toUTCString(), link: item.announce_link ?? `https://link.bilibili.com/p/eden/news#/newsdetail?id=${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/live-area.ts b/lib/routes/bilibili/live-area.ts index 0a3311ffd..b2b444e64 100644 --- a/lib/routes/bilibili/live-area.ts +++ b/lib/routes/bilibili/live-area.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/live/area/:areaID/:order', + categories: ['live'], + example: '/bilibili/live/area/207/online', + parameters: { areaID: '分区 ID 分区增删较多, 可通过 [分区列表](https://api.live.bilibili.com/room/v1/Area/getList) 查询', order: '排序方式, live_time 开播时间, online 人气' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '直播分区', + maintainers: ['Qixingchen'], + handler, + description: `:::warning + 由于接口未提供开播时间,如果直播间未更换标题与分区,将视为一次。如果直播间更换分区与标题,将视为另一项 + :::`, +}; + +async function handler(ctx) { const areaID = ctx.req.param('areaID'); const order = ctx.req.param('order'); @@ -49,7 +71,7 @@ export default async (ctx) => { }); const data = response.data.data; - ctx.set('data', { + return { title: `哔哩哔哩直播-${parentTitle}·${areaTitle}分区-${orderTitle}`, link: areaLink, description: `哔哩哔哩直播-${parentTitle}·${areaTitle}分区-${orderTitle}`, @@ -60,5 +82,5 @@ export default async (ctx) => { guid: `https://live.bilibili.com/${item.roomid} ${item.title}`, link: `https://live.bilibili.com/${item.roomid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/live-room.ts b/lib/routes/bilibili/live-room.ts index 2f21223c5..1ade19f96 100644 --- a/lib/routes/bilibili/live-room.ts +++ b/lib/routes/bilibili/live-room.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; -export default async (ctx) => { +export const route: Route = { + path: '/live/room/:roomID', + categories: ['live'], + example: '/bilibili/live/room/3', + parameters: { roomID: '房间号, 可在直播间 URL 中找到, 长短号均可' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['live.bilibili.com/:roomID'], + }, + name: '直播开播', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { let roomID = ctx.req.param('roomID'); // 短号查询长号 @@ -31,11 +53,11 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title: `${name} 直播间开播状态`, link: `https://live.bilibili.com/${roomID}`, description: `${name} 直播间开播状态`, item: liveItem, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/bilibili/live-search.ts b/lib/routes/bilibili/live-search.ts index bb0ebc31f..1e54f69a9 100644 --- a/lib/routes/bilibili/live-search.ts +++ b/lib/routes/bilibili/live-search.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import cache from './cache'; -export default async (ctx) => { +export const route: Route = { + path: '/live/search/:key/:order', + categories: ['live'], + example: '/bilibili/live/search/dota/online', + parameters: { key: '搜索关键字', order: '排序方式, live_time 开播时间, online 人气' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '直播搜索', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { const key = ctx.req.param('key'); const order = ctx.req.param('order'); @@ -31,7 +50,7 @@ export default async (ctx) => { }); const data = response.data.data.result.live_room; - ctx.set('data', { + return { title: `哔哩哔哩直播-${key}-${orderTitle}`, link: `https://search.bilibili.com/live?keyword=${urlEncodedKey}&order=${order}&coverType=user_cover&page=1&search_type=live`, description: `哔哩哔哩直播-${key}-${orderTitle}`, @@ -44,5 +63,5 @@ export default async (ctx) => { guid: `https://live.bilibili.com/${item.roomid} ${item.live_time}`, link: `https://live.bilibili.com/${item.roomid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/maintainer.ts b/lib/routes/bilibili/maintainer.ts deleted file mode 100644 index eaad573f5..000000000 --- a/lib/routes/bilibili/maintainer.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default { - '/app/:id?': ['nczitzk'], - '/audio/:id': ['LogicJake'], - '/bangumi/:seasonid': ['DIYgod'], - '/bangumi/media/:mediaid': ['DIYgod'], - '/fav/:uid/:fid/:disableEmbed?': ['Qixingchen'], - '/followings/article/:uid': ['woshiluo'], - '/followings/dynamic/:uid/:routeParams?': ['TigerCubDen', 'JimenezLi'], - '/followings/video/:uid/:disableEmbed?': ['LogicJake'], - '/hot-search': ['CaoMeiYouRen'], - '/link/news/:product': ['Qixingchen'], - '/live/area/:areaID/:order': ['Qixingchen'], - '/live/room/:roomID': ['Qixingchen'], - '/live/search/:key/:order': ['Qixingchen'], - '/mall/new/:category?': ['DIYgod'], - '/mall/ip/:id': ['DIYgod'], - '/manga/update/:comicid': ['hoilc'], - '/manga/followings/:uid/:limits?': ['yindaheng98'], - '/partion/:tid/:disableEmbed?': ['DIYgod'], - '/partion/ranking/:tid/:days?/:disableEmbed?': ['lengthmin'], - '/platform/:area?/:p_type?/:uid?': ['nightmare-mio'], - '/popular/all': ['ziminliu'], - '/ranking/:rid?/:day?/:arc_type?/:disableEmbed?': ['DIYgod'], - '/readlist/:listid': ['hoilc'], - '/user/article/:uid': ['lengthmin', 'Qixingchen'], - '/user/bangumi/:uid/:type?': ['wdssmq'], - '/user/channel/:uid/:sid/:disableEmbed?': ['weirongxu'], - '/user/coin/:uid/:disableEmbed?': ['DIYgod'], - '/user/collection/:uid/:sid/:disableEmbed?': ['shininome'], - '/user/dynamic/:uid/:routeParams?': ['DIYgod', 'zytomorrow', 'CaoMeiYouRen', 'JimenezLi'], - '/user/fav/:uid/:disableEmbed?': ['DIYgod'], - '/user/followers/:uid/:loginUid': ['Qixingchen'], - '/user/followings/:uid/:loginUid': ['Qixingchen'], - '/user/like/:uid/:disableEmbed?': ['ygguorun'], - '/user/video/:uid/:disableEmbed?': ['DIYgod'], - '/video/danmaku/:bvid/:pid?': ['Qixingchen'], - '/video/page/:bvid/:disableEmbed?': ['sxzz'], - '/video/reply/:bvid': ['Qixingchen'], - '/vsearch/:kw/:order?/:disableEmbed?/:tid?': ['Symty'], - '/watchlater/:uid/:disableEmbed?': ['JimenezLi'], - '/weekly/:disableEmbed?': ['ttttmr'], -}; diff --git a/lib/routes/bilibili/mall-ip.ts b/lib/routes/bilibili/mall-ip.ts index 60bf7f117..7f1100537 100644 --- a/lib/routes/bilibili/mall-ip.ts +++ b/lib/routes/bilibili/mall-ip.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/mall/ip/:id', + categories: ['social-media'], + example: '/bilibili/mall/ip/0_3000294', + parameters: { id: '作品 id, 可在作品列表页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '会员购作品', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const detail = await got({ @@ -21,7 +40,7 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: `${detail.data.data.name} - 会员购`, description: detail.data.data.intro, link: `https://mall.bilibili.com/list.html?ip=${id}`, @@ -30,5 +49,5 @@ export default async (ctx) => { description: `${item.name}
    ¥${item.price}
    `, link: item.jumpUrlH5, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/mall-new.ts b/lib/routes/bilibili/mall-new.ts index 80b1abac6..5176e535e 100644 --- a/lib/routes/bilibili/mall-new.ts +++ b/lib/routes/bilibili/mall-new.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/mall/new/:category?', + categories: ['social-media'], + example: '/bilibili/mall/new/1', + parameters: { category: '分类,默认全部,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '会员购新品上架', + maintainers: ['DIYgod'], + handler, + description: `| 全部 | 手办 | 魔力赏 | 周边 | 游戏 | + | ---- | ---- | ------ | ---- | ---- | + | 0 | 1 | 7 | 3 | 6 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || 0; const response = await got({ @@ -19,7 +41,7 @@ export default async (ctx) => { const type = response.data.data.vo.cateTabs.find((item) => item.cateType === response.data.data.vo.currentCateType).cateName; - ctx.set('data', { + return { title: `会员购新品上架-${type}`, link: 'https://mall.bilibili.com/newdate.html?noTitleBar=1&page=new&from=new_product&loadingShow=1', item: items.map((item) => ({ @@ -27,5 +49,5 @@ export default async (ctx) => { description: `${item.name}
    ${item.priceDesc ? `${item.pricePrefix}${item.priceSymbol}${item.priceDesc[0]}` : ''}

    APP 内打开`, link: item.itemUrlForH5, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/manga-followings.ts b/lib/routes/bilibili/manga-followings.ts index dad9e1d30..0821de608 100644 --- a/lib/routes/bilibili/manga-followings.ts +++ b/lib/routes/bilibili/manga-followings.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/manga/followings/:uid/:limits?', + categories: ['social-media'], + example: '/bilibili/manga/followings/26009', + parameters: { uid: '用户 id', limits: '抓取最近更新前多少本漫画,默认为10' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户追漫更新', + maintainers: ['yindaheng98'], + handler, + description: `:::warning + 用户追漫需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = String(ctx.req.param('uid')); const name = await cache.getUsernameFromUID(uid); @@ -26,7 +48,7 @@ export default async (ctx) => { } const comics = response.data.data; - ctx.set('data', { + return { title: `${name} 的追漫更新 - 哔哩哔哩漫画`, link, item: comics.map((item) => ({ @@ -35,5 +57,5 @@ export default async (ctx) => { pubDate: new Date(item.last_ep_publish_time + ' +0800'), link: `https://manga.bilibili.com/detail/mc${item.comic_id}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/manga-update.ts b/lib/routes/bilibili/manga-update.ts index 155ce7373..cfb032f0c 100644 --- a/lib/routes/bilibili/manga-update.ts +++ b/lib/routes/bilibili/manga-update.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/manga/update/:comicid', + categories: ['social-media'], + example: '/bilibili/manga/update/26009', + parameters: { comicid: '漫画 id, 可在 URL 中找到, 支持带有`mc`前缀' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['manga.bilibili.com/detail/:comicid'], + }, + name: '漫画更新', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const comic_id = ctx.req.param('comicid').startsWith('mc') ? ctx.req.param('comicid').replace('mc', '') : ctx.req.param('comicid'); const link = `https://manga.bilibili.com/detail/mc${comic_id}`; @@ -17,7 +39,7 @@ export default async (ctx) => { const data = response.data.data; const author = data.author_name.join(', '); - ctx.set('data', { + return { title: `${data.title} - 哔哩哔哩漫画`, link, image: data.vertical_cover, @@ -29,5 +51,5 @@ export default async (ctx) => { pubDate: new Date(item.pub_time + ' +0800'), link: `https://manga.bilibili.com/mc${comic_id}/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/namespace.ts b/lib/routes/bilibili/namespace.ts new file mode 100644 index 000000000..cc6da5657 --- /dev/null +++ b/lib/routes/bilibili/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bilibili', + url: 'www.bilibili.com', +}; diff --git a/lib/routes/bilibili/page.ts b/lib/routes/bilibili/page.ts index 1977d35a5..39b6061f9 100644 --- a/lib/routes/bilibili/page.ts +++ b/lib/routes/bilibili/page.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/video/page/:bvid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/video/page/BV1i7411M7N9', + parameters: { bvid: '可在视频页 URL 中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '视频选集列表', + maintainers: ['sxzz'], + handler, +}; + +async function handler(ctx) { let bvid = ctx.req.param('bvid'); let aid; if (!bvid.startsWith('BV')) { @@ -20,7 +39,7 @@ export default async (ctx) => { const { title: name, pages: data } = response.data.data; - ctx.set('data', { + return { title: `视频 ${name} 的选集列表`, link, description: `视频 ${name} 的视频选集列表`, @@ -32,5 +51,5 @@ export default async (ctx) => { description: `${item.part} - ${name}${disableEmbed ? '' : `

    ${utils.iframe(aid, item.page, bvid)}`}`, link: `${link}?p=${item.page}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/partion-ranking.ts b/lib/routes/bilibili/partion-ranking.ts index 262636d58..8e4228160 100644 --- a/lib/routes/bilibili/partion-ranking.ts +++ b/lib/routes/bilibili/partion-ranking.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; const got_ins = got.extend({ @@ -14,7 +15,25 @@ function formatDate(now) { return dateTime; } -export default async (ctx) => { +export const route: Route = { + path: '/partion/ranking/:tid/:days?/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/partion/ranking/171/3', + parameters: { tid: '分区 id, 见上方表格', days: '缺省为 7, 指最近多少天内的热度排序', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分区视频排行榜', + maintainers: ['lengthmin'], + handler, +}; + +async function handler(ctx) { const tid = ctx.req.param('tid'); const days = ctx.req.param('days') ?? 7; const disableEmbed = ctx.req.param('disableEmbed'); @@ -48,10 +67,10 @@ export default async (ctx) => { items.push(item); } - ctx.set('data', { + return { title: `bilibili ${name} 最热视频`, link: 'https://www.bilibili.com', description: `bilibili ${name}分区 最热视频`, item: items, - }); -}; + }; +} diff --git a/lib/routes/bilibili/partion.ts b/lib/routes/bilibili/partion.ts index 9968e4d48..246083928 100644 --- a/lib/routes/bilibili/partion.ts +++ b/lib/routes/bilibili/partion.ts @@ -1,7 +1,139 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/partion/:tid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/partion/33', + parameters: { tid: '分区 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分区视频', + maintainers: ['DIYgod'], + handler, + description: `动画 + + | MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 | + | ------- | ------ | ---------------- | ---- | ---- | + | 24 | 25 | 47 | 86 | 27 | + + 番剧 + + | 连载动画 | 完结动画 | 资讯 | 官方延伸 | + | -------- | -------- | ---- | -------- | + | 33 | 32 | 51 | 152 | + + 国创 + + | 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 | + | -------- | ------------ | ------ | -------------- | ---- | + | 153 | 168 | 169 | 195 | 170 | + + 音乐 + + | 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ | + | -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- | + | 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 | + + 舞蹈 + + | 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 | + | ---- | ---- | -------- | ------ | -------- | -------- | + | 20 | 198 | 199 | 200 | 154 | 156 | + + 游戏 + + | 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen | + | -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- | + | 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 | + + 知识 + + | 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 | + | -------- | -------- | ---- | -------- | -------- | ------------ | + | 201 | 124 | 207 | 208 | 209 | 122 | + + ~~科技~~ + + | ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ | + | ---------------- | -------- | -------- | -------- | + | 39 | 96 | 98 | 176 | + + 数码 + + | 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 | + | -------- | -------- | -------- | -------- | + | 95 | 189 | 190 | 191 | + + 生活 + + | 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ | + | ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- | + | 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 | + + 鬼畜 + + | 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 | + | -------- | ------ | ------------- | -------- | + | 22 | 26 | 126 | 127 | + + 时尚 + + | 美妆 | 服饰 | 健身 | T 台 | 风向标 | + | ---- | ---- | ---- | ---- | ------ | + | 157 | 158 | 164 | 159 | 192 | + + ~~广告~~ + + | ~~广告~~ | + | -------- | + | 166 | + + 资讯 + + | 热点 | 环球 | 社会 | 综合 | + | ---- | ---- | ---- | ---- | + | 203 | 204 | 205 | 206 | + + 娱乐 + + | 综艺 | 明星 | Korea 相关 | + | ---- | ---- | ---------- | + | 71 | 137 | 131 | + + 影视 + + | 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 | + | -------- | -------- | ---- | ---------- | + | 182 | 183 | 85 | 184 | + + 纪录片 + + | 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 | + | ---- | ---------- | ---------------- | ---- | ---------------- | + | 177 | 37 | 178 | 179 | 180 | + + 电影 + + | 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 | + | ---- | -------- | -------- | -------- | -------- | + | 23 | 147 | 145 | 146 | 83 | + + 电视剧 + + | 全部 | 国产剧 | 海外剧 | + | ---- | ------ | ------ | + | 11 | 185 | 187 |`, +}; + +async function handler(ctx) { const tid = ctx.req.param('tid'); const disableEmbed = ctx.req.param('disableEmbed'); @@ -19,7 +151,7 @@ export default async (ctx) => { name = list[0].tname; } - ctx.set('data', { + return { title: `bilibili ${name}分区`, link: 'https://www.bilibili.com', description: `bilibili ${name}分区`, @@ -32,5 +164,5 @@ export default async (ctx) => { link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/platform.ts b/lib/routes/bilibili/platform.ts index 12148bb01..5fc4e522b 100644 --- a/lib/routes/bilibili/platform.ts +++ b/lib/routes/bilibili/platform.ts @@ -1,8 +1,40 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/platform/:area?/:p_type?/:uid?', + categories: ['social-media'], + example: '/bilibili/platform/-1', + parameters: { + area: '省市-国标码,默认为-1即全国', + p_type: '类型:见下表,默认为全部类型', + uid: '用户id,可以不填,不过不填不设置cookie,搜索结果与登入账号后搜索结果不一样。可以在url中找到,需要配置cookie值,只需要SESSDATA的值即可', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['show.bilibili.com/platform'], + }, + name: '会员购票务', + maintainers: ['nightmare-mio'], + handler, + url: 'show.bilibili.com/platform', + description: `| 类型 | +| -------- | +| 演出 | +| 展览 | +| 本地生活 |`, +}; + +async function handler(ctx) { const { area = -1, type = '全部类型', uid } = ctx.req.param(); const cookie = config.bilibili.cookies[uid]; const link = 'https://show.bilibili.com/api/ticket/project/listV2'; @@ -35,9 +67,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `bilibili会员购票务-${area}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bilibili/popular.ts b/lib/routes/bilibili/popular.ts index 147f93473..3206d6242 100644 --- a/lib/routes/bilibili/popular.ts +++ b/lib/routes/bilibili/popular.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/popular/all', + categories: ['social-media'], + example: '/bilibili/popular/all', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '综合热门', + maintainers: ['ziminliu'], + handler, +}; + +async function handler(ctx) { const disableEmbed = ctx.req.param('disableEmbed'); const response = await got({ method: 'get', @@ -12,7 +31,7 @@ export default async (ctx) => { }); const list = response.data.data.list; - ctx.set('data', { + return { title: `bilibili 综合热门`, link: 'https://www.bilibili.com', description: `bilibili 综合热门`, @@ -25,5 +44,5 @@ export default async (ctx) => { link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/radar.ts b/lib/routes/bilibili/radar.ts deleted file mode 100644 index 43edc5c65..000000000 --- a/lib/routes/bilibili/radar.ts +++ /dev/null @@ -1,155 +0,0 @@ -export default { - 'bilibili.com': { - _name: 'bilibili', - www: [ - { - title: '分区视频', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: ['/v/*tpath', '/documentary', '/movie', '/tv'], - }, - { - title: '视频评论', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/video/:aid', - target: (params) => `/bilibili/video/reply/${params.aid.replace('av', '')}`, - }, - { - title: '视频弹幕', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/video/:aid', - target: (params, url) => { - const pid = new URL(url).searchParams.get('p'); - return `/bilibili/video/danmaku/${params.aid.replace('av', '')}/${pid ?? 1}`; - }, - }, - { - title: '番剧', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/bangumi/media/:bid', - target: (params) => `/bilibili/bangumi/media/${params.bid.replace('md', '')}`, - }, - { - title: '当前在线', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/video/online.html', - target: '/bilibili/online', - }, - { - title: '热搜', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/', - target: '/bilibili/hot-search', - }, - { - title: '频道排行榜', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/v/channel/:channelid/', - target: '/bilibili/channel/:channelid/hot', - }, - ], - space: [ - { - title: 'UP 主动态', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/dynamic/:uid', - }, - { - title: 'UP 主投稿', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/video/:uid', - }, - { - title: 'UP 主频道的合集', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid/channel/collectiondetail', - target: (params, url) => { - const sid = new URL(url).searchParams.get('sid'); - return `/bilibili/user/collection/${params.uid}/${sid}`; - }, - }, - { - title: 'UP 主频道的视频列表', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid/channel/seriesdetail', - target: (params, url) => { - const sid = new URL(url).searchParams.get('sid'); - return `/bilibili/user/channel/${params.uid}/${sid}`; - }, - }, - { - title: 'UP 主专栏', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/article/:uid', - }, - { - title: 'UP 主默认收藏夹', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: ['/:uid', '/:uid/favlist'], - target: '/bilibili/user/fav/:uid', - }, - { - title: 'UP 主非默认收藏夹', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid/favlist', - target: (params, url) => `/bilibili/fav/${params.uid}/${new URL(url).searchParams.get('fid')}`, - }, - { - title: 'UP 主投币视频', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/coin/:uid', - }, - { - title: 'UP 主点赞视频', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/like/:uid', - }, - { - title: 'UP 主粉丝', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/followers/:uid', - }, - { - title: 'UP 主关注用户', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/followings/:uid', - }, - { - title: '用户追番列表', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/bangumi/:uid', - }, - ], - manga: [ - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili-man-hua-geng-xin', - source: '/detail/:comicid', - target: '/bilibili/manga/update/:comicid', - }, - ], - live: [ - { - title: '直播开播', - docs: 'https://docs.rsshub.app/routes/live#bi-li-bi-li-zhi-bo-zhi-bo-kai-bo', - source: ['/:roomID'], - target: '/bilibili/live/room/:roomID', - }, - ], - show: [ - { - title: '会员购票务', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili-hui-yuan-gou-zuo-pin', - source: '/platform', - target: '/bilibili/platform/:area?/:p_type?/:uid?', - }, - ], - }, -}; diff --git a/lib/routes/bilibili/ranking.ts b/lib/routes/bilibili/ranking.ts index 0ee1db976..86527ea9a 100644 --- a/lib/routes/bilibili/ranking.ts +++ b/lib/routes/bilibili/ranking.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', + name: 'Unknown', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const rid = ctx.req.param('rid') || '0'; const day = ctx.req.param('day') || '3'; const arc_type = ctx.req.param('arc_type') || '1'; @@ -29,7 +37,7 @@ export default async (ctx) => { list = [...list, ...list[i].others]; } } - ctx.set('data', { + return { title: `bilibili ${day}日排行榜-${rid_type}-${arc_type1}`, link: `https://www.bilibili.com/ranking/all/${rid}/0/${day}`, item: list.map((item) => ({ @@ -39,5 +47,5 @@ export default async (ctx) => { author: item.author, link: !item.create || (new Date(item.create) / 1000 > utils.bvidTime && item.bvid) ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/readlist.ts b/lib/routes/bilibili/readlist.ts index bab0a5bad..00a11db28 100644 --- a/lib/routes/bilibili/readlist.ts +++ b/lib/routes/bilibili/readlist.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/readlist/:listid', + categories: ['social-media'], + example: '/bilibili/readlist/25611', + parameters: { listid: '文集 id, 可在专栏文集 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专栏文集', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const listid = ctx.req.param('listid'); const listurl = `https://www.bilibili.com/read/readlist/rl${listid}`; @@ -13,7 +32,7 @@ export default async (ctx) => { }); const data = response.data.data; - ctx.set('data', { + return { title: `bilibili 专栏文集 - ${data.list.name}`, link: listurl, image: data.list.image_url, @@ -27,5 +46,5 @@ export default async (ctx) => { pubDate: new Date(item.publish_time * 1000).toUTCString(), link: `https://www.bilibili.com/read/cv${item.id}/?from=readlist`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/reply.ts b/lib/routes/bilibili/reply.ts index 24d965b52..cb63d4cc6 100644 --- a/lib/routes/bilibili/reply.ts +++ b/lib/routes/bilibili/reply.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; -export default async (ctx) => { +export const route: Route = { + path: '/video/reply/:bvid', + categories: ['social-media'], + example: '/bilibili/video/reply/BV1vA411b7ip', + parameters: { bvid: '可在视频页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '视频评论', + maintainers: ['Qixingchen'], + handler, +}; + +async function handler(ctx) { let bvid = ctx.req.param('bvid'); let aid; if (!bvid.startsWith('BV')) { @@ -24,7 +43,7 @@ export default async (ctx) => { const data = response.data.data.replies; - ctx.set('data', { + return { title: `${name} 的 评论`, link, description: `${name} 的评论`, @@ -34,5 +53,5 @@ export default async (ctx) => { pubDate: new Date(item.ctime * 1000).toUTCString(), link: `${link}/#reply${item.rpid}`, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/router.ts b/lib/routes/bilibili/router.ts deleted file mode 100644 index 01c61b004..000000000 --- a/lib/routes/bilibili/router.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default (router) => { - router.get('/app/:id?', './app'); - router.get('/audio/:id', './audio'); - router.get('/bangumi/:seasonid', './bangumi'); // 弃用 - router.get('/bangumi/media/:mediaid', './bangumi'); - router.get('/fav/:uid/:fid/:disableEmbed?', './fav'); - router.get('/followings/article/:uid', './followings-article'); - router.get('/followings/dynamic/:uid/:routeParams?', './followings-dynamic'); - router.get('/followings/video/:uid/:disableEmbed?', './followings-video'); - router.get('/link/news/:product', './link-news'); - router.get('/hot-search', './hot-search'); - router.get('/live/area/:areaID/:order', './live-area'); - router.get('/live/room/:roomID', './live-room'); - router.get('/live/search/:key/:order', './live-search'); - router.get('/mall/new/:category?', './mall-new'); - router.get('/mall/ip/:id', './mall-ip'); - router.get('/manga/update/:comicid', './manga-update'); - router.get('/manga/followings/:uid/:limits?', './manga-followings'); - router.get('/partion/:tid/:disableEmbed?', './partion'); - router.get('/partion/ranking/:tid/:days?/:disableEmbed?', './partion-ranking'); - router.get('/platform/:area?/:p_type?/:uid?', './platform'); - router.get('/popular/all', './popular'); - router.get('/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', './ranking'); - router.get('/readlist/:listid', './readlist'); - router.get('/user/article/:uid', './article'); - router.get('/user/bangumi/:uid/:type?', './user-bangumi'); - router.get('/user/channel/:uid/:sid/:disableEmbed?', './user-channel'); - router.get('/user/coin/:uid/:disableEmbed?', './coin'); - router.get('/user/collection/:uid/:sid/:disableEmbed?', './user-collection'); - router.get('/user/dynamic/:uid/:routeParams?', './dynamic'); - router.get('/user/fav/:uid/:disableEmbed?', './user-fav'); - router.get('/user/followers/:uid/:loginUid', './followers'); - router.get('/user/followings/:uid/:loginUid', './followings'); - router.get('/user/like/:uid/:disableEmbed?', './like'); - router.get('/user/video/:uid/:disableEmbed?', './video'); - router.get('/user/video-all/:uid/:disableEmbed?', './video-all'); - router.get('/video/danmaku/:bvid/:pid?', './danmaku'); - router.get('/video/page/:bvid/:disableEmbed?', './page'); - router.get('/video/reply/:bvid', './reply'); - router.get('/vsearch/:kw/:order?/:disableEmbed?/:tid?', './vsearch'); - router.get('/watchlater/:uid/:disableEmbed?', './watchlater'); - router.get('/weekly/:disableEmbed?', './weekly-recommend'); -}; diff --git a/lib/routes/bilibili/user-bangumi.ts b/lib/routes/bilibili/user-bangumi.ts index c79727d16..676558b64 100644 --- a/lib/routes/bilibili/user-bangumi.ts +++ b/lib/routes/bilibili/user-bangumi.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; -export default async (ctx) => { +export const route: Route = { + path: '/user/bangumi/:uid/:type?', + categories: ['social-media'], + example: '/bilibili/user/bangumi/208259', + parameters: { uid: '用户 id', type: '1为番,2为剧,留空为1' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/bangumi/:uid', + }, + name: '用户追番列表', + maintainers: ['wdssmq'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const type = Number(ctx.req.param('type') || 1); const type_name = ((t) => ['', 'bangumi', 'cinema'][t])(type); @@ -19,7 +42,7 @@ export default async (ctx) => { throw new Error(`It looks like something went wrong when querying the Bilibili API: code = ${data.code}, message = ${data.message}`); } - ctx.set('data', { + return { title: `${name} 的追番列表`, link: `https://space.bilibili.com/${uid}/${type_name}`, description: `${name} 的追番列表`, @@ -32,5 +55,5 @@ export default async (ctx) => { pubDate: new Date(item.new_ep.pub_time ?? Date.now()).toUTCString(), link: `https://www.bilibili.com/bangumi/play/` + (item.new_ep.id ? `ep${item.new_ep.id}` : `ss${item.season_id}`), })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/user-channel.ts b/lib/routes/bilibili/user-channel.ts index f35743696..409080e05 100644 --- a/lib/routes/bilibili/user-channel.ts +++ b/lib/routes/bilibili/user-channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -8,7 +9,25 @@ const notFoundData = { title: '此 bilibili 频道不存在', }; -export default async (ctx) => { +export const route: Route = { + path: '/user/channel/:uid/:sid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/channel/2267573/396050', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', sid: '频道 id, 可在频道的 URL 中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'UP 主频道的视频列表', + maintainers: ['weirongxu'], + handler, +}; + +async function handler(ctx) { const uid = Number.parseInt(ctx.req.param('uid')); const sid = Number.parseInt(ctx.req.param('sid')); const disableEmbed = ctx.req.param('disableEmbed'); @@ -47,7 +66,7 @@ export default async (ctx) => { return; } - ctx.set('data', { + return { title: `${userName} 的 bilibili 频道 ${channelInfo.meta.name}`, link, description: `${userName} 的 bilibili 频道`, @@ -67,5 +86,5 @@ export default async (ctx) => { author: userName, }; }), - }); -}; + }; +} diff --git a/lib/routes/bilibili/user-collection.ts b/lib/routes/bilibili/user-collection.ts index 497a3c163..0302266e9 100644 --- a/lib/routes/bilibili/user-collection.ts +++ b/lib/routes/bilibili/user-collection.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; @@ -7,7 +8,25 @@ const notFoundData = { title: '此 bilibili 频道不存在', }; -export default async (ctx) => { +export const route: Route = { + path: '/user/collection/:uid/:sid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/collection/245645656/529166', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', sid: '合集 id, 可在合集页面的 URL 中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'UP 主频道的合集', + maintainers: ['shininome'], + handler, +}; + +async function handler(ctx) { const uid = Number.parseInt(ctx.req.param('uid')); const sid = Number.parseInt(ctx.req.param('sid')); const disableEmbed = ctx.req.param('disableEmbed'); @@ -29,7 +48,7 @@ export default async (ctx) => { return; } - ctx.set('data', { + return { title: `${userName} 的 bilibili 合集 ${data.meta.name}`, link, description: `${userName} 的 bilibili 合集`, @@ -49,5 +68,5 @@ export default async (ctx) => { author: userName, }; }), - }); -}; + }; +} diff --git a/lib/routes/bilibili/user-fav.ts b/lib/routes/bilibili/user-fav.ts index 157827caf..9d4908127 100644 --- a/lib/routes/bilibili/user-fav.ts +++ b/lib/routes/bilibili/user-fav.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/user/fav/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/fav/2267573', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid', 'space.bilibili.com/:uid/favlist'], + target: '/user/fav/:uid', + }, + name: 'UP 主默认收藏夹', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); const name = await cache.getUsernameFromUID(uid); @@ -18,7 +41,7 @@ export default async (ctx) => { }); const data = response.data; - ctx.set('data', { + return { title: `${name} 的 bilibili 收藏夹`, link: `https://space.bilibili.com/${uid}/#/favlist`, description: `${name} 的 bilibili 收藏夹`, @@ -33,5 +56,5 @@ export default async (ctx) => { link: item.fav_at > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/video-all.ts b/lib/routes/bilibili/video-all.ts index 20483b62d..e436d0b3e 100644 --- a/lib/routes/bilibili/video-all.ts +++ b/lib/routes/bilibili/video-all.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/video-all/:uid/:disableEmbed?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); const cookie = await cache.getCookie(); @@ -57,7 +65,7 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: name, link: `https://space.bilibili.com/${uid}/video`, description: `${name} 的 bilibili 所有视频`, @@ -71,5 +79,5 @@ export default async (ctx) => { author: name, comments: item.comment, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index e37db4777..ef4be3874 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import logger from '@/utils/logger'; -export default async (ctx) => { +export const route: Route = { + path: '/user/video/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/user/video/2267573', + parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['space.bilibili.com/:uid'], + target: '/user/video/:uid', + }, + name: 'UP 主投稿', + maintainers: ['DIYgod'], + handler, + description: `:::tip[动态的专栏显示全文] + 可以使用 [UP 主动态](#bilibili-up-zhu-dong-tai)路由作为代替绕过反爬限制 + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); const cookie = await cache.getCookie(); @@ -30,7 +56,7 @@ export default async (ctx) => { throw new Error(`Got error code ${data.code} while fetching: ${data.message}`); } - ctx.set('data', { + return { title: `${name} 的 bilibili 空间`, link: `https://space.bilibili.com/${uid}`, description: `${name} 的 bilibili 空间`, @@ -48,5 +74,5 @@ export default async (ctx) => { author: name, comments: item.comment, })), - }); -}; + }; +} diff --git a/lib/routes/bilibili/vsearch.ts b/lib/routes/bilibili/vsearch.ts index 26cbb6e5b..76fcba44b 100644 --- a/lib/routes/bilibili/vsearch.ts +++ b/lib/routes/bilibili/vsearch.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { config } from '@/config'; import got from '@/utils/got'; @@ -7,7 +8,30 @@ import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); import { queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/vsearch/:kw/:order?/:disableEmbed?/:tid?', + categories: ['social-media'], + example: '/bilibili/vsearch/RSSHub', + parameters: { kw: '检索关键字', order: '排序方式, 综合:totalrank 最多点击:click 最新发布:pubdate(缺省) 最多弹幕:dm 最多收藏:stow', disableEmbed: '默认为开启内嵌视频, 任意值为关闭', tid: '分区 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '视频搜索', + maintainers: ['Symty'], + handler, + description: `分区 id 的取值请参考下表: + + | 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 | + | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ | + | 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 |`, +}; + +async function handler(ctx) { const kw = ctx.req.param('kw'); const order = ctx.req.param('order') || 'pubdate'; const disableEmbed = queryToBoolean(ctx.req.param('disableEmbed')); @@ -40,7 +64,7 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: `${kw} - bilibili`, link: `https://search.bilibili.com/all?keyword=${kw}&order=${order}`, description: `Result from ${kw} bilibili search, ordered by ${order}.`, @@ -69,5 +93,5 @@ export default async (ctx) => { link: item.arcurl, }; }), - }); -}; + }; +} diff --git a/lib/routes/bilibili/watchlater.ts b/lib/routes/bilibili/watchlater.ts index 5bbedf89d..56851d192 100644 --- a/lib/routes/bilibili/watchlater.ts +++ b/lib/routes/bilibili/watchlater.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/watchlater/:uid/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/watchlater/2267573', + parameters: { uid: '用户 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户稍后再看', + maintainers: ['JimenezLi'], + handler, + description: `:::warning + 用户稍后再看需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); const name = await cache.getUsernameFromUID(uid); @@ -36,9 +58,9 @@ export default async (ctx) => { author: item.owner.name, })); - ctx.set('data', { + return { title: `${name} 稍后再看`, link: 'https://www.bilibili.com/watchlater#/list', item: out, - }); -}; + }; +} diff --git a/lib/routes/bilibili/weekly-recommend.ts b/lib/routes/bilibili/weekly-recommend.ts index 6ec1ee17f..1ab478684 100644 --- a/lib/routes/bilibili/weekly-recommend.ts +++ b/lib/routes/bilibili/weekly-recommend.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly/:disableEmbed?', + categories: ['social-media'], + example: '/bilibili/weekly', + parameters: { disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'B 站每周必看', + maintainers: ['ttttmr'], + handler, +}; + +async function handler(ctx) { const disableEmbed = ctx.req.param('disableEmbed'); const status_response = await got({ @@ -23,7 +42,7 @@ export default async (ctx) => { }); const data = response.data.data.list; - ctx.set('data', { + return { title: 'B站每周必看', link: 'https://www.bilibili.com/h5/weekly-recommend', description: 'B站每周必看', @@ -37,5 +56,5 @@ export default async (ctx) => { `, link: weekly_number > 60 && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.param}`, })), - }); -}; + }; +} diff --git a/lib/routes/bing/daily-wallpaper.ts b/lib/routes/bing/daily-wallpaper.ts index 00127ec9f..29a5a8795 100644 --- a/lib/routes/bing/daily-wallpaper.ts +++ b/lib/routes/bing/daily-wallpaper.ts @@ -1,6 +1,19 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['cn.bing.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['FHYunCai'], + handler, + url: 'cn.bing.com/', +}; + +async function handler(ctx) { const response = await got({ method: 'get', prefixUrl: 'https://cn.bing.com', @@ -13,7 +26,7 @@ export default async (ctx) => { }, }); const data = response.data; - ctx.set('data', { + return { title: 'Bing每日壁纸', link: 'https://cn.bing.com/', item: data.images.map((item) => ({ @@ -21,5 +34,5 @@ export default async (ctx) => { description: ``, link: item.copyrightlink, })), - }); -}; + }; +} diff --git a/lib/routes/bing/maintainer.ts b/lib/routes/bing/maintainer.ts deleted file mode 100644 index 73739273f..000000000 --- a/lib/routes/bing/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['FHYunCai'], - '/search/:keyword': ['CaoMeiYouRen'], -}; diff --git a/lib/routes/bing/namespace.ts b/lib/routes/bing/namespace.ts new file mode 100644 index 000000000..173fa4a65 --- /dev/null +++ b/lib/routes/bing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bing', + url: 'cn.bing.com', +}; diff --git a/lib/routes/bing/radar.ts b/lib/routes/bing/radar.ts deleted file mode 100644 index 53a1ca4d6..000000000 --- a/lib/routes/bing/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'bing.com': { - _name: 'Bing', - cn: [ - { - title: '每日壁纸', - docs: 'https://docs.rsshub.app/routes/picture#bing', - source: '/', - target: '/bing', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/other#bing', - source: '/', - target: (params, url) => { - const q = new URL(url).searchParams.get('q'); - return `/bing/search/${q}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/bing/router.ts b/lib/routes/bing/router.ts deleted file mode 100644 index 5d964cfa8..000000000 --- a/lib/routes/bing/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './daily-wallpaper'); - router.get('/search/:keyword', './search'); -}; diff --git a/lib/routes/bing/search.ts b/lib/routes/bing/search.ts index 193d18e55..14b9ef6c1 100644 --- a/lib/routes/bing/search.ts +++ b/lib/routes/bing/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; @@ -5,7 +6,30 @@ import localizedFormat from 'dayjs/plugin/localizedFormat'; import 'dayjs/locale/zh-cn'; dayjs.extend(localizedFormat); -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['other'], + example: '/bing/search/rss', + parameters: { keyword: '搜索关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cn.bing.com/'], + target: '', + }, + name: '搜索', + maintainers: ['CaoMeiYouRen'], + handler, + url: 'cn.bing.com/', +}; + +async function handler(ctx) { const q = ctx.req.param('keyword'); const searchParams = new URLSearchParams({ format: 'rss', @@ -14,7 +38,7 @@ export default async (ctx) => { const url = new URL('https://cn.bing.com/search'); url.search = searchParams.toString(); const data = await parser.parseURL(url.toString()); - ctx.set('data', { + return { title: data.title, link: data.link, description: data.description + ' - ' + data.copyright, @@ -24,5 +48,5 @@ export default async (ctx) => { description: e.content, pubDate: parseDate(e.pubDate, 'dddd, DD MMM YYYY HH:mm:ss [GMT]', 'zh-cn'), })), - }); -}; + }; +} diff --git a/lib/routes/biodiscover/index.ts b/lib/routes/biodiscover/index.ts index 663115611..f1593cb6a 100644 --- a/lib/routes/biodiscover/index.ts +++ b/lib/routes/biodiscover/index.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +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 }); @@ -16,7 +28,7 @@ export default async (ctx) => { })) .toArray(); - ctx.set('data', { + return { title: '生物探索 - ' + $('.header li.sel a').text(), link: listUrl, description: $('meta[name=description]').attr('content'), @@ -41,5 +53,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/biodiscover/maintainer.ts b/lib/routes/biodiscover/maintainer.ts deleted file mode 100644 index 11174e52f..000000000 --- a/lib/routes/biodiscover/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel?': ['aidistan'], -}; diff --git a/lib/routes/biodiscover/namespace.ts b/lib/routes/biodiscover/namespace.ts new file mode 100644 index 000000000..c40450888 --- /dev/null +++ b/lib/routes/biodiscover/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'biodiscover.com 生物探索', + url: 'www.biodiscover.com', +}; diff --git a/lib/routes/biodiscover/radar.ts b/lib/routes/biodiscover/radar.ts deleted file mode 100644 index 62946996d..000000000 --- a/lib/routes/biodiscover/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'biodiscover.com': { - _name: '生物探索', - www: [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#sheng-wu-tan-suo', - source: '/:channel', - target: '/biodiscover/:channel', - }, - ], - }, -}; diff --git a/lib/routes/biodiscover/router.ts b/lib/routes/biodiscover/router.ts deleted file mode 100644 index 0b562c0f7..000000000 --- a/lib/routes/biodiscover/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel?', './index'); -}; diff --git a/lib/routes/bioone/featured.ts b/lib/routes/bioone/featured.ts index 6ab375734..aa89b3d8a 100644 --- a/lib/routes/bioone/featured.ts +++ b/lib/routes/bioone/featured.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/featured', + categories: ['journal'], + example: '/bioone/featured', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bioone.org/'], + }, + name: 'Featured articles', + maintainers: ['nczitzk'], + handler, + url: 'bioone.org/', +}; + +async function handler(ctx) { const rootUrl = 'https://bioone.org'; const response = await got(rootUrl, { https: { @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Featured articles - BioOne', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bioone/journal.ts b/lib/routes/bioone/journal.ts index c50dd54b7..1c5867c9d 100644 --- a/lib/routes/bioone/journal.ts +++ b/lib/routes/bioone/journal.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/journals/:journal?', + categories: ['journal'], + example: '/bioone/journals/acta-chiropterologica', + parameters: { journal: 'Journals, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bioone.org/journals/:journal', 'bioone.org/'], + target: '/journals/:journal', + }, + name: 'Journals', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal') ?? 'acta-chiropterologica'; const rootUrl = 'https://bioone.org'; @@ -52,10 +75,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.panel-body .row a').first().text()} - BioOne`, description: $('.panel-body .row text').first().text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bioone/maintainer.ts b/lib/routes/bioone/maintainer.ts deleted file mode 100644 index 3e2d0138e..000000000 --- a/lib/routes/bioone/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/featured': ['nczitzk'], - '/journals/:journal?': ['nczitzk'], -}; diff --git a/lib/routes/bioone/namespace.ts b/lib/routes/bioone/namespace.ts new file mode 100644 index 000000000..2b4d0a772 --- /dev/null +++ b/lib/routes/bioone/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BioOne', + url: 'bioone.org', +}; diff --git a/lib/routes/bioone/radar.ts b/lib/routes/bioone/radar.ts deleted file mode 100644 index dc149a4ed..000000000 --- a/lib/routes/bioone/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'bioone.org': { - _name: 'BioOne', - '.': [ - { - title: 'Featured articles', - docs: 'https://docs.rsshub.app/routes/journal#bioone-featured-articles', - source: '/', - target: '/bioone/featured', - }, - { - title: 'Journals', - docs: 'https://docs.rsshub.app/routes/journal#bioone-journals', - source: ['/journals/:journal', '/'], - target: '/bioone/journals/:journal', - }, - ], - }, -}; diff --git a/lib/routes/bioone/router.ts b/lib/routes/bioone/router.ts deleted file mode 100644 index acb3bc1b0..000000000 --- a/lib/routes/bioone/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/featured', './featured'); - router.get('/journals/:journal?', './journal'); -}; diff --git a/lib/routes/biquge/index.ts b/lib/routes/biquge/index.ts index 43ffcb8fb..2f71468e6 100644 --- a/lib/routes/biquge/index.ts +++ b/lib/routes/biquge/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -24,7 +25,14 @@ const allowHost = new Set([ 'www.mayiwxw.com', ]); -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = getSubPath(ctx).split('/').slice(1, 4).join('/'); const currentUrl = getSubPath(ctx).slice(1); if (!config.feature.allow_user_supply_unsafe_domain && !allowHost.has(new URL(rootUrl).hostname)) { @@ -93,9 +101,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('meta[property="og:title"]').attr('content')} - 笔趣阁`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/biquge/maintainer.ts b/lib/routes/biquge/maintainer.ts deleted file mode 100644 index 6c062ad87..000000000 --- a/lib/routes/biquge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:url': ['nczitzk'], -}; diff --git a/lib/routes/biquge/namespace.ts b/lib/routes/biquge/namespace.ts new file mode 100644 index 000000000..215a860e0 --- /dev/null +++ b/lib/routes/biquge/namespace.ts @@ -0,0 +1,27 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '笔趣阁', + url: 'xbiquwx.la', + description: `:::tip +此处的 **笔趣阁** 指网络上使用和 **笔趣阁** 样式相似模板的小说阅读网站,包括但不限于下方列举的网址。 +::: + +| 网址 | 名称 | +| ---------------------------------------------------- | ---------- | +| [https://www.xbiquwx.la](https://www.xbiquwx.la) | 笔尖中文 | +| [http://www.biqu5200.net](http://www.biqu5200.net) | 笔趣阁 | +| [https://www.xbiquge.so](https://www.xbiquge.so) | 笔趣阁 | +| [https://www.biqugeu.net](https://www.biqugeu.net) | 顶点小说网 | +| [http://www.b520.cc](http://www.b520.cc) | 笔趣阁 | +| [https://www.ahfgb.com](https://www.ahfgb.com) | 笔趣鸽 | +| [https://www.ibiquge.la](https://www.ibiquge.la) | 香书小说 | +| [https://www.biquge.tv](https://www.biquge.tv) | 笔趣阁 | +| [https://www.bswtan.com](https://www.bswtan.com) | 笔书网 | +| [https://www.biquge.co](https://www.biquge.co) | 笔趣阁 | +| [https://www.bqzhh.com](https://www.bqzhh.com) | 笔趣阁 | +| [http://www.biqugse.com](http://www.biqugse.com) | 笔趣阁 | +| [https://www.ibiquge.info](https://www.ibiquge.info) | 爱笔楼 | +| [https://www.ishuquge.com](https://www.ishuquge.com) | 书趣阁 | +| [https://www.mayiwxw.com](https://www.mayiwxw.com) | 蚂蚁文学 |`, +}; diff --git a/lib/routes/biquge/radar.ts b/lib/routes/biquge/radar.ts deleted file mode 100644 index 8ad1f9bfd..000000000 --- a/lib/routes/biquge/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -const biquge = { - _name: '笔趣阁', - '.': [ - { - title: '小说', - docs: 'https://docs.rsshub.app/routes/reading#bi-qu-ge-xiao-shuo', - source: ['/'], - target: (params, url) => `/biquge/${new URL(url).toString()}`, - }, - ], -}; - -export default { - 'xbiquwx.la': biquge, - 'biqu5200.net': biquge, - 'xbiquge.so': biquge, - 'biqugeu.net': biquge, - 'b520.cc': biquge, - 'biquge.biz': biquge, - 'xbiquge.la': biquge, - 'qbiqu.com': biquge, - 'bswtan.com': biquge, - 'biquge.co': biquge, - 'zhhbqg.com': biquge, - 'biqugse.com': biquge, - 'ibiquge.net': biquge, - 'shuquge.com': biquge, - 'mayiwxw.com': biquge, -}; diff --git a/lib/routes/biquge/router.ts b/lib/routes/biquge/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/biquge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/bit/cs/cs.ts b/lib/routes/bit/cs/cs.ts index 3b49ece90..80024ccd8 100644 --- a/lib/routes/bit/cs/cs.ts +++ b/lib/routes/bit/cs/cs.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/cs', + categories: ['university'], + example: '/bit/cs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cs.bit.edu.cn/tzgg', 'cs.bit.edu.cn/'], + }, + name: '计院通知', + maintainers: ['sinofp'], + handler, + url: 'cs.bit.edu.cn/tzgg', +}; + +async function handler() { const link = 'https://cs.bit.edu.cn/tzgg/'; const response = await got({ method: 'get', @@ -16,10 +39,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: $('title').text(), link, description: $('meta[name="description"]').attr('content'), item: result, - }); -}; + }; +} diff --git a/lib/routes/bit/jwc/jwc.ts b/lib/routes/bit/jwc/jwc.ts index 79db13ded..2c9dc5f88 100644 --- a/lib/routes/bit/jwc/jwc.ts +++ b/lib/routes/bit/jwc/jwc.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/bit/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.bit.edu.cn/tzgg', 'jwc.bit.edu.cn/'], + }, + name: '教务处通知', + maintainers: ['sinofp'], + handler, + url: 'jwc.bit.edu.cn/tzgg', +}; + +async function handler() { const link = 'https://jwc.bit.edu.cn/tzgg/'; const response = await got({ method: 'get', @@ -16,10 +39,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: $('title').text(), link, description: '北京理工大学教务部', item: result, - }); -}; + }; +} diff --git a/lib/routes/bit/maintainer.ts b/lib/routes/bit/maintainer.ts deleted file mode 100644 index e36343464..000000000 --- a/lib/routes/bit/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cs': ['sinofp'], - '/jwc': ['sinofp'], - '/rszhaopin': ['nczitzk'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/bit/namespace.ts b/lib/routes/bit/namespace.ts new file mode 100644 index 000000000..3879be052 --- /dev/null +++ b/lib/routes/bit/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京理工大学', + url: 'cs.bit.edu.cn', +}; diff --git a/lib/routes/bit/radar.ts b/lib/routes/bit/radar.ts deleted file mode 100644 index f94e7f6c6..000000000 --- a/lib/routes/bit/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'bit.edu.cn': { - _name: '北京理工大学', - cs: [ - { - title: '计院通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-li-gong-da-xue', - source: ['/tzgg', '/'], - target: '/bit/cs', - }, - ], - grd: [ - { - title: '研究生院招生信息', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-li-gong-da-xue', - source: ['/zsgz/zsxx/index.htm', '/'], - target: '/bit/yjs', - }, - ], - jwc: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-li-gong-da-xue', - source: ['/tzgg', '/'], - target: '/bit/jwc', - }, - ], - rszhaopin: [ - { - title: '人才招聘', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-li-gong-da-xue-ren-cai-zhao-pin', - source: ['/'], - target: '/bit/rszhaopin', - }, - ], - }, -}; diff --git a/lib/routes/bit/router.ts b/lib/routes/bit/router.ts deleted file mode 100644 index 9519830f5..000000000 --- a/lib/routes/bit/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cs', './cs/cs'); - router.get('/jwc', './jwc/jwc'); - router.get('/rszhaopin', './rszhaopin'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/bit/rszhaopin.ts b/lib/routes/bit/rszhaopin.ts index 1cd05f910..18c4b2bc5 100644 --- a/lib/routes/bit/rszhaopin.ts +++ b/lib/routes/bit/rszhaopin.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/rszhaopin', + categories: ['university'], + example: '/bit/rszhaopin', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rszhaopin.bit.edu.cn/'], + }, + name: '人才招聘', + maintainers: ['nczitzk'], + handler, + url: 'rszhaopin.bit.edu.cn/', +}; + +async function handler() { const rootUrl = 'https://rszhaopin.bit.edu.cn'; const apiUrl = `${rootUrl}/ajax/ajaxService`; const currentUrl = `${rootUrl}/zp.html#/notices/0`; @@ -22,9 +45,9 @@ export default async (ctx) => { link: `${rootUrl}/zp.html#/notice/${item.id}`, })); - ctx.set('data', { + return { title: '人才招聘 - 北京理工大学', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bit/yjs.ts b/lib/routes/bit/yjs.ts index 705fd438c..aab8426c3 100644 --- a/lib/routes/bit/yjs.ts +++ b/lib/routes/bit/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/bit/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grd.bit.edu.cn/zsgz/zsxx/index.htm', 'grd.bit.edu.cn/'], + }, + name: '研究生院招生信息', + maintainers: ['shengmaosu'], + handler, + url: 'grd.bit.edu.cn/zsgz/zsxx/index.htm', +}; + +async function handler() { const link = 'https://grd.bit.edu.cn/zsgz/zsxx/index.htm'; const response = await got(link); const $ = load(response.data); const list = $('.tongzhigonggao li'); - ctx.set('data', { + return { title: '北京理工大学研究生院', link, description: '北京理工大学研究生院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/bitbucket/commits.ts b/lib/routes/bitbucket/commits.ts index c9e895373..5db526360 100644 --- a/lib/routes/bitbucket/commits.ts +++ b/lib/routes/bitbucket/commits.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/commits/:workspace/:repo_slug', + categories: ['programming'], + example: '/bitbucket/commits/blaze-lib/blaze', + parameters: { workspace: 'Workspace', repo_slug: 'Repository' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bitbucket.com/commits/:workspace/:repo_slug'], + }, + name: 'Commits', + maintainers: ['AuroraDysis'], + handler, +}; + +async function handler(ctx) { const workspace = ctx.req.param('workspace'); const repo_slug = ctx.req.param('repo_slug'); @@ -23,7 +45,7 @@ export default async (ctx) => { headers, }); const data = response.data.values; - ctx.set('data', { + return { allowEmpty: true, title: `Recent Commits to ${workspace}/${repo_slug}`, link: `https://bitbucket.org/${workspace}/${repo_slug}`, @@ -36,5 +58,5 @@ export default async (ctx) => { pubDate: parseDate(item.date), link: item.links.html.href, })), - }); -}; + }; +} diff --git a/lib/routes/bitbucket/maintainer.ts b/lib/routes/bitbucket/maintainer.ts deleted file mode 100644 index 0ae9578dd..000000000 --- a/lib/routes/bitbucket/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/commits/:workspace/:repo_slug': ['AuroraDysis'], - '/tags/:workspace/:repo_slug': ['AuroraDysis'], -}; diff --git a/lib/routes/bitbucket/namespace.ts b/lib/routes/bitbucket/namespace.ts new file mode 100644 index 000000000..f414ea13c --- /dev/null +++ b/lib/routes/bitbucket/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bitbucket', + url: 'bitbucket.com', +}; diff --git a/lib/routes/bitbucket/radar.ts b/lib/routes/bitbucket/radar.ts deleted file mode 100644 index bd3096733..000000000 --- a/lib/routes/bitbucket/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'bitbucket.com': { - _name: 'Bitbucket', - '.': [ - { - title: 'Commits', - docs: 'https://docs.rsshub.app/routes/programming#bitbucket', - source: ['/commits/:workspace/:repo_slug'], - target: '/bitbucket/commits/:workspace/:repo_slug', - }, - { - title: 'Tags', - docs: 'https://docs.rsshub.app/routes/programming#bitbucket', - source: ['/tags/:workspace/:repo_slug'], - target: '/bitbcuket/tags/:workspace/:repo_slug', - }, - ], - }, -}; diff --git a/lib/routes/bitbucket/router.ts b/lib/routes/bitbucket/router.ts deleted file mode 100644 index 14b196951..000000000 --- a/lib/routes/bitbucket/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/commits/:workspace/:repo_slug', './commits'); - router.get('/tags/:workspace/:repo_slug', './tags'); -}; diff --git a/lib/routes/bitbucket/tags.ts b/lib/routes/bitbucket/tags.ts index cddcd8601..95933b2e4 100644 --- a/lib/routes/bitbucket/tags.ts +++ b/lib/routes/bitbucket/tags.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/tags/:workspace/:repo_slug', + categories: ['programming'], + example: '/bitbucket/tags/blaze-lib/blaze', + parameters: { workspace: 'Workspace', repo_slug: 'Repository' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Tags', + maintainers: ['AuroraDysis'], + handler, +}; + +async function handler(ctx) { const workspace = ctx.req.param('workspace'); const repo_slug = ctx.req.param('repo_slug'); @@ -23,7 +42,7 @@ export default async (ctx) => { headers, }); const data = response.data.values; - ctx.set('data', { + return { allowEmpty: true, title: `Recent Tags in ${workspace}/${repo_slug}`, link: `https://bitbucket.org/${workspace}/${repo_slug}`, @@ -36,5 +55,5 @@ export default async (ctx) => { pubDate: parseDate(item.date), link: item.links.html.href, })), - }); -}; + }; +} diff --git a/lib/routes/bitmovin/blog.ts b/lib/routes/bitmovin/blog.ts index 763b74e59..321e39d55 100644 --- a/lib/routes/bitmovin/blog.ts +++ b/lib/routes/bitmovin/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://bitmovin.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['programming'], + example: '/bitmovin/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bitmovin.com/blog', 'bitmovin.com/'], + }, + name: 'Blog', + maintainers: ['elxy'], + handler, + url: 'bitmovin.com/blog', +}; + +async function handler(ctx) { const apiUrl = `${baseUrl}/wp-json/wp/v2`; const { data } = await got(`${apiUrl}/posts`, { searchParams: { @@ -19,9 +42,9 @@ export default async (ctx) => { link: item.link, })); - ctx.set('data', { + return { title: 'Blog - Bitmovin', link: `${baseUrl}/blog/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/bitmovin/maintainer.ts b/lib/routes/bitmovin/maintainer.ts deleted file mode 100644 index 9046fe235..000000000 --- a/lib/routes/bitmovin/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['elxy'], -}; diff --git a/lib/routes/bitmovin/namespace.ts b/lib/routes/bitmovin/namespace.ts new file mode 100644 index 000000000..da0195123 --- /dev/null +++ b/lib/routes/bitmovin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bitmovin', + url: 'bitmovin.com', +}; diff --git a/lib/routes/bitmovin/radar.ts b/lib/routes/bitmovin/radar.ts deleted file mode 100644 index 96ee5e1ed..000000000 --- a/lib/routes/bitmovin/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bitmovin.com': { - _name: 'Bitmovin', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/programming#bitmovin', - source: ['/blog', '/'], - target: '/bitmovin/blog', - }, - ], - }, -}; diff --git a/lib/routes/bitmovin/router.ts b/lib/routes/bitmovin/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/bitmovin/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/bjfu/grs.ts b/lib/routes/bjfu/grs.ts index 3f83ddac7..cc936d2c1 100644 --- a/lib/routes/bjfu/grs.ts +++ b/lib/routes/bjfu/grs.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/grs', + categories: ['university'], + example: '/bjfu/grs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['graduate.bjfu.edu.cn/'], + }, + name: '研究生院培养动态', + maintainers: ['markmingjie'], + handler, + url: 'graduate.bjfu.edu.cn/', +}; + +async function handler() { const url = 'http://graduate.bjfu.edu.cn/pygl/pydt/index.html'; const response = await got.get(url); const data = response.data; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '北林研培养动态', link: url, item: result, - }); -}; + }; +} diff --git a/lib/routes/bjfu/it/index.ts b/lib/routes/bjfu/it/index.ts index 4a7d7523e..9d1cb3441 100644 --- a/lib/routes/bjfu/it/index.ts +++ b/lib/routes/bjfu/it/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/it/:type', + categories: ['university'], + example: '/bjfu/it/xyxw', + parameters: { type: '通知类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['it.bjfu.edu.cn/:type/index.html'], + }, + name: '信息学院通知', + maintainers: ['wzc-blog'], + handler, + description: `| 学院新闻 | 科研动态 | 本科生培养 | 研究生培养 | + | -------- | -------- | ---------- | ---------- | + | xyxw | kydt | pydt | pydt2 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let title, path; switch (type) { @@ -43,10 +68,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(base, list, cache); // 感谢@hoilc指导 - ctx.set('data', { + return { title: '北林信息 - ' + title, link: 'http://it.bjfu.edu.cn/' + path, description: '北京林业大学信息学院 - ' + title, item: result, - }); -}; + }; +} diff --git a/lib/routes/bjfu/jwc/index.ts b/lib/routes/bjfu/jwc/index.ts index 6485b73da..3ffd398d7 100644 --- a/lib/routes/bjfu/jwc/index.ts +++ b/lib/routes/bjfu/jwc/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type', + categories: ['university'], + example: '/bjfu/jwc/jwkx', + parameters: { type: '通知类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.bjfu.edu.cn/:type/index.html'], + }, + name: '教务处通知公告', + maintainers: ['markmingjie'], + handler, + description: `| 教务快讯 | 考试信息 | 课程信息 | 教改动态 | 图片新闻 | + | -------- | -------- | -------- | -------- | -------- | + | jwkx | ksxx | kcxx | jgdt | tpxw |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let title, path; switch (type) { @@ -42,10 +67,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(base, list, cache); // 感谢@hoilc指导 - ctx.set('data', { + return { title: '北林教务处 - ' + title, link: 'http://jwc.bjfu.edu.cn/' + path, description: '北京林业大学教务处 - ' + title, item: result, - }); -}; + }; +} diff --git a/lib/routes/bjfu/kjc.ts b/lib/routes/bjfu/kjc.ts index d103fe7ca..029093e4a 100644 --- a/lib/routes/bjfu/kjc.ts +++ b/lib/routes/bjfu/kjc.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/kjc', + categories: ['university'], + example: '/bjfu/kjc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kyc.bjfu.edu.cn/'], + }, + name: '科技处通知公告', + maintainers: ['markmingjie'], + handler, + url: 'kyc.bjfu.edu.cn/', +}; + +async function handler() { const url = 'http://kyc.bjfu.edu.cn/tztg/index.html'; const response = await got.get(url); const data = response.data; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '北林科技处通知', link: url, item: result, - }); -}; + }; +} diff --git a/lib/routes/bjfu/maintainer.ts b/lib/routes/bjfu/maintainer.ts deleted file mode 100644 index 124e61c30..000000000 --- a/lib/routes/bjfu/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/grs': ['markmingjie'], - '/it/:type': ['wzc-blog'], - '/jwc/:type': ['markmingjie'], - '/kjc': ['markmingjie'], - '/news/:type': ['markmingjie'], -}; diff --git a/lib/routes/bjfu/namespace.ts b/lib/routes/bjfu/namespace.ts new file mode 100644 index 000000000..9fb416924 --- /dev/null +++ b/lib/routes/bjfu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京师范大学', + url: 'graduate.bjfu.edu.cn', +}; diff --git a/lib/routes/bjfu/news/index.ts b/lib/routes/bjfu/news/index.ts index 87e359c56..8388e7155 100644 --- a/lib/routes/bjfu/news/index.ts +++ b/lib/routes/bjfu/news/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type', + categories: ['university'], + example: '/bjfu/news/lsyw', + parameters: { type: '新闻栏目' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.bjfu.edu.cn/:type/index.html'], + }, + name: '绿色新闻网', + maintainers: ['markmingjie'], + handler, + description: `| 绿色要闻 | 校园动态 | 教学科研 | 党建思政 | 一周排行 | + | -------- | -------- | -------- | -------- | -------- | + | lsyw | xydt | jxky | djsz | yzph |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let title, path; switch (type) { @@ -50,10 +75,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(base, list, cache); // 感谢@hoilc指导 - ctx.set('data', { + return { title: '北林新闻- ' + title, link: 'http://news.bjfu.edu.cn/' + path, description: '绿色新闻网 - ' + title, item: result, - }); -}; + }; +} diff --git a/lib/routes/bjfu/radar.ts b/lib/routes/bjfu/radar.ts deleted file mode 100644 index f6e7b14f1..000000000 --- a/lib/routes/bjfu/radar.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - 'bjfu.edu.cn': { - _name: '北京林业大学', - graduate: [ - { - title: '研究生院培养动态', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-lin-ye-da-xue', - source: '/', - target: '/bjfu/grs', - }, - ], - it: [ - { - title: '信息学院通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-lin-ye-da-xue', - source: '/:type/index.html', - target: '/bjfu/it/:type', - }, - ], - jwc: [ - { - title: '教务处通知公告', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-lin-ye-da-xue', - source: '/:type/index.html', - target: '/bjfu/jwc/:type', - }, - ], - kyc: [ - { - title: '科技处通知公告', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-lin-ye-da-xue', - source: '/', - target: '/bjfu/kjc', - }, - ], - news: [ - { - title: '绿色新闻网', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-lin-ye-da-xue', - source: '/:type/index.html', - target: '/bjfu/news/:type', - }, - ], - }, -}; diff --git a/lib/routes/bjfu/router.ts b/lib/routes/bjfu/router.ts deleted file mode 100644 index 672ff1f3e..000000000 --- a/lib/routes/bjfu/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/grs', './grs'); - router.get('/it/:type', './it/index'); - router.get('/jwc/:type', './jwc/index'); - router.get('/kjc', './kjc'); - router.get('/news/:type', './news/index'); -}; diff --git a/lib/routes/bjp/apod.ts b/lib/routes/bjp/apod.ts index b880c4ccf..bffda6650 100644 --- a/lib/routes/bjp/apod.ts +++ b/lib/routes/bjp/apod.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/apod', + categories: ['picture'], + example: '/bjp/apod', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bjp.org.cn/APOD/today.shtml', 'bjp.org.cn/APOD/list.shtml', 'bjp.org.cn/'], + }, + name: '每日一图', + maintainers: ['HenryQW'], + handler, + url: 'bjp.org.cn/APOD/today.shtml', +}; + +async function handler() { const baseUrl = 'https://www.bjp.org.cn'; const listUrl = `${baseUrl}/APOD/list.shtml`; @@ -35,10 +58,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: $('head title').text(), description: '探索宇宙!每天发布一张迷人宇宙的影像,以及由专业天文学家撰写的简要说明。', link: listUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bjp/maintainer.ts b/lib/routes/bjp/maintainer.ts deleted file mode 100644 index 8dd2cde29..000000000 --- a/lib/routes/bjp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/apod': ['HenryQW'], -}; diff --git a/lib/routes/bjp/namespace.ts b/lib/routes/bjp/namespace.ts new file mode 100644 index 000000000..718f28575 --- /dev/null +++ b/lib/routes/bjp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京天文馆', + url: 'bjp.org.cn', +}; diff --git a/lib/routes/bjp/radar.ts b/lib/routes/bjp/radar.ts deleted file mode 100644 index 9b0cce89e..000000000 --- a/lib/routes/bjp/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bjp.org.cn': { - _name: '北京天文馆', - '.': [ - { - title: '每日一图', - docs: 'https://docs.rsshub.app/routes/picture#bei-jing-tian-wen-guan', - source: ['/APOD/today.shtml', '/APOD/list.shtml', '/'], - target: '/bjp/apod', - }, - ], - }, -}; diff --git a/lib/routes/bjp/router.ts b/lib/routes/bjp/router.ts deleted file mode 100644 index 412c32ba3..000000000 --- a/lib/routes/bjp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/apod', './apod'); -}; diff --git a/lib/routes/bjsk/index.ts b/lib/routes/bjsk/index.ts index 11738bd34..7002e7951 100644 --- a/lib/routes/bjsk/index.ts +++ b/lib/routes/bjsk/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,30 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.bjsk.org.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/:path?', + categories: ['government'], + example: '/bjsk/newslist-1394-1474-0', + parameters: { path: '路径,默认为 `newslist-1486-0-0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通用', + maintainers: ['TonyRL'], + handler, + description: `:::tip + 路径处填写对应页面 URL 中 \`https://www.bjsk.org.cn/\` 和 \`.html\` 之间的字段。下面是一个例子。 + + 若订阅 [社科资讯 > 社科要闻](https://www.bjsk.org.cn/newslist-1394-1474-0.html) 则将对应页面 URL \`https://www.bjsk.org.cn/newslist-1394-1474-0.html\` 中 \`https://www.bjsk.org.cn/\` 和 \`.html\` 之间的字段 \`newslist-1394-1474-0\` 作为路径填入。此时路由为 [\`/bjsk/newslist-1394-1474-0\`](https://rsshub.app/bjsk/newslist-1394-1474-0) + :::`, +}; + +async function handler(ctx) { const { path = 'newslist-1486-0-0' } = ctx.req.param(); const link = `${baseUrl}/${path}.html`; const { data: response } = await got(link, { @@ -44,10 +68,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, image: 'https://www.bjsk.org.cn/favicon.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/bjsk/keti.ts b/lib/routes/bjsk/keti.ts index a16a6a864..04f5f4346 100644 --- a/lib/routes/bjsk/keti.ts +++ b/lib/routes/bjsk/keti.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/keti/:id?', + categories: ['government'], + example: '/bjsk/keti', + parameters: { id: '分类 id,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['keti.bjsk.org.cn/indexAction!to_index.action', 'keti.bjsk.org.cn/'], + target: '/keti/:id', + }, + name: '基金项目管理平台', + maintainers: ['nczitzk'], + handler, + url: 'keti.bjsk.org.cn/indexAction!to_index.action', + description: `| 通知公告 | 资料下载 | + | -------------------------------- | -------------------------------- | + | 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '402881027cbb8c6f017cbb8e17710002'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -47,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `北京社科基金项目管理平台 - ${$('.noticetop').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bjsk/maintainer.ts b/lib/routes/bjsk/maintainer.ts deleted file mode 100644 index ac274a7de..000000000 --- a/lib/routes/bjsk/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/keti/:id?': ['nczitzk'], - '/:path?': ['TonyRL'], -}; diff --git a/lib/routes/bjsk/namespace.ts b/lib/routes/bjsk/namespace.ts new file mode 100644 index 000000000..8a782b2f0 --- /dev/null +++ b/lib/routes/bjsk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京社科网', + url: 'bjsk.org.cn', +}; diff --git a/lib/routes/bjsk/radar.ts b/lib/routes/bjsk/radar.ts deleted file mode 100644 index aeaf47749..000000000 --- a/lib/routes/bjsk/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'bjsk.org.cn': { - _name: '北京社科网', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-she-ke-wang', - source: ['/*'], - target: (_, url) => `/bjsk/${url.split('/')[3].replace('.html', '')}`, - }, - ], - keti: [ - { - title: '基金项目管理平台', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-she-ke-wang', - source: ['/indexAction!to_index.action', '/'], - target: '/bjsk/keti/:id', - }, - ], - }, -}; diff --git a/lib/routes/bjsk/router.ts b/lib/routes/bjsk/router.ts deleted file mode 100644 index f93111e20..000000000 --- a/lib/routes/bjsk/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/keti/:id?', './keti'); - router.get('/:path?', './index'); -}; diff --git a/lib/routes/bjwxdxh/index.ts b/lib/routes/bjwxdxh/index.ts index c7b6ee3d6..a39b263ad 100644 --- a/lib/routes/bjwxdxh/index.ts +++ b/lib/routes/bjwxdxh/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['government'], + example: '/bjwxdxh/114', + parameters: { type: '类型,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新资讯', + maintainers: ['Misaka13514'], + handler, + description: `| 协会活动 | 公告通知 | 会议情况 | 简报 | 政策法规 | 学习园地 | 业余无线电服务中心 | 经验交流 | 新技术推介 | 活动通知 | 爱好者园地 | 结果查询 | 资料下载 | 会员之家 | 会员简介 | 会员风采 | 活动报道 | + | -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 |`, +}; + +async function handler(ctx) { const baseUrl = 'http://www.bjwxdxh.org.cn'; const type = ctx.req.param('type'); const link = type ? `${baseUrl}/news/class/?${type}.html` : `${baseUrl}/news/class/`; @@ -45,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link, item: list, - }); -}; + }; +} diff --git a/lib/routes/bjwxdxh/maintainer.ts b/lib/routes/bjwxdxh/maintainer.ts deleted file mode 100644 index c884c50e7..000000000 --- a/lib/routes/bjwxdxh/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['Misaka13514'], -}; diff --git a/lib/routes/bjwxdxh/namespace.ts b/lib/routes/bjwxdxh/namespace.ts new file mode 100644 index 000000000..8e077db91 --- /dev/null +++ b/lib/routes/bjwxdxh/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京无线电协会', + url: 'www.bjwxdxh.org.cn', +}; diff --git a/lib/routes/bjwxdxh/radar.ts b/lib/routes/bjwxdxh/radar.ts deleted file mode 100644 index f880f63a1..000000000 --- a/lib/routes/bjwxdxh/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bjwxdxh.org.cn': { - _name: '北京无线电协会', - www: [ - { - title: '最新资讯', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-wu-xian-dian-xie-hui', - source: '/news/class/', - target: (params, url) => (url.includes('?') ? `/bjwxdxh/${url.split('?')[1].split('.')[0]}` : '/bjwxdxh'), - }, - ], - }, -}; diff --git a/lib/routes/bjwxdxh/router.ts b/lib/routes/bjwxdxh/router.ts deleted file mode 100644 index 6fd05f06e..000000000 --- a/lib/routes/bjwxdxh/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); -}; diff --git a/lib/routes/bjx/huanbao.ts b/lib/routes/bjx/huanbao.ts index b6913fe97..7e963bcef 100644 --- a/lib/routes/bjx/huanbao.ts +++ b/lib/routes/bjx/huanbao.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -13,7 +14,29 @@ const asyncPoolAll = async (...args) => { return results; }; -export default async (ctx) => { +export const route: Route = { + path: '/huanbao', + categories: ['traditional-media'], + example: '/bjx/huanbao', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['huanbao.bjx.com.cn/yw', 'huanbao.bjx.com.cn/'], + }, + name: '环保要闻', + maintainers: ['zsimple'], + handler, + url: 'huanbao.bjx.com.cn/yw', +}; + +async function handler() { const listURL = 'https://huanbao.bjx.com.cn/yw/'; const response = await got(listURL); @@ -36,12 +59,12 @@ export default async (ctx) => { (items) => fetchPage(items.link) ); - ctx.set('data', { + return { title: '北极星环保 - 环保行业垂直门户网站', link: listURL, item: items, - }); -}; + }; +} const fetchPage = (link) => cache.tryGet(link, async () => { diff --git a/lib/routes/bjx/maintainer.ts b/lib/routes/bjx/maintainer.ts deleted file mode 100644 index 0d567a919..000000000 --- a/lib/routes/bjx/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/gf/:type': ['Sxuet'], - '/huanbao': ['zsimple'], -}; diff --git a/lib/routes/bjx/namespace.ts b/lib/routes/bjx/namespace.ts new file mode 100644 index 000000000..357b9ad4a --- /dev/null +++ b/lib/routes/bjx/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北极星电力网', + url: 'guangfu.bjx.com.cn', +}; diff --git a/lib/routes/bjx/radar.ts b/lib/routes/bjx/radar.ts deleted file mode 100644 index 895e86543..000000000 --- a/lib/routes/bjx/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'bjx.com.cn': { - _name: '北极星电力网', - guangfu: [ - { - title: '光伏 - 分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#bei-ji-xing-dian-li-wang', - source: ['/:type', '/'], - target: '/bjx/gf/:type?', - }, - ], - huanbao: [ - { - title: '环保要闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#bei-ji-xing-dian-li-wang', - source: ['/yw', '/'], - target: '/bjx/huanbao', - }, - ], - }, -}; diff --git a/lib/routes/bjx/router.ts b/lib/routes/bjx/router.ts deleted file mode 100644 index 95d2ece93..000000000 --- a/lib/routes/bjx/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/gf/:type', './types'); - router.get('/huanbao', './huanbao'); -}; diff --git a/lib/routes/bjx/types.ts b/lib/routes/bjx/types.ts index 09a9e4904..90d6a9a3b 100644 --- a/lib/routes/bjx/types.ts +++ b/lib/routes/bjx/types.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/gf/:type', + categories: ['traditional-media'], + example: '/bjx/gf/sc', + parameters: { type: '分类,北极星光伏最后的`type`字段' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '光伏', + maintainers: ['Sxuet'], + handler, + description: `\`:type\` 类型可选如下 + + | 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 | + | ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- | + | yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const response = await got({ method: 'get', @@ -12,7 +36,7 @@ export default async (ctx) => { const $ = load(data); const typeName = $('div.box2 em:last').text(); const list = $('div.cc-list-content ul li'); - ctx.set('data', { + return { title: `北极星太阳能光大网${typeName}`, description: $('meta[name="Description"]').attr('content'), link: `https://guangfu.bjx.com.cn/${type}/`, @@ -29,5 +53,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/blizzard/maintainer.ts b/lib/routes/blizzard/maintainer.ts deleted file mode 100644 index 5601f8413..000000000 --- a/lib/routes/blizzard/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:language?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/blizzard/namespace.ts b/lib/routes/blizzard/namespace.ts new file mode 100644 index 000000000..f9bf3c5ca --- /dev/null +++ b/lib/routes/blizzard/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Blizzard', + url: 'news.blizzard.com', +}; diff --git a/lib/routes/blizzard/news.ts b/lib/routes/blizzard/news.ts index 144683a6b..96dac3200 100644 --- a/lib/routes/blizzard/news.ts +++ b/lib/routes/blizzard/news.ts @@ -1,8 +1,65 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:language?/:category?', + categories: ['game'], + example: '/blizzard/news', + parameters: { language: 'Language code, see below, en-US by default', category: 'Category, see below, All News by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + description: `Categories + + | Category | Slug | + | ---------------------- | ------------------- | + | All News | | + | Diablo II: Resurrected | diablo2 | + | Diablo III | diablo3 | + | Diablo IV | diablo4 | + | Diablo: Immortal | diablo-immortal | + | Hearthstone | hearthstone | + | Heroes of the Storm | heroes-of-the-storm | + | Overwatch 2 | overwatch | + | StarCraft: Remastered | starcraft | + | StarCraft II | starcraft2 | + | World of Warcraft | world-of-warcraft | + | Warcraft III: Reforged | warcraft3 | + | Battle.net | battlenet | + | BlizzCon | blizzcon | + | Inside Blizzard | blizzard | + + Language codes + + | Language | Code | + | ------------------ | ----- | + | Deutsch | de-de | + | English (US) | en-us | + | English (EU) | en-gb | + | Español (EU) | es-es | + | Español (Latino) | es-mx | + | Français | fr-fr | + | Italiano | it-it | + | Português (Brasil) | pt-br | + | Polski | pl-pl | + | Русский | ru-ru | + | 한국어 | ko-kr | + | ภาษาไทย | th-th | + | 日本語 | ja-jp | + | 繁體中文 | zh-tw |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || ''; const language = ctx.req.param('language') || 'en-us'; @@ -43,9 +100,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/blizzard/radar.ts b/lib/routes/blizzard/radar.ts deleted file mode 100644 index 108722aee..000000000 --- a/lib/routes/blizzard/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'blizzard.com': { - _name: 'Blizzard', - news: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/game#blizzard', - source: ['/:language/:category?', '/:language'], - target: '/blizzard/news/:language/:category?', - }, - ], - }, -}; diff --git a/lib/routes/blizzard/router.ts b/lib/routes/blizzard/router.ts deleted file mode 100644 index 49a7c04ba..000000000 --- a/lib/routes/blizzard/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:language?/:category?', './news'); -}; diff --git a/lib/routes/bloomberg/authors.ts b/lib/routes/bloomberg/authors.ts index a7ec8bdd6..81db4815e 100644 --- a/lib/routes/bloomberg/authors.ts +++ b/lib/routes/bloomberg/authors.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import rssParser from '@/utils/rss-parser'; @@ -27,7 +28,29 @@ const parseAuthorNewsList = async (slug) => { .get(); }; -export default async (ctx) => { +export const route: Route = { + path: '/authors/:id/:slug/:source?', + categories: ['finance'], + example: '/bloomberg/authors/ARbTQlRLRjE/matthew-s-levine', + parameters: { id: 'Author ID, can be found in URL', slug: 'Author Slug, can be found in URL', source: 'Data source, either `api` or `rss`,`api` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.bloomberg.com/*/authors/:id/:slug', 'www.bloomberg.com/authors/:id/:slug'], + target: '/authors/:id/:slug', + }, + name: 'Authors', + maintainers: ['josh'], + handler, +}; + +async function handler(ctx) { const { id, slug, source } = ctx.req.param(); const link = `https://www.bloomberg.com/authors/${id}/${slug}`; @@ -43,10 +66,10 @@ export default async (ctx) => { const item = await asyncPoolAll(1, list, (item) => parseArticle(item)); const authorName = item.find((i) => i.author)?.author ?? 'Unknown'; - ctx.set('data', { + return { title: `Bloomberg - ${authorName}`, link, language: 'en-us', item, - }); -}; + }; +} diff --git a/lib/routes/bloomberg/index.ts b/lib/routes/bloomberg/index.ts index c62908082..d6477af22 100644 --- a/lib/routes/bloomberg/index.ts +++ b/lib/routes/bloomberg/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { rootUrl, asyncPoolAll, parseNewsList, parseArticle } from './utils'; const site_title_mapping = { '/': 'News', @@ -14,15 +15,22 @@ const site_title_mapping = { citylab: 'CityLab', }; -export default async (ctx) => { +export const route: Route = { + path: ['/:site', '/'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const site = ctx.req.param('site'); const currentUrl = site ? `${rootUrl}/${site}/sitemap_news.xml` : `${rootUrl}/sitemap_news.xml`; const list = await parseNewsList(currentUrl, ctx); const items = await asyncPoolAll(1, list, (item) => parseArticle(item)); - ctx.set('data', { + return { title: `Bloomberg - ${site_title_mapping[site ?? '/']}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bloomberg/maintainer.ts b/lib/routes/bloomberg/maintainer.ts deleted file mode 100644 index 50334a13b..000000000 --- a/lib/routes/bloomberg/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/authors/:id/:slug/:source?': ['josh'], - '/:site?': ['bigfei'], - '/': ['bigfei'], -}; diff --git a/lib/routes/bloomberg/namespace.ts b/lib/routes/bloomberg/namespace.ts new file mode 100644 index 000000000..ed652da2c --- /dev/null +++ b/lib/routes/bloomberg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bloomberg', + url: 'www.bloomberg.com', +}; diff --git a/lib/routes/bloomberg/radar.ts b/lib/routes/bloomberg/radar.ts deleted file mode 100644 index ec1bc5b6e..000000000 --- a/lib/routes/bloomberg/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'bloomberg.com': { - _name: 'Bloomberg', - www: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/finance#bloomberg-news', - source: ['/:site', '/'], - target: '/bloomberg/:site?', - }, - { - title: 'Authors', - docs: 'https://docs.rsshub.app/routes/finance#bloomberg', - source: ['/*/authors/:id/:slug', '/authors/:id/:slug'], - target: '/bloomberg/authors/:id/:slug', - }, - ], - }, -}; diff --git a/lib/routes/bloomberg/router.ts b/lib/routes/bloomberg/router.ts deleted file mode 100644 index dcbae601d..000000000 --- a/lib/routes/bloomberg/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/authors/:id/:slug/:source?', './authors'); - router.get('/:site', './index'); - router.get('/', './index'); -}; diff --git a/lib/routes/bluestacks/maintainer.ts b/lib/routes/bluestacks/maintainer.ts deleted file mode 100644 index a37e40f9b..000000000 --- a/lib/routes/bluestacks/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/release/5': ['TonyRL'], -}; diff --git a/lib/routes/bluestacks/namespace.ts b/lib/routes/bluestacks/namespace.ts new file mode 100644 index 000000000..230a8323a --- /dev/null +++ b/lib/routes/bluestacks/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BlueStacks', + url: 'bluestacks.com', +}; diff --git a/lib/routes/bluestacks/radar.ts b/lib/routes/bluestacks/radar.ts deleted file mode 100644 index 8e7884f7b..000000000 --- a/lib/routes/bluestacks/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bluestacks.com': { - _name: 'BlueStacks', - '.': [ - { - title: 'BlueStacks 5 版本日誌', - docs: 'https://docs.rsshub.app/routes/program-update#bluestacks', - source: ['/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5', '/'], - target: '/bluestacks/release/5', - }, - ], - }, -}; diff --git a/lib/routes/bluestacks/release.ts b/lib/routes/bluestacks/release.ts index 1a9f37dad..626d7ae69 100644 --- a/lib/routes/bluestacks/release.ts +++ b/lib/routes/bluestacks/release.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import cherrio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,29 @@ import puppeteer from '@/utils/puppeteer'; const pageUrl = 'https://support.bluestacks.com/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5'; -export default async (ctx) => { +export const route: Route = { + path: '/release/5', + categories: ['program-update'], + example: '/bluestacks/release/5', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bluestacks.com/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5', 'bluestacks.com/'], + }, + name: 'BlueStacks 5 Release Notes', + maintainers: ['TonyRL'], + handler, + url: 'bluestacks.com/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5', +}; + +async function handler() { const browser = await puppeteer(); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -55,11 +78,11 @@ export default async (ctx) => { await browser.close(); - ctx.set('data', { + return { title: $('.article__title').text().trim(), description: $('meta[name=description]').text().trim(), link: pageUrl, image: $('link[rel="shortcut icon"]').attr('href'), item: items, - }); -}; + }; +} diff --git a/lib/routes/bluestacks/router.ts b/lib/routes/bluestacks/router.ts deleted file mode 100644 index 6386f8d3f..000000000 --- a/lib/routes/bluestacks/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/release/5', './release'); -}; diff --git a/lib/routes/bmkg/earthquake.ts b/lib/routes/bmkg/earthquake.ts index 19d6801d0..187a99319 100644 --- a/lib/routes/bmkg/earthquake.ts +++ b/lib/routes/bmkg/earthquake.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/earthquake', + categories: ['forecast'], + example: '/bmkg/earthquake', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bmkg.go.id/', 'bmkg.go.id/gempabumi-terkini.html'], + }, + name: 'Recent Earthquakes', + maintainers: ['Shinanory'], + handler, + url: 'bmkg.go.id/', +}; + +async function handler() { const url = 'https://www.bmkg.go.id/gempabumi-terkini.html'; const response = await got(url); const $ = load(response.data); @@ -19,11 +42,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: url, description: '印尼气象气候和地球物理局 最近的地震(M ≥ 5.0) | BMKG earthquake', item: items, language: 'in', - }); -}; + }; +} diff --git a/lib/routes/bmkg/maintainer.ts b/lib/routes/bmkg/maintainer.ts deleted file mode 100644 index 1bde316dc..000000000 --- a/lib/routes/bmkg/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/earthquake': ['Shinanory'], - '/news': ['Shinanory'], -}; diff --git a/lib/routes/bmkg/namespace.ts b/lib/routes/bmkg/namespace.ts new file mode 100644 index 000000000..e43f29d3a --- /dev/null +++ b/lib/routes/bmkg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BADAN METEOROLOGI, KLIMATOLOGI, DAN GEOFISIKA(Indonesian)', + url: 'bmkg.go.id', +}; diff --git a/lib/routes/bmkg/news.ts b/lib/routes/bmkg/news.ts index f3e717ba8..87c0032c5 100644 --- a/lib/routes/bmkg/news.ts +++ b/lib/routes/bmkg/news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['forecast'], + example: '/bmkg/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bmkg.go.id/', 'bmkg.go.id/berita'], + }, + name: 'News', + maintainers: ['Shinanory'], + handler, + url: 'bmkg.go.id/', +}; + +async function handler() { const url = 'https://www.bmkg.go.id'; const response = await got(url); const $ = load(response.data); @@ -33,11 +56,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, description: '印尼气象气候和地球物理局 新闻 | BMKG news', item: items, language: 'in', - }); -}; + }; +} diff --git a/lib/routes/bmkg/radar.ts b/lib/routes/bmkg/radar.ts deleted file mode 100644 index 0ae28246a..000000000 --- a/lib/routes/bmkg/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'bmkg.go.id': { - _name: 'BMKG 印尼气象气候和地球物理局', - '.': [ - { - title: '最近的地震', - docs: 'https://docs.rsshub.app/routes/new-media#BMKG-yin-ni-qi-xiang-qi-hou-he-di-qiu-wu-li-ju', - source: ['/', '/gempabumi-terkini.html'], - target: '/bmkg/earthquake', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#BMKG-yin-ni-qi-xiang-qi-hou-he-di-qiu-wu-li-ju', - source: ['/', '/berita'], - target: '/bmkg/news', - }, - ], - }, -}; diff --git a/lib/routes/bmkg/router.ts b/lib/routes/bmkg/router.ts deleted file mode 100644 index 8f54ae123..000000000 --- a/lib/routes/bmkg/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/earthquake', './earthquake'); - router.get('/news', './news'); -}; diff --git a/lib/routes/bnu/bs.ts b/lib/routes/bnu/bs.ts index 5e23aec8e..8ba86d14b 100644 --- a/lib/routes/bnu/bs.ts +++ b/lib/routes/bnu/bs.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bs/:category?', + categories: ['university'], + example: '/bnu/bs', + parameters: { category: '分类,见下表,默认为学院新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bs.bnu.edu.cn/:category/index.html'], + target: '/bs/:category', + }, + name: '经济与工商管理学院', + maintainers: ['nczitzk'], + handler, + description: `| 学院新闻 | 通知公告 | 学术成果 | 学术讲座 | 教师观点 | 人才招聘 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | xw | zytzyyg | xzcg | xzjz | xz | bshzs |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'xw'; const rootUrl = 'http://bs.bnu.edu.cn'; @@ -45,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.right-c-title').text()} - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bnu/dwxgb.ts b/lib/routes/bnu/dwxgb.ts index 78a5f410e..ef89958b5 100644 --- a/lib/routes/bnu/dwxgb.ts +++ b/lib/routes/bnu/dwxgb.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dwxgb/:category/:type', + categories: ['university'], + example: '/bnu/dwxgb/xwzx/tzgg', + parameters: { category: '大分类', type: '子分类,例子如下' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dwxgb.bnu.edu.cn/:category/:type/index.html'], + }, + name: '党委学生工作部', + maintainers: ['Fatpandac'], + handler, + description: `\`https://dwxgb.bnu.edu.cn/xwzx/tzgg/index.html\` 则对应为 \`/bnu/dwxgb/xwzx/tzgg`, +}; + +async function handler(ctx) { const { category, type } = ctx.req.param(); const rootUrl = 'https://dwxgb.bnu.edu.cn'; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('div.breadcrumb1 > a:nth-child(3)').text()} - ${$('div.breadcrumb1 > a:nth-child(4)').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bnu/fdy.ts b/lib/routes/bnu/fdy.ts index 58fe3a6d4..0d52179a6 100644 --- a/lib/routes/bnu/fdy.ts +++ b/lib/routes/bnu/fdy.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/fdy/:path{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const baseUrl = 'http://fdy.bnu.edu.cn'; const { path = 'tzgg' } = ctx.req.param(); const link = `${baseUrl}/${path}/index.htm`; @@ -34,9 +42,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bnu/lib.ts b/lib/routes/bnu/lib.ts index 56ac52358..1c47e2a7d 100644 --- a/lib/routes/bnu/lib.ts +++ b/lib/routes/bnu/lib.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/lib/:category?', + radar: { + source: ['www.lib.bnu.edu.cn/:category/index.htm'], + target: '/lib/:category', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'http://www.lib.bnu.edu.cn'; const { category = 'zydt' } = ctx.req.param(); const link = `${baseUrl}/${category}/index.htm`; @@ -33,9 +45,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bnu/maintainer.ts b/lib/routes/bnu/maintainer.ts deleted file mode 100644 index 62fddaf11..000000000 --- a/lib/routes/bnu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/bs/:category?': ['nczitzk'], - '/dwxgb/:category/:type': ['Fatpandac'], - '/fdy/:path*': ['TonyRL'], - '/lib/:category?': ['TonyRL'], -}; diff --git a/lib/routes/bnu/namespace.ts b/lib/routes/bnu/namespace.ts new file mode 100644 index 000000000..7d0c7a69e --- /dev/null +++ b/lib/routes/bnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京师范大学', + url: 'bs.bnu.edu.cn', +}; diff --git a/lib/routes/bnu/radar.ts b/lib/routes/bnu/radar.ts deleted file mode 100644 index ecd854086..000000000 --- a/lib/routes/bnu/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'bnu.edu.cn': { - _name: '北京师范大学', - bs: [ - { - title: '经济与工商管理学院', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-shi-fan-da-xue', - source: ['/:category/index.html'], - target: '/bnu/bs/:category', - }, - ], - dwxgb: [ - { - title: '党委学生工作部', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-shi-fan-da-xue', - source: ['/:category/:type/index.html'], - target: '/bnu/dwxgb/:category/:type', - }, - ], - fdy: [ - { - title: '党委学生工作部辅导员发展中心', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-shi-fan-da-xue', - source: ['/'], - target: (_, url) => `/bnu/fdy${new URL(url).pathname.replace(/\/index\.htm(l)?$/, '')}`, - }, - ], - 'www.lib': [ - { - title: '图书馆通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-shi-fan-da-xue', - source: ['/:category/index.htm'], - target: '/bnu/lib/:category', - }, - ], - }, -}; diff --git a/lib/routes/bnu/router.ts b/lib/routes/bnu/router.ts deleted file mode 100644 index ae82e951a..000000000 --- a/lib/routes/bnu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/bs/:category?', './bs'); - router.get('/dwxgb/:category/:type', './dwxgb'); - router.get('/fdy/:path{.+}?', './fdy'); - router.get('/lib/:category?', './lib'); -}; diff --git a/lib/routes/boc/maintainer.ts b/lib/routes/boc/maintainer.ts deleted file mode 100644 index 854de278a..000000000 --- a/lib/routes/boc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/whpj/:format?': ['LogicJake', 'HenryQW'], -}; diff --git a/lib/routes/boc/namespace.ts b/lib/routes/boc/namespace.ts new file mode 100644 index 000000000..442459678 --- /dev/null +++ b/lib/routes/boc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国银行', + url: 'boc.cn', +}; diff --git a/lib/routes/boc/radar.ts b/lib/routes/boc/radar.ts deleted file mode 100644 index 50ca224d0..000000000 --- a/lib/routes/boc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'boc.cn': { - _name: '中国银行', - '.': [ - { - title: '外汇牌价', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-yin-hang', - source: ['/sourcedb/whpj', '/'], - target: '/boc/whpj', - }, - ], - }, -}; diff --git a/lib/routes/boc/router.ts b/lib/routes/boc/router.ts deleted file mode 100644 index 11abba62a..000000000 --- a/lib/routes/boc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/whpj/:format?', './whpj'); -}; diff --git a/lib/routes/boc/whpj.ts b/lib/routes/boc/whpj.ts index 308dc2f1d..30bd4e443 100644 --- a/lib/routes/boc/whpj.ts +++ b/lib/routes/boc/whpj.ts @@ -1,7 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/whpj/:format?', + categories: ['other'], + example: '/boc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91', + parameters: { format: '输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['boc.cn/sourcedb/whpj', 'boc.cn/'], + target: '/whpj', + }, + name: '外汇牌价', + maintainers: ['LogicJake', 'HenryQW'], + handler, + url: 'boc.cn/sourcedb/whpj', + description: `| 短格式 | 中行折算价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | + | ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | + | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +}; + +async function handler(ctx) { const link = 'https://www.boc.cn/sourcedb/whpj/'; const response = await got(link); const $ = load(response.data); @@ -92,9 +119,9 @@ export default async (ctx) => { return info; }); - ctx.set('data', { + return { title: '中国银行外汇牌价', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/bookfere/category.ts b/lib/routes/bookfere/category.ts index 5a9ec5333..8ecd286fb 100644 --- a/lib/routes/bookfere/category.ts +++ b/lib/routes/bookfere/category.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + categories: ['reading'], + example: '/bookfere/skills', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['OdinZhang'], + handler, + description: `| 每周一书 | 使用技巧 | 图书推荐 | 新闻速递 | 精选短文 | + | -------- | -------- | -------- | -------- | -------- | + | weekly | skills | books | news | essay |`, +}; + +async function handler(ctx) { const url = 'https://bookfere.com/category/' + ctx.req.param('category'); const response = await got({ method: 'get', @@ -14,7 +36,7 @@ export default async (ctx) => { const $ = load(data); const list = $('main div div section'); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: @@ -32,5 +54,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/bookfere/maintainer.ts b/lib/routes/bookfere/maintainer.ts deleted file mode 100644 index 6353dd820..000000000 --- a/lib/routes/bookfere/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category': ['OdinZhang'], -}; diff --git a/lib/routes/bookfere/namespace.ts b/lib/routes/bookfere/namespace.ts new file mode 100644 index 000000000..4e8c59e3a --- /dev/null +++ b/lib/routes/bookfere/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '书伴', + url: 'bookfere.com', +}; diff --git a/lib/routes/bookfere/radar.ts b/lib/routes/bookfere/radar.ts deleted file mode 100644 index a26d70656..000000000 --- a/lib/routes/bookfere/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'bookfere.com': { - _name: '书伴', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/reading#shu-ban', - }, - ], - }, -}; diff --git a/lib/routes/bookfere/router.ts b/lib/routes/bookfere/router.ts deleted file mode 100644 index cc70151e4..000000000 --- a/lib/routes/bookfere/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category', './category'); -}; diff --git a/lib/routes/booru/maintainer.ts b/lib/routes/booru/maintainer.ts deleted file mode 100644 index b4201b998..000000000 --- a/lib/routes/booru/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/mmda/tags/:tags?': ['N78Wy'], -}; diff --git a/lib/routes/booru/mmda.ts b/lib/routes/booru/mmda.ts index 1997c6f5e..fc78a0d95 100644 --- a/lib/routes/booru/mmda.ts +++ b/lib/routes/booru/mmda.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/mmda/tags/:tags?', + categories: ['picture'], + example: '/booru/mmda/tags/full_body+blue_eyes', + parameters: { tags: '标签,多个标签使用空格 ` ` 或者 `%20` 连接,如需根据作者查询则在 `user:` 后接上作者名,如:`user:xxxx`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'MMDArchive 标签查询', + maintainers: ['N78Wy'], + handler, + description: `For example: + + - 默认查询 (什么 tag 都不加):\`/booru/mmda/tags\` + - 默认查询单个 tag:\`/booru/mmda/tags/full_body\` + - 默认查询多个 tag:\`/booru/mmda/tags/full_body%20blue_eyes\` + - 默认查询根据作者查询:\`/booru/mmda/tags/user:xxxx\``, +}; + +async function handler(ctx) { const baseUrl = 'https://mmda.booru.org'; const tags = ctx.req.param('tags'); @@ -39,9 +64,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: tags, link: `${baseUrl}/index.php?${query}`, item: list, - }); -}; + }; +} diff --git a/lib/routes/booru/namespace.ts b/lib/routes/booru/namespace.ts new file mode 100644 index 000000000..8b019132c --- /dev/null +++ b/lib/routes/booru/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Booru', + url: 'mmda.booru.org', +}; diff --git a/lib/routes/booru/radar.ts b/lib/routes/booru/radar.ts deleted file mode 100644 index 636fc00af..000000000 --- a/lib/routes/booru/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'booru.org': { - _name: 'Booru', - mmda: [ - { - title: 'MMDArchive 标签查询', - docs: 'https://docs.rsshub.app/routes/picture#booru-mmdarchive-biao-qian-cha-xun', - source: '/index.php', - }, - ], - }, -}; diff --git a/lib/routes/booru/router.ts b/lib/routes/booru/router.ts deleted file mode 100644 index 3e817bd67..000000000 --- a/lib/routes/booru/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/mmda/tags/:tags?', './mmda'); -}; diff --git a/lib/routes/bossdesign/index.ts b/lib/routes/bossdesign/index.ts index 3e2577f35..6b8247498 100644 --- a/lib/routes/bossdesign/index.ts +++ b/lib/routes/bossdesign/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['design'], + example: '/bossdesign', + parameters: { category: '分类,可在对应分类页 URL 中找到,留空为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['TonyRL'], + handler, + description: `| Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 | + | --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- | + | note | computer-skills | design-resources | design-software | design-tutorial | design\_information |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = Number.parseInt(ctx.req.query('limit'), 10) || undefined; const baseUrl = 'https://www.bossdesign.cn'; @@ -32,11 +54,11 @@ export default async (ctx) => { category: [...new Set([...item._embedded['wp:term'][0].map((item) => item.name), ...item._embedded['wp:term'][1].map((item) => item.name)])], })); - ctx.set('data', { + return { title: currentCategory?.name ? `${currentCategory.name} | Boss设计` : 'Boss设计 | 收集国外设计素材网站的资源平台。', description: currentCategory?.description ?? 'Boss设计-收集国外设计素材网站的资源平台。专注于收集国外设计素材和国外设计网站,以及超实用的设计师神器,只为设计初学者和设计师提供海量的资源平台。..', image: currentCategory?.cover ?? `${baseUrl}/wp-content/themes/pinghsu/images/Bossdesign-ico.ico`, link: currentCategory?.link ?? baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bossdesign/maintainer.ts b/lib/routes/bossdesign/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/bossdesign/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/bossdesign/namespace.ts b/lib/routes/bossdesign/namespace.ts new file mode 100644 index 000000000..955feda26 --- /dev/null +++ b/lib/routes/bossdesign/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Boss 设计', + url: 'bossdesign.cn', +}; diff --git a/lib/routes/bossdesign/radar.ts b/lib/routes/bossdesign/radar.ts deleted file mode 100644 index c0be42d39..000000000 --- a/lib/routes/bossdesign/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bossdesign.cn': { - _name: 'Boss 设计', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/design#boss-she-ji', - source: ['/:category?', '/'], - target: (params) => `/bossdesign${params.category ? `/${params.category}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/bossdesign/router.ts b/lib/routes/bossdesign/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/bossdesign/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/brave/latest.ts b/lib/routes/brave/latest.ts index be94b9f5f..f2c953184 100644 --- a/lib/routes/brave/latest.ts +++ b/lib/routes/brave/latest.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['program-update'], + example: '/brave/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['brave.com/latest', 'brave.com/'], + }, + name: 'Release Notes', + maintainers: ['nczitzk'], + handler, + url: 'brave.com/latest', +}; + +async function handler() { const rootUrl = 'https://brave.com'; const currentUrl = `${rootUrl}/latest`; @@ -32,9 +55,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/brave/maintainer.ts b/lib/routes/brave/maintainer.ts deleted file mode 100644 index ca13de835..000000000 --- a/lib/routes/brave/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['nczitzk'], -}; diff --git a/lib/routes/brave/namespace.ts b/lib/routes/brave/namespace.ts new file mode 100644 index 000000000..cd8ef3a51 --- /dev/null +++ b/lib/routes/brave/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Brave', + url: 'brave.com', +}; diff --git a/lib/routes/brave/radar.ts b/lib/routes/brave/radar.ts deleted file mode 100644 index ea0e0b43b..000000000 --- a/lib/routes/brave/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'brave.com': { - _name: 'Brave', - '.': [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/program-update#brave-release-notes', - source: ['/latest', '/'], - target: '/brave/latest', - }, - ], - }, -}; diff --git a/lib/routes/brave/router.ts b/lib/routes/brave/router.ts deleted file mode 100644 index cd57ba05c..000000000 --- a/lib/routes/brave/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './latest'); -}; diff --git a/lib/routes/brooklynmuseum/exhibitions.ts b/lib/routes/brooklynmuseum/exhibitions.ts index 3b6bc3215..c293eed70 100644 --- a/lib/routes/brooklynmuseum/exhibitions.ts +++ b/lib/routes/brooklynmuseum/exhibitions.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/exhibitions/:state?', + categories: ['travel'], + example: '/brooklynmuseum/exhibitions', + parameters: { state: '展览进行的状态:`current` 对应展览当前正在进行,`past` 对应过去的展览,`upcoming` 对应即将举办的展览,默认为 `current`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Exhibitions', + maintainers: [], + handler, +}; + +async function handler(ctx) { let link; const state = ctx.req.param('state'); @@ -27,4 +46,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/brooklynmuseum/maintainer.ts b/lib/routes/brooklynmuseum/maintainer.ts deleted file mode 100644 index cfaf9ced0..000000000 --- a/lib/routes/brooklynmuseum/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/exhibitions': ['chazeon'], -}; diff --git a/lib/routes/brooklynmuseum/namespace.ts b/lib/routes/brooklynmuseum/namespace.ts new file mode 100644 index 000000000..08320443d --- /dev/null +++ b/lib/routes/brooklynmuseum/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Brooklyn Museum 纽约布鲁克林博物馆', + url: 'www.brooklynmuseum.org', +}; diff --git a/lib/routes/brooklynmuseum/radar.ts b/lib/routes/brooklynmuseum/radar.ts deleted file mode 100644 index d2126ad08..000000000 --- a/lib/routes/brooklynmuseum/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'brooklynmuseum.org': { - _name: 'Brooklyn Museum', - www: [ - { - title: 'Exhibitions', - docs: 'https://docs.rsshub.app/routes/travel#brooklyn-museum', - }, - ], - }, -}; diff --git a/lib/routes/brooklynmuseum/router.ts b/lib/routes/brooklynmuseum/router.ts deleted file mode 100644 index 80cefced5..000000000 --- a/lib/routes/brooklynmuseum/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/exhibitions/:state?', './exhibitions'); -}; diff --git a/lib/routes/bse/index.ts b/lib/routes/bse/index.ts index 6b79c0997..af8b58924 100644 --- a/lib/routes/bse/index.ts +++ b/lib/routes/bse/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -119,7 +120,48 @@ const nodes = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:keyword?', + categories: ['finance'], + example: '/bse', + parameters: { category: '分类,见下表,默认为本所要闻', keyword: '关键字,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bse.cn/'], + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + url: 'bse.cn/', + description: `| 本所要闻 | 人才招聘 | 采购信息 | 业务通知 | + | --------------- | -------- | -------- | ---------- | + | important\_news | recruit | purchase | news\_list | + + | 法律法规 | 公开征求意见 | 部门规章 | 发行融资 | + | --------- | --------------- | ---------------- | ---------- | + | law\_list | public\_opinion | regulation\_list | fxrz\_list | + + | 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 | + | ---------- | ---------- | ---------- | --------------- | + | cxjg\_list | jygl\_list | scgl\_list | meeting\_notice | + + | 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 | + | ------------------ | ------------------ | ------------------ | + | meeting\_result | meeting\_change | bgcz\_notice | + + | 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 | + | ---------------------- | ---------------------- | ------------------ | ------------- | + | bgcz\_result | bgcz\_change | termination\_audit | audit\_result |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'important_news'; const keyword = ctx.req.param('keyword') ?? ''; @@ -163,10 +205,10 @@ export default async (ctx) => { break; } - ctx.set('data', { + return { title: `${nodes[category].title} - 北京证券交易所`, link: `${rootUrl}${nodes[category].url}`, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/bse/maintainer.ts b/lib/routes/bse/maintainer.ts deleted file mode 100644 index 1f8f27f4c..000000000 --- a/lib/routes/bse/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/bse/namespace.ts b/lib/routes/bse/namespace.ts new file mode 100644 index 000000000..234ff3efb --- /dev/null +++ b/lib/routes/bse/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京证券交易所', + url: 'bse.cn', +}; diff --git a/lib/routes/bse/radar.ts b/lib/routes/bse/radar.ts deleted file mode 100644 index 8536771e2..000000000 --- a/lib/routes/bse/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bse.cn': { - _name: '北京证券交易所', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/finance#bei-jing-zheng-quan-jiao-yi-suo-lan-mu', - source: ['/'], - target: '/bse/:category?/:keyword?', - }, - ], - }, -}; diff --git a/lib/routes/bse/router.ts b/lib/routes/bse/router.ts deleted file mode 100644 index 116808371..000000000 --- a/lib/routes/bse/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:keyword?', './index'); -}; diff --git a/lib/routes/bsky/keyword.ts b/lib/routes/bsky/keyword.ts index 2fc29d2a1..924a35225 100644 --- a/lib/routes/bsky/keyword.ts +++ b/lib/routes/bsky/keyword.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/keyword/:keyword', + categories: ['social-media'], + example: '/bsky/keyword/hello', + parameters: { keyword: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keywords', + maintainers: ['untitaker'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const apiLink = `https://search.bsky.social/search/posts?q=${encodeURIComponent(keyword)}`; @@ -14,9 +33,9 @@ export default async (ctx) => { author: item.user.handle, })); - ctx.set('data', { + return { title: `Bluesky Keyword - ${keyword}`, link: `https://bsky.app/search?q=${encodeURIComponent(keyword)}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/bsky/maintainer.ts b/lib/routes/bsky/maintainer.ts deleted file mode 100644 index 9be3033de..000000000 --- a/lib/routes/bsky/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/keyword/:keyword': ['untitaker'], - '/profile/:handle': ['TonyRL'], -}; diff --git a/lib/routes/bsky/namespace.ts b/lib/routes/bsky/namespace.ts new file mode 100644 index 000000000..a9241da51 --- /dev/null +++ b/lib/routes/bsky/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bluesky (bsky)', + url: 'bsky.app', +}; diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 40d5111f8..551143211 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { resolveHandle, getProfile, getAuthorFeed } from './utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/profile/:handle', + categories: ['social-media'], + example: '/bsky/profile/bsky.app', + parameters: { handle: 'User handle, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bsky.app/profile/:handle'], + }, + name: 'Post', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const handle = ctx.req.param('handle'); const DID = await resolveHandle(handle, cache.tryGet); const profile = await getProfile(DID, cache.tryGet); @@ -28,7 +50,7 @@ export default async (ctx) => { comments: post.replyCount, })); - ctx.set('data', { + return { title: `${profile.displayName} (@${profile.handle}) — Bluesky`, description: profile.description?.replaceAll('\n', ' '), link: `https://bsky.app/profile/${profile.handle}`, @@ -36,11 +58,11 @@ export default async (ctx) => { icon: profile.avatar, logo: profile.avatar, item: items, - }); + }; ctx.set('json', { DID, profile, authorFeed, }); -}; +} diff --git a/lib/routes/bsky/radar.ts b/lib/routes/bsky/radar.ts deleted file mode 100644 index f60721123..000000000 --- a/lib/routes/bsky/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'bsky.app': { - _name: 'Bluesky', - '.': [ - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/social-media#bluesky-bsky', - source: '/search', - target: (params, url) => `/bsky/keyword/${new URL(url).searchParams.get('q')}`, - }, - { - title: 'Post', - docs: 'https://docs.rsshub.app/routes/social-media#bluesky-bsky', - source: '/profile/:handle', - target: '/bsky/profile/:handle', - }, - ], - }, -}; diff --git a/lib/routes/bsky/router.ts b/lib/routes/bsky/router.ts deleted file mode 100644 index 0f98787ca..000000000 --- a/lib/routes/bsky/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/keyword/:keyword', './keyword'); - router.get('/profile/:handle', './posts'); -}; diff --git a/lib/routes/btzj/index.ts b/lib/routes/btzj/index.ts index 45048867c..50b7731da 100644 --- a/lib/routes/btzj/index.ts +++ b/lib/routes/btzj/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,60 @@ import * as path from 'node:path'; import { config } from '@/config'; const allowDomain = new Set(['2btjia.com', '88btbtt.com', 'btbtt15.com', 'btbtt20.com']); -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['multimedia'], + example: '/btzj', + parameters: { category: '分类,可在对应分类页 URL 中找到,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['btbtt20.com/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + url: 'btbtt20.com/', + description: `:::tip + 分类页中域名末尾到 \`.htm\` 前的字段即为对应分类,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm) \`https://www.btbtt20.com/forum-index-fid-951.htm\` 中域名末尾到 \`.htm\` 前的字段为 \`forum-index-fid-951\`,所以路由应为 [\`/btzj/forum-index-fid-951\`](https://rsshub.app/btzj/forum-index-fid-951) + + 部分分类页,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm)、[剧集](https://www.btbtt20.com/forum-index-fid-950.htm) 等,提供了更复杂的分类筛选。你可以将选项选中后,获得结果分类页 URL 中分类参数,构成路由。如选中分类 [高清电影 - 年份:2021 - 地区:欧美](https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm) \`https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm\` 中域名末尾到 \`.htm\` 前的字段为 \`forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0\`,所以路由应为 [\`/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0\`](https://rsshub.app/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0) + ::: + + 基础分类如下: + + | 交流 | 电影 | 剧集 | 高清电影 | + | ------------------- | ------------------- | ------------------- | -------------------- | + | forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 | + + | 音乐 | 动漫 | 游戏 | 综艺 | + | ------------------- | ------------------- | ------------------- | -------------------- | + | forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 | + + | 图书 | 美图 | 站务 | 科技 | + | -------------------- | ------------------- | ----------------- | ------------------- | + | forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 | + + | 求助 | 音轨字幕 | + | -------------------- | -------------------- | + | forum-index-fid-1187 | forum-index-fid-1191 | + + :::tip + BT 之家的域名会变更,本路由以 \`https://www.btbtt20.com\` 为默认域名,若该域名无法访问,可以通过在路由后方加上 \`?domain=<域名>\` 指定路由访问的域名。如指定域名为 \`https://www.btbtt15.com\`,则在 \`/btzj\` 后加上 \`?domain=btbtt15.com\` 即可,此时路由为 [\`/btzj?domain=btbtt15.com\`](https://rsshub.app/btzj?domain=btbtt15.com) + + 如果加入了分类参数,直接在分类参数后加入 \`?domain=<域名>\` 即可。如指定分类 [剧集](https://www.btbtt20.com/forum-index-fid-950.htm) \`https://www.btbtt20.com/forum-index-fid-950.htm\` 并指定域名为 \`https://www.btbtt15.com\`,即在 \`/btzj/forum-index-fid-950\` 后加上 \`?domain=btbtt15.com\`,此时路由为 [\`/btzj/forum-index-fid-950?domain=btbtt15.com\`](https://rsshub.app/btzj/forum-index-fid-950?domain=btbtt15.com) + + 目前,你可以选择的域名有 \`btbtt10-20.com\` 共 10 个,或 \`88btbbt.com\`,该站也提供了专用网址查询工具。详见 [此贴](https://www.btbtt20.com/thread-index-fid-2-tid-4550191.htm) + :::`, +}; + +async function handler(ctx) { let category = ctx.req.param('category') ?? ''; let domain = ctx.req.query('domain') ?? 'btbtt15.com'; if (!config.feature.allow_user_supply_unsafe_domain && !allowDomain.has(new URL(`http://${domain}/`).hostname)) { @@ -94,7 +148,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('#menu, #threadtype') .find('.checked') .toArray() @@ -103,5 +157,5 @@ export default async (ctx) => { .join('|')} - BT之家`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/btzj/maintainer.ts b/lib/routes/btzj/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/btzj/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/btzj/namespace.ts b/lib/routes/btzj/namespace.ts new file mode 100644 index 000000000..f5847215f --- /dev/null +++ b/lib/routes/btzj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BT 之家', + url: 'btbtt20.com', +}; diff --git a/lib/routes/btzj/radar.ts b/lib/routes/btzj/radar.ts deleted file mode 100644 index ceee147cd..000000000 --- a/lib/routes/btzj/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'btbtt20.com': { - _name: 'BT之家', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#bt-zhi-jia', - source: ['/'], - target: '/btzj/:category?', - }, - ], - }, -}; diff --git a/lib/routes/btzj/router.ts b/lib/routes/btzj/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/btzj/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/buaa/maintainer.ts b/lib/routes/buaa/maintainer.ts deleted file mode 100644 index 4c83ee946..000000000 --- a/lib/routes/buaa/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:type': ['AlanDecode'], - '/sme/:path*': ['MeanZhang'], -}; diff --git a/lib/routes/buaa/namespace.ts b/lib/routes/buaa/namespace.ts new file mode 100644 index 000000000..58c5ca080 --- /dev/null +++ b/lib/routes/buaa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京航空航天大学', + url: 'news.buaa.edu.cn', +}; diff --git a/lib/routes/buaa/news/index.ts b/lib/routes/buaa/news/index.ts index 33d976d91..c21be7a33 100644 --- a/lib/routes/buaa/news/index.ts +++ b/lib/routes/buaa/news/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type', + categories: ['university'], + example: '/buaa/news/zhxw', + parameters: { type: '新闻版块' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻网', + maintainers: ['AlanDecode'], + handler, + description: `| 综合新闻 | 信息公告 | 学术文化 | 校园风采 | 科教在线 | 媒体北航 | 专题新闻 | 北航人物 | + | -------- | --------- | ------------ | --------- | --------- | --------- | -------- | -------- | + | zhxw | xxgg\_new | xsjwhhd\_new | xyfc\_new | kjzx\_new | mtbh\_new | ztxw | bhrw |`, +}; + +async function handler(ctx) { const baseUrl = 'https://news.buaa.edu.cn'; const type = ctx.req.param('type'); @@ -38,10 +60,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `北航新闻 - ${title}`, link, description: `北京航空航天大学新闻网 - ${title}`, item: result, - }); -}; + }; +} diff --git a/lib/routes/buaa/radar.ts b/lib/routes/buaa/radar.ts deleted file mode 100644 index 8f813b78c..000000000 --- a/lib/routes/buaa/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'buaa.edu.cn': { - _name: '北京航空航天大学', - news: [ - { - title: '新闻网', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-hang-kong-hang-tian-da-xue', - source: ['/*'], - target: (_, url) => `/buaa/news${new URL(url).pathname.replace('.htm', '')}`, - }, - ], - 'www.sme': [ - { - title: '集成电路科学与工程学院', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-hang-kong-hang-tian-da-xue-ji-cheng-dian-lu-ke-xue-yu-gong-cheng-xue-yuan', - source: ['/*'], - target: (_, url) => `/buaa/sme${new URL(url).pathname.replace('.htm', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/buaa/router.ts b/lib/routes/buaa/router.ts deleted file mode 100755 index 4993c75d5..000000000 --- a/lib/routes/buaa/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:type', './news/index'); - router.get('/sme/:path{.+}?', './sme'); -}; diff --git a/lib/routes/buaa/sme.ts b/lib/routes/buaa/sme.ts index 9f7be9e85..c4b1a4474 100755 --- a/lib/routes/buaa/sme.ts +++ b/lib/routes/buaa/sme.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,19 +7,26 @@ import timezone from '@/utils/timezone'; const BASE_URL = 'http://www.sme.buaa.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/sme/:path{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { path = 'tzgg' } = ctx.req.param(); const url = `${BASE_URL}/${path}.htm`; const { title, list } = await getList(url); - ctx.set('data', { + return { // 源标题 title, // 源链接 link: url, // 源文章 item: await getItems(list), - }); -}; + }; +} async function getList(url) { const { data } = await got(url); diff --git a/lib/routes/bulianglin/bulianglin.ts b/lib/routes/bulianglin/bulianglin.ts index 05a5904a1..f4f24c6a5 100644 --- a/lib/routes/bulianglin/bulianglin.ts +++ b/lib/routes/bulianglin/bulianglin.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['bulianglin.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'bulianglin.com/', +}; + +async function handler() { const url = 'https://bulianglin.com/'; const response = await got({ method: 'get', url }); const $ = load(response.data); @@ -24,9 +37,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '不良林', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/bulianglin/maintainer.ts b/lib/routes/bulianglin/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/bulianglin/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/bulianglin/namespace.ts b/lib/routes/bulianglin/namespace.ts new file mode 100644 index 000000000..9efb89ca8 --- /dev/null +++ b/lib/routes/bulianglin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '不良林', + url: 'bulianglin.com', +}; diff --git a/lib/routes/bulianglin/radar.ts b/lib/routes/bulianglin/radar.ts deleted file mode 100644 index dacc465ed..000000000 --- a/lib/routes/bulianglin/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bulianglin.com': { - _name: '不良林', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#bu-liang-lin', - source: ['/'], - target: '/bulianglin', - }, - ], - }, -}; diff --git a/lib/routes/bulianglin/router.ts b/lib/routes/bulianglin/router.ts deleted file mode 100644 index 16346ab70..000000000 --- a/lib/routes/bulianglin/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './bulianglin'); -}; diff --git a/lib/routes/bupt/maintainer.ts b/lib/routes/bupt/maintainer.ts deleted file mode 100644 index c5a3066ee..000000000 --- a/lib/routes/bupt/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/rczp': ['nczitzk'], -}; diff --git a/lib/routes/bupt/namespace.ts b/lib/routes/bupt/namespace.ts new file mode 100644 index 000000000..8d7475341 --- /dev/null +++ b/lib/routes/bupt/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京邮电大学', + url: 'bupt.edu.cn', +}; diff --git a/lib/routes/bupt/radar.ts b/lib/routes/bupt/radar.ts deleted file mode 100644 index 429b03478..000000000 --- a/lib/routes/bupt/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bupt.edu.cn': { - _name: '北京邮电大学', - '.': [ - { - title: '人才招聘', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-you-dian-da-xue-ren-cai-zhao-pin', - source: ['/'], - target: '/bupt/rczp', - }, - ], - }, -}; diff --git a/lib/routes/bupt/rczp.ts b/lib/routes/bupt/rczp.ts index 80f48cb71..8fe926b50 100644 --- a/lib/routes/bupt/rczp.ts +++ b/lib/routes/bupt/rczp.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/rczp', + categories: ['university'], + example: '/bupt/rczp', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bupt.edu.cn/'], + }, + name: '人才招聘', + maintainers: ['nczitzk'], + handler, + url: 'bupt.edu.cn/', +}; + +async function handler() { const rootUrl = 'https://www.bupt.edu.cn'; const currentUrl = `${rootUrl}/rczp.htm`; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/bupt/router.ts b/lib/routes/bupt/router.ts deleted file mode 100644 index 023a5755a..000000000 --- a/lib/routes/bupt/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/rczp', './rczp'); -}; diff --git a/lib/routes/byteclicks/index.ts b/lib/routes/byteclicks/index.ts index f8d94c607..52f6d5dc8 100644 --- a/lib/routes/byteclicks/index.ts +++ b/lib/routes/byteclicks/index.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseItem } from './utils'; const baseUrl = 'https://byteclicks.com'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['byteclicks.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'byteclicks.com/', +}; + +async function handler(ctx) { const { data } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { per_page: ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100, @@ -11,12 +24,12 @@ export default async (ctx) => { const items = parseItem(data); - ctx.set('data', { + return { title: '字节点击 - 聚合全球优质资源,跟踪世界前沿科技', description: 'byteclicks.com 最专业的前沿科技网站。聚合全球优质资源,跟踪世界前沿科技,精选推荐一些很棒的互联网好资源好工具好产品。寻找有前景好项目、找论文、找报告、找数据、找课程、找电子书上byteclicks!byteclicks.com是投资人、科研学者、学生每天必看的网站。', image: 'https://byteclicks.com/wp-content/themes/RK-Blogger/images/wbolt.ico', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/byteclicks/maintainer.ts b/lib/routes/byteclicks/maintainer.ts deleted file mode 100644 index b4a9cb3c7..000000000 --- a/lib/routes/byteclicks/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['TonyRL'], - '/tag/:tag': ['TonyRL'], -}; diff --git a/lib/routes/byteclicks/namespace.ts b/lib/routes/byteclicks/namespace.ts new file mode 100644 index 000000000..f6932376e --- /dev/null +++ b/lib/routes/byteclicks/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '字节点击', + url: 'byteclicks.com', +}; diff --git a/lib/routes/byteclicks/radar.ts b/lib/routes/byteclicks/radar.ts deleted file mode 100644 index bafc6e2ea..000000000 --- a/lib/routes/byteclicks/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'byteclicks.com': { - _name: '字节点击', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#zi-jie-dian-ji', - source: ['/'], - target: '/byteclicks', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#zi-jie-dian-ji', - source: ['/tag/:tag'], - target: '/byteclicks/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/byteclicks/router.ts b/lib/routes/byteclicks/router.ts deleted file mode 100644 index 9cd07e1c4..000000000 --- a/lib/routes/byteclicks/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/tag/:tag', './tag'); -}; diff --git a/lib/routes/byteclicks/tag.ts b/lib/routes/byteclicks/tag.ts index 51bf3d4b6..a72166e51 100644 --- a/lib/routes/byteclicks/tag.ts +++ b/lib/routes/byteclicks/tag.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseItem } from './utils'; const baseUrl = 'https://byteclicks.com'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['new-media'], + example: '/byteclicks/tag/人工智能', + parameters: { tag: '标签,可在URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['byteclicks.com/tag/:tag'], + }, + name: '标签', + maintainers: ['TonyRL'], + handler, + url: 'byteclicks.com/', +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const { data: search } = await got(`${baseUrl}/wp-json/wp/v2/tags`, { searchParams: { @@ -21,10 +44,10 @@ export default async (ctx) => { const items = parseItem(data); - ctx.set('data', { + return { title: `${tagData.name} - 字节点击`, image: 'https://byteclicks.com/wp-content/themes/RK-Blogger/images/wbolt.ico', link: tagData.link, item: items, - }); -}; + }; +} diff --git a/lib/routes/bytes/bytes.ts b/lib/routes/bytes/bytes.ts index 739a5c311..7fb2ad72c 100644 --- a/lib/routes/bytes/bytes.ts +++ b/lib/routes/bytes/bytes.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const currentURL = 'https://bytes.dev/archives'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['bytes.dev/archives', 'bytes.dev/'], + target: '', + }, + name: 'Unknown', + maintainers: ['meixger'], + handler, + url: 'bytes.dev/archives', +}; + +async function handler() { const resp = await got(currentURL); const $ = load(resp.data); const text = $('script#__NEXT_DATA__').text(); @@ -16,10 +29,10 @@ export default async (ctx) => { link: `/archives/${item.slug}`, })); - ctx.set('data', { + return { title: 'bytes.dev', description: 'Your weekly dose of JS', link: currentURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/bytes/maintainer.ts b/lib/routes/bytes/maintainer.ts deleted file mode 100644 index 84722b5c8..000000000 --- a/lib/routes/bytes/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['meixger'], -}; diff --git a/lib/routes/bytes/namespace.ts b/lib/routes/bytes/namespace.ts new file mode 100644 index 000000000..99b9f6beb --- /dev/null +++ b/lib/routes/bytes/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ui.dev', + url: 'bytes.dev', +}; diff --git a/lib/routes/bytes/radar.ts b/lib/routes/bytes/radar.ts deleted file mode 100644 index ae36e1acf..000000000 --- a/lib/routes/bytes/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bytes.dev': { - _name: 'ui.dev', - '.': [ - { - title: 'BYTES - Your weekly dose of JS', - docs: 'https://docs.rsshub.app/routes/programming#ui-dev-bytes', - source: ['/archives', '/'], - target: '/bytes', - }, - ], - }, -}; diff --git a/lib/routes/bytes/router.ts b/lib/routes/bytes/router.ts deleted file mode 100644 index ced2307f8..000000000 --- a/lib/routes/bytes/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './bytes'); -}; diff --git a/lib/routes/c114/maintainer.ts b/lib/routes/c114/maintainer.ts deleted file mode 100644 index 1efab5eef..000000000 --- a/lib/routes/c114/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/roll': ['nczitzk'], -}; diff --git a/lib/routes/c114/namespace.ts b/lib/routes/c114/namespace.ts new file mode 100644 index 000000000..3c44a5c48 --- /dev/null +++ b/lib/routes/c114/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'C114 通信网', + url: 'c114.com.cn', +}; diff --git a/lib/routes/c114/radar.ts b/lib/routes/c114/radar.ts deleted file mode 100644 index 9d9a94290..000000000 --- a/lib/routes/c114/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'c114.com.cn': { - _name: 'C114通信网', - '.': [ - { - title: '滚动新闻', - docs: 'https://docs.rsshub.app/routes/new-media#c114-tong-xin-wang-gun-dong-xin-wen', - source: ['/news/roll.asp', '/'], - target: '/c114/roll', - }, - ], - }, -}; diff --git a/lib/routes/c114/roll.ts b/lib/routes/c114/roll.ts index f25a0ba2c..0710a4499 100644 --- a/lib/routes/c114/roll.ts +++ b/lib/routes/c114/roll.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/roll', + categories: ['new-media'], + example: '/c114/roll', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['c114.com.cn/news/roll.asp', 'c114.com.cn/'], + }, + name: '滚动新闻', + maintainers: ['nczitzk'], + handler, + url: 'c114.com.cn/news/roll.asp', +}; + +async function handler(ctx) { const rootUrl = 'https://www.c114.com.cn'; const currentUrl = `${rootUrl}/news/roll.asp`; @@ -50,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/c114/router.ts b/lib/routes/c114/router.ts deleted file mode 100644 index 6536d5745..000000000 --- a/lib/routes/c114/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/roll', './roll'); -}; diff --git a/lib/routes/caai/index.ts b/lib/routes/caai/index.ts index dbc686778..82e17bd37 100644 --- a/lib/routes/caai/index.ts +++ b/lib/routes/caai/index.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:caty', + categories: ['study'], + example: '/caai/45', + parameters: { caty: '分类 ID,可在 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '学会动态', + maintainers: ['tudou027'], + handler, +}; + +async function handler(ctx) { const base = utils.urlBase(ctx.req.param('caty')); const res = await got(base); const info = utils.fetchAllArticles(res.data); @@ -15,9 +34,9 @@ export default async (ctx) => { info, }); - ctx.set('data', { + return { title: '中国人工智能学会 - ' + $('.article-list h1').text(), link: base, item: details, - }); -}; + }; +} diff --git a/lib/routes/caai/maintainer.ts b/lib/routes/caai/maintainer.ts deleted file mode 100644 index f56558ca0..000000000 --- a/lib/routes/caai/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:caty': ['tudou027'], -}; diff --git a/lib/routes/caai/namespace.ts b/lib/routes/caai/namespace.ts new file mode 100644 index 000000000..aa50eac2e --- /dev/null +++ b/lib/routes/caai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国人工智能学会', + url: 'caai.cn', +}; diff --git a/lib/routes/caai/radar.ts b/lib/routes/caai/radar.ts deleted file mode 100644 index 4c03c9e8d..000000000 --- a/lib/routes/caai/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'caai.cn': { - _name: '中国人工智能学会', - '.': [ - { - title: '学会动态', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ren-gong-zhi-neng-xue-hui', - source: ['/index.php'], - target: (_, url) => `/caai/${url.match(/\/(\d+)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/caai/router.ts b/lib/routes/caai/router.ts deleted file mode 100644 index f4101100e..000000000 --- a/lib/routes/caai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:caty', './index'); -}; diff --git a/lib/routes/caam/index.ts b/lib/routes/caam/index.ts index 1c91640fc..f2ee231f2 100644 --- a/lib/routes/caam/index.ts +++ b/lib/routes/caam/index.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { category = '1' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -52,7 +60,7 @@ export default async (ctx) => { const subtitle = $('div.topMeuns ul li a').last().text(); const image = new URL('images/header-back-7.png', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -61,5 +69,5 @@ export default async (ctx) => { image, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/caam/maintainer.ts b/lib/routes/caam/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/caam/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/caam/namespace.ts b/lib/routes/caam/namespace.ts new file mode 100644 index 000000000..237b6afc0 --- /dev/null +++ b/lib/routes/caam/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国汽车工业协会', + url: 'caam.org.cn', +}; diff --git a/lib/routes/caam/radar.ts b/lib/routes/caam/radar.ts deleted file mode 100644 index b748fd79e..000000000 --- a/lib/routes/caam/radar.ts +++ /dev/null @@ -1,2677 +0,0 @@ -export default { - 'caam.org.cn': { - _name: '中国汽车工业协会', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['/chn'], - target: (_, url) => { - url = new URL(url); - - const category = url.match(/cate_(\d+)\//)?.[1] ?? undefined; - - return `/caam${category ? `/${category}` : ''}`; - }, - }, - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_1/list_1.html'], - target: '/caam/1', - }, - { - title: '行业要闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_2/list_1.html'], - target: '/caam/2', - }, - { - title: '协会活动', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_3/list_1.html'], - target: '/caam/3', - }, - { - title: '会员专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_4/list_1.html'], - target: '/caam/4', - }, - { - title: '协会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_5/list_1.html'], - target: '/caam/5', - }, - { - title: '协会概况 - 会员单位', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_6/list_1.html'], - target: '/caam/6', - }, - { - title: '协会概况 - 协会简介', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_7/list_1.html'], - target: '/caam/7', - }, - { - title: '协会概况 - 协会章程', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_8/list_1.html'], - target: '/caam/8', - }, - { - title: '协会概况 - 组织机构', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_9/list_1.html'], - target: '/caam/9', - }, - { - title: '协会概况 - 主要职责', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_10/list_1.html'], - target: '/caam/10', - }, - { - title: '协会概况 - 协会荣誉', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_11/list_1.html'], - target: '/caam/11', - }, - { - title: '协会概况 - 分支机构', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_12/list_1.html'], - target: '/caam/12', - }, - { - title: '协会概况 - 分支机构 - 机构介绍', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_13/list_1.html'], - target: '/caam/13', - }, - { - title: '协会概况 - 分支机构 - 管理办法', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_14/list_1.html'], - target: '/caam/14', - }, - { - title: '协会概况 - 分支机构 - 业务范围', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_15/list_1.html'], - target: '/caam/15', - }, - { - title: '协会工作', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_16/list_1.html'], - target: '/caam/16', - }, - { - title: '协会工作 - 协会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_17/list_1.html'], - target: '/caam/17', - }, - { - title: '协会工作 - 分支机构动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_18/list_1.html'], - target: '/caam/18', - }, - { - title: '协会工作 - 重点工作', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_19/list_1.html'], - target: '/caam/19', - }, - { - title: '协会工作 - 法规标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_20/list_1.html'], - target: '/caam/20', - }, - { - title: '协会工作 - 信用服务', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_21/list_1.html'], - target: '/caam/21', - }, - { - title: '协会工作 - 会员服务', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_22/list_1.html'], - target: '/caam/22', - }, - { - title: '协会工作 - 政策研究', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_23/list_1.html'], - target: '/caam/23', - }, - { - title: '协会工作 - 协调合作', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_24/list_1.html'], - target: '/caam/24', - }, - { - title: '协会工作 - 展会信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_25/list_1.html'], - target: '/caam/25', - }, - { - title: '协会工作 - 国际合作', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_26/list_1.html'], - target: '/caam/26', - }, - { - title: '协会工作 - 会员动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_27/list_1.html'], - target: '/caam/27', - }, - { - title: '协会工作 - 行业培训', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_28/list_1.html'], - target: '/caam/28', - }, - { - title: '统计数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_29/list_1.html'], - target: '/caam/29', - }, - { - title: '统计数据 - 产销', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_30/list_1.html'], - target: '/caam/30', - }, - { - title: '统计数据 - 产销 - 汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_31/list_1.html'], - target: '/caam/31', - }, - { - title: '统计数据 - 产销 - 摩托车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_32/list_1.html'], - target: '/caam/32', - }, - { - title: '统计数据 - 产销 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_33/list_1.html'], - target: '/caam/33', - }, - { - title: '统计数据 - 进出口', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_34/list_1.html'], - target: '/caam/34', - }, - { - title: '统计数据 - 进出口 - 汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_35/list_1.html'], - target: '/caam/35', - }, - { - title: '统计数据 - 进出口 - 摩托车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_36/list_1.html'], - target: '/caam/36', - }, - { - title: '统计数据 - 进出口 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_37/list_1.html'], - target: '/caam/37', - }, - { - title: '统计数据 - 数据分析', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_38/list_1.html'], - target: '/caam/38', - }, - { - title: '统计数据 - 数据分析 - 国内数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_39/list_1.html'], - target: '/caam/39', - }, - { - title: '统计数据 - 数据分析 - 国外数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_40/list_1.html'], - target: '/caam/40', - }, - { - title: '统计数据 - 亚洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_41/list_1.html'], - target: '/caam/41', - }, - { - title: '统计数据 - 亚洲 - 日本', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_42/list_1.html'], - target: '/caam/42', - }, - { - title: '统计数据 - 亚洲 - 泰国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_43/list_1.html'], - target: '/caam/43', - }, - { - title: '统计数据 - 亚洲 - 印度', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_44/list_1.html'], - target: '/caam/44', - }, - { - title: '统计数据 - 亚洲 - 印尼', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_45/list_1.html'], - target: '/caam/45', - }, - { - title: '统计数据 - 亚洲 - 韩国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_46/list_1.html'], - target: '/caam/46', - }, - { - title: '统计数据 - 亚洲 - 巴基斯坦', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_47/list_1.html'], - target: '/caam/47', - }, - { - title: '统计数据 - 亚洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_48/list_1.html'], - target: '/caam/48', - }, - { - title: '统计数据 - 欧洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_49/list_1.html'], - target: '/caam/49', - }, - { - title: '统计数据 - 欧洲 - 总汇', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_50/list_1.html'], - target: '/caam/50', - }, - { - title: '统计数据 - 欧洲 - 德国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_51/list_1.html'], - target: '/caam/51', - }, - { - title: '统计数据 - 欧洲 - 英国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_52/list_1.html'], - target: '/caam/52', - }, - { - title: '统计数据 - 欧洲 - 法国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_53/list_1.html'], - target: '/caam/53', - }, - { - title: '统计数据 - 欧洲 - 意大利', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_54/list_1.html'], - target: '/caam/54', - }, - { - title: '统计数据 - 欧洲 - 西班牙', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_55/list_1.html'], - target: '/caam/55', - }, - { - title: '统计数据 - 大洋洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_56/list_1.html'], - target: '/caam/56', - }, - { - title: '统计数据 - 大洋洲 - 澳大利亚', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_57/list_1.html'], - target: '/caam/57', - }, - { - title: '统计数据 - 大洋洲 - 新西兰', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_58/list_1.html'], - target: '/caam/58', - }, - { - title: '统计数据 - 北美洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_59/list_1.html'], - target: '/caam/59', - }, - { - title: '统计数据 - 北美洲 - 总汇', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_60/list_1.html'], - target: '/caam/60', - }, - { - title: '统计数据 - 北美洲 - 美国', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_61/list_1.html'], - target: '/caam/61', - }, - { - title: '统计数据 - 南美洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_62/list_1.html'], - target: '/caam/62', - }, - { - title: '统计数据 - 南美洲 - 阿根廷', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_63/list_1.html'], - target: '/caam/63', - }, - { - title: '统计数据 - 南美洲 - 巴西', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_64/list_1.html'], - target: '/caam/64', - }, - { - title: '统计数据 - 南美洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_65/list_1.html'], - target: '/caam/65', - }, - { - title: '统计数据 - 非洲', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_66/list_1.html'], - target: '/caam/66', - }, - { - title: '文件公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_67/list_1.html'], - target: '/caam/67', - }, - { - title: '文件公告 - 协会文件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_68/list_1.html'], - target: '/caam/68', - }, - { - title: '文件公告 - 公示公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_69/list_1.html'], - target: '/caam/69', - }, - { - title: '文件公告 - 会议通知', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_70/list_1.html'], - target: '/caam/70', - }, - { - title: '文件公告 - 分支机构文件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_71/list_1.html'], - target: '/caam/71', - }, - { - title: '专题子站', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_72/list_1.html'], - target: '/caam/72', - }, - { - title: '专题子站 - 网站专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_73/list_1.html'], - target: '/caam/73', - }, - { - title: '专题子站 - 分支机构网站', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_74/list_1.html'], - target: '/caam/74', - }, - { - title: '专题子站 - 子网站', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_75/list_1.html'], - target: '/caam/75', - }, - { - title: '信息资料', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_76/list_1.html'], - target: '/caam/76', - }, - { - title: '信息资料 - 信息资料', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_77/list_1.html'], - target: '/caam/77', - }, - { - title: '信息资料 - 当前最热', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_78/list_1.html'], - target: '/caam/78', - }, - { - title: '行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_79/list_1.html'], - target: '/caam/79', - }, - { - title: '行业动态 - 政府资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_80/list_1.html'], - target: '/caam/80', - }, - { - title: '行业动态 - 企业新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_81/list_1.html'], - target: '/caam/81', - }, - { - title: '行业动态 - 行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_82/list_1.html'], - target: '/caam/82', - }, - { - title: '行业动态 - 车市动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_83/list_1.html'], - target: '/caam/83', - }, - { - title: '行业动态 - 国内召回', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_84/list_1.html'], - target: '/caam/84', - }, - { - title: '行业动态 - 国外召回', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_85/list_1.html'], - target: '/caam/85', - }, - { - title: '行业动态 - 汽车新技术', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_86/list_1.html'], - target: '/caam/86', - }, - { - title: '行业动态 - 市场环境', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_87/list_1.html'], - target: '/caam/87', - }, - { - title: '行业动态 - 国际动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_88/list_1.html'], - target: '/caam/88', - }, - { - title: '行业动态 - 国际动态 - 新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_89/list_1.html'], - target: '/caam/89', - }, - { - title: '行业动态 - 国际动态 - 企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_90/list_1.html'], - target: '/caam/90', - }, - { - title: '行业动态 - 产品资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_91/list_1.html'], - target: '/caam/91', - }, - { - title: '行业动态 - 相关行业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_92/list_1.html'], - target: '/caam/92', - }, - { - title: '行业政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_93/list_1.html'], - target: '/caam/93', - }, - { - title: '行业政策 - 最新政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_95/list_1.html'], - target: '/caam/95', - }, - { - title: '行业政策 - 政策解读', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_96/list_1.html'], - target: '/caam/96', - }, - { - title: '行业政策 - 国家政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_97/list_1.html'], - target: '/caam/97', - }, - { - title: '行业政策 - 国家政策 - 产业政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_98/list_1.html'], - target: '/caam/98', - }, - { - title: '行业政策 - 国家政策 - 新能源汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_99/list_1.html'], - target: '/caam/99', - }, - { - title: '行业政策 - 国家政策 - 节能环保', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_100/list_1.html'], - target: '/caam/100', - }, - { - title: '行业政策 - 国家政策 - 税收', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_101/list_1.html'], - target: '/caam/101', - }, - { - title: '行业政策 - 国家政策 - 进出口', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_102/list_1.html'], - target: '/caam/102', - }, - { - title: '行业政策 - 国家政策 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_103/list_1.html'], - target: '/caam/103', - }, - { - title: '行业政策 - 地方政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_104/list_1.html'], - target: '/caam/104', - }, - { - title: '行业政策 - 相关政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_105/list_1.html'], - target: '/caam/105', - }, - { - title: '行业政策 - 国外政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_106/list_1.html'], - target: '/caam/106', - }, - { - title: '行业政策 - 政策报道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_107/list_1.html'], - target: '/caam/107', - }, - { - title: '标准法规', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_108/list_1.html'], - target: '/caam/108', - }, - { - title: '标准法规 - 标准政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_109/list_1.html'], - target: '/caam/109', - }, - { - title: '标准法规 - 国家标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_110/list_1.html'], - target: '/caam/110', - }, - { - title: '标准法规 - 行业标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_111/list_1.html'], - target: '/caam/111', - }, - { - title: '标准法规 - 标准动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_112/list_1.html'], - target: '/caam/112', - }, - { - title: '标准法规 - 国际标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_113/list_1.html'], - target: '/caam/113', - }, - { - title: '标准法规 - 标准资料', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_114/list_1.html'], - target: '/caam/114', - }, - { - title: '基础资料', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_115/list_1.html'], - target: '/caam/115', - }, - { - title: '信息资料 - 公众资料', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_116/list_1.html'], - target: '/caam/116', - }, - { - title: '信息资料 - 成品油', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_117/list_1.html'], - target: '/caam/117', - }, - { - title: '信息资料 - 成品油 - 国内市场', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_118/list_1.html'], - target: '/caam/118', - }, - { - title: '信息资料 - 成品油 - 国际市场', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_119/list_1.html'], - target: '/caam/119', - }, - { - title: '信息资料 - 保有量', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_120/list_1.html'], - target: '/caam/120', - }, - { - title: '信息资料 - 公路交通', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_121/list_1.html'], - target: '/caam/121', - }, - { - title: '信息资料 - 公路交通 - 公路客运量', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_122/list_1.html'], - target: '/caam/122', - }, - { - title: '信息资料 - 公路交通 - 旅客周转量', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_123/list_1.html'], - target: '/caam/123', - }, - { - title: '信息资料 - 公路交通 - 公路货运量', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_124/list_1.html'], - target: '/caam/124', - }, - { - title: '信息资料 - 经济环境', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_125/list_1.html'], - target: '/caam/125', - }, - { - title: '公告查询', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_126/list_1.html'], - target: '/caam/126', - }, - { - title: '公告查询 - 公告批文', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_127/list_1.html'], - target: '/caam/127', - }, - { - title: '公告查询 - 公示公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_128/list_1.html'], - target: '/caam/128', - }, - { - title: '公告查询 - 节能与新能源', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_129/list_1.html'], - target: '/caam/129', - }, - { - title: '公告查询 - 公告动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_130/list_1.html'], - target: '/caam/130', - }, - { - title: '人物访谈', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_131/list_1.html'], - target: '/caam/131', - }, - { - title: '人物访谈 - 访谈列表', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_132/list_1.html'], - target: '/caam/132', - }, - { - title: '视频新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_133/list_1.html'], - target: '/caam/133', - }, - { - title: '视频新闻 - 热门视频', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_134/list_1.html'], - target: '/caam/134', - }, - { - title: '视频新闻 - 推荐视频', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_135/list_1.html'], - target: '/caam/135', - }, - { - title: '视频新闻 - 视频列表', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_136/list_1.html'], - target: '/caam/136', - }, - { - title: '统计数据 - 欧洲 - 俄罗斯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_137/list_1.html'], - target: '/caam/137', - }, - { - title: '统计数据 - 欧洲 - 爱尔兰', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_138/list_1.html'], - target: '/caam/138', - }, - { - title: '统计数据 - 欧洲 - 丹麦', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_139/list_1.html'], - target: '/caam/139', - }, - { - title: '统计数据 - 欧洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_140/list_1.html'], - target: '/caam/140', - }, - { - title: '统计数据 - 大洋洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_141/list_1.html'], - target: '/caam/141', - }, - { - title: '统计数据 - 北美洲 - 加拿大', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_142/list_1.html'], - target: '/caam/142', - }, - { - title: '统计数据 - 北美洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_144/list_1.html'], - target: '/caam/144', - }, - { - title: '统计数据 - 北美洲 - 墨西哥', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_143/list_1.html'], - target: '/caam/143', - }, - { - title: '统计数据 - 非洲 - 南非', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_145/list_1.html'], - target: '/caam/145', - }, - { - title: '统计数据 - 非洲 - 其他', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_146/list_1.html'], - target: '/caam/146', - }, - { - title: '协会概况 - 分支机构 - 机构名单', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_147/list_1.html'], - target: '/caam/147', - }, - { - title: '首页-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_148/list_1.html'], - target: '/caam/148', - }, - { - title: '标准法规 - 标准政策-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_149/list_1.html'], - target: '/caam/149', - }, - { - title: '信息资料 - 信息资料-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_150/list_1.html'], - target: '/caam/150', - }, - { - title: '行业动态 - 行业资讯-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_151/list_1.html'], - target: '/caam/151', - }, - { - title: '行业政策 - 行业政策-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_152/list_1.html'], - target: '/caam/152', - }, - { - title: '协会工作 - 协会工作-轮播图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_153/list_1.html'], - target: '/caam/153', - }, - { - title: '统计数据 - 数据统计-轮播图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_154/list_1.html'], - target: '/caam/154', - }, - { - title: 'Home', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_155/list_1.html'], - target: '/caam/155', - }, - { - title: 'Home - Focus News', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_156/list_1.html'], - target: '/caam/156', - }, - { - title: 'Home - Overview', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_157/list_1.html'], - target: '/caam/157', - }, - { - title: 'Home - News', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_158/list_1.html'], - target: '/caam/158', - }, - { - title: 'Home - Member sign', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_161/list_1.html'], - target: '/caam/161', - }, - { - title: '车桥分会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_162/list_1.html'], - target: '/caam/162', - }, - { - title: '上市公司委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_183/list_1.html'], - target: '/caam/183', - }, - { - title: '上市公司委员会 - 单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_184/list_1.html'], - target: '/caam/184', - }, - { - title: '上市公司委员会 - 临时公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_185/list_1.html'], - target: '/caam/185', - }, - { - title: '上市公司委员会 - 定期报告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_186/list_1.html'], - target: '/caam/186', - }, - { - title: '上市公司委员会 - 数据及研究', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_187/list_1.html'], - target: '/caam/187', - }, - { - title: '上市公司委员会 - 规章制度', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_188/list_1.html'], - target: '/caam/188', - }, - { - title: '上市公司委员会 - 指引', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_189/list_1.html'], - target: '/caam/189', - }, - { - title: '上市公司委员会 - 独立董事推荐', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_190/list_1.html'], - target: '/caam/190', - }, - { - title: '上市公司委员会 - 重组并购项目', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_191/list_1.html'], - target: '/caam/191', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_192/list_1.html'], - target: '/caam/192', - }, - { - title: '专题 - 世界汽车组织', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_193/list_1.html'], - target: '/caam/193', - }, - { - title: '专题 - OICA中国论坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_194/list_1.html'], - target: '/caam/194', - }, - { - title: '出口企业信用评价专栏 - 已获等级的企业公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_195/list_1.html'], - target: '/caam/195', - }, - { - title: '出口企业信用评价专栏 - 公示栏', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_196/list_1.html'], - target: '/caam/196', - }, - { - title: '出口企业信用评价专栏 - 企业简介', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_197/list_1.html'], - target: '/caam/197', - }, - { - title: '出口企业信用评价专栏 - 企业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_198/list_1.html'], - target: '/caam/198', - }, - { - title: '出口企业信用评价专栏', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_199/list_1.html'], - target: '/caam/199', - }, - { - title: '出口企业信用评价专栏 - 信用评价专栏', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_200/list_1.html'], - target: '/caam/200', - }, - { - title: '出口企业信用评价专栏 - 出口企业信用评价专栏视频专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_201/list_1.html'], - target: '/caam/201', - }, - { - title: '汽车纵横', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_202/list_1.html'], - target: '/caam/202', - }, - { - title: '汽车纵横 - 聚焦企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_204/list_1.html'], - target: '/caam/204', - }, - { - title: '汽车纵横 - 深度报道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_205/list_1.html'], - target: '/caam/205', - }, - { - title: '汽车纵横 - 汽车市场', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_210/list_1.html'], - target: '/caam/210', - }, - { - title: '汽车纵横 - 行业数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_211/list_1.html'], - target: '/caam/211', - }, - { - title: '汽车纵横 - 汽车零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_212/list_1.html'], - target: '/caam/212', - }, - { - title: '汽车纵横 - 视点', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_216/list_1.html'], - target: '/caam/216', - }, - { - title: '汽车纵横 - 头资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_219/list_1.html'], - target: '/caam/219', - }, - { - title: '汽车纵横 - 新车品鉴', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_221/list_1.html'], - target: '/caam/221', - }, - { - title: '汽车纵横 - 资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_222/list_1.html'], - target: '/caam/222', - }, - { - title: '汽车纵横 - 刊首语', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_223/list_1.html'], - target: '/caam/223', - }, - { - title: '汽车纵横 - 政府采购', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_224/list_1.html'], - target: '/caam/224', - }, - { - title: '汽车纵横 - 环球扫描', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_225/list_1.html'], - target: '/caam/225', - }, - { - title: '汽车纵横 - 观察', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_226/list_1.html'], - target: '/caam/226', - }, - { - title: '汽车纵横 - 聚焦企业 - 聚焦企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_227/list_1.html'], - target: '/caam/227', - }, - { - title: '汽车纵横 - 聚焦企业 - 特约评论', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_228/list_1.html'], - target: '/caam/228', - }, - { - title: '汽车纵横 - 深度报道 - 媒介调查', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_229/list_1.html'], - target: '/caam/229', - }, - { - title: '汽车纵横 - 深度报道 - 深度报道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_230/list_1.html'], - target: '/caam/230', - }, - { - title: '汽车纵横 - 深度报道 - 高端访谈', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_231/list_1.html'], - target: '/caam/231', - }, - { - title: '汽车纵横 - 深度报道 - 专家建言', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_232/list_1.html'], - target: '/caam/232', - }, - { - title: '百家论道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_233/list_1.html'], - target: '/caam/233', - }, - { - title: '名家论道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_234/list_1.html'], - target: '/caam/234', - }, - { - title: '汽车纵横 - 汽车市场 - 名家论坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_235/list_1.html'], - target: '/caam/235', - }, - { - title: '汽车纵横 - 汽车市场 - 法律在线', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_236/list_1.html'], - target: '/caam/236', - }, - { - title: '汽车纵横 - 汽车市场 - 巨擘传奇', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_237/list_1.html'], - target: '/caam/237', - }, - { - title: '汽车纵横 - 汽车市场 - 名家新论', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_238/list_1.html'], - target: '/caam/238', - }, - { - title: '汽车纵横 - 行业数据 - 环球扫描', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_239/list_1.html'], - target: '/caam/239', - }, - { - title: '汽车纵横 - 行业数据 - 业界聚焦', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_240/list_1.html'], - target: '/caam/240', - }, - { - title: '汽车纵横 - 行业数据 - 景象透视', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_241/list_1.html'], - target: '/caam/241', - }, - { - title: '汽车纵横 - 行业数据 - 侧视窗外', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_242/list_1.html'], - target: '/caam/242', - }, - { - title: '汽车纵横 - 汽车零部件 - 品牌诗话', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_243/list_1.html'], - target: '/caam/243', - }, - { - title: '汽车纵横 - 汽车零部件 - 汽车文萃', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_244/list_1.html'], - target: '/caam/244', - }, - { - title: '汽车纵横 - 汽车零部件 - 摄者手记', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_245/list_1.html'], - target: '/caam/245', - }, - { - title: '汽车纵横 - 汽车零部件 - 汽车雅韵', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_246/list_1.html'], - target: '/caam/246', - }, - { - title: '节能与新能源汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_247/list_1.html'], - target: '/caam/247', - }, - { - title: '节能与新能源汽车 - 信息动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_248/list_1.html'], - target: '/caam/248', - }, - { - title: '节能与新能源汽车 - 政策法规', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_249/list_1.html'], - target: '/caam/249', - }, - { - title: '节能与新能源汽车 - 技术标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_250/list_1.html'], - target: '/caam/250', - }, - { - title: '节能与新能源汽车 - 整车产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_251/list_1.html'], - target: '/caam/251', - }, - { - title: '节能与新能源汽车 - 关键零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_252/list_1.html'], - target: '/caam/252', - }, - { - title: '节能与新能源汽车 - 基础设施', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_253/list_1.html'], - target: '/caam/253', - }, - { - title: '节能与新能源汽车 - T10园地', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_254/list_1.html'], - target: '/caam/254', - }, - { - title: '节能与新能源汽车 - 知识百科', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_255/list_1.html'], - target: '/caam/255', - }, - { - title: '节能与新能源汽车 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_256/list_1.html'], - target: '/caam/256', - }, - { - title: '节能与新能源汽车 - 尖峰对话', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_257/list_1.html'], - target: '/caam/257', - }, - { - title: '节能与新能源汽车 - 企业风采', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_258/list_1.html'], - target: '/caam/258', - }, - { - title: '节能与新能源汽车 - 专家视角', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_259/list_1.html'], - target: '/caam/259', - }, - { - title: '零部件基地', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_260/list_1.html'], - target: '/caam/260', - }, - { - title: '零部件基地 - 基地动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_261/list_1.html'], - target: '/caam/261', - }, - { - title: '零部件基地 - 基地展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_262/list_1.html'], - target: '/caam/262', - }, - { - title: '零部件基地 - 基地动态 - 新闻与动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_264/list_1.html'], - target: '/caam/264', - }, - { - title: '零部件基地 - 基地动态 - 政策与信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_267/list_1.html'], - target: '/caam/267', - }, - { - title: '减振器分会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_268/list_1.html'], - target: '/caam/268', - }, - { - title: '减振器分会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_269/list_1.html'], - target: '/caam/269', - }, - { - title: '减振器分会 - 会员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_270/list_1.html'], - target: '/caam/270', - }, - { - title: '减振器分会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_271/list_1.html'], - target: '/caam/271', - }, - { - title: '减振器分会 - 展会信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_272/list_1.html'], - target: '/caam/272', - }, - { - title: '减振器分会 - 标准、法规专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_274/list_1.html'], - target: '/caam/274', - }, - { - title: '减振器分会 - 产品展示 - 减振器', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_275/list_1.html'], - target: '/caam/275', - }, - { - title: '减振器分会 - 资讯下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_273/list_1.html'], - target: '/caam/273', - }, - { - title: '减振器分会 - 产品展示 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_276/list_1.html'], - target: '/caam/276', - }, - { - title: '车轮委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_278/list_1.html'], - target: '/caam/278', - }, - { - title: '车轮委员会 - 会员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_279/list_1.html'], - target: '/caam/279', - }, - { - title: '车轮委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_280/list_1.html'], - target: '/caam/280', - }, - { - title: '减振器分会 - 产品展示 - 相关产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_277/list_1.html'], - target: '/caam/277', - }, - { - title: '车轮委员会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_281/list_1.html'], - target: '/caam/281', - }, - { - title: '车轮委员会 - 标准、法规专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_282/list_1.html'], - target: '/caam/282', - }, - { - title: '车轮委员会 - 产品展示 - 车轮', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_283/list_1.html'], - target: '/caam/283', - }, - { - title: '车轮委员会 - 产品展示 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_284/list_1.html'], - target: '/caam/284', - }, - { - title: '车轮委员会 - 产品展示 - 相关产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_285/list_1.html'], - target: '/caam/285', - }, - { - title: '车用电机电器电子委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_286/list_1.html'], - target: '/caam/286', - }, - { - title: '车用电机电器电子委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_287/list_1.html'], - target: '/caam/287', - }, - { - title: '车用电机电器电子委员会 - 会员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_288/list_1.html'], - target: '/caam/288', - }, - { - title: '车用电机电器电子委员会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_289/list_1.html'], - target: '/caam/289', - }, - { - title: '车用电机电器电子委员会 - 产品展示 - 减振器', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_290/list_1.html'], - target: '/caam/290', - }, - { - title: '车用电机电器电子委员会 - 产品展示 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_291/list_1.html'], - target: '/caam/291', - }, - { - title: '车用电机电器电子委员会 - 产品展示 - 相关产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_292/list_1.html'], - target: '/caam/292', - }, - { - title: '汽车行业团指委', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_293/list_1.html'], - target: '/caam/293', - }, - { - title: '汽车行业团指委 - 委员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_294/list_1.html'], - target: '/caam/294', - }, - { - title: '汽车行业团指委 - 工作交流', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_295/list_1.html'], - target: '/caam/295', - }, - { - title: '汽车行业团指委 - 品牌项目', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_296/list_1.html'], - target: '/caam/296', - }, - { - title: '汽车行业团指委 - 理论学习', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_297/list_1.html'], - target: '/caam/297', - }, - { - title: '汽车行业团指委 - 寻找最美青工', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_298/list_1.html'], - target: '/caam/298', - }, - { - title: '汽车行业团指委 - 第二届最美青工', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_299/list_1.html'], - target: '/caam/299', - }, - { - title: '汽车行业团指委 - 品牌项目 - 企业风采', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_300/list_1.html'], - target: '/caam/300', - }, - { - title: '汽车行业团指委 - 品牌项目 - 青年文明号', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_301/list_1.html'], - target: '/caam/301', - }, - { - title: '汽车行业团指委 - 品牌项目 - 青年岗位能手', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_302/list_1.html'], - target: '/caam/302', - }, - { - title: '汽车行业团指委 - 品牌项目 - 百家微讲坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_303/list_1.html'], - target: '/caam/303', - }, - { - title: '汽车行业团指委 - 理论学习 - 文件学习', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_304/list_1.html'], - target: '/caam/304', - }, - { - title: '汽车行业团指委 - 理论学习 - 企业交流', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_305/list_1.html'], - target: '/caam/305', - }, - { - title: '汽车行业团指委 - 理论学习 - 中国共产主义青年团章程', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_306/list_1.html'], - target: '/caam/306', - }, - { - title: '2013中国汽车论坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_307/list_1.html'], - target: '/caam/307', - }, - { - title: '会员专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_308/list_1.html'], - target: '/caam/308', - }, - { - title: '会员中心', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_309/list_1.html'], - target: '/caam/309', - }, - { - title: '会员中心 - 企业聚焦', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_310/list_1.html'], - target: '/caam/310', - }, - { - title: '会员中心 - 整车会员', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_311/list_1.html'], - target: '/caam/311', - }, - { - title: '会员中心 - 其他会员', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_312/list_1.html'], - target: '/caam/312', - }, - { - title: '离合器分会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_313/list_1.html'], - target: '/caam/313', - }, - { - title: '离合器分会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_314/list_1.html'], - target: '/caam/314', - }, - { - title: '离合器分会 - 会员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_315/list_1.html'], - target: '/caam/315', - }, - { - title: '离合器分会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_316/list_1.html'], - target: '/caam/316', - }, - { - title: '离合器分会 - 展会信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_317/list_1.html'], - target: '/caam/317', - }, - { - title: '离合器分会 - 资讯下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_318/list_1.html'], - target: '/caam/318', - }, - { - title: '离合器分会 - 标准、法规专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_319/list_1.html'], - target: '/caam/319', - }, - { - title: '离合器分会 - 产品展示 - 离合器', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_320/list_1.html'], - target: '/caam/320', - }, - { - title: '离合器分会 - 产品展示 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_321/list_1.html'], - target: '/caam/321', - }, - { - title: '离合器分会 - 产品展示 - 相关产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_322/list_1.html'], - target: '/caam/322', - }, - { - title: '车身附件委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_323/list_1.html'], - target: '/caam/323', - }, - { - title: '车身附件委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_324/list_1.html'], - target: '/caam/324', - }, - { - title: '车身附件委员会 - 会员单位动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_325/list_1.html'], - target: '/caam/325', - }, - { - title: '车身附件委员会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_326/list_1.html'], - target: '/caam/326', - }, - { - title: '车身附件委员会 - 展会信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_327/list_1.html'], - target: '/caam/327', - }, - { - title: '车身附件委员会 - 资讯下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_328/list_1.html'], - target: '/caam/328', - }, - { - title: '车身附件委员会 - 标准、法规专区', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_329/list_1.html'], - target: '/caam/329', - }, - { - title: '车身附件委员会 - 标准法规', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_330/list_1.html'], - target: '/caam/330', - }, - { - title: '车身附件委员会 - 产品展示 - 车身附件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_331/list_1.html'], - target: '/caam/331', - }, - { - title: '车身附件委员会 - 产品展示 - 零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_332/list_1.html'], - target: '/caam/332', - }, - { - title: '车身附件委员会 - 产品展示 - 相关产品', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_333/list_1.html'], - target: '/caam/333', - }, - { - title: '2014全国两会专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_334/list_1.html'], - target: '/caam/334', - }, - { - title: '2014中国汽车论坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_335/list_1.html'], - target: '/caam/335', - }, - { - title: '车用灯具委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_336/list_1.html'], - target: '/caam/336', - }, - { - title: '车用灯具委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_337/list_1.html'], - target: '/caam/337', - }, - { - title: '车用灯具委员会 - 会员动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_338/list_1.html'], - target: '/caam/338', - }, - { - title: '车用灯具委员会 - 展会信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_339/list_1.html'], - target: '/caam/339', - }, - { - title: '车用灯具委员会 - 资讯下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_341/list_1.html'], - target: '/caam/341', - }, - { - title: '车用灯具委员会 - 动态新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_342/list_1.html'], - target: '/caam/342', - }, - { - title: '车用灯具委员会 - 专家库', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_343/list_1.html'], - target: '/caam/343', - }, - { - title: '车用灯具委员会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_340/list_1.html'], - target: '/caam/340', - }, - { - title: '车用发动机分会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_344/list_1.html'], - target: '/caam/344', - }, - { - title: '车用发动机分会 - 行业资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_345/list_1.html'], - target: '/caam/345', - }, - { - title: '车用发动机分会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_346/list_1.html'], - target: '/caam/346', - }, - { - title: '车用发动机分会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_347/list_1.html'], - target: '/caam/347', - }, - { - title: '吉林省汽车工业协会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_348/list_1.html'], - target: '/caam/348', - }, - { - title: '吉林省汽车工业协会 - 吉林动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_349/list_1.html'], - target: '/caam/349', - }, - { - title: '吉林省汽车工业协会 - 行业访谈', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_350/list_1.html'], - target: '/caam/350', - }, - { - title: '吉林省汽车工业协会 - 资讯下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_351/list_1.html'], - target: '/caam/351', - }, - { - title: '吉林省汽车工业协会 - 汽车言论', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_352/list_1.html'], - target: '/caam/352', - }, - { - title: '吉林省汽车工业协会 - 招聘信息', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_353/list_1.html'], - target: '/caam/353', - }, - { - title: '吉林省汽车工业协会 - 产品展示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_354/list_1.html'], - target: '/caam/354', - }, - { - title: '吉林省汽车工业协会 - 吉林省汽协副会长', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_355/list_1.html'], - target: '/caam/355', - }, - { - title: '吉林省汽车工业协会 - 协会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_356/list_1.html'], - target: '/caam/356', - }, - { - title: '吉林省汽车工业协会 - 测试站位', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_357/list_1.html'], - target: '/caam/357', - }, - { - title: '道德讲堂', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_362/list_1.html'], - target: '/caam/362', - }, - { - title: '道德讲堂 - 先进人物', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_363/list_1.html'], - target: '/caam/363', - }, - { - title: '道德讲堂 - 高层声音', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_364/list_1.html'], - target: '/caam/364', - }, - { - title: '道德讲堂 - 道德模范', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_365/list_1.html'], - target: '/caam/365', - }, - { - title: '道德讲堂 - 身边榜样', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_366/list_1.html'], - target: '/caam/366', - }, - { - title: '道德讲堂 - 国学讲堂', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_367/list_1.html'], - target: '/caam/367', - }, - { - title: '道德讲堂 - 以案警示', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_368/list_1.html'], - target: '/caam/368', - }, - { - title: '文明行车人', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_369/list_1.html'], - target: '/caam/369', - }, - { - title: '文明行车人 - 绿色出行', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_370/list_1.html'], - target: '/caam/370', - }, - { - title: '文明行车人 - 清洁空气', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_371/list_1.html'], - target: '/caam/371', - }, - { - title: '文明行车人 - 公益活动', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_372/list_1.html'], - target: '/caam/372', - }, - { - title: '文明行车人 - 节能减排', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_373/list_1.html'], - target: '/caam/373', - }, - { - title: '自主品牌巡展', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_374/list_1.html'], - target: '/caam/374', - }, - { - title: '自主品牌巡展 - 巡展新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_375/list_1.html'], - target: '/caam/375', - }, - { - title: '自主品牌巡展 - 往届回顾', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_376/list_1.html'], - target: '/caam/376', - }, - { - title: '自主品牌巡展 - 巡展概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_377/list_1.html'], - target: '/caam/377', - }, - { - title: '自主品牌巡展 - 相关活动', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_378/list_1.html'], - target: '/caam/378', - }, - { - title: '自主品牌巡展 - 人物专访', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_379/list_1.html'], - target: '/caam/379', - }, - { - title: '张小虞逝世专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_380/list_1.html'], - target: '/caam/380', - }, - { - title: '张小虞逝世专题 - 企业唁电', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_381/list_1.html'], - target: '/caam/381', - }, - { - title: '张小虞逝世专题 - 评论缅怀', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_382/list_1.html'], - target: '/caam/382', - }, - { - title: '2015全国两会专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_383/list_1.html'], - target: '/caam/383', - }, - { - title: '2015中国汽车论坛', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_384/list_1.html'], - target: '/caam/384', - }, - { - title: '2015中国汽车论坛 - 嘉宾简历', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_385/list_1.html'], - target: '/caam/385', - }, - { - title: '2015零部件年会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_386/list_1.html'], - target: '/caam/386', - }, - { - title: '2016两会专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_387/list_1.html'], - target: '/caam/387', - }, - { - title: '房车委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_388/list_1.html'], - target: '/caam/388', - }, - { - title: '房车委员会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_389/list_1.html'], - target: '/caam/389', - }, - { - title: '房车委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_390/list_1.html'], - target: '/caam/390', - }, - { - title: '房车委员会 - 会员动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_391/list_1.html'], - target: '/caam/391', - }, - { - title: '房车委员会 - 行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_392/list_1.html'], - target: '/caam/392', - }, - { - title: '房车委员会 - 文件公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_393/list_1.html'], - target: '/caam/393', - }, - { - title: '制动器委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_394/list_1.html'], - target: '/caam/394', - }, - { - title: '制动器委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_395/list_1.html'], - target: '/caam/395', - }, - { - title: '制动器委员会 - 行业资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_396/list_1.html'], - target: '/caam/396', - }, - { - title: '汽车空调委员会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_397/list_1.html'], - target: '/caam/397', - }, - { - title: '汽车空调委员会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_398/list_1.html'], - target: '/caam/398', - }, - { - title: '汽车空调委员会 - 标准规范', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_399/list_1.html'], - target: '/caam/399', - }, - { - title: '汽车空调委员会 - 行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_400/list_1.html'], - target: '/caam/400', - }, - { - title: '汽车空调委员会 - 资料下载', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_401/list_1.html'], - target: '/caam/401', - }, - { - title: '块内图片', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_402/list_1.html'], - target: '/caam/402', - }, - { - title: '2016零部件年会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_403/list_1.html'], - target: '/caam/403', - }, - { - title: '2017年两会专题', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_404/list_1.html'], - target: '/caam/404', - }, - { - title: '2017零部件年会', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_405/list_1.html'], - target: '/caam/405', - }, - { - title: '协会概况 - 协会领导', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_407/list_1.html'], - target: '/caam/407', - }, - { - title: '行业政策 - 宏观政策', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_408/list_1.html'], - target: '/caam/408', - }, - { - title: '行业政策 - 品牌建设', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_409/list_1.html'], - target: '/caam/409', - }, - { - title: '行业政策 - 消费环境', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_410/list_1.html'], - target: '/caam/410', - }, - { - title: 'Home - 英文站-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_411/list_1.html'], - target: '/caam/411', - }, - { - title: '标准法规 - 团体标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_412/list_1.html'], - target: '/caam/412', - }, - { - title: '电动智能', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_413/list_1.html'], - target: '/caam/413', - }, - { - title: '电动智能 - 轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_414/list_1.html'], - target: '/caam/414', - }, - { - title: '电动智能 - 行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_415/list_1.html'], - target: '/caam/415', - }, - { - title: '电动智能 - 新能源汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_416/list_1.html'], - target: '/caam/416', - }, - { - title: '电动智能 - 标准法规', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_417/list_1.html'], - target: '/caam/417', - }, - { - title: '电动智能 - 政策资讯', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_418/list_1.html'], - target: '/caam/418', - }, - { - title: '电动智能 - 核心零部件', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_419/list_1.html'], - target: '/caam/419', - }, - { - title: '电动智能 - 基础设施', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_420/list_1.html'], - target: '/caam/420', - }, - { - title: '电动智能 - 智能汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_421/list_1.html'], - target: '/caam/421', - }, - { - title: '电动智能 - 车联网', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_422/list_1.html'], - target: '/caam/422', - }, - { - title: '电动智能 - 回收体系', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_423/list_1.html'], - target: '/caam/423', - }, - { - title: '电动智能 - 新能源汽车 - 混合动力汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_425/list_1.html'], - target: '/caam/425', - }, - { - title: '电动智能 - 新能源汽车 - 燃料电池汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_426/list_1.html'], - target: '/caam/426', - }, - { - title: '电动智能 - 核心零部件 - 驱动电机', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_427/list_1.html'], - target: '/caam/427', - }, - { - title: '电动智能 - 新能源汽车 - 纯电动汽车', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_424/list_1.html'], - target: '/caam/424', - }, - { - title: '电动智能 - 核心零部件 - 动力电池', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_428/list_1.html'], - target: '/caam/428', - }, - { - title: '电动智能 - 核心零部件 - 充电技术', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_429/list_1.html'], - target: '/caam/429', - }, - { - title: '电动智能 - 核心零部件 - 燃料电池', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_430/list_1.html'], - target: '/caam/430', - }, - { - title: '电动智能 - 核心零部件 - 材料技术', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_431/list_1.html'], - target: '/caam/431', - }, - { - title: '电动智能 - 智能汽车 - 自动驾驶', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_432/list_1.html'], - target: '/caam/432', - }, - { - title: '电动智能 - 智能汽车 - 移动出行', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_433/list_1.html'], - target: '/caam/433', - }, - { - title: '电动智能 - 智能汽车 - 前瞻技术', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_434/list_1.html'], - target: '/caam/434', - }, - { - title: '电动智能 - 车联网 - 娱乐系统', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_435/list_1.html'], - target: '/caam/435', - }, - { - title: '电动智能 - 车联网 - 控制系统', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_436/list_1.html'], - target: '/caam/436', - }, - { - title: '电动智能 - 车联网 - 云数据平台', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_437/list_1.html'], - target: '/caam/437', - }, - { - title: '电动智能 - 车联网 - V2X通信', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_438/list_1.html'], - target: '/caam/438', - }, - { - title: '会员专区 - 会员工作', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_439/list_1.html'], - target: '/caam/439', - }, - { - title: '会员专区 - 会员风采', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_440/list_1.html'], - target: '/caam/440', - }, - { - title: '车桥分会 - 车桥-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_443/list_1.html'], - target: '/caam/443', - }, - { - title: '车桥分会 - 车桥-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_444/list_1.html'], - target: '/caam/444', - }, - { - title: '车桥分会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_445/list_1.html'], - target: '/caam/445', - }, - { - title: '车桥分会 - 车桥-新闻中心图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_451/list_1.html'], - target: '/caam/451', - }, - { - title: '车桥分会 - 车桥-龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_452/list_1.html'], - target: '/caam/452', - }, - { - title: '车桥分会 - 车桥-会员企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_453/list_1.html'], - target: '/caam/453', - }, - { - title: '车桥分会 - 分会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_454/list_1.html'], - target: '/caam/454', - }, - { - title: 'Home - MotorCycle Statistics', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_462/list_1.html'], - target: '/caam/462', - }, - { - title: 'Home - Automotives Statistics', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_463/list_1.html'], - target: '/caam/463', - }, - { - title: 'Home - Publications', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_464/list_1.html'], - target: '/caam/464', - }, - { - title: '汽车纵横 - 节能与新能源', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_465/list_1.html'], - target: '/caam/465', - }, - { - title: '汽车纵横 - 汽车纵横-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_466/list_1.html'], - target: '/caam/466', - }, - { - title: '汽车纵横 - 节能与新能源 - 百家论道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_467/list_1.html'], - target: '/caam/467', - }, - { - title: '汽车纵横 - 节能与新能源 - 名家论道', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_468/list_1.html'], - target: '/caam/468', - }, - { - title: '零部件基地 - 基地-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_469/list_1.html'], - target: '/caam/469', - }, - { - title: '车轮委员会 - 车轮-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_470/list_1.html'], - target: '/caam/470', - }, - { - title: '车轮委员会 - 车轮-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_471/list_1.html'], - target: '/caam/471', - }, - { - title: '车轮委员会 - 龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_472/list_1.html'], - target: '/caam/472', - }, - { - title: '车轮委员会 - 会员企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_473/list_1.html'], - target: '/caam/473', - }, - { - title: '车用发动机分会 - 发动机-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_474/list_1.html'], - target: '/caam/474', - }, - { - title: '车用发动机分会 - 发动机-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_475/list_1.html'], - target: '/caam/475', - }, - { - title: '车用发动机分会 - 发动机-龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_476/list_1.html'], - target: '/caam/476', - }, - { - title: '车用发动机分会 - 发动机-新闻中心图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_477/list_1.html'], - target: '/caam/477', - }, - { - title: '车轮委员会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_478/list_1.html'], - target: '/caam/478', - }, - { - title: '车用电机电器电子委员会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_479/list_1.html'], - target: '/caam/479', - }, - { - title: '车用电机电器电子委员会 - 龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_480/list_1.html'], - target: '/caam/480', - }, - { - title: '车用电机电器电子委员会 - 会员企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_481/list_1.html'], - target: '/caam/481', - }, - { - title: '车用电机电器电子委员会 - 电机电器-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_482/list_1.html'], - target: '/caam/482', - }, - { - title: '车用电机电器电子委员会 - 电机电器-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_483/list_1.html'], - target: '/caam/483', - }, - { - title: '车身附件委员会 - 车身-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_484/list_1.html'], - target: '/caam/484', - }, - { - title: '车身附件委员会 - 车身-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_485/list_1.html'], - target: '/caam/485', - }, - { - title: '车身附件委员会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_486/list_1.html'], - target: '/caam/486', - }, - { - title: '车身附件委员会 - 龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_487/list_1.html'], - target: '/caam/487', - }, - { - title: '车身附件委员会 - 会员企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_488/list_1.html'], - target: '/caam/488', - }, - { - title: '车身附件委员会 - 车身-新闻中心图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_489/list_1.html'], - target: '/caam/489', - }, - { - title: '上市公司委员会 - 上市公司-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_490/list_1.html'], - target: '/caam/490', - }, - { - title: '上市公司委员会 - 上市公司-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_491/list_1.html'], - target: '/caam/491', - }, - { - title: '上市公司委员会 - 上市公司-新闻中心图', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_492/list_1.html'], - target: '/caam/492', - }, - { - title: '减振器分会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_494/list_1.html'], - target: '/caam/494', - }, - { - title: '减振器分会 - 减振器-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_495/list_1.html'], - target: '/caam/495', - }, - { - title: '减振器分会 - 减振器-轮播右侧', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_496/list_1.html'], - target: '/caam/496', - }, - { - title: '减振器分会 - 龙头企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_497/list_1.html'], - target: '/caam/497', - }, - { - title: '减振器分会 - 会员企业', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_498/list_1.html'], - target: '/caam/498', - }, - { - title: '车用灯具委员会 - 分会概况', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_499/list_1.html'], - target: '/caam/499', - }, - { - title: '车用灯具委员会 - 车灯-轮播', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei', - source: ['chn/:type/cate_500/list_1.html'], - target: '/caam/500', - }, - ], - }, -}; diff --git a/lib/routes/caam/router.ts b/lib/routes/caam/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/caam/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/caareviews/book.ts b/lib/routes/caareviews/book.ts index 55cc0599d..937f4f985 100644 --- a/lib/routes/caareviews/book.ts +++ b/lib/routes/caareviews/book.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { rootUrl, getList, getItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/book', + categories: ['journal'], + example: '/caareviews/book', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caareviews.org/reviews/book'], + }, + name: 'Book Reviews', + maintainers: ['Fatpandac'], + handler, + url: 'caareviews.org/reviews/book', +}; + +async function handler(ctx) { const url = `${rootUrl}/reviews/book`; const list = await getList(url); const items = await getItems(ctx, list); - ctx.set('data', { + return { title: 'Book Reviews', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/caareviews/essay.ts b/lib/routes/caareviews/essay.ts index e91432300..09c7f4d36 100644 --- a/lib/routes/caareviews/essay.ts +++ b/lib/routes/caareviews/essay.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { rootUrl, getList, getItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/essay', + categories: ['journal'], + example: '/caareviews/essay', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caareviews.org/reviews/essay'], + }, + name: 'Essays', + maintainers: ['Fatpandac'], + handler, + url: 'caareviews.org/reviews/essay', +}; + +async function handler(ctx) { const url = `${rootUrl}/reviews/essay`; const list = await getList(url); const items = await getItems(ctx, list); - ctx.set('data', { + return { title: 'Essays', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/caareviews/exhibition.ts b/lib/routes/caareviews/exhibition.ts index dabc7b05f..addcfa0cc 100644 --- a/lib/routes/caareviews/exhibition.ts +++ b/lib/routes/caareviews/exhibition.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { rootUrl, getList, getItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/exhibition', + categories: ['journal'], + example: '/caareviews/exhibition', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caareviews.org/reviews/exhibition'], + }, + name: 'Exhibition Reviews', + maintainers: ['Fatpandac'], + handler, + url: 'caareviews.org/reviews/exhibition', +}; + +async function handler(ctx) { const url = `${rootUrl}/reviews/exhibition`; const list = await getList(url); const items = await getItems(ctx, list); - ctx.set('data', { + return { title: 'Exhibition Reviews', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/caareviews/maintainer.ts b/lib/routes/caareviews/maintainer.ts deleted file mode 100644 index efa2572f8..000000000 --- a/lib/routes/caareviews/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/book': ['Fatpandac'], - '/essay': ['Fatpandac'], - '/exhibition': ['Fatpandac'], -}; diff --git a/lib/routes/caareviews/namespace.ts b/lib/routes/caareviews/namespace.ts new file mode 100644 index 000000000..8aa1f4c72 --- /dev/null +++ b/lib/routes/caareviews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'caa.reviews', + url: 'caareviews.org', +}; diff --git a/lib/routes/caareviews/radar.ts b/lib/routes/caareviews/radar.ts deleted file mode 100644 index 2d2a871f3..000000000 --- a/lib/routes/caareviews/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'caareviews.org': { - _name: 'caa.reviews', - '.': [ - { - title: 'Book Reviews', - docs: 'https://docs.rsshub.app/routes/journal#caa-reviews', - source: ['/reviews/book'], - target: '/caareviews/book', - }, - { - title: 'Exhibition Reviews', - docs: 'https://docs.rsshub.app/routes/journal#caa-reviews', - source: ['/reviews/exhibition'], - target: '/caareviews/exhibition', - }, - { - title: 'Essays', - docs: 'https://docs.rsshub.app/routes/journal#caa-reviews', - source: ['/reviews/essay'], - target: '/caareviews/essay', - }, - ], - }, -}; diff --git a/lib/routes/caareviews/router.ts b/lib/routes/caareviews/router.ts deleted file mode 100644 index 4ae374a97..000000000 --- a/lib/routes/caareviews/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/book', './book'); - router.get('/essay', './essay'); - router.get('/exhibition', './exhibition'); -}; diff --git a/lib/routes/cahkms/index.ts b/lib/routes/cahkms/index.ts index a49e5b5c2..3f3290442 100644 --- a/lib/routes/cahkms/index.ts +++ b/lib/routes/cahkms/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -22,7 +23,36 @@ const titles = { 11: '研究资讯', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/cahkms', + parameters: { category: '分类,见下表,默认为重要新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cahkms.org/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + url: 'cahkms.org/', + description: `| 关于我们 | 港澳新闻 | 重要新闻 | 顾问点评、会员观点 | 专题汇总 | + | -------- | -------- | -------- | ------------------ | -------- | + | 01 | 02 | 03 | 04 | 05 | + + | 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 06 | 07 | 08 | 09 | 10 | 11 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '03'; const rootUrl = 'http://www.cahkms.org'; @@ -65,9 +95,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[category]} - 全国港澳研究会`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cahkms/maintainer.ts b/lib/routes/cahkms/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/cahkms/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/cahkms/namespace.ts b/lib/routes/cahkms/namespace.ts new file mode 100644 index 000000000..8d51e2b85 --- /dev/null +++ b/lib/routes/cahkms/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '全国港澳研究会', + url: 'cahkms.org', +}; diff --git a/lib/routes/cahkms/radar.ts b/lib/routes/cahkms/radar.ts deleted file mode 100644 index 9551e1bce..000000000 --- a/lib/routes/cahkms/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cahkms.org': { - _name: '全国港澳研究会', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#quan-guo-gang-ao-yan-jiu-hui-fen-lei', - source: '/', - target: '/cahkms/:category?', - }, - ], - }, -}; diff --git a/lib/routes/cahkms/router.ts b/lib/routes/cahkms/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/cahkms/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/caijing/maintainer.ts b/lib/routes/caijing/maintainer.ts deleted file mode 100644 index b3986573e..000000000 --- a/lib/routes/caijing/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/roll': ['TonyRL'], -}; diff --git a/lib/routes/caijing/namespace.ts b/lib/routes/caijing/namespace.ts new file mode 100644 index 000000000..6f2acf580 --- /dev/null +++ b/lib/routes/caijing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '财经网', + url: 'roll.caijing.com.cn', +}; diff --git a/lib/routes/caijing/radar.ts b/lib/routes/caijing/radar.ts deleted file mode 100644 index 63c96c5e3..000000000 --- a/lib/routes/caijing/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'caijing.com.cn': { - _name: '财经网', - roll: [ - { - title: '滚动新闻', - docs: 'https://docs.rsshub.app/routes/finance#cai-jing-wang', - source: ['/index1.html', '/'], - target: '/caijing/roll', - }, - ], - }, -}; diff --git a/lib/routes/caijing/roll.ts b/lib/routes/caijing/roll.ts index a23b0f79a..9f7222d15 100644 --- a/lib/routes/caijing/roll.ts +++ b/lib/routes/caijing/roll.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/roll', + categories: ['finance'], + example: '/caijing/roll', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['roll.caijing.com.cn/index1.html', 'roll.caijing.com.cn/'], + }, + name: '滚动新闻', + maintainers: ['TonyRL'], + handler, + url: 'roll.caijing.com.cn/index1.html', +}; + +async function handler() { const baseUrl = 'https://roll.caijing.com.cn'; const response = await got(`${baseUrl}/ajax_lists.php`, { searchParams: { @@ -38,10 +61,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '滚动新闻-财经网', image: 'https://www.caijing.com.cn/favicon.ico', link: response.url, item: items, - }); -}; + }; +} diff --git a/lib/routes/caijing/router.ts b/lib/routes/caijing/router.ts deleted file mode 100644 index 6536d5745..000000000 --- a/lib/routes/caijing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/roll', './roll'); -}; diff --git a/lib/routes/caixin/article.ts b/lib/routes/caixin/article.ts index 6afba4c00..082924732 100644 --- a/lib/routes/caixin/article.ts +++ b/lib/routes/caixin/article.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/article', + categories: ['traditional-media'], + example: '/caixin/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['caixin.com/'], + }, + name: '首页新闻', + maintainers: ['EsuRt'], + handler, + url: 'caixin.com/', +}; + +async function handler() { const { data: response } = await got('https://mapiv5.caixin.com/m/api/getWapIndexListByPage'); const list = response.data.list.map((item) => ({ @@ -19,10 +42,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '财新网 - 首页', link: 'https://www.caixin.com', description: '财新网 - 首页', item: items, - }); -}; + }; +} diff --git a/lib/routes/caixin/blog.ts b/lib/routes/caixin/blog.ts index a91a4d495..dc648a63a 100644 --- a/lib/routes/caixin/blog.ts +++ b/lib/routes/caixin/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,26 @@ import { isValidHost } from '@/utils/valid-host'; import { parseDate } from '@/utils/parse-date'; import { parseBlogArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:column?', + categories: ['blog'], + example: '/caixin/blog/zhangwuchang', + parameters: { column: '博客名称,可在博客主页的 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户博客', + maintainers: [], + handler, + description: `通过提取文章全文,以提供比官方源更佳的阅读体验.`, +}; + +async function handler(ctx) { const column = ctx.req.param('column'); const { limit = 20 } = ctx.req.query(); if (column) { @@ -48,13 +68,13 @@ export default async (ctx) => { const items = await Promise.all(posts.map((item) => parseBlogArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `财新博客 - ${authorName}`, link, description: introduce, image: avatar, item: items, - }); + }; } else { const { data } = await got('https://blog.caixin.com/blog-api/post/index', { searchParams: { @@ -71,12 +91,12 @@ export default async (ctx) => { })); const items = await Promise.all(posts.map((item) => parseBlogArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `财新博客 - 全部`, link: 'https://blog.caixin.com', // description: introduce, // image: avatar, item: items, - }); + }; } -}; +} diff --git a/lib/routes/caixin/category.ts b/lib/routes/caixin/category.ts index 6c4cdd461..31732e09a 100644 --- a/lib/routes/caixin/category.ts +++ b/lib/routes/caixin/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,42 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:column/:category', + categories: ['traditional-media'], + example: '/caixin/finance/regulation', + parameters: { column: '栏目名', category: '栏目下的子分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '新闻分类', + maintainers: ['idealclover'], + handler, + description: `Column 列表: + + | 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 | + | ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ | + | economy | finance | china | science | international | opinion | culture | weekly | + + 以金融板块为例的 category 列表:(其余 column 以类似方式寻找) + + | 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 | + | ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ | + | regulation | bank | stock | insurance\_trust | investment | innovation | market | + + Category 列表: + + | 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 | + | ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ | + | coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const column = ctx.req.param('column'); const url = `https://${column}.caixin.com/${category}`; @@ -48,10 +84,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title, link: url, description: '财新网 - 提供财经新闻及资讯服务', item: items, - }); -}; + }; +} diff --git a/lib/routes/caixin/database.ts b/lib/routes/caixin/database.ts index 6e49cd0bf..a653f98de 100644 --- a/lib/routes/caixin/database.ts +++ b/lib/routes/caixin/database.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/database', + categories: ['traditional-media'], + example: '/caixin/database', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['k.caixin.com/web', 'k.caixin.com/'], + }, + name: '财新数据通', + maintainers: ['nczitzk'], + handler, + url: 'k.caixin.com/web', +}; + +async function handler() { const rootUrl = 'https://database.caixin.com'; const currentUrl = `${rootUrl}/news/`; const response = await got(currentUrl); @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '财新数据通 - 专享资讯', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/caixin/k.ts b/lib/routes/caixin/k.ts index 1b096eff9..3f75a2945 100644 --- a/lib/routes/caixin/k.ts +++ b/lib/routes/caixin/k.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/k', + categories: ['traditional-media'], + example: '/caixin/k', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '财新一线', + maintainers: ['boypt'], + handler, +}; + +async function handler() { const response = await got('https://k.caixin.com/app/v1/list', { searchParams: { productIdList: '8,28', @@ -31,10 +50,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '财新网 - 财新一线新闻', link: 'https://k.caixin.com/web/', description: '财新网 - 财新一线新闻', item: items, - }); -}; + }; +} diff --git a/lib/routes/caixin/latest.ts b/lib/routes/caixin/latest.ts index d47b2b40a..df7930d60 100644 --- a/lib/routes/caixin/latest.ts +++ b/lib/routes/caixin/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,30 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['traditional-media'], + example: '/caixin/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caixin.com/'], + }, + name: '最新文章', + maintainers: ['tpnonthealps'], + handler, + url: 'caixin.com/', + description: `说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。`, +}; + +async function handler() { const { data } = await got('https://gateway.caixin.com/api/dataplatform/scroll/index').json(); const list = data.articleList @@ -41,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '财新网 - 最新文章', link: 'https://www.caixin.com/', item: rss, - }); -}; + }; +} diff --git a/lib/routes/caixin/maintainer.ts b/lib/routes/caixin/maintainer.ts deleted file mode 100644 index 95f07411d..000000000 --- a/lib/routes/caixin/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/article': ['EsuRt'], - '/blog/:column': ['Maecenas'], - '/database': ['nczitzk'], - '/k': ['boypt'], - '/latest': ['tpnonthealps'], - '/weekly': ['TonyRL'], - '/:column/:category': ['idealclover'], -}; diff --git a/lib/routes/caixin/namespace.ts b/lib/routes/caixin/namespace.ts new file mode 100644 index 000000000..8099f11d8 --- /dev/null +++ b/lib/routes/caixin/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '财新博客', + url: 'caixin.com', + description: `> 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。`, +}; diff --git a/lib/routes/caixin/radar.ts b/lib/routes/caixin/radar.ts deleted file mode 100644 index 39edc3258..000000000 --- a/lib/routes/caixin/radar.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default { - 'caixin.com': { - _name: '财新网', - '.': [ - { - title: '新闻分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - }, - { - title: '首页新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - source: ['/'], - target: '/caixin/article', - }, - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - source: ['/'], - target: '/caixin/latest', - }, - { - title: '用户博客', - docs: 'https://docs.rsshub.app/routes/blog#cai-xin-bo-ke', - }, - ], - database: [ - { - title: '财新数据通', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - source: ['/news', '/'], - target: '/caixin/database', - }, - ], - k: [ - { - title: '财新一线', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - source: ['/web', '/'], - target: '/caixin/database', - }, - ], - weekly: [ - { - title: '财新周刊', - docs: 'https://docs.rsshub.app/routes/traditional-media#cai-xin-wang', - source: ['/', '/*'], - target: '/caixin/weekly', - }, - ], - }, -}; diff --git a/lib/routes/caixin/router.ts b/lib/routes/caixin/router.ts deleted file mode 100644 index bf6ac915e..000000000 --- a/lib/routes/caixin/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/article', './article'); - router.get('/blog/:column?', './blog'); - router.get('/database', './database'); - router.get('/k', './k'); - router.get('/latest', './latest'); - router.get('/weekly', './weekly'); - router.get('/:column/:category', './category'); -}; diff --git a/lib/routes/caixin/weekly.ts b/lib/routes/caixin/weekly.ts index aac758fca..2b2f149f9 100644 --- a/lib/routes/caixin/weekly.ts +++ b/lib/routes/caixin/weekly.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly', + categories: ['traditional-media'], + example: '/caixin/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['weekly.caixin.com/', 'weekly.caixin.com/*'], + }, + name: '财新周刊', + maintainers: ['TonyRL'], + handler, + url: 'weekly.caixin.com/', +}; + +async function handler(ctx) { const link = 'https://weekly.caixin.com'; const { data: response } = await got(link); @@ -50,12 +73,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title') .text() .replace(/_财新周刊频道_财新网$/, '') .trim(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/caixinglobal/latest.ts b/lib/routes/caixinglobal/latest.ts index 3cf97dd4a..d9c55f18b 100644 --- a/lib/routes/caixinglobal/latest.ts +++ b/lib/routes/caixinglobal/latest.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['traditional-media'], + example: '/caixinglobal/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caixinglobal.com/news', 'caixinglobal.com/'], + }, + name: 'Latest News', + maintainers: ['TonyRL'], + handler, + url: 'caixinglobal.com/news', +}; + +async function handler(ctx) { const { data } = await got('https://gateway.caixin.com/api/extapi/homeInterface.jsp', { searchParams: { subject: '100990318;100990314;100990311', @@ -55,11 +78,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'The Latest Top Headlines on China - Caixin Global', description: 'The latest headlines on China finance, companies, politics, international affairs and other China-related issues from around the world. Caixin Global', language: 'en', link: 'https://www.caixinglobal.com/news/', item: items, - }); -}; + }; +} diff --git a/lib/routes/caixinglobal/maintainer.ts b/lib/routes/caixinglobal/maintainer.ts deleted file mode 100644 index 868a318b2..000000000 --- a/lib/routes/caixinglobal/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['TonyRL'], -}; diff --git a/lib/routes/caixinglobal/namespace.ts b/lib/routes/caixinglobal/namespace.ts new file mode 100644 index 000000000..bf1e6f1ae --- /dev/null +++ b/lib/routes/caixinglobal/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Caixin Global', + url: 'caixinglobal.com', +}; diff --git a/lib/routes/caixinglobal/radar.ts b/lib/routes/caixinglobal/radar.ts deleted file mode 100644 index 190edad09..000000000 --- a/lib/routes/caixinglobal/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'caixinglobal.com': { - _name: 'Caixin Global', - '.': [ - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/traditional-media#caixin-global', - source: ['/news', '/'], - target: '/caixinglobal/latest', - }, - ], - }, -}; diff --git a/lib/routes/caixinglobal/router.ts b/lib/routes/caixinglobal/router.ts deleted file mode 100644 index cd57ba05c..000000000 --- a/lib/routes/caixinglobal/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './latest'); -}; diff --git a/lib/routes/camchina/index.ts b/lib/routes/camchina/index.ts index b91166d6a..55e8a7189 100644 --- a/lib/routes/camchina/index.ts +++ b/lib/routes/camchina/index.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['study'], + example: '/camchina', + parameters: { id: '分类,见下表,默认为 1,即新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cste.org.cn/categories/:id', 'cste.org.cn/'], + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 新闻 | 通告栏 | + | ---- | ------ | + | 1 | 2 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -45,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `中国管理现代化研究会 - ${$('.title_red').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/camchina/maintainer.ts b/lib/routes/camchina/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/camchina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/camchina/namespace.ts b/lib/routes/camchina/namespace.ts new file mode 100644 index 000000000..d2b1d471d --- /dev/null +++ b/lib/routes/camchina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国管理现代化研究会', + url: 'cste.org.cn', +}; diff --git a/lib/routes/camchina/radar.ts b/lib/routes/camchina/radar.ts deleted file mode 100644 index 012395ef7..000000000 --- a/lib/routes/camchina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cste.org.cn': { - _name: '中国管理现代化研究会', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/study#zhon-guo-guan-li-xian-dai-hua-yan-jiu-hui-lan-mu', - source: ['/categories/:id', '/'], - target: '/camchina/:id?', - }, - ], - }, -}; diff --git a/lib/routes/camchina/router.ts b/lib/routes/camchina/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/camchina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/cankaoxiaoxi/index.ts b/lib/routes/cankaoxiaoxi/index.ts index 502ca8509..ed8d210e1 100644 --- a/lib/routes/cankaoxiaoxi/index.ts +++ b/lib/routes/cankaoxiaoxi/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,46 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/column/:id?', '/:id?'], + categories: ['traditional-media'], + example: '/cankaoxiaoxi/column/diyi', + parameters: { id: '栏目 id,默认为 `diyi`,即第一关注' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['yuxinliu-alex', 'nczitzk'], + handler, + description: `| 栏目 | id | + | -------------- | -------- | + | 第一关注 | diyi | + | 中国 | zhongguo | + | 国际 | gj | + | 观点 | guandian | + | 锐参考 | ruick | + | 体育健康 | tiyujk | + | 科技应用 | kejiyy | + | 文化旅游 | wenhualy | + | 参考漫谈 | cankaomt | + | 研究动态 | yjdt | + | 海外智库 | hwzk | + | 业界信息・观点 | yjxx | + | 海外看中国城市 | hwkzgcs | + | 译名趣谈 | ymymqt | + | 译名发布 | ymymfb | + | 双语汇 | ymsyh | + | 参考视频 | video | + | 军事 | junshi | + | 参考人物 | cankaorw |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'diyi'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -62,11 +102,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `参考消息 - ${channelResponse.data.name}`, link: currentUrl, description: '参考消息', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/cankaoxiaoxi/maintainer.ts b/lib/routes/cankaoxiaoxi/maintainer.ts deleted file mode 100644 index 97eb87bdf..000000000 --- a/lib/routes/cankaoxiaoxi/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/column/:id?': ['yuxinliu-alex', 'nczitzk'], - '/:id?': ['yuxinliu-alex', 'nczitzk'], -}; diff --git a/lib/routes/cankaoxiaoxi/namespace.ts b/lib/routes/cankaoxiaoxi/namespace.ts new file mode 100644 index 000000000..13e98f6d4 --- /dev/null +++ b/lib/routes/cankaoxiaoxi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '参考消息', + url: 'cankaoxiaoxi.com', +}; diff --git a/lib/routes/cankaoxiaoxi/radar.ts b/lib/routes/cankaoxiaoxi/radar.ts deleted file mode 100644 index cf2270772..000000000 --- a/lib/routes/cankaoxiaoxi/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'cankaoxiaoxi.com': { - _name: '参考消息', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#can-kao-xiao-xi-lan-mu', - source: ['/'], - target: (params, url) => { - const urlStr = new URL(url).toString(); - return `/cankaoxiaoxi/column${/\/#\//.test(urlStr) ? `/${urlStr.split('/').pop()}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/cankaoxiaoxi/router.ts b/lib/routes/cankaoxiaoxi/router.ts deleted file mode 100644 index 0142a3c1d..000000000 --- a/lib/routes/cankaoxiaoxi/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/column/:id?', './'); - router.get('/:id?', './'); -}; diff --git a/lib/routes/cartoonmad/comic.ts b/lib/routes/cartoonmad/comic.ts index 305b86990..28edfea76 100644 --- a/lib/routes/cartoonmad/comic.ts +++ b/lib/routes/cartoonmad/comic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -33,7 +34,28 @@ const getChapters = (id, list, tryGet) => ) ); -export default async (ctx) => { +export const route: Route = { + path: '/comic/:id', + categories: ['anime'], + example: '/cartoonmad/comic/5827', + parameters: { id: '漫画ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cartoonmad.com/comic/:id'], + }, + name: '漫画更新', + maintainers: ['KellyHwong'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `${baseUrl}/comic/${id}`; @@ -65,10 +87,10 @@ export default async (ctx) => { const chapters = await getChapters(id, list, cache.tryGet); - ctx.set('data', { + return { title: $('head title').text(), link, description: bookIntro, item: chapters, - }); -}; + }; +} diff --git a/lib/routes/cartoonmad/maintainer.ts b/lib/routes/cartoonmad/maintainer.ts deleted file mode 100644 index 66176b716..000000000 --- a/lib/routes/cartoonmad/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/comic/:id': ['KellyHwong'], -}; diff --git a/lib/routes/cartoonmad/namespace.ts b/lib/routes/cartoonmad/namespace.ts new file mode 100644 index 000000000..3768ff781 --- /dev/null +++ b/lib/routes/cartoonmad/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '動漫狂', + url: 'cartoonmad.com', +}; diff --git a/lib/routes/cartoonmad/radar.ts b/lib/routes/cartoonmad/radar.ts deleted file mode 100644 index 0a3a4a909..000000000 --- a/lib/routes/cartoonmad/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cartoonmad.com': { - _name: '動漫狂', - '.': [ - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-kuang', - source: ['/comic/:id'], - target: '/cartoonmad/comic/:id', - }, - ], - }, -}; diff --git a/lib/routes/cartoonmad/router.ts b/lib/routes/cartoonmad/router.ts deleted file mode 100644 index 4b9ff0ae8..000000000 --- a/lib/routes/cartoonmad/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/comic/:id', './comic'); -}; diff --git a/lib/routes/cas/cg/index.ts b/lib/routes/cas/cg/index.ts index a0a40bb65..361f7cab0 100644 --- a/lib/routes/cas/cg/index.ts +++ b/lib/routes/cas/cg/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/cg/:caty?', + categories: ['university'], + example: '/cas/cg/cgzhld', + parameters: { caty: '分类,见下表,默认为工作动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cas.cn/cg/:caty?'], + }, + name: '成果转化', + maintainers: ['nczitzk'], + handler, + description: `| 工作动态 | 科技成果转移转化亮点工作 | + | -------- | ------------------------ | + | zh | cgzhld |`, +}; + +async function handler(ctx) { const caty = ctx.req.param('caty') || 'zh'; const rootUrl = 'https://www.cas.cn'; @@ -45,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text().replace('----', ' - '), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cas/genetics/index.ts b/lib/routes/cas/genetics/index.ts index b41f515a7..25c29be56 100644 --- a/lib/routes/cas/genetics/index.ts +++ b/lib/routes/cas/genetics/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://genetics.cas.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/genetics/:path{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const currentUrl = `${baseUrl}/${path}/`; @@ -55,9 +63,9 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title: $('head title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cas/ia/yjs.ts b/lib/routes/cas/ia/yjs.ts index 97c771694..08dfc0612 100644 --- a/lib/routes/cas/ia/yjs.ts +++ b/lib/routes/cas/ia/yjs.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/ia/yjs', + categories: ['university'], + example: '/cas/ia/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ia.cas.cn/yjsjy/zs/sszs', 'www.ia.cas.cn/'], + }, + name: '自动化所', + maintainers: ['shengmaosu'], + handler, + url: 'www.ia.cas.cn/yjsjy/zs/sszs', +}; + +async function handler() { const link = 'http://www.ia.cas.cn/yjsjy/zs/sszs/'; const response = await got(link); const $ = load(response.data); const list = $('.col-md-9 li'); - ctx.set('data', { + return { title: '中科院自动化所', link, description: '中科院自动化所通知公告', @@ -21,5 +44,5 @@ export default async (ctx) => { link: item.find('li a').attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/cas/iee/kydt.ts b/lib/routes/cas/iee/kydt.ts index a5bbeeddf..cb92f6338 100644 --- a/lib/routes/cas/iee/kydt.ts +++ b/lib/routes/cas/iee/kydt.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/iee/kydt', + categories: ['university'], + example: '/cas/iee/kydt', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.iee.cas.cn/xwzx/kydt', 'www.iee.cas.cn/'], + }, + name: '电工研究所 科研动态', + maintainers: ['nczitzk'], + handler, + url: 'www.iee.cas.cn/xwzx/kydt', +}; + +async function handler() { const rootUrl = 'http://www.iee.cas.cn/xwzx/kydt/'; const response = await got({ method: 'get', @@ -41,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '科研成果 - 中国科学院电工研究所', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cas/is/index.ts b/lib/routes/cas/is/index.ts index d4eb3f030..c608a8cc8 100644 --- a/lib/routes/cas/is/index.ts +++ b/lib/routes/cas/is/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://is.cas.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/is/:path{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const response = await got(`${baseUrl}/${path}/`); @@ -37,9 +45,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: `${baseUrl}/${path}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/cas/maintainer.ts b/lib/routes/cas/maintainer.ts deleted file mode 100644 index feced1699..000000000 --- a/lib/routes/cas/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/cg/:caty?': ['nczitzk'], - '/genetics/:path+': ['panyq357'], - '/ia/yjs': ['shengmaosu'], - '/iee/kydt': ['nczitzk'], - '/is/:path+': ['Misaka13514'], - '/mesalab/kb': ['renzhexigua'], - '/sim/kyjz': ['HenryQW'], -}; diff --git a/lib/routes/cas/mesalab/kb.ts b/lib/routes/cas/mesalab/kb.ts index 9f36cfa36..e8b9e5fb4 100644 --- a/lib/routes/cas/mesalab/kb.ts +++ b/lib/routes/cas/mesalab/kb.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import cherrio from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/mesalab/kb', + categories: ['university'], + example: '/cas/mesalab/kb', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mesalab.cn/f/article/articleList', 'www.mesalab.cn/'], + }, + name: '信息工程研究所 第二研究室 处理架构组 知识库', + maintainers: ['renzhexigua'], + handler, + url: 'www.mesalab.cn/f/article/articleList', +}; + +async function handler() { const homepage = 'https://www.mesalab.cn'; const url = `${homepage}/f/article/articleList?pageNo=1&pageSize=15&createTimeSort=DESC`; const response = await got(url); @@ -33,10 +56,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'MESA 知识库', description: '中国科学院信息工程研究所 第二研究室 处理架构组', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cas/namespace.ts b/lib/routes/cas/namespace.ts new file mode 100644 index 000000000..68c7a05f8 --- /dev/null +++ b/lib/routes/cas/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科学院', + url: 'www.cas.cn', +}; diff --git a/lib/routes/cas/radar.ts b/lib/routes/cas/radar.ts deleted file mode 100644 index b00f6d303..000000000 --- a/lib/routes/cas/radar.ts +++ /dev/null @@ -1,68 +0,0 @@ -export default { - 'cas.cn': { - _name: '中国科学院', - www: [ - { - title: '成果转化', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/cg/:caty?'], - target: '/cas/cg/:caty?', - }, - ], - 'www.genetics': [ - { - title: '遗传与发育生物学研究所', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/*path'], - target: '/cas/genetics/*path', - }, - ], - 'www.ia': [ - { - title: '自动化所', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/yjsjy/zs/sszs', '/'], - target: '/cas/ia/yjs', - }, - ], - 'www.iee': [ - { - title: '电工研究所 科研动态', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/xwzx/kydt', '/'], - target: '/cas/iee/kydt', - }, - ], - 'www.is': [ - { - title: '软件研究所', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/'], - target: (params, url, document) => { - if (document.querySelector('.list-news')) { - return `/cas/is/${url.split('/').slice(3, -1).join('/')}`; - } - }, - }, - ], - 'www.sim': [ - { - title: '上海微系统与信息技术研究所 - 科技进展', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/xwzx2016/kyjz', '/'], - target: '/cas/sim/kyjz', - }, - ], - }, - 'mesalab.cn': { - _name: '中国科学院', - www: [ - { - title: '信息工程研究所 第二研究室 处理架构组 知识库', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan', - source: ['/f/article/articleList', '/'], - target: '/cas/mesalab/kb', - }, - ], - }, -}; diff --git a/lib/routes/cas/router.ts b/lib/routes/cas/router.ts deleted file mode 100644 index 45a4f8150..000000000 --- a/lib/routes/cas/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/cg/:caty?', './cg/index'); - router.get('/genetics/:path{.+}', './genetics/index'); - router.get('/ia/yjs', './ia/yjs'); - router.get('/iee/kydt', './iee/kydt'); - router.get('/is/:path{.+}', './is/index'); - router.get('/mesalab/kb', './mesalab/kb'); - router.get('/sim/kyjz', './sim/kyjz'); -}; diff --git a/lib/routes/cas/sim/kyjz.ts b/lib/routes/cas/sim/kyjz.ts index 29075a980..238294771 100644 --- a/lib/routes/cas/sim/kyjz.ts +++ b/lib/routes/cas/sim/kyjz.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'http://www.sim.cas.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/sim/kyjz', + categories: ['university'], + example: '/cas/sim/kyjz', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.sim.cas.cn/xwzx2016/kyjz', 'www.sim.cas.cn/'], + }, + name: '上海微系统与信息技术研究所 科技进展', + maintainers: ['HenryQW'], + handler, + url: 'www.sim.cas.cn/xwzx2016/kyjz', +}; + +async function handler() { const link = new URL('xwzx2016/kyjz/', host).href; const response = await got(link); @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中国科学院上海微系统与信息技术研究所 -- 科技进展', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/casssp/maintainer.ts b/lib/routes/casssp/maintainer.ts deleted file mode 100644 index 062d245bd..000000000 --- a/lib/routes/casssp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/casssp/namespace.ts b/lib/routes/casssp/namespace.ts new file mode 100644 index 000000000..c20708fdc --- /dev/null +++ b/lib/routes/casssp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科学学与科技政策研究会', + url: 'casssp.org.cn', +}; diff --git a/lib/routes/casssp/news.ts b/lib/routes/casssp/news.ts index f0e9ff94d..8bf685857 100644 --- a/lib/routes/casssp/news.ts +++ b/lib/routes/casssp/news.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['government'], + example: '/casssp/news/3', + parameters: { category: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究会动态', + maintainers: ['nczitzk'], + handler, + description: `| 通知公告 | 新闻动态 | 信息公开 | 时政要闻 | + | -------- | -------- | -------- | -------- | + | 3 | 2 | 92 | 93 |`, +}; + +async function handler(ctx) { const { category = '3' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -44,7 +66,7 @@ export default async (ctx) => { const image = $('img[la="la"]').first().prop('src'); const icon = new URL($('link[rel="shortcut icon "]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -56,5 +78,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author: $('img[la="la"]').first().prop('title'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/casssp/radar.ts b/lib/routes/casssp/radar.ts deleted file mode 100644 index bced7747f..000000000 --- a/lib/routes/casssp/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'casssp.org.cn': { - _name: '中国科学学与科技政策研究会', - '.': [ - { - title: '研究会动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai', - source: ['/news/:category'], - target: (params) => { - const category = params.category; - - return `/casssp/news${category ? `/${category}` : ''}`; - }, - }, - { - title: '研究会动态 - 通知公告', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai', - source: ['/news/3'], - target: '/casssp/news/3', - }, - { - title: '研究会动态 - 新闻动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai', - source: ['/news/2'], - target: '/casssp/news/2', - }, - { - title: '研究会动态 - 信息公开', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai', - source: ['/news/92'], - target: '/casssp/news/92', - }, - { - title: '研究会动态 - 时政要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai', - source: ['/news/93'], - target: '/casssp/news/93', - }, - ], - }, -}; diff --git a/lib/routes/casssp/router.ts b/lib/routes/casssp/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/casssp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/cast/index.ts b/lib/routes/cast/index.ts index c01912a1e..81883d32a 100644 --- a/lib/routes/cast/index.ts +++ b/lib/routes/cast/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got, { type Response } from '@/utils/got'; import { load } from 'cheerio'; @@ -41,7 +42,38 @@ async function parsePage(html: string) { ); } -export default async (ctx) => { +export const route: Route = { + path: '/:column/:subColumn/:category?', + categories: ['government'], + example: '/cast/xw/tzgg/ZH', + parameters: { column: '栏目编号,见下表', subColumn: '二级栏目编号', category: '分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通用', + maintainers: ['KarasuShin', 'TonyRL'], + handler, + description: `:::tip + 在路由末尾处加上 \`?limit=限制获取数目\` 来限制获取条目数量,默认值为\`10\` + ::: + + | 分类 | 编码 | + | -------- | ---- | + | 全景科协 | qjkx | + | 智库 | zk | + | 学术 | xs | + | 科普 | kp | + | 党建 | dj | + | 数据 | sj | + | 新闻 | xw |`, +}; + +async function handler(ctx) { const { column, subColumn, category } = ctx.req.param(); const { limit = 10 } = ctx.req.query(); let link = `${baseUrl}/${column}/${subColumn}`; @@ -72,10 +104,10 @@ export default async (ctx) => { const pageTitle = $('head title').text(); - ctx.set('data', { + return { title: pageTitle, link, image: 'https://www.cast.org.cn/favicon.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/cast/maintainer.ts b/lib/routes/cast/maintainer.ts deleted file mode 100644 index 014bdb191..000000000 --- a/lib/routes/cast/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:column/:subColumn/:category?': ['KarasuShin', 'TonyRL'], -}; diff --git a/lib/routes/cast/namespace.ts b/lib/routes/cast/namespace.ts new file mode 100644 index 000000000..38c0e21b5 --- /dev/null +++ b/lib/routes/cast/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科学技术协会', + url: 'cast.org.cn', +}; diff --git a/lib/routes/cast/radar.ts b/lib/routes/cast/radar.ts deleted file mode 100644 index 2eb412c4d..000000000 --- a/lib/routes/cast/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cast.org.cn': { - _name: '中国科学技术协会', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ke-xue-ji-shu-xie-hui', - source: ['/:column/:subColumn/:category/index.html', '/:column/:subColumn/index.html'], - target: (params) => (params.category ? `/cast/${params.column}/${params.subColumn}/${params.category}` : `/cast/${params.column}/${params.subColumn}`), - }, - ], - }, -}; diff --git a/lib/routes/cast/router.ts b/lib/routes/cast/router.ts deleted file mode 100644 index a390ef458..000000000 --- a/lib/routes/cast/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:column/:subColumn/:category?', './index'); -}; diff --git a/lib/routes/cau/ele.ts b/lib/routes/cau/ele.ts index 9dfaab0cb..e4cb59fca 100644 --- a/lib/routes/cau/ele.ts +++ b/lib/routes/cau/ele.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ele', + categories: ['university'], + example: '/cau/ele', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ciee.cau.edu.cn/col/col26712/index.html', 'ciee.cau.edu.cn/'], + }, + name: '研招网通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'ciee.cau.edu.cn/col/col26712/index.html', + description: `#### 信电学院 {#zhong-guo-nong-ye-da-xue-yan-zhao-wang-tong-zhi-gong-gao-xin-dian-xue-yuan}`, +}; + +async function handler() { const baseUrl = 'https://ciee.cau.edu.cn'; const link = `${baseUrl}/col/col26712/index.html`; const response = await got(`${baseUrl}/module/web/jpage/dataproxy.jsp`, { @@ -20,7 +44,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('recordset record'); - ctx.set('data', { + return { title: '中国农业大学信电学院', link, description: '中国农业大学信电学院通知公告', @@ -38,5 +62,5 @@ export default async (ctx) => { guid: `${link}#${title}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/cau/maintainer.ts b/lib/routes/cau/maintainer.ts deleted file mode 100644 index 5cc98e62f..000000000 --- a/lib/routes/cau/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/ele': ['shengmaosu'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/cau/namespace.ts b/lib/routes/cau/namespace.ts new file mode 100644 index 000000000..eb1d7960a --- /dev/null +++ b/lib/routes/cau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国农业大学', + url: 'ciee.cau.edu.cn', +}; diff --git a/lib/routes/cau/radar.ts b/lib/routes/cau/radar.ts deleted file mode 100644 index f17bf533f..000000000 --- a/lib/routes/cau/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'cau.edu.cn': { - _name: '中国农业大学', - ciee: [ - { - title: '信息与电气工程学院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-nong-ye-da-xue', - source: ['/col/col26712/index.html', '/'], - target: '/cau/ele', - }, - ], - yz: [ - { - title: '研招网通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-nong-ye-da-xue', - source: ['/col/col41740/index.html', '/'], - target: '/cau/yjs', - }, - ], - }, -}; diff --git a/lib/routes/cau/router.ts b/lib/routes/cau/router.ts deleted file mode 100644 index d3f2afcc4..000000000 --- a/lib/routes/cau/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/ele', './ele'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/cau/yjs.ts b/lib/routes/cau/yjs.ts index d13af1255..0f735216b 100644 --- a/lib/routes/cau/yjs.ts +++ b/lib/routes/cau/yjs.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/cau/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.cau.edu.cn/col/col41740/index.html', 'yz.cau.edu.cn/'], + }, + name: 'Unknown', + maintainers: ['shengmaosu'], + handler, + url: 'yz.cau.edu.cn/col/col41740/index.html', +}; + +async function handler() { const baseUrl = 'https://yz.cau.edu.cn'; const link = `${baseUrl}/col/col41740/index.html`; const response = await got(`${baseUrl}/module/web/jpage/dataproxy.jsp`, { @@ -20,7 +43,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('recordset record'); - ctx.set('data', { + return { title: '中农研究生学院', link, description: '中农研究生学院', @@ -38,5 +61,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text().replaceAll(/[[\]]/g, '')), }; }), - }); -}; + }; +} diff --git a/lib/routes/caus/index.ts b/lib/routes/caus/index.ts index 53b6d9a74..ad7e7dd39 100644 --- a/lib/routes/caus/index.ts +++ b/lib/routes/caus/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -28,7 +29,28 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/caus', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 全部 | 要闻 | 商业 | 快讯 | 财富 | 生活 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | 0 | 1 | 2 | 3 | 8 | 6 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || '0'; const isHome = category === '0'; @@ -81,9 +103,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${categories[category].title} - 加美财经`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/caus/maintainer.ts b/lib/routes/caus/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/caus/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/caus/namespace.ts b/lib/routes/caus/namespace.ts new file mode 100644 index 000000000..0f48c0510 --- /dev/null +++ b/lib/routes/caus/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '加美财经', + url: 'caus.com', +}; diff --git a/lib/routes/caus/radar.ts b/lib/routes/caus/radar.ts deleted file mode 100644 index 9dc75b396..000000000 --- a/lib/routes/caus/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'caus.com': { - _name: '加美财经', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#jia-mei-cai-jing', - source: ['/home', '/focus_news', '/hours', '/fortune', '/life'], - target: (_, url) => `/caus/${new URL(url).searchParams.get('id')}`, - }, - ], - }, -}; diff --git a/lib/routes/caus/router.ts b/lib/routes/caus/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/caus/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/cbaigui/index.ts b/lib/routes/cbaigui/index.ts index 11ab731a9..7417c8e8a 100644 --- a/lib/routes/cbaigui/index.ts +++ b/lib/routes/cbaigui/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import * as path from 'node:path'; import { rootUrl, apiSlug, GetFilterId } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; let filterName; @@ -89,7 +97,7 @@ export default async (ctx) => { const icon = $('link[rel="apple-touch-icon"]').first().prop('href'); - ctx.set('data', { + return { item: items, title: `纪妖${filterName ? ` - ${filterName}` : ''}`, link: currentUrl, @@ -100,5 +108,5 @@ export default async (ctx) => { logo: icon, subtitle: $('p.site-description').text(), author: $('p.site-title').text(), - }); -}; + }; +} diff --git a/lib/routes/cbaigui/maintainer.ts b/lib/routes/cbaigui/maintainer.ts deleted file mode 100644 index 2543f2e41..000000000 --- a/lib/routes/cbaigui/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path+': ['nczitzk'], -}; diff --git a/lib/routes/cbaigui/namespace.ts b/lib/routes/cbaigui/namespace.ts new file mode 100644 index 000000000..47cb2b970 --- /dev/null +++ b/lib/routes/cbaigui/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '纪妖', + url: 'cbaigui.com', +}; diff --git a/lib/routes/cbaigui/radar.ts b/lib/routes/cbaigui/radar.ts deleted file mode 100644 index cb5e8881a..000000000 --- a/lib/routes/cbaigui/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'cbaigui.com': { - _name: '纪妖', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/new-media#ji-yao-tong-yong', - source: ['/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/\.com(.*?)/)[1]; - - return `/cbaigui${path}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/cbaigui/router.ts b/lib/routes/cbaigui/router.ts deleted file mode 100644 index 3e16705b5..000000000 --- a/lib/routes/cbaigui/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './'); -}; diff --git a/lib/routes/cbc/maintainer.ts b/lib/routes/cbc/maintainer.ts deleted file mode 100644 index 349fdfcd4..000000000 --- a/lib/routes/cbc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topics/:topic?': ['wb14123'], -}; diff --git a/lib/routes/cbc/namespace.ts b/lib/routes/cbc/namespace.ts new file mode 100644 index 000000000..7d44268c5 --- /dev/null +++ b/lib/routes/cbc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Canadian Broadcasting Corporation', + url: 'cbc.ca', +}; diff --git a/lib/routes/cbc/radar.ts b/lib/routes/cbc/radar.ts deleted file mode 100644 index 189b1c844..000000000 --- a/lib/routes/cbc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cbc.ca': { - _name: 'Canadian Broadcasting Corporation', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#canadian-broadcasting-corporation', - source: ['/news'], - target: '/cbc/topics', - }, - ], - }, -}; diff --git a/lib/routes/cbc/router.ts b/lib/routes/cbc/router.ts deleted file mode 100644 index 5fe41a172..000000000 --- a/lib/routes/cbc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topics/:topic?', './topics'); -}; diff --git a/lib/routes/cbc/topics.ts b/lib/routes/cbc/topics.ts index 54ce39614..a1573f795 100644 --- a/lib/routes/cbc/topics.ts +++ b/lib/routes/cbc/topics.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/topics/:topic?', + categories: ['traditional-media'], + example: '/cbc/topics', + parameters: { topic: 'Channel,`Top Stories` by default. For secondary channel like `canada/toronto`, use `-` to replace `/`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cbc.ca/news'], + target: '/topics', + }, + name: 'News', + maintainers: ['wb14123'], + handler, + url: 'cbc.ca/news', +}; + +async function handler(ctx) { const baseUrl = 'https://www.cbc.ca'; const topic = ctx.req.param('topic') || ''; const url = `${baseUrl}/news${topic ? `/${topic.replace('-', '/')}` : ''}`; @@ -51,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: out.filter((x) => x.title), - }); -}; + }; +} diff --git a/lib/routes/cbirc/index.ts b/lib/routes/cbirc/index.ts index 0374fc711..58a18116d 100644 --- a/lib/routes/cbirc/index.ts +++ b/lib/routes/cbirc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -78,7 +79,17 @@ async function getContent(item) { return response.data.data.docClob; } -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + radar: { + source: ['cbirc.gov.cn/:category', 'cbirc.gov.cn/'], + }, + name: 'Unknown', + maintainers: ['JkCheung'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'ggtz'; const cat = categories[category]; @@ -110,11 +121,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `中国银保监会-${cat.title}`, link: cat.link, description: `中国银保监会-${cat.title}`, item: dataLs, language: 'zh-CN', - }); -}; + }; +} diff --git a/lib/routes/cbirc/maintainer.ts b/lib/routes/cbirc/maintainer.ts deleted file mode 100644 index 83f07dc78..000000000 --- a/lib/routes/cbirc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['JkCheung'], -}; diff --git a/lib/routes/cbirc/namespace.ts b/lib/routes/cbirc/namespace.ts new file mode 100644 index 000000000..3ccd49048 --- /dev/null +++ b/lib/routes/cbirc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国银行保险监督管理委员会', + url: 'cbirc.gov.cn', +}; diff --git a/lib/routes/cbirc/radar.ts b/lib/routes/cbirc/radar.ts deleted file mode 100644 index 7a549ded4..000000000 --- a/lib/routes/cbirc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cbirc.gov.cn': { - _name: '中国银行保险监督管理委员会', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-yin-xing-bao-xian-jian-du-guan-li-wei-yuan-hui', - source: ['/:category', '/'], - target: '/cbirc/:category?', - }, - ], - }, -}; diff --git a/lib/routes/cbirc/router.ts b/lib/routes/cbirc/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/cbirc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/cbnweek/index.ts b/lib/routes/cbnweek/index.ts index 40df892fe..bed85c5a8 100644 --- a/lib/routes/cbnweek/index.ts +++ b/lib/routes/cbnweek/index.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['cbnweek.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'cbnweek.com/', +}; + +async function handler() { const rootUrl = 'https://www2021.cbnweek.com'; const apiRootUrl = 'https://api2021.cbnweek.com'; const currentUrl = `${apiRootUrl}/v4/first_page_infos?per=1`; @@ -39,9 +52,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '第一财经杂志', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cbnweek/maintainer.ts b/lib/routes/cbnweek/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/cbnweek/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/cbnweek/namespace.ts b/lib/routes/cbnweek/namespace.ts new file mode 100644 index 000000000..d122276f6 --- /dev/null +++ b/lib/routes/cbnweek/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '第一财经杂志', + url: 'cbnweek.com', +}; diff --git a/lib/routes/cbnweek/radar.ts b/lib/routes/cbnweek/radar.ts deleted file mode 100644 index 5069ff4f4..000000000 --- a/lib/routes/cbnweek/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cbnweek.com': { - _name: '第一财经杂志', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/finance#di-yi-cai-jing-za-zhi-shou-ye', - source: ['/'], - target: '/cbnweek', - }, - ], - }, -}; diff --git a/lib/routes/cbnweek/router.ts b/lib/routes/cbnweek/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/cbnweek/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/ccac/maintainer.ts b/lib/routes/ccac/maintainer.ts deleted file mode 100644 index 6c7f197bd..000000000 --- a/lib/routes/ccac/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type/:lang?': ['linbuxiao'], -}; diff --git a/lib/routes/ccac/namespace.ts b/lib/routes/ccac/namespace.ts new file mode 100644 index 000000000..c66abae1f --- /dev/null +++ b/lib/routes/ccac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Macau Independent Commission Against Corruption 澳门廉政公署', + url: 'ccac.org.mo', +}; diff --git a/lib/routes/ccac/news.ts b/lib/routes/ccac/news.ts index 51d1d9aca..dcb5ad243 100644 --- a/lib/routes/ccac/news.ts +++ b/lib/routes/ccac/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,30 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type/:lang?', + categories: ['government'], + example: '/ccac/news/all', + parameters: { type: 'Category', lang: 'Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese), `tc`(Traditional Chinese) and `pt`(Portuguese)' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Latest News', + maintainers: ['linbuxiao'], + handler, + description: `Category + + | All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates | + | --- | -------------- | ---------------------------------------- | -------------- | -------------- | + | all | case | Persuasion | AnnualReport | PCANews |`, +}; + +async function handler(ctx) { const browser = await puppeteer(); const lang = ctx.req.param('lang') ?? 'sc'; const type = utils.TYPE[ctx.req.param('type')]; @@ -48,11 +72,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `CCAC ${type}`, link: BASE, description: `CCAC ${type}`, language: ctx.req.param('lang') ? utils.LANG_TYPE[ctx.req.param('lang')] : utils.LANG_TYPE.sc, item: items, - }); -}; + }; +} diff --git a/lib/routes/ccac/radar.ts b/lib/routes/ccac/radar.ts deleted file mode 100644 index 5e01799f7..000000000 --- a/lib/routes/ccac/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ccac.org.mo': { - _name: '澳门廉政公署', - '.': [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/government#ao-men-lian-zheng-gong-shu', - source: ['/:lang/news.html'], - target: '/ccac/news/all/:lang', - }, - ], - }, -}; diff --git a/lib/routes/ccac/router.ts b/lib/routes/ccac/router.ts deleted file mode 100644 index 3ffecf2b1..000000000 --- a/lib/routes/ccac/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type/:lang?', './news'); -}; diff --git a/lib/routes/ccf/ccfcv/index.ts b/lib/routes/ccf/ccfcv/index.ts index e37762b02..3b49d94f5 100644 --- a/lib/routes/ccf/ccfcv/index.ts +++ b/lib/routes/ccf/ccfcv/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -18,7 +19,28 @@ const cateTitleMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/ccfcv/:channel/:category', + categories: ['study'], + example: '/ccf/ccfcv/xsdt/xsqy', + parameters: { channel: '频道,仅支持 `xsdt`', category: '分类,见下表,亦可在网站 url 里找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机视觉专委会 - 学术动态 - 分类', + maintainers: ['elxy'], + handler, + description: `| 学术前沿 | 热点征文 | 学术会议 | + | -------- | -------- | -------- | + | xsqy | rdzw | xshy |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const cate = ctx.req.param('category'); @@ -64,9 +86,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `计算机视觉专委 - ${cateTitleMap[channel][cate]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/ccf/maintainer.ts b/lib/routes/ccf/maintainer.ts deleted file mode 100644 index fbda0a2f0..000000000 --- a/lib/routes/ccf/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/ccfcv/:channel/:category': ['elxy'], - '/news/:category?': ['nczitzk'], - '/tfbd/:caty/:id': ['tudou027'], -}; diff --git a/lib/routes/ccf/namespace.ts b/lib/routes/ccf/namespace.ts new file mode 100644 index 000000000..7bc634422 --- /dev/null +++ b/lib/routes/ccf/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国计算机学会', + url: 'ccf.org.cn', +}; diff --git a/lib/routes/ccf/news.ts b/lib/routes/ccf/news.ts index 0596db897..715d99693 100644 --- a/lib/routes/ccf/news.ts +++ b/lib/routes/ccf/news.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['study'], + example: '/ccf/news', + parameters: { category: '分类,见下表,默认为 CCF 新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ccf.org.cn/:category', 'ccf.org.cn/'], + target: '/news/:category', + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + description: `| CCF 新闻 | CCF 聚焦 | ACM 信息 | + | ----------- | -------- | --------- | + | Media\_list | Focus | ACM\_News |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || 'Media_list'; const rootUrl = 'https://www.ccf.org.cn'; @@ -38,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ccf/radar.ts b/lib/routes/ccf/radar.ts deleted file mode 100644 index 5af8909b8..000000000 --- a/lib/routes/ccf/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'ccf.org.cn': { - _name: '中国计算机学会', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-suan-ji-xue-hui', - source: ['/:category', '/'], - target: '/ccf/news/:category', - }, - ], - ccfcv: [ - { - title: '计算机视觉专委会 - 学术动态 - 学术前沿', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-suan-ji-xue-hui', - source: ['/ccfcv/xsdt/xsqy/'], - target: '/ccf/ccfcv/xsdt/xsqy', - }, - { - title: '计算机视觉专委会 - 学术动态 - 热点征文', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-suan-ji-xue-hui', - source: ['/ccfcv/xsdt/rdzw/'], - target: '/ccf/ccfcv/xsdt/rdzw', - }, - { - title: '计算机视觉专委会 - 学术动态 - 学术会议', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-suan-ji-xue-hui', - source: ['/ccfcv/xsdt/xshy/'], - target: '/ccf/ccfcv/xsdt/xshy', - }, - ], - tfbd: [ - { - title: '大数据专家委员会', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-suan-ji-xue-hui', - source: ['/tfbd/:caty/:id', '/'], - target: '/ccf/tfbd/:caty/:id', - }, - ], - }, -}; diff --git a/lib/routes/ccf/router.ts b/lib/routes/ccf/router.ts deleted file mode 100644 index 44c8b249e..000000000 --- a/lib/routes/ccf/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/ccfcv/:channel/:category', './ccfcv/index'); - router.get('/news/:category?', './news'); - router.get('/tfbd/:caty/:id', './tfbd/index'); -}; diff --git a/lib/routes/ccf/tfbd/index.ts b/lib/routes/ccf/tfbd/index.ts index 66f2005ae..01595881d 100644 --- a/lib/routes/ccf/tfbd/index.ts +++ b/lib/routes/ccf/tfbd/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/tfbd/:caty/:id', + categories: ['study'], + example: '/ccf/tfbd/xwdt/tzgg', + parameters: { caty: '主分类,可在 URL 找到', id: '子分类,可在 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tfbd.ccf.org.cn/tfbd/:caty/:id', 'tfbd.ccf.org.cn/'], + }, + name: '大数据专家委员会', + maintainers: ['tudou027'], + handler, +}; + +async function handler(ctx) { const base = utils.urlBase(ctx.req.param('caty'), ctx.req.param('id')); const res = await got(base); const info = utils.fetchAllArticles(res.data); @@ -15,9 +37,9 @@ export default async (ctx) => { info, }); - ctx.set('data', { + return { title: '大数据专家委员会 - ' + $('.position a:last-child').text(), link: base, item: details, - }); -}; + }; +} diff --git a/lib/routes/ccnu/career.ts b/lib/routes/ccnu/career.ts index 24094a74a..f65fa5187 100644 --- a/lib/routes/ccnu/career.ts +++ b/lib/routes/ccnu/career.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/career', + categories: ['university'], + example: '/ccnu/career', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ccnu.91wllm.com/news/index/tag/tzgg', 'ccnu.91wllm.com/'], + }, + name: '就业信息', + maintainers: ['jackyu1996'], + handler, + url: 'ccnu.91wllm.com/news/index/tag/tzgg', +}; + +async function handler() { const host = 'https://ccnu.91wllm.com'; const link = `${host}/news/index/tag/tzgg`; @@ -23,9 +46,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '华中师范大学就业信息', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/ccnu/cs.ts b/lib/routes/ccnu/cs.ts index b83167dc0..82c840a11 100644 --- a/lib/routes/ccnu/cs.ts +++ b/lib/routes/ccnu/cs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cs', + categories: ['university'], + example: '/ccnu/cs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cs.ccnu.edu.cn/xwzx/tzgg.htm', 'cs.ccnu.edu.cn/'], + }, + name: '计算机学院', + maintainers: ['shengmaosu'], + handler, + url: 'cs.ccnu.edu.cn/xwzx/tzgg.htm', +}; + +async function handler() { const link = 'http://cs.ccnu.edu.cn/xwzx/tzgg.htm'; const response = await got(link); const $ = load(response.data); const list = $('.list_box_07 li'); - ctx.set('data', { + return { title: '华中师范大学计算机学院', link, description: '华中师范大学计算机学院通知公告', @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('.time').text(), 'DDYYYY-MM'), }; }), - }); -}; + }; +} diff --git a/lib/routes/ccnu/maintainer.ts b/lib/routes/ccnu/maintainer.ts deleted file mode 100644 index 670b88c0b..000000000 --- a/lib/routes/ccnu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/career': ['jackyu1996'], - '/cs': ['shengmaosu'], - '/wu': ['shengmaosu'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/ccnu/namespace.ts b/lib/routes/ccnu/namespace.ts new file mode 100644 index 000000000..dd46468ac --- /dev/null +++ b/lib/routes/ccnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华中师范大学', + url: 'ccnu.91wllm.com', +}; diff --git a/lib/routes/ccnu/radar.ts b/lib/routes/ccnu/radar.ts deleted file mode 100644 index 56c319e8e..000000000 --- a/lib/routes/ccnu/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - '91wllm.com': { - _name: '湖北高校就业网络联盟', - ccnu: [ - { - title: '华中师范大学就业信息', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-shi-fan-da-xue', - source: ['/news/index/tag/tzgg', '/'], - target: '/ccnu/career', - }, - ], - }, - 'ccnu.edu.cn': { - _name: '华中师范大学', - cs: [ - { - title: '计算机学院', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-shi-fan-da-xue', - source: ['/xwzx/tzgg.htm', '/'], - target: '/ccnu/cs', - }, - ], - gs: [ - { - title: '研究生通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-shi-fan-da-xue', - source: ['/zsgz/ssyjs.htm', '/'], - target: '/ccnu/yjs', - }, - ], - uowji: [ - { - title: '伍论贡学院', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-shi-fan-da-xue', - source: ['/xwzx/tzgg.htm', '/'], - target: '/ccnu/wu', - }, - ], - }, -}; diff --git a/lib/routes/ccnu/router.ts b/lib/routes/ccnu/router.ts deleted file mode 100644 index 716467baf..000000000 --- a/lib/routes/ccnu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/career', './career'); - router.get('/cs', './cs'); - router.get('/wu', './wu'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/ccnu/wu.ts b/lib/routes/ccnu/wu.ts index b7b9c985e..dc0bc98ec 100644 --- a/lib/routes/ccnu/wu.ts +++ b/lib/routes/ccnu/wu.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/wu', + categories: ['university'], + example: '/ccnu/wu', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['uowji.ccnu.edu.cn/xwzx/tzgg.htm', 'uowji.ccnu.edu.cn/'], + }, + name: '伍论贡学院', + maintainers: ['shengmaosu'], + handler, + url: 'uowji.ccnu.edu.cn/xwzx/tzgg.htm', +}; + +async function handler() { const link = 'http://uowji.ccnu.edu.cn/tzgg.htm'; const response = await got(link); const $ = load(response.data); const list = $('.zy-mainxrx li'); - ctx.set('data', { + return { title: '华中师范大学伍论贡学院', link, description: '华中师范大学伍论贡学院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('small').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/ccnu/yjs.ts b/lib/routes/ccnu/yjs.ts index 7e157f671..7d2a4b93f 100644 --- a/lib/routes/ccnu/yjs.ts +++ b/lib/routes/ccnu/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/ccnu/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.ccnu.edu.cn/zsgz/ssyjs.htm', 'gs.ccnu.edu.cn/'], + }, + name: '研究生通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'gs.ccnu.edu.cn/zsgz/ssyjs.htm', +}; + +async function handler() { const link = 'http://gs.ccnu.edu.cn/zsgz/ssyjs.htm'; const response = await got(link); const $ = load(response.data); const list = $('.main-zyrx li'); - ctx.set('data', { + return { title: '华中师范大学研究生院', link, description: '华中师范大学研究生院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('small').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/ccreports/index.ts b/lib/routes/ccreports/index.ts index 9b78e725a..2879befac 100644 --- a/lib/routes/ccreports/index.ts +++ b/lib/routes/ccreports/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import timezone from '@/utils/timezone'; const rootUrl = 'https://www.ccreports.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/article', + categories: ['shopping'], + example: '/ccreports/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ccreports.com.cn/'], + }, + name: '要闻', + maintainers: ['EsuRt', 'Fatpandac'], + handler, + url: 'www.ccreports.com.cn/', +}; + +async function handler() { const listData = await got.get(rootUrl); const $ = load(listData.data); const list = $('div.index-four-content > div.article-box') @@ -34,9 +57,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '消费者报道', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ccreports/maintainer.ts b/lib/routes/ccreports/maintainer.ts deleted file mode 100644 index 402a2e0c4..000000000 --- a/lib/routes/ccreports/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/article': ['EsuRt', 'Fatpandac'], -}; diff --git a/lib/routes/ccreports/namespace.ts b/lib/routes/ccreports/namespace.ts new file mode 100644 index 000000000..309fd8cbe --- /dev/null +++ b/lib/routes/ccreports/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '消费者报道', + url: 'www.ccreports.com.cn', +}; diff --git a/lib/routes/ccreports/radar.ts b/lib/routes/ccreports/radar.ts deleted file mode 100644 index de75ba6c2..000000000 --- a/lib/routes/ccreports/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ccreports.com.cn': { - _name: '消费者报道', - www: [ - { - title: '要闻', - docs: 'https://docs.rsshub.app/routes/shopping#xiao-fei-zhe-bao-dao-yao-wen', - source: ['/'], - target: '/ccreports/article', - }, - ], - }, -}; diff --git a/lib/routes/ccreports/router.ts b/lib/routes/ccreports/router.ts deleted file mode 100644 index bb216cc98..000000000 --- a/lib/routes/ccreports/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/article', './index'); -}; diff --git a/lib/routes/cctv/category.ts b/lib/routes/cctv/category.ts index d0f4501a4..e10f5e065 100644 --- a/lib/routes/cctv/category.ts +++ b/lib/routes/cctv/category.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import getMzzlbg from './utils/mzzlbg'; import xinwen1j1 from './utils/xinwen1j1'; import getNews from './utils/news'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + categories: ['traditional-media'], + example: '/cctv/world', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.cctv.com/:category'], + }, + name: '专题', + maintainers: ['idealclover', 'xyqfer'], + handler, + description: `| 新闻 | 国内 | 国际 | 社会 | 法治 | 文娱 | 科技 | 生活 | 教育 | 每周质量报告 | 新闻 1+1 | + | ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- | + | news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); let responseData; @@ -18,4 +43,4 @@ export default async (ctx) => { } ctx.set('data', responseData); -}; +} diff --git a/lib/routes/cctv/jx.ts b/lib/routes/cctv/jx.ts index 40b899d0d..a384a98f5 100644 --- a/lib/routes/cctv/jx.ts +++ b/lib/routes/cctv/jx.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/photo/jx', + categories: ['traditional-media'], + example: '/cctv/photo/jx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['photo.cctv.com/jx', 'photo.cctv.com/'], + }, + name: '央视网图片《镜象》', + maintainers: ['nczitzk'], + handler, + url: 'photo.cctv.com/jx', +}; + +async function handler(ctx) { const rootUrl = 'https://photo.cctv.com'; const currentUrl = `${rootUrl}/jx/`; const response = await got({ @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '央视网图片《镜象》', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cctv/lm.ts b/lib/routes/cctv/lm.ts index 4a7def778..346b8b08b 100644 --- a/lib/routes/cctv/lm.ts +++ b/lib/routes/cctv/lm.ts @@ -1,10 +1,44 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/lm/:id?', + categories: ['traditional-media'], + example: '/cctv/lm/xwzk', + parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,默认为 `xwzk` 即 新闻周刊' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.cctv.com/:category'], + target: '/:category', + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 焦点访谈 | 等着我 | 今日说法 | 开讲啦 | + | -------- | ------ | -------- | ------ | + | jdft | dzw | jrsf | kjl | + + | 正大综艺 | 经济半小时 | 第一动画乐园 | + | -------- | ---------- | ------------ | + | zdzy | jjbxs | dydhly | + + :::tip + 更多栏目请看 [这里](https://tv.cctv.com/lm) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'xwzk'; const rootUrl = 'https://tv.cctv.com'; @@ -69,10 +103,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, description: $('meta[name=description]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/cctv/maintainer.ts b/lib/routes/cctv/maintainer.ts deleted file mode 100644 index c49704b10..000000000 --- a/lib/routes/cctv/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/lm/:id?': ['nczitzk'], - '/photo/jx': ['nczitzk'], - '/xwlb': ['zengxs'], - '/:category': ['idealclover', 'xyqfer'], -}; diff --git a/lib/routes/cctv/namespace.ts b/lib/routes/cctv/namespace.ts new file mode 100644 index 000000000..766fb0b88 --- /dev/null +++ b/lib/routes/cctv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '央视新闻', + url: 'news.cctv.com', +}; diff --git a/lib/routes/cctv/radar.ts b/lib/routes/cctv/radar.ts deleted file mode 100644 index cc39b38e6..000000000 --- a/lib/routes/cctv/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'cctv.com': { - _name: '央视新闻', - news: [ - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/traditional-media#yang-shi-xin-wen', - source: ['/:category'], - target: '/cctv/:category', - }, - ], - photo: [ - { - title: '央视网图片《镜象》', - docs: 'https://docs.rsshub.app/routes/traditional-media#yang-shi-xin-wen', - source: ['/jx', '/'], - target: '/cctv/photo/jx', - }, - ], - tv: [ - { - title: '新闻联播', - docs: 'https://docs.rsshub.app/routes/traditional-media#yang-shi-xin-wen', - source: ['/lm/xwlb', '/'], - target: '/cctv/xwlb', - }, - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#yang-shi-xin-wen', - source: ['/lm/*path', '/'], - target: (params) => `/cctv/lm/${params.path.replace('/videoset', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/cctv/router.ts b/lib/routes/cctv/router.ts deleted file mode 100644 index 02536979d..000000000 --- a/lib/routes/cctv/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/lm/:id?', './lm'); - router.get('/photo/jx', './jx'); - router.get('/xwlb', './xwlb'); - router.get('/:category', './category'); -}; diff --git a/lib/routes/cctv/xwlb.ts b/lib/routes/cctv/xwlb.ts index ef2c24f8b..33a9afe19 100644 --- a/lib/routes/cctv/xwlb.ts +++ b/lib/routes/cctv/xwlb.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,30 @@ import dayjs from 'dayjs'; import customParseFormat from 'dayjs/plugin/customParseFormat'; dayjs.extend(customParseFormat); -export default async (ctx) => { +export const route: Route = { + path: '/xwlb', + categories: ['traditional-media'], + example: '/cctv/xwlb', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tv.cctv.com/lm/xwlb', 'tv.cctv.com/'], + }, + name: '新闻联播', + maintainers: ['zengxs'], + handler, + url: 'tv.cctv.com/lm/xwlb', + description: `新闻联播内容摘要。`, +}; + +async function handler() { const res = await got({ method: 'get', url: 'https://tv.cctv.com/lm/xwlb/' }); const $ = load(res.data); // 解析最新一期新闻联播的日期 @@ -43,9 +67,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'CCTV 新闻联播', link: 'http://tv.cctv.com/lm/xwlb/', item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/cde/index.ts b/lib/routes/cde/index.ts index 3876e583a..a3589cf49 100644 --- a/lib/routes/cde/index.ts +++ b/lib/routes/cde/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import got from '@/utils/got'; @@ -75,7 +76,40 @@ const requestData = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:channel/:category', + categories: ['government'], + example: '/cde/news/gzdt', + parameters: { channel: '频道', category: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['Fatpandac'], + handler, + description: `- 频道 + + | 新闻中心 | 政策法规 | + | :------: | :------: | + | news | policy | + + - 类别 + + | 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 | + | :------: | :------: | :------: | :------: | :------: | + | | zwxw | ywdd | tpxw | gzdt | + + | 政策法规 | 法律法规 | 中心规章 | + | :------: | :------: | :------: | + | | flfg | zxgz |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const cate = ctx.req.param('category'); requestData[channel][cate].pageSize = ctx.req.param('limit') ?? 25; @@ -125,9 +159,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${utils.title} - ${cateTitleMap[channel][cate]}`, link: channelLinkMap[channel], item: items, - }); -}; + }; +} diff --git a/lib/routes/cde/maintainer.ts b/lib/routes/cde/maintainer.ts deleted file mode 100644 index dbce5ae97..000000000 --- a/lib/routes/cde/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/xxgk/:category': ['TonyRL'], - '/zdyz/:category': ['TonyRL'], - '/:channel/:category': ['Fatpandac'], -}; diff --git a/lib/routes/cde/namespace.ts b/lib/routes/cde/namespace.ts new file mode 100644 index 000000000..24497b5e7 --- /dev/null +++ b/lib/routes/cde/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家药品审评网站', + url: 'www.cde.org.cn', +}; diff --git a/lib/routes/cde/radar.ts b/lib/routes/cde/radar.ts deleted file mode 100644 index 1866146cf..000000000 --- a/lib/routes/cde/radar.ts +++ /dev/null @@ -1,73 +0,0 @@ -export default { - 'cde.org.cn': { - _name: '国家药品监督管理局药品审评中心', - www: [ - { - title: '政务新闻', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/news/listpage/545cf855a50574699b46b26bcb165f32'], - target: '/cde/news/zwxw', - }, - { - title: '要闻导读', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/news/listpage/1e0a362d64015ebcbf32d6949acbba11'], - target: '/cde/news/ywdd', - }, - { - title: '图片新闻', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/news/listpage/4b49e3142441860ac6a48c888a54712a'], - target: '/cde/news/tpxw', - }, - { - title: '工作动态', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/news/listpage/3cc45b396497b598341ce3af000490e5'], - target: '/cde/news/gzdt', - }, - { - title: '法律法规', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/policy/listpage/9f9c74c73e0f8f56a8bfbc646055026d'], - target: '/cde/policy/flfg', - }, - { - title: '中心规章', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/policy/listpage/369ac7cfeb67c6000c33f85e6f374044'], - target: '/cde/policy/zxgz', - }, - { - title: '优先审评公示 - 信息公开', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/xxgk/listpage/2f78f372d351c6851af7431c7710a731'], - target: '/cde/xxgf/priorityApproval', - }, - { - title: '突破性治疗公示 - 信息公开', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/xxgk/listpage/da6efd086c099b7fc949121166f0130c'], - target: '/cde/xxgf/breakthroughCure', - }, - { - title: '临床试验默示许可 - 信息公开', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/xxgk/listpage/4b5255eb0a84820cef4ca3e8b6bbe20c'], - target: '/cde/xxgf/cliniCal', - }, - { - title: '发布通告 - 指导原则专栏', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/xxgk/listpage/2853510d929253719601db17b8a9fd81'], - target: '/cde/zdyz/domesticGuide', - }, - { - title: '征求意见 - 指导原则专栏', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye', - source: ['/main/xxgk/listpage/3c49fad55caad7a034c263cfc2b6eb9c'], - target: '/cde/zdyz/opinionList', - }, - ], - }, -}; diff --git a/lib/routes/cde/router.ts b/lib/routes/cde/router.ts deleted file mode 100644 index 34a9ddf8c..000000000 --- a/lib/routes/cde/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/xxgk/:category', './xxgk'); - router.get('/zdyz/:category', './zdyz'); - router.get('/:channel/:category', './index'); -}; diff --git a/lib/routes/cde/xxgk.ts b/lib/routes/cde/xxgk.ts index 746d0c97d..eba4a526c 100644 --- a/lib/routes/cde/xxgk.ts +++ b/lib/routes/cde/xxgk.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -49,7 +50,28 @@ const xxgkMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/xxgk/:category', + categories: ['government'], + example: '/cde/xxgk/priorityApproval', + parameters: { category: '类别,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '信息公开', + maintainers: ['TonyRL'], + handler, + description: `| 优先审评公示 | 突破性治疗公示 | 临床试验默示许可 | + | :--------------: | :--------------: | :--------------: | + | priorityApproval | breakthroughCure | cliniCal |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const { data } = await got.post(`${baseUrl}/main${xxgkMap.xxgk[category].endPoint}`, { @@ -68,9 +90,9 @@ export default async (ctx) => { link: xxgkMap.xxgk[category].url, })); - ctx.set('data', { + return { title: `${xxgkMap.xxgk[category].title} - 国家药品监督管理局药品审评中心`, link: xxgkMap.xxgk[category].url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cde/zdyz.ts b/lib/routes/cde/zdyz.ts index f37a63a79..e928bb177 100644 --- a/lib/routes/cde/zdyz.ts +++ b/lib/routes/cde/zdyz.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -37,7 +38,28 @@ const zdyzMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/zdyz/:category', + categories: ['government'], + example: '/cde/zdyz/domesticGuide', + parameters: { category: '类别,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '指导原则专栏', + maintainers: ['TonyRL'], + handler, + description: `| 发布通告 | 征求意见 | + | :-----------: | :---------: | + | domesticGuide | opinionList |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const { data } = await got.post(`${baseUrl}${zdyzMap.zdyz[category].endPoint}`, { @@ -70,9 +92,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${zdyzMap.zdyz[category].title} - 国家药品监督管理局药品审评中心`, link: zdyzMap.zdyz[category].url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cdi/index.ts b/lib/routes/cdi/index.ts index 0aa30aece..9f4e082bd 100644 --- a/lib/routes/cdi/index.ts +++ b/lib/routes/cdi/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['new-media'], + example: '/cdi', + parameters: { id: '分类,见下表,默认为综研国策' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 樊纲观点 | 综研国策 | 综研观察 | 综研专访 | 综研视点 | 银湖新能源 | + | -------- | -------- | -------- | -------- | -------- | ---------- | + | 102 | 152 | 150 | 153 | 154 | 151 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '152'; const rootUrl = 'http://www.cdi.com.cn'; @@ -54,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('h1').text()} - 国家高端智库/综合开发研究院`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cdi/maintainer.ts b/lib/routes/cdi/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/cdi/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cdi/namespace.ts b/lib/routes/cdi/namespace.ts new file mode 100644 index 000000000..f976a667f --- /dev/null +++ b/lib/routes/cdi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家高端智库 / 综合开发研究院', + url: 'cdi.com.cn', +}; diff --git a/lib/routes/cdi/radar.ts b/lib/routes/cdi/radar.ts deleted file mode 100644 index cd61691c1..000000000 --- a/lib/routes/cdi/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cdi.com.cn': { - _name: '国家高端智库 / 综合开发研究院', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#guo-jia-gao-duan-zhi-ku-zong-he-kai-fa-yan-jiu-yuan', - source: ['/Article/List', '/'], - target: (params, url) => `/cdi/${new URL(url).searchParams.get('ColumnId')}`, - }, - ], - }, -}; diff --git a/lib/routes/cdi/router.ts b/lib/routes/cdi/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/cdi/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/cdzjryb/maintainer.ts b/lib/routes/cdzjryb/maintainer.ts deleted file mode 100644 index 4988d7838..000000000 --- a/lib/routes/cdzjryb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/zw/projectList': ['TonyRL'], -}; diff --git a/lib/routes/cdzjryb/namespace.ts b/lib/routes/cdzjryb/namespace.ts new file mode 100644 index 000000000..26c405bc0 --- /dev/null +++ b/lib/routes/cdzjryb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '成都住建蓉 e 办', + url: 'zw.cdzjryb.com', +}; diff --git a/lib/routes/cdzjryb/project-list.ts b/lib/routes/cdzjryb/project-list.ts index 418ca727a..2d5a805f9 100644 --- a/lib/routes/cdzjryb/project-list.ts +++ b/lib/routes/cdzjryb/project-list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/zw/projectList', + categories: ['other'], + example: '/cdzjryb/zw/projectList', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zw.cdzjryb.com/lottery/accept/projectList', 'zw.cdzjryb.com/'], + }, + name: '商品住房购房登记', + maintainers: ['TonyRL'], + handler, + url: 'zw.cdzjryb.com/lottery/accept/projectList', +}; + +async function handler() { const url = 'https://zw.cdzjryb.com/lottery/accept/projectList'; const { data: response } = await got(url); const $ = load(response); @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cdzjryb/radar.ts b/lib/routes/cdzjryb/radar.ts deleted file mode 100644 index 3d6de5769..000000000 --- a/lib/routes/cdzjryb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cdzjryb.com': { - _name: '成都住建蓉 e 办', - zw: [ - { - title: '商品住房购房登记', - docs: 'https://docs.rsshub.app/routes/other#cheng-dou-zhu-jian-rong-e-ban', - source: ['/lottery/accept/projectList', '/'], - target: '/cdzjryb/zw/projectList', - }, - ], - }, -}; diff --git a/lib/routes/cdzjryb/router.ts b/lib/routes/cdzjryb/router.ts deleted file mode 100644 index bc350ff95..000000000 --- a/lib/routes/cdzjryb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/zw/projectList', './project-list'); -}; diff --git a/lib/routes/cebbank/all.ts b/lib/routes/cebbank/all.ts index 79ebfeb37..d3f5338d0 100644 --- a/lib/routes/cebbank/all.ts +++ b/lib/routes/cebbank/all.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/quotation/all', + categories: ['other'], + example: '/cebbank/quotation/all', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cebbank.com/site/ygzx/whpj/index.html', 'cebbank.com/eportal/ui', 'cebbank.com/'], + }, + name: 'Unknown', + maintainers: ['linbuxiao'], + handler, + url: 'cebbank.com/site/ygzx/whpj/index.html', +}; + +async function handler(ctx) { const link = 'https://www.cebbank.com/eportal/ui?pageId=477257'; const content = await got({ method: 'get', @@ -38,12 +61,12 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '中国光大银行', description: '中国光大银行 外汇牌价', link, item: items, - }); + }; ctx.set('json', { title: '中国光大银行', @@ -51,4 +74,4 @@ export default async (ctx) => { pubDate: timezone(parseDate($('#t_id span').text().substring(5), 'YYYY-MM-DD HH:mm', true), 0), item: items, }); -}; +} diff --git a/lib/routes/cebbank/history.ts b/lib/routes/cebbank/history.ts index d35724f1a..36443fe2f 100644 --- a/lib/routes/cebbank/history.ts +++ b/lib/routes/cebbank/history.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,33 @@ import utils from './utils'; const { TYPE } = utils; -export default async (ctx) => { +export const route: Route = { + path: '/quotation/history/:type', + categories: ['other'], + example: '/cebbank/quotation/history/usd', + parameters: { type: '货币的缩写,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '外汇牌价', + maintainers: ['linbuxiao'], + handler, + description: `#### 总览 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-zong-lan} + + +#### 历史牌价 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-li-shi-pai-jia} + + | 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 | + | ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- | + | usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `https://www.cebbank.com/eportal/ui?struts.portlet.action=/portlet/whpjFront!toView.action&moduleId=12094&pageId=477260&currcode=${TYPE[type].id}¤tPagebak=1¤tPage=1`; const res = await got({ @@ -38,16 +65,16 @@ export default async (ctx) => { }) .get(); items.pop(); - ctx.set('data', { + return { title: '中国光大银行', description: `中国光大银行 外汇牌价 ${TYPE[type].name}`, link: `https://www.cebbank.com/site/ygzx/whpj/rmbwhpjlspj/index.html?currcode=${TYPE[type].id}`, item: items, - }); + }; ctx.set('json', { title: '中国光大银行', description: `中国光大银行 外汇牌价 ${TYPE[type].name}`, item: items, }); -}; +} diff --git a/lib/routes/cebbank/maintainer.ts b/lib/routes/cebbank/maintainer.ts deleted file mode 100644 index 6bad5ed05..000000000 --- a/lib/routes/cebbank/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/quotation/all': ['linbuxiao'], - '/quotation/history/:type': ['linbuxiao'], -}; diff --git a/lib/routes/cebbank/namespace.ts b/lib/routes/cebbank/namespace.ts new file mode 100644 index 000000000..2bafdede7 --- /dev/null +++ b/lib/routes/cebbank/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国光大银行', + url: 'cebbank.com', +}; diff --git a/lib/routes/cebbank/radar.ts b/lib/routes/cebbank/radar.ts deleted file mode 100644 index 89415590e..000000000 --- a/lib/routes/cebbank/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cebbank.com': { - _name: '中国光大银行', - '.': [ - { - title: '外汇牌价 - 牌价总览', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guang-da-yin-hang', - source: ['/site/ygzx/whpj/index.html', '/eportal/ui', '/'], - target: '/cebbank/quotation/all', - }, - { - title: '外汇牌价 - 历史记录', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guang-da-yin-hang', - source: ['/site/ygzx/whpj/rmbwhpjlspj/index.html'], - target: (_, url) => `/cebbank/quotation/history/${new URL(url).searchParams.get('currcode')}`, - }, - ], - }, -}; diff --git a/lib/routes/cebbank/router.ts b/lib/routes/cebbank/router.ts deleted file mode 100644 index 7640f0b48..000000000 --- a/lib/routes/cebbank/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/quotation/all', './all'); - router.get('/quotation/history/:type', './history'); -}; diff --git a/lib/routes/cfachina/analygarden.ts b/lib/routes/cfachina/analygarden.ts index d4c60d4a8..fa6ed9e1d 100644 --- a/lib/routes/cfachina/analygarden.ts +++ b/lib/routes/cfachina/analygarden.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/servicesupport/analygarden/:program?', + categories: ['other'], + example: '/cfachina/servicesupport/analygarden', + parameters: { program: '分类,见下表,留空为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cfachina.org/servicesupport/analygarden/:program?', 'cfachina.org/'], + }, + name: '分析师园地', + maintainers: ['TonyRL'], + handler, + description: `| 有色金属类 | 黑色金属类 | 能源化工类 | 贵金属类 | 农产品类 | 金融类 | 指数类 | + | ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ | + | ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl |`, +}; + +async function handler(ctx) { let { program = '分析师园地' } = ctx.req.param(); const baseUrl = 'https://www.cfachina.org'; let pageData, @@ -52,9 +77,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${pageData?.category.toReversed().join(' - ') ?? '分析师园地'} - 中国期货业协会`, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cfachina/maintainer.ts b/lib/routes/cfachina/maintainer.ts deleted file mode 100644 index 51f2034b8..000000000 --- a/lib/routes/cfachina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/servicesupport/analygarden/:program?': ['TonyRL'], -}; diff --git a/lib/routes/cfachina/namespace.ts b/lib/routes/cfachina/namespace.ts new file mode 100644 index 000000000..28aa653fc --- /dev/null +++ b/lib/routes/cfachina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国期货业协会', + url: 'cfachina.org', +}; diff --git a/lib/routes/cfachina/radar.ts b/lib/routes/cfachina/radar.ts deleted file mode 100644 index c9c525f0f..000000000 --- a/lib/routes/cfachina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cfachina.org': { - _name: '中国期货业协会', - '.': [ - { - title: '分析师园地', - docs: 'https://docs.rsshub.app/other#zhong-guo-qi-huo-ye-xie-hui', - source: ['/servicesupport/analygarden/:program?', '/'], - target: '/cfachina/servicesupport/analygarden/:program?', - }, - ], - }, -}; diff --git a/lib/routes/cfachina/router.ts b/lib/routes/cfachina/router.ts deleted file mode 100644 index 02608aeb7..000000000 --- a/lib/routes/cfachina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/servicesupport/analygarden/:program?', './analygarden'); -}; diff --git a/lib/routes/cfmmc/index.ts b/lib/routes/cfmmc/index.ts index 895f6dc12..974bb41cf 100644 --- a/lib/routes/cfmmc/index.ts +++ b/lib/routes/cfmmc/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { id = 'main/noticeannouncement/cfmmcnotice' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -59,7 +67,7 @@ export default async (ctx) => { const author = '中国期货市场监控中心'; const image = new URL($('a.logo img').prop('src'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${$('h3.SubPage_t3').text()}`, link: currentUrl, @@ -69,5 +77,5 @@ export default async (ctx) => { subtitle: $('meta[name="Keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/cfmmc/maintainer.ts b/lib/routes/cfmmc/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/cfmmc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cfmmc/namespace.ts b/lib/routes/cfmmc/namespace.ts new file mode 100644 index 000000000..b99decd30 --- /dev/null +++ b/lib/routes/cfmmc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国期货市场监控中心', + url: 'cfmmc.com', +}; diff --git a/lib/routes/cfmmc/radar.ts b/lib/routes/cfmmc/radar.ts deleted file mode 100644 index 2e5fcc199..000000000 --- a/lib/routes/cfmmc/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'cfmmc.com': { - _name: '中国期货市场监控中心', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin-lan-mu', - source: ['/:id*'], - target: (params) => { - const id = params.id.replace(/\/index\.shtml/, ''); - - return `/cfmmc${id ? `/${id}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/cfmmc/router.ts b/lib/routes/cfmmc/router.ts deleted file mode 100644 index 5250d55fc..000000000 --- a/lib/routes/cfmmc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id{.+}?', './'); -}; diff --git a/lib/routes/cgtn/maintainer.ts b/lib/routes/cgtn/maintainer.ts deleted file mode 100644 index e73a7d8d0..000000000 --- a/lib/routes/cgtn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/podcast/:category/:id': ['5upernova-heng'], -}; diff --git a/lib/routes/cgtn/namespace.ts b/lib/routes/cgtn/namespace.ts new file mode 100644 index 000000000..61c80e9b3 --- /dev/null +++ b/lib/routes/cgtn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国环球电视网', + url: 'cgtn.com', +}; diff --git a/lib/routes/cgtn/podcast.ts b/lib/routes/cgtn/podcast.ts index a425675ad..e44ef9b13 100644 --- a/lib/routes/cgtn/podcast.ts +++ b/lib/routes/cgtn/podcast.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -13,7 +14,30 @@ function combDate(date, time) { return timezone(parseDate(date + ' ' + time), +8); } -export default async (ctx) => { +export const route: Route = { + path: '/podcast/:category/:id', + categories: ['traditional-media'], + example: '/cgtn/podcast/ezfm/4', + parameters: { category: '类型名', id: '播客 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cgtn.com/podcast/column/:category/*/:id'], + }, + name: '播客', + maintainers: ['5upernova-heng'], + handler, + description: `> 类型名与播客 id 可以在播客对应的 URL 中找到 + > 如 URL \`https://radio.cgtn.com/podcast/column/ezfm/More-to-Read/4\` ,其 \`category\` 为 \`ezfm\` ,\`id\` 为 \`4\`,对应的订阅路由为 [\`/podcast/ezfm/4\`](https://rsshub.app/podcast/ezfm/4)`, +}; + +async function handler(ctx) { const { category, id } = ctx.req.param(); const categoryMap = { ezfm: 1, other: 5 }; const data = await getData(categoryMap[category], id); @@ -26,10 +50,10 @@ export default async (ctx) => { enclosure_url: item.mediaUrl, enclosure_type: 'audio/mpeg', })); - ctx.set('data', { + return { title: `中国环球电视网 CGTN Podcast - ${data.info}`, link: 'https://www.cgtn.com/radio/', item: items, description: String(data.info), - }); -}; + }; +} diff --git a/lib/routes/cgtn/radar.ts b/lib/routes/cgtn/radar.ts deleted file mode 100644 index f4c94130b..000000000 --- a/lib/routes/cgtn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cgtn.com': { - _name: '中国环球电视网 CGTN', - '.': [ - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-guo-huan-qiu-dian-shi-wang', - source: ['/podcast/column/:category/*/:id'], - target: '/cgtn/podcast/:category/:id', - }, - ], - }, -}; diff --git a/lib/routes/cgtn/router.ts b/lib/routes/cgtn/router.ts deleted file mode 100644 index e195634a9..000000000 --- a/lib/routes/cgtn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/podcast/:category/:id', './podcast.js'); -}; diff --git a/lib/routes/chaincatcher/home.ts b/lib/routes/chaincatcher/home.ts index 63b208a85..bc8f45e9d 100644 --- a/lib/routes/chaincatcher/home.ts +++ b/lib/routes/chaincatcher/home.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,19 @@ import * as path from 'node:path'; const rootUrl = 'https://www.chaincatcher.com'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['chaincatcher.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'chaincatcher.com/', +}; + +async function handler() { const { data } = await got.post(`${rootUrl}/api/article/lists`, { form: { page: 1, @@ -44,11 +57,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '链捕手ChainCatcher — 专业的区块链技术研究与资讯平台-Chain Catcher', description: '链捕手ChainCatcher为区块链技术爱好者与项目决策者提供NFT、Web3社交、DID、Layer2等专业的资讯与研究内容,Chain Catcher输出对Scroll、Sui、Aptos、ENS等项目的思考,拓宽读者对区块链与数字经济认知的边界。', image: `${rootUrl}/logo.png`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/chaincatcher/maintainer.ts b/lib/routes/chaincatcher/maintainer.ts deleted file mode 100644 index 2178b6d59..000000000 --- a/lib/routes/chaincatcher/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['TonyRL'], - '/news': ['TonyRL'], -}; diff --git a/lib/routes/chaincatcher/namespace.ts b/lib/routes/chaincatcher/namespace.ts new file mode 100644 index 000000000..e3c714a0f --- /dev/null +++ b/lib/routes/chaincatcher/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '链捕手 ChainCatcher', + url: 'chaincatcher.com', +}; diff --git a/lib/routes/chaincatcher/news.ts b/lib/routes/chaincatcher/news.ts index 497e358d0..70ab67ad8 100644 --- a/lib/routes/chaincatcher/news.ts +++ b/lib/routes/chaincatcher/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; const rootUrl = 'https://www.chaincatcher.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/chaincatcher/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chaincatcher.com/news', 'chaincatcher.com/'], + }, + name: '快讯', + maintainers: ['TonyRL'], + handler, + url: 'chaincatcher.com/news', +}; + +async function handler() { const { data } = await got.post(`${rootUrl}/index/content/lists`, { form: { page: 1, @@ -30,11 +53,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '最新资讯-ChainCatcher', description: '链捕手ChainCatcher为区块链技术爱好者与项目决策者提供NFT、Web3社交、DID、Layer2等专业的资讯与研究内容,Chain Catcher输出对Scroll、Sui、Aptos、ENS等项目的思考,拓宽读者对区块链与数字经济认知的边界。', image: `${rootUrl}/logo.png`, link: `${rootUrl}/news`, item: items, - }); -}; + }; +} diff --git a/lib/routes/chaincatcher/radar.ts b/lib/routes/chaincatcher/radar.ts deleted file mode 100644 index 375cbb83a..000000000 --- a/lib/routes/chaincatcher/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'chaincatcher.com': { - _name: '链捕手 ChainCatcher', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#lian-bu-shou-chaincatcher', - source: ['/'], - target: '/chaincatcher', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#lian-bu-shou-chaincatcher', - source: ['/news', '/'], - target: '/chaincatcher/news', - }, - ], - }, -}; diff --git a/lib/routes/chaincatcher/router.ts b/lib/routes/chaincatcher/router.ts deleted file mode 100644 index 85b714e7f..000000000 --- a/lib/routes/chaincatcher/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './home'); - router.get('/news', './news'); -}; diff --git a/lib/routes/changba/maintainer.ts b/lib/routes/changba/maintainer.ts deleted file mode 100644 index 3b0b56dec..000000000 --- a/lib/routes/changba/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/changba/:userid': ['xizeyoupan', 'kt286'], -}; diff --git a/lib/routes/changba/namespace.ts b/lib/routes/changba/namespace.ts new file mode 100644 index 000000000..44b2ca3e1 --- /dev/null +++ b/lib/routes/changba/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '唱吧', + url: 'changba.com', +}; diff --git a/lib/routes/changba/radar.ts b/lib/routes/changba/radar.ts deleted file mode 100644 index d3dd0c338..000000000 --- a/lib/routes/changba/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'changba.com': { - _name: '唱吧', - '.': [ - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#chang-ba', - source: ['/s/:userid'], - target: `/changba/:userid`, - }, - ], - }, -}; diff --git a/lib/routes/changba/router.ts b/lib/routes/changba/router.ts deleted file mode 100644 index ef34beada..000000000 --- a/lib/routes/changba/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:userid', './user'); -}; diff --git a/lib/routes/changba/user.ts b/lib/routes/changba/user.ts index b91e16a07..2aae8b48a 100644 --- a/lib/routes/changba/user.ts +++ b/lib/routes/changba/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1' }; -export default async (ctx) => { +export const route: Route = { + path: '/:userid', + categories: ['social-media'], + example: '/changba/skp6hhF59n48R-UpqO3izw', + parameters: { userid: '用户ID, 可在对应分享页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['changba.com/s/:userid'], + }, + name: '用户', + maintainers: [], + handler, +}; + +async function handler(ctx) { const userid = ctx.req.param('userid'); const url = `https://changba.com/wap/index.php?s=${userid}`; const response = await got({ @@ -76,7 +98,7 @@ export default async (ctx) => { items = items.filter(Boolean); - ctx.set('data', { + return { title: $('title').text(), link: url, description: $('meta[name="description"]').attr('content') || $('title').text(), @@ -84,5 +106,5 @@ export default async (ctx) => { image: authorimg, itunes_author: author, itunes_category: '唱吧', - }); -}; + }; +} diff --git a/lib/routes/chaoxing/maintainer.ts b/lib/routes/chaoxing/maintainer.ts deleted file mode 100644 index 1909acf14..000000000 --- a/lib/routes/chaoxing/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/qk/:id/:needContent?': ['nczitzk'], -}; diff --git a/lib/routes/chaoxing/namespace.ts b/lib/routes/chaoxing/namespace.ts new file mode 100644 index 000000000..e054c9f66 --- /dev/null +++ b/lib/routes/chaoxing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '超星', + url: 'chaoxing.com', +}; diff --git a/lib/routes/chaoxing/qk.ts b/lib/routes/chaoxing/qk.ts index 1db2db594..8b892ab22 100644 --- a/lib/routes/chaoxing/qk.ts +++ b/lib/routes/chaoxing/qk.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,38 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/qk/:id/:needContent?', + categories: ['reading'], + example: '/chaoxing/qk/6b5c39b3dd84352be512e29df0297437', + parameters: { id: '期刊 id,可在期刊页 URL 中找到', needContent: '需要获取文章全文,填写 true/yes 表示需要,默认需要' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '期刊', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 全部期刊可以在 [这里](http://qk.chaoxing.com/space/index) 找到,你也可以从 [学科分类](https://qikan.chaoxing.com/jourclassify) 和 [期刊导航](https://qikan.chaoxing.com/search/openmag) 中发现更多期刊。 + + 如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=\&mags=6b5c39b3dd84352be512e29df0297437\&isort=20\&from=space),其 URL 为 \`http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437\`。\`6b5c39b3dd84352be512e29df0297437\` 即为期刊 id,所得路由为 [\`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437\`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437) + ::: + + :::warning + 你可以设置参数 **需要获取文章全文** 为 \`true\` \`yes\` \`t\` \`y\` 等值(或者忽略这个参数),RSS 的条目会携带期刊中的 **文章全文**,而不仅仅是 **文章概要**。但因为发起访问请求过多会被该网站屏蔽,你可以将其关闭(设置该参数为 \`false\` \`no\` \`f\` \`n\` 等值),这将会大大减少请求次数从而更难触发网站的反爬机制。 + + 路由默认会获取 **30** 个条目。在路由后指定 \`?limit=<条目数量>\` 减少或增加单次获取条目数量,同样可以减少请求次数,如设置为一次获取 **10** 个条目,路由可以更改为 [\`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10\`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10) + + 在根据上文设置 **需要获取文章全文** 为不需要时,你可以将 \`limit\` 值增大,从而获取更多的条目,此时因为不获取全文也不会触发反爬机制,如 [\`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100\`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const needContent = /t|y/i.test(ctx.req.param('needContent') ?? 'true'); @@ -55,9 +87,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: response.data.list[0].infos.C307, link: `${rootUrl}/mqk/list?mags=${id}&isort=20&from=space`, item: items, - }); -}; + }; +} diff --git a/lib/routes/chaoxing/radar.ts b/lib/routes/chaoxing/radar.ts deleted file mode 100644 index 43a03bef5..000000000 --- a/lib/routes/chaoxing/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chaoxing.com': { - _name: '超星', - '.': [ - { - title: '期刊', - docs: 'https://docs.rsshub.app/routes/reading#chao-xing-qi-kan', - source: ['/'], - target: (params, url) => `/chaoxing/qk/${new URL(url).searchParams.get('mags')}`, - }, - ], - }, -}; diff --git a/lib/routes/chaoxing/router.ts b/lib/routes/chaoxing/router.ts deleted file mode 100644 index ff40be1bd..000000000 --- a/lib/routes/chaoxing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/qk/:id/:needContent?', './qk'); -}; diff --git a/lib/routes/chaping/banner.ts b/lib/routes/chaping/banner.ts index e8504ac87..121b726d5 100644 --- a/lib/routes/chaping/banner.ts +++ b/lib/routes/chaping/banner.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/banner', + categories: ['new-media'], + example: '/chaping/banner', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chaping.cn/'], + }, + name: '图片墙', + maintainers: ['nczitzk'], + handler, + url: 'chaping.cn/', +}; + +async function handler() { const rootUrl = `https://chaping.cn/`; const response = await got({ method: 'get', @@ -33,9 +56,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '差评 - 首页图片墙', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/chaping/maintainer.ts b/lib/routes/chaping/maintainer.ts deleted file mode 100644 index 72167c204..000000000 --- a/lib/routes/chaping/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/banner': ['nczitzk'], - '/news/:caty?': ['nczitzk'], - '/newsflash': ['Fatpandac'], -}; diff --git a/lib/routes/chaping/namespace.ts b/lib/routes/chaping/namespace.ts new file mode 100644 index 000000000..c01167a7f --- /dev/null +++ b/lib/routes/chaping/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '差评', + url: 'chaping.cn', +}; diff --git a/lib/routes/chaping/news.ts b/lib/routes/chaping/news.ts index 529e39674..8dcbc3d56 100644 --- a/lib/routes/chaping/news.ts +++ b/lib/routes/chaping/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -14,7 +15,35 @@ const titles = { 9: '公里每小时', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:caty?', + categories: ['new-media'], + example: '/chaping/news/15', + parameters: { caty: '分类,默认为全部资讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '资讯', + maintainers: ['nczitzk'], + handler, + description: `| 编号 | 分类 | + | ---- | ---------- | + | 15 | 直播 | + | 3 | 科技新鲜事 | + | 7 | 互联网槽点 | + | 5 | 趣味科技 | + | 6 | DEBUG TIME | + | 1 | 游戏 | + | 8 | 视频 | + | 9 | 公里每小时 |`, +}; + +async function handler(ctx) { const caty = ctx.req.param('caty') ?? ''; const targetUrl = `https://chaping.cn/news?cate=${caty}`; @@ -46,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `差评资讯 - ${titles[ctx.req.param('caty') === '' ? 0 : ctx.req.param('caty')]}`, link: targetUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/chaping/newsflash.ts b/lib/routes/chaping/newsflash.ts index d47f73c44..f359936e5 100644 --- a/lib/routes/chaping/newsflash.ts +++ b/lib/routes/chaping/newsflash.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const host = 'https://chaping.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/newsflash', + categories: ['new-media'], + example: '/chaping/newsflash', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chaping.cn/newsflash'], + }, + name: '快讯', + maintainers: ['Fatpandac'], + handler, + url: 'chaping.cn/newsflash', +}; + +async function handler() { const newflashAPI = `${host}/api/official/information/newsflash?page=1&limit=21`; const response = await got(newflashAPI).json(); const data = response.data; - ctx.set('data', { + return { title: '差评 快讯', link: `${host}/newsflash`, item: @@ -19,5 +42,5 @@ export default async (ctx) => { pubDate: parseDate(item.time_publish_timestamp * 1000), link: item.origin_url, })), - }); -}; + }; +} diff --git a/lib/routes/chaping/radar.ts b/lib/routes/chaping/radar.ts deleted file mode 100644 index 7b8dcf645..000000000 --- a/lib/routes/chaping/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'chaping.cn': { - _name: '差评', - '.': [ - { - title: '图片墙', - docs: 'https://docs.rsshub.app/routes/new-media#cha-ping', - source: ['/'], - target: '/chaping/banner', - }, - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#cha-ping', - source: ['/news'], - target: (params, url) => { - const cateList = ['15', '3', '7', '5', '6', '1', '8', '9']; - const cate = new URL(url).searchParams.get('cate'); - if (cateList.includes(cate)) { - return `/chaping/news/${cate}`; - } - }, - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#cha-ping', - source: ['/newsflash'], - target: '/chaping/newsflash', - }, - ], - }, -}; diff --git a/lib/routes/chaping/router.ts b/lib/routes/chaping/router.ts deleted file mode 100644 index 1d95f2b28..000000000 --- a/lib/routes/chaping/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/banner', './banner'); - router.get('/news/:caty?', './news'); - router.get('/newsflash', './newsflash'); -}; diff --git a/lib/routes/chiculture/maintainer.ts b/lib/routes/chiculture/maintainer.ts deleted file mode 100644 index d80c14831..000000000 --- a/lib/routes/chiculture/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:category?': ['nczitzk'], -}; diff --git a/lib/routes/chiculture/namespace.ts b/lib/routes/chiculture/namespace.ts new file mode 100644 index 000000000..521bad6fc --- /dev/null +++ b/lib/routes/chiculture/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '通識・現代中國', + url: 'chiculture.org.hk', +}; diff --git a/lib/routes/chiculture/radar.ts b/lib/routes/chiculture/radar.ts deleted file mode 100644 index 6281a1cdb..000000000 --- a/lib/routes/chiculture/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'chiculture.org.hk': { - _name: '通識・現代中國', - '.': [ - { - title: '議題熱話', - docs: 'https://docs.rsshub.app/routes/new-media#tong-shi-・-xian-dai-zhong-guo', - source: ['/tc/hot-topics'], - target: (_, url) => { - const searchParams = new URL(url).searchParams; - return `/chiculture${searchParams.has('category') ? `/${searchParams.get('category')}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/chiculture/router.ts b/lib/routes/chiculture/router.ts deleted file mode 100644 index ee4223bad..000000000 --- a/lib/routes/chiculture/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:category?', './topic'); -}; diff --git a/lib/routes/chiculture/topic.ts b/lib/routes/chiculture/topic.ts index cd9dc6066..4c86dcc1d 100644 --- a/lib/routes/chiculture/topic.ts +++ b/lib/routes/chiculture/topic.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:category?', + categories: ['new-media'], + example: '/chiculture/topic', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '議題熱話', + maintainers: ['nczitzk'], + handler, + description: `| 全部 | 現代中國 | 今日香港 | 全球化 | 一周時事通識 | + | ---- | -------- | -------- | ------ | ------------ | + | | 76 | 479 | 480 | 379 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || ''; const rootUrl = 'https://ls.chiculture.org.hk'; @@ -54,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '議題熱話 | 通識·現代中國', link: `${rootUrl}/tc/hot-topics${category ? `?category=${category}` : ''}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/china/finance/finance.ts b/lib/routes/china/finance/finance.ts index f0293e896..dfda745c6 100644 --- a/lib/routes/china/finance/finance.ts +++ b/lib/routes/china/finance/finance.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -15,7 +16,35 @@ const CATEGORY_MAP = { IPO: 'IPO', // IPO观察 }; -export default async (ctx) => { +export const route: Route = { + path: '/finance/:category?', + categories: ['new-media'], + example: '/china/finance', + parameters: { category: 'Category of news. See the form below for details, default is suggest news.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['finance.china.com/:category'], + }, + name: 'Finance News 财经 - 财经新闻', + maintainers: ['KingJem'], + handler, + description: `| 推荐 | TMT | 金融 | 地产 | 消费 | 医药 | 酒业 | IPO 观察 | + | ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- | + | tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO | + + > Note: The default news num is \`30\`. + + > 注意:默认新闻条数是 \`30\`。`, +}; + +async function handler(ctx) { const baseUrl = 'https://finance.china.com'; const category = CATEGORY_MAP[ctx.req.param('category')] ?? CATEGORY_MAP.tuijian; const websiteUrl = `${baseUrl}/${category}`; @@ -53,10 +82,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: websiteUrl, category: listCategory, item: items, - }); -}; + }; +} diff --git a/lib/routes/china/maintainer.ts b/lib/routes/china/maintainer.ts deleted file mode 100644 index b0217dba9..000000000 --- a/lib/routes/china/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/finance/:category?': ['KingJem'], - '/news/military': ['jiaaoMario'], - '/news/:category?': ['jiaaoMario'], -}; diff --git a/lib/routes/china/namespace.ts b/lib/routes/china/namespace.ts new file mode 100644 index 000000000..16b89b575 --- /dev/null +++ b/lib/routes/china/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'China.com 中华网', + url: 'finance.china.com', +}; diff --git a/lib/routes/china/news/highlights/news.ts b/lib/routes/china/news/highlights/news.ts index 80e799986..ee1f0a6f3 100644 --- a/lib/routes/china/news/highlights/news.ts +++ b/lib/routes/china/news/highlights/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -9,7 +10,33 @@ const CATEGORY_MAP = { news100: 'news100', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['new-media'], + example: '/china/news', + parameters: { category: 'Category of news. See the form below for details, default is china news.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.china.com/:category'], + }, + name: 'News and current affairs 时事新闻', + maintainers: ['jiaaoMario'], + handler, + description: `Category of news + + | China News | International News | Social News | Breaking News | + | ---------- | ------------------ | ----------- | ------------- | + | domestic | international | social | news100 |`, +}; + +async function handler(ctx) { const baseUrl = 'https://news.china.com'; const category = CATEGORY_MAP[ctx.req.param('category')] ?? CATEGORY_MAP.domestic; const websiteUrl = `${baseUrl}/${category}`; @@ -18,7 +45,7 @@ export default async (ctx) => { const $ = load(data); const categoryTitle = $('.wp_title').text(); const news = $('.item_list li'); - ctx.set('data', { + return { title: `中华网-${categoryTitle}新闻`, link: websiteUrl, item: @@ -36,5 +63,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/china/news/military/news.ts b/lib/routes/china/news/military/news.ts index 04356eab1..9f0aef9d5 100644 --- a/lib/routes/china/news/military/news.ts +++ b/lib/routes/china/news/military/news.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/military', + categories: ['new-media'], + example: '/china/news/military', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['military.china.com/news'], + }, + name: 'Military - Military News 军事 - 军事新闻', + maintainers: ['jiaaoMario'], + handler, + url: 'military.china.com/news', +}; + +async function handler() { const websiteUrl = 'https://military.china.com/news/'; const response = await got(websiteUrl); const data = response.data; const $ = load(data); const commonList = $('.item_list li'); - ctx.set('data', { + return { title: '中华网-军事新闻', link: 'https://military.china.com/news/', item: @@ -26,5 +49,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/china/radar.ts b/lib/routes/china/radar.ts deleted file mode 100644 index 5c81f8a0f..000000000 --- a/lib/routes/china/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'china.com': { - _name: '中华网', - - finance: [ - { - title: '财经新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-hua-wang', - source: '/:category', - target: '/china/finance/:category?', - }, - ], - military: [ - { - title: '军事新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-hua-wang', - source: '/news', - target: '/china/news/military', - }, - ], - news: [ - { - title: '时事新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-hua-wang', - source: '/:category', - target: '/china/news/:category?', - }, - ], - }, -}; diff --git a/lib/routes/china/router.ts b/lib/routes/china/router.ts deleted file mode 100644 index 95ac6c24f..000000000 --- a/lib/routes/china/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/finance/:category?', './finance/finance.js'); - router.get('/news/military', './news/military/news.js'); - router.get('/news/:category?', './news/highlights/news.js'); -}; diff --git a/lib/routes/chinadegrees/maintainer.ts b/lib/routes/chinadegrees/maintainer.ts deleted file mode 100644 index f286bc7af..000000000 --- a/lib/routes/chinadegrees/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:province?': ['TonyRL'], -}; diff --git a/lib/routes/chinadegrees/namespace.ts b/lib/routes/chinadegrees/namespace.ts new file mode 100644 index 000000000..7773eec52 --- /dev/null +++ b/lib/routes/chinadegrees/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中华人民共和国学位证书查询', + url: 'chinadegrees.com.cn', +}; diff --git a/lib/routes/chinadegrees/province.ts b/lib/routes/chinadegrees/province.ts index 9fd8c2337..2fc415340 100644 --- a/lib/routes/chinadegrees/province.ts +++ b/lib/routes/chinadegrees/province.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; const baseUrl = 'http://www.chinadegrees.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/:province?', + categories: ['study'], + example: '/chinadegrees/11', + parameters: { province: '省市代号,见下表,亦可在 [这里](http://www.chinadegrees.com.cn/help/provinceSwqk.html) 找到,默认为 `11`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { province = '11' } = ctx.req.param(); const url = `${baseUrl}/help/unitSwqk${province}.html`; @@ -63,9 +82,9 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: data.title, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/chinadegrees/radar.ts b/lib/routes/chinadegrees/radar.ts deleted file mode 100644 index a9c926b8c..000000000 --- a/lib/routes/chinadegrees/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chinadegrees.com.cn': { - _name: '中华人民共和国学位证书查询', - '.': [ - { - title: '各学位授予单位学位证书上网进度', - docs: 'https://docs.rsshub.app/routes/study#zhong-hua-ren-min-gong-he-guo-xue-wei-zheng-shu-cha-xun', - source: ['/help/*province'], - target: (params) => `/chinadegrees/${params.province.replace('unitSwqk', '').replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/chinadegrees/router.ts b/lib/routes/chinadegrees/router.ts deleted file mode 100644 index a1515a483..000000000 --- a/lib/routes/chinadegrees/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:province?', './province'); -}; diff --git a/lib/routes/chinafactcheck/index.ts b/lib/routes/chinafactcheck/index.ts index fbec13556..5e7e2894a 100644 --- a/lib/routes/chinafactcheck/index.ts +++ b/lib/routes/chinafactcheck/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['chinafactcheck.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['kdanfly'], + handler, + url: 'chinafactcheck.com/', +}; + +async function handler() { const response = await got(utils.siteLink, { headers: { 'user-agent': utils.trueUA, @@ -30,9 +43,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: utils.siteLink, item: articles, - }); -}; + }; +} diff --git a/lib/routes/chinafactcheck/maintainer.ts b/lib/routes/chinafactcheck/maintainer.ts deleted file mode 100644 index a62b35246..000000000 --- a/lib/routes/chinafactcheck/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['kdanfly'], -}; diff --git a/lib/routes/chinafactcheck/namespace.ts b/lib/routes/chinafactcheck/namespace.ts new file mode 100644 index 000000000..ccd631dad --- /dev/null +++ b/lib/routes/chinafactcheck/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '有据', + url: 'chinafactcheck.com', +}; diff --git a/lib/routes/chinafactcheck/radar.ts b/lib/routes/chinafactcheck/radar.ts deleted file mode 100644 index fa268efdd..000000000 --- a/lib/routes/chinafactcheck/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chinafactcheck.com': { - _name: '有据', - '.': [ - { - title: '最新文章列表', - docs: 'https://docs.rsshub.app/routes/other#you-ju-zui-xin-wen-zhang-lie-biao', - source: ['/'], - target: '/chinafactcheck', - }, - ], - }, -}; diff --git a/lib/routes/chinafactcheck/router.ts b/lib/routes/chinafactcheck/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/chinafactcheck/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/chinaisa/index.ts b/lib/routes/chinaisa/index.ts index 540e97ed3..0e4f71fb3 100644 --- a/lib/routes/chinaisa/index.ts +++ b/lib/routes/chinaisa/index.ts @@ -1,9 +1,166 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['new-media'], + example: '/chinaisa', + parameters: { id: '栏目,见下表,默认为钢协动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | + | 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | + | 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | + | 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | + | 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e | + +
    + 更多栏目 + + #### 党建工作 + + | 栏目 | id | + | ---------------------------------------------------- | ---------------------------------------------------------------- | + | 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b | + | 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 | + | 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 | + | 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db | + | 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 | + | 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b | + | 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 | + | 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 | + | 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 | + + #### 要闻 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 | + | 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c | + | 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 | + + #### 统计发布 + + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b | + | 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e | + | 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c | + | 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 | + + #### 行业分析 + + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 | + | 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd | + | 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 | + | 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 | + + #### 钢材价格指数 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 | + | 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e | + | 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 | + + #### 宏观经济信息 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 | + | 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 | + | 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 | + + #### 专题报道 + + | 栏目 | id | + | -------------------- | ---------------------------------------------------------------- | + | 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 | + | 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 | + | 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c | + | 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 | + | 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 | + + #### 成果奖励 + + | 栏目 | id | + | ---------------------- | ---------------------------------------------------------------- | + | 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 | + | 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 | + | 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 | + | 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 | + | 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 | + | 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 | + + #### 节能减排 + + | 栏目 | id | + | ------------------------------------------ | ---------------------------------------------------------------- | + | 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 | + | 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f | + | 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 | + + #### 国际交流 + + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 | + | 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 | + | 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c | + + #### 政策法规 + + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 | + | 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 | + | 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 | + + #### 分会园地 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 | + | 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 | + | 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 | + | 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c | + | 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b | + + #### 钢铁知识 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f | + | 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac | + | 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 | + + #### 钢协刊物 + + | 栏目 | id | + | ---------- | ---------------------------------------------------------------- | + | 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b | + | 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f | + | 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 | +
    `, +}; + +async function handler(ctx) { const { id = '58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -69,7 +226,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('title').text()} - ${subtitle}`, link: currentUrl, @@ -80,5 +237,5 @@ export default async (ctx) => { logo: icon, subtitle, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/chinaisa/maintainer.ts b/lib/routes/chinaisa/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/chinaisa/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/chinaisa/namespace.ts b/lib/routes/chinaisa/namespace.ts new file mode 100644 index 000000000..2db657594 --- /dev/null +++ b/lib/routes/chinaisa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国钢铁工业协会', + url: 'chinaisa.org.cn', +}; diff --git a/lib/routes/chinaisa/radar.ts b/lib/routes/chinaisa/radar.ts deleted file mode 100644 index 91cc5c270..000000000 --- a/lib/routes/chinaisa/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'chinaisa.org.cn': { - _name: '中国钢铁工业协会', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-gang-tie-gong-ye-xie-hui-lan-mu', - source: ['/gxportal/xfgl/portal/list.html'], - target: (params, url) => { - url = new URL(url); - const columnId = url.searchParams.get('columnId'); - - return `/chinaisa${columnId ? `/${columnId}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/chinaisa/router.ts b/lib/routes/chinaisa/router.ts deleted file mode 100644 index 6c52c5718..000000000 --- a/lib/routes/chinaisa/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './'); -}; diff --git a/lib/routes/chinamoney/maintainer.ts b/lib/routes/chinamoney/maintainer.ts deleted file mode 100644 index 231c1503a..000000000 --- a/lib/routes/chinamoney/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channelId?': ['TonyRL'], -}; diff --git a/lib/routes/chinamoney/namespace.ts b/lib/routes/chinamoney/namespace.ts new file mode 100644 index 000000000..5b81c2db6 --- /dev/null +++ b/lib/routes/chinamoney/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国货币网', + url: 'chinamoney.com.cn', +}; diff --git a/lib/routes/chinamoney/notice.ts b/lib/routes/chinamoney/notice.ts index 78bde4ba1..bd088724c 100644 --- a/lib/routes/chinamoney/notice.ts +++ b/lib/routes/chinamoney/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,56 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { channels } from './channels'; -export default async (ctx) => { +export const route: Route = { + path: '/:channelId?', + categories: ['finance'], + example: '/chinamoney', + parameters: { channelId: '分类,见下表,默认为 `2834`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公告', + maintainers: ['TonyRL'], + handler, + description: `
    + 市场公告 + + 外汇市场公告 + + | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | + | ---- | ------------ | ------------ | ------------ | + | 2834 | 2835 | 2836 | 2837 | + + 本币市场公告 + + | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | + | -------------- | ------------ | ------------ | ------------ | + | 2839,2840,2841 | 2839 | 2840 | 2841 | + + 央行业务公告 + + | 最新 | 公开市场操作 | 中央国库现金管理 | + | --------- | ------------ | ---------------- | + | 2845,2846 | 2845 | 2846 | +
    + +
    + 本币市场 + + 贷款市场报价利率 + + | LPR 市场公告 | + | ------------ | + | 3686 | +
    `, +}; + +async function handler(ctx) { const { channelId = 2834 } = ctx.req.param(); const baseUrl = 'https://www.chinamoney.com.cn'; @@ -54,9 +104,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${channels[channelId] ? channels[channelId].title + ' - ' : ''}中国货币网`, link: `${baseUrl}${channels[channelId]?.urlPath ?? ''}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/chinamoney/radar.ts b/lib/routes/chinamoney/radar.ts deleted file mode 100644 index fa7616ed8..000000000 --- a/lib/routes/chinamoney/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'chinamoney.com.cn': { - _name: '中国货币网', - '.': [ - { - title: '公告', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-huo-bi-wang', - }, - ], - }, -}; diff --git a/lib/routes/chinamoney/router.ts b/lib/routes/chinamoney/router.ts deleted file mode 100644 index 82e4b54c0..000000000 --- a/lib/routes/chinamoney/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channelId?', './notice'); -}; diff --git a/lib/routes/chinanews/index.ts b/lib/routes/chinanews/index.ts index 0f27b53e1..3261e6bd0 100644 --- a/lib/routes/chinanews/index.ts +++ b/lib/routes/chinanews/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; @@ -6,7 +7,19 @@ import { load } from 'cheerio'; const rootUrl = 'https://www.chinanews.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['chinanews.com.cn/'], + target: '', + }, + name: 'Unknown', + maintainers: ['yuxinliu-alex'], + handler, + url: 'chinanews.com.cn/', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/scroll-news/news1.html`; const response = await got({ method: 'get', @@ -57,11 +70,11 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '中国新闻网', link: currentUrl, description: '中国新闻网(简称“中新网”),由中国新闻社主办,为中央重点新闻网站。', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/chinanews/maintainer.ts b/lib/routes/chinanews/maintainer.ts deleted file mode 100644 index 3abc4f87b..000000000 --- a/lib/routes/chinanews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['yuxinliu-alex'], -}; diff --git a/lib/routes/chinanews/namespace.ts b/lib/routes/chinanews/namespace.ts new file mode 100644 index 000000000..bb524d257 --- /dev/null +++ b/lib/routes/chinanews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国新闻网', + url: 'chinanews.com.cn', +}; diff --git a/lib/routes/chinanews/radar.ts b/lib/routes/chinanews/radar.ts deleted file mode 100644 index 3ae903ee9..000000000 --- a/lib/routes/chinanews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chinanews.com.cn': { - _name: '中国新闻网', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-xin-wang', - source: ['/'], - target: '/chinanews', - }, - ], - }, -}; diff --git a/lib/routes/chinanews/router.ts b/lib/routes/chinanews/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/chinanews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/chinathinktanks/maintainer.ts b/lib/routes/chinathinktanks/maintainer.ts deleted file mode 100644 index b3f86c9cc..000000000 --- a/lib/routes/chinathinktanks/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['Aeliu'], -}; diff --git a/lib/routes/chinathinktanks/namespace.ts b/lib/routes/chinathinktanks/namespace.ts new file mode 100644 index 000000000..cae24032c --- /dev/null +++ b/lib/routes/chinathinktanks/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国智库网', + url: 'www.chinathinktanks.org.cn', +}; diff --git a/lib/routes/chinathinktanks/radar.ts b/lib/routes/chinathinktanks/radar.ts deleted file mode 100644 index 8931f9076..000000000 --- a/lib/routes/chinathinktanks/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chinathinktanks.org.cn': { - _name: '中国智库网', - www: [ - { - title: '观点与实践', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-zhi-ku-wang', - source: '/', - target: (params, url) => `/chinathinktanks/${new URL(url).searchParams.get('id')}`, - }, - ], - }, -}; diff --git a/lib/routes/chinathinktanks/router.ts b/lib/routes/chinathinktanks/router.ts deleted file mode 100644 index dfdbb4af5..000000000 --- a/lib/routes/chinathinktanks/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './viewpoint'); -}; diff --git a/lib/routes/chinathinktanks/viewpoint.ts b/lib/routes/chinathinktanks/viewpoint.ts index 155e3a732..d539702a0 100644 --- a/lib/routes/chinathinktanks/viewpoint.ts +++ b/lib/routes/chinathinktanks/viewpoint.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,72 @@ import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); const baseUrl = 'https://www.chinathinktanks.org.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['study'], + example: '/chinathinktanks/57', + parameters: { id: '见下表,亦可在网站 url 里找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '观点与实践', + maintainers: ['Aeliu'], + handler, + description: `| \`:id\` | 专题名称 | + | ----- | -------- | + | 2 | 党的建设 | + | 3 | 社会 | + | 4 | 生态 | + | 5 | 政治 | + | 6 | 经济 | + | 7 | 文化 | + | 9 | 热点专题 | + | 10 | 国际关系 | + | 13 | 国外智库 | + | 46 | 智库报告 | + | 57 | 智库要闻 | + | 126 | 世界经济 | + | 127 | 宏观经济 | + | 128 | 区域经济 | + | 129 | 产业企业 | + | 130 | 三农问题 | + | 131 | 财政金融 | + | 132 | 科技创新 | + | 133 | 民主 | + | 134 | 法治 | + | 135 | 行政 | + | 136 | 国家治理 | + | 137 | 社会事业 | + | 138 | 社会保障 | + | 139 | 民族宗教 | + | 140 | 人口就业 | + | 141 | 社会治理 | + | 142 | 文化产业 | + | 143 | 公共文化 | + | 144 | 文化体制 | + | 145 | 文化思想 | + | 146 | 资源 | + | 147 | 能源 | + | 148 | 环境 | + | 149 | 生态文明 | + | 150 | 思想建设 | + | 151 | 作风建设 | + | 152 | 组织建设 | + | 153 | 制度建设 | + | 154 | 反腐倡廉 | + | 155 | 中国外交 | + | 156 | 全球治理 | + | 157 | 大国关系 | + | 158 | 地区政治 | + | 181 | 执政能力 |`, +}; + +async function handler(ctx) { const link = `https://www.chinathinktanks.org.cn/content/list?id=${ctx.req.param('id')}&pt=1`; const response = await got(link, { @@ -45,9 +111,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `中国智库网 —— ${$('title').text().split('_中国智库网')[0]}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/chinaventure/index.ts b/lib/routes/chinaventure/index.ts index 617ba832b..8b048fe06 100644 --- a/lib/routes/chinaventure/index.ts +++ b/lib/routes/chinaventure/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,33 @@ const nodes = { 116: '新消费', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:id?', + categories: ['new-media'], + example: '/chinaventure/news/78', + parameters: { id: '分类,见下表,默认为推荐' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chinaventure.com.cn/'], + target: '', + }, + name: '分类', + maintainers: ['yuxinliu-alex'], + handler, + url: 'chinaventure.com.cn/', + description: `| 推荐 | 商业深度 | 资本市场 | 5G | 健康 | 教育 | 地产 | 金融 | 硬科技 | 新消费 | + | ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ | + | | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const currentUrl = rootUrl.concat(id ? `/news/${id}.html` : '/index.html'); @@ -54,11 +81,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${nodes[id] ?? '推荐'}-投中网`, link: currentUrl, description: '投中网是国内领先的创新经济信息服务平台,拥有立体化媒体矩阵,十多年行业深耕,为创新经济领域核心人群提供深入、独到的智识和洞见,在私募股权投资行业和创新商业领域均拥有权威影响力。', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/chinaventure/maintainer.ts b/lib/routes/chinaventure/maintainer.ts deleted file mode 100644 index 0935b86ba..000000000 --- a/lib/routes/chinaventure/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:id?': ['yuxinliu-alex'], -}; diff --git a/lib/routes/chinaventure/namespace.ts b/lib/routes/chinaventure/namespace.ts new file mode 100644 index 000000000..f133780a9 --- /dev/null +++ b/lib/routes/chinaventure/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '投中网', + url: 'chinaventure.com.cn', +}; diff --git a/lib/routes/chinaventure/radar.ts b/lib/routes/chinaventure/radar.ts deleted file mode 100644 index eb51b4485..000000000 --- a/lib/routes/chinaventure/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chinaventure.com.cn': { - _name: '投中网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#tou-zhong-wang', - source: ['/'], - target: '/chinaventure', - }, - ], - }, -}; diff --git a/lib/routes/chinaventure/router.ts b/lib/routes/chinaventure/router.ts deleted file mode 100644 index 6c0d57b8a..000000000 --- a/lib/routes/chinaventure/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:id?', './index'); -}; diff --git a/lib/routes/chinawriter/index.ts b/lib/routes/chinawriter/index.ts index 53a234739..5f583dca8 100644 --- a/lib/routes/chinawriter/index.ts +++ b/lib/routes/chinawriter/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 40; @@ -74,7 +82,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl); - ctx.set('data', { + return { item: items, title: $('title').text().replaceAll('--', ' - '), link: currentUrl, @@ -85,5 +93,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="keywords"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/chinawriter/maintainer.ts b/lib/routes/chinawriter/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/chinawriter/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/chinawriter/namespace.ts b/lib/routes/chinawriter/namespace.ts new file mode 100644 index 000000000..0f473e04d --- /dev/null +++ b/lib/routes/chinawriter/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国作家网', + url: 'chinawriter.com.cn', +}; diff --git a/lib/routes/chinawriter/radar.ts b/lib/routes/chinawriter/radar.ts deleted file mode 100644 index 5bcbe9a5e..000000000 --- a/lib/routes/chinawriter/radar.ts +++ /dev/null @@ -1,660 +0,0 @@ -export default { - 'chinawriter.com.cn': { - _name: '中国作家网', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/:id*'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/\.\w+([\d/]+)(?:\/index(?:\.html)?)?$/)[1]; - - return `/chinawriter${path ?? ''}`; - }, - }, - { - title: '服务', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403937'], - target: '/chinawriter/403937', - }, - { - title: '会员', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403978'], - target: '/chinawriter/403978', - }, - { - title: '文学奖项', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403973'], - target: '/chinawriter/403973', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990'], - target: '/chinawriter/403990', - }, - { - title: '访谈', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403997'], - target: '/chinawriter/403997', - }, - { - title: '艺术', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002'], - target: '/chinawriter/404002', - }, - { - title: '理论评论', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029'], - target: '/chinawriter/404029', - }, - { - title: '文史', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057'], - target: '/chinawriter/404057', - }, - { - title: '科幻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078'], - target: '/chinawriter/404078', - }, - { - title: '书汇', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404058'], - target: '/chinawriter/404058', - }, - { - title: '新作品', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015'], - target: '/chinawriter/404015', - }, - { - title: '世界文坛', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085'], - target: '/chinawriter/404085', - }, - { - title: '民族文艺', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086'], - target: '/chinawriter/404086', - }, - { - title: '网络文学', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404022'], - target: '/chinawriter/404022', - }, - { - title: '儿童文学', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059'], - target: '/chinawriter/404059', - }, - { - title: '会员 - 新发展会员名单', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403978/403979', '/403978'], - target: '/chinawriter/403978/403979', - }, - { - title: '会员 - 讣告', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403978/403981', '/403978'], - target: '/chinawriter/403978/403981', - }, - { - title: '文学奖项 - 其他文学奖项', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403973/419349', '/403973'], - target: '/chinawriter/403973/419349', - }, - { - title: '新闻 - 时政新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990/403991', '/403990'], - target: '/chinawriter/403990/403991', - }, - { - title: '新闻 - 中国作协', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990/403993', '/403990'], - target: '/chinawriter/403990/403993', - }, - { - title: '新闻 - 主席', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990/441519', '/403990'], - target: '/chinawriter/403990/441519', - }, - { - title: '新闻 - 党组书记', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990/441520', '/403990'], - target: '/chinawriter/403990/441520', - }, - { - title: '新闻 - 各地文讯', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/403990/403994', '/403990'], - target: '/chinawriter/403990/403994', - }, - { - title: '艺术 - 新闻', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/404003', '/404002'], - target: '/chinawriter/404002/404003', - }, - { - title: '艺术 - 影视', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/419388', '/404002'], - target: '/chinawriter/404002/419388', - }, - { - title: '艺术 - 舞台', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/419389', '/404002'], - target: '/chinawriter/404002/419389', - }, - { - title: '艺术 - 人物', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/404005', '/404002'], - target: '/chinawriter/404002/404005', - }, - { - title: '艺术 - 展览', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/419390', '/404002'], - target: '/chinawriter/404002/419390', - }, - { - title: '艺术 - 书画', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404002/419391', '/404002'], - target: '/chinawriter/404002/419391', - }, - { - title: '理论评论 - 重要理论文章', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/419350', '/404029'], - target: '/chinawriter/404029/419350', - }, - { - title: '理论评论 - 理论热点', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/419351', '/404029'], - target: '/chinawriter/404029/419351', - }, - { - title: '理论评论 - 文学评论', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/404030', '/404029'], - target: '/chinawriter/404029/404030', - }, - { - title: '理论评论 - 创作谈', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/404032', '/404029'], - target: '/chinawriter/404029/404032', - }, - { - title: '理论评论 - 争鸣', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/404033', '/404029'], - target: '/chinawriter/404029/404033', - }, - { - title: '理论评论 - 综述', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404029/404034', '/404029'], - target: '/chinawriter/404029/404034', - }, - { - title: '理论评论 - 《中国当代文学研究》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404087/404988/425775', '/404087/404988', '/404087'], - target: '/chinawriter/404087/404988/425775', - }, - { - title: '文史 - 文坛轶事', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057/404063', '/404057'], - target: '/chinawriter/404057/404063', - }, - { - title: '文史 - 文史漫谈', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057/442005', '/404057'], - target: '/chinawriter/404057/442005', - }, - { - title: '文史 - 重温经典', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057/419384', '/404057'], - target: '/chinawriter/404057/419384', - }, - { - title: '文史 - 版本研究', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057/419387', '/404057'], - target: '/chinawriter/404057/419387', - }, - { - title: '文史 - 名人手迹', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404057/419382', '/404057'], - target: '/chinawriter/404057/419382', - }, - { - title: '文史 - 茅盾文学奖获奖作家研究', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404087/404988/429369', '/404087/404988', '/404087'], - target: '/chinawriter/404087/404988/429369', - }, - { - title: '科幻 - 动态', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078/404079', '/404078'], - target: '/chinawriter/404078/404079', - }, - { - title: '科幻 - 评论', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078/404080', '/404078'], - target: '/chinawriter/404078/404080', - }, - { - title: '科幻 - 作家印象', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078/404081', '/404078'], - target: '/chinawriter/404078/404081', - }, - { - title: '科幻 - 作品', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078/404083', '/404078'], - target: '/chinawriter/404078/404083', - }, - { - title: '科幻 - 科声幻影', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404078/404084', '/404078'], - target: '/chinawriter/404078/404084', - }, - { - title: '书汇 - 书摘', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404058/404067', '/404058'], - target: '/chinawriter/404058/404067', - }, - { - title: '书汇 - 图书排行', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404058/404069', '/404058'], - target: '/chinawriter/404058/404069', - }, - { - title: '新作品 - 小说', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/404017', '/404015'], - target: '/chinawriter/404015/404017', - }, - { - title: '新作品 - 诗歌', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/404020', '/404015'], - target: '/chinawriter/404015/404020', - }, - { - title: '新作品 - 散文', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/404018', '/404015'], - target: '/chinawriter/404015/404018', - }, - { - title: '新作品 - 纪实', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/404019', '/404015'], - target: '/chinawriter/404015/404019', - }, - { - title: '新作品 - 其他', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/419926', '/404015'], - target: '/chinawriter/404015/419926', - }, - { - title: '新作品 - 平台推荐', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/419789', '/404015'], - target: '/chinawriter/404015/419789', - }, - { - title: '新作品 - 本周之星', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/431511', '/404015'], - target: '/chinawriter/404015/431511', - }, - { - title: '新作品 - 2018年5月18日前原创作品', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404009'], - target: '/chinawriter/404009', - }, - { - title: '新作品 - 《人民文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418925', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418925', - }, - { - title: '新作品 - 《诗刊》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418926', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418926', - }, - { - title: '新作品 - 《民族文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418928', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418928', - }, - { - title: '新作品 - 《收获》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418958', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418958', - }, - { - title: '新作品 - 《十月》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418956', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418956', - }, - { - title: '新作品 - 《小说选刊》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418929', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418929', - }, - { - title: '新作品 - 《北京文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418954', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418954', - }, - { - title: '新作品 - 《上海文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418962', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418962', - }, - { - title: '新作品 - 《天津文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419004', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419004', - }, - { - title: '新作品 - 《草原》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418989', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418989', - }, - { - title: '新作品 - 《黄河》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/426204', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/426204', - }, - { - title: '新作品 - 《江南》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418957', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418957', - }, - { - title: '新作品 - 《钟山》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418984', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418984', - }, - { - title: '新作品 - 《广州文艺》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419881', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419881', - }, - { - title: '新作品 - 《湖南文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419156', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419156', - }, - { - title: '新作品 - 《山西文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419827', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419827', - }, - { - title: '新作品 - 《花城》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418960', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418960', - }, - { - title: '新作品 - 《青年作家》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418967', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418967', - }, - { - title: '新作品 - 《雨花》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419885', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419885', - }, - { - title: '新作品 - 《红豆》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418993', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418993', - }, - { - title: '新作品 - 《长江文艺》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418961', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418961', - }, - { - title: '新作品 - 《中国作家》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418927', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418927', - }, - { - title: '新作品 - 《青年文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418979', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418979', - }, - { - title: '新作品 - 《美文》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418985', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418985', - }, - { - title: '新作品 - 《芙蓉》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418986', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418986', - }, - { - title: '新作品 - 《长城》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418987', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418987', - }, - { - title: '新作品 - 《福建文学》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/419003', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/419003', - }, - { - title: '新作品 - 《啄木鸟》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/435225', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/435225', - }, - { - title: '新作品 - 《芳草》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/424311', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/424311', - }, - { - title: '新作品 - 《小说月报》', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404015/416204/418963', '/404015/416204', '/404015'], - target: '/chinawriter/404015/416204/418963', - }, - { - title: '世界文坛 - 视点', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/404090', '/404085'], - target: '/chinawriter/404085/404090', - }, - { - title: '世界文坛 - 译介', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/431803', '/404085'], - target: '/chinawriter/404085/431803', - }, - { - title: '世界文坛 - 作家印象', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/404091', '/404085'], - target: '/chinawriter/404085/404091', - }, - { - title: '世界文坛 - 文学评论', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/404092', '/404085'], - target: '/chinawriter/404085/404092', - }, - { - title: '世界文坛 - 影像艺术', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/404093', '/404085'], - target: '/chinawriter/404085/404093', - }, - { - title: '世界文坛 - 作品推介', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404085/404095', '/404085'], - target: '/chinawriter/404085/404095', - }, - { - title: '民族文艺 - 动态', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086/404098', '/404086'], - target: '/chinawriter/404086/404098', - }, - { - title: '民族文艺 - 品评', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086/404101', '/404086'], - target: '/chinawriter/404086/404101', - }, - { - title: '民族文艺 - 作家印象', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086/404099', '/404086'], - target: '/chinawriter/404086/404099', - }, - { - title: '民族文艺 - 作品', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086/404100', '/404086'], - target: '/chinawriter/404086/404100', - }, - { - title: '民族文艺 - 影像', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404086/404102', '/404086'], - target: '/chinawriter/404086/404102', - }, - { - title: '网络文学 - 动态', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404022/404023', '/404022'], - target: '/chinawriter/404022/404023', - }, - { - title: '网络文学 - 观察', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404022/404027', '/404022'], - target: '/chinawriter/404022/404027', - }, - { - title: '网络文学 - 访谈', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404022/404024', '/404022'], - target: '/chinawriter/404022/404024', - }, - { - title: '网络文学 - 中国网络小说排行榜', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404022/404028', '/404022'], - target: '/chinawriter/404022/404028', - }, - { - title: '儿童文学 - 视点', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059/404071', '/404059'], - target: '/chinawriter/404059/404071', - }, - { - title: '儿童文学 - 文学评论', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059/404072', '/404059'], - target: '/chinawriter/404059/404072', - }, - { - title: '儿童文学 - 作家印象', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059/404073', '/404059'], - target: '/chinawriter/404059/404073', - }, - { - title: '儿童文学 - 作品推介', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059/404075', '/404059'], - target: '/chinawriter/404059/404075', - }, - { - title: '儿童文学 - 动漫艺术', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', - source: ['/404059/404076', '/404059'], - target: '/chinawriter/404059/404076', - }, - ], - }, -}; diff --git a/lib/routes/chinawriter/router.ts b/lib/routes/chinawriter/router.ts deleted file mode 100644 index 5250d55fc..000000000 --- a/lib/routes/chinawriter/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id{.+}?', './'); -}; diff --git a/lib/routes/chsi/hotnews.ts b/lib/routes/chsi/hotnews.ts index dbe53e835..ad7cae884 100644 --- a/lib/routes/chsi/hotnews.ts +++ b/lib/routes/chsi/hotnews.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://yz.chsi.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/hotnews', + categories: ['study'], + example: '/chsi/hotnews', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.chsi.com.cn/'], + }, + name: '考研热点新闻', + maintainers: ['yanbot-team'], + handler, + url: 'yz.chsi.com.cn/', +}; + +async function handler() { const response = await got(host); const $ = load(response.data); const list = $('.focus-part .index-hot a'); @@ -40,10 +63,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `中国研究生招生信息网 - 热点`, link: host, description: '中国研究生招生信息网 - 热点', item: items, - }); -}; + }; +} diff --git a/lib/routes/chsi/kydt.ts b/lib/routes/chsi/kydt.ts index 06c4d3ca1..ddfdd51fb 100644 --- a/lib/routes/chsi/kydt.ts +++ b/lib/routes/chsi/kydt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://yz.chsi.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/kydt', + categories: ['study'], + example: '/chsi/kydt', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.chsi.com.cn/kyzx/kydt'], + }, + name: '考研动态', + maintainers: ['SunBK201'], + handler, + url: 'yz.chsi.com.cn/kyzx/kydt', +}; + +async function handler() { const response = await got(`${host}/kyzx/kydt`); const $ = load(response.data); @@ -38,10 +61,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `中国研究生招生信息网 - 考研动态`, link: `${host}/kyzx/kydt/`, description: '中国研究生招生信息网 - 考研动态', item: items, - }); -}; + }; +} diff --git a/lib/routes/chsi/kyzx.ts b/lib/routes/chsi/kyzx.ts index 61a360270..e3d714e61 100644 --- a/lib/routes/chsi/kyzx.ts +++ b/lib/routes/chsi/kyzx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,35 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://yz.chsi.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/kyzx/:type', + categories: ['study'], + example: '/chsi/kyzx/fstj', + parameters: { type: ' type 见下表,亦可在网站 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.chsi.com.cn/kyzx/:type'], + }, + name: '考研资讯', + maintainers: ['yanbot-team'], + handler, + description: `| \`:type\` | 专题名称 | + | ------- | -------- | + | fstj | 复试调剂 | + | kydt | 考研动态 | + | zcdh | 政策导航 | + | kyrw | 考研人物 | + | jyxd | 经验心得 |`, +}; + +async function handler(ctx) { const { type } = ctx.req.param(); const response = await got(`${host}/kyzx/${type}`); const $ = load(response.data); @@ -39,10 +68,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `中国研究生招生信息网 - ${typeName}`, link: `${host}/kyzx/${type}/`, description: `中国研究生招生信息网 - ${typeName}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/chsi/maintainer.ts b/lib/routes/chsi/maintainer.ts deleted file mode 100644 index 3f31400d9..000000000 --- a/lib/routes/chsi/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/hotnews': ['yanbot-team'], - '/kydt': ['SunBK201'], - '/kyzx/:type': ['yanbot-team'], -}; diff --git a/lib/routes/chsi/namespace.ts b/lib/routes/chsi/namespace.ts new file mode 100644 index 000000000..ce6dd8cc8 --- /dev/null +++ b/lib/routes/chsi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国研究生招生信息网', + url: 'yz.chsi.com.cn', +}; diff --git a/lib/routes/chsi/radar.ts b/lib/routes/chsi/radar.ts deleted file mode 100644 index 848aacc88..000000000 --- a/lib/routes/chsi/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'chsi.com.cn': { - _name: '中国研究生招生信息网', - yz: [ - { - title: '考研热点新闻', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang', - source: ['/'], - target: '/chsi/hotnews', - }, - { - title: '考研动态', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang', - source: ['/kyzx/kydt'], - target: '/chsi/kydt', - }, - { - title: '考研资讯', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang', - source: ['/kyzx/:type'], - target: '/chsi/kyzx/:type', - }, - ], - }, -}; diff --git a/lib/routes/chsi/router.ts b/lib/routes/chsi/router.ts deleted file mode 100644 index 841b649de..000000000 --- a/lib/routes/chsi/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/hotnews', './hotnews'); - router.get('/kydt', './kydt'); - router.get('/kyzx/:type', './kyzx'); -}; diff --git a/lib/routes/chuanliu/maintainer.ts b/lib/routes/chuanliu/maintainer.ts deleted file mode 100644 index 1de215f59..000000000 --- a/lib/routes/chuanliu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/nice': ['nczitzk'], -}; diff --git a/lib/routes/chuanliu/namespace.ts b/lib/routes/chuanliu/namespace.ts new file mode 100644 index 000000000..0d7d7f0c5 --- /dev/null +++ b/lib/routes/chuanliu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '川流', + url: 'chuanliu.org', +}; diff --git a/lib/routes/chuanliu/nice.ts b/lib/routes/chuanliu/nice.ts index 73e659677..ce112198e 100644 --- a/lib/routes/chuanliu/nice.ts +++ b/lib/routes/chuanliu/nice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,29 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/nice', + categories: ['blog'], + example: '/chuanliu/nice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chuanliu.org/nice'], + }, + name: '严选', + maintainers: ['nczitzk'], + handler, + url: 'chuanliu.org/nice', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; const rootUrl = 'https://chuanliu.org'; @@ -65,7 +88,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="shortcut icon"]').prop('href'), currentUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -76,5 +99,5 @@ export default async (ctx) => { subtitle: $('title').text(), author: $('meta[name="author"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/chuanliu/radar.ts b/lib/routes/chuanliu/radar.ts deleted file mode 100644 index 54d1b7186..000000000 --- a/lib/routes/chuanliu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chuanliu.org': { - _name: '川流', - '.': [ - { - title: '严选', - docs: 'https://docs.rsshub.app/routes/blog#chuan-liu-yan-xuan', - source: ['/nice'], - target: '/chuanliu/nice', - }, - ], - }, -}; diff --git a/lib/routes/chuanliu/router.ts b/lib/routes/chuanliu/router.ts deleted file mode 100644 index eeaf8279b..000000000 --- a/lib/routes/chuanliu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/nice', './nice'); -}; diff --git a/lib/routes/cib/maintainer.ts b/lib/routes/cib/maintainer.ts deleted file mode 100644 index 20fc06105..000000000 --- a/lib/routes/cib/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/whpj/:format?': ['Qixingchen'], -}; diff --git a/lib/routes/cib/namespace.ts b/lib/routes/cib/namespace.ts new file mode 100644 index 000000000..61f443544 --- /dev/null +++ b/lib/routes/cib/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国兴业银行', + url: 'cib.com.cn', +}; diff --git a/lib/routes/cib/radar.ts b/lib/routes/cib/radar.ts deleted file mode 100644 index 379830a99..000000000 --- a/lib/routes/cib/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cib.com.cn': { - _name: '中国兴业银行', - '.': [ - { - title: '外汇牌价', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-xing-ye-yin-hang', - source: ['/'], - target: '/cib/whpj', - }, - ], - }, -}; diff --git a/lib/routes/cib/router.ts b/lib/routes/cib/router.ts deleted file mode 100644 index 11abba62a..000000000 --- a/lib/routes/cib/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/whpj/:format?', './whpj'); -}; diff --git a/lib/routes/cib/whpj.ts b/lib/routes/cib/whpj.ts index 831736f2e..39c2b2d53 100644 --- a/lib/routes/cib/whpj.ts +++ b/lib/routes/cib/whpj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,33 @@ import https from 'https'; import crypto from 'crypto'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/whpj/:format?', + categories: ['other'], + example: '/cib/whpj/xh?filter_title=USD', + parameters: { format: '输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cib.com.cn/'], + target: '/whpj', + }, + name: '外汇牌价', + maintainers: ['Qixingchen'], + handler, + url: 'cib.com.cn/', + description: `| 短格式 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | + | ------ | -------- | -------- | -------- | -------- | -------- | -------- | + | short | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +}; + +async function handler(ctx) { // fix unsafe legacy renegotiation disabled const agent = new https.Agent({ secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT, @@ -38,7 +65,7 @@ export default async (ctx) => { const format = ctx.req.param('format'); - ctx.set('data', { + return { title: '中国兴业银行外汇牌价', link: 'https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery.do', item: data.rows.map((item) => { @@ -61,8 +88,8 @@ export default async (ctx) => { guid: `${item.cell[0]} ${item.cell[1]} ${date}`, }; }), - }); -}; + }; +} function formatTitle(name, xhmr, xcmr, xhmc, xcmc, content, format) { switch (format) { diff --git a/lib/routes/ciidbnu/index.ts b/lib/routes/ciidbnu/index.ts index 123ffaf70..c669c9eea 100644 --- a/lib/routes/ciidbnu/index.ts +++ b/lib/routes/ciidbnu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import iconv from 'iconv-lite'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['new-media'], + example: '/ciidbnu', + parameters: { id: '分类 id,可在分类页地址栏 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 社会动态 | 院内新闻 | 学术观点 | 文献书籍 | 工作论文 | 专题讨论 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 1 | 5 | 3 | 4 | 6 | 8 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const rootUrl = 'http://www.ciidbnu.org'; @@ -50,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('h3').text()} - 中国收入分配研究院`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ciidbnu/maintainer.ts b/lib/routes/ciidbnu/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/ciidbnu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/ciidbnu/namespace.ts b/lib/routes/ciidbnu/namespace.ts new file mode 100644 index 000000000..ec7fad9cf --- /dev/null +++ b/lib/routes/ciidbnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国收入分配研究院', + url: 'ciidbnu.org', +}; diff --git a/lib/routes/ciidbnu/radar.ts b/lib/routes/ciidbnu/radar.ts deleted file mode 100644 index f1353d1ae..000000000 --- a/lib/routes/ciidbnu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ciidbnu.org': { - _name: '中国收入分配研究院', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#', - source: ['/new1.asp', '/'], - target: (_params, url) => `/ciidbnu/${new URL(url).searchParams.get('pagetype')}`, - }, - ], - }, -}; diff --git a/lib/routes/ciidbnu/router.ts b/lib/routes/ciidbnu/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/ciidbnu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/civitai/discussions.ts b/lib/routes/civitai/discussions.ts index 16deacddb..d7dbeaa9f 100644 --- a/lib/routes/civitai/discussions.ts +++ b/lib/routes/civitai/discussions.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/discussions/:modelId', + categories: ['program-update'], + example: '/civitai/discussions/4384', + parameters: { modelId: 'N' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['civitai.com/models/:modelId'], + }, + name: 'Model discussions', + maintainers: ['DIYgod'], + handler, + description: `:::warning +Need to configure \`CIVITAI_COOKIE\` to obtain image information of NSFW models. +:::`, +}; + +async function handler(ctx) { const params = ctx.req.param(); const modelId = Number.parseInt(params.modelId); @@ -34,9 +59,9 @@ export default async (ctx) => { ) .filter(Boolean); - ctx.set('data', { + return { title: `Civitai model ${params.modelId} discussions`, link: `https://civitai.com/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/civitai/maintainer.ts b/lib/routes/civitai/maintainer.ts deleted file mode 100644 index dc6664107..000000000 --- a/lib/routes/civitai/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/models': ['DIYgod'], - '/discussions/:modelId': ['DIYgod'], -}; diff --git a/lib/routes/civitai/models.ts b/lib/routes/civitai/models.ts index 0e66db68b..3231e8ebf 100644 --- a/lib/routes/civitai/models.ts +++ b/lib/routes/civitai/models.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/models', + categories: ['program-update'], + example: '/civitai/models', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['civitai.com/'], + }, + name: 'Latest models', + maintainers: ['DIYgod'], + handler, + url: 'civitai.com/', +}; + +async function handler() { const { data } = await got(`https://civitai.com/api/v1/models`, { searchParams: { limit: 20, @@ -18,9 +41,9 @@ export default async (ctx) => { category: item.tags, })); - ctx.set('data', { + return { title: `Civitai latest models`, link: `https://civitai.com/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/civitai/namespace.ts b/lib/routes/civitai/namespace.ts new file mode 100644 index 000000000..7c989889b --- /dev/null +++ b/lib/routes/civitai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Civitai', + url: 'civitai.com', +}; diff --git a/lib/routes/civitai/radar.ts b/lib/routes/civitai/radar.ts deleted file mode 100644 index 4d8c740a3..000000000 --- a/lib/routes/civitai/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'civitai.com': { - _name: 'Civitai', - '.': [ - { - title: 'Latest models', - docs: 'https://docs.rsshub.app/routes/program-update#civitai', - source: '/', - target: '/civitai/models', - }, - { - title: 'Discussions', - docs: 'https://docs.rsshub.app/routes/program-update#civitai', - source: '/models/:modelId', - target: '/civitai/discussions/:modelId', - }, - ], - }, -}; diff --git a/lib/routes/civitai/router.ts b/lib/routes/civitai/router.ts deleted file mode 100644 index 6ece3b6ba..000000000 --- a/lib/routes/civitai/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/models', './models'); - router.get('/discussions/:modelId', './discussions'); -}; diff --git a/lib/routes/ciweimao/chapter.ts b/lib/routes/ciweimao/chapter.ts index ebe69bded..6730920d0 100644 --- a/lib/routes/ciweimao/chapter.ts +++ b/lib/routes/ciweimao/chapter.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/ciweimao/chapter/100043404', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wap.ciweimao.com/book/:id'], + }, + name: '章节', + maintainers: ['keocheung'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 10; @@ -52,11 +74,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `刺猬猫 ${$('.book-name').text()}`, link: `${baseUrl}/book/${id}`, description: $('.book-desc div p').text(), image: $('meta[name=image]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/ciweimao/maintainer.ts b/lib/routes/ciweimao/maintainer.ts deleted file mode 100644 index a6a52ebce..000000000 --- a/lib/routes/ciweimao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/chapter/:id': ['keocheung'], -}; diff --git a/lib/routes/ciweimao/namespace.ts b/lib/routes/ciweimao/namespace.ts new file mode 100644 index 000000000..09b28e073 --- /dev/null +++ b/lib/routes/ciweimao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '刺猬猫', + url: 'wap.ciweimao.com', +}; diff --git a/lib/routes/ciweimao/radar.ts b/lib/routes/ciweimao/radar.ts deleted file mode 100644 index 6539650bf..000000000 --- a/lib/routes/ciweimao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ciweimao.com': { - _name: '刺猬猫', - wap: [ - { - title: '章节', - docs: 'https://docs.rsshub.app/routes/reading#ci-wei-mao', - source: ['/book/:id'], - target: '/ciweimao/chapter/:id', - }, - ], - }, -}; diff --git a/lib/routes/ciweimao/router.ts b/lib/routes/ciweimao/router.ts deleted file mode 100644 index 817fef3dd..000000000 --- a/lib/routes/ciweimao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/chapter/:id', './chapter'); -}; diff --git a/lib/routes/clickme/index.ts b/lib/routes/clickme/index.ts index 95926ceb5..6c6350180 100644 --- a/lib/routes/clickme/index.ts +++ b/lib/routes/clickme/index.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:site/:grouping/:name', + categories: ['other'], + example: '/clickme/default/category/beauty', + parameters: { site: '站点,`default`为普通站,`r18`为成人站,其它值默认为普通站', grouping: '分组方式,`category`为分类,`tag`为标签,其他值默认为分类', name: '分类名或标签名,分类名为英文,可以在分类 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const site = ctx.req.param('site') === 'r18' ? 'r18' : ''; const grouping = ctx.req.param('grouping') === 'tag' ? 'tag' : 'category'; const name = ctx.req.param('name'); @@ -49,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `ClickMe ${site ? 'R18 ' : ''}- ${displayed_name}`, link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/clickme/maintainer.ts b/lib/routes/clickme/maintainer.ts deleted file mode 100644 index fdac279ad..000000000 --- a/lib/routes/clickme/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:site/:grouping/:name': ['hoilc'], -}; diff --git a/lib/routes/clickme/namespace.ts b/lib/routes/clickme/namespace.ts new file mode 100644 index 000000000..2db57538e --- /dev/null +++ b/lib/routes/clickme/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ClickMe', + url: 'clickme.net', +}; diff --git a/lib/routes/clickme/radar.ts b/lib/routes/clickme/radar.ts deleted file mode 100644 index e6d85e326..000000000 --- a/lib/routes/clickme/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'clickme.net': { - _name: 'ClickMe', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/other#clickme', - source: ['/:grouping/:name'], - target: (params) => `/clickme/default/${params.grouping === 't' ? 'tag' : 'category'}/${params.name}`, - }, - ], - r18: [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/other#clickme', - source: ['/:grouping/:name'], - target: (params) => `/clickme/r18/${params.grouping === 't' ? 'tag' : 'category'}/${params.name}`, - }, - ], - }, -}; diff --git a/lib/routes/clickme/router.ts b/lib/routes/clickme/router.ts deleted file mode 100644 index e3e727848..000000000 --- a/lib/routes/clickme/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:site/:grouping/:name', './index'); -}; diff --git a/lib/routes/cloudnative/blog.ts b/lib/routes/cloudnative/blog.ts index 2ff6f9d14..46e74981b 100644 --- a/lib/routes/cloudnative/blog.ts +++ b/lib/routes/cloudnative/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -24,11 +25,29 @@ async function getArticles() { }); } -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/cloudnative/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '博客', + maintainers: ['aneasystone'], + handler, +}; + +async function handler() { const articles = await getArticles(); - ctx.set('data', { + return { title: '博客 | 云原生社区(中国)', link: 'https://cloudnative.to/blog/', item: articles, - }); -}; + }; +} diff --git a/lib/routes/cloudnative/maintainer.ts b/lib/routes/cloudnative/maintainer.ts deleted file mode 100644 index 1663d20b9..000000000 --- a/lib/routes/cloudnative/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['aneasystone'], -}; diff --git a/lib/routes/cloudnative/namespace.ts b/lib/routes/cloudnative/namespace.ts new file mode 100644 index 000000000..a5e84bcd4 --- /dev/null +++ b/lib/routes/cloudnative/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '云原生社区', + url: 'cloudnative.to', +}; diff --git a/lib/routes/cloudnative/radar.ts b/lib/routes/cloudnative/radar.ts deleted file mode 100644 index cfb1d8470..000000000 --- a/lib/routes/cloudnative/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cloudnative.to': { - _name: '云原生社区', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#yun-yuan-sheng-she-qu', - source: ['/blog'], - target: () => '/cloudnative/blog', - }, - ], - }, -}; diff --git a/lib/routes/cloudnative/router.ts b/lib/routes/cloudnative/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/cloudnative/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/cls/depth.ts b/lib/routes/cls/depth.ts index e7c075f7d..ee509259d 100644 --- a/lib/routes/cls/depth.ts +++ b/lib/routes/cls/depth.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -28,7 +29,28 @@ const categories = { 1176: '投教', }; -export default async (ctx) => { +export const route: Route = { + path: '/depth/:category?', + categories: ['finance'], + example: '/cls/depth/1000', + parameters: { category: '分类代码,可在首页导航栏的目标网址 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '深度', + maintainers: ['nczitzk'], + handler, + description: `| 头条 | 股市 | 港股 | 环球 | 公司 | 券商 | 基金 | 地产 | 金融 | 汽车 | 科创 | 创业版 | 品见 | 期货 | 投教 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | + | 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '1000'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -77,9 +99,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `财联社 - ${title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cls/hot.ts b/lib/routes/cls/hot.ts index 0f637d78f..47d268249 100644 --- a/lib/routes/cls/hot.ts +++ b/lib/routes/cls/hot.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ import * as path from 'node:path'; import { rootUrl, getSearchParams } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hot', + categories: ['finance'], + example: '/cls/hot', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cls.cn/'], + }, + name: '热门文章排行榜', + maintainers: ['5upernova-heng', 'nczitzk'], + handler, + url: 'cls.cn/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; const apiUrl = `${rootUrl}/v2/article/hot/list`; @@ -50,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '财联社 - 热门文章排行榜', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cls/maintainer.ts b/lib/routes/cls/maintainer.ts deleted file mode 100644 index 6197da4da..000000000 --- a/lib/routes/cls/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/depth/:category?': ['nczitzk'], - '/hot': ['5upernova-heng', 'nczitzk'], - '/telegraph/:category?': ['nczitzk'], -}; diff --git a/lib/routes/cls/namespace.ts b/lib/routes/cls/namespace.ts new file mode 100644 index 000000000..25ebea7ff --- /dev/null +++ b/lib/routes/cls/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '财联社', + url: 'cls.cn', +}; diff --git a/lib/routes/cls/radar.ts b/lib/routes/cls/radar.ts deleted file mode 100644 index f12e606fa..000000000 --- a/lib/routes/cls/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'cls.cn': { - _name: '财联社', - '.': [ - { - title: '电报', - docs: 'https://docs.rsshub.app/routes/finance#cai-lian-she', - source: ['/telegraph', '/'], - target: '/cls/telegraph', - }, - { - title: '深度', - docs: 'https://docs.rsshub.app/routes/finance#cai-lian-she', - source: ['/depth', '/'], - target: (_, url) => `/cls/depth/${new URL(url).searchParams.get('id')}`, - }, - { - title: '热门文章排行榜', - docs: 'https://docs.rsshub.app/routes/finance#cai-lian-she', - source: ['/'], - target: '/cls/hot', - }, - ], - }, -}; diff --git a/lib/routes/cls/router.ts b/lib/routes/cls/router.ts deleted file mode 100644 index 3ec322446..000000000 --- a/lib/routes/cls/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/depth/:category?', './depth'); - router.get('/hot', './hot'); - router.get('/telegraph/:category?', './telegraph'); -}; diff --git a/lib/routes/cls/telegraph.ts b/lib/routes/cls/telegraph.ts index 9893655b8..3d8988ac5 100644 --- a/lib/routes/cls/telegraph.ts +++ b/lib/routes/cls/telegraph.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -19,7 +20,33 @@ const categories = { hk: '港股', }; -export default async (ctx) => { +export const route: Route = { + path: '/telegraph/:category?', + categories: ['finance'], + example: '/cls/telegraph', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cls.cn/telegraph', 'cls.cn/'], + target: '/telegraph', + }, + name: '电报', + maintainers: ['nczitzk'], + handler, + url: 'cls.cn/telegraph', + description: `| 看盘 | 公司 | 解读 | 加红 | 推送 | 提醒 | 基金 | 港股 | + | ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- | + | watch | announcement | explain | red | jpush | remind | fund | hk |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -49,9 +76,9 @@ export default async (ctx) => { category: item.subjects?.map((s) => s.subject_name), })); - ctx.set('data', { + return { title: `财联社 - 电报${category === '' ? '' : ` - ${categories[category]}`}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cma/channel.ts b/lib/routes/cma/channel.ts index fe29423c1..04630c6a0 100644 --- a/lib/routes/cma/channel.ts +++ b/lib/routes/cma/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,51 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id?', + categories: ['forecast'], + example: '/cma/channel/380', + parameters: { id: '分类,见下表,可在对应频道页 URL 中找到,默认为 380,即每日天气提示' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '天气预报频道', + maintainers: ['nczitzk'], + handler, + description: `#### 天气实况 + + | 频道名称 | 频道 id | + | -------- | -------------------------------- | + | 卫星云图 | d3236549863e453aab0ccc4027105bad | + | 单站雷达 | 103 | + | 降水量 | 18 | + | 气温 | 32 | + | 土壤水分 | 45 | + + #### 气象公报 + + | 频道名称 | 频道 id | + | -------------- | -------------------------------- | + | 每日天气提示 | 380 | + | 重要天气提示 | da5d55817ad5430fb9796a0780178533 | + | 天气公报 | 3780 | + | 强对流天气预报 | 383 | + | 交通气象预报 | 423 | + | 森林火险预报 | 424 | + | 海洋天气公报 | 452 | + | 环境气象公报 | 467 | + + :::tip + 订阅更多细分频道,请前往对应上级频道页,使用下拉菜单选择项目后跳转到目标频道页,查看其 URL 找到对应频道 id + :::`, +}; + +async function handler(ctx) { const { id = '380' } = ctx.req.param(); const author = '中国气象局·天气预报'; @@ -74,7 +119,7 @@ export default async (ctx) => { ] : []; - ctx.set('data', { + return { item: items, title: `${author} - ${title}`, link: currentUrl, @@ -86,5 +131,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/cma/maintainer.ts b/lib/routes/cma/maintainer.ts deleted file mode 100644 index e9c6efacd..000000000 --- a/lib/routes/cma/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/channel/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cma/namespace.ts b/lib/routes/cma/namespace.ts new file mode 100644 index 000000000..e66f2e669 --- /dev/null +++ b/lib/routes/cma/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国气象局', + url: 'weather.cma.cn', +}; diff --git a/lib/routes/cma/radar.ts b/lib/routes/cma/radar.ts deleted file mode 100644 index a4e53a628..000000000 --- a/lib/routes/cma/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'cma.cn': { - _name: '中国气象局', - weather: [ - { - title: '天气预报频道', - docs: 'https://docs.rsshub.app/routes/forecast#zhong-guo-qi-xiang-ju-tian-qi-yu-bao-pin-dao', - source: ['/web/*'], - target: (_, url) => { - url = new URL(url).href; - const idMatches = url.match(/channel-(\d+)\.html/); - - return `/cma/channel${idMatches ? `/${idMatches[1]}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/cma/router.ts b/lib/routes/cma/router.ts deleted file mode 100644 index f067105bd..000000000 --- a/lib/routes/cma/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/channel/:id?', './channel'); -}; diff --git a/lib/routes/cmde/index.ts b/lib/routes/cmde/index.ts index 2e40d5610..c0d375e22 100644 --- a/lib/routes/cmde/index.ts +++ b/lib/routes/cmde/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; @@ -6,7 +7,14 @@ import puppeteer from '@/utils/puppeteer'; const rootURL = 'https://www.cmde.org.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/:cate{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const cate = ctx.req.param('cate') ?? 'xwdt/zxyw'; const url = `${rootURL}/${cate}/`; const browser = await puppeteer({ stealth: true }); @@ -65,10 +73,10 @@ export default async (ctx) => { await browser.close(); - ctx.set('data', { + return { title: data.title, description: data.description, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cmde/maintainer.ts b/lib/routes/cmde/maintainer.ts deleted file mode 100644 index f8288e773..000000000 --- a/lib/routes/cmde/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:cate*': ['run-ze'], -}; diff --git a/lib/routes/cmde/namespace.ts b/lib/routes/cmde/namespace.ts new file mode 100644 index 000000000..7e5f807cb --- /dev/null +++ b/lib/routes/cmde/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家药品监督管理局医疗器械技术审评中心', + url: 'www.cmde.org.cn', +}; diff --git a/lib/routes/cmde/radar.ts b/lib/routes/cmde/radar.ts deleted file mode 100644 index dab33c766..000000000 --- a/lib/routes/cmde/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cmde.org.cn': { - _name: '国家药品监督管理局医疗器械技术审评中心', - www: [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-ji-shu-shen-ping-zhong-xin', - source: ['/*cate'], - target: (params) => `/cmde/${params.cate.replace('/index.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/cmde/router.ts b/lib/routes/cmde/router.ts deleted file mode 100644 index 1aae1e8b1..000000000 --- a/lib/routes/cmde/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:cate{.+}?', './index'); -}; diff --git a/lib/routes/cmpxchg8b/articles.ts b/lib/routes/cmpxchg8b/articles.ts index 4b3e22ea7..79cede468 100644 --- a/lib/routes/cmpxchg8b/articles.ts +++ b/lib/routes/cmpxchg8b/articles.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { load } from 'cheerio'; const baseUrl = 'https://lock.cmpxchg8b.com/'; const title = 'cmpxchg8b'; -export default async (ctx) => { +export const route: Route = { + path: '/articles', + categories: ['blog'], + example: '/cmpxchg8b/articles', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lock.cmpxchg8b.com/articles'], + }, + name: 'Articles', + maintainers: ['yuguorui'], + handler, + url: 'lock.cmpxchg8b.com/articles', +}; + +async function handler() { const { data: response } = await got(baseUrl); const $ = load(response); @@ -36,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: new URL('#articles', baseUrl).toString(), item: items, - }); -}; + }; +} diff --git a/lib/routes/cmpxchg8b/maintainer.ts b/lib/routes/cmpxchg8b/maintainer.ts deleted file mode 100644 index d41b322f3..000000000 --- a/lib/routes/cmpxchg8b/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/articles': ['yuguorui'], -}; diff --git a/lib/routes/cmpxchg8b/namespace.ts b/lib/routes/cmpxchg8b/namespace.ts new file mode 100644 index 000000000..08d1eb839 --- /dev/null +++ b/lib/routes/cmpxchg8b/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'cmpxchg8b', + url: 'lock.cmpxchg8b.com', +}; diff --git a/lib/routes/cmpxchg8b/radar.ts b/lib/routes/cmpxchg8b/radar.ts deleted file mode 100644 index 304fbe9af..000000000 --- a/lib/routes/cmpxchg8b/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cmpxchg8b.com': { - _name: 'cmpxchg8b', - lock: [ - { - title: '文章 articles', - docs: 'https://docs.rsshub.app/routes/blog#cmpxchg8b', - source: ['/articles'], - target: '/cmpxchg8b/articles', - }, - ], - }, -}; diff --git a/lib/routes/cmpxchg8b/router.ts b/lib/routes/cmpxchg8b/router.ts deleted file mode 100644 index 9a797dbf8..000000000 --- a/lib/routes/cmpxchg8b/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/articles', './articles'); -}; diff --git a/lib/routes/cn-healthcare/index.ts b/lib/routes/cn-healthcare/index.ts index 47201f03f..828396d38 100644 --- a/lib/routes/cn-healthcare/index.ts +++ b/lib/routes/cn-healthcare/index.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.cn-healthcare.com'; -export default async (ctx) => { +export const route: Route = { + path: '/index', + categories: ['new-media'], + example: '/cn-healthcare/index', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cn-healthcare.com/'], + }, + name: '首页', + maintainers: ['qnloft'], + handler, + url: 'cn-healthcare.com/', +}; + +async function handler() { const response = await got({ method: 'get', url: `${baseUrl}/api/article/articlelist?data={%22start%22:%221%22,%22size%22:%2250%22,%22arctype%22:%220%22,%22wmstart%22:%220%22,%22flag%22:%222%22}`, }); const data = response.data.data; const name = '健康界 [cn-healthcare] '; - ctx.set('data', { + return { // 源标题 title: name, // 源链接 @@ -27,5 +50,5 @@ export default async (ctx) => { // 文章链接 link: `${baseUrl}${item.url}`, })), - }); -}; + }; +} diff --git a/lib/routes/cn-healthcare/maintainer.ts b/lib/routes/cn-healthcare/maintainer.ts deleted file mode 100644 index 5749bfb52..000000000 --- a/lib/routes/cn-healthcare/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/index': ['qnloft'], -}; diff --git a/lib/routes/cn-healthcare/namespace.ts b/lib/routes/cn-healthcare/namespace.ts new file mode 100644 index 000000000..ca76d1626 --- /dev/null +++ b/lib/routes/cn-healthcare/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '健康界', + url: 'cn-healthcare.com', +}; diff --git a/lib/routes/cn-healthcare/radar.ts b/lib/routes/cn-healthcare/radar.ts deleted file mode 100644 index 5489c865b..000000000 --- a/lib/routes/cn-healthcare/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cn-healthcare.com': { - _name: '健康界', - '.': [ - { - title: '首页-资讯', - docs: 'https://docs.rsshub.app/routes/new-media#jian-kang-jie', - source: ['/'], - target: '/cn-healthcare/index', - }, - ], - }, -}; diff --git a/lib/routes/cn-healthcare/router.ts b/lib/routes/cn-healthcare/router.ts deleted file mode 100644 index 5dc900cd2..000000000 --- a/lib/routes/cn-healthcare/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/index', './index'); -}; diff --git a/lib/routes/cna/index.ts b/lib/routes/cna/index.ts index 54ff8dfd3..aa52841a9 100644 --- a/lib/routes/cna/index.ts +++ b/lib/routes/cna/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['traditional-media'], + example: '/cna/aall', + parameters: { id: '分类 id 或新闻专题 id。分类 id 见下表,新闻专题 id 為 https://www.cna.com.tw/list/newstopic.aspx 中,連結的數字部份。此參數默认为 aall' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') || 'aall'; const isTopic = /^\d+$/.test(id); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -55,11 +77,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: metadata.Title, description: metadata.Description, link: metadata.CanonicalUrl, image: metadata.Image, item: items, - }); -}; + }; +} diff --git a/lib/routes/cna/maintainer.ts b/lib/routes/cna/maintainer.ts deleted file mode 100644 index 24c7d32b3..000000000 --- a/lib/routes/cna/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:id?': ['nczitzk'], - '/web/:id?': ['dzx-dzx'], -}; diff --git a/lib/routes/cna/namespace.ts b/lib/routes/cna/namespace.ts new file mode 100644 index 000000000..73b8155d6 --- /dev/null +++ b/lib/routes/cna/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中央通讯社', + url: 'cna.com.tw', +}; diff --git a/lib/routes/cna/radar.ts b/lib/routes/cna/radar.ts deleted file mode 100644 index d0793e7d6..000000000 --- a/lib/routes/cna/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cna.com.tw': { - _name: '中央通訊社', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-yang-tong-xun-she', - source: ['/list/:id', '/topic/newstopic/:id'], - target: (params) => `/cna/${params.id.replace('.aspx', '')}`, - }, - { - title: '分类(网页爬虫方法)', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-yang-tong-xun-she', - source: ['/list/:id'], - target: (params) => `/cna/web/${params.id.replace('.aspx', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/cna/router.ts b/lib/routes/cna/router.ts deleted file mode 100644 index 772e0c286..000000000 --- a/lib/routes/cna/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:id?', './'); - router.get('/web/:id?', './web/'); -}; diff --git a/lib/routes/cna/web/index.ts b/lib/routes/cna/web/index.ts index 412a4d036..e00f3cce9 100644 --- a/lib/routes/cna/web/index.ts +++ b/lib/routes/cna/web/index.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/web/:id?', + categories: ['traditional-media'], + example: '/cna/web/aall', + parameters: { id: '分类 id,见上表。此參數默认为 aall' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['dzx-dzx'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') || 'aall'; const rootUrl = /^\d+$/.test(id) ? `https://www.cna.com.tw/topic/newstopic/${id}.aspx` : `https://www.cna.com.tw/list/${id}.aspx`; @@ -49,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cnbc/maintainer.ts b/lib/routes/cnbc/maintainer.ts deleted file mode 100644 index 00dcef124..000000000 --- a/lib/routes/cnbc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/rss/:id?': ['TonyRL'], -}; diff --git a/lib/routes/cnbc/namespace.ts b/lib/routes/cnbc/namespace.ts new file mode 100644 index 000000000..6243dcb51 --- /dev/null +++ b/lib/routes/cnbc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CNBC', + url: 'search.cnbc.com', +}; diff --git a/lib/routes/cnbc/radar.ts b/lib/routes/cnbc/radar.ts deleted file mode 100644 index 4c3d1257f..000000000 --- a/lib/routes/cnbc/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'cnbc.com': { - _name: 'CNBC', - search: [ - { - title: '全文 RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#cnbc', - source: ['/rs/search/combinedcms/view.xml'], - target: (_, url) => `/cnbc/rss/${new URL(url).searchParams.get('id')}`, - }, - ], - www: [ - { - title: '全文 RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#cnbc', - source: ['/id/:id/device/rss/rss.html'], - target: '/cnbc/rss/:id', - }, - ], - }, -}; diff --git a/lib/routes/cnbc/router.ts b/lib/routes/cnbc/router.ts deleted file mode 100644 index 806f509d5..000000000 --- a/lib/routes/cnbc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/rss/:id?', './rss'); -}; diff --git a/lib/routes/cnbc/rss.ts b/lib/routes/cnbc/rss.ts index 4348d5ba3..943ca4c4c 100644 --- a/lib/routes/cnbc/rss.ts +++ b/lib/routes/cnbc/rss.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/rss/:id?', + categories: ['traditional-media'], + example: '/cnbc/rss', + parameters: { id: 'Channel ID, can be found in Official RSS URL, `100003114` (Top News) by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cnbc.com/id/:id/device/rss/rss.html'], + target: '/rss/:id', + }, + name: 'Full article RSS', + maintainers: ['TonyRL'], + handler, + description: `Provides a better reading experience (full articles) over the official ones. + + Support all channels, refer to [CNBC RSS feeds](https://www.cnbc.com/rss-feeds/).`, +}; + +async function handler(ctx) { const { id = '100003114' } = ctx.req.param(); const feed = await parser.parseURL(`https://search.cnbc.com/rs/search/combinedcms/view.xml?partnerId=wrss01&id=${id}`); @@ -45,11 +71,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, language: feed.language, - }); -}; + }; +} diff --git a/lib/routes/cnbeta/maintainer.ts b/lib/routes/cnbeta/maintainer.ts deleted file mode 100644 index 30b1305ef..000000000 --- a/lib/routes/cnbeta/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/': ['nczitzk'], - '/category/:id': ['nczitzk'], - '/topics/:id': ['nczitzk'], -}; diff --git a/lib/routes/cnbeta/namespace.ts b/lib/routes/cnbeta/namespace.ts new file mode 100644 index 000000000..af50033d3 --- /dev/null +++ b/lib/routes/cnbeta/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'cnBeta.COM', + url: 'cnbeta.com.tw', +}; diff --git a/lib/routes/cnbeta/radar.ts b/lib/routes/cnbeta/radar.ts deleted file mode 100644 index 186414427..000000000 --- a/lib/routes/cnbeta/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'cnbeta.com.tw': { - _name: 'cnBeta.COM', - '.': [ - { - title: '头条资讯', - docs: 'https://docs.rsshub.app/routes/new-media#cnbeta-com-tou-tiao-zi-xun', - source: ['/'], - target: '/cnbeta', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#cnbeta-com-fen-lei', - source: ['/category/:id', '/'], - target: '/cnbeta/category/:id', - }, - { - title: '主题', - docs: 'https://docs.rsshub.app/routes/new-media#cnbeta-com-zhu-ti', - source: ['/topics/:id', '/'], - target: '/cnbeta/topics/:id', - }, - ], - }, -}; diff --git a/lib/routes/cnbeta/router.ts b/lib/routes/cnbeta/router.ts deleted file mode 100644 index 1a464e16e..000000000 --- a/lib/routes/cnbeta/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:type/:id', './type'); - router.get('/', './type'); -}; diff --git a/lib/routes/cnbeta/type.ts b/lib/routes/cnbeta/type.ts index fa1f5e711..a4314dab3 100644 --- a/lib/routes/cnbeta/type.ts +++ b/lib/routes/cnbeta/type.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,20 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/:type/:id', '/'], + radar: { + source: ['cnbeta.com.tw/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'cnbeta.com.tw/', + url: 'cnbeta.com.tw/', +}; + +async function handler(ctx) { const { type, id } = ctx.req.param(); const currentUrl = type ? `${rootUrl}/${type}/${id}.htm` : rootUrl; @@ -35,9 +49,9 @@ export default async (ctx) => { category: item.label.name, })); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: await ProcessItems(items, ctx.req.query('limit'), cache.tryGet), - }); -}; + }; +} diff --git a/lib/routes/cnblogs/common.ts b/lib/routes/cnblogs/common.ts index cb6c82cad..96ace0eb6 100644 --- a/lib/routes/cnblogs/common.ts +++ b/lib/routes/cnblogs/common.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: ['/aggsite/topdiggs', '/aggsite/topviews', '/aggsite/headline', '/cate/:type', '/pick'], + categories: ['blog'], + example: '/cnblogs/aggsite/topdiggs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cnblogs.com/aggsite/topdiggs'], + }, + name: '10 天推荐排行榜', + maintainers: ['hujingnb'], + handler, + url: 'www.cnblogs.com/pick', + description: `在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: \`https://www.cnblogs.com/cate/go/\`, 则: [\`/cnblogs/cate/go\`](https://rsshub.app/cnblogs/cate/go)`, + url: 'www.cnblogs.com/aggsite/headline', + url: 'www.cnblogs.com/aggsite/topviews', + url: 'www.cnblogs.com/aggsite/topdiggs', +}; + +async function handler(ctx) { const link = `https://www.cnblogs.com${getSubPath(ctx)}`; const response = await got(link); const data = response.data; @@ -23,9 +50,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link, item: list, - }); -}; + }; +} diff --git a/lib/routes/cnblogs/maintainer.ts b/lib/routes/cnblogs/maintainer.ts deleted file mode 100644 index 2e0e0b4c9..000000000 --- a/lib/routes/cnblogs/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/aggsite/topdiggs': ['hujingnb'], - '/aggsite/topviews': ['hujingnb'], - '/aggsite/headline': ['hujingnb'], - '/cate/:type': ['hujingnb'], - '/pick': ['hujingnb'], -}; diff --git a/lib/routes/cnblogs/namespace.ts b/lib/routes/cnblogs/namespace.ts new file mode 100644 index 000000000..c7434c16a --- /dev/null +++ b/lib/routes/cnblogs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '博客园', + url: 'www.cnblogs.com', +}; diff --git a/lib/routes/cnblogs/radar.ts b/lib/routes/cnblogs/radar.ts deleted file mode 100644 index f1ac6f2d9..000000000 --- a/lib/routes/cnblogs/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'cnblogs.com': { - _name: '博客园', - www: [ - { - title: '10天推荐排行榜', - docs: 'https://docs.rsshub.app/routes/blog#博客园', - source: ['/aggsite/topdiggs'], - target: '/cnblogs/aggsite/topdiggs', - }, - { - title: '48小时阅读排行', - docs: 'https://docs.rsshub.app/routes/blog#博客园', - source: ['/aggsite/topviews'], - target: '/cnblogs/aggsite/topviews', - }, - { - title: '编辑推荐', - docs: 'https://docs.rsshub.app/routes/blog#博客园', - source: ['/aggsite/headline'], - target: '/cnblogs/aggsite/headline', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/blog#博客园', - source: ['/cate/:type'], - target: '/cnblogs/cate/:type', - }, - { - title: '精华区', - docs: 'https://docs.rsshub.app/routes/blog#博客园', - source: ['/pick'], - target: '/cnblogs/pick', - }, - ], - }, -}; diff --git a/lib/routes/cnblogs/router.ts b/lib/routes/cnblogs/router.ts deleted file mode 100644 index bdc0146f7..000000000 --- a/lib/routes/cnblogs/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/aggsite/topdiggs', './common'); - router.get('/aggsite/topviews', './common'); - router.get('/aggsite/headline', './common'); - router.get('/cate/:type', './common'); - router.get('/pick', './common'); -}; diff --git a/lib/routes/cncf/index.ts b/lib/routes/cncf/index.ts index e09a11683..409bfcc82 100644 --- a/lib/routes/cncf/index.ts +++ b/lib/routes/cncf/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const rootURL = 'https://www.cncf.io'; -export default async (ctx) => { +export const route: Route = { + path: '/:cate?', + categories: ['programming'], + example: '/cncf', + parameters: { cate: 'blog by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['Fatpandac'], + handler, + description: `| Blog | News | Announcements | Reports | + | ---- | ---- | ------------- | ------- | + | blog | news | announcements | reports |`, +}; + +async function handler(ctx) { const cate = ctx.req.param('cate') ?? 'blog'; const url = `${rootURL}/${cate}/`; @@ -36,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `CNCF - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cncf/maintainer.ts b/lib/routes/cncf/maintainer.ts deleted file mode 100644 index 1d2dbd2f9..000000000 --- a/lib/routes/cncf/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:cate?': ['Fatpandac'], -}; diff --git a/lib/routes/cncf/namespace.ts b/lib/routes/cncf/namespace.ts new file mode 100644 index 000000000..87bbbe178 --- /dev/null +++ b/lib/routes/cncf/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CNCF', + url: 'cncf.io', +}; diff --git a/lib/routes/cncf/radar.ts b/lib/routes/cncf/radar.ts deleted file mode 100644 index f819b14f2..000000000 --- a/lib/routes/cncf/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'cncf.io': { - _name: 'CNCF', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/programming#cncf', - source: ['/blog'], - target: '/cncf/blog', - }, - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/programming#cncf', - source: ['/news'], - target: '/cncf/news', - }, - { - title: 'Announcements', - docs: 'https://docs.rsshub.app/routes/programming#cncf', - source: ['/announcements'], - target: '/cncf/announcements', - }, - { - title: 'Reports', - docs: 'https://docs.rsshub.app/routes/programming#cncf', - source: ['/reports'], - target: '/cncf/reports', - }, - ], - }, -}; diff --git a/lib/routes/cncf/reports.ts b/lib/routes/cncf/reports.ts index 4fb631623..621a61a8f 100644 --- a/lib/routes/cncf/reports.ts +++ b/lib/routes/cncf/reports.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,18 @@ import { parseDate } from '@/utils/parse-date'; const rootURL = 'https://www.cncf.io'; -export default async (ctx) => { +export const route: Route = { + path: '/reports', + radar: { + source: ['cncf.io/reports'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'cncf.io/reports', +}; + +async function handler() { const url = `${rootURL}/reports/`; const response = await got(url); @@ -31,9 +43,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `CNCF - Reports`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cncf/router.ts b/lib/routes/cncf/router.ts deleted file mode 100644 index 220528d80..000000000 --- a/lib/routes/cncf/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/reports', './reports'); - router.get('/:cate?', './index'); -}; diff --git a/lib/routes/cneb/maintainer.ts b/lib/routes/cneb/maintainer.ts deleted file mode 100644 index 5bb58cdc2..000000000 --- a/lib/routes/cneb/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/yjxw/:category?': ['nczitzk'], - '/yjxx/:level?/:province?/:city?': ['muzea', 'nczitzk'], -}; diff --git a/lib/routes/cneb/namespace.ts b/lib/routes/cneb/namespace.ts new file mode 100644 index 000000000..7a03e739e --- /dev/null +++ b/lib/routes/cneb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国国家应急广播', + url: 'cneb.gov.cn', +}; diff --git a/lib/routes/cneb/radar.ts b/lib/routes/cneb/radar.ts deleted file mode 100644 index 4f484d960..000000000 --- a/lib/routes/cneb/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cneb.gov.cn': { - _name: '中国国家应急广播', - '.': [ - { - title: '应急新闻', - docs: 'https://docs.rsshub.app/routes/forecast#zhong-guo-guo-jia-ying-ji-guang-bo', - source: ['/yjxw/:category?', '/'], - target: '/cneb/yjxw/:category?', - }, - { - title: '预警信息', - docs: 'https://docs.rsshub.app/routes/forecast#zhong-guo-guo-jia-ying-ji-guang-bo', - source: ['/yjxx', '/'], - target: '/cneb/yjxx', - }, - ], - }, -}; diff --git a/lib/routes/cneb/router.ts b/lib/routes/cneb/router.ts deleted file mode 100644 index 5acb6bf57..000000000 --- a/lib/routes/cneb/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/yjxw/:category?', './yjxw'); - router.get('/yjxx/*', './yjxx'); -}; diff --git a/lib/routes/cneb/yjxw.ts b/lib/routes/cneb/yjxw.ts index 4a99c52db..b3ca91e1b 100644 --- a/lib/routes/cneb/yjxw.ts +++ b/lib/routes/cneb/yjxw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,31 @@ const indexs = { gjxw: 1, }; -export default async (ctx) => { +export const route: Route = { + path: '/yjxw/:category?', + categories: ['forecast'], + example: '/cneb/yjxw', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cneb.gov.cn/yjxw/:category?', 'cneb.gov.cn/'], + }, + name: '应急新闻', + maintainers: ['nczitzk'], + handler, + description: `| 全部 | 国内新闻 | 国际新闻 | + | ---- | -------- | -------- | + | | gnxw | gjxw |`, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 400; const category = ctx.req.param('category') ?? ''; @@ -65,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `国家应急广播 - ${index === -1 ? '新闻' : $('.select').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cneb/yjxx.ts b/lib/routes/cneb/yjxx.ts index 2b96944c9..ae265831b 100644 --- a/lib/routes/cneb/yjxx.ts +++ b/lib/routes/cneb/yjxx.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjxx/*', + radar: { + source: ['cneb.gov.cn/yjxx', 'cneb.gov.cn/'], + target: '/yjxx', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'cneb.gov.cn/yjxx', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 200; const options = decodeURI(getSubPath(ctx)) @@ -42,10 +55,10 @@ export default async (ctx) => { pubDate: timezone(parseDate(item.docpubtime), +8), })); - ctx.set('data', { + return { title: `国家应急广播 - ${title}预警信息`, link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/cngal/entry.ts b/lib/routes/cngal/entry.ts index f77536950..c89e041c7 100644 --- a/lib/routes/cngal/entry.ts +++ b/lib/routes/cngal/entry.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,14 +8,35 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/entry/:id', + categories: ['anime'], + example: '/cngal/entry/2693', + parameters: { id: '词条ID,游戏或制作者页面URL的最后一串数字' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cngal.org/entries/index/:id'], + }, + name: '制作者 / 游戏新闻', + maintainers: ['chengyuhui'], + handler, +}; + +async function handler(ctx) { const entryId = ctx.req.param('id'); const response = await got(`https://www.cngal.org/api/entries/GetEntryView/${entryId}`); const data = response.data; - ctx.set('data', { + return { title: `CnGal - ${data.name} 的动态`, link: `https://www.cngal.org/entries/index/${entryId}`, item: data.newsOfEntry.map((item) => ({ @@ -23,6 +45,6 @@ export default async (ctx) => { pubDate: timezone(parseDate(item.happenedTime), +8), link: item.link, })), - }); + }; ctx.set('json', response.data); -}; +} diff --git a/lib/routes/cngal/maintainer.ts b/lib/routes/cngal/maintainer.ts deleted file mode 100644 index cd0be259d..000000000 --- a/lib/routes/cngal/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/entry/:id': ['chengyuhui'], - '/weekly': ['chengyuhui'], -}; diff --git a/lib/routes/cngal/namespace.ts b/lib/routes/cngal/namespace.ts new file mode 100644 index 000000000..a562b96ab --- /dev/null +++ b/lib/routes/cngal/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CnGal', + url: 'www.cngal.org', +}; diff --git a/lib/routes/cngal/radar.ts b/lib/routes/cngal/radar.ts deleted file mode 100644 index 5f80aa636..000000000 --- a/lib/routes/cngal/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cngal.org': { - _name: 'CnGal', - www: [ - { - title: '每周速报', - docs: 'https://docs.rsshub.app/routes/anime#cngal-mei-zhou-su-bao', - source: ['/', '/weeklynews'], - target: '/cngal/weekly', - }, - { - title: '制作者/游戏新闻', - docs: 'https://docs.rsshub.app/routes/anime#cngal-zhi-zuo-zhe-you-xi-xin-wen', - source: ['/entries/index/:id'], - target: '/cngal/entry/:id', - }, - ], - }, -}; diff --git a/lib/routes/cngal/router.ts b/lib/routes/cngal/router.ts deleted file mode 100644 index 8034f2f1c..000000000 --- a/lib/routes/cngal/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/entry/:id', './entry'); - router.get('/weekly', './weekly'); -}; diff --git a/lib/routes/cngal/weekly.ts b/lib/routes/cngal/weekly.ts index 9d27b0764..aad37a2ae 100644 --- a/lib/routes/cngal/weekly.ts +++ b/lib/routes/cngal/weekly.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,10 +7,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly', + categories: ['anime'], + example: '/cngal/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cngal.org/', 'www.cngal.org/weeklynews'], + }, + name: '每周速报', + maintainers: ['chengyuhui'], + handler, + url: 'www.cngal.org/', +}; + +async function handler(ctx) { const response = await got('https://www.cngal.org/api/news/GetWeeklyNewsOverview'); - ctx.set('data', { + return { title: 'CnGal - 每周速报', link: 'https://www.cngal.org/weeklynews', item: response.data.map((item) => ({ @@ -18,6 +41,6 @@ export default async (ctx) => { pubDate: parseDate(item.lastEditTime), link: `https://www.cngal.org/articles/index/${item.id}`, })), - }); + }; ctx.state.json = response.data; -}; +} diff --git a/lib/routes/cnjxol/index.ts b/lib/routes/cnjxol/index.ts index 605ab76c6..aa4734859 100644 --- a/lib/routes/cnjxol/index.ts +++ b/lib/routes/cnjxol/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -13,7 +14,14 @@ const categories = { nhwb: '南湖晚报', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:id?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'jxrb'; const id = ctx.req.param('id'); if (!Object.keys(categories).includes(category)) { @@ -93,9 +101,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${categories[category]}${id ? ` - ${$('#layout').text()}` : ''}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cnjxol/maintainer.ts b/lib/routes/cnjxol/maintainer.ts deleted file mode 100644 index a4ca9ec1f..000000000 --- a/lib/routes/cnjxol/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jxrb/:id?': ['nczitzk'], - '/nhwb/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cnjxol/namespace.ts b/lib/routes/cnjxol/namespace.ts new file mode 100644 index 000000000..544198662 --- /dev/null +++ b/lib/routes/cnjxol/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南湖清风', + url: 'cnjxol.com', +}; diff --git a/lib/routes/cnjxol/radar.ts b/lib/routes/cnjxol/radar.ts deleted file mode 100644 index d4370e28a..000000000 --- a/lib/routes/cnjxol/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cnjxol.com': { - _name: '南湖清风', - '.': [ - { - title: '嘉兴日报', - docs: 'https://docs.rsshub.app/routes/traditional-media#nan-hu-qing-feng-jia-xing-ri-bao', - source: ['/'], - target: '/cnjxol/jxrb/:id', - }, - { - title: '南湖晚报', - docs: 'https://docs.rsshub.app/routes/traditional-media#nan-hu-qing-feng-nan-hu-wan-bao', - source: ['/'], - target: '/cnjxol/nhwb/:id', - }, - ], - }, -}; diff --git a/lib/routes/cnjxol/router.ts b/lib/routes/cnjxol/router.ts deleted file mode 100644 index 053ae4cee..000000000 --- a/lib/routes/cnjxol/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:id?', './index'); -}; diff --git a/lib/routes/cnki/author.ts b/lib/routes/cnki/author.ts index ecbe40fc3..adb428d2e 100644 --- a/lib/routes/cnki/author.ts +++ b/lib/routes/cnki/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import utils from './utils'; const rootUrl = 'https://kns.cnki.net'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:code', + categories: ['journal'], + example: '/cnki/author/000042423923', + parameters: { code: '作者对应code,可以在网址中得到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['harveyqiu', 'Derekmini'], + handler, +}; + +async function handler(ctx) { const code = ctx.req.param('code'); const authorInfoUrl = `${rootUrl}/kcms/detail/knetsearch.aspx?sfield=au&code=${code}`; @@ -50,9 +69,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => utils.ProcessItem(item)))); - ctx.set('data', { + return { title: `知网 ${authorName} ${companyName}`, link: authorInfoUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cnki/debut.ts b/lib/routes/cnki/debut.ts index 9f5fd3799..cd3f82827 100644 --- a/lib/routes/cnki/debut.ts +++ b/lib/routes/cnki/debut.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,28 @@ import * as path from 'node:path'; const rootUrl = 'https://chn.oversea.cnki.net'; -export default async (ctx) => { +export const route: Route = { + path: '/journals/debut/:name', + categories: ['journal'], + example: '/cnki/journals/debut/LKGP', + parameters: { name: '期刊缩写,可以在网址中得到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['navi.cnki.net/knavi/journals/:name/detail'], + }, + name: '网络首发', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const journalUrl = `${rootUrl}/knavi/JournalDetail?pcode=CjFD&pykm=${name}`; @@ -58,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title} - 全网首发`, link: `https://navi.cnki.net/knavi/journals/${name}/detail`, item: items, - }); -}; + }; +} diff --git a/lib/routes/cnki/journals.ts b/lib/routes/cnki/journals.ts index afda5fdfb..922310d88 100644 --- a/lib/routes/cnki/journals.ts +++ b/lib/routes/cnki/journals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import { ProcessItem } from './utils'; const rootUrl = 'https://navi.cnki.net'; -export default async (ctx) => { +export const route: Route = { + path: '/journals/:name', + categories: ['journal'], + example: '/cnki/journals/LKGP', + parameters: { name: '期刊缩写,可以在网址中得到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['navi.cnki.net/knavi/journals/:name/detail'], + }, + name: '期刊', + maintainers: ['Fatpandac', 'Derekmini'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const journalUrl = `${rootUrl}/knavi/journals/${name}/detail`; const title = await got.get(journalUrl).then((res) => load(res.data)('head > title').text()); @@ -42,9 +64,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => ProcessItem(item)))); - ctx.set('data', { + return { title: String(title), link: journalUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cnki/maintainer.ts b/lib/routes/cnki/maintainer.ts deleted file mode 100644 index 3f2820daa..000000000 --- a/lib/routes/cnki/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/journals/:name': ['Fatpandac', 'Derekmini'], - '/journals/debut/:name': ['Fatpandac'], - '/author/:code': ['harveyqiu', 'Derekmini'], -}; diff --git a/lib/routes/cnki/namespace.ts b/lib/routes/cnki/namespace.ts new file mode 100644 index 000000000..290ad000e --- /dev/null +++ b/lib/routes/cnki/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国知网', + url: 'navi.cnki.net', +}; diff --git a/lib/routes/cnki/radar.ts b/lib/routes/cnki/radar.ts deleted file mode 100644 index f61b9f2a0..000000000 --- a/lib/routes/cnki/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'cnki.net': { - _name: '中国知网', - navi: [ - { - title: '期刊', - docs: 'https://docs.rsshub.app/routes/journal#zhong-guo-zhi-wang-qi-kan', - source: ['/knavi/journals/:name/detail'], - target: '/cnki/journals/:name', - }, - { - title: '网络首发', - docs: 'https://docs.rsshub.app/routes/journal#zhong-guo-zhi-wang-wang-luo-shou-fa', - source: ['/knavi/journals/:name/detail'], - target: '/cnki/journals/debut/:name', - }, - ], - kns: [ - { - title: '作者期刊文献', - docs: 'https://docs.rsshub.app/routes/journal#zhong-guo-zhi-wang-zuo-zhe-qi-kan-wen-xian', - source: ['/kcms/detail/knetsearch.aspx', '/'], - target: (_, url) => `/cnki/author/${new URL(url).searchParams.get('code')}`, - }, - ], - }, -}; diff --git a/lib/routes/cnki/router.ts b/lib/routes/cnki/router.ts deleted file mode 100644 index e8ee53fa5..000000000 --- a/lib/routes/cnki/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/journals/:name', './journals'); - router.get('/journals/debut/:name', './debut'); - router.get('/author/:code', './author'); -}; diff --git a/lib/routes/cnljxh/index.ts b/lib/routes/cnljxh/index.ts index c508827e3..b7d3297f9 100644 --- a/lib/routes/cnljxh/index.ts +++ b/lib/routes/cnljxh/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,14 @@ const defaultIds = { price: '299', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:id?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'news', id = Object.hasOwn(defaultIds, category) ? defaultIds[category] : '10' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -57,7 +65,7 @@ export default async (ctx) => { const image = new URL($('div.logo a img').prop('src'), currentUrl).href; const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -68,5 +76,5 @@ export default async (ctx) => { logo: icon, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/cnljxh/maintainer.ts b/lib/routes/cnljxh/maintainer.ts deleted file mode 100644 index 1d43850bc..000000000 --- a/lib/routes/cnljxh/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/collect/:id?': ['nczitzk'], - '/date/:id?': ['nczitzk'], - '/info/:id?': ['nczitzk'], - '/news/:id?': ['nczitzk'], - '/price/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cnljxh/namespace.ts b/lib/routes/cnljxh/namespace.ts new file mode 100644 index 000000000..74ef7189f --- /dev/null +++ b/lib/routes/cnljxh/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国炼焦行业协会', + url: 'cnljxh.com', +}; diff --git a/lib/routes/cnljxh/radar.ts b/lib/routes/cnljxh/radar.ts deleted file mode 100644 index 3976e146a..000000000 --- a/lib/routes/cnljxh/radar.ts +++ /dev/null @@ -1,194 +0,0 @@ -export default { - 'cnljxh.com': { - _name: '中国炼焦行业协会', - '.': [ - { - title: '汇总', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-hui-zong', - source: ['/collect'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('classid'); - - return `/cnljxh/collect${id ? `/${id}` : ''}`; - }, - }, - { - title: '价格指数', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge-zhi-shu', - source: ['/date'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('classid'); - - return `/cnljxh/date${id ? `/${id}` : ''}`; - }, - }, - { - title: '分析数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-fen-xi-shu-ju', - source: ['/info'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('classid'); - - return `/cnljxh/info${id ? `/${id}` : ''}`; - }, - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('classid'); - - return `/cnljxh/news${id ? `/${id}` : ''}`; - }, - }, - { - title: '价格', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge', - source: ['/price'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('classid'); - - return `/cnljxh/price${id ? `/${id}` : ''}`; - }, - }, - { - title: '价格汇总', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-hui-zong', - source: ['/collect'], - target: '/cnljxh/collect/10039', - }, - { - title: '焦炭指数', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge-zhi-shu', - source: ['/date'], - target: '/cnljxh/date/5575', - }, - { - title: '炼焦煤指数', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge-zhi-shu', - source: ['/date'], - target: '/cnljxh/date/5907', - }, - { - title: '市场分析', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-fen-xi-shu-ju', - source: ['/info'], - target: '/cnljxh/info/575', - }, - { - title: '一周评述', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-fen-xi-shu-ju', - source: ['/info'], - target: '/cnljxh/info/5573', - }, - { - title: '核心数据', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-fen-xi-shu-ju', - source: ['/info'], - target: '/cnljxh/info/5417', - }, - { - title: '协会专区 - 协会简介', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/24', - }, - { - title: '协会专区 - 协会章程', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/25', - }, - { - title: '协会专区 - 协会领导', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/26', - }, - { - title: '协会专区 - 入会程序', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/27', - }, - { - title: '协会专区 - 组织机构', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/28', - }, - { - title: '协会公告', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/10', - }, - { - title: '行业新闻 - 协会动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/8', - }, - { - title: '行业新闻 - 企业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/9', - }, - { - title: '行业新闻 - 行业动态', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/11', - }, - { - title: '政策法规', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/12', - }, - { - title: '行业标准 - 国家标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/13', - }, - { - title: '行业标准 - 行业标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/14', - }, - { - title: '行业标准 - 团体标准', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/15', - }, - { - title: '技术广角', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen', - source: ['/news'], - target: '/cnljxh/news/16', - }, - { - title: '价格行情', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge', - source: ['/price'], - target: '/cnljxh/price/299', - }, - { - title: '双焦运费', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge', - source: ['/price'], - target: '/cnljxh/price/2143', - }, - ], - }, -}; diff --git a/lib/routes/cnljxh/router.ts b/lib/routes/cnljxh/router.ts deleted file mode 100644 index 611f80b11..000000000 --- a/lib/routes/cnljxh/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:id?', './'); -}; diff --git a/lib/routes/cntheory/maintainer.ts b/lib/routes/cntheory/maintainer.ts deleted file mode 100644 index c7c2b8b33..000000000 --- a/lib/routes/cntheory/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/paper/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cntheory/namespace.ts b/lib/routes/cntheory/namespace.ts new file mode 100644 index 000000000..45fb3aff4 --- /dev/null +++ b/lib/routes/cntheory/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '理论网', + url: 'paper.cntheory.com', +}; diff --git a/lib/routes/cntheory/paper.ts b/lib/routes/cntheory/paper.ts index 0702bcea9..5efc9034b 100644 --- a/lib/routes/cntheory/paper.ts +++ b/lib/routes/cntheory/paper.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,26 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/paper/:id?', + categories: ['traditional-media'], + example: '/cntheory/paper', + parameters: { id: '板块,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '学习时报', + maintainers: ['nczitzk'], + handler, + description: `如订阅 **第 A1 版:国内大局**,路由为 [\`/cntheory/paper/国内大局\`](https://rsshub.app/cntheory/paper/国内大局)。`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://paper.cntheory.com'; @@ -82,10 +102,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `学习时报${id ? ` - ${id}` : ''}`, link: rootUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/cntheory/radar.ts b/lib/routes/cntheory/radar.ts deleted file mode 100644 index ab37e89ea..000000000 --- a/lib/routes/cntheory/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cntheory.com': { - _name: '理论网', - paper: [ - { - title: '学习时报', - docs: 'https://docs.rsshub.app/routes/traditional-media#li-lun-wang-xue-xi-shi-bao', - source: ['/'], - target: (params, url) => `/cntheory/paper/${new URL(url).toString().match(/-(\w+)\.htm/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/cntheory/router.ts b/lib/routes/cntheory/router.ts deleted file mode 100644 index 98a5ec9fb..000000000 --- a/lib/routes/cntheory/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/paper/:id?', './paper'); -}; diff --git a/lib/routes/cntv/column.ts b/lib/routes/cntv/column.ts index c5a75fe14..09f56ba33 100644 --- a/lib/routes/cntv/column.ts +++ b/lib/routes/cntv/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,39 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:column', + categories: ['multimedia'], + example: '/cntv/TOPC1451528971114112', + parameters: { column: '栏目ID, 可在对应CNTV栏目页面找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['navi.cctv.com/'], + }, + name: '栏目', + maintainers: ['WhoIsSure', 'Fatpandac'], + handler, + url: 'navi.cctv.com/', + description: `:::tip +栏目 ID 查找示例: +打开栏目具体某一期页面,F12 控制台输入\`column_id\`得到栏目 ID。 +::: + + 栏目 + + | 新闻联播 | 新闻周刊 | 天下足球 | + | -------------------- | -------------------- | -------------------- | + | TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('column'); const limit = isNaN(Number.parseInt(ctx.req.query('limit'))) ? 25 : Number.parseInt(ctx.req.query('limit')); @@ -17,7 +50,7 @@ export default async (ctx) => { const data = response.data.data.list; const name = data[0].title.match(/《(.*?)》/)[1]; - ctx.set('data', { + return { title: `CNTV 栏目 - ${name}`, description: `${name} 栏目的视频更新`, item: data.map((item) => ({ @@ -28,5 +61,5 @@ export default async (ctx) => { pubDate: parseDate(item.time), link: item.url, })), - }); -}; + }; +} diff --git a/lib/routes/cntv/maintainer.ts b/lib/routes/cntv/maintainer.ts deleted file mode 100644 index 0541769ac..000000000 --- a/lib/routes/cntv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:column': ['WhoIsSure', 'Fatpandac'], -}; diff --git a/lib/routes/cntv/namespace.ts b/lib/routes/cntv/namespace.ts new file mode 100644 index 000000000..90d6b24fb --- /dev/null +++ b/lib/routes/cntv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CNTV', + url: 'navi.cctv.com', +}; diff --git a/lib/routes/cntv/radar.ts b/lib/routes/cntv/radar.ts deleted file mode 100644 index e8a813ccb..000000000 --- a/lib/routes/cntv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cctv.com': { - _name: 'CCTV', - navi: [ - { - title: '栏目订阅', - docs: 'https://docs.rsshub.app/routes/multimedia#cntv-lan-mu', - source: ['/'], - target: '/cntv/:column', - }, - ], - }, -}; diff --git a/lib/routes/cntv/router.ts b/lib/routes/cntv/router.ts deleted file mode 100644 index 4929d9f60..000000000 --- a/lib/routes/cntv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:column', './column'); -}; diff --git a/lib/routes/codeforces/contests.ts b/lib/routes/codeforces/contests.ts index 57a56fafa..9805d0f6c 100644 --- a/lib/routes/codeforces/contests.ts +++ b/lib/routes/codeforces/contests.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -20,7 +21,29 @@ const sec2str = (sec) => dayjs.duration(Number.parseInt(sec), 'seconds').humaniz const contestAPI = 'https://codeforces.com/api/contest.list'; -export default async (ctx) => { +export const route: Route = { + path: '/contests', + categories: ['programming'], + example: '/codeforces/contests', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.codeforces.com/contests'], + }, + name: 'Latest contests', + maintainers: ['Fatpandac'], + handler, + url: 'www.codeforces.com/contests', +}; + +async function handler() { const contestsData = await got.get(contestAPI).json(); const contests = contestsData.result; @@ -44,9 +67,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Codeforces - Contests', link: 'https://codeforces.com/contests', item: items, - }); -}; + }; +} diff --git a/lib/routes/codeforces/maintainer.ts b/lib/routes/codeforces/maintainer.ts deleted file mode 100644 index bc242bbab..000000000 --- a/lib/routes/codeforces/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/contests': ['Fatpandac'], - '/recent-actions': ['ftiasch'], -}; diff --git a/lib/routes/codeforces/namespace.ts b/lib/routes/codeforces/namespace.ts new file mode 100644 index 000000000..eb07b18e3 --- /dev/null +++ b/lib/routes/codeforces/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Codeforces', + url: 'codeforces.com', +}; diff --git a/lib/routes/codeforces/radar.ts b/lib/routes/codeforces/radar.ts deleted file mode 100644 index 661b96fd1..000000000 --- a/lib/routes/codeforces/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'codeforces.com': { - _name: 'Codeforces', - '.': [ - { - title: 'Recent Actions', - docs: 'https://docs.rsshub.app/routes/programming#codeforces-recent-actions', - source: ['/recent-actions'], - target: '/codeforces/recent-actions', - }, - ], - www: [ - { - title: '最新比赛', - docs: 'https://docs.rsshub.app/routes/programming#codeforces-zui-xin-bi-sai', - source: ['/contests'], - target: '/codeforces/contests', - }, - ], - }, -}; diff --git a/lib/routes/codeforces/recent-actions.ts b/lib/routes/codeforces/recent-actions.ts index fa02d29a6..3872ebddc 100644 --- a/lib/routes/codeforces/recent-actions.ts +++ b/lib/routes/codeforces/recent-actions.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/recent-actions/:minrating?', + categories: ['programming'], + example: '/codeforces/recent-actions', + parameters: { minrating: 'The minimum blog/comment rating required. Default: 1' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['codeforces.com/recent-actions'], + target: '/recent-actions', + }, + name: 'Recent actions', + maintainers: [], + handler, + url: 'codeforces.com/recent-actions', +}; + +async function handler(ctx) { const minRating = ctx.req.param('minrating') || 1; const rsp = await got.get('https://codeforces.com/api/recentActions?maxCount=100').json(); @@ -32,7 +56,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Codeforces - Recent actions', link: 'https://codeforces.com/recent-actions', item: actions @@ -43,5 +67,5 @@ export default async (ctx) => { pubDate: a.pubDate, link: a.link, })), - }); -}; + }; +} diff --git a/lib/routes/codeforces/router.ts b/lib/routes/codeforces/router.ts deleted file mode 100644 index b79340dca..000000000 --- a/lib/routes/codeforces/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/contests', './contests'); - router.get('/recent-actions/:minrating?', './recent-actions'); -}; diff --git a/lib/routes/coindesk/index.ts b/lib/routes/coindesk/index.ts index f15faccc5..01ee1e4fe 100644 --- a/lib/routes/coindesk/index.ts +++ b/lib/routes/coindesk/index.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const rootUrl = 'https://www.coindesk.com'; -export default async (ctx) => { +export const route: Route = { + path: '/consensus-magazine', + categories: ['new-media'], + example: '/coindesk/consensus-magazine', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['coindesk.com/'], + }, + name: '新闻周刊', + maintainers: ['jameshih'], + handler, + url: 'coindesk.com/', +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? 'consensus-magazine'; const response = await got.get(`${rootUrl}/${channel}/`); @@ -26,9 +49,9 @@ export default async (ctx) => { pubDate: item.display_date, })); - ctx.set('data', { + return { title: 'CoinDesk Consensus Magazine', link: `${rootUrl}/${channel}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/coindesk/maintainer.ts b/lib/routes/coindesk/maintainer.ts deleted file mode 100644 index 7406ce252..000000000 --- a/lib/routes/coindesk/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/consensus-magazine': ['jameshih'], -}; diff --git a/lib/routes/coindesk/namespace.ts b/lib/routes/coindesk/namespace.ts new file mode 100644 index 000000000..9aa1ef1d7 --- /dev/null +++ b/lib/routes/coindesk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CoinDesk Consensus Magazine', + url: 'coindesk.com', +}; diff --git a/lib/routes/coindesk/radar.ts b/lib/routes/coindesk/radar.ts deleted file mode 100644 index a2611e7fa..000000000 --- a/lib/routes/coindesk/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'coindesk.com': { - _name: 'CoinDesk', - '.': [ - { - title: 'Coindesk Consensus Magazine', - docs: 'https://docs.rsshub.app/routes/new-media#coindesk-consensus-magazine', - source: ['/'], - target: '/coindesk/consensus-magazine', - }, - ], - }, -}; diff --git a/lib/routes/coindesk/router.ts b/lib/routes/coindesk/router.ts deleted file mode 100644 index 10fa80c1d..000000000 --- a/lib/routes/coindesk/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/consensus-magazine', './index'); -}; diff --git a/lib/routes/comicat/maintainer.ts b/lib/routes/comicat/maintainer.ts deleted file mode 100644 index 9a71d22b7..000000000 --- a/lib/routes/comicat/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/search/:keyword': ['Cyang39'], -}; diff --git a/lib/routes/comicat/namespace.ts b/lib/routes/comicat/namespace.ts new file mode 100644 index 000000000..8082c9460 --- /dev/null +++ b/lib/routes/comicat/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Comicat', + url: 'comicat.org', +}; diff --git a/lib/routes/comicat/radar.ts b/lib/routes/comicat/radar.ts deleted file mode 100644 index 6ecccc7d3..000000000 --- a/lib/routes/comicat/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'comicat.org': { - _name: 'Comicat', - '.': [ - { - title: '搜索关键词', - docs: 'https://docs.rsshub.app/routes/anime#comicat', - }, - ], - }, -}; diff --git a/lib/routes/comicat/router.ts b/lib/routes/comicat/router.ts deleted file mode 100644 index ccb09a947..000000000 --- a/lib/routes/comicat/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/search/:keyword', './search'); -}; diff --git a/lib/routes/comicat/search.ts b/lib/routes/comicat/search.ts index 0c7d80208..4e3716756 100644 --- a/lib/routes/comicat/search.ts +++ b/lib/routes/comicat/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://comicat.org'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['anime'], + example: '/comicat/search/喵萌奶茶屋+跃动青春+720P+简日', + parameters: { keyword: '关键词,请用`+`号连接' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索关键词', + maintainers: ['Cyang39'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const { data: response } = await got(`${baseUrl}/search.php?keyword=${encodeURIComponent(keyword)}`); const $ = load(response); @@ -35,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Comicat - ${keyword}`, link: `${baseUrl}/search.php?keyword=${encodeURIComponent(keyword)}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/comicskingdom/index.ts b/lib/routes/comicskingdom/index.ts index 6ce3d402b..4e1c8b4f6 100644 --- a/lib/routes/comicskingdom/index.ts +++ b/lib/routes/comicskingdom/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:name', + categories: ['anime'], + example: '/comicskingdom/pardon-my-planet', + parameters: { name: 'URL path of the strip on comicskingdom.com' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['comicskingdom.com/:name/*', 'comicskingdom.com/:name'], + }, + name: 'Archive', + maintainers: ['stjohnjohnson'], + handler, +}; + +async function handler(ctx) { const baseURL = 'https://comicskingdom.com'; const name = ctx.req.param('name'); const url = `${baseURL}/${name}/archive`; @@ -54,11 +76,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: comic, link: url, image: $('.feature-logo').attr('src'), item: items, language: 'en-US', - }); -}; + }; +} diff --git a/lib/routes/comicskingdom/maintainer.ts b/lib/routes/comicskingdom/maintainer.ts deleted file mode 100644 index 9e8607284..000000000 --- a/lib/routes/comicskingdom/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:name': ['stjohnjohnson'], -}; diff --git a/lib/routes/comicskingdom/namespace.ts b/lib/routes/comicskingdom/namespace.ts new file mode 100644 index 000000000..ed4fd59b4 --- /dev/null +++ b/lib/routes/comicskingdom/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Comics Kingdom', + url: 'comicskingdom.com', +}; diff --git a/lib/routes/comicskingdom/radar.ts b/lib/routes/comicskingdom/radar.ts deleted file mode 100644 index 7aeef619f..000000000 --- a/lib/routes/comicskingdom/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'comicskingdom.com': { - _name: 'Comics Kingdom', - '.': [ - { - title: 'Archive', - docs: 'https://docs.rsshub.app/routes/anime#comics-kingdom', - source: ['/:name/*', '/:name'], - target: '/comicskingdom/:name', - }, - ], - }, -}; diff --git a/lib/routes/comicskingdom/router.ts b/lib/routes/comicskingdom/router.ts deleted file mode 100644 index e0d08ed18..000000000 --- a/lib/routes/comicskingdom/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:name', './index'); -}; diff --git a/lib/routes/consumer/index.ts b/lib/routes/consumer/index.ts index 7283f7029..c8df5cef3 100644 --- a/lib/routes/consumer/index.ts +++ b/lib/routes/consumer/index.ts @@ -1,9 +1,43 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:language?/:keyword?', + categories: ['new-media'], + example: '/consumer', + parameters: { category: '分类,见下表,默认为測試及調查', language: '语言,见下表,默认为繁体中文', keyword: '关键字,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['consumer.org.hk/'], + }, + name: '文章', + maintainers: ['nczitzk'], + handler, + url: 'consumer.org.hk/', + description: `分类 + + | 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 | + | ---------- | -------- | --------- | -------- | + | test | life | complaint | topic | + + 语言 + + | 简体中文 | 繁体中文 | + | -------- | -------- | + | sc | tc |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'test'; const language = ctx.req.param('language') ?? 'tc'; const keyword = ctx.req.param('keyword') ?? ''; @@ -48,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/consumer/maintainer.ts b/lib/routes/consumer/maintainer.ts deleted file mode 100644 index 4c14988b9..000000000 --- a/lib/routes/consumer/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/shopping-guide/:category?/:language?': ['TonyRL'], - '/:category?/:language?/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/consumer/namespace.ts b/lib/routes/consumer/namespace.ts new file mode 100644 index 000000000..524ebe75a --- /dev/null +++ b/lib/routes/consumer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '消费者委员会', + url: 'consumer.org.hk', +}; diff --git a/lib/routes/consumer/radar.ts b/lib/routes/consumer/radar.ts deleted file mode 100644 index 746cb58d6..000000000 --- a/lib/routes/consumer/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'consumer.org.hk': { - _name: '消费者委员会', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/new-media#xiao-fei-zhe-wei-yuan-hui-wen-zhang', - source: ['/'], - target: '/consumer/:category?/:language?/:keyword?', - }, - { - title: '消費全攻略', - docs: 'https://docs.rsshub.app/routes/new-media#xiao-fei-zhe-wei-yuan-hui', - source: ['/:language/shopping-guide/:category'], - target: '/consumer/shopping-guide/:category/:language', - }, - ], - }, -}; diff --git a/lib/routes/consumer/router.ts b/lib/routes/consumer/router.ts deleted file mode 100644 index e237750dd..000000000 --- a/lib/routes/consumer/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/shopping-guide/:category?/:language?', './shopping-guide'); - router.get('/:category?/:language?/:keyword?', './index'); -}; diff --git a/lib/routes/consumer/shopping-guide.ts b/lib/routes/consumer/shopping-guide.ts index 1bfe70d5e..c9352d9d6 100644 --- a/lib/routes/consumer/shopping-guide.ts +++ b/lib/routes/consumer/shopping-guide.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/shopping-guide/:category?/:language?', + categories: ['new-media'], + example: '/consumer/shopping-guide', + parameters: { category: '分类,见下表,默认为 `trivia`', language: '语言,见上表,默认为 `tc`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '消費全攻略', + maintainers: ['TonyRL'], + handler, + description: `| 冷知識 | 懶人包 | 特集 | 銀髮一族 | 飲食煮意 | 科技達人 | 健康美容 | 規劃人生 | 消閒娛樂 | 家品家電 | 親子時光 | 綠色生活 | + | ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ | + | trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living |`, +}; + +async function handler(ctx) { const { category = 'trivia', language = 'tc' } = ctx.req.param(); const rootUrl = 'https://www.consumer.org.hk'; const currentUrl = `${rootUrl}/${language}/shopping-guide/${category}`; @@ -56,12 +78,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: currentUrl, image: $('meta[property="og:image"]').attr('content'), logo: $('link[rel="apple-touch-icon"]').attr('href'), icon: $('link[rel="apple-touch-icon"]').attr('href'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cool18/index.ts b/lib/routes/cool18/index.ts index 7ce45f0c7..675fcd838 100644 --- a/lib/routes/cool18/index.ts +++ b/lib/routes/cool18/index.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:type?/:keyword?', + radar: { + source: ['cool18.com/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'cool18.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'bbs4'; const type = ctx.req.param('type') ?? ''; const keyword = ctx.req.param('keyword') ?? ''; @@ -54,9 +66,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cool18/maintainer.ts b/lib/routes/cool18/maintainer.ts deleted file mode 100644 index 398aa0e85..000000000 --- a/lib/routes/cool18/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?/:type?/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/cool18/namespace.ts b/lib/routes/cool18/namespace.ts new file mode 100644 index 000000000..2e72b3362 --- /dev/null +++ b/lib/routes/cool18/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '禁忌书屋', + url: 'cool18.com', +}; diff --git a/lib/routes/cool18/radar.ts b/lib/routes/cool18/radar.ts deleted file mode 100644 index 3f8e65420..000000000 --- a/lib/routes/cool18/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cool18.com': { - _name: '酷 18', - '.': [ - { - title: '分站', - docs: 'https://docs.rsshub.app/routes/picture#cool-18', - source: '/', - target: '/cool18/:id?/:type?/:keyword?', - }, - ], - }, -}; diff --git a/lib/routes/cool18/router.ts b/lib/routes/cool18/router.ts deleted file mode 100644 index 8dc9e2e2c..000000000 --- a/lib/routes/cool18/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?/:type?/:keyword?', './index'); -}; diff --git a/lib/routes/coolapk/dyh.ts b/lib/routes/coolapk/dyh.ts index 3ef4533c4..4844cfd51 100644 --- a/lib/routes/coolapk/dyh.ts +++ b/lib/routes/coolapk/dyh.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/dyh/:dyhId', + categories: ['social-media'], + example: '/coolapk/dyh/1524', + parameters: { dyhId: '看看号ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '看看号', + maintainers: ['xizeyoupan'], + handler, + description: `:::tip + 仅限于采集**站内订阅**的看看号的内容。看看号 ID 可在看看号界面右上分享 - 复制链接得到。 + :::`, +}; + +async function handler(ctx) { const dyhId = ctx.req.param('dyhId'); const full_url = utils.base_url + `/v6/dyhArticle/list?dyhId=${dyhId}&type=all&page=1`; const r = await got(`${utils.base_url}/v6/dyh/detail?dyhId=${dyhId}`, { @@ -28,10 +50,10 @@ export default async (ctx) => { if (out.length === 0) { throw new Error('仅限于采集站内订阅的看看号的图文及动态内容。这个ID可能是站外订阅。'); } - ctx.set('data', { + return { title: `酷安看看号-${targetTitle}`, link: `https://www.coolapk.com/dyh/${dyhId}`, description: feedDescription, item: out, - }); -}; + }; +} diff --git a/lib/routes/coolapk/hot.ts b/lib/routes/coolapk/hot.ts index d59cd0577..e12624ad9 100644 --- a/lib/routes/coolapk/hot.ts +++ b/lib/routes/coolapk/hot.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; const getLinkAndTitle = (type, period) => { @@ -65,7 +66,36 @@ const getLinkAndTitle = (type, period) => { return res; }; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:type?/:period?', + categories: ['social-media'], + example: '/coolapk/hot', + parameters: { type: '默认为`jrrm`', period: '默认为`daily`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热榜', + maintainers: ['xizeyoupan'], + handler, + description: `| 参数名称 | 今日热门 | 点赞榜 | 评论榜 | 收藏榜 | 酷图榜 | + | -------- | -------- | ------ | ------ | ------ | ------ | + | type | jrrm | dzb | plb | scb | ktb | + + | 参数名称 | 日榜 | 周榜 | + | -------- | ----- | ------ | + | period | daily | weekly | + + :::tip + 今日热门没有周榜,酷图榜日榜的参数会变成周榜,周榜的参数会变成月榜。 + :::`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'jrrm'; const period = ctx.req.param('period') || 'daily'; const { link, title } = getLinkAndTitle(type, period); @@ -88,10 +118,10 @@ export default async (ctx) => { out = out.filter(Boolean); - ctx.set('data', { + return { title, link: 'https://www.coolapk.com/', description: `热榜-` + title, item: out, - }); -}; + }; +} diff --git a/lib/routes/coolapk/huati.ts b/lib/routes/coolapk/huati.ts index f01904736..5d8de470a 100644 --- a/lib/routes/coolapk/huati.ts +++ b/lib/routes/coolapk/huati.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/huati/:tag', + categories: ['social-media'], + example: '/coolapk/huati/iPhone', + parameters: { tag: '话题名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '话题', + maintainers: ['xizeyoupan'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const full_url = utils.base_url + `/v6/page/dataList?url=%23%2Ffeed%2FmultiTagFeedList%3FlistType%3Ddateline_desc%26tag=${tag}&title=%E6%9C%80%E6%96%B0%E5%8F%91%E5%B8%83&subTitle=&page=1`; const response = await got(full_url, { @@ -15,10 +34,10 @@ export default async (ctx) => { if (out.length === 0) { throw new Error('这个话题还没有被创建或现在没有图文及动态内容。'); } - ctx.set('data', { + return { title: `酷安话题-${tag}`, link: `https://www.coolapk.com/`, description: `酷安话题-${tag}`, item: out, - }); -}; + }; +} diff --git a/lib/routes/coolapk/maintainer.ts b/lib/routes/coolapk/maintainer.ts deleted file mode 100644 index 86f1582e3..000000000 --- a/lib/routes/coolapk/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/dyh/:dyhId': ['xizeyoupan'], - '/huati/:tag': ['xizeyoupan'], - '/hot/:type?/:period?': ['xizeyoupan'], - '/toutiao/:type?': ['xizeyoupan'], - '/tuwen/:type?': ['xizeyoupan'], - '/tuwen-xinxian': ['xizeyoupan'], - '/user/:uid/dynamic': ['xizeyoupan'], -}; diff --git a/lib/routes/coolapk/namespace.ts b/lib/routes/coolapk/namespace.ts new file mode 100644 index 000000000..f9969354a --- /dev/null +++ b/lib/routes/coolapk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '酷安', + url: 'coolapk.com', +}; diff --git a/lib/routes/coolapk/radar.ts b/lib/routes/coolapk/radar.ts deleted file mode 100644 index 5214a6cb7..000000000 --- a/lib/routes/coolapk/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'coolapk.com': { - _name: '酷安', - '.': [ - { - title: '图文', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - { - title: '看看号', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - { - title: '热榜', - docs: 'https://docs.rsshub.app/routes/social-media#ku-an', - }, - ], - }, -}; diff --git a/lib/routes/coolapk/router.ts b/lib/routes/coolapk/router.ts deleted file mode 100644 index 0d5b2da9b..000000000 --- a/lib/routes/coolapk/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/dyh/:dyhId', './dyh'); - router.get('/huati/:tag', './huati'); - router.get('/hot/:type?/:period?', './hot'); - router.get('/toutiao/:type?', './toutiao'); - router.get('/tuwen/:type?', './tuwen'); - router.get('/tuwen-xinxian', './tuwen'); - router.get('/user/:uid/dynamic', './user-dynamic'); -}; diff --git a/lib/routes/coolapk/toutiao.ts b/lib/routes/coolapk/toutiao.ts index 8530d7051..e4a6fd810 100644 --- a/lib/routes/coolapk/toutiao.ts +++ b/lib/routes/coolapk/toutiao.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/toutiao/:type?', + categories: ['social-media'], + example: '/coolapk/toutiao', + parameters: { type: '默认为history' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '头条', + maintainers: ['xizeyoupan'], + handler, + description: `| 参数名称 | 历史头条 | 最新 | + | -------- | -------- | ------ | + | type | history | latest |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'history'; const urls = { history: { @@ -20,10 +42,10 @@ export default async (ctx) => { const out = await Promise.all(data.map((item) => utils.parseDynamic(item))); - ctx.set('data', { + return { title: urls[type].title, link: 'https://www.coolapk.com/', description: urls[type].title, item: out, - }); -}; + }; +} diff --git a/lib/routes/coolapk/tuwen.ts b/lib/routes/coolapk/tuwen.ts index c27b2f15d..ece427b0d 100644 --- a/lib/routes/coolapk/tuwen.ts +++ b/lib/routes/coolapk/tuwen.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/tuwen/:type?', '/tuwen-xinxian'], + categories: ['social-media'], + example: '/coolapk/tuwen', + parameters: { type: '默认为hot' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '图文', + maintainers: ['xizeyoupan'], + handler, + description: `| 参数名称 | 编辑精选 | 最新 | + | -------- | -------- | ------ | + | type | hot | latest |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'hot'; const requestPath = ctx.req.path; let feedTitle; @@ -28,10 +50,10 @@ export default async (ctx) => { const out = await Promise.all(data.map((item) => utils.parseDynamic(item))); - ctx.set('data', { + return { title: feedTitle, link: 'https://www.coolapk.com/', description: feedTitle, item: out, - }); -}; + }; +} diff --git a/lib/routes/coolapk/user-dynamic.ts b/lib/routes/coolapk/user-dynamic.ts index 5c794bd77..e380fe1f1 100644 --- a/lib/routes/coolapk/user-dynamic.ts +++ b/lib/routes/coolapk/user-dynamic.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid/dynamic', + categories: ['social-media'], + example: '/coolapk/user/3177668/dynamic', + parameters: { uid: '在个人界面右上分享-复制链接获取' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户', + maintainers: ['xizeyoupan'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const full_url = utils.base_url + `/v6/user/feedList?uid=${uid}&page=1&showAnonymous=0&isIncludeTop=1&showDoing=1`; let username; @@ -26,10 +45,10 @@ export default async (ctx) => { if (out.length === 0) { throw new Error('这个人还没有图文或动态。'); } - ctx.set('data', { + return { title: `酷安个人动态-${username}`, link: `https://www.coolapk.com/u/${uid}`, description: `酷安个人动态-${username}`, item: out, - }); -}; + }; +} diff --git a/lib/routes/coomer/artist.ts b/lib/routes/coomer/artist.ts index 70694836f..8a9472cd4 100644 --- a/lib/routes/coomer/artist.ts +++ b/lib/routes/coomer/artist.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import fetchItems from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/artist/:id', + categories: ['multimedia'], + example: '/coomer/artist/belledelphine', + parameters: { id: 'Artist id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['coomer.party/onlyfans/user/:id', 'coomer.party/'], + }, + name: 'Artist', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const currentUrl = `onlyfans/user/${id}`; ctx.set('data', await fetchItems(ctx, currentUrl)); -}; +} diff --git a/lib/routes/coomer/maintainer.ts b/lib/routes/coomer/maintainer.ts deleted file mode 100644 index 846bdba80..000000000 --- a/lib/routes/coomer/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/artist/:id': ['nczitzk'], - '/posts': ['nczitzk'], -}; diff --git a/lib/routes/coomer/namespace.ts b/lib/routes/coomer/namespace.ts new file mode 100644 index 000000000..df39e0d95 --- /dev/null +++ b/lib/routes/coomer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Coomer', + url: 'coomer.party', +}; diff --git a/lib/routes/coomer/posts.ts b/lib/routes/coomer/posts.ts index fea1c9098..5086ed20e 100644 --- a/lib/routes/coomer/posts.ts +++ b/lib/routes/coomer/posts.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import fetchItems from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/posts', + categories: ['multimedia'], + example: '/coomer/posts', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['coomer.party/posts', 'coomer.party/'], + }, + name: 'Recent Posts', + maintainers: ['nczitzk'], + handler, + url: 'coomer.party/posts', +}; + +async function handler(ctx) { const currentUrl = 'posts'; ctx.set('data', await fetchItems(ctx, currentUrl)); -}; +} diff --git a/lib/routes/coomer/radar.ts b/lib/routes/coomer/radar.ts deleted file mode 100644 index 7753f5b5a..000000000 --- a/lib/routes/coomer/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'coomer.party': { - _name: 'Coomer', - '.': [ - { - title: 'Artist', - docs: 'https://docs.rsshub.app/routes/multimedia#coomer-artist', - source: ['/onlyfans/user/:id', '/'], - target: '/coomer/artist/:id', - }, - { - title: 'Recent Posts', - docs: 'https://docs.rsshub.app/routes/multimedia#coomer-recent-posts', - source: ['/posts', '/'], - target: '/coomer/posts', - }, - ], - }, -}; diff --git a/lib/routes/coomer/router.ts b/lib/routes/coomer/router.ts deleted file mode 100644 index 86e018dfe..000000000 --- a/lib/routes/coomer/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/artist/:id', './artist'); - router.get('/posts', './posts'); -}; diff --git a/lib/routes/copymanga/comic.ts b/lib/routes/copymanga/comic.ts index e1da19a53..66cdb0c65 100644 --- a/lib/routes/copymanga/comic.ts +++ b/lib/routes/copymanga/comic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import * as path from 'node:path'; import { config } from '@/config'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/comic/:id/:chapterCnt?', + categories: ['anime'], + example: '/copymanga/comic/dianjuren/5', + parameters: { id: '漫画ID', chapterCnt: '返回章节的数量,默认为 `10`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '漫画更新', + maintainers: ['btdwv', 'marvolo666', 'yan12125'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); // 用于控制返回的章节数量 const chapterCnt = Number(ctx.req.param('chapterCnt') || 10); @@ -118,10 +137,10 @@ export default async (ctx) => { const result = await asyncPoolAll(3, chapterArray.slice(0, chapterCnt), (chapter) => cache.tryGet(chapter.link, () => genResult(chapter))); const items = [...result, ...chapterArray.slice(chapterCnt)]; - ctx.set('data', { + return { title: `拷贝漫画 - ${bookTitle}`, link: `${baseUrl}/comic/${id}`, description: bookIntro, item: items, - }); -}; + }; +} diff --git a/lib/routes/copymanga/maintainer.ts b/lib/routes/copymanga/maintainer.ts deleted file mode 100644 index 2a8a542b1..000000000 --- a/lib/routes/copymanga/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/comic/:id/:chapterCnt?': ['btdwv', 'marvolo666', 'yan12125'], -}; diff --git a/lib/routes/copymanga/namespace.ts b/lib/routes/copymanga/namespace.ts new file mode 100644 index 000000000..972ed6507 --- /dev/null +++ b/lib/routes/copymanga/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '拷贝漫画', + url: 'copymanga.com', +}; diff --git a/lib/routes/copymanga/radar.ts b/lib/routes/copymanga/radar.ts deleted file mode 100644 index d942ee5d7..000000000 --- a/lib/routes/copymanga/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -const copymanga = { - _name: '拷贝漫画', - '.': [ - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/anime#kao-bei-man-hua', - source: '/comic/:id', - target: '/copymanga/comic/:id/5', - }, - ], -}; - -export default { - 'copymanga.com': copymanga, - 'copymanga.info': copymanga, - 'copymanga.net': copymanga, - 'copymanga.org': copymanga, - 'copymanga.site': copymanga, -}; diff --git a/lib/routes/copymanga/router.ts b/lib/routes/copymanga/router.ts deleted file mode 100644 index 1bc6a3f6b..000000000 --- a/lib/routes/copymanga/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/comic/:id/:chapterCnt?', './comic'); -}; diff --git a/lib/routes/cpcey/index.ts b/lib/routes/cpcey/index.ts index 990ed2b44..f739febf1 100644 --- a/lib/routes/cpcey/index.ts +++ b/lib/routes/cpcey/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,28 @@ const typeMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['government'], + example: '/cpcey/xwg', + parameters: { type: '默认为 `xwg`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '消费资讯', + maintainers: ['Fatpandac'], + handler, + description: `| 新闻稿 | 消费资讯 | + | :----: | :------: | + | xwg | xfzx |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'xwg'; const url = rootUrl + typeMap[type].url; @@ -53,9 +75,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `行政院消费者保护会-${typeMap[type].name}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cpcey/maintainer.ts b/lib/routes/cpcey/maintainer.ts deleted file mode 100644 index e763c2f26..000000000 --- a/lib/routes/cpcey/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['Fatpandac'], -}; diff --git a/lib/routes/cpcey/namespace.ts b/lib/routes/cpcey/namespace.ts new file mode 100644 index 000000000..97a8ed0ba --- /dev/null +++ b/lib/routes/cpcey/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '台湾行政院消费者保护会', + url: 'cpc.ey.gov.tw', +}; diff --git a/lib/routes/cpcey/radar.ts b/lib/routes/cpcey/radar.ts deleted file mode 100644 index 0acf36f84..000000000 --- a/lib/routes/cpcey/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'ey.gov.tw': { - _name: '行政院消费者保护会', - cpc: [ - { - title: '新闻稿', - docs: 'https://docs.rsshub.app/routes/government#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui', - source: '/Page/:type', - target: (params) => { - if (params.type === 'A3412E2A5A7B398F') { - return '/cycey/xwg'; - } - }, - }, - { - title: '消费资讯', - docs: 'https://docs.rsshub.app/routes/government#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui', - source: '/Page/:type', - target: (params) => { - if (params.type === 'E414CC218269CCE8') { - return '/cycey/xfzx'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/cpcey/router.ts b/lib/routes/cpcey/router.ts deleted file mode 100644 index 6fd05f06e..000000000 --- a/lib/routes/cpcey/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); -}; diff --git a/lib/routes/cpuid/maintainer.ts b/lib/routes/cpuid/maintainer.ts deleted file mode 100644 index 2c6ec6e2c..000000000 --- a/lib/routes/cpuid/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/cpuid/news': ['TonyRL'], -}; diff --git a/lib/routes/cpuid/namespace.ts b/lib/routes/cpuid/namespace.ts new file mode 100644 index 000000000..34cb36eb2 --- /dev/null +++ b/lib/routes/cpuid/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CPUID', + url: 'cpuid.com', +}; diff --git a/lib/routes/cpuid/news.ts b/lib/routes/cpuid/news.ts index ffebecddf..c7a50dcb9 100644 --- a/lib/routes/cpuid/news.ts +++ b/lib/routes/cpuid/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const newsUrl = 'https://www.cpuid.com/news.html'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['program-update'], + example: '/cpuid/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cpuid.com/news.html', 'cpuid.com/'], + }, + name: 'News', + maintainers: [], + handler, + url: 'cpuid.com/news.html', +}; + +async function handler() { const response = await got(newsUrl); const $ = load(response.data); @@ -19,12 +42,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), description: $('head description').attr('content'), link: newsUrl, image: $('link[rel=apple-touch-icon-precomposed]').attr('href'), item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/cpuid/radar.ts b/lib/routes/cpuid/radar.ts deleted file mode 100644 index 25a5c400d..000000000 --- a/lib/routes/cpuid/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cpuid.com': { - _name: 'CPUID', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/program-update#cpuid', - source: ['/news.html', '/'], - target: '/cpuid/news', - }, - ], - }, -}; diff --git a/lib/routes/cpuid/router.ts b/lib/routes/cpuid/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/cpuid/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/cqgas/maintainer.ts b/lib/routes/cqgas/maintainer.ts deleted file mode 100644 index 5fed72a7b..000000000 --- a/lib/routes/cqgas/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/tqtz': ['Mai19930513'], -}; diff --git a/lib/routes/cqgas/namespace.ts b/lib/routes/cqgas/namespace.ts new file mode 100644 index 000000000..4a38128d4 --- /dev/null +++ b/lib/routes/cqgas/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '重庆燃气', + url: 'cqgas.cn', +}; diff --git a/lib/routes/cqgas/radar.ts b/lib/routes/cqgas/radar.ts deleted file mode 100644 index 9df82c6dd..000000000 --- a/lib/routes/cqgas/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cqgas.cn': { - _name: '重庆燃气', - '.': [ - { - title: '停气检修通知', - docs: 'https://docs.rsshub.app/routes/forecast#chong-qing-ran-qi', - source: ['/'], - target: '/cqgas/tqtz', - }, - ], - }, -}; diff --git a/lib/routes/cqgas/router.ts b/lib/routes/cqgas/router.ts deleted file mode 100644 index e460f3080..000000000 --- a/lib/routes/cqgas/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/tqtz', './tqtz'); -}; diff --git a/lib/routes/cqgas/tqtz.ts b/lib/routes/cqgas/tqtz.ts index 5c29e60f1..135e76421 100644 --- a/lib/routes/cqgas/tqtz.ts +++ b/lib/routes/cqgas/tqtz.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const url = 'http://www.cqgas.cn/portal/article/page?cateId=1082&pageNo=1'; -export default async (ctx) => { +export const route: Route = { + path: '/tqtz', + categories: ['forecast'], + example: '/cqgas/tqtz', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cqgas.cn/'], + }, + name: '停气检修通知', + maintainers: ['Mai19930513'], + handler, + url: 'cqgas.cn/', +}; + +async function handler() { const { data: response } = await got(url); const $ = load(response); const contentUrl = (id) => `http://www.cqgas.cn/portal/article/content?contentId=${id}`; @@ -29,9 +52,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '重庆燃气——停气检修通知', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/cqwu/index.ts b/lib/routes/cqwu/index.ts index 2030bfd42..b55048712 100644 --- a/lib/routes/cqwu/index.ts +++ b/lib/routes/cqwu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -13,7 +14,28 @@ const titleMap = { academiceve: '学术活动', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/cqwu/news/academiceve', + parameters: { type: '可选,默认为 academiceve ' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通知公告', + maintainers: ['Fatpandac'], + handler, + description: `| 通知公告 | 学术活动公告 | + | -------- | ------------ | + | notify | academiceve |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'academiceve'; const link = host + map[type]; const title = '重文理' + titleMap[type] + '公告'; @@ -42,9 +64,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/cqwu/maintainer.ts b/lib/routes/cqwu/maintainer.ts deleted file mode 100644 index f4ee77a0b..000000000 --- a/lib/routes/cqwu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['Fatpandac'], -}; diff --git a/lib/routes/cqwu/namespace.ts b/lib/routes/cqwu/namespace.ts new file mode 100644 index 000000000..52f7bfdf5 --- /dev/null +++ b/lib/routes/cqwu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '重庆文理学院', + url: 'www.cqwu.net', +}; diff --git a/lib/routes/cqwu/radar.ts b/lib/routes/cqwu/radar.ts deleted file mode 100644 index eb2d52ee9..000000000 --- a/lib/routes/cqwu/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'cqwu.net': { - _name: '重庆文理学院', - www: [ - { - title: '通知', - docs: 'https://docs.rsshub.app/routes/university#chong-qing-wen-li-xue-yuan', - source: '/:type', - target: (params) => { - if (params.type === 'channel_24894.html') { - return '/cqwu/news/notify'; - } - }, - }, - { - title: '学术活动', - docs: 'https://docs.rsshub.app/routes/university#chong-qing-wen-li-xue-yuan', - source: '/:type', - target: (params) => { - if (params.type === 'channel_24895.html') { - return '/cqwu/news/academiceve'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/cqwu/router.ts b/lib/routes/cqwu/router.ts deleted file mode 100644 index 43e7c58a8..000000000 --- a/lib/routes/cqwu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './index'); -}; diff --git a/lib/routes/crac/index.ts b/lib/routes/crac/index.ts index e75fbd6e3..3120f4e3c 100644 --- a/lib/routes/crac/index.ts +++ b/lib/routes/crac/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['government'], + example: '/crac/2', + parameters: { type: '类型,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新资讯', + maintainers: ['Misaka13514'], + handler, + description: `| 新闻动态 | 通知公告 | 政策法规 | 常见问题 | 资料下载 | English | 业余中继台 | 科普专栏 | + | -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- | + | 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |`, +}; + +async function handler(ctx) { const baseUrl = 'http://www.crac.org.cn'; const type = ctx.req.param('type'); const link = type ? `${baseUrl}/News/List?type=${type}` : `${baseUrl}/News/List`; @@ -39,9 +61,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link, item: list, - }); -}; + }; +} diff --git a/lib/routes/crac/maintainer.ts b/lib/routes/crac/maintainer.ts deleted file mode 100644 index c884c50e7..000000000 --- a/lib/routes/crac/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['Misaka13514'], -}; diff --git a/lib/routes/crac/namespace.ts b/lib/routes/crac/namespace.ts new file mode 100644 index 000000000..fd9bb283b --- /dev/null +++ b/lib/routes/crac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国无线电协会业余无线电分会', + url: 'www.crac.org.cn', +}; diff --git a/lib/routes/crac/radar.ts b/lib/routes/crac/radar.ts deleted file mode 100644 index d79f612ad..000000000 --- a/lib/routes/crac/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'crac.org.cn': { - _name: '中国无线电协会业余无线电分会', - www: [ - { - title: '最新资讯', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-wu-xian-dian-xie-hui-ye-yu-wu-xian-dian-fen-hui', - source: '/News/List', - target: (params, url) => `/crac/${new URL(url).searchParams.get('type') || ''}`, - }, - ], - }, -}; diff --git a/lib/routes/crac/router.ts b/lib/routes/crac/router.ts deleted file mode 100644 index 6fd05f06e..000000000 --- a/lib/routes/crac/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); -}; diff --git a/lib/routes/creative-comic/book.ts b/lib/routes/creative-comic/book.ts index 2d3350cca..693aceda7 100644 --- a/lib/routes/creative-comic/book.ts +++ b/lib/routes/creative-comic/book.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { getUuid, getBook, getChapter, getChapters, getImgEncrypted, getImgKey, decrypt, getRealKey, siteHost } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/book/:id/:coverOnly?/:quality?', + categories: ['anime'], + example: '/creative-comic/book/117', + parameters: { id: '漫畫 ID,可在 URL 中找到', coverOnly: '僅獲取封面,非 `true` 時將獲取**全部**頁面,預設 `true`', quality: '閱讀品質,標準畫質 `1`,高畫質 `2`,預設 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['creative-comic.tw/book/:id/*'], + target: '/:id', + }, + name: '漫畫', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { id, coverOnly = 'true', quality = '1' } = ctx.req.param(); const uuid = await getUuid(cache.tryGet); const { @@ -59,12 +82,12 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${book.name} | CCC創作集`, description: `${book.brief} ${book.description}`, link: book.share_link, image: book.image1, item: items, language: 'zh-hant', - }); -}; + }; +} diff --git a/lib/routes/creative-comic/maintainer.ts b/lib/routes/creative-comic/maintainer.ts deleted file mode 100644 index b9862b5d1..000000000 --- a/lib/routes/creative-comic/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/book/:id/:coverOnly?/:quality?': ['TonyRL'], -}; diff --git a/lib/routes/creative-comic/namespace.ts b/lib/routes/creative-comic/namespace.ts new file mode 100644 index 000000000..e50247a26 --- /dev/null +++ b/lib/routes/creative-comic/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CCC 創作集', + url: 'creative-comic.tw', +}; diff --git a/lib/routes/creative-comic/radar.ts b/lib/routes/creative-comic/radar.ts deleted file mode 100644 index 3159c5ed1..000000000 --- a/lib/routes/creative-comic/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'creative-comic.tw': { - _name: 'CCC 創作集', - '.': [ - { - title: '漫畫', - docs: 'https://docs.rsshub.app/routes/anime#ccc-chuang-zuo-ji', - source: ['/book/:id/*'], - target: '/creative-comic/:id', - }, - ], - }, -}; diff --git a/lib/routes/creative-comic/router.ts b/lib/routes/creative-comic/router.ts deleted file mode 100644 index bed4f0ea2..000000000 --- a/lib/routes/creative-comic/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/book/:id/:coverOnly?/:quality?', './book'); -}; diff --git a/lib/routes/crossbell/feeds/following.ts b/lib/routes/crossbell/feeds/following.ts index 05675bf27..b70284d14 100644 --- a/lib/routes/crossbell/feeds/following.ts +++ b/lib/routes/crossbell/feeds/following.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/feeds/following/:characterId', + categories: ['social-media'], + example: '/crossbell/feeds/following/10', + parameters: { characterId: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Feeds of following', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const characterId = ctx.req.param('characterId'); const response = await got(`https://indexer.crossbell.io/v1/characters/${characterId}/feed/follow`); - ctx.set('data', { + return { title: 'Crossbell Feeds of ' + characterId, link: 'https://crossbell.io/', item: response.data?.list?.map((item) => { @@ -25,5 +44,5 @@ export default async (ctx) => { category: [...(item.note?.metadata?.content?.sources || []), ...(item.note?.metadata?.content?.tags || [])], }; }), - }); -}; + }; +} diff --git a/lib/routes/crossbell/maintainer.ts b/lib/routes/crossbell/maintainer.ts deleted file mode 100644 index 982ee8651..000000000 --- a/lib/routes/crossbell/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/notes': ['DIYgod'], - '/notes/character/:characterId': ['DIYgod'], - '/notes/source/:source': ['DIYgod'], - '/feeds/following/:characterId': ['DIYgod'], -}; diff --git a/lib/routes/crossbell/namespace.ts b/lib/routes/crossbell/namespace.ts new file mode 100644 index 000000000..aad3ef39a --- /dev/null +++ b/lib/routes/crossbell/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Crossbell', + url: 'crossbell.io', +}; diff --git a/lib/routes/crossbell/notes/character.ts b/lib/routes/crossbell/notes/character.ts index 7958b0709..d110fbf8f 100644 --- a/lib/routes/crossbell/notes/character.ts +++ b/lib/routes/crossbell/notes/character.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { getItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/character/:characterId', + categories: ['social-media'], + example: '/crossbell/notes/character/10', + parameters: { characterId: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['crossbell.io/*'], + target: '/notes', + }, + name: 'Notes of character', + maintainers: ['DIYgod'], + handler, + url: 'crossbell.io/*', +}; + +async function handler(ctx) { const characterId = ctx.req.param('characterId'); const response = await got('https://indexer.crossbell.io/v1/notes', { @@ -14,9 +38,9 @@ export default async (ctx) => { const name = response.data?.list?.[0]?.character?.metadata?.content?.name || response.data?.list?.[0]?.character?.handle || characterId; const handle = response.data?.list?.[0]?.character?.handle; - ctx.set('data', { + return { title: 'Crossbell Notes from ' + name, link: 'https://xchar.app/' + handle, item: response.data?.list?.map((item) => getItem(item)), - }); -}; + }; +} diff --git a/lib/routes/crossbell/notes/index.ts b/lib/routes/crossbell/notes/index.ts index ac2c681da..ef362b14c 100644 --- a/lib/routes/crossbell/notes/index.ts +++ b/lib/routes/crossbell/notes/index.ts @@ -1,16 +1,39 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { getItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notes', + categories: ['social-media'], + example: '/crossbell/notes', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['crossbell.io/*'], + }, + name: 'Notes', + maintainers: ['DIYgod'], + handler, + url: 'crossbell.io/*', +}; + +async function handler() { const response = await got('https://indexer.crossbell.io/v1/notes', { searchParams: { includeCharacter: true, }, }); - ctx.set('data', { + return { title: 'Crossbell Notes', link: 'https://crossbell.io/', item: response.data?.list?.map((item) => getItem(item)), - }); -}; + }; +} diff --git a/lib/routes/crossbell/notes/source.ts b/lib/routes/crossbell/notes/source.ts index 7c8563ce0..aaf087555 100644 --- a/lib/routes/crossbell/notes/source.ts +++ b/lib/routes/crossbell/notes/source.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { getItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/source/:source', + categories: ['social-media'], + example: '/crossbell/notes/source/xlog', + parameters: { source: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['crossbell.io/*'], + target: '/notes', + }, + name: 'Notes of source', + maintainers: ['DIYgod'], + handler, + url: 'crossbell.io/*', +}; + +async function handler(ctx) { const source = ctx.req.param('source'); const response = await got('https://indexer.crossbell.io/v1/notes', { @@ -11,9 +35,9 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: 'Crossbell Notes from ' + source, link: 'https://crossbell.io/', item: response.data?.list?.map((item) => getItem(item)), - }); -}; + }; +} diff --git a/lib/routes/crossbell/radar.ts b/lib/routes/crossbell/radar.ts deleted file mode 100644 index d033e7d73..000000000 --- a/lib/routes/crossbell/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'crossbell.io': { - _name: 'Crossbell', - '.': [ - { - title: 'Notes', - docs: 'https://docs.rsshub.app/routes/social-media#crossbell', - source: '/*', - target: '/crossbell/notes', - }, - ], - }, - 'xlog.app': { - _name: 'xLog', - '.': [ - { - title: 'Notes', - docs: 'https://docs.rsshub.app/routes/social-media#crossbell', - source: '/*', - target: '/crossbell/notes/source/xlog', - }, - ], - }, -}; diff --git a/lib/routes/crossbell/router.ts b/lib/routes/crossbell/router.ts deleted file mode 100644 index 742ac57c2..000000000 --- a/lib/routes/crossbell/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/notes/character/:characterId', './notes/character'); - router.get('/notes/source/:source', './notes/source'); - router.get('/notes', './notes/index'); - router.get('/feeds/following/:characterId', './feeds/following'); -}; diff --git a/lib/routes/cs/index.ts b/lib/routes/cs/index.ts index 87872a745..b5c29a328 100644 --- a/lib/routes/cs/index.ts +++ b/lib/routes/cs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,14 @@ const decodeBufferByCharset = (buffer) => { return iconv.decode(buffer, encoding); }; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'xwzx' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -69,7 +77,7 @@ export default async (ctx) => { const image = new URL($('div.logo_cs a img').prop('src'), currentUrl).href; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -80,5 +88,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="Keywords"]').prop('content'), author: title.split('-').pop().trim(), - }); -}; + }; +} diff --git a/lib/routes/cs/maintainer.ts b/lib/routes/cs/maintainer.ts deleted file mode 100644 index 8075e7ad6..000000000 --- a/lib/routes/cs/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/zzkx': ['nczitzk'], - '/video/:category?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/cs/namespace.ts b/lib/routes/cs/namespace.ts new file mode 100644 index 000000000..72e1235ae --- /dev/null +++ b/lib/routes/cs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中证网', + url: 'cs.com.cn', +}; diff --git a/lib/routes/cs/radar.ts b/lib/routes/cs/radar.ts deleted file mode 100644 index c9aca3e98..000000000 --- a/lib/routes/cs/radar.ts +++ /dev/null @@ -1,229 +0,0 @@ -export default { - 'cs.com.cn': { - _name: '中证网', - '.': [ - { - title: '要闻', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/xwzx/'], - target: '/cs/xwzx', - }, - { - title: '公司', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/ssgs/'], - target: '/cs/ssgs', - }, - { - title: '市场', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/'], - target: '/cs/gppd', - }, - { - title: '基金', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/'], - target: '/cs/tzjj', - }, - { - title: '科创', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/5g/'], - target: '/cs/5g', - }, - { - title: '产经', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/cj2020/'], - target: '/cs/cj2020', - }, - { - title: '期货', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/zzqh2020/'], - target: '/cs/zzqh2020', - }, - { - title: '海外', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/hw2020/'], - target: '/cs/hw2020', - }, - { - title: '财经要闻', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/xwzx/hg/'], - target: '/cs/xwzx/hg', - }, - { - title: '观点评论', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/xwzx/jr/'], - target: '/cs/xwzx/jr', - }, - { - title: '民生消费', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/xwzx/msxf/'], - target: '/cs/xwzx/msxf', - }, - { - title: '公司要闻', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/ssgs/gsxw/'], - target: '/cs/ssgs/gsxw', - }, - { - title: '公司深度', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/ssgs/gssd/'], - target: '/cs/ssgs/gssd', - }, - { - title: '公司巡礼', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/ssgs/gsxl/'], - target: '/cs/ssgs/gsxl', - }, - { - title: 'A股市场', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/gsyj/'], - target: '/cs/gppd/gsyj', - }, - { - title: '港股资讯', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/ggzx/'], - target: '/cs/gppd/ggzx', - }, - { - title: '债市研究', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/zqxw/'], - target: '/cs/gppd/zqxw', - }, - { - title: '海外报道', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/hwbd/'], - target: '/cs/gppd/hwbd', - }, - { - title: '期货报道', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/gppd/qhbd/'], - target: '/cs/gppd/qhbd', - }, - { - title: '基金动态', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/jjdt/'], - target: '/cs/tzjj/jjdt', - }, - { - title: '基金视点', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/jjks/'], - target: '/cs/tzjj/jjks', - }, - { - title: '基金持仓', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/jjcs/'], - target: '/cs/tzjj/jjcs', - }, - { - title: '私募基金', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/smjj/'], - target: '/cs/tzjj/smjj', - }, - { - title: '基民学苑', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/tzjj/tjdh/'], - target: '/cs/tzjj/tjdh', - }, - { - title: '券商', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/qs/'], - target: '/cs/qs', - }, - { - title: '银行', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/yh/'], - target: '/cs/yh', - }, - { - title: '保险', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/bx/'], - target: '/cs/bx', - }, - { - title: '中证快讯 7x24', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/sylm/jsbd/'], - target: '/cs/sylm/jsbd', - }, - { - title: 'IPO鉴真', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/yc/ipojz/'], - target: '/cs/yc/ipojz', - }, - { - title: '公司能见度', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-lan-mu', - source: ['/yc/gsnjd/'], - target: '/cs/yc/gsnjd', - }, - ], - video: [ - { - title: '中证视频', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: (_, url) => { - const category = url.searchParams.get('title') || url.searchParams.get('id'); - - return `/cs/video${category ? `/${category}` : ''}`; - }, - }, - { - title: '今日聚焦', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: '/cs/video/今日聚焦', - }, - { - title: '传闻求证', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: '/cs/video/传闻求证', - }, - { - title: '高端访谈', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: '/cs/video/高端访谈', - }, - { - title: '投教课堂', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: '/cs/video/投教课堂', - }, - { - title: '直播汇', - docs: 'https://docs.rsshub.app/routes/finance#zhong-zheng-wang-zhong-zheng-shi-pin', - source: ['list.html'], - target: '/cs/video/直播汇', - }, - ], - }, -}; diff --git a/lib/routes/cs/router.ts b/lib/routes/cs/router.ts deleted file mode 100644 index 135bdcc69..000000000 --- a/lib/routes/cs/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/news/zzkx', './zzkx'); - router.get('/zzkx', './zzkx'); - router.get('/video/:category?', './video'); - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/cs/video.ts b/lib/routes/cs/video.ts index 26e9832ab..2011cbd6f 100644 --- a/lib/routes/cs/video.ts +++ b/lib/routes/cs/video.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/video/:category?', + categories: ['finance'], + example: '/cs/video/今日聚焦', + parameters: { category: '分类,见下表,默认为今日聚焦' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { category = '今日聚焦' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -54,7 +73,7 @@ export default async (ctx) => { const image = selected.image; const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${title} | ${selected.title}`, link: currentUrl, @@ -66,5 +85,5 @@ export default async (ctx) => { subtitle: $('meta[name="Keywords"]').prop('content'), author: title.split('-').pop().trim(), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/cs/zzkx.ts b/lib/routes/cs/zzkx.ts index 38532bde9..0786a2559 100644 --- a/lib/routes/cs/zzkx.ts +++ b/lib/routes/cs/zzkx.ts @@ -1,6 +1,14 @@ -export default (ctx) => { +import { 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.redirect(redirectTo); -}; +} diff --git a/lib/routes/csdn/blog.ts b/lib/routes/csdn/blog.ts index 6c806bd0e..96f583d05 100644 --- a/lib/routes/csdn/blog.ts +++ b/lib/routes/csdn/blog.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import rssParser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:user', + categories: ['blog'], + example: '/csdn/blog/csdngeeknews', + parameters: { user: '`user` is the username of a CSDN blog which can be found in the url of the home page' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['blog.csdn.net/:user'], + }, + name: 'User Feed', + maintainers: [], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const rootUrl = 'https://blog.csdn.net'; @@ -32,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { ...feed, title: `${feed.title} - CSDN博客`, item: items, - }); -}; + }; +} diff --git a/lib/routes/csdn/maintainer.ts b/lib/routes/csdn/maintainer.ts deleted file mode 100644 index a88a602f0..000000000 --- a/lib/routes/csdn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['Jkker'], -}; diff --git a/lib/routes/csdn/namespace.ts b/lib/routes/csdn/namespace.ts new file mode 100644 index 000000000..00752316d --- /dev/null +++ b/lib/routes/csdn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CSDN', + url: 'blog.csdn.net', +}; diff --git a/lib/routes/csdn/radar.ts b/lib/routes/csdn/radar.ts deleted file mode 100644 index d5997b66d..000000000 --- a/lib/routes/csdn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'csdn.net': { - _name: 'CSDN', - blog: [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#csdn', - source: ['/:user'], - target: '/csdn/blog/:user', - }, - ], - }, -}; diff --git a/lib/routes/csdn/router.ts b/lib/routes/csdn/router.ts deleted file mode 100644 index ca3e65042..000000000 --- a/lib/routes/csdn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:user', './blog'); -}; diff --git a/lib/routes/cssn/iolaw.ts b/lib/routes/cssn/iolaw.ts index f51c2d8a2..c1f4e701b 100644 --- a/lib/routes/cssn/iolaw.ts +++ b/lib/routes/cssn/iolaw.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/iolaw/:section?', + categories: ['study'], + example: '/cssn/iolaw/zxzp', + parameters: { section: 'Section ID, can be found in the URL. For example, the Section ID of URL `http://iolaw.cssn.cn/zxzp/` is `zxzp`. The default value is `zxzp`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Institute of Law', + maintainers: ['HankChow'], + handler, +}; + +async function handler(ctx) { const section = ctx.req.param('section') ?? 'zxzp'; const domain = 'iolaw.cssn.cn'; const response = await got(`http://${domain}/${section}/`); @@ -24,7 +43,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '中国法学网', url: `http://${domain}/${section}/`, description: '中国法学网', @@ -34,5 +53,5 @@ export default async (ctx) => { link: item.link, author: item.author, })), - }); -}; + }; +} diff --git a/lib/routes/cssn/maintainer.ts b/lib/routes/cssn/maintainer.ts deleted file mode 100644 index 0be04dfb8..000000000 --- a/lib/routes/cssn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/iolaw/:section?': ['HankChow'], -}; diff --git a/lib/routes/cssn/namespace.ts b/lib/routes/cssn/namespace.ts new file mode 100644 index 000000000..62e345b28 --- /dev/null +++ b/lib/routes/cssn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Chinese Social Science Net', + url: 'iolaw.cssn.cn', +}; diff --git a/lib/routes/cssn/radar.ts b/lib/routes/cssn/radar.ts deleted file mode 100644 index 7649e64f7..000000000 --- a/lib/routes/cssn/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'cssn.cn': { - _name: '中国社会科学网', - iolaw: [ - { - title: '中国法学网', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-she-hui-ke-xue-wang', - }, - ], - }, -}; diff --git a/lib/routes/cssn/router.ts b/lib/routes/cssn/router.ts deleted file mode 100644 index 4dcbeea03..000000000 --- a/lib/routes/cssn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/iolaw/:section?', './iolaw'); -}; diff --git a/lib/routes/cste/index.ts b/lib/routes/cste/index.ts index 104357003..f1dc4882e 100644 --- a/lib/routes/cste/index.ts +++ b/lib/routes/cste/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['study'], + example: '/cste', + parameters: { id: '分类,见下表,默认为 16,即通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 通知公告 | 学会新闻 | 科协简讯 | 学科动态 | 往事钩沉 | + | -------- | -------- | -------- | -------- | -------- | + | 16 | 18 | 19 | 20 | 21 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '16'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; @@ -49,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `中国技术经济学会 - ${$('.leftTop').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/cste/maintainer.ts b/lib/routes/cste/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/cste/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/cste/namespace.ts b/lib/routes/cste/namespace.ts new file mode 100644 index 000000000..48521384c --- /dev/null +++ b/lib/routes/cste/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国技术经济学会', + url: 'cste.org.cn', +}; diff --git a/lib/routes/cste/radar.ts b/lib/routes/cste/radar.ts deleted file mode 100644 index 00e5ff46d..000000000 --- a/lib/routes/cste/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cste.org.cn': { - _name: '中国技术经济学会', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-shu-jing-ji-xue-hui-lan-mu', - source: ['/site/term', '/'], - target: (params, url) => `/cste/${url.match(/site\/term\/(\d+)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/cste/router.ts b/lib/routes/cste/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/cste/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/csu/career.ts b/lib/routes/csu/career.ts index b9e91ec98..67759af46 100644 --- a/lib/routes/csu/career.ts +++ b/lib/routes/csu/career.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { unzip } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/career', + categories: ['university'], + example: '/csu/career', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['career.csu.edu.cn/campus/index/category/1', 'career.csu.edu.cn/campus', 'career.csu.edu.cn/'], + }, + name: '就业信息网招聘信息', + maintainers: ['TonyRL'], + handler, + url: 'career.csu.edu.cn/campus/index/category/1', +}; + +async function handler() { const baseUrl = 'https://career.csu.edu.cn'; const link = `${baseUrl}/campus/index/category/1`; const { data: response } = await got(link); @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.curr').text()} - ${$('head title').text()}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/csu/cse.ts b/lib/routes/csu/cse.ts index 57553ccd9..9876514ea 100644 --- a/lib/routes/csu/cse.ts +++ b/lib/routes/csu/cse.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -13,7 +14,28 @@ async function fetch(address) { }; } -export default async (ctx) => { +export const route: Route = { + path: '/cse/:type?', + categories: ['university'], + example: '/csu/cse', + parameters: { type: '类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机学院', + maintainers: ['j1g5awi'], + handler, + description: `| 类型 | 学院新闻 | 通知公告 | 学术信息 | 学工动态 | 科研动态 | + | ---- | -------- | -------- | -------- | -------- | -------- | + | 参数 | xyxw | tzgg | xsxx | xgdt | kydt |`, +}; + +async function handler(ctx) { const url = 'https://cse.csu.edu.cn/index/'; const type = ctx.req.param('type') ?? 'tzgg'; const link = url + type + '.htm'; @@ -34,9 +56,9 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: $('title').text(), link, item: out, - }); -}; + }; +} diff --git a/lib/routes/csu/mail.ts b/lib/routes/csu/mail.ts index 46de38c93..f8aeaf562 100644 --- a/lib/routes/csu/mail.ts +++ b/lib/routes/csu/mail.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,28 @@ async function fetch(address) { return $('.tb-ct-info').html(); } -export default async (ctx) => { +export const route: Route = { + path: '/mail/:type?', + categories: ['university'], + example: '/csu/mail', + parameters: { type: '类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '校长信箱', + maintainers: ['j1g5awi'], + handler, + description: `| 类型 | 校长信箱 | 党委信箱 | + | ---- | -------- | -------- | + | 参数 | 01 | 02 |`, +}; + +async function handler(ctx) { const baseUrl = 'https://oa.csu.edu.cn'; const { type = '01' } = ctx.req.param(); const link = `${baseUrl}/mailbox/NoAuth/MailList_Pub?tp=${type}`; @@ -40,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `中南大学学校信箱 - ${type === '01' ? '校长信箱' : '党委信箱'}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/csu/maintainer.ts b/lib/routes/csu/maintainer.ts deleted file mode 100644 index 1df0687ee..000000000 --- a/lib/routes/csu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/career': ['TonyRL'], - '/cse/:type?': ['j1g5awi'], - '/mail/:type?': ['j1g5awi'], -}; diff --git a/lib/routes/csu/namespace.ts b/lib/routes/csu/namespace.ts new file mode 100644 index 000000000..7e5fee5d3 --- /dev/null +++ b/lib/routes/csu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中南大学', + url: 'career.csu.edu.cn', +}; diff --git a/lib/routes/csu/radar.ts b/lib/routes/csu/radar.ts deleted file mode 100644 index 409cf0bd8..000000000 --- a/lib/routes/csu/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'csu.edu.cn': { - _name: '中南大学', - career: [ - { - title: '就业信息网招聘信息', - docs: 'https://docs.rsshub.app/routes/university#zhong-nan-da-xue', - source: ['/campus/index/category/1', '/campus', '/'], - target: '/csu/career', - }, - ], - cse: [ - { - title: '计算机学院', - docs: 'https://docs.rsshub.app/routes/university#zhong-nan-da-xue', - source: ['/index/:type'], - target: (params) => `/csu/cse/${params.type.substring(0, 4)}`, - }, - ], - oa: [ - { - title: '校长信箱', - docs: 'https://docs.rsshub.app/routes/university#zhong-nan-da-xue', - source: ['/mailbox/NoAuth/MailList_Pub'], - target: (_, url) => `/csu/mail/${new URL(url).searchParams.get('tp')}`, - }, - ], - }, -}; diff --git a/lib/routes/csu/router.ts b/lib/routes/csu/router.ts deleted file mode 100644 index eab313fbe..000000000 --- a/lib/routes/csu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/career', './career'); - router.get('/cse/:type?', './cse'); - router.get('/mail/:type?', './mail'); -}; diff --git a/lib/routes/cts/maintainer.ts b/lib/routes/cts/maintainer.ts deleted file mode 100644 index 0bb8e10f3..000000000 --- a/lib/routes/cts/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category': ['miles170'], -}; diff --git a/lib/routes/cts/namespace.ts b/lib/routes/cts/namespace.ts new file mode 100644 index 000000000..a71fd7cd3 --- /dev/null +++ b/lib/routes/cts/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '華視', + url: 'news.cts.com.tw', +}; diff --git a/lib/routes/cts/news.ts b/lib/routes/cts/news.ts index 4cb9961dd..727e3f69e 100644 --- a/lib/routes/cts/news.ts +++ b/lib/routes/cts/news.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + categories: ['traditional-media'], + example: '/cts/real', + parameters: { category: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.cts.com.tw/:category/index.html'], + }, + name: '新聞', + maintainers: ['miles170'], + handler, + description: `| 即時 | 氣象 | 政治 | 國際 | 社會 | 運動 | 生活 | 財經 | 台語 | 地方 | 產業 | 綜合 | 藝文 | 娛樂 | + | ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- | + | real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const currentUrl = `https://news.cts.com.tw/${category}/index.html`; const response = await got(currentUrl); @@ -32,10 +57,10 @@ export default async (ctx) => { items.push(data); } - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, description: $('meta[name="description"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cts/radar.ts b/lib/routes/cts/radar.ts deleted file mode 100644 index a3625bfca..000000000 --- a/lib/routes/cts/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cts.com.tw': { - _name: '華視', - news: [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-shi-xin-wen', - source: '/:category/index.html', - target: '/cts/:category', - }, - ], - }, -}; diff --git a/lib/routes/cts/router.ts b/lib/routes/cts/router.ts deleted file mode 100644 index 3eb67b2b4..000000000 --- a/lib/routes/cts/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category', './news'); -}; diff --git a/lib/routes/cuc/maintainer.ts b/lib/routes/cuc/maintainer.ts deleted file mode 100644 index e6128071b..000000000 --- a/lib/routes/cuc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/yz': ['niuyi1017'], -}; diff --git a/lib/routes/cuc/namespace.ts b/lib/routes/cuc/namespace.ts new file mode 100644 index 000000000..114659b0e --- /dev/null +++ b/lib/routes/cuc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国传媒大学', + url: 'yz.cuc.edu.cn', +}; diff --git a/lib/routes/cuc/radar.ts b/lib/routes/cuc/radar.ts deleted file mode 100644 index b1307d10f..000000000 --- a/lib/routes/cuc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'cuc.edu.cn': { - _name: '中国传媒大学', - yz: [ - { - title: '研究生招生网', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-chuan-mei-da-xue', - source: ['/8549/list.htm', '/'], - target: '/cuc/yz', - }, - ], - }, -}; diff --git a/lib/routes/cuc/router.ts b/lib/routes/cuc/router.ts deleted file mode 100644 index 462d4b218..000000000 --- a/lib/routes/cuc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/yz', './yz'); -}; diff --git a/lib/routes/cuc/yz.ts b/lib/routes/cuc/yz.ts index 7e094ab36..e06a6276b 100644 --- a/lib/routes/cuc/yz.ts +++ b/lib/routes/cuc/yz.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; /* 研究生招生网通知公告*/ -export default async (ctx) => { +export const route: Route = { + path: '/yz', + categories: ['university'], + example: '/cuc/yz', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.cuc.edu.cn/8549/list.htm', 'yz.cuc.edu.cn/'], + }, + name: '研究生招生网', + maintainers: ['niuyi1017'], + handler, + url: 'yz.cuc.edu.cn/8549/list.htm', +}; + +async function handler() { const host = 'https://yz.cuc.edu.cn'; const link = `${host}/8549/list.htm`; const response = await got({ @@ -24,10 +47,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link, description: '中国传媒大学研究生招生网 通知公告', item: items, - }); -}; + }; +} diff --git a/lib/routes/curiouscat/maintainer.ts b/lib/routes/curiouscat/maintainer.ts deleted file mode 100644 index 53dd29bf9..000000000 --- a/lib/routes/curiouscat/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:id': ['lucasew'], -}; diff --git a/lib/routes/curiouscat/namespace.ts b/lib/routes/curiouscat/namespace.ts new file mode 100644 index 000000000..a5c187bff --- /dev/null +++ b/lib/routes/curiouscat/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CuriousCat', + url: 'curiouscat.live', +}; diff --git a/lib/routes/curiouscat/radar.ts b/lib/routes/curiouscat/radar.ts deleted file mode 100644 index d4bcc2899..000000000 --- a/lib/routes/curiouscat/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'curiouscat.live': { - _name: 'CuriousCat', - '.': [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/social-media#curiouscat', - source: ['/:id'], - target: '/curiouscat/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/curiouscat/router.ts b/lib/routes/curiouscat/router.ts deleted file mode 100644 index a7fbaa70a..000000000 --- a/lib/routes/curiouscat/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/curiouscat/user.ts b/lib/routes/curiouscat/user.ts index 0814992c0..76d84eaff 100644 --- a/lib/routes/curiouscat/user.ts +++ b/lib/routes/curiouscat/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; const fetchAPIByUser = async (user) => { @@ -6,7 +7,17 @@ const fetchAPIByUser = async (user) => { return data; }; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + radar: { + source: ['curiouscat.live/:id'], + }, + name: 'Unknown', + maintainers: ['lucasew'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const user = id; const data = await fetchAPIByUser(user); @@ -30,11 +41,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `CuriousCat - ${user}`, link: `https://curiouscat.live/${user}`, description: `Questions answered by ${user} using CuriousCat`, language: data.lang, item: items, - }); -}; + }; +} diff --git a/lib/routes/curius/links.ts b/lib/routes/curius/links.ts index 2b55bd139..04a7d99cf 100644 --- a/lib/routes/curius/links.ts +++ b/lib/routes/curius/links.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/links/:name', + categories: ['social-media'], + example: '/curius/links/yuu-yuu', + parameters: { name: 'Username, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['curius.app/:name'], + }, + name: 'User', + maintainers: ['Ovler-Young'], + handler, +}; + +async function handler(ctx) { const username = ctx.req.param('name'); const name_response = await got(`https://curius.app/api/users/${username}`, { @@ -36,11 +58,11 @@ export default async (ctx) => { guid: `curius:${username}:${item.id}`, })); - ctx.set('data', { + return { title: `${name} - Curius`, link: `https://curius.app/${username}`, description: `${name} - Curius`, allowEmpty: true, item: items, - }); -}; + }; +} diff --git a/lib/routes/curius/maintainer.ts b/lib/routes/curius/maintainer.ts deleted file mode 100644 index 310bb5a3c..000000000 --- a/lib/routes/curius/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/links/:name': ['Ovler-Young'], -}; diff --git a/lib/routes/curius/namespace.ts b/lib/routes/curius/namespace.ts new file mode 100644 index 000000000..3c782f893 --- /dev/null +++ b/lib/routes/curius/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Curius', + url: 'curius.app', +}; diff --git a/lib/routes/curius/radar.ts b/lib/routes/curius/radar.ts deleted file mode 100644 index eb4ad4b5a..000000000 --- a/lib/routes/curius/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'curius.app': { - _name: 'Curius', - '.': [ - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#curius', - source: '/:name', - target: '/curius/links/:name', - }, - ], - }, -}; diff --git a/lib/routes/curius/router.ts b/lib/routes/curius/router.ts deleted file mode 100644 index 30fd06316..000000000 --- a/lib/routes/curius/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/links/:name', './links'); -}; diff --git a/lib/routes/cw/author.ts b/lib/routes/cw/author.ts index 0a560401a..b0781b0df 100644 --- a/lib/routes/cw/author.ts +++ b/lib/routes/cw/author.ts @@ -1,19 +1,41 @@ +import { Route } from '@/types'; import { baseUrl, parsePage } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:channel', + categories: ['traditional-media'], + example: '/cw/author/57', + parameters: { channel: '作者 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cw.com.tw/author/:channel'], + }, + name: '作者', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const browser = await puppeteer(); const { $, items } = await parsePage('author', browser, ctx); await browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('.authorTxt').text(), link: `${baseUrl}/author/${ctx.req.param('channel')}`, image: $('.authorPhoto img').attr('src') || `${baseUrl}/assets_new/img/fbshare.jpg'`, language: $('meta[property="og:locale"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cw/maintainer.ts b/lib/routes/cw/maintainer.ts deleted file mode 100644 index ab4516199..000000000 --- a/lib/routes/cw/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/author/:channel': ['TonyRL'], - '/master/:channel': ['TonyRL'], - '/sub/:channel': ['TonyRL'], - '/today': ['TonyRL'], -}; diff --git a/lib/routes/cw/master.ts b/lib/routes/cw/master.ts index a11397b60..3fcc3e360 100644 --- a/lib/routes/cw/master.ts +++ b/lib/routes/cw/master.ts @@ -1,19 +1,53 @@ +import { Route } from '@/types'; import { baseUrl, parsePage } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/master/:channel', + categories: ['traditional-media'], + example: '/cw/master/8', + parameters: { channel: '主頻道 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '主頻道', + maintainers: ['TonyRL'], + handler, + description: `| 主頻道名稱 | 主頻道 ID | + | ---------- | --------- | + | 財經 | 8 | + | 產業 | 7 | + | 國際 | 9 | + | 管理 | 10 | + | 環境 | 12 | + | 教育 | 13 | + | 人物 | 14 | + | 政治社會 | 77 | + | 調查排行 | 15 | + | 健康關係 | 79 | + | 時尚品味 | 11 | + | 運動生活 | 103 | + | 重磅外媒 | 16 |`, +}; + +async function handler(ctx) { const browser = await puppeteer(); const { $, items } = await parsePage('master', browser, ctx); await browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), link: `${baseUrl}/masterChannel.action?idMasterChannel=${ctx.req.param('channel')}`, image: `${baseUrl}/assets_new/img/fbshare.jpg`, language: $('meta[property="og:locale"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cw/namespace.ts b/lib/routes/cw/namespace.ts new file mode 100644 index 000000000..5ebefe35d --- /dev/null +++ b/lib/routes/cw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '天下雜誌', + url: 'cw.com.tw', +}; diff --git a/lib/routes/cw/radar.ts b/lib/routes/cw/radar.ts deleted file mode 100644 index ec07fc5bd..000000000 --- a/lib/routes/cw/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'cw.com.tw': { - _name: '天下雜誌', - '.': [ - { - title: '最新上線', - docs: 'https://docs.rsshub.app/routes/traditional-media#tian-xia-za-zhi', - source: ['/today', '/'], - target: '/cw/today', - }, - { - title: '主頻道', - docs: 'https://docs.rsshub.app/routes/traditional-media#tian-xia-za-zhi', - source: ['/masterChannel.action'], - target: (_, url) => `/cw/master/${new URL(url).searchParams.get('idMasterChannel')}`, - }, - { - title: '子頻道', - docs: 'https://docs.rsshub.app/routes/traditional-media#tian-xia-za-zhi', - source: ['/subchannel.action'], - target: (_, url) => `/cw/sub/${new URL(url).searchParams.get('idSubChannel')}`, - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/traditional-media#tian-xia-za-zhi', - source: ['/author/:channel'], - target: '/cw/author/:channel', - }, - ], - }, -}; diff --git a/lib/routes/cw/router.ts b/lib/routes/cw/router.ts deleted file mode 100644 index 3d716907f..000000000 --- a/lib/routes/cw/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/author/:channel', './author'); - router.get('/master/:channel', './master'); - router.get('/sub/:channel', './sub'); - router.get('/today', './today'); -}; diff --git a/lib/routes/cw/sub.ts b/lib/routes/cw/sub.ts index 12b214fe1..6ddd42434 100644 --- a/lib/routes/cw/sub.ts +++ b/lib/routes/cw/sub.ts @@ -1,19 +1,38 @@ +import { Route } from '@/types'; import { baseUrl, parsePage } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/sub/:channel', + categories: ['traditional-media'], + example: '/cw/sub/615', + parameters: { channel: '子頻道 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '子頻道', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const browser = await puppeteer(); const { $, items } = await parsePage('sub', browser, ctx); await browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), link: `${baseUrl}/subchannel.action?idSubChannel=${ctx.req.param('channel')}`, image: `${baseUrl}/assets_new/img/fbshare.jpg`, language: $('meta[property="og:locale"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cw/today.ts b/lib/routes/cw/today.ts index d19f7ba9e..ddf4b1e18 100644 --- a/lib/routes/cw/today.ts +++ b/lib/routes/cw/today.ts @@ -1,19 +1,42 @@ +import { Route } from '@/types'; import { baseUrl, parsePage } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['traditional-media'], + example: '/cw/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cw.com.tw/today', 'cw.com.tw/'], + }, + name: '最新上線', + maintainers: ['TonyRL'], + handler, + url: 'cw.com.tw/today', +}; + +async function handler(ctx) { const browser = await puppeteer(); const { $, items } = await parsePage('today', browser, ctx); await browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), link: `${baseUrl}/today`, image: `${baseUrl}/assets_new/img/fbshare.jpg`, language: $('meta[property="og:locale"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/cyzone/author.ts b/lib/routes/cyzone/author.ts index 872b903b9..b0901e9c5 100644 --- a/lib/routes/cyzone/author.ts +++ b/lib/routes/cyzone/author.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, processItems, getInfo } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:id', + categories: ['new-media'], + example: '/cyzone/author/1225562', + parameters: { id: '作者 id,可在对应作者页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cyzone.cn/author/:id', 'cyzone.cn/'], + }, + name: '作者', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; @@ -12,8 +34,8 @@ export default async (ctx) => { author_id: id, }); - ctx.set('data', { + return { item: items, ...(await getInfo(currentUrl, cache.tryGet)), - }); -}; + }; +} diff --git a/lib/routes/cyzone/index.ts b/lib/routes/cyzone/index.ts index 72d2fdad4..50e077d7c 100644 --- a/lib/routes/cyzone/index.ts +++ b/lib/routes/cyzone/index.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, processItems, getInfo } from './util'; -export default async (ctx) => { +export const route: Route = { + path: ['/channel/:id?', '/:id?'], + radar: { + source: ['cyzone.cn/channel/:id', 'cyzone.cn/'], + target: '/:id', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + description: `| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | + | ---- | ------ | ---- | ------ | ---- | + | news | 5 | 14 | 13 | 8 | + + | 海外 | 消费 | 科技 | 医疗 | 文娱 | + | ---- | ---- | ---- | ---- | ---- | + | 10 | 9 | 7 | 27 | 11 | + + | 城市 | 政策 | 特写 | 干货 | 科技股 | + | ---- | ---- | ---- | ---- | ------ | + | 16 | 15 | 6 | 12 | 33 |`, +}; + +async function handler(ctx) { const { id = 'news' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; @@ -19,8 +42,8 @@ export default async (ctx) => { } ); - ctx.set('data', { + return { item: items, ...(await getInfo(currentUrl, cache.tryGet)), - }); -}; + }; +} diff --git a/lib/routes/cyzone/label.ts b/lib/routes/cyzone/label.ts index 63991e6ef..374a83ac3 100644 --- a/lib/routes/cyzone/label.ts +++ b/lib/routes/cyzone/label.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, processItems, getInfo } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/label/:name', + categories: ['new-media'], + example: '/cyzone/label/创业邦周报', + parameters: { name: '标签名称,可在对应标签页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cyzone.cn/label/:name', 'cyzone.cn/'], + }, + name: '标签', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; @@ -12,8 +34,8 @@ export default async (ctx) => { tag: name, }); - ctx.set('data', { + return { item: items, ...(await getInfo(currentUrl, cache.tryGet)), - }); -}; + }; +} diff --git a/lib/routes/cyzone/maintainer.ts b/lib/routes/cyzone/maintainer.ts deleted file mode 100644 index 78802d8c2..000000000 --- a/lib/routes/cyzone/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/': ['nczitzk'], - '/:id?': ['nczitzk'], - '/author/:id': ['nczitzk'], - '/channel/:id?': ['nczitzk'], - '/label/:name': ['nczitzk'], -}; diff --git a/lib/routes/cyzone/namespace.ts b/lib/routes/cyzone/namespace.ts new file mode 100644 index 000000000..e9a9f2c62 --- /dev/null +++ b/lib/routes/cyzone/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '创业邦', + url: 'cyzone.cn', +}; diff --git a/lib/routes/cyzone/radar.ts b/lib/routes/cyzone/radar.ts deleted file mode 100644 index 523881caf..000000000 --- a/lib/routes/cyzone/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'cyzone.cn': { - _name: '创业邦', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#chuang-ye-bang-zi-xun', - source: ['/channel/:id', '/'], - target: '/cyzone/:id', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/new-media#chuang-ye-bang-zuo-zhe', - source: ['/author/:id', '/'], - target: '/cyzone/author/:id', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#chuang-ye-bang-biao-qian', - source: ['/label/:name', '/'], - target: '/cyzone/label/:name', - }, - ], - }, -}; diff --git a/lib/routes/cyzone/router.ts b/lib/routes/cyzone/router.ts deleted file mode 100644 index 3ced832a5..000000000 --- a/lib/routes/cyzone/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/author/:id', './author'); - router.get('/channel/:id?', './'); - router.get('/label/:name', './label'); - router.get('/:id?', './'); -}; diff --git a/lib/routes/cztv/daily.ts b/lib/routes/cztv/daily.ts index e334e1aec..4761f6084 100644 --- a/lib/routes/cztv/daily.ts +++ b/lib/routes/cztv/daily.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ import { art } from '@/utils/render'; const renderDesc = (item) => art(path.join(__dirname, 'templates/daily.art'), item); -export default async (ctx) => { +export const route: Route = { + path: '/zjxwlb/daily', + categories: ['traditional-media'], + example: '/cztv/zjxwlb/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cztv.com/videos/zjxwlb', 'cztv.com/'], + }, + name: '浙江新闻联播 - 每日合集', + maintainers: ['yhkang'], + handler, + url: 'cztv.com/videos/zjxwlb', +}; + +async function handler() { const url = 'http://www.cztv.com/videos/zjxwlb'; const { data: res } = await got(url); @@ -36,9 +59,9 @@ export default async (ctx) => { description: renderDesc({ list: list.slice(1) }), }; - ctx.set('data', { + return { title: '浙江新闻联播-每日合集', link: url, item: [out], - }); -}; + }; +} diff --git a/lib/routes/cztv/maintainer.ts b/lib/routes/cztv/maintainer.ts deleted file mode 100644 index 44ad86294..000000000 --- a/lib/routes/cztv/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/zjxwlb': ['yhkang'], - '/zjxwlb/daily': ['yhkang'], -}; diff --git a/lib/routes/cztv/namespace.ts b/lib/routes/cztv/namespace.ts new file mode 100644 index 000000000..2c7a7f915 --- /dev/null +++ b/lib/routes/cztv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新蓝网(浙江广播电视集团)', + url: 'cztv.com', +}; diff --git a/lib/routes/cztv/radar.ts b/lib/routes/cztv/radar.ts deleted file mode 100644 index 365d643a0..000000000 --- a/lib/routes/cztv/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'cztv.com': { - _name: '新蓝网', - '.': [ - { - title: '浙江新闻联播', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan', - source: ['/videos/zjxwlb', '/'], - target: '/cztv/zjxwlb', - }, - { - title: '浙江新闻联播-每日合集', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan', - source: ['/videos/zjxwlb', '/'], - target: '/cztv/zjxwlb/daily', - }, - ], - }, -}; diff --git a/lib/routes/cztv/router.ts b/lib/routes/cztv/router.ts deleted file mode 100644 index 67ca83c08..000000000 --- a/lib/routes/cztv/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/zjxwlb', './zjxwlb'); - router.get('/zjxwlb/daily', './daily'); -}; diff --git a/lib/routes/cztv/zjxwlb.ts b/lib/routes/cztv/zjxwlb.ts index c3d03cc90..3493eb30d 100644 --- a/lib/routes/cztv/zjxwlb.ts +++ b/lib/routes/cztv/zjxwlb.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ import { art } from '@/utils/render'; const renderDesc = (item) => art(path.join(__dirname, 'templates/zjxwlb.art'), item); -export default async (ctx) => { +export const route: Route = { + path: '/zjxwlb', + categories: ['traditional-media'], + example: '/cztv/zjxwlb', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cztv.com/videos/zjxwlb', 'cztv.com/'], + }, + name: '浙江新闻联播', + maintainers: ['yhkang'], + handler, + url: 'cztv.com/videos/zjxwlb', +}; + +async function handler() { const url = 'http://www.cztv.com/videos/zjxwlb'; const { data: res } = await got(url); @@ -33,9 +56,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '浙江新闻联播', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/dahecube/index.ts b/lib/routes/dahecube/index.ts index c3ba3fe83..b7e502c1a 100644 --- a/lib/routes/dahecube/index.ts +++ b/lib/routes/dahecube/index.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import utils from './utils'; const { TYPE, parseUrl } = utils; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['new-media'], + example: '/dahecube', + parameters: { type: '板块,见下表,默认为推荐' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['linbuxiao'], + handler, + description: `| 推荐 | 党史 | 豫股 | 财经 | 投教 | 金融 | 科创 | 投融 | 专栏 | + | --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ | + | recommend | history | stock | business | education | finance | science | invest | column |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'recommend'; const params = JSON.stringify({ channelid: TYPE[type].id, @@ -50,13 +72,13 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '大河财立方', link: parseUrl(type), description: `大河财立方 ${TYPE[type].name}`, language: 'zh-cn', item: items, - }); + }; ctx.set('json', { title: '大河财立方', @@ -64,4 +86,4 @@ export default async (ctx) => { description: `大河财立方 ${TYPE[type].name}`, items, }); -}; +} diff --git a/lib/routes/dahecube/maintainer.ts b/lib/routes/dahecube/maintainer.ts deleted file mode 100644 index b9b6809cd..000000000 --- a/lib/routes/dahecube/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['linbuxiao'], -}; diff --git a/lib/routes/dahecube/namespace.ts b/lib/routes/dahecube/namespace.ts new file mode 100644 index 000000000..44cf03e51 --- /dev/null +++ b/lib/routes/dahecube/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大河财立方', + url: 'dahecube.com', +}; diff --git a/lib/routes/dahecube/radar.ts b/lib/routes/dahecube/radar.ts deleted file mode 100644 index f41234d4a..000000000 --- a/lib/routes/dahecube/radar.ts +++ /dev/null @@ -1,60 +0,0 @@ -export default { - 'dahecube.com': { - _name: '大河财立方', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#da-he-cai-li-fang', - source: ['/channel.html', '/index.html'], - target: (_, url) => { - const id = Number.parseInt(new URL(url).searchParams.get('recid')); - let type = 'recommend'; - const TypeMap = { - recommend: { - name: '推荐', - id: 1, - }, - history: { - name: '党史', - id: 37, - }, - stock: { - name: '豫股', - id: 2, - }, - business: { - name: '财经', - id: 4, - }, - education: { - name: '投教', - id: 36, - }, - finance: { - name: '金融', - id: 5, - }, - science: { - name: '科创', - id: 19, - }, - invest: { - name: '投融', - id: 29, - }, - column: { - name: '专栏', - id: 33, - }, - }; - for (const [key, value] of Object.entries(TypeMap)) { - if (value.id === id) { - type = key; - } - } - return `/dahecube/${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/dahecube/router.ts b/lib/routes/dahecube/router.ts deleted file mode 100644 index 6fd05f06e..000000000 --- a/lib/routes/dahecube/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); -}; diff --git a/lib/routes/daily/discussed.ts b/lib/routes/daily/discussed.ts index 97c9f361e..de466f049 100644 --- a/lib/routes/daily/discussed.ts +++ b/lib/routes/daily/discussed.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getData, getList, getRedirectedLink } from './utils.js'; const variables = { @@ -56,12 +57,35 @@ const graphqlQuery = { variables, }; -export default async (ctx) => { +export const route: Route = { + path: '/discussed', + categories: ['social-media'], + example: '/daily/discussed', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['daily.dev/popular'], + target: '', + }, + name: 'Most Discussed', + maintainers: ['Rjnishant530'], + handler, + url: 'daily.dev/popular', +}; + +async function handler() { const baseUrl = 'https://app.daily.dev/discussed'; const data = await getData(graphqlQuery); const list = getList(data); const items = await getRedirectedLink(list); - ctx.set('data', { + return { title: 'Most Discussed', link: baseUrl, item: items, @@ -69,5 +93,5 @@ export default async (ctx) => { logo: 'https://app.daily.dev/favicon-32x32.png', icon: 'https://app.daily.dev/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/daily/index.ts b/lib/routes/daily/index.ts index ed7f851ba..7b4165754 100644 --- a/lib/routes/daily/index.ts +++ b/lib/routes/daily/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getData, getList, getRedirectedLink } from './utils.js'; const variables = { @@ -66,12 +67,24 @@ const graphqlQuery = { variables, }; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['daily.dev/popular'], + target: '', + }, + name: 'Unknown', + maintainers: ['Rjnishant530'], + handler, + url: 'daily.dev/popular', +}; + +async function handler() { const baseUrl = 'https://app.daily.dev/popular'; const data = await getData(graphqlQuery); const list = getList(data); const items = await getRedirectedLink(list); - ctx.set('data', { + return { title: 'Popular', link: baseUrl, item: items, @@ -79,5 +92,5 @@ export default async (ctx) => { logo: 'https://app.daily.dev/favicon-32x32.png', icon: 'https://app.daily.dev/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/daily/maintainer.ts b/lib/routes/daily/maintainer.ts deleted file mode 100644 index 68ef1a493..000000000 --- a/lib/routes/daily/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/': ['Rjnishant530'], - '/discussed': ['Rjnishant530'], - '/upvoted': ['Rjnishant530'], -}; diff --git a/lib/routes/daily/namespace.ts b/lib/routes/daily/namespace.ts new file mode 100644 index 000000000..acddafe86 --- /dev/null +++ b/lib/routes/daily/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Daily.dev', + url: 'daily.dev', +}; diff --git a/lib/routes/daily/radar.ts b/lib/routes/daily/radar.ts deleted file mode 100644 index 624934413..000000000 --- a/lib/routes/daily/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'daily.dev': { - _name: 'Daily.dev', - '.': [ - { - title: 'Most Discussed', - docs: 'https://docs.rsshub.app/routes/social-media#daily.dev', - source: ['/discussed'], - target: '/daily/discussed', - }, - { - title: 'Most Upvoted', - docs: 'https://docs.rsshub.app/routes/social-media#daily.dev', - source: ['/upvoted'], - target: '/daily/upvoted', - }, - { - title: 'Popular', - docs: 'https://docs.rsshub.app/routes/social-media#daily.dev', - source: ['/popular'], - target: '/daily', - }, - ], - }, -}; diff --git a/lib/routes/daily/router.ts b/lib/routes/daily/router.ts deleted file mode 100644 index 4e49cd94e..000000000 --- a/lib/routes/daily/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/discussed', './discussed'); - router.get('/upvoted', './upvoted'); -}; diff --git a/lib/routes/daily/upvoted.ts b/lib/routes/daily/upvoted.ts index 9d605df3b..f6b634694 100644 --- a/lib/routes/daily/upvoted.ts +++ b/lib/routes/daily/upvoted.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getData, getList, getRedirectedLink } from './utils.js'; const variables = { @@ -60,12 +61,35 @@ const graphqlQuery = { variables, }; -export default async (ctx) => { +export const route: Route = { + path: '/upvoted', + categories: ['social-media'], + example: '/daily/upvoted', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['daily.dev/popular'], + target: '', + }, + name: 'Most upvoted', + maintainers: ['Rjnishant530'], + handler, + url: 'daily.dev/popular', +}; + +async function handler() { const baseUrl = 'https://app.daily.dev/upvoted'; const data = await getData(graphqlQuery); const list = getList(data); const items = await getRedirectedLink(list); - ctx.set('data', { + return { title: 'Most Upvoted', link: baseUrl, item: items, @@ -73,5 +97,5 @@ export default async (ctx) => { logo: 'https://app.daily.dev/favicon-32x32.png', icon: 'https://app.daily.dev/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/damai/activity.ts b/lib/routes/damai/activity.ts index 7e59bcedf..965d9e25c 100644 --- a/lib/routes/damai/activity.ts +++ b/lib/routes/damai/activity.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,26 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/activity/:city/:category/:subcategory/:keyword?', + categories: ['shopping'], + example: '/damai/activity/上海/音乐会/全部/柴可夫斯基', + parameters: { city: '城市,如果不需要限制,请填入`全部`', category: '分类,如果不需要限制,请填入`全部`', subcategory: '子分类,如果不需要限制,请填入`全部`', keyword: '搜索关键字,置空为不限制' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '票务更新', + maintainers: ['hoilc'], + handler, + description: `城市、分类名、子分类名,请参见[大麦网搜索页面](https://search.damai.cn/search.htm)`, +}; + +async function handler(ctx) { const city = ctx.req.param('city') === '全部' ? '' : ctx.req.param('city'); const category = ctx.req.param('category') === '全部' ? '' : ctx.req.param('category'); const subcategory = ctx.req.param('subcategory') === '全部' ? '' : ctx.req.param('subcategory'); @@ -32,7 +52,7 @@ export default async (ctx) => { const data = response.data; const list = data.pageData.resultData || []; - ctx.set('data', { + return { title: `大麦网票务 - ${city || '全国'} - ${category || '全部分类'}${subcategory ? ' - ' + subcategory : ''}${keyword ? ' - ' + keyword : ''}`, link: 'https://search.damai.cn/search.htm', item: list.map((item) => ({ @@ -43,5 +63,5 @@ export default async (ctx) => { }), link: `https://detail.damai.cn/item.htm?id=${item.projectid}`, })), - }); -}; + }; +} diff --git a/lib/routes/damai/maintainer.ts b/lib/routes/damai/maintainer.ts deleted file mode 100644 index 17c01f05e..000000000 --- a/lib/routes/damai/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/activity/:city/:category/:subcategory/:keyword?': ['hoilc'], -}; diff --git a/lib/routes/damai/namespace.ts b/lib/routes/damai/namespace.ts new file mode 100644 index 000000000..72327dc8a --- /dev/null +++ b/lib/routes/damai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大麦网', + url: 'search.damai.cn', +}; diff --git a/lib/routes/damai/radar.ts b/lib/routes/damai/radar.ts deleted file mode 100644 index 0d047c745..000000000 --- a/lib/routes/damai/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'damai.cn': { - _name: '大麦网', - search: [ - { - title: '票务更新', - docs: 'https://docs.rsshub.app/routes/shopping#da-mai-wang', - source: ['/search.html'], - target: (_params, url) => `/damai/activity/全部/全部/全部/${new URL(url).searchParams.get('keyword') || ''}`, - }, - ], - }, -}; diff --git a/lib/routes/damai/router.ts b/lib/routes/damai/router.ts deleted file mode 100644 index 31e02da69..000000000 --- a/lib/routes/damai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/activity/:city/:category/:subcategory/:keyword?', './activity'); -}; diff --git a/lib/routes/dapenti/maintainer.ts b/lib/routes/dapenti/maintainer.ts deleted file mode 100644 index 9df2f451b..000000000 --- a/lib/routes/dapenti/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tugua': ['tgly307'], - '/subject/:id': ['xyqfer'], -}; diff --git a/lib/routes/dapenti/namespace.ts b/lib/routes/dapenti/namespace.ts new file mode 100644 index 000000000..e3fe6f0a7 --- /dev/null +++ b/lib/routes/dapenti/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '喷嚏', + url: 'dapenti.com', +}; diff --git a/lib/routes/dapenti/radar.ts b/lib/routes/dapenti/radar.ts deleted file mode 100644 index 8a6820994..000000000 --- a/lib/routes/dapenti/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'dapenti.com': { - _name: '喷嚏', - '.': [ - { - title: '图卦', - docs: 'https://docs.rsshub.app/routes/picture#pen-ti', - source: ['/blog/blog.asp'], - target: (params, url) => { - if (new URL(url).searchParams.get('subjectid') === '70') { - return '/dapenti/tugua'; - } - }, - }, - { - title: '主题', - docs: 'https://docs.rsshub.app/routes/picture#pen-ti', - source: ['/blog/blog.asp'], - target: (params, url) => { - if (new URL(url).searchParams.get('subjectid')) { - return '/dapenti/subject/' + new URL(url).searchParams.get('subjectid'); - } - }, - }, - ], - }, -}; diff --git a/lib/routes/dapenti/router.ts b/lib/routes/dapenti/router.ts deleted file mode 100644 index acf4f77ed..000000000 --- a/lib/routes/dapenti/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/tugua', './tugua'); - router.get('/subject/:id', './subject'); -}; diff --git a/lib/routes/dapenti/subject.ts b/lib/routes/dapenti/subject.ts index 8dec686f9..e8c9d5d23 100644 --- a/lib/routes/dapenti/subject.ts +++ b/lib/routes/dapenti/subject.ts @@ -1,5 +1,24 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { - ctx.set('data', await utils.parseFeed({ subjectid: ctx.req.param('id') })); +export const route: Route = { + path: '/subject/:id', + categories: ['picture'], + example: '/dapenti/subject/184', + parameters: { id: '主题 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '主题', + maintainers: ['xyqfer'], + handler, }; + +async function handler(ctx) { + ctx.set('data', await utils.parseFeed({ subjectid: ctx.req.param('id') })); +} diff --git a/lib/routes/dapenti/tugua.ts b/lib/routes/dapenti/tugua.ts index 16a76541f..485e22b35 100644 --- a/lib/routes/dapenti/tugua.ts +++ b/lib/routes/dapenti/tugua.ts @@ -1,5 +1,24 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { - ctx.set('data', await utils.parseFeed({ subjectid: 70 })); +export const route: Route = { + path: '/tugua', + categories: ['picture'], + example: '/dapenti/tugua', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '图卦', + maintainers: ['tgly307'], + handler, }; + +async function handler(ctx) { + ctx.set('data', await utils.parseFeed({ subjectid: 70 })); +} diff --git a/lib/routes/darwinawards/index.ts b/lib/routes/darwinawards/index.ts index 6d8ad29b5..7dca8a3a6 100644 --- a/lib/routes/darwinawards/index.ts +++ b/lib/routes/darwinawards/index.ts @@ -1,8 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: ['/all', '/'], + radar: { + source: ['darwinawards.com/darwin', 'darwinawards.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['zoenglinghou', 'nczitzk'], + handler, + url: 'darwinawards.com/darwin', + url: 'darwinawards.com/darwin', +}; + +async function handler() { const rootUrl = 'https://darwinawards.com'; const currentUrl = `${rootUrl}/darwin/`; @@ -49,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/darwinawards/maintainer.ts b/lib/routes/darwinawards/maintainer.ts deleted file mode 100644 index 65a3b1440..000000000 --- a/lib/routes/darwinawards/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/all': ['zoenglinghou', 'nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/darwinawards/namespace.ts b/lib/routes/darwinawards/namespace.ts new file mode 100644 index 000000000..77610ba63 --- /dev/null +++ b/lib/routes/darwinawards/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Darwin Awards', + url: 'darwinawards.com', +}; diff --git a/lib/routes/darwinawards/radar.ts b/lib/routes/darwinawards/radar.ts deleted file mode 100644 index 72db2afd5..000000000 --- a/lib/routes/darwinawards/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'darwinawards.com': { - _name: 'Darwin Awards', - '.': [ - { - title: 'Award Winners', - docs: 'https://docs.rsshub.app/routes/other#darwin-awards-award-winners', - source: ['/darwin', '/'], - target: '/darwinawards', - }, - ], - }, -}; diff --git a/lib/routes/darwinawards/router.ts b/lib/routes/darwinawards/router.ts deleted file mode 100644 index b89a202c1..000000000 --- a/lib/routes/darwinawards/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/all', './index'); - router.get('/', './index'); -}; diff --git a/lib/routes/dayanzai/index.ts b/lib/routes/dayanzai/index.ts index ef9b4e2f9..28a402d1a 100644 --- a/lib/routes/dayanzai/index.ts +++ b/lib/routes/dayanzai/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,32 @@ import timezone from '@/utils/timezone'; const rootUrl = 'http://www.dayanzai.me/'; -export default async (ctx) => { +export const route: Route = { + path: '/:category/:fulltext?', + categories: ['blog'], + example: '/dayanzai/windows', + parameters: { category: '分类', fulltext: '是否获取全文,需要获取则传入参数`y`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dayanzai.me/:category', 'dayanzai.me/:category/*'], + target: '/:category', + }, + name: '分类', + maintainers: [], + handler, + description: `| 微软应用 | 安卓应用 | 教程资源 | 其他资源 | + | -------- | -------- | -------- | -------- | + | windows | android | tutorial | other |`, +}; + +async function handler(ctx) { const { category, fulltext } = ctx.req.param(); const currentUrl = rootUrl + category; const response = await got.get(currentUrl); @@ -48,10 +74,10 @@ export default async (ctx) => { ) : list; - ctx.set('data', { + return { title: `大眼仔旭 ${category}`, link: currentUrl, description: `大眼仔旭 ${category} RSS`, item: items, - }); -}; + }; +} diff --git a/lib/routes/dayanzai/maintainer.ts b/lib/routes/dayanzai/maintainer.ts deleted file mode 100644 index f86b73809..000000000 --- a/lib/routes/dayanzai/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/dayanzai/:category/:fulltext?': ['nitezs'], -}; diff --git a/lib/routes/dayanzai/namespace.ts b/lib/routes/dayanzai/namespace.ts new file mode 100644 index 000000000..3a62c54e3 --- /dev/null +++ b/lib/routes/dayanzai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大眼仔旭', + url: 'dayanzai.me', +}; diff --git a/lib/routes/dayanzai/radar.ts b/lib/routes/dayanzai/radar.ts deleted file mode 100644 index 1c36b502f..000000000 --- a/lib/routes/dayanzai/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'dayanzai.me': { - _name: '大眼仔旭', - '.': [ - { - title: '大眼仔旭', - docs: 'https://docs.rsshub.app/routes/bbs#dayanzai', - source: ['/:category', '/:category/*'], - target: '/dayanzai/:category', - }, - ], - }, -}; diff --git a/lib/routes/dayanzai/router.ts b/lib/routes/dayanzai/router.ts deleted file mode 100644 index e533a250a..000000000 --- a/lib/routes/dayanzai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category/:fulltext?', './index'); -}; diff --git a/lib/routes/dblp/maintainer.ts b/lib/routes/dblp/maintainer.ts deleted file mode 100644 index 83ac4d3e2..000000000 --- a/lib/routes/dblp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:field': ['ytno1'], -}; diff --git a/lib/routes/dblp/namespace.ts b/lib/routes/dblp/namespace.ts new file mode 100644 index 000000000..9cd978d44 --- /dev/null +++ b/lib/routes/dblp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DBLP', + url: 'dblp.org', +}; diff --git a/lib/routes/dblp/publication.ts b/lib/routes/dblp/publication.ts index 9ea1ef15a..92e1a33f9 100644 --- a/lib/routes/dblp/publication.ts +++ b/lib/routes/dblp/publication.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; // 导入所需模组 import got from '@/utils/got'; // 自订的 got // import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:field', + categories: ['study'], + example: '/dblp/knowledge%20tracing', + parameters: { field: 'Research field' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dblp.org/:field'], + }, + name: 'Keyword Search', + maintainers: ['ytno1'], + handler, +}; + +async function handler(ctx) { // 在此处编写您的逻辑 const field = ctx.req.param('field'); @@ -51,7 +73,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { // 在此处输出您的 RSS // 源标题 title: `【dblp】${field}`, @@ -61,5 +83,5 @@ export default async (ctx) => { description: `DBLP ${field} RSS`, // 处理后的数据,即文章列表 item: list, - }); -}; + }; +} diff --git a/lib/routes/dblp/radar.ts b/lib/routes/dblp/radar.ts deleted file mode 100644 index 7d97de6c2..000000000 --- a/lib/routes/dblp/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'dblp.org': { - _name: 'DBLP', - '.': [ - { - title: '关键字搜索', - docs: 'https://docs.rsshub.app/routes/study#dblp', - source: ['/:field'], - target: '/dblp/:field', - }, - ], - }, -}; diff --git a/lib/routes/dblp/router.ts b/lib/routes/dblp/router.ts deleted file mode 100644 index 908c3aa7e..000000000 --- a/lib/routes/dblp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:field', './publication'); -}; diff --git a/lib/routes/dcard/maintainer.ts b/lib/routes/dcard/maintainer.ts deleted file mode 100644 index ec3379147..000000000 --- a/lib/routes/dcard/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/posts/:type?': ['DIYgod'], // alias - '/:section/:type?': ['HenryQW'], -}; diff --git a/lib/routes/dcard/namespace.ts b/lib/routes/dcard/namespace.ts new file mode 100644 index 000000000..8e7fbc8a1 --- /dev/null +++ b/lib/routes/dcard/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Dcard', + url: 'www.dcard.tw', + description: `:::warning +僅能透過台灣 IP 抓取。 +:::`, +}; diff --git a/lib/routes/dcard/radar.ts b/lib/routes/dcard/radar.ts deleted file mode 100644 index 9c2c1f22d..000000000 --- a/lib/routes/dcard/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'dcard.tw': { - _name: 'Dcard', - www: [ - { - title: '首頁帖子-最新', - docs: 'https://docs.rsshub.app/routes/bbs#dcard', - source: '/f', - target: '/dcard/posts/latest', - }, - { - title: '首頁帖子-熱門', - docs: 'https://docs.rsshub.app/routes/bbs#dcard', - source: '/f', - target: '/dcard/posts/popular', - }, - { - title: '板塊帖子-最新', - docs: 'https://docs.rsshub.app/routes/bbs#dcard', - source: '/f/:section', - target: '/dcard/:section/latest', - }, - { - title: '板塊帖子-熱門', - docs: 'https://docs.rsshub.app/routes/bbs#dcard', - source: '/f/:section', - target: '/dcard/:section/popular', - }, - ], - }, -}; diff --git a/lib/routes/dcard/router.ts b/lib/routes/dcard/router.ts deleted file mode 100644 index 9974b8a61..000000000 --- a/lib/routes/dcard/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:section/:type?', './section'); -}; diff --git a/lib/routes/dcard/section.ts b/lib/routes/dcard/section.ts index 8fa9b7923..9a92f53b5 100644 --- a/lib/routes/dcard/section.ts +++ b/lib/routes/dcard/section.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import utils from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/:section/:type?', + categories: ['bbs'], + example: '/dcard/funny/popular', + parameters: { section: '板塊名稱,URL 中獲得', type: '排序,popular 熱門;latest 最新,默認為 latest' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '板塊帖子', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const { type = 'latest', section = 'posts' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30; const browser = await puppeteer(); @@ -59,10 +78,10 @@ export default async (ctx) => { const result = await utils.ProcessFeed(items, cookies, browser, limit, cache); await browser.close(); - ctx.set('data', { + return { title, link, description: '不想錯過任何有趣的話題嗎?趕快加入我們吧!', item: result, - }); -}; + }; +} diff --git a/lib/routes/dcfever/maintainer.ts b/lib/routes/dcfever/maintainer.ts deleted file mode 100644 index a01f7b5d7..000000000 --- a/lib/routes/dcfever/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/news/:type?': ['TonyRL'], - '/reviews/:type?': ['TonyRL'], - '/trading/search/:keyword/:mainCat?': ['TonyRL'], - '/trading/:id': ['TonyRL'], -}; diff --git a/lib/routes/dcfever/namespace.ts b/lib/routes/dcfever/namespace.ts new file mode 100644 index 000000000..f14a921ff --- /dev/null +++ b/lib/routes/dcfever/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DCFever', + url: 'dcfever.com', +}; diff --git a/lib/routes/dcfever/news.ts b/lib/routes/dcfever/news.ts index cc6ce39d5..d5a4e32da 100644 --- a/lib/routes/dcfever/news.ts +++ b/lib/routes/dcfever/news.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['new-media'], + example: '/dcfever/news', + parameters: { type: '分類,預設為所有新聞' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞中心', + maintainers: ['TonyRL'], + handler, + description: `| 所有新聞 | 攝影器材 | 手機通訊 | 汽車熱話 | 攝影文化 | 影片攝錄 | 測試報告 | 生活科技 | 攝影技巧 | + | -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- | + | | camera | mobile | auto | photography | videography | reviews | gadget | technique |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const response = await got(`${baseUrl}/news/index.php`, { @@ -25,7 +47,7 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `${$('.channel_nav') .contents() .filter((_, e) => e.nodeType === 3) @@ -33,5 +55,5 @@ export default async (ctx) => { link: response.url, image: 'https://cdn10.dcfever.com/images/android_192.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/dcfever/radar.ts b/lib/routes/dcfever/radar.ts deleted file mode 100644 index 599bef407..000000000 --- a/lib/routes/dcfever/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'dcfever.com': { - _name: 'DCFever', - '.': [ - { - title: '新聞中心', - docs: 'https://docs.rsshub.app/routes/new-media#dcfever', - source: ['/news/index.php', '/'], - target: (_, url) => { - const searchParams = new URL(url).searchParams; - return `/dcfever/news${searchParams.has('type') ? `/${new URL(url).searchParams.get('type')}` : ''}`; - }, - }, - { - title: '測試報告', - docs: 'https://docs.rsshub.app/routes/new-media#dcfever', - source: ['/:type/reviews.php'], - target: '/dcfever/reviews/:type', - }, - { - title: '二手市集', - docs: 'https://docs.rsshub.app/routes/new-media#dcfever', - source: ['/trading/listing.php'], - target: (_, url) => `/dcfever/trading/${new URL(url).searchParams.get('id')}`, - }, - { - title: '二手市集 - 物品搜尋', - docs: 'https://docs.rsshub.app/routes/new-media#dcfever', - source: ['/trading/search.php'], - target: (_, url) => { - const searchParams = new URL(url).searchParams; - return `/dcfever/trading/search/${searchParams.get('keyword')}${searchParams.has('main_cat') ? `/${searchParams.get('main_cat')}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/dcfever/reviews.ts b/lib/routes/dcfever/reviews.ts index afd6f8cd3..72f678cd3 100644 --- a/lib/routes/dcfever/reviews.ts +++ b/lib/routes/dcfever/reviews.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/reviews/:type?', + categories: ['new-media'], + example: '/dcfever/reviews/cameras', + parameters: { type: '分類,預設為 `cameras`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dcfever.com/:type/reviews.php'], + target: '/reviews/:type', + }, + name: '測試報告', + maintainers: ['TonyRL'], + handler, + description: `| 相機及鏡頭 | 手機平板 | 試車報告 | + | ---------- | -------- | -------- | + | cameras | phones | cars |`, +}; + +async function handler(ctx) { const { type = 'cameras' } = ctx.req.param(); const response = await got(`${baseUrl}/${type}/reviews.php`); @@ -21,10 +47,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text(), link: response.url, image: 'https://cdn10.dcfever.com/images/android_192.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/dcfever/router.ts b/lib/routes/dcfever/router.ts deleted file mode 100644 index db9ee6e67..000000000 --- a/lib/routes/dcfever/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); - router.get('/reviews/:type?', './reviews'); - router.get('/trading/search/:keyword/:mainCat?', './trading-search'); - router.get('/trading/:id', './trading'); -}; diff --git a/lib/routes/dcfever/trading-search.ts b/lib/routes/dcfever/trading-search.ts index 131dfb500..7c5286f68 100644 --- a/lib/routes/dcfever/trading-search.ts +++ b/lib/routes/dcfever/trading-search.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; // import { parseRelativeDate } from '@/utils/parse-date'; import { baseUrl, parseTradeItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/trading/search/:keyword/:mainCat?', + categories: ['new-media'], + example: '/dcfever/trading/search/Sony', + parameters: { keyword: '關鍵字', mainCat: '主要分類 ID,見上表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '二手市集 - 物品搜尋', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { keyword, mainCat } = ctx.req.param(); const response = await got(`${baseUrl}/trading/search.php`, { @@ -31,10 +50,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseTradeItem(item, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text(), link: response.url, image: 'https://cdn10.dcfever.com/images/android_192.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/dcfever/trading.ts b/lib/routes/dcfever/trading.ts index 5babbea3b..0ec0c0631 100644 --- a/lib/routes/dcfever/trading.ts +++ b/lib/routes/dcfever/trading.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; // import { parseRelativeDate } from '@/utils/parse-date'; import { baseUrl, parseTradeItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/trading/:id', + categories: ['new-media'], + example: '/dcfever/trading/1', + parameters: { id: '分類 ID,見下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '二手市集', + maintainers: ['TonyRL'], + handler, + description: `[所有物品分類](https://www.dcfever.com/trading/index.php#all_cats) + + | 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 | + | -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- | + | 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 |`, +}; + +async function handler(ctx) { const { id, order = 'new' } = ctx.req.param(); const response = await got(`${baseUrl}/trading/listing.php`, { @@ -31,10 +55,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseTradeItem(item, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text(), link: response.url, image: 'https://cdn10.dcfever.com/images/android_192.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/ddosi/category.ts b/lib/routes/ddosi/category.ts index b30ea1293..9bab567f9 100644 --- a/lib/routes/ddosi/category.ts +++ b/lib/routes/ddosi/category.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; const envs = process.env; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category?', + categories: ['blog'], + example: '/ddosi/category/黑客工具', + parameters: { category: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ddosi.org/category/:category/'], + target: '/category/:category', + }, + name: '分类', + maintainers: [], + handler, + url: 'ddosi.org/', +}; + +async function handler(ctx) { const url = 'https://www.ddosi.org/category'; const userAgent = envs.UA || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; const category = ctx.req.param('category'); @@ -34,9 +58,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `雨苁-${category}`, link: `${url}/${category}/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ddosi/index.ts b/lib/routes/ddosi/index.ts index 68bfd1fd2..2163deb41 100644 --- a/lib/routes/ddosi/index.ts +++ b/lib/routes/ddosi/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; const envs = process.env; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['ddosi.org/'], + target: '', + }, + name: 'Unknown', + maintainers: ['XinRoom'], + handler, + url: 'ddosi.org/', +}; + +async function handler() { const url = 'https://www.ddosi.org/'; const userAgent = envs.UA || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; const response = await got({ @@ -33,9 +46,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `雨苁`, link: String(url), item: items, - }); -}; + }; +} diff --git a/lib/routes/ddosi/maintainer.ts b/lib/routes/ddosi/maintainer.ts deleted file mode 100644 index e4d0013f2..000000000 --- a/lib/routes/ddosi/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['XinRoom'], - '/category/:category': ['XinRoom'], -}; diff --git a/lib/routes/ddosi/namespace.ts b/lib/routes/ddosi/namespace.ts new file mode 100644 index 000000000..b7215ed8e --- /dev/null +++ b/lib/routes/ddosi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '雨苁博客', + url: 'ddosi.org', +}; diff --git a/lib/routes/ddosi/radar.ts b/lib/routes/ddosi/radar.ts deleted file mode 100644 index ffda77a2e..000000000 --- a/lib/routes/ddosi/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'ddosi.org': { - _name: '🔰雨苁ℒ🔰', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/blog#yu-cong-bo-ke-shou-ye', - source: ['/'], - target: '/ddosi', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/blog#yu-cong-bo-ke-fen-lei', - source: ['/category/:category/'], - target: '/ddosi/category/:category', - }, - ], - }, -}; diff --git a/lib/routes/ddosi/router.ts b/lib/routes/ddosi/router.ts deleted file mode 100644 index 73961ec77..000000000 --- a/lib/routes/ddosi/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/category/:category?', './category'); - router.get('/', './index'); -}; diff --git a/lib/routes/deadline/maintainer.ts b/lib/routes/deadline/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/deadline/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/deadline/namespace.ts b/lib/routes/deadline/namespace.ts new file mode 100644 index 000000000..59c3c1156 --- /dev/null +++ b/lib/routes/deadline/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Deadline', + url: 'deadline.com', +}; diff --git a/lib/routes/deadline/posts.ts b/lib/routes/deadline/posts.ts index 6fb0d71e8..bbd71f400 100644 --- a/lib/routes/deadline/posts.ts +++ b/lib/routes/deadline/posts.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['deadline.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'deadline.com/', +}; + +async function handler(ctx) { const baseUrl = 'https://deadline.com'; const response = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { @@ -45,12 +58,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Deadline – Hollywood Entertainment Breaking News', description: 'Deadline.com is always the first to break up-to-the-minute entertainment, Hollywood and media news, with an unfiltered, no-holds-barred analysis of events.', link: baseUrl, language: 'en-US', image: `${baseUrl}/wp-content/themes/pmc-deadline-2019/assets/app/icons/apple-touch-icon.png`, item: items, - }); -}; + }; +} diff --git a/lib/routes/deadline/radar.ts b/lib/routes/deadline/radar.ts deleted file mode 100644 index b728adb42..000000000 --- a/lib/routes/deadline/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'deadline.com': { - _name: 'Deadline', - '.': [ - { - title: 'Latest Articles', - docs: 'https://docs.rsshub.app/routes/new-media#deadline', - source: ['/'], - target: '/deadline', - }, - ], - }, -}; diff --git a/lib/routes/deadline/router.ts b/lib/routes/deadline/router.ts deleted file mode 100644 index 59494d73c..000000000 --- a/lib/routes/deadline/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './posts'); -}; diff --git a/lib/routes/dedao/index.ts b/lib/routes/dedao/index.ts index 10b2cba66..d2b6150f6 100644 --- a/lib/routes/dedao/index.ts +++ b/lib/routes/dedao/index.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'news'; const rootUrl = `https://www.igetget.com/${category === 'video' ? 'video' : 'news'}`; @@ -38,10 +46,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `得到${category === 'video' ? '' : '大事件'} - ${category === 'news' ? '新闻' : category === 'figure' ? '人物故事' : '视频'}`, link: rootUrl, item: items, description: data.description, - }); -}; + }; +} diff --git a/lib/routes/dedao/knowledge.ts b/lib/routes/dedao/knowledge.ts index 4bdf68665..0439f5aec 100644 --- a/lib/routes/dedao/knowledge.ts +++ b/lib/routes/dedao/knowledge.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/knowledge/:topic?/:type?', + categories: ['new-media'], + example: '/dedao/knowledge', + parameters: { topic: '话题 id,可在对应话题页 URL 中找到', type: '分享类型,`true` 指精选,`false` 指最新,默认为精选' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dedao.cn/knowledge/topic/:topic', 'dedao.cn/knowledge', 'dedao.cn/'], + }, + name: '知识城邦', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic') ?? ''; const type = /t|y/i.test(ctx.req.param('type') ?? 'true'); const count = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -58,10 +80,10 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `得到 - 知识城邦${title === '' ? '' : ' - ' + title}`, link: currentUrl, item: items, description, - }); -}; + }; +} diff --git a/lib/routes/dedao/list.ts b/lib/routes/dedao/list.ts index 438fcf326..dc353e39e 100644 --- a/lib/routes/dedao/list.ts +++ b/lib/routes/dedao/list.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:category?', + categories: ['new-media'], + example: '/dedao/list/年度日更', + parameters: { category: '分类名,默认为年度日更' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['igetget.com/'], + }, + name: '首页', + maintainers: ['nczitzk'], + handler, + url: 'igetget.com/', +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '年度日更'; const rootUrl = 'https://www.igetget.com'; @@ -59,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `得到 - ${category}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dedao/maintainer.ts b/lib/routes/dedao/maintainer.ts deleted file mode 100644 index 0c358a53c..000000000 --- a/lib/routes/dedao/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/figure': ['nczitzk'], - '/knowledge/:topic?/:type?': ['nczitzk'], - '/list/:category?': ['nczitzk'], - '/news': ['nczitzk'], - '/user/:id/:type?': ['nczitzk'], - '/video': ['nczitzk'], -}; diff --git a/lib/routes/dedao/namespace.ts b/lib/routes/dedao/namespace.ts new file mode 100644 index 000000000..c77830eb8 --- /dev/null +++ b/lib/routes/dedao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '得到', + url: 'dedao.cn', +}; diff --git a/lib/routes/dedao/radar.ts b/lib/routes/dedao/radar.ts deleted file mode 100644 index 6232b7c2a..000000000 --- a/lib/routes/dedao/radar.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default { - 'dedao.cn': { - _name: '得到', - '.': [ - { - title: '知识城邦', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-zhi-shi-cheng-bang', - source: ['/knowledge/topic/:topic', '/knowledge', '/'], - target: '/dedao/knowledge/:topic?/:type?', - }, - ], - }, - 'igetget.com': { - _name: '得到', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-shou-ye', - source: ['/'], - target: '/dedao/list/:category?', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-xin-wen', - source: ['/news', '/'], - target: '/dedao/news', - }, - { - title: '人物故事', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-ren-wu-gu-shi', - source: ['/news', '/'], - target: '/dedao/figure', - }, - { - title: '视频', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-shi-pin', - source: ['/video', '/'], - target: '/dedao/video', - }, - ], - m: [ - { - title: '用户主页', - docs: 'https://docs.rsshub.app/routes/new-media#de-dao-yong-hu-zhu-ye', - source: ['/native/mine/account', '/'], - target: (params, url) => `/dedao/user/${new URL(url).searchParams.get('enId')}`, - }, - ], - }, -}; diff --git a/lib/routes/dedao/router.ts b/lib/routes/dedao/router.ts deleted file mode 100644 index 5b9de0a5d..000000000 --- a/lib/routes/dedao/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/knowledge/:topic?/:type?', './knowledge'); - router.get('/list/:category?', './list'); - router.get('/user/:id/:type?', './user'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/dedao/user.ts b/lib/routes/dedao/user.ts index 3abe916c3..e2a0787b9 100644 --- a/lib/routes/dedao/user.ts +++ b/lib/routes/dedao/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,28 @@ const types = { 12: '视频', }; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/:type?', + categories: ['new-media'], + example: '/dedao/user/VkA5OqLX4RyGxmZRNBMlwBrDaJQ9og', + parameters: { id: '用户 id,可在对应用户主页 URL 中找到', type: '类型,见下表,默认为`0`,即动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户主页', + maintainers: ['nczitzk'], + handler, + description: `| 动态 | 书评 | 视频 | + | ---- | ---- | ---- | + | 0 | 7 | 12 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const count = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -71,12 +93,12 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `${author}的得到主页 - ${types[type]}`, link: currentUrl, item: items, image, description, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/deeplearning/maintainer.ts b/lib/routes/deeplearning/maintainer.ts deleted file mode 100644 index 09415064d..000000000 --- a/lib/routes/deeplearning/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/thebatch': ['nczitzk', 'juvenn'], -}; diff --git a/lib/routes/deeplearning/namespace.ts b/lib/routes/deeplearning/namespace.ts new file mode 100644 index 000000000..6359a83cb --- /dev/null +++ b/lib/routes/deeplearning/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'deeplearning.ai', + url: 'www.deeplearning.ai', +}; diff --git a/lib/routes/deeplearning/radar.ts b/lib/routes/deeplearning/radar.ts deleted file mode 100644 index 0d50cce0c..000000000 --- a/lib/routes/deeplearning/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'deeplearning.ai': { - _name: 'deeplearning.ai', - www: [ - { - title: 'TheBatch 周报', - docs: 'https://docs.rsshub.app/routes/deeplearning-ai#thebatch-zhou-bao', - source: ['/thebatch', '/'], - target: '/deeplearning/thebatch', - }, - ], - }, -}; diff --git a/lib/routes/deeplearning/router.ts b/lib/routes/deeplearning/router.ts deleted file mode 100644 index d30b59e4f..000000000 --- a/lib/routes/deeplearning/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/thebatch', './thebatch'); -}; diff --git a/lib/routes/deeplearning/thebatch.ts b/lib/routes/deeplearning/thebatch.ts index 21d4a467d..ad512e4f1 100644 --- a/lib/routes/deeplearning/thebatch.ts +++ b/lib/routes/deeplearning/thebatch.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/thebatch', + categories: ['programming'], + example: '/deeplearning/thebatch', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.deeplearning.ai/thebatch', 'www.deeplearning.ai/'], + }, + name: 'TheBatch 周报', + maintainers: ['nczitzk', 'juvenn'], + handler, + url: 'www.deeplearning.ai/thebatch', +}; + +async function handler() { const page = await got({ method: 'get', url: `https://www.deeplearning.ai/the-batch/`, @@ -21,7 +44,7 @@ export default async (ctx) => { pubDate: new Date(item.published_at).toUTCString(), })); - ctx.set('data', { + return { title: `The Batch - a new weekly newsletter from deeplearning.ai`, link: `https://www.deeplearning.ai/the-batch/`, item: await Promise.all( @@ -33,5 +56,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/deepmind/blog.ts b/lib/routes/deepmind/blog.ts index e2b85fac1..00f127cc1 100644 --- a/lib/routes/deepmind/blog.ts +++ b/lib/routes/deepmind/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['new-media'], + example: '/deepmind/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['deepmind.com/blog', 'deepmind.com/'], + }, + name: 'Blog', + maintainers: ['nczitzk', 'TonyRL'], + handler, + url: 'deepmind.com/blog', +}; + +async function handler() { const feed = await parser.parseURL('https://www.deepmind.com/blog/rss.xml'); const items = await Promise.all( @@ -22,12 +45,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, description: feed.description, image: 'https://assets-global.website-files.com/621d30e84caf0be3291dbf1c/621d336835a91420c6a8dcf2_webclip.png', link: `${feed.link}/blog`, item: items, language: 'en', - }); -}; + }; +} diff --git a/lib/routes/deepmind/maintainer.ts b/lib/routes/deepmind/maintainer.ts deleted file mode 100644 index 05aaf9449..000000000 --- a/lib/routes/deepmind/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['nczitzk', 'TonyRL'], -}; diff --git a/lib/routes/deepmind/namespace.ts b/lib/routes/deepmind/namespace.ts new file mode 100644 index 000000000..5ce8cafc8 --- /dev/null +++ b/lib/routes/deepmind/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DeepMind', + url: 'deepmind.com', +}; diff --git a/lib/routes/deepmind/radar.ts b/lib/routes/deepmind/radar.ts deleted file mode 100644 index 041452705..000000000 --- a/lib/routes/deepmind/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'deepmind.com': { - _name: 'DeepMind', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/new-media#deepmind', - source: ['/blog', '/'], - target: '/blog', - }, - ], - }, -}; diff --git a/lib/routes/deepmind/router.ts b/lib/routes/deepmind/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/deepmind/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/deltaio/blog.ts b/lib/routes/deltaio/blog.ts index 3a2bcac48..d528d9e54 100644 --- a/lib/routes/deltaio/blog.ts +++ b/lib/routes/deltaio/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/deltaio/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['delta.io/blog'], + }, + name: 'Blogs', + maintainers: ['RengarLee'], + handler, + url: 'delta.io/blog', +}; + +async function handler() { const baseUrl = 'https://delta.io'; const dataUrl = `${baseUrl}/page-data/blog/page-data.json`; @@ -26,9 +49,9 @@ export default async (ctx) => { itunes_item_image: `${baseUrl}${node.frontmatter.thumbnail.childImageSharp.gatsbyImageData.images.fallback.src}`, })); - ctx.set('data', { + return { title: 'delta.io blog', link: `${baseUrl}/blog`, item: items, - }); -}; + }; +} diff --git a/lib/routes/deltaio/maintainer.ts b/lib/routes/deltaio/maintainer.ts deleted file mode 100644 index 463b64d7e..000000000 --- a/lib/routes/deltaio/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['RengarLee'], -}; diff --git a/lib/routes/deltaio/namespace.ts b/lib/routes/deltaio/namespace.ts new file mode 100644 index 000000000..b6f89ae11 --- /dev/null +++ b/lib/routes/deltaio/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Delta Lake', + url: 'delta.io', +}; diff --git a/lib/routes/deltaio/radar.ts b/lib/routes/deltaio/radar.ts deleted file mode 100644 index 74c17a825..000000000 --- a/lib/routes/deltaio/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'delta.io': { - _name: 'Delta Lake', - '.': [ - { - title: 'Blogs', - docs: 'https://docs.rsshub.app/routes/blog#deltalake', - source: '/blog', - target: '/deltaio/blog', - }, - ], - }, -}; diff --git a/lib/routes/deltaio/router.ts b/lib/routes/deltaio/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/deltaio/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/devolverdigital/blog.ts b/lib/routes/devolverdigital/blog.ts index 18f8687fd..6f9cfe539 100644 --- a/lib/routes/devolverdigital/blog.ts +++ b/lib/routes/devolverdigital/blog.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/devolverdigital/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['devolverdigital.com/blog'], + }, + name: 'Official Blogs', + maintainers: ['XXY233'], + handler, + url: 'devolverdigital.com/blog', +}; + +async function handler() { const baseUrl = 'https://www.devolverdigital.com/blog'; const { data: response } = await got(baseUrl); @@ -42,10 +65,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'DevolverDigital Blog', language: 'en-us', link: 'https://www.devolverdigital.com/blog', item: items, - }); -}; + }; +} diff --git a/lib/routes/devolverdigital/maintainer.ts b/lib/routes/devolverdigital/maintainer.ts deleted file mode 100644 index b74d057cd..000000000 --- a/lib/routes/devolverdigital/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['XXY233'], -}; diff --git a/lib/routes/devolverdigital/namespace.ts b/lib/routes/devolverdigital/namespace.ts new file mode 100644 index 000000000..e068cf35e --- /dev/null +++ b/lib/routes/devolverdigital/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DevolverDigital', + url: 'devolverdigital.com', +}; diff --git a/lib/routes/devolverdigital/radar.ts b/lib/routes/devolverdigital/radar.ts deleted file mode 100644 index 08f9ff3e4..000000000 --- a/lib/routes/devolverdigital/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'devolverdigital.com': { - _name: 'DevolverDigital', - '.': [ - { - title: '官方博客', - docs: 'https://docs.rsshub.app/routes/blog#devolverdigital', - source: '/blog', - target: '/devolverdigital/blog', - }, - ], - }, -}; diff --git a/lib/routes/devolverdigital/router.ts b/lib/routes/devolverdigital/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/devolverdigital/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/dgjyw/index.ts b/lib/routes/dgjyw/index.ts index f174804f7..757267147 100644 --- a/lib/routes/dgjyw/index.ts +++ b/lib/routes/dgjyw/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = getSubPath(ctx); const rootUrl = 'https://www.dgjyw.com'; @@ -61,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dgjyw/maintainer.ts b/lib/routes/dgjyw/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/dgjyw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/dgjyw/namespace.ts b/lib/routes/dgjyw/namespace.ts new file mode 100644 index 000000000..4a672b86a --- /dev/null +++ b/lib/routes/dgjyw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东莞教研网', + url: 'dgjyw.com', +}; diff --git a/lib/routes/dgjyw/radar.ts b/lib/routes/dgjyw/radar.ts deleted file mode 100644 index e24e0536b..000000000 --- a/lib/routes/dgjyw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'dgjyw.com': { - _name: '东莞教研网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/other#dong-guan-jia-yan-wang-fen-lei', - source: ['/'], - target: (params, url) => `/dgjyw/${new URL(url).toString().match(/dgjyw\.com\/(.*)\.htm$/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/dgjyw/router.ts b/lib/routes/dgjyw/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/dgjyw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/dhu/jiaowu/news.ts b/lib/routes/dhu/jiaowu/news.ts index 5793162a2..4e94d1103 100644 --- a/lib/routes/dhu/jiaowu/news.ts +++ b/lib/routes/dhu/jiaowu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -9,7 +10,28 @@ const map = { student: '/tzggwxszl/list.htm', teacher: '/tzggwjszl/list.htm', }; -export default async (ctx) => { +export const route: Route = { + path: '/jiaowu/news/:type?', + categories: ['university'], + example: '/dhu/jiaowu/news/student', + parameters: { type: '默认为 `student`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处通知', + maintainers: ['KiraKiseki'], + handler, + description: `| 学生专栏 | 教师专栏 | + | -------- | -------- | + | student | teacher |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const link = Object.hasOwn(map, type) ? `${base_url}${map[type]}` : `${base_url}/tzggwxszl/list.htm`; const response = await got({ @@ -21,7 +43,7 @@ export default async (ctx) => { }); const $ = load(response.data); - ctx.set('data', { + return { link: base_url, title: '东华大学教务处-' + $('.col_title').text(), item: $('.list_item') @@ -31,5 +53,5 @@ export default async (ctx) => { pubDate: timezone(parseDate($('.Article_PublishDate', elem).text()), +8), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/dhu/maintainer.ts b/lib/routes/dhu/maintainer.ts deleted file mode 100644 index dc46912b8..000000000 --- a/lib/routes/dhu/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/jiaowu/news/:type?': ['KiraKiseki'], - '/news/xsxx': ['fox2049'], - '/xxgk/news': ['KiraKiseki'], - '/yjs/news/:type?': ['fox2049'], - '/yjs/zs/:type?': ['fox2049'], -}; diff --git a/lib/routes/dhu/namespace.ts b/lib/routes/dhu/namespace.ts new file mode 100644 index 000000000..6a77a9b47 --- /dev/null +++ b/lib/routes/dhu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东华大学', + url: 'gs.dhu.edu.cn', +}; diff --git a/lib/routes/dhu/news/xsxx.ts b/lib/routes/dhu/news/xsxx.ts index 28215a60c..2b5412ec1 100644 --- a/lib/routes/dhu/news/xsxx.ts +++ b/lib/routes/dhu/news/xsxx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://news.dhu.edu.cn/_wp3services/generalQuery?queryObj=articles&siteId=14&columnId=6410&pageIndex=1&rows=20'; -export default async (ctx) => { +export const route: Route = { + path: '/news/xsxx', + categories: ['university'], + example: '/dhu/news/xsxx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.dhu.edu.cn/6410'], + }, + name: '学术信息', + maintainers: ['fox2049'], + handler, + url: 'news.dhu.edu.cn/6410', +}; + +async function handler() { const { data } = await got(baseUrl, { headers: { Referer: 'https://news.dhu.edu.cn/6410/', @@ -35,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '学术信息', link: 'https://news.dhu.edu.cn/6410', item: items, - }); -}; + }; +} diff --git a/lib/routes/dhu/radar.ts b/lib/routes/dhu/radar.ts deleted file mode 100644 index 7bbaa3bf1..000000000 --- a/lib/routes/dhu/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'dhu.edu.cn': { - _name: '东华大学', - gs: [ - { - title: '研究生院通知', - docs: 'https://docs.rsshub.app/routes/university#dong-hua-da-xue', - }, - ], - jw: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#dong-hua-da-xue', - }, - ], - news: [ - { - title: '学术信息', - docs: 'https://docs.rsshub.app/routes/university#dong-hua-da-xue', - source: ['/6410'], - target: '/dhu/news/xsxx', - }, - ], - xxgk: [ - { - title: '最新信息公开', - docs: 'https://docs.rsshub.app/routes/university#dong-hua-da-xue', - }, - ], - yjs: [ - { - title: '研究生信息', - docs: 'https://docs.rsshub.app/routes/university#dong-hua-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/dhu/router.ts b/lib/routes/dhu/router.ts deleted file mode 100644 index 485e7c2a1..000000000 --- a/lib/routes/dhu/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/jiaowu/news/:type?', './jiaowu/news'); - router.get('/news/xsxx', './news/xsxx'); - router.get('/xxgk/news', './xxgk/news'); - router.get('/yjs/news/:type?', './yjs/news'); - router.get('/yjs/zs/:type?', './yjs/zs'); -}; diff --git a/lib/routes/dhu/xxgk/news.ts b/lib/routes/dhu/xxgk/news.ts index 683a49c0c..4a1b15e34 100644 --- a/lib/routes/dhu/xxgk/news.ts +++ b/lib/routes/dhu/xxgk/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,25 @@ import timezone from '@/utils/timezone'; const base_url = 'https://xxgk.dhu.edu.cn/1737/list.htm'; -export default async (ctx) => { +export const route: Route = { + path: '/xxgk/news', + categories: ['university'], + example: '/dhu/xxgk/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新信息公开', + maintainers: ['KiraKiseki'], + handler, +}; + +async function handler() { const link = base_url; const response = await got({ method: 'get', @@ -16,7 +35,7 @@ export default async (ctx) => { }); const $ = load(response.data); - ctx.set('data', { + return { link: base_url, title: '东华大学信息公开网-最新公开信息', item: $('.cols') @@ -26,5 +45,5 @@ export default async (ctx) => { pubDate: timezone(parseDate($('.cols_meta', elem).text()), +8), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/dhu/yjs/news.ts b/lib/routes/dhu/yjs/news.ts index 8d91d91b0..24146d267 100644 --- a/lib/routes/dhu/yjs/news.ts +++ b/lib/routes/dhu/yjs/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,28 @@ const map = { notice: '/7206/list.htm', class: '/xkks/list.htm', }; -export default async (ctx) => { +export const route: Route = { + path: '/yjs/news/:type?', + categories: ['university'], + example: '/dhu/yjs/news/class', + parameters: { type: '默认为 `class`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生院通知', + maintainers: ['fox2049'], + handler, + description: `| 新闻动态 | 通知公告 | 选课考试 | + | -------- | -------- | -------- | + | trend | notice | class |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'class'; const link = `${baseUrl}${map[type]}`; const { data: response } = await got(link); @@ -40,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '东华大学研究生-' + $('.Column_Name').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/dhu/yjs/zs.ts b/lib/routes/dhu/yjs/zs.ts index 08d8ad8e8..62b7c2ecf 100644 --- a/lib/routes/dhu/yjs/zs.ts +++ b/lib/routes/dhu/yjs/zs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,28 @@ const map = { doctor: '/7126/list.htm', master: '/7128/list.htm', }; -export default async (ctx) => { +export const route: Route = { + path: '/yjs/zs/:type?', + categories: ['university'], + example: '/dhu/yjs/zs/master', + parameters: { type: '默认为 `master`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生招生信息', + maintainers: ['fox2049'], + handler, + description: `| 博士招生 | 硕士招生 | + | -------- | -------- | + | doctor | master |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'master'; const link = `${baseUrl}${map[type]}`; const { data: response } = await got(link); @@ -39,9 +61,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '东华大学研究生-' + $('.col_title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/diandong/maintainer.ts b/lib/routes/diandong/maintainer.ts deleted file mode 100644 index 40de49fa7..000000000 --- a/lib/routes/diandong/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:cate?': ['Fatpandac'], -}; diff --git a/lib/routes/diandong/namespace.ts b/lib/routes/diandong/namespace.ts new file mode 100644 index 000000000..460f7b049 --- /dev/null +++ b/lib/routes/diandong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '电动邦', + url: 'diandong.com', +}; diff --git a/lib/routes/diandong/news.ts b/lib/routes/diandong/news.ts index 87ef0cb6a..8ceb413a7 100644 --- a/lib/routes/diandong/news.ts +++ b/lib/routes/diandong/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,35 @@ const titleMap = { 23: '行业', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:cate?', + categories: ['new-media'], + example: '/diandong/news', + parameters: { cate: '分类,见下表,默认为推荐' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['diandong.com/news'], + target: '/news/:cate', + }, + name: '资讯', + maintainers: ['Fatpandac'], + handler, + url: 'diandong.com/news', + description: `分类 + + | 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 |`, +}; + +async function handler(ctx) { const cate = ctx.req.param('cate') ?? 0; const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 25; const url = `${rootUrl}/content/list?page=1&size=${limit}&source_id=12&content_type=news&content_ids=&category_id=${cate}`; @@ -43,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `电动邦 - ${titleMap[cate]}`, link: 'https://www.diandong.com/news', item: items, - }); -}; + }; +} diff --git a/lib/routes/diandong/radar.ts b/lib/routes/diandong/radar.ts deleted file mode 100644 index 0e5ba5eb7..000000000 --- a/lib/routes/diandong/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'diandong.com': { - _name: '电动邦', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/news'], - target: '/diandong/news/:cate', - }, - ], - }, -}; diff --git a/lib/routes/diandong/router.ts b/lib/routes/diandong/router.ts deleted file mode 100644 index a62147db6..000000000 --- a/lib/routes/diandong/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:cate?', './news'); -}; diff --git a/lib/routes/diershoubing/maintainer.ts b/lib/routes/diershoubing/maintainer.ts deleted file mode 100644 index 265ea9b74..000000000 --- a/lib/routes/diershoubing/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['wushijishan'], -}; diff --git a/lib/routes/diershoubing/namespace.ts b/lib/routes/diershoubing/namespace.ts new file mode 100644 index 000000000..4f260369b --- /dev/null +++ b/lib/routes/diershoubing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '二柄 APP', + url: 'diershoubing.com', +}; diff --git a/lib/routes/diershoubing/news.ts b/lib/routes/diershoubing/news.ts index 2637b15c7..d66063d97 100644 --- a/lib/routes/diershoubing/news.ts +++ b/lib/routes/diershoubing/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const renderDesc = (data) => art(path.join(__dirname, 'templates/news.art'), data); -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/diershoubing/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['diershoubing.com/'], + }, + name: '新闻', + maintainers: ['wushijishan'], + handler, + url: 'diershoubing.com/', +}; + +async function handler(ctx) { const { data } = await got(`https://api.diershoubing.com:5001/feed/tag/?pn=0&rn=${ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 20}&tag_type=0&src=ios`); const items = data.feeds.map((item) => { @@ -44,10 +67,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `二柄APP`, link: `https://www.diershoubing.com`, description: `二柄APP新闻`, item: items, - }); -}; + }; +} diff --git a/lib/routes/diershoubing/radar.ts b/lib/routes/diershoubing/radar.ts deleted file mode 100644 index a12d10f47..000000000 --- a/lib/routes/diershoubing/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'diershoubing.com': { - _name: '二柄 APP', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/game#er-bing-app', - source: ['/'], - target: '/diershoubing/news', - }, - ], - }, -}; diff --git a/lib/routes/diershoubing/router.ts b/lib/routes/diershoubing/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/diershoubing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/discord/channel.ts b/lib/routes/discord/channel.ts index 5a0720f51..d2742b786 100644 --- a/lib/routes/discord/channel.ts +++ b/lib/routes/discord/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { baseUrl, getChannel, getChannelMessages, getGuild } from './discord-api'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:channelId', + categories: ['social-media'], + example: '/discord/channel/950465850056536084', + parameters: { channelId: 'Channel ID' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['discord.com/channels/:guildId/:channelId/:messageID', 'discord.com/channels/:guildId/:channelId'], + }, + name: 'Channel Messages', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { if (!config.discord || !config.discord.authorization) { throw new Error('Discord RSS is disabled due to the lack of relevant config'); } @@ -32,11 +54,11 @@ export default async (ctx) => { link: `${baseUrl}/channels/${guildId}/${channelId}/${message.id}`, })); - ctx.set('data', { + return { title: `#${channelName} - ${guildName} - Discord`, description: channelTopic, link: `${baseUrl}/channels/${guildId}/${channelId}`, image: `https://cdn.discordapp.com/icons/${guildId}/${guidIcon}.webp`, item: messages, - }); -}; + }; +} diff --git a/lib/routes/discord/maintainer.ts b/lib/routes/discord/maintainer.ts deleted file mode 100644 index b97a9717a..000000000 --- a/lib/routes/discord/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/channel/:channelId': ['TonyRL'], -}; diff --git a/lib/routes/discord/namespace.ts b/lib/routes/discord/namespace.ts new file mode 100644 index 000000000..7d75b7603 --- /dev/null +++ b/lib/routes/discord/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Discord', + url: 'discord.com', +}; diff --git a/lib/routes/discord/radar.ts b/lib/routes/discord/radar.ts deleted file mode 100644 index d39afe44e..000000000 --- a/lib/routes/discord/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'discord.com': { - _name: 'Discord', - '.': [ - { - title: 'Channel Messages', - docs: 'https://docs.rsshub.app/routes/social-media#discord', - source: ['/channels/:guildId/:channelId/:messageID', '/channels/:guildId/:channelId'], - target: '/discord/channel/:channelId', - }, - ], - }, -}; diff --git a/lib/routes/discord/router.ts b/lib/routes/discord/router.ts deleted file mode 100644 index 6c4f8d60d..000000000 --- a/lib/routes/discord/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/channel/:channelId', './channel'); -}; diff --git a/lib/routes/discourse/maintainer.ts b/lib/routes/discourse/maintainer.ts deleted file mode 100644 index c41a4e239..000000000 --- a/lib/routes/discourse/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:configId/posts': ['dzx-dzx'], - '/:configId/notification/:fulltext?': ['dzx-dzx'], -}; diff --git a/lib/routes/discourse/namespace.ts b/lib/routes/discourse/namespace.ts new file mode 100644 index 000000000..3cf89c061 --- /dev/null +++ b/lib/routes/discourse/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Discourse', + description: `:::warning +You need to set the environment variable \`DISCOURSE_CONFIG_{id}\` before using it. Please refer to Configuration section in the Deploy page of the documentation. +:::`, +}; diff --git a/lib/routes/discourse/notifications.ts b/lib/routes/discourse/notifications.ts index bcd985423..0c362c819 100644 --- a/lib/routes/discourse/notifications.ts +++ b/lib/routes/discourse/notifications.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getConfig } from './utils'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/:configId/notifications/:fulltext?', + categories: ['bbs'], + example: '/discourse/0/notifications', + parameters: { configId: 'Environment variable configuration id, see above', fulltext: 'Fetch the content if the notification points to a post. This is disabled by default, set it to `1` to enable it.' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Notifications', + maintainers: [], + handler, + description: `:::warning +If you opt to enable \`fulltext\` feature, consider adding \`limit\` parameter to your query to avoid sending too many request. +:::`, +}; + +async function handler(ctx) { const { link, key } = getConfig(ctx); const response = await got(`${link}/notifications.json`, { headers: { 'User-Api-Key': key } }).json(); @@ -32,9 +54,9 @@ export default async (ctx) => { } const { about } = await got(`${link}/about.json`, { headers: { 'User-Api-Key': key } }).json(); - ctx.set('data', { + return { title: `${about.title} - Notifications`, description: about.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/discourse/posts.ts b/lib/routes/discourse/posts.ts index 652c67327..924b4a331 100644 --- a/lib/routes/discourse/posts.ts +++ b/lib/routes/discourse/posts.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import { getConfig } from './utils'; import got from '@/utils/got'; import RSSParser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/:configId/posts', + categories: ['bbs'], + example: '/discourse/0/posts', + parameters: { configId: 'Environment variable configuration id, see above' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Latest posts', + maintainers: ['dzx-dzx'], + handler, +}; + +async function handler(ctx) { const { link, key } = getConfig(ctx); const feed = await RSSParser.parseString( @@ -21,5 +40,5 @@ export default async (ctx) => { ...e, })); - ctx.set('data', { item: feed.items, ...feed }); -}; + return { item: feed.items, ...feed }; +} diff --git a/lib/routes/discourse/router.ts b/lib/routes/discourse/router.ts deleted file mode 100644 index ee535c161..000000000 --- a/lib/routes/discourse/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:configId/posts', './posts'); - router.get('/:configId/notifications/:fulltext?', './notifications'); -}; diff --git a/lib/routes/discuz/discuz.ts b/lib/routes/discuz/discuz.ts index fa3f86169..864f09a72 100644 --- a/lib/routes/discuz/discuz.ts +++ b/lib/routes/discuz/discuz.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -52,7 +53,14 @@ async function loadContent(itemLink, charset, header) { return { description }; } -export default async (ctx) => { +export const route: Route = { + path: ['/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}', '/:ver{[7x]}/:link{.+}', '/:link{.+}'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let link = ctx.req.param('link'); const ver = ctx.req.param('ver') ? ctx.req.param('ver').toUpperCase() : undefined; const cid = ctx.req.param('cid'); @@ -144,10 +152,10 @@ export default async (ctx) => { throw new Error('不支持当前Discuz版本.'); } - ctx.set('data', { + return { title: $('head > title').text(), description: $('head > meta[name=description]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/discuz/maintainer.ts b/lib/routes/discuz/maintainer.ts deleted file mode 100644 index 2ca5f7aab..000000000 --- a/lib/routes/discuz/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/:link': ['junfengP'], - '/:ver/:link': ['junfengP'], - '/:ver/:cid/:link': ['junfengP'], -}; diff --git a/lib/routes/discuz/namespace.ts b/lib/routes/discuz/namespace.ts new file mode 100644 index 000000000..632d0ac45 --- /dev/null +++ b/lib/routes/discuz/namespace.ts @@ -0,0 +1,5 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Discuz', +}; diff --git a/lib/routes/discuz/radar.ts b/lib/routes/discuz/radar.ts deleted file mode 100644 index ff8b4c563..000000000 --- a/lib/routes/discuz/radar.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/lib/routes/discuz/router.ts b/lib/routes/discuz/router.ts deleted file mode 100644 index a37381c9d..000000000 --- a/lib/routes/discuz/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}', './discuz'); - router.get('/:ver{[7x]}/:link{.+}', './discuz'); - router.get('/:link{.+}', './discuz'); -}; diff --git a/lib/routes/disinfo/maintainer.ts b/lib/routes/disinfo/maintainer.ts deleted file mode 100644 index f1e16e04e..000000000 --- a/lib/routes/disinfo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/publications': ['nczitzk'], -}; diff --git a/lib/routes/disinfo/namespace.ts b/lib/routes/disinfo/namespace.ts new file mode 100644 index 000000000..4fd0c269a --- /dev/null +++ b/lib/routes/disinfo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'EU Disinfo Lab', + url: 'disinfo.eu', +}; diff --git a/lib/routes/disinfo/publications.ts b/lib/routes/disinfo/publications.ts index f284234c9..77d9350d8 100644 --- a/lib/routes/disinfo/publications.ts +++ b/lib/routes/disinfo/publications.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/publications', + categories: ['new-media'], + example: '/disinfo/publications', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['disinfo.eu/'], + }, + name: 'Publications', + maintainers: ['nczitzk'], + handler, + url: 'disinfo.eu/', +}; + +async function handler() { const rootUrl = 'https://www.disinfo.eu'; const currentUrl = `${rootUrl}/publications`; const response = await got({ @@ -49,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/disinfo/radar.ts b/lib/routes/disinfo/radar.ts deleted file mode 100644 index 157699373..000000000 --- a/lib/routes/disinfo/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'disinfo.eu': { - _name: 'EU Disinfo Lab', - '.': [ - { - title: 'Publications', - docs: 'https://docs.rsshub.app/routes/new-media#eu-disinfo-lab', - source: ['/'], - target: '/disinfo/publications', - }, - ], - }, -}; diff --git a/lib/routes/disinfo/router.ts b/lib/routes/disinfo/router.ts deleted file mode 100644 index fd8327057..000000000 --- a/lib/routes/disinfo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/publications', './publications'); -}; diff --git a/lib/routes/diskanalyzer/maintainer.ts b/lib/routes/diskanalyzer/maintainer.ts deleted file mode 100644 index aee803e72..000000000 --- a/lib/routes/diskanalyzer/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/whats-new': ['nczitzk'], -}; diff --git a/lib/routes/diskanalyzer/namespace.ts b/lib/routes/diskanalyzer/namespace.ts new file mode 100644 index 000000000..aa77555bb --- /dev/null +++ b/lib/routes/diskanalyzer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'WizTree', + url: 'diskanalyzer.com', +}; diff --git a/lib/routes/diskanalyzer/radar.ts b/lib/routes/diskanalyzer/radar.ts deleted file mode 100644 index f1e935d9c..000000000 --- a/lib/routes/diskanalyzer/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'diskanalyzer.com': { - _name: "What's New", - '.': [ - { - title: 'Change Log', - docs: 'https://docs.rsshub.app/routes/program-update#wiztree-whats-new', - source: ['/whats-new', '/'], - target: '/diskanalyzer/whats-new', - }, - ], - }, -}; diff --git a/lib/routes/diskanalyzer/router.ts b/lib/routes/diskanalyzer/router.ts deleted file mode 100644 index df85a13b0..000000000 --- a/lib/routes/diskanalyzer/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/whats-new', './whats-new'); -}; diff --git a/lib/routes/diskanalyzer/whats-new.ts b/lib/routes/diskanalyzer/whats-new.ts index aa19e4237..f41828f2f 100644 --- a/lib/routes/diskanalyzer/whats-new.ts +++ b/lib/routes/diskanalyzer/whats-new.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/whats-new', + categories: ['program-update'], + example: '/diskanalyzer/whats-new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['diskanalyzer.com/whats-new', 'diskanalyzer.com/'], + }, + name: "What's New", + maintainers: ['nczitzk'], + handler, + url: 'diskanalyzer.com/whats-new', +}; + +async function handler() { const rootUrl = 'https://diskanalyzer.com'; const currentUrl = `${rootUrl}/whats-new`; @@ -41,9 +64,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/distill/index.ts b/lib/routes/distill/index.ts index f7f4ad8a4..7da044dcb 100644 --- a/lib/routes/distill/index.ts +++ b/lib/routes/distill/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['distill.pub/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'distill.pub/', +}; + +async function handler() { const rootUrl = 'https://distill.pub'; const response = await got({ @@ -57,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/distill/maintainer.ts b/lib/routes/distill/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/distill/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/distill/namespace.ts b/lib/routes/distill/namespace.ts new file mode 100644 index 000000000..1485f6b59 --- /dev/null +++ b/lib/routes/distill/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Distill', + url: 'distill.pub', +}; diff --git a/lib/routes/distill/radar.ts b/lib/routes/distill/radar.ts deleted file mode 100644 index 2e13bb99b..000000000 --- a/lib/routes/distill/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'distill.pub': { - _name: 'Distill', - '.': [ - { - title: 'Latest', - docs: 'https://docs.rsshub.app/routes/programming#distill', - source: ['/'], - target: '/distill', - }, - ], - }, -}; diff --git a/lib/routes/distill/router.ts b/lib/routes/distill/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/distill/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/dlnews/category.ts b/lib/routes/dlnews/category.ts index 4928bfc47..993d0c111 100644 --- a/lib/routes/dlnews/category.ts +++ b/lib/routes/dlnews/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -60,7 +61,19 @@ const extractArticle = (item) => return item; }); -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + radar: { + source: ['dlnews.com/articles/:category'], + target: '/:category', + }, + name: 'Unknown', + maintainers: ['Rjnishant530'], + handler, + url: 'dlnews.com/articles/', +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const baseUrl = 'https://www.dlnews.com'; const apiPath = '/pf/api/v3/content/fetch/articles-api'; @@ -82,7 +95,7 @@ export default async (ctx) => { items.push(data); } - ctx.set('data', { + return { title: Object.hasOwn(topics, category) ? `${topics[category]} : DL News` : 'DL News', link: baseUrl, item: items, @@ -90,5 +103,5 @@ export default async (ctx) => { logo: 'https://www.dlnews.com/pf/resources/favicon.ico?d=284', icon: 'https://www.dlnews.com/pf/resources/favicon.ico?d=284', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/dlnews/maintainer.ts b/lib/routes/dlnews/maintainer.ts deleted file mode 100644 index 3fdb89556..000000000 --- a/lib/routes/dlnews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['Rjnishant530'], -}; diff --git a/lib/routes/dlnews/namespace.ts b/lib/routes/dlnews/namespace.ts new file mode 100644 index 000000000..37d1a01f7 --- /dev/null +++ b/lib/routes/dlnews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DL NEWS', + url: 'dlnews.com', +}; diff --git a/lib/routes/dlnews/radar.ts b/lib/routes/dlnews/radar.ts deleted file mode 100644 index 997137a66..000000000 --- a/lib/routes/dlnews/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'dlnews.com': { - _name: 'DL NEWS', - '.': [ - { - title: 'All Articles', - docs: 'https://docs.rsshub.app/routes/finance#dl-news', - source: ['/articles/'], - target: '/dlnews/', - }, - { - title: 'Topic', - docs: 'https://docs.rsshub.app/routes/finance#dl-news', - source: ['/articles/:category'], - target: '/dlnews/:category', - }, - ], - }, -}; diff --git a/lib/routes/dlnews/router.ts b/lib/routes/dlnews/router.ts deleted file mode 100644 index 22dfff62d..000000000 --- a/lib/routes/dlnews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './category'); -}; diff --git a/lib/routes/dlsite/campaign.ts b/lib/routes/dlsite/campaign.ts index cb2aad17e..be219f351 100644 --- a/lib/routes/dlsite/campaign.ts +++ b/lib/routes/dlsite/campaign.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -118,7 +119,25 @@ const setUrl = (info) => { return paramsPath.slice(1); }; -export default async (ctx) => { +export const route: Route = { + path: '/campaign/:type/:free?', + categories: ['anime'], + example: '/dlsite/campaign/home', + parameters: { type: 'Type, see table above', free: 'Free only, empty means false, other value means true' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Discounted Works', + maintainers: ['cssxsh'], + handler, +}; + +async function handler(ctx) { const info = infos[ctx.req.param('type')]; // 判断参数是否合理 if (info === undefined) { @@ -163,12 +182,12 @@ export default async (ctx) => { return signle; }); - ctx.set('data', { + return { title, link: `${host}/${link}`, description, language: 'ja-jp', allowEmpty: true, item, - }); -}; + }; +} diff --git a/lib/routes/dlsite/ci-en/article.ts b/lib/routes/dlsite/ci-en/article.ts index 4535da2c9..0f09f182d 100644 --- a/lib/routes/dlsite/ci-en/article.ts +++ b/lib/routes/dlsite/ci-en/article.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ci-en/:id/article', + categories: ['anime'], + example: '/dlsite/ci-en/7400/article', + parameters: { id: 'Creator id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ci-en.dlsite.com/creator/:id/article/843558', 'ci-en.dlsite.com/'], + }, + name: "Ci-en Creators' Article", + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '7400'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; @@ -57,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dlsite/index.ts b/lib/routes/dlsite/index.ts index 74921189c..36584187b 100644 --- a/lib/routes/dlsite/index.ts +++ b/lib/routes/dlsite/index.ts @@ -1,5 +1,13 @@ +import { Route } from '@/types'; import { ProcessItems } from './utils'; -export default async (ctx) => { - ctx.set('data', await ProcessItems(ctx)); +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, }; + +async function handler(ctx) { + ctx.set('data', await ProcessItems(ctx)); +} diff --git a/lib/routes/dlsite/maintainer.ts b/lib/routes/dlsite/maintainer.ts deleted file mode 100644 index 45bfc4c26..000000000 --- a/lib/routes/dlsite/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/campaign/:type/:free?': ['cssxsh'], - '/ci-en/:id/article': ['nczitzk'], - '/new/:type': ['cssxsh'], - '/:path+': ['nczitzk'], -}; diff --git a/lib/routes/dlsite/namespace.ts b/lib/routes/dlsite/namespace.ts new file mode 100644 index 000000000..9b383a0e6 --- /dev/null +++ b/lib/routes/dlsite/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DLsite', + url: 'dlsite.com', +}; diff --git a/lib/routes/dlsite/new.ts b/lib/routes/dlsite/new.ts index 479c08295..90c5a7d84 100644 --- a/lib/routes/dlsite/new.ts +++ b/lib/routes/dlsite/new.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -49,7 +50,28 @@ const infos = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/new/:type', + categories: ['anime'], + example: '/dlsite/new/home', + parameters: { type: 'Type, see table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Current Release', + maintainers: ['cssxsh'], + handler, + description: `| Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL | + | ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- | + | home | comic | soft | maniax | books | pro | girls | bl |`, +}; + +async function handler(ctx) { const info = infos[ctx.req.param('type')]; // 判断参数是否合理 if (info === undefined) { @@ -98,11 +120,11 @@ export default async (ctx) => { return signle; }); - ctx.set('data', { + return { title, link, description, language: 'ja-jp', item, - }); -}; + }; +} diff --git a/lib/routes/dlsite/radar.ts b/lib/routes/dlsite/radar.ts deleted file mode 100644 index a1b34e689..000000000 --- a/lib/routes/dlsite/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'dlsite.com': { - _name: 'DLsite', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/anime#dlsite', - source: ['/'], - target: (params, url) => `/dlsite${new URL(url).href.match(/dlsite\.com\/(.*?)/)[1]}`, - }, - { - title: '当前日期发售的新产品', - docs: 'https://docs.rsshub.app/routes/anime#dlsite', - }, - { - title: '产品打折信息', - docs: 'https://docs.rsshub.app/routes/anime#dlsite', - }, - ], - 'ci-en': [ - { - title: 'Ci-en 创作者文章', - docs: 'https://docs.rsshub.app/routes/anime#dlsite', - source: ['/creator/:id/article/843558', '/'], - target: '/dlsite/ci-en/:id/article', - }, - ], - }, -}; diff --git a/lib/routes/dlsite/router.ts b/lib/routes/dlsite/router.ts deleted file mode 100644 index 9aedae6ac..000000000 --- a/lib/routes/dlsite/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/campaign/:type/:free?', './campaign'); - router.get('/ci-en/:id/article', './ci-en/article'); - router.get('/new/:type', './new'); - router.get('*', './'); -}; diff --git a/lib/routes/dmzj/maintainer.ts b/lib/routes/dmzj/maintainer.ts deleted file mode 100644 index 3c26c8b5b..000000000 --- a/lib/routes/dmzj/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['vzz64'], -}; diff --git a/lib/routes/dmzj/namespace.ts b/lib/routes/dmzj/namespace.ts new file mode 100644 index 000000000..f29fccea7 --- /dev/null +++ b/lib/routes/dmzj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '动漫之家', + url: 'news.dmzj.com', +}; diff --git a/lib/routes/dmzj/news.ts b/lib/routes/dmzj/news.ts index ce4b2fb37..defeff726 100644 --- a/lib/routes/dmzj/news.ts +++ b/lib/routes/dmzj/news.ts @@ -1,12 +1,39 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['anime'], + example: '/dmzj/news/donghuaqingbao', + parameters: { category: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.dmzj.com/'], + target: '/news', + }, + name: '新闻站', + maintainers: ['vzz64'], + handler, + url: 'news.dmzj.com/', + description: `| 漫画情报 | 轻小说情报 | 动漫周边 | 声优情报 | 音乐资讯 | 游戏资讯 | 美图欣赏 | 漫展情报 | 大杂烩 | + | ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- | + | manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui |`, +}; + +async function handler(ctx) { const url = `https://news.dmzj.com/${ctx.req.param('category') || ''}`; const $ = load((await got(url)).data); - ctx.set('data', { + return { title: $('title').text(), link: url, item: $('.briefnews_con_li .li_img_de') @@ -22,5 +49,5 @@ export default async (ctx) => { .get(), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/dmzj/radar.ts b/lib/routes/dmzj/radar.ts deleted file mode 100644 index aad2eda4b..000000000 --- a/lib/routes/dmzj/radar.ts +++ /dev/null @@ -1,67 +0,0 @@ -export default { - 'dmzj.com': { - _name: '动漫之家', - news: [ - { - title: '宅新闻', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/', - target: '/dmzj/news', - }, - { - title: '漫画情报', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/manhuaqingbao', - target: '/dmzj/news/manhuaqingbao', - }, - { - title: '轻小说情报', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/qingxiaoshuoqingbao', - target: '/dmzj/news/qingxiaoshuoqingbao', - }, - { - title: '动漫周边', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/manhuazhoubian', - target: '/dmzj/news/manhuazhoubian', - }, - { - title: '声优情报', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/shengyouqingbao', - target: '/dmzj/news/shengyouqingbao', - }, - { - title: '音乐资讯', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/yinyuezixun', - target: '/dmzj/news/yinyuezixun', - }, - { - title: '游戏资讯', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/youxizixun', - target: '/dmzj/news/youxizixun', - }, - { - title: '美图欣赏', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/meituxinshang', - target: '/dmzj/news/meituxinshang', - }, - { - title: '漫展情报', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/manzhanqingbao', - target: '/dmzj/news/manzhanqingbao', - }, - { - title: '大杂烩', - docs: 'https://docs.rsshub.app/routes/anime#dong-man-zhi-jia', - source: '/dazahui', - target: '/dmzj/news/dazahui', - }, - ], - }, -}; diff --git a/lib/routes/dmzj/router.ts b/lib/routes/dmzj/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/dmzj/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/dn/maintainer.ts b/lib/routes/dn/maintainer.ts deleted file mode 100644 index 596ae6a9b..000000000 --- a/lib/routes/dn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/dn/namespace.ts b/lib/routes/dn/namespace.ts new file mode 100644 index 000000000..41fc2ed52 --- /dev/null +++ b/lib/routes/dn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DN.com', + url: 'dn.com', +}; diff --git a/lib/routes/dn/news.ts b/lib/routes/dn/news.ts index 082e80258..121aa1164 100644 --- a/lib/routes/dn/news.ts +++ b/lib/routes/dn/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,39 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:language/news/:category?', + categories: ['new-media'], + example: '/dn/en-us/news', + parameters: { language: 'Language, see below', category: 'Category, see below, The Latest by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + description: `#### Language + + | English | 中文 | + | ------- | ----- | + | en-us | zh-cn | + + #### Category + + | English Category | 中文分类 | Category id | + | -------------------- | -------- | ----------- | + | The Latest | 最新 | | + | Industry Information | 行业资讯 | category-1 | + | Knowledge | 域名知识 | category-2 | + | Investment | 域名投资 | category-3 |`, +}; + +async function handler(ctx) { const { language, category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -79,7 +112,7 @@ export default async (ctx) => { const title = $('a.logo img').prop('alt'); const icon = $('link[rel="icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `${title} - ${$('div.group a.active').text()}`, link: currentUrl, @@ -90,5 +123,5 @@ export default async (ctx) => { logo: icon, subtitle: $('title').text(), author: title, - }); -}; + }; +} diff --git a/lib/routes/dn/radar.ts b/lib/routes/dn/radar.ts deleted file mode 100644 index c2fab0d2a..000000000 --- a/lib/routes/dn/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'dn.com': { - _name: 'DN.com', - '.': [ - { - title: 'The Latest', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/en-us/news/p1', '/en-us/news'], - target: '/dn/en-us/news', - }, - { - title: 'Industry Information', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/en-us/news/category-1'], - target: '/dn/en-us/news/category-1', - }, - { - title: 'Knowledge', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/en-us/news/category-2'], - target: '/dn/en-us/news/category-2', - }, - { - title: 'Investment', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/en-us/news/category-3'], - target: '/dn/en-us/news/category-3', - }, - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/zh-cn/news/p1', '/zh-cn/news'], - target: '/dn/zh-cn/news', - }, - { - title: '行业资讯', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/zh-cn/news/category-1'], - target: '/dn/zh-cn/news/category-1', - }, - { - title: '域名知识', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/zh-cn/news/category-2'], - target: '/dn/zh-cn/news/category-2', - }, - { - title: '域名投资', - docs: 'https://docs.rsshub.app/routes/new-media#dn.com-news', - source: ['/zh-cn/news/category-3'], - target: '/dn/zh-cn/news/category-3', - }, - ], - }, -}; diff --git a/lib/routes/dn/router.ts b/lib/routes/dn/router.ts deleted file mode 100644 index 6d93649e3..000000000 --- a/lib/routes/dn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language/news/:category?', './news'); -}; diff --git a/lib/routes/dnaindia/category.ts b/lib/routes/dnaindia/category.ts index 2ca19c630..33d8ddef2 100644 --- a/lib/routes/dnaindia/category.ts +++ b/lib/routes/dnaindia/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,42 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import logger from '@/utils/logger'; -export default async (ctx) => { +export const route: Route = { + path: ['/:category', '/topic/:topic'], + categories: ['traditional-media'], + example: '/dnaindia/headlines', + parameters: { category: 'Find it in the URL, or tables below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dnaindia.com/:category'], + }, + name: 'News', + maintainers: ['Rjnishant530'], + handler, + description: `Topics: + + | DNA verified | + | ------------ | + | dna-verified | + + :::tip[Topic] + The URL of the form \`https://www.dnaindia.com/topic/dna-verified\` demonstrates the utilization of the subdomain \`topic\` + :::`, + description: `Categories: + + | Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World | + | --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- | + | headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world |`, +}; + +async function handler(ctx) { const { category, topic } = ctx.req.param(); const baseUrl = 'https://www.dnaindia.com'; let route; @@ -55,7 +91,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'DNA India', link: baseUrl, item: items, @@ -63,5 +99,5 @@ export default async (ctx) => { logo: 'https://cdn.dnaindia.com/sites/all/themes/dnaindia/favicon-1016.ico', icon: 'https://cdn.dnaindia.com/sites/all/themes/dnaindia/favicon-1016.ico', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/dnaindia/maintainer.ts b/lib/routes/dnaindia/maintainer.ts deleted file mode 100644 index 8b282dac9..000000000 --- a/lib/routes/dnaindia/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:category': ['Rjnishant530'], - '/topic/:topic': ['Rjnishant530'], -}; diff --git a/lib/routes/dnaindia/namespace.ts b/lib/routes/dnaindia/namespace.ts new file mode 100644 index 000000000..89176d9de --- /dev/null +++ b/lib/routes/dnaindia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DNA India', + url: 'dnaindia.com', +}; diff --git a/lib/routes/dnaindia/radar.ts b/lib/routes/dnaindia/radar.ts deleted file mode 100644 index 0daed5ae4..000000000 --- a/lib/routes/dnaindia/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'dnaindia.com': { - _name: 'DNA India', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#dna-india', - source: ['/:category'], - target: '/dnaindia/:category', - }, - { - title: 'Topic', - docs: 'https://docs.rsshub.app/routes/traditional-media#dna-india', - source: ['/topic/:topic'], - target: '/dnaindia/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/dnaindia/router.ts b/lib/routes/dnaindia/router.ts deleted file mode 100644 index 0354c963f..000000000 --- a/lib/routes/dnaindia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:category', './category'); - router.get('/topic/:topic', './category'); -}; diff --git a/lib/routes/dockerhub/build.ts b/lib/routes/dockerhub/build.ts index 2a9c6f8f0..ebbc86d8a 100644 --- a/lib/routes/dockerhub/build.ts +++ b/lib/routes/dockerhub/build.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { hash } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/build/:owner/:image/:tag?', + categories: ['program-update'], + example: '/dockerhub/build/wangqiru/ttrss', + parameters: { owner: 'Image owner', image: 'Image name', tag: 'Image tag,default to latest' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Image New Build', + maintainers: ['HenryQW'], + handler, + description: `:::warning + The owner of the official image fills in the library, for example: [https://rsshub.app/dockerhub/build/library/mysql](https://rsshub.app/dockerhub/build/library/mysql) + :::`, +}; + +async function handler(ctx) { const { owner, image, tag = 'latest' } = ctx.req.param(); const namespace = `${owner}/${image}`; @@ -13,7 +35,7 @@ export default async (ctx) => { const item = data.data; - ctx.set('data', { + return { title: `${namespace}:${tag} build history`, description: metadata.data.description, link, @@ -27,5 +49,5 @@ export default async (ctx) => { guid: hash(item.images), }, ], - }); -}; + }; +} diff --git a/lib/routes/dockerhub/maintainer.ts b/lib/routes/dockerhub/maintainer.ts deleted file mode 100644 index 22e1af85f..000000000 --- a/lib/routes/dockerhub/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/build/:owner/:image/:tag?': ['HenryQW'], - '/tag/:owner/:image': ['outloudvi'], -}; diff --git a/lib/routes/dockerhub/namespace.ts b/lib/routes/dockerhub/namespace.ts new file mode 100644 index 000000000..b8476121f --- /dev/null +++ b/lib/routes/dockerhub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Docker Hub', + url: 'hub.docker.com', +}; diff --git a/lib/routes/dockerhub/radar.ts b/lib/routes/dockerhub/radar.ts deleted file mode 100644 index a54c9f7ad..000000000 --- a/lib/routes/dockerhub/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'docker.com': { - _name: 'Docker Hub', - hub: [ - { - title: '镜像有新 Build', - docs: 'https://docs.rsshub.app/routes/program-update#docker-hub', - source: ['/r/:owner/:image', '/r/:owner/:image/tags', '/_/:image'], - target: (params) => `/dockerhub/build/${params.owner ?? 'library'}/${params.image}`, - }, - { - title: '镜像有新 Tag', - docs: 'https://docs.rsshub.app/routes/program-update#docker-hub', - source: ['/r/:owner/:image', '/r/:owner/:image/tags', '/_/:image'], - target: (params) => `/dockerhub/tag/${params.owner ?? 'library'}/${params.image}`, - }, - ], - }, -}; diff --git a/lib/routes/dockerhub/router.ts b/lib/routes/dockerhub/router.ts deleted file mode 100644 index 76628fd41..000000000 --- a/lib/routes/dockerhub/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/build/:owner/:image/:tag?', './build'); - router.get('/tag/:owner/:image/:limits?', './tag'); -}; diff --git a/lib/routes/dockerhub/tag.ts b/lib/routes/dockerhub/tag.ts index 2aaf1d236..bcb448f2a 100644 --- a/lib/routes/dockerhub/tag.ts +++ b/lib/routes/dockerhub/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { hash } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:owner/:image/:limits?', + categories: ['program-update'], + example: '/dockerhub/tag/library/mariadb', + parameters: { owner: 'Image owner', image: 'Image name', limits: 'Tag count, 10 by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Image New Tag', + maintainers: [], + handler, + description: `:::warning + Use \`library\` as the \`owner\` for official images, such as [https://rsshub.app/dockerhub/tag/library/mysql](https://rsshub.app/dockerhub/tag/library/mysql) + :::`, +}; + +async function handler(ctx) { const { owner, image, limits } = ctx.req.param(); const namespace = `${owner}/${image}`; @@ -15,7 +37,7 @@ export default async (ctx) => { const tags = data.data.results; - ctx.set('data', { + return { title: `${namespace} tags`, description: metadata.data.description, link, @@ -29,5 +51,5 @@ export default async (ctx) => { // check for (1) different tag names and (2) different image hashes, considering varients of all arches guid: `${namespace}:${item.name}@${hash(item.images)}`, })), - }); -}; + }; +} diff --git a/lib/routes/docschina/maintainer.ts b/lib/routes/docschina/maintainer.ts deleted file mode 100644 index 96f00dd8e..000000000 --- a/lib/routes/docschina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/weekly/:category?': ['daijinru', 'hestudy'], -}; diff --git a/lib/routes/docschina/namespace.ts b/lib/routes/docschina/namespace.ts new file mode 100644 index 000000000..e4728cad6 --- /dev/null +++ b/lib/routes/docschina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '印记中文', + url: 'docschina.org', +}; diff --git a/lib/routes/docschina/radar.ts b/lib/routes/docschina/radar.ts deleted file mode 100644 index 96fdd36b6..000000000 --- a/lib/routes/docschina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'docschina.org': { - _name: '印记中文', - '.': [ - { - title: '周刊 - JavaScript', - docs: 'https://docs.rsshub.app/routes/programming#yin-ji-zhong-wen-zhou-kan', - source: ['/news/weekly/js/*', '/news/weekly/js', '/'], - target: '/docschina/jsweekly', - }, - ], - }, -}; diff --git a/lib/routes/docschina/router.ts b/lib/routes/docschina/router.ts deleted file mode 100644 index ced43d0af..000000000 --- a/lib/routes/docschina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/weekly/:category?', './weekly'); -}; diff --git a/lib/routes/docschina/weekly.ts b/lib/routes/docschina/weekly.ts index b81eb4273..df79dec7d 100644 --- a/lib/routes/docschina/weekly.ts +++ b/lib/routes/docschina/weekly.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly/:category?', + categories: ['programming'], + example: '/docschina/weekly', + parameters: { category: '周刊分类,见下表,默认为js' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['daijinru', 'hestudy'], + handler, +}; + +async function handler(ctx) { const { category = 'js' } = ctx.req.param(); const baseURL = 'https://docschina.org'; @@ -15,7 +34,7 @@ export default async (ctx) => { const dataEl = $('#__NEXT_DATA__'); const dataText = dataEl.text(); const data = JSON.parse(dataText); - ctx.set('data', { + return { title, link: baseURL + path, item: data?.props?.pageProps?.data?.map((item) => ({ @@ -25,5 +44,5 @@ export default async (ctx) => { author: item.editors?.join(','), itunes_item_image: item.imageUrl, })), - }); -}; + }; +} diff --git a/lib/routes/dol/announce.ts b/lib/routes/dol/announce.ts index b9db38169..841af46d5 100644 --- a/lib/routes/dol/announce.ts +++ b/lib/routes/dol/announce.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/announce/:owner?/:province?/:office?', + categories: ['government'], + example: '/dol/announce', + parameters: { owner: 'Requester/former land owner', province: 'Province which the land is belongs to', office: 'DOL office name which the land is belongs to (สำนักงานที่ดิน(กรุงเทพมหานคร|จังหวัด*) [สาขา*])' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'e-LandsAnnouncement', + maintainers: ['itpcc'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://announce.dol.go.th'; const { owner, province, office } = ctx.req.param(); const queryParams = { @@ -89,4 +108,4 @@ export default async (ctx) => { }); ctx.set('data', result); -}; +} diff --git a/lib/routes/dol/maintainer.ts b/lib/routes/dol/maintainer.ts deleted file mode 100644 index 90d466e40..000000000 --- a/lib/routes/dol/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/announce/:owner?/:province?/:office?': ['itpcc'], -}; diff --git a/lib/routes/dol/namespace.ts b/lib/routes/dol/namespace.ts new file mode 100644 index 000000000..57b9e4752 --- /dev/null +++ b/lib/routes/dol/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Thailand Department of Lands', + url: 'announce.dol.go.th', +}; diff --git a/lib/routes/dol/radar.ts b/lib/routes/dol/radar.ts deleted file mode 100644 index fa6b6df45..000000000 --- a/lib/routes/dol/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'dol.go.th': { - _name: 'กรมที่ดิน (Thaland Department of Lands)', - announce: [ - { - title: 'ประกาศกรมที่ดิน', - docs: 'https://docs.rsshub.app/routes/government#thailand-department-of-lands-e-landsannouncement', - source: '/index.php', - target: (params, url, document) => { - const queryParams = new URL(url).searchParams; - let rssPath = '/dol/announce'; - if (!queryParams.has('searchconcerned')) { - return rssPath; - } - - rssPath += `/${encodeURIComponent(queryParams.get('searchconcerned'))}`; - - const province = document && document.querySelector('#searchprovince').value !== '' ? document.querySelector(`#searchprovince option[value="${document.querySelector('#searchprovince').value}"]`).text() : ''; - - const office = document && document.querySelector('#searchoffice').value !== '' ? document.querySelector(`#searchoffice option[value="${document.querySelector('#searchoffice').value}"]`).text() : ''; - - if (!province || !office) { - return rssPath; - } - - rssPath += `/${encodeURIComponent(province)}/${encodeURIComponent(office)}`; - - return rssPath; - }, - }, - ], - }, -}; diff --git a/lib/routes/dol/router.ts b/lib/routes/dol/router.ts deleted file mode 100644 index 189469e01..000000000 --- a/lib/routes/dol/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/announce/:owner?/:province?/:office?', './announce'); -}; diff --git a/lib/routes/domp4/detail.ts b/lib/routes/domp4/detail.ts index 76d596e77..1e8773bff 100644 --- a/lib/routes/domp4/detail.ts +++ b/lib/routes/domp4/detail.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -69,7 +70,33 @@ function getMetaInfo($) { }; } -export default async (ctx) => { +export const route: Route = { + path: '/detail/:id', + categories: ['multimedia'], + example: '/domp4/detail/LBTANI22222I', + parameters: { id: '从剧集详情页 URL 处获取,如:`https://www.mp4kan.com/html/LBTANI22222I.html`,取 `.html` 前面部分' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['domp4.cc/detail/:id'], + }, + name: '剧集订阅', + maintainers: ['savokiss'], + handler, + description: `:::tip +由于大部分详情页是 \`/html/xxx.html\`,还有部分是 \`/detail/123.html\`,所以此处做了兼容,id 取 \`xxx\` 或者 \`123\` 都可以。 + +新增 \`second\` 参数,用于选择下载地址二(地址二不可用或者不填都默认地址一),用法: \`/domp4/detail/LBTANI22222I?second=1\`。 +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { domain, second } = ctx.req.query(); let pureId = id; @@ -89,11 +116,11 @@ export default async (ctx) => { const list = getItemList($, detailUrl, second); const meta = getMetaInfo($); - ctx.set('data', { + return { link: detailUrl, title: meta.title || 'domp4电影 - 详情', image: meta.cover, description: meta.description, item: list, - }); -}; + }; +} diff --git a/lib/routes/domp4/latest.ts b/lib/routes/domp4/latest.ts index ecb04181b..30a1556cd 100644 --- a/lib/routes/domp4/latest.ts +++ b/lib/routes/domp4/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,29 @@ function getItemList($, type) { return list; } -export default async (ctx) => { +export const route: Route = { + path: '/latest/:type?', + categories: ['multimedia'], + example: '/domp4/latest/vod', + parameters: { type: '`vod` 代表电影,`tv` 代表电视剧,默认 vod' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['domp4.cc/', 'domp4.cc/custom/update.html'], + }, + name: '最近更新', + maintainers: ['savokiss'], + handler, + url: 'domp4.cc/', +}; + +async function handler(ctx) { const { type = 'vod' } = ctx.req.param(); const { domain } = ctx.req.query(); @@ -27,9 +50,9 @@ export default async (ctx) => { const $ = load(res.data); const list = getItemList($, type); - ctx.set('data', { + return { link: latestUrl, title: 'domp4电影', item: list, - }); -}; + }; +} diff --git a/lib/routes/domp4/maintainer.ts b/lib/routes/domp4/maintainer.ts deleted file mode 100644 index 508902b00..000000000 --- a/lib/routes/domp4/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/detail/:id': ['savokiss'], - '/latest/:type?': ['savokiss'], -}; diff --git a/lib/routes/domp4/namespace.ts b/lib/routes/domp4/namespace.ts new file mode 100644 index 000000000..b9e5ef736 --- /dev/null +++ b/lib/routes/domp4/namespace.ts @@ -0,0 +1,15 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DoMP4 影视', + url: 'domp4.cc', + description: `:::tip +由于网站有多个备用域名,默认使用 \`mp4us.com\`,可以通过在路由最后加上 \`?domain=<域名>\` 切换域名。 + +目前可用域名有: + +\`\`\`javascript +['domp4.cc', 'mp4kan.com', 'mp4us.com', 'wemp4.com', 'dbmp4.com'] +\`\`\` +:::`, +}; diff --git a/lib/routes/domp4/radar.ts b/lib/routes/domp4/radar.ts deleted file mode 100644 index cb2b42c67..000000000 --- a/lib/routes/domp4/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'domp4.cc': { - _name: 'domp4电影', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/routes/multimedia#domp4-ying-shi', - source: ['/', '/custom/update.html'], - target: '/domp4/latest/:type?', - }, - { - title: '剧集订阅', - docs: 'https://docs.rsshub.app/routes/multimedia#domp4-ying-shi', - source: '/html/:id', - target: '/domp4/detail/:id', - }, - { - title: '剧集订阅', - docs: 'https://docs.rsshub.app/routes/multimedia#domp4-ying-shi', - source: '/detail/:id', - target: '/domp4/detail/:id', - }, - ], - }, -}; diff --git a/lib/routes/domp4/router.ts b/lib/routes/domp4/router.ts deleted file mode 100644 index 8af476d8b..000000000 --- a/lib/routes/domp4/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/detail/:id', './detail'); - router.get('/latest/:type?', './latest'); -}; diff --git a/lib/routes/dongqiudi/daily.ts b/lib/routes/dongqiudi/daily.ts index a05b65de4..0cf6a4bc2 100644 --- a/lib/routes/dongqiudi/daily.ts +++ b/lib/routes/dongqiudi/daily.ts @@ -1,3 +1,29 @@ -export default (ctx) => { - ctx.redirect('/dongqiudi/special/48'); +import { Route } from '@/types'; +export const route: Route = { + path: '/daily', + categories: ['new-media'], + example: '/dongqiudi/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.dongqiudi.com/special/48'], + }, + name: '早报', + maintainers: ['HenryQW'], + handler, + url: 'www.dongqiudi.com/special/48', + description: `:::tip +部分球队和球员可能会有两个 id, 正确 id 应该由 \`5000\` 开头. +:::`, }; + +function handler(ctx) { + ctx.redirect('/dongqiudi/special/48'); +} diff --git a/lib/routes/dongqiudi/maintainer.ts b/lib/routes/dongqiudi/maintainer.ts deleted file mode 100644 index 66202180c..000000000 --- a/lib/routes/dongqiudi/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/daily': ['HenryQW'], - '/player_news/:id': ['HenryQW'], - '/result/:team': ['HenryQW'], - '/special/:id': ['dxmpalb'], - '/team_news/:team': ['HenryQW'], - '/top_news/:id?': ['HendricksZheng'], -}; diff --git a/lib/routes/dongqiudi/namespace.ts b/lib/routes/dongqiudi/namespace.ts new file mode 100644 index 000000000..b640bd443 --- /dev/null +++ b/lib/routes/dongqiudi/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '懂球帝', + url: 'm.dongqiudi.com', + description: `:::tip +- 可以通过头条新闻 + 参数过滤的形式获得早报、专题等内容。 +:::`, +}; diff --git a/lib/routes/dongqiudi/player-news.ts b/lib/routes/dongqiudi/player-news.ts index ad6eade02..d872e9ba4 100644 --- a/lib/routes/dongqiudi/player-news.ts +++ b/lib/routes/dongqiudi/player-news.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/player_news/:id', + categories: ['new-media'], + example: '/dongqiudi/player_news/50000339', + parameters: { id: '球员 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中通过其队伍找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '球员新闻', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const playerId = ctx.req.param('id'); await utils.ProcessFeed(ctx, 'player', playerId); -}; +} diff --git a/lib/routes/dongqiudi/radar.ts b/lib/routes/dongqiudi/radar.ts deleted file mode 100644 index e70e8a126..000000000 --- a/lib/routes/dongqiudi/radar.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - 'dongqiudi.com': { - _name: '懂球帝', - m: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/home/:id'], - target: '/dongqiudi/top_news/:id', - }, - ], - www: [ - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/special/:id'], - target: '/dongqiudi/special/:id', - }, - { - title: '早报', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/special/48'], - target: '/dongqiudi/daily', - }, - { - title: '足球赛果', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/team/*team'], - target: (params) => `/dongqiudi/result/${params.team.replace('.html', '')}`, - }, - { - title: '球队新闻', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/team/*team'], - target: (params) => `/dongqiudi/team_news/${params.team.replace('.html', '')}`, - }, - { - title: '球员新闻', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/player/*id'], - target: (params) => `/dongqiudi/player_news/${params.id.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/dongqiudi/result.ts b/lib/routes/dongqiudi/result.ts index 03f934ef4..5ecc48d2f 100644 --- a/lib/routes/dongqiudi/result.ts +++ b/lib/routes/dongqiudi/result.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { JSDOM } from 'jsdom'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/result/:team', + categories: ['new-media'], + example: '/dongqiudi/result/50001755', + parameters: { team: '球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '足球赛果', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const team = ctx.req.param('team'); const link = `https://www.dongqiudi.com/team/${team}.html`; @@ -22,9 +41,9 @@ export default async (ctx) => { pubDate: parseDate(result.start_time), })); - ctx.set('data', { + return { title: `${teamName} 比赛结果`, link, item: out.slice(-10, out.length), - }); -}; + }; +} diff --git a/lib/routes/dongqiudi/router.ts b/lib/routes/dongqiudi/router.ts deleted file mode 100644 index f114f35e9..000000000 --- a/lib/routes/dongqiudi/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/daily', './daily'); - router.get('/player_news/:id', './player-news'); - router.get('/result/:team', './result'); - router.get('/special/:id', './special'); - router.get('/team_news/:team', './team-news'); - router.get('/top_news/:id?', './top-news'); -}; diff --git a/lib/routes/dongqiudi/special.ts b/lib/routes/dongqiudi/special.ts index 0207ef561..a1300167c 100644 --- a/lib/routes/dongqiudi/special.ts +++ b/lib/routes/dongqiudi/special.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/special/:id', + categories: ['new-media'], + example: '/dongqiudi/special/41', + parameters: { id: '专题 id, 可自行通过 https://www.dongqiudi.com/special/+数字匹配' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.dongqiudi.com/special/:id'], + }, + name: '专题', + maintainers: ['dxmpalb'], + handler, + description: `| 新闻大爆炸 | 懂球帝十佳球 | 懂球帝本周 MVP | + | ---------- | ------------ | -------------- | + | 41 | 52 | 53 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { data: response } = await got(`https://www.dongqiudi.com/api/old/columns/${id}`); @@ -26,10 +51,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `懂球帝专题-${response.title}`, description: response.description, link: `https://www.dongqiudi.com/special/${id}`, item: out.filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/dongqiudi/team-news.ts b/lib/routes/dongqiudi/team-news.ts index 3f8b0f8bc..a92e6c0e5 100644 --- a/lib/routes/dongqiudi/team-news.ts +++ b/lib/routes/dongqiudi/team-news.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/team_news/:team', + categories: ['new-media'], + example: '/dongqiudi/team_news/50001755', + parameters: { team: '球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '球队新闻', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const teamId = ctx.req.param('team'); await utils.ProcessFeed(ctx, 'team', teamId); -}; +} diff --git a/lib/routes/dongqiudi/top-news.ts b/lib/routes/dongqiudi/top-news.ts index 0e1cbf312..e4820215c 100644 --- a/lib/routes/dongqiudi/top-news.ts +++ b/lib/routes/dongqiudi/top-news.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/top_news/:id?', + categories: ['new-media'], + example: '/dongqiudi/top_news/1', + parameters: { id: '类别 id,不填默认头条新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.dongqiudi.com/home/:id'], + target: '/top_news/:id', + }, + name: '新闻', + maintainers: ['HendricksZheng'], + handler, + description: `| 头条 | 深度 | 闲情 | D 站 | 中超 | 国际 | 英超 | 西甲 | 意甲 | 德甲 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 1; const { data } = await got(`https://api.dongqiudi.com/app/tabs/web/${id}.json`); const articles = data.articles; @@ -26,9 +52,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `懂球帝 - ${label}`, link: `https://www.dongqiudi.com/articlesList/${id}`, item: out.filter((e) => e !== undefined), - }); -}; + }; +} diff --git a/lib/routes/dongqiudi/utils.ts b/lib/routes/dongqiudi/utils.ts index 6e4e527fe..d41fb78bf 100644 --- a/lib/routes/dongqiudi/utils.ts +++ b/lib/routes/dongqiudi/utils.ts @@ -109,12 +109,12 @@ const ProcessFeed = async (ctx, type, id) => { ) ); - ctx.set('data', { + return { title: `${name} - 相关新闻`, link, image: type === 'team' ? typeInfo.team_logo : typeInfo.person_logo, item: out, - }); + }; }; const ProcessFeedType2 = (item, response) => { diff --git a/lib/routes/dorohedoro/maintainer.ts b/lib/routes/dorohedoro/maintainer.ts deleted file mode 100644 index 87d46d7bb..000000000 --- a/lib/routes/dorohedoro/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['nczitzk'], -}; diff --git a/lib/routes/dorohedoro/namespace.ts b/lib/routes/dorohedoro/namespace.ts new file mode 100644 index 000000000..80047808b --- /dev/null +++ b/lib/routes/dorohedoro/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Dorohedoro', + url: 'dorohedoro.net', +}; diff --git a/lib/routes/dorohedoro/news.ts b/lib/routes/dorohedoro/news.ts index d6f460223..45c78316e 100644 --- a/lib/routes/dorohedoro/news.ts +++ b/lib/routes/dorohedoro/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/dorohedoro/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dorohedoro.net/news', 'dorohedoro.net/'], + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + url: 'dorohedoro.net/news', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; const rootUrl = 'https://dorohedoro.net'; @@ -64,9 +87,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'アニメ『ドロヘドロ』', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dorohedoro/radar.ts b/lib/routes/dorohedoro/radar.ts deleted file mode 100644 index 1607bde0c..000000000 --- a/lib/routes/dorohedoro/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'dorohedoro.net': { - _name: 'Dorohedoro', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/game#dorohedoro', - source: ['/news', '/'], - target: '/dorohedoro/news', - }, - ], - }, -}; diff --git a/lib/routes/dorohedoro/router.ts b/lib/routes/dorohedoro/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/dorohedoro/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/douban/book/rank.ts b/lib/routes/douban/book/rank.ts index b7c80a119..8283f2a9c 100644 --- a/lib/routes/douban/book/rank.ts +++ b/lib/routes/douban/book/rank.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/book/rank/:type?', + categories: ['social-media'], + example: '/douban/book/rank/fiction', + parameters: { type: '图书类型,默认合并列表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热门图书排行', + maintainers: ['xyqfer', 'queensferryme'], + handler, + description: `| 全部 | 虚构 | 非虚构 | + | ---- | ------- | ---------- | + | | fiction | nonfiction |`, +}; + +async function handler(ctx) { const { type = '' } = ctx.req.param(); const referer = `https://m.douban.com/book/${type}`; @@ -14,7 +36,7 @@ export default async (ctx) => { const items = type ? await _(type) : [...(await _('fiction')), ...(await _('nonfiction'))]; - ctx.set('data', { + return { title: `豆瓣热门图书-${type ? (type === 'fiction' ? '虚构类' : '非虚构类') : '全部'}`, link: referer, description: '每周一更新', @@ -30,5 +52,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/channel/subject.ts b/lib/routes/douban/channel/subject.ts index 94222a659..c25556a53 100644 --- a/lib/routes/douban/channel/subject.ts +++ b/lib/routes/douban/channel/subject.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id/subject/:nav', + categories: ['social-media'], + example: '/douban/channel/30168934/subject/0', + parameters: { id: '频道id', nav: '书影音分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道书影音', + maintainers: ['umm233'], + handler, + description: `| 电影 | 电视剧 | 图书 | 唱片 | + | ---- | ------ | ---- | ---- | + | 0 | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const nav = ctx.req.param('nav'); const link = `https://www.douban.com/subject/${id}`; @@ -40,7 +62,7 @@ export default async (ctx) => { break; } - ctx.set('data', { + return { title: `豆瓣${channel_name}频道-${nav_name}推荐`, link, description: `豆瓣${channel_name}频道书影音下的${nav_name}推荐`, @@ -56,5 +78,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/channel/topic.ts b/lib/routes/douban/channel/topic.ts index 6ba4d9ac4..26c8c9a24 100644 --- a/lib/routes/douban/channel/topic.ts +++ b/lib/routes/douban/channel/topic.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id/:nav?', + categories: ['social-media'], + example: '/douban/channel/30168934/hot', + parameters: { id: '频道id', nav: '专题分类,可选,默认为 default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道专题', + maintainers: ['umm233'], + handler, + description: `| 默认 | 热门 | 最新 | + | ------- | ---- | ---- | + | default | hot | new |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const nav = ctx.req.param('nav') || 'default'; const link = `https://www.douban.com/channel/${id}`; @@ -37,7 +59,7 @@ export default async (ctx) => { break; } - ctx.set('data', { + return { title: `豆瓣${channel_name}频道-${nav_name}动态`, link, description: `豆瓣${channel_name}频道专题下的${nav_name}动态`, @@ -59,5 +81,5 @@ export default async (ctx) => { }) .filter(Boolean), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/douban/commercialpress/latest.ts b/lib/routes/douban/commercialpress/latest.ts index 95a7b23a1..0f0975218 100644 --- a/lib/routes/douban/commercialpress/latest.ts +++ b/lib/routes/douban/commercialpress/latest.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/commercialpress/latest', + categories: ['social-media'], + example: '/douban/commercialpress/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '商务印书馆新书速递', + maintainers: ['xyqfer'], + handler, +}; + +async function handler() { const link = 'https://site.douban.com/commercialpress/room/827243/'; const { data: roomResponse } = await got({ method: 'get', @@ -47,9 +66,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `商务印书馆-${title}`, link, item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/douban/event/hot.ts b/lib/routes/douban/event/hot.ts index 4bdfd27cf..c66337ce6 100644 --- a/lib/routes/douban/event/hot.ts +++ b/lib/routes/douban/event/hot.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/event/hot/:locationId', + categories: ['social-media'], + example: '/douban/event/hot/118172', + parameters: { locationId: '位置 id, [同城首页](https://www.douban.com/location)打开控制台执行 `window.__loc_id__` 获取' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热门同城活动', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { const { locationId = 0 } = ctx.req.param(); const referer = 'https://m.douban.com/app_topic/event_hot'; @@ -12,7 +31,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `豆瓣同城-热门活动-${locationId}`, link: referer, item: response.data.subject_collection_items.map(({ title, url, cover, subtype, info, price_range }) => { @@ -26,5 +45,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/maintainer.ts b/lib/routes/douban/maintainer.ts deleted file mode 100644 index 9f413d922..000000000 --- a/lib/routes/douban/maintainer.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - '/book/latest': ['fengkx'], - '/book/rank/:type?': ['xyqfer', 'queensferryme'], - '/bookstore': ['xyqfer'], - '/celebrity/:id/:sort?': ['minimalistrojan'], - '/channel/:id/:nav?': ['umm233'], - '/channel/:id/subject/:nav': ['umm233'], - '/commercialpress/latest': ['xyqfer'], - '/doulist/:id': ['LogicJake', 'honue'], - '/event/hot/:locationId': ['xyqfer'], - '/explore': ['clarkzsd'], - '/explore_column/:id': ['LogicJake'], - '/group/:groupid/:type?': ['DIYgod'], - '/list/:type?/:routeParams?': ['5upernova-heng', 'honue'], - '/jobs/:type': ['Fatpandac'], - '/movie/classification/:sort?/:score?/:tags?': ['zzwab'], - '/movie/later': ['DIYgod'], - '/movie/playing': ['DIYgod'], - '/movie/playing/:score': ['DIYgod'], - '/movie/ustop': ['DIYgod'], - '/movie/weekly/:type?': ['numm233', 'nczitzk'], - '/music/latest/:area?': ['fengkx', 'xyqfer'], - '/people/:userid/status/:routeParams': ['alfredcai'], - '/people/:userid/wish/:routeParams?': ['exherb'], - '/recommended/:type?/:routeParams?': ['honue'], - '/replied/:uid': ['nczitzk'], - '/replies/:uid': ['nczitzk'], - '/topic/:id/:sort?': ['LogicJake'], - '/:id/discussion': ['nightmare-mio'], -}; diff --git a/lib/routes/douban/namespace.ts b/lib/routes/douban/namespace.ts new file mode 100644 index 000000000..0427a49ab --- /dev/null +++ b/lib/routes/douban/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '豆瓣', + url: 'www.douban.com', +}; diff --git a/lib/routes/douban/other/bookstore.ts b/lib/routes/douban/other/bookstore.ts index e0bec2604..848cf401f 100644 --- a/lib/routes/douban/other/bookstore.ts +++ b/lib/routes/douban/other/bookstore.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/bookstore', + categories: ['social-media'], + example: '/douban/bookstore', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '豆瓣书店', + maintainers: ['xyqfer'], + handler, +}; + +async function handler() { const link = 'https://market.douban.com/book/'; const response = await got({ method: 'get', @@ -12,7 +31,7 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: '豆瓣书店', link, description: '在豆瓣书店,遇见美好·書生活', @@ -26,5 +45,5 @@ export default async (ctx) => { 价格: ${price}元 `, })), - }); -}; + }; +} diff --git a/lib/routes/douban/other/celebrity.ts b/lib/routes/douban/other/celebrity.ts index bc14d98fc..333e66b25 100644 --- a/lib/routes/douban/other/celebrity.ts +++ b/lib/routes/douban/other/celebrity.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/celebrity/:id/:sort?', + categories: ['social-media'], + example: '/douban/celebrity/1274261', + parameters: { id: '电影人 id', sort: '排序方式,缺省为 `time`(时间排序),可为 `vote` (评价排序)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '豆瓣电影人', + maintainers: ['minimalistrojan'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const sort = ctx.req.param('sort') || 'time'; @@ -21,7 +40,7 @@ export default async (ctx) => { .replace(/的全部作品(\d+)/, ''); let itemPicUrl; - ctx.set('data', { + return { title: `豆瓣电影人 - ${person}`, link: `https://movie.douban.com/celebrity/${id}/movies?sortby=${sort}`, item: @@ -37,5 +56,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/douban/other/classification.ts b/lib/routes/douban/other/classification.ts index 31880a921..ea0851651 100644 --- a/lib/routes/douban/other/classification.ts +++ b/lib/routes/douban/other/classification.ts @@ -1,6 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/movie/classification/:sort?/:score?/:tags?', + categories: ['social-media'], + example: '/douban/movie/classification/R/7.5/Netflix,2020', + parameters: { sort: '排序方式,默认为U', score: '最低评分,默认不限制', tags: '分类标签,多个标签之间用英文逗号分隔,常见的标签到豆瓣电影的分类页面查看,支持自定义标签' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '豆瓣电影分类', + maintainers: ['zzwab'], + handler, + description: `排序方式可选值如下 + +| 近期热门 | 标记最多 | 评分最高 | 最近上映 | +| -------- | -------- | -------- | -------- | +| U | T | S | R |`, +}; + +async function handler(ctx) { const sort = ctx.req.param('sort') || 'U'; const score = Number.parseFloat(ctx.req.param('score')) || 0; const tags = ctx.req.param('tags') || ''; @@ -12,7 +36,7 @@ export default async (ctx) => { const movies = response.data.data; - ctx.set('data', { + return { title: `豆瓣电影分类${score ? `超过 ${score} 分的` : ''}影视`, link: `https://movie.douban.com/tag/#/?sort=U&range=0,10&tags=`, item: movies @@ -33,5 +57,5 @@ export default async (ctx) => { }) .filter(Boolean), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/douban/other/discussion.ts b/lib/routes/douban/other/discussion.ts index b36fddf46..c55079dd7 100644 --- a/lib/routes/douban/other/discussion.ts +++ b/lib/routes/douban/other/discussion.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; /* * @Author: nightmare-mio wanglongwei2009@qq.com @@ -9,7 +10,28 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id/discussion', + categories: ['social-media'], + example: '/douban/36328704/discussion', + parameters: { id: '书本id;默认论坛文章使用"按回应时间排序",仅第一页文章' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['book.douban.com/:id/discussion'], + }, + name: '豆瓣读书论坛', + maintainers: ['nightmare-mio'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = 'https://book.douban.com/subject'; const { data: response } = await got(`${link}/${id}/discussion/`); @@ -51,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: `${link}/${id}/discussion`, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/other/doulist.ts b/lib/routes/douban/other/doulist.ts index 3d3ac3b80..e85e8658e 100644 --- a/lib/routes/douban/other/doulist.ts +++ b/lib/routes/douban/other/doulist.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/doulist/:id', + categories: ['social-media'], + example: '/douban/doulist/37716774', + parameters: { id: '豆列id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['LogicJake', 'honue'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `https://www.douban.com/doulist/${id}`; @@ -56,10 +75,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title, link: url, description, item: out, - }); -}; + }; +} diff --git a/lib/routes/douban/other/explore-column.ts b/lib/routes/douban/other/explore-column.ts index c5c71bdf7..9debe9943 100644 --- a/lib/routes/douban/other/explore-column.ts +++ b/lib/routes/douban/other/explore-column.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import * as url from 'node:url'; const host = 'https://www.douban.com/explore/column/'; -export default async (ctx) => { +export const route: Route = { + path: '/explore/column/:id', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = url.resolve(host, id); const response = await got.get(link); @@ -48,9 +56,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${title}-豆瓣发现`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/douban/other/explore.ts b/lib/routes/douban/other/explore.ts index 7bf54fdd0..d1604bcff 100644 --- a/lib/routes/douban/other/explore.ts +++ b/lib/routes/douban/other/explore.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,25 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/explore', + categories: ['social-media'], + example: '/douban/explore', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '浏览发现', + maintainers: ['clarkzsd'], + handler, +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://www.douban.com/explore', @@ -17,7 +36,7 @@ export default async (ctx) => { const $ = load(data); const list = $('div.item'); - ctx.set('data', { + return { title: '豆瓣-浏览发现', link: 'https://www.douban.com/explore', item: @@ -49,5 +68,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/douban/other/group.ts b/lib/routes/douban/other/group.ts index 1da37f54e..bd212c89e 100644 --- a/lib/routes/douban/other/group.ts +++ b/lib/routes/douban/other/group.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/group/:groupid/:type?', + categories: ['social-media'], + example: '/douban/group/648102', + parameters: { groupid: '豆瓣小组的 id', type: '缺省 最新,essence 最热,elite 精华' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.douban.com/group/:groupid'], + target: '/group/:groupid', + }, + name: '豆瓣小组', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const groupid = ctx.req.param('groupid'); const type = ctx.req.param('type'); @@ -41,9 +64,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `豆瓣小组-${$('h1').text().trim()}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/other/jobs.ts b/lib/routes/douban/other/jobs.ts index 7937c3664..cbaa6b537 100644 --- a/lib/routes/douban/other/jobs.ts +++ b/lib/routes/douban/other/jobs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,28 @@ const titleMap = { intern: '实习生招聘', }; -export default async (ctx) => { +export const route: Route = { + path: '/jobs/:type', + categories: ['social-media'], + example: '/douban/jobs/campus', + parameters: { type: '招聘类型,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '豆瓣招聘', + maintainers: ['Fatpandac'], + handler, + description: `| 社会招聘 | 校园招聘 | 实习生招聘 | + | :------: | :------: | :--------: | + | social | campus | intern |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `${rootUrl}/jobs/${type}`; @@ -25,9 +47,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: `豆瓣${titleMap[type]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/other/later.ts b/lib/routes/douban/other/later.ts index af2abad59..ebab44f58 100644 --- a/lib/routes/douban/other/later.ts +++ b/lib/routes/douban/other/later.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/movie/later', + categories: ['social-media'], + example: '/douban/movie/later', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '即将上映的电影', + maintainers: ['DIYgod'], + handler, +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://movie.douban.com/cinema/later/beijing/', @@ -24,9 +43,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '即将上映的电影', link: 'https://movie.douban.com/cinema/later/', item, - }); -}; + }; +} diff --git a/lib/routes/douban/other/latest-book.ts b/lib/routes/douban/other/latest-book.ts index b656dae54..6a2167653 100644 --- a/lib/routes/douban/other/latest-book.ts +++ b/lib/routes/douban/other/latest-book.ts @@ -1,13 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const url = 'https://book.douban.com/latest'; -export default async (ctx) => { +export const route: Route = { + path: '/book/latest', + categories: ['social-media'], + example: '/douban/book/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['fengkx'], + handler, +}; + +async function handler() { const res = await got.get(url); const $ = load(res.data); const list = $('#content').find('li').get(); - ctx.set('data', { + return { title: '豆瓣新书速递', link: url, item: list.map((item, index) => ({ @@ -15,5 +34,5 @@ export default async (ctx) => { link: $(item).find('a').first().attr('href'), description: $(item).html(), })), - }); -}; + }; +} diff --git a/lib/routes/douban/other/latest-music.ts b/lib/routes/douban/other/latest-music.ts index ec9ec8d2d..ece4a0e22 100644 --- a/lib/routes/douban/other/latest-music.ts +++ b/lib/routes/douban/other/latest-music.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/music/latest/:area?', + categories: ['social-media'], + example: '/douban/music/latest/chinese', + parameters: { area: '区域类型,默认全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新增加的音乐', + maintainers: ['fengkx', 'xyqfer'], + handler, + description: `| 华语 | 欧美 | 日韩 | + | ------- | ------- | ----------- | + | chinese | western | japankorean |`, +}; + +async function handler(ctx) { const { area = '' } = ctx.req.param(); const title = '豆瓣最新增加的音乐'; let data; @@ -71,4 +93,4 @@ export default async (ctx) => { } ctx.set('data', data); -}; +} diff --git a/lib/routes/douban/other/list.ts b/lib/routes/douban/other/list.ts index 69d3b84b7..76f5ce92c 100644 --- a/lib/routes/douban/other/list.ts +++ b/lib/routes/douban/other/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,63 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { fallback, queryToInteger } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:type?/:routeParams?', + categories: ['social-media'], + example: '/douban/list/subject_real_time_hotest', + parameters: { type: '榜单类型,见下表。默认为实时热门书影音', routeParams: '额外参数;请参阅以下说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.douban.com/subject_collection/:type'], + target: '/list/:type', + }, + name: '豆瓣榜单与集合', + maintainers: ['5upernova-heng', 'honue'], + handler, + description: `| 榜单 / 集合 | 路由 | + | ------------------ | ----------------------------- | + | 实时热门书影音 | subject\_real\_time\_hotest | + | 影院热映 | movie\_showing | + | 实时热门电影 | movie\_real\_time\_hotest | + | 实时热门电视 | tv\_real\_time\_hotest | + | 一周口碑电影榜 | movie\_weekly\_best | + | 华语口碑剧集榜 | tv\_chinese\_best\_weekly | + | 全球口碑剧集榜 | tv\_global\_best\_weekly | + | 国内口碑综艺榜 | show\_chinese\_best\_weekly | + | 国外口碑综艺榜 | show\_global\_best\_weekly | + | 热播新剧国产剧 | tv\_domestic | + | 热播新剧欧美剧 | tv\_american | + | 热播新剧日剧 | tv\_japanese | + | 热播新剧韩剧 | tv\_korean | + | 热播新剧动画 | tv\_animation | + | 虚构类小说热门榜 | book\_fiction\_hot\_weekly | + | 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly | + | 热门单曲榜 | music\_single | + | 华语新碟榜 | music\_chinese | + | ... | ... | + + | 额外参数 | 含义 | 接受的值 | 默认值 | + | -------- | ---------------------- | -------- | ------ | + | playable | 仅看有可播放片源的影片 | 0/1 | 0 | + | score | 筛选评分 | 0-10 | 0 | + + 用例:\`/douban/list/tv_korean/playable=1&score=8\` + + > 上面的榜单 / 集合并没有列举完整。 + > + > 如何找到榜单对应的路由参数: + > 在豆瓣手机 APP 中,对应地榜单页面右上角,点击分享链接。链接路径 \`subject_collection\` 后的路径就是路由参数 \`type\`。 + > 如:小说热门榜的分享链接为:\`https://m.douban.com/subject_collection/ECDIHUN4A\`,其对应本 RSS 路由的 \`type\` 为 \`ECDIHUN4A\`,对应的订阅链接路由:[\`/douban/list/ECDIHUN4A\`](https://rsshub.app/douban/list/ECDIHUN4A)`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'subject_real_time_hotest'; const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const playable = fallback(undefined, queryToInteger(routeParams.playable), 0); @@ -57,10 +114,10 @@ export default async (ctx) => { start += count; } - ctx.set('data', { + return { title: `豆瓣 - ${title}`, link: `https://m.douban.com/subject_collection/${type}`, item: items, description, - }); -}; + }; +} diff --git a/lib/routes/douban/other/playing.ts b/lib/routes/douban/other/playing.ts index 2951b6b9d..d7d25a097 100644 --- a/lib/routes/douban/other/playing.ts +++ b/lib/routes/douban/other/playing.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: ['/movie/playing', '/movie/playing/:score'], + categories: ['social-media'], + example: '/douban/movie/playing', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '正在上映的电影', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const score = Number.parseFloat(ctx.req.param('score')) || 0; const response = await got({ method: 'get', @@ -9,7 +28,7 @@ export default async (ctx) => { }); const $ = load(response.data); - ctx.set('data', { + return { title: `正在上映的${score ? `超过 ${score} 分的` : ''}电影`, link: `https://movie.douban.com/cinema/nowplaying/`, item: $('.list-item') @@ -29,5 +48,5 @@ export default async (ctx) => { }) .filter(Boolean), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/douban/other/recommended.ts b/lib/routes/douban/other/recommended.ts index 755d3e280..b5773e229 100644 --- a/lib/routes/douban/other/recommended.ts +++ b/lib/routes/douban/other/recommended.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,35 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { fallback, queryToInteger } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/recommended/:type?/:routeParams?', + categories: ['social-media'], + example: '/douban/recommended/tv', + parameters: { type: '片单类型剧集/电影,tv或movie,默认为tv', routeParams: '额外参数;请参阅以下说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '豆瓣每月推荐片单', + maintainers: ['honue'], + handler, + description: `| 额外参数 | 含义 | 接受的值 | 默认值 | + | -------- | ---------------------- | -------- | ------ | + | playable | 仅看有可播放片源的影片 | 0/1 | 0 | + | score | 筛选评分 | 0-10 | 0 | + + 用例:\`/douban/recommended/tv/playable=0&score=8\` + + :::tip + 整合了 /douban/list/ 路由,省去每月手动更新 id 参数,因为当月推荐剧集片单中,会有还未播出 / 开评分剧集、海外平台播出剧集,请自行考虑是否使用额外参数。 + :::`, +}; + +async function handler(ctx) { const subjectType = ctx.req.param('type') || 'tv'; const apiKey = '0ac44ae016490db2204ce0a042db2916'; let url = `https://frodo.douban.com/api/v2/skynet/new_playlists?apikey=${apiKey}&subject_type=${subjectType}`; @@ -64,10 +93,10 @@ export default async (ctx) => { description, }; }); - ctx.set('data', { + return { title: `豆瓣 - ${response.data.subject_collection.name}`, link: `https://m.douban.com/subject_collection/${subjectCollectionId}`, item: items, description, - }); -}; + }; +} diff --git a/lib/routes/douban/other/replied.ts b/lib/routes/douban/other/replied.ts index 435a4f9cb..498408360 100644 --- a/lib/routes/douban/other/replied.ts +++ b/lib/routes/douban/other/replied.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/replied/:uid', + categories: ['social-media'], + example: '/douban/replied/xiaoyaxiaoya', + parameters: { uid: '用户id,可在用户日记页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新回应过的日记', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const currentUrl = `https://www.douban.com/people/${ctx.req.param('uid')}/notes`; const response = await got({ method: 'get', @@ -79,9 +98,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text() + ' - 最新回应过', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/other/replies.ts b/lib/routes/douban/other/replies.ts index c3ba61df5..4fdd0590c 100644 --- a/lib/routes/douban/other/replies.ts +++ b/lib/routes/douban/other/replies.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/replies/:uid', + categories: ['social-media'], + example: '/douban/replies/xiaoyaxiaoya', + parameters: { uid: '用户id,可在用户日记页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '日记最新回应', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const currentUrl = `https://www.douban.com/people/${ctx.req.param('uid')}/notes`; const response = await got({ method: 'get', @@ -54,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text() + ' - 最新回应', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index f244c7188..0cf538aff 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id/:sort?', + categories: ['social-media'], + example: '/douban/topic/48823', + parameters: { id: '话题id', sort: '排序方式,hot或new,默认为new' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '话题', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const sort = ctx.req.param('sort') || 'new'; @@ -72,10 +91,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${title}-豆瓣话题`, description, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/douban/other/ustop.ts b/lib/routes/douban/other/ustop.ts index 14249af0b..8d9c54847 100644 --- a/lib/routes/douban/other/ustop.ts +++ b/lib/routes/douban/other/ustop.ts @@ -1,13 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/movie/ustop', + categories: ['social-media'], + example: '/douban/movie/ustop', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '北美票房榜', + maintainers: ['DIYgod'], + handler, +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://api.douban.com/v2/movie/us_box?apikey=0df993c66c0c636e29ecbb5344252a4a', }); const movieList = response.data.subjects; - ctx.set('data', { + return { title: '豆瓣电影北美票房榜', link: 'https://movie.douban.com/chart', item: movieList.map((item) => { @@ -18,5 +37,5 @@ export default async (ctx) => { link: item.alt, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/other/weekly-best.ts b/lib/routes/douban/other/weekly-best.ts index eec9cdc5e..05ef0bae1 100644 --- a/lib/routes/douban/other/weekly-best.ts +++ b/lib/routes/douban/other/weekly-best.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,28 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/movie/weekly/:type?', + categories: ['social-media'], + example: '/douban/movie/weekly', + parameters: { type: '分类,可在榜单页 URL 中找到,默认为一周口碑电影榜' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '一周口碑榜', + maintainers: ['numm233', 'nczitzk'], + handler, + description: `| 一周口碑电影榜 | 华语口碑剧集榜 | + | ------------------- | ------------------------- | + | movie\_weekly\_best | tv\_chinese\_best\_weekly |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'movie_weekly_best'; const link = 'https://m.douban.com/movie'; @@ -28,7 +50,7 @@ export default async (ctx) => { const data = itemResponse.data.subject_collection_items; - ctx.set('data', { + return { title: infoResponse.data.title, link: `https://m.douban.com/subject_collection/${type}`, description: infoResponse.data.description, @@ -52,5 +74,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index 851d58086..c1fd4dbbf 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -443,7 +444,14 @@ async function getFullTextItems(items) { ); } -export default async (ctx) => { +export const route: Route = { + path: '/people/:userid/status/:routeParams?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const userid = ctx.req.param('userid'); const url = `https://m.douban.com/rexxar/api/v2/status/user_timeline/${userid}`; const items = await cache.tryGet( @@ -460,7 +468,7 @@ export default async (ctx) => { await getFullTextItems(items); } - ctx.set('data', { + return { title: `豆瓣广播 - ${items ? items[0].status.author.name : userid}`, link: `https://m.douban.com/people/${userid}/statuses`, item: @@ -476,5 +484,5 @@ export default async (ctx) => { description: r.description, }; }), - }); -}; + }; +} diff --git a/lib/routes/douban/people/wish.ts b/lib/routes/douban/people/wish.ts index ac1d194ce..6105dfc8e 100644 --- a/lib/routes/douban/people/wish.ts +++ b/lib/routes/douban/people/wish.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import { load } from 'cheerio'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/people/:userid/wish/:routeParams?', + categories: ['social-media'], + example: '/douban/people/exherb/wish', + parameters: { userid: '用户id', routeParams: '额外参数;见下' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户想看', + maintainers: ['exherb'], + handler, + description: `对于豆瓣用户想看的内容,在 \`routeParams\` 参数中以 query string 格式设置如下选项可以控制输出的样式 + + | 键 | 含义 | 接受的值 | 默认值 | + | ---------- | ---------- | -------- | ------ | + | pagesCount | 查询页面数 | | 1 |`, +}; + +async function handler(ctx) { const userid = ctx.req.param('userid'); const routeParams = querystring.parse(ctx.req.param('routeParams')); @@ -64,9 +88,9 @@ export default async (ctx) => { } const items = (await Promise.all(tasks)).flat(); - ctx.set('data', { + return { title: `豆瓣想看 - ${userName || userid}`, link: `https://movie.douban.com/people/${userid}/wish`, item: items, - }); -}; + }; +} diff --git a/lib/routes/douban/radar.ts b/lib/routes/douban/radar.ts deleted file mode 100644 index d9c992aef..000000000 --- a/lib/routes/douban/radar.ts +++ /dev/null @@ -1,68 +0,0 @@ -export default { - 'douban.com': { - _name: '豆瓣', - www: [ - { - title: '用户的广播', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/people/:user/', - target: (params, url, document) => { - const uid = document && document.querySelector('html').innerHTML.match(/"id":"(\d+)"/)[1]; - return uid ? `/douban/people/${uid}/status` : ''; - }, - }, - { - title: '小组-最新', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/group/:groupid', - target: '/douban/group/:groupid', - }, - { - title: '小组-最热', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/group/:groupid', - target: '/douban/group/:groupid/essence', - }, - { - title: '小组-精华', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/group/:groupid', - target: '/douban/group/:groupid/elite', - }, - { - title: '榜单与集合', - docs: 'https://docs.rsshub.app/routes/social-media#douban', - source: ['/subject_collection/:type'], - target: '/douban/list/:type', - }, - ], - jobs: [ - { - title: '社会招聘', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/jobs/social', - target: '/jobs/social', - }, - { - title: '校园招聘', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/jobs/campus', - target: '/jobs/campus', - }, - { - title: '实习生招聘', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/jobs/intern', - target: '/jobs/intern', - }, - ], - book: [ - { - title: '读书论坛', - docs: 'https://docs.rsshub.app/routes/social-media#dou-ban', - source: '/:id/discussion', - target: '/:id/discussion', - }, - ], - }, -}; diff --git a/lib/routes/douban/router.ts b/lib/routes/douban/router.ts deleted file mode 100644 index 4c43dab32..000000000 --- a/lib/routes/douban/router.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default (router) => { - router.get('/book/latest', './other/latest-book'); - router.get('/book/rank/:type?', './book/rank'); - router.get('/bookstore', './other/bookstore'); - router.get('/celebrity/:id/:sort?', './other/celebrity.js'); - router.get('/channel/:id/subject/:nav', './channel/subject.js'); - router.get('/channel/:id/:nav?', './channel/topic.js'); - router.get('/commercialpress/latest', './commercialpress/latest'); - router.get('/doulist/:id', './other/doulist'); - router.get('/event/hot/:locationId', './event/hot'); - router.get('/explore', './other/explore'); - router.get('/explore/column/:id', './other/explore-column'); - router.get('/group/:groupid/:type?', './other/group'); - router.get('/jobs/:type', './other/jobs.js'); - router.get('/list/:type?/:routeParams?', './other/list'); - router.get('/movie/classification/:sort?/:score?/:tags?', './other/classification.js'); - router.get('/movie/later', './other/later'); - router.get('/movie/playing', './other/playing'); - router.get('/movie/playing/:score', './other/playing'); - router.get('/movie/ustop', './other/ustop'); - router.get('/movie/weekly/:type?', './other/weekly-best'); - router.get('/music/latest/:area?', './other/latest-music'); - router.get('/people/:userid/status/:routeParams?', './people/status.js'); - router.get('/people/:userid/wish/:routeParams?', './people/wish.js'); - router.get('/recommended/:type?/:routeParams?', './other/recommended'); - router.get('/replied/:uid', './other/replied'); - router.get('/replies/:uid', './other/replies'); - router.get('/topic/:id/:sort?', './other/topic.js'); - router.get('/:id/discussion', './other/discussion.js'); -}; diff --git a/lib/routes/douyin/hashtag.ts b/lib/routes/douyin/hashtag.ts index 83d88f649..25a74bec9 100644 --- a/lib/routes/douyin/hashtag.ts +++ b/lib/routes/douyin/hashtag.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; @@ -6,7 +7,29 @@ import { fallback, queryToBoolean } from '@/utils/readable-social'; import { templates, resolveUrl, proxyVideo, getOriginAvatar } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/hashtag/:cid/:routeParams?', + categories: ['social-media'], + example: '/douyin/hashtag/1592824105719812', + parameters: { cid: '标签 ID,可在标签页面 URL 中找到', routeParams: '额外参数,query string 格式,请参阅上面的表格' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['douyin.com/hashtag/:cid'], + target: '/hashtag/:cid', + }, + name: '标签', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const cid = ctx.req.param('cid'); if (isNaN(cid)) { throw new TypeError('Invalid tag ID. Tag ID should be a number.'); @@ -86,11 +109,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: tagName, description: `${tagInfo.viewCount} 次播放`, image: userAvatar, link: tagUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/douyin/live.ts b/lib/routes/douyin/live.ts index a805a20a9..901675e16 100644 --- a/lib/routes/douyin/live.ts +++ b/lib/routes/douyin/live.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { config } from '@/config'; import { getOriginAvatar } from './utils'; import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/live/:rid', + categories: ['live'], + example: '/douyin/live/685317364746', + parameters: { rid: '直播间 id, 可在主播直播间页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['live.douyin.com/:rid'], + }, + name: '直播间开播', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const rid = ctx.req.param('rid'); if (isNaN(rid)) { throw new TypeError('Invalid room ID. Room ID should be a number.'); @@ -70,12 +92,12 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: `${nickname}的抖音直播间 - 抖音直播`, description: `欢迎来到${nickname}的抖音直播间,${nickname}与大家一起记录美好生活 - 抖音直播`, image: getOriginAvatar(userAvatar), link: pageUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/douyin/maintainer.ts b/lib/routes/douyin/maintainer.ts deleted file mode 100644 index bf219c30a..000000000 --- a/lib/routes/douyin/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/hashtag/:cid/:routeParams?': ['TonyRL'], - '/live/:rid': ['TonyRL'], - '/user/:uid/:routeParams?': ['Max-Tortoise', 'Rongronggg9'], -}; diff --git a/lib/routes/douyin/namespace.ts b/lib/routes/douyin/namespace.ts new file mode 100644 index 000000000..003d34243 --- /dev/null +++ b/lib/routes/douyin/namespace.ts @@ -0,0 +1,20 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '抖音直播', + url: 'douyin.com', + description: `:::warning +反爬严格,需要启用 puppeteer。\ +抖音的视频 CDN 会验证 Referer,意味着许多阅读器都无法直接播放内嵌视频,以下是一些变通解决方案: + +1. 启用内嵌视频 (\`embed=1\`), 参考 [通用参数 -> 多媒体处理](/parameter#多媒体处理) 配置 \`multimedia_hotlink_template\` **或** \`wrap_multimedia_in_iframe\`。 +2. 关闭内嵌视频 (\`embed=0\`),手动点击 \`视频直链\` 超链接,一般情况下均可成功播放视频。若仍然出现 HTTP 403,请复制 URL 以后到浏览器打开。 +3. 点击原文链接打开抖音网页版的视频详情页播放视频。 +::: + +额外参数 + +| 键 | 含义 | 值 | 默认值 | +| ------- | ---------------- | ---------------------- | ------- | +| \`embed\` | 是否启用内嵌视频 | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` |`, +}; diff --git a/lib/routes/douyin/radar.ts b/lib/routes/douyin/radar.ts deleted file mode 100644 index c8831db2e..000000000 --- a/lib/routes/douyin/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'douyin.com': { - _name: '抖音', - '.': [ - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/social-media#dou-yin', - source: '/hashtag/:cid', - target: '/douyin/hashtag/:cid', - }, - { - title: '博主', - docs: 'https://docs.rsshub.app/routes/social-media#dou-yin', - source: '/user/:uid', - target: '/douyin/user/:uid', - }, - ], - live: [ - { - title: '直播间开播', - docs: 'https://docs.rsshub.app/routes/live#dou-yin-zhi-bo', - source: '/:rid', - target: '/douyin/live/:rid', - }, - ], - }, -}; diff --git a/lib/routes/douyin/router.ts b/lib/routes/douyin/router.ts deleted file mode 100644 index 29c9fb7d1..000000000 --- a/lib/routes/douyin/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/hashtag/:cid/:routeParams?', './hashtag'); - router.get('/live/:rid', './live'); - router.get('/user/:uid/:routeParams?', './user'); -}; diff --git a/lib/routes/douyin/user.ts b/lib/routes/douyin/user.ts index 8ac60f9cd..568b361d6 100644 --- a/lib/routes/douyin/user.ts +++ b/lib/routes/douyin/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; @@ -5,7 +6,29 @@ import { config } from '@/config'; import { fallback, queryToBoolean } from '@/utils/readable-social'; import { templates, resolveUrl, proxyVideo, getOriginAvatar, universalGet } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid/:routeParams?', + categories: ['social-media'], + example: '/douyin/user/MS4wLjABAAAARcAHmmF9mAG3JEixq_CdP72APhBlGlLVbN-1eBcPqao', + parameters: { uid: 'uid,可在用户页面 URL 中找到', routeParams: '额外参数,query string 格式,请参阅上面的表格' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['douyin.com/user/:uid'], + target: '/user/:uid', + }, + name: '博主', + maintainers: ['Max-Tortoise', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); if (!uid.startsWith('MS4wLjABAAAA')) { throw new Error('Invalid UID. UID should start with MS4wLjABAAAA.'); @@ -68,11 +91,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: userNickName, description: userDescription, image: userAvatar, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/douyu/group.ts b/lib/routes/douyu/group.ts index 59b74acd2..7ea406c70 100644 --- a/lib/routes/douyu/group.ts +++ b/lib/routes/douyu/group.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,32 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/group/:id/:sort?', + categories: ['bbs'], + example: '/douyu/group/1011', + parameters: { id: '鱼吧 id,可在鱼吧页 URL 中找到', sort: '排序方式,见下表,默认为发布时间排序' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yuba.douyu.com/group/:id', 'yuba.douyu.com/group/newself/:id', 'yuba.douyu.com/group/newall/:id', 'yuba.douyu.com/'], + target: '/group/:id', + }, + name: '鱼吧帖子', + maintainers: ['nczitzk'], + handler, + description: `| 回复时间排序 | 发布时间排序 | + | ------------ | ------------ | + | 1 | 2 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const sort = ctx.req.param('sort') ?? '2'; @@ -39,10 +65,10 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `斗鱼鱼吧 - ${detailResponse.data.data.group_name}`, link: currentUrl, item: items, description: detailResponse.data.data.describe, - }); -}; + }; +} diff --git a/lib/routes/douyu/maintainer.ts b/lib/routes/douyu/maintainer.ts deleted file mode 100644 index dae982425..000000000 --- a/lib/routes/douyu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/group/:id/:sort?': ['nczitzk'], - '/post/:id': ['nczitzk'], - '/room/:id': ['DIYgod'], -}; diff --git a/lib/routes/douyu/namespace.ts b/lib/routes/douyu/namespace.ts new file mode 100644 index 000000000..21e2a65f6 --- /dev/null +++ b/lib/routes/douyu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '斗鱼直播', + url: 'www.douyu.com', +}; diff --git a/lib/routes/douyu/post.ts b/lib/routes/douyu/post.ts index 4fcddbcd7..dd412a18d 100644 --- a/lib/routes/douyu/post.ts +++ b/lib/routes/douyu/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/post/:id', + categories: ['bbs'], + example: '/douyu/post/631737151576473201', + parameters: { id: '帖子 id,可在帖子页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yuba.douyu.com/p/:id', 'yuba.douyu.com/'], + }, + name: '鱼吧跟帖', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://yuba.douyu.com'; @@ -52,10 +74,10 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `斗鱼鱼吧 - ${data.title}`, link: currentUrl, item: items, description: data.content, - }); -}; + }; +} diff --git a/lib/routes/douyu/radar.ts b/lib/routes/douyu/radar.ts deleted file mode 100644 index 5a4732e29..000000000 --- a/lib/routes/douyu/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'douyu.com': { - _name: '斗鱼', - www: [ - { - title: '直播间开播', - docs: 'https://docs.rsshub.app/routes/live#dou-yu-zhi-bo-zhi-bo-jian-kai-bo', - source: ['/:id', '/'], - target: '/douyu/room/:id', - }, - ], - yuba: [ - { - title: '鱼吧帖子', - docs: 'https://docs.rsshub.app/routes/bbs#dou-yu-yu-ba-tie-zi', - source: ['/group/:id', '/group/newself/:id', '/group/newall/:id', '/'], - target: '/douyu/group/:id', - }, - { - title: '鱼吧跟帖', - docs: 'https://docs.rsshub.app/routes/bbs#dou-yu-yu-ba-gen-tie', - source: ['/p/:id', '/'], - target: '/douyu/post/:id', - }, - ], - }, -}; diff --git a/lib/routes/douyu/room.ts b/lib/routes/douyu/room.ts index 0ddcb5e48..b8fd13164 100644 --- a/lib/routes/douyu/room.ts +++ b/lib/routes/douyu/room.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/room/:id', + categories: ['live'], + example: '/douyu/room/24422', + parameters: { id: '直播间 id, 可在主播直播间页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.douyu.com/:id', 'www.douyu.com/'], + }, + name: '直播间开播', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -25,10 +47,10 @@ export default async (ctx) => { ]; } - ctx.set('data', { + return { title: `${data.owner_name}的斗鱼直播间`, link: `https://www.douyu.com/${id}`, item, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/douyu/router.ts b/lib/routes/douyu/router.ts deleted file mode 100644 index d5ccb390f..000000000 --- a/lib/routes/douyu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/group/:id/:sort?', './group'); - router.get('/post/:id', './post'); - router.get('/room/:id', './room'); -}; diff --git a/lib/routes/dribbble/keyword.ts b/lib/routes/dribbble/keyword.ts index cf6041e0f..972d5f8a5 100644 --- a/lib/routes/dribbble/keyword.ts +++ b/lib/routes/dribbble/keyword.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/keyword/:keyword', + categories: ['design'], + example: '/dribbble/keyword/player', + parameters: { keyword: 'desired keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keyword', + maintainers: ['DIYgod', 'loganrockmore'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const url = `https://dribbble.com/search/shots/recent?q=${keyword}`; const title = `Dribbble - keyword ${keyword}`; ctx.set('data', await utils.getData(ctx, url, title)); -}; +} diff --git a/lib/routes/dribbble/maintainer.ts b/lib/routes/dribbble/maintainer.ts deleted file mode 100644 index 353984ab5..000000000 --- a/lib/routes/dribbble/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/keyword/:keyword': ['DIYgod', 'loganrockmore'], - '/popular/:timeframe?': ['DIYgod', 'loganrockmore'], - '/user/:name': ['DIYgod', 'loganrockmore'], -}; diff --git a/lib/routes/dribbble/namespace.ts b/lib/routes/dribbble/namespace.ts new file mode 100644 index 000000000..42397e064 --- /dev/null +++ b/lib/routes/dribbble/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Dribbble', + url: 'dribbble.com', +}; diff --git a/lib/routes/dribbble/popular.ts b/lib/routes/dribbble/popular.ts index 2f3d193f1..eb91c6dd6 100644 --- a/lib/routes/dribbble/popular.ts +++ b/lib/routes/dribbble/popular.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/popular/:timeframe?', + categories: ['design'], + example: '/dribbble/popular', + parameters: { timeframe: 'support the following values: week, month, year and ever' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dribbble.com/'], + target: '/popular', + }, + name: 'Popular', + maintainers: ['DIYgod', 'loganrockmore'], + handler, + url: 'dribbble.com/', +}; + +async function handler(ctx) { const timeframe = ctx.req.param('timeframe'); const url = `https://dribbble.com/shots/popular${timeframe ? `?timeframe=${timeframe}` : ''}`; const title = 'Dribbble - Popular Shots'; ctx.set('data', await utils.getData(ctx, url, title)); -}; +} diff --git a/lib/routes/dribbble/radar.ts b/lib/routes/dribbble/radar.ts deleted file mode 100644 index dea54f9df..000000000 --- a/lib/routes/dribbble/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'dribbble.com': { - _name: 'Dribbble', - '.': [ - { - title: 'Keyword', - docs: 'https://docs.rsshub.app/routes/design#dribbble', - source: ['/search/shots/recent'], - target: (_, url) => `/dribbble/keyword/${new URL(url).searchParams.get('q')}`, - }, - { - title: 'Popular', - docs: 'https://docs.rsshub.app/routes/design#dribbble', - source: ['/'], - target: '/dribbble/popular', - }, - { - title: 'User (or team)', - docs: 'https://docs.rsshub.app/routes/design#dribbble', - source: ['/:name'], - target: '/dribbble/user/:name', - }, - ], - }, -}; diff --git a/lib/routes/dribbble/router.ts b/lib/routes/dribbble/router.ts deleted file mode 100644 index 0d185d085..000000000 --- a/lib/routes/dribbble/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/keyword/:keyword', './keyword'); - router.get('/popular/:timeframe?', './popular'); - router.get('/user/:name', './user'); -}; diff --git a/lib/routes/dribbble/user.ts b/lib/routes/dribbble/user.ts index 9af04e9dd..bfcc57028 100644 --- a/lib/routes/dribbble/user.ts +++ b/lib/routes/dribbble/user.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:name', + categories: ['design'], + example: '/dribbble/user/google', + parameters: { name: "username, available in user's homepage URL" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dribbble.com/:name'], + }, + name: 'User (or team)', + maintainers: ['DIYgod', 'loganrockmore'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const url = `https://dribbble.com/${name}`; const title = `Dribbble - user ${name}`; ctx.set('data', await utils.getData(ctx, url, title)); -}; +} diff --git a/lib/routes/dtcj/datahero.ts b/lib/routes/dtcj/datahero.ts index 497989e3e..7c3f79fa5 100644 --- a/lib/routes/dtcj/datahero.ts +++ b/lib/routes/dtcj/datahero.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,28 @@ const titles = { 10: '阿里云天池', }; -export default async (ctx) => { +export const route: Route = { + path: '/datahero/:category?', + categories: ['finance'], + example: '/dtcj/datahero', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '数据侠专栏', + maintainers: ['nczitzk'], + handler, + description: `| 侠创 | 纽约数据科学学院 | RS 实验所 | 阿里云天池 | + | ---- | ---------------- | --------- | ---------- | + | 5 | 6 | 9 | 10 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://dtcj.com'; @@ -43,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${category ? titles[category] : '全部'} - 数据侠专栏 | DT 财经`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dtcj/datainsight.ts b/lib/routes/dtcj/datainsight.ts index 9737fcbbd..66b80e968 100644 --- a/lib/routes/dtcj/datainsight.ts +++ b/lib/routes/dtcj/datainsight.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/datainsight/:id?', + categories: ['finance'], + example: '/dtcj/datainsight', + parameters: { id: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dtcj.com/insighttopic/:id'], + target: '/datainsight/:id', + }, + name: '数据洞察', + maintainers: ['nczitzk'], + handler, + url: 'dtcj.com/dtcj/datainsight', + description: `| 城数 | NEXT 情报局 | 专业精选 | + | ---- | ----------- | -------- | + | 3 | 1 | 4 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'https://dtcj.com'; @@ -45,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dtcj/maintainer.ts b/lib/routes/dtcj/maintainer.ts deleted file mode 100644 index 87cd1e918..000000000 --- a/lib/routes/dtcj/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/datahero/:category?': ['nczitzk'], - '/datainsight/:id?': ['nczitzk'], -}; diff --git a/lib/routes/dtcj/namespace.ts b/lib/routes/dtcj/namespace.ts new file mode 100644 index 000000000..a5a4f1467 --- /dev/null +++ b/lib/routes/dtcj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DT 财经', + url: 'dtcj.com', +}; diff --git a/lib/routes/dtcj/radar.ts b/lib/routes/dtcj/radar.ts deleted file mode 100644 index c1ccb1855..000000000 --- a/lib/routes/dtcj/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'dtcj.com': { - _name: 'DT 财经', - '.': [ - { - title: '数据侠专栏', - docs: 'https://docs.rsshub.app/routes/finance#dt-cai-jing', - source: ['/datahero/topic'], - target: (_params, url) => `/dtcj/datahero/${new URL(url).searchParams.get('topic_id')}`, - }, - { - title: '数据洞察', - docs: 'https://docs.rsshub.app/routes/finance#dt-cai-jing', - source: ['/dtcj/datainsight'], - target: '/dtcj/datainsight', - }, - { - title: '数据洞察', - docs: 'https://docs.rsshub.app/routes/finance#dt-cai-jing', - source: ['/insighttopic/:id'], - target: '/dtcj/datainsight/:id', - }, - ], - }, -}; diff --git a/lib/routes/dtcj/router.ts b/lib/routes/dtcj/router.ts deleted file mode 100644 index 2807c69d5..000000000 --- a/lib/routes/dtcj/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/datahero/:category?', './datahero'); - router.get('/datainsight/:id?', './datainsight'); -}; diff --git a/lib/routes/duozhuayu/maintainer.ts b/lib/routes/duozhuayu/maintainer.ts deleted file mode 100644 index 0f67c5813..000000000 --- a/lib/routes/duozhuayu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/search/:wd': ['fengkx'], -}; diff --git a/lib/routes/duozhuayu/namespace.ts b/lib/routes/duozhuayu/namespace.ts new file mode 100644 index 000000000..64d85c12a --- /dev/null +++ b/lib/routes/duozhuayu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '多抓鱼', + url: 'duozhuayu.com', +}; diff --git a/lib/routes/duozhuayu/radar.ts b/lib/routes/duozhuayu/radar.ts deleted file mode 100644 index 70930cdbc..000000000 --- a/lib/routes/duozhuayu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'duozhuayu.com': { - _name: '多抓鱼', - '.': [ - { - title: '搜索结果', - docs: 'https://docs.rsshub.app/routes/shopping#duo-zhua-yu', - source: ['/search/book/:wd'], - target: '/duozhuayu/search/:wd', - }, - ], - }, -}; diff --git a/lib/routes/duozhuayu/router.ts b/lib/routes/duozhuayu/router.ts deleted file mode 100644 index ae50c87fc..000000000 --- a/lib/routes/duozhuayu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/search/:wd', './search'); -}; diff --git a/lib/routes/duozhuayu/search.ts b/lib/routes/duozhuayu/search.ts index 47c5b1300..207ad6ee7 100644 --- a/lib/routes/duozhuayu/search.ts +++ b/lib/routes/duozhuayu/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:wd', + categories: ['shopping'], + example: '/duozhuayu/search/JavaScript', + parameters: { wd: '搜索关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['duozhuayu.com/search/book/:wd'], + }, + name: '搜索结果', + maintainers: ['fengkx'], + handler, +}; + +async function handler(ctx) { const wd = ctx.req.param('wd'); const baseUrl = 'https://www.duozhuayu.com'; const type = 'book'; @@ -61,10 +83,10 @@ export default async (ctx) => { description: art(path.join(__dirname, 'templates/book.art'), { item }), })); - ctx.set('data', { + return { title: `多抓鱼搜索-${wd}`, link, description: `多抓鱼搜索-${wd}`, item, - }); -}; + }; +} diff --git a/lib/routes/dushu/fuzhou/index.ts b/lib/routes/dushu/fuzhou/index.ts index 1b7ba69fd..d6ec8ef0f 100644 --- a/lib/routes/dushu/fuzhou/index.ts +++ b/lib/routes/dushu/fuzhou/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,7 +17,29 @@ const transformTime = (item) => { item.endTime = `${endTime.getFullYear()}-${endTime.getMonth() + 1}-${endTime.getDate()} ${endTime.getHours()}:${endTime.getMinutes()}`; }; -export default async (ctx) => { +export const route: Route = { + path: '/fuzhou', + categories: ['new-media'], + example: '/dushu/fuzhou', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.dushu365.com*'], + }, + name: '樊登福州运营中心', + maintainers: ['Fatpandac'], + handler, + url: 'www.dushu365.com*', +}; + +async function handler() { const response = await got .post(host, { json: { @@ -31,7 +54,7 @@ export default async (ctx) => { const data = response.data.activityListVOS; data.map((element) => transformTime(element)); - ctx.set('data', { + return { title: '樊登福州运营中心', link, item: data.map((item) => ({ @@ -41,5 +64,5 @@ export default async (ctx) => { item, }), })), - }); -}; + }; +} diff --git a/lib/routes/dushu/maintainer.ts b/lib/routes/dushu/maintainer.ts deleted file mode 100644 index be87081d4..000000000 --- a/lib/routes/dushu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/fuzhou': ['Fatpandac'], -}; diff --git a/lib/routes/dushu/namespace.ts b/lib/routes/dushu/namespace.ts new file mode 100644 index 000000000..a0b00276d --- /dev/null +++ b/lib/routes/dushu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '樊登读书', + url: 'card.dushu.io', +}; diff --git a/lib/routes/dushu/radar.ts b/lib/routes/dushu/radar.ts deleted file mode 100644 index ff2870ad6..000000000 --- a/lib/routes/dushu/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'dushu.io': { - _name: '樊登读书会', - card: [ - { - title: '福州运营中心', - docs: 'https://docs.rsshub.app/routes/new-media#fan-deng-du-shu-fan-deng-fu-zhou-yun-ying-zhong-xin', - source: ['*'], - target: '/dushu/fuzhou', - }, - ], - }, - 'dushu365.com': { - _name: '樊登读书会', - www: [ - { - title: '福州运营中心', - docs: 'https://docs.rsshub.app/routes/new-media#fan-deng-du-shu-fan-deng-fu-zhou-yun-ying-zhong-xin', - source: ['*'], - target: '/dushu/fuzhou', - }, - ], - }, -}; diff --git a/lib/routes/dushu/router.ts b/lib/routes/dushu/router.ts deleted file mode 100644 index 51c7ef570..000000000 --- a/lib/routes/dushu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/fuzhou', './fuzhou/index'); -}; diff --git a/lib/routes/dut/index.ts b/lib/routes/dut/index.ts index c92ae0649..a671c8290 100644 --- a/lib/routes/dut/index.ts +++ b/lib/routes/dut/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,14 @@ import defaults from './defaults'; import shortcuts from './shortcuts'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: ['/*/*', '/:0?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const site = ctx.params[0] ?? 'news'; if (!isValidHost(site)) { throw new Error('Invalid site'); @@ -86,10 +94,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/dut/maintainer.ts b/lib/routes/dut/maintainer.ts deleted file mode 100644 index 515d4ce64..000000000 --- a/lib/routes/dut/maintainer.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - '/dutdice/:category?': ['beautyyuyanli', 'nczitzk'], - '/eda/:category?': ['nczitzk'], - '/fldpj/:category?': ['ueiu'], - '/gs/:category?': ['nczitzk'], - '/news/:category?': ['nczitzk'], - '/panjin/:category?': ['nczitzk'], - '/perdep/:category?': ['nczitzk'], - '/pjteach/:category?': ['nczitzk'], - '/pjxqzwb/:category?': ['nczitzk'], - '/ssdut/:category?': ['nczitzk'], - '/teach/:category?': ['beautyyuyanli', 'nczitzk'], - '/tycgzx/:category?': ['beatyyuyanli', 'nczitzk'], - '/xsgzb/:category?': ['nczitzk'], -}; diff --git a/lib/routes/dut/namespace.ts b/lib/routes/dut/namespace.ts new file mode 100644 index 000000000..a607caab1 --- /dev/null +++ b/lib/routes/dut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大连理工大学', + url: 'dutdice.dlut.edu.cn', +}; diff --git a/lib/routes/dut/radar.ts b/lib/routes/dut/radar.ts deleted file mode 100644 index fe1c94cc5..000000000 --- a/lib/routes/dut/radar.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default { - 'dlut.edu.cn': { - _name: '大连理工大学', - dutdice: [ - { - title: '国际合作与交流处(港澳台办)', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-guo-ji-he-zuo-yu-jiao-liu-chu-gang-ao-tai-ban', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - eda: [ - { - title: '开发区校区', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-kai-fa-qu-xiao-qu', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - fldpj: [ - { - title: '公共基础学院', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-gong-gong-ji-chu-xue-yuan', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - gs: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-yan-jiu-sheng-yuan', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - news: [ - { - title: '新闻网', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-xin-wen-wang', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - panjin: [ - { - title: '盘锦校区', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-pan-jin-xiao-qu', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - perdep: [ - { - title: '人事处', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-ren-shi-chu', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - pjteach: [ - { - title: '盘锦校区教务教学事务办公室', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-pan-jin-xiao-qu-jiao-wu-jiao-xue-shi-wu-ban-gong-shi', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - pjxqzwb: [ - { - title: '盘锦校区总务部', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-pan-jin-xiao-qu-zong-wu-bu', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - ssdut: [ - { - title: '软件学院', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-ruan-jian-xue-yuan', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - teach: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-jiao-wu-chu', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - tjpj: [ - { - title: '体育与健康学院盘锦分院', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-ti-yu-jian-kang-xue-yuan-pan-jin-fen-yuan', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - tycgzx: [ - { - title: '体育场馆中心', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-ti-yu-chang-guan-zhong-xin', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - xsgzb: [ - { - title: '盘锦校区学生事务办公室', - docs: 'https://docs.rsshub.app/routes/university#da-lian-li-gong-da-xue-pan-jin-xiao-qu-xue-sheng-shi-wu-ban-gong-shi', - source: ['/'], - target: (params, url) => `/dut/${url.match(/:\/{2}\w+\./)[1]}/${url.match(/\.cn\/(.*)\.htm/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/dut/router.ts b/lib/routes/dut/router.ts deleted file mode 100644 index 38a45b7bb..000000000 --- a/lib/routes/dut/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/*/*', './index'); - router.get('/:0?', './index'); -}; diff --git a/lib/routes/dx2025/index.ts b/lib/routes/dx2025/index.ts index 425d38f57..c22be76c8 100644 --- a/lib/routes/dx2025/index.ts +++ b/lib/routes/dx2025/index.ts @@ -1,8 +1,49 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:category?', + categories: ['new-media'], + example: '/dx2025', + parameters: { type: '内容类别,见下表,默认为空', category: '行业分类,见下表,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `内容类别 + + | 产业观察 | 行业报告 | 政策 | 数据 | + | -------------------- | ---------------- | ------ | ---- | + | industry-observation | industry-reports | policy | data | + + 行业分类 + + | 行业 | 行业名称 | + | -------------------- | ----------------------------------------------------------------- | + | 新一代信息技术 | next-generation-information-technology-industry-reports | + | 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports | + | 航空航天装备 | aerospace-equipment-industry-reports | + | 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports | + | 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports | + | 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports | + | 电力装备 | electric-equipment-industry-reports | + | 农机装备 | agricultural-machinery-equipment-industry-reports | + | 新材料 | new-material-industry-reports | + | 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports | + | 现代服务业 | modern-service-industry-industry-reports | + | 制造业人才 | manufacturing-talent-industry-reports |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || ''; const category = ctx.req.param('category') || ''; @@ -44,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/dx2025/maintainer.ts b/lib/routes/dx2025/maintainer.ts deleted file mode 100644 index 5b8a76b47..000000000 --- a/lib/routes/dx2025/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/dx2025/namespace.ts b/lib/routes/dx2025/namespace.ts new file mode 100644 index 000000000..148763fc3 --- /dev/null +++ b/lib/routes/dx2025/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东西智库', + url: 'dx2025.com', +}; diff --git a/lib/routes/dx2025/radar.ts b/lib/routes/dx2025/radar.ts deleted file mode 100644 index 080844d2f..000000000 --- a/lib/routes/dx2025/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'dx2025.com': { - _name: '东西智库', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#e-hentai-fen-lei', - source: ['/archives/category/:type/:category?', '/archives/category/:type'], - target: (params) => `/dx2025/${params.type}/${params.category ?? ''}`, - }, - ], - }, -}; diff --git a/lib/routes/dx2025/router.ts b/lib/routes/dx2025/router.ts deleted file mode 100644 index 8591b5062..000000000 --- a/lib/routes/dx2025/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:category?', './index'); -}; diff --git a/lib/routes/dxy/maintainer.ts b/lib/routes/dxy/maintainer.ts deleted file mode 100644 index 2811321bb..000000000 --- a/lib/routes/dxy/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/bbs/profile/thread/:userId': ['TonyRL'], - '/bbs/special/:specialId': ['TonyRL'], -}; diff --git a/lib/routes/dxy/namespace.ts b/lib/routes/dxy/namespace.ts new file mode 100644 index 000000000..576b869d6 --- /dev/null +++ b/lib/routes/dxy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '丁香园', + url: 'dxy.cn', +}; diff --git a/lib/routes/dxy/profile/thread.ts b/lib/routes/dxy/profile/thread.ts index f4bde617c..4e87c1173 100644 --- a/lib/routes/dxy/profile/thread.ts +++ b/lib/routes/dxy/profile/thread.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { webBaseUrl, generateNonce, sign, getPost } from '../utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/profile/thread/:userId', + categories: ['bbs'], + example: '/dxy/bbs/profile/thread/8335054', + parameters: { userId: '个人 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dxy.cn/bbs/newweb/pc/profile/:userId/threads', 'dxy.cn/bbs/newweb/pc/profile/:userId'], + }, + name: '个人帖子', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const userId = ctx.req.param('userId'); const { limit = '30' } = ctx.req.query(); @@ -73,11 +95,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => getPost(item, cache.tryGet))); - ctx.set('data', { + return { title: `${userInfo.nickname} 的个人主页 - 丁香园论坛 - 专业医生社区,医学、药学、生命科学、科研学术交流`, description: `${userInfo.identificationTitle} ${userInfo.signature}`, link: `${webBaseUrl}/bbs/newweb/pc/profile/${userId}/threads`, image: userInfo.avatar, item: items, - }); -}; + }; +} diff --git a/lib/routes/dxy/radar.ts b/lib/routes/dxy/radar.ts deleted file mode 100644 index 456e07bbe..000000000 --- a/lib/routes/dxy/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'dxy.cn': { - _name: '丁香园', - '.': [ - { - title: '个人帖子', - docs: 'https://docs.rsshub.app/routes/bbs#ding-xiang-yuan', - source: ['/bbs/newweb/pc/profile/:userId/threads', '/bbs/newweb/pc/profile/:userId'], - target: '/dxy/bbs/profile/thread/:userId', - }, - ], - '3g': [ - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/bbs#ding-xiang-yuan', - source: ['/bbs/special'], - target: (_, url) => `/dxy/bbs/special/${new URL(url).searchParams.get('specialId')}`, - }, - ], - }, -}; diff --git a/lib/routes/dxy/router.ts b/lib/routes/dxy/router.ts deleted file mode 100644 index 987dbd204..000000000 --- a/lib/routes/dxy/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/bbs/profile/thread/:userId', './profile/thread'); - router.get('/bbs/special/:specialId', './special'); -}; diff --git a/lib/routes/dxy/special.ts b/lib/routes/dxy/special.ts index 6dba35ac0..c277ae7dd 100644 --- a/lib/routes/dxy/special.ts +++ b/lib/routes/dxy/special.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { phoneBaseUrl, webBaseUrl, generateNonce, sign, getPost } from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/special/:specialId', + categories: ['bbs'], + example: '/dxy/bbs/special/72', + parameters: { specialId: '专题 ID,可在对应专题页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专题', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const specialId = ctx.req.param('specialId'); const { limit = '10' } = ctx.req.query(); @@ -70,11 +89,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => getPost(item, cache.tryGet))); - ctx.set('data', { + return { title: specialDetail.name, description: `${specialDetail.content} ${specialDetail.postCount} 內容 ${specialDetail.followCount} 关注`, link: `${phoneBaseUrl}/bbs/special?specialId=${specialId}`, image: specialDetail.specialAvatar, item: items, - }); -}; + }; +} diff --git a/lib/routes/e-hentai/index.ts b/lib/routes/e-hentai/index.ts index 55a5eecd4..15547dae4 100644 --- a/lib/routes/e-hentai/index.ts +++ b/lib/routes/e-hentai/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:what?/:id?/:needTorrents?/:needImages?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const what = ctx.req.param('what') ?? ''; const needTorrents = /t|y/i.test(ctx.req.param('needTorrents') ?? 'true'); @@ -111,9 +119,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${id || what || 'Front Page'} - E-Hentai Galleries`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/e-hentai/maintainer.ts b/lib/routes/e-hentai/maintainer.ts deleted file mode 100644 index cd954d25a..000000000 --- a/lib/routes/e-hentai/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/category/:category?/:needTorrents?/:needImages?': ['nczitzk'], - '/tag/:tag?/:needTorrents?/:needImages?': ['nczitzk'], - '/search/:keyword?/:needTorrents?/:needImages?': ['nczitzk'], -}; diff --git a/lib/routes/e-hentai/namespace.ts b/lib/routes/e-hentai/namespace.ts new file mode 100644 index 000000000..12bc86696 --- /dev/null +++ b/lib/routes/e-hentai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'E-Hentai', + url: 'e-hentai.org', +}; diff --git a/lib/routes/e-hentai/radar.ts b/lib/routes/e-hentai/radar.ts deleted file mode 100644 index 88f65e371..000000000 --- a/lib/routes/e-hentai/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'e-hentai.org': { - _name: 'E-Hentai', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#e-hentai-fen-lei', - source: ['/:category', '/'], - target: '/e-hentai/category/:category', - }, - { - title: '收藏', - docs: 'https://docs.rsshub.app/routes/picture#e-hentai', - source: ['/favorites.php', '/'], - target: (_params, url) => `/ehentai/favorites/${new URL(url).searchParams.get('favcat')}`, - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/multimedia#e-hentai-biao-qian', - source: ['/tag/:tag', '/'], - target: '/e-hentai/tag/:tag', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/picture#e-hentai', - source: ['/tag/:tag', '/'], - target: '/ehentai/tag/:tag', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#e-hentai-sou-suo', - source: ['/:keyword', '/'], - target: '/e-hentai/search/:keyword', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/picture#e-hentai', - source: ['/'], - target: (_params, url) => `/ehentai/search/${new URL(url).searchParams.get('f_search')}`, - }, - ], - }, -}; diff --git a/lib/routes/e-hentai/router.ts b/lib/routes/e-hentai/router.ts deleted file mode 100644 index e1ea344d8..000000000 --- a/lib/routes/e-hentai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:what?/:id?/:needTorrents?/:needImages?', './index'); -}; diff --git a/lib/routes/eagle/blog.ts b/lib/routes/eagle/blog.ts index 5fbd2c2a3..89b0d19e3 100644 --- a/lib/routes/eagle/blog.ts +++ b/lib/routes/eagle/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,30 @@ import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; const cateList = new Set(['all', 'design-resources', 'learn-design', 'inside-eagle']); -export default async (ctx) => { +export const route: Route = { + path: '/blog/:cate?/:language?', + categories: ['design'], + example: '/eagle/blog/en', + parameters: { cate: 'Category, get by URL, `all` by default', language: 'Language, `cn`, `tw`, `en`, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cn.eagle.cool/blog'], + target: '/blog', + }, + name: 'Blog', + maintainers: ['Fatpandac'], + handler, + url: 'cn.eagle.cool/blog', +}; + +async function handler(ctx) { let cate = ctx.req.param('cate') ?? 'all'; let language = ctx.req.param('language') ?? 'cn'; if (!isValidHost(cate) || !isValidHost(language)) { @@ -44,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `eagle - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/eagle/changelog.ts b/lib/routes/eagle/changelog.ts index 88a096cb0..89ed91a8b 100644 --- a/lib/routes/eagle/changelog.ts +++ b/lib/routes/eagle/changelog.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog/:language?', + categories: ['program-update'], + example: '/eagle/changelog/en', + parameters: { language: 'Language, see list, default to be `cn`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Changelog', + maintainers: ['tigercubden'], + handler, + description: `Language + + | Simplified Chinese | Traditional Chinese | English | + | ------------------ | ------------------- | ------- | + | cn | tw | en |`, +}; + +async function handler(ctx) { let language = ctx.req.param('language'); let changelog = ''; @@ -33,7 +57,7 @@ export default async (ctx) => { const list = $('.version'); - ctx.set('data', { + return { // 源标题 title: `Eagle ${changelog}`, // 源链接 @@ -73,5 +97,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/eagle/maintainer.ts b/lib/routes/eagle/maintainer.ts deleted file mode 100644 index f2dc40391..000000000 --- a/lib/routes/eagle/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog/:cate?/:language?': ['Fatpandac'], - '/changelog/:language?': ['tigercubden'], -}; diff --git a/lib/routes/eagle/namespace.ts b/lib/routes/eagle/namespace.ts new file mode 100644 index 000000000..d091a1e83 --- /dev/null +++ b/lib/routes/eagle/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Eagle', + url: 'cn.eagle.cool', +}; diff --git a/lib/routes/eagle/radar.ts b/lib/routes/eagle/radar.ts deleted file mode 100644 index 6942d34e7..000000000 --- a/lib/routes/eagle/radar.ts +++ /dev/null @@ -1,101 +0,0 @@ -export default { - 'eagle.cool': { - _name: 'Eagle', - cn: [ - { - title: '更新日志', - docs: 'https://docs.rsshub.app/routes/program-update#eagle', - source: '/changelog', - target: '/eagle/changelog/cn', - }, - { - title: '全部', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog'], - target: '/eagle/blog', - }, - { - title: '设计资源', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/design-resources'], - target: '/eagle/blog/design-resources', - }, - { - title: '设计技巧', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/learn-design'], - target: '/eagle/blog/learn-design', - }, - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/inside-eagle'], - target: '/eagle/blog/inside-eagle', - }, - ], - tw: [ - { - title: '更新日誌', - docs: 'https://docs.rsshub.app/routes/program-update#eagle', - source: '/changelog', - target: '/eagle/changelog/tw', - }, - { - title: '全部', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog'], - target: '/eagle/blog/tw', - }, - { - title: '設計資源', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/design-resources'], - target: '/eagle/blog/design-resources/tw', - }, - { - title: '設計技巧', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/learn-design'], - target: '/eagle/blog/learn-design/tw', - }, - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/inside-eagle'], - target: '/eagle/blog/inside-eagle/tw', - }, - ], - en: [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/program-update#eagle', - source: '/changelog', - target: '/eagle/changelog/en', - }, - { - title: 'All', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog'], - target: '/eagle/blog/en', - }, - { - title: 'Design Resources', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/design-resources'], - target: '/eagle/blog/design-resources/en', - }, - { - title: 'Learn Design', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/learn-design'], - target: '/eagle/blog/learn-design/en', - }, - { - title: 'Inside Eagle', - docs: 'https://docs.rsshub.app/routes/design#eagle', - source: ['/blog/inside-eagle'], - target: '/eagle/blog/inside-eagle/en', - }, - ], - }, -}; diff --git a/lib/routes/eagle/router.ts b/lib/routes/eagle/router.ts deleted file mode 100644 index 02bb81bef..000000000 --- a/lib/routes/eagle/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/blog/:cate?/:language?', './blog'); - router.get('/changelog/:language?', './changelog'); -}; diff --git a/lib/routes/earthquake/ceic.ts b/lib/routes/earthquake/ceic.ts index f9c7f8a92..eb37c1ddb 100644 --- a/lib/routes/earthquake/ceic.ts +++ b/lib/routes/earthquake/ceic.ts @@ -1,8 +1,43 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/ceic/:type?', + categories: ['forecast'], + example: '/earthquake/ceic/1', + parameters: { type: '类型,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cea.gov.cn/cea/xwzx/zqsd/index.html', 'www.cea.gov.cn/'], + target: '', + }, + name: '中国地震台', + maintainers: ['SettingDust'], + handler, + url: 'www.cea.gov.cn/cea/xwzx/zqsd/index.html', + description: `| 参数 | 类型 | + | ---- | --------------------------- | + | 1 | 最近 24 小时地震信息 | + | 2 | 最近 48 小时地震信息 | + | 5 | 最近一年 3.0 级以上地震信息 | + | 7 | 最近一年 3.0 级以下地震 | + | 8 | 最近一年 4.0 级以上地震信息 | + | 9 | 最近一年 5.0 级以上地震信息 | + | 0 | 最近一年 6.0 级以上地震信息 | + + 可通过全局过滤参数订阅您感兴趣的地区.`, +}; + +async function handler(ctx) { let type = Number(ctx.req.param('type')); type = type ?? 1; const baseUrl = 'http://www.ceic.ac.cn'; @@ -45,7 +80,7 @@ export default async (ctx) => { json = json.slice(0, 20); } - ctx.set('data', { + return { title: typeName, link: `${baseUrl}/speedsearch`, allowEmpty: true, @@ -64,5 +99,5 @@ export default async (ctx) => { guid: NEW_DID, }; }), - }); -}; + }; +} diff --git a/lib/routes/earthquake/index.ts b/lib/routes/earthquake/index.ts index d87ae47d2..0871780b5 100644 --- a/lib/routes/earthquake/index.ts +++ b/lib/routes/earthquake/index.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:region?', + categories: ['forecast'], + example: '/earthquake', + parameters: { region: '区域,0全部,1国内(默认),2国外' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cea.gov.cn/cea/xwzx/zqsd/index.html', 'www.cea.gov.cn/'], + target: '', + }, + name: '中国地震局', + maintainers: ['LogicJake'], + handler, + url: 'www.cea.gov.cn/cea/xwzx/zqsd/index.html', + description: `可通过全局过滤参数订阅您感兴趣的地区.`, +}; + +async function handler(ctx) { const region = ctx.req.param('region') ?? 1; const api = 'https://www.cea.gov.cn/eportal/ui?struts.portlet.mode=view&struts.portlet.action=/portlet/expressEarthquake!queryExpressEarthquakeList.action&pageId=363409&moduleId=a852ba487b534470a84a30f00e7d6670'; const link = 'https://www.cea.gov.cn/cea/xwzx/zqsd/index.html'; @@ -32,9 +57,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '中国地震局震情速递', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/earthquake/maintainer.ts b/lib/routes/earthquake/maintainer.ts deleted file mode 100644 index 22c2002e3..000000000 --- a/lib/routes/earthquake/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/ceic/:type?': ['SettingDust'], - '/:region?': ['LogicJake'], -}; diff --git a/lib/routes/earthquake/namespace.ts b/lib/routes/earthquake/namespace.ts new file mode 100644 index 000000000..3e963bf5f --- /dev/null +++ b/lib/routes/earthquake/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '地震速报', + url: 'www.ceic.ac.cn', +}; diff --git a/lib/routes/earthquake/radar.ts b/lib/routes/earthquake/radar.ts deleted file mode 100644 index 43988ebb2..000000000 --- a/lib/routes/earthquake/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'ac.cn': { - _name: '地震速报', - 'www.ceic': [ - { - title: '中国地震台', - docs: 'https://docs.rsshub.app/routes/forecast#di-zhen-su-bao', - source: ['/speedsearch', '/'], - target: '/earthquake/ceic', - }, - ], - }, - 'cea.gov.cn': { - _name: '地震速报', - www: [ - { - title: '中国地震局', - docs: 'https://docs.rsshub.app/routes/forecast#di-zhen-su-bao', - source: ['/cea/xwzx/zqsd/index.html', '/'], - target: '/earthquake', - }, - ], - }, -}; diff --git a/lib/routes/earthquake/router.ts b/lib/routes/earthquake/router.ts deleted file mode 100644 index 505206d5a..000000000 --- a/lib/routes/earthquake/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/ceic/:type?', './ceic'); - router.get('/:region?', './index'); -}; diff --git a/lib/routes/eastday/24.ts b/lib/routes/eastday/24.ts index 16aebafd0..0f3c62152 100644 --- a/lib/routes/eastday/24.ts +++ b/lib/routes/eastday/24.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,38 @@ const categories = { 教育: 'jiaoyu', }; -export default async (ctx) => { +export const route: Route = { + path: '/24/:category?', + categories: ['traditional-media'], + example: '/eastday/24', + parameters: { category: '分类,见下表,默认为社会' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mini.eastday.com/'], + target: '/24', + }, + name: '24 小时热闻', + maintainers: ['nczitzk'], + handler, + url: 'mini.eastday.com/', + description: `| 推荐 | 社会 | 娱乐 | 国际 | 军事 | + | ---- | ---- | ---- | ---- | ---- | + + | 养生 | 汽车 | 体育 | 财经 | 游戏 | + | ---- | ---- | ---- | ---- | ---- | + + | 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 | + | ---- | ---- | ---- | ---- | ---- | ---- |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '社会'; const rootUrl = 'https://mini.eastday.com'; @@ -82,9 +114,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `24小时${category}热闻 - 东方资讯`, link: `${rootUrl}/#${categories[category]}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/eastday/maintainer.ts b/lib/routes/eastday/maintainer.ts deleted file mode 100644 index a74a7f040..000000000 --- a/lib/routes/eastday/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/24/:category?': ['nczitzk'], - '/portrait': ['nczitzk'], - '/sh': ['saury'], -}; diff --git a/lib/routes/eastday/namespace.ts b/lib/routes/eastday/namespace.ts new file mode 100644 index 000000000..3891eef0a --- /dev/null +++ b/lib/routes/eastday/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东方网', + url: 'mini.eastday.com', +}; diff --git a/lib/routes/eastday/portrait.ts b/lib/routes/eastday/portrait.ts index 9d8a254ac..921330d9c 100644 --- a/lib/routes/eastday/portrait.ts +++ b/lib/routes/eastday/portrait.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/portrait', + categories: ['traditional-media'], + example: '/eastday/portrait', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.eastday.com/'], + }, + name: '原创', + maintainers: ['nczitzk'], + handler, + url: 'www.eastday.com/', +}; + +async function handler() { const rootUrl = 'https://apin.eastday.com'; const currentUrl = `${rootUrl}/api/news/Portrait`; @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '原创 - 东方网', link: 'https://www.eastday.com/eastday/shouye/07index/yc/index.html', item: items, - }); -}; + }; +} diff --git a/lib/routes/eastday/radar.ts b/lib/routes/eastday/radar.ts deleted file mode 100644 index 1280df7f4..000000000 --- a/lib/routes/eastday/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'eastday.com': { - _name: '东方网', - mini: [ - { - title: '24 小时热闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-fang-wang', - source: '/', - target: '/eastday/24', - }, - ], - sh: [ - { - title: '上海新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-fang-wang', - source: '/', - target: '/eastday/sh', - }, - ], - www: [ - { - title: '原创', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-fang-wang-yuan-chuang', - source: '/', - target: '/eastday/portrait', - }, - ], - }, -}; diff --git a/lib/routes/eastday/router.ts b/lib/routes/eastday/router.ts deleted file mode 100644 index c63e40dfe..000000000 --- a/lib/routes/eastday/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/24/:category?', './24'); - router.get('/portrait', './portrait'); - router.get('/sh', './sh'); -}; diff --git a/lib/routes/eastday/sh.ts b/lib/routes/eastday/sh.ts index 06ed1359f..fa2a4059c 100644 --- a/lib/routes/eastday/sh.ts +++ b/lib/routes/eastday/sh.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/sh', + categories: ['traditional-media'], + example: '/eastday/sh', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sh.eastday.com/'], + }, + name: '上海新闻', + maintainers: ['saury'], + handler, + url: 'sh.eastday.com/', +}; + +async function handler() { const domain = 'http://wap.eastday.com'; const response = await got({ @@ -42,9 +65,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `东方网-上海`, link: `${domain}/wap/sh.html`, item: result, - }); -}; + }; +} diff --git a/lib/routes/eastmoney/maintainer.ts b/lib/routes/eastmoney/maintainer.ts deleted file mode 100644 index 6fb99efc3..000000000 --- a/lib/routes/eastmoney/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/ttjj/user/:uid': ['zidekuls'], - '/report/:category': ['syzq'], - '/search/:keyword': ['drgnchan'], -}; diff --git a/lib/routes/eastmoney/namespace.ts b/lib/routes/eastmoney/namespace.ts new file mode 100644 index 000000000..8612c237a --- /dev/null +++ b/lib/routes/eastmoney/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东方财富', + url: 'data.eastmoney.com', +}; diff --git a/lib/routes/eastmoney/radar.ts b/lib/routes/eastmoney/radar.ts deleted file mode 100644 index d7c202fa9..000000000 --- a/lib/routes/eastmoney/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'eastmoney.com': { - _name: '东方财富', - data: [ - { - title: '研究报告', - docs: 'https://docs.rsshub.app/routes/finance#dong-fang-cai-fu', - source: ['/report/:category'], - target: '/eastmoney/report/:category', - }, - ], - fundbarmob: [ - { - title: '天天基金用户动态', - docs: 'https://docs.rsshub.app/routes/finance#dong-fang-cai-fu', - source: ['/'], - target: (_param, url) => `/eastmoney/ttjj/user/${new URL(url).searchParams.get('userid')}`, - }, - ], - so: [ - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/finance#dong-fang-cai-fu', - source: ['/News/s'], - target: (_param, url) => `/eastmoney/search/${new URL(url).searchParams.get('KeyWord')}`, - }, - ], - }, -}; diff --git a/lib/routes/eastmoney/report/index.ts b/lib/routes/eastmoney/report/index.ts index 60b7a33b4..df4781a2a 100644 --- a/lib/routes/eastmoney/report/index.ts +++ b/lib/routes/eastmoney/report/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/report/:category', + categories: ['finance'], + example: '/eastmoney/report/strategyreport', + parameters: { category: '研报类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['data.eastmoney.com/report/:category'], + }, + name: '研究报告', + maintainers: ['syzq'], + handler, + description: `| 策略报告 | 宏观研究 | 券商晨报 | 行业研究 | + | -------------- | ----------- | ------------ | -------- | + | strategyreport | macresearch | brokerreport | industry |`, +}; + +async function handler(ctx) { const baseUrl = 'https://data.eastmoney.com'; const { category = 'strategyreport' } = ctx.req.param(); @@ -52,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `东方财富网-${reportType[category]}`, link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/eastmoney/router.ts b/lib/routes/eastmoney/router.ts deleted file mode 100644 index da195d078..000000000 --- a/lib/routes/eastmoney/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/report/:category', './report/index'); - router.get('/search/:keyword', './search/index'); - router.get('/ttjj/user/:uid', './ttjj/user'); -}; diff --git a/lib/routes/eastmoney/search/index.ts b/lib/routes/eastmoney/search/index.ts index cb933d30e..0ac7f5400 100644 --- a/lib/routes/eastmoney/search/index.ts +++ b/lib/routes/eastmoney/search/index.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['finance'], + example: '/eastmoney/search/web3', + parameters: { keyword: '关键词,可以设置为自己需要检索的关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索', + maintainers: ['drgnchan'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const link = `https://so.eastmoney.com/News/s?KeyWord=${keyword}`; const body = { @@ -47,9 +66,9 @@ export default async (ctx) => { link: item.url, author: item.mediaName, })); - ctx.set('data', { + return { title: `东方财富网 - 搜索'${keyword}'`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/eastmoney/ttjj/user.ts b/lib/routes/eastmoney/ttjj/user.ts index 56df98895..7f11f8857 100644 --- a/lib/routes/eastmoney/ttjj/user.ts +++ b/lib/routes/eastmoney/ttjj/user.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/ttjj/user/:uid', + categories: ['finance'], + example: '/eastmoney/ttjj/user/6551094298949188', + parameters: { uid: '用户id, 可以通过天天基金App分享用户主页到浏览器,在相应的URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '天天基金用户动态', + maintainers: ['zidekuls'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const urlPrefix = 'https://jijinbaapi.eastmoney.com/gubaapi/v3/read'; @@ -57,10 +76,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: `天天基金-${username}的主页`, link: `https://fundbarmob.eastmoney.com/index.html?goPage=personDetailView&userid=${uid}`, description: `${username} 的动态`, item: result, - }); -}; + }; +} diff --git a/lib/routes/ecnu/contest.ts b/lib/routes/ecnu/contest.ts index 47043b74b..1d1d3b347 100644 --- a/lib/routes/ecnu/contest.ts +++ b/lib/routes/ecnu/contest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,30 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/acm/contest/:category?', + categories: ['university'], + example: '/ecnu/acm/contest/public', + parameters: { category: 'category is optional, default is all, use `public` for public only contests' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['acm.ecnu.edu.cn/contest/', 'acm.ecnu.edu.cn/'], + target: '/acm/contest/', + }, + name: 'ACM Online-Judge contests list', + maintainers: ['a180285'], + handler, + url: 'acm.ecnu.edu.cn/contest/', +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const publicOnly = category === 'public'; const rootUrl = 'https://acm.ecnu.edu.cn'; @@ -36,9 +60,9 @@ export default async (ctx) => { }) .toArray(); - ctx.set('data', { + return { title: `ECNU ACM ${publicOnly ? '公开' : ''}比赛`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ecnu/maintainer.ts b/lib/routes/ecnu/maintainer.ts deleted file mode 100644 index 6c98486bf..000000000 --- a/lib/routes/ecnu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/acm/contest/:category?': ['a180285'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/ecnu/namespace.ts b/lib/routes/ecnu/namespace.ts new file mode 100644 index 000000000..7895aad28 --- /dev/null +++ b/lib/routes/ecnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'East China Normal University 华东师范大学', + url: 'acm.ecnu.edu.cn', +}; diff --git a/lib/routes/ecnu/radar.ts b/lib/routes/ecnu/radar.ts deleted file mode 100644 index 44d13280b..000000000 --- a/lib/routes/ecnu/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'ecnu.edu.cn': { - _name: '华东师范大学', - acm: [ - { - title: '所有比赛列表', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-shi-fan-da-xue', - source: ['/contest/', '/'], - target: '/ecnu/acm/contest/', - }, - { - title: '仅公开比赛列表', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-shi-fan-da-xue', - source: ['/contest/', '/'], - target: '/ecnu/acm/contest/public', - }, - ], - }, - 'kaoyan.com': { - _name: '华东师范大学', - yz: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-shi-fan-da-xue', - source: ['/ecnu/tiaoji', '/'], - target: '/ecnu/yjs', - }, - ], - }, -}; diff --git a/lib/routes/ecnu/router.ts b/lib/routes/ecnu/router.ts deleted file mode 100644 index 2cab9e4ac..000000000 --- a/lib/routes/ecnu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/acm/contest/:category?', './contest'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/ecnu/yjs.ts b/lib/routes/ecnu/yjs.ts index f266025a8..a1d6e5168 100644 --- a/lib/routes/ecnu/yjs.ts +++ b/lib/routes/ecnu/yjs.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/ecnu/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.kaoyan.com/ecnu/tiaoji', 'yz.kaoyan.com/'], + }, + name: '研究生院', + maintainers: ['shengmaosu'], + handler, + url: 'yz.kaoyan.com/ecnu/tiaoji', +}; + +async function handler() { const link = 'https://yz.kaoyan.com/ecnu/tiaoji/'; const response = await got(link); const $ = load(response.data); @@ -29,10 +52,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '华东师范大学研究生院', link, description: '华东师范大学研究生调剂信息', item: items, - }); -}; + }; +} diff --git a/lib/routes/economist/espresso.ts b/lib/routes/economist/espresso.ts index fce23df05..0db627664 100644 --- a/lib/routes/economist/espresso.ts +++ b/lib/routes/economist/espresso.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { config } from '@/config'; const link = 'https://www.economist.com/the-world-in-brief'; -export default async (ctx) => { +export const route: Route = { + path: '/espresso', + categories: ['traditional-media'], + example: '/economist/espresso', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['economist.com/the-world-in-brief', 'economist.com/espresso'], + }, + name: 'Espresso', + maintainers: ['TonyRL'], + handler, + url: 'economist.com/the-world-in-brief', +}; + +async function handler() { const $ = await cache.tryGet( link, async () => { @@ -71,11 +94,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), link, description: $('meta[property="og:description"]').attr('content'), language: 'en-gb', item: [...gobbets, ...articles], - }); -}; + }; +} diff --git a/lib/routes/economist/full.ts b/lib/routes/economist/full.ts index 070314ef7..2dbc9f1fa 100644 --- a/lib/routes/economist/full.ts +++ b/lib/routes/economist/full.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import got from '@/utils/got'; @@ -18,7 +19,28 @@ const getArticleDetail = (link) => return { article, categories }; }); -export default async (ctx) => { +export const route: Route = { + path: '/:endpoint', + categories: ['traditional-media'], + example: '/economist/latest', + parameters: { endpoint: 'Category name, can be found on the [official page](https://www.economist.com/rss). For example, https://www.economist.com/china/rss.xml to china' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['economist.com/:endpoint'], + }, + name: 'Category', + maintainers: ['ImSingee'], + handler, +}; + +async function handler(ctx) { const endpoint = ctx.req.param('endpoint'); const feed = await parser.parseURL(`https://www.economist.com/${endpoint}/rss.xml`); @@ -38,10 +60,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/economist/global-business-review.ts b/lib/routes/economist/global-business-review.ts index 304f0031c..8d539d5be 100644 --- a/lib/routes/economist/global-business-review.ts +++ b/lib/routes/economist/global-business-review.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -65,7 +66,30 @@ const getArticleDetail = (article_id, language) => { }); }; -export default async (ctx) => { +export const route: Route = { + path: '/global-business-review/:language?', + categories: ['traditional-media'], + example: '/economist/global-business-review/cn-en', + parameters: { language: 'Language, `en`, `cn`, `tw` are supported, support multiple options, default to cn-en' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['businessreview.global/'], + target: '/global-business-review', + }, + name: 'Global Business Review', + maintainers: ['prnake'], + handler, + url: 'businessreview.global/', +}; + +async function handler(ctx) { const language = (ctx.req.param('language') && ctx.req .param('language') @@ -88,10 +112,10 @@ export default async (ctx) => { })) ); - ctx.set('data', { + return { title: TITLE[main_language], link: 'https://www.businessreview.global', description: DESCRIPTION[main_language], item: items, - }); -}; + }; +} diff --git a/lib/routes/economist/maintainer.ts b/lib/routes/economist/maintainer.ts deleted file mode 100644 index b08c8d719..000000000 --- a/lib/routes/economist/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/espresso': ['TonyRL'], - '/global-business-review/:language?': ['prnake'], - '/:endpoint': ['ImSingee'], -}; diff --git a/lib/routes/economist/namespace.ts b/lib/routes/economist/namespace.ts new file mode 100644 index 000000000..8fa276be3 --- /dev/null +++ b/lib/routes/economist/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Economist', + url: 'economist.com', +}; diff --git a/lib/routes/economist/radar.ts b/lib/routes/economist/radar.ts deleted file mode 100644 index 0a76f407f..000000000 --- a/lib/routes/economist/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'economist.com': { - _name: 'The Economist', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#the-economist', - source: ['/:endpoint'], - target: '/economist/:endpoint', - }, - { - title: 'Espresso', - docs: 'https://docs.rsshub.app/routes/traditional-media#the-economist', - source: ['/the-world-in-brief', '/espresso'], - target: '/economist/espresso', - }, - ], - }, - 'businessreview.global': { - _name: 'The Economist', - '.': [ - { - title: '商论', - docs: 'https://docs.rsshub.app/routes/traditional-media#the-economist', - source: ['/'], - target: '/economist/global-business-review', - }, - ], - }, -}; diff --git a/lib/routes/economist/router.ts b/lib/routes/economist/router.ts deleted file mode 100644 index 4db89016c..000000000 --- a/lib/routes/economist/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/espresso', './espresso'); - router.get('/global-business-review/:language?', './global-business-review'); - router.get('/:endpoint', './full'); -}; diff --git a/lib/routes/ecust/e/news.ts b/lib/routes/ecust/e/news.ts index b8d2fa357..0c93d0d13 100644 --- a/lib/routes/ecust/e/news.ts +++ b/lib/routes/ecust/e/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://e.ecust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jxjy/news', + categories: ['university'], + example: '/ecust/jxjy/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['e.ecust.edu.cn/engine2/m/38F638B77773ADD3', 'e.ecust.edu.cn/'], + }, + name: '继续教育学院 - 学院公告', + maintainers: ['jialinghui'], + handler, + url: 'e.ecust.edu.cn/engine2/m/38F638B77773ADD3', +}; + +async function handler() { const { data: response } = await got.post(`${baseUrl}/engine2/general/1301/type/more-datas`, { form: { engineInstanceId: 1_732_458, @@ -36,10 +59,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '华东理工继续教育学院', description: '学院公告', link: `${baseUrl}/engine2/m/38F638B77773ADD3`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ecust/gschool/yjs.ts b/lib/routes/ecust/gschool/yjs.ts index a9db29acc..80f3dfd03 100644 --- a/lib/routes/ecust/gschool/yjs.ts +++ b/lib/routes/ecust/gschool/yjs.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/ecust/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gschool.ecust.edu.cn/12753/list.htm', 'gschool.ecust.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'gschool.ecust.edu.cn/12753/list.htm', +}; + +async function handler() { const baseUrl = 'https://gschool.ecust.edu.cn'; const link = `${baseUrl}/12753/list.htm`; const response = await got(link); const $ = load(response.data); const list = $('#wp_news_w6 li'); - ctx.set('data', { + return { title: '华东理工大学研究生院', link, description: '华东理工大学研究生院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('.news_meta').text()), }; }), - }); -}; + }; +} diff --git a/lib/routes/ecust/jwc/notice.ts b/lib/routes/ecust/jwc/notice.ts index 757f5f51a..ea1096290 100644 --- a/lib/routes/ecust/jwc/notice.ts +++ b/lib/routes/ecust/jwc/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -33,7 +34,28 @@ const get_from_link = async (link) => { }); return articleList; }; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:category?', + categories: ['university'], + example: '/ecust/jwc/mto', + parameters: { category: '订阅板块,默认为全部订阅' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '本科教务处信息网', + maintainers: ['lxl66566'], + handler, + description: `| 其他任意值 | mto | mttb | gi | mpt | fai | + | ---------- | ------------ | ------------------ | -------- | ------------ | ------------ | + | 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 |`, +}; + +async function handler(ctx) { const { category = 'all' } = ctx.req.param(); const categoryItem = categoryMap[category] || null; // all -> null const pageUrl = categoryItem ? [`${baseUrl}${categoryItem.link}/list.htm`] : Object.values(categoryMap).map((item) => `${baseUrl}${item.link}/list.htm`); @@ -59,9 +81,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: `华理教务处 - ${categoryItem ? categoryItem.name : '全部'}`, link: categoryItem ? pageUrl[0] : baseUrl, item: result, - }); -}; + }; +} diff --git a/lib/routes/ecust/maintainer.ts b/lib/routes/ecust/maintainer.ts deleted file mode 100644 index c56927daa..000000000 --- a/lib/routes/ecust/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/jwc/:category?': ['lxl66566'], - '/jxjy/news': ['jialinghui'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/ecust/namespace.ts b/lib/routes/ecust/namespace.ts new file mode 100644 index 000000000..8f212866b --- /dev/null +++ b/lib/routes/ecust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华东理工大学', + url: 'e.ecust.edu.cn', +}; diff --git a/lib/routes/ecust/radar.ts b/lib/routes/ecust/radar.ts deleted file mode 100644 index 5dd2c240a..000000000 --- a/lib/routes/ecust/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'ecust.edu.cn': { - _name: '华东理工大学', - e: [ - { - title: '继续教育学院 - 学院公告', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-li-gong-da-xue', - source: ['/engine2/m/38F638B77773ADD3', '/'], - target: '/ecust/jxjy/news', - }, - ], - gschool: [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-li-gong-da-xue', - source: ['/12753/list.htm', '/'], - target: '/ecust/yjs', - }, - ], - jwc: [ - { - title: '本科教务处信息网', - docs: 'https://docs.rsshub.app/routes/university#hua-dong-li-gong-da-xue', - source: ['/'], - target: '/ecust/jwc/notice/:category?', - }, - ], - }, -}; diff --git a/lib/routes/ecust/router.ts b/lib/routes/ecust/router.ts deleted file mode 100644 index fddf686c0..000000000 --- a/lib/routes/ecust/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/jwc/:category?', './jwc/notice'); - router.get('/jxjy/news', './e/news'); - router.get('/yjs', './gschool/yjs'); -}; diff --git a/lib/routes/egsea/flash.ts b/lib/routes/egsea/flash.ts index c65ea24a4..4364883d8 100644 --- a/lib/routes/egsea/flash.ts +++ b/lib/routes/egsea/flash.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/flash', + categories: ['new-media'], + example: '/egsea/flash', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['egsea.com/news/flash'], + }, + name: '快讯', + maintainers: ['hillerliao'], + handler, + url: 'egsea.com/news/flash', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://www.egsea.com/news/flash-list?per-page=30', @@ -22,9 +45,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '快讯 - e 公司', link: 'https://www.egsea.com/news/flash', item: out, - }); -}; + }; +} diff --git a/lib/routes/egsea/maintainer.ts b/lib/routes/egsea/maintainer.ts deleted file mode 100644 index 9a4ab642e..000000000 --- a/lib/routes/egsea/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/flash': ['hillerliao'], -}; diff --git a/lib/routes/egsea/namespace.ts b/lib/routes/egsea/namespace.ts new file mode 100644 index 000000000..2a55a2725 --- /dev/null +++ b/lib/routes/egsea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'e 公司', + url: 'egsea.com', +}; diff --git a/lib/routes/egsea/radar.ts b/lib/routes/egsea/radar.ts deleted file mode 100644 index 01e0f9c91..000000000 --- a/lib/routes/egsea/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'egsea.com': { - _name: 'e 公司', - '.': [ - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#e-gong-si', - source: ['/news/flash'], - target: '/egsea/flash', - }, - ], - }, -}; diff --git a/lib/routes/egsea/router.ts b/lib/routes/egsea/router.ts deleted file mode 100644 index d49f55ee2..000000000 --- a/lib/routes/egsea/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/flash', './flash'); -}; diff --git a/lib/routes/ehentai/favorites.ts b/lib/routes/ehentai/favorites.ts index e264da1b1..3cd98e514 100644 --- a/lib/routes/ehentai/favorites.ts +++ b/lib/routes/ehentai/favorites.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import EhAPI from './ehapi'; -export default async (ctx) => { +export const route: Route = { + path: '/favorites/:favcat?/:order?/:page?/:routeParams?', + categories: ['picture'], + example: '/ehentai/favorites/0/posted/1', + parameters: { favcat: 'Favorites folder number', order: '`posted`(Sort by gallery release time) , `favorited`(Sort by time added to favorites)', page: 'Page number', routeParams: 'Additional parameters, see the table above' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: 'Favorites', + maintainers: ['yindaheng98', 'syrinka'], + handler, +}; + +async function handler(ctx) { if (!EhAPI.has_cookie) { throw new Error('Ehentai favorites RSS is disabled due to the lack of relevant config'); } @@ -27,4 +46,4 @@ export default async (ctx) => { item: items, } ); -}; +} diff --git a/lib/routes/ehentai/maintainer.ts b/lib/routes/ehentai/maintainer.ts deleted file mode 100644 index c783192e9..000000000 --- a/lib/routes/ehentai/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/favorites/:favcat?/:order?/:page?/:routeParams?': ['yindaheng98', 'syrinka'], - '/search/:params?/:page?/:routeParams?': ['yindaheng98', 'syrinka'], - '/tag/:tag/:page?/:routeParams?': ['yindaheng98', 'syrinka'], -}; diff --git a/lib/routes/ehentai/namespace.ts b/lib/routes/ehentai/namespace.ts new file mode 100644 index 000000000..008a2b955 --- /dev/null +++ b/lib/routes/ehentai/namespace.ts @@ -0,0 +1,11 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'E-Hentai', + description: `For RSS content, specify options in the \`routeParams\` parameter in query string format to control additional functionality + +| Key | Meaning | Accepted keys | Default value | +| ------------ | ------------------------------------------------------------------------------- | -------------- | ------------- | +| bittorrent | Whether include a link to the latest torrent | 0/1/true/false | false | +| embed\_thumb | Whether the cover image is embedded in the RSS feed rather than given as a link | 0/1/true/false | false |`, +}; diff --git a/lib/routes/ehentai/router.ts b/lib/routes/ehentai/router.ts deleted file mode 100644 index 1357b6171..000000000 --- a/lib/routes/ehentai/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/favorites/:favcat?/:order?/:page?/:routeParams?', './favorites'); - router.get('/search/:params?/:page?/:routeParams?', './search'); - router.get('/tag/:tag/:page?/:routeParams?', './tag'); -}; diff --git a/lib/routes/ehentai/search.ts b/lib/routes/ehentai/search.ts index ce44e7444..7a0850e00 100644 --- a/lib/routes/ehentai/search.ts +++ b/lib/routes/ehentai/search.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import EhAPI from './ehapi'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:params?/:page?/:routeParams?', + categories: ['picture'], + example: '/ehentai/search/f_search=artist%3Amana%24/1', + parameters: { params: 'Search parameters. You can copy the content after `https://e-hentai.org/?`', page: 'Page number', routeParams: 'Additional parameters, see the table above' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['yindaheng98', 'syrinka'], + handler, +}; + +async function handler(ctx) { const page = ctx.req.param('page'); let params = ctx.req.param('params'); const routeParams = new URLSearchParams(ctx.req.param('routeParams')); @@ -35,4 +54,4 @@ export default async (ctx) => { item: items, } ); -}; +} diff --git a/lib/routes/ehentai/tag.ts b/lib/routes/ehentai/tag.ts index ecbd50adc..bad95464f 100644 --- a/lib/routes/ehentai/tag.ts +++ b/lib/routes/ehentai/tag.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import EhAPI from './ehapi'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag/:page?/:routeParams?', + categories: ['picture'], + example: '/ehentai/tag/language:chinese/1', + parameters: { tag: 'Tag', page: 'Page number', routeParams: 'Additional parameters, see the table above' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: 'Tag', + maintainers: ['yindaheng98', 'syrinka'], + handler, +}; + +async function handler(ctx) { const page = ctx.req.param('page'); const tag = ctx.req.param('tag'); const routeParams = new URLSearchParams(ctx.req.param('routeParams')); @@ -23,4 +42,4 @@ export default async (ctx) => { item: items, } ); -}; +} diff --git a/lib/routes/ekantipur/issue.ts b/lib/routes/ekantipur/issue.ts index 0bff6e780..7f9c54de5 100644 --- a/lib/routes/ekantipur/issue.ts +++ b/lib/routes/ekantipur/issue.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // Require necessary modules import got from '@/utils/got'; // a customised got import { load } from 'cheerio'; // an HTML parser with a jQuery-like API -export default async (ctx) => { +export const route: Route = { + path: '/:channel?', + categories: ['traditional-media'], + example: '/ekantipur/news', + parameters: { channel: 'Find it in the ekantipur.com menu or pick from the list below:' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ekantipur.com/:channel'], + target: '/:channel', + }, + name: 'Full Article RSS', + maintainers: ['maniche04'], + handler, + description: `Channels: + + | समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग | + | ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- | + | news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog |`, +}; + +async function handler(ctx) { // Your logic here // Defining base URL const baseUrl = 'https://ekantipur.com'; @@ -54,12 +82,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { // channel title title: `Ekantipur - ${channel}`, // channel link link: `${baseUrl}/${channel}`, // each feed item item: items, - }); -}; + }; +} diff --git a/lib/routes/ekantipur/maintainer.ts b/lib/routes/ekantipur/maintainer.ts deleted file mode 100644 index 0d1883425..000000000 --- a/lib/routes/ekantipur/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel?': ['maniche04'], -}; diff --git a/lib/routes/ekantipur/namespace.ts b/lib/routes/ekantipur/namespace.ts new file mode 100644 index 000000000..7a432fb90 --- /dev/null +++ b/lib/routes/ekantipur/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Ekantipur / कान्तिपुर (Nepal)', + url: 'ekantipur.com', +}; diff --git a/lib/routes/ekantipur/radar.ts b/lib/routes/ekantipur/radar.ts deleted file mode 100644 index 35de67f74..000000000 --- a/lib/routes/ekantipur/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ekantipur.com': { - _name: 'Ekantipur', - '.': [ - { - title: 'Full Article RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#ekantipur-%E0%A4%95%E0%A4%BE%E0%A4%A8%E0%A5%8D%E0%A4%A4%E0%A4%BF%E0%A4%AA%E0%A5%81%E0%A4%B0-nepal', - source: ['/:channel'], - target: '/ekantipur/:channel', - }, - ], - }, -}; diff --git a/lib/routes/ekantipur/router.ts b/lib/routes/ekantipur/router.ts deleted file mode 100644 index 6e2e6c9f7..000000000 --- a/lib/routes/ekantipur/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel?', './issue'); -}; diff --git a/lib/routes/elasticsearch-cn/index.ts b/lib/routes/elasticsearch-cn/index.ts index 461dfc162..857ce9284 100644 --- a/lib/routes/elasticsearch-cn/index.ts +++ b/lib/routes/elasticsearch-cn/index.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:params?', + categories: ['bbs'], + example: '/elasticsearch-cn', + parameters: { params: '分类,可在对应分类页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['elasticsearch.cn/:params', 'elasticsearch.cn/'], + target: '/:params', + }, + name: '发现', + maintainers: ['nczitzk'], + handler, + description: `如 [Elasticsearch 最新](https://elasticsearch.cn/category-2) 的 URL 为 \`https://elasticsearch.cn/category-2\`,则分类参数处填写 \`category-2\`,最后得到路由地址 [\`/elasticsearch-cn/category-2\`](https://rsshub.app/elasticsearch-cn/category-2)。 + + 又如 [求职招聘 30 天热门](https://elasticsearch.cn/sort_type-hot____category-12__day-30) 的 URL 为 \`https://elasticsearch.cn/sort_type-hot____category-12__day-30\`,则分类参数处填写 \`sort_type-hot____category-12__day-30\`,最后得到路由地址 [\`/elasticsearch-cn/sort_type-hot____category-12__day-30\`](https://rsshub.app/elasticsearch-cn/sort_type-hot____category-12__day-30)。`, +}; + +async function handler(ctx) { const params = ctx.req.param('params') ?? ''; const rootUrl = 'https://elasticsearch.cn'; @@ -50,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/elasticsearch-cn/maintainer.ts b/lib/routes/elasticsearch-cn/maintainer.ts deleted file mode 100644 index 2eacc92ad..000000000 --- a/lib/routes/elasticsearch-cn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:params?': ['nczitzk'], -}; diff --git a/lib/routes/elasticsearch-cn/namespace.ts b/lib/routes/elasticsearch-cn/namespace.ts new file mode 100644 index 000000000..6092336ac --- /dev/null +++ b/lib/routes/elasticsearch-cn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Elastic 中文社区', + url: 'elasticsearch.cn', +}; diff --git a/lib/routes/elasticsearch-cn/radar.ts b/lib/routes/elasticsearch-cn/radar.ts deleted file mode 100644 index 14d7c63ac..000000000 --- a/lib/routes/elasticsearch-cn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'elasticsearch.cn': { - _name: 'Elastic 中文社区', - '.': [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/bbs#elastic-zhong-wen-she-qu-fa-xian', - source: ['/:params', '/'], - target: '/elasticsearch-cn/:params', - }, - ], - }, -}; diff --git a/lib/routes/elasticsearch-cn/router.ts b/lib/routes/elasticsearch-cn/router.ts deleted file mode 100644 index 78b6037fe..000000000 --- a/lib/routes/elasticsearch-cn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:params?', './index'); -}; diff --git a/lib/routes/eleduck/jobs.ts b/lib/routes/eleduck/jobs.ts index a89fde1f2..6a1d8c553 100644 --- a/lib/routes/eleduck/jobs.ts +++ b/lib/routes/eleduck/jobs.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jobs', + categories: ['bbs'], + example: '/eleduck/jobs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['eleduck.com/categories/5', 'eleduck.com/'], + }, + name: '工作机会', + maintainers: ['sfyumi'], + handler, + url: 'eleduck.com/categories/5', +}; + +async function handler() { const { data: response } = await got('https://svc.eleduck.com/api/v1/posts', { searchParams: { category: 5, @@ -31,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '招聘 | 电鸭社区', link: 'https://eleduck.com/category/5', item: out, - }); -}; + }; +} diff --git a/lib/routes/eleduck/maintainer.ts b/lib/routes/eleduck/maintainer.ts deleted file mode 100644 index 67938076d..000000000 --- a/lib/routes/eleduck/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jobs': ['sfyumi'], - '/posts/:id?': ['running-grass'], -}; diff --git a/lib/routes/eleduck/namespace.ts b/lib/routes/eleduck/namespace.ts new file mode 100644 index 000000000..1b1311633 --- /dev/null +++ b/lib/routes/eleduck/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '电鸭社区', + url: 'eleduck.com', +}; diff --git a/lib/routes/eleduck/posts.ts b/lib/routes/eleduck/posts.ts index 4fded878c..9f4f36fd8 100644 --- a/lib/routes/eleduck/posts.ts +++ b/lib/routes/eleduck/posts.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -15,7 +16,43 @@ const getCateName = async (cid = 0) => { return cates[cid] || '全部'; }; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:id?', + categories: ['bbs'], + example: '/eleduck/posts/4', + parameters: { id: '分类id,可以论坛的URL找到,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类文章', + maintainers: ['running-grass'], + handler, + description: `| id | 分类 | + | -- | -------- | + | 0 | 全部 | + | 1 | 讨论 | + | 2 | 分享 | + | 3 | 露个脸 | + | 4 | 访谈故事 | + | 5 | 招聘 | + | 10 | 海外移民 | + | 12 | 英语 | + | 14 | 电鸭官方 | + | 15 | 独立产品 | + | 17 | 闲话开源 | + | 19 | Web3 | + | 21 | 设计 | + | 22 | 人才库 | + | 23 | Upwork | + | 24 | 经验课 |`, +}; + +async function handler(ctx) { const cid = ctx.req.param('id') || 0; const response = await got(`https://svc.eleduck.com/api/v1/posts?category=${cid}&sort=-published_at&page=1`); @@ -27,7 +64,7 @@ export default async (ctx) => { const cname = await getCateName(cid); - ctx.set('data', { + return { title: `电鸭社区的文章--${cname}`, link: `https://eleduck.com/categories/${cid}`, description: `电鸭社区的文章,栏目为${cname}`, @@ -38,5 +75,5 @@ export default async (ctx) => { link: `https://eleduck.com/${item.category.id === 22 ? 'tposts' : 'posts'}/${item.id}`, author: item.user.nickname, })), - }); -}; + }; +} diff --git a/lib/routes/eleduck/radar.ts b/lib/routes/eleduck/radar.ts deleted file mode 100644 index bc281abd4..000000000 --- a/lib/routes/eleduck/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'eleduck.com': { - _name: '电鸭社区', - '.': [ - { - title: '工作机会', - docs: 'https://docs.rsshub.app/routes/bbs#dian-ya-she-qu-fen-lei-wen-zhang', - source: ['/categories/5', '/'], - target: '/eleduck/jobs', - }, - { - title: '分类文章', - docs: 'https://docs.rsshub.app/routes/bbs#dian-ya-she-qu-fen-lei-wen-zhang', - source: '/categories/:cid', - target: (params) => `/eleduck/posts/${params.cid}`, - }, - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/bbs#dian-ya-she-qu-fen-lei-wen-zhang', - source: ['/', '*'], - target: () => '/eleduck/posts', - }, - ], - }, -}; diff --git a/lib/routes/eleduck/router.ts b/lib/routes/eleduck/router.ts deleted file mode 100644 index eb8d7e06d..000000000 --- a/lib/routes/eleduck/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jobs', './jobs'); - router.get('/posts/:id?', './posts'); -}; diff --git a/lib/routes/elsevier/issue.ts b/lib/routes/elsevier/issue.ts index 802192e91..1f9a88315 100644 --- a/lib/routes/elsevier/issue.ts +++ b/lib/routes/elsevier/issue.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,18 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: ['/:journal/vol/:issue', '/:journal/:issue'], + radar: { + source: ['www.sciencedirect.com/journal/:journal/*'], + target: '/:journal', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal'); const issue = 'Volume ' + ctx.req.param('issue').replace('-', ' Issue '); const host = 'https://www.sciencedirect.com'; @@ -58,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${jrnlName} - ${issue}`, link: issueUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/elsevier/journal.ts b/lib/routes/elsevier/journal.ts index b7a9b9353..e5f8ddd5b 100644 --- a/lib/routes/elsevier/journal.ts +++ b/lib/routes/elsevier/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,18 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: ['/:journal/latest', '/:journal'], + radar: { + source: ['www.sciencedirect.com/journal/:journal/*'], + target: '/:journal', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal'); const host = 'https://www.sciencedirect.com'; const jrnlUrl = `${host}/journal/${journal}`; @@ -68,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/elsevier/maintainer.ts b/lib/routes/elsevier/maintainer.ts deleted file mode 100644 index 1d9e36bd7..000000000 --- a/lib/routes/elsevier/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:journal': ['Derekmini', 'sunwolf-swb'], - '/:journal/:issue': ['Derekmini', 'sunwolf-swb'], -}; diff --git a/lib/routes/elsevier/namespace.ts b/lib/routes/elsevier/namespace.ts new file mode 100644 index 000000000..d43da218f --- /dev/null +++ b/lib/routes/elsevier/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ELSEVIER', + url: 'www.sciencedirect.com', +}; diff --git a/lib/routes/elsevier/radar.ts b/lib/routes/elsevier/radar.ts deleted file mode 100644 index dd274143c..000000000 --- a/lib/routes/elsevier/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'sciencedirect.com': { - _name: 'Elsevier', - www: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#Elsevier', - source: '/journal/:journal/*', - target: '/elsevier/:journal', - }, - { - title: 'Issue', - docs: 'https://docs.rsshub.app/routes/journal#Elsevier', - source: '/journal/:journal/vol/:issue', - target: '/elsevier/:journal/:issue', - }, - ], - }, -}; diff --git a/lib/routes/elsevier/router.ts b/lib/routes/elsevier/router.ts deleted file mode 100644 index 737fe485d..000000000 --- a/lib/routes/elsevier/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/:journal/latest', './journal'); // deprecated - router.get('/:journal/vol/:issue', './issue'); // deprecated - router.get('/:journal', './journal'); - router.get('/:journal/:issue', './issue'); -}; diff --git a/lib/routes/embassy/index.ts b/lib/routes/embassy/index.ts index 280e36ecb..8c504f845 100644 --- a/lib/routes/embassy/index.ts +++ b/lib/routes/embassy/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; import supportedList from './supported-list'; -export default async (ctx) => { +export const route: Route = { + path: '/:country/:city?', + name: 'Unknown', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const country = ctx.req.param('country'); const city = ctx.req.param('city') ?? undefined; @@ -52,10 +60,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: desc, description: desc, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/embassy/maintainer.ts b/lib/routes/embassy/maintainer.ts deleted file mode 100644 index 6e807b997..000000000 --- a/lib/routes/embassy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:country/:city?': ['HenryQW'], -}; diff --git a/lib/routes/embassy/namespace.ts b/lib/routes/embassy/namespace.ts new file mode 100644 index 000000000..8c757f9e7 --- /dev/null +++ b/lib/routes/embassy/namespace.ts @@ -0,0 +1,114 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国驻外使领馆', + url: 'ca.china-embassy.org', + description: `支持国家列表 + +加拿大 \`CA\` + +- 大使馆: \`/embassy/ca\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| -------- | ---------------------- | +| 蒙特利尔 | \`/embassy/ca/montreal\` | + +* * * + +德国 \`DE\` + +- 大使馆: \`/embassy/de\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | -------------------- | +| 慕尼黑 | \`/embassy/de/munich\` | + +* * * + +法国 \`FR\` + +- 大使馆: \`/embassy/fr\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---------- | ------------------------ | +| 马赛 | \`/embassy/fr/marseille\` | +| 斯特拉斯堡 | \`/embassy/fr/strasbourg\` | +| 里昂 | \`/embassy/fr/lyon\` | + +* * * + +日本 \`JP\` + +- 大使馆: \`/embassy/jp\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | ---------------------- | +| 长崎 | \`/embassy/jp/nagasaki\` | +| 大阪 | \`/embassy/jp/osaka\` | +| 福冈 | \`/embassy/jp/fukuoka\` | +| 名古屋 | \`/embassy/jp/nagoya\` | +| 札幌 | \`/embassy/jp/sapporo\` | +| 新潟 | \`/embassy/jp/niigata\` | + +* * * + +韩国 \`KR\` + +- 大使馆: \`/embassy/kr\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---- | --------------------- | +| 釜山 | \`/embassy/kr/busan\` | +| 济州 | \`/embassy/kr/jeju\` | +| 光州 | \`/embassy/kr/gwangju\` | + +* * * + +马来西亚 \`MY\` + +- 大使馆: \`/embassy/my\` + +* * * + +新加坡 \`SG\` + +- 大使馆: \`/embassy/sg\` + +* * * + +美国 \`US\` + +- 大使馆: \`/embassy/us\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | -------------------------- | +| 纽约 | \`/embassy/us/newyork\` | +| 芝加哥 | \`/embassy/us/chicago\` | +| 旧金山 | \`/embassy/us/sanfrancisco\` | + +* * * + +英国 \`UK\` + +- 大使馆: \`/embassy/uk\` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---------- | ------------------------ | +| 爱丁堡 | \`/embassy/uk/edinburgh\` | +| 贝尔法斯特 | \`/embassy/uk/belfast\` | +| 曼彻斯特 | \`/embassy/uk/manchester\` |`, +}; diff --git a/lib/routes/embassy/radar.ts b/lib/routes/embassy/radar.ts deleted file mode 100644 index 3713353cf..000000000 --- a/lib/routes/embassy/radar.ts +++ /dev/null @@ -1,258 +0,0 @@ -export default { - 'china-embassy.org': { - _name: '中国驻外使领馆', - ca: [ - { - title: '重要通知 - 加拿大大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/ca', - }, - ], - jp: [ - { - title: '通知通告 - 日本大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfws/LSB', '/'], - target: '/embassy/jp', - }, - ], - kr: [ - { - title: '重要通知 - 韩国大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/lsqz/ls_tz', '/'], - target: '/embassy/kr', - }, - ], - my: [ - { - title: '重要通知 - 马来西亚大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/my', - }, - ], - sg: [ - { - title: '重要通知 - 新加坡大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfw/zytzs', '/'], - target: '/embassy/sg', - }, - ], - }, - 'china-embassy.gov.cn': { - _name: '中国驻外使领馆', - us: [ - { - title: '重要通知 - 美国大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/zytz', '/'], - target: '/embassy/us', - }, - ], - }, - 'chinese-embassy.org.uk': { - _name: '中国驻外使领馆', - www: [ - { - title: '领事协助 - 英国大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfw/lsxz', '/'], - target: '/embassy/us', - }, - ], - }, - 'chineseembassy.org': { - _name: '中国驻外使领馆', - de: [ - { - title: '近期通知 - 德国大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfw/jqtz', '/'], - target: '/embassy/de', - }, - ], - fr: [ - { - title: '重要通知 - 法国大使馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zgzfg/zgsg/lsb', '/'], - target: '/embassy/fr', - }, - ], - }, - 'china-consulate.org': { - _name: '中国驻外使领馆', - marseille: [ - { - title: '领事服务最新公告 - 马赛总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfwgg', '/'], - target: '/embassy/fr/marseille', - }, - ], - strasbourg: [ - { - title: '重要通知 - 斯特拉斯堡总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfw', '/'], - target: '/embassy/fr/strasbourg', - }, - ], - lyon: [ - { - title: '通知、通告 - 里昂总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tztg', '/'], - target: '/embassy/fr/lyon', - }, - ], - nagasaki: [ - { - title: '通知公告 - 长崎总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tzgg', '/'], - target: '/embassy/jp/nagasaki', - }, - ], - osaka: [ - { - title: '通知公告 - 大阪总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tzgg', '/'], - target: '/embassy/jp/osaka', - }, - ], - fukuoka: [ - { - title: '通知公告 - 福冈总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tzgg', '/'], - target: '/embassy/jp/fukuoka', - }, - ], - sapporo: [ - { - title: '通知公告 - 札幌总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tzgg', '/'], - target: '/embassy/jp/sapporo', - }, - ], - niigata: [ - { - title: '通知通告 - 新潟总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsbh/tztg', '/'], - target: '/embassy/jp/niigata', - }, - ], - busan: [ - { - title: '通知公告 - 釜山总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lsfw/tzgg101', '/'], - target: '/embassy/kr/busan', - }, - ], - gwangju: [ - { - title: '公告通知 - 光州总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/lbxx/ggtz', '/'], - target: '/embassy/kr/gwangju', - }, - ], - edinburgh: [ - { - title: '重要通知 - 爱丁堡总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/uk/edinburgh', - }, - ], - newyork: [ - { - title: '重要通知 - 纽约总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/fwzc/zxtz', '/'], - target: '/embassy/us/newyork', - }, - ], - }, - 'chinaconsulatechicago.org': { - _name: '中国驻外使领馆', - www: [ - { - title: '领馆重要通知 - 芝加哥总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/us/chicago', - }, - ], - }, - 'chinaconsulatesf.org': { - _name: '中国驻外使领馆', - www: [ - { - title: '重要通知 - 旧金山总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/us/sanfrancisco', - }, - ], - }, - 'chineseconsulate.org': { - _name: '中国驻外使领馆', - montreal: [ - { - title: '重要通知 - 蒙特利尔总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/zytz', '/'], - target: '/embassy/ca/montreal', - }, - ], - munich: [ - { - title: '近期通知 - 慕尼黑总领馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/jqtz', '/'], - target: '/embassy/de/munich', - }, - ], - nagoya: [ - { - title: '通知公告 - 名古屋总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: '/', - target: '/embassy/jp/nagoya', - }, - ], - jeju: [ - { - title: '公告栏 - 济州总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/ggl', '/'], - target: '/embassy/kr/jeju', - }, - ], - belfast: [ - { - title: '通知通告 - 贝尔法斯特总领馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tztg', '/'], - target: '/embassy/uk/belfast', - }, - ], - manchester: [ - { - title: '通知公告 - 曼彻斯特总领事馆', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zhu-wai-shi-ling-guan', - source: ['/chn/tzgg', '/'], - target: '/embassy/uk/manchester', - }, - ], - }, -}; diff --git a/lib/routes/embassy/router.ts b/lib/routes/embassy/router.ts deleted file mode 100644 index fe1635b1a..000000000 --- a/lib/routes/embassy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:country/:city?', './index'); -}; diff --git a/lib/routes/epicgames/index.ts b/lib/routes/epicgames/index.ts index 91a6e2c5a..414bc80f6 100644 --- a/lib/routes/epicgames/index.ts +++ b/lib/routes/epicgames/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import dayjs from 'dayjs'; -export default async (ctx) => { +export const route: Route = { + path: '/freegames/:locale?/:country?', + categories: ['game'], + example: '/epicgames/freegames', + parameters: { locale: 'Locale, en_US by default', country: 'Country, US by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['store.epicgames.com/:locale/free-games'], + target: '/freegames/:locale', + }, + name: 'Free games', + maintainers: ['DIYgod', 'NeverBehave', 'Zyx-A', 'junfengP', 'nczitzk', 'KotaHv'], + handler, +}; + +async function handler(ctx) { const locale = ctx.req.param('locale') ?? 'en-US'; const country = ctx.req.param('country') ?? 'US'; @@ -80,9 +103,9 @@ export default async (ctx) => { pubDate: parseDate(item.promotions.promotionalOffers[0].promotionalOffers[0].startDate), }; }); - ctx.set('data', { + return { title: 'Epic Games Store - Free Games', link: currentUrl, item: await Promise.all(items), - }); -}; + }; +} diff --git a/lib/routes/epicgames/maintainer.ts b/lib/routes/epicgames/maintainer.ts deleted file mode 100644 index c41ce5242..000000000 --- a/lib/routes/epicgames/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/freegames/:locale?/:country?': ['DIYgod', 'NeverBehave', 'Zyx-A', 'junfengP', 'nczitzk', 'KotaHv'], -}; diff --git a/lib/routes/epicgames/namespace.ts b/lib/routes/epicgames/namespace.ts new file mode 100644 index 000000000..b44829d26 --- /dev/null +++ b/lib/routes/epicgames/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Epic Games Store', + url: 'store.epicgames.com', +}; diff --git a/lib/routes/epicgames/radar.ts b/lib/routes/epicgames/radar.ts deleted file mode 100644 index 40f50b783..000000000 --- a/lib/routes/epicgames/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'epicgames.com': { - _name: 'Epic Games Store', - store: [ - { - title: '免费游戏', - docs: 'https://docs.rsshub.app/routes/game#epic-games-store', - source: ['/:locale/free-games'], - target: '/epicgames/freegames/:locale', - }, - ], - }, -}; diff --git a/lib/routes/epicgames/router.ts b/lib/routes/epicgames/router.ts deleted file mode 100644 index 7869f5d92..000000000 --- a/lib/routes/epicgames/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/freegames/:locale?/:country?', './index'); -}; diff --git a/lib/routes/eprice/maintainer.ts b/lib/routes/eprice/maintainer.ts deleted file mode 100644 index 0afe25e28..000000000 --- a/lib/routes/eprice/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:region?': ['TonyRL'], -}; diff --git a/lib/routes/eprice/namespace.ts b/lib/routes/eprice/namespace.ts new file mode 100644 index 000000000..e5d4c6224 --- /dev/null +++ b/lib/routes/eprice/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ePrice', + url: 'eprice.com.tw', +}; diff --git a/lib/routes/eprice/radar.ts b/lib/routes/eprice/radar.ts deleted file mode 100644 index df3333ecc..000000000 --- a/lib/routes/eprice/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'eprice.com.tw': { - _name: 'ePrice', - '.': [ - { - title: 'ePrice 比價王', - docs: 'https://docs.rsshub.app/routes/new-media#eprice', - source: ['/'], - target: '/eprice/tw', - }, - ], - }, - 'eprice.com.hk': { - _name: 'ePrice', - '.': [ - { - title: 'ePrice 香港', - docs: 'https://docs.rsshub.app/routes/new-media#eprice', - source: ['/'], - target: '/eprice/hk', - }, - ], - }, -}; diff --git a/lib/routes/eprice/router.ts b/lib/routes/eprice/router.ts deleted file mode 100644 index 4d51e8ea1..000000000 --- a/lib/routes/eprice/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:region?', './rss'); -}; diff --git a/lib/routes/eprice/rss.ts b/lib/routes/eprice/rss.ts index 7cbf2e660..1d4190821 100644 --- a/lib/routes/eprice/rss.ts +++ b/lib/routes/eprice/rss.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const allowRegion = new Set(['tw', 'hk']); -export default async (ctx) => { +export const route: Route = { + path: '/:region?', + categories: ['new-media'], + example: '/eprice/tw', + parameters: { region: '地区,预设为 tw' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新消息', + maintainers: ['TonyRL'], + handler, + description: `地区: + + | hk | tw | + | ---- | ---- | + | 香港 | 台湾 |`, +}; + +async function handler(ctx) { const region = ctx.req.param('region') ?? 'tw'; if (!allowRegion.has(region)) { throw new Error('Invalid region'); @@ -83,14 +107,14 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, image: feed.image.url, language: feed.language, - }); + }; ctx.set('json', { title: feed.title, @@ -100,4 +124,4 @@ export default async (ctx) => { image: feed.image.url, language: feed.language, }); -}; +} diff --git a/lib/routes/eventernote/actors.ts b/lib/routes/eventernote/actors.ts index d130b8c74..571f1411f 100644 --- a/lib/routes/eventernote/actors.ts +++ b/lib/routes/eventernote/actors.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,28 @@ const timeStringRegexes = [ const maxPages = 5; const pageCount = 10; -export default async (ctx) => { +export const route: Route = { + path: '/actors/:name/:id', + categories: ['anime'], + example: '/eventernote/actors/三森すずこ/2634', + parameters: { name: '声优姓名', id: '声优 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.eventernote.com/actors/:name/:id/events'], + }, + name: '声优活动及演唱会', + maintainers: ['KTachibanaM'], + handler, +}; + +async function handler(ctx) { const { name, id } = ctx.req.param(); const title = `${name}のイベント・ライブ情報一覧`; @@ -90,12 +112,12 @@ export default async (ctx) => { page += 1; } - ctx.set('data', { + return { title, link, description: title, language: 'ja', allowEmpty: true, item: events, - }); -}; + }; +} diff --git a/lib/routes/eventernote/maintainer.ts b/lib/routes/eventernote/maintainer.ts deleted file mode 100644 index 0b69a4238..000000000 --- a/lib/routes/eventernote/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/actors/:name/:id': ['KTachibanaM'], -}; diff --git a/lib/routes/eventernote/namespace.ts b/lib/routes/eventernote/namespace.ts new file mode 100644 index 000000000..0b8c3c03a --- /dev/null +++ b/lib/routes/eventernote/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Eventernote', + url: 'www.eventernote.com', +}; diff --git a/lib/routes/eventernote/radar.ts b/lib/routes/eventernote/radar.ts deleted file mode 100644 index 0602b3a69..000000000 --- a/lib/routes/eventernote/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'eventernote.com': { - _name: 'Eventernote', - www: [ - { - title: '声优活动及演唱会', - docs: 'https://docs.rsshub.app/routes/anime#eventernote', - source: '/actors/:name/:id/events', - target: '/eventernote/actors/:name/:id', - }, - ], - }, -}; diff --git a/lib/routes/eventernote/router.ts b/lib/routes/eventernote/router.ts deleted file mode 100644 index 91d7c9ce6..000000000 --- a/lib/routes/eventernote/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/actors/:name/:id', './actors'); -}; diff --git a/lib/routes/f-droid/apprelease.ts b/lib/routes/f-droid/apprelease.ts index 65a4c36f9..2f69e1ee1 100644 --- a/lib/routes/f-droid/apprelease.ts +++ b/lib/routes/f-droid/apprelease.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/apprelease/:app', + categories: ['program-update'], + example: '/f-droid/apprelease/com.termux', + parameters: { app: "App's package name" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['f-droid.org/en/packages/:app/'], + }, + name: 'App Update', + maintainers: ['garywill'], + handler, +}; + +async function handler(ctx) { const { app } = ctx.req.param(); const { data: response } = await got(`https://f-droid.org/en/packages/${app}/`); const $ = cheerio.load(response); @@ -24,10 +46,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${appName} releases on F-Droid`, discription: $('.package-summary').text(), link: `https://f-droid.org/en/packages/${app}/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/f-droid/maintainer.ts b/lib/routes/f-droid/maintainer.ts deleted file mode 100644 index b623b4d88..000000000 --- a/lib/routes/f-droid/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/apprelease/:app': ['garywill'], -}; diff --git a/lib/routes/f-droid/namespace.ts b/lib/routes/f-droid/namespace.ts new file mode 100644 index 000000000..58471ad71 --- /dev/null +++ b/lib/routes/f-droid/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'F-Droid', + url: 'f-droid.org', +}; diff --git a/lib/routes/f-droid/radar.ts b/lib/routes/f-droid/radar.ts deleted file mode 100644 index fd7d8a5d4..000000000 --- a/lib/routes/f-droid/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'f-droid.org': { - _name: 'F-Droid', - '.': [ - { - title: 'App Update', - docs: 'https://docs.rsshub.app/routes/program-update#f-droid', - source: ['/en/packages/:app/'], - target: '/f-droid/apprelease/:app', - }, - ], - }, -}; diff --git a/lib/routes/f-droid/router.ts b/lib/routes/f-droid/router.ts deleted file mode 100644 index b346d2a13..000000000 --- a/lib/routes/f-droid/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/apprelease/:app', './apprelease'); -}; diff --git a/lib/routes/famitsu/category.ts b/lib/routes/famitsu/category.ts index df93baf04..ec4fe3bec 100644 --- a/lib/routes/famitsu/category.ts +++ b/lib/routes/famitsu/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://www.famitsu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category?', + categories: ['game'], + example: '/famitsu/category/new-article', + parameters: { category: 'Category, see table below, `new-article` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['TonyRL'], + handler, + description: `| 新着 | PS5 | Switch | PS4 | ニュース | ゲームニュース | PR TIMES | 動画 | 特集・企画記事 | インタビュー | 取材・リポート | レビュー | インディーゲーム | + | ----------- | --- | ------ | --- | -------- | -------------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- | + | new-article | ps5 | switch | ps4 | news | news-game | prtimes | videos | special-article | interview | event-report | review | indie-game |`, +}; + +async function handler(ctx) { const { category = 'new-article' } = ctx.req.param(); const url = `${baseUrl}/search/?category=${category}`; const { data } = await got(url); @@ -52,12 +74,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), image: 'https://www.famitsu.com/img/1812/favicons/apple-touch-icon.png', link: url, item: items, language: 'ja', - }); -}; + }; +} diff --git a/lib/routes/famitsu/maintainer.ts b/lib/routes/famitsu/maintainer.ts deleted file mode 100644 index 5ad2793e1..000000000 --- a/lib/routes/famitsu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/category/:category?': ['TonyRL'], -}; diff --git a/lib/routes/famitsu/namespace.ts b/lib/routes/famitsu/namespace.ts new file mode 100644 index 000000000..4537d95c7 --- /dev/null +++ b/lib/routes/famitsu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ファミ通', + url: 'famitsu.com', +}; diff --git a/lib/routes/famitsu/radar.ts b/lib/routes/famitsu/radar.ts deleted file mode 100644 index e74cb5c31..000000000 --- a/lib/routes/famitsu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'famitsu.com': { - _name: 'ファミ通', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/game#ファミ-tong', - source: ['/search'], - target: (_, url) => `/famitsu/category/${new URL(url).searchParams.get('category')}`, - }, - ], - }, -}; diff --git a/lib/routes/famitsu/router.ts b/lib/routes/famitsu/router.ts deleted file mode 100644 index c6ab0aaab..000000000 --- a/lib/routes/famitsu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/category/:category?', './category'); -}; diff --git a/lib/routes/fansly/maintainer.ts b/lib/routes/fansly/maintainer.ts deleted file mode 100644 index d6d2ca676..000000000 --- a/lib/routes/fansly/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tag/:tag': ['TonyRL'], - '/user/:username': ['TonyRL'], -}; diff --git a/lib/routes/fansly/namespace.ts b/lib/routes/fansly/namespace.ts new file mode 100644 index 000000000..5383f0ca0 --- /dev/null +++ b/lib/routes/fansly/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Fansly', + url: 'fansly.com', +}; diff --git a/lib/routes/fansly/post.ts b/lib/routes/fansly/post.ts index f5013ed06..9fdffc556 100644 --- a/lib/routes/fansly/post.ts +++ b/lib/routes/fansly/post.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { getAccountByUsername, getTimelineByAccountId, parseDescription, baseUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:username', + categories: ['social-media'], + example: '/fansly/user/AeriGoMoo', + parameters: { username: 'User ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fansly.com/:username/posts', 'fansly.com/:username/media'], + }, + name: 'User Timeline', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const username = ctx.req.param('username'); const account = await getAccountByUsername(username, cache.tryGet); @@ -16,7 +38,7 @@ export default async (ctx) => { author: `${account.displayName ?? account.username} (@${account.username})`, })); - ctx.set('data', { + return { title: `${account.displayName ?? account.username} (@${account.username}) - Fansly`, link: `${baseUrl}/${account.username}`, description: account.about.replaceAll('\n', ' '), @@ -26,5 +48,5 @@ export default async (ctx) => { language: 'en', allowEmpty: true, item: items, - }); -}; + }; +} diff --git a/lib/routes/fansly/radar.ts b/lib/routes/fansly/radar.ts deleted file mode 100644 index 94908b193..000000000 --- a/lib/routes/fansly/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'fansly.com': { - _name: 'Fansly', - '.': [ - { - title: 'User Timeline', - docs: 'https://docs.rsshub.app/routes/social-media.html#fansly', - source: ['/:username/posts', '/:username/media'], - target: '/fansly/user/:username', - }, - { - title: 'Hashtag', - docs: 'https://docs.rsshub.app/routes/social-media.html#fansly', - source: ['/explore/tag/:tag'], - target: '/fansly/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/fansly/router.ts b/lib/routes/fansly/router.ts deleted file mode 100644 index f85bbe809..000000000 --- a/lib/routes/fansly/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/tag/:tag', './tag'); - router.get('/user/:username', './post'); -}; diff --git a/lib/routes/fansly/tag.ts b/lib/routes/fansly/tag.ts index 01ebe481e..804cc7d7a 100644 --- a/lib/routes/fansly/tag.ts +++ b/lib/routes/fansly/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { getTagId, getTagSuggestion, findAccountById, parseDescription, baseUrl, icon } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['social-media'], + example: '/fansly/tag/free', + parameters: { tag: 'Hashtag' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fansly.com/explore/tag/:tag'], + }, + name: 'Hashtag', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const tagId = await getTagId(tag, cache.tryGet); @@ -19,7 +41,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `#${tag} - Fansly`, link: `${baseUrl}/explore/tag/${tag}`, image: icon, @@ -27,5 +49,5 @@ export default async (ctx) => { logo: icon, language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/fantia/maintainer.ts b/lib/routes/fantia/maintainer.ts deleted file mode 100644 index 7bcd4c897..000000000 --- a/lib/routes/fantia/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/search/:type?/:caty?/:peroid?/:order?/:rating?/:keyword?': ['nczitzk'], - '/user/:id': ['nczitzk'], -}; diff --git a/lib/routes/fantia/namespace.ts b/lib/routes/fantia/namespace.ts new file mode 100644 index 000000000..35f2f8521 --- /dev/null +++ b/lib/routes/fantia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Fantia', + url: 'fantia.jp', +}; diff --git a/lib/routes/fantia/radar.ts b/lib/routes/fantia/radar.ts deleted file mode 100644 index 93ac44e67..000000000 --- a/lib/routes/fantia/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fantia.jp': { - _name: 'Fantia', - '.': [ - { - title: '用户投稿', - docs: 'https://docs.rsshub.app/routes/picture#fantia', - source: ['/fanclubs/:id'], - target: '/fantia/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/fantia/router.ts b/lib/routes/fantia/router.ts deleted file mode 100644 index 53af2d054..000000000 --- a/lib/routes/fantia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/search/:type?/:caty?/:period?/:order?/:rating?/:keyword?', './search'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/fantia/search.ts b/lib/routes/fantia/search.ts index 267cd0a6a..ee65b51b9 100644 --- a/lib/routes/fantia/search.ts +++ b/lib/routes/fantia/search.ts @@ -1,8 +1,83 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:type?/:caty?/:period?/:order?/:rating?/:keyword?', + categories: ['picture'], + example: '/fantia/search/posts/all/daily', + parameters: { + type: 'Type, see the table below, `posts` by default', + caty: 'Category, see the table below, can also be found in search page URL, `すべてのクリエイター` by default', + period: 'Ranking period, see the table below, empty by default', + order: 'Sorting, see the table below, `更新の新しい順` by default', + rating: 'Rating, see the table below, `すべて` by default', + keyword: 'Keyword, empty by default', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: [], + handler, + description: `Type + + | クリエイター | 投稿 | 商品 | コミッション | + | ------------ | ----- | -------- | ------------ | + | fanclubs | posts | products | commissions | + + Category + + | 分类 | 分类名 | + | ---------------------- | ---------- | + | イラスト | illust | + | 漫画 | comic | + | コスプレ | cosplay | + | YouTuber・配信者 | youtuber | + | Vtuber | vtuber | + | 音声作品・ASMR | voice | + | 声優・歌い手 | voiceactor | + | アイドル | idol | + | アニメ・映像・写真 | anime | + | 3D | 3d | + | ゲーム制作 | game | + | 音楽 | music | + | 小説 | novel | + | ドール | doll | + | アート・デザイン | art | + | プログラム | program | + | 創作・ハンドメイド | handmade | + | 歴史・評論・情報 | history | + | 鉄道・旅行・ミリタリー | railroad | + | ショップ | shop | + | その他 | other | + + Ranking period + + | デイリー | ウィークリー | マンスリー | 全期間 | + | -------- | ------------ | ---------- | ------ | + | daily | weekly | monthly | all | + + Sorting + + | 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 | + | -------------- | ------------ | -------------- | ------------ | -------------- | + | updater | update\_old | newer | create\_old | popular | + + Rating + + | すべて | 一般のみ | R18 のみ | + | ------ | -------- | -------- | + | all | general | adult |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'posts'; const caty = ctx.req.param('caty') || ''; const order = ctx.req.param('order') || 'updater'; @@ -62,9 +137,9 @@ export default async (ctx) => { break; } - ctx.set('data', { + return { title: `Fantia - Search ${type}`, link: apiUrl.replace('api/v1/search/', ''), item: items, - }); -}; + }; +} diff --git a/lib/routes/fantia/user.ts b/lib/routes/fantia/user.ts index 6f893457d..55ff06706 100644 --- a/lib/routes/fantia/user.ts +++ b/lib/routes/fantia/user.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['picture'], + example: '/fantia/user/3498', + parameters: { id: 'User id, can be found in user profile URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fantia.jp/fanclubs/:id'], + }, + name: 'User Posts', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://fantia.jp'; const userUrl = `${rootUrl}/api/v1/fanclubs/${ctx.req.param('id')}`; @@ -53,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Fantia - ${response.data.fanclub.fanclub_name_with_creator_name}`, link: `${rootUrl}/fanclubs/${ctx.req.param('id')}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/farmatters/index.ts b/lib/routes/farmatters/index.ts index bbfc137b4..7f66a9ad9 100644 --- a/lib/routes/farmatters/index.ts +++ b/lib/routes/farmatters/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -18,7 +19,31 @@ const ids = { 3: 1, }; -export default async (ctx) => { +export const route: Route = { + path: ['/exclusive/:locale?', '/news/:locale?', '/:locale?', '/:type/:id/:locale?'], + categories: ['new-media'], + example: '/farmatters/exclusive', + parameters: { locale: 'Locale, `zh-CN` or `en-US`, `zh-CN` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['farmatters.com/exclusive'], + target: '/exclusive', + }, + name: 'Exclusive', + maintainers: ['nczitzk'], + handler, + url: 'farmatters.com/news', + url: 'farmatters.com/exclusive', +}; + +async function handler(ctx) { const { type, id, locale = 'zh-CN' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -74,7 +99,7 @@ export default async (ctx) => { const subtitle = `${$('h4').first().text()}${type === 'wiki' ? ` - ${$('div.css-6f6728 div.MuiBox-root').eq(ids[id]).text()}` : ''}`; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('title').text().split(/-/)[0].trim()} - ${subtitle}`, link: currentUrl, @@ -85,5 +110,5 @@ export default async (ctx) => { logo: icon, subtitle, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/farmatters/maintainer.ts b/lib/routes/farmatters/maintainer.ts deleted file mode 100644 index 248c9fae3..000000000 --- a/lib/routes/farmatters/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/exclusive/:locale?': ['nczitzk'], - '/news/:locale?': ['nczitzk'], - '/tag/:id/:locale?': ['nczitzk'], - '/wiki/:id/:locale?': ['nczitzk'], - '/:locale?': ['nczitzk'], -}; diff --git a/lib/routes/farmatters/namespace.ts b/lib/routes/farmatters/namespace.ts new file mode 100644 index 000000000..eff1a7660 --- /dev/null +++ b/lib/routes/farmatters/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Farmatters', + url: 'farmatters.com', +}; diff --git a/lib/routes/farmatters/radar.ts b/lib/routes/farmatters/radar.ts deleted file mode 100644 index 3fa916d5e..000000000 --- a/lib/routes/farmatters/radar.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - 'farmatters.com': { - _name: 'Farmatters', - '.': [ - { - title: 'Viewpoint', - docs: 'https://docs.rsshub.app/routes/new-media#farmatters-viewpoint', - source: ['/news'], - target: '/farmatters/news', - }, - { - title: 'Exclusive', - docs: 'https://docs.rsshub.app/routes/new-media#farmatters-exclusive', - source: ['/exclusive'], - target: '/farmatters/exclusive', - }, - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/new-media#farmatters-tag', - source: ['/tag/:id', '/:locale/tag/:id'], - target: (params) => { - const id = params.id; - const locale = params.locale; - - return `/farmatters/tag${id ? `/${id}${locale ? `/${locale}` : ''}` : ''}`; - }, - }, - { - title: 'Wiki', - docs: 'https://docs.rsshub.app/routes/new-media#farmatters-wiki', - source: ['/wiki'], - target: '/farmatters/wiki', - }, - ], - }, -}; diff --git a/lib/routes/farmatters/router.ts b/lib/routes/farmatters/router.ts deleted file mode 100644 index 566fc3f85..000000000 --- a/lib/routes/farmatters/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/exclusive/:locale?', './'); - router.get('/news/:locale?', './'); - router.get('/:locale?', './'); - router.get('/:type/:id/:locale?', './'); -}; diff --git a/lib/routes/fastbull/express-news.ts b/lib/routes/fastbull/express-news.ts index 53712ace9..dfca27ea2 100644 --- a/lib/routes/fastbull/express-news.ts +++ b/lib/routes/fastbull/express-news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/express-news', + categories: ['finance'], + example: '/fastbull/express-news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fastbull.cn/express-news', 'fastbull.cn/'], + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + url: 'fastbull.cn/express-news', +}; + +async function handler() { const rootUrl = 'https://www.fastbull.cn'; const currentUrl = `${rootUrl}/express-news`; @@ -25,9 +48,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '实时财经快讯 - FastBull', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fastbull/maintainer.ts b/lib/routes/fastbull/maintainer.ts deleted file mode 100644 index 4a65f1222..000000000 --- a/lib/routes/fastbull/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/express-news': ['nczitzk'], - '/news': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/fastbull/namespace.ts b/lib/routes/fastbull/namespace.ts new file mode 100644 index 000000000..429d6ac84 --- /dev/null +++ b/lib/routes/fastbull/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '法布财经', + url: 'fastbull.cn', +}; diff --git a/lib/routes/fastbull/news.ts b/lib/routes/fastbull/news.ts index d6cd79ffa..e2b4b2cfc 100644 --- a/lib/routes/fastbull/news.ts +++ b/lib/routes/fastbull/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/news', '/'], + categories: ['finance'], + example: '/fastbull/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fastbull.cn/news', 'fastbull.cn/'], + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + url: 'fastbull.cn/news', +}; + +async function handler() { const rootUrl = 'https://www.fastbull.cn'; const currentUrl = `${rootUrl}/news`; @@ -53,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '财经头条、财经新闻、最新资讯 - FastBull', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fastbull/radar.ts b/lib/routes/fastbull/radar.ts deleted file mode 100644 index f63a8dd79..000000000 --- a/lib/routes/fastbull/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'fastbull.cn': { - _name: '法布财经', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/finance#fa-bu-cai-jing-xin-wen', - source: ['/news', '/'], - target: '/fastbull/news', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/finance#fa-bu-cai-jing-kuai-xun', - source: ['/express-news', '/'], - target: '/fastbull/express-news', - }, - ], - }, -}; diff --git a/lib/routes/fastbull/router.ts b/lib/routes/fastbull/router.ts deleted file mode 100644 index 45d0d38fd..000000000 --- a/lib/routes/fastbull/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/express-news', './express-news'); - router.get('/news', './news'); - router.get('/', './news'); -}; diff --git a/lib/routes/fda/cdrh.ts b/lib/routes/fda/cdrh.ts index 247e4533d..18a2c6dcf 100644 --- a/lib/routes/fda/cdrh.ts +++ b/lib/routes/fda/cdrh.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cdrh/:titleOnly?', + radar: { + source: ['fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates', 'fda.gov/'], + target: '/cdrh/:titleOnly', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates', +}; + +async function handler(ctx) { const titleOnly = !!(ctx.req.param('titleOnly') ?? ''); const rootUrl = 'https://www.fda.gov'; const currentUrl = `${rootUrl}/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates`; @@ -55,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fda/maintainer.ts b/lib/routes/fda/maintainer.ts deleted file mode 100644 index 91bcbb0b8..000000000 --- a/lib/routes/fda/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/cdrh': ['nczitzk'], -}; diff --git a/lib/routes/fda/namespace.ts b/lib/routes/fda/namespace.ts new file mode 100644 index 000000000..33fc99767 --- /dev/null +++ b/lib/routes/fda/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'U.S. Food and Drug Administration', + url: 'fda.gov', +}; diff --git a/lib/routes/fda/radar.ts b/lib/routes/fda/radar.ts deleted file mode 100644 index c6eebe17b..000000000 --- a/lib/routes/fda/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fda.gov': { - _name: 'U.S. Food and Drug Administration', - '.': [ - { - title: 'CDRHNew', - docs: 'https://docs.rsshub.app/routes/government#mei-guo-shi-pin-yao-pin-jian-du-guan-li-ju-cdrhnew', - source: ['/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates', '/'], - target: '/fda/cdrh/:titleOnly', - }, - ], - }, -}; diff --git a/lib/routes/fda/router.ts b/lib/routes/fda/router.ts deleted file mode 100644 index e8da2631f..000000000 --- a/lib/routes/fda/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/cdrh/:titleOnly?', './cdrh'); -}; diff --git a/lib/routes/feng/forum.ts b/lib/routes/feng/forum.ts index 68945509e..5aa510fd0 100644 --- a/lib/routes/feng/forum.ts +++ b/lib/routes/feng/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,32 @@ import { baseUrl, getForumMeta, getThreads, getThread } from './utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id/:type?', + categories: ['bbs'], + example: '/feng/forum/1', + parameters: { id: '版块 ID,可在版块 URL 找到', type: '排序,见下表,默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['feng.com/forum/photo/:id', 'feng.com/forum/:id'], + target: '/forum/:id', + }, + name: '社区', + maintainers: ['TonyRL'], + handler, + description: `| 最新回复 | 最新发布 | 热门 | 精华 | + | -------- | -------- | ---- | ------- | + | newest | all | hot | essence |`, +}; + +async function handler(ctx) { const topicId = Number(ctx.req.param('id')); const { type = 'all' } = ctx.req.param(); @@ -36,10 +62,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${topicMeta.topicName} - 社区 - 威锋 - 千万果粉大本营`, description: topicMeta.topicDescription, link: `${baseUrl}/forum/${topicId}`, item: posts, - }); -}; + }; +} diff --git a/lib/routes/feng/maintainer.ts b/lib/routes/feng/maintainer.ts deleted file mode 100644 index 0e178be09..000000000 --- a/lib/routes/feng/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/forum/:id/:type?': ['TonyRL'], -}; diff --git a/lib/routes/feng/namespace.ts b/lib/routes/feng/namespace.ts new file mode 100644 index 000000000..fed927479 --- /dev/null +++ b/lib/routes/feng/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '威锋', + url: 'feng.com', +}; diff --git a/lib/routes/feng/radar.ts b/lib/routes/feng/radar.ts deleted file mode 100644 index fe75fa5be..000000000 --- a/lib/routes/feng/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'feng.com': { - _name: '威锋', - '.': [ - { - title: '社区', - docs: 'https://docs.rsshub.app/routes/bbs#wei-feng', - source: ['/forum/photo/:id', '/forum/:id'], - target: '/feng/forum/:id', - }, - ], - }, -}; diff --git a/lib/routes/feng/router.ts b/lib/routes/feng/router.ts deleted file mode 100644 index b34522a6f..000000000 --- a/lib/routes/feng/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/forum/:id/:type?', './forum'); -}; diff --git a/lib/routes/ff14/ff14-global.ts b/lib/routes/ff14/ff14-global.ts index 48e8f305a..666c061b6 100644 --- a/lib/routes/ff14/ff14-global.ts +++ b/lib/routes/ff14/ff14-global.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,35 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: ['/global/:lang/:type?', '/ff14_global/:lang/:type?'], + categories: ['game'], + example: '/ff14/global/na/all', + parameters: { lang: 'Region', type: 'Category, `all` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'FINAL FANTASY XIV (The Lodestone)', + maintainers: ['chengyuhui'], + handler, + description: `Region + + | North Ameria | Europe | France | Germany | Japan | + | ------------ | ------ | ------ | ------- | ----- | + | na | eu | fr | de | jp | + + Category + + | all | topics | notices | maintenance | updates | status | developers | + | --- | ------ | ------- | ----------- | ------- | ------ | ---------- |`, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang'); const type = ctx.req.param('type') ?? 'all'; @@ -30,7 +59,7 @@ export default async (ctx) => { data = response.data; } - ctx.set('data', { + return { title: `FFXIV Lodestone updates (${type})`, link: `https://${lang}.finalfantasyxiv.com/lodestone/news/`, item: data.map(({ id, url, title, time, description, image }) => ({ @@ -43,5 +72,5 @@ export default async (ctx) => { pubDate: parseDate(time), guid: id, })), - }); -}; + }; +} diff --git a/lib/routes/ff14/ff14-zh.ts b/lib/routes/ff14/ff14-zh.ts index fe3c7d131..fa1c8a5cc 100644 --- a/lib/routes/ff14/ff14-zh.ts +++ b/lib/routes/ff14/ff14-zh.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,33 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/zh/:type?', '/ff14_zh/:type?'], + categories: ['game'], + example: '/ff14/zh/news', + parameters: { type: '分类名,预设为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ff.web.sdo.com/web8/index.html'], + target: '/zh', + }, + name: '最终幻想 14 国服', + maintainers: ['Kiotlin', 'ZeroClad', '15x15G'], + handler, + url: 'ff.web.sdo.com/web8/index.html', + description: `| 新闻 | 公告 | 活动 | 广告 | 所有 | + | ---- | -------- | ------ | --------- | ---- | + | news | announce | events | advertise | all |`, +}; + +async function handler(ctx) { const referer = 'https://ff.sdo.com/web8/index.html'; const type = ctx.req.param('type') ?? 'all'; @@ -29,7 +56,7 @@ export default async (ctx) => { const data = response.data.Data; - ctx.set('data', { + return { title: '最终幻想14(国服)新闻中心', link: referer + '#/newstab/newslist', description: '《最终幻想14》是史克威尔艾尼克斯出品的全球经典游戏品牌FINAL FANTASY系列的最新作品,IGN获得9.2高分!全球累计用户突破1600万!', @@ -42,5 +69,5 @@ export default async (ctx) => { }), pubDate: timezone(parseDate(PublishDate), +8), })), - }); -}; + }; +} diff --git a/lib/routes/ff14/maintainer.ts b/lib/routes/ff14/maintainer.ts deleted file mode 100644 index 961ef528e..000000000 --- a/lib/routes/ff14/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/global/:lang/:type?': ['chengyuhui'], - '/zh/:type?': ['Kiotlin', 'ZeroClad', '15x15G'], -}; diff --git a/lib/routes/ff14/namespace.ts b/lib/routes/ff14/namespace.ts new file mode 100644 index 000000000..32c7d0c4f --- /dev/null +++ b/lib/routes/ff14/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FINAL FANTASY XIV 最终幻想 14', + url: 'eu.finalfantasyxiv.com', +}; diff --git a/lib/routes/ff14/radar.ts b/lib/routes/ff14/radar.ts deleted file mode 100644 index d0b838a41..000000000 --- a/lib/routes/ff14/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -const finalfantasyxiv = [ - { - title: '国际服 (Lodestone)', - docs: 'https://docs.rsshub.app/routes/game#zui-zhong-huan-xiang-14', - source: ['/lodestone/news', '/'], - target: (_, url) => `/ff14/global/${url.match(/\/\/(\w+?)\.finalfantasyxiv\.com/)[1]}`, - }, -]; - -export default { - 'finalfantasyxiv.com': { - _name: '最终幻想 14', - eu: finalfantasyxiv, - fr: finalfantasyxiv, - de: finalfantasyxiv, - jp: finalfantasyxiv, - na: finalfantasyxiv, - }, - 'sdo.com': { - _name: '最终幻想 14', - 'ff.web': [ - { - title: '国服', - docs: 'https://docs.rsshub.app/routes/game#zui-zhong-huan-xiang-14', - source: ['/web8/index.html'], - target: '/ff14/zh', - }, - ], - }, -}; diff --git a/lib/routes/ff14/router.ts b/lib/routes/ff14/router.ts deleted file mode 100644 index b6a6109be..000000000 --- a/lib/routes/ff14/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/global/:lang/:type?', './ff14-global'); - router.get('/zh/:type?', './ff14-zh'); - // Deprecated - router.get('/ff14_global/:lang/:type?', './ff14-global'); - router.get('/ff14_zh/:type?', './ff14-zh'); -}; diff --git a/lib/routes/fffdm/maintainer.ts b/lib/routes/fffdm/maintainer.ts deleted file mode 100644 index 57c64b1bb..000000000 --- a/lib/routes/fffdm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/manhua/:id/:cdn?': ['zytomorrow'], -}; diff --git a/lib/routes/fffdm/manhua/manhua.ts b/lib/routes/fffdm/manhua/manhua.ts index 19a3829ea..474c8ccff 100644 --- a/lib/routes/fffdm/manhua/manhua.ts +++ b/lib/routes/fffdm/manhua/manhua.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -20,7 +21,29 @@ const get_pic = async (url) => { }; }; -export default async (ctx) => { +export const route: Route = { + path: '/manhua/:id/:cdn?', + categories: ['anime'], + example: '/fffdm/manhua/93', + parameters: { id: '漫画ID。默认获取全部,建议使用通用参数limit获取指定数量', cdn: 'cdn加速器。默认5,当前可选1-5' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.fffdm.com/manhua/:id', 'www.fffdm.com/:id'], + target: '/manhua/:id', + }, + name: '在线漫画', + maintainers: ['zytomorrow'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const count = ctx.req.query('limit') || 99999; const cdnNum = ctx.req.param('cdn') || 5; @@ -45,10 +68,10 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: '风之动漫 - ' + chapter_detail[0].comicTitle, link: `${host}/${id}`, description: '风之动漫', item: chapter_detail, - }); -}; + }; +} diff --git a/lib/routes/fffdm/namespace.ts b/lib/routes/fffdm/namespace.ts new file mode 100644 index 000000000..e6bcccf5f --- /dev/null +++ b/lib/routes/fffdm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '风之动漫', + url: 'manhua.fffdm.com', +}; diff --git a/lib/routes/fffdm/radar.ts b/lib/routes/fffdm/radar.ts deleted file mode 100644 index beba4740f..000000000 --- a/lib/routes/fffdm/radar.ts +++ /dev/null @@ -1,14 +0,0 @@ -const fffdm = { - title: '在线漫画', - docs: 'https://docs.rsshub.app/routes/anime#feng-zhi-dong-man', - source: ['/manhua/:id', '/:id'], - target: '/fffdm/manhua/:id', -}; - -export default { - 'fffdm.com': { - _name: '风之动漫', - manhua: [fffdm], - www: [fffdm], - }, -}; diff --git a/lib/routes/fffdm/router.ts b/lib/routes/fffdm/router.ts deleted file mode 100644 index f97f3480f..000000000 --- a/lib/routes/fffdm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/manhua/:id/:cdn?', './manhua/manhua'); -}; diff --git a/lib/routes/finology/bullets.ts b/lib/routes/finology/bullets.ts index 17f363c21..ba0ea7d05 100644 --- a/lib/routes/finology/bullets.ts +++ b/lib/routes/finology/bullets.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bullets', + categories: ['finance'], + example: '/finology/bullets', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['insider.finology.in/bullets'], + }, + name: 'Bullets', + maintainers: ['Rjnishant530'], + handler, + url: 'insider.finology.in/bullets', +}; + +async function handler() { const baseUrl = 'https://insider.finology.in/bullets'; const { data: response } = await got(baseUrl); @@ -23,7 +46,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Finology Insider Bullets', link: baseUrl, item: listItems, @@ -31,5 +54,5 @@ export default async (ctx) => { logo: 'https://assets.finology.in/insider/images/favicon/apple-touch-icon.png', icon: 'https://assets.finology.in/insider/images/favicon/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/finology/maintainer.ts b/lib/routes/finology/maintainer.ts deleted file mode 100644 index 99a0b30f7..000000000 --- a/lib/routes/finology/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/bullets': ['Rjnishant530'], - '/:category': ['Rjnishant530'], - '/most-viewed/:time': ['Rjnishant530'], - '/tag/:topic': ['Rjnishant530'], -}; diff --git a/lib/routes/finology/most-viewed.ts b/lib/routes/finology/most-viewed.ts index caf5aa85b..79c500a79 100644 --- a/lib/routes/finology/most-viewed.ts +++ b/lib/routes/finology/most-viewed.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import logger from '@/utils/logger'; import { getItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/most-viewed/:time', + categories: ['finance'], + example: '/finology/most-viewed/monthly', + parameters: { time: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['insider.finology.in/:category'], + target: '/:category', + }, + name: 'Most Viewed', + maintainers: ['Rjnishant530'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://insider.finology.in/most-viewed'; let selector; let title; @@ -21,7 +44,7 @@ export default async (ctx) => { selector, }; const listItems = await getItems(ctx, baseUrl, extra); - ctx.set('data', { + return { title: `Most Viewed ${title} - Finology Insider`, link: baseUrl, item: listItems, @@ -29,5 +52,5 @@ export default async (ctx) => { logo: 'https://assets.finology.in/insider/images/favicon/apple-touch-icon.png', icon: 'https://assets.finology.in/insider/images/favicon/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/finology/namespace.ts b/lib/routes/finology/namespace.ts new file mode 100644 index 000000000..c7e8ecee0 --- /dev/null +++ b/lib/routes/finology/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Finology Insider', + url: 'insider.finology.in', +}; diff --git a/lib/routes/finology/radar.ts b/lib/routes/finology/radar.ts deleted file mode 100644 index 7a08a3485..000000000 --- a/lib/routes/finology/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'finology.in': { - _name: 'Finology Insider', - insider: [ - { - title: 'Bullets', - docs: 'https://docs.rsshub.app/routes/finance#finology-insider', - source: ['/bullets'], - target: '/finology/bullets', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/finance#finology-insider', - source: '/:category', - target: '/finology/:category', - }, - { - title: 'Most Viewed', - docs: 'https://docs.rsshub.app/routes/finance#finology-insider', - source: '/most-viewed', - target: '/finology/most-viewed/monthly', - }, - { - title: 'Trending Topic', - docs: 'https://docs.rsshub.app/routes/finance#finology-insider', - source: ['/tag/:topic'], - target: '/finology/tag/:topic', - }, - ], - }, -}; diff --git a/lib/routes/finology/router.ts b/lib/routes/finology/router.ts deleted file mode 100644 index 4765fc5e7..000000000 --- a/lib/routes/finology/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/bullets', './bullets'); - router.get('/:category', './tag'); - router.get('/most-viewed/:time', './most-viewed'); - router.get('/tag/:topic', './tag'); -}; diff --git a/lib/routes/finology/tag.ts b/lib/routes/finology/tag.ts index 7bc2c72ef..8a7ff52cc 100644 --- a/lib/routes/finology/tag.ts +++ b/lib/routes/finology/tag.ts @@ -1,7 +1,48 @@ +import { Route } from '@/types'; import logger from '@/utils/logger'; import { getItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/:category', '/tag/:topic'], + categories: ['finance'], + example: '/finology/success-stories', + parameters: { category: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['insider.finology.in/:category'], + }, + name: 'Category', + maintainers: ['Rjnishant530'], + handler, + description: `:::note[Category] + | Category | Link | + | --------------------- | ------------------ | + | **Business** | business | + | Big Shots | entrepreneurship | + | Startups | startups-india | + | Brand Games | success-stories | + | Juicy Scams | juicy-scams | + | **Finance** | finance | + | Macro Moves | economy | + | News Platter | market-news | + | Tax Club | tax | + | Your Money | your-money | + | **Invest** | investing | + | Stock Market | stock-market | + | Financial Ratios | stock-ratios | + | Investor's Psychology | behavioral-finance | + | Mutual Funds | mutual-fund | + :::`, +}; + +async function handler(ctx) { const { topic, category } = ctx.req.param(); const baseUrl = 'https://insider.finology.in'; let route; @@ -21,7 +62,7 @@ export default async (ctx) => { selector: `div.w100.pb${number}.bg-color.flex.flex-col.align-center div.w23.br0625.shadow.position-r.bg-white.m-w100.card.t-w45`, }; const listItems = await getItems(ctx, `${baseUrl}${route}`, extra); - ctx.set('data', { + return { title: `${extra.topicName} - Finology Insider`, link: `${baseUrl}${route}`, item: listItems, @@ -29,5 +70,5 @@ export default async (ctx) => { logo: 'https://assets.finology.in/insider/images/favicon/apple-touch-icon.png', icon: 'https://assets.finology.in/insider/images/favicon/favicon-32x32.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/finviz/maintainer.ts b/lib/routes/finviz/maintainer.ts deleted file mode 100644 index b67f8fb97..000000000 --- a/lib/routes/finviz/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:ticker': ['HenryQW'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/finviz/namespace.ts b/lib/routes/finviz/namespace.ts new file mode 100644 index 000000000..9cbf12343 --- /dev/null +++ b/lib/routes/finviz/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'finviz', + url: 'finviz.com', +}; diff --git a/lib/routes/finviz/news.ts b/lib/routes/finviz/news.ts index 19ad70183..5417cfc8c 100644 --- a/lib/routes/finviz/news.ts +++ b/lib/routes/finviz/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; @@ -8,7 +9,32 @@ const categories = { blogs: 1, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['finance'], + example: '/finviz', + parameters: { category: 'Category, see below, News by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['finviz.com/news.ashx', 'finviz.com/'], + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + url: 'finviz.com/news.ashx', + description: `| News | Blog | + | ---- | ---- | + | news | blog |`, +}; + +async function handler(ctx) { const { category = 'News' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 200; @@ -55,7 +81,7 @@ export default async (ctx) => { const icon = $('link[rel="icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `finviz - ${category}`, link: currentUrl, @@ -65,5 +91,5 @@ export default async (ctx) => { icon, logo: icon, subtitle: $('title').text(), - }); -}; + }; +} diff --git a/lib/routes/finviz/quote.ts b/lib/routes/finviz/quote.ts index 7d18552d8..ac057e314 100644 --- a/lib/routes/finviz/quote.ts +++ b/lib/routes/finviz/quote.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:ticker', + categories: ['finance'], + example: '/finviz/news/AAPL', + parameters: { ticker: 'The stock ticker' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'US Stock News', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const link = `https://finviz.com/quote.ashx?t=${ctx.req.param('ticker')}`; const response = await got(link); @@ -31,10 +50,10 @@ export default async (ctx) => { const name = $('.fullview-title b').text(); - ctx.set('data', { + return { title: `${ctx.req.param('ticker')} ${name} News by Finviz`, link, description: `A collection of ${name} news aggregated by Finviz.`, item, - }); -}; + }; +} diff --git a/lib/routes/finviz/radar.ts b/lib/routes/finviz/radar.ts deleted file mode 100644 index 3d4caf0c3..000000000 --- a/lib/routes/finviz/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'finviz.com': { - _name: 'finviz', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/finance#finviz-news', - source: ['/news.ashx', '/'], - target: '/finviz/:category?', - }, - { - title: 'US Stock News', - docs: 'https://docs.rsshub.app/routes/finance#finviz-mei-gu-gu-piao-xin-wen', - source: ['/quote.ashx', '/'], - target: '/finviz/news/:category?', - }, - ], - }, -}; diff --git a/lib/routes/finviz/router.ts b/lib/routes/finviz/router.ts deleted file mode 100644 index f7fa91085..000000000 --- a/lib/routes/finviz/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:ticker', './quote'); - router.get('/:category?', './news'); -}; diff --git a/lib/routes/firecore/index.ts b/lib/routes/firecore/index.ts index 47ecfe863..b1083914c 100644 --- a/lib/routes/firecore/index.ts +++ b/lib/routes/firecore/index.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:os', + categories: ['program-update'], + example: '/firecore/ios', + parameters: { os: '`ios`,`tvos`,`macos`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Release Notes', + maintainers: ['NathanDai'], + handler, +}; + +async function handler(ctx) { const host = 'https://firecore.com/releases'; const { data } = await got(host); const $ = load(data); @@ -29,9 +48,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Infuse Release Notes (${ctx.req.param('os')})`, link: 'https://firecore.com/releases', item: items, - }); -}; + }; +} diff --git a/lib/routes/firecore/maintainer.ts b/lib/routes/firecore/maintainer.ts deleted file mode 100644 index 8644503f7..000000000 --- a/lib/routes/firecore/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:os': ['NathanDai'], -}; diff --git a/lib/routes/firecore/namespace.ts b/lib/routes/firecore/namespace.ts new file mode 100644 index 000000000..4fbb0865e --- /dev/null +++ b/lib/routes/firecore/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Infuse', + url: 'firecore.com', +}; diff --git a/lib/routes/firecore/radar.ts b/lib/routes/firecore/radar.ts deleted file mode 100644 index ff3941040..000000000 --- a/lib/routes/firecore/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'firecore.com': { - _name: 'Infuse', - '.': [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/program-update#infuse', - source: ['/releases', '/'], - target: '/firecore/:os?', - }, - ], - }, -}; diff --git a/lib/routes/firecore/router.ts b/lib/routes/firecore/router.ts deleted file mode 100644 index 569b40580..000000000 --- a/lib/routes/firecore/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:os', './index'); -}; diff --git a/lib/routes/firefox/addons.ts b/lib/routes/firefox/addons.ts index 497e0fa15..beea7e9b5 100644 --- a/lib/routes/firefox/addons.ts +++ b/lib/routes/firefox/addons.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/addons/:id', + categories: ['program-update'], + example: '/firefox/addons/rsshub-radar', + parameters: { id: 'Add-ons id, can be found in add-ons url' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['addons.mozilla.org/:lang/firefox/addon/:id/versions', 'addons.mozilla.org/:lang/firefox/addon/:id'], + }, + name: 'Add-ons Update', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -12,7 +34,7 @@ export default async (ctx) => { const info = data.addons.byID[data.addons.bySlug[id]]; const versionIds = data.versions.bySlug[id].versionIds; - ctx.set('data', { + return { title: `${info.name} 附加组件更新 - Firefox`, description: info.summary || info.description, link: `https://addons.mozilla.org/zh-CN/firefox/addon/${id}/versions/`, @@ -31,5 +53,5 @@ export default async (ctx) => { category: info.categories, }; }), - }); -}; + }; +} diff --git a/lib/routes/firefox/breaches.ts b/lib/routes/firefox/breaches.ts index 6c174c7d9..653e56dc7 100644 --- a/lib/routes/firefox/breaches.ts +++ b/lib/routes/firefox/breaches.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/breaches', + categories: ['other'], + example: '/firefox/breaches', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['monitor.firefox.com/', 'monitor.firefox.com/breaches'], + }, + name: 'Firefox Monitor', + maintainers: ['TonyRL'], + handler, + url: 'monitor.firefox.com/', +}; + +async function handler() { const baseUrl = 'https://monitor.firefox.com'; const response = await got(`${baseUrl}/breaches`); @@ -28,11 +51,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), description: $('head meta[name=description]').attr('content').trim(), link: response.url, item: items, image: $('head meta[property=og:image]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/firefox/maintainer.ts b/lib/routes/firefox/maintainer.ts deleted file mode 100644 index 299cc8bb9..000000000 --- a/lib/routes/firefox/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/addons/:id': ['DIYgod'], - '/breaches': ['TonyRL'], - '/release/:platform': ['fengkx'], -}; diff --git a/lib/routes/firefox/namespace.ts b/lib/routes/firefox/namespace.ts new file mode 100644 index 000000000..4c932fd73 --- /dev/null +++ b/lib/routes/firefox/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Mozilla', + url: 'monitor.firefox.com', +}; diff --git a/lib/routes/firefox/radar.ts b/lib/routes/firefox/radar.ts deleted file mode 100644 index 411548f6f..000000000 --- a/lib/routes/firefox/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'firefox.com': { - _name: 'Mozilla', - monitor: [ - { - title: 'Firefox Monitor', - docs: 'https://docs.rsshub.app/routes/other#mozilla', - source: ['/', '/breaches'], - target: '/firefox/breaches', - }, - ], - }, - 'mozilla.org': { - _name: 'Mozilla', - addons: [ - { - title: 'Add-ons Update', - docs: 'https://docs.rsshub.app/routes/program-update#firefox', - source: ['/:lang/firefox/addon/:id/versions', '/:lang/firefox/addon/:id'], - target: '/firefox/addons/:id', - }, - ], - '.': [ - { - title: 'Firefox New Release', - docs: 'https://docs.rsshub.app/routes/program-update#firefox', - }, - ], - }, -}; diff --git a/lib/routes/firefox/release.ts b/lib/routes/firefox/release.ts index f8ecc5411..fdc05936a 100644 --- a/lib/routes/firefox/release.ts +++ b/lib/routes/firefox/release.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -10,7 +11,14 @@ const platformSlugs = { ios: 'ios/notes', }; -export default async (ctx) => { +export const route: Route = { + path: '/release/:platform?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { platform = 'desktop' } = ctx.req.param(); const devicePlatform = platform.replace('-', '/'); @@ -20,7 +28,7 @@ export default async (ctx) => { const version = $('.c-release-version').text(); const pubDate = parseDate($('.c-release-date').text(), 'MMMM D, YYYY'); - ctx.set('data', { + return { title: `Firefox ${platform} release notes`, link, item: [ @@ -32,5 +40,5 @@ export default async (ctx) => { pubDate, }, ], - }); -}; + }; +} diff --git a/lib/routes/firefox/router.ts b/lib/routes/firefox/router.ts deleted file mode 100644 index aa406de8e..000000000 --- a/lib/routes/firefox/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/addons/:id', './addons'); - router.get('/breaches', './breaches'); - router.get('/release/:platform?', './release'); -}; diff --git a/lib/routes/fisher-spb/maintainer.ts b/lib/routes/fisher-spb/maintainer.ts deleted file mode 100644 index 4df5db1d3..000000000 --- a/lib/routes/fisher-spb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['denis-ya'], -}; diff --git a/lib/routes/fisher-spb/namespace.ts b/lib/routes/fisher-spb/namespace.ts new file mode 100644 index 000000000..9217b6ed8 --- /dev/null +++ b/lib/routes/fisher-spb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Fisher Spb', + url: 'fisher.spb.ru', +}; diff --git a/lib/routes/fisher-spb/news.ts b/lib/routes/fisher-spb/news.ts index d97e4bfe8..712f830ea 100644 --- a/lib/routes/fisher-spb/news.ts +++ b/lib/routes/fisher-spb/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['other'], + example: '/fisher-spb/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fisher.spb.ru/news'], + }, + name: 'News', + maintainers: ['denis-ya'], + handler, + url: 'fisher.spb.ru/news', +}; + +async function handler() { const renderVideo = (link) => art(path.join(__dirname, './templates/video.art'), { link }); const renderImage = (href) => art(path.join(__dirname, './templates/image.art'), { href }); @@ -43,9 +66,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: $('head > title').text().trim(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fisher-spb/radar.ts b/lib/routes/fisher-spb/radar.ts deleted file mode 100644 index be6d1855e..000000000 --- a/lib/routes/fisher-spb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fisher.spb.ru': { - _name: 'fisher spb', - '.': [ - { - title: 'news', - docs: 'https://docs.rsshub.app/routes/other#fisher-spb', - source: ['/news'], - target: '/fisher-spb/news', - }, - ], - }, -}; diff --git a/lib/routes/fisher-spb/router.ts b/lib/routes/fisher-spb/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/fisher-spb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/fishshell/index.ts b/lib/routes/fishshell/index.ts index 9fab39c5d..9afd23118 100644 --- a/lib/routes/fishshell/index.ts +++ b/lib/routes/fishshell/index.ts @@ -1,14 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['fishshell.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['x2cf'], + handler, + url: 'fishshell.com/', +}; + +async function handler() { const link = 'https://fishshell.com/docs/current/relnotes.html'; const data = await cache.tryGet(link, async () => (await got(link)).data, config.cache.contentExpire, false); const $ = load(data); - ctx.set('data', { + return { link, title: 'Release notes — fish-shell', language: 'en', @@ -24,5 +37,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/fishshell/maintainer.ts b/lib/routes/fishshell/maintainer.ts deleted file mode 100644 index 35caea7f4..000000000 --- a/lib/routes/fishshell/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['x2cf'], -}; diff --git a/lib/routes/fishshell/namespace.ts b/lib/routes/fishshell/namespace.ts new file mode 100644 index 000000000..5681e656a --- /dev/null +++ b/lib/routes/fishshell/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'fish shell', + url: 'fishshell.com', +}; diff --git a/lib/routes/fishshell/radar.ts b/lib/routes/fishshell/radar.ts deleted file mode 100644 index 3a591a2f9..000000000 --- a/lib/routes/fishshell/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fishshell.com': { - _name: 'fish shell', - '.': [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/program-update#fish-shell', - source: ['/'], - target: '/fishshell', - }, - ], - }, -}; diff --git a/lib/routes/fishshell/router.ts b/lib/routes/fishshell/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/fishshell/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/fjksbm/index.ts b/lib/routes/fjksbm/index.ts index ae56e418f..04a2e066a 100644 --- a/lib/routes/fjksbm/index.ts +++ b/lib/routes/fjksbm/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['study'], + example: '/fjksbm', + parameters: { category: '分类,见下表,默认为网络报名进行中' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fjksbm.com/portal/:category?', 'fjksbm.com/portal'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 已发布公告 (方案),即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束,等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 | + | --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- | + | 0 | 1 | 2 | 3 | 4 | 5 | news | policy |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '0'; const id = Number.parseInt(category); @@ -44,11 +69,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.panel-heading') .eq(isNumber ? id : 1) .text()} - 福建考试报名网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fjksbm/maintainer.ts b/lib/routes/fjksbm/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/fjksbm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/fjksbm/namespace.ts b/lib/routes/fjksbm/namespace.ts new file mode 100644 index 000000000..8bf9fdf45 --- /dev/null +++ b/lib/routes/fjksbm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '福建考试报名网', + url: 'fjksbm.com', +}; diff --git a/lib/routes/fjksbm/radar.ts b/lib/routes/fjksbm/radar.ts deleted file mode 100644 index 67b3d3f8f..000000000 --- a/lib/routes/fjksbm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fjksbm.com': { - _name: '福建考试报名网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/study#fu-jian-kao-shi-bao-ming-wang', - source: ['/portal/:category?', '/portal'], - target: '/fjksbm/:category?', - }, - ], - }, -}; diff --git a/lib/routes/fjksbm/router.ts b/lib/routes/fjksbm/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/fjksbm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/flyert/creditcard.ts b/lib/routes/flyert/creditcard.ts index db18888c9..214cbfa52 100644 --- a/lib/routes/flyert/creditcard.ts +++ b/lib/routes/flyert/creditcard.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,50 @@ import iconv from 'iconv-lite'; const gbk2utf8 = (s) => iconv.decode(s, 'gbk'); const host = 'https://www.flyert.com'; -export default async (ctx) => { +export const route: Route = { + path: '/creditcard/:bank', + categories: ['travel'], + example: '/flyert/creditcard/zhongxin', + parameters: { bank: '信用卡板块各银行的拼音简称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['flyert.com/'], + }, + name: '信用卡', + maintainers: ['nicolaszf'], + handler, + url: 'flyert.com/', + description: `| 信用卡模块 | bank | + | ---------- | ------------- | + | 国内信用卡 | creditcard | + | 浦发银行 | pufa | + | 招商银行 | zhaoshang | + | 中信银行 | zhongxin | + | 交通银行 | jiaotong | + | 中国银行 | zhonghang | + | 工商银行 | gongshang | + | 广发银行 | guangfa | + | 农业银行 | nongye | + | 建设银行 | jianshe | + | 汇丰银行 | huifeng | + | 民生银行 | mingsheng | + | 兴业银行 | xingye | + | 花旗银行 | huaqi | + | 上海银行 | shanghai | + | 无卡支付 | wuka | + | 投资理财 | 137 | + | 网站权益汇 | 145 | + | 境外信用卡 | intcreditcard |`, +}; + +async function handler(ctx) { const bank = ctx.req.param('bank'); const target = `${host}/forum-${bank}-1.html`; let bankname = ''; @@ -81,10 +125,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: `飞客茶馆信用卡 - ${bankname}`, link: 'https://www.flyert.com/', description: `飞客茶馆信用卡 - ${bankname}`, item: result, - }); -}; + }; +} diff --git a/lib/routes/flyert/maintainer.ts b/lib/routes/flyert/maintainer.ts deleted file mode 100644 index 2a30cfc3e..000000000 --- a/lib/routes/flyert/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/preferential': ['howel52'], - '/creditcard/:bank': ['nicolaszf'], -}; diff --git a/lib/routes/flyert/namespace.ts b/lib/routes/flyert/namespace.ts new file mode 100644 index 000000000..b12044195 --- /dev/null +++ b/lib/routes/flyert/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '飞客茶馆', + url: 'flyert.com', +}; diff --git a/lib/routes/flyert/preferential.ts b/lib/routes/flyert/preferential.ts index eb0bf845f..4aaa67991 100644 --- a/lib/routes/flyert/preferential.ts +++ b/lib/routes/flyert/preferential.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,29 @@ const gbk2utf8 = (s) => iconv.decode(s, 'gbk'); const host = 'https://www.flyert.com'; const target = `${host}/forum.php?mod=forumdisplay&sum=all&fid=all&catid=322`; -export default async (ctx) => { +export const route: Route = { + path: '/preferential', + categories: ['travel'], + example: '/flyert/preferential', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['flyert.com/'], + }, + name: '优惠信息', + maintainers: ['howel52'], + handler, + url: 'flyert.com/', +}; + +async function handler() { const response = await got(target, { responseType: 'buffer', }); @@ -40,10 +63,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '飞客茶馆优惠', link: 'https://www.flyert.com/', description: '飞客茶馆优惠', item: items, - }); -}; + }; +} diff --git a/lib/routes/flyert/radar.ts b/lib/routes/flyert/radar.ts deleted file mode 100644 index 9bd2f9406..000000000 --- a/lib/routes/flyert/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'flyert.com': { - _name: '飞客茶馆', - '.': [ - { - title: '优惠信息', - docs: 'https://docs.rsshub.app/routes/travel#fei-ke-cha-guan-you-hui-xin-xi', - source: '/', - target: '/flyert/preferential', - }, - { - title: '信用卡', - docs: 'https://docs.rsshub.app/routes/travel#fei-ke-cha-guan-xin-yong-ka', - source: '/', - target: '/flyert/creditcard/:bank', - }, - ], - }, -}; diff --git a/lib/routes/flyert/router.ts b/lib/routes/flyert/router.ts deleted file mode 100644 index dcdb400fb..000000000 --- a/lib/routes/flyert/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/preferential', './preferential'); - router.get('/creditcard/:bank', './creditcard'); -}; diff --git a/lib/routes/focustaiwan/index.ts b/lib/routes/focustaiwan/index.ts index 9d17a139c..403688d81 100644 --- a/lib/routes/focustaiwan/index.ts +++ b/lib/routes/focustaiwan/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,32 @@ import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/focustaiwan', + parameters: { category: '分类,见下表,默认为 news' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `| Latest | Editor's Picks | Photos of the Day | + | ------ | -------------- | ----------------- | + | news | editorspicks | photos | + + | Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports | + | -------- | ------------ | -------- | ------- | -------------- | ------- | ------ | + | politics | cross-strait | business | society | science & tech | culture | sports |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'news'; const rootUrl = 'https://focustaiwan.tw'; @@ -66,11 +92,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: response.data.ResultData.MetaData.Title, link: response.data.ResultData.MetaData.CanonicalUrl, item: items, itunes_author: 'Focus Taiwan', image: 'https://imgcdn.cna.com.tw/Eng/website/img/default.png', - }); -}; + }; +} diff --git a/lib/routes/focustaiwan/maintainer.ts b/lib/routes/focustaiwan/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/focustaiwan/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/focustaiwan/namespace.ts b/lib/routes/focustaiwan/namespace.ts new file mode 100644 index 000000000..d09d3d9eb --- /dev/null +++ b/lib/routes/focustaiwan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Focus Taiwan', + url: 'focustaiwan.tw', +}; diff --git a/lib/routes/focustaiwan/radar.ts b/lib/routes/focustaiwan/radar.ts deleted file mode 100644 index dd45966fa..000000000 --- a/lib/routes/focustaiwan/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'focustaiwan.tw': { - _name: 'Focus Taiwan', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/new-media#focus-taiwan-category', - source: ['/:category', '/'], - target: '/focustaiwan/category?', - }, - ], - }, -}; diff --git a/lib/routes/focustaiwan/router.ts b/lib/routes/focustaiwan/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/focustaiwan/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/followin/index.ts b/lib/routes/followin/index.ts index ab7f60735..c2a8fab14 100644 --- a/lib/routes/followin/index.ts +++ b/lib/routes/followin/index.ts @@ -1,8 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiUrl, favicon, getBParam, getBuildId, getGToken, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:categoryId?/:lang?', + categories: ['finance'], + example: '/followin', + parameters: { categoryId: 'Category ID, see table below, `1` by default', lang: 'Language, see table below, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Home', + maintainers: ['TonyRL'], + handler, + description: `Category ID + + | For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos | + | ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ | + | 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 | + + Language + + | English | 简体中文 | 繁體中文 | Tiếng Việt | + | ------- | -------- | -------- | ---------- | + | en | zh-Hans | zh-Hant | vi |`, +}; + +async function handler(ctx) { const { categoryId = '1', lang = 'en' } = ctx.req.param(); const { limit = 20 } = ctx.req.query(); const gToken = await getGToken(cache.tryGet); @@ -27,10 +57,10 @@ export default async (ctx) => { const list = parseList(response.data.list, lang, buildId); const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: 'Followin', link: 'https://followin.io', image: favicon, item: items, - }); -}; + }; +} diff --git a/lib/routes/followin/kol.ts b/lib/routes/followin/kol.ts index 16b490376..d22013d61 100644 --- a/lib/routes/followin/kol.ts +++ b/lib/routes/followin/kol.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getBuildId, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/kol/:kolId/:lang?', + categories: ['finance'], + example: '/followin/kol/4075592991', + parameters: { kolId: 'KOL ID, can be found in URL', lang: 'Language, see table above, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['followin.io/:lang/kol/:kolId', 'followin.io/kol/:kolId'], + }, + name: 'KOL', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { kolId, lang = 'en' } = ctx.req.param(); const { limit = 10 } = ctx.req.query(); @@ -15,12 +37,12 @@ export default async (ctx) => { const list = parseList(queries.find((q) => q.queryKey[0] === '/feed/list/user').state.data.pages[0].list.slice(0, limit), lang, buildId); const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `${profile.nickname} - Followin`, description: profile.bio, link: `${baseUrl}/${lang}/kol/${kolId}`, image: profile.avatar, language: lang, item: items, - }); -}; + }; +} diff --git a/lib/routes/followin/maintainer.ts b/lib/routes/followin/maintainer.ts deleted file mode 100644 index 3d981e3ce..000000000 --- a/lib/routes/followin/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/kol/:kolId/:lang?': ['TonyRL'], - '/news/:lang?': ['TonyRL'], - '/tag/:tagId/:lang?': ['TonyRL'], - '/topic/:topicId/:lang?': ['TonyRL'], - '/:categoryId?/:lang?': ['TonyRL'], -}; diff --git a/lib/routes/followin/namespace.ts b/lib/routes/followin/namespace.ts new file mode 100644 index 000000000..f3f71c7a7 --- /dev/null +++ b/lib/routes/followin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Followin', + url: 'followin.io', +}; diff --git a/lib/routes/followin/news.ts b/lib/routes/followin/news.ts index a4130a6e2..d1adec33c 100644 --- a/lib/routes/followin/news.ts +++ b/lib/routes/followin/news.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, favicon, getBuildId, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:lang?', + categories: ['finance'], + example: '/followin/news', + parameters: { lang: 'Language, see table above, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['followin.io/:lang?/news', 'followin.io/news'], + }, + name: 'News', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { lang = 'en' } = ctx.req.param(); const { limit = 20 } = ctx.req.query(); @@ -12,11 +34,11 @@ export default async (ctx) => { const list = parseList(response.pageProps.dehydratedState.queries.find((q) => q.queryKey[0] === '/feed/list/recommended/news').state.data.pages[0].list.slice(0, limit), lang, buildId); const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `${lang === 'en' ? 'News' : lang === 'vi' ? 'Bản tin' : '快讯'} - Followin`, link: `${baseUrl}/${lang}/news`, image: favicon, language: lang, item: items, - }); -}; + }; +} diff --git a/lib/routes/followin/radar.ts b/lib/routes/followin/radar.ts deleted file mode 100644 index ffbf4e16f..000000000 --- a/lib/routes/followin/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'followin.io': { - _name: 'Followin', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/finance#followin', - source: ['/:lang'], - target: (params) => (params.lang === 'news' ? '' : '/followin/1/:lang'), - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/finance#followin', - source: ['/:lang?/news', '/news'], - target: '/followin/news/:lang?', - }, - { - title: 'KOL', - docs: 'https://docs.rsshub.app/routes/finance#followin', - source: ['/:lang/kol/:kolId', '/kol/:kolId'], - target: '/followin/kol/:kolId/:lang?', - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/finance#followin', - source: ['/:lang/topic/:topicId', '/topic/:topicId'], - target: '/followin/topic/:topicId/:lang?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/finance#followin', - source: ['/:lang/tag/:tagId', '/tag/:tagId'], - target: '/followin/tag/:tagId/:lang?', - }, - ], - }, -}; diff --git a/lib/routes/followin/router.ts b/lib/routes/followin/router.ts deleted file mode 100644 index c23c86f99..000000000 --- a/lib/routes/followin/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/kol/:kolId/:lang?', './kol'); - router.get('/news/:lang?', './news'); - router.get('/tag/:tagId/:lang?', './tag'); - router.get('/topic/:topicId/:lang?', './topic'); - router.get('/:categoryId?/:lang?', './index'); -}; diff --git a/lib/routes/followin/tag.ts b/lib/routes/followin/tag.ts index 0d9f33f1c..07c0f4a96 100644 --- a/lib/routes/followin/tag.ts +++ b/lib/routes/followin/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiUrl, baseUrl, getBParam, getBuildId, getGToken, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tagId/:lang?', + categories: ['finance'], + example: '/followin/tag/177008', + parameters: { tagId: 'Tag ID, can be found in URL', lang: 'Language, see table above, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['followin.io/:lang/tag/:tagId', 'followin.io/tag/:tagId'], + }, + name: 'Tag', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { tagId, lang = 'en' } = ctx.req.param(); const { limit = 20 } = ctx.req.query(); @@ -34,12 +56,12 @@ export default async (ctx) => { const list = parseList(tagResponse.data.list.slice(0, limit), lang, buildId); const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `${tagInfo.name} - Followin`, description: tagInfo.description, link: `${baseUrl}/${lang}/tag/${tagId}`, image: tagInfo.logo, language: lang, item: items, - }); -}; + }; +} diff --git a/lib/routes/followin/topic.ts b/lib/routes/followin/topic.ts index 34e1444d1..c3d7594fc 100644 --- a/lib/routes/followin/topic.ts +++ b/lib/routes/followin/topic.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getBuildId, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topicId/:lang?', + categories: ['finance'], + example: '/followin/topic/40', + parameters: { topicId: 'Topic ID, can be found in URL', lang: 'Language, see table above, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['followin.io/:lang/topic/:topicId', 'followin.io/topic/:topicId'], + }, + name: 'Topic', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { topicId, lang = 'en' } = ctx.req.param(); const { limit = 20 } = ctx.req.query(); @@ -15,12 +37,12 @@ export default async (ctx) => { const list = parseList(queries.find((q) => q.queryKey[0] === '/feed/list/topic').state.data.pages[0].list.slice(0, limit), lang, buildId); const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `${topicInfo.title} - Followin`, description: topicInfo.desc, link: `${baseUrl}/${lang}/topic/${topicId}`, image: topicInfo.logo, language: lang, item: items, - }); -}; + }; +} diff --git a/lib/routes/foresightnews/article.ts b/lib/routes/foresightnews/article.ts index 4f166d3da..ec83edfb4 100644 --- a/lib/routes/foresightnews/article.ts +++ b/lib/routes/foresightnews/article.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/article', + categories: ['new-media'], + example: '/foresightnews/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['foresightnews.pro/'], + }, + name: '文章', + maintainers: ['nczitzk'], + handler, + url: 'foresightnews.pro/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const apiUrl = new URL('v1/articles', apiRootUrl).href; const { items } = await processItems(apiUrl, limit); - ctx.set('data', { + return { item: items, title: 'Foresight News - 文章', link: rootUrl, @@ -18,5 +41,5 @@ export default async (ctx) => { logo: icon, subtitle: '文章', author: 'Foresight News', - }); -}; + }; +} diff --git a/lib/routes/foresightnews/column.ts b/lib/routes/foresightnews/column.ts index b68d37a76..385ac74fe 100644 --- a/lib/routes/foresightnews/column.ts +++ b/lib/routes/foresightnews/column.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['new-media'], + example: '/foresightnews/column/1', + parameters: { id: '专栏 id, 可在对应专栏页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['foresightnews.pro/column/detail/:id', 'foresightnews.pro/'], + }, + name: '专栏', + maintainers: ['nczitzk'], + handler, + url: 'foresightnews.pro/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -13,7 +36,7 @@ export default async (ctx) => { const column = info.column; - ctx.set('data', { + return { item: items, title: `Foresight News - ${column}`, link: currentUrl, @@ -24,5 +47,5 @@ export default async (ctx) => { logo: icon, subtitle: column, author: 'Foresight News', - }); -}; + }; +} diff --git a/lib/routes/foresightnews/index.ts b/lib/routes/foresightnews/index.ts index 32e1b12ac..7bf0b392e 100644 --- a/lib/routes/foresightnews/index.ts +++ b/lib/routes/foresightnews/index.ts @@ -1,13 +1,26 @@ +import { Route } from '@/types'; import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['foresightnews.pro/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'foresightnews.pro/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const apiUrl = new URL(`v2/feed`, apiRootUrl).href; const { items } = await processItems(apiUrl, limit); - ctx.set('data', { + return { item: items, title: 'Foresight News - 精选资讯', link: rootUrl, @@ -18,5 +31,5 @@ export default async (ctx) => { logo: icon, subtitle: '精选资讯', author: 'Foresight News', - }); -}; + }; +} diff --git a/lib/routes/foresightnews/maintainer.ts b/lib/routes/foresightnews/maintainer.ts deleted file mode 100644 index a9466fcff..000000000 --- a/lib/routes/foresightnews/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/': ['nczitzk'], - '/article': ['nczitzk'], - '/column/:id': ['nczitzk'], - '/news': ['nczitzk'], -}; diff --git a/lib/routes/foresightnews/namespace.ts b/lib/routes/foresightnews/namespace.ts new file mode 100644 index 000000000..2d1b022eb --- /dev/null +++ b/lib/routes/foresightnews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Foresight News', + url: 'foresightnews.pro', +}; diff --git a/lib/routes/foresightnews/news.ts b/lib/routes/foresightnews/news.ts index 8883dff37..b4d1877e0 100644 --- a/lib/routes/foresightnews/news.ts +++ b/lib/routes/foresightnews/news.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/foresightnews/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['foresightnews.pro/news', 'foresightnews.pro/'], + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + url: 'foresightnews.pro/news', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const apiUrl = new URL('v1/news', apiRootUrl).href; @@ -8,7 +31,7 @@ export default async (ctx) => { const { items } = await processItems(apiUrl, limit); - ctx.set('data', { + return { item: items, title: 'Foresight News - 快讯', link: currentUrl, @@ -19,5 +42,5 @@ export default async (ctx) => { logo: icon, subtitle: '快讯', author: 'Foresight News', - }); -}; + }; +} diff --git a/lib/routes/foresightnews/radar.ts b/lib/routes/foresightnews/radar.ts deleted file mode 100644 index fac1aa699..000000000 --- a/lib/routes/foresightnews/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'foresightnews.pro': { - _name: 'Foresight News', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#foresight-news-shou-ye', - source: ['/'], - target: '/foresightnews', - }, - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/new-media#foresight-news-wen-zhang', - source: ['/'], - target: '/foresightnews/article', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#foresight-news-kuai-xun', - source: ['/news', '/'], - target: '/foresightnews/news', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#foresight-news-zhuan-lan', - source: ['/column/detail/:id', '/'], - target: '/foresightnews/column/:id', - }, - ], - }, -}; diff --git a/lib/routes/foresightnews/router.ts b/lib/routes/foresightnews/router.ts deleted file mode 100644 index 02a3844b7..000000000 --- a/lib/routes/foresightnews/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/article', './article'); - router.get('/column/:id', './column'); - router.get('/news', './news'); - router.get('/', './'); -}; diff --git a/lib/routes/foreverblog/feeds.ts b/lib/routes/foreverblog/feeds.ts index c263617e5..3fac46fd7 100644 --- a/lib/routes/foreverblog/feeds.ts +++ b/lib/routes/foreverblog/feeds.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/feeds', + categories: ['blog'], + example: '/foreverblog/feeds', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.foreverblog.cn/feeds.html'], + }, + name: '专题展示 - 文章', + maintainers: ['7Wate', 'a180285'], + handler, + url: 'www.foreverblog.cn/feeds.html', +}; + +async function handler() { const currentUrl = 'https://www.foreverblog.cn/feeds.html'; const response = await got(currentUrl); @@ -28,9 +51,9 @@ export default async (ctx) => { }) .toArray(); - ctx.set('data', { + return { title: '十年之约——专题展示', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/foreverblog/maintainer.ts b/lib/routes/foreverblog/maintainer.ts deleted file mode 100644 index 0ed0a4661..000000000 --- a/lib/routes/foreverblog/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/feeds': ['7Wate', 'a180285'], -}; diff --git a/lib/routes/foreverblog/namespace.ts b/lib/routes/foreverblog/namespace.ts new file mode 100644 index 000000000..80f055dc0 --- /dev/null +++ b/lib/routes/foreverblog/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '十年之约', + url: 'www.foreverblog.cn', +}; diff --git a/lib/routes/foreverblog/radar.ts b/lib/routes/foreverblog/radar.ts deleted file mode 100644 index ee75106c7..000000000 --- a/lib/routes/foreverblog/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'foreverblog.cn': { - _name: '十年之约', - www: [ - { - title: '专题展示', - docs: 'https://docs.rsshub.app/routes/blog#shi-nian-zhi-yue', - source: ['/feeds.html'], - target: '/foreverblog/feeds', - }, - ], - }, -}; diff --git a/lib/routes/foreverblog/router.ts b/lib/routes/foreverblog/router.ts deleted file mode 100644 index 5e912c78a..000000000 --- a/lib/routes/foreverblog/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/feeds', './feeds'); -}; diff --git a/lib/routes/fortnite/maintainer.ts b/lib/routes/fortnite/maintainer.ts deleted file mode 100644 index 42a01f15f..000000000 --- a/lib/routes/fortnite/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:options?': ['lyqluis'], -}; diff --git a/lib/routes/fortnite/namespace.ts b/lib/routes/fortnite/namespace.ts new file mode 100644 index 000000000..4ddfa1b7a --- /dev/null +++ b/lib/routes/fortnite/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Fortnite', + url: 'fortnite.com', +}; diff --git a/lib/routes/fortnite/news.ts b/lib/routes/fortnite/news.ts index faafda4bb..826ff2b2f 100644 --- a/lib/routes/fortnite/news.ts +++ b/lib/routes/fortnite/news.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:options?', + categories: ['game'], + example: '/fortnite/news', + parameters: { options: 'Params' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['lyqluis'], + handler, + description: `- \`options.lang\`, optional, language, eg. \`/fortnite/news/lang=en-US\`, common languages are listed below, more languages are available one the [official website](https://www.fortnite.com/news) + + | English (default) | Spanish | Japanese | French | Korean | Polish | + | ----------------- | ------- | -------- | ------ | ------ | ------ | + | en-US | es-ES | ja | fr | ko | pl |`, +}; + +async function handler(ctx) { const options = ctx.req .param('options') ?.split('&') @@ -55,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Fortnite News', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/fortnite/radar.ts b/lib/routes/fortnite/radar.ts deleted file mode 100644 index 0f92aa15d..000000000 --- a/lib/routes/fortnite/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'fortnite.com': { - _name: 'Fortnite', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/game#fortnite', - source: ['/news'], - target: (_, url) => { - const lang = url.match(/\?(lang=\w*)/); - return lang ? `/fortnite/news/${lang[1]}` : `/fortnite/news`; - }, - }, - ], - }, -}; diff --git a/lib/routes/fortnite/router.ts b/lib/routes/fortnite/router.ts deleted file mode 100644 index 42bb4e4a2..000000000 --- a/lib/routes/fortnite/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:options?', './news'); -}; diff --git a/lib/routes/fortunechina/index.ts b/lib/routes/fortunechina/index.ts index 9fb54e900..68fb2de95 100644 --- a/lib/routes/fortunechina/index.ts +++ b/lib/routes/fortunechina/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/fortunechina', + parameters: { category: '分类,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fortunechina.com/:category', 'fortunechina.com/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 商业 | 领导力 | 科技 | 研究 | + | ------- | --------- | ---- | ------ | + | shangye | lindgaoli | keji | report |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://www.fortunechina.com'; @@ -63,9 +88,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: category ? $('title').text() : '财富中文网', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fortunechina/maintainer.ts b/lib/routes/fortunechina/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/fortunechina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/fortunechina/namespace.ts b/lib/routes/fortunechina/namespace.ts new file mode 100644 index 000000000..aee50b1ba --- /dev/null +++ b/lib/routes/fortunechina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '财富中文网', + url: 'fortunechina.com', +}; diff --git a/lib/routes/fortunechina/radar.ts b/lib/routes/fortunechina/radar.ts deleted file mode 100644 index 3427d99e0..000000000 --- a/lib/routes/fortunechina/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fortunechina.com': { - _name: '财富中文网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#cai-fu-zhong-wen-wang-fen-lei', - source: ['/:category', '/'], - target: '/fortunechina/:category?', - }, - ], - }, -}; diff --git a/lib/routes/fortunechina/router.ts b/lib/routes/fortunechina/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/fortunechina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/fosshub/index.ts b/lib/routes/fosshub/index.ts index eaed17a2b..457f6af32 100644 --- a/lib/routes/fosshub/index.ts +++ b/lib/routes/fosshub/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,25 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['program-update'], + example: '/fosshub/qBittorrent', + parameters: { id: 'Software id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Software Update', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'https://www.fosshub.com'; @@ -44,9 +63,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: `${$('#fh-ssd__hl').text()} - FossHub`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/fosshub/maintainer.ts b/lib/routes/fosshub/maintainer.ts deleted file mode 100644 index 6fcb97f14..000000000 --- a/lib/routes/fosshub/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['nczitzk'], -}; diff --git a/lib/routes/fosshub/namespace.ts b/lib/routes/fosshub/namespace.ts new file mode 100644 index 000000000..073737179 --- /dev/null +++ b/lib/routes/fosshub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FossHub', + url: 'fosshub.com', +}; diff --git a/lib/routes/fosshub/radar.ts b/lib/routes/fosshub/radar.ts deleted file mode 100644 index b9c4e6f7e..000000000 --- a/lib/routes/fosshub/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fosshub.com': { - _name: 'FossHub', - '.': [ - { - title: 'Software Update', - docs: 'https://docs.rsshub.app/routes/program-update#fosshub-software-update', - source: ['/'], - target: (params, url) => `/fosshub/${url.match(/\/(.*?)\.html$/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/fosshub/router.ts b/lib/routes/fosshub/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/fosshub/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/free/maintainer.ts b/lib/routes/free/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/free/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/free/namespace.ts b/lib/routes/free/namespace.ts new file mode 100644 index 000000000..7f65d7c80 --- /dev/null +++ b/lib/routes/free/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '免費資源網路社群', + url: 'free.com.tw', +}; diff --git a/lib/routes/free/radar.ts b/lib/routes/free/radar.ts deleted file mode 100644 index d051043f8..000000000 --- a/lib/routes/free/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'free.com.tw': { - _name: '免費資源網路社群', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#mian-fei-zi-yuan-wang-lu-she-qun', - source: ['/'], - target: '/free', - }, - ], - }, -}; diff --git a/lib/routes/free/router.ts b/lib/routes/free/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/free/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/free/rss.ts b/lib/routes/free/rss.ts index 5b5785a8e..4a0d56acd 100644 --- a/lib/routes/free/rss.ts +++ b/lib/routes/free/rss.ts @@ -1,11 +1,24 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['free.com.tw/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'free.com.tw/', +}; + +async function handler() { const url = 'https://free.com.tw/'; const response = await got(`${url}/wp-json/wp/v2/posts`); const list = response.data; - ctx.set('data', { + return { title: '免費資源網路社群', link: url, description: '免費資源網路社群 - 全部文章', @@ -15,5 +28,5 @@ export default async (ctx) => { pubDate: parseDate(item.date_gmt), description: item.content.rendered, })), - }); -}; + }; +} diff --git a/lib/routes/freebuf/index.ts b/lib/routes/freebuf/index.ts index d95c4db2b..1554c72d3 100644 --- a/lib/routes/freebuf/index.ts +++ b/lib/routes/freebuf/index.ts @@ -1,7 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/articles/:type', + categories: ['blog'], + example: '/freebuf/articles/web', + parameters: { type: '文章类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['freebuf.com/articles/:type/*.html', 'freebuf.com/articles/:type'], + }, + name: '文章', + maintainers: ['trganda'], + handler, + description: `:::tip + Freebuf 的文章页面带有反爬虫机制,所以目前无法获取文章的完整内容。 + :::`, +}; + +async function handler(ctx) { const { type = 'web' } = ctx.req.param(); const fapi = 'https://www.freebuf.com/fapi/frontend/category/list'; @@ -33,9 +58,9 @@ export default async (ctx) => { author: item.nickname, })); - ctx.set('data', { + return { title: `Freebuf ${type}`, link: rssLink, item: items, - }); -}; + }; +} diff --git a/lib/routes/freebuf/maintainer.ts b/lib/routes/freebuf/maintainer.ts deleted file mode 100644 index 6da162fb0..000000000 --- a/lib/routes/freebuf/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/articles/:type': ['trganda'], -}; diff --git a/lib/routes/freebuf/namespace.ts b/lib/routes/freebuf/namespace.ts new file mode 100644 index 000000000..ee90859eb --- /dev/null +++ b/lib/routes/freebuf/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FreeBuf', + url: 'freebuf.com', +}; diff --git a/lib/routes/freebuf/radar.ts b/lib/routes/freebuf/radar.ts deleted file mode 100644 index 90c92013a..000000000 --- a/lib/routes/freebuf/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'freebuf.com': { - _name: 'Freebuf', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/blog#freebuf', - source: ['/articles/:type/*.html', '/articles/:type'], - target: '/freebuf/articles/:type', - }, - ], - }, -}; diff --git a/lib/routes/freebuf/router.ts b/lib/routes/freebuf/router.ts deleted file mode 100644 index 45e64fc93..000000000 --- a/lib/routes/freebuf/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/articles/:type', './index'); -}; diff --git a/lib/routes/freecomputerbooks/index.ts b/lib/routes/freecomputerbooks/index.ts index 39f56c3ff..525420382 100644 --- a/lib/routes/freecomputerbooks/index.ts +++ b/lib/routes/freecomputerbooks/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +16,19 @@ async function cheerioLoad(url) { return load((await got(url)).data); } -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + radar: { + source: ['freecomputerbooks.com/', 'freecomputerbooks.com/index.html'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'freecomputerbooks.com/', +}; + +async function handler(ctx) { const categoryId = ctx.req.param('category')?.trim(); const requestURL = categoryId ? new URL(`${categoryId}.html`, baseURL).href : baseURL; const $ = await cheerioLoad(requestURL); @@ -25,7 +38,7 @@ export default async (ctx) => { // Needing more robust processing if some day more such elements show up. const categoryTitle = $('.maintitlebar').text(); - ctx.set('data', { + return { title: 'Free Computer Books - ' + categoryTitle, link: requestURL, description: $('title').text(), @@ -37,8 +50,8 @@ export default async (ctx) => { .toArray() .map((elem) => buildPostItem($(elem), categoryTitle, cache)) ), - }); -}; + }; +} function buildPostItem(listItem, categoryTitle, cache) { const $ = load(''); // the only use below doesn't care about the content diff --git a/lib/routes/freecomputerbooks/maintainer.ts b/lib/routes/freecomputerbooks/maintainer.ts deleted file mode 100644 index dd339b264..000000000 --- a/lib/routes/freecomputerbooks/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['cubroe'], - '/:category': ['cubroe'], -}; diff --git a/lib/routes/freecomputerbooks/namespace.ts b/lib/routes/freecomputerbooks/namespace.ts new file mode 100644 index 000000000..c9f380393 --- /dev/null +++ b/lib/routes/freecomputerbooks/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Free Computer Books', + url: 'freecomputerbooks.com', +}; diff --git a/lib/routes/freecomputerbooks/radar.ts b/lib/routes/freecomputerbooks/radar.ts deleted file mode 100644 index ee0b95911..000000000 --- a/lib/routes/freecomputerbooks/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'freecomputerbooks.com': { - _name: 'Free Computer Books', - '.': [ - { - title: 'Selected New Books', - docs: 'https://docs.rsshub.app/routes/reading#free-computer-books', - source: ['/', '/index.html'], - target: '/freecomputerbooks', - }, - { - title: 'Current Book List', - docs: 'https://docs.rsshub.app/routes/reading#free-computer-books', - source: ['/:category'], - target: (params, _, document) => { - const categoryId = params.category.replace('.html', ''); - - if (categoryId === 'index') { - return; // only matching the "Selected New Books" rule above - } - - if (!document.querySelector('ul[id^=newBooks]')) { - return; // not a proper book list page - } - - return '/freecomputerbooks/' + categoryId; - }, - }, - ], - }, -}; diff --git a/lib/routes/freecomputerbooks/router.ts b/lib/routes/freecomputerbooks/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/freecomputerbooks/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/freewechat/maintainer.ts b/lib/routes/freewechat/maintainer.ts deleted file mode 100644 index f771115a0..000000000 --- a/lib/routes/freewechat/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/profile/:id': ['TonyRL'], -}; diff --git a/lib/routes/freewechat/namespace.ts b/lib/routes/freewechat/namespace.ts new file mode 100644 index 000000000..f0c507840 --- /dev/null +++ b/lib/routes/freewechat/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '自由微信', + url: 'freewechat.com', +}; diff --git a/lib/routes/freewechat/profile.ts b/lib/routes/freewechat/profile.ts index 415a562a3..32f29957b 100644 --- a/lib/routes/freewechat/profile.ts +++ b/lib/routes/freewechat/profile.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; import { fixArticleContent } from '@/utils/wechat-mp'; const baseUrl = 'https://freewechat.com'; -export default async (ctx) => { +export const route: Route = { + path: '/profile/:id', + categories: ['new-media'], + example: '/freewechat/profile/MzI5NTUxNzk3OA==', + parameters: { id: '公众号 ID,可在URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['freewechat.com/profile/:id'], + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `${baseUrl}/profile/${id}`; const { data: response } = await got(url); @@ -55,10 +77,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, image: 'https://freewechat.com/favicon.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/freewechat/radar.ts b/lib/routes/freewechat/radar.ts deleted file mode 100644 index 807857985..000000000 --- a/lib/routes/freewechat/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'freewechat.com': { - _name: '自由微信', - '.': [ - { - title: '公众号', - docs: 'https://docs.rsshub.app/routes/new-media#zi-you-wei-xin', - source: ['/profile/:id'], - target: '/freewechat/profile/:id', - }, - ], - }, -}; diff --git a/lib/routes/freewechat/router.ts b/lib/routes/freewechat/router.ts deleted file mode 100644 index ccc3d8314..000000000 --- a/lib/routes/freewechat/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/profile/:id', './profile'); -}; diff --git a/lib/routes/ft/channel.ts b/lib/routes/ft/channel.ts index f17655b82..93f118421 100644 --- a/lib/routes/ft/channel.ts +++ b/lib/routes/ft/channel.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:language/:channel?', + categories: ['traditional-media'], + example: '/ft/chinese/hotstoryby7day', + parameters: { language: '语言,简体`chinese`,繁体`traditional`', channel: '频道,缺省为每日更新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'FT 中文网', + maintainers: ['HenryQW', 'xyqfer'], + handler, + description: `:::tip + - 不支持付费文章。 + ::: + + 通过提取文章全文,以提供比官方源更佳的阅读体验。 + + 支持所有频道,频道名称见 [官方频道 RSS](http://www.ftchinese.com/channel/rss.html). + + - 频道为单一路径,如 \`http://www.ftchinese.com/rss/news\` 则为 \`/ft/chinese/news\`. + - 频道包含多重路径,如 \`http://www.ftchinese.com/rss/column/007000002\` 则替换 \`/\` 为 \`-\` \`/ft/chinese/column-007000002\`.`, +}; + +async function handler(ctx) { ctx.set( 'data', await utils.getData({ @@ -9,4 +38,4 @@ export default async (ctx) => { ctx, }) ); -}; +} diff --git a/lib/routes/ft/maintainer.ts b/lib/routes/ft/maintainer.ts deleted file mode 100644 index 965cbf42c..000000000 --- a/lib/routes/ft/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/myft/:key': ['HenryQW'], - '/:language/:channel?': ['HenryQW', 'xyqfer'], -}; diff --git a/lib/routes/ft/myft.ts b/lib/routes/ft/myft.ts index 782805328..63879ac1d 100644 --- a/lib/routes/ft/myft.ts +++ b/lib/routes/ft/myft.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/myft/:key', + categories: ['traditional-media'], + example: '/ft/myft/rss-key', + parameters: { key: 'the last part of myFT personal RSS address' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'myFT personal RSS', + maintainers: ['HenryQW'], + handler, + description: `:::tip + - Visit ft.com -> myFT -> Contact Preferences to enable personal RSS feed, see [help.ft.com](https://help.ft.com/faq/email-alerts-and-contact-preferences/what-is-myft-rss-feed/) + - Obtain the key from the personal RSS address, it looks like \`12345678-abcd-4036-82db-vdv20db024b8\` + :::`, +}; + +async function handler(ctx) { const ProcessFeed = (content) => { // clean up the article content.find('div.o-share, aside, div.o-ads').remove(); @@ -44,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `FT.com - myFT`, link, description: `FT.com - myFT`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ft/namespace.ts b/lib/routes/ft/namespace.ts new file mode 100644 index 000000000..619b11640 --- /dev/null +++ b/lib/routes/ft/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Financial Times', + url: 'ftchinese.com', +}; diff --git a/lib/routes/ft/radar.ts b/lib/routes/ft/radar.ts deleted file mode 100644 index 61f651b4e..000000000 --- a/lib/routes/ft/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'ftchinese.com': { - _name: 'Financial Times', - '.': [ - { - title: 'FT 中文网', - docs: 'https://docs.rsshub.app/routes/traditional-media#financial-times', - }, - { - title: 'myFT 个人 RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#financial-times', - }, - ], - }, - 'ft.com': { - _name: 'Financial Times', - '.': [ - { - title: 'myFT personal RSS', - docs: 'https://docs.rsshub.app/routes/traditional-media#financial-times', - }, - ], - }, -}; diff --git a/lib/routes/ft/router.ts b/lib/routes/ft/router.ts deleted file mode 100644 index dc82f6e69..000000000 --- a/lib/routes/ft/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/myft/:key', './myft'); - router.get('/:language/:channel?', './channel'); -}; diff --git a/lib/routes/fuliba/latest.ts b/lib/routes/fuliba/latest.ts index 8c971b2eb..f0b7164db 100644 --- a/lib/routes/fuliba/latest.ts +++ b/lib/routes/fuliba/latest.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/fuliba/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fuliba2023.net/'], + }, + name: '最新', + maintainers: ['shinemoon'], + handler, + url: 'fuliba2023.net/', +}; + +async function handler(ctx) { const { data: response } = await got(`https://fuliba2023.net/wp-json/wp/v2/posts`, { searchParams: { per_page: ctx.req.query('limit') ?? 100, @@ -17,9 +40,9 @@ export default async (ctx) => { author: item._embedded.author[0].name, })); - ctx.set('data', { + return { title: '福利吧', link: `https://fuliba2023.net`, item: items, - }); -}; + }; +} diff --git a/lib/routes/fuliba/maintainer.ts b/lib/routes/fuliba/maintainer.ts deleted file mode 100644 index 957e2b6ec..000000000 --- a/lib/routes/fuliba/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['shinemoon'], -}; diff --git a/lib/routes/fuliba/namespace.ts b/lib/routes/fuliba/namespace.ts new file mode 100644 index 000000000..e0df1470c --- /dev/null +++ b/lib/routes/fuliba/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '福利吧', + url: 'fuliba2023.net', +}; diff --git a/lib/routes/fuliba/radar.ts b/lib/routes/fuliba/radar.ts deleted file mode 100644 index 197c19369..000000000 --- a/lib/routes/fuliba/radar.ts +++ /dev/null @@ -1,15 +0,0 @@ -const fuliba = { - _name: '福利吧', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#fuliba', - source: '/', - target: '/fuliba/latest', - }, - ], -}; - -export default { - 'fuliba2023.net': fuliba, -}; diff --git a/lib/routes/fuliba/router.ts b/lib/routes/fuliba/router.ts deleted file mode 100644 index cd57ba05c..000000000 --- a/lib/routes/fuliba/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './latest'); -}; diff --git a/lib/routes/furstar/archive.ts b/lib/routes/furstar/archive.ts index bb2667061..9a600faab 100644 --- a/lib/routes/furstar/archive.ts +++ b/lib/routes/furstar/archive.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/archive/:lang?', + categories: ['shopping'], + example: '/furstar/archive/cn', + parameters: { lang: '语言, 留空为jp, 支持cn, en' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['furstar.jp/:lang/archive.php', 'furstar.jp/archive.php'], + target: '/archive/:lang', + }, + name: '已经出售的角色列表', + maintainers: ['NeverBehave'], + handler, +}; + +async function handler(ctx) { const base = utils.langBase(ctx.req.param('lang')); const url = `${base}/archive.php`; const res = await got.get(url, { @@ -12,7 +35,7 @@ export default async (ctx) => { }); const info = utils.fetchAllCharacters(res.data, base); - ctx.set('data', { + return { title: 'Furstar 已出售角色', link: 'https://furstar.jp', description: 'Furstar 已经出售或预订的角色列表', @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(new Date().toISOString()), // No Time for now link: e.detailPage, })), - }); -}; + }; +} diff --git a/lib/routes/furstar/artists.ts b/lib/routes/furstar/artists.ts index 7da98254c..116dd2066 100644 --- a/lib/routes/furstar/artists.ts +++ b/lib/routes/furstar/artists.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/artists/:lang?', + categories: ['shopping'], + example: '/furstar/artists/cn', + parameters: { lang: '语言, 留空为jp, 支持cn, en' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['furstar.jp/'], + target: '/artists', + }, + name: '画师列表', + maintainers: ['NeverBehave'], + handler, + url: 'furstar.jp/', +}; + +async function handler(ctx) { const base = utils.langBase(ctx.req.param('lang')); const res = await got.get(base, { https: { @@ -16,7 +40,7 @@ export default async (ctx) => { .get(); artists.shift(); // the first one is "show all" - ctx.set('data', { + return { title: 'furstar 所有画家', link: 'https://furstar.jp', description: 'Furstar 所有画家列表', @@ -28,5 +52,5 @@ export default async (ctx) => { pubDate: parseDate(new Date().toISOString()), // No Time for now link: `${base}/${e.link}`, })), - }); -}; + }; +} diff --git a/lib/routes/furstar/index.ts b/lib/routes/furstar/index.ts index e1a1ae53e..06a73419b 100644 --- a/lib/routes/furstar/index.ts +++ b/lib/routes/furstar/index.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/characters/:lang?', + categories: ['shopping'], + example: '/furstar/characters/cn', + parameters: { lang: '语言, 留空为jp, 支持cn, en' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['furstar.jp/:lang', 'furstar.jp/'], + target: '/characters/:lang', + }, + name: '最新售卖角色列表', + maintainers: ['NeverBehave'], + handler, +}; + +async function handler(ctx) { const base = utils.langBase(ctx.req.param('lang')); const res = await got.get(base, { https: { @@ -18,7 +41,7 @@ export default async (ctx) => { info, }); - ctx.set('data', { + return { title: 'Furstar 最新角色', link: 'https://furstar.jp', description: 'Furstar 最近更新的角色列表', @@ -30,5 +53,5 @@ export default async (ctx) => { pubDate: parseDate(new Date().toISOString()), // No Time for now link: e.detailPage, })), - }); -}; + }; +} diff --git a/lib/routes/furstar/maintainer.ts b/lib/routes/furstar/maintainer.ts deleted file mode 100644 index fc68d1fe4..000000000 --- a/lib/routes/furstar/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/characters/:lang?': ['NeverBehave'], - '/artists/:lang?': ['NeverBehave'], - '/archive/:lang?': ['NeverBehave'], -}; diff --git a/lib/routes/furstar/namespace.ts b/lib/routes/furstar/namespace.ts new file mode 100644 index 000000000..0f14c3396 --- /dev/null +++ b/lib/routes/furstar/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Furstar', + url: 'furstar.jp', +}; diff --git a/lib/routes/furstar/radar.ts b/lib/routes/furstar/radar.ts deleted file mode 100644 index 4de5727be..000000000 --- a/lib/routes/furstar/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'furstar.jp': { - _name: 'Furstar', - '.': [ - { - title: '最新售卖角色列表', - docs: 'https://docs.rsshub.app/routes/shopping#furstar-zui-xin-shou-mai-jiao-se-lie-biao', - source: ['/:lang', '/'], - target: '/furstar/characters/:lang', - }, - { - title: '已经出售的角色列表', - docs: 'https://docs.rsshub.app/routes/shopping#furstar-yi-jing-chu-shou-de-jiao-se-lie-biao', - source: ['/:lang/archive.php', '/archive.php'], - target: '/furstar/archive/:lang', - }, - { - title: '画师列表', - docs: 'https://docs.rsshub.app/routes/shopping#furstar-hua-shi-lie-biao', - source: ['/'], - target: '/furstar/artists', - }, - ], - }, -}; diff --git a/lib/routes/furstar/router.ts b/lib/routes/furstar/router.ts deleted file mode 100644 index eb5dfecb7..000000000 --- a/lib/routes/furstar/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/characters/:lang?', './index'); - router.get('/artists/:lang?', './artists'); - router.get('/archive/:lang?', './archive'); -}; diff --git a/lib/routes/futunn/main.ts b/lib/routes/futunn/main.ts index d891106e0..3010de46f 100644 --- a/lib/routes/futunn/main.ts +++ b/lib/routes/futunn/main.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,15 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/highlights', '/main', '/'], + name: 'Unknown', + maintainers: [], + handler, + url: 'news.futunn.com/main', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; const rootUrl = 'https://news.futunn.com'; @@ -63,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Futubull - Headlines', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/futunn/maintainer.ts b/lib/routes/futunn/maintainer.ts deleted file mode 100644 index 1441bd3d4..000000000 --- a/lib/routes/futunn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/main': ['Wsine', 'nczitzk'], -}; diff --git a/lib/routes/futunn/namespace.ts b/lib/routes/futunn/namespace.ts new file mode 100644 index 000000000..8c8fdd9ec --- /dev/null +++ b/lib/routes/futunn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Futubull 富途牛牛', + url: 'news.futunn.com', +}; diff --git a/lib/routes/futunn/radar.ts b/lib/routes/futunn/radar.ts deleted file mode 100644 index 3c7c6c8b2..000000000 --- a/lib/routes/futunn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'futunn.com': { - _name: '富途牛牛', - news: [ - { - title: '要闻', - docs: 'https://docs.rsshub.app/routes/finance#fu-tu-niu-niu', - source: ['/main', '/'], - target: '/futunn/main', - }, - ], - }, -}; diff --git a/lib/routes/futunn/router.ts b/lib/routes/futunn/router.ts deleted file mode 100644 index 6ad68243c..000000000 --- a/lib/routes/futunn/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/highlights', './main'); - router.get('/main', './main'); - router.get('/', './main'); -}; diff --git a/lib/routes/fx-markets/channel.ts b/lib/routes/fx-markets/channel.ts index 8c7170299..d583a6dfb 100644 --- a/lib/routes/fx-markets/channel.ts +++ b/lib/routes/fx-markets/channel.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:channel', + categories: ['finance'], + example: '/fx-markets/trading', + parameters: { channel: 'channel, can be found in the navi bar links at the home page' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Channel', + maintainers: [], + handler, + description: `| Trading | Infrastructure | Tech and Data | Regulation | + | ------- | -------------- | ------------- | ---------- | + | trading | infrastructure | tech-and-data | regulation |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const link = `https://www.fx-markets.com/${channel}`; const html = (await got(link)).data; @@ -49,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, item: result, - }); -}; + }; +} diff --git a/lib/routes/fx-markets/maintainer.ts b/lib/routes/fx-markets/maintainer.ts deleted file mode 100644 index 96ede1572..000000000 --- a/lib/routes/fx-markets/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/fx-markets/:channel': ['mikkkee'], -}; diff --git a/lib/routes/fx-markets/namespace.ts b/lib/routes/fx-markets/namespace.ts new file mode 100644 index 000000000..a43998130 --- /dev/null +++ b/lib/routes/fx-markets/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FX Markets', + url: 'fx-markets.com', +}; diff --git a/lib/routes/fx-markets/radar.ts b/lib/routes/fx-markets/radar.ts deleted file mode 100644 index 863a202b5..000000000 --- a/lib/routes/fx-markets/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'fx-markets.com': { - _name: 'FX-Markets', - '.': [ - { - title: 'Trading', - docs: 'https://docs.rsshub.app/routes/finance#fx-markets', - source: '/trading', - target: '/fx-markets/trading', - }, - { - title: 'Infrastructure', - docs: 'https://docs.rsshub.app/routes/finance#fx-markets', - source: '/infrastructure', - target: '/fx-markets/infrastructure', - }, - { - title: 'Tech and Data', - docs: 'https://docs.rsshub.app/routes/finance#fx-markets', - source: '/tech-and-data', - target: '/fx-markets/tech-and-data', - }, - { - title: 'Regulation', - docs: 'https://docs.rsshub.app/routes/finance#fx-markets', - source: '/regulation', - target: '/fx-markets/regulation', - }, - ], - }, -}; diff --git a/lib/routes/fx-markets/router.ts b/lib/routes/fx-markets/router.ts deleted file mode 100644 index 89186a042..000000000 --- a/lib/routes/fx-markets/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel', './channel'); -}; diff --git a/lib/routes/fx678/kx.ts b/lib/routes/fx678/kx.ts index d0686b64f..971d0dda5 100644 --- a/lib/routes/fx678/kx.ts +++ b/lib/routes/fx678/kx.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/kx', + categories: ['finance'], + example: '/fx678/kx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['fx678.com/kx'], + }, + name: '7x24 小时快讯', + maintainers: ['occupy5', 'dousha'], + handler, + url: 'fx678.com/kx', +}; + +async function handler() { const link = 'https://www.fx678.com/kx/'; const res = await got.get(link); const $ = load(res.data); @@ -37,9 +60,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '7x24小时快讯', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/fx678/maintainer.ts b/lib/routes/fx678/maintainer.ts deleted file mode 100644 index 669b07d04..000000000 --- a/lib/routes/fx678/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/kx': ['occupy5', 'dousha'], -}; diff --git a/lib/routes/fx678/namespace.ts b/lib/routes/fx678/namespace.ts new file mode 100644 index 000000000..320293a83 --- /dev/null +++ b/lib/routes/fx678/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '汇通网', + url: 'fx678.com', +}; diff --git a/lib/routes/fx678/radar.ts b/lib/routes/fx678/radar.ts deleted file mode 100644 index 0586b3b9b..000000000 --- a/lib/routes/fx678/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'fx678.com': { - _name: '汇通网', - '.': [ - { - title: '7x24 小时快讯', - docs: 'https://docs.rsshub.app/routes/finance#hui-tong-wang', - source: ['/kx'], - target: '/fx678/kx', - }, - ], - }, -}; diff --git a/lib/routes/fx678/router.ts b/lib/routes/fx678/router.ts deleted file mode 100644 index e3680504a..000000000 --- a/lib/routes/fx678/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/kx', './kx'); -}; diff --git a/lib/routes/fxiaoke/crm.ts b/lib/routes/fxiaoke/crm.ts index bd3d99c68..6339bca06 100644 --- a/lib/routes/fxiaoke/crm.ts +++ b/lib/routes/fxiaoke/crm.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,28 @@ const titleMap = new Map([ ['customers', `签约喜报 - ${baseTitle}`], ]); -export default async (ctx) => { +export const route: Route = { + path: '/crm/:type', + categories: ['blog'], + example: '/fxiaoke/crm/news', + parameters: { type: '文章类型, 见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['akynazh'], + handler, + description: `| 全部文章 | 文章干货 | CRM 知识 | 纷享动态 | 签约喜报 | + | -------- | -------- | -------- | --------------- | --------- | + | news | blog | articles | about-influence | customers |`, +}; + +async function handler(ctx) { const t = ctx.req.param('type'); const title = titleMap.get(t); const url = `${baseUrl}/${t}/`; @@ -55,10 +77,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title, link: url, description: desc, item: items, - }); -}; + }; +} diff --git a/lib/routes/fxiaoke/maintainer.ts b/lib/routes/fxiaoke/maintainer.ts deleted file mode 100644 index 872965c11..000000000 --- a/lib/routes/fxiaoke/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/crm/:type': ['akynazh'], -}; diff --git a/lib/routes/fxiaoke/namespace.ts b/lib/routes/fxiaoke/namespace.ts new file mode 100644 index 000000000..f44b12b13 --- /dev/null +++ b/lib/routes/fxiaoke/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '纷享销客 CRM', + url: 'fxiaoke.com', +}; diff --git a/lib/routes/fxiaoke/radar.ts b/lib/routes/fxiaoke/radar.ts deleted file mode 100644 index fec0c18a3..000000000 --- a/lib/routes/fxiaoke/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'fxiaoke.com': { - _name: '纷享销客 CRM', - '.': [ - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/blog#fen-xiang-xiao-ke-crm', - source: ['/*'], - target: '/fxiaoke/crm/news', - }, - { - title: '文章干货', - docs: 'https://docs.rsshub.app/routes/blog#fen-xiang-xiao-ke-crm', - source: ['/*'], - target: '/fxiaoke/crm/blog', - }, - { - title: 'CRM 知识', - docs: 'https://docs.rsshub.app/routes/blog#fen-xiang-xiao-ke-crm', - source: ['/*'], - target: '/fxiaoke/crm/articles', - }, - { - title: '纷享动态', - docs: 'https://docs.rsshub.app/routes/blog#fen-xiang-xiao-ke-crm', - source: ['/*'], - target: '/fxiaoke/crm/about-influence', - }, - { - title: '签约喜报', - docs: 'https://docs.rsshub.app/routes/blog#fen-xiang-xiao-ke-crm', - source: ['/*'], - target: '/fxiaoke/crm/customers', - }, - ], - }, -}; diff --git a/lib/routes/fxiaoke/router.ts b/lib/routes/fxiaoke/router.ts deleted file mode 100644 index da5d2b272..000000000 --- a/lib/routes/fxiaoke/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/crm/:type', './crm'); -}; diff --git a/lib/routes/fzmtr/announcements.ts b/lib/routes/fzmtr/announcements.ts index bbf28d3ce..af62042bf 100644 --- a/lib/routes/fzmtr/announcements.ts +++ b/lib/routes/fzmtr/announcements.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/announcements', + categories: ['travel'], + example: '/fzmtr/announcements', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通知公告', + maintainers: ['HankChow'], + handler, +}; + +async function handler() { const domain = 'www.fzmtr.com'; const announcementsUrl = `http://${domain}/html/fzdt/tzgg/index.html`; const response = await got(announcementsUrl); @@ -24,7 +43,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '福州地铁通知公告', url: announcementsUrl, description: '福州地铁通知公告', @@ -34,5 +53,5 @@ export default async (ctx) => { link: item.link, author: item.author, })), - }); -}; + }; +} diff --git a/lib/routes/fzmtr/maintainer.ts b/lib/routes/fzmtr/maintainer.ts deleted file mode 100644 index 50c51e2dd..000000000 --- a/lib/routes/fzmtr/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/announcements': ['HankChow'], -}; diff --git a/lib/routes/fzmtr/namespace.ts b/lib/routes/fzmtr/namespace.ts new file mode 100644 index 000000000..e8520de30 --- /dev/null +++ b/lib/routes/fzmtr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '福州地铁', + url: 'www.fzmtr.com', +}; diff --git a/lib/routes/fzmtr/radar.ts b/lib/routes/fzmtr/radar.ts deleted file mode 100644 index 2f0718a7b..000000000 --- a/lib/routes/fzmtr/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'fzmtr.com': { - _name: '福州地铁', - www: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/travel#fu-zhou-di-tie', - }, - ], - }, -}; diff --git a/lib/routes/fzmtr/router.ts b/lib/routes/fzmtr/router.ts deleted file mode 100644 index 1fbe48e55..000000000 --- a/lib/routes/fzmtr/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/announcements', './announcements'); -}; diff --git a/lib/routes/gameapps/index.ts b/lib/routes/gameapps/index.ts index a705e20ab..a1cc46a34 100644 --- a/lib/routes/gameapps/index.ts +++ b/lib/routes/gameapps/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['gameapps.hk/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'gameapps.hk/', +}; + +async function handler() { const baseUrl = 'https://www.gameapps.hk'; const feed = await parser.parseURL(`${baseUrl}/rss`); @@ -68,12 +81,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, image: `${baseUrl}/static/favicon/apple-touch-icon.png`, item: items, language: feed.language, - }); -}; + }; +} diff --git a/lib/routes/gameapps/maintainer.ts b/lib/routes/gameapps/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/gameapps/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/gameapps/namespace.ts b/lib/routes/gameapps/namespace.ts new file mode 100644 index 000000000..e24442a2c --- /dev/null +++ b/lib/routes/gameapps/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GameApps.hk 香港手机游戏网', + url: 'gameapps.hk', +}; diff --git a/lib/routes/gameapps/radar.ts b/lib/routes/gameapps/radar.ts deleted file mode 100644 index 5b85bcd85..000000000 --- a/lib/routes/gameapps/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gameapps.hk': { - _name: 'GameApps.hk 香港手机游戏网', - '.': [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/game#gameapps-hk-xiang-gang-shou-ji-you-xi-wang', - source: ['/'], - target: '/gameapps', - }, - ], - }, -}; diff --git a/lib/routes/gameapps/router.ts b/lib/routes/gameapps/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/gameapps/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/gamebase/maintainer.ts b/lib/routes/gamebase/maintainer.ts deleted file mode 100644 index 62047f7c5..000000000 --- a/lib/routes/gamebase/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/gamebase/namespace.ts b/lib/routes/gamebase/namespace.ts new file mode 100644 index 000000000..1abc84616 --- /dev/null +++ b/lib/routes/gamebase/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '遊戲基地 Gamebase', + url: 'news.gamebase.com.tw', +}; diff --git a/lib/routes/gamebase/news.ts b/lib/routes/gamebase/news.ts index 3b97aedd1..a7806e917 100644 --- a/lib/routes/gamebase/news.ts +++ b/lib/routes/gamebase/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,29 @@ const types = { r18list: 'newsPornList', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?/:category?', + categories: ['game'], + example: '/gamebase/news', + parameters: { type: '类型,见下表,默认为 newslist', category: '分类,可在对应分类页 URL 中找到,默认为 `all` 即全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞', + maintainers: ['nczitzk'], + handler, + description: `类型 + + | newslist | r18list | + | -------- | ------- |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'newslist'; const category = ctx.req.param('category') ?? 'all'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -67,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gamebase/radar.ts b/lib/routes/gamebase/radar.ts deleted file mode 100644 index c1e1f58cd..000000000 --- a/lib/routes/gamebase/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gamebase.com.tw': { - _name: '遊戲基地 Gamebase', - news: [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/game#gamebase-xin-wen', - source: ['/news/:type'], - target: (params, url) => `/gamebase/news/${params.type}/${new URL(url).searchParams.get('type')}`, - }, - ], - }, -}; diff --git a/lib/routes/gamebase/router.ts b/lib/routes/gamebase/router.ts deleted file mode 100644 index c7fcbd9d9..000000000 --- a/lib/routes/gamebase/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?/:category?', './news'); -}; diff --git a/lib/routes/gamegene/maintainer.ts b/lib/routes/gamegene/maintainer.ts deleted file mode 100644 index fafdb79a6..000000000 --- a/lib/routes/gamegene/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['lone1y-51'], -}; diff --git a/lib/routes/gamegene/namespace.ts b/lib/routes/gamegene/namespace.ts new file mode 100644 index 000000000..810956a07 --- /dev/null +++ b/lib/routes/gamegene/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游戏基因', + url: 'news.gamegene.cn', +}; diff --git a/lib/routes/gamegene/news.ts b/lib/routes/gamegene/news.ts index ff2171233..2f9736f66 100644 --- a/lib/routes/gamegene/news.ts +++ b/lib/routes/gamegene/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/gamegene/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.gamegene.cn/news'], + }, + name: '资讯', + maintainers: ['lone1y-51'], + handler, + url: 'news.gamegene.cn/news', +}; + +async function handler() { const url = 'https://gamegene.cn/news'; const { data: response } = await got({ method: 'get', @@ -42,10 +65,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { // 在此处输出您的 RSS item: items, link: url, title: '游戏基因 GameGene', - }); -}; + }; +} diff --git a/lib/routes/gamegene/radar.ts b/lib/routes/gamegene/radar.ts deleted file mode 100644 index 0076b8ee2..000000000 --- a/lib/routes/gamegene/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gamegene.cn': { - _name: '游戏基因', - news: [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/game#you-xi-ji-yin', - source: ['/news'], - target: '/gamegene/news', - }, - ], - }, -}; diff --git a/lib/routes/gamegene/router.ts b/lib/routes/gamegene/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/gamegene/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/gamer/ani/anime.ts b/lib/routes/gamer/ani/anime.ts index 91e401189..eb70f6c53 100644 --- a/lib/routes/gamer/ani/anime.ts +++ b/lib/routes/gamer/ani/anime.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/ani/anime/:sn', + categories: ['anime'], + example: '/gamer/ani/anime/36868', + parameters: { sn: '動畫 sn,在 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '動畫瘋 - 動畫', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { sn } = ctx.req.param(); const { data: response } = await got('https://api.gamer.com.tw/mobile_app/anime/v3/video.php', { @@ -24,10 +43,10 @@ export default async (ctx) => { })) .toReversed(); - ctx.set('data', { + return { title, link: `https://ani.gamer.com.tw/animeRef.php?sn=${anime.anime_sn}`, description: anime.content?.trim(), item: items, - }); -}; + }; +} diff --git a/lib/routes/gamer/ani/new-anime.ts b/lib/routes/gamer/ani/new-anime.ts index fbe451ca1..177de6304 100644 --- a/lib/routes/gamer/ani/new-anime.ts +++ b/lib/routes/gamer/ani/new-anime.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/ani/new_anime', + categories: ['anime'], + example: '/gamer/ani/new_anime', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ani.gamer.com.tw/'], + target: '/new_anime', + }, + name: '動畫瘋 - 最後更新', + maintainers: [], + handler, + url: 'ani.gamer.com.tw/', +}; + +async function handler() { const rootUrl = 'https://ani.gamer.com.tw'; const { data: response } = await got('https://api.gamer.com.tw/mobile_app/anime/v3/index.php'); @@ -13,9 +37,9 @@ export default async (ctx) => { pubDate: timezone(parseDate(`${item.upTime} ${item.upTimeHours}`, 'MM/DD HH:mm'), +8), })); - ctx.set('data', { + return { title: '動畫瘋最後更新', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gamer/gnn-index.ts b/lib/routes/gamer/gnn-index.ts index fafa2fa59..20d957226 100644 --- a/lib/routes/gamer/gnn-index.ts +++ b/lib/routes/gamer/gnn-index.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/gnn/:category?', + categories: ['anime'], + example: '/gamer/gnn/1', + parameters: { category: '版块' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'GNN 新聞', + maintainers: ['Arracc'], + handler, + description: `| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 | + | ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- | + | 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 | + + | Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 | + | ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- | + | ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); let url = ''; let categoryName = ''; @@ -119,9 +145,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '巴哈姆特-GNN新聞' + categoryName, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gamer/hot.ts b/lib/routes/gamer/hot.ts index 8649b6052..b01d5ca41 100644 --- a/lib/routes/gamer/hot.ts +++ b/lib/routes/gamer/hot.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:bsn', + categories: ['anime'], + example: '/gamer/hot/47157', + parameters: { bsn: '板块 id,在 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '熱門推薦', + maintainers: ['nczitzk', 'TonyRL'], + handler, +}; + +async function handler(ctx) { const rootUrl = `https://forum.gamer.com.tw/A.php?bsn=${ctx.req.param('bsn')}`; const response = await got({ url: rootUrl, @@ -46,15 +65,15 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: items, - }); + }; ctx.set('json', { title: $('title').text(), link: rootUrl, item: items, }); -}; +} diff --git a/lib/routes/gamer/maintainer.ts b/lib/routes/gamer/maintainer.ts deleted file mode 100644 index 10a380ae2..000000000 --- a/lib/routes/gamer/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/anime/:sn': ['maple3142'], - '/gnn/:category?': ['Arracc'], - '/hot/:bsn': ['nczitzk', 'TonyRL'], - '/new_anime': ['maple3142'], -}; diff --git a/lib/routes/gamer/namespace.ts b/lib/routes/gamer/namespace.ts new file mode 100644 index 000000000..83d22151b --- /dev/null +++ b/lib/routes/gamer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '巴哈姆特電玩資訊站', + url: 'acg.gamer.com.tw', +}; diff --git a/lib/routes/gamer/radar.ts b/lib/routes/gamer/radar.ts deleted file mode 100644 index 70af94cd0..000000000 --- a/lib/routes/gamer/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'gamer.com.tw': { - _name: '巴哈姆特電玩資訊站', - acg: [ - { - title: 'GNN 新聞', - docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan', - source: ['/news.php'], - target: (params, url) => `/gamer/gnn/${new URL(url).searchParams.get('p')}`, - }, - ], - ani: [ - { - title: '動畫瘋 - 最後更新', - docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan', - source: ['/'], - target: '/gamer/new_anime', - }, - { - title: '動畫瘋 - 動畫', - docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan', - source: ['/animeVideo.php'], - target: (_params, url) => `/gamer/anime/${new URL(url).searchParams.get('sn')}`, - }, - ], - forum: [ - { - title: '熱門推薦', - docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan', - source: ['/A.php', '/B.php'], - target: (params, url) => `/gamer/hot/${new URL(url).searchParams.get('bsn')}`, - }, - ], - gnn: [ - { - title: 'GNN 新聞', - docs: 'https://docs.rsshub.app/routes/anime#ba-ha-mu-te-dian-wan-zi-xun-zhan', - source: ['/index.php'], - target: (params, url) => `/gamer/gnn/${new URL(url).searchParams.get('k')}`, - }, - ], - }, -}; diff --git a/lib/routes/gamer/router.ts b/lib/routes/gamer/router.ts deleted file mode 100644 index 2792bc35a..000000000 --- a/lib/routes/gamer/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/ani/anime/:sn', './ani/anime'); - router.get('/ani/new_anime', './ani/new-anime'); - router.get('/gnn/:category?', './gnn-index'); - router.get('/hot/:bsn', './hot'); -}; diff --git a/lib/routes/gamersecret/index.ts b/lib/routes/gamersecret/index.ts index c6dae62f1..83fb21fd2 100644 --- a/lib/routes/gamersecret/index.ts +++ b/lib/routes/gamersecret/index.ts @@ -1,10 +1,53 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:category?', + categories: ['game'], + example: '/gamersecret', + parameters: { type: 'Type, see below, Latest News by default', category: 'Category, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gamersecret.com/:type', 'gamersecret.com/:type/:category', 'gamersecret.com/'], + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `| Latest News | PC | Playstation | Nintendo | Xbox | Moblie | + | ----------- | -- | ----------- | -------- | ---- | ------ | + | latest-news | pc | playstation | nintendo | xbox | moblie | + + Or + + | GENERAL | GENERAL EN | MOBILE | MOBILE EN | + | ---------------- | ------------------ | --------------- | ----------------- | + | category/general | category/generalen | category/mobile | category/mobileen | + + | NINTENDO | NINTENDO EN | PC | PC EN | + | ----------------- | ------------------- | ----------- | ------------- | + | category/nintendo | category/nintendoen | category/pc | category/pcen | + + | PLAYSTATION | PLAYSTATION EN | REVIEWS | + | -------------------- | ---------------------- | ---------------- | + | category/playstation | category/playstationen | category/reviews | + + | XBOX | XBOX EN | + | ------------- | --------------- | + | category/xbox | category/xboxen |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'latest-news'; const category = ctx.req.param('category') ?? ''; @@ -53,9 +96,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gamersecret/maintainer.ts b/lib/routes/gamersecret/maintainer.ts deleted file mode 100644 index 5b8a76b47..000000000 --- a/lib/routes/gamersecret/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/gamersecret/namespace.ts b/lib/routes/gamersecret/namespace.ts new file mode 100644 index 000000000..4cba75ecf --- /dev/null +++ b/lib/routes/gamersecret/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Gamer Secret', + url: 'gamersecret.com', +}; diff --git a/lib/routes/gamersecret/radar.ts b/lib/routes/gamersecret/radar.ts deleted file mode 100644 index 8386a06ec..000000000 --- a/lib/routes/gamersecret/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'gamersecret.com': { - _name: 'Gamer Secret', - '.': [ - { - title: '最新資訊', - docs: 'https://docs.rsshub.app/routes/game#gamer-secret-zui-xin-zi-xun', - source: ['/:type', '/:type/:category', '/'], - target: '/gamersecret', - }, - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/game#gamer-secret-fen-lei', - source: ['/:type', '/:type/:category', '/'], - target: '/gamersecret/:type?/:category?', - }, - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/game#gamer-secret-latest-news', - source: ['/:type', '/:type/:category', '/'], - target: '/gamersecret', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/game#gamer-secret-category', - source: ['/:type', '/:type/:category', '/'], - target: '/gamersecret/:type?/:category?', - }, - ], - }, -}; diff --git a/lib/routes/gamersecret/router.ts b/lib/routes/gamersecret/router.ts deleted file mode 100644 index 8591b5062..000000000 --- a/lib/routes/gamersecret/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:category?', './index'); -}; diff --git a/lib/routes/gamme/category.ts b/lib/routes/gamme/category.ts index 6f2f6e6d2..fcca76ae4 100644 --- a/lib/routes/gamme/category.ts +++ b/lib/routes/gamme/category.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:domain/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { domain = 'news', category } = ctx.req.param(); if (!isValidHost(domain)) { throw new Error('Invalid domain'); @@ -41,11 +49,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, image: domain === 'news' ? `${baseUrl}/blogico.ico` : `${baseUrl}/favicon.ico`, description: feed.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/gamme/maintainer.ts b/lib/routes/gamme/maintainer.ts deleted file mode 100644 index 626e01819..000000000 --- a/lib/routes/gamme/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/news/:category?': ['TonyRL'], - '/news/tag/:tag': ['TonyRL'], - '/sexynews/:category?': ['TonyRL'], - '/sexynews/tag/:tag': ['TonyRL'], -}; diff --git a/lib/routes/gamme/namespace.ts b/lib/routes/gamme/namespace.ts new file mode 100644 index 000000000..268250693 --- /dev/null +++ b/lib/routes/gamme/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '卡卡洛普', + url: 'news.gamme.com.tw', +}; diff --git a/lib/routes/gamme/radar.ts b/lib/routes/gamme/radar.ts deleted file mode 100644 index dce48db19..000000000 --- a/lib/routes/gamme/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'gamme.com.tw': { - _name: '卡卡洛普', - news: [ - { - title: '宅宅新聞 - 分類', - docs: 'https://docs.rsshub.app/routes/new-media#ka-ka-luo-pu', - source: ['/category/:category', '/'], - target: (params) => `/gamme/news${params.category ? `/${params.category}` : ''}`, - }, - { - title: '宅宅新聞 - 標籤', - docs: 'https://docs.rsshub.app/routes/new-media#ka-ka-luo-pu', - source: ['/tag/:tag'], - target: '/gamme/news/tag/:tag', - }, - ], - sexynews: [ - { - title: '西斯新聞 - 分類', - docs: 'https://docs.rsshub.app/routes/new-media#ka-ka-luo-pu', - source: ['/category/:category', '/'], - target: (params) => `/gamme/sexynews${params.category ? `/${params.category}` : ''}`, - }, - { - title: '西斯新聞 - 標籤', - docs: 'https://docs.rsshub.app/routes/new-media#ka-ka-luo-pu', - source: ['/tag/:tag'], - target: '/gamme/sexynews/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/gamme/router.ts b/lib/routes/gamme/router.ts deleted file mode 100644 index 2607cf611..000000000 --- a/lib/routes/gamme/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:domain/:category?', './category'); - router.get('/:domain/tag/:tag', './tag'); -}; diff --git a/lib/routes/gamme/tag.ts b/lib/routes/gamme/tag.ts index bceca6457..106faa805 100644 --- a/lib/routes/gamme/tag.ts +++ b/lib/routes/gamme/tag.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:domain/tag/:tag', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { domain = 'news', tag } = ctx.req.param(); if (!isValidHost(domain)) { throw new Error('Invalid domain'); @@ -52,11 +60,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${tag} | ${domain === 'news' ? '宅宅新聞' : '西斯新聞'}`, description: $('meta[name=description]').attr('content'), link: pageUrl, image: domain === 'news' ? `${baseUrl}/blogico.ico` : `${baseUrl}/favicon.ico`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gcores/category.ts b/lib/routes/gcores/category.ts index 63f29ab3b..486a46140 100644 --- a/lib/routes/gcores/category.ts +++ b/lib/routes/gcores/category.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['new-media'], + example: '/gcores/category/news', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gcores.com/:category'], + }, + name: '分类', + maintainers: ['MoguCloud', 'StevenRCE0'], + handler, + description: `| 资讯 | 视频 | 电台 | 文章 | + | ---- | ------ | ------ | -------- | + | news | videos | radios | articles |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const url = `https://www.gcores.com/${category}`; const res = await got({ @@ -105,12 +130,12 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: feedTitle, link: url, item: out, - }); -}; + }; +} function convertEntityToContent(entity) { const { type, data } = entity; diff --git a/lib/routes/gcores/collection.ts b/lib/routes/gcores/collection.ts index 3ab27f475..c306f5a4f 100644 --- a/lib/routes/gcores/collection.ts +++ b/lib/routes/gcores/collection.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; /* refer to: ./tag.js (author: @StevenREC0) */ import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/collections/:collection', + categories: ['new-media'], + example: '/gcores/collections/64', + parameters: { collection: '专题id,可在专题页面的 URL 中找到,如 游戏开发设计心得分享 -- 64' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gcores.com/collections/:collection'], + }, + name: '专题文章', + maintainers: ['kudryavka1013'], + handler, +}; + +async function handler(ctx) { // get params const collection = ctx.req.param('collection'); @@ -129,9 +151,9 @@ export default async (ctx) => { }); // return data - ctx.set('data', { + return { title: feedTitle, link: feedUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gcores/maintainer.ts b/lib/routes/gcores/maintainer.ts deleted file mode 100644 index 14f85ee99..000000000 --- a/lib/routes/gcores/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/category/:category': ['MoguCloud', 'StevenRCE0'], - '/collections/:collection': ['kudryavka1013'], - '/radios/:category?': ['eternasuno'], - '/tag/:tag/:category?': ['StevenRCE0'], -}; diff --git a/lib/routes/gcores/namespace.ts b/lib/routes/gcores/namespace.ts new file mode 100644 index 000000000..d66cdcd05 --- /dev/null +++ b/lib/routes/gcores/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '机核网', + url: 'gcores.com', +}; diff --git a/lib/routes/gcores/radar.ts b/lib/routes/gcores/radar.ts deleted file mode 100644 index b163c2430..000000000 --- a/lib/routes/gcores/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'gcores.com': { - _name: '机核网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#ji-he-wang-fen-lei', - source: ['/:category'], - target: '/gcores/category/:category', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#ji-he-wang-biao-qian', - source: ['/categories/:tag', '/'], - target: '/gcores/tag/:tag', - }, - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/new-media#ji-he-wang-bo-ke', - source: ['/radios'], - target: '/gcores/radios', - }, - { - title: '播客-分类', - docs: 'https://docs.rsshub.app/routes/new-media#ji-he-wang-bo-ke', - source: ['/categories/:category'], - target: '/gcores/radios/:category', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#ji-he-wang-zhuan-ti', - source: ['/collections/:collection'], - target: '/gcores/collections/:collection', - }, - ], - }, -}; diff --git a/lib/routes/gcores/radio.ts b/lib/routes/gcores/radio.ts index f71c06cc9..77982a507 100644 --- a/lib/routes/gcores/radio.ts +++ b/lib/routes/gcores/radio.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,30 @@ import got from '@/utils/got'; import md5 from '@/utils/md5'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/radios/:category?', + categories: ['new-media'], + example: '/gcores/radios/45', + parameters: { category: '分类名,默认为全部,可在分类页面的 URL 中找到,如 Gadio News -- 45' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['gcores.com/categories/:category'], + target: '/radios/:category', + }, + name: '播客', + maintainers: ['eternasuno'], + handler, + url: 'gcores.com/radios', +}; + +async function handler(ctx) { const category = ctx.req.param('category') || 'all'; const limit = Number.parseInt(ctx.req.query('limit')) || 12; @@ -57,7 +81,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title, link, description, @@ -65,8 +89,8 @@ export default async (ctx) => { itunes_author: '机核 GCORES', image: `https://www.gcores.com/${image}`, item, - }); -}; + }; +} const get = async (url) => { const response = await got({ diff --git a/lib/routes/gcores/router.ts b/lib/routes/gcores/router.ts deleted file mode 100644 index e06ed2e1c..000000000 --- a/lib/routes/gcores/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/category/:category', './category'); - router.get('/collections/:collection', './collection'); - router.get('/radios/:category?', './radio'); - router.get('/tag/:tag/:category?', './tag'); -}; diff --git a/lib/routes/gcores/tag.ts b/lib/routes/gcores/tag.ts index 17730a1b8..eae48be5e 100644 --- a/lib/routes/gcores/tag.ts +++ b/lib/routes/gcores/tag.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag/:category?', + categories: ['new-media'], + example: '/gcores/tag/42/articles', + parameters: { tag: '标签名,可在选定标签分类页面的 URL 中找到,如视觉动物——42', category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gcores.com/categories/:tag', 'gcores.com/'], + target: '/tag/:tag', + }, + name: '标签', + maintainers: ['StevenRCE0'], + handler, + description: `分类名同上。`, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const category = ctx.req.param('category'); const url = `https://www.gcores.com/categories/${tag + (category ? `?tab=${category}` : '')}`; @@ -96,12 +120,12 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: feedTitle, link: url, item: out, - }); -}; + }; +} function convertEntityToContent(entity) { const { type, data } = entity; diff --git a/lib/routes/gdsrx/index.ts b/lib/routes/gdsrx/index.ts index caccbe9ff..0e0d8c2f9 100644 --- a/lib/routes/gdsrx/index.ts +++ b/lib/routes/gdsrx/index.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['other'], + example: '/gdsrx', + parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,见下表,默认为法规文库' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: [], + handler, + description: `| 栏目名称 | 栏目 id | + | ----------------- | ------- | + | 法规文库 | 10 | + | 法规资讯 | 12 | + | 专家供稿 | 13 | + | 协会动态 会员动态 | 20 | + | 协会动态 | 37 | + | 协会通知公告 | 38 | + | 会员动态 | 39 |`, +}; + +async function handler(ctx) { const { id = '10' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -58,7 +86,7 @@ export default async (ctx) => { .map((c) => $(c).text()) .pop(); - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -69,5 +97,5 @@ export default async (ctx) => { logo: icon, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/gdsrx/maintainer.ts b/lib/routes/gdsrx/maintainer.ts deleted file mode 100644 index 451e5020e..000000000 --- a/lib/routes/gdsrx/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/id?': ['nczitzk'], -}; diff --git a/lib/routes/gdsrx/namespace.ts b/lib/routes/gdsrx/namespace.ts new file mode 100644 index 000000000..23190d225 --- /dev/null +++ b/lib/routes/gdsrx/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广东省食品药品审评认证技术协会', + url: 'gdsrx.org.cn', +}; diff --git a/lib/routes/gdsrx/radar.ts b/lib/routes/gdsrx/radar.ts deleted file mode 100644 index 46c8d7d8c..000000000 --- a/lib/routes/gdsrx/radar.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default { - 'gdsrx.org.cn': { - _name: '广东省食品药品审评认证技术协会', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id'], - target: (_, url) => { - url = new URL(url); - - const idMatches = url.href.match(/\/id\/(\d+)\.html/); - - return `/gdsrx${idMatches ? `/${idMatches[1]}` : ''}`; - }, - }, - { - title: '法规文库', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/10.html'], - target: '/gdsrx/10', - }, - { - title: '法规资讯', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/12.html'], - target: '/gdsrx/12', - }, - { - title: '专家供稿', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/13.html'], - target: '/gdsrx/13', - }, - { - title: '协会动态 会员动态', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/20.html'], - target: '/gdsrx/20', - }, - { - title: '协会动态', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/37.html'], - target: '/gdsrx/37', - }, - { - title: '协会通知公告', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/38.html'], - target: '/gdsrx/38', - }, - { - title: '会员动态', - docs: 'https://docs.rsshub.app/routes/other#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu', - source: ['/portal/list/index/id/39.html'], - target: '/gdsrx/39', - }, - ], - }, -}; diff --git a/lib/routes/gdsrx/router.ts b/lib/routes/gdsrx/router.ts deleted file mode 100644 index 6c52c5718..000000000 --- a/lib/routes/gdsrx/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './'); -}; diff --git a/lib/routes/gdut/maintainer.ts b/lib/routes/gdut/maintainer.ts deleted file mode 100644 index b0e693b2f..000000000 --- a/lib/routes/gdut/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/oa_news/:type?': ['Jim Kirisame'], -}; diff --git a/lib/routes/gdut/namespace.ts b/lib/routes/gdut/namespace.ts new file mode 100644 index 000000000..c3b9a2cef --- /dev/null +++ b/lib/routes/gdut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广东工业大学', + url: 'oas.gdut.edu.cn', +}; diff --git a/lib/routes/gdut/news.ts b/lib/routes/gdut/news.ts index d8fbf442a..7528fd6b1 100644 --- a/lib/routes/gdut/news.ts +++ b/lib/routes/gdut/news.ts @@ -158,7 +158,7 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return ({ title: `广东工业大学校内新闻网`, link: 'http://news.gdut.edu.cn', item: out.length > 0 ? out : articleList, diff --git a/lib/routes/gdut/oa-news.ts b/lib/routes/gdut/oa-news.ts index 094551678..0df941348 100644 --- a/lib/routes/gdut/oa-news.ts +++ b/lib/routes/gdut/oa-news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import wait from '@/utils/wait'; @@ -71,7 +72,19 @@ function getArg(type) { ]); } -export default async (ctx) => { +export const route: Route = { + path: '/oa_news/:type?', + radar: { + source: ['oas.gdut.edu.cn/seeyon'], + target: '/oa_news/', + }, + name: 'Unknown', + maintainers: ['Jim Kirisame'], + handler, + url: 'oas.gdut.edu.cn/seeyon', +}; + +async function handler(ctx) { const typeParam = ctx.req.param('type') ?? 'notice'; if (typeMap[typeParam] === undefined) { throw new Error('通知类型' + typeParam + '未定义'); @@ -202,10 +215,10 @@ export default async (ctx) => { data; } - ctx.set('data', { + return { title: `广东工业大学新闻通知网 - ` + type.name, link: site, description: `广东工业大学新闻通知网`, item: articles, - }); -}; + }; +} diff --git a/lib/routes/gdut/radar.ts b/lib/routes/gdut/radar.ts deleted file mode 100644 index ad4e297cd..000000000 --- a/lib/routes/gdut/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gdut.edu.cn': { - _name: '广东工业大学', - oas: [ - { - title: '通知公文网', - docs: 'https://docs.rsshub.app/routes/university#guang-dong-gong-ye-da-xue-tong-zhi-gong-wen-wang', - source: '/seeyon', - target: '/gdut/oa_news/', - }, - ], - }, -}; diff --git a/lib/routes/gdut/router.ts b/lib/routes/gdut/router.ts deleted file mode 100644 index b0b07cbb3..000000000 --- a/lib/routes/gdut/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/oa_news/:type?', './oa-news'); -}; diff --git a/lib/routes/gelonghui/home.ts b/lib/routes/gelonghui/home.ts index 199b13923..09066f93a 100644 --- a/lib/routes/gelonghui/home.ts +++ b/lib/routes/gelonghui/home.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/home/:tag?', + categories: ['finance'], + example: '/gelonghui/home', + parameters: { tag: '分类标签,见下表,默认为 `web_home_page`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['TonyRL'], + handler, + description: `| 推荐 | 股票 | 基金 | 新股 | 研报 | + | --------------- | ----- | ---- | ---------- | -------- | + | web\_home\_page | stock | fund | new\_stock | research |`, +}; + +async function handler(ctx) { const { tag = 'web_home_page' } = ctx.req.param(); const apiUrl = `https://www.gelonghui.com/api/channels/${tag}/articles/v8`; const { data } = await got(apiUrl); @@ -22,11 +44,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: '格隆汇-财经资讯动态-股市行情', description: '格隆汇为中国投资者出海投资及中国公司出海融资,提供海外投资,港股开户行情,科创板股票发行数据、资讯、研究、交易等一站式服务,目前业务范围主要涉及港股与美股两大市场,未来将陆续开通台湾、日本、印度、欧洲等市场.', image: 'https://cdn.gelonghui.com/static/web/www.ico.la.ico', link: 'https://www.gelonghui.com', item: items, - }); -}; + }; +} diff --git a/lib/routes/gelonghui/hot-article.ts b/lib/routes/gelonghui/hot-article.ts index e8e822d7b..73a9dca1f 100644 --- a/lib/routes/gelonghui/hot-article.ts +++ b/lib/routes/gelonghui/hot-article.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hot-article/:type?', + categories: ['finance'], + example: '/gelonghui/hot-article', + parameters: { type: '`day` 为日排行,`week` 为周排行,默认为 `day`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gelonghui.com/'], + target: '/hot-article', + }, + name: '最热文章', + maintainers: [], + handler, + url: 'gelonghui.com/', +}; + +async function handler(ctx) { const type = ctx.req.param('type') === 'week' ? 1 : 0; const baseUrl = `https://www.gelonghui.com`; const { data: response } = await got(baseUrl); @@ -24,11 +48,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `最热文章 - ${type === 0 ? '日排行' : '周排行'} - 格隆汇`, description: '格隆汇为中国投资者出海投资及中国公司出海融资,提供海外投资,港股开户行情,科创板股票发行数据、资讯、研究、交易等一站式服务,目前业务范围主要涉及港股与美股两大市场,未来将陆续开通台湾、日本、印度、欧洲等市场.', image: 'https://cdn.gelonghui.com/static/web/www.ico.la.ico', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gelonghui/keyword.ts b/lib/routes/gelonghui/keyword.ts index 5d034f83c..81fc717da 100644 --- a/lib/routes/gelonghui/keyword.ts +++ b/lib/routes/gelonghui/keyword.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/keyword/:keyword', + categories: ['finance'], + example: '/gelonghui/keyword/早报', + parameters: { keyword: '搜索关键字' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索关键字', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const currentUrl = `https://www.gelonghui.com/api/post/search/v4`; const { data } = await got(currentUrl, { @@ -26,10 +45,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `格隆汇 - 关键词 “${keyword}” 的文章`, link: currentUrl, item: items, description: `找到关于 “ ${keyword} ”的文章,共${data.totalCount}个结果`, - }); -}; + }; +} diff --git a/lib/routes/gelonghui/live.ts b/lib/routes/gelonghui/live.ts index 8593f70f7..01f47c25e 100644 --- a/lib/routes/gelonghui/live.ts +++ b/lib/routes/gelonghui/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import * as path from 'node:path'; const baseUrl = 'https://www.gelonghui.com'; -export default async (ctx) => { +export const route: Route = { + path: '/live', + categories: ['finance'], + example: '/gelonghui/live', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gelonghui.com/live', 'gelonghui.com/'], + }, + name: '实时快讯', + maintainers: [], + handler, + url: 'gelonghui.com/live', +}; + +async function handler() { const apiUrl = `${baseUrl}/api/live-channels/all/lives/v4`; const { data: { result }, @@ -24,11 +47,11 @@ export default async (ctx) => { pubDate: parseDate(i.createTimestamp, 'X'), })); - ctx.set('data', { + return { title: '格隆汇快讯-7x24小时市场快讯-财经市场热点', description: '格隆汇快讯栏目提供外汇投资实时行情,外汇投资交易,外汇投资炒股,证券等内容,实时更新,格隆汇未来将陆续开通台湾、日本、印度、欧洲等市场.', image: 'https://cdn.gelonghui.com/static/web/www.ico.la.ico', link: `${baseUrl}/live`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gelonghui/maintainer.ts b/lib/routes/gelonghui/maintainer.ts deleted file mode 100644 index 5dd40882d..000000000 --- a/lib/routes/gelonghui/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/home/:tag?': ['TonyRL'], - '/keyword/:keyword': ['nczitzk'], - '/subject/:id': ['nczitzk'], - '/user/:id': ['nczitzk'], -}; diff --git a/lib/routes/gelonghui/namespace.ts b/lib/routes/gelonghui/namespace.ts new file mode 100644 index 000000000..a13ccfd03 --- /dev/null +++ b/lib/routes/gelonghui/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '格隆汇', + url: 'gelonghui.com', +}; diff --git a/lib/routes/gelonghui/radar.ts b/lib/routes/gelonghui/radar.ts deleted file mode 100644 index 0b819228e..000000000 --- a/lib/routes/gelonghui/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'gelonghui.com': { - _name: '格隆汇', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/tag/:tag', '/'], - target: (params) => `/gelonghui/home${params.tag ? `/${params.tag}` : ''}`, - }, - { - title: '最热文章', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/'], - target: '/gelonghui/hot-article', - }, - { - title: '搜索关键字', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/search'], - target: (_, url) => `/gelonghui/keyword/${new URL(url).searchParams.get('keyword')}`, - }, - { - title: '实时快讯', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/live', '/'], - target: '/gelonghui/live', - }, - { - title: '主题文章', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/subject/:id'], - target: '/gelonghui/subject/:id', - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/finance#ge-long-hui', - source: ['/user/:id'], - target: '/gelonghui/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/gelonghui/router.ts b/lib/routes/gelonghui/router.ts deleted file mode 100644 index 8dbdfa086..000000000 --- a/lib/routes/gelonghui/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/home/:tag?', './home'); - router.get('/hot-article/:type?', './hot-article'); - router.get('/keyword/:keyword', './keyword'); - router.get('/live', './live'); - router.get('/subject/:id', './subject'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/gelonghui/subject.ts b/lib/routes/gelonghui/subject.ts index 094181ce8..a178c19ed 100644 --- a/lib/routes/gelonghui/subject.ts +++ b/lib/routes/gelonghui/subject.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/subject/:id', + categories: ['finance'], + example: '/gelonghui/subject/4', + parameters: { id: '主题编号,可在主题页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gelonghui.com/subject/:id'], + }, + name: '主题文章', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const apiUrl = `https://www.gelonghui.com/api/subjects/${id}/contents`; const pageUrl = `https://www.gelonghui.com/subject/${id}`; @@ -27,11 +49,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `格隆汇 - 主题 ${$('span.user-nick').text()} 的文章`, description: $('div.user-name').parent().children('p').text(), image: $('.subject-list-title').find('img').attr('data-src'), link: `https://www.gelonghui.com/subject/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gelonghui/user.ts b/lib/routes/gelonghui/user.ts index 116263d20..4c2295388 100644 --- a/lib/routes/gelonghui/user.ts +++ b/lib/routes/gelonghui/user.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['finance'], + example: '/gelonghui/user/5273', + parameters: { id: '用户编号,可在用户页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gelonghui.com/user/:id'], + }, + name: '用户文章', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { id: userId } = ctx.req.param(); const currentUrl = 'https://www.gelonghui.com/api/community/dynamic/my-dynamics/v2'; const { data } = await got(currentUrl, { @@ -24,11 +46,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `格隆汇 - 用户 ${data.result[0].user.nick} 的文章`, description: data.result.find((i) => i.user).user.brief, image: data.result.find((i) => i.user).user.avatar.split('@')[0], link: data.result.find((i) => i.user).user.route.replace('https://m.gelonghui.com', 'https://www.gelonghui.com'), item: items, - }); -}; + }; +} diff --git a/lib/routes/geocaching/blogs.ts b/lib/routes/geocaching/blogs.ts index 10341fe28..74fe33797 100644 --- a/lib/routes/geocaching/blogs.ts +++ b/lib/routes/geocaching/blogs.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blogs', + categories: ['blog'], + example: '/geocaching/blogs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['geocaching.com/blog/', 'geocaching.com/'], + }, + name: 'Official Blogs', + maintainers: ['HankChow'], + handler, + url: 'geocaching.com/blog/', +}; + +async function handler(ctx) { const baseUrl = 'https://www.geocaching.com'; const { data: response } = await got(`${baseUrl}/blog/wp-json/wp/v2/posts`, { searchParams: { @@ -20,11 +43,11 @@ export default async (ctx) => { category: item._embedded['wp:term'][0].map((category) => category.name), })); - ctx.set('data', { + return { title: 'Geocaching Blog', link: `${baseUrl}/blog/`, image: `${baseUrl}/blog/favicon.ico`, description: 'Geocaching 博客更新', item: items, - }); -}; + }; +} diff --git a/lib/routes/geocaching/maintainer.ts b/lib/routes/geocaching/maintainer.ts deleted file mode 100644 index 3f5499056..000000000 --- a/lib/routes/geocaching/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blogs': ['HankChow'], -}; diff --git a/lib/routes/geocaching/namespace.ts b/lib/routes/geocaching/namespace.ts new file mode 100644 index 000000000..fac3b4e91 --- /dev/null +++ b/lib/routes/geocaching/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Geocaching', + url: 'geocaching.com', +}; diff --git a/lib/routes/geocaching/radar.ts b/lib/routes/geocaching/radar.ts deleted file mode 100644 index 534c1c4e7..000000000 --- a/lib/routes/geocaching/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'geocaching.com': { - _name: 'Geocaching', - '.': [ - { - title: '博客更新', - docs: 'https://docs.rsshub.app/routes/blog#geocaching', - source: ['/blog/', '/'], - target: '/geocaching/blogs', - }, - ], - }, -}; diff --git a/lib/routes/geocaching/router.ts b/lib/routes/geocaching/router.ts deleted file mode 100644 index 19aa5e245..000000000 --- a/lib/routes/geocaching/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blogs', './blogs'); -}; diff --git a/lib/routes/getdr/index.ts b/lib/routes/getdr/index.ts index 4f1ebdba8..2966b2111 100644 --- a/lib/routes/getdr/index.ts +++ b/lib/routes/getdr/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['getdr.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'getdr.com/', +}; + +async function handler() { const rootUrl = 'https://getdr.com/最新詐騙情報'; const apiUrl = 'https://public-api.wordpress.com/rest/v1.1/sites/demogetdr.wordpress.com/posts'; @@ -40,9 +53,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '最新詐騙情報 - 趨勢科技防詐達人', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/getdr/maintainer.ts b/lib/routes/getdr/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/getdr/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/getdr/namespace.ts b/lib/routes/getdr/namespace.ts new file mode 100644 index 000000000..1d4f2ea1f --- /dev/null +++ b/lib/routes/getdr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '趨勢科技防詐達人', + url: 'getdr.com', +}; diff --git a/lib/routes/getdr/radar.ts b/lib/routes/getdr/radar.ts deleted file mode 100644 index 996abcc3f..000000000 --- a/lib/routes/getdr/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'getdr.com': { - _name: '趨勢科技防詐達人', - '.': [ - { - title: '最新詐騙情報', - docs: 'https://docs.rsshub.app/routes/new-media#qu-shi-ke-ji-fang-zha-da-ren-zui-xin-zha-pian-qing-bao', - source: ['/'], - target: '/getdr', - }, - ], - }, -}; diff --git a/lib/routes/getdr/router.ts b/lib/routes/getdr/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/getdr/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/getitfree/index.ts b/lib/routes/getitfree/index.ts index a56beea4f..08443ab3f 100644 --- a/lib/routes/getitfree/index.ts +++ b/lib/routes/getitfree/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { apiSlug, rootUrl, bakeFilterSearchParams, bakeFiltersWithPair, bakeUrl, fetchData, getFilterNameForTitle, getFilterParamsForUrl, parseFilterStr } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/:filter{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const filter = ctx.req.param('filter'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -43,9 +51,9 @@ export default async (ctx) => { const subtitle = getFilterNameForTitle(filtersWithPair); - ctx.set('data', { + return { ...(await fetchData(currentUrl)), item: items, title: `Getitfree${subtitle ? ` | ${subtitle}` : ''}`, - }); -}; + }; +} diff --git a/lib/routes/getitfree/maintainer.ts b/lib/routes/getitfree/maintainer.ts deleted file mode 100644 index 184de21b8..000000000 --- a/lib/routes/getitfree/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/category/:id': ['sanmmm', 'nczitzk'], - '/tag/:id': ['nczitzk'], - '/search/:keyword': ['sanmmm', 'nczitzk'], -}; diff --git a/lib/routes/getitfree/namespace.ts b/lib/routes/getitfree/namespace.ts new file mode 100644 index 000000000..c616b2b7e --- /dev/null +++ b/lib/routes/getitfree/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '正版中国', + url: 'getitfree.cn', +}; diff --git a/lib/routes/getitfree/radar.ts b/lib/routes/getitfree/radar.ts deleted file mode 100644 index 00e9b523c..000000000 --- a/lib/routes/getitfree/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'getitfree.cn': { - _name: '正版中国', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/shopping#zheng-ban-zhong-guo-fen-lei', - source: ['/category/:id'], - target: '/getitfree/category/:id', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/shopping#zheng-ban-zhong-guo-biao-qian', - source: ['/tag/:id'], - target: '/getitfree/tag/:id', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/shopping#zheng-ban-zhong-guo-sou-suo', - source: ['/'], - target: (_, url) => { - url = new URL(url); - const keyword = url.searchParams.get('s'); - - return `/getitfree/search${keyword ? `/${keyword}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/getitfree/router.ts b/lib/routes/getitfree/router.ts deleted file mode 100644 index 411afc13b..000000000 --- a/lib/routes/getitfree/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:filter{.+}?', './index'); -}; diff --git a/lib/routes/gettr/maintainer.ts b/lib/routes/gettr/maintainer.ts deleted file mode 100644 index b6ea27f75..000000000 --- a/lib/routes/gettr/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:id': ['TonyRL'], -}; diff --git a/lib/routes/gettr/namespace.ts b/lib/routes/gettr/namespace.ts new file mode 100644 index 000000000..77433092f --- /dev/null +++ b/lib/routes/gettr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GETTR', + url: 'gettr.com', +}; diff --git a/lib/routes/gettr/radar.ts b/lib/routes/gettr/radar.ts deleted file mode 100644 index e24d2345f..000000000 --- a/lib/routes/gettr/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gettr.com': { - _name: 'GETTR', - '.': [ - { - title: '个人时间线', - docs: 'https://docs.rsshub.app/routes/social-media#gettr', - source: ['/user/:id'], - target: '/gettr/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/gettr/router.ts b/lib/routes/gettr/router.ts deleted file mode 100644 index a7fbaa70a..000000000 --- a/lib/routes/gettr/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/gettr/user.ts b/lib/routes/gettr/user.ts index c812fcb73..25c8c3789 100644 --- a/lib/routes/gettr/user.ts +++ b/lib/routes/gettr/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,28 @@ const actionMap = { shares_pst: 'Shared a post: ', }; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/gettr/user/jasonmillerindc', + parameters: { id: 'User id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gettr.com/user/:id'], + }, + name: 'User timeline', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://gettr.com'; const apiHost = 'https://api.gettr.com'; const mediaHost = 'https://media.gettr.com'; @@ -48,12 +70,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${userInfo.nickname} on Gettr`, description: userInfo.dsc, link: `${baseUrl}/user/${id}`, image: `${mediaHost}/${userInfo.ico}`, language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/gf-cn/maintainer.ts b/lib/routes/gf-cn/maintainer.ts deleted file mode 100644 index 062d245bd..000000000 --- a/lib/routes/gf-cn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/gf-cn/namespace.ts b/lib/routes/gf-cn/namespace.ts new file mode 100644 index 000000000..965ca99db --- /dev/null +++ b/lib/routes/gf-cn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '少女前线', + url: 'sunborngame.com', +}; diff --git a/lib/routes/gf-cn/news.ts b/lib/routes/gf-cn/news.ts index e20a395af..bc0c89cc8 100644 --- a/lib/routes/gf-cn/news.ts +++ b/lib/routes/gf-cn/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; @@ -8,7 +9,31 @@ const titles = { 3: '公告', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['game'], + example: '/gf-cn/news', + parameters: { category: '分类,见下表,默认为新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sunborngame.com/:category', 'sunborngame.com/'], + }, + name: '情报局', + maintainers: ['nczitzk'], + handler, + description: `| 新闻 | 公告 | + | ---- | ---- | + | 1 | 3 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '1'; const rootUrl = 'https://gf-cn.sunborngame.com'; @@ -43,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[category]} - 少女前线 - 情报局`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gf-cn/radar.ts b/lib/routes/gf-cn/radar.ts deleted file mode 100644 index 0f9507e8c..000000000 --- a/lib/routes/gf-cn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sunborngame.com': { - _name: '少女前线', - '.': [ - { - title: '情报局', - docs: 'https://docs.rsshub.app/routes/game#shao-nv-qian-xian-qing-bao-ju', - source: ['/:category', '/'], - target: '/gf-cn/news/:category?', - }, - ], - }, -}; diff --git a/lib/routes/gf-cn/router.ts b/lib/routes/gf-cn/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/gf-cn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/gihyo/group.ts b/lib/routes/gihyo/group.ts index deffdfb80..03f38110c 100644 --- a/lib/routes/gihyo/group.ts +++ b/lib/routes/gihyo/group.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/list/group/:id', + categories: ['programming'], + example: '/gihyo/list/group/Ubuntu-Weekly-Recipe', + parameters: { id: 'Series' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gihyo.jp/list/group/:id'], + }, + name: 'Series', + maintainers: ['masakichi'], + handler, +}; + +async function handler(ctx) { const groupId = ctx.req.param('id'); const baseUrl = 'https://gihyo.jp'; @@ -38,11 +60,11 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title, link, description, language, item, - }); -}; + }; +} diff --git a/lib/routes/gihyo/maintainer.ts b/lib/routes/gihyo/maintainer.ts deleted file mode 100644 index 1d926f6a0..000000000 --- a/lib/routes/gihyo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/list/group/:id': ['masakichi'], -}; diff --git a/lib/routes/gihyo/namespace.ts b/lib/routes/gihyo/namespace.ts new file mode 100644 index 000000000..1a28e9f3c --- /dev/null +++ b/lib/routes/gihyo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'gihyo.jp', + url: 'gihyo.jp', +}; diff --git a/lib/routes/gihyo/radar.ts b/lib/routes/gihyo/radar.ts deleted file mode 100644 index 3235dd10b..000000000 --- a/lib/routes/gihyo/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gihyo.jp': { - _name: 'gihyo.jp', - '.': [ - { - title: '記事一覧', - docs: 'https://docs.rsshub.app/routes/programming#gihyo-jp', - source: '/list/group/:id', - target: '/gihyo/list/group/:id', - }, - ], - }, -}; diff --git a/lib/routes/gihyo/router.ts b/lib/routes/gihyo/router.ts deleted file mode 100644 index 1a464b51f..000000000 --- a/lib/routes/gihyo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/list/group/:id', './group'); -}; diff --git a/lib/routes/gitee/maintainer.ts b/lib/routes/gitee/maintainer.ts deleted file mode 100644 index 15a057fbc..000000000 --- a/lib/routes/gitee/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/commits/:owner/:repo': ['TonyRL'], - '/events/:owner/:repo': ['TonyRL'], - '/events/:username': ['TonyRL'], - '/releases/:owner/:repo': ['TonyRL'], -}; diff --git a/lib/routes/gitee/namespace.ts b/lib/routes/gitee/namespace.ts new file mode 100644 index 000000000..268828531 --- /dev/null +++ b/lib/routes/gitee/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Gitee', + url: 'gitee.com', +}; diff --git a/lib/routes/gitee/radar.ts b/lib/routes/gitee/radar.ts deleted file mode 100644 index 63c9b483c..000000000 --- a/lib/routes/gitee/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'gitee.com': { - _name: 'Gitee', - '.': [ - { - title: '仓库 Releases', - docs: 'https://docs.rsshub.app/routes/programming#gitee', - source: ['/:owner/:repo/releases'], - target: '/gitee/releases/:owner/:repo', - }, - { - title: '仓库提交', - docs: 'https://docs.rsshub.app/routes/programming#gitee', - source: ['/:owner/:repo/commits'], - target: '/gitee/commits/:owner/:repo', - }, - { - title: '用户公开动态', - docs: 'https://docs.rsshub.app/routes/programming#gitee', - source: ['/:username'], - target: '/gitee/events/:username', - }, - { - title: '仓库动态', - docs: 'https://docs.rsshub.app/routes/programming#gitee', - source: ['/:owner/:repo'], - target: '/gitee/events/:owner/:repo', - }, - ], - }, -}; diff --git a/lib/routes/gitee/repos/commits.ts b/lib/routes/gitee/repos/commits.ts index eb271c042..b3ccede1b 100644 --- a/lib/routes/gitee/repos/commits.ts +++ b/lib/routes/gitee/repos/commits.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,28 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/commits/:owner/:repo', + categories: ['programming'], + example: '/gitee/commits/y_project/RuoYi', + parameters: { owner: '用户名', repo: '仓库名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitee.com/:owner/:repo/commits'], + }, + name: '仓库提交', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { owner, repo } = ctx.req.param(); const apiUrl = `https://gitee.com/api/v5/repos/${owner}/${repo}/commits`; @@ -34,9 +56,9 @@ export default async (ctx) => { link: item.html_url, })); - ctx.set('data', { + return { title: `${owner}/${repo} - 提交`, link: `https://gitee.com/${owner}/${repo}/commits`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gitee/repos/events.ts b/lib/routes/gitee/repos/events.ts index 36f6905e4..bfd17715c 100644 --- a/lib/routes/gitee/repos/events.ts +++ b/lib/routes/gitee/repos/events.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,28 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/events/:owner/:repo', + categories: ['programming'], + example: '/gitee/events/y_project/RuoYi', + parameters: { owner: '用户名', repo: '仓库名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitee.com/:owner/:repo'], + }, + name: '仓库动态', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { owner, repo } = ctx.req.param(); const apiUrl = `https://gitee.com/api/v5/repos/${owner}/${repo}/events`; @@ -60,9 +82,9 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: `${owner}/${repo} - 仓库动态`, link: `https://gitee.com/${owner}/${repo}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gitee/repos/releases.ts b/lib/routes/gitee/repos/releases.ts index f38db10e5..68b99cf2b 100644 --- a/lib/routes/gitee/repos/releases.ts +++ b/lib/routes/gitee/repos/releases.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; @@ -6,7 +7,28 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/releases/:owner/:repo', + categories: ['programming'], + example: '/gitee/releases/y_project/RuoYi', + parameters: { owner: '用户名', repo: '仓库名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitee.com/:owner/:repo/releases'], + }, + name: '仓库 Releases', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { owner, repo } = ctx.req.param(); const response = await got(`https://gitee.com/api/v5/repos/${owner}/${repo}/releases`, { @@ -26,9 +48,9 @@ export default async (ctx) => { link: `https://gitee.com/${owner}/${repo}/releases/${item.tag_name}`, })); - ctx.set('data', { + return { title: `${owner}/${repo} - 发行版`, link: `https://gitee.com/${owner}/${repo}/releases`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gitee/router.ts b/lib/routes/gitee/router.ts deleted file mode 100644 index 9ab870de2..000000000 --- a/lib/routes/gitee/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/commits/:owner/:repo', './repos/commits'); - router.get('/events/:owner/:repo', './repos/events'); - router.get('/events/:username', './users/events'); - router.get('/releases/:owner/:repo', './repos/releases'); -}; diff --git a/lib/routes/gitee/users/events.ts b/lib/routes/gitee/users/events.ts index 1c590330b..3ae1a55fc 100644 --- a/lib/routes/gitee/users/events.ts +++ b/lib/routes/gitee/users/events.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,28 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/events/:username', + categories: ['programming'], + example: '/gitee/events/y_project', + parameters: { username: '用户名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitee.com/:username'], + }, + name: '用户公开动态', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const username = ctx.req.param('username'); const apiUrl = `https://gitee.com/api/v5/users/${username}/events/public`; @@ -78,9 +100,9 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: `${username} - 公开动态`, link: `https://gitee.com/${username}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/github/branches.ts b/lib/routes/github/branches.ts index bac3c769c..43446d74a 100644 --- a/lib/routes/github/branches.ts +++ b/lib/routes/github/branches.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/branches/:user/:repo', + categories: ['programming'], + example: '/github/branches/DIYgod/RSSHub', + parameters: { user: 'User name', repo: 'Repo name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/branches', 'github.com/:user/:repo'], + }, + name: 'Repo Branches', + maintainers: ['max-arnold'], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); @@ -19,7 +41,7 @@ export default async (ctx) => { }); const data = response.data; - ctx.set('data', { + return { title: `${user}/${repo} Branches`, link: `${host}/branches/all`, item: data.map((item) => ({ @@ -27,5 +49,5 @@ export default async (ctx) => { description: item.name, link: `${host}/commits/${item.name}`, })), - }); -}; + }; +} diff --git a/lib/routes/github/comments.ts b/lib/routes/github/comments.ts index c2e7b61f2..4c074ca4d 100644 --- a/lib/routes/github/comments.ts +++ b/lib/routes/github/comments.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; @@ -19,7 +20,18 @@ const typeDict = { }, }; -export default async (ctx) => { +export const route: Route = { + path: ['/comments/:user/:repo/:type/:number', '/comments/:user/:repo/:number?'], + radar: { + source: ['github.com/:user/:repo/:type'], + target: '/comments/:user/:repo', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); const number = ctx.req.param('number') && isNaN(Number.parseInt(ctx.req.param('number'))) ? 1 : Number.parseInt(ctx.req.param('number')); @@ -35,7 +47,7 @@ export default async (ctx) => { }; await (isNaN(number) ? allIssues(ctx, user, repo, limit, headers) : singleIssue(ctx, user, repo, number, limit, headers)); -}; +} async function allIssues(ctx, user, repo, limit, headers) { const response = await got(`${apiUrl}/repos/${user}/${repo}/issues/comments`, { @@ -73,11 +85,11 @@ async function allIssues(ctx, user, repo, limit, headers) { used: Number.parseInt(response.headers['x-ratelimit-used']), }; - ctx.set('data', { + return { title: `${user}/${repo}: Issue & Pull request comments`, link: `${rootUrl}/${user}/${repo}`, item: items, - }); + }; ctx.set('json', { title: `${user}/${repo}: Issue & Pull request comments`, @@ -165,11 +177,11 @@ async function singleIssue(ctx, user, repo, number, limit, headers) { } } - ctx.set('data', { + return { title: `${user}/${repo}: ${typeDict[type].title} #${number} - ${issue.title}`, link: issue.html_url, item: items, - }); + }; ctx.set('json', { title: `${user}/${repo}: ${typeDict[type].title} #${number} - ${issue.title}`, diff --git a/lib/routes/github/contributors.ts b/lib/routes/github/contributors.ts index 21769dd9f..e890b26a8 100644 --- a/lib/routes/github/contributors.ts +++ b/lib/routes/github/contributors.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/contributors/:user/:repo/:order?/:anon?', + categories: ['programming'], + example: '/github/contributors/DIYgod/RSSHub', + parameters: { user: 'User name', repo: 'Repo name', order: 'Sort order by commit numbers, desc and asc (descending by default)', anon: 'Show anonymous users. Defaults to no, use any values for yes.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/graphs/contributors', 'github.com/:user/:repo'], + target: '/contributors/:user/:repo', + }, + name: 'Repo Contributors', + maintainers: ['zoenglinghou'], + handler, +}; + +async function handler(ctx) { const { user, repo, order, anon } = ctx.req.param(); const host = `https://github.com/${user}/${repo}`; @@ -70,10 +93,10 @@ export default async (ctx) => { } ); - ctx.set('data', { + return { title: `${user}/${repo} Contributors`, link: `${host}/graphs/contributors`, description: `New contributors for ${user}/${repo}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/github/file.ts b/lib/routes/github/file.ts index 11846cacf..101b683a3 100644 --- a/lib/routes/github/file.ts +++ b/lib/routes/github/file.ts @@ -1,8 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import queryString from 'query-string'; -export default async (ctx) => { +export const route: Route = { + path: '/file/:user/:repo/:branch/:filepath{.+}', + radar: { + source: ['github.com/:user/:repo/blob/:branch/*filepath'], + target: '/file/:user/:repo/:branch/:filepath', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); const branch = ctx.req.param('branch'); @@ -37,9 +49,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `GitHub File - ${user}/${repo}/${branch}/${filepath}`, link: fileUrl, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/github/follower.ts b/lib/routes/github/follower.ts index c411f1891..2abe78dd7 100644 --- a/lib/routes/github/follower.ts +++ b/lib/routes/github/follower.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/user/followers/:user', + categories: ['programming'], + example: '/github/user/followers/HenryQW', + parameters: { user: 'GitHub username' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user'], + }, + name: 'User Followers', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new Error('GitHub follower RSS is disabled due to the lack of relevant config'); } @@ -36,7 +58,7 @@ export default async (ctx) => { const data = response.data.data.user.followers.edges; - ctx.set('data', { + return { allowEmpty: true, title: `${user}'s followers`, link: host, @@ -46,5 +68,5 @@ export default async (ctx) => { description: `${follower.node.login}
    `, link: `https://github.com/${follower.node.login}`, })), - }); -}; + }; +} diff --git a/lib/routes/github/gist.ts b/lib/routes/github/gist.ts index 478aaa43e..949357a44 100644 --- a/lib/routes/github/gist.ts +++ b/lib/routes/github/gist.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/gist/:gistId', + categories: ['programming'], + example: '/github/gist/d2c152bb7179d07015f336b1a0582679', + parameters: { gistId: 'Gist ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gist.github.com/:owner/:gistId/revisions', 'gist.github.com/:owner/:gistId/stargazers', 'gist.github.com/:owner/:gistId/forks', 'gist.github.com/:owner/:gistId'], + }, + name: 'Gist Commits', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const gistId = ctx.req.param('gistId'); const headers = { Accept: 'application/vnd.github.v3+json' }; @@ -24,12 +46,12 @@ export default async (ctx) => { pubDate: parseDate(item.committed_at), // e.g. 2022-09-02T11:09:56Z })); - ctx.set('data', { + return { allowEmpty: true, title: `${response.owner.login} / ${Object.values(response.files)[0].filename}`, description: response.description, image: response.owner.avatar_url, link: `${response.html_url}/revisions`, item: items, - }); -}; + }; +} diff --git a/lib/routes/github/issue.ts b/lib/routes/github/issue.ts index 9820d9e8a..b91393506 100644 --- a/lib/routes/github/issue.ts +++ b/lib/routes/github/issue.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import MarkdownIt from 'markdown-it'; @@ -8,7 +9,29 @@ const md = MarkdownIt({ import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/issue/:user/:repo/:state?/:labels?', + categories: ['programming'], + example: '/github/issue/vuejs/core/all/wontfix', + parameters: { user: 'GitHub username', repo: 'GitHub repo name', state: 'the state of the issues. Can be either `open`, `closed`, or `all`. Default: `open`.', labels: 'a list of comma separated label names' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/issues', 'github.com/:user/:repo/issues/:id', 'github.com/:user/:repo'], + target: '/issue/:user/:repo', + }, + name: 'Repo Issues', + maintainers: ['HenryQW', 'AndreyMZ'], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); const state = ctx.req.param('state'); @@ -36,7 +59,7 @@ export default async (ctx) => { }); const data = response.data; - ctx.set('data', { + return { allowEmpty: true, title: `${user}/${repo}${state ? ' ' + state.replace(/^\S/, (s) => s.toUpperCase()) : ''} Issues${labels ? ' - ' + labels : ''}`, link: host, @@ -49,5 +72,5 @@ export default async (ctx) => { author: item.user.login, link: `${host}/${item.number}`, })), - }); -}; + }; +} diff --git a/lib/routes/github/maintainer.ts b/lib/routes/github/maintainer.ts deleted file mode 100644 index b76e1afbe..000000000 --- a/lib/routes/github/maintainer.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - '/branches/:user/:repo': ['max-arnold'], - '/comments/:user/:repo/:number?': ['TonyRL', 'FliegendeWurst'], - '/contributors/:user/:repo/:order?/:anon?': ['zoenglinghou'], - '/file/:user/:repo/:branch/:filepath+': ['zengxs'], - '/gist/:gistId': ['TonyRL'], - '/issue/:user/:repo/:state?/:labels?': ['HenryQW', 'AndreyMZ'], - '/notifications': ['zhzy0077'], - '/pull/:user/:repo/:state?': ['hashman', 'TonyRL'], - '/pulse/:user/:repo/:period?': ['jameschensmith'], - '/repos/:user': ['DIYgod'], - '/search/:query/:sort?/:order?': ['LogicJake'], - '/starred_repos/:user': ['LanceZhu'], - '/stars/:user/:repo': ['HenryQW'], - '/topics/:name/:qs?': ['queensferryme'], - '/trending/:since/:language/:spoken_language?': ['DIYgod', 'jameschensmith'], - '/user/followers/:user': ['HenryQW'], - '/wiki/:user/:repo/:page?': ['TonyRL'], -}; diff --git a/lib/routes/github/namespace.ts b/lib/routes/github/namespace.ts new file mode 100644 index 000000000..51009fc81 --- /dev/null +++ b/lib/routes/github/namespace.ts @@ -0,0 +1,15 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GitHub', + url: 'github.com', + description: `:::tip +GitHub provides some official RSS feeds: + +- Repo releases: \`https://github.com/:owner/:repo/releases.atom\` +- Repo commits: \`https://github.com/:owner/:repo/commits.atom\` +- User activities: \`https://github.com/:user.atom\` +- Private feed: \`https://github.com/:user.private.atom?token=:secret\` (You can find **Subscribe to your news feed** in [dashboard](https://github.com) page after login) +- Wiki history: \`https://github.com/:owner/:repo/wiki.atom\` +:::`, +}; diff --git a/lib/routes/github/notifications.ts b/lib/routes/github/notifications.ts index faab6e724..abe23575d 100644 --- a/lib/routes/github/notifications.ts +++ b/lib/routes/github/notifications.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const apiUrl = 'https://api.github.com'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/notifications', + categories: ['programming'], + example: '/github/notifications', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/notifications'], + }, + name: 'Notifications', + maintainers: ['zhzy0077'], + handler, + url: 'github.com/notifications', +}; + +async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new Error('GitHub trending RSS is disabled due to the lack of relevant config'); } @@ -33,11 +56,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Github Notifications', link: 'https://github.com/notifications', item: items, - }); + }; ctx.set('json', { title: 'Github Notifications', @@ -50,4 +73,4 @@ export default async (ctx) => { used: Number.parseInt(response.headers['X-RateLimit-Used']), }, }); -}; +} diff --git a/lib/routes/github/pulls.ts b/lib/routes/github/pulls.ts index 06c5930af..86d0ce1b0 100644 --- a/lib/routes/github/pulls.ts +++ b/lib/routes/github/pulls.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import MarkdownIt from 'markdown-it'; @@ -7,7 +8,29 @@ const md = MarkdownIt({ }); import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/pull/:user/:repo/:state?/:labels?', + categories: ['programming'], + example: '/github/pull/DIYgod/RSSHub', + parameters: { user: 'User name', repo: 'Repo name', state: 'the state of pull requests. Can be either `open`, `closed`, or `all`. Default: `open`.', labels: 'a list of comma separated label names' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/pulls', 'github.com/:user/:repo/pulls/:id', 'github.com/:user/:repo'], + target: '/pull/:user/:repo', + }, + name: 'Repo Pull Requests', + maintainers: [], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); const state = ctx.req.param('state') ?? 'open'; @@ -32,7 +55,7 @@ export default async (ctx) => { }); const data = response.data.filter((item) => item.pull_request); - ctx.set('data', { + return { allowEmpty: true, title: `${user}/${repo} Pull requests`, link: host, @@ -43,5 +66,5 @@ export default async (ctx) => { pubDate: parseDate(item.created_at), link: item.html_url, })), - }); -}; + }; +} diff --git a/lib/routes/github/pulse.ts b/lib/routes/github/pulse.ts index 1489fbaae..e58f64271 100644 --- a/lib/routes/github/pulse.ts +++ b/lib/routes/github/pulse.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,32 @@ import md5 from '@/utils/md5'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/pulse/:user/:repo/:period?', + categories: ['programming'], + example: '/github/pulse/DIYgod/RSSHub', + parameters: { + user: 'User name', + repo: 'Repo name', + period: "Time frame, selected from a repository's Pulse/Insights page. Possible values are: `daily`, `halfweekly`, `weekly`, or `monthly`. Default: `weekly`. If your RSS client supports it, consider aligning the polling frequency of the feed to the period.", + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/pulse', 'github.com/:user/:repo/pulse/:period'], + }, + name: 'Repo Pulse', + maintainers: ['jameschensmith'], + handler, +}; + +async function handler(ctx) { const { user, repo, period } = ctx.req.param(); const periods = ['daily', 'halfweekly', 'weekly', 'monthly']; @@ -71,7 +97,7 @@ export default async (ctx) => { .toArray(); } - ctx.set('data', { + return { title: `${user}/${repo} ${pulsePeriod} Pulse`, link, item: [ @@ -86,5 +112,5 @@ export default async (ctx) => { pubDate: parseDate(periodTo), }, ], - }); -}; + }; +} diff --git a/lib/routes/github/radar.ts b/lib/routes/github/radar.ts deleted file mode 100644 index 563f14575..000000000 --- a/lib/routes/github/radar.ts +++ /dev/null @@ -1,111 +0,0 @@ -export default { - 'github.com': { - _name: 'GitHub', - '.': [ - { - title: 'Repo branches', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/branches', '/:user/:repo'], - target: '/github/branches/:user/:repo', - }, - { - title: 'Issues / Pull Requests comments', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/:type/:number'], - target: '/github/comments/:user/:repo/:number', - }, - { - title: 'Issue & Pull Request comments', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/:type'], - target: '/github/comments/:user/:repo', - }, - { - title: 'Repo contributors', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/graphs/contributors', '/:user/:repo'], - target: '/github/contributors/:user/:repo', - }, - { - title: 'File commits', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/:user/:repo/blob/:branch/*filepath', - target: '/github/file/:user/:repo/:branch/:filepath', - }, - { - title: 'Repo issues', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/issues', '/:user/:repo/issues/:id', '/:user/:repo'], - target: '/github/issue/:user/:repo', - }, - { - title: 'Repo Pull Requests', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/pulls', '/:user/:repo/pulls/:id', '/:user/:repo'], - target: '/github/pull/:user/:repo', - }, - { - title: 'Pulse', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/pulse', '/:user/:repo/pulse/:period'], - target: '/github/pulse/:user/:repo/:period?', - }, - { - title: 'User repos', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/:user', - target: '/github/repos/:user', - }, - { - title: 'Repo stars', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/stargazers', '/:user/:repo'], - target: '/github/stars/:user/:repo', - }, - { - title: 'User starred repositories', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/:user', - target: '/github/starred_repos/:user', - }, - { - title: 'Topics', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/topics', - target: '/github/topics/:name/:qs?', - }, - { - title: 'Trending', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/trending', - target: '/github/trending/:since', - }, - { - title: 'User followers', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: '/:user', - target: '/github/user/followers/:user', - }, - { - title: 'Wiki history', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:user/:repo/wiki/:page/_history', '/:user/:repo/wiki/:page', '/:user/:repo/wiki/_history', '/:user/:repo/wiki'], - target: '/github/wiki/:user/:repo/:page', - }, - { - title: 'Notifications', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/notifications'], - target: '/github/notifications', - }, - ], - gist: [ - { - title: 'Gist Commits', - docs: 'https://docs.rsshub.app/routes/programming#github', - source: ['/:owner/:gistId/revisions', '/:owner/:gistId/stargazers', '/:owner/:gistId/forks', '/:owner/:gistId'], - target: '/github/gist/:gistId', - }, - ], - }, -}; diff --git a/lib/routes/github/repos.ts b/lib/routes/github/repos.ts index 9f96b399f..0da38ec35 100644 --- a/lib/routes/github/repos.ts +++ b/lib/routes/github/repos.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import queryString from 'query-string'; -export default async (ctx) => { +export const route: Route = { + path: '/repos/:user', + categories: ['programming'], + example: '/github/repos/DIYgod', + parameters: { user: 'GitHub username' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user'], + }, + name: 'User Repo', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const headers = {}; @@ -18,7 +40,7 @@ export default async (ctx) => { headers, }); const data = response.data; - ctx.set('data', { + return { allowEmpty: true, title: `${user}'s GitHub repositories`, link: `https://github.com/${user}`, @@ -30,5 +52,5 @@ export default async (ctx) => { pubDate: new Date(item.created_at).toUTCString(), link: item.html_url, })), - }); -}; + }; +} diff --git a/lib/routes/github/router.ts b/lib/routes/github/router.ts deleted file mode 100644 index 9fcbda5ba..000000000 --- a/lib/routes/github/router.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default (router) => { - router.get('/branches/:user/:repo', './branches'); - router.get('/comments/:user/:repo/:type/:number', './comments'); // deprecated - router.get('/comments/:user/:repo/:number?', './comments'); - router.get('/contributors/:user/:repo/:order?/:anon?', './contributors'); - router.get('/file/:user/:repo/:branch/:filepath{.+}', './file'); - router.get('/gist/:gistId', './gist'); - router.get('/issue/:user/:repo/:state?/:labels?', './issue'); - router.get('/notifications', './notifications'); - router.get('/pull/:user/:repo/:state?/:labels?', './pulls'); - router.get('/pulse/:user/:repo/:period?', './pulse'); - router.get('/repos/:user', './repos'); - router.get('/search/:query/:sort?/:order?', './search'); - router.get('/starred_repos/:user', './starred-repos'); - router.get('/stars/:user/:repo', './star'); - router.get('/topics/:name/:qs?', './topic'); - router.get('/trending/:since/:language/:spoken_language?', './trending'); - router.get('/user/followers/:user', './follower'); - router.get('/wiki/:user/:repo/:page?', './wiki'); -}; diff --git a/lib/routes/github/search.ts b/lib/routes/github/search.ts index 154fc2fdd..f8c5b344e 100644 --- a/lib/routes/github/search.ts +++ b/lib/routes/github/search.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import * as url from 'node:url'; const host = 'https://github.com'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:query/:sort?/:order?', + categories: ['programming'], + example: '/github/search/RSSHub/bestmatch/desc', + parameters: { query: 'search keyword', sort: 'Sort options (default to bestmatch)', order: 'Sort order, desc and asc (desc descending by default)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search Result', + maintainers: ['LogicJake'], + handler, + description: `| Sort options | sort | + | ---------------- | --------- | + | Best match | bestmatch | + | Most stars | stars | + | Most forks | forks | + | Recently updated | updated |`, +}; + +async function handler(ctx) { const query = ctx.req.param('query'); let sort = ctx.req.param('sort') || 'bestmatch'; const order = ctx.req.param('order') || 'desc'; @@ -32,10 +57,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { allowEmpty: true, title: `${query}的搜索结果`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/github/star.ts b/lib/routes/github/star.ts index ef5b7fdce..90c475815 100644 --- a/lib/routes/github/star.ts +++ b/lib/routes/github/star.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/stars/:user/:repo', + categories: ['programming'], + example: '/github/stars/DIYGod/RSSHub', + parameters: { user: 'GitHub username', repo: 'GitHub repo name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/stargazers', 'github.com/:user/:repo'], + }, + name: 'Repo Stars', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new Error('GitHub star RSS is disabled due to the lack of relevant config'); } @@ -37,7 +59,7 @@ export default async (ctx) => { const data = response.data.data.repository.stargazers.edges.reverse(); - ctx.set('data', { + return { allowEmpty: true, title: `${user}/${repo}’s stargazers`, link: host, @@ -47,5 +69,5 @@ export default async (ctx) => { description: `${follower.node.login}
    `, link: `https://github.com/${follower.node.login}`, })), - }); -}; + }; +} diff --git a/lib/routes/github/starred-repos.ts b/lib/routes/github/starred-repos.ts index e28cfbdee..f0923f7e7 100644 --- a/lib/routes/github/starred-repos.ts +++ b/lib/routes/github/starred-repos.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/starred_repos/:user', + categories: ['programming'], + example: '/github/starred_repos/DIYgod', + parameters: { user: 'User name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user'], + }, + name: 'User Starred Repositories', + maintainers: ['LanceZhu'], + handler, +}; + +async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new Error('GitHub star RSS is disabled due to the lack of relevant config'); } @@ -45,7 +67,7 @@ export default async (ctx) => { const data = response.data.data.user.starredRepositories.edges; - ctx.set('data', { + return { allowEmpty: true, title: `${user}’s starred repositories`, link: host, @@ -59,5 +81,5 @@ export default async (ctx) => { pubDate: new Date(repo.starredAt), link: repo.node.url, })), - }); -}; + }; +} diff --git a/lib/routes/github/topic.ts b/lib/routes/github/topic.ts index d501d2453..37a5b784e 100644 --- a/lib/routes/github/topic.ts +++ b/lib/routes/github/topic.ts @@ -1,15 +1,45 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topics/:name/:qs?', + categories: ['programming'], + example: '/github/topics/framework', + parameters: { name: 'Topic name, which can be found in the URL of the corresponding [Topics Page](https://github.com/topics/framework)', qs: 'Query string, like `l=php&o=desc&s=stars`. Details listed as follows:' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/topics'], + }, + name: 'Topics', + maintainers: ['queensferryme'], + handler, + url: 'github.com/topics', + description: `| Parameter | Description | Values | + | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | + | \`l\` | Language | For instance \`php\`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) | + | \`o\` | Sorting Order | \`asc\`, \`desc\` | + | \`s\` | Sorting Criteria | \`stars\`, \`forks\`, \`updated\` | + + For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars).`, +}; + +async function handler(ctx) { const link = `https://github.com/topics/${ctx.req.param('name')}`; const { data, url } = await got(link, { searchParams: new URLSearchParams(ctx.req.param('qs')), }); const $ = load(data); - ctx.set('data', { + return { title: $('title').text(), description: $('.markdown-body').text().trim(), link: url, @@ -37,5 +67,5 @@ export default async (ctx) => { pubDate, }; }), - }); -}; + }; +} diff --git a/lib/routes/github/trending.ts b/lib/routes/github/trending.ts index 00da08b82..d84db6450 100644 --- a/lib/routes/github/trending.ts +++ b/lib/routes/github/trending.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,34 @@ import { art } from '@/utils/render'; import { load } from 'cheerio'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/trending/:since/:language/:spoken_language?', + categories: ['programming'], + example: '/github/trending/daily/javascript/en', + 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", + }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/trending'], + target: '/trending/:since', + }, + name: 'Trending', + maintainers: ['DIYgod', 'jameschensmith'], + handler, + url: 'github.com/trending', +}; + +async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new Error('GitHub trending RSS is disabled due to the lack of relevant config'); } @@ -73,7 +101,7 @@ export default async (ctx) => { return { ...found, ...repo }; }); - ctx.set('data', { + return { title: $('title').text(), link: trendingUrl, item: repos.map((r) => ({ @@ -88,5 +116,5 @@ export default async (ctx) => { }), link: `https://github.com/${r.nameWithOwner}`, })), - }); -}; + }; +} diff --git a/lib/routes/github/wiki.ts b/lib/routes/github/wiki.ts index 1c6443ed3..7c3e76437 100644 --- a/lib/routes/github/wiki.ts +++ b/lib/routes/github/wiki.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://github.com'; -export default async (ctx) => { +export const route: Route = { + path: '/wiki/:user/:repo/:page?', + categories: ['programming'], + example: '/github/wiki/flutter/flutter/Roadmap', + parameters: { user: 'User / Org name', repo: 'Repo name', page: 'Page slug, can be found in URL, empty means Home' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['github.com/:user/:repo/wiki/:page/_history', 'github.com/:user/:repo/wiki/:page', 'github.com/:user/:repo/wiki/_history', 'github.com/:user/:repo/wiki'], + target: '/wiki/:user/:repo/:page', + }, + name: 'Wiki History', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { user, repo, page } = ctx.req.param(); const url = `${baseUrl}/${user}/${repo}/wiki${page ? `/${page}` : ''}/_history`; @@ -24,9 +47,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${$('.gh-header-title').text()} - ${user}/${repo}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gitpod/blog.ts b/lib/routes/gitpod/blog.ts index f7afe3ed9..47bd71fb7 100644 --- a/lib/routes/gitpod/blog.ts +++ b/lib/routes/gitpod/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { rootUrl } from './utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['programming'], + example: '/gitpod/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitpod.io/blog', 'gitpod.io/'], + }, + name: 'Blog', + maintainers: ['TonyRL'], + handler, + url: 'gitpod.io/blog', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; const response = await got(rootUrl + '/blog'); const $ = load(response.data); @@ -46,13 +69,13 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl + '/blog', description: $('meta[name="description"]').attr('content'), language: 'en-US', item: items, - }); + }; ctx.set('json', { title: $('title').text(), @@ -61,4 +84,4 @@ export default async (ctx) => { language: 'en-US', item: items, }); -}; +} diff --git a/lib/routes/gitpod/changelog.ts b/lib/routes/gitpod/changelog.ts index f2a64ffa0..4037aafaf 100644 --- a/lib/routes/gitpod/changelog.ts +++ b/lib/routes/gitpod/changelog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog', + categories: ['programming'], + example: '/gitpod/changelog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gitpod.io/changelog', 'gitpod.io/'], + }, + name: 'Changelog', + maintainers: ['TonyRL'], + handler, + url: 'gitpod.io/changelog', +}; + +async function handler() { const response = await got(rootUrl + '/changelog'); const $ = load(response.data); const items = $('div[class^=changelog-entry]') @@ -25,11 +48,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl + '/changelog', description: $('meta[name="description"]').attr('content'), language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/gitpod/maintainer.ts b/lib/routes/gitpod/maintainer.ts deleted file mode 100644 index 67893944e..000000000 --- a/lib/routes/gitpod/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog': ['TonyRL'], - '/changelog': ['TonyRL'], -}; diff --git a/lib/routes/gitpod/namespace.ts b/lib/routes/gitpod/namespace.ts new file mode 100644 index 000000000..95979f227 --- /dev/null +++ b/lib/routes/gitpod/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Gitpod', + url: 'gitpod.io', +}; diff --git a/lib/routes/gitpod/radar.ts b/lib/routes/gitpod/radar.ts deleted file mode 100644 index 755164857..000000000 --- a/lib/routes/gitpod/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'gitpod.io': { - _name: 'Gitpod', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/programming#gitpod', - source: ['/blog', '/'], - target: '/gitpod/blog', - }, - { - title: '更新日志', - docs: 'https://docs.rsshub.app/routes/programming#gitpod', - source: ['/changelog', '/'], - target: '/gitpod/changelog', - }, - ], - }, -}; diff --git a/lib/routes/gitpod/router.ts b/lib/routes/gitpod/router.ts deleted file mode 100644 index 8e830fc8a..000000000 --- a/lib/routes/gitpod/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); - router.get('/changelog', './changelog'); -}; diff --git a/lib/routes/globallawreview/index.ts b/lib/routes/globallawreview/index.ts index c67e53e48..24b62c80c 100644 --- a/lib/routes/globallawreview/index.ts +++ b/lib/routes/globallawreview/index.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['globallawreview.org/Magazine/GetIssueContentList', 'globallawreview.org/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'globallawreview.org/Magazine/GetIssueContentList', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; const rootUrl = 'http://www.globallawreview.org'; @@ -45,11 +58,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, language: 'zh-cn', author: '中国社会科学院法学研究所', - }); -}; + }; +} diff --git a/lib/routes/globallawreview/maintainer.ts b/lib/routes/globallawreview/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/globallawreview/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/globallawreview/namespace.ts b/lib/routes/globallawreview/namespace.ts new file mode 100644 index 000000000..4c37e6982 --- /dev/null +++ b/lib/routes/globallawreview/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '环球法律评论', + url: 'globallawreview.org', +}; diff --git a/lib/routes/globallawreview/radar.ts b/lib/routes/globallawreview/radar.ts deleted file mode 100644 index e03a03738..000000000 --- a/lib/routes/globallawreview/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'globallawreview.org': { - _name: '环球法律评论', - '.': [ - { - title: '期刊', - docs: 'https://docs.rsshub.app/routes/journal#huan-qiu-fa-lu-ping-lun', - source: ['/Magazine/GetIssueContentList', '/'], - target: '/globallawreview', - }, - ], - }, -}; diff --git a/lib/routes/globallawreview/router.ts b/lib/routes/globallawreview/router.ts deleted file mode 100644 index f15cf51c5..000000000 --- a/lib/routes/globallawreview/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './'); -}; diff --git a/lib/routes/gocn/jobs.ts b/lib/routes/gocn/jobs.ts index 659cf158c..9c4b856ca 100644 --- a/lib/routes/gocn/jobs.ts +++ b/lib/routes/gocn/jobs.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { renderHTML } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/jobs', + categories: ['programming'], + example: '/gocn/jobs', + 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/', +}; + +async function handler() { const api_url = 'https://gocn.vip/api/files?spaceGuid=Gd7OHl¤tPage=1&sort=1'; const base_url = 'https://gocn.vip/c/3lQ6GbD5ny/s/Gd7OHl'; const job_url = 'https://gocn.vip/c/3lQ6GbD5ny'; @@ -19,10 +42,10 @@ export default async (ctx) => { author: item.nickname, })); - ctx.set('data', { + return { title: `GoCN社区-招聘`, link: base_url, description: `获取GoCN站点招聘`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gocn/maintainer.ts b/lib/routes/gocn/maintainer.ts deleted file mode 100644 index 5d47945b5..000000000 --- a/lib/routes/gocn/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/': ['AtlanCI', 'CcccFz'], - '/jobs': ['AtlanCI', 'CcccFz'], - '/news': ['AtlanCI'], - '/topics': ['AtlanCI', 'CcccFz'], -}; diff --git a/lib/routes/gocn/namespace.ts b/lib/routes/gocn/namespace.ts new file mode 100644 index 000000000..3cb50ca6f --- /dev/null +++ b/lib/routes/gocn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GoCN', + url: 'gocn.vip', +}; diff --git a/lib/routes/gocn/news.ts b/lib/routes/gocn/news.ts index ab958efdf..6cefd4e04 100644 --- a/lib/routes/gocn/news.ts +++ b/lib/routes/gocn/news.ts @@ -1,8 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { renderHTML } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/', '/news'], + name: 'Unknown', + maintainers: ['AtlanCI', 'CcccFz'], + handler, + url: 'gocn.vip/', +}; + +async function handler() { const base_url = 'https://gocn.vip/c/3lQ6GbD5ny/home'; const article_url = 'https://gocn.vip/c/3lQ6GbD5ny'; const api_url = 'https://gocn.vip/api/home/page'; @@ -22,10 +31,10 @@ export default async (ctx) => { author: item.nickname, })); - ctx.set('data', { + return { title: `GoCN社区-最新动态`, link: base_url, description: `获取GoCN站点最新动态`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gocn/radar.ts b/lib/routes/gocn/radar.ts deleted file mode 100644 index b279045e7..000000000 --- a/lib/routes/gocn/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'gocn.vip': { - _name: 'GoCN', - '.': [ - { - title: '最新动态', - docs: 'https://docs.rsshub.app/routes/programming#GoCN', - source: ['/'], - target: '/gocn/news', - }, - { - title: '每日新闻', - docs: 'https://docs.rsshub.app/routes/programming#GoCN', - source: ['/'], - target: '/gocn/topics', - }, - { - title: '招聘', - docs: 'https://docs.rsshub.app/routes/programming#GoCN', - source: ['/'], - target: '/gocn/jobs', - }, - ], - }, -}; diff --git a/lib/routes/gocn/router.ts b/lib/routes/gocn/router.ts deleted file mode 100644 index 10d72dee5..000000000 --- a/lib/routes/gocn/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/', './news'); - router.get('/jobs', './jobs'); - router.get('/news', './news'); - router.get('/topics', './topics'); -}; diff --git a/lib/routes/gocn/topics.ts b/lib/routes/gocn/topics.ts index 4ba8c36ff..03710212c 100644 --- a/lib/routes/gocn/topics.ts +++ b/lib/routes/gocn/topics.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { renderHTML } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topics', + categories: ['programming'], + example: '/gocn/topics', + 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/', +}; + +async function handler() { const base_url = 'https://gocn.vip/c/3lQ6GbD5ny/home'; const article_url = 'https://gocn.vip/c/3lQ6GbD5ny'; const api_url = 'https://gocn.vip/api/files?spaceGuid=Gd7BTB¤tPage=1&sort=1'; @@ -22,10 +45,10 @@ export default async (ctx) => { author: item.nickname, })); - ctx.set('data', { + return { title: `GoCN社区-每日新闻`, link: base_url, description: `获取GoCN站点每日新闻`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gofans/index.ts b/lib/routes/gofans/index.ts index c305cbd52..413508e98 100644 --- a/lib/routes/gofans/index.ts +++ b/lib/routes/gofans/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,25 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:kind?', + categories: ['program-update'], + example: '/gofans', + parameters: { kind: 'Platform, either `macos` or `ios`, empty means both (default)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新限免 / 促销应用', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const { kind = '' } = ctx.req.param(); const baseUrl = 'https://gofans.cn'; @@ -35,10 +54,10 @@ export default async (ctx) => { category: item.primary_genre_name, })); - ctx.set('data', { + return { title: '最新限免 / 促销应用', link: baseUrl, description: 'GoFans:最新限免 / 促销应用', item: items, - }); -}; + }; +} diff --git a/lib/routes/gofans/maintainer.ts b/lib/routes/gofans/maintainer.ts deleted file mode 100644 index 968758742..000000000 --- a/lib/routes/gofans/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:kind?': ['HenryQW'], -}; diff --git a/lib/routes/gofans/namespace.ts b/lib/routes/gofans/namespace.ts new file mode 100644 index 000000000..941d37600 --- /dev/null +++ b/lib/routes/gofans/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GoFans', + url: 'gofans.cn', +}; diff --git a/lib/routes/gofans/radar.ts b/lib/routes/gofans/radar.ts deleted file mode 100644 index 9db430f6a..000000000 --- a/lib/routes/gofans/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gofans.cn': { - _name: 'GoFans', - '.': [ - { - title: '最新限免 / 促销应用', - docs: 'https://docs.rsshub.app/program-update#gofans', - source: ['/limited/:kind?', '/'], - target: (params) => `/gofans${(params.kind && (params.kind === 'macos' ? '/macos' : '/ios')) || ''}`, - }, - ], - }, -}; diff --git a/lib/routes/gofans/router.ts b/lib/routes/gofans/router.ts deleted file mode 100644 index 8e975f6c4..000000000 --- a/lib/routes/gofans/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:kind?', './index'); -}; diff --git a/lib/routes/gogoanimehd/maintainer.ts b/lib/routes/gogoanimehd/maintainer.ts deleted file mode 100644 index dfb7c9148..000000000 --- a/lib/routes/gogoanimehd/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/recent-releases': ['user4302'], -}; diff --git a/lib/routes/gogoanimehd/namespace.ts b/lib/routes/gogoanimehd/namespace.ts new file mode 100644 index 000000000..e75b69ab9 --- /dev/null +++ b/lib/routes/gogoanimehd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Gogoanimehd', + url: 'developer.anitaku.to', +}; diff --git a/lib/routes/gogoanimehd/radar.ts b/lib/routes/gogoanimehd/radar.ts deleted file mode 100644 index c2eab7755..000000000 --- a/lib/routes/gogoanimehd/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'anitaku.to': { - _name: 'Gogoanime', - developer: [ - { - title: 'Recent Releases', - docs: 'https://docs.rsshub.app/routes/anime#gogoanimehd', - source: ['/'], - target: '/gogoanimehd/recent-releases', - }, - ], - }, -}; diff --git a/lib/routes/gogoanimehd/recent-releases.ts b/lib/routes/gogoanimehd/recent-releases.ts index 5b8aa52b2..76138fdce 100644 --- a/lib/routes/gogoanimehd/recent-releases.ts +++ b/lib/routes/gogoanimehd/recent-releases.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/recent-releases', + categories: ['anime'], + example: '/gogoanimehd/recent-releases', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['developer.anitaku.to/'], + }, + name: 'Recent Releases', + maintainers: ['user4302'], + handler, + url: 'developer.anitaku.to/', +}; + +async function handler() { const rootUrl = 'https://anitaku.to/home.html'; const response = await got({ @@ -29,9 +52,9 @@ export default async (ctx) => { return structuredData; }); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: arrayOfItems, - }); -}; + }; +} diff --git a/lib/routes/gogoanimehd/router.ts b/lib/routes/gogoanimehd/router.ts deleted file mode 100644 index 2a95e1d74..000000000 --- a/lib/routes/gogoanimehd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/recent-releases', './recent-releases'); -}; diff --git a/lib/routes/google/album.ts b/lib/routes/google/album.ts index d77427720..e09bb4955 100644 --- a/lib/routes/google/album.ts +++ b/lib/routes/google/album.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/album/:id', + categories: ['picture'], + example: '/google/album/msFFnAzKmQmWj76EA', + parameters: { id: 'album ID, can be found in URL, for example, `https://photos.app.goo.gl/msFFnAzKmQmWj76EA` to `msFFnAzKmQmWj76EA`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Public Albums', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `https://photos.app.goo.gl/${id}?_imcp=1`; @@ -16,7 +35,7 @@ export default async (ctx) => { const list = info[1]; - ctx.set('data', { + return { title: `${owner_name} 创建的 Google 相册 - ${album_name}`, link: url, item: list.slice(0, 50).map((item) => { @@ -32,5 +51,5 @@ export default async (ctx) => { guid: item[0], }; }), - }); -}; + }; +} diff --git a/lib/routes/google/alerts.ts b/lib/routes/google/alerts.ts index 6185459f5..f619bc6ef 100644 --- a/lib/routes/google/alerts.ts +++ b/lib/routes/google/alerts.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/alerts/:keyword', + categories: ['other'], + example: '/google/alerts/RSSHub', + parameters: { keyword: 'Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Alerts', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const { data: response, url: link } = await got('https://www.google.com/alerts/preview', { @@ -25,9 +44,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Google Alerts - ${keyword}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/google/citations.ts b/lib/routes/google/citations.ts index d8eca8d93..fcd80fb24 100644 --- a/lib/routes/google/citations.ts +++ b/lib/routes/google/citations.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/citations/:id', + categories: ['journal'], + example: '/google/citations/mlmE4JMAAAAJ', + parameters: { id: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '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\`. + + Query parameters are also supported here, for example \`https://scholar.google.com/citations?user=mlmE4JMAAAAJ&sortby=pubdate\` to \`mlmE4JMAAAAJ&sortby=pubdate\`. Please make sure that the user id (\`mlmE4JMAAAAJ\` in this case) should be the first parameter in the query string.`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const BASE_URL = `https://scholar.google.com`; const url = `https://scholar.google.com/citations?user=${id}`; @@ -35,10 +57,10 @@ export default async (ctx) => { guid: itemUrl, }; }); - ctx.set('data', { + return { title: `Google Scholar: ${name}`, link: url, description, item: out, - }); -}; + }; +} diff --git a/lib/routes/google/doodles.ts b/lib/routes/google/doodles.ts index 951aceb56..27d9ecbc6 100644 --- a/lib/routes/google/doodles.ts +++ b/lib/routes/google/doodles.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/doodles/:language?', + categories: ['picture'], + example: '/google/doodles/zh-CN', + parameters: { language: 'Language, default to `zh-CN`, for other language values, you can get it from [Google Doodles official website](https://www.google.com/doodles)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Update', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { const { language = 'zh-CN' } = ctx.req.param(); const current = new Date(); const year = current.getFullYear(); @@ -15,7 +34,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: 'Google Doodles', link, item: @@ -31,5 +50,5 @@ export default async (ctx) => { link: `https://www.google.com/search?q=${encodeURIComponent(item.query)}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/google/extension.ts b/lib/routes/google/extension.ts index 1daccf8c6..8c6550676 100644 --- a/lib/routes/google/extension.ts +++ b/lib/routes/google/extension.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/chrome/extension/:id', + categories: ['program-update'], + example: '/google/chrome/extension/kefjpfngnndepjbopdmoebkipbgkggaa', + parameters: { id: 'Extension id, can be found in extension url' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['chromewebstore.google.com/detail/:name/:id'], + }, + name: 'Extension Update', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -12,7 +34,7 @@ export default async (ctx) => { const version = 'v' + $('.pDlpAd').text(); - ctx.set('data', { + return { title: $('.Pa2dE').text() + ' - Google Chrome Extension', link: `https://chrome.google.com/webstore/detail/${id}`, item: [ @@ -25,5 +47,5 @@ export default async (ctx) => { author: $('.yNyGQd').text(), }, ], - }); -}; + }; +} diff --git a/lib/routes/google/fonts.ts b/lib/routes/google/fonts.ts index fd7d63cf4..e304d6883 100644 --- a/lib/routes/google/fonts.ts +++ b/lib/routes/google/fonts.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +16,32 @@ const titleMap = { style: 'Number of styles', }; -export default async (ctx) => { +export const route: Route = { + path: '/fonts/:sort?', + categories: ['design'], + example: '/google/fonts/date', + parameters: { sort: 'Sorting type, see below, default to `date`' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Google Fonts', + maintainers: ['Fatpandac'], + handler, + description: `| Newest | Trending | Most popular | Name | Number of styles | + | :----: | :------: | :----------: | :---: | :--------------: | + | date | trending | popularity | alpha | style | + + :::warning + This route requires API key, therefore it's only available when self-hosting, refer to the [Deploy Guide](https://docs.rsshub.app/install/#configuration-route-specific-configurations) for route-specific configurations. + :::`, +}; + +async function handler(ctx) { const sort = ctx.req.param('sort') ?? 'date'; const limit = ctx.req.param('limit') ?? 25; @@ -29,7 +55,7 @@ export default async (ctx) => { const response = await got.get(googleFontsAPI); const data = response.data.items.slice(0, limit); - ctx.set('data', { + return { title: `Google Fonts - ${titleMap[sort]}`, link: 'https://fonts.google.com', item: @@ -42,5 +68,5 @@ export default async (ctx) => { link: `https://fonts.google.com/specimen/${item.family.replaceAll(/\s/g, '+')}`, pubDate: parseDate(item.lastModified, 'YYYY-MM-DD'), })), - }); -}; + }; +} diff --git a/lib/routes/google/maintainer.ts b/lib/routes/google/maintainer.ts deleted file mode 100644 index b1cf02118..000000000 --- a/lib/routes/google/maintainer.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '/album/:id': ['hoilc'], - '/alerts/:keyword': ['TonyRL'], - '/citations/:id': ['KellyHwong', 'const7'], - '/doodles/:language?': ['xyqfer'], - '/fonts/:sort?': ['Fatpandac'], - '/news/:category/:locale': ['zoenglinghou'], - '/scholar/:query': ['HenryQW'], - '/search/:keyword/:language?': ['CaoMeiYouRen'], - '/sites/:id': ['hoilc'], - '/sites/recentChanges/:id': ['nczitzk'], - '/chrome/extension/:id': ['DIYgod'], -}; diff --git a/lib/routes/google/namespace.ts b/lib/routes/google/namespace.ts new file mode 100644 index 000000000..9fbd20b08 --- /dev/null +++ b/lib/routes/google/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Google', + url: 'www.google.com', +}; diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index d37465dae..facac761f 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import * as path from 'node:path'; const baseUrl = 'https://news.google.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category/:locale', + categories: ['new-media'], + example: '/google/news/Top stories/hl=en-US&gl=US&ceid=US:en', + parameters: { category: 'Category Title', locale: 'locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['zoenglinghou'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const locale = ctx.req.param('locale'); @@ -62,9 +81,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: categoryUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/google/radar.ts b/lib/routes/google/radar.ts deleted file mode 100644 index 354b749c7..000000000 --- a/lib/routes/google/radar.ts +++ /dev/null @@ -1,68 +0,0 @@ -export default { - 'google.com': { - _name: '谷歌', - www: [ - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/other#google', - source: '/', - target: (params, url, document) => { - const q = new URL(url).searchParams.get('q'); - const lang = document.documentElement.lang; - return `/google/search/${q}/${lang}`; - }, - }, - ], - chromewebstore: [ - { - title: 'Extension Update', - source: '/detail/:name/:id', - docs: 'https://docs.rsshub.app/routes/program-update#chrome-web-store', - target: '/google/chrome/extension/:id', - }, - ], - photos: [ - { - title: '相册', - docs: 'https://docs.rsshub.app/routes/picture#google-xiang-ce', - source: '/share/*', - target: (params, url, document) => { - const id = document && document.querySelector('html').innerHTML.match(/photos.app.goo.gl\/(.*?)"/)[1]; - return id ? `/google/album/${id}` : ''; - }, - }, - ], - fonts: [ - { - title: 'Fonts - Sort by Name', - docs: 'https://docs.rsshub.app/routes/font#google-fonts', - source: ['/'], - target: '/google/fonts/alpha', - }, - { - title: 'Fonts - Sort by Trending', - docs: 'https://docs.rsshub.app/routes/font#google-fonts', - source: ['/'], - target: '/google/fonts/trending', - }, - { - title: 'Fonts - Sort by Most Popular', - docs: 'https://docs.rsshub.app/routes/font#google-fonts', - source: ['/'], - target: '/google/fonts/popularity', - }, - { - title: 'Fonts - Sort by Newest', - docs: 'https://docs.rsshub.app/routes/font#google-fonts', - source: ['/'], - target: '/google/fonts/date', - }, - { - title: 'Fonts - Sort by Number of Styles', - docs: 'https://docs.rsshub.app/routes/font#google-fonts', - source: ['/'], - target: '/google/fonts/style', - }, - ], - }, -}; diff --git a/lib/routes/google/router.ts b/lib/routes/google/router.ts deleted file mode 100644 index f688be1ad..000000000 --- a/lib/routes/google/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/album/:id', './album'); - router.get('/alerts/:keyword', './alerts'); - router.get('/citations/:id', './citations'); - router.get('/doodles/:language?', './doodles'); - router.get('/fonts/:sort?', './fonts'); - router.get('/news/:category/:locale', './news'); - router.get('/scholar/:query', './scholar'); - router.get('/search/:keyword/:language?', './search'); - router.get('/chrome/extension/:id', './extension'); -}; diff --git a/lib/routes/google/scholar.ts b/lib/routes/google/scholar.ts index c0dd45fa0..717b167ba 100644 --- a/lib/routes/google/scholar.ts +++ b/lib/routes/google/scholar.ts @@ -1,7 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/scholar/:query', + categories: ['journal'], + example: '/google/scholar/data+visualization', + parameters: { query: 'query statement which supports「Basic」and「Advanced」modes' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keywords Monitoring', + maintainers: ['HenryQW'], + handler, + description: `:::warning + Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability. + ::: + + 1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization). + + 2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en\&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5), copy everything after \`https://scholar.google.com/scholar?\` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5).`, +}; + +async function handler(ctx) { let params = ctx.req.param('query'); let query = params; let description = `Google Scholar Monitor Query: ${query}`; @@ -36,10 +62,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Google Scholar Monitor: ${query}`, link: url, description, item: out, - }); -}; + }; +} diff --git a/lib/routes/google/search.ts b/lib/routes/google/search.ts index f396977c6..d35666fd7 100644 --- a/lib/routes/google/search.ts +++ b/lib/routes/google/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import { config } from '@/config'; const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword/:language?', + categories: ['other'], + example: '/google/search/rss/zh-CN,zh', + parameters: { keyword: 'Keyword', language: 'Accept-Language. Example: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const { keyword, language } = ctx.req.param(); const searchParams = new URLSearchParams({ q: keyword, @@ -57,10 +76,10 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: `${keyword} - Google Search`, description: `${keyword} - Google Search`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/anhui/kjt.ts b/lib/routes/gov/anhui/kjt.ts index 905b31ff1..e6e3f56ed 100644 --- a/lib/routes/gov/anhui/kjt.ts +++ b/lib/routes/gov/anhui/kjt.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/anhui/kjt/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = ctx.params[0] ?? 'kjzx/tzgg'; const rootUrl = 'http://kjt.ah.gov.cn'; @@ -49,9 +57,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/beijing/bjedu/gh.ts b/lib/routes/gov/beijing/bjedu/gh.ts index e040ff310..33923ea5a 100644 --- a/lib/routes/gov/beijing/bjedu/gh.ts +++ b/lib/routes/gov/beijing/bjedu/gh.ts @@ -1,10 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/beijing/bjedu/gh/:urlPath?', + categories: ['government'], + example: '/gov/beijing/bjedu/gh', + parameters: { urlPath: '路径,默认为 `zxtzgg`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gh.bjedu.gov.cn/ghsite/:urlPath/index.html', 'gh.bjedu.gov.cn/ghsite/:urlPath'], + target: '/beijing/bjedu/gh/:urlPath', + }, + name: '通用', + maintainers: ['TonyRL'], + handler, + description: `:::tip + 路径处填写对应页面 URL 中 \`https://gh.bjedu.cn/ghsite/\` 和 \`/index.html\` 之间的字段。下面是一个例子。 + + 若订阅 [通知公告](https://gh.bjedu.cn/ghsite/zxtzgg/index.html) 则将对应页面 URL \`https://gh.bjedu.cn/ghsite/zxtzgg/index.html\` 中 \`https://gh.bjedu.cn/ghsite/\` 和 \`/index.html\` 之间的字段 \`zxtzgg\` 作为路径填入。此时路由为 [\`/gov/beijing/bjedu/gh/zxtzgg\`](https://rsshub.app/gov/beijing/bjedu/gh/zxtzgg) + :::`, +}; + +async function handler(ctx) { const baseUrl = 'https://gh.bjedu.cn'; const { urlPath = 'zxtzgg' } = ctx.req.param(); @@ -41,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/beijing/bphc/index.ts b/lib/routes/gov/beijing/bphc/index.ts index 939810785..e5e37f345 100644 --- a/lib/routes/gov/beijing/bphc/index.ts +++ b/lib/routes/gov/beijing/bphc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -19,7 +20,14 @@ const mapping = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/beijing/bphc/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://gycpt.bphc.com.cn'; const defaultPath = 'announcement'; @@ -48,9 +56,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: obj.title, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/beijing/jw/tzgg.ts b/lib/routes/gov/beijing/jw/tzgg.ts index 8a857f234..a7ea72302 100644 --- a/lib/routes/gov/beijing/jw/tzgg.ts +++ b/lib/routes/gov/beijing/jw/tzgg.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/beijing/jw/tzgg', + categories: ['government'], + example: '/gov/beijing/jw/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jw.beijing.gov.cn/tzgg'], + }, + name: '通知公告', + maintainers: ['nczitzk'], + handler, + url: 'jw.beijing.gov.cn/tzgg', +}; + +async function handler() { const rootUrl = 'http://jw.beijing.gov.cn'; const currentUrl = `${rootUrl}/tzgg`; @@ -50,10 +73,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '北京市教育委员会 - 通知公告', link: currentUrl, item: items, description: $('meta[name="ColumnDescription"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/beijing/kw/index.ts b/lib/routes/gov/beijing/kw/index.ts index 7fa950828..be65a97e2 100644 --- a/lib/routes/gov/beijing/kw/index.ts +++ b/lib/routes/gov/beijing/kw/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'http://kw.beijing.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/beijing/kw/:channel', + name: 'Unknown', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const url = `${rootUrl}/col/${channel}/index.html`; @@ -37,9 +45,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `北京市科学技术委员会、中关村科技园区管理委员会 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/caac/cjwt.ts b/lib/routes/gov/caac/cjwt.ts index a63989653..ea97b5383 100644 --- a/lib/routes/gov/caac/cjwt.ts +++ b/lib/routes/gov/caac/cjwt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,32 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/caac/cjwt/:category?', + categories: ['government'], + example: '/gov/caac/cjwt', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['caac.gov.cn/HDJL/'], + target: '/caac/cjwt', + }, + name: '公众留言', + maintainers: ['nczitzk'], + handler, + url: 'caac.gov.cn/HDJL/', + description: `| 机票 | 托运 | 无人机 | 体检 | 行政审批 | 投诉 | + | ---- | ---- | ------ | ---- | -------- | ---- |`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -43,7 +69,7 @@ export default async (ctx) => { const icon = new URL('images/weixinLogo.jpg', rootUrl).href; const subtitle = '公众留言'; - ctx.set('data', { + return { item: items, title: [author, subtitle, category].filter(Boolean).join(' - '), link: currentUrl, @@ -55,5 +81,5 @@ export default async (ctx) => { subtitle, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/cac/index.ts b/lib/routes/gov/cac/index.ts index db82fcdb0..95d46dcbd 100644 --- a/lib/routes/gov/cac/index.ts +++ b/lib/routes/gov/cac/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/cac/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.params[0]; const host = 'http://www.cac.gov.cn'; const homepage = `${host}/index.htm`; @@ -57,9 +65,9 @@ export default async (ctx) => { description: title, }; }); - ctx.set('data', { + return { title: $1('head title').text(), link: completeUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/ccdi/index.ts b/lib/routes/gov/ccdi/index.ts index 7ab6271a0..7f870aa69 100644 --- a/lib/routes/gov/ccdi/index.ts +++ b/lib/routes/gov/ccdi/index.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import { rootUrl, parseNewsList, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/ccdi/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const defaultPath = '/yaowenn/'; let pathname = getSubPath(ctx).replaceAll(/(^\/ccdi|\/$)/g, ''); @@ -11,9 +19,9 @@ export default async (ctx) => { const { list, title } = await parseNewsList(currentUrl, '.list_news_dl2 li', ctx); const items = await Promise.all(list.map((item) => parseArticle(item))); - ctx.set('data', { + return { title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/chinamine-safety/xw.ts b/lib/routes/gov/chinamine-safety/xw.ts index a997f69b7..26c456e95 100644 --- a/lib/routes/gov/chinamine-safety/xw.ts +++ b/lib/routes/gov/chinamine-safety/xw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,14 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/chinamine-safety/xw/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'yjglbyw' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -31,8 +39,8 @@ export default async (ctx) => { items = await processItems(items, cache.tryGet); - ctx.set('data', { + return { item: items, ...fetchData($, currentUrl), - }); -}; + }; +} diff --git a/lib/routes/gov/chinamine-safety/zfxxgk.ts b/lib/routes/gov/chinamine-safety/zfxxgk.ts index 3c32b9271..8c7fe865c 100644 --- a/lib/routes/gov/chinamine-safety/zfxxgk.ts +++ b/lib/routes/gov/chinamine-safety/zfxxgk.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; import { rootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/chinamine-safety/zfxxgk/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'fdzdgknr/tzgg' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -30,8 +38,8 @@ export default async (ctx) => { items = await processItems(items, cache.tryGet); - ctx.set('data', { + return { item: items, ...fetchData($, currentUrl), - }); -}; + }; +} diff --git a/lib/routes/gov/chinatax/latest.ts b/lib/routes/gov/chinatax/latest.ts index d3c4bbb0d..ccf5c80ba 100644 --- a/lib/routes/gov/chinatax/latest.ts +++ b/lib/routes/gov/chinatax/latest.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/chinatax/latest', + categories: ['government'], + example: '/gov/chinatax/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.chinatax.gov.cn/*'], + }, + name: '最新文件', + maintainers: ['nczitzk', 'fuzy112'], + handler, + url: 'www.chinatax.gov.cn/*', +}; + +async function handler() { const link = `http://www.chinatax.gov.cn/chinatax/n810341/n810755/index.html`; const response = await got({ @@ -41,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '国家税务总局 - 最新文件', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/chongqing/gzw.ts b/lib/routes/gov/chongqing/gzw.ts index 4d770d941..58e79b639 100644 --- a/lib/routes/gov/chongqing/gzw.ts +++ b/lib/routes/gov/chongqing/gzw.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/chongqing/gzw/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'tzgg_191' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -50,7 +58,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('title').text()} - ${$('meta[name="ColumnName"]').prop('content')}`, link: currentUrl, @@ -62,5 +70,5 @@ export default async (ctx) => { subtitle: $('meta[name="ColumnKeywords"]').prop('content'), author: $('meta[name="SiteName"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/chongqing/rsks.ts b/lib/routes/gov/chongqing/rsks.ts index 0bbb949c5..8e383ba8e 100644 --- a/lib/routes/gov/chongqing/rsks.ts +++ b/lib/routes/gov/chongqing/rsks.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rsksUrl = 'https://rlsbj.cq.gov.cn/ywzl/rsks/tzgg_109374/'; -export default async (ctx) => { +export const route: Route = { + path: '/chongqing/rsks', + categories: ['government'], + example: '/gov/chongqing/rsks', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rlsbj.cq.gov.cn/'], + }, + name: 'Unknown', + maintainers: ['Mai19930513'], + handler, + url: 'rlsbj.cq.gov.cn/', +}; + +async function handler() { const { data: response } = await got(rsksUrl); const $ = load(response); // 获取考试信息标题 @@ -31,9 +54,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '重庆人事考试通知公告', link: rsksUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/chongqing/sydwgkzp.ts b/lib/routes/gov/chongqing/sydwgkzp.ts index a09d4c017..7e5cca28a 100644 --- a/lib/routes/gov/chongqing/sydwgkzp.ts +++ b/lib/routes/gov/chongqing/sydwgkzp.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,33 @@ import { parseDate } from '@/utils/parse-date'; // 重庆市事业单位公开招聘 const sydwgkzpUrl = 'https://rlsbj.cq.gov.cn/zwxx_182/sydw/'; -export default async (ctx) => { +export const route: Route = { + path: '/chongqing/sydwgkzp', + categories: ['government'], + example: '/gov/chongqing/sydwgkzp', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rlsbj.cq.gov.cn/'], + }, + name: '人力社保局', + maintainers: ['MajexH'], + handler, + url: 'rlsbj.cq.gov.cn/', + description: `#### 人事考试通知 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-ren-shi-kao-shi-tong-zhi} + + +#### 事业单位公开招聘 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-shi-ye-dan-wei-gong-kai-zhao-pin}`, +}; + +async function handler() { const { data: response } = await got(sydwgkzpUrl); const $ = load(response); @@ -40,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '重庆市事业单位公开招聘', link: sydwgkzpUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/cmse/fxrw.ts b/lib/routes/gov/cmse/fxrw.ts index 4c78ad9ec..1d7f4c0b4 100644 --- a/lib/routes/gov/cmse/fxrw.ts +++ b/lib/routes/gov/cmse/fxrw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/cmse/fxrw', + categories: ['government'], + example: '/gov/cmse/fxrw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.cmse.gov.cn/fxrw'], + }, + name: '飞行任务', + maintainers: ['nczitzk'], + handler, + url: 'www.cmse.gov.cn/fxrw', +}; + +async function handler() { const rootUrl = 'http://www.cmse.gov.cn'; const currentUrl = `${rootUrl}/fxrw/`; @@ -35,9 +58,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/cmse/index.ts b/lib/routes/gov/cmse/index.ts index 642f0d73c..bffb1fab1 100644 --- a/lib/routes/gov/cmse/index.ts +++ b/lib/routes/gov/cmse/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/cmse/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx).replaceAll(/(^\/cmse|\/$)/g, ''); const rootUrl = 'http://www.cmse.gov.cn'; @@ -63,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/cnnic/index.ts b/lib/routes/gov/cnnic/index.ts index f3ce9f77f..4a797167a 100644 --- a/lib/routes/gov/cnnic/index.ts +++ b/lib/routes/gov/cnnic/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cnnic/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx).replaceAll(/^\/cnnic/g, ''); const rootUrl = 'http://www.cnnic.net.cn'; @@ -48,9 +56,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/csrc/auditstatus.ts b/lib/routes/gov/csrc/auditstatus.ts index 60e56619c..f7f3cf390 100644 --- a/lib/routes/gov/csrc/auditstatus.ts +++ b/lib/routes/gov/csrc/auditstatus.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/csrc/auditstatus/:apply_id', + categories: ['government'], + example: '/gov/csrc/auditstatus/9ce91cf2d750ee62de27fbbcb05fa483', + parameters: { apply_id: '事项类别id,`https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '申请事项进度', + maintainers: ['hillerliao'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://neris.csrc.gov.cn'; const { apply_id } = ctx.req.param(); const itemUrl = `${baseUrl}/alappl/home1/onlinealog`; @@ -46,9 +65,9 @@ export default async (ctx) => { return single; }); - ctx.set('data', { + return { title: `${$('.zx2 div').attr('title')} - 申请事项进度查询 - 中国证监会`, link: res.url, item: out, - }); -}; + }; +} diff --git a/lib/routes/gov/csrc/news.ts b/lib/routes/gov/csrc/news.ts index cc3c06c73..51b2b6c34 100644 --- a/lib/routes/gov/csrc/news.ts +++ b/lib/routes/gov/csrc/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/csrc/news/:suffix{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const baseUrl = 'http://www.csrc.gov.cn'; const { suffix = 'c100028/common_xq_list.shtml' } = ctx.req.param(); const link = `${baseUrl}/csrc/${suffix}`; @@ -64,10 +72,10 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `中国证券监督管理委员会 - ${data?.data.channelName || $('head title').text()}`, link, image: 'http://www.csrc.gov.cn/favicon.ico', item: out, - }); -}; + }; +} diff --git a/lib/routes/gov/customs/list.ts b/lib/routes/gov/customs/list.ts index 50e4fefe4..097333535 100644 --- a/lib/routes/gov/customs/list.ts +++ b/lib/routes/gov/customs/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { host, puppeteerGet } from './utils'; @@ -6,7 +7,33 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/customs/list/:gchannel?', + categories: ['government'], + example: '/gov/customs/list/paimai', + parameters: { gchannel: '支持 `paimai` 及 `fagui` 2个频道,默认为 `paimai`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.customs.gov.cn/'], + target: '/customs/list', + }, + name: '拍卖信息 / 海关法规', + maintainers: ['Jeason0228', 'TonyRL', 'he1q'], + handler, + url: 'www.customs.gov.cn/', + description: `:::warning + 由于区域限制,建议在国内 IP 的机器上自建 + :::`, +}; + +async function handler(ctx) { const { gchannel = 'paimai' } = ctx.req.param(); let channelName = ''; let link = ''; @@ -74,9 +101,9 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: `中国海关-${channelName}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/gov/dianbai/dianbai.ts b/lib/routes/gov/dianbai/dianbai.ts index 79637e328..01851d937 100644 --- a/lib/routes/gov/dianbai/dianbai.ts +++ b/lib/routes/gov/dianbai/dianbai.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/dianbai/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'zwgk/zcjd/', list_element: '.news_list li a', @@ -15,4 +23,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/forestry/gjlckjdjt.ts b/lib/routes/gov/forestry/gjlckjdjt.ts index 1fdb12206..eebcf3288 100644 --- a/lib/routes/gov/forestry/gjlckjdjt.ts +++ b/lib/routes/gov/forestry/gjlckjdjt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,33 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/forestry/gjlckjdjt/:category?', + categories: ['government'], + example: '/gov/forestry/gjlckjdjt', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '国家林草科技大讲堂', + maintainers: ['nczitzk'], + handler, + description: `| 分类 | id | + | -------- | ---- | + | 经济林 | jjl | + | 林木良种 | lmlz | + | 林下经济 | lxjj | + | 生态修复 | stxf | + | 用材林 | ycl | + | 其他 | qt |`, +}; + +async function handler(ctx) { const { category = 'gjlckjdjt' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -85,7 +112,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -96,5 +123,5 @@ export default async (ctx) => { subtitle: $('div.weizhi').contents().last().text(), author: '国家林业和草原局', allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/gaozhou/gaozhou.ts b/lib/routes/gov/gaozhou/gaozhou.ts index bcdf4ccdf..38f2025ad 100644 --- a/lib/routes/gov/gaozhou/gaozhou.ts +++ b/lib/routes/gov/gaozhou/gaozhou.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/gaozhou/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'zcjd/', list_element: '.newslist li a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/general/general.ts b/lib/routes/gov/general/general.ts index 93ca7e796..335563ed7 100644 --- a/lib/routes/gov/general/general.ts +++ b/lib/routes/gov/general/general.ts @@ -230,11 +230,11 @@ const gdgov = async (info, ctx) => { }) ); - ctx.set('data', { + return { title: name, link: currentUrl, item: items, - }); + }; }; export { gdgov }; diff --git a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts index d0b975569..fdddf26a3 100644 --- a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts +++ b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import timezone from '@/utils/timezone'; const rootUrl = 'http://www.tqyb.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/guangdong/tqyb/sncsyjxh', + categories: ['forecast'], + example: '/gov/guangdong/tqyb/sncsyjxh', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.tqyb.com.cn/gz/weatherAlarm/otherCity/'], + }, + name: '广东省内城市预警信号', + maintainers: ['Fatpandac'], + handler, + url: 'www.tqyb.com.cn/gz/weatherAlarm/otherCity/', +}; + +async function handler() { const sncsyjxhJsUrl = `${rootUrl}/data/gzWeather/otherCityAlarm.js`; const response = await got.get(sncsyjxhJsUrl); @@ -32,9 +55,9 @@ export default async (ctx) => { guid: timezone(parseDate(item.datetime, 'YYYY年MM月DD日 HH:mm'), +8) + item.cname + item.sigtypename, })); - ctx.set('data', { + return { title: '广东省内城市预警信号', link: `http://www.tqyb.com.cn/gz/weatherAlarm/otherCity/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/guangdong/tqyb/tfxtq.ts b/lib/routes/gov/guangdong/tqyb/tfxtq.ts index b8a3bee13..f55ee618f 100644 --- a/lib/routes/gov/guangdong/tqyb/tfxtq.ts +++ b/lib/routes/gov/guangdong/tqyb/tfxtq.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'http://www.tqyb.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/guangdong/tqyb/tfxtq', + categories: ['forecast'], + example: '/gov/guangdong/tqyb/tfxtq', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.tqyb.com.cn/gz/weatherAlarm/suddenWeather/'], + }, + name: '突发性天气提示', + maintainers: ['Fatpandac'], + handler, + url: 'www.tqyb.com.cn/gz/weatherAlarm/suddenWeather/', +}; + +async function handler() { const tfxtqJsUrl = `${rootUrl}/data/gzWeather/weatherTips.js`; const response = await got.get(tfxtqJsUrl); @@ -25,9 +48,9 @@ export default async (ctx) => { guid: parseDate(item.ddate) + item.title, })); - ctx.set('data', { + return { title: '突发性天气提示', link: 'http://www.tqyb.com.cn/gz/weatherAlarm/suddenWeather/', item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/gz/index.ts b/lib/routes/gov/gz/index.ts index ce1a99fe3..3c9a58a14 100644 --- a/lib/routes/gov/gz/index.ts +++ b/lib/routes/gov/gz/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -11,7 +12,14 @@ const urlMap = { zcjd: 'zcjd/zcjd', }; -export default async (ctx) => { +export const route: Route = { + path: '/gz/:channel/:category', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const category = ctx.req.param('category'); const url = `${rootUrl}/${channel}/${urlMap[category]}/`; @@ -30,9 +38,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `广州市人民政府 - ${$('.main_title').text()}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/hebei/czt.ts b/lib/routes/gov/hebei/czt.ts index 1d5218339..e78c61bee 100644 --- a/lib/routes/gov/hebei/czt.ts +++ b/lib/routes/gov/hebei/czt.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hebei/czt/xwdt/:category?', + categories: ['government'], + example: '/gov/hebei/czt/xwdt', + parameters: { category: '分类,见下表,默认为财政动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '财政厅', + maintainers: ['nczitzk'], + handler, + description: `| 财政动态 | 综合新闻 | 通知公告 | + | -------- | -------- | -------- | + | gzdt | zhxw | tzgg |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'gzdt'; const rootUrl = 'http://czt.hebei.gov.cn'; @@ -46,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/huazhou/huazhou.ts b/lib/routes/gov/huazhou/huazhou.ts index b4ac540c5..69dc3826a 100644 --- a/lib/routes/gov/huazhou/huazhou.ts +++ b/lib/routes/gov/huazhou/huazhou.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/huazhou/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'syzl/zcjd/', list_element: '.list-content li a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/huizhou/zwgk/index.ts b/lib/routes/gov/huizhou/zwgk/index.ts index dcad5bfc8..f71c819e6 100644 --- a/lib/routes/gov/huizhou/zwgk/index.ts +++ b/lib/routes/gov/huizhou/zwgk/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,26 @@ import timezone from '@/utils/timezone'; const rootURL = 'http://www.huizhou.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/huizhou/zwgk/:category?', + categories: ['government'], + example: '/gov/huizhou/zwgk/jgdt', + parameters: { category: '资讯类别,可以从网址中得到,默认为政务要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '惠州市人民政府', + maintainers: ['Fatpandac'], + handler, + description: `#### 政务公开 {#guang-dong-sheng-ren-min-zheng-fu-hui-zhou-shi-ren-min-zheng-fu-zheng-wu-gong-kai}`, +}; + +async function handler(ctx) { const cate = ctx.req.param('category') ?? 'zwyw'; const url = `${rootURL}/zwgk/hzsz/${cate}`; @@ -51,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `惠州市人民政府 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/hunan/changsha/major-email.ts b/lib/routes/gov/hunan/changsha/major-email.ts index 895ce041c..785901de8 100644 --- a/lib/routes/gov/hunan/changsha/major-email.ts +++ b/lib/routes/gov/hunan/changsha/major-email.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,33 @@ import iconv from 'iconv-lite'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'http://wlwz.changsha.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/hunan/changsha/major-email', + categories: ['government'], + example: '/gov/hunan/changsha/major-email', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wlwz.changsha.gov.cn/webapp/cs2020/email/*'], + }, + name: '长沙市人民政府', + maintainers: ['shansing'], + handler, + url: 'wlwz.changsha.gov.cn/webapp/cs2020/email/*', + description: `#### 市长信箱 {#hu-nan-sheng-ren-min-zheng-fu-chang-sha-shi-ren-min-zheng-fu-shi-zhang-xin-xiang} + + +可能仅限中国大陆服务器访问,以实际情况为准。`, +}; + +async function handler() { const listPage = await got('http://wlwz.changsha.gov.cn/webapp/cs2020/email/index.jsp', { responseType: 'buffer', }); @@ -45,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '来信反馈 - 长沙市市长信箱', link: `${baseUrl}/webapp/cs2020/email/index.jsp`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/immiau/news.ts b/lib/routes/gov/immiau/news.ts index c32180838..f0975618c 100644 --- a/lib/routes/gov/immiau/news.ts +++ b/lib/routes/gov/immiau/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -18,7 +19,25 @@ const reqBodyByYear = (year) => ({ const getItemUrl = (id) => `https://immi.homeaffairs.gov.au/news-media/archive/article?itemId=${id}`; -export default async (ctx) => { +export const route: Route = { + path: '/immiau/news', + categories: ['government'], + example: '/gov/immiau/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Immigration and Citizenship - News', + maintainers: ['liu233w'], + handler, +}; + +async function handler() { const res = await got({ method: 'post', url, @@ -34,10 +53,10 @@ export default async (ctx) => { link: getItemUrl(item.Id), })); - ctx.set('data', { + return { title: 'News - Immigration and Citizenship', link: 'https://immi.homeaffairs.gov.au/news-media/archive', description: 'Australia Government, Department of Home Affairs', item: list, - }); -}; + }; +} diff --git a/lib/routes/gov/jgjcndrc/index.ts b/lib/routes/gov/jgjcndrc/index.ts index 355134905..36b54c93d 100644 --- a/lib/routes/gov/jgjcndrc/index.ts +++ b/lib/routes/gov/jgjcndrc/index.ts @@ -1,9 +1,45 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jgjcndrc/:id?', + categories: ['government'], + example: '/gov/jgjcndrc', + parameters: { id: '栏目 id,见下表,默认为 692,即通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '价格监测中心', + maintainers: ['nczitzk'], + handler, + description: `| 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 | + | -------- | ------------ | ------------ | -------- | -------- | -------- | + | 692 | 693 | 694 | 695 | 696 | 697 | + + | 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 | + | -------- | ------------ | ---------------- | -------- | -------- | + | 698 | 699 | 700 | 701 | 753 | + + #### 监测信息 + + | 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 | + | -------------------------- | ------------------ | ------------------------ | ------------------------- | + | 749 | 703 | 704 | 705 | + + | 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 | + | -------------------- | ---------------- | -------------- | -------------------- | + | 821 | 706 | 707 | 708 |`, +}; + +async function handler(ctx) { const { id = 'sytzgg' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -47,7 +83,7 @@ export default async (ctx) => { const subtitle = $('li.L').first().text(); const image = new URL($('img.logo2').prop('src'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -56,5 +92,5 @@ export default async (ctx) => { image, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts b/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts index 23d1e4ca6..c4adbf745 100644 --- a/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts +++ b/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jinan/healthcommission/medical_exam_notice', + categories: ['government'], + example: '/gov/jinan/healthcommission/medical_exam_notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jnmhc.jinan.gov.cn/*'], + }, + name: '获取国家医师资格考试通知', + maintainers: ['tzjyxb'], + handler, + url: 'jnmhc.jinan.gov.cn/*', +}; + +async function handler() { const baseUrl = 'https://jnmhc.jinan.gov.cn'; const res = await got('https://jnmhc.jinan.gov.cn/module/web/jpage/dataproxy.jsp', { @@ -22,7 +45,7 @@ export default async (ctx) => { const list = $('record'); - ctx.set('data', { + return { title: '济南卫建委-执业考试通知', link: `${baseUrl}/col/col14418/index.html`, item: list @@ -45,5 +68,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/gov/maintainer.ts b/lib/routes/gov/maintainer.ts deleted file mode 100644 index 7b74d6325..000000000 --- a/lib/routes/gov/maintainer.ts +++ /dev/null @@ -1,113 +0,0 @@ -export default { - // ministry - '/cac/:path+': ['drgnchan'], - '/caac/cjwt/:category?': ['nczitzk'], - '/ccdi/:path+': ['bigfei'], - '/chinamine-safety/zfxxgk/:category?': ['nczitzk'], - '/chinamine-safety/xw/:category?': ['nczitzk'], - '/chinatax/latest': ['nczitzk', 'fuzy112'], - '/cmse/xwzx/zhxw': ['nczitzk'], - '/cmse/xwzx/yzjz': ['nczitzk'], - '/cmse/gfgg': ['nczitzk'], - '/cmse/fxrw': ['nczitzk'], - '/cmse/kjkx/:id': ['nczitzk'], - '/cmse/gjhz': ['nczitzk'], - '/cmse/hqsy/:id': ['nczitzk'], - '/cmse/ztbd/:id': ['nczitzk'], - '/cmse/kpjy/:id': ['nczitzk'], - '/cmse/:path+': ['nczitzk'], - '/cnnic/:path+': ['nczitzk'], - '/csrc/auditstatus/:apply_id': ['hillerliao'], - '/csrc/news/:suffix*': ['chinobing', 'LogicJake'], - '/customs/list/:gchannel?': ['Jeason0228', 'TonyRL', 'he1q'], - '/fmprc/:category?': ['nicolaszf', 'nczitzk'], - '/forestry/gjlckjdjt/:category?': ['nczitzk'], - '/immiau/news': ['liu233w'], - '/jgjcndrc/:id?': ['nczitzk'], - '/jinan/healthcommission/medical_exam_notice': ['tzjyxb'], - '/mee/ywdt/:category?': ['liuxsdev'], - '/mem/gk/sgcc/:category?': ['nczitzk'], - '/mfa/wjdt/:category?': ['nczitzk'], - '/miit/wjfb/:ministry': ['Fatpandac'], - '/miit/yjzj': ['Fatpandac'], - '/miit/zcwj': ['Yoge-Code'], - '/miit/wjgs': ['Yoge-Code'], - '/miit/zcjd': ['Yoge-Code'], - '/moa/zdscxx/:channel?/:source?': ['MisteryMonster', 'nczitzk'], - '/moa/:suburl': ['Origami404'], - '/moe/:type': ['Crawler995'], - '/moe/s78/:column': ['TonyRL'], - '/mof/bond/:category?': ['la3rence'], - '/mofcom/article/:suffix+': ['LogicJake'], - '/moj/aac/news/:type?': ['TonyRL'], - '/moj/lfyjzj': ['la3rence'], - '/mot/:category?': ['nczitzk'], - '/ndrc/fggz/:category?': ['nczitzk'], - '/ndrc/xwdt/:category?': ['nczitzk'], - '/nea/sjzz/ghs': ['nczitzk'], - '/news/:uid': ['EsuRt'], - '/nifdc/:path?': ['nczitzk'], - '/nmpa/:path+': ['TonyRL'], - '/nopss/:path+': ['nczitzk'], - '/npc/:caty': ['233yeee'], - '/nrta/news/:category?': ['yuxinliu-alex'], - '/nrta/dsj/:category?': ['nczitzk'], - '/nsfc/news/:type?': ['Derekmini', 'nczitzk'], - '/pbc/goutongjiaoliu': ['nczitzk'], - '/pbc/gzlw': ['Fatpandac'], - '/pbc/tradeAnnouncement': ['nczitzk'], - '/pbc/zcyj': ['Fatpandac'], - '/samr/xgzlyhd/:category?/:department?': ['nczitzk'], - '/safe/business/:site?': ['nczitzk'], - '/safe/complaint/:site?': ['nczitzk'], - '/sasac/:path+': ['TonyRL'], - '/stats/:path+': ['bigfei', 'nczitzk'], - '/zhengce/govall/:advance?': ['ciaranchen'], - '/zhengce/wenjian/:pcodeJiguan?': ['ciaranchen'], - '/zhengce/zhengceku/:department': ['zxx-457'], - '/zhengce/zuixin': ['SettingDust', 'nczitzk'], - '/zhengce/:category?': ['nczitzk'], - // province - '/anhui/kjt/:path?': ['nczitzk'], - '/beijing/bjedu/gh/:urlPath?': ['TonyRL'], - '/beijing/bphc/:channel': ['bigfei'], - '/beijing/jw/tzgg': ['nczitzk'], - '/beijing/kw/:channel': ['Fatpandac'], - '/chongqing/gzw/:category?': ['nczitzk'], - '/chongqing/rsks': ['Mai19930513'], - '/chongqing/sydwgkzp': ['MajexH'], - '/dianbai/:path+': ['ShuiHuo'], - '/gaozhou/:path+': ['ShuiHuo'], - '/guangdong/tqyb/sncsyjxh': ['Fatpandac'], - '/guangdong/tqyb/tfxtq': ['Fatpandac'], - '/gz/xw/:category': ['drgnchan'], - '/gz/zwgk/:category': ['drgnchan'], - '/hebei/czt/xwdt/:category?': ['nczitzk'], - '/huazhou/:path+': ['ShuiHuo'], - '/huizhou/zwgk/:category?': ['Fatpandac'], - '/hunan/changsha/major-email': ['shansing'], - '/maoming/:path+': ['ShuiHuo'], - '/maonan/:category': ['ShuiHuo'], - '/mgs/:path+': ['ShuiHuo'], - '/mmht/:path+': ['ShuiHuo'], - '/sdb/:path+': ['ShuiHuo'], - '/shaanxi/kjt/:id?': ['nczitzk'], - '/shanghai/rsj/ksxm': ['Fatpandac'], - '/shanghai/wsjkw/yqtb': ['zcf0508'], - '/shanghai/yjj/:path+': ['nczitzk'], - '/shanghai/wgj/:page?': ['gideonsenku'], - '/shenzhen/hrss/szksy/:caty/:page?': ['zlasd'], - '/shenzhen/xxgk/zfxxgj/:caty': ['laoxua'], - '/shenzhen/zjj/xxgk/:caty': ['lonn'], - '/shenzhen/zzb/:caty/:page?': ['zlasd'], - '/sichuan/deyang/govpublicinfo/:countyName/:infoType?': ['zytomorrow'], - '/sichuan/deyang/mztoday/:infoType?': ['zytomorrow'], - '/suzhou/doc': ['EsuRt'], - '/suzhou/fg/:category?': ['nczitzk'], - '/suzhou/news/:uid': ['EsuRt', 'luyuhuang'], - '/taiyuan/rsj/:caty/:page?': ['2PoL'], - '/wuhan/sy/whyw': ['nczitzk'], - '/xinyi/:path+': ['ShuiHuo'], - '/xuzhou/hrss/:category?': ['nczitzk'], - '/zhejiang/gwy/:category?/:column?': ['nczitzk'], -}; diff --git a/lib/routes/gov/maoming/maoming.ts b/lib/routes/gov/maoming/maoming.ts index 24870eb6c..b92599091 100644 --- a/lib/routes/gov/maoming/maoming.ts +++ b/lib/routes/gov/maoming/maoming.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/maoming/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx) .split('/') .filter((item) => item !== ''); @@ -371,4 +379,4 @@ export default async (ctx) => { // pubDate_format, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/maonan/maonan.ts b/lib/routes/gov/maonan/maonan.ts index 9ca30007f..cda19173e 100644 --- a/lib/routes/gov/maonan/maonan.ts +++ b/lib/routes/gov/maonan/maonan.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; const host = 'http://www.maonan.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/maonan/:category', + categories: ['government'], + example: '/gov/maonan/zwgk', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '茂名市茂南区人民政府', + maintainers: ['ShuiHuo'], + handler, + description: `| 政务公开 | 政务新闻 | 茂南动态 | 重大会议 | 公告公示 | 招录信息 | 政策解读 | + | :------: | :------: | :------: | :------: | :------: | :------: | :------: | + | zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd |`, +}; + +async function handler(ctx) { let id = ''; let name = ''; @@ -93,9 +115,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `茂名市茂南区人民政府 - ${name}`, link: `${host}/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/mee/ywdt.ts b/lib/routes/gov/mee/ywdt.ts index 43345c1cf..508d97855 100644 --- a/lib/routes/gov/mee/ywdt.ts +++ b/lib/routes/gov/mee/ywdt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -14,7 +15,32 @@ const columns = { gsgg: { name: '公示公告', order: 6 }, }; -export default async (ctx) => { +export const route: Route = { + path: '/mee/ywdt/:category?', + categories: ['government'], + example: '/gov/mee/ywdt/hjywnews', + parameters: { category: '分类名,预设 `szyw`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mee.gov.cn/ywdt/:category'], + target: '/mee/ywdt/:category', + }, + name: '要闻动态', + maintainers: ['liuxsdev'], + handler, + description: `| 时政要闻 | 环境要闻 | 地方快讯 | 新闻发布 | 视频新闻 | 公示公告 | +| :------: | :------: | :------: | :------: | :------: | :------: | +| szyw | hjywnews | dfnews | xwfb | spxw | gsgg |`, +}; + +async function handler(ctx) { const cate = ctx.req.param('category') ?? 'szyw'; const url = `${baseUrl}ywdt/`; const title = `${columns[cate].name} - 要闻动态 - 中华人民共和国生态环境部`; @@ -73,9 +99,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/mem/sgcc.ts b/lib/routes/gov/mem/sgcc.ts index df51ceba5..9d9cab396 100644 --- a/lib/routes/gov/mem/sgcc.ts +++ b/lib/routes/gov/mem/sgcc.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/mem/gk/sgcc/:category?', + categories: ['government'], + example: '/gov/mem/gk/sgcc/tbzdsgdcbg', + parameters: { category: '分类,见下表,默认为挂牌督办' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mem.gov.cn/gk/sgcc/:category'], + target: '/mem/gk/sgcc/:category', + }, + name: '事故及灾害查处', + maintainers: ['nczitzk'], + handler, + description: `| 挂牌督办 | 调查报告 | + | -------- | ---------- | + | sggpdbqk | tbzdsgdcbg |`, +}; + +async function handler(ctx) { const { category = 'sggpdbqk' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -50,7 +76,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -61,5 +87,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="ColumnName"]').prop('content'), author: $('meta[name="SiteName"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/mfa/wjdt.ts b/lib/routes/gov/mfa/wjdt.ts index 810ab8e76..8c82505e9 100644 --- a/lib/routes/gov/mfa/wjdt.ts +++ b/lib/routes/gov/mfa/wjdt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,25 @@ const categories = { zcjd: 'zcjd', }; -export default async (ctx) => { +export const route: Route = { + path: ['/fmprc/:category?', '/mfa/wjdt/:category?'], + name: 'Unknown', + maintainers: ['nicolaszf', 'nczitzk'], + handler, + description: `| 分类 | category | + | ---------- | -------- | + | 领导人活动 | gjldrhd | + | 外事日程 | wsrc | + | 部领导活动 | wjbxw | + | 业务动态 | sjxw | + | 发言人表态 | fyrbt | + | 吹风会 | cfhsl | + | 大使任免 | dsrm | + | 驻外报道 | zwbd | + | 政策解读 | zcjd |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'gjldrhd'; const rootUrl = 'https://www.mfa.gov.cn'; @@ -60,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/mgs/mgs.ts b/lib/routes/gov/mgs/mgs.ts index c15747664..9d4db6587 100644 --- a/lib/routes/gov/mgs/mgs.ts +++ b/lib/routes/gov/mgs/mgs.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/mgs/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'zwgk/zcjd/', list_element: '.list_con li a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/miit/wjfb.ts b/lib/routes/gov/miit/wjfb.ts index 957397755..6a44ffa54 100644 --- a/lib/routes/gov/miit/wjfb.ts +++ b/lib/routes/gov/miit/wjfb.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.miit.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/miit/wjfb/:ministry', + categories: ['government'], + example: '/gov/miit/wjfb/ghs', + parameters: { ministry: '部门缩写,可以在对应 URL 中获取' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['miit.gov.cn/jgsj/:ministry/wjfb/index.html'], + }, + name: '文件发布', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const ministry = ctx.req.param('ministry'); const url = `${rootUrl}/jgsj/${ministry}/wjfb/index.html`; @@ -54,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `工业和信息化部 - ${title} 文件发布`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/miit/wjgs.ts b/lib/routes/gov/miit/wjgs.ts index b83385934..c6a6c7422 100644 --- a/lib/routes/gov/miit/wjgs.ts +++ b/lib/routes/gov/miit/wjgs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,25 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://www.miit.gov.cn'; const siteUrl = `${baseUrl}/zwgk/wjgs/index.html`; -export default async (ctx) => { +export const route: Route = { + path: '/miit/wjgs', + categories: ['government'], + example: '/gov/miit/wjgs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文件公示', + maintainers: ['Yoge-Code'], + handler, +}; + +async function handler() { const response = await got(siteUrl); const $ = load(response.data); const buildStatic = $('script[parseType=buildstatic]'); @@ -55,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('head title').text()} - ${$('meta[name=SiteName]').attr('content')}`, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/miit/yjzj.ts b/lib/routes/gov/miit/yjzj.ts index 25dda0427..9b1c666d4 100644 --- a/lib/routes/gov/miit/yjzj.ts +++ b/lib/routes/gov/miit/yjzj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.miit.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/miit/yjzj', + categories: ['government'], + example: '/gov/miit/yjzj', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['miit.gov.cn/gzcy/yjzj/index.html'], + }, + name: '意见征集', + maintainers: ['Fatpandac'], + handler, + url: 'miit.gov.cn/gzcy/yjzj/index.html', +}; + +async function handler() { const url = `${rootUrl}/gzcy/yjzj/index.html`; const cookieResponse = await got(url); @@ -52,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `工业和信息化部 - 意见征集`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/miit/zcjd.ts b/lib/routes/gov/miit/zcjd.ts index a6bf1e780..ad966c112 100644 --- a/lib/routes/gov/miit/zcjd.ts +++ b/lib/routes/gov/miit/zcjd.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,25 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://www.miit.gov.cn'; const siteUrl = `${baseUrl}/zwgk/zcjd/index.html`; -export default async (ctx) => { +export const route: Route = { + path: '/miit/zcjd', + categories: ['government'], + example: '/gov/miit/zcjd', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '政策解读', + maintainers: ['Yoge-Code'], + handler, +}; + +async function handler() { const response = await got(siteUrl); const $ = load(response.data); const buildStatic = $('script[parseType=buildstatic]'); @@ -55,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('head title').text()} - ${$('meta[name=SiteName]').attr('content')}`, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/miit/zcwj.ts b/lib/routes/gov/miit/zcwj.ts index ff6060045..29a313fb3 100644 --- a/lib/routes/gov/miit/zcwj.ts +++ b/lib/routes/gov/miit/zcwj.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/miit/zcwj', + categories: ['government'], + example: '/gov/miit/zcwj', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '政策文件', + maintainers: ['Yoge-Code'], + handler, +}; + +async function handler() { const base_url = 'http://www.miit.gov.cn/n1146295/n1652858/'; const response = await got.get(base_url); const $ = load(response.data); @@ -45,10 +64,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '中国工业化和信息部', link: 'http://www.miit.gov.cn', description: '政策文件', item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/mmht/mmht.ts b/lib/routes/gov/mmht/mmht.ts index f34cd17a8..ee5acd9c2 100644 --- a/lib/routes/gov/mmht/mmht.ts +++ b/lib/routes/gov/mmht/mmht.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/mmht/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'xwzx/zcjd/', list_element: '#main21l_main_dk > table > tbody > tr > td:nth-child(2) a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/moa/moa.ts b/lib/routes/gov/moa/moa.ts index 9e41408d9..ce88e42d7 100644 --- a/lib/routes/gov/moa/moa.ts +++ b/lib/routes/gov/moa/moa.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,19 @@ import { parseRelativeDate } from '@/utils/parse-date'; const hostUrl = 'http://www.moa.gov.cn/'; const hostUrlObj = new URL(hostUrl); // 用于在下面判断host -export default async (ctx) => { +export const route: Route = { + path: '/moa/:suburl{.+}', + radar: { + source: ['moa.gov.cn/'], + target: '/moa/:suburl', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'moa.gov.cn/', +}; + +async function handler(ctx) { const rawSuburl = ctx.req.param('suburl'); const suburl = rawSuburl.slice(-1) === '/' ? rawSuburl : rawSuburl + '/'; @@ -44,7 +57,7 @@ export default async (ctx) => { }) ); } -}; +} // 处理文章列表, 从那里获得一堆要爬取的页面, 然后爬取 async function dealChannel(suburl, selectors) { diff --git a/lib/routes/gov/moa/zdscxx.ts b/lib/routes/gov/moa/zdscxx.ts index b9ddaf05c..24284138e 100644 --- a/lib/routes/gov/moa/zdscxx.ts +++ b/lib/routes/gov/moa/zdscxx.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/moa/sjzxfb/:category{.+}?', '/moa/zdscxx/:category{.+}?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; @@ -87,7 +95,7 @@ export default async (ctx) => { const description = '数据'; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${title} - ${description} - ${category}`, link: currentUrl, @@ -99,5 +107,5 @@ export default async (ctx) => { subtitle: category, author: title, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/moe/moe.ts b/lib/routes/gov/moe/moe.ts index 1f95a1694..f9881f015 100644 --- a/lib/routes/gov/moe/moe.ts +++ b/lib/routes/gov/moe/moe.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -13,7 +14,28 @@ const typesIdMap = [ { type: 'edu_focus_news', id: 'eight_con2 .pchide>.TRS_Editor', name: '教育要闻' }, ]; -export default async (ctx) => { +export const route: Route = { + path: '/moe/:type', + categories: ['government'], + example: '/gov/moe/policy_anal', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['Crawler995'], + handler, + description: `| 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 | + | :----------: | :----------: | :------: | :-----------------: | :--------------: | + | policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let id = ''; let name = ''; @@ -35,7 +57,7 @@ export default async (ctx) => { const $ = load(response.data); const newsLis = $('div#' + id + '>ul>li'); - ctx.set('data', { + return { title: name, link: moeUrl, item: await Promise.all( @@ -82,5 +104,5 @@ export default async (ctx) => { }) .get() ), - }); -}; + }; +} diff --git a/lib/routes/gov/moe/s78.ts b/lib/routes/gov/moe/s78.ts index 28c76cadf..a08895795 100644 --- a/lib/routes/gov/moe/s78.ts +++ b/lib/routes/gov/moe/s78.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/moe/s78/:column', + categories: ['government'], + example: '/gov/moe/s78/A13', + parameters: { column: '司局 ID,可在 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['moe.gov.cn/s78/:column/tongzhi', 'moe.gov.cn/s78/:column'], + }, + name: '司局通知', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://www.moe.gov.cn'; const column = ctx.req.param('column'); const link = `${baseUrl}/s78/${column}/tongzhi/`; @@ -37,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('meta[name="ColumnType"]').attr('content')} - ${$('head title').text()}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/mof/bond.ts b/lib/routes/gov/mof/bond.ts index da85c494f..9a1422774 100644 --- a/lib/routes/gov/mof/bond.ts +++ b/lib/routes/gov/mof/bond.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,30 @@ import { parseDate } from '@/utils/parse-date'; const domain = 'gks.mof.gov.cn'; const theme = 'guozaiguanli'; -export default async (ctx) => { +export const route: Route = { + path: '/mof/bond/:category?', + categories: ['government'], + example: '/gov/mof/bond', + parameters: { category: '专题,见下表,默认为国债管理工作动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专题', + maintainers: ['la3rence'], + handler, + description: `#### 政府债券管理 + + | 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 | + | ---------------- | ---------------------------- | ------------ | --------------------- | + | gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan |`, +}; + +async function handler(ctx) { const { category = 'gzfxgzdt' } = ctx.req.param(); const currentUrl = `https://${domain}/ztztz/${theme}/${category}/`; const { data: response } = await got(currentUrl); @@ -42,11 +66,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { item: items, title, link: currentUrl, description: `${description} - ${siteName}`, author, - }); -}; + }; +} diff --git a/lib/routes/gov/mofcom/article.ts b/lib/routes/gov/mofcom/article.ts index 12fca9ab8..4e7f66757 100644 --- a/lib/routes/gov/mofcom/article.ts +++ b/lib/routes/gov/mofcom/article.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -6,7 +7,14 @@ import timezone from '@/utils/timezone'; const host = 'http://www.mofcom.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/mofcom/article/:suffix{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const suffix = ctx.req.param('suffix'); const url = `http://www.mofcom.gov.cn/article/${suffix}/`; const { data: res } = await got(url); @@ -60,10 +68,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: $('head > title').text(), description: $('meta[name=description]').attr('content'), link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/gov/moj/aac/news.ts b/lib/routes/gov/moj/aac/news.ts index dd3912e8e..96d443c43 100644 --- a/lib/routes/gov/moj/aac/news.ts +++ b/lib/routes/gov/moj/aac/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const baseUrl = 'https://www.aac.moj.gov.tw'; -export default async (ctx) => { +export const route: Route = { + path: '/moj/aac/news/:type?', + categories: ['government'], + example: '/gov/moj/aac/news', + parameters: { type: '資料大類,留空為全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新消息', + maintainers: ['TonyRL'], + handler, + description: `| 全部 | 其他 | 採購公告 | 新聞稿 | 肅貪 | 預防 | 綜合 | 防疫專區 | + | ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- | + | | 02 | 01 | 06 | 05 | 04 | 03 | 99 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `${baseUrl}/7204/7246/?Page=1&PageSize=40${type ? `&type=${type}` : ''}`; const response = await got(url); @@ -41,10 +63,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: items, language: 'zh-TW', - }); -}; + }; +} diff --git a/lib/routes/gov/moj/lfyjzj.ts b/lib/routes/gov/moj/lfyjzj.ts index d48c93701..c2fef4cf0 100644 --- a/lib/routes/gov/moj/lfyjzj.ts +++ b/lib/routes/gov/moj/lfyjzj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const DOMAIN = 'www.moj.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/moj/lfyjzj', + categories: ['government'], + example: '/gov/moj/lfyjzj', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.moj.gov.cn/lfyjzj/lflfyjzj/*', 'www.moj.gov.cn/pub/sfbgw/lfyjzj/lflfyjzj/*'], + }, + name: '立法意见征集', + maintainers: ['la3rence'], + handler, + url: 'www.moj.gov.cn/lfyjzj/lflfyjzj/*', +}; + +async function handler() { const rootUrl = `https://${DOMAIN}`; const currentUrl = `${rootUrl}/lfyjzj/lflfyjzj/index.html`; const { data: response } = await got(currentUrl); @@ -43,12 +66,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { item: items, title: theme, link: currentUrl, description, author: siteName, icon, - }); -}; + }; +} diff --git a/lib/routes/gov/mot/index.ts b/lib/routes/gov/mot/index.ts index b16d653d7..0eef6b4aa 100644 --- a/lib/routes/gov/mot/index.ts +++ b/lib/routes/gov/mot/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/mot/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'tongjishuju/gonglu' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -54,7 +62,7 @@ export default async (ctx) => { const image = new URL($('a.navbar-brand img').prop('src'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -63,5 +71,5 @@ export default async (ctx) => { image, subtitle: $('meta[name="ColumnName"]').prop('content'), author: $('meta[name="SiteName"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/namespace.ts b/lib/routes/gov/namespace.ts new file mode 100644 index 000000000..454f188d0 --- /dev/null +++ b/lib/routes/gov/namespace.ts @@ -0,0 +1,45 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国人民银行', + url: 'kjt.ah.gov.cn', + description: `
    + *业务咨询* 和 *投诉建议* 可用的站点参数 + + | 上海市 | 北京市 | 天津市 | 河北省 | + | -------- | ------- | ------- | ------ | + | shanghai | beijing | tianjin | hebei | + + | 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | + | ------ | ------------ | -------- | ------ | + | shanxi | neimenggu | liaoning | jilin | + + | 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | + | ------------ | ------- | -------- | ------ | + | heilongjiang | jiangsu | zhejiang | anhui | + + | 福建省 | 江西省 | 山东省 | 河南省 | + | ------ | ------- | -------- | ------ | + | fujian | jiangxi | shandong | henan | + + | 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | + | ------ | ------ | --------- | -------------- | + | hubei | hunan | guangdong | guangxi | + + | 海南省 | 重庆市 | 四川省 | 贵州省 | + | ------ | --------- | ------- | ------- | + | hainan | chongqing | sichuan | guizhou | + + | 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | + | ------ | ---------- | ------- | ------ | + | yunnan | xizang | shaanxi | gansu | + + | 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | + | ------- | -------------- | ---------------- | ------ | + | qinghai | ningxia | xinjiang | dalian | + + | 宁波市 | 厦门市 | 青岛市 | 深圳市 | + | ------ | ------ | ------- | -------- | + | ningbo | xiamen | qingdao | shenzhen | +
    `, +}; diff --git a/lib/routes/gov/ndrc/fggz.ts b/lib/routes/gov/ndrc/fggz.ts index 9daacd699..4fdd1abec 100644 --- a/lib/routes/gov/ndrc/fggz.ts +++ b/lib/routes/gov/ndrc/fggz.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ndrc/fggz/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 25; @@ -50,7 +58,7 @@ export default async (ctx) => { const image = $('div.logo a img').prop('src'); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -59,5 +67,5 @@ export default async (ctx) => { image, subtitle: $('meta[name="ColumnName"]').prop('content'), author: $('meta[name="SiteName"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/ndrc/xwdt.ts b/lib/routes/gov/ndrc/xwdt.ts index 9347975ff..4e69e942e 100644 --- a/lib/routes/gov/ndrc/xwdt.ts +++ b/lib/routes/gov/ndrc/xwdt.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/ndrc/xwdt/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || 'xwfb'; const rootUrl = 'https://www.ndrc.gov.cn'; @@ -47,9 +55,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/nea/ghs.ts b/lib/routes/gov/nea/ghs.ts index 2aa988fa1..5bd725d55 100644 --- a/lib/routes/gov/nea/ghs.ts +++ b/lib/routes/gov/nea/ghs.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/nea/sjzz/ghs', + categories: ['government'], + example: '/gov/nea/sjzz/ghs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nea.gov.cn/sjzz/ghs/'], + }, + name: '发展规划司', + maintainers: ['nczitzk'], + handler, + url: 'nea.gov.cn/sjzz/ghs/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 35; const rootUrl = 'https://www.nea.gov.cn'; @@ -47,7 +70,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -55,5 +78,5 @@ export default async (ctx) => { language: 'zh', subtitle: $('meta[name="ColumnType"]').prop('content'), author: $('meta[name="ColumnKeywords"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/news/index.ts b/lib/routes/gov/news/index.ts index 5c12983fb..28cc5c170 100644 --- a/lib/routes/gov/news/index.ts +++ b/lib/routes/gov/news/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:uid', + categories: ['government'], + example: '/gov/news/bm', + parameters: { uid: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '政府新闻', + maintainers: ['EsuRt'], + handler, + description: `| 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 政策文件 | + | :------: | :------: | :------: | :--------: | :------: | + | bm | gd | yw | gwy | zhengce |`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const originDomain = 'https://www.gov.cn'; let url = ''; @@ -46,7 +68,7 @@ export default async (ctx) => { list = $('.news_box .list li:not(.line)'); } - ctx.set('data', { + return { title, link: url, item: await Promise.all( @@ -102,5 +124,5 @@ export default async (ctx) => { }); }) ), - }); -}; + }; +} diff --git a/lib/routes/gov/nifdc/index.ts b/lib/routes/gov/nifdc/index.ts index 38a1e283b..8f7741889 100644 --- a/lib/routes/gov/nifdc/index.ts +++ b/lib/routes/gov/nifdc/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/nifdc/:path{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { path = 'bshff/ylqxbzhgl/qxggtzh' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -64,7 +72,7 @@ export default async (ctx) => { const image = new URL($('div.logo img').prop('src'), currentUrl).href; const icon = new URL($('link[rel="shortcut icon"]').prop('href'), currentUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text().replace(/----/, ' - '), link: currentUrl, @@ -75,5 +83,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[ name="ColumnName"]').prop('content'), author: $('meta[name="SiteName"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/nmpa/generic.ts b/lib/routes/gov/nmpa/generic.ts index 010d54d72..aec478957 100644 --- a/lib/routes/gov/nmpa/generic.ts +++ b/lib/routes/gov/nmpa/generic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; @@ -7,7 +8,14 @@ import { config } from '@/config'; const baseUrl = 'https://www.nmpa.gov.cn'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/nmpa/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.params[0]; const url = `${baseUrl}/${path.endsWith('/') ? path.slice(0, -1) : path}/index.html`; const data = await cache.tryGet( @@ -53,10 +61,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: data.title, description: data.description, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/nopss/index.ts b/lib/routes/gov/nopss/index.ts index 0ea7e83c7..ffc8c3a4e 100644 --- a/lib/routes/gov/nopss/index.ts +++ b/lib/routes/gov/nopss/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -6,7 +7,14 @@ import iconv from 'iconv-lite'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/nopss/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = getSubPath(ctx) === '/nopss' ? '/GB/219469' : getSubPath(ctx).replace(/^\/nopss/, ''); const rootUrl = 'http://www.nopss.gov.cn'; @@ -51,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/npc/index.ts b/lib/routes/gov/npc/index.ts index e4bfc0ec8..8fa003e17 100644 --- a/lib/routes/gov/npc/index.ts +++ b/lib/routes/gov/npc/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/npc/:caty', + categories: ['government'], + example: '/gov/npc/c183', + parameters: { caty: '分类名,支持形如 `http://www.npc.gov.cn/npc/c2/*/` 的网站,传入 npc 之后的参数' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['npc.gov.cn/npc/c2/:caty'], + }, + name: '通用', + maintainers: ['233yeee'], + handler, + description: `| 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 | + | ---- | ---- | ---- | ---- | -------- | -------- | + | c183 | c184 | c185 | c189 | c12435 | c10134 |`, +}; + +async function handler(ctx) { const caty = ctx.req.param('caty'); // 主页 const baseurl = `http://www.npc.gov.cn/npc/c2/${caty}/`; @@ -39,10 +64,10 @@ export default async (ctx) => { ) ); // 整合 - ctx.set('data', { + return { title, link: baseurl, description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/nrta/dsj.ts b/lib/routes/gov/nrta/dsj.ts index 71a74c4aa..1b434e6fc 100644 --- a/lib/routes/gov/nrta/dsj.ts +++ b/lib/routes/gov/nrta/dsj.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/nrta/dsj/:category?', + categories: ['government'], + example: '/gov/nrta/dsj', + parameters: { category: '分类,见下表,默认为备案公示' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '电视剧政务平台', + maintainers: ['nczitzk'], + handler, + description: `| 备案公示 | 发行许可通告 | 重大题材立项 | 重大题材摄制 | 变更通报 | + | -------- | ------------ | ---------------- | --------------- | -------- | + | note | announce | importantLixiang | importantShezhi | changing |`, +}; + +async function handler(ctx) { const { category = 'note' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -48,7 +70,7 @@ export default async (ctx) => { results.push(item); } - ctx.set('data', { + return { item: results, title: `${$('title').text()}-${$('div.headbottom_menu_selected').text()}`, link: currentUrl, @@ -56,5 +78,5 @@ export default async (ctx) => { language: 'zh-cn', image: $('img').first().prop('src'), author: '国家广播电影电视总局电视剧管理司', - }); -}; + }; +} diff --git a/lib/routes/gov/nrta/news.ts b/lib/routes/gov/nrta/news.ts index 75a1f1e93..660cf4ca9 100644 --- a/lib/routes/gov/nrta/news.ts +++ b/lib/routes/gov/nrta/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,28 @@ const categories = { 114: '工作动态', }; -export default async (ctx) => { +export const route: Route = { + path: '/nrta/news/:category?', + categories: ['government'], + example: '/gov/nrta/news', + parameters: { category: '资讯类别,可从地址中获取,默认为总局要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['yuxinliu-alex'], + handler, + description: `| 总局要闻 | 公告公示 | 工作动态 | 其他 | + | -------- | -------- | -------- | ---- | + | 112 | 113 | 114 | |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 112; const rootUrl = 'http://www.nrta.gov.cn'; @@ -53,11 +75,11 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: category in categories ? categories[category] : '其他', link: `http://www.nrta.gov.cn/col/col${category}/index.html`, description: '国家广播电视总局', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/nsfc/index.ts b/lib/routes/gov/nsfc/index.ts index a5c06fbf0..cfc790803 100644 --- a/lib/routes/gov/nsfc/index.ts +++ b/lib/routes/gov/nsfc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -6,7 +7,14 @@ import { parseDate } from '@/utils/parse-date'; import shortcuts from './shortcuts'; -export default async (ctx) => { +export const route: Route = { + path: '/nsfc/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let thePath = getSubPath(ctx).replace(/^\/nsfc/, ''); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -71,7 +79,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { item: items, title: `国家自然科学基金委员会 - ${$('#ess_essBREADCRUMB_lblBreadCrumb a.break') .toArray() @@ -83,5 +91,5 @@ export default async (ctx) => { language: 'zh-cn', subtitle: $('meta[name="KEYWORDS"]').prop('content'), author: $('meta[name="AUTHOR"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/gov/pbc/goutongjiaoliu.ts b/lib/routes/gov/pbc/goutongjiaoliu.ts index 8be2c5c3f..49223e9bf 100644 --- a/lib/routes/gov/pbc/goutongjiaoliu.ts +++ b/lib/routes/gov/pbc/goutongjiaoliu.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/pbc/goutongjiaoliu', + categories: ['finance'], + example: '/gov/pbc/goutongjiaoliu', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pbc.gov.cn/goutongjiaoliu/113456/113469/index.html'], + }, + name: '沟通交流', + maintainers: ['nczitzk'], + handler, + url: 'pbc.gov.cn/goutongjiaoliu/113456/113469/index.html', +}; + +async function handler() { const link = 'http://www.pbc.gov.cn/goutongjiaoliu/113456/113469/index.html'; const browser = await puppeteer({ stealth: true }); @@ -52,9 +75,9 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: '中国人民银行 - 沟通交流', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/pbc/gzlw.ts b/lib/routes/gov/pbc/gzlw.ts index 8c4b823e0..081dcdad9 100644 --- a/lib/routes/gov/pbc/gzlw.ts +++ b/lib/routes/gov/pbc/gzlw.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import { processItems } from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'http://www.pbc.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/pbc/gzlw', + categories: ['finance'], + example: '/gov/pbc/gzlw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pbc.gov.cn/redianzhuanti/118742/4122386/4122692/index.html'], + }, + name: '工作论文', + maintainers: ['Fatpandac'], + handler, + url: 'pbc.gov.cn/redianzhuanti/118742/4122386/4122692/index.html', +}; + +async function handler() { const url = `${host}/redianzhuanti/118742/4122386/4122692/index.html`; const response = await got.post(url); @@ -19,9 +42,9 @@ export default async (ctx) => { const items = await processItems(list); - ctx.set('data', { + return { title: '中国人民银行 工作论文', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/pbc/trade-announcement.ts b/lib/routes/gov/pbc/trade-announcement.ts index 131c032b2..d69333cd0 100644 --- a/lib/routes/gov/pbc/trade-announcement.ts +++ b/lib/routes/gov/pbc/trade-announcement.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/pbc/tradeAnnouncement', + categories: ['finance'], + example: '/gov/pbc/tradeAnnouncement', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '货币政策司公开市场交易公告', + maintainers: ['nczitzk'], + handler, +}; + +async function handler() { const link = 'http://www.pbc.gov.cn/zhengcehuobisi/125207/125213/125431/125475/index.html'; const browser = await puppeteer(); @@ -51,9 +70,9 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: '中国人民银行 - 货币政策司公开市场交易公告', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/pbc/zcyj.ts b/lib/routes/gov/pbc/zcyj.ts index 11b00aa59..3ebff64c9 100644 --- a/lib/routes/gov/pbc/zcyj.ts +++ b/lib/routes/gov/pbc/zcyj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { processItems } from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,18 @@ import timezone from '@/utils/timezone'; const host = 'http://www.pbc.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/pbc/zcyj', + radar: { + source: ['pbc.gov.cn/redianzhuanti/118742/4122386/4122510/index.html'], + }, + name: 'Unknown', + maintainers: ['Fatpandac'], + handler, + url: 'pbc.gov.cn/redianzhuanti/118742/4122386/4122510/index.html', +}; + +async function handler() { const url = `${host}/redianzhuanti/118742/4122386/4122510/index.html`; const response = await got.post(url); @@ -21,9 +33,9 @@ export default async (ctx) => { const items = await processItems(list); - ctx.set('data', { + return { title: '中国人民银行 政策研究', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/radar.ts b/lib/routes/gov/radar.ts deleted file mode 100644 index c17450fdb..000000000 --- a/lib/routes/gov/radar.ts +++ /dev/null @@ -1,2494 +0,0 @@ -export default { - 'ah.gov.cn': { - _name: '安徽省科技厅', - kjt: [ - { - title: '科技资讯', - docs: 'https://docs.rsshub.app/routes/government#an-hui-sheng-ke-ji-ting-ke-ji-zi-xun', - source: ['/*'], - target: (params, url) => `/gov/anhui/kjt${new URL(url).href.match(/kjt\.ah\.gov\.cn(.*)\/index.html/)[1] ?? ''}`, - }, - { - title: '科技资源', - docs: 'https://docs.rsshub.app/routes/government#an-hui-sheng-ke-ji-ting-ke-ji-zi-yuan', - source: ['/*'], - target: (params, url) => `/gov/anhui/kjt${new URL(url).href.match(/kjt\.ah\.gov\.cn(.*)\/index.html/)[1] ?? ''}`, - }, - ], - }, - 'beijing.gov.cn': { - _name: '北京市人民政府', - jw: [ - { - title: '北京市教育委员会通知公告', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-jiao-yu-wei-yuan-tong-zhi-gong-gao', - source: ['/tzgg'], - target: '/gov/beijing/jw/tzgg', - }, - ], - kw: [ - { - title: '北京市科委央地协同', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1132') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委三城一区', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1134') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委高精尖产业', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1136') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委开放创新', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1138') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委深化改革', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1140') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委内设机构', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col746') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委直属机构', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col748') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委行政许可', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1520') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委行政处罚', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1522') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委行政确认', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1524') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委行政奖励', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1526') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '行北京市科委政检查', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1528') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委其他权力', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1542') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委最新政策', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2380') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委科技政策-科技法规规章文件', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2962' || params.channel === 'col2384') { - return '/gov/beijing/kw/col2384'; - } - }, - }, - { - title: '北京市科委科技政策-科委规范性文件', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2962' || params.channel === 'col2386') { - return '/gov/beijing/kw/col2386'; - } - }, - }, - { - title: '北京市科委科技政策-其他科技政策', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2962' || params.channel === 'col2388') { - return '/gov/beijing/kw/col2388'; - } - }, - }, - { - title: '北京市科委国家科技政策', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2964') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委政策解读', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2396') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委通知公告', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col736') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委新闻中心', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col6382') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委要闻', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col6344') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委工作动态', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2330') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委媒体报道', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col2332') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委图片报道', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col6346') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - { - title: '北京市科委政府网站年报专栏', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui', - source: ['/col/:channel/index.html'], - target: (params) => { - if (params.channel === 'col1008') { - return '/gov/beijing/kw/:channel'; - } - }, - }, - ], - wjw: [ - { - title: '北京卫生健康委员会', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-wei-sheng-jian-kang-wei-yuan-hui', - source: '/xwzx_20031/:caty', - target: '/gov/beijing/mhc/:caty', - }, - ], - }, - 'bjedu.gov.cn': { - _name: '北京市教育委员会', - gh: [ - { - title: '教育科学规划网 - 通用', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-jiao-yu-ke-xue-gui-hua-wang', - source: ['/ghsite/:urlPath/index.html', '/ghsite/:urlPath'], - target: '/gov/beijing/bjedu/gh/:urlPath', - }, - ], - }, - 'bphc.com.cn': { - _name: '北京保障房中心有限公司', - gycpt: [ - { - title: '北京市共有产权住房租赁服务平台', - docs: 'https://docs.rsshub.app/routes/government#bei-jing-shi-bao-zhang-fang-zhong-xin-you-xian-gong-si', - source: ['/*'], - target: (params, url) => `/gov/bphc/${new URL(url).href.match(/gycpt\.bphc\.com\.cn\/(.*)/)[1]}`, - }, - ], - }, - 'cac.gov.cn': { - _name: '中央网信办', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/government#zhong-yang-wang-xin-ban', - source: ['/*'], - target: (params, url) => `/gov/cac/${new URL(url).href.match(/cac\.gov\.cn(.*?)\/(A.*?\.htm)/)[1]}`, - }, - ], - }, - 'caac.gov.cn': { - _name: '中国民用航空局', - '.': [ - { - title: '公众留言', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt', - }, - { - title: '公众留言 - 机票', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/机票', - }, - { - title: '公众留言 - 托运', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/托运', - }, - { - title: '公众留言 - 无人机', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/无人机', - }, - { - title: '公众留言 - 体检', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/体检', - }, - { - title: '公众留言 - 行政审批', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/行政审批', - }, - { - title: '公众留言 - 投诉', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan', - source: ['/HDJL/'], - target: '/gov/caac/cjwt/投诉', - }, - ], - }, - 'ccdi.gov.cn': { - _name: '中央纪委国家监委', - www: [ - { - title: '要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-yang-ji-wei-guo-jia-jian-wei-yao-wen', - source: ['/*'], - target: (params, url) => `/gov/ccdi/${new URL(url).href.match(/ccdi\.gov\.cn\/(.*)/)[1]}`, - }, - ], - }, - 'changsha.gov.cn': { - _name: '湖南省人民政府', - wlwz: [ - { - title: '市长信箱', - docs: 'https://docs.rsshub.app/routes/government#hu-nan-sheng-ren-min-zheng-fu', - source: ['/webapp/cs2020/email/*'], - target: '/gov/hunan/changsha/major-email', - }, - ], - }, - 'chinamine-safety.gov.cn': { - _name: '国家矿山安全监察局', - www: [ - { - title: '政府信息公开指南', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/zfxxgkzn'], - target: '/gov/chinamine-safety/zfxxgk/zfxxgkzn', - }, - { - title: '政府信息公开制度', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/zfxxgkzd'], - target: '/gov/chinamine-safety/zfxxgk/zfxxgkzd', - }, - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/tzgg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/tzgg', - }, - { - title: '征求意见', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zqyj_01', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zqyj_01', - }, - { - title: '政策法规', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg', - }, - { - title: '规划计划', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/ghjh', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/ghjh', - }, - { - title: '政策解读', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcjd', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcjd', - }, - { - title: '安全许可', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/anqxk', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/anqxk', - }, - { - title: '事故查处', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc', - }, - { - title: '人事信息', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/rsxx', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/rsxx', - }, - { - title: '财务信息', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/cwxx', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/cwxx', - }, - { - title: '建议提案办理', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/jytabl_4823', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/jytabl_4823', - }, - { - title: '政策法规 - 法律', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/fl_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/fl_01', - }, - { - title: '政策法规 - 行政法规', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/xzfg', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/xzfg', - }, - { - title: '政策法规 - 部门规章', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/bmgz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/bmgz_01', - }, - { - title: '政策法规 - 部门规章煤矿安监', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/bmgz_01/mkanj', '/zfxxgk/fdzdgknr/zcfg/bmgz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/bmgz_01/mkanj', - }, - { - title: '政策法规 - 部门规章非煤矿山', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/bmgz_01/fmks', '/zfxxgk/fdzdgknr/zcfg/bmgz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/bmgz_01/fmks', - }, - { - title: '政策法规 - 行业标准', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/hybz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/hybz_01', - }, - { - title: '政策法规 - 行业标准煤矿安监', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/hybz_01/mkanj', '/zfxxgk/fdzdgknr/zcfg/hybz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/hybz_01/mkanj', - }, - { - title: '政策法规 - 行业标准非煤矿山', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/zcfg/hybz_01/fmks', '/zfxxgk/fdzdgknr/zcfg/hybz_01', '/zfxxgk/fdzdgknr/zcfg', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/zcfg/hybz_01/fmks', - }, - { - title: '事故查处 - 事故通报', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc/sgtb', '/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc/sgtb', - }, - { - title: '事故查处 - 事故督办', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc/sgdb', '/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc/sgdb', - }, - { - title: '事故查处 - 事故调查报告', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc/sgbg', '/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc/sgbg', - }, - { - title: '事故查处 - 事故案例', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc/sgalks', '/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc/sgalks', - }, - { - title: '事故查处 - 事故警示教育片', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai', - source: ['/zfxxgk/fdzdgknr/sgcc/sgjsjy', '/zfxxgk/fdzdgknr/sgcc', '/zfxxgk/fdzdgknr'], - target: '/gov/chinamine-safety/zfxxgk/fdzdgknr/sgcc/sgjsjy', - }, - { - title: '应急管理部要闻', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/yjglbyw'], - target: '/gov/chinamine-safety/xw/yjglbyw', - }, - { - title: '国家矿山安监局要闻', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/mkaqjcxw'], - target: '/gov/chinamine-safety/xw/mkaqjcxw', - }, - { - title: '地方信息', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/dfdt'], - target: '/gov/chinamine-safety/xw/dfdt', - }, - { - title: '党建专栏', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/djzl'], - target: '/gov/chinamine-safety/xw/djzl', - }, - { - title: '经验交流', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/jyjl'], - target: '/gov/chinamine-safety/xw/jyjl', - }, - { - title: '新闻发布会', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen', - source: ['/xwfbh'], - target: '/gov/chinamine-safety/xw/xwfbh', - }, - ], - }, - 'chinatax.gov.cn': { - _name: '国家税务总局', - www: [ - { - title: '国家税务总局 - 最新文件', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-shui-wu-zong-ju', - source: ['/*'], - target: '/gov/chinatax/latest', - }, - ], - }, - 'cmse.gov.cn': { - _name: '中国载人航天', - www: [ - { - title: '综合新闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/xwzx/zhxw'], - target: '/gov/cmse/xwzx/zhxw', - }, - { - title: '研制进展', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/xwzx/yzjz'], - target: '/gov/cmse/xwzx/yzjz', - }, - { - title: '官方公告', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/gfgg'], - target: '/gov/cmse/gfgg', - }, - { - title: '飞行任务', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/fxrw'], - target: '/gov/cmse/fxrw', - }, - { - title: '任务动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/fxrw/:id/:category'], - target: '/gov/cmse/fxrw/:id/:category', - }, - { - title: '空间科学', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/kjkx/:id'], - target: '/gov/cmse/kjkx/:id', - }, - { - title: '国际合作', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/gjhz'], - target: '/gov/cmse/gjhz', - }, - { - title: '环球视野', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/hqsy/:id'], - target: '/gov/cmse/hqsy/:id', - }, - { - title: '专题报道', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/ztbd/:id'], - target: '/gov/cmse/ztbd/:id', - }, - { - title: '科普教育', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zai-ren-hang-tian', - source: ['/kpjy/:id'], - target: '/gov/cmse/kpjy/:id', - }, - ], - }, - 'cnnic.net.cn': { - _name: '中国互联网络信息中心', - www: [ - { - title: '新闻中心', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-hu-lian-wang-luo-xin-xi-zhong-xin-xin-wen-zhong-xin', - source: ['/'], - target: (params, url) => `/gov/cnnic/${url.match(/cnnic\.net\.cn\/(.*)/)[1]}`, - }, - ], - }, - 'cq.gov.cn': { - _name: '重庆市人民政府', - rlsbj: [ - { - title: '重庆人事考试通知公告', - docs: 'https://docs.rsshub.app/routes/government#zhong-qing-shi-ren-min-zheng-fu', - source: ['/'], - target: '/gov/chongqing/rsks', - }, - { - title: '重庆事业单位公开招聘', - docs: 'https://docs.rsshub.app/routes/government#chong-qing-shi-ren-min-zheng-fu', - source: ['/'], - target: '/gov/chongqing/sydwgkzp', - }, - ], - gzw: [ - { - title: '国有资产监督管理委员会', - docs: 'https://docs.rsshub.app/routes/government#chong-qing-shi-ren-min-zheng-fu-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui', - source: ['/:category*'], - target: (params) => { - const category = params.category; - - return `/gov/chongqing/gzw${category ? `/${category}` : ''}`; - }, - }, - ], - }, - 'csrc.gov.cn': { - _name: '中国证券监督管理委员会', - neris: [ - { - title: '申请事项进度', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-quan-jian-du-guan-li-wei-yuan-hui', - source: ['/alappl/home1/onlinealog'], - target: (_, url) => `/gov/csrc/auditstatus/${new URL(url).searchParams.get('appMatrCde')}`, - }, - ], - www: [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-quan-jian-du-guan-li-wei-yuan-hui', - source: ['/csrc/*suffix'], - target: '/gov/csrc/:suffix', - }, - ], - }, - 'customs.gov.cn': { - _name: '中华人民共和国海关总署', - www: [ - { - title: '拍卖信息 / 海关法规', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-hai-guan-zong-shu', - source: ['/'], - target: '/gov/customs/list', - }, - ], - }, - 'deyang.gov.cn': { - _name: '德阳市人民政府', - '.': [ - { - title: '德阳市政府公开信息', - docs: 'https://docs.rsshub.app/routes/government#de-yang-shi-fu-ren-min-zheng-zheng-fu', - source: ['/*'], - target: '/sichuan/deyang/govpublicinfo/:countyName', - }, - ], - }, - 'dianbai.gov.cn': { - _name: '茂名市电白区人民政府', - www: [ - { - title: '茂名市电白区人民政府', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-dian-bai-qu-ren-min-zheng-fu', - source: ['/*'], - target: (params, url) => `/gov/dianbai/${new URL(url).host.split('.dianbai.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'forestry.gov.cn': { - _name: '国家林业和草原局', - '.': [ - { - title: '国家林草科技大讲堂', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['gjlckjdjt.jhtml'], - target: (_, url) => { - url = new URL(url); - const path = url.href.match(/\/(\w+)\.jhtml/)[1]; - - return `/gov/forestry/gjlckjdjt${path ? `/${path}` : ''}`; - }, - }, - { - title: '国家林草科技大讲堂 - 经济林', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['jjl.jhtml'], - target: '/gov/forestry/gjlckjdjt/jjl', - }, - { - title: '国家林草科技大讲堂 - 林木良种', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['lmlz.jhtml'], - target: '/gov/forestry/gjlckjdjt/lmlz', - }, - { - title: '国家林草科技大讲堂 - 林下经济', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['lxjj.jhtml'], - target: '/gov/forestry/gjlckjdjt/lxjj', - }, - { - title: '国家林草科技大讲堂 - 生态修复', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['stxf.jhtml'], - target: '/gov/forestry/gjlckjdjt/stxf', - }, - { - title: '国家林草科技大讲堂 - 用材林', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['ycl.jhtml'], - target: '/gov/forestry/gjlckjdjt/ycl', - }, - { - title: '国家林草科技大讲堂 - 其他', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang', - source: ['qt.jhtml'], - target: '/gov/forestry/gjlckjdjt/qt', - }, - ], - }, - 'gaozhou.gov.cn': { - _name: '高州市人民政府', - www: [ - { - title: '高州市人民政府', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-gao-zhou-shi-ren-min-zheng-fu', - source: ['/*'], - target: (params, url) => `/gov/gaozhou/${new URL(url).host.split('.gaozhou.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'gz.gov.cn': { - _name: '广州市人民政府', - www: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/government#guang-zhou-shi-ren-min-zheng-fu', - source: ['/:channel/:category'], - target: (params) => `/gov/gz/${params.channel}/${params.category}`, - }, - ], - }, - 'hebei.gov.cn': { - _name: '河北省人民政府', - czt: [ - { - title: '河北省财政厅 - 财政动态', - docs: 'https://docs.rsshub.app/routes/government#he-bei-sheng-cai-zheng-ting-cai-zheng-dong-tai', - source: ['/xwdt/:category'], - target: (params) => { - if (params.category === 'gzdt') { - return '/gov/hebei/czt/xwdt/:category'; - } - }, - }, - { - title: '河北省财政厅 - 综合新闻', - docs: 'https://docs.rsshub.app/routes/government#he-bei-sheng-cai-zheng-ting-zong-he-xin-wen', - source: ['/xwdt/:category'], - target: (params) => { - if (params.category === 'zhxw') { - return '/gov/hebei/czt/xwdt/:category'; - } - }, - }, - { - title: '河北省财政厅 - 通知公告', - docs: 'https://docs.rsshub.app/routes/government#he-bei-sheng-cai-zheng-ting-tong-zhi-gong-gao', - source: ['/xwdt/:category'], - target: (params) => { - if (params.category === 'tzgg') { - return '/gov/hebei/czt/xwdt/:category'; - } - }, - }, - ], - }, - 'homeaffairs.gov.au': { - _name: 'Department of Home Affairs', - immi: [ - { - title: 'Immigration and Citizenship', - docs: 'https://docs.rsshub.app/routes/government#Australia-Department-of-Home-Affairs', - source: '/news-media/archive', - target: () => '/gov/immiau/news', - }, - ], - }, - 'huazhou.gov.cn': { - _name: '化州市人民政府', - www: [ - { - title: '化州市人民政府', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-hua-zhou-shi-ren-min-zheng-fu', - source: ['/*'], - target: (params, url) => `/gov/huazhou/${new URL(url).host.split('.huazhou.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'huizhou.gov.cn': { - _name: '惠州市人民政府', - www: [ - { - title: '政务公开 - 政务要闻', - docs: 'https://docs.rsshub.app/routes/government#guang-yan-an-dong-sheng-xing-xian-ren-min-zheng-zheng-fu-hui-zhou-shi-fu-ren-min-zheng-zheng-fu-zheng-zheng-wu-gong-kai', - source: ['/zwgk/hzsz/:category'], - target: (params) => { - if (params.category === 'zwyw') { - return '/gov/huizhou/zwgk/zwyw'; - } - }, - }, - { - title: '政务公开 - 机关动态', - docs: 'https://docs.rsshub.app/routes/government#guang-yan-an-dong-sheng-xing-xian-ren-min-zheng-zheng-fu-hui-zhou-shi-fu-ren-min-zheng-zheng-fu-zheng-zheng-wu-gong-kai', - source: ['/zwgk/hzsz/:category'], - target: (params) => { - if (params.category === 'jgdt') { - return '/gov/huizhou/zwgk/jgdt'; - } - }, - }, - { - title: '政务公开 - 县区要闻', - docs: 'https://docs.rsshub.app/routes/government#guang-yan-an-dong-sheng-xing-xian-ren-min-zheng-zheng-fu-hui-zhou-shi-fu-ren-min-zheng-zheng-fu-zheng-zheng-wu-gong-kai', - source: ['/zwgk/hzsz/:category'], - target: (params) => { - if (params.category === 'xqyw') { - return '/gov/huizhou/zwgk/xqyw'; - } - }, - }, - ], - }, - 'jgjcndrc.org.cn': { - _name: '中华人民共和国国家发展和改革委员会价格监测中心', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('id'); - - return `/gov/jgjcndrc${id ? `/${id}` : ''}`; - }, - }, - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/692', - }, - { - title: '中心工作动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/693', - }, - { - title: '地方工作动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/694', - }, - { - title: '监测信息', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/695', - }, - { - title: '分析预测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/696', - }, - { - title: '调查报告', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/697', - }, - { - title: '价格指数', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/698', - }, - { - title: '地方价格监测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/699', - }, - { - title: '价格监测报告制度', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/700', - }, - { - title: '监测法规', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/701', - }, - { - title: '媒体聚焦', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/753', - }, - { - title: '国内外市场价格监测情况周报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/749', - }, - { - title: '主要粮油副食品日报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/703', - }, - { - title: '生猪出厂价与玉米价格周报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/704', - }, - { - title: '国际市场石油价格每日动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/705', - }, - { - title: '非学科类培训服务价格', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/821', - }, - { - title: '监测周期价格动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/706', - }, - { - title: '月度监测行情表', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/707', - }, - { - title: '猪料、鸡料、蛋料比价', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/708', - }, - { - title: '全国钢材批发市场价格周报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/739', - }, - { - title: '全国成品油批发市场价格周报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/740', - }, - { - title: '线上价格监测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin', - source: ['/list.aspx', '/list1.aspx', '/list2.aspx', '/list3.aspx'], - target: '/gov/jgjcndrc/822', - }, - ], - }, - 'jinan.gov.cn': { - _name: '济南市卫生健康委员会', - jnmhc: [ - { - title: '获取国家医师资格考试通知', - docs: 'https://docs.rsshub.app/routes/government#ji-nan-shi-wei-sheng-jian-kang-wei-yuan-hui', - source: ['/*'], - target: '/gov/jinan/healthcommission/medical_exam_notice', - }, - ], - }, - 'maoming.gov.cn': { - _name: '茂名市人民政府门户网站', - '.': [ - { - title: '茂名市人民政府', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-ren-min-zheng-fu-men-hu-wang-zhan', - source: ['/*'], - target: (params, url) => `/gov/maoming/${new URL(url).host.split('.maoming.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'maonan.gov.cn': { - _name: '茂名市茂南区人民政府', - '.': [ - { - title: '政务公开', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwgk/*'], - target: '/gov/maonan/zwgk', - }, - { - title: '政务新闻', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwxw/*'], - target: '/gov/maonan/zwxw', - }, - { - title: '茂南动态', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwxw/mndt/*'], - target: '/gov/maonan/mndt', - }, - { - title: '重大会议', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwxw/zdhy/*'], - target: '/gov/maonan/zdhy', - }, - { - title: '公告公示', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwgk/tzgg/*'], - target: '/gov/maonan/tzgg', - }, - { - title: '招录信息', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwgk/zlxx/*'], - target: '/gov/maonan/zlxx', - }, - { - title: '政策解读', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu', - source: ['/zwgk/zcjd/*'], - target: '/gov/maonan/zcjd', - }, - ], - }, - 'mee.gov.cn': { - _name: '生态环境部', - www: [ - { - title: '要闻动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-sheng-tai-huan-jing-bu', - source: ['/ywdt/:category'], - target: '/gov/mee/ywdt/:category', - }, - ], - }, - 'mem.gov.cn': { - _name: '应急管理部', - www: [ - { - title: '事故及灾害查处', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-ying-ji-guan-li-bu', - source: ['/gk/sgcc/:category'], - target: '/gov/mem/gk/sgcc/:category', - }, - ], - }, - 'mfa.gov.cn': { - _name: '中华人民共和国外交部', - www: [ - { - title: '外交动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-wai-jiao-bu-wai-jiao-dong-tai', - source: ['/web/wjdt_674879/:category'], - target: (params) => `/gov/mfa/wjdt/${params.category.split('_')[0]}`, - }, - ], - }, - 'mgs.gov.cn': { - _name: '广东茂名滨海新区政务网', - www: [ - { - title: '广东茂名滨海新区政务网', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-bin-hai-xin-qu-zheng-wu-wang', - source: ['/*'], - target: (params, url) => `/gov/mgs/${new URL(url).host.split('.mgs.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'miit.gov.cn': { - _name: '工业和信息化部', - '.': [ - { - title: '部门 文件发布', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-gong-ye-he-xin-xi-hua-bu', - source: ['/jgsj/:ministry/wjfb/index.html'], - target: '/miit/wjfb/:ministry', - }, - { - title: '征集意见', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-gong-ye-he-xin-xi-hua-bu', - source: ['/gzcy/yjzj/index.html'], - target: '/miit/yjzj', - }, - ], - }, - 'mmht.gov.cn': { - _name: '广东茂名高新技术产业开发区', - www: [ - { - title: '茂名高新技术产业开发区政务网', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-gao-xin-ji-shu-chan-ye-kai-fa-qu', - source: ['/*'], - target: (params, url) => `/gov/mmht/${new URL(url).host.split('.mmht.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'moa.gov.cn': { - _name: '中华人民共和国农业农村部', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu-xin-wen', - source: ['/'], - target: '/gov/moa/:suburl', - }, - ], - zdscxx: [ - { - title: '数据', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu', - source: ['/nyb/pc/messageView.jsp'], - target: (_params, _url, document) => { - if (!document) { - return '/gov/moa/zdscxx'; - } - const selected = document.querySelectorAll('.colorRed'); - const categories = [...selected].map((s) => s.getAttribute('_key')).join('/'); - - return `/gov/moa/zdscxx${categories ? `/${categories}` : ''}`; - }, - }, - ], - }, - 'moe.gov.cn': { - _name: '中华人民共和国教育部', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu', - source: ['/'], - target: '/gov/moe/newest_file', - }, - { - title: '司局通知', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu', - source: ['/s78/:column/tongzhi', '/s78/:column'], - target: '/gov/moe/s78/:column', - }, - ], - }, - 'mof.gov.cn': { - _name: '中华人民共和国财政部', - gks: [ - { - title: '专题: 政府债券管理', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-cai-zheng-bu', - source: ['/ztztz/guozaiguanli/:category', '/ztztz/guozaiguanli/:category/*', '/ztztz/guozaiguanli/'], - target: (params) => { - const category = params.category; - return `/gov/mof/bond/${category ?? ''}`; - }, - }, - ], - }, - 'mofcom.gov.cn': { - _name: '中华人民共和国商务部', - '.': [ - { - title: '新闻发布', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-shang-wu-bu', - source: ['/article/*'], - target: (_, url) => `/gov/mofcom/article/${new URL(url).pathname.replace('/article/', '')}`, - }, - ], - }, - 'moj.gov.cn': { - _name: '中华人民共和国司法部', - www: [ - { - title: '立法意见征集', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-si-fa-bu', - source: ['/lfyjzj/lflfyjzj/*', '/pub/sfbgw/lfyjzj/lflfyjzj/*'], - target: '/gov/moj/lfyjzj', - }, - ], - }, - 'moj.gov.tw': { - _name: '台灣法務部廉政署', - 'www.aac': [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu', - source: ['/7204/7246/'], - target: (_params, url) => `/gov/moj/aac/news${new URL(url).searchParams.has('type') ? '/' + new URL(url).searchParams.get('type') : ''}`, - }, - ], - }, - 'mot.gov.cn': { - _name: '中华人民共和国交通运输部', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/:category*'], - target: (params) => { - const category = params.category; - - return `/gov/mot${category ? `/${category}` : ''}`; - }, - }, - { - title: '时政要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/shizhengyaowen'], - target: '/gov/mot/shizhengyaowen', - }, - { - title: '交通要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/jiaotongyaowen'], - target: '/gov/mot/jiaotongyaowen', - }, - { - title: '重要会议', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/zhongyaohuiyi'], - target: '/gov/mot/zhongyaohuiyi', - }, - { - title: '数据开放', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/sjkf'], - target: '/gov/mot/sjkf', - }, - { - title: '统计数据', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju'], - target: '/gov/mot/tongjishuju', - }, - { - title: '分析公报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/fenxigongbao'], - target: '/gov/mot/fenxigongbao', - }, - { - title: '运价指数', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/yunjiazhishu'], - target: '/gov/mot/yunjiazhishu', - }, - { - title: '公路', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/gonglu'], - target: '/gov/mot/tongjishuju/gonglu', - }, - { - title: '水运', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/shuiyun'], - target: '/gov/mot/tongjishuju/shuiyun', - }, - { - title: '铁路', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/tielu'], - target: '/gov/mot/tongjishuju/tielu', - }, - { - title: '民航', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/minhang'], - target: '/gov/mot/tongjishuju/minhang', - }, - { - title: '邮政', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/youzheng'], - target: '/gov/mot/tongjishuju/youzheng', - }, - { - title: '城市客运', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/chengshikeyun'], - target: '/gov/mot/tongjishuju/chengshikeyun', - }, - { - title: '港口货物旅客吞吐量', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/gangkouhuowulvkettl'], - target: '/gov/mot/tongjishuju/gangkouhuowulvkettl', - }, - { - title: '固定资产投资完成情况', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/tongjishuju/gudingzichantouziwcqk'], - target: '/gov/mot/tongjishuju/gudingzichantouziwcqk', - }, - { - title: '行业公报', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/fenxigongbao/hangyegongbao'], - target: '/gov/mot/fenxigongbao/hangyegongbao', - }, - { - title: '经济分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/fenxigongbao/jingjifenxi'], - target: '/gov/mot/fenxigongbao/jingjifenxi', - }, - { - title: '科技统计', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/fenxigongbao/kejitongji'], - target: '/gov/mot/fenxigongbao/kejitongji', - }, - { - title: '运力分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/fenxigongbao/yunlifenxi'], - target: '/gov/mot/fenxigongbao/yunlifenxi', - }, - { - title: '沿海散货运价指数', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/yunjiazhishu/yanhaisanhuoyjzs'], - target: '/gov/mot/yunjiazhishu/yanhaisanhuoyjzs', - }, - { - title: '出口集装箱运价指数', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/yunjiazhishu/chukoujizhuangxiangyjzs'], - target: '/gov/mot/yunjiazhishu/chukoujizhuangxiangyjzs', - }, - { - title: '长江航运指数分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/yunjiazhishu/changjianghangyunzsfx'], - target: '/gov/mot/yunjiazhishu/changjianghangyunzsfx', - }, - { - title: '珠江水运经济运行分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu', - source: ['/yunjiazhishu/zhujiangshuiyunjjyxfx'], - target: '/gov/mot/yunjiazhishu/zhujiangshuiyunjjyxfx', - }, - ], - }, - 'mztoday.gov.cn': { - _name: '德阳市人民政府', - www: [ - { - title: '今日绵竹', - docs: 'https://docs.rsshub.app/routes/government#de-yang-shi-ren-min-zheng-fu', - source: ['/*'], - target: '/gov/sichuan/deyang/mztoday', - }, - ], - }, - 'ndrc.gov.cn': { - _name: '中华人民共和国国家发展和改革委员会', - '.': [ - { - title: '新闻动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-xin-wen-dong-tai', - source: ['/xwdt/:category*'], - target: (params) => { - const category = params.category; - - return `/gov/ndrc/xwdt/${category ? `/${category.endsWith('/') ? category : `${category}/`}` : '/'}`; - }, - }, - { - title: '发展改革工作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/:category*'], - target: (params) => { - const category = params.category; - - return `/gov/ndrc/fggz/${category ? `/${category.endsWith('/') ? category : `${category}/`}` : '/'}`; - }, - }, - { - title: '机关办公 - 业务工作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jgbg/ywgz'], - target: '/gov/ndrc/fggz/jgbg/ywgz', - }, - { - title: '机关办公 - 学思践悟', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jgbg/xsjw'], - target: '/gov/ndrc/fggz/jgbg/xsjw', - }, - { - title: '发改政研 - 经济数据概览', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzy/jjsjgl'], - target: '/gov/ndrc/fggz/fgzy/jjsjgl', - }, - { - title: '发改政研 - 社会关切回应', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzy/shgqhy'], - target: '/gov/ndrc/fggz/fgzy/shgqhy', - }, - { - title: '发改政研 - 新媒体解读', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzy/xmtjd'], - target: '/gov/ndrc/fggz/fgzy/xmtjd', - }, - { - title: '发展战略和规划 - 国家发展战略和规划', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fzzlgh/gjfzgh'], - target: '/gov/ndrc/fggz/fzzlgh/gjfzgh', - }, - { - title: '发展战略和规划 - 国家级专项规划', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fzzlgh/gjjzxgh'], - target: '/gov/ndrc/fggz/fzzlgh/gjjzxgh', - }, - { - title: '发展战略和规划 - 地方发展规划', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fzzlgh/dffzgh'], - target: '/gov/ndrc/fggz/fzzlgh/dffzgh', - }, - { - title: '发展战略和规划 - 发展规划工作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fzzlgh/fzgggz'], - target: '/gov/ndrc/fggz/fzzlgh/fzgggz', - }, - { - title: '发改综合 - 国内经济监测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc', - }, - { - title: '发改综合 - 工业经济', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/gyjj'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/gyjj', - }, - { - title: '发改综合 - 投资运行', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/tzyx'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/tzyx', - }, - { - title: '发改综合 - 市场消费', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/scxf'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/scxf', - }, - { - title: '发改综合 - 价格情况', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/jgqk'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/jgqk', - }, - { - title: '发改综合 - 财政收支', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/czsz'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/czsz', - }, - { - title: '发改综合 - 货币金融', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/hbjr'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/hbjr', - }, - { - title: '发改综合 - 就业情况', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/jyqk'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/jyqk', - }, - { - title: '发改综合 - 地区经济', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gnjjjc/dqjj'], - target: '/gov/ndrc/fggz/fgzh/gnjjjc/dqjj', - }, - { - title: '发改综合 - 国际经济监测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjjjjc'], - target: '/gov/ndrc/fggz/fgzh/gjjjjc', - }, - { - title: '发改综合 - 先行指数', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjjjjc/xxzs'], - target: '/gov/ndrc/fggz/fgzh/gjjjjc/xxzs', - }, - { - title: '发改综合 - 大宗商品市场情况', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjjjjc/dzspscqk'], - target: '/gov/ndrc/fggz/fgzh/gjjjjc/dzspscqk', - }, - { - title: '发改综合 - 国别分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjjjjc/gbfx'], - target: '/gov/ndrc/fggz/fgzh/gjjjjc/gbfx', - }, - { - title: '发改综合 - 国际组织预测和研究动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjzzychyjdt'], - target: '/gov/ndrc/fggz/fgzh/gjzzychyjdt', - }, - { - title: '发改综合 - 国际组织预测', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjzzychyjdt/gjzzyc'], - target: '/gov/ndrc/fggz/fgzh/gjzzychyjdt/gjzzyc', - }, - { - title: '发改综合 - 国际组织研究动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgzh/gjzzychyjdt/gjzzyjdt'], - target: '/gov/ndrc/fggz/fgzh/gjzzychyjdt/gjzzyjdt', - }, - { - title: '经济运行与调节 - 宏观经济运行', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjyxtj/hgjjyx'], - target: '/gov/ndrc/fggz/jjyxtj/hgjjyx', - }, - { - title: '经济运行与调节 - 地方经济运行', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjyxtj/dfjjyx'], - target: '/gov/ndrc/fggz/jjyxtj/dfjjyx', - }, - { - title: '经济运行与调节 - 煤电油气运', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjyxtj/mdyqy'], - target: '/gov/ndrc/fggz/jjyxtj/mdyqy', - }, - { - title: '经济运行与调节 - 现代物流', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjyxtj/xdwl'], - target: '/gov/ndrc/fggz/jjyxtj/xdwl', - }, - { - title: '经济运行与调节 - 应急管理', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjyxtj/yjgl'], - target: '/gov/ndrc/fggz/jjyxtj/yjgl', - }, - { - title: '体制改革 - 改革快讯', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/tzgg/ggkx'], - target: '/gov/ndrc/fggz/tzgg/ggkx', - }, - { - title: '体制改革 - 半月改革动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/tzgg/byggdt'], - target: '/gov/ndrc/fggz/tzgg/byggdt', - }, - { - title: '体制改革 - 地方改革经验', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/tzgg/dfggjx'], - target: '/gov/ndrc/fggz/tzgg/dfggjx', - }, - { - title: '固定资产投资 - 投资法规与政策动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gdzctz/tzfg'], - target: '/gov/ndrc/fggz/gdzctz/tzfg', - }, - { - title: '利用外资和境外投资 - 境外投资', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/lywzjw/jwtz'], - target: '/gov/ndrc/fggz/lywzjw/jwtz', - }, - { - title: '利用外资和境外投资 - 外商投资', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/lywzjw/wstz'], - target: '/gov/ndrc/fggz/lywzjw/wstz', - }, - { - title: '利用外资和境外投资 - 外债管理', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/lywzjw/wzgl'], - target: '/gov/ndrc/fggz/lywzjw/wzgl', - }, - { - title: '利用外资和境外投资 - 政策法规', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/lywzjw/zcfg'], - target: '/gov/ndrc/fggz/lywzjw/zcfg', - }, - { - title: '地区经济 - 重大战略', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqjj/zdzl'], - target: '/gov/ndrc/fggz/dqjj/zdzl', - }, - { - title: '地区经济 - 四大板块', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqjj/sdbk'], - target: '/gov/ndrc/fggz/dqjj/sdbk', - }, - { - title: '地区经济 - 国土海洋流域新区', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqjj/qt'], - target: '/gov/ndrc/fggz/dqjj/qt', - }, - { - title: '地区振兴 - 巩固拓展脱贫攻坚成果和欠发达地区振兴发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/tpgjypkfq'], - target: '/gov/ndrc/fggz/dqzx/tpgjypkfq', - }, - { - title: '地区振兴 - 对口支援与合作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/dkzyyhz'], - target: '/gov/ndrc/fggz/dqzx/dkzyyhz', - }, - { - title: '地区振兴 - 革命老区振兴发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/gglqzxfz'], - target: '/gov/ndrc/fggz/dqzx/gglqzxfz', - }, - { - title: '地区振兴 - 生态退化地区治理', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/stthdqzl'], - target: '/gov/ndrc/fggz/dqzx/stthdqzl', - }, - { - title: '地区振兴 - 资源型地区转型发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/zyxdqzxfz'], - target: '/gov/ndrc/fggz/dqzx/zyxdqzxfz', - }, - { - title: '地区振兴 - 老工业地区振兴发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/dqzx/lzydfzxfz'], - target: '/gov/ndrc/fggz/dqzx/lzydfzxfz', - }, - { - title: '区域开放 - 信息集萃', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/qykf/xxjc'], - target: '/gov/ndrc/fggz/qykf/xxjc', - }, - { - title: '农业农村经济 - 重点建设', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/nyncjj/zdjs'], - target: '/gov/ndrc/fggz/nyncjj/zdjs', - }, - { - title: '农业农村经济 - 投资指南', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/nyncjj/tzzn'], - target: '/gov/ndrc/fggz/nyncjj/tzzn', - }, - { - title: '农业农村经济 - 乡村振兴', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/nyncjj/xczx'], - target: '/gov/ndrc/fggz/nyncjj/xczx', - }, - { - title: '农业农村经济 - 农经信息', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/nyncjj/njxx'], - target: '/gov/ndrc/fggz/nyncjj/njxx', - }, - { - title: '基础设施发展 - 政策规划', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/zcgh'], - target: '/gov/ndrc/fggz/zcssfz/zcgh', - }, - { - title: '基础设施发展 - 城轨监管', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/cgjg'], - target: '/gov/ndrc/fggz/zcssfz/cgjg', - }, - { - title: '基础设施发展 - 重大工程', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/zdgc'], - target: '/gov/ndrc/fggz/zcssfz/zdgc', - }, - { - title: '基础设施发展 - 问题研究', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/wtyj'], - target: '/gov/ndrc/fggz/zcssfz/wtyj', - }, - { - title: '基础设施发展 - 行业数据', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/hysj'], - target: '/gov/ndrc/fggz/zcssfz/hysj', - }, - { - title: '基础设施发展 - 地方发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/zcssfz/dffz'], - target: '/gov/ndrc/fggz/zcssfz/dffz', - }, - { - title: '产业发展 - 制造业发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/cyfz/zcyfz'], - target: '/gov/ndrc/fggz/cyfz/zcyfz', - }, - { - title: '产业发展 - 服务业发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/cyfz/fwyfz'], - target: '/gov/ndrc/fggz/cyfz/fwyfz', - }, - { - title: '创新和高技术发展 - 地方进展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/cxhgjsfz/dfjz'], - target: '/gov/ndrc/fggz/cxhgjsfz/dfjz', - }, - { - title: '环境与资源 - 碳达峰碳中和', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/tdftzh'], - target: '/gov/ndrc/fggz/hjyzy/tdftzh', - }, - { - title: '环境与资源 - 生态文明建设', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/stwmjs'], - target: '/gov/ndrc/fggz/hjyzy/stwmjs', - }, - { - title: '环境与资源 - 节能和能效', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/jnhnx'], - target: '/gov/ndrc/fggz/hjyzy/jnhnx', - }, - { - title: '环境与资源 - 资源利用和循环经济', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/zyzhlyhxhjj'], - target: '/gov/ndrc/fggz/hjyzy/zyzhlyhxhjj', - }, - { - title: '环境与资源 - 水节约与保护', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/sjyybh'], - target: '/gov/ndrc/fggz/hjyzy/sjyybh', - }, - { - title: '环境与资源 - 环境与保护', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/hjyzy/hjybh'], - target: '/gov/ndrc/fggz/hjyzy/hjybh', - }, - { - title: '就业与收入 - 就业收入社保消费', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jyysr/jysrsbxf'], - target: '/gov/ndrc/fggz/jyysr/jysrsbxf', - }, - { - title: '就业与收入 - 地方经验', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jyysr/dfjx'], - target: '/gov/ndrc/fggz/jyysr/dfjx', - }, - { - title: '经济贸易 - 重要商品情况', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjmy/zyspqk'], - target: '/gov/ndrc/fggz/jjmy/zyspqk', - }, - { - title: '经济贸易 - 对外经贸及政策分析', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjmy/dwjmjzcfx'], - target: '/gov/ndrc/fggz/jjmy/dwjmjzcfx', - }, - { - title: '经济贸易 - 流通业发展', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jjmy/ltyfz'], - target: '/gov/ndrc/fggz/jjmy/ltyfz', - }, - { - title: '财金信用 - 工作动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/cjxy/gzdt03'], - target: '/gov/ndrc/fggz/cjxy/gzdt03', - }, - { - title: '价格管理 - 地方工作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/jggl/dfgz'], - target: '/gov/ndrc/fggz/jggl/dfgz', - }, - { - title: '发改法规 - 地方信息', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgfg/dfxx'], - target: '/gov/ndrc/fggz/fgfg/dfxx', - }, - { - title: '国际合作 - 世经动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gjhz/zywj'], - target: '/gov/ndrc/fggz/gjhz/zywj', - }, - { - title: '干部之家 - 系统风采', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gbzj/xtfc'], - target: '/gov/ndrc/fggz/gbzj/xtfc', - }, - { - title: '干部之家 - 人才招聘', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gbzj/rczp'], - target: '/gov/ndrc/fggz/gbzj/rczp', - }, - { - title: '干部之家 - 委属工作', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gbzj/wsgz'], - target: '/gov/ndrc/fggz/gbzj/wsgz', - }, - { - title: '干部之家 - 学习园地', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/gbzj/xxyd'], - target: '/gov/ndrc/fggz/gbzj/xxyd', - }, - { - title: '评估督导 - 评督动态', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/pgdd/pddt'], - target: '/gov/ndrc/fggz/pgdd/pddt', - }, - { - title: '评估督导 - 评督经验', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/pgdd/pdjy'], - target: '/gov/ndrc/fggz/pgdd/pdjy', - }, - { - title: '发改党建 - 中央精神', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgdj/zydj'], - target: '/gov/ndrc/fggz/fgdj/zydj', - }, - { - title: '发改党建 - 机关党建', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgdj/jgdj'], - target: '/gov/ndrc/fggz/fgdj/jgdj', - }, - { - title: '发改党建 - 委属党建', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgdj/wsdj'], - target: '/gov/ndrc/fggz/fgdj/wsdj', - }, - { - title: '发改党建 - 系统党建', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgdj/xtdj'], - target: '/gov/ndrc/fggz/fgdj/xtdj', - }, - { - title: '发改金辉 - 党建之窗', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgjh/djzc'], - target: '/gov/ndrc/fggz/fgjh/djzc', - }, - { - title: '发改金辉 - 系统交流', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgjh/zthd'], - target: '/gov/ndrc/fggz/fgjh/zthd', - }, - { - title: '发改金辉 - 学习园地', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgjh/yxyd'], - target: '/gov/ndrc/fggz/fgjh/yxyd', - }, - { - title: '发改金辉 - 金色夕阳', - docs: 'https://docs.rsshub.app/routes/government#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo', - source: ['/fggz/fgjh/jsxy'], - target: '/gov/ndrc/fggz/fgjh/jsxy', - }, - ], - }, - 'nea.gov.cn': { - _name: '国家能源局', - '.': [ - { - title: '发展规划司', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-neng-yuan-ju-fa-zhan-gui-hua-si', - source: ['/sjzz/ghs/'], - target: '/gov/nea/sjzz/ghs', - }, - ], - }, - 'nifdc.gov.cn': { - _name: '国家药品监督管理局医疗器械标准管理中心', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-biao-zhun-guan-li-zhong-xin', - source: ['/*'], - target: (params) => `/gov/nifdc/${params.path.replace(/\/index\.html$/, '')}`, - }, - ], - }, - 'nmpa.gov.cn': { - _name: '国家药品监督管理局', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-yao-pin-jian-du-guan-li-ju', - source: ['/*path'], - target: (params) => `/gov/nmpa/${params.path.replace('/index.html', '')}`, - }, - ], - }, - 'nopss.gov.cn': { - _name: '全国哲学社会科学工作办公室', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#quan-guo-zhe-xue-she-hui-ke-xue-gong-zuo-ban-gong-shi', - source: ['/*path'], - target: (params) => `/gov/nopss/${params.path.replace('/index.html', '')}`, - }, - ], - }, - 'npc.gov.cn': { - _name: '中国人大网', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-ren-da-wang', - source: ['/npc/c2/:caty'], - target: '/gov/npc/:caty', - }, - ], - }, - 'nrta.gov.cn': { - _name: '国家广播电视总局', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-guang-bo-dian-shi-zong-ju', - source: ['/col/*category'], - target: (params) => `/gov/nrta/news/${params.category.replace('col', '').replace('/index.html', '')}`, - }, - ], - dsj: [ - { - title: '电视剧政务平台', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-guang-bo-dian-shi-zong-ju', - source: ['/tims/site/views/applications.shanty', '/'], - target: (params, url) => { - url = new URL(url); - const category = url.searchParams.get('appName'); - - return `/gov/nrta/dsj/${category}`; - }, - }, - ], - }, - 'nsfc.gov.cn': { - _name: '国家自然科学基金委员会', - '.': [ - { - title: '基金要闻', - docs: 'https://docs.rsshub.app/routes/other#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui-ji-jin-yao-wen', - source: ['/*'], - target: '/nsfc/news/jjyw', - }, - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/other#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui-ji-jin-yao-wen', - source: ['/*'], - target: '/nsfc/news/tzgg', - }, - { - title: '资助成果', - docs: 'https://docs.rsshub.app/routes/other#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui-ji-jin-yao-wen', - source: ['/*'], - target: '/nsfc/news/zzcg', - }, - { - title: '科普快讯', - docs: 'https://docs.rsshub.app/routes/other#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui-ji-jin-yao-wen', - source: ['/*'], - target: '/nsfc/news/kpkx', - }, - ], - }, - 'pbc.gov.cn': { - _name: '中国人民银行', - '.': [ - { - title: '沟通交流', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-ren-min-yin-xing', - source: ['/goutongjiaoliu/113456/113469/index.html'], - target: '/gov/pbc/goutongjiaoliu', - }, - { - title: '货币政策司公开市场交易公告', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-ren-min-yin-xing', - source: ['/zhengcehuobisi/125207/125213/125431/125475/index.html'], - target: '/gov/pbc/zhengcehuobisi', - }, - { - title: '政策研究', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-ren-min-yin-xing', - source: ['/redianzhuanti/118742/4122386/4122510/index.html'], - target: '/gov/pbc/zcyj', - }, - { - title: '工作论文', - docs: 'https://docs.rsshub.app/routes/finance#zhong-guo-ren-min-yin-xing', - source: ['/redianzhuanti/118742/4122386/4122692/index.html'], - target: '/gov/pbc/gzlw', - }, - ], - }, - 'samr.gov.cn': { - _name: '国家市场监督管理总局', - xgzlyhd: [ - { - title: '留言咨询', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-shi-chang-jian-du-guan-li-zong-ju', - source: ['/gjjly/index'], - target: '/gov/samr/xgzlyhd/:category?/:department?', - }, - ], - }, - 'safe.gov.cn': { - _name: '国家外汇管理局', - '.': [ - { - title: '业务咨询', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-wai-hui-guan-li-ju-ye-wu-zi-xun', - source: ['/:site/ywzx/index.html'], - target: (params) => { - const site = params.site; - - return `/gov/safe/business/${site}`; - }, - }, - { - title: '投诉建议', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-wai-hui-guan-li-ju-tou-su-jian-yi', - source: ['/:site/tsjy/index.html'], - target: (params) => { - const site = params.site; - - return `/gov/safe/complaint/${site}`; - }, - }, - ], - }, - 'sasac.gov.cn': { - _name: '国务院国有资产监督管理委员会', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/other#guo-wu-yuan-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui', - source: ['/*path'], - target: (params) => `/gov/sasac/${params.path.replace('/index.html', '')}`, - }, - ], - }, - 'sdb.gov.cn': { - _name: '广东省茂名水东湾新城建设管理委员会', - www: [ - { - title: '广东省茂名水东湾新城建设管理委员会', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-guang-dong-sheng-mao-ming-shui-dong-wan-xin-cheng-jian-she-guan-li-wei-yuan-hui', - source: ['/*'], - target: (params, url) => `/gov/sdb/${new URL(url).host.split('.sdb.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'sh.gov.cn': { - _name: '上海市人民政府', - wsjkw: [ - { - title: '上海卫健委 疫情通报', - docs: 'https://docs.rsshub.app/routes/other#xin-guan-fei-yan-yi-qing-xin-wen-dong-tai-yi-qing-tong-bao-shang-hai-wei-jian-wei', - source: ['/'], - target: '/gov/shanghai/wsjkw/yqtb', - }, - ], - rsj: [ - { - title: '上海市职业能力考试院 考试项目', - docs: 'https://docs.rsshub.app/routes/government#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-zhi-ye-neng-li-kao-shi-yuan-kao-shi-xiang-mu', - source: ['/'], - target: '/gov/shanghai/rsj/ksxm', - }, - ], - yjj: [ - { - title: '上海市药品监督管理局', - docs: 'https://docs.rsshub.app/routes/government#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-yao-pin-jian-du-guan-li-ju', - source: ['/'], - target: (params, url) => `/gov/shanghai/yjj/${url.match(/yjj\.sh\.gov\.cn\/(.*)\/index.html/)[1]}`, - }, - ], - 'wsbs.wgj': [ - { - title: '上海市文旅局审批公告', - docs: 'https://docs.rsshub.app/routes/government#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-wen-lv-ju-shen-pi-gong-gao', - source: ['/'], - target: '/gov/shanghai/wgj', - }, - ], - }, - 'shaanxi.gov.cn': { - _name: '陕西省人民政府', - kjt: [ - { - title: '陕西省科学技术厅', - docs: 'https://docs.rsshub.app/routes/government#shan-xi-sheng-sheng-ren-min-zheng-fu-sheng-ke-xue-ji-shu-ting', - source: ['/view/iList.jsp', '/'], - target: (params, url) => `/gov/shaanxi/kjt/${new URL(url).searchParams.get('cat_id')}`, - }, - ], - }, - 'sousuo.gov.cn': { - _name: '中国政府网', - kjt: [ - { - title: '政府新闻 - 政策文件', - docs: 'https://docs.rsshub.app/routes/government#shan-xi-sheng-sheng-ren-min-zheng-fu-sheng-ke-xue-ji-shu-ting', - source: ['/s.htm', '/'], - target: '/gov/news/zhengce', - }, - ], - }, - 'stats.gov.cn': { - _name: '国家统计局', - www: [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/government#guo-jia-tong-ji-ju-shu-ju-tong-yong', - source: ['/*'], - target: (params, url) => `/gov/stats/${new URL(url).href.match(/stats\.gov\.cn\/(.*)/)[1]}`, - }, - ], - }, - 'suzhou.gov.cn': { - _name: '苏州市人民政府', - fg: [ - { - title: '苏州市发展和改革委员会', - docs: 'https://docs.rsshub.app/routes/government#su-zhou-shi-ren-min-zheng-fu-su-zhou-shi-fa-zhan-he-gai-ge-wei-yuan-hui', - source: ['/:category*'], - target: (params) => `/gov/suzhou/fg/${params.replace(/\.shtml/, '')}`, - }, - ], - www: [ - { - title: '政府信息公开文件', - docs: 'https://docs.rsshub.app/routes/government#su-zhou-shi-ren-min-zheng-fu', - source: ['/szxxgk/front/xxgk_right.jsp', '/'], - target: '/gov/suzhou/doc', - }, - { - title: '政府新闻', - docs: 'https://docs.rsshub.app/routes/government#su-zhou-shi-ren-min-zheng-fu', - source: ['/szsrmzf/:uid/nav_list.shtml'], - target: '/gov/suzhou/news/:uid', - }, - ], - }, - 'sz.gov.cn': { - _name: '深圳政府在线移动门户', - hrss: [ - { - title: '考试院公告', - docs: 'https://docs.rsshub.app/routes/government#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-wei-zu-zhi-bu', - source: ['/*'], - target: '/gov/shenzhen/hrss/szksy/:caty/:page?', - }, - ], - xxgk: [ - { - title: '深圳市人民政府', - docs: 'https://docs.rsshub.app/routes/government#guang-dong-sheng-ren-min-zheng-fu-guang-dong-sheng-shen-zhen-shi-ren-min-zheng-fu', - source: ['/cn/xxgk/zfxxgj/:caty'], - target: '/gov/shenzhen/hrss/szksy/:caty/:page?', - }, - ], - zjj: [ - { - title: '深圳市住房和建设局', - docs: 'https://docs.rsshub.app/routes/government#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-zhu-fang-he-jian-she-ju', - source: ['/xxgk/:caty'], - target: '/gov/shenzhen/zjj/xxgk/:caty', - }, - ], - zzb: [ - { - title: '组工在线公告', - docs: 'https://docs.rsshub.app/routes/government#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-kao-shi-yuan', - source: ['/*'], - target: '/gov/shenzhen/zzb/:caty/:page?', - }, - ], - }, - 'taiyuan.gov.cn': { - _name: '太原市人民政府', - rsj: [ - { - title: '太原市人力资源和社会保障局政府公开信息', - docs: 'https://docs.rsshub.app/routes/government#tai-yuan-shi-ren-min-zheng-fu-tai-yuan-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju-zheng-fu-gong-kai-xin-xi', - source: ['/*'], - target: '/taiyuan/rsj/:caty/:page?', - }, - ], - }, - 'tqyb.com.cn': { - _name: '广州天气', - www: [ - { - title: '突发性天气提示', - docs: 'https://docs.rsshub.app/routes/government#guang-zhou-tian-qi-tu-fa-xing-tian-qi-ti-shi', - source: ['/gz/weatherAlarm/suddenWeather/'], - target: '/gov/guangdong/tqyb/tfxtq', - }, - { - title: '广东省内城市预警信号', - docs: 'https://docs.rsshub.app/routes/government#guang-zhou-tian-qi-guang-dong-sheng-nei-cheng-shi-yu-jing-xin-hao', - source: ['/gz/weatherAlarm/otherCity/'], - target: '/gov/guangdong/tqyb/sncsyjxh', - }, - ], - }, - 'xinyi.gov.cn': { - _name: '信宜市人民政府', - www: [ - { - title: '信宜市人民政府', - docs: 'https://docs.rsshub.app/routes/government#mao-ming-shi-ren-min-zheng-fu-xin-yi-shi-ren-min-zheng-fu', - source: ['/*'], - target: (params, url) => `/gov/xinyi/${new URL(url).host.split('.xinyi.gov.cn')[0] + new URL(url).pathname.replaceAll(/(index.*$)/g, '')}`, - }, - ], - }, - 'www.gov.cn': { - _name: '中国政府网', - '.': [ - { - title: '政府新闻 - 政务部门', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/lianbo/bumen/index.htm', '/'], - target: '/gov/news/bm', - }, - { - title: '政府新闻 - 滚动新闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/xinwen/gundong.htm', '/'], - target: '/gov/news/gd', - }, - { - title: '政府新闻 - 新闻要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/yaowen/index.htm', '/'], - target: '/gov/news/yw', - }, - { - title: '政府新闻 - 国务院新闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/pushinfo/v150203', '/'], - target: '/gov/news/gwy', - }, - { - title: '政策', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang-zheng-ce', - source: ['/zhengce/:category*'], - target: (params) => { - const category = params.category; - - return `/gov/zhengce${category ? `/${category}` : ''}`; - }, - }, - { - title: '最新政策', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/zhengce/zuixin.htm', '/'], - target: '/gov/zhengce/zuixin', - }, - { - title: '最新文件', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/'], - target: '/gov/zhengce/wenjian', - }, - { - title: '信息稿件', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/'], - target: '/gov/zhengce/govall', - }, - { - title: '国务院政策文件库', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/zhengce/zhengceku/:lib'], - target: (params) => `/gov/zhengce/zhengceku/${params.libs}`, - }, - ], - }, - 'wuhan.gov.cn': { - _name: '武汉市人民政府', - '.': [ - { - title: '武汉要闻', - docs: 'https://docs.rsshub.app/routes/government#zhong-guo-zheng-fu-wang', - source: ['/sy/whyw/', '/whyw', '/'], - target: '/gov/wuhan/sy/whyw', - }, - ], - }, - 'xz.gov.cn': { - _name: '徐州市人民政府', - hrss: [ - { - title: '徐州市人力资源和社会保障局', - docs: 'https://docs.rsshub.app/routes/government#xu-zhou-shi-ren-min-zheng-fu-xu-zhou-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju', - source: ['/*'], - target: (params, url) => `/gov/xuzhou/hrss${new URL(url).href.match(/\/(\d+)\/subPage.html/)[1] ?? ''}`, - }, - ], - }, - 'zjks.gov.cn': { - _name: '浙江省公务员考试录用网', - '.': [ - { - title: '地市专栏', - docs: 'https://docs.rsshub.app/routes/government#zhe-jiang-sheng-gong-wu-yuan-kao-shi-lu-yong-wang', - source: ['/zjgwy/website/init.htm', '/zjgwy/website/queryDetail.htm', '/zjgwy/website/queryMore.htm'], - target: '/gov/zhejiang/gwy', - }, - ], - }, -}; diff --git a/lib/routes/gov/router.ts b/lib/routes/gov/router.ts deleted file mode 100644 index 013e74ccb..000000000 --- a/lib/routes/gov/router.ts +++ /dev/null @@ -1,105 +0,0 @@ -export default (router) => { - // ministry - router.get('/cac/*', './cac/index'); - router.get('/caac/cjwt/:category?', './caac/cjwt'); - router.get('/ccdi/*', './ccdi'); - router.get('/chinamine-safety/zfxxgk/:category{.+}?', './chinamine-safety/zfxxgk'); - router.get('/chinamine-safety/xw/:category{.+}?', './chinamine-safety/xw'); - router.get('/chinatax/latest', './chinatax/latest'); - router.get('/cmse/fxrw', './cmse/fxrw'); - router.get('/cmse/*', './cmse'); - router.get('/cnnic/*', './cnnic'); - router.get('/csrc/auditstatus/:apply_id', './csrc/auditstatus'); - router.get('/csrc/news/:suffix{.+}?', './csrc/news'); - router.get('/customs/list/:gchannel?', './customs/list'); - router.get('/fmprc/:category?', './mfa/wjdt'); - router.get('/forestry/gjlckjdjt/:category?', './forestry/gjlckjdjt'); - router.get('/immiau/news', './immiau/news'); - router.get('/jgjcndrc/:id?', './jgjcndrc'); - router.get('/jinan/healthcommission/medical_exam_notice', './jinan/healthcommission/medical-exam-notice'); - router.get('/mee/ywdt/:category?', './mee/ywdt'); - router.get('/mem/gk/sgcc/:category?', './mem/sgcc'); - router.get('/mfa/wjdt/:category?', './mfa/wjdt'); - router.get('/mot/:category{.+}?', './mot'); - router.get('/miit/wjfb/:ministry', './miit/wjfb'); - router.get('/miit/yjzj', './miit/yjzj'); - router.get('/miit/zcwj', './miit/zcwj'); - router.get('/miit/wjgs', './miit/wjgs'); - router.get('/miit/zcjd', './miit/zcjd'); - router.get('/moa/sjzxfb/:category{.+}?', './moa/zdscxx'); - router.get('/moa/zdscxx/:category{.+}?', './moa/zdscxx'); - router.get('/moa/:suburl{.+}', './moa/moa'); - router.get('/moe/:type', './moe/moe'); - router.get('/moe/s78/:column', './moe/s78'); - router.get('/mof/bond/:category?', './mof/bond'); - router.get('/mofcom/article/:suffix{.+}', './mofcom/article'); - router.get('/moj/aac/news/:type?', './moj/aac/news'); - router.get('/moj/lfyjzj', './moj/lfyjzj'); - router.get('/ndrc/fggz/:category{.+}?', './ndrc/fggz'); - router.get('/ndrc/xwdt/:category{.+}?', './ndrc/xwdt'); - router.get('/nea/sjzz/ghs', './nea/ghs'); - router.get('/news/:uid', './news'); - router.get('/nifdc/:path{.+}?', './nifdc'); - router.get('/nmpa/*', './nmpa/generic'); - router.get('/nopss/*', './nopss'); - router.get('/npc/:caty', './npc/index'); - router.get('/nrta/news/:category?', './nrta/news'); - router.get('/nrta/dsj/:category?', './nrta/dsj'); - router.get('/nsfc/*', './nsfc'); - router.get('/pbc/goutongjiaoliu', './pbc/goutongjiaoliu'); - router.get('/pbc/gzlw', './pbc/gzlw'); - router.get('/pbc/tradeAnnouncement', './pbc/trade-announcement'); - router.get('/pbc/zcyj', './pbc/zcyj'); - router.get('/safe/business/:site?', './safe/business'); - router.get('/safe/complaint/:site?', './safe/complaint'); - router.get('/samr/xgzlyhd/:category?/:department?', './samr/xgzlyhd'); - router.get('/sasac/:path{.+}', './sasac/generic'); - router.get('/stats/*', './stats'); - router.get('/zhengce/govall/:advance?', './zhengce/govall'); - router.get('/zhengce/wenjian/:pcodeJiguan?', './zhengce/wenjian'); - router.get('/zhengce/zhengceku/:department', './zhengce/zhengceku'); - router.get('/zhengce/zuixin', './zhengce'); - router.get('/zhengce/:category{.+}?', './zhengce'); - // province - router.get('/anhui/kjt/*', './anhui/kjt'); - router.get('/beijing/bjedu/gh/:urlPath?', './beijing/bjedu/gh'); - router.get('/beijing/bphc/*', './beijing/bphc'); - router.get('/beijing/jw/tzgg', './beijing/jw/tzgg'); - router.get('/beijing/kw/:channel', './beijing/kw/index'); - router.get('/chongqing/gzw/:category{.+}?', './chongqing/gzw'); - router.get('/chongqing/rsks', './chongqing/rsks'); - router.get('/chongqing/sydwgkzp', './chongqing/sydwgkzp'); - router.get('/dianbai/*', './dianbai/dianbai'); - router.get('/gaozhou/*', './gaozhou/gaozhou'); - router.get('/guangdong/tqyb/sncsyjxh', './guangdong/tqyb/sncsyjxh'); - router.get('/guangdong/tqyb/tfxtq', './guangdong/tqyb/tfxtq'); - router.get('/gz/:channel/:category', './gz/index'); - router.get('/hebei/czt/xwdt/:category?', './hebei/czt'); - router.get('/huazhou/*', './huazhou/huazhou'); - router.get('/huizhou/zwgk/:category?', './huizhou/zwgk/index'); - router.get('/hunan/changsha/major-email', './hunan/changsha/major-email'); - router.get('/maoming/*', './maoming/maoming'); - router.get('/maonan/:category', './maonan/maonan'); - router.get('/mgs/*', './mgs/mgs'); - router.get('/mmht/*', './mmht/mmht'); - router.get('/sdb/*', './sdb/sdb'); - router.get('/shaanxi/kjt/:id?', './shaanxi/kjt'); - router.get('/shanghai/rsj/ksxm', './shanghai/rsj/ksxm'); - router.get('/shanghai/wsjkw/yqtb', './shanghai/wsjkw/yqtb'); - router.get('/shanghai/wgj/:page?', './shanghai/wgj/wgj'); - router.get('/shanghai/yjj/*', './shanghai/yjj'); - router.get('/shenzhen/hrss/szksy/:caty/:page?', './shenzhen/hrss/szksy/index'); - router.get('/shenzhen/xxgk/zfxxgj/:caty', './shenzhen/xxgk/zfxxgj'); - router.get('/shenzhen/zjj/xxgk/:caty', './shenzhen/zjj/index'); - router.get('/shenzhen/zzb/:caty/:page?', './shenzhen/zzb/index'); - router.get('/sichuan/deyang/govpublicinfo/:countyName/:infoType?', './sichuan/deyang/govpublicinfo'); - router.get('/sichuan/deyang/mztoday/:infoType?', './sichuan/deyang/mztoday'); - router.get('/suzhou/doc', './suzhou/doc'); - router.get('/suzhou/fg/:category{.+}?', './suzhou/fg'); - router.get('/suzhou/news/:uid', './suzhou/news'); - router.get('/taiyuan/rsj/:caty/:page?', './taiyuan/rsj'); - router.get('/wuhan/sy/whyw', './wuhan/whyw'); - router.get('/xinyi/*', './xinyi/xinyi'); - router.get('/xuzhou/hrss/:category?', './xuzhou/hrss'); - router.get('/zhejiang/gwy/:category?/:column?', './zhejiang/gwy'); -}; diff --git a/lib/routes/gov/safe/business.ts b/lib/routes/gov/safe/business.ts index 032300e2f..fc9f32dd4 100644 --- a/lib/routes/gov/safe/business.ts +++ b/lib/routes/gov/safe/business.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import { processZxfkItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/safe/business/:site?', + categories: ['government'], + example: '/gov/safe/business/beijing', + parameters: { site: '站点,见上表,默认为 beijing' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '业务咨询', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { site = 'beijing' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 3; ctx.set('data', await processZxfkItems(site, 'ywzx', limit)); -}; +} diff --git a/lib/routes/gov/safe/complaint.ts b/lib/routes/gov/safe/complaint.ts index fcd8ad622..796163617 100644 --- a/lib/routes/gov/safe/complaint.ts +++ b/lib/routes/gov/safe/complaint.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import { processZxfkItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/safe/complaint/:site?', + categories: ['government'], + example: '/gov/safe/complaint/beijing', + parameters: { site: '站点,见上表,默认为 beijing' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '投诉建议', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { site = 'beijing' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; ctx.set('data', await processZxfkItems(site, 'tsjy', limit)); -}; +} diff --git a/lib/routes/gov/samr/xgzlyhd.ts b/lib/routes/gov/samr/xgzlyhd.ts index fd058f501..ea5bbba04 100644 --- a/lib/routes/gov/samr/xgzlyhd.ts +++ b/lib/routes/gov/samr/xgzlyhd.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -37,7 +38,122 @@ const getOption = async (type, name) => { return; }; -export default async (ctx) => { +export const route: Route = { + path: '/samr/xgzlyhd/:category?/:department?', + categories: ['government'], + example: '/gov/samr/xgzlyhd', + parameters: { category: '留言类型,见下表,默认为全部', department: '回复部门,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xgzlyhd.samr.gov.cn/gjjly/index'], + }, + name: '留言咨询', + maintainers: ['nczitzk'], + handler, + url: 'xgzlyhd.samr.gov.cn/gjjly/index', + description: `#### 留言类型 + + | 类型 | 类型 id | + | ------------------------------------------ | -------------------------------- | + | 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf | + | 规划统计 | b807cf9cdf434635ae908d48757e0f39 | + | 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 | + | 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 | + | 走私贩私 | 84c728530e1e478e94fe3f0030171c53 | + | 登记注册 | 07fff64612dc41aca871c06587abf71d | + | 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 | + | 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 | + | 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 | + | 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 | + | 商业贿赂 | b494e6535af149c5a51fd4197993f061 | + | 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 | + | 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 | + | 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa | + | 动产抵押登记 | 3856de5835444229943b18cac7781e9f | + | 广告监管 | d0e38171042048c2bf31b05c5e57aa68 | + | 三包 | c4dbd85692604a428b1ea7613e67beb8 | + | 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c | + | 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b | + | 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 | + | 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa | + | 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 | + | 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a | + | 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 | + | 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c | + | 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 | + | 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 | + | 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d | + | 计量器具 | 90b25e22861446d5822e07c7c1f5169a | + | 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad | + | 国家标准 | 299b9672e1c246e69485a5b695f42c5b | + | 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 | + | 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 | + | 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb | + | 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 | + | 科技财务 | 47367b9704964355ba52899a4c5abbb0 | + | 干部人事 | 6b978e3c127c489ea8e2d693b768887e | + | 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a | + | 党群工作 | aa71052978af4304937eb382f24f9902 | + | 退休干部 | 44505fc58c81428eb5cef15706007b5e | + | 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd | + | 滥用行政权力 | 1215206156dc48029b98da825f26fcbc | + | 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 | + | 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 | + | 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 | + | 并购行为 | 90e315647acd415ca68f97fc1b42053d | + | 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb | + | 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 | + | 综合执法 | cfbb1b5dade446299670ca38844b265e | + | 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb | + | 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 | + | 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 | + | 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 | + + #### 回复部门 + + | 部门 | 部门 id | + | ---------------------------- | -------------------------------- | + | 办公厅 | 6ed539b270634667afc4d466b67a53f7 | + | 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 | + | 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 | + | 登记注册局 | e4553350549f45f38da5602147cf8639 | + | 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 | + | 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 | + | 综合规划司 | 958e1619159c45a7b76663a59d9052ea | + | 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c | + | 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 | + | 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab | + | 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b | + | 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 | + | 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 | + | 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 | + | 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 | + | 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a | + | 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 | + | 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 | + | 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 | + | 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a | + | 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 | + | 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 | + | 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 | + | 认证监督管理司 | ca4987393d514debb4d1e2126f576987 | + | 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 | + | 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda | + | 科技和财务司 | 117355eea94c426199e2e519fd98ce07 | + | 人事司 | a341e8b7929e44769b9424b7cf69d32a | + | 国际司 | f784499ef24541f5b20de4c24cfc61e7 | + | 机关党委 | a49119c6f40045dd994f3910500cedfa | + | 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b |`, +}; + +async function handler(ctx) { const { category, department } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -87,7 +203,7 @@ export default async (ctx) => { const subtitle = [categoryOption ? categoryOption.name : undefined, departmentOption ? departmentOption.name : undefined].filter(Boolean).join(' - '); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author}${title}${subtitle ? ` - ${subtitle}` : ''}`, link: currentUrl, @@ -99,5 +215,5 @@ export default async (ctx) => { subtitle, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/sasac/generic.ts b/lib/routes/gov/sasac/generic.ts index 460d8a630..461286810 100644 --- a/lib/routes/gov/sasac/generic.ts +++ b/lib/routes/gov/sasac/generic.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/sasac/:path{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const baseUrl = 'http://www.sasac.gov.cn'; const url = `${baseUrl}/${path}/index.html`; @@ -34,10 +42,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim(), link: url, image: 'http://www.sasac.gov.cn/dbsource/11869722/11869731.jpg', item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/sdb/sdb.ts b/lib/routes/gov/sdb/sdb.ts index fe548a7a7..f34015a38 100644 --- a/lib/routes/gov/sdb/sdb.ts +++ b/lib/routes/gov/sdb/sdb.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/sdb/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'zwgk/zcjd/', list_element: '.art-list li a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/shaanxi/kjt.ts b/lib/routes/gov/shaanxi/kjt.ts index f8e0aa9d7..53ebdfd39 100644 --- a/lib/routes/gov/shaanxi/kjt.ts +++ b/lib/routes/gov/shaanxi/kjt.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/shaanxi/kjt/:id?', + categories: ['government'], + example: '/gov/shaanxi/kjt', + parameters: { id: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '省科学技术厅', + maintainers: ['nczitzk'], + handler, + description: `| 科技头条 | 工作动态 | 基层科技 | 科技博览 | 媒体聚焦 | 通知公告 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 1061 | 24 | 27 | 25 | 28 | 221 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '221'; const rootUrl = 'https://kjt.shaanxi.gov.cn'; @@ -48,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `陕西省科学技术厅 - ${$('.catnm').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shanghai/rsj/ksxm.ts b/lib/routes/gov/shanghai/rsj/ksxm.ts index 60e9abfa1..85b370922 100644 --- a/lib/routes/gov/shanghai/rsj/ksxm.ts +++ b/lib/routes/gov/shanghai/rsj/ksxm.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import * as path from 'node:path'; const rootUrl = 'http://www.rsj.sh.gov.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/shanghai/rsj/ksxm', + categories: ['government'], + example: '/gov/shanghai/rsj/ksxm', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rsj.sh.gov.cn/'], + }, + name: '上海市职业能力考试院 考试项目', + maintainers: ['Fatpandac'], + handler, + url: 'rsj.sh.gov.cn/', +}; + +async function handler() { const url = `${rootUrl}/ksyzc/wangz/kwaplist_300.jsp`; const response = await got({ @@ -34,9 +57,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: '上海市职业能力考试院 - 考试项目', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shanghai/wgj/wgj.ts b/lib/routes/gov/shanghai/wgj/wgj.ts index f4d787366..0207b7dcb 100644 --- a/lib/routes/gov/shanghai/wgj/wgj.ts +++ b/lib/routes/gov/shanghai/wgj/wgj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,30 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/shanghai/wgj/:page?', + categories: ['government'], + example: '/gov/shanghai/wgj', + parameters: { page: '页数,默认第 1 页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wsbs.wgj.sh.gov.cn/'], + target: '/shanghai/wgj', + }, + name: '上海市文旅局审批公告', + maintainers: ['gideonsenku'], + handler, + url: 'wsbs.wgj.sh.gov.cn/', +}; + +async function handler(ctx) { const baseUrl = 'http://wsbs.wgj.sh.gov.cn'; const currentUrl = `${baseUrl}/shwgj_ywtb/core/web/welcome/index!toResultNotice.action`; const page = ctx.req.param('page') ?? 1; @@ -68,9 +92,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shanghai/wsjkw/yqtb/index.ts b/lib/routes/gov/shanghai/wsjkw/yqtb/index.ts index 9ec3a6d12..8128f560f 100644 --- a/lib/routes/gov/shanghai/wsjkw/yqtb/index.ts +++ b/lib/routes/gov/shanghai/wsjkw/yqtb/index.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/shanghai/wsjkw/yqtb', + categories: ['government'], + example: '/gov/shanghai/wsjkw/yqtb', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wsjkw.sh.gov.cn/'], + }, + name: '上海卫健委 疫情通报', + maintainers: ['zcf0508'], + handler, + url: 'wsjkw.sh.gov.cn/', +}; + +async function handler() { const url = `https://wsjkw.sh.gov.cn/yqtb/index.html`; const res = await got.get(url); const $ = load(res.data); const list = $('.uli16.nowrapli.list-date li'); - ctx.set('data', { + return { title: '疫情通报-上海卫健委', link: url, item: @@ -29,5 +52,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/gov/shanghai/yjj/index.ts b/lib/routes/gov/shanghai/yjj/index.ts index dc36e188b..d7725c06e 100644 --- a/lib/routes/gov/shanghai/yjj/index.ts +++ b/lib/routes/gov/shanghai/yjj/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/shanghai/yjj/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = getSubPath(ctx) === '/shanghai/yjj' ? '/shanghai/yjj/zx-ylqx' : getSubPath(ctx); const rootUrl = 'https://yjj.sh.gov.cn'; @@ -56,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text().replace(/--/, ' - '), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shenzhen/hrss/szksy/index.ts b/lib/routes/gov/shenzhen/hrss/szksy/index.ts index 9c34b8279..f94064baa 100644 --- a/lib/routes/gov/shenzhen/hrss/szksy/index.ts +++ b/lib/routes/gov/shenzhen/hrss/szksy/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,32 @@ import timezone from '@/utils/timezone'; const rootURL = 'http://hrss.sz.gov.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/shenzhen/hrss/szksy/:caty/:page?', + categories: ['government'], + example: '/gov/shenzhen/hrss/szksy/bmxx/2', + parameters: { caty: '信息类别', page: '页码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xxgk.sz.gov.cn/cn/xxgk/zfxxgj/:caty'], + }, + name: '深圳市考试院', + maintainers: ['zlasd'], + handler, + url: 'hrss.sz.gov.cn/*', + description: `| 通知公告 | 报名信息 | 成绩信息 | 合格标准 | 合格人员公示 | 证书发放信息 | + | :------: | :------: | :------: | :------: | :----------: | :----------: | + | tzgg | bmxx | cjxx | hgbz | hgrygs | zsff |`, +}; + +async function handler(ctx) { const categoryID = ctx.req.param('caty'); const page = ctx.req.param('page') ?? '1'; @@ -33,9 +59,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '深圳市考试院 - ' + title, link: currentURL.href, item: list, - }); -}; + }; +} diff --git a/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts b/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts index 52a54b992..ed6487952 100644 --- a/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts +++ b/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -24,7 +25,28 @@ const config = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/shenzhen/xxgk/zfxxgj/:caty', + categories: ['government'], + example: '/gov/shenzhen/xxgk/zfxxgj/tzgg', + parameters: { caty: '信息类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '深圳市人民政府', + maintainers: ['laoxua'], + handler, + description: `| 通知公告 | 政府采购 | 资金信息 | 重大项目 | + | :------: | :------: | :------: | :------: | + | tzgg | zfcg | zjxx | zdxm |`, +}; + +async function handler(ctx) { const cfg = config[ctx.req.param('caty')]; if (!cfg) { throw new Error('Bad category. See docs'); @@ -65,9 +87,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '广东省深圳市人民政府 - ' + cfg.title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shenzhen/zjj/index.ts b/lib/routes/gov/shenzhen/zjj/index.ts index dd70b6e98..717884b14 100644 --- a/lib/routes/gov/shenzhen/zjj/index.ts +++ b/lib/routes/gov/shenzhen/zjj/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -10,7 +11,31 @@ const config = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/shenzhen/zjj/xxgk/:caty', + categories: ['government'], + example: '/gov/shenzhen/zjj/xxgk/tzgg', + parameters: { caty: '信息类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zjj.sz.gov.cn/xxgk/:caty'], + }, + name: '深圳市住房和建设局', + maintainers: ['lonn'], + handler, + description: `| 通知公告 | + | :------: | + | tzgg |`, +}; + +async function handler(ctx) { const baseUrl = 'http://zjj.sz.gov.cn/xxgk/'; const cfg = config[ctx.req.param('caty')]; if (!cfg) { @@ -37,9 +62,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '深圳市住房和建设局 - ' + cfg.title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/shenzhen/zzb/index.ts b/lib/routes/gov/shenzhen/zzb/index.ts index 79ae7e7cb..969aa7afa 100644 --- a/lib/routes/gov/shenzhen/zzb/index.ts +++ b/lib/routes/gov/shenzhen/zzb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,32 @@ import timezone from '@/utils/timezone'; const rootURL = 'http://www.zzb.sz.gov.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/shenzhen/zzb/:caty/:page?', + categories: ['government'], + example: '/gov/shenzhen/zzb/tzgg', + parameters: { caty: '信息类别', page: '页码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zzb.sz.gov.cn/*'], + }, + name: '深圳市委组织部', + maintainers: ['zlasd'], + handler, + url: 'zzb.sz.gov.cn/*', + description: `| 通知公告 | 任前公示 | 政策法规 | 工作动态 | 部门预算决算公开 | 业务表格下载 | + | :------: | :------: | :------: | :------: | :--------------: | :----------: | + | tzgg | rqgs | zcfg | gzdt | xcbd | bgxz |`, +}; + +async function handler(ctx) { const categoryID = ctx.req.param('caty'); const page = ctx.req.param('page') ?? '1'; @@ -32,9 +58,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '深圳组工在线 - ' + title, link: currentURL.href, item: list, - }); -}; + }; +} diff --git a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts index 23c6ff01a..0a43bb0ca 100644 --- a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +++ b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -75,7 +76,28 @@ const getInfoContent = (rootUrl, item) => } }); -export default async (ctx) => { +export const route: Route = { + path: '/sichuan/deyang/govpublicinfo/:countyName/:infoType?', + categories: ['government'], + example: '/gov/sichuan/deyang/govpublicinfo/绵竹市', + parameters: { countyName: '区县名(**其他区县整改中,暂时只支持`绵竹市`**)。德阳市、绵竹市、广汉市、什邡市、中江县、罗江区、旌阳区、高新区', infoType: '信息类型。默认值:fdzdnr-“法定主动内容”' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '政府公开信息', + maintainers: ['zytomorrow'], + handler, + description: `| 法定主动内容 | 公示公告 | + | :----------: | :------: | + | fdzdnr | gsgg |`, +}; + +async function handler(ctx) { const countyName = ctx.req.param('countyName'); const infoType = ctx.req.param('infoType') || 'fdzdnr'; const infoBasicUrl = basicInfoDict[countyName].infoType[infoType].basicUrl; @@ -83,7 +105,7 @@ export default async (ctx) => { const infoUrlList = await getInfoUrlList(rootUrl, infoBasicUrl); const items = await Promise.all(infoUrlList.map((item) => getInfoContent(rootUrl, item))); - ctx.set('data', { + return { title: `政府公开信息-${countyName}-${basicInfoDict[countyName].infoType[infoType].name}`, link: infoBasicUrl, item: items.map((item) => ({ @@ -92,5 +114,5 @@ export default async (ctx) => { link: item.link, pubDate: item.pubDate, })), - }); -}; + }; +} diff --git a/lib/routes/gov/sichuan/deyang/mztoday.ts b/lib/routes/gov/sichuan/deyang/mztoday.ts index d8c3a0f1a..c667102e2 100644 --- a/lib/routes/gov/sichuan/deyang/mztoday.ts +++ b/lib/routes/gov/sichuan/deyang/mztoday.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -119,13 +120,39 @@ const getInfoContent = (item) => }; }); -export default async (ctx) => { +export const route: Route = { + path: '/sichuan/deyang/mztoday/:infoType?', + categories: ['government'], + example: '/gov/sichuan/deyang/mztoday/zx', + parameters: { infoType: '信息栏目名称。默认最新(zx)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mztoday.gov.cn/*'], + target: '/sichuan/deyang/mztoday', + }, + name: '今日绵竹', + maintainers: ['zytomorrow'], + handler, + url: 'www.mztoday.gov.cn/*', + description: `| 最新 | 推荐 | 时政 | 教育 | 民生 | 文旅 | 经济 | 文明创建 | 部门 | 镇(街道) | 健康绵竹 | 南轩讲堂 | 视频 | 文明实践 | 领航中国 | 绵竹年画 | 绵竹历史 | 绵竹旅游 | 外媒看绵竹 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- | + | zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz |`, +}; + +async function handler(ctx) { const infoType = ctx.req.param('infoType') || 'zx'; const infoBasicUrl = `${rootUrl}${basicInfoDict[infoType].url}`; const infoUrlList = await getInfoUrlList(infoBasicUrl); const items = await Promise.all(infoUrlList.map((item) => getInfoContent(item))); - ctx.set('data', { + return { title: `今日绵竹-${basicInfoDict[infoType].name}`, link: `${infoBasicUrl}1`, item: items.map((item) => ({ @@ -134,5 +161,5 @@ export default async (ctx) => { link: item.link, pubDate: item.pubDate, })), - }); -}; + }; +} diff --git a/lib/routes/gov/stats/index.ts b/lib/routes/gov/stats/index.ts index 39f396215..4b5b8b8c0 100644 --- a/lib/routes/gov/stats/index.ts +++ b/lib/routes/gov/stats/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/stats/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 15; const defaultPath = '/sj/zxfb/'; @@ -109,9 +117,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/suzhou/doc.ts b/lib/routes/gov/suzhou/doc.ts index 429b008d0..528a1b1cc 100644 --- a/lib/routes/gov/suzhou/doc.ts +++ b/lib/routes/gov/suzhou/doc.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/suzhou/doc', + categories: ['government'], + example: '/gov/suzhou/doc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.suzhou.gov.cn/szxxgk/front/xxgk_right.jsp', 'www.suzhou.gov.cn/'], + }, + name: '政府信息公开文件', + maintainers: ['EsuRt'], + handler, + url: 'www.suzhou.gov.cn/szxxgk/front/xxgk_right.jsp', +}; + +async function handler() { const link = 'https://www.suzhou.gov.cn/szxxgk/front/xxgk_right.jsp'; const { data: response } = await got(link); @@ -39,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '苏州市政府 - 政策公开文件', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/suzhou/fg.ts b/lib/routes/gov/suzhou/fg.ts index a752c2fd0..e32c8c570 100644 --- a/lib/routes/gov/suzhou/fg.ts +++ b/lib/routes/gov/suzhou/fg.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/suzhou/fg/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'szfgw/ggl/nav_list' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -50,7 +58,7 @@ export default async (ctx) => { const subtitle = $('meta[name="ColumnName"]').prop('content'); const image = new URL($('div.logo img').prop('src'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -59,5 +67,5 @@ export default async (ctx) => { image, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/gov/suzhou/news.ts b/lib/routes/gov/suzhou/news.ts index 3dd492c3d..d25120daa 100644 --- a/lib/routes/gov/suzhou/news.ts +++ b/lib/routes/gov/suzhou/news.ts @@ -1,10 +1,57 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/suzhou/news/:uid', + categories: ['government'], + example: '/gov/suzhou/news/news', + parameters: { uid: '栏目名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.suzhou.gov.cn/szsrmzf/:uid/nav_list.shtml'], + }, + name: '政府新闻', + maintainers: ['EsuRt', 'luyuhuang'], + handler, + description: `| 新闻栏目名 | :uid | + | :--------: | :--------------: | + | 苏州要闻 | news 或 szyw | + | 区县快讯 | district 或 qxkx | + | 部门动态 | bmdt | + | 新闻视频 | xwsp | + | 政务公告 | zwgg | + | 便民公告 | mszx | + | 民生资讯 | bmzx | + + | 热点专题栏目名 | :uid | + | :------------: | :----: | + | 热点专题 | rdzt | + | 市本级专题 | sbjzt | + | 最新热点专题 | zxrdzt | + | 往期专题 | wqzt | + | 区县专题 | qxzt | + + :::tip + **热点专题**栏目包含**市本级专题**和**区县专题** + + **市本级专题**栏目包含**最新热点专题**和**往期专题** + + 如需订阅完整的热点专题,仅需订阅 **热点专题**\`rdzt\` 一项即可。 + :::`, +}; + +async function handler(ctx) { const rootUrl = 'https://www.suzhou.gov.cn'; const uid = ctx.req.param('uid'); let url = ''; @@ -109,9 +156,9 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/taiyuan/rsj.ts b/lib/routes/gov/taiyuan/rsj.ts index 6167b1ff1..d74b86f7c 100644 --- a/lib/routes/gov/taiyuan/rsj.ts +++ b/lib/routes/gov/taiyuan/rsj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,32 @@ import timezone from '@/utils/timezone'; const rootURL = 'http://rsj.taiyuan.gov.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/taiyuan/rsj/:caty/:page?', + categories: ['government'], + example: '/gov/taiyuan/rsj/gggs', + parameters: { caty: '信息类别', page: '页码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rsj.taiyuan.gov.cn/*'], + }, + name: '太原市人力资源和社会保障局政府公开信息', + maintainers: ['2PoL'], + handler, + url: 'rsj.taiyuan.gov.cn/*', + description: `| 工作动态 | 太原新闻 | 通知公告 | 县区动态 | 国内动态 | 图片新闻 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | gzdt | tyxw | gggs | xqdt | gndt | tpxw |`, +}; + +async function handler(ctx) { const categoryID = ctx.req.param('caty'); const page = ctx.req.param('page') ?? '1'; @@ -33,9 +59,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '太原市人力资源和社会保障局 - ' + title, link: currentURL.href, item: list, - }); -}; + }; +} diff --git a/lib/routes/gov/wuhan/whyw.ts b/lib/routes/gov/wuhan/whyw.ts index 9f1eaa82d..d80588425 100644 --- a/lib/routes/gov/wuhan/whyw.ts +++ b/lib/routes/gov/wuhan/whyw.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/wuhan/sy/whyw', + categories: ['government'], + example: '/gov/wuhan/sy/whyw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wuhan.gov.cn/sy/whyw/', 'wuhan.gov.cn/whyw', 'wuhan.gov.cn/'], + }, + name: '武汉要闻', + maintainers: ['nczitzk'], + handler, + url: 'wuhan.gov.cn/sy/whyw/', +}; + +async function handler() { const rootUrl = 'http://www.wuhan.gov.cn'; const currentUrl = `${rootUrl}/sy/whyw/`; const response = await got(currentUrl); @@ -37,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('h2').text()} - 武汉市人民政府`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/xinyi/xinyi.ts b/lib/routes/gov/xinyi/xinyi.ts index 680a04c63..b79835f67 100644 --- a/lib/routes/gov/xinyi/xinyi.ts +++ b/lib/routes/gov/xinyi/xinyi.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import { gdgov } from '../general/general'; -export default async (ctx) => { +export const route: Route = { + path: '/xinyi/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const info = { defaultPath: 'zwgk/zcjd/', list_element: '.newsList li a', @@ -16,4 +24,4 @@ export default async (ctx) => { pubDate_format: undefined, }; await gdgov(info, ctx); -}; +} diff --git a/lib/routes/gov/xuzhou/hrss.ts b/lib/routes/gov/xuzhou/hrss.ts index d68d23eee..030893e19 100644 --- a/lib/routes/gov/xuzhou/hrss.ts +++ b/lib/routes/gov/xuzhou/hrss.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xuzhou/hrss/:category?', + categories: ['government'], + example: '/gov/xuzhou/hrss', + parameters: { category: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '徐州市人力资源和社会保障局', + maintainers: ['nczitzk'], + handler, + description: `| 通知公告 | 要闻动态 | 县区动态 | 事业招聘 | 企业招聘 | 政声传递 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | | 001001 | 001002 | 001004 | 001005 | 001006 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'http://hrss.xz.gov.cn'; @@ -47,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `徐州市人力资源和社会保障局 - ${category ? $('.wb-tree-items.current').text() : '通知公告'}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/zhejiang/gwy.ts b/lib/routes/gov/zhejiang/gwy.ts index b2367dec4..85474e670 100644 --- a/lib/routes/gov/zhejiang/gwy.ts +++ b/lib/routes/gov/zhejiang/gwy.ts @@ -1,9 +1,56 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zhejiang/gwy/:category?/:column?', + categories: ['government'], + example: '/gov/zhejiang/gwy/1', + parameters: { category: '分类,见下表,默认为全部', column: '地市专栏,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zjks.gov.cn/zjgwy/website/init.htm', 'zjks.gov.cn/zjgwy/website/queryDetail.htm', 'zjks.gov.cn/zjgwy/website/queryMore.htm'], + target: '/zhejiang/gwy', + }, + name: '通知', + maintainers: ['nczitzk'], + handler, + url: 'zjks.gov.cn/zjgwy/website/init.htm', + description: `| 分类 | id | + | ------------ | -- | + | 重要通知 | 1 | + | 招考公告 | 2 | + | 招考政策 | 3 | + | 面试体检考察 | 4 | + | 录用公示专栏 | 5 | + + | 地市 | id | + | ------------ | ----- | + | 浙江省 | 133 | + | 浙江省杭州市 | 13301 | + | 浙江省宁波市 | 13302 | + | 浙江省温州市 | 13303 | + | 浙江省嘉兴市 | 13304 | + | 浙江省湖州市 | 13305 | + | 浙江省绍兴市 | 13306 | + | 浙江省金华市 | 13307 | + | 浙江省衢州市 | 13308 | + | 浙江省舟山市 | 13309 | + | 浙江省台州市 | 13310 | + | 浙江省丽水市 | 13311 | + | 省级单位 | 13317 |`, +}; + +async function handler(ctx) { const { category, column } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -73,7 +120,7 @@ export default async (ctx) => { const columnName = $('button.btn-success').last().text(); const categoryName = $('table').parent().prev().find('h5').text(); - ctx.set('data', { + return { item: items, title: `${$('title').text()} - ${columnName}${categoryName}`, link: currentUrl, @@ -81,5 +128,5 @@ export default async (ctx) => { subtitle: `${columnName}${categoryName}`, author: $('div.title-font').text(), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/gov/zhengce/govall.ts b/lib/routes/gov/zhengce/govall.ts index 0ed51e36b..b52bdc089 100644 --- a/lib/routes/gov/zhengce/govall.ts +++ b/lib/routes/gov/zhengce/govall.ts @@ -1,10 +1,44 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/zhengce/govall/:advance?', + categories: ['government'], + example: '/gov/zhengce/govall/orpro=555¬pro=2&search_field=title', + parameters: { advance: '高级搜索选项,将作为请求参数直接添加到url后。目前已知的选项及其意义如下。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.gov.cn/'], + target: '/zhengce/govall', + }, + name: '信息稿件', + maintainers: ['ciaranchen'], + handler, + url: 'www.gov.cn/', + description: `| 选项 | 意义 | 备注 | + | :-----------------------------: | :----------------------------------------------: | :----------------------------: | + | orpro | 包含以下任意一个关键词。 | 用空格分隔。 | + | allpro | 包含以下全部关键词 | | + | notpro | 不包含以下关键词 | | + | inpro | 完整不拆分的关键词 | | + | searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 | + | pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 | + | pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 | + | colid | 栏目 | 比较复杂,不建议使用 |`, +}; + +async function handler(ctx) { const advance = ctx.req.param('advance'); const link = `http://sousuo.gov.cn/list.htm`; const params = new URLSearchParams({ @@ -48,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '信息稿件 - 中国政府网', link: `${link}?${query}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/zhengce/index.ts b/lib/routes/gov/zhengce/index.ts index eb1099123..f65b311d4 100644 --- a/lib/routes/gov/zhengce/index.ts +++ b/lib/routes/gov/zhengce/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/zhengce/zuixin', '/zhengce/:category{.+}?'], + categories: ['government'], + example: '/gov/zhengce/zuixin', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.gov.cn/zhengce/zuixin.htm', 'www.gov.cn/'], + }, + name: '最新政策', + maintainers: ['SettingDust', 'nczitzk'], + handler, + url: 'www.gov.cn/zhengce/zuixin.htm', +}; + +async function handler(ctx) { const { category = 'zuixin' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -85,7 +108,7 @@ export default async (ctx) => { const subtitle = $('meta[name="lanmu"]').prop('content'); const author = $('div.header_logo a[aria-label]').prop('aria-label'); - ctx.set('data', { + return { item: items, title: author && subtitle ? `${author} - ${subtitle}` : $('title').text(), link: currentUrl, @@ -96,5 +119,5 @@ export default async (ctx) => { logo: icon, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/gov/zhengce/wenjian.ts b/lib/routes/gov/zhengce/wenjian.ts index f4eecb529..635b9241a 100644 --- a/lib/routes/gov/zhengce/wenjian.ts +++ b/lib/routes/gov/zhengce/wenjian.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/zhengce/wenjian/:pcodeJiguan?', + categories: ['government'], + example: '/gov/zhengce/wenjian', + parameters: { pcodeJiguan: '文种分类。国令、国发、国函、国发明电、国办发、国办函、国办发明电、其他' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.gov.cn/'], + target: '/zhengce/wenjian', + }, + name: '最新文件', + maintainers: ['ciaranchen'], + handler, + url: 'www.gov.cn/', +}; + +async function handler(ctx) { const pcodeJiguan = ctx.req.param('pcodeJiguan'); const link = 'http://sousuo.gov.cn/list.htm'; const res = await got(link, { @@ -40,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '最新文件 - 中国政府网', link: res.url, item: items, - }); -}; + }; +} diff --git a/lib/routes/gov/zhengce/zhengceku.ts b/lib/routes/gov/zhengce/zhengceku.ts index 074437185..5364da13e 100644 --- a/lib/routes/gov/zhengce/zhengceku.ts +++ b/lib/routes/gov/zhengce/zhengceku.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/zhengce/zhengceku/:department', + categories: ['government'], + example: '/gov/zhengce/zhengceku/bmwj', + parameters: { department: '库名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '国务院政策文件库', + maintainers: ['zxx-457'], + handler, +}; + +async function handler(ctx) { const department = ctx.req.param('department'); const link = `http://www.gov.cn/zhengce/zhengceku/${department}/`; @@ -22,4 +41,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/greasyfork/feedback.ts b/lib/routes/greasyfork/feedback.ts index f625e936b..592970e68 100644 --- a/lib/routes/greasyfork/feedback.ts +++ b/lib/routes/greasyfork/feedback.ts @@ -1,15 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/scripts/:script/feedback', + categories: ['program-update'], + example: '/greasyfork/scripts/431691-bypass-all-shortlinks/feedback', + parameters: { script: 'Script id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['greasyfork.org/:language/scripts/:script/feedback'], + }, + name: 'Script Feedback', + maintainers: ['miles170'], + handler, +}; + +async function handler(ctx) { const script = ctx.req.param('script'); const rootUrl = 'https://greasyfork.org'; const currentUrl = `${rootUrl}/scripts/${script}/feedback`; const response = await got(currentUrl); const $ = load(response.data); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, description: $('meta[name=description]').attr('content'), @@ -27,5 +49,5 @@ export default async (ctx) => { link: rootUrl + discussionTitle.attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/greasyfork/maintainer.ts b/lib/routes/greasyfork/maintainer.ts deleted file mode 100644 index 26488b2d5..000000000 --- a/lib/routes/greasyfork/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/:language/:domain?': ['imlonghao', 'miles170'], - '/scripts/:script/feedback': ['miles170'], - '/scripts/:script/versions': ['miles170'], - '/scripts/sort/:sort/:language?': ['ingjieye'], -}; diff --git a/lib/routes/greasyfork/namespace.ts b/lib/routes/greasyfork/namespace.ts new file mode 100644 index 000000000..10f49bdfb --- /dev/null +++ b/lib/routes/greasyfork/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Greasy Fork', + url: 'greasyfork.org', +}; diff --git a/lib/routes/greasyfork/radar.ts b/lib/routes/greasyfork/radar.ts deleted file mode 100644 index 5e58bcd35..000000000 --- a/lib/routes/greasyfork/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'greasyfork.org': { - _name: 'Greasy Fork', - '.': [ - { - title: 'User scripts', - docs: 'https://docs.rsshub.app/routes/program-update#greasy-fork', - source: ['/:language', '/:language/scripts/by-site/:domain?'], - target: '/greasyfork/:language/:domain?', - }, - { - title: 'Feedback', - docs: 'https://docs.rsshub.app/routes/program-update#greasy-fork', - source: '/:language/scripts/:script/feedback', - target: '/greasyfork/scripts/:script/feedback', - }, - { - title: 'Version history', - docs: 'https://docs.rsshub.app/routes/program-update#greasy-fork', - source: '/:language/scripts/:script/versions', - target: '/greasyfork/scripts/:script/versions', - }, - ], - }, -}; diff --git a/lib/routes/greasyfork/router.ts b/lib/routes/greasyfork/router.ts deleted file mode 100644 index 1a668754c..000000000 --- a/lib/routes/greasyfork/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/:language/:domain?', './scripts'); - router.get('/scripts/:script/feedback', './feedback'); - router.get('/scripts/:script/versions', './versions'); - router.get('/scripts/sort/:sort/:language?', './scripts'); -}; diff --git a/lib/routes/greasyfork/scripts.ts b/lib/routes/greasyfork/scripts.ts index 8812d0595..4bc7e9efc 100644 --- a/lib/routes/greasyfork/scripts.ts +++ b/lib/routes/greasyfork/scripts.ts @@ -1,8 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/:language/:domain?', '/scripts/sort/:sort/:language?'], + categories: ['program-update'], + example: '/greasyfork/en/google.com', + parameters: { language: "language, located on the top right corner of Greasy Fork's search page, set to `all` for including all languages", domain: "the script's target domain" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['greasyfork.org/:language', 'greasyfork.org/:language/scripts/by-site/:domain?'], + }, + name: 'Script Update', + maintainers: ['imlonghao', 'miles170'], + handler, + description: `| Sort | Description | +| --------------- | -------------- | +| today | Daily installs | +| total\_installs | Total installs | +| ratings | Ratings | +| created | Created date | +| updated | Updated date | +| name | Name |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') === 'all' ? 'zh-CN' : ctx.req.param('language') || 'zh-CN'; const domain = ctx.req.param('domain'); const filter_locale = ctx.req.param('language') === 'all' ? 0 : 1; @@ -20,7 +50,7 @@ export default async (ctx) => { const $ = load(res.data); const list = $('.script-list').find('article'); - ctx.set('data', { + return { title: $('title').first().text(), link: currentUrl, description: $('meta[name=description]').attr('content'), @@ -40,5 +70,5 @@ export default async (ctx) => { .join(', '), }; }), - }); -}; + }; +} diff --git a/lib/routes/greasyfork/versions.ts b/lib/routes/greasyfork/versions.ts index 52eb6df63..7b8d8bdb7 100644 --- a/lib/routes/greasyfork/versions.ts +++ b/lib/routes/greasyfork/versions.ts @@ -1,14 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/scripts/:script/versions', + categories: ['program-update'], + example: '/greasyfork/scripts/431691-bypass-all-shortlinks/versions', + parameters: { script: 'Script id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['greasyfork.org/:language/scripts/:script/versions'], + }, + name: 'Script Version History', + maintainers: ['miles170'], + handler, +}; + +async function handler(ctx) { const script = ctx.req.param('script'); const currentUrl = `https://greasyfork.org/scripts/${script}/versions`; const response = await got(currentUrl); const $ = load(response.data); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, description: $('meta[name=description]').attr('content'), @@ -25,5 +47,5 @@ export default async (ctx) => { link: versionNumberLink.attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/grist/featured.ts b/lib/routes/grist/featured.ts index 5352e8eb0..854bcc114 100644 --- a/lib/routes/grist/featured.ts +++ b/lib/routes/grist/featured.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getData, getList } from './utils'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/featured', + categories: ['new-media'], + example: '/grist/featured', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grist.org/'], + }, + name: 'Featured', + maintainers: ['Rjnishant530'], + handler, + url: 'grist.org/', +}; + +async function handler() { const baseUrl = 'https://grist.org/'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -20,7 +43,7 @@ export default async (ctx) => { const itemData = await Promise.all(listItems.map((item) => cache.tryGet(item.link, async () => (await getData(`https://grist.org/wp-json/wp/v2/posts?slug='${item.link}'&_embed`))[0]))); const items = await getList(itemData); - ctx.set('data', { + return { title: 'Gist Featured Articles', link: baseUrl, item: items, @@ -28,5 +51,5 @@ export default async (ctx) => { logo: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=192', icon: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=32', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/grist/index.ts b/lib/routes/grist/index.ts index a48cdb742..3ea4e64cf 100644 --- a/lib/routes/grist/index.ts +++ b/lib/routes/grist/index.ts @@ -1,13 +1,25 @@ +import { Route } from '@/types'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['grist.org/articles/'], + }, + name: 'Unknown', + maintainers: ['Rjnishant530'], + handler, + url: 'grist.org/articles/', +}; + +async function handler() { const baseUrl = 'https://grist.org'; const route = '/wp-json/wp/v2/posts?_embed'; const data = await getData(`${baseUrl}${route}`); const items = await getList(data); - ctx.set('data', { + return { title: 'Gist Latest Articles', link: `${baseUrl}/articles`, item: items, @@ -15,5 +27,5 @@ export default async (ctx) => { logo: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=192', icon: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=32', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/grist/maintainer.ts b/lib/routes/grist/maintainer.ts deleted file mode 100644 index 749a38d42..000000000 --- a/lib/routes/grist/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/': ['Rjnishant530'], - '/featured': ['Rjnishant530'], - '/series/:series': ['Rjnishant530'], - '/topic/:topic': ['Rjnishant530'], -}; diff --git a/lib/routes/grist/namespace.ts b/lib/routes/grist/namespace.ts new file mode 100644 index 000000000..e5c022502 --- /dev/null +++ b/lib/routes/grist/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Grist', + url: 'grist.org', +}; diff --git a/lib/routes/grist/radar.ts b/lib/routes/grist/radar.ts deleted file mode 100644 index cf9766efc..000000000 --- a/lib/routes/grist/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'grist.org': { - _name: 'Grist', - '.': [ - { - title: 'Articles', - docs: 'https://docs.rsshub.app/routes/new-media#grist', - source: ['/articles/'], - target: '/grist/', - }, - { - title: 'Featured', - docs: 'https://docs.rsshub.app/routes/new-media#grist', - source: '/', - target: '/grist/featured', - }, - { - title: 'Series', - docs: 'https://docs.rsshub.app/routes/new-media#grist', - source: '/series/:series', - target: '/grist/series/:series', - }, - { - title: 'Topic', - docs: 'https://docs.rsshub.app/routes/new-media#grist', - source: ['/:topic'], - target: '/grist/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/grist/router.ts b/lib/routes/grist/router.ts deleted file mode 100644 index 8335aca80..000000000 --- a/lib/routes/grist/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/featured', './featured'); - router.get('/series/:series', './series'); - router.get('/topic/:topic', './topic'); -}; diff --git a/lib/routes/grist/series.ts b/lib/routes/grist/series.ts index 4f0450b9b..cb918e85f 100644 --- a/lib/routes/grist/series.ts +++ b/lib/routes/grist/series.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/series/:series', + categories: ['new-media'], + example: '/grist/series/best-of-grist', + parameters: { series: 'Find in the URL which has /series/' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grist.org/series/:series'], + }, + name: 'Series', + maintainers: ['Rjnishant530'], + handler, + url: 'grist.org/articles/', +}; + +async function handler(ctx) { const baseUrl = 'https://grist.org'; const searchRoute = '/wp-json/wp/v2/series?slug='; const articleRoute = '/wp-json/wp/v2/posts?series='; @@ -9,7 +32,7 @@ export default async (ctx) => { const data = await getData(`${baseUrl}${articleRoute}${id}&_embed`); const items = await getList(data); - ctx.set('data', { + return { title: `${series[0].toUpperCase() + series.slice(1)} - Gist Articles`, link: `${baseUrl}/${series}`, item: items, @@ -17,5 +40,5 @@ export default async (ctx) => { logo: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=192', icon: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=32', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/grist/topic.ts b/lib/routes/grist/topic.ts index 177d57662..63379b955 100644 --- a/lib/routes/grist/topic.ts +++ b/lib/routes/grist/topic.ts @@ -1,6 +1,74 @@ +import { Route } from '@/types'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['new-media'], + example: '/grist/topic/extreme-heat', + parameters: { topic: 'Any Topic from Table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grist.org/:topic'], + }, + name: 'Topic', + maintainers: ['Rjnishant530'], + handler, + url: 'grist.org/articles/', + description: `Topics + + | Topic Name | Topic Link | + | ------------------------ | ------------------ | + | Accountability | accountability | + | Agriculture | agriculture | + | Ask Umbra | ask-umbra-series | + | Buildings | buildings | + | Cities | cities | + | Climate & Energy | climate-energy | + | Climate Fiction | climate-fiction | + | Climate of Courage | climate-of-courage | + | COP26 | cop26 | + | COP27 | cop27 | + | Culture | culture | + | Economics | economics | + | Energy | energy | + | Equity | equity | + | Extreme Weather | extreme-weather | + | Fix | fix | + | Food | food | + | Grist | grist | + | Grist News | grist-news | + | Health | health | + | Housing | housing | + | Indigenous Affairs | indigenous | + | International | international | + | Labor | labor | + | Language | language | + | Migration | migration | + | Opinion | opinion | + | Politics | politics | + | Protest | protest | + | Race | race | + | Regulation | regulation | + | Science | science | + | Shift Happens Newsletter | shift-happens | + | Solutions | solutions | + | Spanish | spanish | + | Sponsored | sponsored | + | Technology | technology | + | Temperature Check | temperature-check | + | Uncategorized | article | + | Updates | updates | + | Video | video |`, +}; + +async function handler(ctx) { const baseUrl = 'https://grist.org'; const searchRoute = '/wp-json/wp/v2/categories?slug='; const articleRoute = '/wp-json/wp/v2/posts?categories='; @@ -9,7 +77,7 @@ export default async (ctx) => { const data = await getData(`${baseUrl}${articleRoute}${id}&_embed`); const items = await getList(data); - ctx.set('data', { + return { title: `${topic[0].toUpperCase() + topic.slice(1)} - Gist Articles`, link: `${baseUrl}/${topic}`, item: items, @@ -17,5 +85,5 @@ export default async (ctx) => { logo: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=192', icon: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=32', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/grubstreet/index.ts b/lib/routes/grubstreet/index.ts index f3ae2d141..a34b50845 100644 --- a/lib/routes/grubstreet/index.ts +++ b/lib/routes/grubstreet/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['grubstreet.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['loganrockmore'], + handler, + url: 'grubstreet.com/', +}; + +async function handler(ctx) { const url = `https://www.grubstreet.com/_components/newsfeed/instances/grubstreet-index@published`; const title = `Grub Street`; const description = `New York Magazine's Food and Restaurant Blog`; ctx.set('data', await utils.getData(ctx, url, title, description)); -}; +} diff --git a/lib/routes/grubstreet/maintainer.ts b/lib/routes/grubstreet/maintainer.ts deleted file mode 100644 index 554238642..000000000 --- a/lib/routes/grubstreet/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['loganrockmore'], -}; diff --git a/lib/routes/grubstreet/namespace.ts b/lib/routes/grubstreet/namespace.ts new file mode 100644 index 000000000..c48bd6b81 --- /dev/null +++ b/lib/routes/grubstreet/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Grub Street', + url: 'grubstreet.com', +}; diff --git a/lib/routes/grubstreet/radar.ts b/lib/routes/grubstreet/radar.ts deleted file mode 100644 index 2979eb946..000000000 --- a/lib/routes/grubstreet/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'grubstreet.com': { - _name: 'Grub Street', - '.': [ - { - title: 'Posts', - docs: 'https://docs.rsshub.app/routes/new-media#grub-street', - source: ['/'], - target: '/grubstreet', - }, - ], - }, -}; diff --git a/lib/routes/grubstreet/router.ts b/lib/routes/grubstreet/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/grubstreet/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/guancha/headline.ts b/lib/routes/guancha/headline.ts index 4a71e98ca..727b97b88 100644 --- a/lib/routes/guancha/headline.ts +++ b/lib/routes/guancha/headline.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/headline', + categories: ['new-media'], + example: '/guancha/headline', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guancha.cn/GuanChaZheTouTiao', 'guancha.cn/'], + }, + name: '头条', + maintainers: ['nczitzk'], + handler, + url: 'guancha.cn/GuanChaZheTouTiao', +}; + +async function handler() { const rootUrl = 'https://www.guancha.cn'; const currentUrl = `${rootUrl}/GuanChaZheTouTiao/list_1.shtml`; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '观察者网 - 头条', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/guancha/index.ts b/lib/routes/guancha/index.ts index 6f282dee0..196a3ea7c 100644 --- a/lib/routes/guancha/index.ts +++ b/lib/routes/guancha/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -34,7 +35,40 @@ const config = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/guancha', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guancha.cn/'], + }, + name: '首页', + maintainers: ['nczitzk', 'Jeason0228'], + handler, + url: 'guancha.cn/', + description: `| 全部 | 评论 & 研究 | 要闻 | 风闻 | 热点新闻 | 滚动新闻 | + | ---- | ----------- | ----- | ------- | -------- | -------- | + | all | review | story | fengwen | redian | gundong | + + home = 评论 & 研究 + 要闻 + 风闻 + + others = 热点新闻 + 滚动新闻 + + :::tip + 观察者网首页左中右的三个 column 分别对应 **评论 & 研究**、**要闻**、**风闻** 三个部分。 + :::`, +}; + +async function handler(ctx) { const total = 10; const category = ctx.req.param('category') ?? 'all'; const rootUrl = 'https://www.guancha.cn'; @@ -145,9 +179,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `观察者网 - ${config[category].title}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/guancha/maintainer.ts b/lib/routes/guancha/maintainer.ts deleted file mode 100644 index 0f8ade63d..000000000 --- a/lib/routes/guancha/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/:category?': ['nczitzk', 'Jeason0228'], - '/headline': ['nczitzk'], - '/member/:category?': ['nczitzk'], - '/personalpage/:uid': ['Jeason0228'], - '/topic/:id/:order?': ['occupy5', 'nczitzk'], -}; diff --git a/lib/routes/guancha/member.ts b/lib/routes/guancha/member.ts index c79a7189f..0b03c3299 100644 --- a/lib/routes/guancha/member.ts +++ b/lib/routes/guancha/member.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -9,7 +10,33 @@ const titles = { huodongs: '观学院', }; -export default async (ctx) => { +export const route: Route = { + path: '/member/:category?', + categories: ['new-media'], + example: '/guancha/member/recommend', + parameters: { category: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guancha.cn/'], + target: '/:category?', + }, + name: '观学院', + maintainers: ['nczitzk'], + handler, + url: 'guancha.cn/', + description: `| 精选 | 观书堂 | 在线课 | 观学院 | + | --------- | ------ | ------- | -------- | + | recommend | books | courses | huodongs |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'recommend'; const rootUrl = 'https://member.guancha.cn'; @@ -78,9 +105,9 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title: `观学院 - ${titles[category]}`, link: `${rootUrl}/index.html`, item: items, - }); -}; + }; +} diff --git a/lib/routes/guancha/namespace.ts b/lib/routes/guancha/namespace.ts new file mode 100644 index 000000000..5261bf8da --- /dev/null +++ b/lib/routes/guancha/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '观察者网', + url: 'guancha.cn', +}; diff --git a/lib/routes/guancha/personalpage.ts b/lib/routes/guancha/personalpage.ts index 7f20c4117..16c8d199c 100644 --- a/lib/routes/guancha/personalpage.ts +++ b/lib/routes/guancha/personalpage.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/personalpage/:uid', + categories: ['new-media'], + example: '/guancha/personalpage/243983', + parameters: { uid: '用户id, 可在URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '个人主页文章', + maintainers: ['Jeason0228'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const host = 'https://user.guancha.cn'; const link = `https://app.guancha.cn/user/get-published-list?page_size=20&page_no=1&uid=${uid}`; @@ -57,7 +76,7 @@ export default async (ctx) => { } return time; } - ctx.set('data', { + return { title: `${user_nick}-观察者-风闻社区`, link, description: `${user_nick} 的个人主页`, @@ -68,5 +87,5 @@ export default async (ctx) => { link: `https://user.guancha.cn/main/content?id=${item.id}`, author: item.user_nick, })), - }); -}; + }; +} diff --git a/lib/routes/guancha/radar.ts b/lib/routes/guancha/radar.ts deleted file mode 100644 index 015359bc3..000000000 --- a/lib/routes/guancha/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'guancha.cn': { - _name: '观察者网', - '.': [ - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-tou-tiao', - source: ['/GuanChaZheTouTiao', '/'], - target: '/guancha/headline', - }, - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-shou-ye', - source: ['/'], - target: '/guancha/:category?', - }, - { - title: '观学院', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-guan-xue-yuan', - source: ['/'], - target: '/guancha/:category?', - }, - ], - app: [ - { - title: '个人主页文章', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-ge-ren-zhu-ye-wen-zhang', - source: ['/user/get-published-list', '/'], - target: (params, url) => `/guancha/personalpage/${new URL(url).searchParams.get('uid')}`, - }, - ], - member: [ - { - title: '观学院', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-guan-xue-yuan', - source: ['/'], - target: '/guancha/member/recommend', - }, - ], - user: [ - { - title: '风闻话题', - docs: 'https://docs.rsshub.app/routes/new-media#guan-cha-zhe-wang-feng-wen-hua-ti', - source: ['/topic/post-list', '/'], - target: (params, url) => `/guancha/topic/${new URL(url).searchParams.get('topic_id')}/${new URL(url).searchParams.get('order')}`, - }, - ], - }, -}; diff --git a/lib/routes/guancha/router.ts b/lib/routes/guancha/router.ts deleted file mode 100644 index d12aac995..000000000 --- a/lib/routes/guancha/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/headline', './headline'); - router.get('/member/:category?', './member'); - router.get('/personalpage/:uid', './personalpage'); - router.get('/topic/:id/:order?', './topic'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/guancha/topic.ts b/lib/routes/guancha/topic.ts index 857547ef6..5ac649c93 100644 --- a/lib/routes/guancha/topic.ts +++ b/lib/routes/guancha/topic.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id/:order?', + radar: { + source: ['guancha.cn/'], + target: '/:category?', + }, + name: 'Unknown', + maintainers: ['occupy5', 'nczitzk'], + handler, + url: 'guancha.cn/', +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '0'; const order = ctx.req.param('order') ?? '1'; @@ -49,9 +62,9 @@ export default async (ctx) => { $('h1.title span').remove(); - ctx.set('data', { + return { title: `观察者网 - ${id === '0' ? '风闻' : $('h1.title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/guangdiu/cheaps.ts b/lib/routes/guangdiu/cheaps.ts index bcf1cf31b..e5bfe6d29 100644 --- a/lib/routes/guangdiu/cheaps.ts +++ b/lib/routes/guangdiu/cheaps.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; const host = 'https://guangdiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/cheaps/:query?', + categories: ['shopping'], + example: '/guangdiu/cheaps/k=clothes', + parameters: { query: '链接参数,对应网址问号后的内容' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '九块九', + maintainers: ['fatpandac'], + handler, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; const url = `${host}/cheaps.php${query ? `?${query}` : ''}`; @@ -20,9 +39,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: `逛丢 - 九块九`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/guangdiu/index.ts b/lib/routes/guangdiu/index.ts index 295a429d5..55186bdd9 100644 --- a/lib/routes/guangdiu/index.ts +++ b/lib/routes/guangdiu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseRelativeDate } from '@/utils/parse-date'; const host = 'https://guangdiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:query?', + categories: ['shopping'], + example: '/guangdiu/k=daily', + parameters: { query: '链接参数,对应网址问号后的内容' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '国内折扣 / 海外折扣', + maintainers: ['Fatpandac'], + handler, + description: `:::tip + 海外折扣: [\`/guangdiu/k=daily&c=us\`](https://rsshub.app/guangdiu/k=daily\&c=us) + :::`, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; const url = query === 'c=us' ? `${host}/?c=us` : `${host}/${query ? `cate.php?${query}` : ''}`; @@ -32,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `逛丢 - ${query.includes('c=us') ? '海外' : '国内'}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/guangdiu/maintainer.ts b/lib/routes/guangdiu/maintainer.ts deleted file mode 100644 index 02cb7f7de..000000000 --- a/lib/routes/guangdiu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/rank': ['fatpandac'], - '/cheaps/:query?': ['fatpandac'], - '/search/:query?': ['Huzhixin00'], - '/:query?': ['Fatpandac'], -}; diff --git a/lib/routes/guangdiu/namespace.ts b/lib/routes/guangdiu/namespace.ts new file mode 100644 index 000000000..58969c86d --- /dev/null +++ b/lib/routes/guangdiu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '逛丢', + url: 'guangdiu.com', +}; diff --git a/lib/routes/guangdiu/radar.ts b/lib/routes/guangdiu/radar.ts deleted file mode 100644 index 0762838f3..000000000 --- a/lib/routes/guangdiu/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'guangdiu.com': { - _name: '逛丢', - '.': [ - { - title: '折扣', - docs: 'https://docs.rsshub.app/routes/shopping#guang-diu', - source: ['/', '/cate.php'], - target: (param, url) => `/guangdiu/${url.includes('?') ? url.split('?')[1] : ''}`, - }, - { - title: '一小时风云榜', - docs: 'https://docs.rsshub.app/routes/shopping#guang-diu', - source: ['/rank'], - target: '/guangdiu/rank', - }, - { - title: '九块九', - docs: 'https://docs.rsshub.app/routes/shopping#guang-diu', - source: ['/cheaps.php'], - target: (param, url) => `/guangdiu/${url.includes('?') ? url.split('?')[1] : ''}`, - }, - { - title: '关键字搜索', - docs: 'https://docs.rsshub.app/routes/shopping#guang-diu', - source: ['/search.php'], - target: (param, url) => `/guangdiu/${url.includes('?') ? url.split('?')[1] : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/guangdiu/rank.ts b/lib/routes/guangdiu/rank.ts index 55b3238ab..8fb9ea622 100644 --- a/lib/routes/guangdiu/rank.ts +++ b/lib/routes/guangdiu/rank.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseRelativeDate } from '@/utils/parse-date'; const host = 'https://guangdiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/rank', + categories: ['shopping'], + example: '/guangdiu/rank', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guangdiu.com/rank'], + }, + name: '一小时风云榜', + maintainers: ['fatpandac'], + handler, + url: 'guangdiu.com/rank', +}; + +async function handler() { const url = `${host}/rank.php`; const response = await got(url); @@ -31,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `逛丢 - 一小时风云榜`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/guangdiu/router.ts b/lib/routes/guangdiu/router.ts deleted file mode 100644 index 70b0bfaed..000000000 --- a/lib/routes/guangdiu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/rank', './rank'); - router.get('/cheaps/:query?', './cheaps'); - router.get('/search/:query?', './search'); - router.get('/:query?', './index'); -}; diff --git a/lib/routes/guangdiu/search.ts b/lib/routes/guangdiu/search.ts index 3a8b6d1b0..dd2038f34 100644 --- a/lib/routes/guangdiu/search.ts +++ b/lib/routes/guangdiu/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseRelativeDate } from '@/utils/parse-date'; const host = 'https://guangdiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:query?', + categories: ['shopping'], + example: '/guangdiu/search/k=百度网盘', + parameters: { query: '链接参数,对应网址问号后的内容' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '关键字搜索', + maintainers: ['Huzhixin00'], + handler, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; const url = `${host}/${query ? `search.php?${query}` : ''}`; const response = await got(url); @@ -33,9 +52,9 @@ export default async (ctx) => { const match = /q=(.+)/.exec(query); - ctx.set('data', { + return { title: `逛丢 - ${match[1]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/guangzhoumetro/maintainer.ts b/lib/routes/guangzhoumetro/maintainer.ts deleted file mode 100644 index d66861067..000000000 --- a/lib/routes/guangzhoumetro/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['HankChow'], -}; diff --git a/lib/routes/guangzhoumetro/namespace.ts b/lib/routes/guangzhoumetro/namespace.ts new file mode 100644 index 000000000..5531e4b17 --- /dev/null +++ b/lib/routes/guangzhoumetro/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广州地铁', + url: 'www.gzmtr.com', +}; diff --git a/lib/routes/guangzhoumetro/news.ts b/lib/routes/guangzhoumetro/news.ts index 637c0047f..e322907af 100644 --- a/lib/routes/guangzhoumetro/news.ts +++ b/lib/routes/guangzhoumetro/news.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['travel'], + example: '/guangzhoumetro/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['HankChow'], + handler, +}; + +async function handler() { const newsUrl = 'https://www.gzmtr.com/ygwm/xwzx/gsxw/'; const response = await got(newsUrl); const data = response.data; @@ -23,7 +42,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '广州地铁新闻', url: newsUrl, description: '广州地铁新闻', @@ -33,5 +52,5 @@ export default async (ctx) => { link: item.link, author: item.author, })), - }); -}; + }; +} diff --git a/lib/routes/guangzhoumetro/radar.ts b/lib/routes/guangzhoumetro/radar.ts deleted file mode 100644 index 6f84a9706..000000000 --- a/lib/routes/guangzhoumetro/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'gzmtr.com': { - _name: '广州地铁', - www: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/travel#guang-zhou-di-tie', - }, - ], - }, -}; diff --git a/lib/routes/guangzhoumetro/router.ts b/lib/routes/guangzhoumetro/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/guangzhoumetro/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/guanhai/index.ts b/lib/routes/guanhai/index.ts index 506ccc9aa..0232e4974 100644 --- a/lib/routes/guanhai/index.ts +++ b/lib/routes/guanhai/index.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['guanhai.com.cn/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'guanhai.com.cn/', +}; + +async function handler() { const { data: response } = await got('https://www.guanhai.com.cn'); const $ = load(response); @@ -45,11 +58,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name=description]').text(), image: 'https://www.guanhai.com.cn/favicon.ico', link: 'https://www.guanhai.com.cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/guanhai/maintainer.ts b/lib/routes/guanhai/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/guanhai/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/guanhai/namespace.ts b/lib/routes/guanhai/namespace.ts new file mode 100644 index 000000000..db355e9b8 --- /dev/null +++ b/lib/routes/guanhai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '观海新闻', + url: 'guanhai.com.cn', +}; diff --git a/lib/routes/guanhai/radar.ts b/lib/routes/guanhai/radar.ts deleted file mode 100644 index a82e86adf..000000000 --- a/lib/routes/guanhai/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'guanhai.com.cn': { - _name: '观海新闻', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#guan-hai-xin-wen', - source: ['/'], - target: '/guanhai', - }, - ], - }, -}; diff --git a/lib/routes/guanhai/router.ts b/lib/routes/guanhai/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/guanhai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/guduodata/daily.ts b/lib/routes/guduodata/daily.ts index 334e6cf20..60014f0fd 100644 --- a/lib/routes/guduodata/daily.ts +++ b/lib/routes/guduodata/daily.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -30,7 +31,29 @@ const types = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/daily', + categories: ['other'], + example: '/guduodata/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['data.guduodata.com/'], + }, + name: '日榜', + maintainers: ['Gem1ni'], + handler, + url: 'data.guduodata.com/', +}; + +async function handler() { const now = dayjs().valueOf(); // yestoday const yestoday = dayjs().subtract(1, 'day').format('YYYY-MM-DD'); @@ -43,7 +66,7 @@ export default async (ctx) => { url: `${host}/show/datalist?type=DAILY&category=${category.toUpperCase()}&date=${yestoday}`, })) ); - ctx.set('data', { + return { title: `骨朵数据 - 日榜`, link: host, description: yestoday, @@ -63,5 +86,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/guduodata/maintainer.ts b/lib/routes/guduodata/maintainer.ts deleted file mode 100644 index dca9a628f..000000000 --- a/lib/routes/guduodata/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/daily': ['Gem1ni'], -}; diff --git a/lib/routes/guduodata/namespace.ts b/lib/routes/guduodata/namespace.ts new file mode 100644 index 000000000..e9e4d4dc0 --- /dev/null +++ b/lib/routes/guduodata/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '骨朵数据', + url: 'data.guduodata.com', +}; diff --git a/lib/routes/guduodata/radar.ts b/lib/routes/guduodata/radar.ts deleted file mode 100644 index efbf48124..000000000 --- a/lib/routes/guduodata/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'guduodata.com': { - _name: '骨朵数据', - data: [ - { - title: '日榜', - docs: 'https://docs.rsshub.app/routes/other#gu-duo-shu-ju', - source: ['/'], - target: '/guduodata/daily', - }, - ], - }, -}; diff --git a/lib/routes/guduodata/router.ts b/lib/routes/guduodata/router.ts deleted file mode 100644 index 16107c61f..000000000 --- a/lib/routes/guduodata/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/daily', './daily'); -}; diff --git a/lib/routes/gumroad/index.ts b/lib/routes/gumroad/index.ts index cab880e15..0a9006e4a 100644 --- a/lib/routes/gumroad/index.ts +++ b/lib/routes/gumroad/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,26 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:username/:products', + categories: ['shopping'], + example: '/gumroad/afkmaster/Eve10', + parameters: { username: 'username, can be found in URL', products: 'products name, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Products', + maintainers: ['Fatpandac'], + handler, + description: `\`https://afkmaster.gumroad.com/l/Eve10\` -> \`/gumroad/afkmaster/Eve10\``, +}; + +async function handler(ctx) { const username = ctx.req.param('username'); const products = ctx.req.param('products'); if (!isValidHost(username)) { @@ -34,9 +54,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { link: url, title: `Gumroad - ${userFullName}/${title}`, item, - }); -}; + }; +} diff --git a/lib/routes/gumroad/maintainer.ts b/lib/routes/gumroad/maintainer.ts deleted file mode 100644 index 2a9db6940..000000000 --- a/lib/routes/gumroad/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:username/:products': ['Fatpandac'], -}; diff --git a/lib/routes/gumroad/namespace.ts b/lib/routes/gumroad/namespace.ts new file mode 100644 index 000000000..2caaa7084 --- /dev/null +++ b/lib/routes/gumroad/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Gumroad', + url: 'gumroad.com', +}; diff --git a/lib/routes/gumroad/radar.ts b/lib/routes/gumroad/radar.ts deleted file mode 100644 index abb0e3116..000000000 --- a/lib/routes/gumroad/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'gumroad.com': { - _name: 'Gumroad', - '.': [ - { - title: '产品', - docs: 'https://docs.rsshub.app/routes/shopping#gumroad', - source: ['/l/:products'], - target: (params, url) => { - const username = new URL(url).host.split('.')[0]; - - return `/gumroad/${username}/${params.products}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/gumroad/router.ts b/lib/routes/gumroad/router.ts deleted file mode 100644 index f95a831de..000000000 --- a/lib/routes/gumroad/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:username/:products', './index'); -}; diff --git a/lib/routes/guokr/channel.ts b/lib/routes/guokr/channel.ts index 9d1ce8495..0884e35d4 100644 --- a/lib/routes/guokr/channel.ts +++ b/lib/routes/guokr/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -17,7 +18,32 @@ const channelMap = { pretty: 'beauty', }; -export default async (ctx) => { +export const route: Route = { + path: '/:channel', + categories: ['new-media'], + example: '/guokr/calendar', + parameters: { channel: '专栏类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guokr.com/'], + }, + name: '果壳网专栏', + maintainers: ['DHPO', 'hoilc'], + handler, + url: 'guokr.com/', + description: `| 物种日历 | 吃货研究所 | 美丽也是技术活 | + | -------- | ---------- | -------------- | + | calendar | institute | beauty |`, +}; + +async function handler(ctx) { const channel = channelMap[ctx.req.param('channel')] ?? ctx.req.param('channel'); const response = await got(`https://www.guokr.com/apis/minisite/article.json?retrieve_type=by_wx&channel_key=${channel}&offset=0&limit=10`); @@ -40,9 +66,9 @@ export default async (ctx) => { })) ); - ctx.set('data', { + return { title: `果壳网 ${channel_name}`, link: channel_url, item: result, - }); -}; + }; +} diff --git a/lib/routes/guokr/maintainer.ts b/lib/routes/guokr/maintainer.ts deleted file mode 100644 index a5b4affea..000000000 --- a/lib/routes/guokr/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/scientific': ['alphardex', 'nczitzk'], - '/:channel': ['DHPO', 'hoilc'], -}; diff --git a/lib/routes/guokr/namespace.ts b/lib/routes/guokr/namespace.ts new file mode 100644 index 000000000..afd61d446 --- /dev/null +++ b/lib/routes/guokr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '果壳网', + url: 'guokr.com', +}; diff --git a/lib/routes/guokr/radar.ts b/lib/routes/guokr/radar.ts deleted file mode 100644 index 057a1cd00..000000000 --- a/lib/routes/guokr/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'guokr.com': { - _name: '果壳网', - '.': [ - { - title: '科学人', - docs: 'https://docs.rsshub.app/routes/new-media#guo-ke-wang-ke-xue-ren', - source: ['/scientific', '/'], - target: '/guokr/scientific', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#guo-ke-wang-zhuan-lan', - source: ['/'], - target: '/guokr/:channel', - }, - ], - }, -}; diff --git a/lib/routes/guokr/router.ts b/lib/routes/guokr/router.ts deleted file mode 100644 index ff2c4cd3b..000000000 --- a/lib/routes/guokr/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/scientific', './scientific'); - router.get('/:channel', './channel'); -}; diff --git a/lib/routes/guokr/scientific.ts b/lib/routes/guokr/scientific.ts index c8784c505..f76da8c25 100644 --- a/lib/routes/guokr/scientific.ts +++ b/lib/routes/guokr/scientific.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/scientific', + categories: ['new-media'], + example: '/guokr/scientific', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['guokr.com/scientific', 'guokr.com/'], + }, + name: '科学人', + maintainers: ['alphardex', 'nczitzk'], + handler, + url: 'guokr.com/scientific', +}; + +async function handler() { const response = await got('https://www.guokr.com/apis/minisite/article.json?retrieve_type=by_subject&limit=20&offset=0'); const result = response.data.result; - ctx.set('data', { + return { title: '果壳网 科学人', link: 'https://www.guokr.com/scientific', description: '果壳网 科学人', @@ -27,5 +50,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/gxmzu/ai.ts b/lib/routes/gxmzu/ai.ts index 246f3ba88..f3bd4d26f 100644 --- a/lib/routes/gxmzu/ai.ts +++ b/lib/routes/gxmzu/ai.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://ai.gxmzu.edu.cn/index/tzgg.htm'; const host = 'https://ai.gxmzu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/aitzgg', + categories: ['university'], + example: '/gxmzu/aitzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ai.gxmzu.edu.cn/index/tzgg.htm', 'ai.gxmzu.edu.cn/'], + }, + name: '人工智能学院通知公告', + maintainers: ['real-jiakai'], + handler, + url: 'ai.gxmzu.edu.cn/index/tzgg.htm', +}; + +async function handler(ctx) { const out = await getNoticeList(ctx, url, host, 'a', '.timestyle55267', { title: '.titlestyle55269', content: '#vsb_content', date: '.timestyle55269', }); - ctx.set('data', { + return { title: '广西民族大学人工智能学院 -- 通知公告', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/gxmzu/lib.ts b/lib/routes/gxmzu/lib.ts index 5e299e876..25ae96776 100644 --- a/lib/routes/gxmzu/lib.ts +++ b/lib/routes/gxmzu/lib.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入got库,该库用来请求网页数据 import got from '@/utils/got'; @@ -13,7 +14,29 @@ const url = 'https://library.gxmzu.edu.cn/news/news_list.jsp?urltype=tree.TreeTe // 广西民大图书馆网址 const host = 'https://library.gxmzu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/libzxxx', + categories: ['university'], + example: '/gxmzu/libzxxx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['library.gxmzu.edu.cn/news/news_list.jsp', 'library.gxmzu.edu.cn/'], + }, + name: '图书馆最新消息', + maintainers: ['real-jiakai'], + handler, + url: 'library.gxmzu.edu.cn/news/news_list.jsp', +}; + +async function handler() { // 发起Http请求,获取网页数据 const response = await got(url); @@ -60,12 +83,12 @@ export default async (ctx) => { ); // 生成RSS源 - ctx.set('data', { + return { // 项目标题 title: '广西民族大学图书馆 -- 最新消息', // 项目链接 link: url, // items的内容 item: out, - }); -}; + }; +} diff --git a/lib/routes/gxmzu/maintainer.ts b/lib/routes/gxmzu/maintainer.ts deleted file mode 100644 index b5dcf8f42..000000000 --- a/lib/routes/gxmzu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/aitzgg': ['real-jiakai'], - '/libzxxx': ['real-jiakai'], - '/yjszsgg': ['real-jiakai'], -}; diff --git a/lib/routes/gxmzu/namespace.ts b/lib/routes/gxmzu/namespace.ts new file mode 100644 index 000000000..378bbaa0a --- /dev/null +++ b/lib/routes/gxmzu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广西民族大学', + url: 'ai.gxmzu.edu.cn', +}; diff --git a/lib/routes/gxmzu/radar.ts b/lib/routes/gxmzu/radar.ts deleted file mode 100644 index 68c8dabd2..000000000 --- a/lib/routes/gxmzu/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'gxmzu.edu.cn': { - _name: '广西民族大学', - ai: [ - { - title: '人工智能学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#guang-xi-min-zu-da-xue-ren-gong-zhi-neng-xue-yuan-tong-zhi-gong-gao', - source: ['/index/tzgg.htm', '/'], - target: '/gxmzu/aitzgg', - }, - ], - library: [ - { - title: '图书馆最新消息', - docs: 'https://docs.rsshub.app/routes/unversity#guang-xi-min-zu-da-xue-tu-shu-guan-zui-xin-xiao-xi', - source: ['/news/news_list.jsp', '/'], - target: '/gxmzu/libzxxx', - }, - ], - yjs: [ - { - title: '研究生院招生公告', - docs: 'https://docs.rsshub.app/routes/university#guang-xi-min-zu-da-xue-yan-jiu-sheng-yuan-zhao-sheng-gong-gao', - source: ['/tzgg/zsgg.htm', '/'], - target: '/gxmzu/yjszsgg', - }, - ], - }, -}; diff --git a/lib/routes/gxmzu/router.ts b/lib/routes/gxmzu/router.ts deleted file mode 100644 index 32fd0f8cb..000000000 --- a/lib/routes/gxmzu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/aitzgg', './ai'); - router.get('/libzxxx', './lib'); - router.get('/yjszsgg', './yjs'); -}; diff --git a/lib/routes/gxmzu/yjs.ts b/lib/routes/gxmzu/yjs.ts index c42a91e92..4ba55582d 100644 --- a/lib/routes/gxmzu/yjs.ts +++ b/lib/routes/gxmzu/yjs.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://yjs.gxmzu.edu.cn/tzgg/zsgg.htm'; const host = 'https://yjs.gxmzu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/yjszsgg', + categories: ['university'], + example: '/gxmzu/yjszsgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yjs.gxmzu.edu.cn/tzgg/zsgg.htm', 'yjs.gxmzu.edu.cn/'], + }, + name: '研究生院招生公告', + maintainers: ['real-jiakai'], + handler, + url: 'yjs.gxmzu.edu.cn/tzgg/zsgg.htm', +}; + +async function handler(ctx) { const out = await getNoticeList(ctx, url, host, 'a', '.timestyle55267', { title: '.titlestyle55269', content: '#vsb_content', date: '.timestyle55269', }); - ctx.set('data', { + return { title: '广西民族大学研究生院 -- 招生公告', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/gzdaily/app.ts b/lib/routes/gzdaily/app.ts index 526955c70..05e135a9d 100644 --- a/lib/routes/gzdaily/app.ts +++ b/lib/routes/gzdaily/app.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,38 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/app/:column?', + categories: ['traditional-media'], + example: '/gzdaily/app/74', + parameters: { column: '栏目 ID,点击对应栏目后在地址栏找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '客户端', + maintainers: ['TimWu007'], + handler, + description: `:::tip + 在北京时间深夜可能无法获取内容。 + ::: + + 常用栏目 ID: + + | 栏目名 | ID | + | ------ | ---- | + | 首页 | 74 | + | 时局 | 374 | + | 广州 | 371 | + | 大湾区 | 397 | + | 城区 | 2980 |`, +}; + +async function handler(ctx) { const column = ctx.req.param('column') ?? 74; const currentUrl = `https://app.gzdaily.cn/app_if/getArticles?columnId=${column}&page=1`; @@ -49,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `广州日报客户端 - ${colName}`, link: `https://www.gzdaily.cn/amucsite/web/index.html#/home/${column}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/gzdaily/maintainer.ts b/lib/routes/gzdaily/maintainer.ts deleted file mode 100644 index 73f628646..000000000 --- a/lib/routes/gzdaily/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/app/:column?': ['TimWu007'], -}; diff --git a/lib/routes/gzdaily/namespace.ts b/lib/routes/gzdaily/namespace.ts new file mode 100644 index 000000000..967219dc8 --- /dev/null +++ b/lib/routes/gzdaily/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广州日报', + url: 'gzdaily.cn', +}; diff --git a/lib/routes/gzdaily/radar.ts b/lib/routes/gzdaily/radar.ts deleted file mode 100644 index b786c0fc1..000000000 --- a/lib/routes/gzdaily/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'gzdaily.cn': { - _name: '广州日报', - '.': [ - { - title: '客户端', - docs: 'https://docs.rsshub.app/routes/traditional-media#guang-zhou-ri-bao', - source: ['/'], - }, - ], - }, -}; diff --git a/lib/routes/gzdaily/router.ts b/lib/routes/gzdaily/router.ts deleted file mode 100644 index 406aaa26e..000000000 --- a/lib/routes/gzdaily/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/app/:column?', './app'); -}; diff --git a/lib/routes/gzhu/maintainer.ts b/lib/routes/gzhu/maintainer.ts deleted file mode 100644 index 3e0d90ed1..000000000 --- a/lib/routes/gzhu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/gzhu/namespace.ts b/lib/routes/gzhu/namespace.ts new file mode 100644 index 000000000..e9a2989cf --- /dev/null +++ b/lib/routes/gzhu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广州大学', + url: 'yjsy.gzhu.edu.cn', +}; diff --git a/lib/routes/gzhu/radar.ts b/lib/routes/gzhu/radar.ts deleted file mode 100644 index b59062baf..000000000 --- a/lib/routes/gzhu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gzhu.edu.cn': { - _name: '广州大学', - yjsy: [ - { - title: '研究生院招生动态', - docs: 'https://docs.rsshub.app/routes/university#guang-zhou-da-xue', - source: ['/zsxx/zsdt/zsdt.htm', '/'], - target: '/gzhu/yjs', - }, - ], - }, -}; diff --git a/lib/routes/gzhu/router.ts b/lib/routes/gzhu/router.ts deleted file mode 100644 index 870ee6756..000000000 --- a/lib/routes/gzhu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/gzhu/yjs.ts b/lib/routes/gzhu/yjs.ts index 39012a6af..a3a873d1e 100644 --- a/lib/routes/gzhu/yjs.ts +++ b/lib/routes/gzhu/yjs.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/gzhu/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yjsy.gzhu.edu.cn/zsxx/zsdt/zsdt.htm', 'yjsy.gzhu.edu.cn/'], + }, + name: '研究生院招生动态', + maintainers: ['shengmaosu'], + handler, + url: 'yjsy.gzhu.edu.cn/zsxx/zsdt/zsdt.htm', +}; + +async function handler() { const link = 'https://yjsy.gzhu.edu.cn/zsxx/zsdt/zsdt.htm'; const response = await got(link, { https: { @@ -12,7 +35,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('.picnews_cont li'); - ctx.set('data', { + return { title: '广州大学研究生院', link, description: '广州大学研招网通知公告', @@ -27,5 +50,5 @@ export default async (ctx) => { pubDate: parseDate(a.text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/hackernews/index.ts b/lib/routes/hackernews/index.ts index 46c8a6335..ef6f25ef9 100644 --- a/lib/routes/hackernews/index.ts +++ b/lib/routes/hackernews/index.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:section?/:type?/:user?', + categories: ['programming'], + example: '/hackernews/threads/comments_list/dang', + parameters: { section: '内容分区,见上表,默认为 `index`', type: '链接类型,见上表,默认为 `sources`', user: '设定用户,只在 `threads` 和 `submitted` 分区有效' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ycombinator.com/:section', 'ycombinator.com/'], + }, + name: '用户', + maintainers: ['nczitzk', 'xie-dongping'], + handler, + description: `订阅特定用户的内容`, +}; + +async function handler(ctx) { const section = ctx.req.param('section') ?? 'index'; const type = ctx.req.param('type') ?? 'sources'; const user = ctx.req.param('user') ?? ''; @@ -105,9 +128,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hackernews/maintainer.ts b/lib/routes/hackernews/maintainer.ts deleted file mode 100644 index 3613a59f0..000000000 --- a/lib/routes/hackernews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:section?/:type?/:user?': ['nczitzk', 'xie-dongping'], -}; diff --git a/lib/routes/hackernews/namespace.ts b/lib/routes/hackernews/namespace.ts new file mode 100644 index 000000000..fc27645c1 --- /dev/null +++ b/lib/routes/hackernews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hacker News', + url: 'ycombinator.com', +}; diff --git a/lib/routes/hackernews/radar.ts b/lib/routes/hackernews/radar.ts deleted file mode 100644 index 0a3d7c27e..000000000 --- a/lib/routes/hackernews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ycombinator.com': { - _name: 'Hacker News', - '.': [ - { - title: 'Section', - docs: 'https://docs.rsshub.app/routes/programming#hacker-news', - source: ['/:section', '/'], - target: '/hackernews/:section?/:type?/:user?', - }, - ], - }, -}; diff --git a/lib/routes/hackernews/router.ts b/lib/routes/hackernews/router.ts deleted file mode 100644 index 371eaf725..000000000 --- a/lib/routes/hackernews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:section?/:type?/:user?', './index'); -}; diff --git a/lib/routes/hackertalk/index.ts b/lib/routes/hackertalk/index.ts index f3a766fe7..7f9cf32bd 100644 --- a/lib/routes/hackertalk/index.ts +++ b/lib/routes/hackertalk/index.ts @@ -1,16 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt(); -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['hackertalk.net/'], + target: '', + }, + name: 'Unknown', + maintainers: ['hyoban'], + handler, + url: 'hackertalk.net/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ?? 25; const response = await got(`https://api.hackertalk.net/v1/posts?limit=${limit}&orderBy=time`); const data = response.data.data; - ctx.set('data', { + return { title: '黑客说的最新帖子', link: 'https://hackertalk.net/?tab=new', description: '黑客说 - 技术驱动优质交流', @@ -20,5 +33,5 @@ export default async (ctx) => { pubDate: parseDate(item.createdAt), link: `https://hackertalk.net/posts/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/hackertalk/maintainer.ts b/lib/routes/hackertalk/maintainer.ts deleted file mode 100644 index e9d91d212..000000000 --- a/lib/routes/hackertalk/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['hyoban'], -}; diff --git a/lib/routes/hackertalk/namespace.ts b/lib/routes/hackertalk/namespace.ts new file mode 100644 index 000000000..1e9f83693 --- /dev/null +++ b/lib/routes/hackertalk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HACKER TALK 黑客说', + url: 'hackertalk.net', +}; diff --git a/lib/routes/hackertalk/radar.ts b/lib/routes/hackertalk/radar.ts deleted file mode 100644 index b5672d462..000000000 --- a/lib/routes/hackertalk/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hackertalk.net': { - _name: 'Hacker Talk 黑客说', - '.': [ - { - title: '最新的帖子', - docs: 'https://docs.rsshub.app/routes/bbs#hacker-talk-hei-ke-shuo', - source: ['/'], - target: '/hackertalk', - }, - ], - }, -}; diff --git a/lib/routes/hackertalk/router.ts b/lib/routes/hackertalk/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/hackertalk/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/hacking8/index.ts b/lib/routes/hacking8/index.ts index 4cad38f5f..f572f9705 100644 --- a/lib/routes/hacking8/index.ts +++ b/lib/routes/hacking8/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['programming'], + example: '/hacking8', + parameters: { category: '分类,见下表,默认为最近更新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hacking8.com/index/:category', 'hacking8.com/'], + }, + name: '信息流', + maintainers: ['nczitzk'], + handler, + description: `| 推荐 | 最近更新 | 漏洞 / PoC 监控 | PDF | + | ----- | -------- | --------------- | --- | + | likes | index | vul-poc | pdf |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'index'; const rootUrl = 'https://i.hacking8.com'; @@ -37,9 +62,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Hacking8 安全信息流 - ${$('div.btn-group a.btn-primary').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hacking8/maintainer.ts b/lib/routes/hacking8/maintainer.ts deleted file mode 100644 index 4af42260e..000000000 --- a/lib/routes/hacking8/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/search/:keyword?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/hacking8/namespace.ts b/lib/routes/hacking8/namespace.ts new file mode 100644 index 000000000..fed1fe3b4 --- /dev/null +++ b/lib/routes/hacking8/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hacking8', + url: 'hacking8.com', +}; diff --git a/lib/routes/hacking8/radar.ts b/lib/routes/hacking8/radar.ts deleted file mode 100644 index 7d37564a5..000000000 --- a/lib/routes/hacking8/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'hacking8.com': { - _name: 'Hacking8', - '.': [ - { - title: '信息流', - docs: 'https://docs.rsshub.app/routes/programming#hacking8-xin-xi-liu', - source: ['/index/:category', '/'], - target: '/hacking8/:category?', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/programming#hacking8-sou-suo', - source: ['/search', '/'], - target: (params, url) => `/hacking8/search/${new URL(url).searchParams.get('q')}`, - }, - ], - }, -}; diff --git a/lib/routes/hacking8/router.ts b/lib/routes/hacking8/router.ts deleted file mode 100644 index c5c0b0a45..000000000 --- a/lib/routes/hacking8/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/search/:keyword?', './search'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/hacking8/search.ts b/lib/routes/hacking8/search.ts index 6c405c437..48f7282a6 100644 --- a/lib/routes/hacking8/search.ts +++ b/lib/routes/hacking8/search.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword?', + categories: ['programming'], + example: '/hacking8/search/rsshub', + parameters: { keyword: '关键字,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hacking8.com/index/:category', 'hacking8.com/'], + target: '/:category?', + }, + name: '搜索', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword') ?? ''; const rootUrl = 'https://i.hacking8.com'; @@ -37,12 +60,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Hacking8 安全信息流 - ${$('title') .text() .replaceAll(/总数:\d+/g, '') .trim()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hackmd/maintainer.ts b/lib/routes/hackmd/maintainer.ts deleted file mode 100644 index a4bbb4308..000000000 --- a/lib/routes/hackmd/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/profile/:path': ['Yukaii', 'kaiix'], -}; diff --git a/lib/routes/hackmd/namespace.ts b/lib/routes/hackmd/namespace.ts new file mode 100644 index 000000000..f463a6b7d --- /dev/null +++ b/lib/routes/hackmd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HackMD', + url: 'hackmd.io', +}; diff --git a/lib/routes/hackmd/profile.ts b/lib/routes/hackmd/profile.ts index e1866f4d2..8797a5dbb 100644 --- a/lib/routes/hackmd/profile.ts +++ b/lib/routes/hackmd/profile.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/profile/:path', + categories: ['programming'], + example: '/hackmd/profile/hackmd', + parameters: { path: 'userpath or teampath' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Profile', + maintainers: ['Yukaii', 'kaiix'], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const response = await got({ @@ -10,7 +29,7 @@ export default async (ctx) => { const data = response.data; const profile = data.user || data.team; - ctx.set('data', { + return { title: `${profile.name}'s Profile`, link: `https://hackmd.io/@${path}`, description: `${profile.name}'s profile on HackMD`, @@ -20,5 +39,5 @@ export default async (ctx) => { pubDate: new Date(note.publishedAt).toUTCString(), link: `https://hackmd.io/@${path}/${note.permalink || note.shortId}`, })), - }); -}; + }; +} diff --git a/lib/routes/hackmd/radar.ts b/lib/routes/hackmd/radar.ts deleted file mode 100644 index e9391c8de..000000000 --- a/lib/routes/hackmd/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hackmd.io': { - _name: 'HackMD', - '.': [ - { - title: 'Profile', - docs: 'https://docs.rsshub.app/routes/programming#hackmd', - source: ['/:profile'], - target: (params) => `/hackmd/profile/${params.replace('@', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/hackmd/router.ts b/lib/routes/hackmd/router.ts deleted file mode 100644 index 8d194f317..000000000 --- a/lib/routes/hackmd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/profile/:path', './profile'); -}; diff --git a/lib/routes/hackyournews/index.ts b/lib/routes/hackyournews/index.ts index 8e6cf2f50..c85495de9 100644 --- a/lib/routes/hackyournews/index.ts +++ b/lib/routes/hackyournews/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; // Require necessary modules import got from '@/utils/got'; // a customised got import { load } from 'cheerio'; // an HTML parser with a jQuery-like API import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['hackyournews.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['ftiasch'], + handler, + url: 'hackyournews.com/', +}; + +async function handler() { const baseUrl = 'https://hackyournews.com'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -42,9 +55,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: 'Index', link: baseUrl, item, - }); -}; + }; +} diff --git a/lib/routes/hackyournews/maintainer.ts b/lib/routes/hackyournews/maintainer.ts deleted file mode 100644 index 6bbc402c4..000000000 --- a/lib/routes/hackyournews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['ftiasch'], -}; diff --git a/lib/routes/hackyournews/namespace.ts b/lib/routes/hackyournews/namespace.ts new file mode 100644 index 000000000..ea4ca5b05 --- /dev/null +++ b/lib/routes/hackyournews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HackYourNews', + url: 'hackyournews.com', +}; diff --git a/lib/routes/hackyournews/radar.ts b/lib/routes/hackyournews/radar.ts deleted file mode 100644 index b39b2f5f3..000000000 --- a/lib/routes/hackyournews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hackyournews.com': { - _name: 'HackYourNews', - '.': [ - { - title: 'Index', - docs: 'https://docs.rsshub.app/routes/programming#hack-your-news', - source: ['/'], - target: '/hackyournews', - }, - ], - }, -}; diff --git a/lib/routes/hackyournews/router.ts b/lib/routes/hackyournews/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/hackyournews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/hafu/maintainer.ts b/lib/routes/hafu/maintainer.ts deleted file mode 100644 index 85488a1b1..000000000 --- a/lib/routes/hafu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:tpye?': ['WenPeiTung'], -}; diff --git a/lib/routes/hafu/namespace.ts b/lib/routes/hafu/namespace.ts new file mode 100644 index 000000000..a6e45e1a9 --- /dev/null +++ b/lib/routes/hafu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '河南财政金融学院', + url: 'www.hafu.edu.cn', +}; diff --git a/lib/routes/hafu/news.ts b/lib/routes/hafu/news.ts index fae6da36e..a4f4cccfb 100644 --- a/lib/routes/hafu/news.ts +++ b/lib/routes/hafu/news.ts @@ -1,15 +1,37 @@ +import { Route } from '@/types'; import parseList from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/hafu/news/ggtz', + parameters: { type: '分类,见下表(默认为 `ggtz`)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '河南财政金融学院', + maintainers: [], + handler, + description: `| 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 | + | ------------ | -------------- | ------------------ | + | ggtz | jwc | zsjyc |`, +}; + +async function handler(ctx) { // set default router type const type = ctx.req.param('type') ?? 'ggtz'; const { link, title, resultList } = await parseList(ctx, type); - ctx.set('data', { + return { title, link, description: '河南财政金融学院 - 公告通知', item: resultList, - }); -}; + }; +} diff --git a/lib/routes/hafu/radar.ts b/lib/routes/hafu/radar.ts deleted file mode 100644 index d675ed3e4..000000000 --- a/lib/routes/hafu/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'hafu.edu.cn': { - _name: '河南财政金融学院', - www: [ - { - title: '河南财政金融学院 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#he-nan-cai-zheng-jin-rong-xue-yuan', - source: '/*', - target: (params, url) => { - if (url.indexOf('www')) { - return '/hafu/news/ggtz'; - } - if (url.indexOf('jwc')) { - return '/hafu/news/jwc'; - } - if (url.indexOf('zsjyc')) { - return '/hafu/news/zsjyc'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/hafu/router.ts b/lib/routes/hafu/router.ts deleted file mode 100644 index eb19f8f1f..000000000 --- a/lib/routes/hafu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/hakkatv/maintainer.ts b/lib/routes/hakkatv/maintainer.ts deleted file mode 100644 index 32ccc6fa2..000000000 --- a/lib/routes/hakkatv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['TonyRL'], -}; diff --git a/lib/routes/hakkatv/namespace.ts b/lib/routes/hakkatv/namespace.ts new file mode 100644 index 000000000..d6e225747 --- /dev/null +++ b/lib/routes/hakkatv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '客家電視台', + url: 'hakkatv.org.tw', +}; diff --git a/lib/routes/hakkatv/radar.ts b/lib/routes/hakkatv/radar.ts deleted file mode 100644 index 55bd487c2..000000000 --- a/lib/routes/hakkatv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hakkatv.org.tw': { - _name: '客家電視台', - '.': [ - { - title: '新聞首頁 - 客家電視台', - docs: 'https://docs.rsshub.app/routes/traditional-media#ke-jia-dian-shi-tai', - source: '/news', - target: '/hakkatv/news', - }, - ], - }, -}; diff --git a/lib/routes/hakkatv/router.ts b/lib/routes/hakkatv/router.ts deleted file mode 100644 index 10f00d72d..000000000 --- a/lib/routes/hakkatv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './type'); -}; diff --git a/lib/routes/hakkatv/type.ts b/lib/routes/hakkatv/type.ts index 480945028..096c60bc7 100644 --- a/lib/routes/hakkatv/type.ts +++ b/lib/routes/hakkatv/type.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +8,33 @@ const typeMap = ['hakka', 'political', 'medical', 'local', 'international']; const baseUrl = 'https://www.hakkatv.org.tw'; const apiUrl = 'https://api.hakkatv.org.tw'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['traditional-media'], + example: '/hakkatv/news', + parameters: { type: '新聞,見下表,留空為全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hakkatv.org.tw/news'], + target: '/news', + }, + name: '新聞首頁', + maintainers: ['TonyRL'], + handler, + url: 'hakkatv.org.tw/news', + description: `| 客家焦點 | 政經要聞 | 民生醫療 | 地方風采 | 國際萬象 | + | -------- | --------- | -------- | -------- | ------------- | + | hakka | political | medical | local | international |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const allData = type @@ -55,11 +82,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '新聞首頁 - 客家電視台', description: '客家電視是屬於全民、以至於全世界客家族群的頻道,亦是為傳播客家文化而存在,定位為「全體客家族群之媒體」。', link: `${baseUrl}/news`, language: 'zh-TW', item: items, - }); -}; + }; +} diff --git a/lib/routes/hameln/chapter.ts b/lib/routes/hameln/chapter.ts index 206a92740..4c1fa092a 100644 --- a/lib/routes/hameln/chapter.ts +++ b/lib/routes/hameln/chapter.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/hameln/chapter/264928', + parameters: { id: 'Novel id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['syosetu.org/novel/:id'], + }, + name: 'chapter', + maintainers: ['huangliangshusheng'], + handler, + description: `Eg: [https://syosetu.org/novel/264928](https://syosetu.org/novel/264928)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 5; const link = `https://syosetu.org/novel/${id}`; @@ -38,14 +61,14 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, description, link, language: 'ja', item: item_list, - }); -}; + }; +} const get = async (url) => { const response = await got({ diff --git a/lib/routes/hameln/maintainer.ts b/lib/routes/hameln/maintainer.ts deleted file mode 100644 index 9a546de2a..000000000 --- a/lib/routes/hameln/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/chapter/:id': ['huangliangshusheng'], -}; diff --git a/lib/routes/hameln/namespace.ts b/lib/routes/hameln/namespace.ts new file mode 100644 index 000000000..b9c3ad1ea --- /dev/null +++ b/lib/routes/hameln/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'hameln', + url: 'syosetu.org', +}; diff --git a/lib/routes/hameln/radar.ts b/lib/routes/hameln/radar.ts deleted file mode 100644 index e5d5673f2..000000000 --- a/lib/routes/hameln/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'syosetu.org': { - _name: 'hameln', - '.': [ - { - title: '章节更新', - docs: 'https://docs.rsshub.app/routes/reading#hameln-zhang-jie-geng-xin', - source: ['/novel/:id'], - target: '/hameln/chapter/:id', - }, - ], - }, -}; diff --git a/lib/routes/hameln/router.ts b/lib/routes/hameln/router.ts deleted file mode 100644 index da9b4fd23..000000000 --- a/lib/routes/hameln/router.ts +++ /dev/null @@ -1 +0,0 @@ -export default (router) => router.get('/chapter/:id', './chapter.js'); diff --git a/lib/routes/harvard/health/blog.ts b/lib/routes/harvard/health/blog.ts index 398bea22a..c75fd9ca2 100644 --- a/lib/routes/harvard/health/blog.ts +++ b/lib/routes/harvard/health/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/health/blog', + categories: ['new-media'], + example: '/harvard/health/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.health.harvard.edu/blog'], + }, + name: 'Health Blog', + maintainers: ['nczitzk'], + handler, + url: 'www.health.harvard.edu/blog', +}; + +async function handler() { const rootUrl = 'https://www.health.harvard.edu'; const currentUrl = `${rootUrl}/blog`; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Harvard Health Blog', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/harvard/maintainer.ts b/lib/routes/harvard/maintainer.ts deleted file mode 100644 index f18f5b849..000000000 --- a/lib/routes/harvard/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/health/blog': ['nczitzk'], -}; diff --git a/lib/routes/harvard/namespace.ts b/lib/routes/harvard/namespace.ts new file mode 100644 index 000000000..7442e99dd --- /dev/null +++ b/lib/routes/harvard/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Harvard Health Publishing', + url: 'www.health.harvard.edu', +}; diff --git a/lib/routes/harvard/radar.ts b/lib/routes/harvard/radar.ts deleted file mode 100644 index 9ba518e90..000000000 --- a/lib/routes/harvard/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'harvard.edu': { - _name: 'Harvard University', - 'www.health': [ - { - title: 'Health Blog', - docs: 'https://docs.rsshub.app/routes/new-media#harvard-health-publishing', - source: ['/blog'], - target: '/harvard/health/blog', - }, - ], - }, -}; diff --git a/lib/routes/harvard/router.ts b/lib/routes/harvard/router.ts deleted file mode 100644 index d0c4dcbdf..000000000 --- a/lib/routes/harvard/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/health/blog', './health/blog'); -}; diff --git a/lib/routes/hashnode/blog.ts b/lib/routes/hashnode/blog.ts index f29697e9f..aad3748fe 100644 --- a/lib/routes/hashnode/blog.ts +++ b/lib/routes/hashnode/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,32 @@ import { parseDate } from '@/utils/parse-date'; const baseApiUrl = 'https://api.hashnode.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:username', + categories: ['blog'], + example: '/hashnode/blog/inklings', + parameters: { username: '博主名称,用户头像 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hashnode.dev/'], + }, + name: '用户博客', + maintainers: ['hnrainll'], + handler, + url: 'hashnode.dev/', + description: `:::tip + username 为博主用户名,而非\`xxx.hashnode.dev\`中\`xxx\`所代表的 blog 地址。 + :::`, +}; + +async function handler(ctx) { const username = ctx.req.param('username'); if (!username) { return; @@ -47,7 +73,7 @@ export default async (ctx) => { } const list = publication.posts; - ctx.set('data', { + return { title: `Hashnode by ${username}`, link: userUrl, item: list @@ -61,5 +87,5 @@ export default async (ctx) => { link: `${userUrl}/${item.slug}`, })) .filter((item) => item !== ''), - }); -}; + }; +} diff --git a/lib/routes/hashnode/maintainer.ts b/lib/routes/hashnode/maintainer.ts deleted file mode 100644 index eceb92e0c..000000000 --- a/lib/routes/hashnode/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog/:username': ['hnrainll'], -}; diff --git a/lib/routes/hashnode/namespace.ts b/lib/routes/hashnode/namespace.ts new file mode 100644 index 000000000..eebedd1f9 --- /dev/null +++ b/lib/routes/hashnode/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'hashnode', + url: 'hashnode.dev', +}; diff --git a/lib/routes/hashnode/radar.ts b/lib/routes/hashnode/radar.ts deleted file mode 100644 index a746e6cf5..000000000 --- a/lib/routes/hashnode/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hashnode.dev': { - _name: 'hashnode', - '.': [ - { - title: 'Hashnode Blog', - docs: 'https://docs.rsshub.app/routes/blog#hashnode', - source: '/', - target: '/hashnode/blog/:username', - }, - ], - }, -}; diff --git a/lib/routes/hashnode/router.ts b/lib/routes/hashnode/router.ts deleted file mode 100644 index 529f278ed..000000000 --- a/lib/routes/hashnode/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:username', './blog'); -}; diff --git a/lib/routes/hbooker/chapter.ts b/lib/routes/hbooker/chapter.ts index a6b0014ab..66705026e 100644 --- a/lib/routes/hbooker/chapter.ts +++ b/lib/routes/hbooker/chapter.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/hbooker/chapter/100113279', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hbooker.com/book/:id'], + }, + name: '章节', + maintainers: ['keocheung'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 10; @@ -37,11 +59,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `欢乐书客 ${$('div.book-title h1').text()}`, link: `${baseUrl}/book/${id}`, description: $('div.book-desc').text(), image: $('div.book-cover img').attr('src'), item: items, - }); -}; + }; +} diff --git a/lib/routes/hbooker/maintainer.ts b/lib/routes/hbooker/maintainer.ts deleted file mode 100644 index a6a52ebce..000000000 --- a/lib/routes/hbooker/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/chapter/:id': ['keocheung'], -}; diff --git a/lib/routes/hbooker/namespace.ts b/lib/routes/hbooker/namespace.ts new file mode 100644 index 000000000..340a244c6 --- /dev/null +++ b/lib/routes/hbooker/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '欢乐书客', + url: 'hbooker.com', +}; diff --git a/lib/routes/hbooker/radar.ts b/lib/routes/hbooker/radar.ts deleted file mode 100644 index 8cf0044f3..000000000 --- a/lib/routes/hbooker/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hbooker.com': { - _name: '欢乐书客', - '.': [ - { - title: '章节', - docs: 'https://docs.rsshub.app/routes/reading#huan-le-shu-ke', - source: '/book/:id', - target: '/hbooker/chapter/:id', - }, - ], - }, -}; diff --git a/lib/routes/hbooker/router.ts b/lib/routes/hbooker/router.ts deleted file mode 100644 index 817fef3dd..000000000 --- a/lib/routes/hbooker/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/chapter/:id', './chapter'); -}; diff --git a/lib/routes/hbr/maintainer.ts b/lib/routes/hbr/maintainer.ts deleted file mode 100644 index 25d20183c..000000000 --- a/lib/routes/hbr/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:topic?/:type?': ['nczitzk'], -}; diff --git a/lib/routes/hbr/namespace.ts b/lib/routes/hbr/namespace.ts new file mode 100644 index 000000000..d35faf289 --- /dev/null +++ b/lib/routes/hbr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Harvard Business Review', + url: 'hbr.org', +}; diff --git a/lib/routes/hbr/radar.ts b/lib/routes/hbr/radar.ts deleted file mode 100644 index 75090d812..000000000 --- a/lib/routes/hbr/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hbr.org': { - _name: 'Harvard Business Review', - '.': [ - { - title: 'Topic', - docs: 'https://docs.rsshub.app/routes/new-media#harvard-business-review-topic', - source: ['/topic/:topic?', '/'], - target: '/hbr/topic/:topic?/:type?', - }, - ], - }, -}; diff --git a/lib/routes/hbr/router.ts b/lib/routes/hbr/router.ts deleted file mode 100644 index 15a0c870d..000000000 --- a/lib/routes/hbr/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:topic?/:type?', './topic'); -}; diff --git a/lib/routes/hbr/topic.ts b/lib/routes/hbr/topic.ts index a0d71ede8..88168531a 100644 --- a/lib/routes/hbr/topic.ts +++ b/lib/routes/hbr/topic.ts @@ -1,9 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic?/:type?', + categories: ['new-media'], + example: '/hbr/topic/leadership', + parameters: { topic: 'Topic, can be found in URL, Leadership by default', type: 'Type, see below, Latest by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hbr.org/topic/:topic?', 'hbr.org/'], + }, + name: 'Topic', + maintainers: ['nczitzk'], + handler, + description: `| LATEST | POPULAR | FROM THE STORE | FOR YOU | + | ------ | ------- | -------------- | ------- | + | Latest | Popular | From the Store | For You | + + :::tip + Click here to view [All Topics](https://hbr.org/topics) + :::`, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic') ?? 'leadership'; const type = ctx.req.param('type') ?? 'Latest'; @@ -49,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('title').eq(0).text()} - ${type}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hdu/cs/notice.ts b/lib/routes/hdu/cs/notice.ts index cc34ba853..5706537b6 100644 --- a/lib/routes/hdu/cs/notice.ts +++ b/lib/routes/hdu/cs/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -29,7 +30,29 @@ const getSingleRecord = async () => { ); }; -export default async (ctx) => { +export const route: Route = { + path: '/cs', + categories: ['university'], + example: '/hdu/cs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['computer.hdu.edu.cn/6738/list.htm'], + }, + name: '计算机学院 - 通知公告', + maintainers: ['legr4ndk'], + handler, + url: 'computer.hdu.edu.cn/6738/list.htm', +}; + +async function handler() { const items = await getSingleRecord(); const out = await Promise.all( items.map((item) => @@ -46,10 +69,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '杭电计算机-通知公告', description: '杭州电子科技大学计算机学院-通知公告', link: host, item: out, - }); -}; + }; +} diff --git a/lib/routes/hdu/cs/pg.ts b/lib/routes/hdu/cs/pg.ts index 16d9de1d3..ee5d064bf 100644 --- a/lib/routes/hdu/cs/pg.ts +++ b/lib/routes/hdu/cs/pg.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -29,7 +30,29 @@ const getSingleRecord = async () => { ); }; -export default async (ctx) => { +export const route: Route = { + path: '/cs/pg', + categories: ['university'], + example: '/hdu/cs/pg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['computer.hdu.edu.cn/6769/list.htm'], + }, + name: '计算机学院 - 研究生通知', + maintainers: ['legr4ndk'], + handler, + url: 'computer.hdu.edu.cn/6769/list.htm', +}; + +async function handler() { const items = await getSingleRecord(); const out = await Promise.all( items.map((item) => @@ -46,10 +69,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '杭电计算机-研究生通知', description: '杭州电子科技大学计算机学院-研究生教学通知', link: host, item: out, - }); -}; + }; +} diff --git a/lib/routes/hdu/maintainer.ts b/lib/routes/hdu/maintainer.ts deleted file mode 100644 index 06cb35fe2..000000000 --- a/lib/routes/hdu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/cs': ['legr4ndk'], - '/cs/pg': ['legr4ndk'], -}; diff --git a/lib/routes/hdu/namespace.ts b/lib/routes/hdu/namespace.ts new file mode 100644 index 000000000..6d7a81aec --- /dev/null +++ b/lib/routes/hdu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '杭州电子科技大学', + url: 'computer.hdu.edu.cn', +}; diff --git a/lib/routes/hdu/radar.ts b/lib/routes/hdu/radar.ts deleted file mode 100644 index 6065128f0..000000000 --- a/lib/routes/hdu/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'hdu.edu.cn': { - _name: '杭州电子科技大学', - computer: [ - { - title: '计算机学院 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#hang-zhou-dian-zi-ke-ji-da-xue', - source: '/6738/list.htm', - target: '/hdu/cs', - }, - { - title: '杭电计算机-研究生通知', - docs: 'https://docs.rsshub.app/routes/university#hang-zhou-dian-zi-ke-ji-da-xue', - source: '/6769/list.htm', - target: '/hdu/cs/pg', - }, - ], - }, -}; diff --git a/lib/routes/hdu/router.ts b/lib/routes/hdu/router.ts deleted file mode 100644 index 9f35887a3..000000000 --- a/lib/routes/hdu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - // 杭州电子科技大学 - router.get('/cs', './cs/notice'); - router.get('/cs/pg', './cs/pg'); -}; diff --git a/lib/routes/hebtv/maintainer.ts b/lib/routes/hebtv/maintainer.ts deleted file mode 100644 index 7bd4b9863..000000000 --- a/lib/routes/hebtv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/nbszxd': ['iamqiz', 'nczitzk'], -}; diff --git a/lib/routes/hebtv/namespace.ts b/lib/routes/hebtv/namespace.ts new file mode 100644 index 000000000..28188ddc0 --- /dev/null +++ b/lib/routes/hebtv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '河北网络广播电视台', + url: 'web.cmc.hebtv.com', +}; diff --git a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts index 272cda3d8..61e054546 100644 --- a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts +++ b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,29 @@ import * as path from 'node:path'; const baseUrl = 'https://web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml'; -export default async (ctx) => { +export const route: Route = { + path: '/nbszxd', + categories: ['traditional-media'], + example: '/hebtv/nbszxd', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml'], + }, + name: '农博士在行动', + maintainers: ['iamqiz', 'nczitzk'], + handler, + url: 'web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 40; const apiRootUrl = 'http://api.cmc.hebtv.com'; @@ -95,7 +118,7 @@ export default async (ctx) => { const author = description.split(/,/)[0]; const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: $('title').text(), link: baseUrl, @@ -109,5 +132,5 @@ export default async (ctx) => { itunes_author: author, itunes_category: 'News', allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/hebtv/radar.ts b/lib/routes/hebtv/radar.ts deleted file mode 100644 index 42a234ae9..000000000 --- a/lib/routes/hebtv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hebtv.com': { - _name: '河北网络广播电视台', - 'web.cmc': [ - { - title: '农博士在行动', - docs: 'https://docs.rsshub.app/routes/traditional-media#he-bei-wang-luo-guang-bo-dian-shi-tai', - source: '/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml', - target: '/hebtv/nbszxd', - }, - ], - }, -}; diff --git a/lib/routes/hebtv/router.ts b/lib/routes/hebtv/router.ts deleted file mode 100644 index 505874853..000000000 --- a/lib/routes/hebtv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/nbszxd', './nong-bo-shi-zai-xing-dong.js'); -}; diff --git a/lib/routes/hellobtc/information.ts b/lib/routes/hellobtc/information.ts index 18ca8ee30..dc3c7dfde 100644 --- a/lib/routes/hellobtc/information.ts +++ b/lib/routes/hellobtc/information.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,25 @@ const titleMap = { application: '应用', }; -export default async (ctx) => { +export const route: Route = { + path: '/information/:channel?', + categories: ['new-media'], + example: '/hellobtc/information/latest', + parameters: { channel: '类型,可填 `latest` 和 `application` 及最新和应用,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? 'latest'; const url = rootUrl; @@ -44,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `白话区块链 - 首页 ${titleMap[channel]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/hellobtc/kepu.ts b/lib/routes/hellobtc/kepu.ts index 740294fa7..7d8cf7728 100644 --- a/lib/routes/hellobtc/kepu.ts +++ b/lib/routes/hellobtc/kepu.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -28,7 +29,28 @@ const titleMap = { public_blockchain: '公链', }; -export default async (ctx) => { +export const route: Route = { + path: '/kepu/:channel?', + categories: ['new-media'], + example: '/hellobtc/kepu/latest', + parameters: { channel: '类型,见下表,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '科普', + maintainers: ['Fatpandac'], + handler, + description: `| latest | bitcoin | ethereum | defi | inter\_blockchain | mining | safety | satoshi\_nakomoto | public\_blockchain | + | ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ | + | 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? 'latest'; const url = `${rootUrl}/kepu.html`; @@ -57,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `白话区块链 - 科普 ${titleMap[channel]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/hellobtc/maintainer.ts b/lib/routes/hellobtc/maintainer.ts deleted file mode 100644 index 1da076088..000000000 --- a/lib/routes/hellobtc/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/information/:channel?': ['Fatpandac'], - '/news': ['Fatpandac'], - '/kepu/:channel?': ['Fatpandac'], -}; diff --git a/lib/routes/hellobtc/namespace.ts b/lib/routes/hellobtc/namespace.ts new file mode 100644 index 000000000..c6413f393 --- /dev/null +++ b/lib/routes/hellobtc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '白话区块链', + url: 'hellobtc.com', +}; diff --git a/lib/routes/hellobtc/news.ts b/lib/routes/hellobtc/news.ts index afb57d801..e10f38a05 100644 --- a/lib/routes/hellobtc/news.ts +++ b/lib/routes/hellobtc/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; const rootUrl = 'https://www.hellobtc.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/hellobtc/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hellobtc.com/news'], + }, + name: '快讯', + maintainers: ['Fatpandac'], + handler, + url: 'hellobtc.com/news', +}; + +async function handler() { const url = `${rootUrl}/news`; const response = await got(url); @@ -21,9 +44,9 @@ export default async (ctx) => { .filter(Boolean) .get(); - ctx.set('data', { + return { title: `白话区块链 - 快讯`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/hellobtc/radar.ts b/lib/routes/hellobtc/radar.ts deleted file mode 100644 index e5a6fd66c..000000000 --- a/lib/routes/hellobtc/radar.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default { - 'hellobtc.com': { - _name: '白话区块链', - '.': [ - { - title: '首页-最新', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/'], - target: '/hellobtc/information/latest', - }, - { - title: '首页-应用', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/'], - target: '/hellobtc/information/application', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/news'], - target: '/hellobtc/news', - }, - { - title: '科普-最新', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/latest', - }, - { - title: '科普-比特币', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/bitcoin', - }, - { - title: '科普-以太坊', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/ethereum', - }, - { - title: '科普-DeFi', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/defi', - }, - { - title: '科普-跨链', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/inter_blockchain', - }, - { - title: '科普-挖矿', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/mining', - }, - { - title: '科普-安全', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/safety', - }, - { - title: '科普-中本聪', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/satoshi_nakamoto', - }, - { - title: '科普-公链', - docs: 'https://docs.rsshub.app/routes/new-media#bai-hua-qu-kuai-lian', - source: ['/kepu.html'], - target: '/hellobtc/kepu/public_blockchain', - }, - ], - }, -}; diff --git a/lib/routes/hellobtc/router.ts b/lib/routes/hellobtc/router.ts deleted file mode 100644 index 147645105..000000000 --- a/lib/routes/hellobtc/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/information/:channel?', './information'); - router.get('/news', './news'); - router.get('/kepu/:channel?', './kepu'); -}; diff --git a/lib/routes/hellogithub/index.ts b/lib/routes/hellogithub/index.ts index a2f3aa849..7fe7b6b6c 100644 --- a/lib/routes/hellogithub/index.ts +++ b/lib/routes/hellogithub/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -13,7 +14,28 @@ const sorts = { last: '最近', }; -export default async (ctx) => { +export const route: Route = { + path: ['/article/:sort?/:id?', '/:sort?/:id?'], + categories: ['programming'], + example: '/hellogithub/article', + parameters: { sort: '排序方式,见下表,默认为 `hot`,即热门', id: '标签 id,可在对应标签页 URL 中找到,默认为全部标签' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['moke8', 'nczitzk'], + handler, + description: `| 热门 | 最近 | + | ---- | ---- | + | hot | last |`, +}; + +async function handler(ctx) { const sort = ctx.req.param('sort') ?? 'hot'; const id = ctx.req.param('id') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -98,9 +120,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `HelloGithub - ${sorts[sort]}${tag || ''}项目`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hellogithub/maintainer.ts b/lib/routes/hellogithub/maintainer.ts deleted file mode 100644 index b6d5f2467..000000000 --- a/lib/routes/hellogithub/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/article/:sort?/:id?': ['moke8', 'nczitzk'], - '/hot/:id?': ['nczitzk'], - '/last/:id?': ['nczitzk'], - '/month': ['moke8', 'nczitzk'], - '/ranking/:type?': ['moke8', 'nczitzk'], - '/report/:type?': ['nczitzk'], - '/volume': ['nczitzk', 'CaoMeiYouRen'], -}; diff --git a/lib/routes/hellogithub/namespace.ts b/lib/routes/hellogithub/namespace.ts new file mode 100644 index 000000000..e10d95fd9 --- /dev/null +++ b/lib/routes/hellogithub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HelloGitHub', + url: 'hellogithub.com', +}; diff --git a/lib/routes/hellogithub/radar.ts b/lib/routes/hellogithub/radar.ts deleted file mode 100644 index aa3a97ad2..000000000 --- a/lib/routes/hellogithub/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'hellogithub.com': { - _name: 'HelloGitHub', - '.': [ - { - title: '热门', - docs: 'https://docs.rsshub.app/routes/programming#hellogithub-re-men', - source: ['/'], - target: (params, url) => { - const sort = new URL(url).searchParams.get('sort_by'); - const id = new URL(url).searchParams.get('tid'); - return `/hellogithub${sort ? `/sort` : ''}${id ? `/id` : ''}`; - }, - }, - { - title: '最近', - docs: 'https://docs.rsshub.app/routes/programming#hellogithub-zui-jin', - source: ['/'], - target: (params, url) => { - const sort = new URL(url).searchParams.get('sort_by'); - const id = new URL(url).searchParams.get('tid'); - return `/hellogithub${sort ? `/sort` : ''}${id ? `/id` : ''}`; - }, - }, - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/programming#hellogithub-wen-zhang', - source: ['/'], - target: (params, url) => { - const sort = new URL(url).searchParams.get('sort_by'); - const id = new URL(url).searchParams.get('tid'); - return `/hellogithub/article${sort ? `/sort` : ''}${id ? `/id` : ''}`; - }, - }, - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/programming#hellogithub-pai-hang-bang', - source: ['/report/:type', '/'], - target: '/hellogithub/report/:type', - }, - { - title: '月刊', - docs: 'https://docs.rsshub.app/routes/programming#hellogithub-yue-kan', - source: ['/periodical/volume/:id', '/'], - target: '/hellogithub/volume', - }, - ], - }, -}; diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index cf6da0aa3..8b9398fa7 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,17 @@ const types = { 'db-engines': '数据库', }; -export default async (ctx) => { +export const route: Route = { + path: ['/ranking/:type?', '/report/:type?'], + name: 'Unknown', + maintainers: ['moke8', 'nczitzk'], + handler, + description: `| 编程语言 | 服务器 | 数据库 | + | -------- | -------- | ---------- | + | tiobe | netcraft | db-engines |`, +}; + +async function handler(ctx) { let type = ctx.req.param('type') ?? 'tiobe'; type = type === 'webserver' ? 'netcraft' : type === 'db' ? 'db-engines' : type; @@ -51,9 +62,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: `HelloGitHub - ${types[type]}排行榜`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hellogithub/router.ts b/lib/routes/hellogithub/router.ts deleted file mode 100644 index 551c7dc33..000000000 --- a/lib/routes/hellogithub/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/article/:sort?/:id?', './index'); - router.get('/month', './volume'); - router.get('/ranking/:type?', './report'); - router.get('/report/:type?', './report'); - router.get('/volume', './volume'); - router.get('/:sort?/:id?', './index'); -}; diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.ts index ff9e9db81..85a9ae5f3 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -14,7 +15,14 @@ art.defaults.imports.render = function (string) { return md.render(string); }; -export default async (ctx) => { +export const route: Route = { + path: ['/month', '/volume'], + name: 'Unknown', + maintainers: ['moke8', 'nczitzk'], + handler, +}; + +async function handler() { const rootUrl = 'https://hellogithub.com'; const apiUrl = 'https://api.hellogithub.com/v1/periodical/'; @@ -46,9 +54,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: 'HelloGithub - 月刊', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hex-rays/index.ts b/lib/routes/hex-rays/index.ts index f284b2b13..aee963a53 100644 --- a/lib/routes/hex-rays/index.ts +++ b/lib/routes/hex-rays/index.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['programming'], + example: '/hex-rays/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hex-rays.com/', 'hex-rays.com/blog'], + }, + name: 'Hex-Rays News', + maintainers: ['hellodword ', 'TonyRL'], + handler, + url: 'hex-rays.com/', +}; + +async function handler() { const link = 'https://www.hex-rays.com/blog/'; const response = await got.get(link); const $ = load(response.data); @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Hex-Rays Blog', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/hex-rays/maintainer.ts b/lib/routes/hex-rays/maintainer.ts deleted file mode 100644 index 65861b8e0..000000000 --- a/lib/routes/hex-rays/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['hellodword ', 'TonyRL'], -}; diff --git a/lib/routes/hex-rays/namespace.ts b/lib/routes/hex-rays/namespace.ts new file mode 100644 index 000000000..7c8e572e5 --- /dev/null +++ b/lib/routes/hex-rays/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hex-Rays', + url: 'hex-rays.com', +}; diff --git a/lib/routes/hex-rays/radar.ts b/lib/routes/hex-rays/radar.ts deleted file mode 100644 index 60587e5cc..000000000 --- a/lib/routes/hex-rays/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hex-rays.com': { - _name: 'Hex-Rays', - '.': [ - { - title: 'Hex-Rays News', - docs: 'https://docs.rsshub.app/routes/programming#hex-rays', - source: ['/', '/blog'], - target: '/hex-rays/news', - }, - ], - }, -}; diff --git a/lib/routes/hex-rays/router.ts b/lib/routes/hex-rays/router.ts deleted file mode 100644 index c037330e2..000000000 --- a/lib/routes/hex-rays/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './index'); -}; diff --git a/lib/routes/hicairo/maintainer.ts b/lib/routes/hicairo/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/hicairo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/hicairo/namespace.ts b/lib/routes/hicairo/namespace.ts new file mode 100644 index 000000000..412eb637b --- /dev/null +++ b/lib/routes/hicairo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: "HiFeng'Blog", + url: 'hicairo.com', +}; diff --git a/lib/routes/hicairo/radar.ts b/lib/routes/hicairo/radar.ts deleted file mode 100644 index b40eef4f2..000000000 --- a/lib/routes/hicairo/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hicairo.com': { - _name: "HiFeng'Blog", - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#hifeng-blog', - source: ['/'], - target: '/hicairo', - }, - ], - }, -}; diff --git a/lib/routes/hicairo/router.ts b/lib/routes/hicairo/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/hicairo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/hicairo/rss.ts b/lib/routes/hicairo/rss.ts index 1a2917f1f..4fabe500e 100644 --- a/lib/routes/hicairo/rss.ts +++ b/lib/routes/hicairo/rss.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['hicairo.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'hicairo.com/', +}; + +async function handler() { const currentUrl = 'https://www.hicairo.com'; const response = await got(`${currentUrl}/feed.php`); const $ = load(response.data, { xmlMode: true }); @@ -23,10 +36,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: title_main, description: description_main, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hinatazaka46/blog.ts b/lib/routes/hinatazaka46/blog.ts index 90bc5a0d3..8e40c16f1 100644 --- a/lib/routes/hinatazaka46/blog.ts +++ b/lib/routes/hinatazaka46/blog.ts @@ -1,10 +1,66 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.hinatazaka46.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:id?/:page?', + categories: ['new-media'], + example: '/hinatazaka46/blog', + parameters: { id: 'Member ID, see below, `all` by default', page: 'Page, `0` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Hinatazaka46 Blog 日向坂 46 博客', + maintainers: [], + handler, + description: `Member ID + + | Member ID | Name | + | --------- | ------------ | + | 2000 | 四期生リレー | + | 36 | 渡辺 莉奈 | + | 35 | 山下 葉留花 | + | 34 | 宮地 すみれ | + | 33 | 藤嶌 果歩 | + | 32 | 平岡 海月 | + | 31 | 平尾 帆夏 | + | 30 | 竹内 希来里 | + | 29 | 正源司 陽子 | + | 28 | 清水 理央 | + | 27 | 小西 夏菜実 | + | 26 | 岸 帆夏 | + | 25 | 石塚 瑶季 | + | 24 | 山口 陽世 | + | 23 | 森本 茉莉 | + | 22 | 髙橋 未来虹 | + | 21 | 上村 ひなの | + | 18 | 松田 好花 | + | 17 | 濱岸 ひより | + | 16 | 丹生 明里 | + | 15 | 富田 鈴花 | + | 14 | 小坂 菜緒 | + | 13 | 河田 陽菜 | + | 12 | 金村 美玖 | + | 11 | 東村 芽依 | + | 10 | 高本 彩花 | + | 9 | 高瀬 愛奈 | + | 8 | 佐々木 美玲 | + | 7 | 佐々木 久美 | + | 6 | 齊藤 京子 | + | 5 | 加藤 史帆 | + | 4 | 影山 優佳 | + | 2 | 潮 紗理菜 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'all'; const page = ctx.req.param('page') ?? '0'; @@ -31,10 +87,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { allowEmpty: true, title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hinatazaka46/maintainer.ts b/lib/routes/hinatazaka46/maintainer.ts deleted file mode 100644 index 16b5fd7c9..000000000 --- a/lib/routes/hinatazaka46/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news': ['crispgm', 'akashigakki'], - '/blog/:id?': ['nwindz', 'akashigakki'], -}; diff --git a/lib/routes/hinatazaka46/namespace.ts b/lib/routes/hinatazaka46/namespace.ts new file mode 100644 index 000000000..6cb3f5553 --- /dev/null +++ b/lib/routes/hinatazaka46/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sakamichi Series 坂道系列官网资讯', + url: 'hinatazaka46.com', +}; diff --git a/lib/routes/hinatazaka46/news.ts b/lib/routes/hinatazaka46/news.ts index cef9ff0a5..22351cbd2 100644 --- a/lib/routes/hinatazaka46/news.ts +++ b/lib/routes/hinatazaka46/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/hinatazaka46/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hinatazaka46.com/s/official/news/list', 'hinatazaka46.com/'], + }, + name: 'Hinatazaka46 News 日向坂 46 新闻', + maintainers: ['crispgm', 'akashigakki'], + handler, + url: 'hinatazaka46.com/s/official/news/list', +}; + +async function handler(ctx) { const rootUrl = 'https://www.hinatazaka46.com'; const currentUrl = `${rootUrl}/s/official/news/list`; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hinatazaka46/radar.ts b/lib/routes/hinatazaka46/radar.ts deleted file mode 100644 index fe2767460..000000000 --- a/lib/routes/hinatazaka46/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'hinatazaka46.com': { - _name: '日向坂46', - '.': [ - { - title: '公式ブログ', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-ri-xiang-ban-46-bo-ke', - source: ['/s/official/diary/member/list', '/'], - target: (params, url) => `/hinatazaka46/blog/${new URL(url).searchParams.get('ct')}`, - }, - { - title: 'ニュース', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-ri-xiang-ban-46-xin-wen', - source: ['/s/official/news/list', '/'], - target: '/hinatazaka46/news', - }, - ], - }, -}; diff --git a/lib/routes/hinatazaka46/router.ts b/lib/routes/hinatazaka46/router.ts deleted file mode 100644 index d1333d6c2..000000000 --- a/lib/routes/hinatazaka46/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news', './news'); - router.get('/blog/:id?/:page?', './blog'); -}; diff --git a/lib/routes/hit/hitgs.ts b/lib/routes/hit/hitgs.ts index 0edb34c9a..570b97d40 100644 --- a/lib/routes/hit/hitgs.ts +++ b/lib/routes/hit/hitgs.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hitgs', + categories: ['university'], + example: '/hit/hitgs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hitgs.hit.edu.cn/*'], + }, + name: '研究生院通知公告', + maintainers: ['hlmu'], + handler, + url: 'hitgs.hit.edu.cn/*', +}; + +async function handler() { const host = 'https://hitgs.hit.edu.cn'; const response = await got(host + '/tzgg/list.htm', { @@ -38,10 +61,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '哈工大研究生院通知公告', link: host + '/tzgg/list.htm', description: '哈尔滨工业大学研究生院通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/hit/jwc.ts b/lib/routes/hit/jwc.ts index 502fe48bd..9ca226f84 100644 --- a/lib/routes/hit/jwc.ts +++ b/lib/routes/hit/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://jwc.hit.edu.cn'; const type = (filename) => filename.split('.').pop(); -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/hit/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.hit.edu.cn/*'], + }, + name: '教务处通知公告', + maintainers: ['lty96117'], + handler, + url: 'jwc.hit.edu.cn/*', +}; + +async function handler() { const response = await got(`${baseUrl}/2591/list.htm`); const { data } = response; @@ -53,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '哈尔滨工业大学教务处通知公告', link: `${baseUrl}/2591/list.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/hit/maintainer.ts b/lib/routes/hit/maintainer.ts deleted file mode 100644 index 20de5f766..000000000 --- a/lib/routes/hit/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/hitgs': ['hlmu'], - '/jwc': ['lty96117'], - '/today/:category': ['ranpox'], -}; diff --git a/lib/routes/hit/namespace.ts b/lib/routes/hit/namespace.ts new file mode 100644 index 000000000..0d2385c40 --- /dev/null +++ b/lib/routes/hit/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哈尔滨工业大学', + url: 'jwc.hit.edu.cn', + description: `:::warning +哈工大网站疑似禁止了\`rsshub.app\`的访问,使用路由需要自行 [部署](https://docs.rsshub.app/install)。 +:::`, +}; diff --git a/lib/routes/hit/radar.ts b/lib/routes/hit/radar.ts deleted file mode 100644 index 957957bba..000000000 --- a/lib/routes/hit/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'hit.edu.cn': { - _name: '哈尔滨工业大学', - jwc: [ - { - title: '哈尔滨工业大学教务处通知公告', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-ye-da-xue', - source: '/*', - target: '/hit/jwc', - }, - ], - today: [ - { - title: '今日哈工大', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-ye-da-xue', - source: '/category/:category', - target: '/hit/today/:category', - }, - ], - hitgs: [ - { - title: '哈工大研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-ye-da-xue', - source: '/*', - target: '/hit/hitgs', - }, - ], - }, -}; diff --git a/lib/routes/hit/router.ts b/lib/routes/hit/router.ts deleted file mode 100644 index 1dc2175c5..000000000 --- a/lib/routes/hit/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - // 哈尔滨工业大学 - router.get('/hitgs', './hitgs'); - router.get('/jwc', './jwc'); - router.get('/today/:category', './today'); -}; diff --git a/lib/routes/hit/today.ts b/lib/routes/hit/today.ts index 9cc40b916..a3ee6860a 100644 --- a/lib/routes/hit/today.ts +++ b/lib/routes/hit/today.ts @@ -1,10 +1,40 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/today/:category', + categories: ['university'], + example: '/hit/today/10', + parameters: { category: '分类编号,`10`为公告公示,`11`为新闻快讯,同时支持详细分类,使用方法见下' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['today.hit.edu.cn/category/:category'], + }, + name: '今日哈工大', + maintainers: ['ranpox'], + handler, + description: `:::tip + 今日哈工大的文章分为公告公示和新闻快讯,每个页面右侧列出了更详细的分类,其编号为每个 URL 路径的最后一个数字。 + 例如会议讲座的路径为\`/taxonomy/term/10/25\`,则可以通过 [\`/hit/today/25\`](https://rsshub.app/hit/today/25) 订阅该详细类别。 + ::: + + :::warning + 部分文章需要经过统一身份认证后才能阅读全文。 + :::`, +}; + +async function handler(ctx) { const host = 'https://today.hit.edu.cn'; const category = ctx.req.param('category'); @@ -52,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim(), link: host + '/category/' + category, item: out, - }); -}; + }; +} diff --git a/lib/routes/hitsz/article.ts b/lib/routes/hitsz/article.ts index e6faaac0e..11b108a64 100644 --- a/lib/routes/hitsz/article.ts +++ b/lib/routes/hitsz/article.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/article/:category?', + categories: ['university'], + example: '/hitsz/article/id-74', + parameters: { category: '分类名,默认为校园动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻中心', + maintainers: ['xandery-geek'], + handler, + description: `| 校区要闻 | 媒体报道 | 综合新闻 | 校园动态 | 讲座论坛 | 热点专题 | 招标信息 | 重要关注 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 |`, +}; + +async function handler(ctx) { const host = 'https://www.hitsz.edu.cn'; const category = ctx.req.param('category') ?? 'id-77'; const link = `${host}/article/${category}.html`; @@ -33,10 +55,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '哈尔滨工业大学(深圳)-' + category_name, link, description: '哈尔滨工业大学(深圳)-' + category_name, item: items, - }); -}; + }; +} diff --git a/lib/routes/hitsz/maintainer.ts b/lib/routes/hitsz/maintainer.ts deleted file mode 100644 index 3732a6012..000000000 --- a/lib/routes/hitsz/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/article/:category?': ['xandery-geek'], -}; diff --git a/lib/routes/hitsz/namespace.ts b/lib/routes/hitsz/namespace.ts new file mode 100644 index 000000000..18d76593e --- /dev/null +++ b/lib/routes/hitsz/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哈尔滨工业大学(深圳)', + url: 'hitsz.edu.cn', +}; diff --git a/lib/routes/hitsz/radar.ts b/lib/routes/hitsz/radar.ts deleted file mode 100644 index a11a65edf..000000000 --- a/lib/routes/hitsz/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hitsz.edu.cn': { - _name: '哈尔滨工业大学(深圳)', - '.': [ - { - title: '新闻中心', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-ye-da-xue-shen-zhen', - source: ['/article/:category?', '/subject/:category?'], - target: (params) => `/hitsz/article/${params.category.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/hitsz/router.ts b/lib/routes/hitsz/router.ts deleted file mode 100644 index dfe811d40..000000000 --- a/lib/routes/hitsz/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/article/:category?', './article'); -}; diff --git a/lib/routes/hitwh/maintainer.ts b/lib/routes/hitwh/maintainer.ts deleted file mode 100644 index 73ed16717..000000000 --- a/lib/routes/hitwh/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/today': ['raptazure'], -}; diff --git a/lib/routes/hitwh/namespace.ts b/lib/routes/hitwh/namespace.ts new file mode 100644 index 000000000..bbf082121 --- /dev/null +++ b/lib/routes/hitwh/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哈尔滨工业大学(威海)', + url: 'hitwh.edu.cn', +}; diff --git a/lib/routes/hitwh/radar.ts b/lib/routes/hitwh/radar.ts deleted file mode 100644 index bc7de398b..000000000 --- a/lib/routes/hitwh/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hitwh.edu.cn': { - _name: '哈尔滨工业大学(威海)', - '.': [ - { - title: '今日工大 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-ye-da-xue-wei-hai', - source: ['/1024/list.htm', '/'], - target: '/hitwh/today', - }, - ], - }, -}; diff --git a/lib/routes/hitwh/router.ts b/lib/routes/hitwh/router.ts deleted file mode 100644 index c582a661c..000000000 --- a/lib/routes/hitwh/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/today', './today'); -}; diff --git a/lib/routes/hitwh/today.ts b/lib/routes/hitwh/today.ts index 80359b3c5..03c073eae 100644 --- a/lib/routes/hitwh/today.ts +++ b/lib/routes/hitwh/today.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://today.hitwh.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['university'], + example: '/hitwh/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hitwh.edu.cn/1024/list.htm', 'hitwh.edu.cn/'], + }, + name: '今日工大 - 通知公告', + maintainers: ['raptazure'], + handler, + url: 'hitwh.edu.cn/1024/list.htm', +}; + +async function handler() { const response = await got(`${baseUrl}/1024/list.htm`, { https: { rejectUnauthorized: false, @@ -22,7 +45,7 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: '哈尔滨工业大学(威海)通知公告', link: `${baseUrl}/1024/list.htm`, item: await Promise.all( @@ -51,5 +74,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/hizu/index.ts b/lib/routes/hizu/index.ts index 41031b807..52255359b 100644 --- a/lib/routes/hizu/index.ts +++ b/lib/routes/hizu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -30,7 +31,55 @@ const titles = { '607d37ade4b05c59ac2f3d40': '高新', }; -export default async (ctx) => { +export const route: Route = { + path: '/:column?', + categories: ['new-media'], + example: '/hizu', + parameters: { column: '栏目,见下表,默认为热点' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hizh.cn/'], + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + url: 'hizh.cn/', + description: `| 分类 | 编号 | + | -------- | ------------------------ | + | 热点 | 5dd92265e4b0bf88dd8c1175 | + | 订阅 | 5dd921a7e4b0bf88dd8c116f | + | 学党史 | 604f1cbbe4b0cf5c2234d470 | + | 政经 | 5dd92242e4b0bf88dd8c1174 | + | 合作区 | 61259fd6e4b0d294f7f9786d | + | 名记名播 | 61dfe511e4b0248b60d1c568 | + | 大湾区 | 5dd9222ce4b0bf88dd8c1173 | + | 网评 | 617805e4e4b037abacfd4820 | + | TV 新闻 | 5dd9220de4b0bf88dd8c1172 | + | 音频 | 5e6edd50e4b02ebde0ab061e | + | 澳门 | 600e8ad4e4b02c3a6af6aaa8 | + | 政务 | 600f760fe4b0e33cf6f8e68e | + | 教育 | 5ff7c0fde4b0e2f210d05e20 | + | 深圳 | 5fc88615e4b0e3055e693e0a | + | 中山 | 600e8a93e4b02c3a6af6aa80 | + | 民生 | 5dd921ece4b0bf88dd8c1170 | + | 社区 | 61148184e4b08d3215364396 | + | 专题 | 5dd9215fe4b0bf88dd8c116b | + | 战疫 | 5e2e5107e4b0c14b5d0e3d04 | + | 横琴 | 5f88eaf2e4b0a27cd404e09e | + | 香洲 | 5f86a3f5e4b09d75f99dde7d | + | 金湾 | 5e8c42b4e4b0347c7e5836e0 | + | 斗门 | 5ee70534e4b07b8a779a1ad6 | + | 高新 | 607d37ade4b05c59ac2f3d40 |`, +}; + +async function handler(ctx) { const column = ctx.req.param('column') ?? '5dd92265e4b0bf88dd8c1175'; const rootUrl = 'https://www.hizh.cn'; @@ -69,9 +118,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[column]} - 珠海网`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hizu/maintainer.ts b/lib/routes/hizu/maintainer.ts deleted file mode 100644 index d7fab9c71..000000000 --- a/lib/routes/hizu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:column?': ['nczitzk'], -}; diff --git a/lib/routes/hizu/namespace.ts b/lib/routes/hizu/namespace.ts new file mode 100644 index 000000000..fd72e76e8 --- /dev/null +++ b/lib/routes/hizu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '珠海网', + url: 'hizh.cn', +}; diff --git a/lib/routes/hizu/radar.ts b/lib/routes/hizu/radar.ts deleted file mode 100644 index 45a553571..000000000 --- a/lib/routes/hizu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hizh.cn': { - _name: '珠海网', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#zhu-hai-wang-lan-mu', - source: '/', - target: '/hizu/:column?', - }, - ], - }, -}; diff --git a/lib/routes/hizu/router.ts b/lib/routes/hizu/router.ts deleted file mode 100644 index 699c5cf13..000000000 --- a/lib/routes/hizu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:column?', './index'); -}; diff --git a/lib/routes/hk01/channel.ts b/lib/routes/hk01/channel.ts index 0deb0f2da..dbe98c17e 100644 --- a/lib/routes/hk01/channel.ts +++ b/lib/routes/hk01/channel.ts @@ -1,8 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id?', + radar: { + source: ['hk01.com/channel/:id', 'hk01.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const currentUrl = `${rootUrl}/channel/${id}`; @@ -15,10 +26,10 @@ export default async (ctx) => { const items = await ProcessItems(response.data.items, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: response.data.category ? `${response.data.category.publishName} | 香港01` : `Channel: ${id} | 香港01`, link: currentUrl, item: items, image: response.data.category ? response.data.category.icon : null, - }); -}; + }; +} diff --git a/lib/routes/hk01/hot.ts b/lib/routes/hk01/hot.ts index ee2b5d227..88f845a35 100644 --- a/lib/routes/hk01/hot.ts +++ b/lib/routes/hk01/hot.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hot', + categories: ['new-media'], + example: '/hk01/hot', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hk01.com/hot', 'hk01.com/'], + }, + name: '热门', + maintainers: ['hoilc', 'Fatpandac', 'nczitzk'], + handler, + url: 'hk01.com/hot', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/hot`; const apiUrl = `${apiRootUrl}/v2/feed/hot`; @@ -13,9 +36,9 @@ export default async (ctx) => { const items = await ProcessItems(response.data.items, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: '熱門新聞、全城熱話及社會時事 | 香港01', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hk01/issue.ts b/lib/routes/hk01/issue.ts index 568cf8fd0..f2751bc57 100644 --- a/lib/routes/hk01/issue.ts +++ b/lib/routes/hk01/issue.ts @@ -1,8 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/issue/:id?', + radar: { + source: ['hk01.com/issue/:id', 'hk01.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '649'; const currentUrl = `${rootUrl}/issue/${id}`; @@ -15,9 +26,9 @@ export default async (ctx) => { const items = await ProcessItems(response.data.blocks[0].articles, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: `${response.data.title} | 香港01`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hk01/latest.ts b/lib/routes/hk01/latest.ts index 7ab2ae060..575dcac66 100644 --- a/lib/routes/hk01/latest.ts +++ b/lib/routes/hk01/latest.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/hk01/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hk01.com/latest', 'hk01.com/'], + }, + name: '即時', + maintainers: ['5upernova-heng'], + handler, + url: 'hk01.com/latest', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/latest`; const apiUrl = `${apiRootUrl}/v2/page/latest`; @@ -13,9 +36,9 @@ export default async (ctx) => { const items = await ProcessItems(response.data.items, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: '即時 | 香港01', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hk01/maintainer.ts b/lib/routes/hk01/maintainer.ts deleted file mode 100644 index c9eb9a904..000000000 --- a/lib/routes/hk01/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/channel/:id': ['hoilc', 'Fatpandac', 'nczitzk'], - '/hot': ['hoilc', 'Fatpandac', 'nczitzk'], - '/latest': ['5upernova-heng'], - '/issue/:id': ['hoilc', 'Fatpandac', 'nczitzk'], - '/tag/:id': ['hoilc', 'Fatpandac', 'nczitzk'], - '/zone/:id': ['hoilc', 'Fatpandac', 'nczitzk'], -}; diff --git a/lib/routes/hk01/namespace.ts b/lib/routes/hk01/namespace.ts new file mode 100644 index 000000000..22fa57ef1 --- /dev/null +++ b/lib/routes/hk01/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '香港 01', + url: 'hk01.com', +}; diff --git a/lib/routes/hk01/radar.ts b/lib/routes/hk01/radar.ts deleted file mode 100644 index 94e6ff7c5..000000000 --- a/lib/routes/hk01/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'hk01.com': { - _name: '香港01', - '.': [ - { - title: '热门', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-re-men', - source: ['/hot', '/'], - target: '/hk01/hot', - }, - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-lan-mu', - source: ['/zone/:id', '/'], - target: '/hk01/zone/:id?', - }, - { - title: '子栏目', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-zi-lan-mu', - source: ['/channel/:id', '/'], - target: '/hk01/channel/:id?', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-zhuan-ti', - source: ['/issue/:id', '/'], - target: '/hk01/issue/:id?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-biao-qian', - source: ['/tag/:id', '/'], - target: '/hk01/tag/:id?', - }, - { - title: '即時', - docs: 'https://docs.rsshub.app/routes/new-media#xiang-gang-01-ji-shi', - source: ['/latest', '/'], - target: '/hk01/latest', - }, - ], - }, -}; diff --git a/lib/routes/hk01/router.ts b/lib/routes/hk01/router.ts deleted file mode 100644 index 17bf1a2ca..000000000 --- a/lib/routes/hk01/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/channel/:id?', './channel'); - router.get('/hot', './hot'); - router.get('/issue/:id?', './issue'); - router.get('/latest', './latest'); - router.get('/tag/:id?', './tag'); - router.get('/zone/:id?', './zone'); -}; diff --git a/lib/routes/hk01/tag.ts b/lib/routes/hk01/tag.ts index 844d6a287..aa5a6ffe1 100644 --- a/lib/routes/hk01/tag.ts +++ b/lib/routes/hk01/tag.ts @@ -1,8 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:id?', + radar: { + source: ['hk01.com/tag/:id', 'hk01.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const currentUrl = `${rootUrl}/tag/${id}`; @@ -15,9 +26,9 @@ export default async (ctx) => { const items = await ProcessItems(response.data.items, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: `${id} | 香港01`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hk01/zone.ts b/lib/routes/hk01/zone.ts index 49f267f9f..b1843b097 100644 --- a/lib/routes/hk01/zone.ts +++ b/lib/routes/hk01/zone.ts @@ -1,8 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiRootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/zone/:id?', + radar: { + source: ['hk01.com/zone/:id', 'hk01.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const currentUrl = `${rootUrl}/zone/${id}`; @@ -15,10 +26,10 @@ export default async (ctx) => { const items = await ProcessItems(response.data.items, ctx.req.query('limit'), cache.tryGet); - ctx.set('data', { + return { title: `${response.data.category.publishName} | 香港01`, link: currentUrl, item: items, image: response.data.category.icon, - }); -}; + }; +} diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index cb102e4e1..f7d19610a 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -57,7 +58,32 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/hkej/index', + parameters: { category: '分类,默认为全部新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hkej.com/'], + }, + name: '即时新闻', + maintainers: ['TonyRL'], + handler, + url: 'hkej.com/', + description: `| index | stock | hongkong | china | international | property | current | + | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | + | 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'index'; const cat = categories[category]; const baseUrl = 'https://www2.hkej.com'; @@ -139,13 +165,13 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `信報網站 - ${cat.title} - 信報網站 hkej.com`, link: baseUrl + cat.link, description: `信報網站(www.hkej.com)即時新聞${cat.name},提供${cat.description}。`, item: items, language: 'zh-hk', - }); + }; ctx.set('json', { title: `信報網站 - ${cat.title} - 信報網站 hkej.com`, @@ -155,4 +181,4 @@ export default async (ctx) => { language: 'zh-hk', cookieJar, }); -}; +} diff --git a/lib/routes/hkej/maintainer.ts b/lib/routes/hkej/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/hkej/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/hkej/namespace.ts b/lib/routes/hkej/namespace.ts new file mode 100644 index 000000000..2d773b44f --- /dev/null +++ b/lib/routes/hkej/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '信报财经新闻', + url: 'hkej.com', +}; diff --git a/lib/routes/hkej/radar.ts b/lib/routes/hkej/radar.ts deleted file mode 100644 index 1ba04cc73..000000000 --- a/lib/routes/hkej/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hkej.com': { - _name: '信报财经新闻', - '.': [ - { - title: '即时新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media##xin-bao-cai-jing-xin-wen', - source: ['/'], - target: '/hkej/:category?', - }, - ], - }, -}; diff --git a/lib/routes/hkej/router.ts b/lib/routes/hkej/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/hkej/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/hkepc/index.ts b/lib/routes/hkepc/index.ts index 2408219f4..b38881baf 100644 --- a/lib/routes/hkepc/index.ts +++ b/lib/routes/hkepc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,33 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { baseUrl, categoryMap } from './data'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/hkepc/news', + parameters: { category: '分类,见下表,默认为最新消息' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hkepc.com/'], + target: '', + }, + name: 'HKEPC 电脑领域', + maintainers: ['TonyRL'], + handler, + url: 'hkepc.com/', + description: `| 专题报导 | 新闻中心 | 新品快递 | 超频领域 | 流动数码 | 生活娱乐 | 会员消息 | 脑场新闻 | 业界资讯 | 最新消息 | + | ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- | + | coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const { data: response } = await got(categoryMap[category].url, { @@ -88,11 +115,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `電腦領域 HKEPC${categoryMap[category].feedSuffix}`, link: `https://www.hkepc.com/${category}`, description: '電腦領域 HKEPC Hardware - 全港 No.1 PC網站', language: 'zh-hk', item: items, - }); -}; + }; +} diff --git a/lib/routes/hkepc/maintainer.ts b/lib/routes/hkepc/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/hkepc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/hkepc/namespace.ts b/lib/routes/hkepc/namespace.ts new file mode 100644 index 000000000..9bbd2de09 --- /dev/null +++ b/lib/routes/hkepc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HKEPC', + url: 'hkepc.com', +}; diff --git a/lib/routes/hkepc/radar.ts b/lib/routes/hkepc/radar.ts deleted file mode 100644 index 65d6e045a..000000000 --- a/lib/routes/hkepc/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'hkepc.com': { - _name: 'HKEPC', - '.': [ - { - title: 'HKEPC 电脑领域', - docs: 'https://docs.rsshub.app/routes/new-media#hkepc', - source: ['/:category?'], - target: '/hkepc/:category?', - }, - { - title: 'HKEPC 电脑领域', - docs: 'https://docs.rsshub.app/routes/new-media#hkepc', - source: ['/'], - target: '/hkepc', - }, - ], - }, -}; diff --git a/lib/routes/hkepc/router.ts b/lib/routes/hkepc/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/hkepc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index b8efbe087..a6588e01f 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -24,7 +25,89 @@ const urlMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/hket/sran001', + parameters: { category: '分类,默认为全部新闻,可在 URL 中找到,部分见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.hket.com/'], + target: '', + }, + name: '新闻', + maintainers: ['TonyRL'], + handler, + url: 'www.hket.com/', + description: `香港经济日报已有提供简单 RSS,详细可前往官方网站: [https://www.hket.com/rss](https://www.hket.com/rss) + +此路由主要补全官方 RSS 全文输出及完善分类输出。 + +
    + 分类 + + | sran001 | sran008 | sran010 | sran011 | sran012 | srat006 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 全部新闻 | 财经地产 | 科技信息 | 国际新闻 | 商业新闻 | 香港新闻 | + + | sran009 | sran009-1 | sran009-2 | sran009-3 | sran009-4 | sran009-5 | sran009-6 | + | -------- | --------- | --------- | ---------- | --------- | --------- | --------- | + | 即时财经 | 股市 | 新股 IPO | 新经济追踪 | 当炒股 | 宏观解读 | Hot Talk | + + | sran011-1 | sran011-2 | sran011-3 | + | --------- | ------------ | ------------ | + | 环球政治 | 环球经济金融 | 环球社会热点 | + + | sran016 | sran016-1 | sran016-2 | sran016-3 | sran016-4 | sran016-5 | + | ---------- | ---------- | ---------- | ---------- | ---------- | -------------- | + | 大湾区主页 | 大湾区发展 | 大湾区工作 | 大湾区买楼 | 大湾区消费 | 大湾区投资理财 | + + | srac002 | srac003 | srac004 | srac005 | + | -------- | -------- | -------- | -------- | + | 即时中国 | 经济脉搏 | 国情动向 | 社会热点 | + + | srat001 | srat008 | srat055 | srat069 | srat070 | + | ------- | ------- | -------- | -------- | --------- | + | 话题 | 观点 | 休闲消费 | 娱乐新闻 | TOPick TV | + + | srat052 | srat052-1 | srat052-2 | srat052-3 | + | -------- | --------- | ---------- | --------- | + | 健康主页 | 食用安全 | 医生诊症室 | 保健美颜 | + + | srat053 | srat053-1 | srat053-2 | srat053-3 | srat053-4 | + | -------- | --------- | --------- | --------- | ---------- | + | 亲子主页 | 儿童健康 | 育儿经 | 教育 | 亲子好去处 | + + | srat053-6 | srat053-61 | srat053-62 | srat053-63 | srat053-64 | + | ----------- | ---------- | ---------- | ---------- | ---------- | + | Band 1 学堂 | 幼稚园 | 中小学 | 尖子教室 | 海外升学 | + + | srat072-1 | srat072-2 | srat072-3 | srat072-4 | + | ---------- | ---------- | ---------------- | ----------------- | + | 健康身心活 | 抗癌新方向 | 「糖」「心」解密 | 风湿不再 你我自在 | + + | sraw007 | sraw009 | sraw010 | sraw011 | sraw012 | sraw014 | sraw018 | sraw019 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 全部博客 | Bloggers | 收息攻略 | 精明消费 | 退休规划 | 个人增值 | 财富管理 | 绿色金融 | + + | sraw015 | sraw015-07 | sraw015-08 | sraw015-09 | sraw015-10 | + | -------- | ---------- | ---------- | ---------- | ---------- | + | 移民百科 | 海外置业 | 移民攻略 | 移民点滴 | 海外理财 | + + | sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 | + | -------- | ------------ | --------- | --------- | --------- | + | ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 | +
    `, +}; + +async function handler(ctx) { const { category = 'sran001' } = ctx.req.param(); const baseUrl = urlMap[category.substring(0, 4)].baseUrl; @@ -123,13 +206,13 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head meta[name=title]').attr('content').trim(), link: baseUrl + '/' + category, description: $('head meta[name=description]').attr('content').trim(), item: items, language: 'zh-hk', - }); + }; ctx.set('json', { title: $('head meta[name=title]').attr('content').trim(), @@ -138,4 +221,4 @@ export default async (ctx) => { item: items, language: 'zh-hk', }); -}; +} diff --git a/lib/routes/hket/maintainer.ts b/lib/routes/hket/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/hket/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/hket/namespace.ts b/lib/routes/hket/namespace.ts new file mode 100644 index 000000000..a388d521b --- /dev/null +++ b/lib/routes/hket/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '香港经济日报', + url: 'china.hket.com', +}; diff --git a/lib/routes/hket/radar.ts b/lib/routes/hket/radar.ts deleted file mode 100644 index 11ff27928..000000000 --- a/lib/routes/hket/radar.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - 'hket.com': { - _name: '香港经济日报', - china: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao', - source: ['/:category/*'], - target: '/hket/:category', - }, - ], - inews: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao', - source: ['/:category/*'], - target: '/hket/:category', - }, - ], - topick: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao', - source: ['/:category/*'], - target: '/hket/:category', - }, - ], - wealth: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao', - source: ['/:category/*'], - target: '/hket/:category', - }, - ], - www: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xiang-gang-jing-ji-ri-bao', - source: ['/'], - target: '/hket', - }, - ], - }, -}; diff --git a/lib/routes/hket/router.ts b/lib/routes/hket/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/hket/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/hkjunkcall/index.ts b/lib/routes/hkjunkcall/index.ts index 8be8dc20c..9f56aa9db 100644 --- a/lib/routes/hkjunkcall/index.ts +++ b/lib/routes/hkjunkcall/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['hkjunkcall.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'hkjunkcall.com/', +}; + +async function handler() { const rootUrl = 'https://hkjunkcall.com'; const currentUrl = `${rootUrl}/cdpushdash.asp`; @@ -46,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hkjunkcall/maintainer.ts b/lib/routes/hkjunkcall/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/hkjunkcall/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/hkjunkcall/namespace.ts b/lib/routes/hkjunkcall/namespace.ts new file mode 100644 index 000000000..bd8bad804 --- /dev/null +++ b/lib/routes/hkjunkcall/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HKJunkCall 資訊中心', + url: 'hkjunkcall.com', +}; diff --git a/lib/routes/hkjunkcall/radar.ts b/lib/routes/hkjunkcall/radar.ts deleted file mode 100644 index 53b1186e1..000000000 --- a/lib/routes/hkjunkcall/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hkjunkcall.com': { - _name: 'HKJunkCall資訊中心', - '.': [ - { - title: '近期資訊', - docs: 'https://docs.rsshub.app/routes/new-media#hkjunkcall-zi-xun-zhong-xin-jin-qi-zi-xun', - source: ['/'], - target: '/hkjunkcall', - }, - ], - }, -}; diff --git a/lib/routes/hkjunkcall/router.ts b/lib/routes/hkjunkcall/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/hkjunkcall/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/hljucm/maintainer.ts b/lib/routes/hljucm/maintainer.ts deleted file mode 100644 index 9a5506493..000000000 --- a/lib/routes/hljucm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/yjsy/:category?': ['nczitzk'], -}; diff --git a/lib/routes/hljucm/namespace.ts b/lib/routes/hljucm/namespace.ts new file mode 100644 index 000000000..5c36e5a89 --- /dev/null +++ b/lib/routes/hljucm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '黑龙江中医药大学', + url: 'yjsy.hljucm.net', +}; diff --git a/lib/routes/hljucm/radar.ts b/lib/routes/hljucm/radar.ts deleted file mode 100644 index 8b587e42f..000000000 --- a/lib/routes/hljucm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hljucm.net': { - _name: '黑龙江中医药大学', - yjsy: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#hei-long-jiang-zhong-yi-yao-da-xue', - source: ['/index/:category', '/index'], - target: (params) => `/hljucm/yjsy/${params.category.replace('.htm', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/hljucm/router.ts b/lib/routes/hljucm/router.ts deleted file mode 100644 index 87c68a3d6..000000000 --- a/lib/routes/hljucm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/yjsy/:category?', './yjsy'); -}; diff --git a/lib/routes/hljucm/yjsy.ts b/lib/routes/hljucm/yjsy.ts index f040859ef..529410542 100644 --- a/lib/routes/hljucm/yjsy.ts +++ b/lib/routes/hljucm/yjsy.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/:category?', + categories: ['university'], + example: '/hljucm/yjsy', + parameters: { category: '分类, 见下表,默认为新闻动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生院', + maintainers: ['nczitzk'], + handler, + description: `| 新闻动态 | 通知公告 | + | -------- | -------- | + | xwdt | tzgg |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'xwdt'; const rootUrl = 'https://yjsy.hljucm.net'; @@ -49,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hnrb/index.ts b/lib/routes/hnrb/index.ts index fe345f00d..0ce9de356 100644 --- a/lib/routes/hnrb/index.ts +++ b/lib/routes/hnrb/index.ts @@ -1,10 +1,46 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['traditional-media'], + example: '/hnrb', + parameters: { id: '编号,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['voc.com.cn/'], + target: '/:id', + }, + name: '电子刊物', + maintainers: ['nczitzk'], + handler, + url: 'voc.com.cn/', + description: `| 版 | 编号 | + | -------------------- | ---- | + | 全部 | | + | 第 01 版:头版 | 1 | + | 第 02 版:要闻 | 2 | + | 第 03 版:要闻 | 3 | + | 第 04 版:深度 | 4 | + | 第 05 版:市州 | 5 | + | 第 06 版:理论・学习 | 6 | + | 第 07 版:观察 | 7 | + | 第 08 版:时事 | 8 | + | 第 09 版:中缝 | 9 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://hnrb.voc.com.cn'; @@ -78,9 +114,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `湖南日报${id ? ` - ${$('strong').first().parent().text()}` : ''}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hnrb/maintainer.ts b/lib/routes/hnrb/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/hnrb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/hnrb/namespace.ts b/lib/routes/hnrb/namespace.ts new file mode 100644 index 000000000..8d0254c6d --- /dev/null +++ b/lib/routes/hnrb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '湖南日报', + url: 'voc.com.cn', +}; diff --git a/lib/routes/hnrb/radar.ts b/lib/routes/hnrb/radar.ts deleted file mode 100644 index 5a626a567..000000000 --- a/lib/routes/hnrb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'voc.com.cn': { - _name: '华声在线', - '.': [ - { - title: '湖南日报', - docs: 'https://docs.rsshub.app/routes/journal#hu-nan-ri-bao-dian-zi-kan-wu', - source: ['/'], - target: '/hnrb/:id', - }, - ], - }, -}; diff --git a/lib/routes/hnrb/router.ts b/lib/routes/hnrb/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/hnrb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/hnu/careers.ts b/lib/routes/hnu/careers.ts index d6bbd217c..3f3a8ac52 100644 --- a/lib/routes/hnu/careers.ts +++ b/lib/routes/hnu/careers.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/careers', + categories: ['university'], + example: '/hnu/careers', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scc.hnu.edu.cnundefined'], + }, + name: '校园招聘', + maintainers: ['ningyougan'], + handler, + url: 'scc.hnu.edu.cnundefined', +}; + +async function handler() { const rootUrl = 'http://scc.hnu.edu.cn/'; // 校园招聘的路由为/module/getcareers,但该页面默认仅加载整体框架,具体的招聘信息在页面加载完成后再交易获取。 // 具体的交易可以通过f12,网络栏进行查看,项目中仅保留了必须携带的参数。 @@ -13,7 +36,7 @@ export default async (ctx) => { }); const company_list = response.data.data; - ctx.set('data', { + return { title: '校园招聘', link: currentRoute, item: company_list.map((company_info) => { @@ -29,5 +52,5 @@ export default async (ctx) => { }; return ret; }), - }); -}; + }; +} diff --git a/lib/routes/hnu/maintainer.ts b/lib/routes/hnu/maintainer.ts deleted file mode 100644 index 5890288b4..000000000 --- a/lib/routes/hnu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/careers': ['ningyougan'], -}; diff --git a/lib/routes/hnu/namespace.ts b/lib/routes/hnu/namespace.ts new file mode 100644 index 000000000..58f399dca --- /dev/null +++ b/lib/routes/hnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '湖南大学', + url: 'scc.hnu.edu.cn', +}; diff --git a/lib/routes/hnu/radar.ts b/lib/routes/hnu/radar.ts deleted file mode 100644 index 66042ae75..000000000 --- a/lib/routes/hnu/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'hnu.edu.cn': { - _name: '湖南大学', - scc: [ - { - title: '校园招聘', - docs: 'https://docs.rsshub.app/routes/university#hu-nan-da-xue', - target: '/hnu/careers', - }, - ], - }, -}; diff --git a/lib/routes/hnu/router.ts b/lib/routes/hnu/router.ts deleted file mode 100644 index c56679031..000000000 --- a/lib/routes/hnu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/careers', './careers'); -}; diff --git a/lib/routes/hongkong/chp.ts b/lib/routes/hongkong/chp.ts index c291c0fae..c7ce4281b 100644 --- a/lib/routes/hongkong/chp.ts +++ b/lib/routes/hongkong/chp.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -36,7 +37,18 @@ const titles = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/chp/:category?/:language?', + radar: { + source: ['dh.gov.hk/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'dh.gov.hk/', +}; + +async function handler(ctx) { const languageCodes = { en: 'en', zh_cn: 'sc', @@ -96,9 +108,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[category][language]} - ${titles.title[language]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hongkong/dh.ts b/lib/routes/hongkong/dh.ts index f7dcc2e8a..6eee5cf62 100644 --- a/lib/routes/hongkong/dh.ts +++ b/lib/routes/hongkong/dh.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dh/:language?', + categories: ['government'], + example: '/hongkong/dh', + parameters: { language: 'Language, see below, tc_chi by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dh.gov.hk/'], + }, + name: 'Press Release', + maintainers: ['nczitzk'], + handler, + url: 'dh.gov.hk/', + description: `Language + + | English | 中文简体 | 中文繁體 | + | ------- | -------- | -------- | + | english | chs | tc\_chi |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'tc_chi'; const rootUrl = 'https://www.dh.gov.hk'; @@ -46,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hongkong/maintainer.ts b/lib/routes/hongkong/maintainer.ts deleted file mode 100644 index 83bd608b4..000000000 --- a/lib/routes/hongkong/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/dh/:language?': ['nczitzk'], - '/chp/:category?/:language?': ['nczitzk'], -}; diff --git a/lib/routes/hongkong/namespace.ts b/lib/routes/hongkong/namespace.ts new file mode 100644 index 000000000..a7b5a9350 --- /dev/null +++ b/lib/routes/hongkong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hong Kong Department of Health 香港卫生署', + url: 'dh.gov.hk', +}; diff --git a/lib/routes/hongkong/radar.ts b/lib/routes/hongkong/radar.ts deleted file mode 100644 index b5237207c..000000000 --- a/lib/routes/hongkong/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'dh.gov.hk': { - _name: '香港卫生署', - '.': [ - { - title: '新闻公报', - docs: 'https://docs.rsshub.app/routes/government#xiang-gang-wei-sheng-shu-xin-wen-gong-bao', - source: ['/'], - target: '/hongkong/dh/:language?', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/government#xiang-gang-wei-sheng-fang-hu-zhong-xin-fen-lei', - source: ['/'], - target: '/hongkong/chp/:category?/:language?', - }, - ], - }, -}; diff --git a/lib/routes/hongkong/router.ts b/lib/routes/hongkong/router.ts deleted file mode 100644 index 73f5ab695..000000000 --- a/lib/routes/hongkong/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/dh/:language?', './dh'); - router.get('/chp/:category?/:language?', './chp'); -}; diff --git a/lib/routes/hostmonit/cloudflareyes.ts b/lib/routes/hostmonit/cloudflareyes.ts index cdf8b9f50..eaa89d8ea 100644 --- a/lib/routes/hostmonit/cloudflareyes.ts +++ b/lib/routes/hostmonit/cloudflareyes.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -14,7 +15,28 @@ const lines = { CT: '中国电信', }; -export default async (ctx) => { +export const route: Route = { + path: '/cloudflareyes/:type?', + categories: ['other'], + example: '/hostmonit/cloudflareyes', + parameters: { type: '类型,见下表,默认为 v4' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'CloudFlareYes', + maintainers: ['nczitzk'], + handler, + description: `| v4 | v6 | + | -- | -- | + | | v6 |`, +}; + +async function handler(ctx) { const { type = 'v4' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -79,7 +101,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text().replace(/- .*$/, `- ${title}`), link: currentUrl, @@ -90,5 +112,5 @@ export default async (ctx) => { subtitle: title, author: $('title').text().split(/\s-/)[0], allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/hostmonit/cloudflareyesv6.ts b/lib/routes/hostmonit/cloudflareyesv6.ts index dbb60c079..a52287cfb 100644 --- a/lib/routes/hostmonit/cloudflareyesv6.ts +++ b/lib/routes/hostmonit/cloudflareyesv6.ts @@ -1,3 +1,11 @@ -export default (ctx) => { - ctx.redirect('/hostmonit/cloudflareyes/v6'); +import { Route } from '@/types'; +export const route: Route = { + path: '/cloudflareyesv6', + name: 'Unknown', + maintainers: [], + handler, }; + +function handler(ctx) { + ctx.redirect('/hostmonit/cloudflareyes/v6'); +} diff --git a/lib/routes/hostmonit/maintainer.ts b/lib/routes/hostmonit/maintainer.ts deleted file mode 100644 index 939ad7449..000000000 --- a/lib/routes/hostmonit/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/cloudflareyes/:type?': ['nczitzk'], -}; diff --git a/lib/routes/hostmonit/namespace.ts b/lib/routes/hostmonit/namespace.ts new file mode 100644 index 000000000..091f4f854 --- /dev/null +++ b/lib/routes/hostmonit/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '全球主机监控', + url: 'stock.hostmonit.com', +}; diff --git a/lib/routes/hostmonit/radar.ts b/lib/routes/hostmonit/radar.ts deleted file mode 100644 index b9caedd55..000000000 --- a/lib/routes/hostmonit/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'hostmonit.com': { - _name: '全球主机监控', - stock: [ - { - title: 'CloudFlareYes', - docs: 'https://docs.rsshub.app/routes/other#quan-qiu-zhu-ji-jian-kong-cloudflareyes', - source: ['/:type'], - target: (params) => { - const type = params.type; - - return `/hostmonit/${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/hostmonit/router.ts b/lib/routes/hostmonit/router.ts deleted file mode 100644 index 8a5140e03..000000000 --- a/lib/routes/hostmonit/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/cloudflareyes/:type?', './cloudflareyes'); - router.get('/cloudflareyesv6', './cloudflareyesv6'); -}; diff --git a/lib/routes/hotukdeals/hottest.ts b/lib/routes/hotukdeals/hottest.ts index 34d5d359f..aea7f5157 100644 --- a/lib/routes/hotukdeals/hottest.ts +++ b/lib/routes/hotukdeals/hottest.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { JSDOM } from 'jsdom'; -export default async (ctx) => { +export const route: Route = { + path: '/hottest', + categories: ['shopping'], + example: '/hotukdeals/hottest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.hotukdeals.com/'], + }, + name: 'hottest', + maintainers: ['DIYgod'], + handler, + url: 'www.hotukdeals.com/', +}; + +async function handler() { const data = await got.get(`https://www.hotukdeals.com/`, { headers: { Referer: `https://www.hotukdeals.com/`, @@ -13,7 +36,7 @@ export default async (ctx) => { }); const threads = dom.window.__INITIAL_STATE__.widgets.hottestWidget.threads; - ctx.set('data', { + return { title: `hotukdeals hottest`, link: `https://www.hotukdeals.com/`, item: threads.map((item) => ({ @@ -21,5 +44,5 @@ export default async (ctx) => { description: `
    ${item.temperature}° ${item.title}
    ${item.displayPrice}`, link: item.url, })), - }); -}; + }; +} diff --git a/lib/routes/hotukdeals/index.ts b/lib/routes/hotukdeals/index.ts index 49a5b2d1c..4b6bfc43b 100644 --- a/lib/routes/hotukdeals/index.ts +++ b/lib/routes/hotukdeals/index.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:type', + categories: ['shopping'], + example: '/hotukdeals/hot', + parameters: { type: 'should be one of highlights, hot, new, discussed' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'thread', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { let type = ctx.req.param('type'); if (type === 'highlights') { type = ''; @@ -16,7 +35,7 @@ export default async (ctx) => { const list = $('article.thread'); - ctx.set('data', { + return { title: `hotukdeals ${type}`, link: `https://www.hotukdeals.com/${type}`, item: list @@ -30,5 +49,5 @@ export default async (ctx) => { }) .get() .reverse(), - }); -}; + }; +} diff --git a/lib/routes/hotukdeals/maintainer.ts b/lib/routes/hotukdeals/maintainer.ts deleted file mode 100644 index d9bc75ed1..000000000 --- a/lib/routes/hotukdeals/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:type': ['DIYgod'], - '/hottest': ['DIYgod'], -}; diff --git a/lib/routes/hotukdeals/namespace.ts b/lib/routes/hotukdeals/namespace.ts new file mode 100644 index 000000000..0503c22e7 --- /dev/null +++ b/lib/routes/hotukdeals/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'hotukdeals', + url: 'www.hotukdeals.com', +}; diff --git a/lib/routes/hotukdeals/radar.ts b/lib/routes/hotukdeals/radar.ts deleted file mode 100644 index 67deb030f..000000000 --- a/lib/routes/hotukdeals/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'hotukdeals.com': { - _name: 'hotukdeals', - www: [ - { - title: 'highlights', - docs: 'https://docs.rsshub.app/routes/shopping#hotukdeals', - source: ['/'], - target: '/hotukdeals/highlights', - }, - { - title: 'hot', - docs: 'https://docs.rsshub.app/routes/shopping#hotukdeals', - source: ['/'], - target: '/hotukdeals/hot', - }, - { - title: 'new', - docs: 'https://docs.rsshub.app/routes/shopping#hotukdeals', - source: ['/'], - target: '/hotukdeals/new', - }, - { - title: 'discussed', - docs: 'https://docs.rsshub.app/routes/shopping#hotukdeals', - source: ['/'], - target: '/hotukdeals/discussed', - }, - { - title: 'hottest', - docs: 'https://docs.rsshub.app/routes/shopping#hotukdeals', - source: ['/'], - target: '/hotukdeals/hottest', - }, - ], - }, -}; diff --git a/lib/routes/hotukdeals/router.ts b/lib/routes/hotukdeals/router.ts deleted file mode 100644 index 271cee69a..000000000 --- a/lib/routes/hotukdeals/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/hottest', './hottest'); - router.get('/:type', './index'); -}; diff --git a/lib/routes/houxu/events.ts b/lib/routes/houxu/events.ts index bd45bce92..88070f146 100644 --- a/lib/routes/houxu/events.ts +++ b/lib/routes/houxu/events.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/events', + categories: ['new-media'], + example: '/houxu/events', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['houxu.app/events', 'houxu.app/'], + }, + name: '专栏', + maintainers: ['nczitzk'], + handler, + url: 'houxu.app/events', +}; + +async function handler(ctx) { const rootUrl = 'https://houxu.app'; const apiUrl = `${rootUrl}/api/1/events?limit=${ctx.req.query('limit') ?? 50}`; const currentUrl = `${rootUrl}/events`; @@ -32,9 +55,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: '后续 - 专栏', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/houxu/index.ts b/lib/routes/houxu/index.ts index 8a0707f3c..a711ec500 100644 --- a/lib/routes/houxu/index.ts +++ b/lib/routes/houxu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,21 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/featured', '/index', '/'], + radar: { + source: ['houxu.app/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'houxu.app/', + url: 'houxu.app/', + url: 'houxu.app/', +}; + +async function handler(ctx) { const rootUrl = 'https://houxu.app'; const apiUrl = `${rootUrl}/api/1/records/index?limit=${ctx.req.query('limit') ?? 50}`; @@ -32,9 +47,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: '后续 - 热点', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/houxu/lives.ts b/lib/routes/houxu/lives.ts index 1e6a34273..76ca612c1 100644 --- a/lib/routes/houxu/lives.ts +++ b/lib/routes/houxu/lives.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/lives/:id', + categories: ['new-media'], + example: '/houxu/lives/33899', + parameters: { id: '编号,可在对应 Live 页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['houxu.app/lives/:id', 'houxu.app/'], + }, + name: 'Live', + maintainers: ['nczitzk'], + handler, + url: 'houxu.app/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://houxu.app'; @@ -26,10 +49,10 @@ export default async (ctx) => { description: item.link.description, })); - ctx.set('data', { + return { title: `后续 - ${pageResponse.data.title}`, link: currentUrl, item: items, description: pageResponse.data.summary, - }); -}; + }; +} diff --git a/lib/routes/houxu/maintainer.ts b/lib/routes/houxu/maintainer.ts deleted file mode 100644 index 76f8ec35e..000000000 --- a/lib/routes/houxu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/events': ['nczitzk'], - '/lives/:id': ['nczitzk'], - '/memory': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/houxu/memory.ts b/lib/routes/houxu/memory.ts index 52a00e164..08977a18f 100644 --- a/lib/routes/houxu/memory.ts +++ b/lib/routes/houxu/memory.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/memory', + categories: ['new-media'], + example: '/houxu/memory', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['houxu.app/memory', 'houxu.app/'], + }, + name: '跟踪', + maintainers: ['nczitzk'], + handler, + url: 'houxu.app/memory', +}; + +async function handler(ctx) { const rootUrl = 'https://houxu.app'; const apiUrl = `${rootUrl}/api/1/lives/updated?limit=${ctx.req.query('limit') ?? 50}`; const currentUrl = `${rootUrl}/memory`; @@ -32,9 +55,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: '后续 - 跟踪', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/houxu/namespace.ts b/lib/routes/houxu/namespace.ts new file mode 100644 index 000000000..81921ab0c --- /dev/null +++ b/lib/routes/houxu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '后续', + url: 'houxu.app', +}; diff --git a/lib/routes/houxu/radar.ts b/lib/routes/houxu/radar.ts deleted file mode 100644 index 942e0d6b4..000000000 --- a/lib/routes/houxu/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'houxu.app': { - _name: '后续', - '.': [ - { - title: '热点', - docs: 'https://docs.rsshub.app/routes/new-media#hou-xu-re-dian', - source: ['/'], - target: '/houxu', - }, - { - title: '跟踪', - docs: 'https://docs.rsshub.app/routes/new-media#hou-xu-gen-zong', - source: ['/memory', '/'], - target: '/houxu/memory', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#hou-xu-zhuan-lan', - source: ['/events', '/'], - target: '/houxu/events', - }, - { - title: 'Live', - docs: 'https://docs.rsshub.app/routes/new-media#hou-xu-live', - source: ['/lives/:id', '/'], - target: '/houxu/lives/:id', - }, - ], - }, -}; diff --git a/lib/routes/houxu/router.ts b/lib/routes/houxu/router.ts deleted file mode 100644 index a336aeab9..000000000 --- a/lib/routes/houxu/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/events', './events'); - router.get('/featured', './index'); - router.get('/index', './index'); - router.get('/lives/:id', './lives'); - router.get('/memory', './memory'); - router.get('/', './index'); -}; diff --git a/lib/routes/howtoforge/maintainer.ts b/lib/routes/howtoforge/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/howtoforge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/howtoforge/namespace.ts b/lib/routes/howtoforge/namespace.ts new file mode 100644 index 000000000..b421fe1f4 --- /dev/null +++ b/lib/routes/howtoforge/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Howtoforge Linux Tutorials', + url: 'howtoforge.com', +}; diff --git a/lib/routes/howtoforge/radar.ts b/lib/routes/howtoforge/radar.ts deleted file mode 100644 index 10253ad20..000000000 --- a/lib/routes/howtoforge/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'howtoforge.com': { - _name: 'Howtoforge Linux Tutorials', - '.': [ - { - title: '学习', - docs: 'https://docs.rsshub.app/routes/study#howtoforge-linux-tutorials', - source: ['/'], - target: '/howtoforge', - }, - ], - }, -}; diff --git a/lib/routes/howtoforge/router.ts b/lib/routes/howtoforge/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/howtoforge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/howtoforge/rss.ts b/lib/routes/howtoforge/rss.ts index 7709dee75..51619b028 100644 --- a/lib/routes/howtoforge/rss.ts +++ b/lib/routes/howtoforge/rss.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['howtoforge.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'howtoforge.com/', +}; + +async function handler() { const currentUrl = 'https://www.howtoforge.com'; const response = await got(`${currentUrl}/feed.rss`); const $ = load(response.data, { xmlMode: true }); @@ -23,10 +36,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: titleMain, description: descriptionMain, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hoyolab/maintainer.ts b/lib/routes/hoyolab/maintainer.ts deleted file mode 100644 index a7adf7cb3..000000000 --- a/lib/routes/hoyolab/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:language/:gids/:type': ['ZenoTian'], -}; diff --git a/lib/routes/hoyolab/namespace.ts b/lib/routes/hoyolab/namespace.ts new file mode 100644 index 000000000..70d118562 --- /dev/null +++ b/lib/routes/hoyolab/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'HoYoLAB', + url: 'hoyolab.com', +}; diff --git a/lib/routes/hoyolab/news.ts b/lib/routes/hoyolab/news.ts index 419c10710..72a1a6838 100644 --- a/lib/routes/hoyolab/news.ts +++ b/lib/routes/hoyolab/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -73,7 +74,49 @@ const getPostContent = (list, { language }) => }) ); -export default async (ctx) => { +export const route: Route = { + path: '/news/:language/:gids/:type', + categories: ['game'], + example: '/hoyolab/news/zh-cn/2/2', + parameters: { language: 'Language', gids: 'Game ID', type: 'Announcement type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Official Announcement', + maintainers: ['ZenoTian'], + handler, + description: `| Language | Code | + | ---------------- | ----- | + | 简体中文 | zh-cn | + | 繁體中文 | zh-tw | + | 日本語 | ja-jp | + | 한국어 | ko-kr | + | English (US) | en-us | + | Español (EU) | es-es | + | Français | fr-fr | + | Deutsch | de-de | + | Русский | ru-ru | + | Português | pt-pt | + | Español (Latino) | es-mx | + | Indonesia | id-id | + | Tiếng Việt | vi-vn | + | ภาษาไทย | th-th | + + | Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero | + | ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- | + | 1 | 2 | 4 | 5 | 6 | 8 | + + | Notices | Events | Info | + | ------- | ------ | ---- | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { try { const { type, gids, language } = ctx.req.param(); const params = { @@ -86,15 +129,15 @@ export default async (ctx) => { const typeInfo = await getI18nType(language, cache.tryGet); const list = await getEventList(params); const items = await getPostContent(list, params); - ctx.set('data', { + return { title: `HoYoLAB-${gameInfo.name}-${typeInfo[type].title}`, link: `${LINK}/circles/${gids}/${OFFICIAL_PAGE_TYPE[gids]}/official?page_type=${OFFICIAL_PAGE_TYPE[gids]}&page_sort=${typeInfo[type].sort}`, item: items, image: gameInfo.icon, icon: gameInfo.icon, logo: gameInfo.icon, - }); + }; } catch (error) { logger.error(error); } -}; +} diff --git a/lib/routes/hoyolab/radar.ts b/lib/routes/hoyolab/radar.ts deleted file mode 100644 index 7b7f1ed9a..000000000 --- a/lib/routes/hoyolab/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'hoyolab.com': { - _name: 'HoYoLAB', - '.': [ - { - title: '活动公告资讯', - docs: 'https://docs.rsshub.app/routes/game#hoyolab', - source: ['/', '/circles/:gid/:unknow/official'], - target: (params, url) => { - const typeMap = { - notices: '1', - events: '2', - news: '3', - }; - const query = new URL(url).searchParams; - const type = typeMap[query.get('page_sort')] || '2'; - return `/hoyolab/news/zh-cn/${params?.gid || 2}/${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/hoyolab/router.ts b/lib/routes/hoyolab/router.ts deleted file mode 100644 index ee898d277..000000000 --- a/lib/routes/hoyolab/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:language/:gids/:type', './news'); -}; diff --git a/lib/routes/hpoi/all.ts b/lib/routes/hpoi/all.ts index 514a2b6cd..a63baec89 100644 --- a/lib/routes/hpoi/all.ts +++ b/lib/routes/hpoi/all.ts @@ -1,3 +1,32 @@ +import { Route } from '@/types'; import { ProcessFeed } from './utils'; -export default async (ctx) => ctx.set('data', await ProcessFeed('all', 0, ctx.req.param('order'))); +export const route: Route = { + path: '/items/all/:order?', + categories: ['anime'], + example: '/hpoi/items/all', + parameters: { order: '排序, 见下表,默认为 add' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.hpoi.net/hobby/all'], + target: '/items/all', + }, + name: '所有周边', + maintainers: ['DIYgod'], + handler, + url: 'www.hpoi.net/hobby/all', + description: `| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | + | ------- | ---- | ------ | -------- | -------- | ------ | + | release | add | hits | hits7Day | hitsDay | rating |`, +}; + +async function handler(ctx) { + ctx.set('data', await ProcessFeed('all', 0, ctx.req.param('order'))); +} diff --git a/lib/routes/hpoi/banner-item.ts b/lib/routes/hpoi/banner-item.ts index b753e6a30..32f264bd3 100644 --- a/lib/routes/hpoi/banner-item.ts +++ b/lib/routes/hpoi/banner-item.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/bannerItem', + categories: ['anime'], + example: '/hpoi/bannerItem', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.hpoi.net/bannerItem/list'], + }, + name: '热门推荐', + maintainers: ['DIYgod'], + handler, + url: 'www.hpoi.net/bannerItem/list', +}; + +async function handler() { const link = 'https://www.hpoi.net/bannerItem/list?categoryId=0&bannerItemType=0&subType=0&page=1'; const response = await got({ method: 'get', url: link, }); const $ = load(response.data); - ctx.set('data', { + return { title: `Hpoi 手办维基 - 热门推荐`, link, item: $('#content .item') @@ -22,5 +45,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/hpoi/character.ts b/lib/routes/hpoi/character.ts index 750af0c2b..4b53c1fff 100644 --- a/lib/routes/hpoi/character.ts +++ b/lib/routes/hpoi/character.ts @@ -1,3 +1,27 @@ +import { Route } from '@/types'; import { ProcessFeed } from './utils'; -export default async (ctx) => ctx.set('data', await ProcessFeed('character', ctx.req.param('id'), ctx.req.param('order'))); +export const route: Route = { + path: '/items/character/:id/:order?', + categories: ['anime'], + example: '/hpoi/items/character/1035374', + parameters: { id: '角色 ID', order: '排序, 见下表,默认为 add' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '角色周边', + maintainers: ['DIYgod'], + handler, + description: `| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | + | ------- | ---- | ------ | -------- | -------- | ------ | + | release | add | hits | hits7Day | hitsDay | rating |`, +}; + +async function handler(ctx) { + ctx.set('data', await ProcessFeed('character', ctx.req.param('id'), ctx.req.param('order'))); +} diff --git a/lib/routes/hpoi/info.ts b/lib/routes/hpoi/info.ts index 3dfb592f7..1550594db 100644 --- a/lib/routes/hpoi/info.ts +++ b/lib/routes/hpoi/info.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/info/:type?', + categories: ['anime'], + example: '/hpoi/info/all', + parameters: { type: '分类, 见下表, 默认为`all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '情报', + maintainers: ['sanmmm DIYgod'], + handler, + description: `分类 + + | 全部 | 手办 | 模型 | + | ---- | ----- | ----- | + | all | hobby | model |`, +}; + +async function handler(ctx) { const { type = 'all' } = ctx.req.param(); const baseUrl = 'https://www.hpoi.net'; const reqUrl = `${baseUrl}/user/home/ajax`; @@ -42,10 +66,10 @@ export default async (ctx) => { model: '模型', }; const title = `手办维基 - 情报 - ${typeToLabel[type]}`; - ctx.set('data', { + return { title, link: `${baseUrl}/user/home?type=info&catType=${type}`, description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/hpoi/maintainer.ts b/lib/routes/hpoi/maintainer.ts deleted file mode 100644 index b2901c4b9..000000000 --- a/lib/routes/hpoi/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/info/:type?': ['sanmmm DIYgod'], - '/items/all/:order?': ['DIYgod'], - '/items/character/:id/:order?': ['DIYgod'], - '/items/work/:id/:order?': ['DIYgod'], - '/user/:user_id/:caty': ['DIYgod', 'luyuhuang'], - '/bannerItem': ['DIYgod'], -}; diff --git a/lib/routes/hpoi/namespace.ts b/lib/routes/hpoi/namespace.ts new file mode 100644 index 000000000..def496d58 --- /dev/null +++ b/lib/routes/hpoi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hpoi 手办维基', + url: 'www.hpoi.net', +}; diff --git a/lib/routes/hpoi/radar.ts b/lib/routes/hpoi/radar.ts deleted file mode 100644 index 30564743c..000000000 --- a/lib/routes/hpoi/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'hpoi.net': { - _name: 'Hpoi手办维基', - www: [ - { - title: '情报', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - source: ['/user/home'], - target: '/hpoi/info/all', - }, - { - title: '所有周边', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - source: ['/hobby/all'], - target: '/hpoi/items/all', - }, - { - title: '角色周边', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - }, - { - title: '作品周边', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - }, - { - title: '热门推荐', - docs: 'https://docs.rsshub.app/routes/anime#hpoi-shou-ban-wei-ji', - source: ['/bannerItem/list'], - target: '/hpoi/bannerItem', - }, - ], - }, -}; diff --git a/lib/routes/hpoi/router.ts b/lib/routes/hpoi/router.ts deleted file mode 100644 index 4db58d80a..000000000 --- a/lib/routes/hpoi/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/info/:type?', './info'); - router.get('/items/all/:order?', './all'); - router.get('/items/character/:id/:order?', './character'); - router.get('/items/work/:id/:order?', './work'); - router.get('/user/:user_id/:caty', './user'); - router.get('/bannerItem', './banner-item'); -}; diff --git a/lib/routes/hpoi/user.ts b/lib/routes/hpoi/user.ts index 536283a73..f51a0e916 100644 --- a/lib/routes/hpoi/user.ts +++ b/lib/routes/hpoi/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,28 @@ const titleMap = { resell: '有过', }; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user_id/:caty', + categories: ['anime'], + example: '/hpoi/user/116297/buy', + parameters: { user_id: '用户ID', caty: '类别, 见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户动态', + maintainers: ['DIYgod', 'luyuhuang'], + handler, + description: `| 想买 | 预定 | 已入 | 关注 | 有过 | + | ---- | -------- | ---- | ---- | ------ | + | want | preorder | buy | care | resell |`, +}; + +async function handler(ctx) { const { user_id, caty } = ctx.req.param(); const url = `${root_url}/user/${user_id}/hobby?order=actionDate&view=2&favState=${caty}`; @@ -34,10 +56,10 @@ export default async (ctx) => { const title = $('.hpoi-collect-head .info p').eq(0).text() + '的手办 - ' + titleMap[caty]; - ctx.set('data', { + return { title, link: url, item: list, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/hpoi/work.ts b/lib/routes/hpoi/work.ts index 8a57246ca..524398d8a 100644 --- a/lib/routes/hpoi/work.ts +++ b/lib/routes/hpoi/work.ts @@ -1,3 +1,27 @@ +import { Route } from '@/types'; import { ProcessFeed } from './utils'; -export default async (ctx) => ctx.set('data', await ProcessFeed('work', ctx.req.param('id'), ctx.req.param('order'))); +export const route: Route = { + path: '/items/work/:id/:order?', + categories: ['anime'], + example: '/hpoi/items/work/4117491', + parameters: { id: '作品 ID', order: '排序, 见下表,默认为 add' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作品周边', + maintainers: ['DIYgod'], + handler, + description: `| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | + | ------- | ---- | ------ | -------- | -------- | ------ | + | release | add | hits | hits7Day | hitsDay | rating |`, +}; + +async function handler(ctx) { + ctx.set('data', await ProcessFeed('work', ctx.req.param('id'), ctx.req.param('order'))); +} diff --git a/lib/routes/hrbeu/gx/card.ts b/lib/routes/hrbeu/gx/card.ts index 0b9c8b4da..a02b6cfea 100644 --- a/lib/routes/hrbeu/gx/card.ts +++ b/lib/routes/hrbeu/gx/card.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'http://news.hrbeu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gx/card/:column/:id?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const column = ctx.req.param('column'); const id = ctx.req.param('id') || ''; const toUrl = id === '' ? `${rootUrl}/${column}.htm` : `${rootUrl}/${column}/${id}.htm`; @@ -29,9 +37,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: '工学-' + bigTitle, link: toUrl, item: card, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/gx/list.ts b/lib/routes/hrbeu/gx/list.ts index 1e6c4835a..b8539ed4a 100644 --- a/lib/routes/hrbeu/gx/list.ts +++ b/lib/routes/hrbeu/gx/list.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'http://news.hrbeu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gx/list/:column/:id?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const column = ctx.req.param('column'); const id = ctx.req.param('id') || ''; const toUrl = id === '' ? `${rootUrl}/${column}.htm` : `${rootUrl}/${column}/${id}.htm`; @@ -53,9 +61,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '工学-' + bigTitle, link: toUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/job/bigemploy.ts b/lib/routes/hrbeu/job/bigemploy.ts index 777369c51..37949e36d 100644 --- a/lib/routes/hrbeu/job/bigemploy.ts +++ b/lib/routes/hrbeu/job/bigemploy.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/job/bigemploy', + categories: ['university'], + example: '/hrbeu/job/bigemploy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['job.hrbeu.edu.cn/*'], + }, + name: 'Unknown', + maintainers: ['Derekmini'], + handler, + url: 'job.hrbeu.edu.cn/*', +}; + +async function handler() { const response = await got('http://job.hrbeu.edu.cn/HrbeuJY/web'); const $ = load(response.data); @@ -16,10 +39,10 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: '大型招聘会', link: 'http://job.hrbeu.edu.cn/HrbeuJY/web', item: list, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/job/calendar.ts b/lib/routes/hrbeu/job/calendar.ts index 1327a051d..74a9acee3 100644 --- a/lib/routes/hrbeu/job/calendar.ts +++ b/lib/routes/hrbeu/job/calendar.ts @@ -1,9 +1,40 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const rootUrl = 'http://job.hrbeu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/job/calendar', + categories: ['university'], + example: '/hrbeu/job/calendar', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['job.hrbeu.edu.cn/*'], + }, + name: '就业服务平台', + maintainers: ['Derekmini'], + handler, + url: 'job.hrbeu.edu.cn/*', + description: `| 通知公告 | 热点新闻 | + | :------: | :------: | + | tzgg | rdxw | + +#### 大型招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-da-xing-zhao-pin-hui} + + +#### 今日招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-jin-ri-zhao-pin-hui}`, +}; + +async function handler() { const date = new Date(); const year = date.getFullYear(); const month = date.getMonth() + 1; @@ -37,10 +68,10 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: '今日招聘会', link: 'http://job.hrbeu.edu.cn/HrbeuJY/web', item: list, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/job/list.ts b/lib/routes/hrbeu/job/list.ts index a0a65bb67..5a2c5082b 100644 --- a/lib/routes/hrbeu/job/list.ts +++ b/lib/routes/hrbeu/job/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,25 @@ const idMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/job/list/:id', + categories: ['university'], + example: '/hrbeu/job/list/tzgg', + parameters: { id: '栏目,如下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['Derekmini'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(idMap[id].url, { @@ -58,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '就业服务平台-' + idMap[id].name, link: idMap[id].url, item: items, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/maintainer.ts b/lib/routes/hrbeu/maintainer.ts deleted file mode 100644 index b6ea972b3..000000000 --- a/lib/routes/hrbeu/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/job/bigemploy': ['Derekmini'], - '/job/calendar': ['Derekmini'], - '/job/list/:id': ['Derekmini'], - '/gx/:type/:colume/:id?': ['Derekmini'], - '/uae/list/:id': ['Derekmini'], - '/ugs/news/:author?/:category?': ['XYenon'], - '/yjsy/list/:id': ['Derekmini'], -}; diff --git a/lib/routes/hrbeu/namespace.ts b/lib/routes/hrbeu/namespace.ts new file mode 100644 index 000000000..c6ca2928b --- /dev/null +++ b/lib/routes/hrbeu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哈尔滨工程大学', + url: 'yjsy.hrbeu.edu.cn', +}; diff --git a/lib/routes/hrbeu/radar.ts b/lib/routes/hrbeu/radar.ts deleted file mode 100644 index c1ae03cc3..000000000 --- a/lib/routes/hrbeu/radar.ts +++ /dev/null @@ -1,81 +0,0 @@ -export default { - 'hrbeu.edu.cn': { - _name: '哈尔滨工程大学', - yjsy: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:id/list.htm', - target: '/hrbeu/yjsy/list/:id', - }, - ], - job: [ - { - title: '大型招聘会', - docs: 'https://docs.rsshub.app/routes/journal#ha-er-bin-gong-cheng-da-xue', - source: '/*', - target: '/hrbeu/job/bigemploy', - }, - { - title: '今日招聘会', - docs: 'https://docs.rsshub.app/routes/journal#ha-er-bin-gong-cheng-da-xue', - source: '/*', - target: '/hrbeu/job/calendar', - }, - { - title: '就业服务平台-通知公告', - docs: 'https://docs.rsshub.app/routes/journal#ha-er-bin-gong-cheng-da-xue', - source: '/*', - target: '/hrbeu/job/list/tzgg', - }, - { - title: '就业服务平台-热点新闻', - docs: 'https://docs.rsshub.app/routes/journal#ha-er-bin-gong-cheng-da-xue', - source: '/*', - target: '/hrbeu/job/list/rdxw', - }, - ], - news: [ - { - title: '工学', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:column', - target: (params) => `/hrbeu/gx/list/${params.column.replace('.htm', '')}`, - }, - { - title: '工学', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:column/:id', - target: (params) => `/hrbeu/gx/list/${params.column}/${params.id.replace('.htm', '')}`, - }, - { - title: '工学-card', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:column', - target: (params) => `/hrbeu/gx/card/${params.column.replace('.htm', '')}`, - }, - { - title: '工学-card', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:column/:id', - target: (params) => `/hrbeu/gx/card/${params.column}/${params.id.replace('.htm', '')}`, - }, - ], - uae: [ - { - title: '水声工程学院', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:id.htm', - target: '/hrbeu/uae/:id', - }, - ], - ugs: [ - { - title: '本科生院工作通知', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-gong-cheng-da-xue', - source: '/:author/list.htm', - target: '/hrbeu/ugs/news/:author', - }, - ], - }, -}; diff --git a/lib/routes/hrbeu/router.ts b/lib/routes/hrbeu/router.ts deleted file mode 100644 index cacd891bc..000000000 --- a/lib/routes/hrbeu/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/job/bigemploy', './job/bigemploy'); - router.get('/job/calendar', './job/calendar'); - router.get('/job/list/:id', './job/list'); - router.get('/gx/card/:column/:id?', './gx/card'); - router.get('/gx/list/:column/:id?', './gx/list'); - router.get('/uae/:id', './uae/news'); - router.get('/ugs/news/:author?/:category?', './ugs/news'); - router.get('/yjsy/list/:id', './yjsy/list'); -}; diff --git a/lib/routes/hrbeu/uae/news.ts b/lib/routes/hrbeu/uae/news.ts index 3df7c8db5..7db0964f6 100644 --- a/lib/routes/hrbeu/uae/news.ts +++ b/lib/routes/hrbeu/uae/news.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/uae/:id', + categories: ['university'], + example: '/hrbeu/uae/xwdt', + parameters: { id: '栏目编号,在 `URL` 中获取,如果有多级编号,将 `/` 替换为 `-`。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['uae.hrbeu.edu.cn/:id.htm'], + }, + name: '水声工程学院', + maintainers: [], + handler, + description: `| 新闻动态 | 通知公告 | 科学研究 / 科研动态 | + | :------: | :------: | :-----------------: | + | xwdt | tzgg | kxyj-kydt |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id').replaceAll('-', '/'); const host = 'http://uae.hrbeu.edu.cn'; const url = `${host}/${id}.htm`; @@ -59,9 +84,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `水声工程学院 - ${title}`, link: url, item, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/ugs/news.ts b/lib/routes/hrbeu/ugs/news.ts index 341016898..ac9356fd6 100644 --- a/lib/routes/hrbeu/ugs/news.ts +++ b/lib/routes/hrbeu/ugs/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -53,7 +54,78 @@ const authorMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/ugs/news/:author?/:category?', + categories: ['university'], + example: '/hrbeu/ugs/news/jwc/jxap', + parameters: { author: '发布部门,默认为 `gztz`', category: '分类,默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ugs.hrbeu.edu.cn/:author/list.htm'], + target: '/ugs/news/:author', + }, + name: '本科生院工作通知', + maintainers: ['XYenon'], + handler, + description: `author 列表: + + | 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 | + | ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- | + | jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz | + + category 列表: + + \`all\` 为全部 + + 教务处: + + | 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 | + | -------- | -------- | -------- | -------- | -------- | + | jxap | ksgl | xjgl | wytk | cjgl | + + 实践教学与交流处: + + | 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 | + | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | + | syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl | + + 教育评估处: + + | 教学研究与教学成果 | 质量监控 | + | ------------------ | -------- | + | jxyjyjxcg | zljk | + + 专业建设处: + + | 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 | + | -------------- | ---------- | ---------------------- | -------- | -------- | + | zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx | + + 国家大学生文化素质基地:无 + + 教师教学发展中心: + + | 教师培训 | + | -------- | + | jspx | + + 综合办公室: + + | 联系课程 | + | -------- | + | lxkc | + + 工作通知:无`, +}; + +async function handler(ctx) { const author = ctx.req.param('author') || 'gztz'; const category = ctx.req.param('category') || 'all'; const link = baseUrl + authorMap[author][category] + '/list.htm'; @@ -91,9 +163,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '哈尔滨工程大学本科生院工作通知', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/hrbeu/yjsy/list.ts b/lib/routes/hrbeu/yjsy/list.ts index bfdab7f0a..f4692e5d2 100644 --- a/lib/routes/hrbeu/yjsy/list.ts +++ b/lib/routes/hrbeu/yjsy/list.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'http://yjsy.hrbeu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/list/:id', + categories: ['university'], + example: '/hrbeu/yjsy/list/2981', + parameters: { id: '栏目编号,由 `URL` 中获取。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yjsy.hrbeu.edu.cn/:id/list.htm'], + }, + name: '研究生院', + maintainers: ['Derekmini'], + handler, + description: `| 通知公告 | 新闻动态 | 学籍注册 | 奖助学金 | 其他 | + | :------: | :------: | :------: | :------: | :--: | + | 2981 | 2980 | 3009 | 3011 | ... |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`${rootUrl}/${id}/list.htm`, { @@ -50,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '研究生院-' + bigTitle, link: rootUrl.concat('/', id, '/list.htm'), item: items, - }); -}; + }; +} diff --git a/lib/routes/hrbust/jwzx.ts b/lib/routes/hrbust/jwzx.ts index 87d06e58b..15c06b29c 100644 --- a/lib/routes/hrbust/jwzx.ts +++ b/lib/routes/hrbust/jwzx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -17,7 +18,28 @@ const typeMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/jwzx/:type?/:page?', + categories: ['university'], + example: '/hrbust/jwzx', + parameters: { type: '分类名,默认为教务公告', page: '文章数,默认为12' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['LenaNouzen'], + handler, + description: `| 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | + | -------- | -------- | -------- | -------- | + | 351 | 353 | 354 | 355 |`, +}; + +async function handler(ctx) { const page = ctx.req.param('page') || '12'; const base = utils.columnIdBase(ctx.req.param('type')) + '&pagingNumberPer=' + page; const res = await got(base); @@ -29,9 +51,9 @@ export default async (ctx) => { // info, // }; - ctx.set('data', { + return { title: '哈理工教务处' + typeMap[ctx.req.param('type') || 354].name, link: base, item: details, - }); -}; + }; +} diff --git a/lib/routes/hrbust/maintainer.ts b/lib/routes/hrbust/maintainer.ts deleted file mode 100644 index 7f6943e32..000000000 --- a/lib/routes/hrbust/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jwzx/:type?/:page?': ['LenaNouzen'], -}; diff --git a/lib/routes/hrbust/namespace.ts b/lib/routes/hrbust/namespace.ts new file mode 100644 index 000000000..f3c31621f --- /dev/null +++ b/lib/routes/hrbust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哈尔滨理工大学', + url: 'jwzx.hrbust.edu.cn', +}; diff --git a/lib/routes/hrbust/radar.ts b/lib/routes/hrbust/radar.ts deleted file mode 100644 index 46c23a75f..000000000 --- a/lib/routes/hrbust/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hrbust.edu.cn': { - _name: '哈尔滨理工大学', - jwzx: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#ha-er-bin-li-gong-da-xue', - source: '/homepage/*', - target: (params, url) => `/hrbust/jwzx/${new URL(url).searchParams.get('columnId')}`, - }, - ], - }, -}; diff --git a/lib/routes/hrbust/router.ts b/lib/routes/hrbust/router.ts deleted file mode 100644 index 19a640295..000000000 --- a/lib/routes/hrbust/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jwzx/:type?/:page?', './jwzx'); -}; diff --git a/lib/routes/huanqiu/index.ts b/lib/routes/huanqiu/index.ts index 17c5ee70f..983acb6c3 100644 --- a/lib/routes/huanqiu/index.ts +++ b/lib/routes/huanqiu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,32 @@ function getKeysRecursive(dic, key, attr, array) { return array; } -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['traditional-media'], + example: '/huanqiu/news/china', + parameters: { category: '类别,可以使用二级域名作为参数,默认为:china' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['huanqiu.com/'], + }, + name: '分类', + maintainers: ['yuxinliu-alex'], + handler, + url: 'huanqiu.com/', + description: `| 国内新闻 | 国际新闻 | 军事 | 台海 | 评论 | + | -------- | -------- | ---- | ------ | ------- | + | china | world | mil | taiwai | opinion |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'china'; if (!isValidHost(category)) { throw new Error('Invalid category'); @@ -63,11 +89,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${name} - 环球网`, link: host, description: '环球网', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/huanqiu/maintainer.ts b/lib/routes/huanqiu/maintainer.ts deleted file mode 100644 index be7a61f08..000000000 --- a/lib/routes/huanqiu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['yuxinliu-alex'], -}; diff --git a/lib/routes/huanqiu/namespace.ts b/lib/routes/huanqiu/namespace.ts new file mode 100644 index 000000000..22d2e16b7 --- /dev/null +++ b/lib/routes/huanqiu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '环球网', + url: 'huanqiu.com', +}; diff --git a/lib/routes/huanqiu/radar.ts b/lib/routes/huanqiu/radar.ts deleted file mode 100644 index 810549805..000000000 --- a/lib/routes/huanqiu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'huanqiu.com': { - _name: '环球网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#huan-qiu', - source: '/', - target: '/news/huanqiu/:category?', - }, - ], - }, -}; diff --git a/lib/routes/huanqiu/router.ts b/lib/routes/huanqiu/router.ts deleted file mode 100644 index 25b207caa..000000000 --- a/lib/routes/huanqiu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './index'); -}; diff --git a/lib/routes/huggingface/blog-zh.ts b/lib/routes/huggingface/blog-zh.ts index 3a770fef7..b3e5ade14 100644 --- a/lib/routes/huggingface/blog-zh.ts +++ b/lib/routes/huggingface/blog-zh.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog-zh', + categories: ['programming'], + example: '/huggingface/blog-zh', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['huggingface.co/blog/zh', 'huggingface.co/'], + }, + name: '中文博客', + maintainers: ['zcf0508'], + handler, + url: 'huggingface.co/blog/zh', +}; + +async function handler() { const { body: response } = await got('https://huggingface.co/blog/zh'); const $ = load(response); @@ -26,9 +49,9 @@ export default async (ctx) => { author: item.blog.author, })); - ctx.set('data', { + return { title: 'Huggingface 中文博客', link: 'https://huggingface.co/blog/zh', item: items, - }); -}; + }; +} diff --git a/lib/routes/huggingface/daily-papers.ts b/lib/routes/huggingface/daily-papers.ts index 200d6d225..47066c36b 100644 --- a/lib/routes/huggingface/daily-papers.ts +++ b/lib/routes/huggingface/daily-papers.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/daily-papers', + categories: ['programming'], + example: '/huggingface/daily-papers', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['huggingface.co/papers', 'huggingface.co/'], + }, + name: 'Daily Papers', + maintainers: ['zeyugao'], + handler, + url: 'huggingface.co/papers', +}; + +async function handler() { const { body: response } = await got('https://huggingface.co/papers'); const $ = load(response); const papers = $('main > div[data-target="DailyPapers"]').data('props'); @@ -18,9 +41,9 @@ export default async (ctx) => { })) .sort((a, b) => b.upvotes - a.upvotes); - ctx.set('data', { + return { title: 'Huggingface Daily Papers', link: 'https://huggingface.co/papers', item: items, - }); -}; + }; +} diff --git a/lib/routes/huggingface/maintainer.ts b/lib/routes/huggingface/maintainer.ts deleted file mode 100644 index 99238bc21..000000000 --- a/lib/routes/huggingface/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog-zh': ['zcf0508'], - '/daily-papers': ['zeyugao'], -}; diff --git a/lib/routes/huggingface/namespace.ts b/lib/routes/huggingface/namespace.ts new file mode 100644 index 000000000..10db48d63 --- /dev/null +++ b/lib/routes/huggingface/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Huggingface', + url: 'huggingface.co', +}; diff --git a/lib/routes/huggingface/radar.ts b/lib/routes/huggingface/radar.ts deleted file mode 100644 index 5701f0db8..000000000 --- a/lib/routes/huggingface/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'huggingface.co': { - _name: 'Hugging Face', - '.': [ - { - title: 'Daily Papers', - docs: 'https://docs.rsshub.app/routes/programming#huggingface', - source: ['/papers', '/'], - target: '/huggingface/daily-papers', - }, - { - title: '中文博客', - docs: 'https://docs.rsshub.app/routes/programming#huggingface', - source: ['/blog/zh', '/'], - target: '/huggingface/blog-zh', - }, - ], - }, -}; diff --git a/lib/routes/huggingface/router.ts b/lib/routes/huggingface/router.ts deleted file mode 100644 index f74a19089..000000000 --- a/lib/routes/huggingface/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/blog-zh', './blog-zh'); - router.get('/daily-papers', './daily-papers'); -}; diff --git a/lib/routes/hunanpea/maintainer.ts b/lib/routes/hunanpea/maintainer.ts deleted file mode 100644 index 55d07b85b..000000000 --- a/lib/routes/hunanpea/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/rsks/:guid': ['TonyRL'], -}; diff --git a/lib/routes/hunanpea/namespace.ts b/lib/routes/hunanpea/namespace.ts new file mode 100644 index 000000000..cb5beeecb --- /dev/null +++ b/lib/routes/hunanpea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '湖南人事考试网', + url: 'rsks.hunanpea.com', +}; diff --git a/lib/routes/hunanpea/radar.ts b/lib/routes/hunanpea/radar.ts deleted file mode 100644 index 2c11da566..000000000 --- a/lib/routes/hunanpea/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'hunanpea.com': { - _name: '湖南人事考试网', - rsks: [ - { - title: '公告', - docs: 'https://docs.rsshub.app/routes/study#hu-nan-ren-shi-kao-shi-wang', - source: ['/Category/:guid/ArticlesByCategory.do'], - target: '/hunanpea/rsks/:guid', - }, - ], - }, -}; diff --git a/lib/routes/hunanpea/router.ts b/lib/routes/hunanpea/router.ts deleted file mode 100644 index 8014590b9..000000000 --- a/lib/routes/hunanpea/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/rsks/:guid', './rsks'); -}; diff --git a/lib/routes/hunanpea/rsks.ts b/lib/routes/hunanpea/rsks.ts index a7ee231d0..2c891d042 100644 --- a/lib/routes/hunanpea/rsks.ts +++ b/lib/routes/hunanpea/rsks.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/rsks/:guid', + categories: ['study'], + example: '/hunanpea/rsks/2f1a6239-b4dc-491b-92af-7d95e0f0543e', + parameters: { guid: '分类 id,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rsks.hunanpea.com/Category/:guid/ArticlesByCategory.do'], + }, + name: '公告', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'http://rsks.hunanpea.com'; const guid = ctx.req.param('guid'); const link = `${baseUrl}/Category/${guid}/ArticlesByCategory.do?PageIndex=1`; @@ -35,9 +57,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.sitemap h2').text()} - ${$('head title').text()}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/hunau/gfxy/index.ts b/lib/routes/hunau/gfxy/index.ts index 2465b91c9..631d0753b 100644 --- a/lib/routes/hunau/gfxy/index.ts +++ b/lib/routes/hunau/gfxy/index.ts @@ -1,6 +1,33 @@ +import { Route } from '@/types'; import getContent from '../utils/common'; -export default async (ctx) => { +export const route: Route = { + path: '/gfxy/:category?/:page?', + categories: ['university'], + example: '/hunau/gfxy', + parameters: { category: '页面分类,默认为 `tzgg`', page: '页码,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + target: '/:category', + }, + name: '公共管理与法学学院', + maintainers: [], + handler, + url: 'xky.hunau.edu.cn/', + description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | + | ---- | -------- | -------- | --------------- | + | 参数 | tzgg | xyxw | 对应 URL |`, +}; + +async function handler(ctx) { await getContent(ctx, { baseHost: 'https://gfxy.hunau.edu.cn', baseCategory: 'tzgg', // 默认:通知公告 @@ -8,4 +35,4 @@ export default async (ctx) => { baseDescription: '湖南农业大学公共管理与法学学院', baseDeparment: 'gfxy', }); -}; +} diff --git a/lib/routes/hunau/ied.ts b/lib/routes/hunau/ied.ts index 49dd4bbeb..51b4f9946 100644 --- a/lib/routes/hunau/ied.ts +++ b/lib/routes/hunau/ied.ts @@ -1,6 +1,34 @@ +import { Route } from '@/types'; import getContent from './utils/common'; -export default async (ctx) => { +export const route: Route = { + path: '/ied/:type?/:category?/:page?', + categories: ['university'], + example: '/hunau/ied', + parameters: { type: '页面归属,默认为 `xwzx`', category: '页面分类,默认为 `ggtz`', page: '页码,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + target: '/:category', + }, + name: '国际交流与合作处、国际教育学院、港澳台事务办公室', + maintainers: ['lcandy2'], + handler, + url: 'xky.hunau.edu.cn/', + description: `| 分类 | 公告通知 | 新闻快讯 | 其他分类... | + | -------- | -------- | -------- | ----------- | + | type | xwzx | xwzx | 对应 URL | + | category | tzgg | xwkx | 对应 URL |`, +}; + +async function handler(ctx) { await getContent(ctx, { baseHost: 'https://ied.hunau.edu.cn', baseCategory: 'ggtz', // 默认:公告通知 @@ -9,4 +37,4 @@ export default async (ctx) => { baseDescription: '湖南农业大学国际交流与合作处、国际教育学院、港澳台事务办公室', baseDeparment: 'ied', }); -}; +} diff --git a/lib/routes/hunau/jwc.ts b/lib/routes/hunau/jwc.ts index 6f1c99b38..9018eb4ff 100644 --- a/lib/routes/hunau/jwc.ts +++ b/lib/routes/hunau/jwc.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import getContent from './utils/common'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:category?/:page?', + categories: ['university'], + example: '/hunau/jwc', + parameters: { category: '页面分类,默认为 `tzgg`', page: '页码,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + target: '/:category', + }, + name: '教务处', + maintainers: [], + handler, + url: 'xky.hunau.edu.cn/', + description: `| 分类 | 通知公告 | 教务动态 | 其他教务通知... | + | ---- | -------- | -------- | --------------- | + | 参数 | tzgg | jwds | 对应 URL |`, +}; + +async function handler(ctx) { await getContent(ctx, { baseHost: 'https://jwc.hunau.edu.cn', baseCategory: 'tzgg', // 默认:通知公告 baseTitle: '湖南农业大学教务处', baseDeparment: 'jwc', }); -}; +} diff --git a/lib/routes/hunau/maintainer.ts b/lib/routes/hunau/maintainer.ts deleted file mode 100644 index 98c7949f3..000000000 --- a/lib/routes/hunau/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/gfxy/:type?/:page?': ['lcandy2'], - '/ied/:type?/:category?/:page?': ['lcandy2'], - '/jwc/:type?/:page?': ['lcandy2'], - '/xky/:type?/:page?': ['lcandy2'], -}; diff --git a/lib/routes/hunau/namespace.ts b/lib/routes/hunau/namespace.ts new file mode 100644 index 000000000..1dae9f578 --- /dev/null +++ b/lib/routes/hunau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '湖南农业大学', + url: 'gfxy.hunau.edu.cn', +}; diff --git a/lib/routes/hunau/radar.ts b/lib/routes/hunau/radar.ts deleted file mode 100644 index 78fffdf36..000000000 --- a/lib/routes/hunau/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'hunau.edu.cn': { - _name: '湖南农业大学', - gfxy: [ - { - title: '公共管理与法学学院', - docs: 'https://docs.rsshub.app/routes/university#hu-nan-nong-ye-da-xue', - source: ['/', 'tzgg', '/:category'], - target: '/:category', - }, - ], - ied: [ - { - title: '国际交流与合作处', - docs: 'https://docs.rsshub.app/routes/university#hu-nan-nong-ye-da-xue', - source: ['/', '/xwzx/ggtz', '/:type/:category'], - target: '/:type/:category', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#hu-nan-nong-ye-da-xue', - source: ['/', 'tzgg', '/:category'], - target: '/:category', - }, - ], - xky: [ - { - title: '信息与智能科学技术学院', - docs: 'https://docs.rsshub.app/routes/university#hu-nan-nong-ye-da-xue', - source: ['/', 'tzgg_8472', '/:category'], - target: '/:category', - }, - ], - }, -}; diff --git a/lib/routes/hunau/router.ts b/lib/routes/hunau/router.ts deleted file mode 100644 index c84e68023..000000000 --- a/lib/routes/hunau/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/gfxy/:category?/:page?', './gfxy'); - router.get('/ied/:type?/:category?/:page?', './ied'); - router.get('/jwc/:category?/:page?', './jwc'); - router.get('/xky/:category?/:page?', './xky'); -}; diff --git a/lib/routes/hunau/utils/common.ts b/lib/routes/hunau/utils/common.ts index 41895c35c..b75af647c 100644 --- a/lib/routes/hunau/utils/common.ts +++ b/lib/routes/hunau/utils/common.ts @@ -48,7 +48,7 @@ async function getContent(ctx, { baseHost, baseCategory, baseType, baseTitle, ba ) ); - ctx.set('data', { + return { // 源标题 title, description, @@ -56,7 +56,7 @@ async function getContent(ctx, { baseHost, baseCategory, baseType, baseTitle, ba link: url, // 源文章 item: items, - }); + }; } export default getContent; diff --git a/lib/routes/hunau/xky/index.ts b/lib/routes/hunau/xky/index.ts index 6291dcdbb..75b17e64e 100644 --- a/lib/routes/hunau/xky/index.ts +++ b/lib/routes/hunau/xky/index.ts @@ -1,6 +1,33 @@ +import { Route } from '@/types'; import getContent from '../utils/common'; -export default async (ctx) => { +export const route: Route = { + path: '/xky/:category?/:page?', + categories: ['university'], + example: '/hunau/xky', + parameters: { category: '页面分类,默认为 `tzgg_8472`', page: '页码,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + target: '/:category', + }, + name: '信息与智能科学学院', + maintainers: [], + handler, + url: 'xky.hunau.edu.cn/', + description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | + | ---- | ---------- | -------- | --------------- | + | 参数 | tzgg\_8472 | xyxw | 对应 URL |`, +}; + +async function handler(ctx) { await getContent(ctx, { baseHost: 'https://xky.hunau.edu.cn', baseCategory: 'tzgg_8472', // 默认:通知公告 @@ -9,4 +36,4 @@ export default async (ctx) => { baseDeparment: 'xky', baseClass: 'div.right_list ul li:has(a)', }); -}; +} diff --git a/lib/routes/huoxian/maintainer.ts b/lib/routes/huoxian/maintainer.ts deleted file mode 100644 index 74654b0f7..000000000 --- a/lib/routes/huoxian/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/zone': ['p7e4'], -}; diff --git a/lib/routes/huoxian/namespace.ts b/lib/routes/huoxian/namespace.ts new file mode 100644 index 000000000..351daf6dc --- /dev/null +++ b/lib/routes/huoxian/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '火线', + url: 'zone.huoxian.cn', +}; diff --git a/lib/routes/huoxian/radar.ts b/lib/routes/huoxian/radar.ts deleted file mode 100644 index 29e6b8762..000000000 --- a/lib/routes/huoxian/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'huoxian.cn': { - _name: '火线', - zone: [ - { - title: 'Zone', - docs: 'https://docs.rsshub.app/routes/bbs#huo-xian', - }, - ], - }, -}; diff --git a/lib/routes/huoxian/router.ts b/lib/routes/huoxian/router.ts deleted file mode 100644 index b7a7b6677..000000000 --- a/lib/routes/huoxian/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/zone', './zone'); -}; diff --git a/lib/routes/huoxian/zone.ts b/lib/routes/huoxian/zone.ts index 5e7501a79..170b3e48c 100644 --- a/lib/routes/huoxian/zone.ts +++ b/lib/routes/huoxian/zone.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zone', + categories: ['bbs'], + example: '/huoxian/zone', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Zone', + maintainers: ['p7e4'], + handler, +}; + +async function handler() { const { data } = await got('https://zone.huoxian.cn/api/discussions?sort=-createdAt'); const items = data.data.map((item) => ({ title: item.attributes.title, @@ -11,9 +30,9 @@ export default async (ctx) => { author: data.included.find((i) => i.id === item.relationships.user.data.id).attributes.displayName, category: data.included.filter((i) => item.relationships.tags.data.map((t) => t.id).includes(i.id) && i.type === 'tags').map((i) => i.attributes.name), })); - ctx.set('data', { + return { title: '火线 Zone-安全攻防社区', link: 'https://zone.huoxian.cn/', item: items, - }); -}; + }; +} diff --git a/lib/routes/hupu/all.ts b/lib/routes/hupu/all.ts index 448ca9b79..44a72e2f8 100644 --- a/lib/routes/hupu/all.ts +++ b/lib/routes/hupu/all.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,32 @@ import { parseDate, parseRelativeDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/all/:id?', + categories: ['bbs'], + example: '/hupu/all/topic-daily', + parameters: { id: '编号,可在对应热帖版面 URL 中找到,默认为步行街每日话题' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.hupu.com/:category', 'm.hupu.com/'], + target: '/:category', + }, + name: '热帖', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 更多热帖版面参见 [论坛](https://bbs.hupu.com) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'topic-daily'; const rootUrl = 'https://bbs.hupu.com'; @@ -69,9 +95,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `虎扑社区 - ${$('.middle-title, .bbs-sl-web-intro-detail-title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hupu/bbs.ts b/lib/routes/hupu/bbs.ts index a91d07b8c..a789e8435 100644 --- a/lib/routes/hupu/bbs.ts +++ b/lib/routes/hupu/bbs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,32 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/bbs/:id?/:order?', '/bxj/:id?/:order?'], + categories: ['bbs'], + example: '/hupu/bbs/topic-daily', + parameters: { id: '编号,可在对应社区 URL 中找到,默认为#步行街主干道', order: '排序方式,可选 `0` 即 最新回复 或 `1` 即 最新发布,默认为最新回复' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.hupu.com/:category', 'm.hupu.com/'], + target: '/:category', + }, + name: '社区', + maintainers: ['LogicJake', 'nczitzk'], + handler, + description: `:::tip + 更多社区参见 [社区](https://bbs.hupu.com) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '34'; const order = ctx.req.param('order') ?? '1'; @@ -80,10 +106,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `虎扑社区 - ${$('.bbs-sl-web-intro-detail-title').text()}`, link: currentUrl, item: items, description: $('.bbs-sl-web-intro-detail-desc-text').first().text(), - }); -}; + }; +} diff --git a/lib/routes/hupu/index.ts b/lib/routes/hupu/index.ts index f2ce8a3cb..eb7370e62 100644 --- a/lib/routes/hupu/index.ts +++ b/lib/routes/hupu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -19,7 +20,25 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: ['/dept/:category?', '/:category?'], + radar: { + source: ['m.hupu.com/:category', 'm.hupu.com/'], + target: '/:category', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + description: `| NBA | CBA | 足球 | + | --- | --- | ------ | + | nba | cba | soccer | + + :::tip + 电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [\`/hupu/all/all-gg\`](https://rsshub.app/hupu/all/all-gg)。 + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'soccer'; const rootUrl = 'https://m.hupu.com'; @@ -73,9 +92,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `虎扑 - ${categories[category].title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/hupu/maintainer.ts b/lib/routes/hupu/maintainer.ts deleted file mode 100644 index d11eebe63..000000000 --- a/lib/routes/hupu/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/all/:id?': ['nczitzk'], - '/bbs/:id?/:order?': ['LogicJake', 'nczitzk'], - '/bxj/:id?/:order?': ['LogicJake', 'nczitzk'], - '/dept/:category?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/hupu/namespace.ts b/lib/routes/hupu/namespace.ts new file mode 100644 index 000000000..766d4e2ff --- /dev/null +++ b/lib/routes/hupu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '虎扑', + url: '.hupu.com', +}; diff --git a/lib/routes/hupu/radar.ts b/lib/routes/hupu/radar.ts deleted file mode 100644 index 6fdd12fa2..000000000 --- a/lib/routes/hupu/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'hupu.com': { - _name: '虎扑', - '': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/bbs#hu-pu-shou-ye', - source: ['/:category', '/'], - target: '/hupu/:category', - }, - ], - bbs: [ - { - title: '热帖', - docs: 'https://docs.rsshub.app/routes/bbs#hu-pu-re-tie', - source: ['/:id'], - target: '/hupu/all/:id', - }, - ], - m: [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/bbs#hu-pu-shou-ye', - source: ['/:category', '/'], - target: '/hupu/:category', - }, - { - title: '社区', - docs: 'https://docs.rsshub.app/routes/bbs#hu-pu-she-qu', - source: ['/bbs/:id', '/'], - target: '/hupu/bbs/:id/:order', - }, - ], - }, -}; diff --git a/lib/routes/hupu/router.ts b/lib/routes/hupu/router.ts deleted file mode 100644 index ac8e403fd..000000000 --- a/lib/routes/hupu/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/all/:id?', './all'); - router.get('/bbs/:id?/:order?', './bbs'); - router.get('/bxj/:id?/:order?', './bbs'); - router.get('/dept/:category?', './index'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/hust/aia/news.ts b/lib/routes/hust/aia/news.ts index 10996518c..67915aaf0 100755 --- a/lib/routes/hust/aia/news.ts +++ b/lib/routes/hust/aia/news.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/aia/news', '/auto/news'], + categories: ['university'], + example: '/hust/aia/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['aia.hust.edu.cn/xyxw.htm', 'aia.hust.edu.cn/'], + }, + name: '人工智能和自动化学院新闻', + maintainers: ['budui'], + handler, + url: 'aia.hust.edu.cn/xyxw.htm', +}; + +async function handler() { const link = 'https://aia.hust.edu.cn/xyxw.htm'; const response = await got(link); const $ = load(response.data); const list = $('.list li'); - ctx.set('data', { + return { title: '华科人工智能和自动化学院新闻', link, item: @@ -22,5 +45,5 @@ export default async (ctx) => { link: new URL(item.find('a').attr('href'), link).href, }; }), - }); -}; + }; +} diff --git a/lib/routes/hust/aia/notice.ts b/lib/routes/hust/aia/notice.ts index c4e3d96d4..cfa165de8 100755 --- a/lib/routes/hust/aia/notice.ts +++ b/lib/routes/hust/aia/notice.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/aia/notice/:type?', '/auto/notice/:type?'], + categories: ['university'], + example: '/hust/aia/notice', + parameters: { type: '分区,默认为最新通知,可在网页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '人工智能和自动化学院通知', + maintainers: ['budui'], + handler, + description: `| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 | + | ---- | ---- | ---- | ------ | ------ | -------- | ------ | + | | dz | ky | bk | yjs | xgsz | litui |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const baseUrl = 'https://aia.hust.edu.cn'; const link = `${baseUrl}/tzgg${type ? `/${type}` : ''}.htm`; @@ -11,7 +33,7 @@ export default async (ctx) => { const list = $('.list li'); const title = $('title').text(); - ctx.set('data', { + return { title, link, item: @@ -25,5 +47,5 @@ export default async (ctx) => { link: new URL(item.find('a').attr('href'), link).href, }; }), - }); -}; + }; +} diff --git a/lib/routes/hust/maintainer.ts b/lib/routes/hust/maintainer.ts deleted file mode 100644 index 7692ef35f..000000000 --- a/lib/routes/hust/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/aia/news': ['budui'], - '/aia/notice/:type?': ['budui'], - '/auto/news': ['budui'], - '/auto/notice/:type?': ['budui'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/hust/namespace.ts b/lib/routes/hust/namespace.ts new file mode 100644 index 000000000..c4f337abd --- /dev/null +++ b/lib/routes/hust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华中科技大学', + url: 'aia.hust.edu.cn', +}; diff --git a/lib/routes/hust/radar.ts b/lib/routes/hust/radar.ts deleted file mode 100644 index a1b3a0587..000000000 --- a/lib/routes/hust/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'hust.edu.cn': { - _name: '华中科技大学', - aia: [ - { - title: '人工智能和自动化学院新闻', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-ke-ji-da-xue', - source: ['/xyxw.htm', '/'], - target: '/hust/aia/news', - }, - { - title: '人工智能和自动化学院通知', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-ke-ji-da-xue', - source: ['/tzgg/:type', '/tzgg.htm', '/'], - target: (params) => `/hust/aia/notice${params.type ? `/${params.type}` : ''}`, - }, - ], - gszs: [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-zhong-ke-ji-da-xue', - source: ['/zsxx/ggtz.htm', '/'], - target: '/hust/yjs', - }, - ], - }, -}; diff --git a/lib/routes/hust/router.ts b/lib/routes/hust/router.ts deleted file mode 100644 index 5aa03896f..000000000 --- a/lib/routes/hust/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/aia/news', './aia/news'); - router.get('/aia/notice/:type?', './aia/notice'); - router.get('/auto/news', './aia/news'); - router.get('/auto/notice/:type?', './aia/notice'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/hust/yjs.ts b/lib/routes/hust/yjs.ts index f3e071cfb..36fc3faef 100644 --- a/lib/routes/hust/yjs.ts +++ b/lib/routes/hust/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/hust/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gszs.hust.edu.cn/zsxx/ggtz.htm', 'gszs.hust.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'gszs.hust.edu.cn/zsxx/ggtz.htm', +}; + +async function handler() { const link = 'https://gszs.hust.edu.cn/zsxx/ggtz.htm'; const response = await got(link); const $ = load(response.data); const list = $('.main_conRCb li'); - ctx.set('data', { + return { title: '华中科技大学研究生院', link, description: '华中科技大学研究生调剂信息', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/huxiu/brief-column.ts b/lib/routes/huxiu/brief-column.ts index 05e0ba346..ffbca4921 100644 --- a/lib/routes/huxiu/brief-column.ts +++ b/lib/routes/huxiu/brief-column.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiBriefRootUrl, processItems, fetchBriefColumnData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/briefcolumn/:id', + categories: ['new-media'], + example: '/huxiu/briefcolumn/1', + parameters: { id: '简报 id,可在对应简报页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + name: '简报', + maintainers: ['Fatpandac', 'nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -23,8 +42,8 @@ export default async (ctx) => { const data = await fetchBriefColumnData(id); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/channel.ts b/lib/routes/huxiu/channel.ts index 14c33d6f9..339da9bf9 100644 --- a/lib/routes/huxiu/channel.ts +++ b/lib/routes/huxiu/channel.ts @@ -1,9 +1,43 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiArticleRootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: ['/article', '/channel/:id?'], + categories: ['new-media'], + example: '/huxiu/article', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['huxiu.com/article'], + }, + name: '资讯', + maintainers: ['HenryQW', 'nczitzk'], + handler, + description: `| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 | + | ---- | -------- | -------- | ---------- | -------- | + | 10 | 21 | 106 | 103 | 105 | + + | 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | + | ---- | -------- | -------- | -------- | ---- | + | 115 | 22 | 111 | 113 | 114 | + + | 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 102 | 110 | 2 | 112 | 107 | 4 |`, + url: 'huxiu.com/article', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -22,8 +56,8 @@ export default async (ctx) => { const data = await fetchData(currentUrl); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/club.ts b/lib/routes/huxiu/club.ts index 97f39667b..3714685fa 100644 --- a/lib/routes/huxiu/club.ts +++ b/lib/routes/huxiu/club.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiBriefRootUrl, processItems, fetchClubData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/club/:id', + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -24,8 +32,8 @@ export default async (ctx) => { const items = await processItems(response.data.datalist, limit, cache.tryGet); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/collection.ts b/lib/routes/huxiu/collection.ts index 440a76fcf..0112c44a5 100644 --- a/lib/routes/huxiu/collection.ts +++ b/lib/routes/huxiu/collection.ts @@ -1,9 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiArticleRootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:id', + categories: ['new-media'], + example: '/huxiu/collection/212', + parameters: { id: '文集 id,可在对应文集页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + name: '文集', + maintainers: ['AlexdanerZe', 'nczitzk'], + handler, + description: `更多文集请参见 [文集](https://www.huxiu.com/collection)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -21,8 +41,8 @@ export default async (ctx) => { const data = await fetchData(currentUrl); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/maintainer.ts b/lib/routes/huxiu/maintainer.ts deleted file mode 100644 index ebc3aea28..000000000 --- a/lib/routes/huxiu/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/article': ['HenryQW', 'nczitzk'], - '/briefcolumn/:id': ['Fatpandac', 'nczitzk'], - '/channel/:id?': ['nczitzk'], - '/club/:id': ['nczitzk'], - '/collection/:id': ['AlexdanerZe', 'nczitzk'], - '/member/:id/:type?': ['HenryQW', 'nczitzk'], - '/moment': ['nczitzk'], - '/search/:keyword': ['xyqfer', 'HenryQW', 'nczitzk'], - '/tag/:id': ['xyqfer', 'HenryQW', 'nczitzk'], -}; diff --git a/lib/routes/huxiu/member.ts b/lib/routes/huxiu/member.ts index dc08e1cd3..1fca5316e 100644 --- a/lib/routes/huxiu/member.ts +++ b/lib/routes/huxiu/member.ts @@ -1,9 +1,20 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiMemberRootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: ['/author/:id/:type?', '/member/:id/:type?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| TA 的文章 | TA 的 24 小时 | + | --------- | ------------- | + | article | moment |`, +}; + +async function handler(ctx) { const { id, type = 'article' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -21,8 +32,8 @@ export default async (ctx) => { const data = await fetchData(currentUrl); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/moment.ts b/lib/routes/huxiu/moment.ts index dfc48076e..77e17e05d 100644 --- a/lib/routes/huxiu/moment.ts +++ b/lib/routes/huxiu/moment.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiMomentRootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/moment', + categories: ['new-media'], + example: '/huxiu/moment', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['huxiu.com/moment'], + }, + name: '24 小时', + maintainers: ['nczitzk'], + handler, + url: 'huxiu.com/moment', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; const apiUrl = new URL('web-v2/moment/feed', apiMomentRootUrl).href; @@ -19,8 +42,8 @@ export default async (ctx) => { const data = await fetchData(currentUrl); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/namespace.ts b/lib/routes/huxiu/namespace.ts new file mode 100644 index 000000000..c9c55006b --- /dev/null +++ b/lib/routes/huxiu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '虎嗅', + url: 'huxiu.com', +}; diff --git a/lib/routes/huxiu/radar.ts b/lib/routes/huxiu/radar.ts deleted file mode 100644 index 80cadc082..000000000 --- a/lib/routes/huxiu/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'huxiu.com': { - _name: '虎嗅', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-zi-xun', - source: ['/article'], - target: '/huxiu/article', - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-pin-dao', - source: ['/channel'], - target: (params) => `/huxiu/channel/${params.id.replace(/\.html$/, '')}`, - }, - { - title: '24小时', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-24-xiao-shi', - source: ['/moment'], - target: '/huxiu/moment', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-biao-qian', - source: ['/tags/:id'], - target: (params) => `/huxiu/tag/${params.id.replace(/\.html$/, '')}`, - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-sou-suo', - source: ['/'], - target: '/huxiu/search/:keyword', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-zuo-zhe', - source: ['/member/:id/:type'], - target: (params) => `/huxiu/member/${params.id}/${params.type.replace(/\.html$/, '')}`, - }, - { - title: '文集', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-wen-ji', - source: ['/collection/:id'], - target: (params) => `/huxiu/collection/${params.id.replace(/\.html$/, '')}`, - }, - { - title: '简报', - docs: 'https://docs.rsshub.app/routes/new-media#hu-xiu-jian-bao', - source: ['/briefColumn/:id', '/'], - target: (params) => `/huxiu/briefcolumn/${params.id.replace(/\.html$/, '')}`, - }, - ], - }, -}; diff --git a/lib/routes/huxiu/router.ts b/lib/routes/huxiu/router.ts deleted file mode 100644 index b655315bf..000000000 --- a/lib/routes/huxiu/router.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default (router) => { - router.get('/article', './channel'); - router.get('/author/:id/:type?', './member'); - router.get('/briefcolumn/:id', './brief-column'); - router.get('/channel/:id?', './channel'); - router.get('/club/:id', './club'); - router.get('/collection/:id', './collection'); - router.get('/member/:id/:type?', './member'); - router.get('/moment', './moment'); - router.get('/search/:keyword', './search'); - router.get('/tag/:id', './tag'); -}; diff --git a/lib/routes/huxiu/search.ts b/lib/routes/huxiu/search.ts index ecc20edfe..5cfd4bca7 100644 --- a/lib/routes/huxiu/search.ts +++ b/lib/routes/huxiu/search.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, apiSearchRootUrl, generateSignature, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['new-media'], + example: '/huxiu/search/生活', + parameters: { keyword: '关键字' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['huxiu.com/'], + }, + name: '搜索', + maintainers: ['xyqfer', 'HenryQW', 'nczitzk'], + handler, + url: 'huxiu.com/', +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -29,8 +52,8 @@ export default async (ctx) => { ctx.set('json', response.data.datalist); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/huxiu/tag.ts b/lib/routes/huxiu/tag.ts index 1e7a9f233..16e32a306 100644 --- a/lib/routes/huxiu/tag.ts +++ b/lib/routes/huxiu/tag.ts @@ -1,9 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, processItems, fetchData } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:id', + categories: ['new-media'], + example: '/huxiu/tag/291', + parameters: { id: '标签 id,可在对应标签页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: true, + supportScihub: false, + }, + name: '标签', + maintainers: ['xyqfer', 'HenryQW', 'nczitzk'], + handler, + description: `更多标签请参见 [标签](https://www.huxiu.com/tags)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -20,8 +40,8 @@ export default async (ctx) => { const data = await fetchData(currentUrl); - ctx.set('data', { + return { item: items, ...data, - }); -}; + }; +} diff --git a/lib/routes/ianspriggs/index.ts b/lib/routes/ianspriggs/index.ts index c58f0fe08..0f263300e 100644 --- a/lib/routes/ianspriggs/index.ts +++ b/lib/routes/ianspriggs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['blog'], + example: '/ianspriggs/portraits', + parameters: { category: 'Category, see below, 3D PORTRAITS by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `| 3D PORTRAITS | CHARACTERS | + | ------------ | ---------- | + | portraits | characters |`, +}; + +async function handler(ctx) { const { category = 'portraits' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -80,7 +102,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -90,5 +112,5 @@ export default async (ctx) => { logo: icon, subtitle: $('a[aria-current="page"] span.menu-title-text').text(), author, - }); -}; + }; +} diff --git a/lib/routes/ianspriggs/maintainer.ts b/lib/routes/ianspriggs/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/ianspriggs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/ianspriggs/namespace.ts b/lib/routes/ianspriggs/namespace.ts new file mode 100644 index 000000000..7be23c643 --- /dev/null +++ b/lib/routes/ianspriggs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Ian Spriggss', + url: 'ianspriggs.com', +}; diff --git a/lib/routes/ianspriggs/radar.ts b/lib/routes/ianspriggs/radar.ts deleted file mode 100644 index e7602d471..000000000 --- a/lib/routes/ianspriggs/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'ianspriggs.com': { - _name: 'Ian Spriggs', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/blog#ian-spriggs-category', - source: ['/:category'], - target: (params) => { - const category = params.category; - - return `/ianspriggs${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/ianspriggs/router.ts b/lib/routes/ianspriggs/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/ianspriggs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/icac/maintainer.ts b/lib/routes/icac/maintainer.ts deleted file mode 100644 index 2f010411d..000000000 --- a/lib/routes/icac/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:lang?': ['linbuxiao, TonyRL'], -}; diff --git a/lib/routes/icac/namespace.ts b/lib/routes/icac/namespace.ts new file mode 100644 index 000000000..7111af69e --- /dev/null +++ b/lib/routes/icac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hong Kong Independent Commission Against Corruption 香港廉政公署', + url: 'icac.org.hk', +}; diff --git a/lib/routes/icac/news.ts b/lib/routes/icac/news.ts index a2e797e00..89dfad70f 100644 --- a/lib/routes/icac/news.ts +++ b/lib/routes/icac/news.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:lang?', + categories: ['government'], + example: '/icac/news/sc', + parameters: { lang: 'Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese) and `tc`(Traditional Chinese)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['icac.org.hk/:lang/press/index.html'], + target: '/news/:lang', + }, + name: 'Press Releases', + maintainers: ['linbuxiao, TonyRL'], + handler, +}; + +async function handler(ctx) { const BASE_WITH_LANG = utils.langBase(ctx.req.param('lang')); const res = await got.get(`${BASE_WITH_LANG}/press/index.html`); const $ = load(res.data); @@ -37,11 +60,11 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: 'ICAC 新闻公布', link: `${BASE_WITH_LANG}/press/index.html`, description: 'ICAC 新闻公布', language: ctx.req.param('lang') ? utils.LANG_TYPE[ctx.req.param('lang')] : utils.LANG_TYPE.sc, item: items, - }); -}; + }; +} diff --git a/lib/routes/icac/radar.ts b/lib/routes/icac/radar.ts deleted file mode 100644 index cc225f00f..000000000 --- a/lib/routes/icac/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'icac.org.hk': { - _name: '香港廉政公署', - '.': [ - { - title: '新闻公布', - docs: 'https://docs.rsshub.app/routes/government#xiang-gang-lian-zheng-gong-shu', - source: ['/:lang/press/index.html'], - target: '/icac/news/:lang', - }, - ], - }, -}; diff --git a/lib/routes/icac/router.ts b/lib/routes/icac/router.ts deleted file mode 100644 index d203e3a25..000000000 --- a/lib/routes/icac/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:lang?', './news'); -}; diff --git a/lib/routes/icbc/maintainer.ts b/lib/routes/icbc/maintainer.ts deleted file mode 100644 index dc824a4c8..000000000 --- a/lib/routes/icbc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/whpj/:format?': ['leoleoasd'], -}; diff --git a/lib/routes/icbc/namespace.ts b/lib/routes/icbc/namespace.ts new file mode 100644 index 000000000..e77c46120 --- /dev/null +++ b/lib/routes/icbc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国工商银行', + url: 'icbc.com.cn', +}; diff --git a/lib/routes/icbc/radar.ts b/lib/routes/icbc/radar.ts deleted file mode 100644 index 4b6819c5c..000000000 --- a/lib/routes/icbc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'icbc.com.cn': { - _name: '中国工商银行', - '.': [ - { - title: '外汇牌价', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-gong-shang-yin-hang', - source: ['/column/1438058341489590354.html'], - target: '/icbc/whpj', - }, - ], - }, -}; diff --git a/lib/routes/icbc/router.ts b/lib/routes/icbc/router.ts deleted file mode 100644 index 11abba62a..000000000 --- a/lib/routes/icbc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/whpj/:format?', './whpj'); -}; diff --git a/lib/routes/icbc/whpj.ts b/lib/routes/icbc/whpj.ts index 69d65707a..c6c551d72 100644 --- a/lib/routes/icbc/whpj.ts +++ b/lib/routes/icbc/whpj.ts @@ -1,12 +1,39 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/whpj/:format?', + categories: ['other'], + example: '/icbc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91', + parameters: { format: '输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['icbc.com.cn/column/1438058341489590354.html'], + target: '/whpj', + }, + name: '外汇牌价', + maintainers: ['leoleoasd'], + handler, + url: 'icbc.com.cn/column/1438058341489590354.html', + description: `| 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | + | ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- | + | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +}; + +async function handler(ctx) { // yes, insecure // their openssl version isn't safe anyway (https://stackoverflow.com/questions/75763525/curl-35-error0a000152ssl-routinesunsafe-legacy-renegotiation-disabled) const { data } = await got('http://papi.icbc.com.cn/exchanges/ns/getLatest'); const format = ctx.req.param('format'); - ctx.set('data', { + return { title: '中国工商银行外汇牌价', link: 'https://www.icbc.com.cn/column/1438058341489590354.html', item: data.data.map((item) => { @@ -53,5 +80,5 @@ export default async (ctx) => { guid: `${name} ${item.publishDate} ${item.publishTime}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/idaily/index.ts b/lib/routes/idaily/index.ts index a881ebe27..9a5139858 100644 --- a/lib/routes/idaily/index.ts +++ b/lib/routes/idaily/index.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/today/:language?', '/:language?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| 简体中文 | 繁体中文 | + | -------- | -------- | + | zh-hans | zh-hant |`, +}; + +async function handler(ctx) { const { language = 'zh-hans' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -51,7 +62,7 @@ export default async (ctx) => { const title = $('title').text(); const image = new URL('img/idaily/logo_2x.png', currentUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -61,5 +72,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author: title.split(/\s/)[0], allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/idaily/maintainer.ts b/lib/routes/idaily/maintainer.ts deleted file mode 100644 index eaa2f5e92..000000000 --- a/lib/routes/idaily/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language?': ['zphw', 'nczitzk'], -}; diff --git a/lib/routes/idaily/namespace.ts b/lib/routes/idaily/namespace.ts new file mode 100644 index 000000000..98d52e356 --- /dev/null +++ b/lib/routes/idaily/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'iDaily', + url: 'idai.ly', +}; diff --git a/lib/routes/idaily/radar.ts b/lib/routes/idaily/radar.ts deleted file mode 100644 index 54fc37745..000000000 --- a/lib/routes/idaily/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'idai.ly': { - _name: 'iDaily', - '.': [ - { - title: '每日环球视野', - docs: 'https://docs.rsshub.app/routes/new-media#idaily-mei-ri-huan-qiu-shi-ye', - source: ['/'], - target: (_, url) => { - url = new URL(url); - const language = url.searchParams.get('lang'); - - return `/idaily${language ? `/${language}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/idaily/router.ts b/lib/routes/idaily/router.ts deleted file mode 100644 index 559355687..000000000 --- a/lib/routes/idaily/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/today/:language?', './'); - router.get('/:language?', './'); -}; diff --git a/lib/routes/idolypride/maintainer.ts b/lib/routes/idolypride/maintainer.ts deleted file mode 100644 index e210eb342..000000000 --- a/lib/routes/idolypride/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['Mingxia1'], -}; diff --git a/lib/routes/idolypride/namespace.ts b/lib/routes/idolypride/namespace.ts new file mode 100644 index 000000000..fccb01ceb --- /dev/null +++ b/lib/routes/idolypride/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IDOLY PRIDE 偶像荣耀', + url: 'idolypride.jp', +}; diff --git a/lib/routes/idolypride/news.ts b/lib/routes/idolypride/news.ts index ff6325cf2..f26c37d29 100644 --- a/lib/routes/idolypride/news.ts +++ b/lib/routes/idolypride/news.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['anime'], + example: '/idolypride/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['idolypride.jp/news'], + }, + name: 'News', + maintainers: ['Mingxia1'], + handler, + url: 'idolypride.jp/news', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://idolypride.jp/wp-json/wp/v2/news', }); const list = response.data; - ctx.set('data', { + return { title: '偶像荣耀-新闻', link: 'https://idolypride.jp/news', item: list.map((item) => { @@ -25,5 +48,5 @@ export default async (ctx) => { description: rendered, }; }), - }); -}; + }; +} diff --git a/lib/routes/idolypride/radar.ts b/lib/routes/idolypride/radar.ts deleted file mode 100644 index 7aa2eea53..000000000 --- a/lib/routes/idolypride/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'idolypride.jp': { - _name: '偶像荣耀', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/anime#ou-xiang-rong-yao', - source: '/news', - target: '/idolypride/news', - }, - ], - }, -}; diff --git a/lib/routes/idolypride/router.ts b/lib/routes/idolypride/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/idolypride/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/ieee-security/maintainer.ts b/lib/routes/ieee-security/maintainer.ts deleted file mode 100644 index dbd8090bc..000000000 --- a/lib/routes/ieee-security/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/security-privacy': ['ZeddYu'], -}; diff --git a/lib/routes/ieee-security/namespace.ts b/lib/routes/ieee-security/namespace.ts new file mode 100644 index 000000000..4c0a0af48 --- /dev/null +++ b/lib/routes/ieee-security/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IEEE Computer Society', + url: 'ieee-security.org', +}; diff --git a/lib/routes/ieee-security/radar.ts b/lib/routes/ieee-security/radar.ts deleted file mode 100644 index 75f412516..000000000 --- a/lib/routes/ieee-security/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ieee-security.org': { - _name: 'IEEE Computer Society', - '.': [ - { - title: 'IEEE Symposium on Security and Privacy', - docs: 'https://docs.rsshub.app/routes/journal#ieee-computer-society', - source: ['/TC/SP-Index.html', '/'], - target: '/ieee-security/security-privacy', - }, - ], - }, -}; diff --git a/lib/routes/ieee-security/router.ts b/lib/routes/ieee-security/router.ts deleted file mode 100644 index 6c66d4f1e..000000000 --- a/lib/routes/ieee-security/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/security-privacy', './sp'); -}; diff --git a/lib/routes/ieee-security/sp.ts b/lib/routes/ieee-security/sp.ts index 388bd5446..eac291527 100644 --- a/lib/routes/ieee-security/sp.ts +++ b/lib/routes/ieee-security/sp.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const url = 'https://www.ieee-security.org/'; // https://www.ieee-security.org/TC/SP2023/program-papers.html -export default async (ctx) => { +export const route: Route = { + path: '/security-privacy', + categories: ['journal'], + example: '/ieee-security/security-privacy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ieee-security.org/TC/SP-Index.html', 'ieee-security.org/'], + }, + name: 'IEEE Symposium on Security and Privacy', + maintainers: ['ZeddYu'], + handler, + url: 'ieee-security.org/TC/SP-Index.html', + description: `Return results from 2020`, +}; + +async function handler() { const last = new Date().getFullYear() + 1; const urlList = Array.from({ length: last - 2020 }, (_, v) => `${url}TC/SP${v + 2020}/program-papers.html`); const responses = await got.all(urlList.map((url) => got(url))); @@ -26,11 +50,11 @@ export default async (ctx) => { }); }); - ctx.set('data', { + return { title: 'S&P', link: `${url}TC/SP-Index.html`, description: 'IEEE Symposium on Security and Privacy Accepted Papers', allowEmpty: true, item: items.flat(), - }); -}; + }; +} diff --git a/lib/routes/ieee/earlyaccess.ts b/lib/routes/ieee/earlyaccess.ts index ca9367a75..b8692ccbc 100644 --- a/lib/routes/ieee/earlyaccess.ts +++ b/lib/routes/ieee/earlyaccess.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: '/journal/:journal/earlyaccess/:sortType?', + categories: ['journal'], + example: '/ieee/journal/5306045/earlyaccess', + parameters: { journal: 'Issue code, the number of the `isnumber` in the URL', sortType: 'Sort Type, default: `vol-only-seq`, the part of the URL after `sortType`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Early Access Journal', + maintainers: ['5upernova-heng'], + handler, +}; + +async function handler(ctx) { const isnumber = ctx.req.param('journal'); const sortType = ctx.req.param('sortType') ?? 'vol-only-seq'; const host = 'https://ieeexplore.ieee.org'; @@ -73,9 +92,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/ieee/journal.ts b/lib/routes/ieee/journal.ts index 7a3f7224e..a90a5533b 100644 --- a/lib/routes/ieee/journal.ts +++ b/lib/routes/ieee/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: ['/:journal/latest/vol/:sortType?', '/journal/:journal/:sortType?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const punumber = ctx.req.param('journal'); const sortType = ctx.req.param('sortType') ?? 'vol-only-seq'; const host = 'https://ieeexplore.ieee.org'; @@ -74,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/ieee/maintainer.ts b/lib/routes/ieee/maintainer.ts deleted file mode 100644 index 02f4dda3d..000000000 --- a/lib/routes/ieee/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/journal/:journal/:sortType?': ['Derekmini', 'auto-bot-ty'], - '/journal/:journal/recent/:sortType?': ['Derekmini', 'auto-bot-ty'], - '/journal/:journal/earlyaccess/:sortType?': ['5upernova-heng'], -}; diff --git a/lib/routes/ieee/namespace.ts b/lib/routes/ieee/namespace.ts new file mode 100644 index 000000000..67a0f9402 --- /dev/null +++ b/lib/routes/ieee/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IEEE Xplore', + url: 'www.ieee.org', +}; diff --git a/lib/routes/ieee/radar.ts b/lib/routes/ieee/radar.ts deleted file mode 100644 index 00ef09766..000000000 --- a/lib/routes/ieee/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'ieee.org': { - _name: 'IEEE', - www: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: '/*', - target: (params, url) => `/ieee/journal/${new URL(url).searchParams.get('punumber')}`, - }, - { - title: 'Recent', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: '/*', - target: (params, url) => `/ieee/journal/${new URL(url).searchParams.get('punumber')}/recent`, - }, - { - title: 'Early Access Journal', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: '/*', - target: (params, url) => `/ieee/journal/${new URL(url).searchParams.get('isnumber')}/earlyaccess`, - }, - ], - }, -}; diff --git a/lib/routes/ieee/recent.ts b/lib/routes/ieee/recent.ts index f907af287..0b848ea92 100644 --- a/lib/routes/ieee/recent.ts +++ b/lib/routes/ieee/recent.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: ['/:journal/latest/date/:sortType?', '/journal/:journal/recent/:sortType?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const punumber = ctx.req.param('journal'); const sortType = ctx.req.param('sortType') ?? 'vol-only-seq'; const host = 'https://ieeexplore.ieee.org'; @@ -91,9 +99,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${jrnlName} - Recent`, link: jrnlUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/ieee/router.ts b/lib/routes/ieee/router.ts deleted file mode 100644 index df7b9bfee..000000000 --- a/lib/routes/ieee/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/:journal/latest/vol/:sortType?', './journal'); // deprecated - router.get('/:journal/latest/date/:sortType?', './recent'); // deprecated - router.get('/journal/:journal/earlyaccess/:sortType?', './earlyaccess'); - router.get('/journal/:journal/recent/:sortType?', './recent'); - router.get('/journal/:journal/:sortType?', './journal'); -}; diff --git a/lib/routes/ielts/index.ts b/lib/routes/ielts/index.ts index 6ccb03b76..33c08a83c 100644 --- a/lib/routes/ielts/index.ts +++ b/lib/routes/ielts/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -7,7 +8,19 @@ const targetUrl = 'https://ielts.neea.cn/allnews?locale=zh_CN'; import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['ielts.neea.cn/allnews'], + target: '', + }, + name: 'Unknown', + maintainers: ['zenxds'], + handler, + url: 'ielts.neea.cn/allnews', +}; + +async function handler() { const html = await cache.tryGet( targetUrl, async () => { @@ -58,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'IELTS雅思最新消息', link: targetUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ielts/maintainer.ts b/lib/routes/ielts/maintainer.ts deleted file mode 100644 index 15d48a94a..000000000 --- a/lib/routes/ielts/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['zenxds'], -}; diff --git a/lib/routes/ielts/namespace.ts b/lib/routes/ielts/namespace.ts new file mode 100644 index 000000000..0036a9069 --- /dev/null +++ b/lib/routes/ielts/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IELTS 雅思', + url: 'ielts.neea.cn', +}; diff --git a/lib/routes/ielts/radar.ts b/lib/routes/ielts/radar.ts deleted file mode 100644 index e77283a0b..000000000 --- a/lib/routes/ielts/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'neea.cn': { - _name: 'IELTS雅思', - ielts: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/study#ielts-ya-si', - source: ['/allnews'], - target: '/ielts', - }, - ], - }, -}; diff --git a/lib/routes/ielts/router.ts b/lib/routes/ielts/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/ielts/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/ifeng/feng.ts b/lib/routes/ifeng/feng.ts index 4f3ca676c..f076710f6 100644 --- a/lib/routes/ifeng/feng.ts +++ b/lib/routes/ifeng/feng.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { extractDoc, renderVideo } from './utils'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/feng/:id/:type', + categories: ['new-media'], + example: '/ifeng/feng/2583/doc', + parameters: { id: '对应 id,可在 大风号作者页面 找到', type: '类型,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '大风号', + maintainers: ['Jamch'], + handler, + description: `| 文章 | 视频 | + | ---- | ----- | + | doc | video |`, +}; + +async function handler(ctx) { const { id, type } = ctx.req.param(); const { data: userResponse } = await got(`https://ishare.ifeng.com/mediaShare/home/${id}/media`, { headers: { @@ -60,11 +82,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `大风号-${mediaName}-${type === 'doc' ? '文章' : '视频'}`, description: `${honorDesc} ${description}`, image: `https:${logo}`, link: `https://ishare.ifeng.com/mediaShare/home/${id}/media`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ifeng/maintainer.ts b/lib/routes/ifeng/maintainer.ts deleted file mode 100644 index 0e4b03428..000000000 --- a/lib/routes/ifeng/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/feng/:id/:type': ['Jamch'], - '/news/:path?': ['nczitzk'], -}; diff --git a/lib/routes/ifeng/namespace.ts b/lib/routes/ifeng/namespace.ts new file mode 100644 index 000000000..eb086ad00 --- /dev/null +++ b/lib/routes/ifeng/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '凤凰网', + url: 'feng.ifeng.com', +}; diff --git a/lib/routes/ifeng/news.ts b/lib/routes/ifeng/news.ts index d2fa0942a..b69703d35 100644 --- a/lib/routes/ifeng/news.ts +++ b/lib/routes/ifeng/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; const rootUrl = 'https://news.ifeng.com'; @@ -51,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ifeng/radar.ts b/lib/routes/ifeng/radar.ts deleted file mode 100644 index d61679243..000000000 --- a/lib/routes/ifeng/radar.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - 'ifeng.com': { - _name: '凤凰网', - feng: [ - { - title: '大风号', - docs: 'https://docs.rsshub.app/routes/new-media#feng-huang-wang', - source: ['/author/:id'], - target: '/ifeng/feng/:id/doc', - }, - ], - news: [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#feng-huang-wang-zi-xun', - target: (params, url) => `/ifeng/news${new URL(url).toString().match(/ifeng\.com(.*?)$/)[1]}`, - }, - ], - ishare: [ - { - title: '大风号', - docs: 'https://docs.rsshub.app/routes/new-media#feng-huang-wang', - source: ['/mediaShare/home/:id/media'], - target: '/ifeng/feng/:id/doc', - }, - ], - }, -}; diff --git a/lib/routes/ifeng/router.ts b/lib/routes/ifeng/router.ts deleted file mode 100644 index cd224994e..000000000 --- a/lib/routes/ifeng/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/feng/:id/:type', './feng'); - router.get('/news/*', './news'); -}; diff --git a/lib/routes/ifi-audio/download.ts b/lib/routes/ifi-audio/download.ts index a62a3f5e1..6419707f2 100644 --- a/lib/routes/ifi-audio/download.ts +++ b/lib/routes/ifi-audio/download.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'https://ifi-audio.com'; -export default async (ctx) => { +export const route: Route = { + path: '/download/:val/:id', + categories: ['program-update'], + example: '/ifi-audio/download/1503007035/44472', + parameters: { val: 'product val', id: 'product id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Download Hub', + maintainers: ['EthanWng97'], + handler, + description: `:::warning +1. Open [https://ifi-audio.com/download-hub](https://ifi-audio.com/download-hub) and the Network panel +2. Select the device and the corresponding serial number in the website and click Search +3. Find the last request named \`https://ifi-audio.com/wp-admin/admin-ajax.php\` in the Network panel, find out the val and id in the Payload panel, and fill in the url +:::`, +}; + +async function handler(ctx) { const { val, id } = ctx.req.param(); const url = host + '/wp-admin/admin-ajax.php'; @@ -19,7 +43,7 @@ export default async (ctx) => { const $ = load(markup); const latestTitle = $('li[data-category=firmware]:first h4').text(); const latestDownloadLink = $('li[data-category=firmware]:first a').attr('href'); - ctx.set('data', { + return { title: 'iFi audio Download Hub', link: 'https://ifi-audio.com/download-hub/', description: 'iFi audio Download Hub', @@ -30,5 +54,5 @@ export default async (ctx) => { link: latestDownloadLink, }, ], - }); -}; + }; +} diff --git a/lib/routes/ifi-audio/maintainer.ts b/lib/routes/ifi-audio/maintainer.ts deleted file mode 100644 index 613fc43b6..000000000 --- a/lib/routes/ifi-audio/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/download/:val/:id': ['EthanWng97'], -}; diff --git a/lib/routes/ifi-audio/namespace.ts b/lib/routes/ifi-audio/namespace.ts new file mode 100644 index 000000000..2caf35ab4 --- /dev/null +++ b/lib/routes/ifi-audio/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'iFi audio', + url: 'ifi-audio.com', +}; diff --git a/lib/routes/ifi-audio/radar.ts b/lib/routes/ifi-audio/radar.ts deleted file mode 100644 index 6dd65d118..000000000 --- a/lib/routes/ifi-audio/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'ifi-audio.com': { - _name: 'IFI audio', - '.': [ - { - title: 'Download Hub', - docs: 'https://docs.rsshub.app/routes/program-update#ifi-audio', - }, - ], - }, -}; diff --git a/lib/routes/ifi-audio/router.ts b/lib/routes/ifi-audio/router.ts deleted file mode 100644 index c17992cb8..000000000 --- a/lib/routes/ifi-audio/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/download/:val/:id', './download'); -}; diff --git a/lib/routes/iguoguo/index.ts b/lib/routes/iguoguo/index.ts index ce10d89ad..7003b9804 100644 --- a/lib/routes/iguoguo/index.ts +++ b/lib/routes/iguoguo/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,25 @@ const getComments = (a, node) => { } }; -export default async (ctx) => { +export const route: Route = { + path: '/html5', + categories: ['design'], + example: '/iguoguo/html5', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新 H5', + maintainers: ['yuxinliu-alex'], + handler, +}; + +async function handler() { const currentUrl = rootUrl.concat('/html5'); const response = await got({ method: 'get', @@ -66,11 +85,11 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '爱果果', link: currentUrl, description: '爱果果iguoguo是一个优秀酷站、h5、UI素材资源的发布分享平台,是设计师的灵感聚合地和素材下载源。', language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/iguoguo/maintainer.ts b/lib/routes/iguoguo/maintainer.ts deleted file mode 100644 index 8a5ca4e0c..000000000 --- a/lib/routes/iguoguo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/html5': ['yuxinliu-alex'], -}; diff --git a/lib/routes/iguoguo/namespace.ts b/lib/routes/iguoguo/namespace.ts new file mode 100644 index 000000000..b05cd766c --- /dev/null +++ b/lib/routes/iguoguo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '爱果果', + url: 'iguoguo.net', +}; diff --git a/lib/routes/iguoguo/radar.ts b/lib/routes/iguoguo/radar.ts deleted file mode 100644 index 06b534736..000000000 --- a/lib/routes/iguoguo/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'iguoguo.net': { - _name: '爱果果', - '.': [ - { - title: '最新H5', - docs: 'https://docs.rsshub.app/routes/design#ai-guo-guo-h5', - }, - ], - }, -}; diff --git a/lib/routes/iguoguo/router.ts b/lib/routes/iguoguo/router.ts deleted file mode 100644 index b955ceb89..000000000 --- a/lib/routes/iguoguo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/html5', './index'); -}; diff --git a/lib/routes/iiilab/index.ts b/lib/routes/iiilab/index.ts index 9ea0a4522..51deb14c4 100644 --- a/lib/routes/iiilab/index.ts +++ b/lib/routes/iiilab/index.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; const baseUrl = 'https://www.iiilab.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['www.iiilab.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['Joey'], + handler, + url: 'www.iiilab.com/', +}; + +async function handler(ctx) { const link = baseUrl; ctx.set( 'data', @@ -24,4 +37,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/iiilab/maintainer.ts b/lib/routes/iiilab/maintainer.ts deleted file mode 100644 index 497fc6f52..000000000 --- a/lib/routes/iiilab/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['Joey'], -}; diff --git a/lib/routes/iiilab/namespace.ts b/lib/routes/iiilab/namespace.ts new file mode 100644 index 000000000..bb0a14455 --- /dev/null +++ b/lib/routes/iiilab/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '人人都是自媒体', + url: 'www.iiilab.com', +}; diff --git a/lib/routes/iiilab/radar.ts b/lib/routes/iiilab/radar.ts deleted file mode 100644 index 60c4da2d5..000000000 --- a/lib/routes/iiilab/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'iiilab.com': { - _name: '人人都是自媒体', - www: [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/new-media#ren-ren-dou-shi-zi-mei-ti', - source: '/', - target: '/iiilab', - }, - ], - }, -}; diff --git a/lib/routes/iiilab/router.ts b/lib/routes/iiilab/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/iiilab/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/ikea/cn/family-offers.ts b/lib/routes/ikea/cn/family-offers.ts index fa77af05d..0374885af 100644 --- a/lib/routes/ikea/cn/family-offers.ts +++ b/lib/routes/ikea/cn/family-offers.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateProductItem } from './utils'; @@ -32,7 +33,29 @@ const productRequest = async (productIds) => { return response.data; }; -export default async (ctx) => { +export const route: Route = { + path: '/cn/family_offers', + categories: ['shopping'], + example: '/ikea/cn/family_offers', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ikea.cn/cn/zh/offers/family-offers', 'ikea.cn/'], + }, + name: '中国 - 会员特惠', + maintainers: ['jzhangdev'], + handler, + url: 'ikea.cn/cn/zh/offers/family-offers', +}; + +async function handler() { const familyPriceProductIds = []; const productRequests = []; @@ -61,10 +84,10 @@ export default async (ctx) => { const productResponses = await Promise.all(productRequests); const products = productResponses.flat(); - ctx.set('data', { + return { title: 'IKEA 宜家 - 会员特惠', link: 'https://www.ikea.cn/cn/zh/offers/family-offers/', description: '会员特惠', item: products.map((element) => generateProductItem(element)), - }); -}; + }; +} diff --git a/lib/routes/ikea/cn/low-price.ts b/lib/routes/ikea/cn/low-price.ts index aa89b2b43..f08e14594 100644 --- a/lib/routes/ikea/cn/low-price.ts +++ b/lib/routes/ikea/cn/low-price.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateRequestHeaders, generateProductItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/cn/low_price', + categories: ['shopping'], + example: '/ikea/cn/low_price', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40', 'ikea.cn/'], + }, + name: '中国 - 低价优选', + maintainers: ['jzhangdev'], + handler, + url: 'ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40', +}; + +async function handler() { const response = await got({ url: 'https://srv.app.ikea.cn/content/recommendation/v2/product-group/products', headers: generateRequestHeaders(), @@ -13,10 +36,10 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: 'IKEA 宜家 - 低价优选', link: 'https://www.ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40', description: '低价优选', item: response.data.products.map((element) => generateProductItem(element)), - }); -}; + }; +} diff --git a/lib/routes/ikea/cn/new.ts b/lib/routes/ikea/cn/new.ts index ffaf7d143..018adf1c9 100644 --- a/lib/routes/ikea/cn/new.ts +++ b/lib/routes/ikea/cn/new.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateRequestHeaders, generateProductItem } from './utils'; @@ -13,7 +14,29 @@ const request = ({ moreToken = '' }) => json: {}, }); -export default async (ctx) => { +export const route: Route = { + path: '/cn/new', + categories: ['shopping'], + example: '/ikea/cn/new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ikea.cn/cn/zh/new/', 'ikea.cn/'], + }, + name: '中国 - 当季新品推荐', + maintainers: ['jzhangdev'], + handler, + url: 'ikea.cn/cn/zh/new/', +}; + +async function handler() { const allProductSummaries = []; const loadMoreRequest = async ({ moreToken }) => { @@ -30,10 +53,10 @@ export default async (ctx) => { const products = allProductSummaries.flat(); - ctx.set('data', { + return { title: 'IKEA 宜家 - 当季新品推荐', link: 'https://www.ikea.cn/cn/zh/new/', description: '当季新品推荐', item: products.map((element) => generateProductItem(element)), - }); -}; + }; +} diff --git a/lib/routes/ikea/gb/new.ts b/lib/routes/ikea/gb/new.ts index 0b0f432d3..f5851a329 100644 --- a/lib/routes/ikea/gb/new.ts +++ b/lib/routes/ikea/gb/new.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,29 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/gb/new', + categories: ['shopping'], + example: '/ikea/gb/new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ikea.com/gb/en/new/new-products/', 'ikea.com/'], + }, + name: 'UK - New Product Release', + maintainers: ['HenryQW'], + handler, + url: 'ikea.com/gb/en/new/new-products/', +}; + +async function handler() { const link = 'https://www.ikea.com/gb/en/new/new-products/'; const { @@ -48,10 +71,10 @@ export default async (ctx) => { category: p.categoryPath.map((c) => c.name), })); - ctx.set('data', { + return { title: 'New Products - Browse All New Furniture & Home Decor - IKEA', link, description: 'New products released by IKEA UK.', item: items, - }); -}; + }; +} diff --git a/lib/routes/ikea/gb/offer.ts b/lib/routes/ikea/gb/offer.ts index 276853ac3..3ad7e3c36 100644 --- a/lib/routes/ikea/gb/offer.ts +++ b/lib/routes/ikea/gb/offer.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/gb/offer', + categories: ['shopping'], + example: '/ikea/gb/offer', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ikea.com/gb/en/offers', 'ikea.com/'], + }, + name: 'UK - Offers', + maintainers: ['HenryQW'], + handler, + url: 'ikea.com/gb/en/offers', +}; + +async function handler() { const link = 'https://www.ikea.com/gb/en/offers/'; const response = await got(link); @@ -63,10 +86,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'IKEA UK - Offers', link, description: 'Offers by IKEA UK.', item: [...carousel, ...banner], - }); -}; + }; +} diff --git a/lib/routes/ikea/maintainer.ts b/lib/routes/ikea/maintainer.ts deleted file mode 100644 index a765744e9..000000000 --- a/lib/routes/ikea/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/cn/family_offers': ['jzhangdev'], - '/cn/low_price': ['jzhangdev'], - '/cn/new': ['jzhangdev'], - '/gb/new': ['HenryQW'], - '/gb/offer': ['HenryQW'], -}; diff --git a/lib/routes/ikea/namespace.ts b/lib/routes/ikea/namespace.ts new file mode 100644 index 000000000..892618439 --- /dev/null +++ b/lib/routes/ikea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IKEA', + url: 'ikea.com', +}; diff --git a/lib/routes/ikea/radar.ts b/lib/routes/ikea/radar.ts deleted file mode 100644 index a33dc9a64..000000000 --- a/lib/routes/ikea/radar.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default { - 'ikea.com': { - _name: 'IKEA 宜家', - '.': [ - { - title: '英国 - 商品上新', - docs: 'https://docs.rsshub.app/routes/shopping#ikea-yi-jia', - source: ['/gb/en/new/new-products/', '/'], - target: '/ikea/gb/new', - }, - { - title: '英国 - 促销', - docs: 'https://docs.rsshub.app/routes/shopping#ikea-yi-jia', - source: ['/gb/en/offers', '/'], - target: '/ikea/gb/offer', - }, - ], - }, - 'ikea.cn': { - _name: 'IKEA 宜家', - '.': [ - { - title: '中国 - 当季新品推荐', - docs: 'https://docs.rsshub.app/routes/shopping#ikea-yi-jia', - source: ['/cn/zh/new/', '/'], - target: '/ikea/cn/new', - }, - { - title: '中国 - 低价优选', - docs: 'https://docs.rsshub.app/routes/shopping#ikea-yi-jia', - source: ['/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40', '/'], - target: '/ikea/cn/low_price', - }, - { - title: '中国 - 会员特惠', - docs: 'https://docs.rsshub.app/routes/shopping#ikea-yi-jia', - source: ['/cn/zh/offers/family-offers', '/'], - target: '/ikea/cn/family_offers', - }, - ], - }, -}; diff --git a/lib/routes/ikea/router.ts b/lib/routes/ikea/router.ts deleted file mode 100644 index 7fddc4a21..000000000 --- a/lib/routes/ikea/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/cn/family_offers', './cn/family-offers'); - router.get('/cn/low_price', './cn/low-price'); - router.get('/cn/new', './cn/new'); - router.get('/gb/new', './gb/new'); - router.get('/gb/offer', './gb/offer'); -}; diff --git a/lib/routes/imagemagick/changelog.ts b/lib/routes/imagemagick/changelog.ts index a0e6ce4fe..9e1f7011d 100644 --- a/lib/routes/imagemagick/changelog.ts +++ b/lib/routes/imagemagick/changelog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +7,29 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/changelog', + categories: ['program-update'], + example: '/imagemagick/changelog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['imagemagick.org/script/download.php', 'imagemagick.org/script', 'imagemagick.org/'], + }, + name: 'Changelog', + maintainers: ['nczitzk'], + handler, + url: 'imagemagick.org/script/download.php', +}; + +async function handler() { const rootUrl = 'https://imagemagick.org'; const currentUrl = `${rootUrl}/script/download.php`; const logUrl = 'https://github.com/ImageMagick/Website/blob/main/ChangeLog.md'; @@ -39,9 +62,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'ImageMagick - ChangeLog', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/imagemagick/maintainer.ts b/lib/routes/imagemagick/maintainer.ts deleted file mode 100644 index 5d31c6c1c..000000000 --- a/lib/routes/imagemagick/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/changelog': ['nczitzk'], -}; diff --git a/lib/routes/imagemagick/namespace.ts b/lib/routes/imagemagick/namespace.ts new file mode 100644 index 000000000..8bbf90ef9 --- /dev/null +++ b/lib/routes/imagemagick/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ImageMagick', + url: 'imagemagick.org', +}; diff --git a/lib/routes/imagemagick/radar.ts b/lib/routes/imagemagick/radar.ts deleted file mode 100644 index 35dae057f..000000000 --- a/lib/routes/imagemagick/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'imagemagick.org': { - _name: 'Changelog', - '.': [ - { - title: 'ChangeLog', - docs: 'https://docs.rsshub.app/routes/program-update#imagemagick-changelog', - source: ['/script/download.php', '/script', '/'], - target: '/imagemagick/changelog', - }, - ], - }, -}; diff --git a/lib/routes/imagemagick/router.ts b/lib/routes/imagemagick/router.ts deleted file mode 100644 index 697b95cbd..000000000 --- a/lib/routes/imagemagick/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/changelog', './changelog'); -}; diff --git a/lib/routes/imiker/jinghua.ts b/lib/routes/imiker/jinghua.ts index 9346afdb0..a75762a50 100644 --- a/lib/routes/imiker/jinghua.ts +++ b/lib/routes/imiker/jinghua.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/ask/jinghua', + categories: ['new-media'], + example: '/imiker/ask/jinghua', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['imiker.com/explore/find'], + }, + name: '米课圈精华', + maintainers: ['nczitzk'], + handler, + url: 'imiker.com/explore/find', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const rootUrl = 'https://ask.imiker.com'; @@ -76,7 +99,7 @@ export default async (ctx) => { const description = '精华'; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${description}`, link: currentUrl, @@ -87,5 +110,5 @@ export default async (ctx) => { subtitle: description, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/imiker/maintainer.ts b/lib/routes/imiker/maintainer.ts deleted file mode 100644 index d2ac0849b..000000000 --- a/lib/routes/imiker/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ask/jinghua': ['nczitzk'], -}; diff --git a/lib/routes/imiker/namespace.ts b/lib/routes/imiker/namespace.ts new file mode 100644 index 000000000..9a06cdda5 --- /dev/null +++ b/lib/routes/imiker/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '米课', + url: 'imiker.com', +}; diff --git a/lib/routes/imiker/radar.ts b/lib/routes/imiker/radar.ts deleted file mode 100644 index 53a8e01a5..000000000 --- a/lib/routes/imiker/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'imiker.com': { - _name: '米课', - '.': [ - { - title: '米课圈精华', - docs: 'https://docs.rsshub.app/routes/new-media#mi-ke-mi-ke-quan-jing-hua', - source: ['/explore/find'], - target: '/imiker/ask/jinghua', - }, - ], - }, -}; diff --git a/lib/routes/imiker/router.ts b/lib/routes/imiker/router.ts deleted file mode 100644 index e0393787a..000000000 --- a/lib/routes/imiker/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/ask/jinghua', './jinghua'); -}; diff --git a/lib/routes/indiansinkuwait/latest.ts b/lib/routes/indiansinkuwait/latest.ts index 55a2d8b80..58500dba3 100644 --- a/lib/routes/indiansinkuwait/latest.ts +++ b/lib/routes/indiansinkuwait/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.indiansinkuwait.com'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/indiansinkuwait/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['indiansinkuwait.com/latest-news', 'indiansinkuwait.com/'], + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + url: 'indiansinkuwait.com/latest-news', +}; + +async function handler() { const { data: response } = await got(`${baseUrl}/latest-news`); const $ = load(response); @@ -34,11 +57,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), image: 'https://www.indiansinkuwait.com/apple-touch-icon-152x152-precomposed.png', link: `${baseUrl}/latest-news`, item: items, - }); -}; + }; +} diff --git a/lib/routes/indiansinkuwait/maintainer.ts b/lib/routes/indiansinkuwait/maintainer.ts deleted file mode 100644 index 868a318b2..000000000 --- a/lib/routes/indiansinkuwait/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['TonyRL'], -}; diff --git a/lib/routes/indiansinkuwait/namespace.ts b/lib/routes/indiansinkuwait/namespace.ts new file mode 100644 index 000000000..3a6ff536e --- /dev/null +++ b/lib/routes/indiansinkuwait/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Indians in Kuwait', + url: 'indiansinkuwait.com', +}; diff --git a/lib/routes/indiansinkuwait/radar.ts b/lib/routes/indiansinkuwait/radar.ts deleted file mode 100644 index f6a951649..000000000 --- a/lib/routes/indiansinkuwait/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'indiansinkuwait.com': { - _name: 'Indians in Kuwait', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#indians-in-kuwait', - source: ['/latest-news', '/'], - target: '/indiansinkuwait/latest', - }, - ], - }, -}; diff --git a/lib/routes/indiansinkuwait/router.ts b/lib/routes/indiansinkuwait/router.ts deleted file mode 100644 index cd57ba05c..000000000 --- a/lib/routes/indiansinkuwait/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './latest'); -}; diff --git a/lib/routes/indienova/article.ts b/lib/routes/indienova/article.ts index cbc113812..fb853d7ee 100644 --- a/lib/routes/indienova/article.ts +++ b/lib/routes/indienova/article.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:type', + categories: ['game'], + example: '/indienova/article', + parameters: { type: '类型: `article` 文章,`development` 开发' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['GensouSakuya', 'kt286'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let link = 'https://indienova.com/indie-game-news/'; if (type === 'development') { @@ -16,10 +35,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseItem(item)))); - ctx.set('data', { + return { title: $('head title').text(), link, description: '独立游戏资讯 | indienova 独立游戏', item: items, - }); -}; + }; +} diff --git a/lib/routes/indienova/column.ts b/lib/routes/indienova/column.ts index a6fc7de38..510297d4e 100644 --- a/lib/routes/indienova/column.ts +++ b/lib/routes/indienova/column.ts @@ -1,9 +1,70 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:columnId', + categories: ['game'], + example: '/indienova/column/52', + parameters: { columnId: '专题 ID,可在 URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['indienova.com/column/:columnId'], + }, + name: '专题', + maintainers: ['TonyRL'], + handler, + description: `
    + 专题 ID + + 游戏推荐 + + | itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 | + | --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- | + | 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 | + + 游戏评论 + + | 游必有方 Podcast | 独立游戏潮(RED) | + | ---------------- | ----------------- | + | 6 | 3 | + + 游戏开发 + + | 游戏设计模式 | Roguelike 开发 | GMS 中文教程 | + | ------------ | -------------- | ------------ | + | 15 | 14 | 7 | + + 游戏设计 + + | 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 | + | ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- | + | 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 | + + 游戏文化 + + | NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING | + | --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- | + | 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 | + + Game Jam + + | Ludum Dare | Global Game Jam | + | ---------- | --------------- | + | 31 | 13 | +
    `, +}; + +async function handler(ctx) { const columnId = ctx.req.param('columnId'); const { data: response, url: link } = await got(`${baseUrl}/column/${columnId}`); @@ -13,9 +74,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseItem(item)))); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/indienova/gamedb.ts b/lib/routes/indienova/gamedb.ts index 2d3745039..e1a155100 100644 --- a/lib/routes/indienova/gamedb.ts +++ b/lib/routes/indienova/gamedb.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/gamedb/recent', + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { platform = 'all' } = ctx.req.param(); const baseUrl = 'https://indienova.com'; @@ -48,9 +56,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/indienova/maintainer.ts b/lib/routes/indienova/maintainer.ts deleted file mode 100644 index 6685ddc9b..000000000 --- a/lib/routes/indienova/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/column/:columnId': ['TonyRL'], - '/gamedb/recent': ['TonyRL'], - '/usergames': ['TonyRL'], - '/:type': ['GensouSakuya', 'kt286'], -}; diff --git a/lib/routes/indienova/namespace.ts b/lib/routes/indienova/namespace.ts new file mode 100644 index 000000000..583d78486 --- /dev/null +++ b/lib/routes/indienova/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'indienova 独立游戏', + url: 'indienova.com', +}; diff --git a/lib/routes/indienova/radar.ts b/lib/routes/indienova/radar.ts deleted file mode 100644 index b34d0a558..000000000 --- a/lib/routes/indienova/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'indienova.com': { - _name: 'indienova 独立游戏', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/game#indienova-du-li-you-xi', - source: ['/indie-game-news', '/'], - target: '/indienova/article', - }, - { - title: '开发', - docs: 'https://docs.rsshub.app/routes/game#indienova-du-li-you-xi', - source: ['/indie-game-development', '/'], - target: '/indienova/development', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/game#indienova-du-li-you-xi', - source: ['/column/:columnId'], - target: '/indienova/column/:columnId', - }, - { - title: 'GameDB 游戏库', - docs: 'https://docs.rsshub.app/routes/game#indienova-du-li-you-xi', - source: ['/gamedb/recent/:platform/p/1'], - target: '/indienova/gamedb/recent/:platform', - }, - { - title: '会员开发游戏库', - docs: 'https://docs.rsshub.app/routes/game#indienova-du-li-you-xi', - source: ['/usergames', '/'], - target: '/indienova/usergames', - }, - ], - }, -}; diff --git a/lib/routes/indienova/router.ts b/lib/routes/indienova/router.ts deleted file mode 100644 index 388de398b..000000000 --- a/lib/routes/indienova/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/column/:columnId', './column'); - router.get('/gamedb/recent', './gamedb'); - router.get('/usergames', './usergames'); - router.get('/:type', './article'); -}; diff --git a/lib/routes/indienova/usergames.ts b/lib/routes/indienova/usergames.ts index b794ee51d..b7025c554 100644 --- a/lib/routes/indienova/usergames.ts +++ b/lib/routes/indienova/usergames.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/usergames', + categories: ['game'], + example: '/indienova/usergames', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['indienova.com/usergames', 'indienova.com/'], + }, + name: '会员开发游戏库', + maintainers: ['TonyRL'], + handler, + url: 'indienova.com/usergames', +}; + +async function handler() { const baseUrl = 'https://indienova.com'; const { data: response, url: link } = await got(`${baseUrl}/usergames`); @@ -35,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/inewsweek/index.ts b/lib/routes/inewsweek/index.ts index de3819560..f21c7c681 100644 --- a/lib/routes/inewsweek/index.ts +++ b/lib/routes/inewsweek/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,33 @@ import iconv from 'iconv-lite'; const rootUrl = 'http://news.inewsweek.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/:channel', + categories: ['traditional-media'], + example: '/inewsweek/survey', + parameters: { channel: '栏目' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['inewsweek.cn/:channel', 'inewsweek.cn/'], + }, + name: '栏目', + maintainers: ['changren-wcr'], + handler, + description: `提取文章全文。 + + | 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 | + | ----- | -------- | ------- | ------- | ----- | ------ | ------ | + | cover | politics | society | finance | world | survey | people |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const url = `${rootUrl}/${channel}`; const response = await got(url, { @@ -46,9 +73,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/inewsweek/maintainer.ts b/lib/routes/inewsweek/maintainer.ts deleted file mode 100644 index 2e03ddc96..000000000 --- a/lib/routes/inewsweek/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel': ['changren-wcr'], -}; diff --git a/lib/routes/inewsweek/namespace.ts b/lib/routes/inewsweek/namespace.ts new file mode 100644 index 000000000..0ba287079 --- /dev/null +++ b/lib/routes/inewsweek/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国新闻周刊', + url: 'inewsweek.cn', +}; diff --git a/lib/routes/inewsweek/radar.ts b/lib/routes/inewsweek/radar.ts deleted file mode 100644 index 0150c2f76..000000000 --- a/lib/routes/inewsweek/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'inewsweek.cn': { - _name: '中国新闻周刊', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-guo-xin-wen-zhou-kan', - source: ['/:channel', '/'], - target: '/inewsweek/:channel', - }, - ], - }, -}; diff --git a/lib/routes/inewsweek/router.ts b/lib/routes/inewsweek/router.ts deleted file mode 100644 index 2a73869aa..000000000 --- a/lib/routes/inewsweek/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel', './index'); -}; diff --git a/lib/routes/infoq/maintainer.ts b/lib/routes/infoq/maintainer.ts deleted file mode 100644 index 2f1749836..000000000 --- a/lib/routes/infoq/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/recommend': ['brilon'], - '/topic/:id': ['brilon'], -}; diff --git a/lib/routes/infoq/namespace.ts b/lib/routes/infoq/namespace.ts new file mode 100644 index 000000000..0f48f6db3 --- /dev/null +++ b/lib/routes/infoq/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'InfoQ 中文', + url: 'infoq.cn', +}; diff --git a/lib/routes/infoq/radar.ts b/lib/routes/infoq/radar.ts deleted file mode 100644 index c661ceb3a..000000000 --- a/lib/routes/infoq/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'infoq.cn': { - _name: 'InfoQ 中文', - '.': [ - { - title: '推荐', - docs: 'https://docs.rsshub.app/routes/new-media#infoq-zhong-wen', - source: ['/'], - target: '/infoq/recommend', - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/new-media#infoq-zhong-wen', - source: ['/topic/:id'], - target: '/infoq/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/infoq/recommend.ts b/lib/routes/infoq/recommend.ts index 5da671861..6c8032658 100644 --- a/lib/routes/infoq/recommend.ts +++ b/lib/routes/infoq/recommend.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/recommend', + categories: ['new-media'], + example: '/infoq/recommend', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['infoq.cn/'], + }, + name: '推荐', + maintainers: ['brilon'], + handler, + url: 'infoq.cn/', +}; + +async function handler(ctx) { const apiUrl = 'https://www.infoq.cn/public/v1/my/recommond'; const pageUrl = 'https://www.infoq.cn'; @@ -18,9 +41,9 @@ export default async (ctx) => { const data = resp.data.data; const items = await utils.ProcessFeed(data, cache); - ctx.set('data', { + return { title: 'InfoQ 推荐', link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/infoq/router.ts b/lib/routes/infoq/router.ts deleted file mode 100644 index aeb257dc6..000000000 --- a/lib/routes/infoq/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/recommend', './recommend'); - router.get('/topic/:id', './topic'); -}; diff --git a/lib/routes/infoq/topic.ts b/lib/routes/infoq/topic.ts index 4505c7b7a..7b21b5a5e 100644 --- a/lib/routes/infoq/topic.ts +++ b/lib/routes/infoq/topic.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id', + categories: ['new-media'], + example: '/infoq/topic/1', + parameters: { id: '话题id,可在 [InfoQ全部话题](https://www.infoq.cn/topics) 页面找到URL里的话题id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['infoq.cn/topic/:id'], + }, + name: '话题', + maintainers: ['brilon'], + handler, +}; + +async function handler(ctx) { const paramId = ctx.req.param('id'); const apiUrl = 'https://www.infoq.cn/public/v1/article/getList'; const infoUrl = 'https://www.infoq.cn/public/v1/topic/getInfo'; @@ -33,11 +55,11 @@ export default async (ctx) => { const data = resp.data.data; const items = await utils.ProcessFeed(data, cache); - ctx.set('data', { + return { title: `InfoQ 话题 - ${topicName}`, description: info.data.data.desc, image: info.data.data.cover, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/informs/index.ts b/lib/routes/informs/index.ts index 7128e3bc2..6da934218 100644 --- a/lib/routes/informs/index.ts +++ b/lib/routes/informs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,25 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://pubsonline.informs.org'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['journal'], + example: '/informs/mnsc', + parameters: { category: 'Category, can be found in the url of the page, `orsc` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'orsc'; const cateUrl = `${rootUrl}/toc/${category}/0/0`; @@ -70,9 +89,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `INFORMS - ${category}`, link: cateUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/informs/maintainer.ts b/lib/routes/informs/maintainer.ts deleted file mode 100644 index 5c86d7ea7..000000000 --- a/lib/routes/informs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['Fatpandac'], -}; diff --git a/lib/routes/informs/namespace.ts b/lib/routes/informs/namespace.ts new file mode 100644 index 000000000..36ee623ed --- /dev/null +++ b/lib/routes/informs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'INFORMS', + url: 'pubsonline.informs.org', +}; diff --git a/lib/routes/informs/radar.ts b/lib/routes/informs/radar.ts deleted file mode 100644 index f3f613a3e..000000000 --- a/lib/routes/informs/radar.ts +++ /dev/null @@ -1,109 +0,0 @@ -export default { - 'informs.org': { - _name: 'INFORMS', - pubsonline: [ - { - title: 'Decision Analysis', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/deca', '/toc/deca/0/0'], - target: `/informs/deca`, - }, - { - title: 'Marketing Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/mksc', '/toc/mksc/0/0'], - target: `/informs/mksc`, - }, - { - title: 'Information Systems Research', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/isrc', '/toc/isrc/0/0'], - target: `/informs/isrc`, - }, - { - title: 'Mathematics of Operations Research', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/moor', '/toc/moor/0/0'], - target: `/informs/moor`, - }, - { - title: 'INFORMS Journal on Applied Analytics', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/inte', '/toc/inte/0/0'], - target: `/informs/inte`, - }, - { - title: 'Operations Research', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/opre', '/toc/opre/0/0'], - target: `/informs/opre`, - }, - { - title: 'INFORMS Journal on Computing', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/ijoc', '/toc/ijoc/0/0'], - target: `/informs/ijoc`, - }, - { - title: 'Organization Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/orsc', '/toc/orsc/0/0'], - target: `/informs/orsc`, - }, - { - title: 'INFORMS Journal on Data Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/ijds', '/toc/ijds/0/0'], - target: `/informs/ijds`, - }, - { - title: 'Service Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/serv', '/toc/serv/0/0'], - target: `/informs/serv`, - }, - { - title: 'INFORMS Journal on Optimization', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/ijoo', '/toc/ijoo/0/0'], - target: `/informs/ijoo`, - }, - { - title: 'Stochastic Systems', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/stsy', '/toc/stsy/0/0'], - target: `/informs/stsy`, - }, - { - title: 'INFORMS Transactions on Education', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/ited', '/toc/ited/0/0'], - target: `/informs/ited`, - }, - { - title: 'Strategy Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/stsc', '/toc/stsc/0/0'], - target: `/informs/stsc`, - }, - { - title: 'Management Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/mnsc', '/toc/mnsc/0/0'], - target: `/informs/mnsc`, - }, - { - title: 'Transportation Science', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/trsc', '/toc/trsc/0/0'], - target: `/informs/trsc`, - }, - { - title: 'Manufacturing & Service Operations Management', - docs: 'https://docs.rsshub.app/routes/journal#ieee-xplore', - source: ['/journal/msom', '/toc/msom/0/0'], - target: `/informs/msom`, - }, - ], - }, -}; diff --git a/lib/routes/informs/router.ts b/lib/routes/informs/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/informs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/inoreader/index.ts b/lib/routes/inoreader/index.ts index 3967b5136..3f5669149 100644 --- a/lib/routes/inoreader/index.ts +++ b/lib/routes/inoreader/index.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/html_clip/:user/:tag', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const type = 'html'; const user = ctx.req.param('user'); const tag = ctx.req.param('tag'); @@ -18,7 +26,7 @@ export default async (ctx) => { const $ = load(data); const entries = $('#snip_body>.article_content'); - ctx.set('data', { + return { title: $('.header_text').text().trim(), link: currentUrl, item: entries @@ -41,5 +49,5 @@ export default async (ctx) => { }) .get(), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/inoreader/maintainer.ts b/lib/routes/inoreader/maintainer.ts deleted file mode 100644 index 9119f8c13..000000000 --- a/lib/routes/inoreader/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/html_clip/:user/:tag/:num?': ['BeautyyuYanli'], - '/rss/:user/:tag': ['EthanWng97'], -}; diff --git a/lib/routes/inoreader/namespace.ts b/lib/routes/inoreader/namespace.ts new file mode 100644 index 000000000..1474f49c4 --- /dev/null +++ b/lib/routes/inoreader/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Inoreader', + url: 'inoreader.com', +}; diff --git a/lib/routes/inoreader/radar.ts b/lib/routes/inoreader/radar.ts deleted file mode 100644 index 3c9e818cd..000000000 --- a/lib/routes/inoreader/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'inoreader.com': { - _name: 'Inoreader', - '.': [ - { - title: 'HTML Clip', - docs: 'https://docs.rsshub.app/routes/reading#inoreader', - source: ['/stream/user/:user/tag/:tag/*'], - target: (params, url) => { - const origin = new URL(url); - const limit = origin.searchParams.get('n'); - return `/inoreader/html_clip/${params.user}/${params.tag}` + (limit ? `?limit=${limit}` : ''); - }, - }, - { - title: 'RSS', - docs: 'https://docs.rsshub.app/routes/reading#inoreader', - source: ['/stream/user/:user/tag/:tag'], - target: (params) => `/inoreader/rss/${params.user}/${params.tag}`, - }, - ], - }, -}; diff --git a/lib/routes/inoreader/router.ts b/lib/routes/inoreader/router.ts deleted file mode 100644 index ab15edb6d..000000000 --- a/lib/routes/inoreader/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/html_clip/:user/:tag', './index'); - router.get('/rss/:user/:tag', './rss'); -}; diff --git a/lib/routes/inoreader/rss.ts b/lib/routes/inoreader/rss.ts index a945b34e9..2a5e95ae4 100644 --- a/lib/routes/inoreader/rss.ts +++ b/lib/routes/inoreader/rss.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/rss/:user/:tag', + categories: ['reading'], + example: '/inoreader/rss/1005137674/user-favorites', + parameters: { user: 'user id, the interger after user/ in the example URL', tag: 'tag, the string after tag/ in the example URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'RSS', + maintainers: ['EthanWng97'], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const tag = ctx.req.param('tag'); const rootUrl = 'https://www.inoreader.com/stream'; @@ -36,12 +55,12 @@ export default async (ctx) => { category: item?.categories ?? [], }; }); - ctx.set('data', { + return { title: feed.title, itunes_author: 'Inoreader', image: 'https://www.inoreader.com/brand/img/ino_app_icon.png', link: feed.link, description: feed.description, item: feed.items, - }); -}; + }; +} diff --git a/lib/routes/instagram/maintainer.ts b/lib/routes/instagram/maintainer.ts deleted file mode 100644 index 1376b5dfa..000000000 --- a/lib/routes/instagram/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:category/:key': ['oppilate', 'DIYgod'], - '/2/:category/:key': ['TonyRL'], -}; diff --git a/lib/routes/instagram/namespace.ts b/lib/routes/instagram/namespace.ts new file mode 100644 index 000000000..fc574ff8e --- /dev/null +++ b/lib/routes/instagram/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Instagram', + url: 'www.instagram.com', + description: `:::tip +It's highly recommended to deploy with Redis cache enabled. +:::`, +}; diff --git a/lib/routes/instagram/private-api/index.ts b/lib/routes/instagram/private-api/index.ts index d789e6cee..0c37f5e2e 100644 --- a/lib/routes/instagram/private-api/index.ts +++ b/lib/routes/instagram/private-api/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { ig, login } from './utils'; import logger from '@/utils/logger'; @@ -54,7 +55,28 @@ async function loadContent(category, nameOrId, tryGet) { }; } -export default async (ctx) => { +export const route: Route = { + path: '/:category/:key', + categories: ['social-media'], + example: '/instagram/user/stefaniejoosten', + parameters: { category: 'Feed category, see table above', key: 'Username / Hashtag name' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Profile / Hashtag - Private API', + maintainers: ['oppilate', 'DIYgod'], + handler, + description: `:::warning +Due to [Instagram Private API](https://github.com/dilame/instagram-private-api) restrictions, you have to setup your credentials on the server. 2FA is not supported. See [deployment guide](https://docs.rsshub.app/install/) for more. +:::`, +}; + +async function handler(ctx) { // https://github.com/dilame/instagram-private-api#feeds // const availableCategories = ["accountFollowers", "accountFollowing", "news", // "discover", "pendingFriendships", "blockedUsers", "directInbox", "directPending", @@ -82,7 +104,7 @@ export default async (ctx) => { throw error; } - ctx.set('data', { + return { title: data.feedTitle, link: data.feedLink, description: data.feedDescription, @@ -91,5 +113,5 @@ export default async (ctx) => { logo: data.feedLogo, image: data.feedLogo, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/instagram/radar.ts b/lib/routes/instagram/radar.ts deleted file mode 100644 index 71ed674bd..000000000 --- a/lib/routes/instagram/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'instagram.com': { - _name: 'Instagram', - www: [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/social-media#instagram', - source: ['/:id'], - target: '/instagram/user/:id', - }, - { - title: 'Tags', - docs: 'https://docs.rsshub.app/routes/social-media#instagram', - source: ['/explore/tags/:key'], - target: '/instagram/tags/:key', - }, - ], - }, -}; diff --git a/lib/routes/instagram/router.ts b/lib/routes/instagram/router.ts deleted file mode 100644 index 8d52ec009..000000000 --- a/lib/routes/instagram/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:category/:key', './private-api/index'); - router.get('/2/:category/:key', './web-api/index'); -}; diff --git a/lib/routes/instagram/web-api/index.ts b/lib/routes/instagram/web-api/index.ts index 0c24f99ef..33f916331 100644 --- a/lib/routes/instagram/web-api/index.ts +++ b/lib/routes/instagram/web-api/index.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { CookieJar } from 'tough-cookie'; import { config } from '@/config'; import { renderItems } from '../common-utils'; import { baseUrl, COOKIE_URL, checkLogin, getUserInfo, getUserFeedItems, getTagsFeedItems, getLoggedOutTagsFeedItems, renderGuestItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/2/:category/:key', + categories: ['social-media'], + example: '/instagram/2/user/stefaniejoosten', + parameters: { category: 'Feed category, see table below', key: 'Username / Hashtag name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Profile / Hashtag', + maintainers: ['TonyRL'], + handler, + description: `:::tip +You may need to setup cookie for a less restrictive rate limit and private profiles. +::: + + +| User timeline | Hashtag | +| ------------- | ------- | +| user | tags |`, +}; + +async function handler(ctx) { // if (!config.instagram || !config.instagram.cookie) { // throw Error('Instagram RSS is disabled due to the lack of relevant config'); // } @@ -76,7 +103,7 @@ export default async (ctx) => { await cache.set('instagram:cookieJar', cookieJar.toJSON(), 31_536_000); - ctx.set('data', { + return { title: feedTitle, link: feedLink, description: feedDescription, @@ -85,5 +112,5 @@ export default async (ctx) => { logo: feedLogo, image: feedLogo, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/instructables/maintainer.ts b/lib/routes/instructables/maintainer.ts deleted file mode 100644 index fd5c1366d..000000000 --- a/lib/routes/instructables/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/projects/:category?': ['wolfg1969'], -}; diff --git a/lib/routes/instructables/namespace.ts b/lib/routes/instructables/namespace.ts new file mode 100644 index 000000000..09df97114 --- /dev/null +++ b/lib/routes/instructables/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Instructables', + url: 'instructables.com', +}; diff --git a/lib/routes/instructables/projects.ts b/lib/routes/instructables/projects.ts index 36b811c72..480723f71 100644 --- a/lib/routes/instructables/projects.ts +++ b/lib/routes/instructables/projects.ts @@ -1,6 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/projects/:category?', + categories: ['other'], + example: '/instructables/projects/circuits', + parameters: { category: 'Category, empty by default, can be found in URL or see the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['instructables.com/projects'], + target: '/projects', + }, + name: 'Projects', + maintainers: ['wolfg1969'], + handler, + url: 'instructables.com/projects', + description: `| All | Circuits | Workshop | Craft | Cooking | Living | Outside | Teachers | + | --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- | + | | circuits | workshop | craft | cooking | living | outside | teachers |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const siteDomain = 'www.instructables.com'; @@ -39,7 +66,7 @@ export default async (ctx) => { const data = response.data; - ctx.set('data', { + return { title: 'Instructables Projects', // 项目的标题 link, // 指向项目的链接 description: 'Instructables Projects', // 描述项目 @@ -52,5 +79,5 @@ export default async (ctx) => { pubDate: new Date(item.document.publishDate).toUTCString(), category: item.document.primaryClassification, })), - }); -}; + }; +} diff --git a/lib/routes/instructables/radar.ts b/lib/routes/instructables/radar.ts deleted file mode 100644 index 091f217ff..000000000 --- a/lib/routes/instructables/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'instructables.com': { - _name: 'Instructables', - '.': [ - { - title: 'All Projects - Instructables', - docs: 'https://docs.rsshub.app/routes/other#instructables', - source: ['/projects'], - target: '/instructables/projects', - }, - { - title: 'Projects - Instructables', - docs: 'https://docs.rsshub.app/routes/other#instructables', - source: ['/:category/projects'], - target: (params) => `/instructables/projects/${params.category}`, - }, - ], - }, -}; diff --git a/lib/routes/instructables/router.ts b/lib/routes/instructables/router.ts deleted file mode 100644 index bfb67f4af..000000000 --- a/lib/routes/instructables/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/projects/:category?', './projects'); -}; diff --git a/lib/routes/iqilu/maintainer.ts b/lib/routes/iqilu/maintainer.ts deleted file mode 100644 index 32c6b380f..000000000 --- a/lib/routes/iqilu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/v/category?': ['nczitzk'], -}; diff --git a/lib/routes/iqilu/namespace.ts b/lib/routes/iqilu/namespace.ts new file mode 100644 index 000000000..babfc0965 --- /dev/null +++ b/lib/routes/iqilu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '齐鲁网', + url: 'v.iqilu.com', +}; diff --git a/lib/routes/iqilu/program.ts b/lib/routes/iqilu/program.ts index 0738edd41..cf8c16e9d 100644 --- a/lib/routes/iqilu/program.ts +++ b/lib/routes/iqilu/program.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/v/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'sdws/sdxwlb' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -84,7 +92,7 @@ export default async (ctx) => { .map((a) => $(a).text()) .join('/'); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -98,5 +106,5 @@ export default async (ctx) => { itunes_author: author, itunes_category: 'News', allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/iqilu/radar.ts b/lib/routes/iqilu/radar.ts deleted file mode 100644 index 676c5a5a6..000000000 --- a/lib/routes/iqilu/radar.ts +++ /dev/null @@ -1,107 +0,0 @@ -export default { - 'iqilu.com': { - _name: '齐鲁网', - v: [ - { - title: '电视节目', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/:category*'], - target: (params) => { - const category = params.category; - - return `/iqilu/v${category ? `/${category}` : ''}`; - }, - }, - { - title: '山东新闻联播', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/sdws/sdxwlb'], - target: '/iqilu/v/sdws/sdxwlb', - }, - { - title: '闪电大视野', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/ggpd/sddsy'], - target: '/iqilu/v/ggpd/sddsy', - }, - { - title: '山东三农新闻联播', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/nkpd/snxw'], - target: '/iqilu/v/nkpd/snxw', - }, - { - title: '每日新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/qlpd/mrxw'], - target: '/iqilu/v/qlpd/mrxw', - }, - { - title: '新闻午班车', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/ggpd/xwwbc'], - target: '/iqilu/v/ggpd/xwwbc', - }, - { - title: '戏宇宙', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/sdws/xyz/'], - target: '/iqilu/v/sdws/xyz/', - }, - { - title: '中国礼 中国乐', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/qlpd/zglzgy'], - target: '/iqilu/v/qlpd/zglzgy', - }, - { - title: '超级语文课', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/sdws/cjywk'], - target: '/iqilu/v/sdws/cjywk', - }, - { - title: '文物里的山东', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/yspd/wwldsd'], - target: '/iqilu/v/yspd/wwldsd', - }, - { - title: '拉呱', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/qlpd/l0'], - target: '/iqilu/v/qlpd/l0', - }, - { - title: '生活帮', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/shpd/shb'], - target: '/iqilu/v/shpd/shb', - }, - { - title: '快乐大赢家', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/zypd/kldyj'], - target: '/iqilu/v/zypd/kldyj', - }, - { - title: '乡村季风', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/nkpd/xcjf'], - target: '/iqilu/v/nkpd/xcjf', - }, - { - title: '健康是1', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/ggpd/jks1'], - target: '/iqilu/v/ggpd/jks1', - }, - { - title: '此时此刻', - docs: 'https://docs.rsshub.app/routes/traditional-media#qi-lu-wang-dian-shi-jie-mu', - source: ['/sdws/cishicike'], - target: '/iqilu/v/sdws/cishicike', - }, - ], - }, -}; diff --git a/lib/routes/iqilu/router.ts b/lib/routes/iqilu/router.ts deleted file mode 100644 index c09cc9676..000000000 --- a/lib/routes/iqilu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/v/:category{.+}?', './program'); -}; diff --git a/lib/routes/iqiyi/album.ts b/lib/routes/iqiyi/album.ts index 2b3ae1814..3ebb6eda4 100644 --- a/lib/routes/iqiyi/album.ts +++ b/lib/routes/iqiyi/album.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/album/:id', + categories: ['multimedia'], + example: '/iqiyi/album/神武天尊-2020-1b4lufwxd7h', + parameters: { id: '剧集 id, 可在该主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '剧集', + maintainers: ['TonyRL'], + handler, + description: `:::tip + 可抓取內容根据服务器所在地区而定 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { data: response } = await got(`https://www.iq.com/album/${id}`); @@ -54,12 +76,12 @@ export default async (ctx) => { pubDate: parseDate(item.initIssueTime), })); - ctx.set('data', { + return { title: baseInfo.name, description: baseInfo.description, image: album.videoAlbumInfo.albumFocus1024, link: `https://www.iq.com/album/${album.videoAlbumInfo.albumLocSuffix}`, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/iqiyi/maintainer.ts b/lib/routes/iqiyi/maintainer.ts deleted file mode 100644 index 9c9f2ba06..000000000 --- a/lib/routes/iqiyi/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/album/:id': ['TonyRL'], - '/user/video/:uid': ['talengu', 'JimenezLi'], -}; diff --git a/lib/routes/iqiyi/namespace.ts b/lib/routes/iqiyi/namespace.ts new file mode 100644 index 000000000..fa26a5625 --- /dev/null +++ b/lib/routes/iqiyi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '爱奇艺', + url: 'iq.com', +}; diff --git a/lib/routes/iqiyi/radar.ts b/lib/routes/iqiyi/radar.ts deleted file mode 100644 index c683bdfe7..000000000 --- a/lib/routes/iqiyi/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'iq.com': { - _name: '爱奇艺', - '.': [ - { - title: '剧集', - docs: 'https://docs.rsshub.app/routes/multimedia#ai-qi-yi', - source: ['/album/:id'], - target: '/iqiyi/:category/:id', - }, - ], - }, - 'iqiyi.com': { - _name: '爱奇艺', - '.': [ - { - title: '用户视频', - docs: 'https://docs.rsshub.app/routes/multimedia#ai-qi-yi', - source: ['/u/:uid/*'], - target: '/iqiyi/user/video/:uid', - }, - ], - }, -}; diff --git a/lib/routes/iqiyi/router.ts b/lib/routes/iqiyi/router.ts deleted file mode 100644 index eee0f746e..000000000 --- a/lib/routes/iqiyi/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/album/:id', './album'); - router.get('/user/video/:uid', './video'); -}; diff --git a/lib/routes/iqiyi/video.ts b/lib/routes/iqiyi/video.ts index eaed7032a..b8bf75f3e 100644 --- a/lib/routes/iqiyi/video.ts +++ b/lib/routes/iqiyi/video.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { config } from '@/config'; @@ -7,7 +8,28 @@ import puppeteer from '@/utils/puppeteer'; // /iqiyi/user/video/:uid // http://localhost:1200/iqiyi/user/video/2289191062 -export default async (ctx) => { +export const route: Route = { + path: '/user/video/:uid', + categories: ['multimedia'], + example: '/iqiyi/user/video/2289191062', + parameters: { uid: '用户名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['iqiyi.com/u/:uid/*'], + }, + name: '用户视频', + maintainers: ['talengu', 'JimenezLi'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const link = `https://www.iqiyi.com/u/${uid}/videos`; @@ -52,4 +74,4 @@ export default async (ctx) => { browser.close(); ctx.set('data', data); -}; +} diff --git a/lib/routes/iqnew/latest.ts b/lib/routes/iqnew/latest.ts index 17f217dc8..575f3d942 100644 --- a/lib/routes/iqnew/latest.ts +++ b/lib/routes/iqnew/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import iconv from 'iconv-lite'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['other'], + example: '/iqnew/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['iqnew.com/post/new_100/', 'iqnew.com/'], + }, + name: '最近更新', + maintainers: ['nczitzk'], + handler, + url: 'iqnew.com/post/new_100/', +}; + +async function handler(ctx) { const rootUrl = 'https://www.iqnew.com'; const url = rootUrl + '/post/new_100/'; const response = await got({ @@ -50,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '爱Q生活网 - 最近更新', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/iqnew/maintainer.ts b/lib/routes/iqnew/maintainer.ts deleted file mode 100644 index ca13de835..000000000 --- a/lib/routes/iqnew/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['nczitzk'], -}; diff --git a/lib/routes/iqnew/namespace.ts b/lib/routes/iqnew/namespace.ts new file mode 100644 index 000000000..ebd31ff0e --- /dev/null +++ b/lib/routes/iqnew/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '爱 Q 生活网', + url: 'iqnew.com', +}; diff --git a/lib/routes/iqnew/radar.ts b/lib/routes/iqnew/radar.ts deleted file mode 100644 index c8f287709..000000000 --- a/lib/routes/iqnew/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'iqnew.com': { - _name: '爱 Q 生活网', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/routes/other#ai-q-sheng-huo-wang', - source: ['/post/new_100/', '/'], - target: '/iqnew/latest', - }, - ], - }, -}; diff --git a/lib/routes/iqnew/router.ts b/lib/routes/iqnew/router.ts deleted file mode 100644 index cd57ba05c..000000000 --- a/lib/routes/iqnew/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './latest'); -}; diff --git a/lib/routes/iresearch/maintainer.ts b/lib/routes/iresearch/maintainer.ts deleted file mode 100644 index 7d5928826..000000000 --- a/lib/routes/iresearch/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/report': ['brilon', 'Fatpandac'], - '/weekly/:category?': ['nczitzk'], -}; diff --git a/lib/routes/iresearch/namespace.ts b/lib/routes/iresearch/namespace.ts new file mode 100644 index 000000000..ed04f30c5 --- /dev/null +++ b/lib/routes/iresearch/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '艾瑞', + url: 'www.iresearch.com.cn', +}; diff --git a/lib/routes/iresearch/radar.ts b/lib/routes/iresearch/radar.ts deleted file mode 100644 index 8b616b802..000000000 --- a/lib/routes/iresearch/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'iresearch.com.cn': { - _name: '艾瑞', - www: [ - { - title: '研究报告', - docs: 'https://docs.rsshub.app/routes/other#ai-rui-chan-ye-yan-jiu-bao-gao', - source: ['/report.shtml'], - target: '/iresearch/report', - }, - { - title: '周度市场观察', - docs: 'https://docs.rsshub.app/routes/other#ai-rui-zhou-du-shi-chang-guan-cha', - source: ['/report.shtml'], - target: (_, url) => (new URL(url).searchParams.get('type') === '3' ? '/iresearch/weekly' : null), - }, - ], - }, -}; diff --git a/lib/routes/iresearch/report.ts b/lib/routes/iresearch/report.ts index 36648bdaf..e8c97aca1 100644 --- a/lib/routes/iresearch/report.ts +++ b/lib/routes/iresearch/report.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -31,7 +32,29 @@ function processReport(item) { return description; } -export default async (ctx) => { +export const route: Route = { + path: '/report', + categories: ['other'], + example: '/iresearch/report', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.iresearch.com.cn/report.shtml'], + }, + name: '产业研究报告', + maintainers: ['brilon', 'Fatpandac'], + handler, + url: 'www.iresearch.com.cn/report.shtml', +}; + +async function handler(ctx) { const limit = isNaN(Number.parseInt(ctx.req.query('limit'))) ? 20 : Number.parseInt(ctx.req.query('limit')); const apiUrl = `https://www.iresearch.com.cn/api/products/GetReportList?fee=0&date=&lastId=&pageSize=${limit}`; const pageUrl = 'https://www.iresearch.com.cn/m/report.shtml'; @@ -55,10 +78,10 @@ export default async (ctx) => { })) ); - ctx.set('data', { + return { title: '艾瑞产业研究报告', link: pageUrl, description: '艾瑞产业研究报告', item: items, - }); -}; + }; +} diff --git a/lib/routes/iresearch/router.ts b/lib/routes/iresearch/router.ts deleted file mode 100644 index d094047d3..000000000 --- a/lib/routes/iresearch/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/report', './report'); - router.get('/weekly/:category?', './weekly'); -}; diff --git a/lib/routes/iresearch/weekly.ts b/lib/routes/iresearch/weekly.ts index 98272266d..bc1d63d87 100644 --- a/lib/routes/iresearch/weekly.ts +++ b/lib/routes/iresearch/weekly.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,27 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly/:category?', + categories: ['other'], + example: '/iresearch/weekly', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '周度市场观察', + maintainers: ['nczitzk'], + handler, + description: `| 家电行业 | 服装行业 | 美妆行业 | 食品饮料行业 | + | -------- | -------- | -------- | ------------ |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://www.iresearch.com.cn'; @@ -34,9 +55,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: '艾瑞咨询 - 周度市场观察', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/issuehunt/funded.ts b/lib/routes/issuehunt/funded.ts index 88b12f8b6..792029abd 100644 --- a/lib/routes/issuehunt/funded.ts +++ b/lib/routes/issuehunt/funded.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import MarkdownIt from 'markdown-it'; -export default async (ctx) => { +export const route: Route = { + path: '/funded/:username/:repo', + categories: ['programming'], + example: '/issuehunt/funded/DIYgod/RSSHub', + parameters: { username: 'Github user/org', repo: 'Repository name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Project Funded', + maintainers: ['running-grass'], + handler, +}; + +async function handler(ctx) { const { username, repo } = ctx.req.param(); const response = await got(`https://issuehunt.io/apis/pages/repos/show?repositoryOwnerName=${username}&repositoryName=${repo}`); @@ -13,7 +32,7 @@ export default async (ctx) => { const md = MarkdownIt({ html: true, }); - ctx.set('data', { + return { title: `Issue Hunt 的悬赏 -- ${username}/${repo}`, link: `https://issuehunt.io/r/${username}/${repo}`, description: ``, @@ -24,5 +43,5 @@ export default async (ctx) => { link: `https://issuehunt.io/r/${username}/${repo}/issues/${item.number}`, author: item.userName, })), - }); -}; + }; +} diff --git a/lib/routes/issuehunt/maintainer.ts b/lib/routes/issuehunt/maintainer.ts deleted file mode 100644 index 88e90acf8..000000000 --- a/lib/routes/issuehunt/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/funded/:username/:repo': ['running-grass'], -}; diff --git a/lib/routes/issuehunt/namespace.ts b/lib/routes/issuehunt/namespace.ts new file mode 100644 index 000000000..f4b08b973 --- /dev/null +++ b/lib/routes/issuehunt/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Issue Hunt', + url: 'issuehunt.io', +}; diff --git a/lib/routes/issuehunt/radar.ts b/lib/routes/issuehunt/radar.ts deleted file mode 100644 index 9dad151c1..000000000 --- a/lib/routes/issuehunt/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'issuehunt.io': { - _name: 'Issue Hunt', - '.': [ - { - title: '项目悬赏', - docs: 'https://docs.rsshub.app/routes/programming#issue-hunt-xiang-mu-xuan-shang', - source: '/r/:username/:repo', - target: ({ username, repo }) => `/issuehunt/funded/${username}/${repo}`, - }, - ], - }, -}; diff --git a/lib/routes/issuehunt/router.ts b/lib/routes/issuehunt/router.ts deleted file mode 100644 index ced85d7aa..000000000 --- a/lib/routes/issuehunt/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/funded/:username/:repo', './funded'); -}; diff --git a/lib/routes/itch/devlog.ts b/lib/routes/itch/devlog.ts index d12b4ab5d..8d98e7382 100644 --- a/lib/routes/itch/devlog.ts +++ b/lib/routes/itch/devlog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/devlog/:user/:id', + categories: ['game'], + example: '/itch/devlog/teamterrible/the-baby-in-yellow', + parameters: { user: 'User id, can be found in URL', id: 'Item id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Developer Logs', + maintainers: ['nczitzk'], + handler, + description: `\`User id\` is the field before \`.itch.io\` in the URL of the corresponding page, e.g. the URL of [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is \`https://teamterrible.itch.io/the-baby-in-yellow/devlog\`, where the field before \`.itch.io\` is \`teamterrible\`. + + \`Item id\` is the field between \`itch.io\` and \`/devlog\` in the URL of the corresponding page, e.g. the URL for [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is \`https://teamterrible.itch.io/the-baby-in-yellow/devlog\`, where the field between \`itch.io\` and \`/devlog\` is \`the-baby-in-yellow\`. + + So the route is [\`/itch/devlogs/teamterrible/the-baby-in-yellow\`](https://rsshub.app/itch/devlogs/teamterrible/the-baby-in-yellow).`, +}; + +async function handler(ctx) { const user = ctx.req.param('user') ?? ''; const id = ctx.req.param('id') ?? ''; if (!isValidHost(user)) { @@ -62,9 +86,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/itch/index.ts b/lib/routes/itch/index.ts index 649abecca..ba40ceb41 100644 --- a/lib/routes/itch/index.ts +++ b/lib/routes/itch/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://itch.io'; const currentUrl = `${rootUrl}${getSubPath(ctx)}`; @@ -53,9 +61,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/itch/maintainer.ts b/lib/routes/itch/maintainer.ts deleted file mode 100644 index f72e8aa81..000000000 --- a/lib/routes/itch/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/devlog/:user/:id': ['nczitzk'], - '/posts/:topic/:id': ['nczitzk'], - '/:sort?/:tag?': ['nczitzk'], -}; diff --git a/lib/routes/itch/namespace.ts b/lib/routes/itch/namespace.ts new file mode 100644 index 000000000..873b70f78 --- /dev/null +++ b/lib/routes/itch/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'itch.io', + url: 'itch.io', +}; diff --git a/lib/routes/itch/posts.ts b/lib/routes/itch/posts.ts index a1eb78ac2..57fc90cd2 100644 --- a/lib/routes/itch/posts.ts +++ b/lib/routes/itch/posts.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:topic/:id', + categories: ['game'], + example: '/itch/posts/9539/introduce-yourself', + parameters: { topic: 'Topic id, can be found in URL', id: 'Topic name, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['itch.io/t/:topic/:id'], + }, + name: 'Posts', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const id = ctx.req.param('id'); @@ -33,9 +55,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/itch/radar.ts b/lib/routes/itch/radar.ts deleted file mode 100644 index 819291b9f..000000000 --- a/lib/routes/itch/radar.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - 'itch.io': { - _name: 'itch.io', - '.': [ - { - title: 'Browse', - docs: 'https://docs.rsshub.app/routes/game#itch-io-browse', - source: ['/'], - target: (params, url) => `/itch${new URL(url).toString().split('itch.io').pop()}`, - }, - { - title: 'Developer Logs', - docs: 'https://docs.rsshub.app/routes/game#itch-io-developer-logs', - source: ['/'], - target: (params, url) => { - const matches = new URL(url).toString().match(/\/\/(.*?)\.itch\.io\/(.*?)\/devlog/); - return `/itch/devlog/${matches[1]}/${matches[2]}`; - }, - }, - { - title: 'Posts', - docs: 'https://docs.rsshub.app/routes/game#itch-io-posts', - source: ['/t/:topic/:id'], - target: '/itch/posts/:topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/itch/router.ts b/lib/routes/itch/router.ts deleted file mode 100644 index 24de8cf60..000000000 --- a/lib/routes/itch/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/devlog/:user/:id', './devlog'); - router.get('/posts/:topic/:id', './posts'); - router.get('*', './index'); -}; diff --git a/lib/routes/ithome/index.ts b/lib/routes/ithome/index.ts index 9ee728e52..e80ba7c3c 100644 --- a/lib/routes/ithome/index.ts +++ b/lib/routes/ithome/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -34,7 +35,28 @@ const config = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:caty', + categories: ['new-media'], + example: '/ithome/it', + parameters: { caty: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类资讯', + maintainers: ['luyuhuang'], + handler, + description: `| it | soft | win10 | win11 | iphone | ipad | android | digi | next | + | ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- | + | IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 |`, +}; + +async function handler(ctx) { const cfg = config[ctx.req.param('caty')]; if (!cfg) { throw new Error('Bad category. See https://docs.rsshub.app/routes/new-media#it-zhi-jia'); @@ -77,10 +99,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'IT 之家 - ' + cfg.title, link: current_url, image: 'https://img.ithome.com/m/images/logo.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/ithome/maintainer.ts b/lib/routes/ithome/maintainer.ts deleted file mode 100644 index b00283fb6..000000000 --- a/lib/routes/ithome/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/ranking/:type': ['immmortal', 'luyuhuang'], - '/tag/:name': ['Fatpandac'], - '/tw/feeds/:category': ['miles170'], - '/zt/:id': ['nczitzk'], - '/:caty': ['luyuhuang'], -}; diff --git a/lib/routes/ithome/namespace.ts b/lib/routes/ithome/namespace.ts new file mode 100644 index 000000000..eb210c384 --- /dev/null +++ b/lib/routes/ithome/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'iThome 台灣', + url: 'ithome.com', +}; diff --git a/lib/routes/ithome/radar.ts b/lib/routes/ithome/radar.ts deleted file mode 100644 index 34c404a6e..000000000 --- a/lib/routes/ithome/radar.ts +++ /dev/null @@ -1,120 +0,0 @@ -export default { - 'ithome.com': { - _name: 'IT 之家', - '.': [ - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-zhuan-ti', - source: ['/tag/:name'], - target: '/ithome/tag/:name', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-zhuan-ti', - source: ['/zt/:id'], - target: '/ithome/zt/:id', - }, - { - title: '24 小时阅读榜', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-re-bang', - source: ['/*'], - target: '/ithome/ranking/24h', - }, - { - title: '7 天最热', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-re-bang', - source: ['/*'], - target: '/ithome/ranking/7days', - }, - { - title: '月榜', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-re-bang', - source: ['/*'], - target: '/ithome/ranking/monthly', - }, - ], - it: [ - { - title: 'IT 资讯', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/it', - }, - ], - soft: [ - { - title: '软件之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/soft', - }, - ], - win10: [ - { - title: 'win10 之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/win10', - }, - ], - win11: [ - { - title: 'win11 之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/win11', - }, - ], - iphone: [ - { - title: 'iphone 之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/iphone', - }, - ], - ipad: [ - { - title: 'ipad 之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/ipad', - }, - ], - android: [ - { - title: 'android 之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/android', - }, - ], - digi: [ - { - title: '数码之家', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/digi', - }, - ], - next: [ - { - title: '智能时代', - docs: 'https://docs.rsshub.app/routes/new-media#it-zhi-jia-fen-lei-zi-xun', - source: '/', - target: '/ithome/next', - }, - ], - }, - 'ithome.com.tw': { - _name: 'iThome', - www: [ - { - title: 'Feeds', - docs: 'https://docs.rsshub.app/routes/new-media#ithome-tai-wan', - source: ['/:category', '/:category/feeds'], - target: '/ithome/tw/feeds/:category', - }, - ], - }, -}; diff --git a/lib/routes/ithome/ranking.ts b/lib/routes/ithome/ranking.ts index 25c9c2e9a..cfd4cbd77 100644 --- a/lib/routes/ithome/ranking.ts +++ b/lib/routes/ithome/ranking.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/ranking/:type', + categories: ['new-media'], + example: '/ithome/ranking/24h', + parameters: { type: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热榜', + maintainers: ['immmortal', 'luyuhuang'], + handler, + description: `| 24h | 7days | monthly | + | ------------- | -------- | ------- | + | 24 小时阅读榜 | 7 天最热 | 月榜 |`, +}; + +async function handler(ctx) { const option = ctx.req.param('type'); const response = await got({ @@ -62,9 +84,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `IT之家-${title}`, link: 'https://www.ithome.com', item: items, - }); -}; + }; +} diff --git a/lib/routes/ithome/router.ts b/lib/routes/ithome/router.ts deleted file mode 100644 index 23d00f49e..000000000 --- a/lib/routes/ithome/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/ranking/:type', './ranking'); - router.get('/tag/:name', './tag'); - router.get('/tw/feeds/:category', './tw/feeds'); - router.get('/zt/:id', './zt'); - router.get('/:caty', './index'); -}; diff --git a/lib/routes/ithome/tag.ts b/lib/routes/ithome/tag.ts index de6203069..14c8e732c 100644 --- a/lib/routes/ithome/tag.ts +++ b/lib/routes/ithome/tag.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.ithome.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:name', + categories: ['new-media'], + example: '/ithome/tag/win11', + parameters: { name: '标签名称,可从网址链接中获取' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ithome.com/tag/:name'], + }, + name: '标签', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const url = `${rootUrl}tag/${name}`; @@ -52,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `IT之家 - ${name}标签`, link: url, item: items.filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/ithome/tw/feeds.ts b/lib/routes/ithome/tw/feeds.ts index fae8f19fe..bfe51946c 100644 --- a/lib/routes/ithome/tw/feeds.ts +++ b/lib/routes/ithome/tw/feeds.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/tw/feeds/:category', + categories: ['new-media'], + example: '/ithome/tw/feeds/news', + parameters: { category: '類別' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ithome.com.tw/:category', 'www.ithome.com.tw/:category/feeds'], + }, + name: 'Feeds', + maintainers: ['miles170'], + handler, + description: `| 新聞 | AI | Cloud | DevOps | 資安 | + | ---- | -------- | ----- | ------ | -------- | + | news | big-data | cloud | devops | security |`, +}; + +async function handler(ctx) { const baseUrl = 'https://www.ithome.com.tw'; const currentUrl = `${baseUrl}/${ctx.req.param('category')}/feeds`; const response = await got(currentUrl); @@ -30,10 +55,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${name} | iThome`, link: currentUrl, description: 'iThome Online 是臺灣第一個網路原生報,提供IT產業即時新聞、企業IT產品報導與測試、技術專題、IT應用報導、IT書訊,以及面向豐富的名家專欄。', item: items, - }); -}; + }; +} diff --git a/lib/routes/ithome/zt.ts b/lib/routes/ithome/zt.ts index e74caaace..436fea0e6 100644 --- a/lib/routes/ithome/zt.ts +++ b/lib/routes/ithome/zt.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zt/:id', + categories: ['new-media'], + example: '/ithome/zt/xijiayi', + parameters: { id: '专题 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ithome.com/zt/:id'], + }, + name: '专题', + maintainers: ['nczitzk'], + handler, + description: `所有专题请见[此处](https://www.ithome.com/zt)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.ithome.com'; @@ -55,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('title').text()} - IT之家`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/iwara/index.ts b/lib/routes/iwara/index.ts index 9495645f7..22a0a3531 100644 --- a/lib/routes/iwara/index.ts +++ b/lib/routes/iwara/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -35,7 +36,14 @@ const parseThumbnail = (type, item) => { return ''; }; -export default async (ctx) => { +export const route: Route = { + path: '/users/:username?/:type?', + name: 'Unknown', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const username = ctx.req.param('username'); const id = await cache.tryGet(`${apiRootUrl}/profile/${username}`, async () => (await got(`${apiRootUrl}/profile/${username}`)).data.user.id); const type = ctx.req.param('type') ?? 'video'; @@ -48,9 +56,9 @@ export default async (ctx) => { pubDate: parseDate(item.createdAt), })); - ctx.set('data', { + return { title: `${username}'s iwara - ${typeMap[type]}`, link: `${rootUrl}/users/${username}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/iwara/maintainer.ts b/lib/routes/iwara/maintainer.ts deleted file mode 100644 index 60811ab63..000000000 --- a/lib/routes/iwara/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/users/:username?/:type?': ['Fatpandac'], - '/subscriptions': ['FeCCC'], -}; diff --git a/lib/routes/iwara/namespace.ts b/lib/routes/iwara/namespace.ts new file mode 100644 index 000000000..5339b9d95 --- /dev/null +++ b/lib/routes/iwara/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'iwara', + url: 'ecchi.iwara.tv', +}; diff --git a/lib/routes/iwara/radar.ts b/lib/routes/iwara/radar.ts deleted file mode 100644 index 817d801d3..000000000 --- a/lib/routes/iwara/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'iwara.tv': { - _name: 'iwara', - ecchi: [ - { - title: '用户视频', - docs: 'https://docs.rsshub.app/routes/anime#iwara', - source: '/users/:username', - target: '/iwara/users/:username?/video', - }, - { - title: '用户图片', - docs: 'https://docs.rsshub.app/routes/anime#iwara', - source: '/users/:username', - target: '/iwara/users/:username?/image', - }, - { - title: '用户订阅列表', - docs: 'https://docs.rsshub.app/routes/anime#iwara', - source: '/', - target: '/iwara/subscriptions', - }, - ], - }, -}; diff --git a/lib/routes/iwara/router.ts b/lib/routes/iwara/router.ts deleted file mode 100644 index 993f10b5d..000000000 --- a/lib/routes/iwara/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/users/:username?/:type?', './index'); - router.get('/subscriptions', './subscriptions'); -}; diff --git a/lib/routes/iwara/subscriptions.ts b/lib/routes/iwara/subscriptions.ts index dca284618..5251d0597 100644 --- a/lib/routes/iwara/subscriptions.ts +++ b/lib/routes/iwara/subscriptions.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,32 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/subscriptions', + categories: ['anime'], + example: '/iwara/subscriptions', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ecchi.iwara.tv/'], + }, + name: 'User Subscriptions', + maintainers: ['FeCCC'], + handler, + url: 'ecchi.iwara.tv/', + description: `:::warning + This route requires username and password, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. + :::`, +}; + +async function handler() { if (!config.iwara || !config.iwara.username || !config.iwara.password) { throw new Error('Iwara subscription RSS is disabled due to the lack of relevant config'); } @@ -140,9 +166,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Iwara Subscription`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ixigua/maintainer.ts b/lib/routes/ixigua/maintainer.ts deleted file mode 100644 index e5a6adc1d..000000000 --- a/lib/routes/ixigua/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ixigua/user/video/:uid/:disableEmbed?': ['FlashWingShadow', 'Fatpandac'], -}; diff --git a/lib/routes/ixigua/namespace.ts b/lib/routes/ixigua/namespace.ts new file mode 100644 index 000000000..62800120e --- /dev/null +++ b/lib/routes/ixigua/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西瓜视频', + url: 'ixigua.com', +}; diff --git a/lib/routes/ixigua/radar.ts b/lib/routes/ixigua/radar.ts deleted file mode 100644 index 40dfeb010..000000000 --- a/lib/routes/ixigua/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ixigua.com': { - _name: '西瓜视频', - '.': [ - { - title: '用户视频投稿', - docs: 'https://docs.rsshub.app/routes/multimedia#xi-gua-shi-pin', - source: '/home/:uid', - target: '/ixigua/user/video/:uid', - }, - ], - }, -}; diff --git a/lib/routes/ixigua/router.ts b/lib/routes/ixigua/router.ts deleted file mode 100644 index 2e9264acb..000000000 --- a/lib/routes/ixigua/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/video/:uid/:disableEmbed?', './user-video'); -}; diff --git a/lib/routes/ixigua/user-video.ts b/lib/routes/ixigua/user-video.ts index 60843969d..8ccbb1b3c 100644 --- a/lib/routes/ixigua/user-video.ts +++ b/lib/routes/ixigua/user-video.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://www.ixigua.com'; -export default async (ctx) => { +export const route: Route = { + path: '/user/video/:uid/:disableEmbed?', + categories: ['multimedia'], + example: '/ixigua/user/video/4234740937', + parameters: { uid: '用户 id, 可在用户主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ixigua.com/home/:uid'], + target: '/user/video/:uid', + }, + name: '用户视频投稿', + maintainers: [], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const disableEmbed = ctx.req.param('disableEmbed'); const url = `${host}/home/${uid}/?wid_try=1`; @@ -22,7 +45,7 @@ export default async (ctx) => { const videoInfos = data.AuthorVideoList.videoList; const userInfo = data.AuthorDetailInfo; - ctx.set('data', { + return { title: `${userInfo.name} 的西瓜视频`, link: url, description: userInfo.introduce, @@ -36,5 +59,5 @@ export default async (ctx) => { pubDate: parseDate(i.publishTime * 1000), author: userInfo.name, })), - }); -}; + }; +} diff --git a/lib/routes/jandan/index.ts b/lib/routes/jandan/index.ts index 4cc0fd443..b3da07a82 100644 --- a/lib/routes/jandan/index.ts +++ b/lib/routes/jandan/index.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/', + name: 'Unknown', + maintainers: ['nczitzk', 'bigfei'], + handler, +}; + +async function handler() { const rootUrl = 'http://i.jandan.net'; const feed = await parser.parseURL(`${rootUrl}/feed/`); const items = await Promise.all( @@ -24,9 +32,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '煎蛋', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/jandan/maintainer.ts b/lib/routes/jandan/maintainer.ts deleted file mode 100644 index 12b05d9dc..000000000 --- a/lib/routes/jandan/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:category?': ['nczitzk'], - '/': ['nczitzk', 'bigfei'], -}; diff --git a/lib/routes/jandan/namespace.ts b/lib/routes/jandan/namespace.ts new file mode 100644 index 000000000..676771790 --- /dev/null +++ b/lib/routes/jandan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '煎蛋', + url: 'jandan.net', +}; diff --git a/lib/routes/jandan/radar.ts b/lib/routes/jandan/radar.ts deleted file mode 100644 index 20826a350..000000000 --- a/lib/routes/jandan/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'jandan.net': { - _name: '煎蛋', - '.': [ - { - title: '首页/板块/热榜', - docs: 'https://docs.rsshub.app/routes/picture#jian-dan', - source: ['/:category', '/'], - target: '/jandan/:category?', - }, - ], - i: [ - { - title: '首页/板块/热榜', - docs: 'https://docs.rsshub.app/routes/picture#jian-dan', - source: ['/:category', '/'], - target: '/jandan/:category?', - }, - ], - }, -}; diff --git a/lib/routes/jandan/router.ts b/lib/routes/jandan/router.ts deleted file mode 100644 index b4779feaf..000000000 --- a/lib/routes/jandan/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:category', './section'); - router.get('/', './index'); -}; diff --git a/lib/routes/jandan/section.ts b/lib/routes/jandan/section.ts index 7e8803ba6..3fa2ef623 100644 --- a/lib/routes/jandan/section.ts +++ b/lib/routes/jandan/section.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'top'; const rootUrl = 'http://i.jandan.net'; @@ -40,9 +48,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${$('title').text()} - 煎蛋`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/japanpost/maintainer.ts b/lib/routes/japanpost/maintainer.ts deleted file mode 100644 index 067b27a31..000000000 --- a/lib/routes/japanpost/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/track/:reqCode/:locale?': ['tuzi3040'], -}; diff --git a/lib/routes/japanpost/namespace.ts b/lib/routes/japanpost/namespace.ts new file mode 100644 index 000000000..79375e4d6 --- /dev/null +++ b/lib/routes/japanpost/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Japanpost 日本郵便', + url: 'trackings.post.japanpost.jp', +}; diff --git a/lib/routes/japanpost/radar.ts b/lib/routes/japanpost/radar.ts deleted file mode 100644 index 5115d8dc3..000000000 --- a/lib/routes/japanpost/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'japanpost.jp': { - _name: '日本郵便', - 'trackings.post': [ - { - title: '郵便・荷物の追跡', - docs: 'https://docs.rsshub.app/routes/other#japanpost-ri-ben-you-bian', - source: '/services/srv/search/direct', - target: (params, url) => { - const reqCode = new URL(url).searchParams - .get('reqCodeNo1') - .replaceAll(/[^\dA-Za-z]/g, '') - .toUpperCase(); - const locale = new URL(url).searchParams.get('locale').toLowerCase(); - if ((reqCode.search(/^(?:\d{11,12}|[A-Z]{2}\d{9}[A-Z]{2})$/) === 0 && locale === 'ja') || locale === 'en') { - return `/japanpost/track/${reqCode}/${locale}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/japanpost/router.ts b/lib/routes/japanpost/router.ts deleted file mode 100644 index fb3536651..000000000 --- a/lib/routes/japanpost/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/track/:reqCode/:locale?', './track'); -}; diff --git a/lib/routes/japanpost/track.ts b/lib/routes/japanpost/track.ts index c4707c92b..7e169b8fb 100644 --- a/lib/routes/japanpost/track.ts +++ b/lib/routes/japanpost/track.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,28 @@ import utils from './utils'; let baseTitle = '日本郵便'; const baseUrl = 'https://trackings.post.japanpost.jp/services/srv/search/direct?'; -export default async (ctx) => { +export const route: Route = { + path: '/track/:reqCode/:locale?', + categories: ['other'], + example: '/japanpost/track/EJ123456789JP/en', + parameters: { reqCode: 'Package Number', locale: 'Language, default to japanese `ja`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Track & Trace Service 郵便追跡サービス', + maintainers: ['tuzi3040'], + handler, + description: `| Japanese | English | + | -------- | ------- | + | ja | en |`, +}; + +async function handler(ctx) { const reqCode = ctx.req.param('reqCode'); const reqReqCode = 'reqCodeNo1=' + reqCode; @@ -64,7 +86,7 @@ export default async (ctx) => { let lastItemTimeStamp; let tz; - ctx.set('data', { + return { title: `${baseTitle} ${reqCode} ${packageType}`, link, description: `${baseTitle} ${reqCode} ${packageType}`, @@ -111,5 +133,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/javbus/index.ts b/lib/routes/javbus/index.ts index a44f7e228..49b548a17 100644 --- a/lib/routes/javbus/index.ts +++ b/lib/routes/javbus/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -17,7 +18,19 @@ const toSize = (raw) => { const allowDomain = new Set(['javbus.com', 'javbus.org', 'javsee.icu', 'javsee.one']); -export default async (ctx) => { +export const route: Route = { + path: '*', + radar: { + source: ['www.seejav.pw/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'www.seejav.pw/', +}; + +async function handler(ctx) { const isWestern = /^\/western/.test(getSubPath(ctx)); const domain = ctx.req.query('domain') ?? 'javbus.com'; const westernDomain = ctx.req.query('western_domain') ?? 'javbus.org'; @@ -176,10 +189,10 @@ export default async (ctx) => { const title = $('head title').text(); - ctx.set('data', { + return { title: `${title.startsWith('JavBus') ? '' : 'JavBus - '}${title.replace(/ - AV磁力連結分享/, '')}`, link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/javbus/maintainer.ts b/lib/routes/javbus/maintainer.ts deleted file mode 100644 index 3dd0325b0..000000000 --- a/lib/routes/javbus/maintainer.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - '/': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/genre/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/label/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/series/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/star/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/studio/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/search/:keyword': ['nczitzk'], - '/uncensored': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/uncensored/genre/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/uncensored/series/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/uncensored/star/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/uncensored/search/:keyword': ['nczitzk'], - '/western': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/western/genre/:gid': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/western/series/:seriesid': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/western/star/:sid': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/western/search/:keyword': ['nczitzk'], - // en routes - '/en': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/genre/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/label/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/en/series/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/en/star/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/studio/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/en/search/:keyword': ['nczitzk'], - '/en/uncensored': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/uncensored/genre/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/uncensored/series/:id': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/en/uncensored/star/:id': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/uncensored/search/:keyword': ['nczitzk'], - '/en/western': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/western/genre/:gid': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/western/series/:seriesid': ['MegrezZhu', 'CoderTonyChan', 'Felix2yu', 'nczitzk'], - '/en/western/star/:sid': ['MegrezZhu', 'CoderTonyChan', 'nczitzk'], - '/en/western/search/:keyword': ['nczitzk'], -}; diff --git a/lib/routes/javbus/namespace.ts b/lib/routes/javbus/namespace.ts new file mode 100644 index 000000000..94df656dc --- /dev/null +++ b/lib/routes/javbus/namespace.ts @@ -0,0 +1,23 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JavBus', + url: 'www.javbus.com', + description: `:::warning +Requests from non-Asia areas will be redirected to login page. +::: + +:::tip[Language] +You can change the language of each route to the languages listed below. + +| English | 日本语 | 한국의 | 中文 | +| ------- | ------ | ------ | ---------------- | +| en | ja | ko | (leave it empty) | +::: + +:::tip +JavBus has multiple backup domains, these routes use default domain \`https://javbus.com\`. If the domain is unreachable, you can add \`?domain=\` to the end of the route to specify the domain to visit. Let say you want to use the backup domain \`https://javsee.icu\`, you can add \`?domain=javsee.icu\` to the end of the route, then the route will be [\`/javbus/en?domain=javsee.icu\`](https://rsshub.app/javbus?domain=javsee.icu) + +**Note**: **Western** has different domain than the main site, the backup domains are also different. The default domain is \`https://javbus.org\` and you can add \`?western_domain=\` to the end of the route to specify the domain to visit. Let say you want to use the backup domain \`https://javsee.one\`, you can add \`?western_domain=javsee.one\` to the end of the route, then the route will be [\`/javbus/western/en?western_domain=javsee.one\`](https://rsshub.app/javbus/western?western_domain=javsee.one) +:::`, +}; diff --git a/lib/routes/javbus/radar.ts b/lib/routes/javbus/radar.ts deleted file mode 100644 index 247426d47..000000000 --- a/lib/routes/javbus/radar.ts +++ /dev/null @@ -1,149 +0,0 @@ -const javbus = { - _name: 'JavBus', - www: [ - { - title: '有码 - 首页', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/', - target: '/javbus', - }, - { - title: '有码 - 分类', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/genre/:id', - target: '/javbus/genre/:id', - }, - { - title: '有码 - 演员', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/star/:id', - target: '/javbus/star/:id', - }, - { - title: '有码 - 系列', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/series/:id', - target: '/javbus/series/:id', - }, - { - title: '有码 - 制作商', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/studio/:id', - target: '/javbus/studio/:id', - }, - { - title: '有码 - 发行商', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/label/:id', - target: '/javbus/label/:id', - }, - { - title: '有码 - 导演', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/director/:id', - target: '/javbus/director/:id', - }, - { - title: '有码 - 搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/search/:keyword', - target: '/javbus/search/:keyword', - }, - { - title: '无码 - 首页', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored', - target: '/javbus/uncensored', - }, - { - title: '无码 - 分类', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored/genre/:id', - target: '/javbus/uncensored/genre/:id', - }, - { - title: '无码 - 演员', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored/star/:id', - target: '/javbus/uncensored/star/:id', - }, - { - title: '无码 - 系列', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored/series/:id', - target: '/javbus/uncensored/series/:id', - }, - { - title: '无码 - 制作商', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored/studio/:id', - target: '/javbus/uncensored/studio/:id', - }, - { - title: '无码 - 搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/uncensored/search/:keyword', - target: '/javbus/uncensored/search/:keyword', - }, - ], -}; - -const westernJavbus = { - _name: 'JavBus', - www: [ - { - title: '欧美 - 首页', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/', - target: '/javbus/western', - }, - { - title: '欧美 - 分类', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/genre/:id', - target: '/javbus/western/genre/:id', - }, - { - title: '欧美 - 演员', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/star/:id', - target: '/javbus/western/star/:id', - }, - { - title: '欧美 - 系列', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/series/:id', - target: '/javbus/western/series/:id', - }, - { - title: '欧美 - 制作商', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/studio/:id', - target: '/javbus/western/studio/:id', - }, - { - title: '欧美 - 搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#javbus', - source: '/search/:keyword', - target: '/javbus/western/search/:keyword', - }, - ], -}; - -export default { - 'javbus.com': javbus, - 'javsee.club': javbus, - 'javsee.icu': javbus, - 'javsee.work': javbus, - 'seejav.bar': javbus, - 'seejav.bid': javbus, - 'seejav.blog': javbus, - 'seejav.cloud': javbus, - 'seejav.club': javbus, - 'seejav.men': javbus, - 'seejav.pw': javbus, - - 'javbus.one': westernJavbus, - 'javbus.org': westernJavbus, - 'javbus.red': westernJavbus, -}; diff --git a/lib/routes/javbus/router.ts b/lib/routes/javbus/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/javbus/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/javdb/actors.ts b/lib/routes/javdb/actors.ts index ab00a8d9f..d9b4bec0a 100644 --- a/lib/routes/javdb/actors.ts +++ b/lib/routes/javdb/actors.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/actors/:id/:filter?', + categories: ['multimedia'], + example: '/javdb/actors/R2Vg', + parameters: { id: '编号,可在演员页 URL 中找到', filter: '过滤,见下表,默认为 `全部`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '演員', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `| 全部 | 可播放 | 單體作品 | 可下載 | 含字幕 | + | ---- | ------ | -------- | ------ | ------ | + | | p | s | d | c | + + 所有演员编号参见 [演員庫](https://javdb.com/actors)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const filter = ctx.req.param('filter') ?? ''; @@ -17,4 +46,4 @@ export default async (ctx) => { const title = `JavDB${filters[filter] === '' ? '' : ` - ${filters[filter]}`} `; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/index.ts b/lib/routes/javdb/index.ts index 18f2964bd..f9dee4f1d 100644 --- a/lib/routes/javdb/index.ts +++ b/lib/routes/javdb/index.ts @@ -1,6 +1,37 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/home/:category?/:sort?/:filter?', '/:category?/:sort?/:filter?'], + radar: { + source: ['javdb.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `分类 + + | 有碼 | 無碼 | 歐美 | + | -------- | ---------- | ------- | + | censored | uncensored | western | + + 排序 + + | 发布日期排序 | 磁鏈更新排序 | + | ------------ | ------------ | + | 1 | 2 | + + 过滤 + + | 全部 | 可下载 | 含字幕 | 含短評 | + | ---- | ------ | ------ | ------ | + | 0 | 1 | 2 | 3 |`, + url: 'javdb.com/', +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'censored'; const sort = ctx.req.param('sort') ?? '2'; const filter = ctx.req.param('filter') ?? '1'; @@ -29,4 +60,4 @@ export default async (ctx) => { const title = `${categories[category]} - JavDB - ${filters[filter] === '' ? '|' : `${filters[filter]} | `}${sorts[sort]}`; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/lists.ts b/lib/routes/javdb/lists.ts index bfb91337f..1762e8b0c 100644 --- a/lib/routes/javdb/lists.ts +++ b/lib/routes/javdb/lists.ts @@ -1,6 +1,19 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/lists/:id/:filter?/:sort?', + radar: { + source: ['javdb.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['dddepg'], + handler, + url: 'javdb.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const filter = ctx.req.param('filter') ?? ''; const sort = ctx.req.param('sort') ?? '0'; @@ -25,4 +38,4 @@ export default async (ctx) => { const title = `JavDB${filters[filter] === '' ? '' : ` - ${filters[filter]}`} ${sortOptions[sort]}`; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/maintainer.ts b/lib/routes/javdb/maintainer.ts deleted file mode 100644 index 2a35af992..000000000 --- a/lib/routes/javdb/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/actors/:id/:filter?': ['nczitzk'], - '/home/:category?/:sort?/:filter?': ['nczitzk'], - '/lists/:id/:filter?/:sort?': ['dddepg'], - '/makers/:id/:filter?': ['nczitzk'], - '/rankings/:category?/:time?': ['nczitzk'], - '/search/:keyword?/:filter?/:sort?': ['nczitzk'], - '/series/:id/:filter?': ['nczitzk'], - '/tags/:query?/:category?': ['nczitzk'], - '/:category?/:sort?/:filter?': ['nczitzk'], -}; diff --git a/lib/routes/javdb/makers.ts b/lib/routes/javdb/makers.ts index 647bf142c..5d9e91ed2 100644 --- a/lib/routes/javdb/makers.ts +++ b/lib/routes/javdb/makers.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/makers/:id/:filter?', + categories: ['multimedia'], + example: '/javdb/makers/7R', + parameters: { id: '编号,可在片商页 URL 中找到', filter: '过滤,见下表,默认为 `全部`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '片商', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | + | ---- | -------- | -------- | -------- | ----- | ------- | + | | playable | single | download | cnsub | preview | + + 所有片商编号参见 [片商庫](https://javdb.com/makers)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const filter = ctx.req.param('filter') ?? ''; @@ -18,4 +47,4 @@ export default async (ctx) => { const title = `JavDB${filters[filter] === '' ? '' : ` - ${filters[filter]}`} `; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/namespace.ts b/lib/routes/javdb/namespace.ts new file mode 100644 index 000000000..8f3d2325a --- /dev/null +++ b/lib/routes/javdb/namespace.ts @@ -0,0 +1,19 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JavDB', + url: 'javdb.com', + description: `:::tip +JavDB 有多个备用域名,本路由默认使用永久域名 \`https://javdb.com\` ,若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://javdb36.com\`,则在所有 JavDB 路由最后加上 \`?domain=javdb36.com\` 即可,此时路由为 [\`/javdb?domain=javdb36.com\`](https://rsshub.app/javdb?domain=javdb36.com) + +如果加入了 **分類** 参数,直接在分類参数后加入 \`?domain=<域名>\` 即可。如指定分類 URL 为 \`https://javdb.com/tags?c2=5&c10=1\` 并指定备用域名为 \`https://javdb36.com\`,即在 \`/javdb/tags/c2=5&c10=1\` 最后加上 \`?domain=javdb36.com\`,此时路由为 [\`/javdb/tags/c2=5&c10=1?domain=javdb36.com\`](https://rsshub.app/javdb/tags/c2=5\&c10=1?domain=javdb36.com) + +**排行榜**、**搜索**、**演員**、**片商** 参数同适用于 **分類** 参数的上述规则 +::: + +:::tip +你可以通过指定 \`limit\` 参数来获取特定数量的条目,即可以通过在路由后方加上 \`?limit=25\`,默认为单次获取 20 个条目,即默认 \`?limit=20\` + +因为该站有反爬检测,所以不应将此值调整过高 +:::`, +}; diff --git a/lib/routes/javdb/radar.ts b/lib/routes/javdb/radar.ts deleted file mode 100644 index 51f93afbd..000000000 --- a/lib/routes/javdb/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'javdb.com': { - _name: 'JavDB', - '.': [ - { - title: '主页', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-zhu-ye', - source: ['/'], - target: '/javdb', - }, - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-fen-lei', - source: ['/tags/:category', '/'], - target: (params, url) => `/javdb/tags/:category/${new URL(url).searchParams.toString()}`, - }, - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-pai-hang-bang', - source: ['/rankings/:category', '/'], - target: (params, url) => `/javdb/rankings/:category/${new URL(url).searchParams.get('period') ?? ''}`, - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-sou-suo', - source: ['/search', '/'], - target: (params, url) => `/javdb/search/${new URL(url).searchParams.toString()}`, - }, - { - title: '演員', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-yan-yuan', - source: ['/actors/:id', '/'], - target: (params, url) => `/javdb/actors/:id/${new URL(url).searchParams.toString()}`, - }, - { - title: '系列', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-xi-lie', - source: ['/series/:id', '/'], - target: (params, url) => `/javdb/series/:id/${new URL(url).searchParams.toString()}`, - }, - { - title: '片商', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-pian-shang', - source: ['/makers/:id', '/'], - target: (params, url) => `/javdb/makers/:id/${new URL(url).searchParams.toString()}`, - }, - { - title: '清单', - docs: 'https://docs.rsshub.app/routes/multimedia#javdb-qing-dan', - source: ['/lists/:id/', '/'], - target: (params, url) => `/javdb/lists/:id/${new URL(url).searchParams.toString()}`, - }, - ], - }, -}; diff --git a/lib/routes/javdb/rankings.ts b/lib/routes/javdb/rankings.ts index 81b8a8b6e..1545b2dd8 100644 --- a/lib/routes/javdb/rankings.ts +++ b/lib/routes/javdb/rankings.ts @@ -1,6 +1,41 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/rankings/:category?/:time?', + categories: ['multimedia'], + example: '/javdb/rankings', + parameters: { category: '分类,见下表,默认为 `有碼`', time: '时间,见下表,默认为 `日榜`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '排行榜', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `分类 + + | 有碼 | 無碼 | 歐美 | + | -------- | ---------- | ------- | + | censored | uncensored | western | + + 时间 + + | 日榜 | 週榜 | 月榜 | + | ----- | ------ | ------- | + | daily | weekly | monthly |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'censored'; const time = ctx.req.param('time') ?? 'daily'; @@ -9,4 +44,4 @@ export default async (ctx) => { const title = 'JavDB'; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/router.ts b/lib/routes/javdb/router.ts deleted file mode 100644 index 88b4fc1b3..000000000 --- a/lib/routes/javdb/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/actors/:id/:filter?', './actors'); - router.get('/home/:category?/:sort?/:filter?', './index'); - router.get('/lists/:id/:filter?/:sort?', './lists'); - router.get('/makers/:id/:filter?', './makers'); - router.get('/rankings/:category?/:time?', './rankings'); - router.get('/search/:keyword?/:filter?/:sort?', './search'); - router.get('/series/:id/:filter?', './series'); - router.get('/tags/:query?/:category?', './tags'); - router.get('/:category?/:sort?/:filter?', './index'); -}; diff --git a/lib/routes/javdb/search.ts b/lib/routes/javdb/search.ts index c78878653..5c6f1c9a3 100644 --- a/lib/routes/javdb/search.ts +++ b/lib/routes/javdb/search.ts @@ -1,6 +1,41 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword?/:filter?/:sort?', + categories: ['multimedia'], + example: '/javdb/search/巨乳', + parameters: { keyword: '关键字,默认为空', filter: '过滤,见下表,默认为 `可播放`', sort: '排序,见下表,默认为 `按相关度排序`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '搜索', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `过滤 + + | 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 | + | ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- | + | | none | playable | single | actor | maker | director | series | code | download | cnsub | preview | + + 排序 + + | 按相关度排序 | 按发布时间排序 | + | ------------ | -------------- | + | 0 | 1 |`, +}; + +async function handler(ctx) { const filter = ctx.req.param('filter') ?? ''; const keyword = ctx.req.param('keyword') ?? ''; const sort = ctx.req.param('sort') ?? '0'; @@ -30,4 +65,4 @@ export default async (ctx) => { const title = `關鍵字 ${keyword} ${filters[filter] === '' ? '' : `+ ${filters[filter]}`} ${sorts[sort]} 搜索結果 - JavDB`; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/series.ts b/lib/routes/javdb/series.ts index 33f0ccc9b..cba5c00af 100644 --- a/lib/routes/javdb/series.ts +++ b/lib/routes/javdb/series.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/series/:id/:filter?', + categories: ['multimedia'], + example: '/javdb/series/1NW', + parameters: { id: '编号,可在系列页 URL 中找到', filter: '过滤,见下表,默认为 `全部`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '系列', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | + | ---- | -------- | -------- | -------- | ----- | ------- | + | | playable | single | download | cnsub | preview | + + 所有系列编号参见 [系列庫](https://javdb.com/series)`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const filter = ctx.req.param('filter') ?? ''; @@ -18,4 +47,4 @@ export default async (ctx) => { const title = `JavDB${filters[filter] === '' ? '' : ` - ${filter[filter]}`} `; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javdb/tags.ts b/lib/routes/javdb/tags.ts index 60260d011..fcdd2d86a 100644 --- a/lib/routes/javdb/tags.ts +++ b/lib/routes/javdb/tags.ts @@ -1,6 +1,41 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tags/:query?/:category?', + categories: ['multimedia'], + example: '/javdb/tags/c2=5&c10=1', + parameters: { query: '筛选,默认为 `c10=1`', category: '分类,见下表,默认为 `有碼`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['javdb.com/'], + target: '', + }, + name: '分類', + maintainers: ['nczitzk'], + handler, + url: 'javdb.com/', + description: `:::tip + 在 [分類](https://javdb.com/tags) 中选定分类后,URL 中 \`tags?\` 后的字段即为筛选参数。 + + 如 \`https://javdb.com/tags?c2=5&c10=1\` 中 \`c2=5&c10=1\` 为筛选参数。 + ::: + + 分类 + + | 有碼 | 無碼 | 歐美 | + | -------- | ---------- | ------- | + | censored | uncensored | western |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'censored'; const query = ctx.req.param('query') ?? ''; @@ -9,4 +44,4 @@ export default async (ctx) => { const title = `JavDB${query === '' ? '' : ` - ${query}`} `; ctx.set('data', await utils.ProcessItems(ctx, currentUrl, title)); -}; +} diff --git a/lib/routes/javlibrary/bestrated.ts b/lib/routes/javlibrary/bestrated.ts index aa044cb0e..bb148e877 100644 --- a/lib/routes/javlibrary/bestrated.ts +++ b/lib/routes/javlibrary/bestrated.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/bestrated/:language?/:mode?', '/bestrated/:language?/:mode?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| Last Month | All Time | + | ---------- | -------- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_bestrated.php?list&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/bestreviews.ts b/lib/routes/javlibrary/bestreviews.ts index e5997460e..746ab3daf 100644 --- a/lib/routes/javlibrary/bestreviews.ts +++ b/lib/routes/javlibrary/bestreviews.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/bestreviews/:language?/:mode?', + categories: ['multimedia'], + example: '/javlibrary/bestreviews/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, Last Month by default, as `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Best Reviews', + maintainers: ['nczitzk'], + handler, + description: `| Last Month | All Time | + | ---------- | -------- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/tl_bestreviews.php?list&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/genre.ts b/lib/routes/javlibrary/genre.ts index 35b0891cc..64c216e6c 100644 --- a/lib/routes/javlibrary/genre.ts +++ b/lib/routes/javlibrary/genre.ts @@ -1,11 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultGenre, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/genre/:genre?/:language?/:mode?', '/genre/:genre?/:language?/:mode?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| videos with comments (by date) | everything (by date) | + | ------------------------------ | -------------------- | + | 1 | 2 | + + :::tip + See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories. + :::`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const genre = ctx.req.param('genre') ?? defaultGenre; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_genre.php?list&g=${genre}&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/maintainer.ts b/lib/routes/javlibrary/maintainer.ts deleted file mode 100644 index a4796af9e..000000000 --- a/lib/routes/javlibrary/maintainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - '/bestrated/:language?/:mode?': ['nczitzk'], - '/bestreviews/:language?/:mode?': ['nczitzk'], - '/genre/:genre?/:language?/:mode?': ['nczitzk'], - '/maker/:maker?/:language?/:mode?': ['Zhixin Hu'], - '/mostwanted/:language?/:mode?': ['nczitzk'], - '/newentries/:language?': ['nczitzk'], - '/newrelease/:language?/:mode?': ['nczitzk'], - '/star/:id/:language?/:mode?': ['nczitzk'], - '/update/:language?': ['nczitzk'], - '/:type/:id/:language?': ['nczitzk'], -}; diff --git a/lib/routes/javlibrary/maker.ts b/lib/routes/javlibrary/maker.ts index 999eb05d8..4a7ed68cb 100644 --- a/lib/routes/javlibrary/maker.ts +++ b/lib/routes/javlibrary/maker.ts @@ -1,11 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, defaultMaker, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/videos/maker/:maker?/:language?/:mode?', + categories: ['multimedia'], + example: '/javlibrary/videos/maker/arlq/cn', + parameters: { maker: 'Maker, S1 NO.1 STYLE by default, as `arlq`', language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, videos with comments (by date) by default, as `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Videos by makers', + maintainers: [], + handler, + description: `| videos with comments (by date) | everything (by date) | + | ------------------------------ | -------------------- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const maker = ctx.req.param('maker') ?? defaultMaker; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_maker.php?list&m=${maker}&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/mostwanted.ts b/lib/routes/javlibrary/mostwanted.ts index 4060361ab..a5204d23c 100644 --- a/lib/routes/javlibrary/mostwanted.ts +++ b/lib/routes/javlibrary/mostwanted.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/mostwanted/:language?/:mode?', '/mostwanted/:language?/:mode?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| Last Month | All Time | + | ---------- | -------- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_mostwanted.php?list&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/namespace.ts b/lib/routes/javlibrary/namespace.ts new file mode 100644 index 000000000..a9ec2ee2e --- /dev/null +++ b/lib/routes/javlibrary/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JAVLibrary', + url: 'javlibrary.com', +}; diff --git a/lib/routes/javlibrary/newentries.ts b/lib/routes/javlibrary/newentries.ts index 38f570d8e..2cfbab97d 100644 --- a/lib/routes/javlibrary/newentries.ts +++ b/lib/routes/javlibrary/newentries.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/newentries/:language?', '/newentries/:language?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_newentries.php?list`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/newrelease.ts b/lib/routes/javlibrary/newrelease.ts index 573825fc0..89e008a62 100644 --- a/lib/routes/javlibrary/newrelease.ts +++ b/lib/routes/javlibrary/newrelease.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/newrelease/:language?/:mode?', '/newrelease/:language?/:mode?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| videos with comments (by date) | everything (by date) | + | ------------------------------ | -------------------- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const mode = ctx.req.param('mode') ?? defaultMode; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_newrelease.php?list&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/radar.ts b/lib/routes/javlibrary/radar.ts deleted file mode 100644 index 700999c9c..000000000 --- a/lib/routes/javlibrary/radar.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default { - 'javlibrary.com': { - _name: 'JAVLibrary', - '.': [ - { - title: '最近讨论的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#zui-jin-tao-lun-de-ying-pian', - source: ['/:language', '/'], - target: (params) => `/javlibrary/update/${params.language}`, - }, - { - title: '新发行的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#xin-fa-xing-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/newrelease/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '最新加入的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#zui-xin-jia-ru-de-ying-pian', - source: ['/:language', '/'], - target: (params) => `/javlibrary/update/${params.language}`, - }, - { - title: '最想要的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#zui-xiang-yao-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/mostwanted/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '评价最高的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#ping-jia-zui-gao-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/bestrated/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '最佳评论', - docs: 'https://docs.rsshub.app/routes/multimedia#zui-jia-ping-lun', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/bestreviews/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '影片依分类', - docs: 'https://docs.rsshub.app/routes/multimedia#ying-pian-yi-fen-lei', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/genre/${new URL(url).searchParams.get('g')}/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '影片按演员', - docs: 'https://docs.rsshub.app/routes/multimedia#ying-pian-an-yan-yuan', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/star/${new URL(url).searchParams.get('s')}/${params.language}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '用户发表的文章', - docs: 'https://docs.rsshub.app/routes/multimedia#yong-hu-fa-biao-de-wen-zhang', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/userposts/${new URL(url).searchParams.get('u')}/${params.language}`, - }, - { - title: '用户想要的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#yong-hu-xiang-yao-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/userwanted/${new URL(url).searchParams.get('u')}/${params.language}`, - }, - { - title: '用户看过的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#yong-hu-kan-guo-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/userwatched/${new URL(url).searchParams.get('u')}/${params.language}`, - }, - { - title: '用户拥有的影片', - docs: 'https://docs.rsshub.app/routes/multimedia#yong-hu-yong-you-de-ying-pian', - source: ['/:language', '/'], - target: (params, url) => `/javlibrary/userowned/${new URL(url).searchParams.get('u')}/${params.language}`, - }, - ], - }, -}; diff --git a/lib/routes/javlibrary/router.ts b/lib/routes/javlibrary/router.ts deleted file mode 100644 index ad229909c..000000000 --- a/lib/routes/javlibrary/router.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default (router) => { - router.get('/users/:id/:type/:language?', './user'); - router.get('/videos/bestrated/:language?/:mode?', './bestrated'); - router.get('/videos/genre/:genre?/:language?/:mode?', './genre'); - router.get('/videos/maker/:maker?/:language?/:mode?', './maker'); - router.get('/videos/mostwanted/:language?/:mode?', './mostwanted'); - router.get('/videos/newentries/:language?', './newentries'); - router.get('/videos/newrelease/:language?/:mode?', './newrelease'); - router.get('/videos/update/:language?', './update'); - - router.get('/bestrated/:language?/:mode?', './bestrated'); - router.get('/bestreviews/:language?/:mode?', './bestreviews'); - router.get('/genre/:genre?/:language?/:mode?', './genre'); - router.get('/mostwanted/:language?/:mode?', './mostwanted'); - router.get('/newentries/:language?', './newentries'); - router.get('/newrelease/:language?/:mode?', './newrelease'); - router.get('/star/:id/:language?/:mode?', './star'); - router.get('/update/:language?', './update'); - router.get('/:type/:id/:language?', './user'); -}; diff --git a/lib/routes/javlibrary/star.ts b/lib/routes/javlibrary/star.ts index 009185f6a..8ccdb4af1 100644 --- a/lib/routes/javlibrary/star.ts +++ b/lib/routes/javlibrary/star.ts @@ -1,11 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultMode, defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/star/:id/:language?/:mode?', + categories: ['multimedia'], + example: '/javlibrary/star/abbds/en', + parameters: { id: 'Star id, can be found in URL', language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, videos with comments (by date) by default, as `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Videos by star', + maintainers: ['nczitzk'], + handler, + description: `| videos with comments (by date) | everything (by date) | + | ------------------------------ | -------------------- | + | 1 | 2 | + + :::tip + See [Ranking](https://www.javlibrary.com/en/star_mostfav.php) to view stars by ranks. + + See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars. + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const mode = ctx.req.param('mode') ?? defaultMode; const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_star.php?list&s=${id}&mode=${mode}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/update.ts b/lib/routes/javlibrary/update.ts index cd4877052..f16004430 100644 --- a/lib/routes/javlibrary/update.ts +++ b/lib/routes/javlibrary/update.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/videos/update/:language?', '/update/:language?'], + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/vl_update.php?list`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/javlibrary/user.ts b/lib/routes/javlibrary/user.ts index 3d1890889..5dd84c411 100644 --- a/lib/routes/javlibrary/user.ts +++ b/lib/routes/javlibrary/user.ts @@ -1,11 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { defaultLanguage, rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/users/:id/:type/:language?', '/:type/:id/:language?'], + name: 'Unknown', + maintainers: [], + handler, + description: `| Wanted | Watched | Owned | + | ---------- | ----------- | --------- | + | userwanted | userwatched | userowned |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const type = ctx.req.param('type'); const language = ctx.req.param('language') ?? defaultLanguage; const currentUrl = `${rootUrl}/${language}/${type}.php?list&u=${id}`; ctx.set('data', await ProcessItems(language, currentUrl, cache.tryGet)); -}; +} diff --git a/lib/routes/jd/maintainer.ts b/lib/routes/jd/maintainer.ts deleted file mode 100644 index 5e6bfa17e..000000000 --- a/lib/routes/jd/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/price/:id': ['nczitzk'], -}; diff --git a/lib/routes/jd/namespace.ts b/lib/routes/jd/namespace.ts new file mode 100644 index 000000000..9bd813e67 --- /dev/null +++ b/lib/routes/jd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '京东', + url: 'item.jd.com', +}; diff --git a/lib/routes/jd/price.ts b/lib/routes/jd/price.ts index 65cb15002..a5469e294 100644 --- a/lib/routes/jd/price.ts +++ b/lib/routes/jd/price.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,28 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/price/:id', + categories: ['shopping'], + example: '/jd/price/526835', + parameters: { id: '商品 id,可在商品详情页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '商品价格', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 如商品 \`https://item.jd.com/526835.html\` 中的 id 为 \`526835\`,所以路由为 [\`/jd/price/526835\`](https://rsshub.app/jd/price/526835) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://item.jd.com'; @@ -26,7 +48,7 @@ export default async (ctx) => { const title = response.data.match(/name: '(.*?)'/)[1]; - ctx.set('data', { + return { title: `京东商品价格 - ${title}`, link: currentUrl, item: [ @@ -41,5 +63,5 @@ export default async (ctx) => { }), }, ], - }); -}; + }; +} diff --git a/lib/routes/jd/radar.ts b/lib/routes/jd/radar.ts deleted file mode 100644 index 65d109ebd..000000000 --- a/lib/routes/jd/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'jd.com': { - _name: '京东', - item: [ - { - title: '商品价格', - docs: 'https://docs.rsshub.app/routes/shopping#jing-dong-shang-pin-jia-ge', - source: ['/'], - target: (params, url) => `/jd/price/${new URL(url).hash.match(/\/(\d+)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/jd/router.ts b/lib/routes/jd/router.ts deleted file mode 100644 index 0e9d6f8ab..000000000 --- a/lib/routes/jd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/price/:id', './price'); -}; diff --git a/lib/routes/jewishmuseum/exhibitions.ts b/lib/routes/jewishmuseum/exhibitions.ts index 57c059f1e..29711e9cf 100644 --- a/lib/routes/jewishmuseum/exhibitions.ts +++ b/lib/routes/jewishmuseum/exhibitions.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/exhibitions', + categories: ['travel'], + example: '/jewishmuseum/exhibitions', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Exhibitions', + maintainers: ['chazeon'], + handler, +}; + +async function handler(ctx) { const link = 'https://thejewishmuseum.org/exhibitions'; ctx.set( @@ -16,4 +35,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/jewishmuseum/maintainer.ts b/lib/routes/jewishmuseum/maintainer.ts deleted file mode 100644 index cfaf9ced0..000000000 --- a/lib/routes/jewishmuseum/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/exhibitions': ['chazeon'], -}; diff --git a/lib/routes/jewishmuseum/namespace.ts b/lib/routes/jewishmuseum/namespace.ts new file mode 100644 index 000000000..219e8e016 --- /dev/null +++ b/lib/routes/jewishmuseum/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '纽约犹太人博物馆', + url: 'thejewishmuseum.org', +}; diff --git a/lib/routes/jewishmuseum/radar.ts b/lib/routes/jewishmuseum/radar.ts deleted file mode 100644 index 8049f833d..000000000 --- a/lib/routes/jewishmuseum/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'thejewishmuseum.org': { - _name: 'Jewish Museum', - '.': [ - { - title: 'Exhibitions', - docs: 'https://docs.rsshub.app/routes/travel#the-jewish-museum', - }, - ], - }, -}; diff --git a/lib/routes/jewishmuseum/router.ts b/lib/routes/jewishmuseum/router.ts deleted file mode 100644 index 5876eb541..000000000 --- a/lib/routes/jewishmuseum/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/exhibitions', './exhibitions'); -}; diff --git a/lib/routes/jianshu/collection.ts b/lib/routes/jianshu/collection.ts index 836bba07e..469631404 100644 --- a/lib/routes/jianshu/collection.ts +++ b/lib/routes/jianshu/collection.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:id', + categories: ['social-media'], + example: '/jianshu/collection/xYuZYD', + parameters: { id: '专题 id, 可在专题页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.jianshu.com/c/:id'], + }, + name: '专题', + maintainers: ['DIYgod', 'HenryQW', 'JimenezLi'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -21,10 +43,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: $('title').text(), link: `https://www.jianshu.com/c/${id}`, description: $('meta[name="description"]').attr('content') || $('title').text(), item: result, - }); -}; + }; +} diff --git a/lib/routes/jianshu/home.ts b/lib/routes/jianshu/home.ts index 3c66d6899..04e4d34d3 100644 --- a/lib/routes/jianshu/home.ts +++ b/lib/routes/jianshu/home.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/home', + categories: ['social-media'], + example: '/jianshu/home', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.jianshu.com/'], + }, + name: '首页', + maintainers: ['DIYgod', 'HenryQW', 'JimenezLi'], + handler, + url: 'www.jianshu.com/', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://www.jianshu.com', @@ -19,10 +42,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: '简书首页', link: 'https://www.jianshu.com', description: $('meta[name="description"]').attr('content'), item: result, - }); -}; + }; +} diff --git a/lib/routes/jianshu/maintainer.ts b/lib/routes/jianshu/maintainer.ts deleted file mode 100644 index b50e26e6f..000000000 --- a/lib/routes/jianshu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/collection/:id': ['DIYgod', 'HenryQW', 'JimenezLi'], - '/home': ['DIYgod', 'HenryQW', 'JimenezLi'], - '/user/:id': ['DIYgod', 'HenryQW', 'JimenezLi'], -}; diff --git a/lib/routes/jianshu/namespace.ts b/lib/routes/jianshu/namespace.ts new file mode 100644 index 000000000..227f6fe83 --- /dev/null +++ b/lib/routes/jianshu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '简书', + url: 'www.jianshu.com', +}; diff --git a/lib/routes/jianshu/radar.ts b/lib/routes/jianshu/radar.ts deleted file mode 100644 index 58d2d84ca..000000000 --- a/lib/routes/jianshu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'jianshu.com': { - _name: '简书', - www: [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/social-media#jian-shu', - source: '/', - target: '/jianshu/home', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/social-media#jian-shu', - source: '/c/:id', - target: '/jianshu/collection/:id', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/social-media#jian-shu', - source: '/u/:id', - target: '/jianshu/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/jianshu/router.ts b/lib/routes/jianshu/router.ts deleted file mode 100644 index 87d84957e..000000000 --- a/lib/routes/jianshu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/collection/:id', './collection'); - router.get('/home', './home'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/jianshu/user.ts b/lib/routes/jianshu/user.ts index b514bc9a7..17a81911d 100644 --- a/lib/routes/jianshu/user.ts +++ b/lib/routes/jianshu/user.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/jianshu/user/yZq3ZV', + parameters: { id: '作者 id, 可在作者主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.jianshu.com/u/:id'], + }, + name: '作者', + maintainers: ['DIYgod', 'HenryQW', 'JimenezLi'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -21,10 +43,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: $('title').text(), link: `https://www.jianshu.com/u/${id}`, description: $('meta[name="description"]').attr('content') || $('title').text(), item: result, - }); -}; + }; +} diff --git a/lib/routes/jiaoliudao/index.ts b/lib/routes/jiaoliudao/index.ts index 27b970254..b3fa91d17 100644 --- a/lib/routes/jiaoliudao/index.ts +++ b/lib/routes/jiaoliudao/index.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['jiaoliudao.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'jiaoliudao.com/', +}; + +async function handler(ctx) { const baseUrl = 'https://www.jiaoliudao.com'; const { data } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { @@ -17,10 +30,10 @@ export default async (ctx) => { link: item.link, })); - ctx.set('data', { + return { title: '交流岛资源网-专注网络资源收集', image: `${baseUrl}/favicon.ico`, link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/jiaoliudao/maintainer.ts b/lib/routes/jiaoliudao/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/jiaoliudao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/jiaoliudao/namespace.ts b/lib/routes/jiaoliudao/namespace.ts new file mode 100644 index 000000000..74266cda6 --- /dev/null +++ b/lib/routes/jiaoliudao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '交流岛资源网', + url: 'jiaoliudao.com', +}; diff --git a/lib/routes/jiaoliudao/radar.ts b/lib/routes/jiaoliudao/radar.ts deleted file mode 100644 index 2bb0e7d3b..000000000 --- a/lib/routes/jiaoliudao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'jiaoliudao.com': { - _name: '交流岛资源网', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/blog#jiao-liu-dao-zi-yuan-wang', - source: ['/'], - target: '/jiaoliudao', - }, - ], - }, -}; diff --git a/lib/routes/jiaoliudao/router.ts b/lib/routes/jiaoliudao/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/jiaoliudao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/jiemian/list.ts b/lib/routes/jiemian/list.ts index 2643565da..ea316e701 100644 --- a/lib/routes/jiemian/list.ts +++ b/lib/routes/jiemian/list.ts @@ -1,6 +1,14 @@ -export default (ctx) => { +import { Route } from '@/types'; +export const route: Route = { + path: '/list/:id', + name: 'Unknown', + maintainers: [], + handler, +}; + +function handler(ctx) { const id = ctx.req.param('id'); const redirectTo = `/jiemian${id ? `/lists/${id}` : ''}`; ctx.redirect(redirectTo); -}; +} diff --git a/lib/routes/jiemian/lists.ts b/lib/routes/jiemian/lists.ts index 1b792769d..0e7861fc7 100644 --- a/lib/routes/jiemian/lists.ts +++ b/lib/routes/jiemian/lists.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -89,7 +97,7 @@ export default async (ctx) => { const image = $('div.logo img').prop('src'); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -100,5 +108,5 @@ export default async (ctx) => { logo: icon, subtitle: titleSplits[0], author: titleSplits.pop(), - }); -}; + }; +} diff --git a/lib/routes/jiemian/maintainer.ts b/lib/routes/jiemian/maintainer.ts deleted file mode 100644 index cb2f73244..000000000 --- a/lib/routes/jiemian/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/lists/:id': ['WenhuWee', 'nczitzk'], - '/pro/lists/:id': ['nczitzk'], - '/account/main/:id': ['nczitzk'], - '/video/lists/:id': ['nczitzk'], - '/special/lists/:id': ['nczitzk'], -}; diff --git a/lib/routes/jiemian/namespace.ts b/lib/routes/jiemian/namespace.ts new file mode 100644 index 000000000..8e8c3afbb --- /dev/null +++ b/lib/routes/jiemian/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '界面新闻', + url: 'jiemian.com', +}; diff --git a/lib/routes/jiemian/radar.ts b/lib/routes/jiemian/radar.ts deleted file mode 100644 index f3aaf738c..000000000 --- a/lib/routes/jiemian/radar.ts +++ /dev/null @@ -1,631 +0,0 @@ -export default { - 'jiemian.com': { - _name: '界面新闻', - '.': [ - { - title: '首页 - 科技', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/65.html'], - target: '/jiemian/lists/65', - }, - { - title: '首页 - 金融', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/9.html'], - target: '/jiemian/lists/9', - }, - { - title: '首页 - 证券', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/112.html'], - target: '/jiemian/lists/112', - }, - { - title: '首页 - 地产', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/62.html'], - target: '/jiemian/lists/62', - }, - { - title: '首页 - 汽车', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/51.html'], - target: '/jiemian/lists/51', - }, - { - title: '首页 - 健康', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/472.html'], - target: '/jiemian/lists/472', - }, - { - title: '首页 - 地方', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/city/main/277.html'], - target: '/jiemian/city/main/277', - }, - { - title: '首页 - 大湾区', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/680.html'], - target: '/jiemian/lists/680', - }, - { - title: '首页 - 元宇宙', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/704.html'], - target: '/jiemian/lists/704', - }, - { - title: '首页 - 文旅', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/105.html'], - target: '/jiemian/lists/105', - }, - { - title: '首页 - 数据', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/154.html'], - target: '/jiemian/lists/154', - }, - { - title: '首页 - ESG', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/712.html'], - target: '/jiemian/lists/712', - }, - { - title: '首页 - 双碳', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/877.html'], - target: '/jiemian/lists/877', - }, - { - title: '首页 - 电厂', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shou-ye', - source: ['/lists/872.html'], - target: '/jiemian/lists/872', - }, - { - title: '商业 - 科技', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/65.html'], - target: '/jiemian/lists/65', - }, - { - title: '商业 - 地产', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/62.html'], - target: '/jiemian/lists/62', - }, - { - title: '商业 - 汽车', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/51.html'], - target: '/jiemian/lists/51', - }, - { - title: '商业 - 消费', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/31.html'], - target: '/jiemian/lists/31', - }, - { - title: '商业 - 工业', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/28.html'], - target: '/jiemian/lists/28', - }, - { - title: '商业 - 时尚', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/68.html'], - target: '/jiemian/lists/68', - }, - { - title: '商业 - 交通', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/30.html'], - target: '/jiemian/lists/30', - }, - { - title: '商业 - 医药', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/472.html'], - target: '/jiemian/lists/472', - }, - { - title: '商业 - 互联网', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/851.html'], - target: '/jiemian/lists/851', - }, - { - title: '商业 - 创投 ', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/858.html'], - target: '/jiemian/lists/858', - }, - { - title: '商业 - 能源', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/856.html'], - target: '/jiemian/lists/856', - }, - { - title: '商业 - 数码', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/853.html'], - target: '/jiemian/lists/853', - }, - { - title: '商业 - 教育', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/256.html'], - target: '/jiemian/lists/256', - }, - { - title: '商业 - 食品', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/845.html'], - target: '/jiemian/lists/845', - }, - { - title: '商业 - 新能源', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/857.html'], - target: '/jiemian/lists/857', - }, - { - title: '商业 - 家电', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/850.html'], - target: '/jiemian/lists/850', - }, - { - title: '商业 - 健康', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/854.html'], - target: '/jiemian/lists/854', - }, - { - title: '商业 - 酒业', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/676.html'], - target: '/jiemian/lists/676', - }, - { - title: '商业 - 物流', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/841.html'], - target: '/jiemian/lists/841', - }, - { - title: '商业 - 零售', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/847.html'], - target: '/jiemian/lists/847', - }, - { - title: '商业 - 美妆', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/838.html'], - target: '/jiemian/lists/838', - }, - { - title: '商业 - 楼市', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/city/main/181.html'], - target: '/jiemian/city/main/181', - }, - { - title: '商业 - 家居', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/694.html'], - target: '/jiemian/lists/694', - }, - { - title: '商业 - 餐饮', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/848.html'], - target: '/jiemian/lists/848', - }, - { - title: '商业 - 日用', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/846.html'], - target: '/jiemian/lists/846', - }, - { - title: '商业 - 企服', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/852.html'], - target: '/jiemian/lists/852', - }, - { - title: '商业 - 珠宝', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/839.html'], - target: '/jiemian/lists/839', - }, - { - title: '商业 - 腕表', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/840.html'], - target: '/jiemian/lists/840', - }, - { - title: '商业 - 商学院', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/605.html'], - target: '/jiemian/lists/605', - }, - { - title: '商业 - 元宇宙', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/704.html'], - target: '/jiemian/lists/704', - }, - { - title: '商业 - 电厂', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/872.html'], - target: '/jiemian/lists/872', - }, - { - title: '商业 - 农业', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-shang-ye', - source: ['/lists/883.html'], - target: '/jiemian/lists/883', - }, - { - title: '财经 - 金融', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/9.html'], - target: '/jiemian/lists/9', - }, - { - title: '财经 - 投资', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/86.html'], - target: '/jiemian/lists/86', - }, - { - title: '财经 - 证券', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/112.html'], - target: '/jiemian/lists/112', - }, - { - title: '财经 - IPO', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/699.html'], - target: '/jiemian/lists/699', - }, - { - title: '财经 - 宏观', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/174.html'], - target: '/jiemian/lists/174', - }, - { - title: '财经 - 股市', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/418.html'], - target: '/jiemian/lists/418', - }, - { - title: '财经 - 财富', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/410.html'], - target: '/jiemian/lists/410', - }, - { - title: '财经 - 有连云', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-cai-jing', - source: ['/lists/889.html'], - target: '/jiemian/lists/889', - }, - { - title: '新闻 - 天下', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/32.html'], - target: '/jiemian/lists/32', - }, - { - title: '新闻 - 中国', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/71.html'], - target: '/jiemian/lists/71', - }, - { - title: '新闻 - 地方', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/city/main/279.html'], - target: '/jiemian/city/main/279', - }, - { - title: '新闻 - 评论', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/8.html'], - target: '/jiemian/lists/8', - }, - { - title: '新闻 - 数据', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/154.html'], - target: '/jiemian/lists/154', - }, - { - title: '新闻 - 职场', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/50.html'], - target: '/jiemian/lists/50', - }, - { - title: '新闻 - 国是', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/422.html'], - target: '/jiemian/lists/422', - }, - { - title: '新闻 - 体育', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/82.html'], - target: '/jiemian/lists/82', - }, - { - title: '新闻 - 文娱', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/63.html'], - target: '/jiemian/lists/63', - }, - { - title: '新闻 - 影像', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/225.html'], - target: '/jiemian/lists/225', - }, - { - title: '新闻 - 营销', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/49.html'], - target: '/jiemian/lists/49', - }, - { - title: '新闻 - 大湾区', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/680.html'], - target: '/jiemian/lists/680', - }, - { - title: '新闻 - ESG', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/712.html'], - target: '/jiemian/lists/712', - }, - { - title: '新闻 - 双碳', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/877.html'], - target: '/jiemian/lists/877', - }, - { - title: '新闻 - 长三角', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-xin-wen', - source: ['/lists/917.html'], - target: '/jiemian/lists/917', - }, - { - title: '文化生活 - 文化', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/130.html'], - target: '/jiemian/lists/130', - }, - { - title: '文化生活 - 文旅', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/105.html'], - target: '/jiemian/lists/105', - }, - { - title: '文化生活 - 生活方式', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/135.html'], - target: '/jiemian/lists/135', - }, - { - title: '文化生活 - 美食美酒', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/865.html'], - target: '/jiemian/lists/865', - }, - { - title: '文化生活 - 艺术', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/643.html'], - target: '/jiemian/lists/643', - }, - { - title: '文化生活 - 游戏', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/118.html'], - target: '/jiemian/lists/118', - }, - { - title: '文化生活 - 正午', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/lists/53.html'], - target: '/jiemian/lists/53', - }, - { - title: '文化生活 - 箭厂', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-wen-hua-sheng-huo', - source: ['/video/lists/195_1.html'], - target: '/jiemian/video/lists/195_1', - }, - { - title: '快报 - 今日热点', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1324kb.html'], - target: '/jiemian/lists/1324kb', - }, - { - title: '快报 - 公司头条', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1322kb.html'], - target: '/jiemian/lists/1322kb', - }, - { - title: '快报 - 股市前沿', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1327kb.html'], - target: '/jiemian/lists/1327kb', - }, - { - title: '快报 - 监管通报', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1330kb.html'], - target: '/jiemian/lists/1330kb', - }, - { - title: '快报 - 财经速览', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1326kb.html'], - target: '/jiemian/lists/1326kb', - }, - { - title: '快报 - 时事追踪', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-lan-mu-kuai-bao', - source: ['/lists/1325kb.html'], - target: '/jiemian/lists/1325kb', - }, - { - title: 'VIP - 投资早晚报', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/12.html'], - target: '/jiemian/pro/lists/12', - }, - { - title: 'VIP - 宏观晚6点', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/20.html'], - target: '/jiemian/pro/lists/20', - }, - { - title: 'VIP - 打新早报', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/21.html'], - target: '/jiemian/pro/lists/21', - }, - { - title: 'VIP - 盘前机会前瞻', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/13.html'], - target: '/jiemian/pro/lists/13', - }, - { - title: 'VIP - 公告快评', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/14.html'], - target: '/jiemian/pro/lists/14', - }, - { - title: 'VIP - 盘中必读', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/15.html'], - target: '/jiemian/pro/lists/15', - }, - { - title: 'VIP - 金股挖掘', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/16.html'], - target: '/jiemian/pro/lists/16', - }, - { - title: 'VIP - 调研早知道', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/17.html'], - target: '/jiemian/pro/lists/17', - }, - { - title: 'VIP - 研报新知', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/18.html'], - target: '/jiemian/pro/lists/18', - }, - { - title: 'VIP - 大势侦察', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/1.html'], - target: '/jiemian/pro/lists/1', - }, - { - title: 'VIP - 市场风向标', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-vip', - source: ['/pro/lists/19.html'], - target: '/jiemian/pro/lists/19', - }, - { - title: '界面号 - 财经号', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', - source: ['/account/main/1.html'], - target: '/jiemian/account/main/1', - }, - { - title: '界面号 - 城市号', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', - source: ['/account/main/2.html'], - target: '/jiemian/account/main/2', - }, - { - title: '界面号 - 媒体号', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-jie-mian-hao', - source: ['/account/main/3.html'], - target: '/jiemian/account/main/3', - }, - { - title: '视频 - 界面Vnews', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/258_1.html'], - target: '/jiemian/video/lists/258_1', - }, - { - title: '视频 - 直播', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/videoLive/lists_1.html'], - target: '/jiemian/videoLive/lists_1', - }, - { - title: '视频 - 箭厂', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/195_1.html'], - target: '/jiemian/video/lists/195_1', - }, - { - title: '视频 - 面谈', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/111_1.html'], - target: '/jiemian/video/lists/111_1', - }, - { - title: '视频 - 品牌创酷', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/226_1.html'], - target: '/jiemian/video/lists/226_1', - }, - { - title: '视频 - 番茄社', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/567_1.html'], - target: '/jiemian/video/lists/567_1', - }, - { - title: '视频 - 商业微史记', - docs: 'https://docs.rsshub.app/routes/traditional-media#jie-mian-xin-wen-shi-pin', - source: ['/video/lists/882_1.html'], - target: '/jiemian/video/lists/882_1', - }, - ], - }, -}; diff --git a/lib/routes/jiemian/router.ts b/lib/routes/jiemian/router.ts deleted file mode 100644 index 357ae4f72..000000000 --- a/lib/routes/jiemian/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/list/:id', './list'); - router.get('/:category{.+}?', './lists'); -}; diff --git a/lib/routes/jike/maintainer.ts b/lib/routes/jike/maintainer.ts deleted file mode 100644 index 791b901f3..000000000 --- a/lib/routes/jike/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/topic/text/:id': ['HenryQW'], - '/topic/:id/:showUid?': ['DIYgod', 'prnake'], - '/user/:id': ['DIYgod', 'prnake'], -}; diff --git a/lib/routes/jike/namespace.ts b/lib/routes/jike/namespace.ts new file mode 100644 index 000000000..2b5542a2c --- /dev/null +++ b/lib/routes/jike/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '即刻', + url: 'm.okjike.com', +}; diff --git a/lib/routes/jike/radar.ts b/lib/routes/jike/radar.ts deleted file mode 100644 index 6ff8afea0..000000000 --- a/lib/routes/jike/radar.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default { - 'okjike.com': { - _name: '即刻', - m: [ - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/users/:uid', - target: '/jike/user/:uid', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/reposts/:repostId', - target: (params, url, document) => { - const uid = document.querySelector('.avatar').getAttribute('href').replace('/users/', ''); - return uid ? `/jike/user/${uid}` : ''; - }, - }, - { - title: '圈子', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/topics/:id', - target: '/jike/topic/:id', - }, - { - title: '圈子 - 纯文字', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/topics/:id', - target: '/jike/topic/text/:id', - }, - ], - web: [ - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/u/:uid', - target: '/jike/user/:uid', - }, - { - title: '圈子', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/topic/:id', - target: '/jike/topic/:id', - }, - { - title: '圈子 - 纯文字', - docs: 'https://docs.rsshub.app/routes/social-media#ji-ke', - source: '/topic/:id', - target: '/jike/topic/text/:id', - }, - ], - }, -}; diff --git a/lib/routes/jike/router.ts b/lib/routes/jike/router.ts deleted file mode 100644 index dcbfc63ae..000000000 --- a/lib/routes/jike/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/topic/text/:id', './topic-text'); - router.get('/topic/:id/:showUid?', './topic'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/jike/topic-text.ts b/lib/routes/jike/topic-text.ts index fbb20392e..aa74f2967 100644 --- a/lib/routes/jike/topic-text.ts +++ b/lib/routes/jike/topic-text.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import dayjs from 'dayjs'; import { constructTopicEntry } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/text/:id', + categories: ['social-media'], + example: '/jike/topic/text/553870e8e4b0cafb0a1bef68', + parameters: { id: '圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['web.okjike.com/topic/:id'], + }, + name: '圈子 - 纯文字', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const topicUrl = `https://m.okjike.com/topics/${id}`; @@ -20,4 +42,4 @@ export default async (ctx) => { }); ctx.set('data', result); } -}; +} diff --git a/lib/routes/jike/topic.ts b/lib/routes/jike/topic.ts index ab3f6f55c..1f8228696 100644 --- a/lib/routes/jike/topic.ts +++ b/lib/routes/jike/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { topicDataHanding, constructTopicEntry } from './utils'; @@ -6,7 +7,29 @@ import dayjs from 'dayjs'; const urlRegex = /(https?:\/\/[^\s"'<>]+)/g; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id/:showUid?', + categories: ['social-media'], + example: '/jike/topic/556688fae4b00c57d9dd46ee', + parameters: { id: '圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到', showUid: '是否在内容中显示用户信息,设置为 1 则开启' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['web.okjike.com/topic/:id'], + target: '/topic/:id', + }, + name: '圈子', + maintainers: ['DIYgod', 'prnake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const topicUrl = `https://m.okjike.com/topics/${id}`; @@ -44,4 +67,4 @@ export default async (ctx) => { } ctx.set('data', result); } -}; +} diff --git a/lib/routes/jike/user.ts b/lib/routes/jike/user.ts index 4021c58cd..f756bf9ab 100644 --- a/lib/routes/jike/user.ts +++ b/lib/routes/jike/user.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/jike/user/3EE02BC9-C5B3-4209-8750-4ED1EE0F67BB', + parameters: { id: '用户 id, 可在即刻分享出来的单条动态页点击用户头像进入个人主页,然后在个人主页的 URL 中找到,或者在单条动态页使用 RSSHub Radar 插件' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['web.okjike.com/u/:uid'], + target: '/user/:uid', + }, + name: '用户动态', + maintainers: ['DIYgod', 'prnake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -148,11 +171,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${data.user.screenName}的即刻动态`, description: data.user.bio, link: `https://m.okjike.com/users/${id}`, image: data.user.avatarImage.picUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/jike/utils.ts b/lib/routes/jike/utils.ts index 756e1ba5d..91ba6685b 100644 --- a/lib/routes/jike/utils.ts +++ b/lib/routes/jike/utils.ts @@ -175,21 +175,21 @@ const constructTopicEntry = async (ctx, url) => { ); if (data.length === 0) { - ctx.set('data', { + return { title: '主题 ID 不存在,或该主题暂无内容', - }); + }; return null; } const topic = data.topic; - ctx.set('data', { + return { title: `${topic.content} - 即刻圈子`, link: url, description: topic.briefIntro, image: topic.squarePicture.picUrl || topic.squarePicture.middlePicUrl || topic.squarePicture.thumbnailUrl, // item: topicDataHanding(data), - }); + }; return data; }; diff --git a/lib/routes/jin10/index.ts b/lib/routes/jin10/index.ts index dd7ec8f94..57825d0cc 100644 --- a/lib/routes/jin10/index.ts +++ b/lib/routes/jin10/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/:important?', + categories: ['finance'], + example: '/jin10', + parameters: { important: '只看重要,任意值开启,留空关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jin10.com/'], + target: '', + }, + name: '市场快讯', + maintainers: ['laampui'], + handler, + url: 'jin10.com/', +}; + +async function handler(ctx) { const { important = false } = ctx.req.param(); const data = await cache.tryGet( 'jin10:index', @@ -54,9 +78,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '金十数据', link: 'https://www.jin10.com/', item: important ? item.filter((item) => item.important) : item, - }); -}; + }; +} diff --git a/lib/routes/jin10/maintainer.ts b/lib/routes/jin10/maintainer.ts deleted file mode 100644 index cbfea7ff3..000000000 --- a/lib/routes/jin10/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:important?': ['laampui'], - '/topic/:id': ['miles170'], -}; diff --git a/lib/routes/jin10/namespace.ts b/lib/routes/jin10/namespace.ts new file mode 100644 index 000000000..79e353aa4 --- /dev/null +++ b/lib/routes/jin10/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '金十数据', + url: 'jin10.com', +}; diff --git a/lib/routes/jin10/radar.ts b/lib/routes/jin10/radar.ts deleted file mode 100644 index 7a73e9344..000000000 --- a/lib/routes/jin10/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'jin10.com': { - _name: '金十数据', - '.': [ - { - title: '市场快讯', - docs: 'https://docs.rsshub.app/routes/finance#jin-shi-shu-ju', - source: ['/'], - target: '/jin10', - }, - ], - xnews: [ - { - title: '主题文章', - docs: 'https://docs.rsshub.app/routes/finance#jin-shi-shu-ju', - source: ['/topic/:id'], - target: '/jin10/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/jin10/router.ts b/lib/routes/jin10/router.ts deleted file mode 100644 index ab0046c3a..000000000 --- a/lib/routes/jin10/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:important?', './index'); - router.get('/topic/:id', './topic'); -}; diff --git a/lib/routes/jin10/topic.ts b/lib/routes/jin10/topic.ts index 423de4409..282f0549e 100644 --- a/lib/routes/jin10/topic.ts +++ b/lib/routes/jin10/topic.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id', + categories: ['finance'], + example: '/jin10/topic/396', + parameters: { id: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xnews.jin10.com/topic/:id'], + }, + name: '主题文章', + maintainers: ['miles170'], + handler, + url: 'jin10.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const data = await cache.tryGet( `jin10:topic:${id}`, @@ -42,10 +65,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: data.title, link: `https://xnews.jin10.com/topic/${id}`, description: data.introduction, item: items, - }); -}; + }; +} diff --git a/lib/routes/jinse/catalogue.ts b/lib/routes/jinse/catalogue.ts index e0c95dcf2..36db60756 100644 --- a/lib/routes/jinse/catalogue.ts +++ b/lib/routes/jinse/catalogue.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -21,7 +22,32 @@ const categories = { capitalmarket: '研报', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['finance'], + example: '/jinse/zhengce', + parameters: { category: '分类,见下表,默认为政策' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 政策 | 行情 | DeFi | 矿业 | 以太坊 2.0 | + | ------- | ------------ | ---- | ----- | ---------- | + | zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 | + + | 产业 | IPFS | 技术 | 百科 | 研报 | + | -------- | ---- | ---- | ----- | ------------- | + | industry | IPFS | tech | baike | capitalmarket |`, +}; + +async function handler(ctx) { const { category = 'zhengce' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -89,7 +115,7 @@ export default async (ctx) => { const image = $('a.js-logoBox img').prop('src'); const icon = new URL($('link[rel="favicon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${Object.hasOwn(categories, category) ? categories[category] : category}`, link: currentUrl, @@ -101,5 +127,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index 609098622..b29c5dcc5 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,7 +17,28 @@ const categories = { 5: '项目', }; -export default async (ctx) => { +export const route: Route = { + path: '/lives/:category?', + categories: ['finance'], + example: '/jinse/lives', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + description: `| 全部 | 精选 | 政策 | 数据 | NFT | 项目 | + | ---- | ---- | ---- | ---- | --- | ---- | + | 0 | 1 | 2 | 3 | 4 | 5 |`, +}; + +async function handler(ctx) { const { category = '0' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -74,7 +96,7 @@ export default async (ctx) => { const image = $('a.js-logoBox img').prop('src'); const icon = new URL($('link[rel="favicon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${Object.hasOwn(categories, category) ? categories[category] : category}`, link: currentUrl, @@ -86,5 +108,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/jinse/maintainer.ts b/lib/routes/jinse/maintainer.ts deleted file mode 100644 index 8f131a6be..000000000 --- a/lib/routes/jinse/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/lives/:category?': ['nczitzk'], - '/timeline/:category?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/jinse/namespace.ts b/lib/routes/jinse/namespace.ts new file mode 100644 index 000000000..549bba2c8 --- /dev/null +++ b/lib/routes/jinse/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '金色财经', + url: 'jinse.cn', +}; diff --git a/lib/routes/jinse/radar.ts b/lib/routes/jinse/radar.ts deleted file mode 100644 index c6227b65f..000000000 --- a/lib/routes/jinse/radar.ts +++ /dev/null @@ -1,187 +0,0 @@ -export default { - 'jinse.cn': { - _name: '金色财经', - '.': [ - { - title: '首页 - 头条', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/头条', - }, - { - title: '首页 - 独家', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/独家', - }, - { - title: '首页 - 铭文', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/铭文', - }, - { - title: '首页 - 产业', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/产业', - }, - { - title: '首页 - 项目', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/项目', - }, - { - title: '首页 - 政策', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/政策', - }, - { - title: '首页 - AI', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/AI', - }, - { - title: '首页 - Web 3.0', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/Web 3.0', - }, - { - title: '首页 - 以太坊2.0', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/以太坊2.0', - }, - { - title: '首页 - DeFi', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/DeFi', - }, - { - title: '首页 - Layer2', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/Layer2', - }, - { - title: '首页 - NFT', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/NFT', - }, - { - title: '首页 - DAO', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/DAO', - }, - { - title: '首页 - 百科', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-shou-ye', - source: ['/'], - target: '/jinse/timeline/百科', - }, - { - title: '快讯 - 全部', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/0', - }, - { - title: '快讯 - 精选', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/1', - }, - { - title: '快讯 - 政策', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/2', - }, - { - title: '快讯 - 数据', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/3', - }, - { - title: '快讯 - NFT', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/4', - }, - { - title: '快讯 - 项目', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-kuai-xun', - source: ['/lives'], - target: '/jinse/lives/5', - }, - { - title: '分类 - 政策', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/zhengce', - }, - { - title: '分类 - 行情', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/fenxishishuo', - }, - { - title: '分类 - DeFi', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/defi', - }, - { - title: '分类 - 矿业', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/kuang', - }, - { - title: '分类 - 以太坊 2.0', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/以太坊2.0', - }, - { - title: '分类 - 产业', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/industry', - }, - { - title: '分类 - IPFS', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/IPFS', - }, - { - title: '分类 - 技术', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/tech', - }, - { - title: '分类 - 百科', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/baike', - }, - { - title: '分类 - 研报', - docs: 'https://docs.rsshub.app/routes/finance#jin-se-cai-jing-fen-lei', - source: ['/'], - target: '/jinse/capitalmarket', - }, - ], - }, -}; diff --git a/lib/routes/jinse/router.ts b/lib/routes/jinse/router.ts deleted file mode 100644 index 761be76b2..000000000 --- a/lib/routes/jinse/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/lives/:category?', './lives'); - router.get('/timeline/:category?', './timeline'); - router.get('/:category?', './catalogue'); -}; diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index d9fa60759..d1fc3ea02 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/timeline/:category?', + categories: ['finance'], + example: '/jinse/timeline', + parameters: { category: '分类,见下表,默认为头条' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['nczitzk'], + handler, + description: `| 头条 | 独家 | 铭文 | 产业 | 项目 | + | ------ | ---- | ------- | ---------- | ---- | + | 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi | + | Layer2 | NFT | DAO | 百科 | |`, +}; + +async function handler(ctx) { const { category = '头条' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -84,7 +107,7 @@ export default async (ctx) => { const image = $('a.js-logoBox img').prop('src'); const icon = new URL($('link[rel="favicon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${category}`, link: currentUrl, @@ -96,5 +119,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/jisilu/index.ts b/lib/routes/jisilu/index.ts index 6504c45b1..0d5e51baa 100644 --- a/lib/routes/jisilu/index.ts +++ b/lib/routes/jisilu/index.ts @@ -1,10 +1,50 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:sort?/:day?', + categories: ['bbs'], + example: '/jisilu', + parameters: { category: '分类,见下表,默认为全部,可在 URL 中找到', sort: '排序,见下表,默认为最新,可在 URL 中找到', day: '几天内,见下表,默认为30天,本参数仅在排序参数设定为 `热门` 后才可生效' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jisilu.cn/home/explore', 'jisilu.cn/explore', 'jisilu.cn/'], + }, + name: '广场', + maintainers: ['nczitzk'], + handler, + url: 'jisilu.cn/home/explore', + description: `分类 + + | 全部 | 债券 / 可转债 | 基金 | 套利 | 新股 | + | ---- | ------------- | ---- | ---- | ---- | + | | 4 | 7 | 5 | 3 | + + 排序 + + | 最新 | 热门 | 按发表时间 | + | ---- | ---- | ---------- | + | | hot | add\_time | + + 几天内 + + | 30 天 | 7 天 | 当天 | + | ----- | ---- | ---- | + | 30 | 7 | 1 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const sort = ctx.req.param('sort') ?? ''; const day = ctx.req.param('day') ?? ''; @@ -83,9 +123,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${name ? `${name}的${category === 'topic' ? '主题' : '回复'}` : '广场'} - 集思录`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/jisilu/maintainer.ts b/lib/routes/jisilu/maintainer.ts deleted file mode 100644 index 77666d8e8..000000000 --- a/lib/routes/jisilu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:sort?/:day?': ['nczitzk'], -}; diff --git a/lib/routes/jisilu/namespace.ts b/lib/routes/jisilu/namespace.ts new file mode 100644 index 000000000..4f5c9450b --- /dev/null +++ b/lib/routes/jisilu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '集思录', + url: 'jisilu.cn', +}; diff --git a/lib/routes/jisilu/radar.ts b/lib/routes/jisilu/radar.ts deleted file mode 100644 index 0ee81f027..000000000 --- a/lib/routes/jisilu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'jisilu.cn': { - _name: '集思录', - '.': [ - { - title: '广场', - docs: 'https://docs.rsshub.app/routes/bbs#ji-si-lu-guang-chang', - source: ['/home/explore', '/explore', '/'], - target: '/jisilu/:category?/:sort?/:day?', - }, - { - title: '用户回复', - docs: 'https://docs.rsshub.app/routes/bbs#ji-si-lu-yong-hu-hui-fu', - source: ['/people/:user'], - target: '/jisilu/reply/:user', - }, - { - title: '用户主题', - docs: 'https://docs.rsshub.app/routes/bbs#ji-si-lu-yong-hu-zhu-ti', - source: ['/people/:user'], - target: '/jisilu/topic/:user', - }, - ], - }, -}; diff --git a/lib/routes/jisilu/router.ts b/lib/routes/jisilu/router.ts deleted file mode 100644 index 03a8d21eb..000000000 --- a/lib/routes/jisilu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:sort?/:day?', './index'); -}; diff --git a/lib/routes/jjwxc/author.ts b/lib/routes/jjwxc/author.ts index 463a9e5e7..f1ce2d1f5 100644 --- a/lib/routes/jjwxc/author.ts +++ b/lib/routes/jjwxc/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,25 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:id?', + categories: ['reading'], + example: '/jjwxc/author/4364484', + parameters: { id: '作者 id,可在对应作者页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作者最新作品', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.jjwxc.net'; @@ -56,7 +75,7 @@ export default async (ctx) => { const image = `https:${logoEl.prop('src')}`; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${logoEl.prop('alt').replace(/logo/, '')} | ${author} - 最近更新`, link: currentUrl, @@ -67,5 +86,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="Description"]').prop('content'), author, - }); -}; + }; +} diff --git a/lib/routes/jjwxc/book.ts b/lib/routes/jjwxc/book.ts index 39d3bd028..e82bc67f0 100644 --- a/lib/routes/jjwxc/book.ts +++ b/lib/routes/jjwxc/book.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/book/:id?', + categories: ['reading'], + example: '/jjwxc/book/7013024', + parameters: { id: '作品 id,可在对应作品页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作品', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -95,7 +114,7 @@ export default async (ctx) => { const image = `https:${logoEl.prop('src')}`; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${logoEl.prop('alt').replace(/logo/, '')} | ${author}${keywords[0]}`, link: currentUrl, @@ -106,5 +125,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="Description"]').prop('content'), author: $('meta[name="Author"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/jjwxc/maintainer.ts b/lib/routes/jjwxc/maintainer.ts deleted file mode 100644 index f6e8432ec..000000000 --- a/lib/routes/jjwxc/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/author/:id?': ['nczitzk'], - '/book/:id?': ['nczitzk'], -}; diff --git a/lib/routes/jjwxc/namespace.ts b/lib/routes/jjwxc/namespace.ts new file mode 100644 index 000000000..46868a4cb --- /dev/null +++ b/lib/routes/jjwxc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '晋江文学城', + url: 'jjwxc.net', +}; diff --git a/lib/routes/jjwxc/radar.ts b/lib/routes/jjwxc/radar.ts deleted file mode 100644 index ec6db351c..000000000 --- a/lib/routes/jjwxc/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'jjwxc.net': { - _name: '晋江文学城', - '.': [ - { - title: '作者最新作品', - docs: 'https://docs.rsshub.app/routes/reading#jin-jiang-wen-xue-cheng-zuo-zhe-zui-xin-zuo-pin', - source: ['oneauthor.php'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('authorid'); - - return `/jjwxc/author/${id}`; - }, - }, - { - title: '作品', - docs: 'https://docs.rsshub.app/routes/reading#jin-jiang-wen-xue-cheng-zuo-pin', - source: ['onebook.php'], - target: (_, url) => { - url = new URL(url); - const id = url.searchParams.get('novelid'); - - return `/jjwxc/book/${id}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/jjwxc/router.ts b/lib/routes/jjwxc/router.ts deleted file mode 100644 index c9c9f4f7c..000000000 --- a/lib/routes/jjwxc/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/author/:id?', './author'); - router.get('/book/:id?', './book'); -}; diff --git a/lib/routes/jornada/index.ts b/lib/routes/jornada/index.ts index 0d8d6697d..2eb382664 100644 --- a/lib/routes/jornada/index.ts +++ b/lib/routes/jornada/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -23,7 +24,40 @@ const getDateForToday = () => { return today; }; -export default async (ctx) => { +export const route: Route = { + path: '/:date?/:category?', + categories: ['traditional-media'], + example: '/jornada/2022-10-12/capital', + parameters: { date: "Date string, must be in format of `YYYY-MM-DD`. You can get today's news using `today`", category: 'Category, refer to the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['Thealf154'], + handler, + description: `Provides a way to get an specific rss feed by date and category over the official one. + + | Category | \`:category\` | + | -------------------- | ----------- | + | Capital | capital | + | Cartones | cartones | + | Ciencia y Tecnología | ciencia | + | Cultura | cultura | + | Deportes | deportes | + | Economía | economia | + | Estados | estados | + | Mundo | mundo | + | Opinión | opinion | + | Política | politica | + | Sociedad | sociedad |`, +}; + +async function handler(ctx) { const date = ctx.req.param('date') === 'today' || ctx.req.param('date') === undefined ? getDateForToday() : ctx.req.param('date'); const category = ctx.req.param('category'); const url = `${rootUrl}/jsonstorage/articles_${date}_.json`; @@ -51,9 +85,9 @@ export default async (ctx) => { })); } - ctx.set('data', { + return { title: 'La Jornada', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/jornada/maintainer.ts b/lib/routes/jornada/maintainer.ts deleted file mode 100644 index 2105b69e3..000000000 --- a/lib/routes/jornada/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:date?/:category?': ['Thealf154'], -}; diff --git a/lib/routes/jornada/namespace.ts b/lib/routes/jornada/namespace.ts new file mode 100644 index 000000000..b26b021d5 --- /dev/null +++ b/lib/routes/jornada/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'La Jornada', + url: 'jornada.com.mx', +}; diff --git a/lib/routes/jornada/radar.ts b/lib/routes/jornada/radar.ts deleted file mode 100644 index d4aa0a7c5..000000000 --- a/lib/routes/jornada/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'jornada.com.mx': { - _name: 'La Jornada', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#jornada', - source: ['/category/:category', '/'], - target: (params) => (params.category ? `/jornada/today/${params.category.replacce('.html', '')}` : `/jornada/today`), - }, - ], - }, -}; diff --git a/lib/routes/jornada/router.ts b/lib/routes/jornada/router.ts deleted file mode 100644 index a528645a7..000000000 --- a/lib/routes/jornada/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:date?/:category?', './index'); -}; diff --git a/lib/routes/jou/home.ts b/lib/routes/jou/home.ts index 9cfadf8e3..f68d139a9 100644 --- a/lib/routes/jou/home.ts +++ b/lib/routes/jou/home.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getItems } from './utils'; const url = 'https://www.jou.edu.cn/index/tzgg.htm'; const host = 'https://www.jou.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/tzgg', + categories: ['university'], + example: '/jou/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.jou.edu.cn/index/tzgg.htm', 'www.jou.edu.cn/'], + }, + name: '官网通知公告', + maintainers: ['real-jiakai'], + handler, + url: 'www.jou.edu.cn/index/tzgg.htm', +}; + +async function handler(ctx) { const out = await getItems(ctx, url, host, 'winstyle106390', 'timestyle106390', 'titlestyle106402', 'timestyle106402'); // 生成RSS源 - ctx.set('data', { + return { // 项目标题 title: '江苏海洋大学 -- 通知公告', // 项目链接 link: url, // items的内容 item: out, - }); -}; + }; +} diff --git a/lib/routes/jou/maintainer.ts b/lib/routes/jou/maintainer.ts deleted file mode 100644 index 650e81486..000000000 --- a/lib/routes/jou/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tzgg': ['real-jiakai'], - '/yztzgg': ['real-jiakai'], -}; diff --git a/lib/routes/jou/namespace.ts b/lib/routes/jou/namespace.ts new file mode 100644 index 000000000..f08df3e23 --- /dev/null +++ b/lib/routes/jou/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '江苏海洋大学', + url: 'www.jou.edu.cn', +}; diff --git a/lib/routes/jou/radar.ts b/lib/routes/jou/radar.ts deleted file mode 100644 index 515b6a00f..000000000 --- a/lib/routes/jou/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'jou.edu.cn': { - _name: '江苏海洋大学', - www: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#jiang-su-hai-yang-da-xue-guan-wang-tong-zhi-gong-gao', - source: ['/index/tzgg.htm', '/'], - target: '/jou/tzgg', - }, - ], - yz: [ - { - title: '研招通知公告', - docs: 'https://docs.rsshub.app/routes/university#jiang-su-hai-yang-da-xue-yan-zhao-wang-tong-zhi-gong-gao', - source: ['/index/zxgg.htm', '/'], - target: '/jou/yztzgg', - }, - ], - }, -}; diff --git a/lib/routes/jou/router.ts b/lib/routes/jou/router.ts deleted file mode 100644 index 1c1f4a67e..000000000 --- a/lib/routes/jou/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - // 江苏海洋大学通知公告 - router.get('/tzgg', './home'); - // 江苏海洋大学研招网通知公告 - router.get('/yztzgg', './yz'); -}; diff --git a/lib/routes/jou/yz.ts b/lib/routes/jou/yz.ts index e8812b29f..70a0e2b02 100644 --- a/lib/routes/jou/yz.ts +++ b/lib/routes/jou/yz.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getItems } from './utils'; const url = 'https://yz.jou.edu.cn/index/zxgg.htm'; const host = 'https://yz.jou.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/yztzgg', + categories: ['university'], + example: '/jou/yztzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.jou.edu.cn/index/zxgg.htm', 'yz.jou.edu.cn/'], + }, + name: '研招网通知公告', + maintainers: ['real-jiakai'], + handler, + url: 'yz.jou.edu.cn/index/zxgg.htm', +}; + +async function handler(ctx) { const out = await getItems(ctx, url, host, 'winstyle207638', 'timestyle207638', 'titlestyle207543', 'timestyle207543'); // 生成RSS源 - ctx.set('data', { + return { // 项目标题 title: '江苏海洋大学 -- 研招通知公告', // 项目链接 link: url, // items的内容 item: out, - }); -}; + }; +} diff --git a/lib/routes/jseea/maintainer.ts b/lib/routes/jseea/maintainer.ts deleted file mode 100644 index ae4492285..000000000 --- a/lib/routes/jseea/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['schen1024'], -}; diff --git a/lib/routes/jseea/namespace.ts b/lib/routes/jseea/namespace.ts new file mode 100644 index 000000000..0226a3eb4 --- /dev/null +++ b/lib/routes/jseea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'jseea.cn', +}; diff --git a/lib/routes/jseea/news.ts b/lib/routes/jseea/news.ts index c66f035b0..dc3adf178 100644 --- a/lib/routes/jseea/news.ts +++ b/lib/routes/jseea/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,18 @@ async function loadContent(link) { return description; } -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + radar: { + source: ['jseea.cn/webfile/news/:type'], + target: '/news/:type', + }, + name: 'Unknown', + maintainers: ['schen1024'], + handler, +}; + +async function handler(ctx) { // 默认 正常规定 然后获取列表页面 const type = ctx.req.param('type') ?? 'zkyw'; const listPageUrl = `${baseUrl}/webfile/news/${type}/`; @@ -57,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text() + siteTitle, link: listPageUrl, item: result, - }); -}; + }; +} diff --git a/lib/routes/jseea/radar.ts b/lib/routes/jseea/radar.ts deleted file mode 100644 index e78969d21..000000000 --- a/lib/routes/jseea/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'jseea.cn': { - _name: '江苏省教育考试院', - '.': [ - { - title: '新闻中心', - docs: 'https://docs.rsshub.app/routes/government#jiang-su-sheng-ren-min-zheng-fu', - source: ['/webfile/news/:type'], - target: '/jseea/news/:type', - }, - ], - }, -}; diff --git a/lib/routes/jseea/router.ts b/lib/routes/jseea/router.ts deleted file mode 100644 index eb19f8f1f..000000000 --- a/lib/routes/jseea/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/jsu/cxzx.ts b/lib/routes/jsu/cxzx.ts index 69b559022..a2a0dd240 100644 --- a/lib/routes/jsu/cxzx.ts +++ b/lib/routes/jsu/cxzx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -5,7 +6,14 @@ import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析 import { parseDate } from '@/utils/parse-date'; import { getPageItemAndDate } from './utils/index'; -export default async (ctx) => { +export const route: Route = { + path: '/cxzx/:types?', + name: 'Unknown', + maintainers: ['wenjia03'], + handler, +}; + +async function handler(ctx) { // 在此处编写您的逻辑 const { types = 'xkjs' } = ctx.req.param(); const baseUrl = 'https://cxzx.jsu.edu.cn/'; @@ -66,11 +74,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { // 在此处输出您的 RSS title: `吉首大学创新中心 - ${urls[types].title}`, link: urls[types].url, description: '吉首大学创新中心', item: out, - }); -}; + }; +} diff --git a/lib/routes/jsu/jwc.ts b/lib/routes/jsu/jwc.ts index 740be9b3e..5ff7142af 100644 --- a/lib/routes/jsu/jwc.ts +++ b/lib/routes/jsu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -5,7 +6,28 @@ import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析 import { parseDate } from '@/utils/parse-date'; import { getPageItemAndDate } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:types?', + categories: ['university'], + example: '/jsu/jwc/jwdt', + parameters: { types: '通知分类 默认为`jwtz`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['wenjia03'], + handler, + description: `| 教务通知 | 教务动态 | + | -------- | -------- | + | jwtz | jwdt |`, +}; + +async function handler(ctx) { const baseUrl = 'https://jwc.jsu.edu.cn/'; const { types = 'jwtz' } = ctx.req.param(); const selectors = { @@ -50,11 +72,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { // 在此处输出您的 RSS title: `吉首大学教务处 - ${selectors[types].category}`, link: selectors[types].url, description: `吉首大学教务处 - ${selectors[types].category}`, item: out, - }); -}; + }; +} diff --git a/lib/routes/jsu/maintainer.ts b/lib/routes/jsu/maintainer.ts deleted file mode 100644 index f6eff9119..000000000 --- a/lib/routes/jsu/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/cxzx/:types?': ['wenjia03'], - '/jwc/:types?': ['wenjia03'], - '/notice': ['wenjia03'], - '/rjxy': ['wenjia03'], - '/stxy': ['wenjia03'], -}; diff --git a/lib/routes/jsu/math.ts b/lib/routes/jsu/math.ts index d55f87d62..f1f0d0d4f 100644 --- a/lib/routes/jsu/math.ts +++ b/lib/routes/jsu/math.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -5,7 +6,25 @@ import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析 import { parseDate } from '@/utils/parse-date'; import { getPageItemAndDate } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/stxy', + categories: ['university'], + example: '/jsu/stxy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '数学与统计学院 - 通知公告', + maintainers: ['wenjia03'], + handler, +}; + +async function handler() { const baseUrl = 'https://stxy.jsu.edu.cn/'; const response = await got({ @@ -33,10 +52,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '吉首大学数学与统计学院 - 通知公告', link: 'https://stxy.jsu.edu.cn/index/tzgg1.htm', description: '吉首大学数学与统计学院 - 通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/jsu/namespace.ts b/lib/routes/jsu/namespace.ts new file mode 100644 index 000000000..4a8c8ebc9 --- /dev/null +++ b/lib/routes/jsu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '吉首大学', + url: 'jsu.edu.cn', +}; diff --git a/lib/routes/jsu/radar.ts b/lib/routes/jsu/radar.ts deleted file mode 100644 index 906e78242..000000000 --- a/lib/routes/jsu/radar.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - 'jsu.edu.cn': { - _name: '吉首大学', - '.': [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#ji-shou-da-xue-tong-zhi-gong-gao', - }, - ], - cxzx: [ - { - title: '创新中心', - docs: 'https://docs.rsshub.app/routes/university#ji-shou-da-xue-chuang-xin-zhong-xin', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#ji-shou-da-xue-jiao-wu-chu', - }, - ], - - rjxy: [ - { - title: '计算机科学与工程学院', - docs: 'https://docs.rsshub.app/routes/university##ji-shou-da-xue-ji-suan-ji-ke-xue-yu-gong-cheng-xue-yuan', - }, - ], - stxy: [ - { - title: '数学与统计学院', - docs: 'https://docs.rsshub.app/routes/university#ji-shou-da-xue-shu-xue-yu-tong-ji-xue-yuan', - }, - ], - }, -}; diff --git a/lib/routes/jsu/rjxy.ts b/lib/routes/jsu/rjxy.ts index 836222601..206d04487 100644 --- a/lib/routes/jsu/rjxy.ts +++ b/lib/routes/jsu/rjxy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -5,7 +6,25 @@ import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析 import { parseDate } from '@/utils/parse-date'; import { getPageItemAndDate } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/rjxy', + categories: ['university'], + example: '/jsu/rjxy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机科学与工程学院 - 通知公告', + maintainers: ['wenjia03'], + handler, +}; + +async function handler() { const baseUrl = 'https://rjxy.jsu.edu.cn/'; const response = await got({ @@ -34,11 +53,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { // 在此处输出您的 RSS title: '吉首大学计算机科学与工程学院 - 通知公告', link: 'https://rjxy.jsu.edu.cn/index/tzgg1.htm', description: '吉首大学计算机科学与工程学院 - 通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/jsu/router.ts b/lib/routes/jsu/router.ts deleted file mode 100644 index 3eef70e55..000000000 --- a/lib/routes/jsu/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - // 创新中心 - router.get('/cxzx/:types?', './cxzx'); - router.get('/jwc/:types?', './jwc'); - router.get('/notice', './universityindex'); - router.get('/rjxy', './rjxy'); - router.get('/stxy', './math'); -}; diff --git a/lib/routes/jsu/universityindex.ts b/lib/routes/jsu/universityindex.ts index 168fe1841..80f5df07c 100644 --- a/lib/routes/jsu/universityindex.ts +++ b/lib/routes/jsu/universityindex.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -5,7 +6,25 @@ import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析 import { parseDate } from '@/utils/parse-date'; import { getPageItemAndDate } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notice', + categories: ['university'], + example: '/jsu/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通知公告', + maintainers: ['wenjia03'], + handler, +}; + +async function handler() { const baseUrl = 'https://www.jsu.edu.cn/'; const response = await got({ @@ -39,11 +58,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { // 在此处输出您的 RSS title: '吉首大学 - 通知公告', link: 'https://www.jsu.edu.cn/index/tzgg.htm', description: '吉首大学 - 通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/juejin/books.ts b/lib/routes/juejin/books.ts index 681d54aeb..a7746d20f 100644 --- a/lib/routes/juejin/books.ts +++ b/lib/routes/juejin/books.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/books', + categories: ['programming'], + example: '/juejin/books', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/books'], + }, + name: '小册', + maintainers: ['xyqfer'], + handler, + url: 'juejin.cn/books', + description: `> 掘金小册需要付费订阅,RSS 仅做更新提醒,不含付费内容.`, +}; + +async function handler() { const response = await got({ method: 'post', url: 'https://api.juejin.cn/booklet_api/v1/booklet/listbycategory', @@ -22,9 +46,9 @@ export default async (ctx) => { guid: base_info.booklet_id, })); - ctx.set('data', { + return { title: '掘金小册', link: 'https://juejin.cn/books', item: items, - }); -}; + }; +} diff --git a/lib/routes/juejin/category.ts b/lib/routes/juejin/category.ts index 3d868e553..bf54bbccc 100644 --- a/lib/routes/juejin/category.ts +++ b/lib/routes/juejin/category.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['programming'], + example: '/juejin/category/frontend', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['DIYgod'], + handler, + description: `| 后端 | 前端 | Android | iOS | 人工智能 | 开发工具 | 代码人生 | 阅读 | + | ------- | -------- | ------- | --- | -------- | -------- | -------- | ------- | + | backend | frontend | android | ios | ai | freebie | career | article |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const idResponse = await got({ @@ -31,10 +53,10 @@ export default async (ctx) => { } const resultItems = await util.ProcessFeed(originalData, cache); - ctx.set('data', { + return { title: `掘金 ${cat.category_name}`, link: `https://juejin.cn/${category}`, description: `掘金 ${cat.category_name}`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/juejin/collection.ts b/lib/routes/juejin/collection.ts index 3634edb0c..f26aae70f 100644 --- a/lib/routes/juejin/collection.ts +++ b/lib/routes/juejin/collection.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:collectionId', + categories: ['programming'], + example: '/juejin/collection/6845243180586123271', + parameters: { collectionId: '收藏夹唯一标志符, 在浏览器地址栏URL中能够找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/collection/:collectionId'], + }, + name: '单个收藏夹', + maintainers: ['isQ'], + handler, +}; + +async function handler(ctx) { const collectionId = ctx.req.param('collectionId'); const collectPage = await got({ @@ -17,11 +39,11 @@ export default async (ctx) => { const result = await util.ProcessFeed(items, cache); - ctx.set('data', { + return { title: '掘金 - 单个收藏夹', link: `https://juejin.cn/collection/${collectionId}`, description: '掘金,用户单个收藏夹', item: result, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/juejin/column.ts b/lib/routes/juejin/column.ts index ccf9a6c98..1e746b67a 100644 --- a/lib/routes/juejin/column.ts +++ b/lib/routes/juejin/column.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['programming'], + example: '/juejin/column/6960559453037199391', + parameters: { id: '专栏 id, 可在专栏页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/column/:id'], + }, + name: '专栏', + maintainers: ['xiangzy1'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const detail = await got({ method: 'get', @@ -23,10 +45,10 @@ export default async (ctx) => { const columnName = detailData && detailData.column_version && detailData.column_version.title; const resultItems = await util.ProcessFeed(data, cache); - ctx.set('data', { + return { title: `掘金专栏-${columnName}`, link: `https://juejin.cn/column/${id}`, description: `掘金专栏-${columnName}`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/juejin/favorites.ts b/lib/routes/juejin/favorites.ts index 977b83757..0225040b3 100644 --- a/lib/routes/juejin/favorites.ts +++ b/lib/routes/juejin/favorites.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/collections/:userId', + categories: ['programming'], + example: '/juejin/collections/1697301682482439', + parameters: { userId: '用户唯一标志符, 在浏览器地址栏URL中能够找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/user/:id', 'juejin.cn/user/:id/collections'], + target: '/collections/:id', + }, + name: '收藏集', + maintainers: ['isQ'], + handler, +}; + +async function handler(ctx) { const userId = ctx.req.param('userId'); const response = await got({ method: 'get', @@ -30,11 +53,11 @@ export default async (ctx) => { const result = await util.ProcessFeed(posts, cache); - ctx.set('data', { + return { title: '掘金 - 收藏集', link: `https://juejin.im/user/${userId}/collections`, description: '掘金,指定用户整个收藏集', item: result, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/juejin/maintainer.ts b/lib/routes/juejin/maintainer.ts deleted file mode 100644 index 7828f1b96..000000000 --- a/lib/routes/juejin/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/books': ['xyqfer'], - '/category/:category': ['DIYgod'], - '/collection/:collectionId': ['isQ'], - '/collections/:userId': ['isQ'], - '/column/:id': ['xiangzy1'], - '/pins/:type?': ['xyqfer', 'laampui'], - '/posts/:id': ['Maecenas'], - '/tag/:tag': ['isheng5'], - '/trending/:category/:type': ['moaix'], -}; diff --git a/lib/routes/juejin/namespace.ts b/lib/routes/juejin/namespace.ts new file mode 100644 index 000000000..35eac45d8 --- /dev/null +++ b/lib/routes/juejin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '掘金', + url: 'juejin.cn', +}; diff --git a/lib/routes/juejin/pins.ts b/lib/routes/juejin/pins.ts index 24adcc55a..f6267c7d0 100644 --- a/lib/routes/juejin/pins.ts +++ b/lib/routes/juejin/pins.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/pins/:type?', + categories: ['programming'], + example: '/juejin/pins/6824710202487472141', + parameters: { type: '默认为 recommend,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '沸点', + maintainers: ['xyqfer', 'laampui'], + handler, + description: `| 推荐 | 热门 | 上班摸鱼 | 内推招聘 | 一图胜千言 | 今天学到了 | 每天一道算法题 | 开发工具推荐 | 树洞一下 | + | --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | + | recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'recommend'; const title = { recommend: '推荐', @@ -59,9 +81,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `沸点 - ${title[type]}`, link: 'https://juejin.cn/pins/recommended', item: items, - }); -}; + }; +} diff --git a/lib/routes/juejin/posts.ts b/lib/routes/juejin/posts.ts index 5a30e6861..0be77724d 100644 --- a/lib/routes/juejin/posts.ts +++ b/lib/routes/juejin/posts.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:id', + categories: ['programming'], + example: '/juejin/posts/3051900006845944', + parameters: { id: '用户 id, 可在用户页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/user/:id', 'juejin.cn/user/:id/posts'], + }, + name: '用户文章', + maintainers: ['Maecenas'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -17,10 +39,10 @@ export default async (ctx) => { const username = data[0] && data[0].author_user_info && data[0].author_user_info.user_name; const resultItems = await util.ProcessFeed(data, cache); - ctx.set('data', { + return { title: `掘金专栏-${username}`, link: `https://juejin.cn/user/${id}/posts`, description: `掘金专栏-${username}`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/juejin/radar.ts b/lib/routes/juejin/radar.ts deleted file mode 100644 index 4f22e4603..000000000 --- a/lib/routes/juejin/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'juejin.cn': { - _name: '掘金', - '.': [ - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-biao-qian', - source: '/tag/:tag', - target: '/juejin/tag/:tag', - }, - { - title: '小册', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-xiao-ce', - source: '/books', - target: '/juejin/books', - }, - { - title: '沸点', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-fei-dian', - source: ['/pins/:type', '/pins/topic/:type'], - target: (params) => (params.type === 'recommended' ? '/juejin/pins' : '/juejin/pins/:type'), - }, - { - title: '用户专栏', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-zhuan-lan', - source: ['/user/:id', '/user/:id/posts'], - target: '/juejin/posts/:id', - }, - { - title: '收藏集', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-shou-cang-ji', - source: ['/user/:id', '/user/:id/collections'], - target: '/juejin/collections/:id', - }, - { - title: '单个收藏夹', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin-dan-ge-shou-cang-jia', - source: '/collection/:collectionId', - target: '/juejin/collection/:collectionId', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/programming#jue-jin', - source: '/column/:id', - target: '/juejin/column/:id', - }, - ], - }, -}; diff --git a/lib/routes/juejin/router.ts b/lib/routes/juejin/router.ts deleted file mode 100644 index b89752c36..000000000 --- a/lib/routes/juejin/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/books', './books'); - router.get('/category/:category', './category'); - router.get('/collection/:collectionId', './collection'); - router.get('/collections/:userId', './favorites'); - router.get('/column/:id', './column'); - router.get('/pins/:type?', './pins'); - router.get('/posts/:id', './posts'); - router.get('/tag/:tag', './tag'); - router.get('/trending/:category/:type', './trending'); -}; diff --git a/lib/routes/juejin/tag.ts b/lib/routes/juejin/tag.ts index 26330f92a..78b5e3731 100644 --- a/lib/routes/juejin/tag.ts +++ b/lib/routes/juejin/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['programming'], + example: '/juejin/tag/JavaScript', + parameters: { tag: '标签名,可在标签 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['juejin.cn/tag/:tag'], + }, + name: '标签', + maintainers: ['isheng5'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const idResponse = await got({ @@ -32,10 +54,10 @@ export default async (ctx) => { } const resultItems = await util.ProcessFeed(originalData, cache); - ctx.set('data', { + return { title: `掘金 ${tag}`, link: `https://juejin.cn/tag/${encodeURIComponent(tag)}`, description: `掘金 ${tag}`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/juejin/trending.ts b/lib/routes/juejin/trending.ts index f7e08c8ef..f06cdbf7f 100644 --- a/lib/routes/juejin/trending.ts +++ b/lib/routes/juejin/trending.ts @@ -1,8 +1,46 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/trending/:category/:type', + categories: ['programming'], + example: '/juejin/trending/ios/monthly', + parameters: { category: '分类名', type: '类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '热门', + maintainers: ['moaix'], + handler, + description: `| category | 标签 | + | -------- | -------- | + | android | Android | + | frontend | 前端 | + | ios | iOS | + | backend | 后端 | + | design | 设计 | + | product | 产品 | + | freebie | 工具资源 | + | article | 阅读 | + | ai | 人工智能 | + | devops | 运维 | + | all | 全部 | + + | type | 类型 | + | ---------- | -------- | + | weekly | 本周最热 | + | monthly | 本月最热 | + | historical | 历史最热 |`, +}; + +async function handler(ctx) { const { category, type } = ctx.req.param(); let id = ''; @@ -72,9 +110,9 @@ export default async (ctx) => { const resultItems = await util.ProcessFeed(entrylist, cache); - ctx.set('data', { + return { title, link, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/jump/discount.ts b/lib/routes/jump/discount.ts index 329afeb0b..533961ea7 100644 --- a/lib/routes/jump/discount.ts +++ b/lib/routes/jump/discount.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -96,7 +97,40 @@ const getAllPageDiscountItem = async (countries, platform, termsId, totalNum) => // }; // }; -export default async (ctx) => { +export const route: Route = { + path: '/discount/:platform/:filter?/:countries?', + categories: ['game'], + example: '/jump/discount/ps5/all', + parameters: { platform: '平台:switch,ps4,ps5,xbox,steam,epic', filter: '过滤参数,all-全部,jx-精选,sd-史低,dl-独立,vip-会员', countries: '地区,具体支持较多,可自信查看地区简写' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '游戏折扣', + maintainers: ['zytomorrow'], + handler, + description: `| switch | ps4 | ps5 | xbox | steam | epic | + | ------ | ---- | ---- | ------ | ----- | ------ | + | 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 | + + | filter | switch | ps4 | ps5 | steam | + | ------ | ------ | --- | --- | ----- | + | all | ✔ | ✔ | ✔ | ✔ | + | jx | ✔ | ✔ | ❌ | ✔ | + | sd | ✔ | ✔ | ✔ | ✔ | + | dl | ❌ | ✔ | ❌ | ✔ | + | vip | ❌ | ❌ | ✔ | ❌ | + + | 北美 | 欧洲(英语) | 法国 | 德国 | 日本 | + | ---- | ------------ | ---- | ---- | ---- | + | na | eu | fr | de | jp |`, +}; + +async function handler(ctx) { const platform = ctx.req.param('platform'); const filter = ctx.req.param('filter') || 'all'; const countries = ctx.req.param('countries') || ''; @@ -109,7 +143,7 @@ export default async (ctx) => { // await seqGetGameDetail(allDiscountItem, ctx); // } - ctx.set('data', { + return { title: `jump 折扣-${platform}-${filterName[filter]}${countries ? `-${countries}` : ''}`, link: 'https://jumpvg.com/', description: 'jump 发现游戏', @@ -119,5 +153,5 @@ export default async (ctx) => { link: item.banner, guid: `${platform}-${item.oldGameId}-${item.cutOff}`, // 平台-打折id-打折率 })), - }); -}; + }; +} diff --git a/lib/routes/jump/maintainer.ts b/lib/routes/jump/maintainer.ts deleted file mode 100644 index d7b92fcd5..000000000 --- a/lib/routes/jump/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/discount/:platform/:filter?/:countries?': ['zytomorrow'], -}; diff --git a/lib/routes/jump/namespace.ts b/lib/routes/jump/namespace.ts new file mode 100644 index 000000000..a7ca8ff68 --- /dev/null +++ b/lib/routes/jump/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JUMP', + url: 'switch.jumpvg.com', +}; diff --git a/lib/routes/jump/radar.ts b/lib/routes/jump/radar.ts deleted file mode 100644 index 015e7632b..000000000 --- a/lib/routes/jump/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'jumpvg.com': { - _name: 'jump app', - switch: [ - { - title: '折扣清单', - docs: 'https://docs.rsshub.app/routes/game#jump', - source: ['/'], - target: '/jump/discount/switch', - }, - ], - }, -}; diff --git a/lib/routes/jump/router.ts b/lib/routes/jump/router.ts deleted file mode 100644 index 86776bc11..000000000 --- a/lib/routes/jump/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/discount/:platform/:filter?/:countries?', './discount.js'); -}; diff --git a/lib/routes/kamen-rider-official/maintainer.ts b/lib/routes/kamen-rider-official/maintainer.ts deleted file mode 100644 index 062d245bd..000000000 --- a/lib/routes/kamen-rider-official/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/kamen-rider-official/namespace.ts b/lib/routes/kamen-rider-official/namespace.ts new file mode 100644 index 000000000..0056a34f5 --- /dev/null +++ b/lib/routes/kamen-rider-official/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '仮面ライダ', + url: 'kamen-rider-official.com', +}; diff --git a/lib/routes/kamen-rider-official/news.ts b/lib/routes/kamen-rider-official/news.ts index a9b326a4c..7a3d3786d 100644 --- a/lib/routes/kamen-rider-official/news.ts +++ b/lib/routes/kamen-rider-official/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,57 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['new-media'], + example: '/kamen-rider-official/news', + parameters: { category: 'Category, see below, すべて by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新情報', + maintainers: ['nczitzk'], + handler, + description: `| Category | + | -------------------------------------- | + | すべて | + | テレビ | + | 映画・V シネマ等 | + | Blu-ray・DVD、配信等 | + | 20 作記念グッズ・東映 EC 商品 | + | 石ノ森章太郎生誕 80 周年記念商品 | + | 玩具・カード | + | 食品・飲料・菓子 | + | 子供生活雑貨 | + | アパレル・大人向け雑貨 | + | フィギュア・ホビー・一番くじ・プライズ | + | ゲーム・デジタル | + | 雑誌・書籍・漫画 | + | 音楽 | + | 映像 | + | イベント | + | ホテル・レストラン等 | + | キャンペーン・タイアップ等 | + | その他 | + | KAMEN RIDER STORE | + | THE 鎧武祭り | + | 鎧武外伝 | + | 仮面ライダーリバイス | + | ファイナルステージ | + | THE50 周年展 | + | 風都探偵 | + | 仮面ライダーギーツ | + | 仮面ライダーアウトサイダーズ | + | 仮面ライダーガッチャード | + | 仮面ライダー BLACK SUN |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -98,7 +149,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('title').text().split(/ー/)[0]}${category ? ` - ${category}` : ''}`, link: currentUrl, @@ -110,5 +161,5 @@ export default async (ctx) => { subtitle: $('meta[property="keywords"]').prop('content'), author: $('meta[property="og:site_name"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/kamen-rider-official/radar.ts b/lib/routes/kamen-rider-official/radar.ts deleted file mode 100644 index 7cbbab456..000000000 --- a/lib/routes/kamen-rider-official/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'kamen-rider-official.com': { - _name: '仮面ライダ', - '.': [ - { - title: '最新情報', - docs: 'https://docs.rsshub.app/routes/new-media#fan-mian-%E3%83%A9%E3%82%A4%E3%83%80-zui-xin-qing-bao', - source: ['/news_articles'], - target: (params, url) => { - url = new URL(url); - const category = url.searchParams.get('category'); - - return `/kamen-rider-official/news${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/kamen-rider-official/router.ts b/lib/routes/kamen-rider-official/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/kamen-rider-official/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/kantarworldpanel/index.ts b/lib/routes/kantarworldpanel/index.ts index 618c7ca13..cd6bf7412 100644 --- a/lib/routes/kantarworldpanel/index.ts +++ b/lib/routes/kantarworldpanel/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:region?/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { region = 'cn-en', category = 'news' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -85,7 +93,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -96,5 +104,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="keywords"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/kantarworldpanel/maintainer.ts b/lib/routes/kantarworldpanel/maintainer.ts deleted file mode 100644 index 605543586..000000000 --- a/lib/routes/kantarworldpanel/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:region/:category?': ['nczitzk'], -}; diff --git a/lib/routes/kantarworldpanel/namespace.ts b/lib/routes/kantarworldpanel/namespace.ts new file mode 100644 index 000000000..04926f660 --- /dev/null +++ b/lib/routes/kantarworldpanel/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Kantar Worldpanel', + url: 'kantarworldpanel.com', +}; diff --git a/lib/routes/kantarworldpanel/radar.ts b/lib/routes/kantarworldpanel/radar.ts deleted file mode 100644 index 25b2e5214..000000000 --- a/lib/routes/kantarworldpanel/radar.ts +++ /dev/null @@ -1,199 +0,0 @@ -export default { - 'kantarworldpanel.com': { - _name: 'Kantar Worldpanel', - '.': [ - { - title: 'News Centre China Eng - News', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn-en/news'], - target: '/kantarworldpanel/cn-en/news', - }, - { - title: 'News Centre China Eng - Retail Snapshot', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn-en/publications'], - target: '/kantarworldpanel/cn-en/publications', - }, - { - title: 'News Centre China Eng - Publications', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn-en/publications/Reports'], - target: '/kantarworldpanel/cn-en/publications/Reports', - }, - { - title: 'News Centre China Eng - In the media', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn-en/In-the-media'], - target: '/kantarworldpanel/cn-en/In-the-media', - }, - { - title: 'News Centre China 中文 - 新闻发布', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn/news'], - target: '/kantarworldpanel/cn/news', - }, - { - title: 'News Centre China 中文 - 零售市场快报', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn/publications'], - target: '/kantarworldpanel/cn/publications', - }, - { - title: 'News Centre China 中文 - 市场报告', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn/publications/China-Insights'], - target: '/kantarworldpanel/cn/publications/China-Insights', - }, - { - title: 'News Centre China 中文 - 媒体报道', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/cn/press-releases'], - target: '/kantarworldpanel/cn/press-releases', - }, - { - title: 'News Centre Indonesia - News', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News'], - target: '/kantarworldpanel/id/News', - }, - { - title: 'News Centre Indonesia - Kantar Scoop', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News/Kantar-Worldpanel-Series'], - target: '/kantarworldpanel/id/News/Kantar-Worldpanel-Series', - }, - { - title: 'News Centre Indonesia - Video Series', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News/video-series'], - target: '/kantarworldpanel/id/News/video-series', - }, - { - title: 'News Centre Indonesia - Podcast', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News/podcast'], - target: '/kantarworldpanel/id/News/podcast', - }, - { - title: 'News Centre Indonesia - Ready, Steady, Shop!', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News/asia-shopper-series'], - target: '/kantarworldpanel/id/News/asia-shopper-series', - }, - { - title: 'News Centre Indonesia - Asia Pulse', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/id/News/Asia-Pulse'], - target: '/kantarworldpanel/id/News/Asia-Pulse', - }, - { - title: 'News Centre Korea - News', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/kr/news'], - target: '/kantarworldpanel/kr/news', - }, - { - title: 'News Centre Korea - Insight Reports', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/kr/publications'], - target: '/kantarworldpanel/kr/publications', - }, - { - title: 'News Centre Korea - In the Media', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/kr/press-releases'], - target: '/kantarworldpanel/kr/press-releases', - }, - { - title: 'News Centre Malaysia - News', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/my/news'], - target: '/kantarworldpanel/my/news', - }, - { - title: 'News Centre Philippines - Latest Insights', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/ph/Latest-Insights'], - target: '/kantarworldpanel/ph/Latest-Insights', - }, - { - title: 'News Centre Philippines - In the Media', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/ph/In-the-Media'], - target: '/kantarworldpanel/ph/In-the-Media', - }, - { - title: 'News Centre Philippines - Events', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/ph/events'], - target: '/kantarworldpanel/ph/events', - }, - { - title: 'News Centre Taiwan - 聚焦台灣', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/ph/news/spotlight-on-taiwan'], - target: '/kantarworldpanel/tw/news/spotlight-on-taiwan', - }, - { - title: 'News Centre Taiwan - WOW SPOT', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/tw/news/wowspot'], - target: '/kantarworldpanel/tw/news/wowspot', - }, - { - title: 'News Centre Taiwan - 市場報告', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/tw/publications'], - target: '/kantarworldpanel/tw/publications', - }, - { - title: 'News Centre Taiwan - 媒體報導', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/tw/press-releases'], - target: '/kantarworldpanel/tw/press-releases', - }, - { - title: 'News Centre Taiwan - 活動', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/tw/events'], - target: '/kantarworldpanel/tw/events', - }, - { - title: 'News Centre Thailand - News', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/th/news'], - target: '/kantarworldpanel/th/news', - }, - { - title: 'News Centre Vietnam - Insights', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/vn/news'], - target: '/kantarworldpanel/vn/news', - }, - { - title: 'News Centre Vietnam - FMCG Monitor', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/vn/news/FMCG-Monitor'], - target: '/kantarworldpanel/vn/news/FMCG-Monitor', - }, - { - title: 'News Centre Vietnam - Ready, Steady, Shop!', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/vn/news/ready-steady-shop'], - target: '/kantarworldpanel/vn/news/ready-steady-shop', - }, - { - title: 'News Centre Vietnam - Asia Pulse', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/vn/news/asia-pulse'], - target: '/kantarworldpanel/vn/news/asia-pulse', - }, - { - title: 'News Centre Vietnam - IN THE MEDIA', - docs: 'https://docs.rsshub.app/routes/new-media#kanta-worldpanel-news-centre', - source: ['/vn/In-the-media'], - target: '/kantarworldpanel/vn/In-the-media', - }, - ], - }, -}; diff --git a/lib/routes/kantarworldpanel/router.ts b/lib/routes/kantarworldpanel/router.ts deleted file mode 100644 index 935495b1e..000000000 --- a/lib/routes/kantarworldpanel/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:region?/:category{.+}?', './'); -}; diff --git a/lib/routes/kbs/maintainer.ts b/lib/routes/kbs/maintainer.ts deleted file mode 100644 index 71c22b0ff..000000000 --- a/lib/routes/kbs/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:category?/:language?': ['nczitzk'], - '/today/:language?': ['nczitzk'], -}; diff --git a/lib/routes/kbs/namespace.ts b/lib/routes/kbs/namespace.ts new file mode 100644 index 000000000..272b89de2 --- /dev/null +++ b/lib/routes/kbs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'KBS', + url: 'world.kbs.co.kr', +}; diff --git a/lib/routes/kbs/news.ts b/lib/routes/kbs/news.ts index 18e7046bb..2aa36ae1d 100644 --- a/lib/routes/kbs/news.ts +++ b/lib/routes/kbs/news.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?/:language?', + categories: ['new-media'], + example: '/kbs/news', + parameters: { category: 'Category, can be found in Url as `id`, all by default', language: 'Language, see below, e as English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['world.kbs.co.kr/'], + target: '/news', + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + url: 'world.kbs.co.kr/', + description: `| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | + | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | + | k | a | c | e | f | g | i | j | r | s | v |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const language = ctx.req.param('language') ?? 'e'; @@ -60,9 +87,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.active').text() || list[0].category} - KBS WORLD`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/kbs/radar.ts b/lib/routes/kbs/radar.ts deleted file mode 100644 index 091914bfd..000000000 --- a/lib/routes/kbs/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'kbs.co.kr': { - _name: 'KBS', - world: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#kbs', - source: '/', - target: '/kbs/news', - }, - { - title: 'Today', - docs: 'https://docs.rsshub.app/routes/new-media#kbs', - source: '/', - target: '/kbs/today', - }, - ], - }, -}; diff --git a/lib/routes/kbs/router.ts b/lib/routes/kbs/router.ts deleted file mode 100644 index 0f6175ef6..000000000 --- a/lib/routes/kbs/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:category?/:language?', './news'); - router.get('/today/:language?', './today'); -}; diff --git a/lib/routes/kbs/today.ts b/lib/routes/kbs/today.ts index 8cefbbf66..acc13aa2f 100644 --- a/lib/routes/kbs/today.ts +++ b/lib/routes/kbs/today.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/today/:language?', + categories: ['new-media'], + example: '/kbs/today', + parameters: { language: 'Language, see below, e as English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['world.kbs.co.kr/'], + target: '/today', + }, + name: 'Today', + maintainers: ['nczitzk'], + handler, + url: 'world.kbs.co.kr/', + description: `| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | + | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | + | k | a | c | e | f | g | i | j | r | s | v |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'e'; const rootUrl = 'http://world.kbs.co.kr'; @@ -49,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Latest News | KBS WORLD`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/kcna/maintainer.ts b/lib/routes/kcna/maintainer.ts deleted file mode 100644 index d21d9d201..000000000 --- a/lib/routes/kcna/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:lang/:category?': ['Rongronggg9'], -}; diff --git a/lib/routes/kcna/namespace.ts b/lib/routes/kcna/namespace.ts new file mode 100644 index 000000000..0483df082 --- /dev/null +++ b/lib/routes/kcna/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Korean Central News Agency (KCNA) 朝鲜中央通讯社', + url: 'www.kcna.kp', +}; diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 37cf25403..6e03430d7 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,44 @@ import { parseJucheDate, fixDesc, fetchPhoto, fetchVideo } from './utils'; import * as path from 'node:path'; import sanitizeHtml from 'sanitize-html'; -export default async (ctx) => { +export const route: Route = { + path: '/:lang/:category?', + categories: ['traditional-media'], + example: '/kcna/en', + parameters: { lang: 'Language, refer to the table below', category: 'Category, refer to the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.kcna.kp/:lang', 'www.kcna.kp/:lang/category/articles/q/1ee9bdb7186944f765208f34ecfb5407.kcmsf', 'www.kcna.kp/:lang/category/articles.kcmsf'], + target: '/:lang', + }, + name: 'News', + maintainers: ['Rongronggg9'], + handler, + description: `| Language | 조선어 | English | 中国语 | Русский | Español | 日本語 | + | -------- | ------ | ------- | ------ | ------- | ------- | ------ | + | \`:lang\` | \`kp\` | \`en\` | \`cn\` | \`ru\` | \`es\` | \`jp\` | + + | Category | \`:category\` | + | ---------------------------------------------------------------- | ---------------------------------- | + | WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | \`54c0ca4ca013a92cc9cf95bd4004c61a\` | + | Latest News (default) | \`1ee9bdb7186944f765208f34ecfb5407\` | + | Top News | \`5394b80bdae203fadef02522cfb578c0\` | + | Home News | \`b2b3bcc1b0a4406ab0c36e45d5db58db\` | + | Documents | \`a8754921399857ebdbb97a98a1e741f5\` | + | World | \`593143484cf15d48ce85c26139582395\` | + | Society-Life | \`93102e5a735d03979bc58a3a7aefb75a\` | + | External | \`0f98b4623a3ef82aeea78df45c423fd0\` | + | News Commentary | \`12c03a49f7dbe829bceea8ac77088c21\` |`, +}; + +async function handler(ctx) { const { lang, category = '1ee9bdb7186944f765208f34ecfb5407' } = ctx.req.param(); const rootUrl = 'http://www.kcna.kp'; @@ -76,9 +114,9 @@ export default async (ctx) => { items.push(item); } - ctx.set('data', { + return { title, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/kcna/radar.ts b/lib/routes/kcna/radar.ts deleted file mode 100644 index 4d89f67df..000000000 --- a/lib/routes/kcna/radar.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default { - 'kcna.kp': { - _name: '朝鲜中央通讯社', - www: [ - { - title: '朝鲜劳动党总书记金正恩同志革命活动新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/54c0ca4ca013a92cc9cf95bd4004c61a.kcmsf', - target: '/kcna/:lang/54c0ca4ca013a92cc9cf95bd4004c61a', - }, - { - title: '最新新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: ['/:lang', '/:lang/category/articles/q/1ee9bdb7186944f765208f34ecfb5407.kcmsf', '/:lang/category/articles.kcmsf'], - target: '/kcna/:lang', - }, - { - title: '主要新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/5394b80bdae203fadef02522cfb578c0.kcmsf', - target: '/kcna/:lang/5394b80bdae203fadef02522cfb578c0', - }, - { - title: '国内新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/b2b3bcc1b0a4406ab0c36e45d5db58db.kcmsf', - target: '/kcna/:lang/b2b3bcc1b0a4406ab0c36e45d5db58db', - }, - { - title: '文件', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/a8754921399857ebdbb97a98a1e741f5.kcmsf', - target: '/kcna/:lang/a8754921399857ebdbb97a98a1e741f5', - }, - { - title: '国际新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/593143484cf15d48ce85c26139582395.kcmsf', - target: '/kcna/:lang/593143484cf15d48ce85c26139582395', - }, - { - title: '社会-生活', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/93102e5a735d03979bc58a3a7aefb75a.kcmsf', - target: '/kcna/:lang/93102e5a735d03979bc58a3a7aefb75a', - }, - { - title: '对外关系', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/0f98b4623a3ef82aeea78df45c423fd0.kcmsf', - target: '/kcna/:lang/0f98b4623a3ef82aeea78df45c423fd0', - }, - { - title: '时事解说', - docs: 'https://docs.rsshub.app/routes/traditional-media#chao-xian-zhong-yang-tong-xun-she', - source: '/:lang/category/articles/q/12c03a49f7dbe829bceea8ac77088c21.kcmsf', - target: '/kcna/:lang/12c03a49f7dbe829bceea8ac77088c21', - }, - ], - }, -}; diff --git a/lib/routes/kcna/router.ts b/lib/routes/kcna/router.ts deleted file mode 100644 index 0011c4977..000000000 --- a/lib/routes/kcna/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:lang/:category?', './news'); -}; diff --git a/lib/routes/ke/maintainer.ts b/lib/routes/ke/maintainer.ts deleted file mode 100644 index d83ceb655..000000000 --- a/lib/routes/ke/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/researchResults': ['shaomingbo'], -}; diff --git a/lib/routes/ke/namespace.ts b/lib/routes/ke/namespace.ts new file mode 100644 index 000000000..263b40f8c --- /dev/null +++ b/lib/routes/ke/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '贝壳研究院', + url: 'www.research.ke.com', +}; diff --git a/lib/routes/ke/radar.ts b/lib/routes/ke/radar.ts deleted file mode 100644 index 4a2b56c1d..000000000 --- a/lib/routes/ke/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'research.ke.com': { - _name: '贝壳研究院 - 房地产行业研究报告', - www: [ - { - title: '研究成果', - docs: 'https://docs.rsshub.app/routes/other#bei-ke-yan-jiu-yuan', - source: ['/researchResults'], - target: '/researchResults', - }, - ], - }, -}; diff --git a/lib/routes/ke/results.ts b/lib/routes/ke/results.ts index aa03eed96..3d80850b0 100644 --- a/lib/routes/ke/results.ts +++ b/lib/routes/ke/results.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/researchResults', + categories: ['other'], + example: '/ke/researchResults', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.research.ke.com/researchResults'], + }, + name: '研究成果', + maintainers: ['shaomingbo'], + handler, + url: 'www.research.ke.com/researchResults', +}; + +async function handler() { const response = await got({ method: 'post', url: 'https://research.ke.com/apis/consumer-access/index/contents/page', @@ -21,7 +44,7 @@ export default async (ctx) => { const { list } = data.data; - ctx.set('data', { + return { title: '房地产行业研究报告', link: 'https://research.ke.com/ResearchResults', description: '研究成果', @@ -32,5 +55,5 @@ export default async (ctx) => { description: item.guideReading, pubDate: parseDate(item.publishTime), })), - }); -}; + }; +} diff --git a/lib/routes/ke/router.ts b/lib/routes/ke/router.ts deleted file mode 100644 index aeccb06f5..000000000 --- a/lib/routes/ke/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/researchResults', './results'); -}; diff --git a/lib/routes/keep/maintainer.ts b/lib/routes/keep/maintainer.ts deleted file mode 100644 index 94ea3a7ac..000000000 --- a/lib/routes/keep/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:id': ['Dectinc', 'DIYgod'], -}; diff --git a/lib/routes/keep/namespace.ts b/lib/routes/keep/namespace.ts new file mode 100644 index 000000000..cdde3a1c6 --- /dev/null +++ b/lib/routes/keep/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Keep', + url: 'gotokeep.com', +}; diff --git a/lib/routes/keep/radar.ts b/lib/routes/keep/radar.ts deleted file mode 100644 index e22134712..000000000 --- a/lib/routes/keep/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gotokeep.com': { - _name: 'Keep', - '.': [ - { - title: '用户运动日记', - docs: 'https://docs.rsshub.app/routes/social-media#keep', - source: '/users/:id', - target: '/keep/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/keep/router.ts b/lib/routes/keep/router.ts deleted file mode 100644 index a7fbaa70a..000000000 --- a/lib/routes/keep/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.ts index 99bea4d56..cf6f54bb5 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,28 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/keep/user/556b02c1ab59390afea671ea', + parameters: { id: 'Keep 用户 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gotokeep.com/users/:id'], + }, + name: '运动日记', + maintainers: ['Dectinc', 'DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -24,7 +46,7 @@ export default async (ctx) => { response.data.data.entries[0] = response.data.data.entries[0].entries; const data = response.data.data.entries.reduce((all, current) => [...all, ...current.entries]); - ctx.set('data', { + return { title: `${data[0].author.username} 的 Keep 动态`, link: `https://show.gotokeep.com/users/${id}`, language: 'zh-cn', @@ -56,5 +78,5 @@ export default async (ctx) => { }), }; }), - }); -}; + }; +} diff --git a/lib/routes/keepass/maintainer.ts b/lib/routes/keepass/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/keepass/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/keepass/namespace.ts b/lib/routes/keepass/namespace.ts new file mode 100644 index 000000000..9b00957e0 --- /dev/null +++ b/lib/routes/keepass/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'KeePass', + url: 'keepass.info', +}; diff --git a/lib/routes/keepass/news.ts b/lib/routes/keepass/news.ts index 04060dd3e..6bd468d54 100644 --- a/lib/routes/keepass/news.ts +++ b/lib/routes/keepass/news.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://keepass.info/news/news_all.html'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -39,9 +47,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').attr('content'), link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/keepass/radar.ts b/lib/routes/keepass/radar.ts deleted file mode 100644 index 30521c860..000000000 --- a/lib/routes/keepass/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'keepass.info': { - _name: 'KeePass', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/program-update.html#keepass', - source: ['/news/news_all.html', '/'], - target: '/keepass/news', - }, - ], - }, -}; diff --git a/lib/routes/keepass/router.ts b/lib/routes/keepass/router.ts deleted file mode 100644 index d8c52182f..000000000 --- a/lib/routes/keepass/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './news'); -}; diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 8616ad081..8a4f2b6e2 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,37 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:source?/:id?', + categories: ['anime'], + example: '/kemono', + parameters: { source: 'Source, see below, Posts by default', id: 'User id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kemono.su/:source/user/:id', 'kemono.su/'], + }, + name: 'Posts', + maintainers: ['nczitzk'], + handler, + description: `Sources + + | Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia | + | ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ | + | posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia | + + :::tip + When \`posts\` is selected as the value of the parameter **source**, the parameter **id** does not take effect. + :::`, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; const source = ctx.req.param('source') ?? ''; const id = ctx.req.param('id'); @@ -124,10 +155,10 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title, image, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/kemono/maintainer.ts b/lib/routes/kemono/maintainer.ts deleted file mode 100644 index 122891fce..000000000 --- a/lib/routes/kemono/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:source?/:id?': ['nczitzk'], - '/posts': ['nczitzk'], -}; diff --git a/lib/routes/kemono/namespace.ts b/lib/routes/kemono/namespace.ts new file mode 100644 index 000000000..f0b7f6fe8 --- /dev/null +++ b/lib/routes/kemono/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Kemono', + url: 'kemono.su', +}; diff --git a/lib/routes/kemono/radar.ts b/lib/routes/kemono/radar.ts deleted file mode 100644 index 9dbd5d92c..000000000 --- a/lib/routes/kemono/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'kemono.su': { - _name: 'Kemono', - '.': [ - { - title: 'Posts', - docs: 'https://docs.rsshub.app/routes/anime#kemono-posts', - source: ['/:source/user/:id', '/'], - target: '/kemono/:source?/:id?', - }, - ], - }, -}; diff --git a/lib/routes/kemono/router.ts b/lib/routes/kemono/router.ts deleted file mode 100644 index c25af847d..000000000 --- a/lib/routes/kemono/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:source?/:id?', './index'); -}; diff --git a/lib/routes/kepu/live.ts b/lib/routes/kepu/live.ts index 4b3f0b1f2..4abb53735 100644 --- a/lib/routes/kepu/live.ts +++ b/lib/routes/kepu/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/live', + categories: ['new-media'], + example: '/kepu/live', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['live.kepu.net.cn/replay/index'], + }, + name: '直播回看', + maintainers: ['nczitzk'], + handler, + url: 'live.kepu.net.cn/replay/index', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const rootUrl = 'https://live.kepu.net.cn'; @@ -76,7 +99,7 @@ export default async (ctx) => { const author = '中国科普博览'; const subtitle = '直播回看'; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -89,5 +112,5 @@ export default async (ctx) => { itunes_author: author, itunes_category: 'Science', allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/kepu/maintainer.ts b/lib/routes/kepu/maintainer.ts deleted file mode 100644 index da83b2d0c..000000000 --- a/lib/routes/kepu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/live': ['nczitzk'], -}; diff --git a/lib/routes/kepu/namespace.ts b/lib/routes/kepu/namespace.ts new file mode 100644 index 000000000..7b9c11f1b --- /dev/null +++ b/lib/routes/kepu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科普博览', + url: 'live.kepu.net.cn', +}; diff --git a/lib/routes/kepu/radar.ts b/lib/routes/kepu/radar.ts deleted file mode 100644 index d585c81ae..000000000 --- a/lib/routes/kepu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'kepu.net.cn': { - _name: '中国科普博览', - live: [ - { - title: '直播回看', - docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-ke-pu-bo-lan-zhi-bo-hui-kan', - source: ['/replay/index'], - target: '/kepu/live', - }, - ], - }, -}; diff --git a/lib/routes/kepu/router.ts b/lib/routes/kepu/router.ts deleted file mode 100644 index fd57823ac..000000000 --- a/lib/routes/kepu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/live', './live'); -}; diff --git a/lib/routes/keylol/index.ts b/lib/routes/keylol/index.ts index fb2c5df68..2fff6f24c 100644 --- a/lib/routes/keylol/index.ts +++ b/lib/routes/keylol/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let thePath = getSubPath(ctx).replace(/^\//, ''); if (/^f\d+-\d+/.test(thePath)) { @@ -70,7 +78,7 @@ export default async (ctx) => { const icon = $('link[rel="apple-touch-icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -80,5 +88,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="application-name"]').prop('content'), author: $('meta[name="author"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/keylol/maintainer.ts b/lib/routes/keylol/maintainer.ts deleted file mode 100644 index 2543f2e41..000000000 --- a/lib/routes/keylol/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path+': ['nczitzk'], -}; diff --git a/lib/routes/keylol/namespace.ts b/lib/routes/keylol/namespace.ts new file mode 100644 index 000000000..05d8e559f --- /dev/null +++ b/lib/routes/keylol/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '其乐', + url: 'keylol.com', +}; diff --git a/lib/routes/keylol/radar.ts b/lib/routes/keylol/radar.ts deleted file mode 100644 index 905cf20f9..000000000 --- a/lib/routes/keylol/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'keylol.com': { - _name: '其乐', - '.': [ - { - title: '论坛', - docs: 'https://docs.rsshub.app/routes/game#qi-le-lun-tan', - source: ['/:category', '/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/keylol\.com\/(forum.php\?.*|f\d+-\d+)?/).replace(/forum.php\?/, '')[1]; - - return `/keylol${path ? `/${path}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/keylol/router.ts b/lib/routes/keylol/router.ts deleted file mode 100644 index 3e16705b5..000000000 --- a/lib/routes/keylol/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './'); -}; diff --git a/lib/routes/kimlaw/maintainer.ts b/lib/routes/kimlaw/maintainer.ts deleted file mode 100644 index 0d17030fc..000000000 --- a/lib/routes/kimlaw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/thesis': ['TonyRL'], -}; diff --git a/lib/routes/kimlaw/namespace.ts b/lib/routes/kimlaw/namespace.ts new file mode 100644 index 000000000..e05a6a263 --- /dev/null +++ b/lib/routes/kimlaw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Korea Institute of Marine Law', + url: 'kimlaw.or.kr', +}; diff --git a/lib/routes/kimlaw/radar.ts b/lib/routes/kimlaw/radar.ts deleted file mode 100644 index d3da6a06c..000000000 --- a/lib/routes/kimlaw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'kimlaw.or.kr': { - _name: '韓國海事法學會', - '.': [ - { - title: '学术论文', - docs: 'https://docs.rsshub.app/routes/study#han-guo-hai-shi-fa-xue-hui', - source: ['/67', '/'], - target: '/kimlaw/thesis', - }, - ], - }, -}; diff --git a/lib/routes/kimlaw/router.ts b/lib/routes/kimlaw/router.ts deleted file mode 100644 index bf1711a7b..000000000 --- a/lib/routes/kimlaw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/thesis', './thesis'); -}; diff --git a/lib/routes/kimlaw/thesis.ts b/lib/routes/kimlaw/thesis.ts index 41a444618..e269a8942 100644 --- a/lib/routes/kimlaw/thesis.ts +++ b/lib/routes/kimlaw/thesis.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://www.kimlaw.or.kr'; -export default async (ctx) => { +export const route: Route = { + path: '/thesis', + categories: ['study'], + example: '/kimlaw/thesis', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kimlaw.or.kr/67', 'kimlaw.or.kr/'], + }, + name: 'Thesis', + maintainers: ['TonyRL'], + handler, + url: 'kimlaw.or.kr/67', +}; + +async function handler() { const link = `${baseUrl}/67`; const { data: response } = await got(link); @@ -36,10 +59,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.widget_menu_title').text()} - ${$('head title').text()}`, link, image: 'https://cdn.imweb.me/upload/S20210819f9dd86d20e7d7/9aec17c4e98a5.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/konghq/blog-posts.ts b/lib/routes/konghq/blog-posts.ts index 12847871e..b857c4a44 100644 --- a/lib/routes/konghq/blog-posts.ts +++ b/lib/routes/konghq/blog-posts.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // Get the lastest blog posts of https://konghq.com/ import got from '@/utils/got'; @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; const BASE_URL = 'https://konghq.com'; const BLOG_POSTS_URL = `${BASE_URL}/blog`; -export default async (ctx) => { +export const route: Route = { + path: '/blog-posts', + categories: ['programming'], + example: '/konghq/blog-posts', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['konghq.com/blog/*'], + }, + name: '博客最新文章', + maintainers: ['piglei'], + handler, + url: 'konghq.com/blog/*', +}; + +async function handler() { // Always get the posts on the first page. const url = `${BLOG_POSTS_URL}/page/1`; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Kong Inc(konghq.com) blog posts`, link: BLOG_POSTS_URL, item: items, - }); -}; + }; +} diff --git a/lib/routes/konghq/maintainer.ts b/lib/routes/konghq/maintainer.ts deleted file mode 100644 index ac5c44dbf..000000000 --- a/lib/routes/konghq/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog-posts': ['piglei'], -}; diff --git a/lib/routes/konghq/namespace.ts b/lib/routes/konghq/namespace.ts new file mode 100644 index 000000000..eaa71c0a5 --- /dev/null +++ b/lib/routes/konghq/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Kong API 网关平台', + url: 'konghq.com', + description: `[Kong](https://konghq.com/) 是一家开源的 API 网关服务商,此处收集其官网的最新博客文章。`, +}; diff --git a/lib/routes/konghq/radar.ts b/lib/routes/konghq/radar.ts deleted file mode 100644 index 786ea03e5..000000000 --- a/lib/routes/konghq/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'konghq.com': { - _name: 'Kong API 网关平台', - '.': [ - { - title: '博客最新文章', - docs: 'https://docs.rsshub.app/routes/programming#kong-api-wang-guan-ping-tai-bo-ke-zui-xin-wen-zhang', - source: ['/blog/*'], - target: '/konghq/blog-posts', - }, - ], - }, -}; diff --git a/lib/routes/konghq/router.ts b/lib/routes/konghq/router.ts deleted file mode 100644 index d7585fccf..000000000 --- a/lib/routes/konghq/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog-posts', './blog-posts'); -}; diff --git a/lib/routes/kuaidi100/index.ts b/lib/routes/kuaidi100/index.ts index 255ddc113..4e2badd26 100644 --- a/lib/routes/kuaidi100/index.ts +++ b/lib/routes/kuaidi100/index.ts @@ -1,6 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/track/:number/:id/:phone?', + categories: ['other'], + example: '/kuaidi100/track/shunfeng/SF1007896781640/0383', + parameters: { number: '快递公司代号', id: '订单号', phone: '手机号后四位(仅顺丰)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '快递订单追踪', + maintainers: ['NeverBehave'], + handler, + description: `快递公司代号如果不能确定,可通过下方快递列表获得。 + + :::warning + 1. 构造链接前请确认所有参数正确:错误\`快递公司 - 订单号\`组合将会缓存信息一小段时间防止产生无用查询 + 2. 正常查询的订单在未签收状态下不会被缓存:请控制查询频率 + 3. 订单完成后请尽快取消订阅,避免资源浪费 + :::`, +}; + +async function handler(ctx) { // number is shorthand for company // id is ticket number // phone for shunfeng :) @@ -31,7 +57,7 @@ export default async (ctx) => { // Maybe we can look into isCheck, condition, and state :) // But I just want to make it work for now. - ctx.set('data', { + return { title: `快递 ${company.name}-${id}`, link: 'https://www.kuaidi100.com', description: `快递 ${company.name}-${id}`, @@ -42,5 +68,5 @@ export default async (ctx) => { pubDate: new Date(item.time || item.ftime).toUTCString(), link: 'https://www.kuaidi100.com', })), - }); -}; + }; +} diff --git a/lib/routes/kuaidi100/maintainer.ts b/lib/routes/kuaidi100/maintainer.ts deleted file mode 100644 index 7ac1db9d8..000000000 --- a/lib/routes/kuaidi100/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/company': ['NeverBehave'], - '/track/:number/:id/:phone?': ['NeverBehave'], -}; diff --git a/lib/routes/kuaidi100/namespace.ts b/lib/routes/kuaidi100/namespace.ts new file mode 100644 index 000000000..42423fd51 --- /dev/null +++ b/lib/routes/kuaidi100/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '快递 100', + url: 'kuaidi100.com', +}; diff --git a/lib/routes/kuaidi100/radar.ts b/lib/routes/kuaidi100/radar.ts deleted file mode 100644 index 19e206476..000000000 --- a/lib/routes/kuaidi100/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'kuaidi100.com': { - _name: '快递 100', - '.': [ - { - title: '快递订单追踪', - docs: 'https://docs.rsshub.app/routes/other#kuai-di-100', - source: '/', - target: (params, url, document) => { - const postid = document && document.querySelector('#postid').value; - const com = document && document.querySelector('#selectComBtn').childNodes[1].attributes[1].value; - if (com && com !== 'default' && postid) { - return `/kuaidi100/track/${com}/${postid}`; - } - }, - }, - { - title: '支持的快递公司列表', - docs: 'https://docs.rsshub.app/routes/other#kuai-di-100', - source: '/', - target: '/kuaidi100/company', - }, - ], - }, -}; diff --git a/lib/routes/kuaidi100/router.ts b/lib/routes/kuaidi100/router.ts deleted file mode 100644 index dd197da45..000000000 --- a/lib/routes/kuaidi100/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/company', './supported-company'); - router.get('/track/:number/:id/:phone?', './index'); -}; diff --git a/lib/routes/kuaidi100/supported-company.ts b/lib/routes/kuaidi100/supported-company.ts index 149e763a9..cfd77b30b 100644 --- a/lib/routes/kuaidi100/supported-company.ts +++ b/lib/routes/kuaidi100/supported-company.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/company', + categories: ['other'], + example: '/kuaidi100/company', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kuaidi100.com/'], + }, + name: '支持的快递公司列表', + maintainers: ['NeverBehave'], + handler, + url: 'kuaidi100.com/', +}; + +async function handler() { const ls = await utils.company(); - ctx.set('data', { + return { title: `快递100 快递列表`, link: 'https://www.kuaidi100.com', description: `快递100 所支持的快递列表及其查询名称`, @@ -12,5 +35,5 @@ export default async (ctx) => { category: item.comTypeName, link: item.siteUrl, })), - }); -}; + }; +} diff --git a/lib/routes/kunchengblog/essay.ts b/lib/routes/kunchengblog/essay.ts index dffb1e2f7..44573c259 100644 --- a/lib/routes/kunchengblog/essay.ts +++ b/lib/routes/kunchengblog/essay.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { SourceMapConsumer } from 'source-map'; -export default async (ctx) => { +export const route: Route = { + path: '/essay', + categories: ['blog'], + example: '/kunchengblog/essay', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kunchengblog.com/essay'], + }, + name: 'Essay', + maintainers: ['nczitzk'], + handler, + url: 'kunchengblog.com/essay', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; const rootUrl = 'https://www.kunchengblog.com'; @@ -50,7 +73,7 @@ export default async (ctx) => { const description = $('meta[name="description"]').prop('content'); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${title} - Essay`, link: currentUrl, @@ -62,5 +85,5 @@ export default async (ctx) => { subtitle: description, author: title, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/kunchengblog/maintainer.ts b/lib/routes/kunchengblog/maintainer.ts deleted file mode 100644 index fa51fda18..000000000 --- a/lib/routes/kunchengblog/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/essay': ['nczitzk'], -}; diff --git a/lib/routes/kunchengblog/namespace.ts b/lib/routes/kunchengblog/namespace.ts new file mode 100644 index 000000000..00bebd3cb --- /dev/null +++ b/lib/routes/kunchengblog/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Kun Cheng', + url: 'kunchengblog.com', +}; diff --git a/lib/routes/kunchengblog/radar.ts b/lib/routes/kunchengblog/radar.ts deleted file mode 100644 index acb3b3563..000000000 --- a/lib/routes/kunchengblog/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'kunchengblog.com': { - _name: 'Kun Cheng', - '.': [ - { - title: 'Essay', - docs: 'https://docs.rsshub.app/routes/blog#kun-cheng-essay', - source: ['/essay'], - target: '/kunchengblog/essay', - }, - ], - }, -}; diff --git a/lib/routes/kunchengblog/router.ts b/lib/routes/kunchengblog/router.ts deleted file mode 100644 index 15dc929d7..000000000 --- a/lib/routes/kunchengblog/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/essay', './essay'); -}; diff --git a/lib/routes/kuwaitlocal/index.ts b/lib/routes/kuwaitlocal/index.ts index 52c662253..0be8f006a 100644 --- a/lib/routes/kuwaitlocal/index.ts +++ b/lib/routes/kuwaitlocal/index.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/kuwaitlocal/article', + parameters: { category: 'Category name, can be found in URL, `latest` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kuwaitlocal.com/news/categories/:category'], + target: '/:category', + }, + name: 'Categorised News', + maintainers: ['TonyRL'], + handler, + url: 'kuwaitlocal.com/news/latest', +}; + +async function handler(ctx) { const baseUrl = 'https://kuwaitlocal.com'; const { category = 'latest' } = ctx.req.param(); const url = `${baseUrl}/news/${category === 'latest' ? category : `categories/${category}`}`; @@ -39,11 +63,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim(), description: $('head meta[name="description"]').attr('content').trim(), link: url, item: items, language: 'en', - }); -}; + }; +} diff --git a/lib/routes/kuwaitlocal/maintainer.ts b/lib/routes/kuwaitlocal/maintainer.ts deleted file mode 100644 index b9bbbef9d..000000000 --- a/lib/routes/kuwaitlocal/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['TonyRL'], - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/kuwaitlocal/namespace.ts b/lib/routes/kuwaitlocal/namespace.ts new file mode 100644 index 000000000..69dde9d83 --- /dev/null +++ b/lib/routes/kuwaitlocal/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Kuwait Local', + url: 'kuwaitlocal.com', +}; diff --git a/lib/routes/kuwaitlocal/radar.ts b/lib/routes/kuwaitlocal/radar.ts deleted file mode 100644 index 818a71878..000000000 --- a/lib/routes/kuwaitlocal/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'kuwaitlocal.com': { - _name: 'Kuwait Local', - '.': [ - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/new-media#kuwait-local', - source: ['/news/latest', '/news', '/'], - target: '/kuwaitlocal', - }, - { - title: 'Categorised News', - docs: 'https://docs.rsshub.app/routes/new-media#kuwait-local', - source: ['/news/categories/:category'], - target: '/kuwaitlocal/:category', - }, - ], - }, -}; diff --git a/lib/routes/kuwaitlocal/router.ts b/lib/routes/kuwaitlocal/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/kuwaitlocal/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/kyodonews/index.ts b/lib/routes/kyodonews/index.ts index e47e8a6a5..afbf71156 100644 --- a/lib/routes/kyodonews/index.ts +++ b/lib/routes/kyodonews/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,26 @@ import * as path from 'node:path'; const resolveRelativeLink = (link, baseUrl) => (link.startsWith('http') ? link : `${baseUrl}${link}`); -export default async (ctx) => { +export const route: Route = { + path: '/:language?/:keyword?', + categories: ['traditional-media'], + example: '/kyodonews', + parameters: { language: '语言: `china` = 简体中文 (默认), `tchina` = 繁體中文', keyword: '关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新报道', + maintainers: ['Rongronggg9'], + handler, + description: `\`keyword\` 为关键词,由于共同网有许多关键词并不在主页列出,此处不一一列举,可从关键词页的 URL 的最后一级路径中提取。如 \`日中关系\` 的关键词页 URL 为 \`https://china.kyodonews.net/news/japan-china_relationship\`, 则将 \`japan-china_relationship\` 填入 \`keyword\`。特别地,当填入 \`rss\` 时,将从共同网官方 RSS 中抓取文章;略去时,将从首页抓取最新报道 (注意:首页更新可能比官方 RSS 稍慢)。`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'china'; const keyword = ctx.req.param('keyword') === 'RSS' ? 'rss' : ctx.req.param('keyword') ?? ''; @@ -117,11 +137,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, description, link: currentUrl, item: items, image, - }); -}; + }; +} diff --git a/lib/routes/kyodonews/maintainer.ts b/lib/routes/kyodonews/maintainer.ts deleted file mode 100644 index a415a5cb2..000000000 --- a/lib/routes/kyodonews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language?/:keyword?': ['Rongronggg9'], -}; diff --git a/lib/routes/kyodonews/namespace.ts b/lib/routes/kyodonews/namespace.ts new file mode 100644 index 000000000..9bec39d23 --- /dev/null +++ b/lib/routes/kyodonews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '共同网', + url: 'china.kyodonews.net', +}; diff --git a/lib/routes/kyodonews/radar.ts b/lib/routes/kyodonews/radar.ts deleted file mode 100644 index 050b2cb95..000000000 --- a/lib/routes/kyodonews/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'kyodonews.net': { - _name: '共同网', - china: [ - { - title: '最新报道', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-tong-wang-zui-xin-bao-dao', - source: '/', - target: '/kyodonews/china', - }, - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-tong-wang-zui-xin-bao-dao', - source: '/news/:keyword', - target: '/kyodonews/china/:keyword?', - }, - ], - tchina: [ - { - title: '最新報道', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-tong-wang-zui-xin-bao-dao', - source: '/', - target: '/kyodonews/tchina', - }, - { - title: '關鍵詞', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-tong-wang-zui-xin-bao-dao', - source: '/news/:keyword', - target: '/kyodonews/tchina/:keyword?', - }, - ], - }, -}; diff --git a/lib/routes/kyodonews/router.ts b/lib/routes/kyodonews/router.ts deleted file mode 100644 index 43245151b..000000000 --- a/lib/routes/kyodonews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language?/:keyword?', './index'); -}; diff --git a/lib/routes/laimanhua/index.ts b/lib/routes/laimanhua/index.ts index 41f29e3d1..45cd2acf6 100644 --- a/lib/routes/laimanhua/index.ts +++ b/lib/routes/laimanhua/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import iconv from 'iconv-lite'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['anime'], + example: '/laimanhua/tiandikangzhanjiVERSUS', + parameters: { id: '漫画 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.laimanhua8.com/kanmanhua/:id'], + }, + name: '漫画列表', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const baseUrl = `https://www.laimanhua8.com`; const link = `${baseUrl}/kanmanhua/${id}/`; @@ -31,11 +53,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${$('head meta[property="og:novel:book_name"]').attr('content')} - 来漫画`, description: $('.introduction').text(), image: $('head meta[property="og:image"]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/laimanhua/maintainer.ts b/lib/routes/laimanhua/maintainer.ts deleted file mode 100644 index e1db84f81..000000000 --- a/lib/routes/laimanhua/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['TonyRL'], -}; diff --git a/lib/routes/laimanhua/namespace.ts b/lib/routes/laimanhua/namespace.ts new file mode 100644 index 000000000..eb3d9bb86 --- /dev/null +++ b/lib/routes/laimanhua/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '来漫画', + url: 'www.laimanhua8.com', +}; diff --git a/lib/routes/laimanhua/radar.ts b/lib/routes/laimanhua/radar.ts deleted file mode 100644 index b37872033..000000000 --- a/lib/routes/laimanhua/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'laimanhua8.com': { - _name: '来漫画', - www: [ - { - title: '漫画列表', - docs: 'https://docs.rsshub.app/routes/anime#lai-man-hua', - source: '/kanmanhua/:id', - target: '/laimanhua/:id', - }, - ], - }, -}; diff --git a/lib/routes/laimanhua/router.ts b/lib/routes/laimanhua/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/laimanhua/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/lala/maintainer.ts b/lib/routes/lala/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/lala/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/lala/namespace.ts b/lib/routes/lala/namespace.ts new file mode 100644 index 000000000..c0e76e0fc --- /dev/null +++ b/lib/routes/lala/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '荒岛', + url: 'lala.im', +}; diff --git a/lib/routes/lala/radar.ts b/lib/routes/lala/radar.ts deleted file mode 100644 index 63375e5a8..000000000 --- a/lib/routes/lala/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'lala.im': { - _name: '荒岛', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#huang-dao', - source: ['/'], - target: '/lala', - }, - ], - }, -}; diff --git a/lib/routes/lala/router.ts b/lib/routes/lala/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/lala/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/lala/rss.ts b/lib/routes/lala/rss.ts index 666788273..e248da1d6 100644 --- a/lib/routes/lala/rss.ts +++ b/lib/routes/lala/rss.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['lala.im/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'lala.im/', +}; + +async function handler() { const currentUrl = 'https://lala.im'; const response = await got(`${currentUrl}/feed`); const $ = load(response.data, { xmlMode: true }); @@ -23,10 +36,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: titleMain, description: descriptionMain, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lang/maintainer.ts b/lib/routes/lang/maintainer.ts deleted file mode 100644 index 4ded6ea20..000000000 --- a/lib/routes/lang/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/live/room/:id': ['MittWillson'], -}; diff --git a/lib/routes/lang/namespace.ts b/lib/routes/lang/namespace.ts new file mode 100644 index 000000000..65f7dc284 --- /dev/null +++ b/lib/routes/lang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浪 Play 直播', + url: 'lang.live', +}; diff --git a/lib/routes/lang/radar.ts b/lib/routes/lang/radar.ts deleted file mode 100644 index dcd2bcff5..000000000 --- a/lib/routes/lang/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'lang.live': { - _name: '浪 Play 直播', - '.': [ - { - title: '直播间开播', - docs: 'https://docs.rsshub.app/routes/live#lang-play-yuan-zhi-bo', - source: ['/room/:id'], - target: '/lang/live/room/:id', - }, - ], - }, -}; diff --git a/lib/routes/lang/room.ts b/lib/routes/lang/room.ts index 6e85d0542..22c4eda9f 100644 --- a/lib/routes/lang/room.ts +++ b/lib/routes/lang/room.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,28 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/live/room/:id', + categories: ['live'], + example: '/lang/live/room/1352360', + parameters: { id: '直播间 id, 可在主播直播间页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lang.live/room/:id'], + }, + name: 'Unknown', + maintainers: ['MittWillson'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `https://www.lang.live/room/${id}`; @@ -33,11 +55,11 @@ export default async (ctx) => { ]; } - ctx.set('data', { + return { title: `${name} 的浪 Play 直播`, description: data.live_info.sign, link: url, item, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/lang/router.ts b/lib/routes/lang/router.ts deleted file mode 100644 index c6e4965a3..000000000 --- a/lib/routes/lang/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/live/room/:id', './room'); -}; diff --git a/lib/routes/lanqiao/author.ts b/lib/routes/lanqiao/author.ts index 3a11e4485..9c63e5d4f 100644 --- a/lib/routes/lanqiao/author.ts +++ b/lib/routes/lanqiao/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -16,7 +17,28 @@ async function getUserName(uid) { return response.data.name; } -export default async (ctx) => { +export const route: Route = { + path: '/author/:uid', + categories: ['programming'], + example: '/lanqiao/author/1701267', + parameters: { uid: '作者 `uid` 可在作者主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lanqiao.cn/users/:uid'], + }, + name: '作者发布的课程', + maintainers: ['huhuhang'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const userName = await getUserName(uid); // 发起 HTTP GET 请求 @@ -49,7 +71,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { // 源标题 title: `${userName} 发布的课程`, // 源链接 @@ -58,5 +80,5 @@ export default async (ctx) => { description: `${userName} 发布的课程`, // 遍历此前获取的数据 item: items, - }); -}; + }; +} diff --git a/lib/routes/lanqiao/courses.ts b/lib/routes/lanqiao/courses.ts index 1b35007eb..f05b5d187 100644 --- a/lib/routes/lanqiao/courses.ts +++ b/lib/routes/lanqiao/courses.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; import MarkdownIt from 'markdown-it'; -export default async (ctx) => { +export const route: Route = { + path: '/courses/:sort/:tag', + categories: ['programming'], + example: '/lanqiao/courses/latest/all', + parameters: { sort: '排序规则 sort, 默认(`default`)、最新(`latest`)、最热(`hotest`)', tag: '课程标签 `tag`,可在该页面找到:https://www.lanqiao.cn/courses/' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '全站发布的课程', + maintainers: ['huhuhang'], + handler, +}; + +async function handler(ctx) { const sort = ctx.req.param('sort'); const tag = ctx.req.param('tag'); // 发起 HTTP GET 请求 @@ -50,7 +69,7 @@ export default async (ctx) => { default: '默认', }; - ctx.set('data', { + return { // 源标题 title: `蓝桥云课${sortType[sort]}课程列表【${tag}】`, // 源链接 @@ -59,5 +78,5 @@ export default async (ctx) => { description: `蓝桥云课【${tag}】标签下${sortType[sort]}课程列表`, // 遍历此前获取的数据 item: items, - }); -}; + }; +} diff --git a/lib/routes/lanqiao/maintainer.ts b/lib/routes/lanqiao/maintainer.ts deleted file mode 100644 index af302147a..000000000 --- a/lib/routes/lanqiao/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/author/:uid': ['huhuhang'], - '/courses/:sort/:tag': ['huhuhang'], - '/questions/:id': ['huhuhang'], -}; diff --git a/lib/routes/lanqiao/namespace.ts b/lib/routes/lanqiao/namespace.ts new file mode 100644 index 000000000..694b2e7a5 --- /dev/null +++ b/lib/routes/lanqiao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '蓝桥云课', + url: 'lanqiao.cn', +}; diff --git a/lib/routes/lanqiao/questions.ts b/lib/routes/lanqiao/questions.ts index d3526355d..a3e3fb0b8 100644 --- a/lib/routes/lanqiao/questions.ts +++ b/lib/routes/lanqiao/questions.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; -export default async (ctx) => { +export const route: Route = { + path: '/questions/:id', + categories: ['programming'], + example: '/lanqiao/questions/2', + parameters: { id: 'topic_id 主题 `id` 可在社区板块 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lanqiao.cn/questions/', 'lanqiao.cn/questions/topics/:id'], + }, + name: '技术社区', + maintainers: ['huhuhang'], + handler, + url: 'lanqiao.cn/questions/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); // 发起 HTTP GET 请求 const response = await got({ @@ -42,7 +65,7 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { // 源标题 title: `蓝桥云课技术社区【${topic_name}】`, // 源链接 @@ -51,5 +74,5 @@ export default async (ctx) => { description: `蓝桥云课技术社区【${topic_name}】`, // 遍历此前获取的数据 item: items, - }); -}; + }; +} diff --git a/lib/routes/lanqiao/radar.ts b/lib/routes/lanqiao/radar.ts deleted file mode 100644 index 00c61d097..000000000 --- a/lib/routes/lanqiao/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'lanqiao.cn': { - _name: '蓝桥云课', - '.': [ - { - title: '作者发布的课程', - docs: 'https://docs.rsshub.app/routes/programming#lan-qiao-yun-ke-zuo-zhe-fa-bu-de-ke-cheng', - source: ['/users/:uid'], - target: '/lanqiao/author/:uid', - }, - { - title: '全站发布的课程', - docs: 'https://docs.rsshub.app/routes/programming#lan-qiao-yun-ke-quan-zhan-fa-bu-de-ke-cheng', - source: ['/courses/'], - target: '/lanqiao/courses/all', - }, - { - title: '技术社区', - docs: 'https://docs.rsshub.app/routes/programming#lan-qiao-yun-ke-ji-shu-she-qu', - source: ['/questions/', '/questions/topics/:id'], - target: '/lanqiao/questions/:id', - }, - ], - }, -}; diff --git a/lib/routes/lanqiao/router.ts b/lib/routes/lanqiao/router.ts deleted file mode 100644 index a08dfd324..000000000 --- a/lib/routes/lanqiao/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/author/:uid', './author'); - router.get('/courses/:sort/:tag', './courses'); - router.get('/questions/:id', './questions'); -}; diff --git a/lib/routes/laohu8/maintainer.ts b/lib/routes/laohu8/maintainer.ts deleted file mode 100644 index 151ce0177..000000000 --- a/lib/routes/laohu8/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/personal/:id': ['Fatpandac'], -}; diff --git a/lib/routes/laohu8/namespace.ts b/lib/routes/laohu8/namespace.ts new file mode 100644 index 000000000..59b4b5707 --- /dev/null +++ b/lib/routes/laohu8/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '老虎社区', + url: 'laohu8.com', +}; diff --git a/lib/routes/laohu8/personal.ts b/lib/routes/laohu8/personal.ts index f0d6f1d4d..92a1b4cd9 100644 --- a/lib/routes/laohu8/personal.ts +++ b/lib/routes/laohu8/personal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.laohu8.com'; -export default async (ctx) => { +export const route: Route = { + path: '/personal/:id', + categories: ['finance'], + example: '/laohu8/personal/3527667596890271', + parameters: { id: '用户 ID,见网址链接' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['laohu8.com/personal/:id'], + }, + name: '个人主页', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `${rootUrl}/personal/${id}`; @@ -25,9 +47,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `老虎社区 - ${author} 个人社区`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/laohu8/radar.ts b/lib/routes/laohu8/radar.ts deleted file mode 100644 index 63a71841a..000000000 --- a/lib/routes/laohu8/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'laohu8.com': { - _name: '老虎社区', - '.': [ - { - title: '个人主页', - docs: 'https://docs.rsshub.app/routes/finance#lao-hu-she-qu', - source: '/personal/:id', - target: '/laohu8/personal/:id', - }, - ], - }, -}; diff --git a/lib/routes/laohu8/router.ts b/lib/routes/laohu8/router.ts deleted file mode 100644 index a575ad3c9..000000000 --- a/lib/routes/laohu8/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/personal/:id', './personal'); -}; diff --git a/lib/routes/latepost/index.ts b/lib/routes/latepost/index.ts index 47652a6b5..39e5b262c 100644 --- a/lib/routes/latepost/index.ts +++ b/lib/routes/latepost/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -21,7 +22,28 @@ const arrayToDictionary = (arr) => ]) ); -export default async (ctx) => { +export const route: Route = { + path: '/:proma?', + categories: ['new-media'], + example: '/latepost', + parameters: { proma: '栏目 id,见下表,默认为最新报道' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '报道', + maintainers: ['nczitzk'], + handler, + description: `| 最新报道 | 晚点独家 | 人物访谈 | 晚点早知道 | 长报道 | + | -------- | -------- | -------- | ---------- | ------ | + | | 1 | 2 | 3 | 4 |`, +}; + +async function handler(ctx) { const proma = ctx.req.param('proma'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; @@ -96,7 +118,7 @@ export default async (ctx) => { const $ = load(currentResponse); - ctx.set('data', { + return { item: items, title: `${title} - ${proma ? columns[proma].title : defaultTitle}`, link: currentUrl, @@ -106,5 +128,5 @@ export default async (ctx) => { icon, logo: icon, author: title, - }); -}; + }; +} diff --git a/lib/routes/latepost/maintainer.ts b/lib/routes/latepost/maintainer.ts deleted file mode 100644 index cb6d6dce1..000000000 --- a/lib/routes/latepost/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:proma?': ['nczitzk'], -}; diff --git a/lib/routes/latepost/namespace.ts b/lib/routes/latepost/namespace.ts new file mode 100644 index 000000000..ee070520a --- /dev/null +++ b/lib/routes/latepost/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '晚点 LatePost', + url: 'latepost.com', +}; diff --git a/lib/routes/latepost/radar.ts b/lib/routes/latepost/radar.ts deleted file mode 100644 index 1a6f24493..000000000 --- a/lib/routes/latepost/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'latepost.com': { - _name: '晚点 Latepost', - '.': [ - { - title: '报道', - docs: 'https://docs.rsshub.app/routes/new-media#wan-dian-latepost-bao-dao', - source: '*', - target: (params, url) => { - url = new URL(url); - const proma = url.searchParams.get('proma'); - - return `/latepost${proma ? `/${proma}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/latepost/router.ts b/lib/routes/latepost/router.ts deleted file mode 100644 index 997113cbf..000000000 --- a/lib/routes/latepost/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:proma?', './'); -}; diff --git a/lib/routes/layoffs/index.ts b/lib/routes/layoffs/index.ts index d23fc937b..e20b89ad1 100644 --- a/lib/routes/layoffs/index.ts +++ b/lib/routes/layoffs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -37,7 +38,19 @@ const getMappings = function (obj) { return [mapping, reverseMapping]; }; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['layoffs.fyi/'], + target: '', + }, + name: 'Unknown', + maintainers: ['BrandNewLifeJackie26'], + handler, + url: 'layoffs.fyi/', +}; + +async function handler() { const headers = { 'x-airtable-application-id': 'app1PaujS9zxVGUZ4', 'x-airtable-inter-service-client': 'webClient', @@ -108,7 +121,7 @@ export default async (ctx) => { const countryMapping = getMappings(table.columns.find((col) => col.name === 'Country').typeOptions.choices)[0]; const rows = table.rows.slice(0, ROW_COUNT); - ctx.set('data', { + return { title: 'Tech layoff data feed from layoffs.fyi', link: WEBSITE_URL, description: 'This feed gets tech layoff data from layoffs.fyi and display them in a user friendly way', @@ -131,5 +144,5 @@ export default async (ctx) => { link: source, // Laid off source link }; }), - }); -}; + }; +} diff --git a/lib/routes/layoffs/maintainer.ts b/lib/routes/layoffs/maintainer.ts deleted file mode 100644 index 19ef14250..000000000 --- a/lib/routes/layoffs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['BrandNewLifeJackie26'], -}; diff --git a/lib/routes/layoffs/namespace.ts b/lib/routes/layoffs/namespace.ts new file mode 100644 index 000000000..0c9b14b6f --- /dev/null +++ b/lib/routes/layoffs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Layoffs.fyi', + url: 'layoffs.fyi', +}; diff --git a/lib/routes/layoffs/radar.ts b/lib/routes/layoffs/radar.ts deleted file mode 100644 index 87e677d50..000000000 --- a/lib/routes/layoffs/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'layoffs.fyi': { - _name: 'Layoffs', - '.': [ - { - title: 'Data Tracker Feed', - docs: 'https://docs.rsshub.app/routes/other#layoffs-fyi', - source: '/', - target: '/layoffs', - }, - ], - }, -}; diff --git a/lib/routes/layoffs/router.ts b/lib/routes/layoffs/router.ts deleted file mode 100644 index 33075c5d6..000000000 --- a/lib/routes/layoffs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index.js'); -}; diff --git a/lib/routes/learnblockchain/maintainer.ts b/lib/routes/learnblockchain/maintainer.ts deleted file mode 100644 index 0373ecfe6..000000000 --- a/lib/routes/learnblockchain/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/posts/:cid/:sort?': ['running-grass'], -}; diff --git a/lib/routes/learnblockchain/namespace.ts b/lib/routes/learnblockchain/namespace.ts new file mode 100644 index 000000000..c16857fd9 --- /dev/null +++ b/lib/routes/learnblockchain/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '登链社区', + url: 'learnblockchain.cn', +}; diff --git a/lib/routes/learnblockchain/posts.ts b/lib/routes/learnblockchain/posts.ts index f5d966840..6c9afb045 100644 --- a/lib/routes/learnblockchain/posts.ts +++ b/lib/routes/learnblockchain/posts.ts @@ -1,8 +1,46 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:cid/:sort?', + categories: ['programming'], + example: '/learnblockchain/posts/DApp/newest', + parameters: { cid: '分类id,更多分类可以论坛的URL找到', sort: '排序方式,默认精选' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['running-grass'], + handler, + description: `| id | 分类 | + | -------- | ------------ | + | all | 全部 | + | DApp | 去中心化应用 | + | chains | 公链 | + | 联盟链 | 联盟链 | + | scaling | Layer2 | + | langs | 编程语言 | + | security | 安全 | + | dst | 存储 | + | basic | 理论研究 | + | other | 其他 | + + | id | 排序方式 | + | -------- | ----------- | + | newest | 最新 | + | featured | 精选 (默认) | + | featured | 最赞 | + | hottest | 最热 |`, +}; + +async function handler(ctx) { const cid = ctx.req.param('cid') || 'all'; const sort = ctx.req.param('sort'); @@ -19,7 +57,7 @@ export default async (ctx) => { const $ = load(data); const list = $('div.stream-list section.stream-list-item'); - ctx.set('data', { + return { title: `登链社区--${cid}`, link: url, description: `登链社区`, @@ -39,5 +77,5 @@ export default async (ctx) => { return json; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/learnblockchain/radar.ts b/lib/routes/learnblockchain/radar.ts deleted file mode 100644 index be77a9201..000000000 --- a/lib/routes/learnblockchain/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'learnblockchain.cn': { - _name: '登链社区', - '.': [ - { - title: '分类文章', - docs: 'https://docs.rsshub.app/routes/programming#deng-lian-she-qu-wen-zhang', - source: '/categories/:cid/:sort?', - target: (params) => `/learnblockchain/posts/${params.cid || 'all'}/${params.sort || 'featured'}`, - }, - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/programming#deng-lian-she-qu-wen-zhang', - source: '*', - target: () => '/learnblockchain/posts/all/', - }, - ], - }, -}; diff --git a/lib/routes/learnblockchain/router.ts b/lib/routes/learnblockchain/router.ts deleted file mode 100644 index 23a701b1b..000000000 --- a/lib/routes/learnblockchain/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/posts/:cid/:sort?', './posts'); -}; diff --git a/lib/routes/learnku/maintainer.ts b/lib/routes/learnku/maintainer.ts deleted file mode 100644 index b6ad81ea2..000000000 --- a/lib/routes/learnku/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:community/:category?': ['kayw-geek'], -}; diff --git a/lib/routes/learnku/namespace.ts b/lib/routes/learnku/namespace.ts new file mode 100644 index 000000000..4540616f9 --- /dev/null +++ b/lib/routes/learnku/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LearnKu', + url: 'learnku.com', +}; diff --git a/lib/routes/learnku/radar.ts b/lib/routes/learnku/radar.ts deleted file mode 100644 index c5523d32f..000000000 --- a/lib/routes/learnku/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'learnku.com': { - _name: 'Learn Ku 社区', - '.': [ - { - title: '分区', - docs: 'https://docs.rsshub.app/routes/bbs#learnku', - source: ['/:community'], - target: '/learnku/:community', - }, - ], - }, -}; diff --git a/lib/routes/learnku/router.ts b/lib/routes/learnku/router.ts deleted file mode 100644 index db106b1d8..000000000 --- a/lib/routes/learnku/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:community/:category?', './topic.js'); -}; diff --git a/lib/routes/learnku/topic.ts b/lib/routes/learnku/topic.ts index ca413cf7e..e2f4818b2 100644 --- a/lib/routes/learnku/topic.ts +++ b/lib/routes/learnku/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:community/:category?', + categories: ['bbs'], + example: '/learnku/laravel/qa', + parameters: { community: '社区 标识,可在 找到', category: '分类,如果不传 `category` 则获取全部分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['learnku.com/:community'], + target: '/:community', + }, + name: '社区', + maintainers: ['kayw-geek'], + handler, + description: `| 招聘 | 翻译 | 问答 | 链接 | +| ---- | ------------ | ---- | ----- | +| jobs | translations | qa | links |`, +}; + +async function handler(ctx) { const community = ctx.req.param('community'); const category = ctx.req.param('category') || ''; @@ -67,10 +93,10 @@ export default async (ctx) => { ['links', { name: '链接' }], ['', { name: '最新' }], ]); - ctx.set('data', { + return { title: `LearnKu - ${title} - ${categoryTitle.get(category).name}`, link: url, description, item: item.filter((item) => item !== ''), - }); -}; + }; +} diff --git a/lib/routes/leetcode/articles.ts b/lib/routes/leetcode/articles.ts index 5666dcee0..51486cf98 100644 --- a/lib/routes/leetcode/articles.ts +++ b/lib/routes/leetcode/articles.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,29 @@ const md = MarkdownIt({ const host = 'https://leetcode.com'; const gqlEndpoint = `${host}/graphql`; -export default async (ctx) => { +export const route: Route = { + path: '/articles', + categories: ['programming'], + example: '/leetcode/articles', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['leetcode.com/articles'], + }, + name: 'Articles', + maintainers: ['LogicJake'], + handler, + url: 'leetcode.com/articles', +}; + +async function handler() { const link = new URL('/articles/', host).href; const response = await got(link); const $ = load(response.data); @@ -76,11 +99,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[property="og:description"]').attr('content'), image: 'https://assets.leetcode.com/static_assets/public/icons/favicon-192x192.png', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/leetcode/dailyquestion-cn.ts b/lib/routes/leetcode/dailyquestion-cn.ts index 319414230..c97935c2b 100644 --- a/lib/routes/leetcode/dailyquestion-cn.ts +++ b/lib/routes/leetcode/dailyquestion-cn.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,18 @@ import * as path from 'node:path'; const host = 'https://leetcode.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyquestion/cn', + radar: { + source: ['leetcode.cn/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'leetcode.cn/', +}; + +async function handler() { const question = { date: '', link: '', @@ -103,7 +115,7 @@ export default async (ctx) => { link: question.link, }; - ctx.set('data', { + return { title: 'LeetCode 每日一题', link: 'https://leetcode.cn', description: 'Leetcode 每日一题', @@ -114,5 +126,5 @@ export default async (ctx) => { link: rssData.link, }, ], - }); -}; + }; +} diff --git a/lib/routes/leetcode/dailyquestion-en.ts b/lib/routes/leetcode/dailyquestion-en.ts index 2d8173ba2..5fdc604ee 100644 --- a/lib/routes/leetcode/dailyquestion-en.ts +++ b/lib/routes/leetcode/dailyquestion-en.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,18 @@ import * as path from 'node:path'; const host = 'https://leetcode.com'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyquestion/en', + radar: { + source: ['leetcode.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'leetcode.com/', +}; + +async function handler() { const question = { date: '', link: '', @@ -104,7 +116,7 @@ export default async (ctx) => { link: question.link, }; - ctx.set('data', { + return { title: 'LeetCode Daily Question', link: 'https://leetcode.com', description: 'Leetcode Daily Question', @@ -115,5 +127,5 @@ export default async (ctx) => { link: rssData.link, }, ], - }); -}; + }; +} diff --git a/lib/routes/leetcode/dailyquestion-solution-cn.ts b/lib/routes/leetcode/dailyquestion-solution-cn.ts index 2f5342758..32bd93ef9 100644 --- a/lib/routes/leetcode/dailyquestion-solution-cn.ts +++ b/lib/routes/leetcode/dailyquestion-solution-cn.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt({ @@ -6,7 +7,18 @@ const md = MarkdownIt({ }); import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyquestion/solution/cn', + radar: { + source: ['leetcode.cn/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'leetcode.cn/', +}; + +async function handler() { const baseurl = `https://leetcode.cn`; const url = `${baseurl}/graphql/`; const headers = { @@ -164,7 +176,7 @@ export default async (ctx) => { s = s.replaceAll(/(```)([\d#+A-Za-z-]+)\s*?(\[.*?])?\n/g, '\r\n###$2\r\n$1$2\r\n'); return s; }; - ctx.set('data', { + return { title: 'LeetCode 每日一题题解', description: 'LeetCode 每日一题题解', link: questionUrl, @@ -183,5 +195,5 @@ export default async (ctx) => { author: art.author.username, })), ], - }); -}; + }; +} diff --git a/lib/routes/leetcode/dailyquestion-solution-en.ts b/lib/routes/leetcode/dailyquestion-solution-en.ts index 07f35ebd2..3dbe7f97c 100644 --- a/lib/routes/leetcode/dailyquestion-solution-en.ts +++ b/lib/routes/leetcode/dailyquestion-solution-en.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt({ @@ -7,7 +8,18 @@ const md = MarkdownIt({ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyquestion/solution/en', + radar: { + source: ['leetcode.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'leetcode.com/', +}; + +async function handler() { const baseurl = `https://leetcode.com`; const url = `${baseurl}/graphql/`; const headers = { @@ -194,7 +206,7 @@ export default async (ctx) => { return s; }; article.content = await handleText(article.content); - ctx.set('data', { + return { title: 'LeetCode DailyQuestion Solution', description: 'LeetCode DailyQuestion Solution', link: questionUrl, @@ -213,5 +225,5 @@ export default async (ctx) => { author: 'leetcode', }, ], - }); -}; + }; +} diff --git a/lib/routes/leetcode/maintainer.ts b/lib/routes/leetcode/maintainer.ts deleted file mode 100644 index 9d8a231ca..000000000 --- a/lib/routes/leetcode/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/articles': ['LogicJake'], - '/dailyquestion/:lang': ['EthanWng97'], - '/dailyquestion/solution/:lang': ['woaidouya123'], - '/submission/:country/:user': ['NathanDai'], -}; diff --git a/lib/routes/leetcode/namespace.ts b/lib/routes/leetcode/namespace.ts new file mode 100644 index 000000000..9e142f8e0 --- /dev/null +++ b/lib/routes/leetcode/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LeetCode', + url: 'leetcode.com', +}; diff --git a/lib/routes/leetcode/radar.ts b/lib/routes/leetcode/radar.ts deleted file mode 100644 index 33785ebdc..000000000 --- a/lib/routes/leetcode/radar.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default { - 'leetcode.com': { - _name: 'LeetCode', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/programming#leetcode', - source: ['/articles'], - target: '/leetcode/articles', - }, - { - title: '每日一题', - docs: 'https://docs.rsshub.app/routes/programming#leetcode', - source: ['/'], - target: '/leetcode/dailyquestion/en', - }, - { - title: '每日一题题解', - docs: 'https://docs.rsshub.app/routes/programming#leetcode', - source: ['/'], - target: '/leetcode/dailyquestion/solution/en', - }, - ], - }, - 'leetcode.cn': { - _name: 'LeetCode', - '.': [ - { - title: '每日一题', - docs: 'https://docs.rsshub.app/routes/programming#leetcode', - source: ['/'], - target: '/leetcode/dailyquestion/cn', - }, - { - title: '每日一题题解', - docs: 'https://docs.rsshub.app/routes/programming#leetcode', - source: ['/'], - target: '/leetcode/dailyquestion/solution/cn', - }, - ], - }, -}; diff --git a/lib/routes/leetcode/router.ts b/lib/routes/leetcode/router.ts deleted file mode 100644 index 58af9bba4..000000000 --- a/lib/routes/leetcode/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/articles', './articles'); - router.get('/dailyquestion/cn', './dailyquestion-cn'); - router.get('/dailyquestion/en', './dailyquestion-en'); - router.get('/dailyquestion/solution/cn', './dailyquestion-solution-cn'); - router.get('/dailyquestion/solution/en', './dailyquestion-solution-en'); -}; diff --git a/lib/routes/leiphone/index.ts b/lib/routes/leiphone/index.ts index dcc129f17..f1c284d4b 100644 --- a/lib/routes/leiphone/index.ts +++ b/lib/routes/leiphone/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:do?/:keyword?', + radar: { + source: ['leiphone.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + 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'; @@ -17,10 +30,10 @@ export default async (ctx) => { .map((e) => $(e).attr('href')); const items = await utils.ProcessFeed(list, cache); - ctx.set('data', { + return { title: `雷峰网${todo === 'category' ? ` ${keyword}` : ''}`, description: '雷峰网 - 读懂智能&未来', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/leiphone/maintainer.ts b/lib/routes/leiphone/maintainer.ts deleted file mode 100644 index 97c9f0fcc..000000000 --- a/lib/routes/leiphone/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/leiphone': ['vlcheng'], - '/leiphone/category/:catname': ['vlcheng'], - '/leiphone/newsflash': ['vlcheng'], -}; diff --git a/lib/routes/leiphone/namespace.ts b/lib/routes/leiphone/namespace.ts new file mode 100644 index 000000000..08f51e0ba --- /dev/null +++ b/lib/routes/leiphone/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '雷峰网', + url: 'leiphone.com', +}; diff --git a/lib/routes/leiphone/newsflash.ts b/lib/routes/leiphone/newsflash.ts index 7f234bd18..ec4c1ce0d 100644 --- a/lib/routes/leiphone/newsflash.ts +++ b/lib/routes/leiphone/newsflash.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; // import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/newsflash', + categories: ['new-media'], + example: '/leiphone/newsflash', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['leiphone.com/'], + }, + name: '业界资讯', + maintainers: [], + handler, + url: 'leiphone.com/', +}; + +async function handler() { const url = 'https://www.leiphone.com/site/YejieKuaixun'; const res = await got.get(url); const article = (res.data || {}).article || []; @@ -11,10 +34,10 @@ export default async (ctx) => { const list = article.map((item) => item.url); const items = await utils.ProcessFeed(list, cache); - ctx.set('data', { + return { title: '雷峰网 业界资讯', description: '雷峰网 - 读懂智能&未来', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/leiphone/radar.ts b/lib/routes/leiphone/radar.ts deleted file mode 100644 index cbd2557a6..000000000 --- a/lib/routes/leiphone/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'leiphone.com': { - _name: '雷峰网', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/new-media#lei-feng-wang-zui-xin-wen-zhang', - source: ['/'], - target: '/leiphone', - }, - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#lei-feng-wang-lan-mu', - source: ['/category/:catename'], - target: '/leiphone/category/:catname', - }, - { - title: '业界资讯', - docs: 'https://docs.rsshub.app/routes/new-media#lei-feng-wang-ye-jie-zi-xun', - source: ['/'], - target: '/leiphone/newsflash', - }, - ], - }, -}; diff --git a/lib/routes/leiphone/router.ts b/lib/routes/leiphone/router.ts deleted file mode 100644 index 3dfcd3020..000000000 --- a/lib/routes/leiphone/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/newsflash', './newsflash'); - router.get('/:do?/:keyword?', './index'); -}; diff --git a/lib/routes/lemmy/index.ts b/lib/routes/lemmy/index.ts index 780134d7d..e638269b7 100644 --- a/lib/routes/lemmy/index.ts +++ b/lib/routes/lemmy/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,25 @@ import MarkdownIt from 'markdown-it'; const md = MarkdownIt({ html: true }); import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/:community/:sort?', + categories: ['social-media'], + example: '/lemmy/technology@lemmy.world/Hot', + parameters: { community: 'Lemmmy community, for example technology@lemmy.world', sort: 'Sort by, defaut to Active' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Community', + maintainers: ['wb14123'], + handler, +}; + +async function handler(ctx) { const sort = ctx.req.param('sort') ?? 'Active'; const community = ctx.req.param('community'); const communitySlices = community.split('@'); @@ -54,10 +73,10 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: `${community} - ${sort} posts`, description: communityData.description, link: communityData.actor_id, item: items, - }); -}; + }; +} diff --git a/lib/routes/lemmy/maintainer.ts b/lib/routes/lemmy/maintainer.ts deleted file mode 100644 index ff5cf937f..000000000 --- a/lib/routes/lemmy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:community/:sort?': ['wb14123'], -}; diff --git a/lib/routes/lemmy/namespace.ts b/lib/routes/lemmy/namespace.ts new file mode 100644 index 000000000..7bf2dc3db --- /dev/null +++ b/lib/routes/lemmy/namespace.ts @@ -0,0 +1,5 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Lemmy', +}; diff --git a/lib/routes/lemmy/router.ts b/lib/routes/lemmy/router.ts deleted file mode 100644 index 1f76acda1..000000000 --- a/lib/routes/lemmy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:community/:sort?', './index'); -}; diff --git a/lib/routes/lfsyd/home.ts b/lib/routes/lfsyd/home.ts index 473cb5c4a..f7af9ca93 100644 --- a/lib/routes/lfsyd/home.ts +++ b/lib/routes/lfsyd/home.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { ProcessForm, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/home', + categories: ['game'], + example: '/lfsyd/home', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.iyingdi.com/'], + }, + name: '首页', + maintainers: ['auto-bot-ty'], + handler, + url: 'www.iyingdi.com/', +}; + +async function handler() { const rootUrl = 'https://www.iyingdi.com'; const url = 'https://api.iyingdi.com/mweb/feed/recommend-content-list'; const form = { @@ -35,9 +58,9 @@ export default async (ctx) => { })); const items = await ProcessFeed(cache, articleList); - ctx.set('data', { + return { title: '首页 - 旅法师营地', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lfsyd/maintainer.ts b/lib/routes/lfsyd/maintainer.ts deleted file mode 100644 index 5290fa28f..000000000 --- a/lib/routes/lfsyd/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -// 旅法师营地 -export default { - '/home': ['auto-bot-ty'], - '/old_home': ['auto-bot-ty'], - '/user/:id?': ['auto-bot-ty'], - '/tag/:tagId?': ['auto-bot-ty'], -}; diff --git a/lib/routes/lfsyd/namespace.ts b/lib/routes/lfsyd/namespace.ts new file mode 100644 index 000000000..4a8080d49 --- /dev/null +++ b/lib/routes/lfsyd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '旅法师营地', + url: 'www.iyingdi.com', +}; diff --git a/lib/routes/lfsyd/old-home.ts b/lib/routes/lfsyd/old-home.ts index d36ede781..2d167ff1c 100644 --- a/lib/routes/lfsyd/old-home.ts +++ b/lib/routes/lfsyd/old-home.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/old_home', + categories: ['game'], + example: '/lfsyd/old_home', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.iyingdi.com/'], + }, + name: '首页(旧版)', + maintainers: ['auto-bot-ty'], + handler, + url: 'www.iyingdi.com/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ?? 10; const rootUrl = 'https://www.iyingdi.com'; const url = `${rootUrl}/feed/list/user/v3?feedIdUp=0&feedIdDown=0&hotfeed=1&system=web`; @@ -22,9 +45,9 @@ export default async (ctx) => { const items = await ProcessFeed(cache, articleList); - ctx.set('data', { + return { title: '旅法师营地 - 首页资讯(旧版)', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lfsyd/radar.ts b/lib/routes/lfsyd/radar.ts deleted file mode 100644 index 2a0f32c11..000000000 --- a/lib/routes/lfsyd/radar.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default { - 'iyingdi.com': { - _name: '旅法师营地', - www: [ - { - title: '分区', - docs: 'https://docs.rsshub.app/routes/game#lv-fa-shi-ying-di', - source: ['/tz/tag/:tagId'], - target: '/lfsyd/tag/:tagId', - }, - { - title: '用户发帖', - docs: 'https://docs.rsshub.app/routes/game#lv-fa-shi-ying-di', - source: ['/tz/people/:id', '/tz/people/:id/*'], - target: '/lfsyd/user/:id', - }, - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/game#lv-fa-shi-ying-di', - source: ['/'], - target: '/lfsyd/home', - }, - { - title: '首页(旧版)', - docs: 'https://docs.rsshub.app/routes/game#lv-fa-shi-ying-di', - source: ['/'], - target: '/lfsyd/old_home', - }, - ], - mob: [ - { - title: '分区(mob)', - docs: 'https://docs.rsshub.app/routes/game#lv-fa-shi-ying-di', - source: ['/fine/:tagId'], - target: '/lfsyd/tag/:tagId', - }, - ], - }, -}; diff --git a/lib/routes/lfsyd/router.ts b/lib/routes/lfsyd/router.ts deleted file mode 100644 index c438ca00a..000000000 --- a/lib/routes/lfsyd/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/home', './home'); - router.get('/old_home', './old-home'); - router.get('/user/:id?', './user'); - router.get('/tag/:tagId?', './tag'); -}; diff --git a/lib/routes/lfsyd/tag.ts b/lib/routes/lfsyd/tag.ts index bbb69cea9..23e1095af 100644 --- a/lib/routes/lfsyd/tag.ts +++ b/lib/routes/lfsyd/tag.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { ProcessForm, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tagId?', + radar: { + source: ['mob.iyingdi.com/fine/:tagId'], + target: '/tag/:tagId', + }, + name: 'Unknown', + maintainers: ['auto-bot-ty'], + handler, +}; + +async function handler(ctx) { const tagId = ctx.req.param('tagId'); const tagList = { 17: '炉石传说', @@ -57,9 +69,9 @@ export default async (ctx) => { const items = await ProcessFeed(cache, articleList); - ctx.set('data', { + return { title: `${tagName || tagJson[0].tag} - 旅法师营地 `, link: `${rootUrl}/tz/tag/${tagId}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/lfsyd/user.ts b/lib/routes/lfsyd/user.ts index ab809ddfc..12147e5ee 100644 --- a/lib/routes/lfsyd/user.ts +++ b/lib/routes/lfsyd/user.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { ProcessForm, ProcessFeed } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id?', + radar: { + source: ['www.iyingdi.com/tz/people/:id', 'www.iyingdi.com/tz/people/:id/*'], + target: '/user/:id', + }, + name: 'Unknown', + maintainers: ['auto-bot-ty'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.iyingdi.com'; const listUrl = 'https://api.iyingdi.com/web/user/event-list'; @@ -41,9 +53,9 @@ export default async (ctx) => { const items = await ProcessFeed(cache, articleList); - ctx.set('data', { + return { title: `${nickname} - 旅法师营地 `, link: `${rootUrl}/tz/people/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/lifeweek/channel.ts b/lib/routes/lifeweek/channel.ts index 6bd975acf..023e5e555 100644 --- a/lib/routes/lifeweek/channel.ts +++ b/lib/routes/lifeweek/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import getRssItem from './utils'; @@ -6,7 +7,18 @@ const rootApiUrl = 'https://www.lifeweek.com.cn/api/userWebFollow/getFollowTagCo const rootUrl = 'https://www.lifeweek.com.cn/column'; const articleRootUrl = 'https://www.lifeweek.com.cn/article'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id', + radar: { + source: ['lifeweek.com.cn/column/:channel'], + target: '/channel/:channel', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const channel = ctx.req.param('id'); const url = `${rootApiUrl}=${channel}`; const { data } = await got(url); @@ -18,9 +30,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: data.model.tagName, link: `${rootUrl}/${channel}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/lifeweek/maintainer.ts b/lib/routes/lifeweek/maintainer.ts deleted file mode 100644 index a31b7644b..000000000 --- a/lib/routes/lifeweek/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/channel/:channel': ['changren-wcr'], - '/tag/:tag': ['changren-wcr'], -}; diff --git a/lib/routes/lifeweek/namespace.ts b/lib/routes/lifeweek/namespace.ts new file mode 100644 index 000000000..f8d4e6ffc --- /dev/null +++ b/lib/routes/lifeweek/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '三联生活周刊', + url: 'lifeweek.com.cn', +}; diff --git a/lib/routes/lifeweek/radar.ts b/lib/routes/lifeweek/radar.ts deleted file mode 100644 index e1cbb6bda..000000000 --- a/lib/routes/lifeweek/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'lifeweek.com.cn': { - _name: '三联生活周刊', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-lian-sheng-huo-zhou-kan', - source: ['/column/:channel'], - target: '/lifeweek/channel/:channel', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-lian-sheng-huo-zhou-kan', - source: ['/articleList/:tag'], - target: '/lifeweek/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/lifeweek/router.ts b/lib/routes/lifeweek/router.ts deleted file mode 100644 index 0c0d9006d..000000000 --- a/lib/routes/lifeweek/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/channel/:id', './channel'); - router.get('/tag/:id', './tag'); -}; diff --git a/lib/routes/lifeweek/tag.ts b/lib/routes/lifeweek/tag.ts index d1bb6fa2e..98ed0c9d3 100644 --- a/lib/routes/lifeweek/tag.ts +++ b/lib/routes/lifeweek/tag.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import getRssItem from './utils'; @@ -5,7 +6,18 @@ const rootApiUrl = 'https://www.lifeweek.com.cn/api/userWebFollow/getFollowTagCo const rootUrl = 'https://www.lifeweek.com.cn/articleList'; const articleRootUrl = 'https://www.lifeweek.com.cn/article'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:id', + radar: { + source: ['lifeweek.com.cn/articleList/:tag'], + target: '/tag/:tag', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('id'); const url = `${rootApiUrl}=${tag}`; const { data } = await got(url); @@ -17,9 +29,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: data.model.tagName, link: `${rootUrl}/${tag}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/lightnovel/light-novel.ts b/lib/routes/lightnovel/light-novel.ts index 978671fe0..b2db0fdb2 100644 --- a/lib/routes/lightnovel/light-novel.ts +++ b/lib/routes/lightnovel/light-novel.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/:keywords/:security_key?', + radar: { + source: ['lightNovel.us/'], + target: '/:keywords/:security_key', + }, + name: 'Unknown', + maintainers: ['nightmare-mio'], + handler, + url: 'lightNovel.us/', +}; + +async function handler(ctx) { const baseUrl = 'https://www.lightnovel.us'; const { type, keywords, security_key = config.lightnovel.cookie } = ctx.req.param(); const { data: response } = await got({ @@ -55,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `轻之国度-追踪${keywords}更新-${type} `, link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lightnovel/maintainer.ts b/lib/routes/lightnovel/maintainer.ts deleted file mode 100644 index e00d75384..000000000 --- a/lib/routes/lightnovel/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:keywords/:security_key?': ['nightmare-mio'], -}; diff --git a/lib/routes/lightnovel/namespace.ts b/lib/routes/lightnovel/namespace.ts new file mode 100644 index 000000000..2f924cdd5 --- /dev/null +++ b/lib/routes/lightnovel/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '轻之国度', + url: 'lightNovel.us', +}; diff --git a/lib/routes/lightnovel/radar.ts b/lib/routes/lightnovel/radar.ts deleted file mode 100644 index 1e48e323f..000000000 --- a/lib/routes/lightnovel/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'lightNovel.us': { - _name: '轻之国度', - '.': [ - { - title: '文章更新阅读', - docs: 'https://docs.rsshub.app/routes/anime#qing-zhi-guo-du', - source: '/', - target: '/lightnovel/:keywords/:security_key', - }, - ], - }, -}; diff --git a/lib/routes/lightnovel/router.ts b/lib/routes/lightnovel/router.ts deleted file mode 100644 index a8d94b977..000000000 --- a/lib/routes/lightnovel/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:keywords/:security_key?', './light-novel'); -}; diff --git a/lib/routes/line/maintainer.ts b/lib/routes/line/maintainer.ts deleted file mode 100644 index cf13e2c59..000000000 --- a/lib/routes/line/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/today/:edition?/:tab?': ['nczitzk'], - '/today/:edition/publisher/:id': ['TonyRL'], -}; diff --git a/lib/routes/line/namespace.ts b/lib/routes/line/namespace.ts new file mode 100644 index 000000000..e19adfea2 --- /dev/null +++ b/lib/routes/line/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LINE', + url: 'today.line.me', +}; diff --git a/lib/routes/line/publisher.ts b/lib/routes/line/publisher.ts index 41c02ad40..b67f92557 100644 --- a/lib/routes/line/publisher.ts +++ b/lib/routes/line/publisher.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/today/:edition/publisher/:id', + categories: ['new-media'], + example: '/line/today/th/publisher/101048', + parameters: { edition: 'Edition, see table above', id: 'Channel ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['today.line.me/:edition/v2/publisher/:id'], + }, + name: 'TODAY - Channel', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { edition, id } = ctx.req.param(); const { data: publisherInfo } = await got(`${baseUrl}/webapi/portal/page/setting`, { @@ -44,11 +66,11 @@ export default async (ctx) => { const items = await parseItems(list, cache.tryGet); - ctx.set('data', { + return { title: `${publisherInfo.data.name} - Line Today`, description: publisherInfo.data.introduction, image: publisherInfo.data.icon ? `https://obs.line-scdn.net/${publisherInfo.data.icon.hash}` : undefined, link: `${baseUrl}/${edition}/v2/publisher/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/line/radar.ts b/lib/routes/line/radar.ts deleted file mode 100644 index 5fdc74ea7..000000000 --- a/lib/routes/line/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'line.me': { - _name: 'LINE', - today: [ - { - title: 'Today', - docs: 'https://docs.rsshub.app/routes/new-media#line-today', - source: ['/'], - target: '/line/today/:edition?/:tab?', - }, - { - title: 'Today - 频道', - docs: 'https://docs.rsshub.app/routes/new-media#line-today', - source: ['/:edition/v2/publisher/:id'], - target: '/line/today/:edition/publisher/:id', - }, - ], - }, -}; diff --git a/lib/routes/line/router.ts b/lib/routes/line/router.ts deleted file mode 100644 index dd852d9fc..000000000 --- a/lib/routes/line/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/today/:edition?/:tab?', './today'); - router.get('/today/:edition/publisher/:id', './publisher'); -}; diff --git a/lib/routes/line/today.ts b/lib/routes/line/today.ts index 84f50615c..2be4d8575 100644 --- a/lib/routes/line/today.ts +++ b/lib/routes/line/today.ts @@ -1,8 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl as rootUrl, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/today/:edition?/:tab?', + categories: ['new-media'], + example: '/line/today', + parameters: { edition: 'Edition, see below, Taiwan by default', tab: 'Tag, can be found in URL, `top` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['today.line.me/'], + }, + name: 'TODAY', + maintainers: ['nczitzk'], + handler, + url: 'today.line.me/', + description: `Edition + + | Taiwan | Thailand | Hong Kong | + | ------ | -------- | --------- | + | tw | th | hk |`, +}; + +async function handler(ctx) { const edition = ctx.req.param('edition') || 'tw'; const tab = ctx.req.param('tab') || 'top'; @@ -37,9 +65,9 @@ export default async (ctx) => { const items = await parseItems(list, cache.tryGet); - ctx.set('data', { + return { title: `${title} - Line Today`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/linkedin/cn/index.ts b/lib/routes/linkedin/cn/index.ts index 26ce2e389..1d5b92d81 100644 --- a/lib/routes/linkedin/cn/index.ts +++ b/lib/routes/linkedin/cn/index.ts @@ -1,13 +1,46 @@ +import { Route } from '@/types'; import { parseSearchHit, parseJobPosting } from './utils'; const siteUrl = 'https://www.linkedin.cn/incareer/jobs/search'; -export default async (ctx) => { +export const route: Route = { + path: '/cn/jobs/:keywords?', + categories: ['other'], + example: '/linkedin/cn/jobs/Software', + parameters: { keywords: '搜索关键字' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Jobs', + maintainers: ['bigfei'], + handler, + description: `另外,可以通过添加额外的以下 query 参数来输出满足特定要求的工作职位: + + | 参数 | 描述 | 举例 | 默认值 | + | ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- | + | \`geo\` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 | + | \`remote\` | 是否只显示远程工作 | \`true/false\` | \`false\` | + | \`location\` | 工作地点 | \`china/shanghai/beijing\` | 空 | + | \`relevant\` | 排序方式 (true: 按相关性排序,false: 按日期排序) | \`true/false\` | \`false\` | + | \`period\` | 发布时间 | \`1/7/30\` | 空 | + + 例如: + [\`/linkedin/cn/jobs/Software?location=shanghai&period=1\`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai\&period=1): 查找所有在上海的今日发布的所有 Software 工作 + + **为了方便起见,建议您在 [LinkedIn.cn](https://www.linkedin.cn/incareer/jobs/search) 上进行搜索,并使用 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 加载特定的 feed。**`, +}; + +async function handler(ctx) { const { title, jobs } = await parseSearchHit(ctx); const items = await Promise.all(jobs.map((job) => parseJobPosting(ctx, job))); - ctx.set('data', { + return { title: `领英 - ${title}`, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/linkedin/jobs.ts b/lib/routes/linkedin/jobs.ts index 8f1cdb41a..9cf1fb967 100644 --- a/lib/routes/linkedin/jobs.ts +++ b/lib/routes/linkedin/jobs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseJobSearch, KEYWORDS_QUERY_KEY, JOB_TYPES, JOB_TYPES_QUERY_KEY, EXP_LEVELS_QUERY_KEY, parseParamsToSearchParams, EXP_LEVELS, parseParamsToString } from './utils'; @@ -5,7 +6,43 @@ import { parseJobSearch, KEYWORDS_QUERY_KEY, JOB_TYPES, JOB_TYPES_QUERY_KEY, EXP const BASE_URL = 'https://www.linkedin.com/'; const JOB_SEARCH_PATH = '/jobs-guest/jobs/api/seeMoreJobPostings/search'; -export default async (ctx) => { +export const route: Route = { + path: '/jobs/:job_types/:exp_levels/:keywords?', + categories: ['other'], + example: '/linkedin/jobs/C-P/1/software engineer', + parameters: { job_types: "See the following table for details, use '-' as delimiter", exp_levels: "See the following table for details, use '-' as delimiter", keywords: 'keywords' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Jobs', + maintainers: [], + handler, + description: `#### \`job_types\` list + + | Full Time | Part Time | Contractor | All | + | --------- | --------- | ---------- | --- | + | F | P | C | all | + + #### \`exp_levels\` list + + | Intership | Entry Level | Associate | Mid-Senior Level | Director | All | + | --------- | ----------- | --------- | ---------------- | -------- | --- | + | 1 | 2 | 3 | 4 | 5 | all | + + For example: + + 1. If we want to search software engineer jobs of all levels and all job types, use \`/linkedin/jobs/all/all/software engineer\` + 2. If we want to search all entry level contractor/part time software engineer jobs, use \`/linkedin/jobs/P-C/2/software engineer\` + + **To make it easier, the recommended way is to start a search on [LinkedIn](https://www.linkedin.com/jobs/search) and use [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) to load the specific feed.**`, +}; + +async function handler(ctx) { const jobTypesParam = parseParamsToSearchParams(ctx.req.param('job_types'), JOB_TYPES); const expLevelsParam = parseParamsToSearchParams(ctx.req.param('exp_levels'), EXP_LEVELS); @@ -25,7 +62,7 @@ export default async (ctx) => { const jobTypes = parseParamsToString(ctx.req.param('job_types'), JOB_TYPES); const expLevels = parseParamsToString(ctx.req.param('exp_levels'), EXP_LEVELS); const feedTitle = 'LinkedIn Job Listing' + (jobTypes ? ` | Job Types: ${jobTypes}` : '') + (expLevels ? ` | Experience Levels: ${expLevels}` : '') + (ctx.req.param('keywords') ? ` | Keywords: ${ctx.req.param('keywords')}` : ''); - ctx.set('data', { + return { title: feedTitle, link: url, description: 'This feed gets LinkedIn job posts', @@ -40,5 +77,5 @@ export default async (ctx) => { link: job.link, // job source link }; }), - }); -}; + }; +} diff --git a/lib/routes/linkedin/maintainer.ts b/lib/routes/linkedin/maintainer.ts deleted file mode 100644 index c181d92f0..000000000 --- a/lib/routes/linkedin/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/cn/jobs/:keywords?': ['bigfei'], - '/jobs': ['BrandNewLifeJackie26'], -}; diff --git a/lib/routes/linkedin/namespace.ts b/lib/routes/linkedin/namespace.ts new file mode 100644 index 000000000..fb87f9995 --- /dev/null +++ b/lib/routes/linkedin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LinkedIn 领英中国', + url: 'linkedin.com', +}; diff --git a/lib/routes/linkedin/radar.ts b/lib/routes/linkedin/radar.ts deleted file mode 100644 index 429ef0cd4..000000000 --- a/lib/routes/linkedin/radar.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - 'linkedin.com': { - _name: 'LinkedIn', - '.': [ - { - title: 'Job Listing', - docs: 'https://docs.rsshub.app/routes/other#linkedin-jobs', - source: '/jobs/search/', - target: (params, url) => { - const searchParams = new URL(url).searchParams; - const parseRoute = (searchParam) => { - if (typeof searchParam !== 'string') { - return 'all'; - } - return searchParam.split(',').join('-'); - }; - return `/linkedin/jobs/${parseRoute(searchParams.get('f_JT'))}/${parseRoute(searchParams.get('f_E'))}/${searchParams.get('keywords') || ''}`; - }, - }, - ], - }, - 'linkedin.cn': { - _name: 'LinkedIn 领英中国', - '.': [ - { - title: 'Jobs', - docs: 'https://docs.rsshub.app/routes/other#linkedin-ling-ying-zhong-guo', - source: '/incareer/jobs/search', - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/linkedin/cn/jobs/${searchParams.get('keywords') || ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/linkedin/router.ts b/lib/routes/linkedin/router.ts deleted file mode 100644 index 861239182..000000000 --- a/lib/routes/linkedin/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/cn/jobs/:keywords?', './cn/index.js'); - router.get('/jobs/:job_types/:exp_levels/:keywords?', './jobs.js'); -}; diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.ts index 8d1d925fb..567144f5e 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import qs from 'query-string'; import { parseDate } from '@/utils/parse-date'; const baseURL = 'https://www.linkresearcher.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:params', + name: 'Unknown', + maintainers: ['yech1990'], + handler, +}; + +async function handler(ctx) { // parse params const params = ctx.req.param('params'); const query = qs.parse(params); @@ -57,12 +65,12 @@ export default async (ctx) => { author: item.authors === undefined ? '' : item.authors.join(', '), })); - ctx.set('data', { + return { title: `领研 | ${title}`, description: '领研是链接华人学者的人才及成果平台。领研为国内外高校、科研机构及科技企业提供科研人才招聘服务,也是青年研究者的职业发展指导及线上培训平台;研究者还可将自己的研究论文上传至领研,与超过五十万华人学者分享工作的最新进展。', image: 'https://www.linkresearcher.com/assets/images/logo-app.png', link: baseURL, item: out, - }); -}; + }; +} diff --git a/lib/routes/linkresearcher/maintainer.ts b/lib/routes/linkresearcher/maintainer.ts deleted file mode 100644 index 4818857d5..000000000 --- a/lib/routes/linkresearcher/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:params': ['yech1990'], -}; diff --git a/lib/routes/linkresearcher/namespace.ts b/lib/routes/linkresearcher/namespace.ts new file mode 100644 index 000000000..d779329b5 --- /dev/null +++ b/lib/routes/linkresearcher/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Link Research', + url: 'linkresearcher', +}; diff --git a/lib/routes/linkresearcher/radar.ts b/lib/routes/linkresearcher/radar.ts deleted file mode 100644 index 383ca047c..000000000 --- a/lib/routes/linkresearcher/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - linkresearcher: { - _name: '领研', - '.': [ - { - title: '论文', - docs: 'https://docs.rsshub.app/routes/study#ling-yan', - source: ['/theses', '/information', '/careers'], - target: (_, url) => { - const pathname = new URL(url).pathname; - const searchParams = new URL(url).searchParams; - return `/linkresearcher/theses/${pathname.replace('/', '')}${searchParams.has('filters.subject') ? `&subject=${searchParams.get('filters.subject')}` : ''}${ - searchParams.has('filters.columns') ? `&columns=${searchParams.get('filters.columns')}` : '' - }`; - }, - }, - ], - }, -}; diff --git a/lib/routes/linkresearcher/router.ts b/lib/routes/linkresearcher/router.ts deleted file mode 100644 index 735385dc2..000000000 --- a/lib/routes/linkresearcher/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:params', './index'); -}; diff --git a/lib/routes/linovelib/maintainer.ts b/lib/routes/linovelib/maintainer.ts deleted file mode 100644 index df15b52ad..000000000 --- a/lib/routes/linovelib/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/novel/:id': ['misakicoca'], -}; diff --git a/lib/routes/linovelib/namespace.ts b/lib/routes/linovelib/namespace.ts new file mode 100644 index 000000000..e2f0de1a6 --- /dev/null +++ b/lib/routes/linovelib/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '哩哔轻小说', + url: 'linovelib.com', +}; diff --git a/lib/routes/linovelib/novel.ts b/lib/routes/linovelib/novel.ts index b5eefcbcc..83f8cc070 100644 --- a/lib/routes/linovelib/novel.ts +++ b/lib/routes/linovelib/novel.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/novel/:id', + categories: ['reading'], + example: '/linovelib/novel/2547', + parameters: { id: '小说 id,对应书架开始阅读 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '小说更新', + maintainers: ['misakicoca'], + handler, +}; + +async function handler(ctx) { const response = await got(`https://www.linovelib.com/novel/${ctx.req.param('id')}/catalog`); const $ = load(response.data); @@ -23,11 +42,11 @@ export default async (ctx) => { .get(); items.reverse(); - ctx.set('data', { + return { title: `哩哔轻小说 - ${title}`, link: `https://www.linovelib.com/novel/${ctx.req.param('id')}/catalog`, description: title, language: 'zh', item: items, - }); -}; + }; +} diff --git a/lib/routes/linovelib/radar.ts b/lib/routes/linovelib/radar.ts deleted file mode 100644 index bf765e96e..000000000 --- a/lib/routes/linovelib/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'linovelib.com': { - _name: '哩哔轻小说', - '.': [ - { - title: '小说详情', - docs: 'https://docs.rsshub.app/routes/anime#linovelib', - source: ['/novel/:id'], - target: '/linovellib/novel/:id', - }, - ], - }, -}; diff --git a/lib/routes/linovelib/router.ts b/lib/routes/linovelib/router.ts deleted file mode 100644 index d688f0aca..000000000 --- a/lib/routes/linovelib/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/novel/:id', './novel'); -}; diff --git a/lib/routes/liquipedia/cs-matches.ts b/lib/routes/liquipedia/cs-matches.ts index aecebc81e..fe2eb27b6 100644 --- a/lib/routes/liquipedia/cs-matches.ts +++ b/lib/routes/liquipedia/cs-matches.ts @@ -1,7 +1,19 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/counterstrike/matches/:team', + radar: { + source: ['liquipedia.net/counterstrike/:id/Matches', 'liquipedia.net/dota2/:id'], + target: '/counterstrike/matches/:id', + }, + name: 'Unknown', + maintainers: ['CookiePieWw'], + handler, +}; + +async function handler(ctx) { const team = ctx.req.param('team'); const rootUrl = 'https://liquipedia.net'; @@ -38,9 +50,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `[Counter-Strike] ${team} Match Results From Liquipedia`, link: currentUrl, item: matches, - }); -}; + }; +} diff --git a/lib/routes/liquipedia/dota2-matches.ts b/lib/routes/liquipedia/dota2-matches.ts index 5638a7979..6f9002bae 100644 --- a/lib/routes/liquipedia/dota2-matches.ts +++ b/lib/routes/liquipedia/dota2-matches.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dota2/matches/:id', + categories: ['game'], + example: '/liquipedia/dota2/matches/Team_Aster', + parameters: { id: '战队名称,可在url中找到。例如:https://liquipedia.net/dota2/Team_Aster' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['liquipedia.net/dota2/:id'], + }, + name: 'Dota2 战队最近比赛结果', + maintainers: ['wzekin'], + handler, +}; + +async function handler(ctx) { const team = ctx.req.param('id'); const url = `https://liquipedia.net/dota2/${team}`; const response = await got({ @@ -15,7 +37,7 @@ export default async (ctx) => { const $ = load(data); const list = $('div.recent-matches > table > tbody > tr[style]'); - ctx.set('data', { + return { title: `Liquipedia Dota2 ${team} Matches`, link: url, item: list?.toArray().map((item) => { @@ -43,5 +65,5 @@ export default async (ctx) => { guid: url + dateTime, }; }), - }); -}; + }; +} diff --git a/lib/routes/liquipedia/maintainer.ts b/lib/routes/liquipedia/maintainer.ts deleted file mode 100644 index 64f73155e..000000000 --- a/lib/routes/liquipedia/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/counterstrike/matches/:team': ['CookiePieWw'], - '/dota2/matches/:id': ['wzekin'], -}; diff --git a/lib/routes/liquipedia/namespace.ts b/lib/routes/liquipedia/namespace.ts new file mode 100644 index 000000000..efb2f3fad --- /dev/null +++ b/lib/routes/liquipedia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Liquipedia', + url: 'liquipedia.net', +}; diff --git a/lib/routes/liquipedia/radar.ts b/lib/routes/liquipedia/radar.ts deleted file mode 100644 index 6705bddc7..000000000 --- a/lib/routes/liquipedia/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'liquipedia.net': { - _name: 'Liquipedia', - '.': [ - { - title: 'Counter Strike Match Results', - docs: 'https://docs.rsshub.app/routes/game#liquipedia', - source: ['/counterstrike/:id/Matches', '/dota2/:id'], - target: '/liquipedia/counterstrike/matches/:id', - }, - { - title: 'Dota2 战队最近比赛结果', - docs: 'https://docs.rsshub.app/routes/game#liquipedia', - source: ['/dota2/:id'], - target: '/liquipedia/dota2/matches/:id', - }, - ], - }, -}; diff --git a/lib/routes/liquipedia/router.ts b/lib/routes/liquipedia/router.ts deleted file mode 100644 index dd304b67b..000000000 --- a/lib/routes/liquipedia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/counterstrike/matches/:team', './cs-matches.js'); - router.get('/dota2/matches/:id', './dota2-matches.js'); -}; diff --git a/lib/routes/literotica/category.ts b/lib/routes/literotica/category.ts index 30125c243..d060f16ee 100644 --- a/lib/routes/literotica/category.ts +++ b/lib/routes/literotica/category.ts @@ -1,9 +1,20 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + radar: { + source: ['literotica.com/c/:category', 'literotica.com/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const rootUrl = 'https://www.literotica.com'; @@ -48,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/literotica/maintainer.ts b/lib/routes/literotica/maintainer.ts deleted file mode 100644 index d468c0467..000000000 --- a/lib/routes/literotica/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/new': ['nczitzk'], - '/category/:category': ['nczitzk'], -}; diff --git a/lib/routes/literotica/namespace.ts b/lib/routes/literotica/namespace.ts new file mode 100644 index 000000000..4d2f30bfc --- /dev/null +++ b/lib/routes/literotica/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Literotica', + url: 'literotica.com', +}; diff --git a/lib/routes/literotica/new.ts b/lib/routes/literotica/new.ts index 5130adc76..7e92bf572 100644 --- a/lib/routes/literotica/new.ts +++ b/lib/routes/literotica/new.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/new', + categories: ['reading'], + example: '/literotica/new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['literotica.com/'], + }, + name: 'New Stories', + maintainers: ['nczitzk'], + handler, + url: 'literotica.com/', +}; + +async function handler() { const rootUrl = 'https://www.literotica.com'; const currentUrl = `${rootUrl}/stories/new_submissions.php`; @@ -52,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/literotica/radar.ts b/lib/routes/literotica/radar.ts deleted file mode 100644 index 454ab5503..000000000 --- a/lib/routes/literotica/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'literotica.com': { - _name: 'Literotica', - '.': [ - { - title: 'New Stories', - docs: 'https://docs.rsshub.app/routes/reading#literotica-new-stories', - source: ['/'], - target: '/literotica/new', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/reading#literotica-category', - source: ['/c/:category', '/'], - target: '/literotica/category/:category', - }, - ], - }, -}; diff --git a/lib/routes/literotica/router.ts b/lib/routes/literotica/router.ts deleted file mode 100644 index fbf09e5c5..000000000 --- a/lib/routes/literotica/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/new', './new'); - router.get('/category/:category', './category'); -}; diff --git a/lib/routes/liulinblog/index.ts b/lib/routes/liulinblog/index.ts index 02f90e5f1..5556aa97a 100644 --- a/lib/routes/liulinblog/index.ts +++ b/lib/routes/liulinblog/index.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:params{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = ctx.req.param('params'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -84,7 +92,7 @@ export default async (ctx) => { const icon = $('link[rel="icon"]').prop('href'); const title = $('img.logo').prop('alt'); - ctx.set('data', { + return { item: items, title: `${title} - ${params ? $('h1.term-title').text().split('搜索到')[0] : '最新'}`, link: currentUrl, @@ -95,5 +103,5 @@ export default async (ctx) => { logo: icon, subtitle: $('p.term-description').text(), author: title, - }); -}; + }; +} diff --git a/lib/routes/liulinblog/itnews.ts b/lib/routes/liulinblog/itnews.ts index 4b6d2be02..bc627efc5 100644 --- a/lib/routes/liulinblog/itnews.ts +++ b/lib/routes/liulinblog/itnews.ts @@ -1,5 +1,13 @@ -export default (ctx) => { +import { Route } from '@/types'; +export const route: Route = { + path: '/itnews/:channel', + name: 'Unknown', + maintainers: [], + handler, +}; + +function handler(ctx) { const { channel } = ctx.req.param(); const redirectTo = `/liulinblog/${channel}`; ctx.redirect(redirectTo); -}; +} diff --git a/lib/routes/liulinblog/maintainer.ts b/lib/routes/liulinblog/maintainer.ts deleted file mode 100644 index 6b1de748d..000000000 --- a/lib/routes/liulinblog/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/itnews/:channel?': ['Fatpandac', 'nczitzk'], - '/kuaixun': ['Fatpandac', 'nczitzk'], - '/search/:keyword': ['nczitzk'], - '/series/:id': ['nczitzk'], - '/tag/:id': ['nczitzk'], - '/:channel?': ['nczitzk'], -}; diff --git a/lib/routes/liulinblog/namespace.ts b/lib/routes/liulinblog/namespace.ts new file mode 100644 index 000000000..7a707e8d4 --- /dev/null +++ b/lib/routes/liulinblog/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '木木博客', + url: 'liulinblog.com', +}; diff --git a/lib/routes/liulinblog/radar.ts b/lib/routes/liulinblog/radar.ts deleted file mode 100644 index afb4c91d3..000000000 --- a/lib/routes/liulinblog/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'liulinblog.com': { - _name: '木木博客', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/:channel', '/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/\.com(.*?)/)[1]; - - return `/liulinblog${path === '/' ? '' : path}`; - }, - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/tag/:id', '/'], - target: '/liulinblog/tag/:id', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/series/:id', '/'], - target: '/liulinblog/series/:id', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/search/:keyword', '/'], - target: '/liulinblog/search/:keyword', - }, - { - title: '60秒读懂世界', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/kuaixun', '/'], - target: '/liulinblog/kuaixun', - }, - { - title: '网络营销', - docs: 'https://docs.rsshub.app/routes/new-media#mu-mu-bo-ke', - source: ['/:channel', '/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/\.com(.*?)/)[1]; - - return `/liulinblog${path === '/' ? '' : path}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/liulinblog/router.ts b/lib/routes/liulinblog/router.ts deleted file mode 100644 index e886cec33..000000000 --- a/lib/routes/liulinblog/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/itnews/:channel', './itnews'); - router.get('/:params{.+}?', './'); -}; diff --git a/lib/routes/liveuamap/index.ts b/lib/routes/liveuamap/index.ts index 6b5cc5747..f77aa688a 100644 --- a/lib/routes/liveuamap/index.ts +++ b/lib/routes/liveuamap/index.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:region?', + categories: ['new-media'], + example: '/liveuamap', + parameters: { region: 'region 热点地区,默认为`ukraine`,其他选项见liveuamap.com的三级域名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['liveuamap.com/:region*'], + target: '/:region', + }, + name: '实时消息', + maintainers: ['CoderSherlock'], + handler, +}; + +async function handler(ctx) { const region = ctx.req.param('region') ?? 'ukraine'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; if (!isValidHost(region)) { @@ -29,9 +52,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Liveuamap - ${region}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/liveuamap/maintainer.ts b/lib/routes/liveuamap/maintainer.ts deleted file mode 100644 index 713b03738..000000000 --- a/lib/routes/liveuamap/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:region?': ['CoderSherlock'], -}; diff --git a/lib/routes/liveuamap/namespace.ts b/lib/routes/liveuamap/namespace.ts new file mode 100644 index 000000000..7a8c467d8 --- /dev/null +++ b/lib/routes/liveuamap/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Live Universal Awareness Map', + url: 'liveuamap.com', +}; diff --git a/lib/routes/liveuamap/radar.ts b/lib/routes/liveuamap/radar.ts deleted file mode 100644 index d2baf7c7b..000000000 --- a/lib/routes/liveuamap/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'liveuamap.com': { - _name: 'Live Universal Awareness Map', - '.': [ - { - title: 'Region', - docs: 'https://docs.rsshub.app/routes/new-media#live-universal-awareness-map', - source: ['/:region*'], - target: '/liveuamap/:region', - }, - ], - }, -}; diff --git a/lib/routes/liveuamap/router.ts b/lib/routes/liveuamap/router.ts deleted file mode 100644 index 9e26b6b5a..000000000 --- a/lib/routes/liveuamap/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:region?', './'); -}; diff --git a/lib/routes/lkong/forum.ts b/lib/routes/lkong/forum.ts index af9586348..f76ddb52b 100644 --- a/lib/routes/lkong/forum.ts +++ b/lib/routes/lkong/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,17 @@ import * as path from 'node:path'; import { viewForum, viewThread } from './query'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id?/:digest?', + radar: { + source: ['lkong.com/forum/:id', 'lkong.com/'], + }, + name: 'Unknown', + maintainers: ['nczitzk', 'ma6254'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '8'; const digest = ctx.req.param('digest'); @@ -50,10 +61,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${response.data.data.forum.name} - 龙空`, link: currentUrl, item: items, description: response.data.data.forumCount.info, - }); -}; + }; +} diff --git a/lib/routes/lkong/maintainer.ts b/lib/routes/lkong/maintainer.ts deleted file mode 100644 index f204ae86c..000000000 --- a/lib/routes/lkong/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/forum/:id?/:digest?': ['nczitzk', 'ma6254'], - '/thread/:id': ['nczitzk', 'ma6254'], -}; diff --git a/lib/routes/lkong/namespace.ts b/lib/routes/lkong/namespace.ts new file mode 100644 index 000000000..bbcfaa9dd --- /dev/null +++ b/lib/routes/lkong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '龙空', + url: 'lkong.com', +}; diff --git a/lib/routes/lkong/radar.ts b/lib/routes/lkong/radar.ts deleted file mode 100644 index 365be2d53..000000000 --- a/lib/routes/lkong/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'lkong.com': { - _name: '龙空', - '.': [ - { - title: '分区', - docs: 'https://docs.rsshub.app/routes/bbs#long-kong-fen-qu', - source: ['/forum/:id', '/'], - target: '/lkong/forum/:id?/:digest?', - }, - { - title: '帖子', - docs: 'https://docs.rsshub.app/routes/bbs#long-kong-tie-zi', - source: ['/thread/:id', '/'], - target: '/lkong/thread/:id', - }, - ], - }, -}; diff --git a/lib/routes/lkong/router.ts b/lib/routes/lkong/router.ts deleted file mode 100644 index c80cdc326..000000000 --- a/lib/routes/lkong/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/forum/:id?/:digest?', './forum'); - router.get('/thread/:id', './thread'); -}; diff --git a/lib/routes/lkong/thread.ts b/lib/routes/lkong/thread.ts index 9bae138c7..0181a6602 100644 --- a/lib/routes/lkong/thread.ts +++ b/lib/routes/lkong/thread.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,17 @@ import * as path from 'node:path'; import { viewThread, countReplies } from './query'; -export default async (ctx) => { +export const route: Route = { + path: '/thread/:id', + radar: { + source: ['lkong.com/thread/:id', 'lkong.com/'], + }, + name: 'Unknown', + maintainers: ['nczitzk', 'ma6254'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.lkong.com'; @@ -52,9 +63,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `${response.data.data.thread.title} - 龙空`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lofter/maintainer.ts b/lib/routes/lofter/maintainer.ts deleted file mode 100644 index bd7a9e39c..000000000 --- a/lib/routes/lofter/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tag/:name?/:type?': ['hoilc', 'nczitzk'], - '/user/:name?': ['hondajojo', 'nczitzk'], -}; diff --git a/lib/routes/lofter/namespace.ts b/lib/routes/lofter/namespace.ts new file mode 100644 index 000000000..a3d67187f --- /dev/null +++ b/lib/routes/lofter/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Lofter', + url: 'www.lofter.com', +}; diff --git a/lib/routes/lofter/radar.ts b/lib/routes/lofter/radar.ts deleted file mode 100644 index d94ac06ff..000000000 --- a/lib/routes/lofter/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'lofter.com': { - _name: 'Lofter', - www: [ - { - title: '话题 (标签)', - docs: 'https://docs.rsshub.app/routes/social-media#lofter', - source: ['/tag/:name', '/tag/:name/:type'], - target: (params) => `/lofter/tag/${params.name}/${params.type || ''}`, - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#lofter', - }, - ], - }, -}; diff --git a/lib/routes/lofter/router.ts b/lib/routes/lofter/router.ts deleted file mode 100644 index 0c9af6846..000000000 --- a/lib/routes/lofter/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/tag/:name?/:type?', './tag'); - router.get('/user/:name?', './user'); -}; diff --git a/lib/routes/lofter/tag.ts b/lib/routes/lofter/tag.ts index d1466cfd5..684e7069e 100644 --- a/lib/routes/lofter/tag.ts +++ b/lib/routes/lofter/tag.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { JSDOM } from 'jsdom'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:name?/:type?', + categories: ['social-media'], + example: '/lofter/tag/cosplay/date', + parameters: { name: 'tag name, such as `名侦探柯南`, `摄影` by default', type: 'ranking type, see below, new by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Tag', + maintainers: ['hoilc', 'nczitzk'], + handler, + description: `| new | date | week | month | total | + | ---- | ---- | ---- | ----- | ----- | + | 最新 | 日榜 | 周榜 | 月榜 | 总榜 |`, +}; + +async function handler(ctx) { const name = ctx.req.param('name') ?? '摄影'; const type = ctx.req.param('type') ?? 'new'; const pageSize = 20; @@ -86,9 +108,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${name} - ${title} | LOFTER`, link: linkUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/lofter/user.ts b/lib/routes/lofter/user.ts index 81716427b..7ccdfd3ee 100644 --- a/lib/routes/lofter/user.ts +++ b/lib/routes/lofter/user.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:name?', + categories: ['social-media'], + example: '/lofter/user/i', + parameters: { name: 'Lofter user name, can be found in the URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User', + maintainers: ['hondajojo', 'nczitzk'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name') ?? 'i'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : '50'; if (!isValidHost(name)) { @@ -52,10 +71,10 @@ export default async (ctx) => { category: item.post.tag.split(','), })); - ctx.set('data', { + return { title: `${items[0].author} | LOFTER`, link: rootUrl, item: items, description: response.data.response.posts[0].post.blogInfo.selfIntro, - }); -}; + }; +} diff --git a/lib/routes/logclub/index.ts b/lib/routes/logclub/index.ts index f3c25e97b..16661d1de 100644 --- a/lib/routes/logclub/index.ts +++ b/lib/routes/logclub/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'news' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 11; @@ -120,7 +128,7 @@ export default async (ctx) => { const subtitle = $('meta[name="keywords"]').prop('content'); const author = subtitle.split(/,/)[0]; - ctx.set('data', { + return { item: items, title: $('title').text().split(/-/)[0].trim(), link: currentUrl, @@ -133,5 +141,5 @@ export default async (ctx) => { author, itunes_author: author, itunes_category: 'News', - }); -}; + }; +} diff --git a/lib/routes/logclub/maintainer.ts b/lib/routes/logclub/maintainer.ts deleted file mode 100644 index d44333b81..000000000 --- a/lib/routes/logclub/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/company/:id': ['nczitzk'], - '/columnist/articleList/:id': ['nczitzk'], - '/lc_report/:id?': ['nczitzk'], - '/news/:id?': ['nczitzk'], - '/original': ['nczitzk'], - '/recruit': ['nczitzk'], - '/tender': ['nczitzk'], -}; diff --git a/lib/routes/logclub/namespace.ts b/lib/routes/logclub/namespace.ts new file mode 100644 index 000000000..04bc1e968 --- /dev/null +++ b/lib/routes/logclub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '罗戈网', + url: 'logclub.com', +}; diff --git a/lib/routes/logclub/radar.ts b/lib/routes/logclub/radar.ts deleted file mode 100644 index 542a30167..000000000 --- a/lib/routes/logclub/radar.ts +++ /dev/null @@ -1,139 +0,0 @@ -export default { - 'logclub.com': { - _name: '罗戈网', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/:id', '/news'], - target: (params) => { - const id = params.id; - - return `/logclub/news${id ? `/${id}` : ''}`; - }, - }, - { - title: '资讯 - 供应链', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/10-16'], - target: '/logclub/news/10-16', - }, - { - title: '资讯 - 快递', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/11'], - target: '/logclub/news/11', - }, - { - title: '资讯 - 快运/运输', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/30'], - target: '/logclub/news/30', - }, - { - title: '资讯 - 仓储/地产', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/9'], - target: '/logclub/news/9', - }, - { - title: '资讯 - 物流综合', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/32'], - target: '/logclub/news/32', - }, - { - title: '资讯 - 国际与跨境物流', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/114'], - target: '/logclub/news/114', - }, - { - title: '资讯 - 科技创新', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/107'], - target: '/logclub/news/107', - }, - { - title: '资讯 - 绿色供应链', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/213'], - target: '/logclub/news/213', - }, - { - title: '资讯 - 低碳物流', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/214'], - target: '/logclub/news/214', - }, - { - title: '资讯 - 碳中和碳达峰', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zi-xun', - source: ['/news/215'], - target: '/logclub/news/215', - }, - { - title: '招聘', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zhao-pin', - source: ['/recruit'], - target: '/logclub/recruit', - }, - { - title: '报告', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-bao-gao', - source: ['/lc_report'], - target: (params, url, document) => { - const id = document - ?.querySelector('li.layui-this[id]') - ?.id?.replace(/_/g, ' ') - .replaceAll(/\b\w/g, (c) => c.toUpperCase()) - .replaceAll(/\s/g, ''); - - return `/logclub/lc_report${id ? `/${id}` : ''}`; - }, - }, - { - title: '报告 - 罗戈研究出品', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-bao-gao', - source: ['/lc_report'], - target: '/logclub/lc_report/Report', - }, - { - title: '报告 - 物流报告', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-bao-gao', - source: ['/lc_report'], - target: '/logclub/lc_report/IndustryReport', - }, - { - title: '报告 - 绿色双碳报告', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-bao-gao', - source: ['/lc_report'], - target: '/logclub/lc_report/GreenDualCarbonReport', - }, - { - title: '招投标', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zhao-tou-biao', - source: ['/tender'], - target: '/logclub/tender', - }, - { - title: '原创', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zhao-yuan-chuang', - source: ['/original'], - target: '/logclub/original', - }, - { - title: '大企业', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zhao-da-qi-ye', - source: ['/company/:id'], - target: '/logclub/company/:id', - }, - { - title: '专家说', - docs: 'https://docs.rsshub.app/routes/new-media#luo-ge-wang-zhao-zhuan-jia-shuo', - source: ['/columnist/articleList/:id'], - target: '/logclub/columnist/articleList/:id', - }, - ], - }, -}; diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index bdc276147..0959d46bb 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/lc_report/:id?', '/report/:id?'], + categories: ['new-media'], + example: '/logclub/lc_report', + parameters: { id: '报告 id,见下表,默认为罗戈研究出品' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '报告', + maintainers: ['nczitzk'], + handler, + description: `| 罗戈研究出品 | 物流报告 | 绿色双碳报告 | + | ------------ | -------------- | --------------------- | + | Report | IndustryReport | GreenDualCarbonReport |`, +}; + +async function handler(ctx) { const { id = 'Report' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 11; @@ -87,7 +109,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; const subtitle = $('meta[name="keywords"]').prop('content'); - ctx.set('data', { + return { item: items, title: `${$('title').text()}${title}`, link: currentUrl, @@ -98,5 +120,5 @@ export default async (ctx) => { logo: icon, subtitle: subtitle.replaceAll(',', ''), author: subtitle.split(/,/)[0], - }); -}; + }; +} diff --git a/lib/routes/logclub/router.ts b/lib/routes/logclub/router.ts deleted file mode 100644 index f5a943ffc..000000000 --- a/lib/routes/logclub/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/lc_report/:id?', './report'); - router.get('/report/:id?', './report'); - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/logonews/index.ts b/lib/routes/logonews/index.ts index 9d9da2545..7a11964cb 100644 --- a/lib/routes/logonews/index.ts +++ b/lib/routes/logonews/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,21 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/work/tags/:tag', '/tag/:tag', '*'], + radar: { + source: ['logonews.cn/work/tags/:tag'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', + 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)。`, + url: 'logonews.cn/work', +}; + +async function handler(ctx) { const params = getSubPath(ctx); const isWork = params.indexOf('/work') === 0; @@ -73,9 +88,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/logonews/maintainer.ts b/lib/routes/logonews/maintainer.ts deleted file mode 100644 index 00fbe9633..000000000 --- a/lib/routes/logonews/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/work/tags/:tag': ['nczitzk'], - '/work/categorys/:category': ['nczitzk'], - '/work': ['nczitzk'], - '/category/:category/:type': ['nczitzk'], - '/tag/:tag': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/logonews/namespace.ts b/lib/routes/logonews/namespace.ts new file mode 100644 index 000000000..c526370d1 --- /dev/null +++ b/lib/routes/logonews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LogoNews 标志情报局', + url: 'logonews.cn', +}; diff --git a/lib/routes/logonews/radar.ts b/lib/routes/logonews/radar.ts deleted file mode 100644 index d3328829d..000000000 --- a/lib/routes/logonews/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'logonews.cn': { - _name: 'LogoNews 标志情报局', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-shou-ye', - source: ['/'], - target: '/logonews', - }, - { - title: '文章分类', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-wen-zhang-fen-lei', - source: ['/category/:category/:type?'], - target: '/logonews/category/:category/:type?', - }, - { - title: '文章标签', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-wen-zhang-biao-qian', - source: ['/tag/:tag'], - target: '/logonews/tag/:tag', - }, - { - title: '作品', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-zuo-pin', - source: ['/work'], - target: '/logonews/work', - }, - { - title: '作品分类', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-zuo-pin-fen-lei', - source: ['/work/categorys/:category'], - target: '/logonews/work/categorys/:category', - }, - { - title: '作品标签', - docs: 'https://docs.rsshub.app/routes/design#logonews-biao-zhi-qing-bao-ju-zuo-pin-biao-qian', - source: ['/work/tags/:tag'], - target: '/logonews/work/tags/:tag', - }, - ], - }, -}; diff --git a/lib/routes/logonews/router.ts b/lib/routes/logonews/router.ts deleted file mode 100644 index 8b9944493..000000000 --- a/lib/routes/logonews/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/work/tags/:tag', './index'); - router.get('/tag/:tag', './index'); - router.get('*', './index'); -}; diff --git a/lib/routes/loltw/maintainer.ts b/lib/routes/loltw/maintainer.ts deleted file mode 100644 index cc5be0bea..000000000 --- a/lib/routes/loltw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['hoilc'], -}; diff --git a/lib/routes/loltw/namespace.ts b/lib/routes/loltw/namespace.ts new file mode 100644 index 000000000..f4e202a56 --- /dev/null +++ b/lib/routes/loltw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '英雄联盟', + url: 'lol.garena.tw', +}; diff --git a/lib/routes/loltw/news.ts b/lib/routes/loltw/news.ts index 2a391fc59..5a1bc4370 100644 --- a/lib/routes/loltw/news.ts +++ b/lib/routes/loltw/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['game'], + example: '/loltw/news', + parameters: { category: '新闻分类,置空为全部新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '台服新闻', + maintainers: ['hoilc'], + handler, + description: `| 活动 | 资讯 | 系统 | 电竞 | 版本资讯 | 战棋资讯 | + | ----- | ---- | ------ | ------ | -------- | -------- | + | event | info | system | esport | patch | TFTpatch |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const baseUrl = 'https://lol.garena.tw'; @@ -32,9 +54,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '英雄联盟 - 台服新闻', link: category ? `${baseUrl}/news/${category}` : `${baseUrl}/news`, item: items, - }); -}; + }; +} diff --git a/lib/routes/loltw/radar.ts b/lib/routes/loltw/radar.ts deleted file mode 100644 index 9042ff5ea..000000000 --- a/lib/routes/loltw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'garena.tw': { - _name: 'Garena', - lol: [ - { - title: '英雄联盟台服新闻', - docs: 'https://docs.rsshub.app/routes/game#ying-xiong-lian-meng-tai-fu-xin-wen', - source: ['/news/:category', '/news'], - target: (params) => '/loltw/news/' + (params.category || ''), - }, - ], - }, -}; diff --git a/lib/routes/loltw/router.ts b/lib/routes/loltw/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/loltw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/lovelive-anime/maintainer.ts b/lib/routes/lovelive-anime/maintainer.ts deleted file mode 100644 index 91ac53dc8..000000000 --- a/lib/routes/lovelive-anime/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/news/:option?': ['axojhf'], - '/topics/:abbr/:category?/:option?': ['axojhf'], - '/schedules/:serie/:category?': ['axojhf'], -}; diff --git a/lib/routes/lovelive-anime/namespace.ts b/lib/routes/lovelive-anime/namespace.ts new file mode 100644 index 000000000..74afe629c --- /dev/null +++ b/lib/routes/lovelive-anime/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'lovelive-anime', + url: 'www.lovelive-anime.jp', +}; diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.ts index 5cf534e07..2fbcb28a1 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,30 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); -export default async (ctx) => { +export const route: Route = { + path: '/news/:option?', + categories: ['anime'], + example: '/lovelive-anime/news', + parameters: { option: 'Crawl full text when `option` is `detail`.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.lovelive-anime.jp/', 'www.lovelive-anime.jp/news'], + target: '/news', + }, + name: 'Love Live! Official Website Latest NEWS', + maintainers: ['axojhf'], + handler, + url: 'www.lovelive-anime.jp/', +}; + +async function handler(ctx) { const rootUrl = 'https://www.lovelive-anime.jp/news/'; const response = await got(rootUrl); @@ -52,9 +76,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: 'lovelive official website news', link: 'https://www.lovelive-anime.jp/news/', item: items, - }); -}; + }; +} diff --git a/lib/routes/lovelive-anime/radar.ts b/lib/routes/lovelive-anime/radar.ts deleted file mode 100644 index 904fd0e21..000000000 --- a/lib/routes/lovelive-anime/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'lovelive-anime.jp': { - _name: 'Love Live 官网', - www: [ - { - title: '最新 NEWS', - docs: 'https://docs.rsshub.app/routes/anime#lovelive-anime-love-live-guan-wang-zui-xin-news', - source: ['/', '/news'], - target: '/lovelive-anime/news', - }, - { - title: '分类 Topics', - docs: 'https://docs.rsshub.app/routes/anime#lovelive-anime-love-live-guan-wang-fen-lei-topics', - source: ['/:abbr/topics/', '/:abbr/topics.php'], - target: (params, url) => { - const cat = url.match(/\?cat=(.*)/); - return `/lovelive-anime/topics/${params.abbr}/${null !== cat && cat.length === 2 ? cat[1] : ''}`; - }, - }, - { - title: 'Schedule', - docs: 'https://docs.rsshub.app/routes/anime#lovelive-anime-love-live-guan-wang-schedule', - source: ['/schedule/'], - target: (params, url) => { - const cat = url.match(/\?series=(.*)&category=(.*)/); - return `/lovelive-anime/schedules/${null !== cat && cat.length >= 2 ? cat[1] : ''}/${null !== cat && cat.length === 3 ? cat[2] : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/lovelive-anime/router.ts b/lib/routes/lovelive-anime/router.ts deleted file mode 100644 index e9d193c7e..000000000 --- a/lib/routes/lovelive-anime/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/news/:option?', './news'); - router.get('/topics/:abbr/:category?/:option?', './topics'); - router.get('/schedules/:serie?/:category?', './schedules'); -}; diff --git a/lib/routes/lovelive-anime/schedules.ts b/lib/routes/lovelive-anime/schedules.ts index 50a63d910..e76a0fe16 100644 --- a/lib/routes/lovelive-anime/schedules.ts +++ b/lib/routes/lovelive-anime/schedules.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import timezone from 'dayjs/plugin/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/schedules/:serie?/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { dayjs.extend(utc); dayjs.extend(timezone); const serie = ctx.req.param('serie'); @@ -49,11 +57,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${category} - ${serie} - Love Live Official Website Schedule`, link: 'https://www.lovelive-anime.jp/schedule/', item: items, description: 'The schedule date and other information shall be subject to the announcement on the official website. The RSS route has not been strictly tested, and the captured information cannot be guaranteed to be correct.', - }); -}; + }; +} diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index 1d7ff3443..a6e009e73 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,36 @@ import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); -export default async (ctx) => { +export const route: Route = { + path: '/topics/:abbr/:category?/:option?', + categories: ['anime'], + example: '/lovelive-anime/topics/otonokizaka', + parameters: { + abbr: 'The path to the Love Live series of sub-projects on the official website is detailed in the table below', + category: 'The official website lists the Topics category, `category` is `detail` when crawling the full text, other categories see the following table for details', + option: 'Crawl full text when `option` is `detail`.', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Love Live Official Website Categories Topics', + maintainers: ['axojhf'], + handler, + description: `| Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | + | -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- | + | \`abbr\`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical | + + | Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン | + | ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | + | \`category\`parameter | *No parameter* | music | anime\_movie | cast\_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign |`, +}; + +async function handler(ctx) { const abbr = ctx.req.param('abbr'); const rootUrl = `https://www.lovelive-anime.jp/${abbr}`; const topicsUrlPart = 'yuigaoka' === abbr ? 'topics/' : 'topics.php'; @@ -75,9 +105,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `${categoryName} - ${abbrDetail[abbr]} - Love Live Official Website Topics`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/lsnu/jiaowc/tzgg.ts b/lib/routes/lsnu/jiaowc/tzgg.ts index b18930ab7..3179be7d6 100644 --- a/lib/routes/lsnu/jiaowc/tzgg.ts +++ b/lib/routes/lsnu/jiaowc/tzgg.ts @@ -1,8 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/jiaowc/tzgg/:category?', + categories: ['university'], + example: '/lsnu/jiaowc/tzgg', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lsnu.edu.cn/'], + target: '/jiaowc/tzgg', + }, + name: '教学部通知公告', + maintainers: ['nyaShine'], + handler, + url: 'lsnu.edu.cn/', + description: `| 实践教学科 | 教育运行科 | 教研教改科 | 学籍管理科 | 考试科 | 教材建设管理科 | + | ---------- | ---------- | ---------- | ---------- | ------ | -------------- | + | sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const url = category ? `https://jiaowc.lsnu.edu.cn/tzgg/${category}.htm` : 'https://jiaowc.lsnu.edu.cn/tzgg.htm'; @@ -45,9 +72,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '乐山师范学院教学部通知公告', link: 'https://jiaowc.lsnu.edu.cn/tzgg.htm', item: out, - }); -}; + }; +} diff --git a/lib/routes/lsnu/maintainer.ts b/lib/routes/lsnu/maintainer.ts deleted file mode 100644 index a068c5384..000000000 --- a/lib/routes/lsnu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jiaowc/tzgg/:category?': ['nyaShine'], -}; diff --git a/lib/routes/lsnu/namespace.ts b/lib/routes/lsnu/namespace.ts new file mode 100644 index 000000000..b5615d228 --- /dev/null +++ b/lib/routes/lsnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '乐山师范学院', + url: 'lsnu.edu.cn', +}; diff --git a/lib/routes/lsnu/radar.ts b/lib/routes/lsnu/radar.ts deleted file mode 100644 index 998c782e8..000000000 --- a/lib/routes/lsnu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'lsnu.edu.cn': { - _name: '乐山师范学院', - '.': [ - { - title: '教学部通知公告', - docs: 'https://docs.rsshub.app/routes/university#le-shan-shi-fan-xue-yuan', - source: ['/'], - target: '/lsnu/jiaowc/tzgg', - }, - ], - }, -}; diff --git a/lib/routes/lsnu/router.ts b/lib/routes/lsnu/router.ts deleted file mode 100644 index 367f97d1a..000000000 --- a/lib/routes/lsnu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jiaowc/tzgg/:category?', './jiaowc/tzgg'); -}; diff --git a/lib/routes/luogu/contest.ts b/lib/routes/luogu/contest.ts index b93b1cdd5..bcb811c6e 100644 --- a/lib/routes/luogu/contest.ts +++ b/lib/routes/luogu/contest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -26,7 +27,29 @@ const typeMap = { // }, }; -export default async (ctx) => { +export const route: Route = { + path: '/contest', + categories: ['programming'], + example: '/luogu/contest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['luogu.com.cn/contest/list', 'luogu.com.cn/'], + }, + name: '比赛列表', + maintainers: ['prnake'], + handler, + url: 'luogu.com.cn/contest/list', +}; + +async function handler() { const link = `${baseUrl}/contest/list`; const { data: response } = await got(link); const $ = load(response); @@ -65,10 +88,10 @@ export default async (ctx) => { result.push(item); } - ctx.set('data', { + return { title: $('head title').text(), link, image: 'https://www.luogu.com.cn/favicon.ico', item: result, - }); -}; + }; +} diff --git a/lib/routes/luogu/daily.ts b/lib/routes/luogu/daily.ts index 1413a1b85..84466ce75 100644 --- a/lib/routes/luogu/daily.ts +++ b/lib/routes/luogu/daily.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/daily/:id?', + categories: ['programming'], + example: '/luogu/daily', + parameters: { id: '年度日报所在帖子 id,可在 URL 中找到,不填默认为 `47327`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['luogu.com.cn/discuss/47327', 'luogu.com.cn/'], + target: '/daily', + }, + name: '日报', + maintainers: ['LogicJake ', 'prnake ', 'nczitzk'], + handler, + url: 'luogu.com.cn/discuss/47327', +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 47327; const link = `https://www.luogu.com.cn/discuss/${id}`; const response = await got(link); @@ -30,9 +54,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: '洛谷日报', link, item, - }); -}; + }; +} diff --git a/lib/routes/luogu/maintainer.ts b/lib/routes/luogu/maintainer.ts deleted file mode 100644 index bef5f95a8..000000000 --- a/lib/routes/luogu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/contest': ['prnake'], - '/daily/:id?': ['LogicJake ', 'prnake ', 'nczitzk'], - '/user/feed/:uid': ['solstice23'], - '/user/blog/:username': ['ftiasch'], -}; diff --git a/lib/routes/luogu/namespace.ts b/lib/routes/luogu/namespace.ts new file mode 100644 index 000000000..b5232799b --- /dev/null +++ b/lib/routes/luogu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '洛谷', + url: 'luogu.com.cn', +}; diff --git a/lib/routes/luogu/radar.ts b/lib/routes/luogu/radar.ts deleted file mode 100644 index aae0995df..000000000 --- a/lib/routes/luogu/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'luogu.com.cn': { - _name: '洛谷', - '.': [ - { - title: '日报', - docs: 'https://docs.rsshub.app/routes/programming#luo-gu', - source: ['/discuss/47327', '/'], - target: '/luogu/daily', - }, - { - title: '比赛列表', - docs: 'https://docs.rsshub.app/routes/programming#luo-gu', - source: ['/contest/list', '/'], - target: '/luogu/contest', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/programming#luo-gu', - source: ['/user/:uid'], - target: '/luogu/user/feed/:uid', - }, - { - title: '用户博客', - docs: 'https://docs.rsshub.app/routes/programming#luo-gu', - source: ['/blog/:name'], - target: '/luogu/user/blog/:name', - }, - ], - }, -}; diff --git a/lib/routes/luogu/router.ts b/lib/routes/luogu/router.ts deleted file mode 100644 index 6c72d7106..000000000 --- a/lib/routes/luogu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/contest', './contest'); - router.get('/daily/:id?', './daily'); - router.get('/user/feed/:uid', './user-feed'); - router.get('/user/blog/:name', './user-blog'); -}; diff --git a/lib/routes/luogu/user-blog.ts b/lib/routes/luogu/user-blog.ts index 49c4e708d..bfd698172 100644 --- a/lib/routes/luogu/user-blog.ts +++ b/lib/routes/luogu/user-blog.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/user/blog/:name', + categories: ['programming'], + example: '/luogu/user/blog/ftiasch', + parameters: { name: '博客名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['luogu.com.cn/blog/:name'], + }, + name: '用户博客', + maintainers: [], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const blogBaseUrl = `https://www.luogu.com.cn/blog/${name}/`; @@ -41,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: blogTitle, link: blogBaseUrl, item, - }); -}; + }; +} diff --git a/lib/routes/luogu/user-feed.ts b/lib/routes/luogu/user-feed.ts index ca5abb567..6461081ab 100644 --- a/lib/routes/luogu/user-feed.ts +++ b/lib/routes/luogu/user-feed.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt(); -export default async (ctx) => { +export const route: Route = { + path: '/user/feed/:uid', + categories: ['programming'], + example: '/luogu/user/feed/1', + parameters: { uid: '用户 UID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['luogu.com.cn/user/:uid'], + }, + name: '用户动态', + maintainers: ['solstice23'], + handler, +}; + +async function handler(ctx) { const getUsernameFromUID = (uid) => cache.tryGet('luogu:username:' + uid, async () => { const { data } = await got(`https://www.luogu.com.cn/user/${uid}?_contentOnly=1`); @@ -17,7 +39,7 @@ export default async (ctx) => { const data = response.feeds.result; - ctx.set('data', { + return { title: `${name} 的洛谷动态`, link: `https://www.luogu.com.cn/user/${uid}#activity`, allowEmpty: true, @@ -29,5 +51,5 @@ export default async (ctx) => { link: `https://www.luogu.com.cn/user/${uid}#activity`, guid: item.id, })), - }); -}; + }; +} diff --git a/lib/routes/luxiangdong/archive.ts b/lib/routes/luxiangdong/archive.ts index 4c7c594bf..cabd311ef 100644 --- a/lib/routes/luxiangdong/archive.ts +++ b/lib/routes/luxiangdong/archive.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/archive', + categories: ['blog'], + example: '/luxiangdong/archive', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['luxiangdong.com/'], + }, + name: '文章', + maintainers: ['Levix'], + handler, + url: 'luxiangdong.com/', +}; + +async function handler() { const { data } = await got(`https://www.luxiangdong.com/content.json?t=${Date.now()}`); const items = data.posts.map((item) => ({ @@ -17,12 +40,12 @@ export default async (ctx) => { category: item.tags.map((tag) => tag.name), })); - ctx.set('data', { + return { // 源标题 title: '土猛的员外', // 源链接 link: 'https://www.luxiangdong.com/', // 源文章 item: items, - }); -}; + }; +} diff --git a/lib/routes/luxiangdong/maintainer.ts b/lib/routes/luxiangdong/maintainer.ts deleted file mode 100644 index 94c2426f4..000000000 --- a/lib/routes/luxiangdong/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/archive': ['Levix'], -}; diff --git a/lib/routes/luxiangdong/namespace.ts b/lib/routes/luxiangdong/namespace.ts new file mode 100644 index 000000000..3fe40c941 --- /dev/null +++ b/lib/routes/luxiangdong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '土猛的员外', + url: 'luxiangdong.com', +}; diff --git a/lib/routes/luxiangdong/radar.ts b/lib/routes/luxiangdong/radar.ts deleted file mode 100644 index b08f4b578..000000000 --- a/lib/routes/luxiangdong/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'luxiangdong.com': { - _name: '土猛的员外', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/blog#luxiangdong', - source: ['/'], - target: '/luxiangdong/archive', - }, - ], - }, -}; diff --git a/lib/routes/luxiangdong/router.ts b/lib/routes/luxiangdong/router.ts deleted file mode 100644 index 8651158c9..000000000 --- a/lib/routes/luxiangdong/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/archive', './archive'); -}; diff --git a/lib/routes/lvv2/maintainer.ts b/lib/routes/lvv2/maintainer.ts deleted file mode 100644 index 1253334fc..000000000 --- a/lib/routes/lvv2/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:channel/:sort?': ['Fatpandac'], - '/top/:channel/:sort?': ['Fatpandac'], -}; diff --git a/lib/routes/lvv2/namespace.ts b/lib/routes/lvv2/namespace.ts new file mode 100644 index 000000000..03a960193 --- /dev/null +++ b/lib/routes/lvv2/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LVV2', + url: 'lvv2.com', +}; diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index e966e654f..55c59bd76 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -28,7 +29,32 @@ const titleMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:channel/:sort?', + categories: ['new-media'], + example: '/lvv2/news/sort-score', + parameters: { channel: '频道,见下表', sort: '排序方式,仅得分和24小时榜可选填该参数,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道', + maintainers: ['Fatpandac'], + handler, + description: `| 热门 | 最新 | 得分 | 24 小时榜 | + | :------: | :------: | :--------: | :-----------: | + | sort-hot | sort-new | sort-score | sort-realtime | + + | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | + | :------: | :------: | :----: | :------: | :------: | + | | t-hour | t-day | t-week | t-month |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const sort = (channel === 'sort-realtime' || channel === 'sort-score') && !ctx.req.param('sort') ? 't-week' : ctx.req.param('sort'); const url = `${rootUrl}/${channel}/${sort}`; @@ -70,9 +96,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `lvv2 - ${sort ? titleMap[channel][sort] : titleMap[channel]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/lvv2/radar.ts b/lib/routes/lvv2/radar.ts deleted file mode 100644 index 89bf6602d..000000000 --- a/lib/routes/lvv2/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'lvv2.com': { - _name: 'LVV2', - '.': [ - { - title: '热门', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-hot'], - target: '/lvv2/news/sort-hot', - }, - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-new'], - target: '/lvv2/news/sort-new', - }, - { - title: '得分', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-score', '/sort-score/:sort'], - target: (params) => (params.sort ? `/lvv2/news/sort-score/${params.sort}` : '/lvv2/news/sort-score'), - }, - { - title: '24小时榜', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-realtime', '/sort-realtime/:sort'], - target: (params) => (params.sort ? `/lvv2/news/sort-realtime/${params.sort}` : '/lvv2/news/sort-realtime'), - }, - { - title: '热门 24小时 Top 10', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/', '/sort-hot'], - target: '/lvv2/top/sort-hot', - }, - { - title: '最新 24小时 Top 10', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-new'], - target: '/lvv2/top/sort-new', - }, - { - title: '得分 24小时 Top 10', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-score', '/sort-score/:sort'], - target: (params) => (params.sort ? `/lvv2/top/sort-score/${params.sort}` : '/lvv2/top/sort-score'), - }, - { - title: '24小时榜 24小时 Top 10', - docs: 'https://docs.rsshub.app/routes/new-media#lvv2', - source: ['/sort-realtime', '/sort-realtime/:sort'], - target: (params) => (params.sort ? `/lvv2/top/sort-realtime/${params.sort}` : '/lvv2/top/sort-realtime'), - }, - ], - }, -}; diff --git a/lib/routes/lvv2/router.ts b/lib/routes/lvv2/router.ts deleted file mode 100644 index 9e5f177ce..000000000 --- a/lib/routes/lvv2/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:channel/:sort?', './news'); - router.get('/top/:channel/:sort?', './top'); -}; diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index 17db338e3..9afd943b7 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -28,7 +29,32 @@ const titleMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/top/:channel/:sort?', + categories: ['new-media'], + example: '/lvv2/top/sort-score', + parameters: { channel: '频道,见下表', sort: '排序方式,仅得分和24小时榜可选填该参数,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '24 小时点击排行 Top 10', + maintainers: ['Fatpandac'], + handler, + description: `| 热门 | 最新 | 得分 | 24 小时榜 | + | :------: | :------: | :--------: | :-----------: | + | sort-hot | sort-new | sort-score | sort-realtime | + + | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | + | :------: | :------: | :----: | :------: | :------: | + | | t-hour | t-day | t-week | t-month |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const sort = (channel === 'sort-realtime' || channel === 'sort-score') && !ctx.req.param('sort') ? 't-week' : ctx.req.param('sort'); const url = `${rootUrl}/${channel}/${sort}`; @@ -72,9 +98,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `lvv2 - ${sort ? titleMap[channel][sort] : titleMap[channel]} 24小时点击 Top 10`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/lxixsxa/discography.ts b/lib/routes/lxixsxa/discography.ts index e6cbf10d3..303a47f5e 100644 --- a/lib/routes/lxixsxa/discography.ts +++ b/lib/routes/lxixsxa/discography.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/disco', + categories: ['live'], + example: '/lxixsxa/disco', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.lxixsxa.com/', 'www.lxixsxa.com/discography'], + }, + name: 'Latest Discography', + maintainers: ['Kiotlin'], + handler, + url: 'www.lxixsxa.com/', +}; + +async function handler() { const api = 'https://www.sonymusic.co.jp/json/v2/artist/lisa/discography/start/0/count/-1'; const url = 'https://www.sonymusic.co.jp/artist/lisa/discography'; @@ -29,7 +52,7 @@ export default async (ctx) => { comment: item.catch_copy === '' ? '今日もいい日だ!' : item.catch_copy, })); - ctx.set('data', { + return { // the source title title, // the source url @@ -53,5 +76,5 @@ export default async (ctx) => { // the article link link: `${url}/${item.referID}`, })), - }); -}; + }; +} diff --git a/lib/routes/lxixsxa/information.ts b/lib/routes/lxixsxa/information.ts index d9cb931a5..f6d160321 100644 --- a/lib/routes/lxixsxa/information.ts +++ b/lib/routes/lxixsxa/information.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/info', + categories: ['live'], + example: '/lxixsxa/info', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.lxixsxa.com/', 'www.lxixsxa.com/info'], + }, + name: 'News', + maintainers: ['Kiotlin'], + handler, + url: 'www.lxixsxa.com/', +}; + +async function handler() { const api = 'https://www.sonymusic.co.jp/json/v2/artist/lisa/information/start/0/count/-1'; const url = 'https://www.sonymusic.co.jp/artist/lisa/info'; @@ -26,7 +49,7 @@ export default async (ctx) => { description: item.article, })); - ctx.set('data', { + return { // the source title title, // the source url @@ -47,5 +70,5 @@ export default async (ctx) => { // the article link link: `${url}/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/lxixsxa/maintainer.ts b/lib/routes/lxixsxa/maintainer.ts deleted file mode 100644 index b075c7294..000000000 --- a/lib/routes/lxixsxa/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/info': ['Kiotlin'], - '/disco': ['Kiotlin'], -}; diff --git a/lib/routes/lxixsxa/namespace.ts b/lib/routes/lxixsxa/namespace.ts new file mode 100644 index 000000000..2739f1854 --- /dev/null +++ b/lib/routes/lxixsxa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LiSA', + url: 'www.sonymusic.co.jp', +}; diff --git a/lib/routes/lxixsxa/radar.ts b/lib/routes/lxixsxa/radar.ts deleted file mode 100644 index 67fc500bb..000000000 --- a/lib/routes/lxixsxa/radar.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - 'sonymusic.co.jp': { - _name: 'Sony Music', - www: [ - { - title: 'LiSA News', - docs: 'https://docs.rsshub.app/routes/live#lisa', - source: ['/artist/lisa/', '/artist/lisa/info/'], - target: '/lxixsxa/info', - }, - { - title: 'LiSA Albums', - docs: 'https://docs.rsshub.app/routes/live#lisa', - source: ['/artist/lisa/', '/artist/lisa/discography/'], - target: '/lxixsxa/disco', - }, - ], - }, - 'lxixsxa.com': { - _name: 'LiSA Official', - www: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/live#lisa', - source: ['/', '/info'], - target: '/lxixsxa/info', - }, - { - title: 'Albums', - docs: 'https://docs.rsshub.app/routes/live#lisa', - source: ['/', '/discography'], - target: '/lxixsxa/disco', - }, - ], - }, -}; diff --git a/lib/routes/lxixsxa/router.ts b/lib/routes/lxixsxa/router.ts deleted file mode 100644 index 83fac1471..000000000 --- a/lib/routes/lxixsxa/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/info', './information'); - router.get('/disco', './discography'); -}; diff --git a/lib/routes/m4/index.ts b/lib/routes/m4/index.ts index 79e7cdcc5..6cb2fc8d6 100644 --- a/lib/routes/m4/index.ts +++ b/lib/routes/m4/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { id = 'news', category = 'china' } = ctx.req.param(); if (!isValidHost(id)) { throw new Error('Invalid id'); @@ -76,7 +84,7 @@ export default async (ctx) => { const image = $('a.logo0_b img').prop('src'); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -86,5 +94,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author: $('meta[name="author"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/m4/maintainer.ts b/lib/routes/m4/maintainer.ts deleted file mode 100644 index 0cdaa4c29..000000000 --- a/lib/routes/m4/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/mil/:category?': ['nczitzk'], - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/m4/namespace.ts b/lib/routes/m4/namespace.ts new file mode 100644 index 000000000..b3de9bdf3 --- /dev/null +++ b/lib/routes/m4/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四月网', + url: 'news.m4.cn', +}; diff --git a/lib/routes/m4/radar.ts b/lib/routes/m4/radar.ts deleted file mode 100644 index d716227f4..000000000 --- a/lib/routes/m4/radar.ts +++ /dev/null @@ -1,87 +0,0 @@ -export default { - 'm4.cn': { - _name: '四月网', - news: [ - { - title: '要闻 - 国内新闻', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/china/'], - target: '/m4/news/china', - }, - { - title: '要闻 - 国际新闻', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/world/'], - target: '/m4/news/world', - }, - { - title: '要闻 - 民生', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/livelihood/'], - target: '/m4/news/livelihood', - }, - { - title: '要闻 - 社会', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/society/'], - target: '/m4/news/society', - }, - { - title: '要闻 - 财经', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/finance/'], - target: '/m4/news/finance', - }, - { - title: '要闻 - 科技', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-yao-wen', - source: ['/tech/'], - target: '/m4/news/tech', - }, - ], - mil: [ - { - title: '军事 - 中国军情', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/china/'], - target: '/m4/mil/china', - }, - { - title: '军事 - 国际军情', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/world/'], - target: '/m4/mil/world', - }, - { - title: '军事 - 军事评论', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/views/'], - target: '/m4/mil/views', - }, - { - title: '军事 - 军事历史', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/history/'], - target: '/m4/mil/history', - }, - { - title: '军事 - 军迷说', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/talk/'], - target: '/m4/mil/talk', - }, - { - title: '军事 - 图说军事', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/photo/'], - target: '/m4/mil/photo', - }, - { - title: '军事 - 武器库', - docs: 'https://docs.rsshub.app/routes/new-media#si-yue-wang-jun-shi', - source: ['/arms/'], - target: '/m4/mil/arms', - }, - ], - }, -}; diff --git a/lib/routes/m4/router.ts b/lib/routes/m4/router.ts deleted file mode 100644 index 36962513b..000000000 --- a/lib/routes/m4/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?/:category{.+}?', './'); -}; diff --git a/lib/routes/macfilos/blog.ts b/lib/routes/macfilos/blog.ts index c32cf8580..d4f19d1c1 100644 --- a/lib/routes/macfilos/blog.ts +++ b/lib/routes/macfilos/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['new-media'], + example: '/macfilos/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['macfilos.com/blog', 'macfilos.com/'], + }, + name: 'Blog', + maintainers: ['nczitzk'], + handler, + url: 'macfilos.com/blog', +}; + +async function handler(ctx) { const rootUrl = 'https://www.macfilos.com'; const currentUrl = `${rootUrl}/blog`; @@ -54,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/macfilos/maintainer.ts b/lib/routes/macfilos/maintainer.ts deleted file mode 100644 index e93ef8652..000000000 --- a/lib/routes/macfilos/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['nczitzk'], -}; diff --git a/lib/routes/macfilos/namespace.ts b/lib/routes/macfilos/namespace.ts new file mode 100644 index 000000000..1cecc1c53 --- /dev/null +++ b/lib/routes/macfilos/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Macfilos', + url: 'macfilos.com', +}; diff --git a/lib/routes/macfilos/radar.ts b/lib/routes/macfilos/radar.ts deleted file mode 100644 index 5ca731944..000000000 --- a/lib/routes/macfilos/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'macfilos.com': { - _name: 'Macfilos', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/new-media#macfilos-blog', - source: ['/blog', '/'], - target: '/macfilos/blog', - }, - ], - }, -}; diff --git a/lib/routes/macfilos/router.ts b/lib/routes/macfilos/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/macfilos/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/macmenubar/maintainer.ts b/lib/routes/macmenubar/maintainer.ts deleted file mode 100644 index 337d8105a..000000000 --- a/lib/routes/macmenubar/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/recently/:category?': ['5upernova-heng'], -}; diff --git a/lib/routes/macmenubar/namespace.ts b/lib/routes/macmenubar/namespace.ts new file mode 100644 index 000000000..4c6a16e0a --- /dev/null +++ b/lib/routes/macmenubar/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MacMenuBar', + url: 'macmenubar.com', +}; diff --git a/lib/routes/macmenubar/radar.ts b/lib/routes/macmenubar/radar.ts deleted file mode 100644 index b83e06c7c..000000000 --- a/lib/routes/macmenubar/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'macmenubar.com': { - _name: 'MacMenuBar', - '.': [ - { - title: 'Recently Added', - docs: 'https://docs.rsshub.app/routes/other#macmenubar', - source: ['/recently-added', '/:category'], - target: '/macmenubar/recently/category', - }, - ], - }, -}; diff --git a/lib/routes/macmenubar/recently.ts b/lib/routes/macmenubar/recently.ts index af0da5c97..685afdf83 100644 --- a/lib/routes/macmenubar/recently.ts +++ b/lib/routes/macmenubar/recently.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; async function getCategoryId(categories) { @@ -11,7 +12,25 @@ async function getCategoryId(categories) { return response.reduce((queryString, item) => queryString + item.id + ',', ''); } -export default async (ctx) => { +export const route: Route = { + path: '/recently/:category?', + categories: ['blog'], + example: '/macmenubar/recently/developer-apps,system-tools', + parameters: { category: 'Category path name, seperate by comma, default is all categories. Category path name can be found in url' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Recently', + maintainers: ['5upernova-heng'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://macmenubar.com/wp-json/wp/v2/posts'; const categories = ctx.req.param('category'); const searchParams = { @@ -39,9 +58,9 @@ export default async (ctx) => { category: [...tags, ...categories], }; }); - ctx.set('data', { + return { title: 'Recent Posts | MacMenuBar.com', link: 'https://macmenubar.com/recently-added/', item: items, - }); -}; + }; +} diff --git a/lib/routes/macmenubar/router.ts b/lib/routes/macmenubar/router.ts deleted file mode 100644 index 8cadc6c4d..000000000 --- a/lib/routes/macmenubar/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/recently/:category?', './recently'); -}; diff --git a/lib/routes/macupdate/app.ts b/lib/routes/macupdate/app.ts index 0e2ddd5b6..529b74889 100644 --- a/lib/routes/macupdate/app.ts +++ b/lib/routes/macupdate/app.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/app/:appId/:appSlug?', + categories: ['program-update'], + example: '/macupdate/app/11942', + parameters: { appId: 'Application unique ID, can be found in URL', appSlug: 'Application slug, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['macupdate.com/app/mac/:appId/:appSlug'], + }, + name: 'Update', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { appId, appSlug } = ctx.req.param(); const baseUrl = 'https://www.macupdate.com'; const link = `${baseUrl}/app/mac/${appId}${appSlug ? `/${appSlug}` : ''}`; @@ -27,7 +49,7 @@ export default async (ctx) => { author: appData.developer.name, }; - ctx.set('data', { + return { title: appData.title, description: appData.description, link: `${baseUrl}${asPath}`, @@ -35,9 +57,9 @@ export default async (ctx) => { icon: appData.logo.source, item: [item], language: 'en', - }); + }; ctx.set('json', { pageProps: nextData.props.initialProps.pageProps, }); -}; +} diff --git a/lib/routes/macupdate/maintainer.ts b/lib/routes/macupdate/maintainer.ts deleted file mode 100644 index 44437a31d..000000000 --- a/lib/routes/macupdate/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/app/:appId/:appSlug?': ['TonyRL'], -}; diff --git a/lib/routes/macupdate/namespace.ts b/lib/routes/macupdate/namespace.ts new file mode 100644 index 000000000..fcaf54d1a --- /dev/null +++ b/lib/routes/macupdate/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MacUpdate', + url: 'macupdate.com', +}; diff --git a/lib/routes/macupdate/radar.ts b/lib/routes/macupdate/radar.ts deleted file mode 100644 index e168b7097..000000000 --- a/lib/routes/macupdate/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'macupdate.com': { - _name: 'MacUpdate', - '.': [ - { - title: '更新', - docs: 'https://docs.rsshub.app/routes/program-update#macupdate', - source: ['/app/mac/:appId/:appSlug'], - target: '/macupdate/app/:appId/:appSlug?', - }, - ], - }, -}; diff --git a/lib/routes/macupdate/router.ts b/lib/routes/macupdate/router.ts deleted file mode 100644 index 6ceebb8c0..000000000 --- a/lib/routes/macupdate/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/app/:appId/:appSlug?', './app'); -}; diff --git a/lib/routes/magazinelib/latest-magazine.ts b/lib/routes/magazinelib/latest-magazine.ts index dffb4b7d0..abdbb0519 100644 --- a/lib/routes/magazinelib/latest-magazine.ts +++ b/lib/routes/magazinelib/latest-magazine.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,26 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const host = 'https://magazinelib.com'; -export default async (ctx) => { +export const route: Route = { + path: '/latest-magazine/:query?', + categories: ['reading'], + example: '/magazinelib/latest-magazine/new+yorker', + parameters: { query: 'query, search page querystring' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Latest Magazine', + maintainers: ['EthanWng97'], + handler, + description: `For instance, when doing search at [https://magazinelib.com](https://magazinelib.com) and you get url \`https://magazinelib.com/?s=new+yorker\`, the query is \`new+yorker\``, +}; + +async function handler(ctx) { const query = ctx.req.param('query'); const url = `${host}/wp-json/wp/v2/posts/`; const response = await got({ @@ -43,7 +63,7 @@ export default async (ctx) => { return data; }); - ctx.set('data', { + return { title: `MagazineLib - Latest Magazines${subTitle}`, link: `{host}/?s=${query}`, description: `MagazineLib - Latest Magazines${subTitle}`, @@ -54,5 +74,5 @@ export default async (ctx) => { pubDate: new Date(item.pubDate).toUTCString(), description: item.description, })), - }); -}; + }; +} diff --git a/lib/routes/magazinelib/maintainer.ts b/lib/routes/magazinelib/maintainer.ts deleted file mode 100644 index 793c7ab1b..000000000 --- a/lib/routes/magazinelib/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest-magazine/:query?': ['EthanWng97'], -}; diff --git a/lib/routes/magazinelib/namespace.ts b/lib/routes/magazinelib/namespace.ts new file mode 100644 index 000000000..67c7dab01 --- /dev/null +++ b/lib/routes/magazinelib/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MagazineLib', + url: 'magazinelib.com', +}; diff --git a/lib/routes/magazinelib/radar.ts b/lib/routes/magazinelib/radar.ts deleted file mode 100644 index 2150afed4..000000000 --- a/lib/routes/magazinelib/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'magazinelib.com': { - _name: 'magazineLib', - '.': [ - { - title: 'Latest Magazine', - docs: 'https://docs.rsshub.app/routes/reading#magazinelib', - source: ['/'], - target: (_, url) => { - const query = new URL(url).searchParams.get('s'); - if (query === null) { - return '/magazinelib/latest-magazine'; - } - return `/magazinelib/latest-magazine/${query}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/magazinelib/router.ts b/lib/routes/magazinelib/router.ts deleted file mode 100644 index 6203133c5..000000000 --- a/lib/routes/magazinelib/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest-magazine/:query?', './latest-magazine'); -}; diff --git a/lib/routes/mail/imap.ts b/lib/routes/mail/imap.ts index b23f2a0d9..93ae00646 100644 --- a/lib/routes/mail/imap.ts +++ b/lib/routes/mail/imap.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { ImapFlow } from 'imapflow'; import { config } from '@/config'; @@ -5,7 +6,14 @@ import { simpleParser } from 'mailparser'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/imap/:email/:folder{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { email, folder = 'INBOX' } = ctx.req.param(); const { limit = 10 } = ctx.req.query(); const mailConfig = { @@ -91,10 +99,10 @@ export default async (ctx) => { await client.logout(); - ctx.set('data', { + return { title: `${email}'s Inbox${folder === 'INBOX' ? '' : ` - ${folder}`}`, link: `https://${email.split('@')[1]}`, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/mail/maintainer.ts b/lib/routes/mail/maintainer.ts deleted file mode 100644 index 60cc6a392..000000000 --- a/lib/routes/mail/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/imap/:email/:folder*': ['kt286'], -}; diff --git a/lib/routes/mail/namespace.ts b/lib/routes/mail/namespace.ts new file mode 100644 index 000000000..ca70bee64 --- /dev/null +++ b/lib/routes/mail/namespace.ts @@ -0,0 +1,5 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Email', +}; diff --git a/lib/routes/mail/router.ts b/lib/routes/mail/router.ts deleted file mode 100644 index 7120fc84e..000000000 --- a/lib/routes/mail/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/imap/:email/:folder{.+}?', './imap'); -}; diff --git a/lib/routes/mangadex/index.ts b/lib/routes/mangadex/index.ts index 493099a75..80ff36463 100644 --- a/lib/routes/mangadex/index.ts +++ b/lib/routes/mangadex/index.ts @@ -1,7 +1,19 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id/:lang?', + radar: { + source: ['mangadex.org/title/:id/*', 'mangadex.org/title/:id'], + target: '/:id', + }, + name: 'Unknown', + maintainers: ['vzz64'], + handler, +}; + +async function handler(ctx) { const { id, lang } = ctx.req.param(); let { data } = await got.get(`https://api.mangadex.org/manga/${id}`); if (data.result === 'error') { @@ -43,7 +55,7 @@ export default async (ctx) => { if (data.result === 'error') { throw new Error(data.errors[0].detail); } - ctx.set('data', { + return { title: `${title} - MangaDex`, link: `https://mangadex.org/title/${id}`, description, @@ -66,5 +78,5 @@ export default async (ctx) => { }; }), language: lang, - }); -}; + }; +} diff --git a/lib/routes/mangadex/maintainer.ts b/lib/routes/mangadex/maintainer.ts deleted file mode 100644 index d3b2f409a..000000000 --- a/lib/routes/mangadex/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id/:lang?': ['vzz64'], -}; diff --git a/lib/routes/mangadex/namespace.ts b/lib/routes/mangadex/namespace.ts new file mode 100644 index 000000000..d7d9327f9 --- /dev/null +++ b/lib/routes/mangadex/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'mangadex.org', +}; diff --git a/lib/routes/mangadex/radar.ts b/lib/routes/mangadex/radar.ts deleted file mode 100644 index c21757851..000000000 --- a/lib/routes/mangadex/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mangadex.org': { - _name: 'MangaDex', - '.': [ - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/anime#mangadex', - source: ['/title/:id/*', '/title/:id'], - target: '/mangadex/:id', - }, - ], - }, -}; diff --git a/lib/routes/mangadex/router.ts b/lib/routes/mangadex/router.ts deleted file mode 100644 index f9fdd7817..000000000 --- a/lib/routes/mangadex/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id/:lang?', './index'); -}; diff --git a/lib/routes/manhuagui/comic.ts b/lib/routes/manhuagui/comic.ts index a6219f1a0..a2c0ec629 100644 --- a/lib/routes/manhuagui/comic.ts +++ b/lib/routes/manhuagui/comic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import LZString from 'lz-string'; @@ -43,7 +44,29 @@ const getChapters = ($) => { .reduce((acc, curr) => [...acc, ...curr]); }; -export default async (ctx) => { +export const route: Route = { + path: ['/comic/:id/:chapterCnt?', '/:domain?/comic/:id/:chapterCnt?'], + categories: ['anime'], + example: '/manhuagui/comic/22942/5', + parameters: { id: '漫画ID', chapterCnt: '返回章节的数量,默认为0,返回所有章节' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mhgui.com/comic/:id/'], + target: '/comic/:id', + }, + name: '漫画更新', + maintainers: ['MegrezZhu'], + handler, +}; + +async function handler(ctx) { const { id, domain } = ctx.req.param(); if (domain === 'mhgui') { baseUrl = 'https://www.mhgui.com'; @@ -72,12 +95,12 @@ export default async (ctx) => { const reg = /最近[于於].+更新至/; // 处理已下架的漫画 if ($('.status > span').text().indexOf('已下架') > 0) { - ctx.set('data', { + return { title: `看漫画 - ${bookTitle} 已下架`, link: `${baseUrl}/comic/${id}/`, description: bookIntro, item: [{ link: `${baseUrl}/comic/${id}/`, title: bookTitle, description: '已下架' }], - }); + }; } else { const pub_date_str = $('.status > span') .text() @@ -104,11 +127,11 @@ export default async (ctx) => { itemsLen = chapterCnt < $.newChapterCnt ? $.newChapterCnt : chapterCnt; } - ctx.set('data', { + return { title: `看漫画 - ${bookTitle}`, link: `${baseUrl}/comic/${id}/`, description: bookIntro, item: items.slice(0, itemsLen), - }); + }; } -}; +} diff --git a/lib/routes/manhuagui/maintainer.ts b/lib/routes/manhuagui/maintainer.ts deleted file mode 100644 index 02dff54aa..000000000 --- a/lib/routes/manhuagui/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/comic/:id/:chapterCnt?': ['MegrezZhu'], - '/mhgui/comic/:id/:chapterCnt?': ['btdwv'], - '/subscribe': ['shininome'], - '/twmanhuagui/comic/:id/:chapterCnt?': ['btdwv'], -}; diff --git a/lib/routes/manhuagui/namespace.ts b/lib/routes/manhuagui/namespace.ts new file mode 100644 index 000000000..07438b734 --- /dev/null +++ b/lib/routes/manhuagui/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '看漫画', + url: 'www.manhuagui.com', +}; diff --git a/lib/routes/manhuagui/radar.ts b/lib/routes/manhuagui/radar.ts deleted file mode 100644 index 9a60b413c..000000000 --- a/lib/routes/manhuagui/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -const rules = [ - { - title: '漫画柜个人订阅', - docs: 'https://docs.rsshub.app/routes/anime#kan-man-hua', - source: '/user/book/shelf', - target: '/manhuagui/subscribe', - }, - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/anime#kan-man-hua', - source: '/comic/:id/', - target: '/manhuagui/comic/:id', - }, -]; - -export default { - 'manhuagui.com': { - _name: '漫画柜', - www: rules, - tw: [ - { - title: '漫画更新', - docs: 'https://docs.rsshub.app/routes/anime#kan-man-hua', - source: '/comic/:id/', - target: '/manhuagui/twmanhuagui/comic/:id', - }, - ], - }, - 'mhgui.com': { - _name: '漫画柜镜像站', - www: rules, - }, -}; diff --git a/lib/routes/manhuagui/router.ts b/lib/routes/manhuagui/router.ts deleted file mode 100644 index 3562246b2..000000000 --- a/lib/routes/manhuagui/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/comic/:id/:chapterCnt?', './comic'); - router.get('/:domain?/comic/:id/:chapterCnt?', './comic'); - router.get('/subscribe', './subscribe'); -}; diff --git a/lib/routes/manhuagui/subscribe.ts b/lib/routes/manhuagui/subscribe.ts index d457b9973..170fcdec0 100644 --- a/lib/routes/manhuagui/subscribe.ts +++ b/lib/routes/manhuagui/subscribe.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,33 @@ import * as path from 'node:path'; import { config } from '@/config'; const web_url = 'https://www.manhuagui.com/user/book/shelf/1'; -export default async (ctx) => { +export const route: Route = { + path: '/subscribe', + categories: ['anime'], + example: '/manhuagui/subscribe', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mhgui.com/user/book/shelf'], + }, + name: '漫画个人订阅', + maintainers: ['shininome'], + handler, + url: 'www.mhgui.com/user/book/shelf', + description: `:::tip + 个人订阅需要自建 + 环境变量需要添加 MHGUI\_COOKIE + :::`, +}; + +async function handler() { if (!config.manhuagui || !config.manhuagui.cookie) { throw new Error('manhuagui RSS is disabled due to the lack of relevant config'); } @@ -48,10 +75,10 @@ export default async (ctx) => { return single; }) .get(); // 这里获取数组= = - ctx.set('data', { + return { title, link, description, item, - }); -}; + }; +} diff --git a/lib/routes/mastodon/account-id.ts b/lib/routes/mastodon/account-id.ts index b35347022..bd5539188 100644 --- a/lib/routes/mastodon/account-id.ts +++ b/lib/routes/mastodon/account-id.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/account_id/:site/:account_id/statuses/:only_media?', + name: 'Unknown', + maintainers: ['notofoe'], + handler, +}; + +async function handler(ctx) { const site = ctx.req.param('site'); const account_id = ctx.req.param('account_id'); const only_media = ctx.req.param('only_media') ? 'true' : 'false'; @@ -11,11 +19,11 @@ export default async (ctx) => { const { account_data, data } = await utils.getAccountStatuses(site, account_id, only_media); - ctx.set('data', { + return { title: `${account_data.display_name} (@${account_data.acct})`, link: account_data.url, description: account_data.note, item: utils.parseStatuses(data), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/mastodon/acct.ts b/lib/routes/mastodon/acct.ts index 666abc9cd..f5acbb3d1 100644 --- a/lib/routes/mastodon/acct.ts +++ b/lib/routes/mastodon/acct.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/acct/:acct/statuses/:only_media?', + categories: ['social-media'], + example: '/mastodon/acct/CatWhitney@mastodon.social/statuses', + parameters: { acct: 'Webfinger account URI, like `user@host`', only_media: 'whether only display media content, default to false, any value to true' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User timeline', + maintainers: ['notofoe'], + handler, + description: `Started from Mastodon v4.0.0, the use of the \`search\` API in the route no longer requires a user token. +If the domain of your Webfinger account URI is the same as the API host of the instance (i.e., no delegation called in some other protocols), then no configuration is required and the route is available out of the box. +However, you can still specify these route-specific configurations if you need to override them.`, +}; + +async function handler(ctx) { const acct = ctx.req.param('acct'); const only_media = ctx.req.param('only_media') ? 'true' : 'false'; @@ -8,11 +30,11 @@ export default async (ctx) => { const { account_data, data } = await utils.getAccountStatuses(site, account_id, only_media); - ctx.set('data', { + return { title: `${account_data.display_name} (@${account_data.acct})`, link: account_data.url, description: account_data.note, item: utils.parseStatuses(data), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/mastodon/maintainer.ts b/lib/routes/mastodon/maintainer.ts deleted file mode 100644 index 5e9b2482a..000000000 --- a/lib/routes/mastodon/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/account_id/:site/:account_id/statuses/:only_media?': ['notofoe'], - '/acct/:acct/statuses/:only_media?': ['notofoe'], - '/remote/:site/:only_media?': ['hoilc'], - '/timeline/:site/:only_media?': ['hoilc'], -}; diff --git a/lib/routes/mastodon/namespace.ts b/lib/routes/mastodon/namespace.ts new file mode 100644 index 000000000..f0f3f3dc4 --- /dev/null +++ b/lib/routes/mastodon/namespace.ts @@ -0,0 +1,14 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Mastodon', + url: 'mastodon.social', + description: `:::tip +Official user RSS: + +- RSS: \`https://**:instance**/users/**:username**.rss\` ([Example](https://pawoo.net/users/pawoo_support.rss)) +- Atom: ~~\`https://**:instance**/users/**:username**.atom\`~~ (Only for pawoo.net, [example](https://pawoo.net/users/pawoo_support.atom)) + +These feed do not include boosts (a.k.a. reblogs). RSSHub provides a feed for user timeline based on the Mastodon API, but to use that, you may need to create application on a Mastodon instance, and configure your RSSHub instance. Check the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. +:::`, +}; diff --git a/lib/routes/mastodon/radar.ts b/lib/routes/mastodon/radar.ts deleted file mode 100644 index 028ca5712..000000000 --- a/lib/routes/mastodon/radar.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default { - 'mastodon.social': { - _name: 'Mastodon', - '.': [ - { - title: '用户公共时间线', - docs: 'https://docs.rsshub.app/routes/social-media#mastodon', - source: ['/:acct'], - target: (params, url) => (params.acct.startsWith('@') ? `/mastodon/acct/${params.substring(1)}@${new URL(url).host}/statuses` : ''), - }, - { - title: '实例公共时间线(本站)', - docs: 'https://docs.rsshub.app/routes/social-media#mastodon', - source: ['/'], - target: (_, url) => `/mastodon/timeline/${new URL(url).host}`, - }, - { - title: '实例公共时间线(跨站)', - docs: 'https://docs.rsshub.app/routes/social-media#mastodon', - source: ['/'], - target: (_, url) => `/mastodon/remote/${new URL(url).host}`, - }, - { - title: '用户公共时间线(备用)', - docs: 'https://docs.rsshub.app/routes/social-media#mastodon', - source: ['/:acct'], - }, - ], - }, -}; diff --git a/lib/routes/mastodon/router.ts b/lib/routes/mastodon/router.ts deleted file mode 100644 index 4b21a81b5..000000000 --- a/lib/routes/mastodon/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/account_id/:site/:account_id/statuses/:only_media?', './account-id'); - router.get('/acct/:acct/statuses/:only_media?', './acct'); - router.get('/remote/:site/:only_media?', './timeline-remote'); - router.get('/timeline/:site/:only_media?', './timeline-local'); -}; diff --git a/lib/routes/mastodon/timeline-local.ts b/lib/routes/mastodon/timeline-local.ts index eb04ca197..43773041e 100644 --- a/lib/routes/mastodon/timeline-local.ts +++ b/lib/routes/mastodon/timeline-local.ts @@ -1,8 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/timeline/:site/:only_media?', + categories: ['social-media'], + example: '/mastodon/timeline/pawoo.net/true', + parameters: { site: 'instance address, only domain, no `http://` or `https://` protocol header', only_media: 'whether only display media content, default to false, any value to true' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Instance timeline (local)', + maintainers: ['hoilc'], + handler, + description: `If the instance address is not \`mastodon.social\` or \`pawoo.net\`, then the route requires \`ALLOW_USER_SUPPLY_UNSAFE_DOMAIN\` to be \`true\`.`, +}; + +async function handler(ctx) { const site = ctx.req.param('site'); const only_media = ctx.req.param('only_media') ? 'true' : 'false'; if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { @@ -14,9 +34,9 @@ export default async (ctx) => { const response = await got.get(url, { headers: utils.apiHeaders() }); const list = response.data; - ctx.set('data', { + return { title: `Local Public${ctx.req.param('only_media') ? ' Media' : ''} Timeline on ${site}`, link: `https://${site}`, item: utils.parseStatuses(list), - }); -}; + }; +} diff --git a/lib/routes/mastodon/timeline-remote.ts b/lib/routes/mastodon/timeline-remote.ts index 03acc54cb..6b17f620a 100644 --- a/lib/routes/mastodon/timeline-remote.ts +++ b/lib/routes/mastodon/timeline-remote.ts @@ -1,8 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/remote/:site/:only_media?', + categories: ['social-media'], + example: '/mastodon/remote/pawoo.net/true', + parameters: { site: 'instance address, only domain, no `http://` or `https://` protocol header', only_media: 'whether only display media content, default to false, any value to true' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Instance timeline (federated)', + maintainers: ['hoilc'], + handler, + description: `If the instance address is not \`mastodon.social\` or \`pawoo.net\`, then the route requires \`ALLOW_USER_SUPPLY_UNSAFE_DOMAIN\` to be \`true\`.`, +}; + +async function handler(ctx) { const site = ctx.req.param('site'); const only_media = ctx.req.param('only_media') ? 'true' : 'false'; if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { @@ -14,9 +34,9 @@ export default async (ctx) => { const response = await got.get(url, { headers: utils.apiHeaders() }); const list = response.data; - ctx.set('data', { + return { title: `Federated Public${ctx.req.param('only_media') ? ' Media' : ''} Timeline on ${site}`, link: `https://${site}`, item: utils.parseStatuses(list), - }); -}; + }; +} diff --git a/lib/routes/mckinsey/cn/index.ts b/lib/routes/mckinsey/cn/index.ts index 2308abf13..95f4ae764 100644 --- a/lib/routes/mckinsey/cn/index.ts +++ b/lib/routes/mckinsey/cn/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; // use stock `got` package as a workaround for // https://github.com/DIYgod/RSSHub/issues/8239 // https://github.com/DIYgod/RSSHub/pull/8288 @@ -8,7 +9,45 @@ import { categories } from './category-map'; const baseUrl = 'https://www.mckinsey.com.cn'; const endpoint = `${baseUrl}/wp-json`; -export default async (ctx) => { +export const route: Route = { + path: '/cn/:category?', + categories: ['finance'], + example: '/mckinsey/cn', + parameters: { category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '洞见', + maintainers: ['laampui'], + handler, + description: `| 分类 | 分类名 | + | ---- | ------------------ | + | 25 | 全部洞见 | + | 2 | 汽车 | + | 3 | 金融服务 | + | 4 | 消费者 | + | 5 | 医药 | + | 7 | 数字化 | + | 8 | 制造业 | + | 9 | 私募 | + | 10 | 技术,媒体与通信 | + | 12 | 城市化与可持续发展 | + | 13 | 创新 | + | 16 | 人才与领导力 | + | 18 | 宏观经济 | + | 19 | 麦肯锡全球研究院 | + | 37 | 麦肯锡季刊 | + | 41 | 资本项目和基础设施 | + | 42 | 旅游、运输和物流 | + | 45 | 全球基础材料 |`, +}; + +async function handler(ctx) { const { category = '25' } = ctx.req.param(); if (isNaN(category)) { categories.find((c) => c.slug === category); @@ -29,9 +68,9 @@ export default async (ctx) => { pubDate: parseDate(item.date_gmt), })); - ctx.set('data', { + return { title: category ? `McKinsey Greater China - ${categories[category].name}` : `McKinsey Greater China`, link: `${baseUrl}/${category === '25' ? categories[category].slug : `${categories[25].slug}/${categories[category].slug}`}/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/mckinsey/maintainer.ts b/lib/routes/mckinsey/maintainer.ts deleted file mode 100644 index 64590c5d5..000000000 --- a/lib/routes/mckinsey/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/cn/:category?': ['laampui'], -}; diff --git a/lib/routes/mckinsey/namespace.ts b/lib/routes/mckinsey/namespace.ts new file mode 100644 index 000000000..9cf96d5b8 --- /dev/null +++ b/lib/routes/mckinsey/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '麦肯锡', + url: 'mckinsey.com.cn', +}; diff --git a/lib/routes/mckinsey/radar.ts b/lib/routes/mckinsey/radar.ts deleted file mode 100644 index 2c0e28e6a..000000000 --- a/lib/routes/mckinsey/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { categories } from './cn/category-map'; -export default { - 'mckinsey.com.cn': { - _name: 'McKinsey Greater China', - '.': Object.entries(categories).map(([key, value]) => ({ - title: `${value.name} | 洞见`, - docs: 'https://docs.rsshub.app/routes/finance#mai-ken-xi', - source: [`/insights/${value.slug}`, '/insights'], - target: `/mckinsey/cn/${key}`, - })), - }, -}; diff --git a/lib/routes/mckinsey/router.ts b/lib/routes/mckinsey/router.ts deleted file mode 100644 index 160ae620f..000000000 --- a/lib/routes/mckinsey/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/cn/:category?', './cn/index'); -}; diff --git a/lib/routes/mdpi/journal.ts b/lib/routes/mdpi/journal.ts index e137b916a..6e222f9a3 100644 --- a/lib/routes/mdpi/journal.ts +++ b/lib/routes/mdpi/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: '/:journal', + categories: ['journal'], + example: '/mdpi/analytica', + parameters: { journal: 'Journal Name, get it from the journal homepage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.mdpi.com/journal/:journal'], + }, + name: 'Journal', + maintainers: ['Derekmini'], + handler, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal'); const host = 'https://www.mdpi.com'; const jrnlUrl = `${host}/journal/${journal}`; @@ -60,9 +82,9 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mdpi/maintainer.ts b/lib/routes/mdpi/maintainer.ts deleted file mode 100755 index 1878ffe52..000000000 --- a/lib/routes/mdpi/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:journal': ['Derekmini'], -}; diff --git a/lib/routes/mdpi/namespace.ts b/lib/routes/mdpi/namespace.ts new file mode 100644 index 000000000..b4613d20e --- /dev/null +++ b/lib/routes/mdpi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MDPI', + url: 'www.mdpi.com', +}; diff --git a/lib/routes/mdpi/radar.ts b/lib/routes/mdpi/radar.ts deleted file mode 100755 index 182ebf515..000000000 --- a/lib/routes/mdpi/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mdpi.com': { - _name: 'MDPI', - www: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#MDPI', - source: '/journal/:journal', - target: '/mdpi/:journal', - }, - ], - }, -}; diff --git a/lib/routes/mdpi/router.ts b/lib/routes/mdpi/router.ts deleted file mode 100755 index c20cdcb03..000000000 --- a/lib/routes/mdpi/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:journal', './journal'); -}; diff --git a/lib/routes/medieval-china/maintainer.ts b/lib/routes/medieval-china/maintainer.ts deleted file mode 100644 index d75eda617..000000000 --- a/lib/routes/medieval-china/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['artefaritaKuniklo'], -}; diff --git a/lib/routes/medieval-china/namespace.ts b/lib/routes/medieval-china/namespace.ts new file mode 100644 index 000000000..4ce5979f7 --- /dev/null +++ b/lib/routes/medieval-china/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国的中古', + url: 'medieval-china.club', +}; diff --git a/lib/routes/medieval-china/post.ts b/lib/routes/medieval-china/post.ts index 7b23bc66c..6525275f9 100644 --- a/lib/routes/medieval-china/post.ts +++ b/lib/routes/medieval-china/post.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['medieval-china.club/'], + target: '', + }, + name: 'Unknown', + maintainers: ['artefaritaKuniklo'], + handler, + url: 'medieval-china.club/', +}; + +async function handler(ctx) { const baseUrl = 'https://medieval-china.club'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -34,12 +47,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中国的中古', link: baseUrl, item: items, image: 'https://medieval-china.club/images/icons/favicon-144x144.png', description: '世界那么大,你无法去到每一个地方,感受每一处风景;时间那么长,那些逝去的人你也终将无法与之谋面。而通过古人之文字,今人之分享,你可以领略以前风光之奇绝瑰玮,感受逝人之人情冷暖。中古就是这么一个地方,大家来自全球各地,不同时区,不同性别,不同身份,不同职业,但是大家都被中古的绚烂华章聚集在一起,哀其所哀,乐其所乐。这是一个虚拟的世界,但是我们仿佛跨越千里而来,谈一场绝世爱恋,今夕何夕!仅以此网站献给中古club的每一位成员,契阔谈宴,西园不芜!', - }); -}; + }; +} diff --git a/lib/routes/medieval-china/radar.ts b/lib/routes/medieval-china/radar.ts deleted file mode 100644 index eb6375952..000000000 --- a/lib/routes/medieval-china/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'medieval-china.club': { - _name: '中国的中古', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/reading#zhong-guo-de-zhong-shou-ye', - source: '/', - target: '/medieval-china', - }, - ], - }, -}; diff --git a/lib/routes/medieval-china/router.ts b/lib/routes/medieval-china/router.ts deleted file mode 100644 index fa93efb97..000000000 --- a/lib/routes/medieval-china/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './post'); -}; diff --git a/lib/routes/medium/following.ts b/lib/routes/medium/following.ts index 5690e5f2d..6c2259ce0 100644 --- a/lib/routes/medium/following.ts +++ b/lib/routes/medium/following.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import { config } from '@/config'; import parseArticle from './parse-article.js'; import { getFollowingFeedQuery } from './graphql.js'; -export default async (ctx) => { +export const route: Route = { + path: '/following/:user', + categories: ['blog'], + example: '/medium/following/imsingee', + parameters: { user: 'Username' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Personalized Recommendations - Following', + maintainers: ['ImSingee'], + handler, + description: `:::warning + Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. + :::`, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const cookie = config.medium.cookies[user]; @@ -23,9 +45,9 @@ export default async (ctx) => { const parsedArticles = await Promise.all(urls.map((url) => parseArticle(ctx, url))); - ctx.set('data', { + return { title: `${user} Medium Following`, link: 'https://medium.com/?feed=following', item: parsedArticles, - }); -}; + }; +} diff --git a/lib/routes/medium/for-you.ts b/lib/routes/medium/for-you.ts index cde83f367..7bbe79f0f 100644 --- a/lib/routes/medium/for-you.ts +++ b/lib/routes/medium/for-you.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import { config } from '@/config'; import parseArticle from './parse-article.js'; import { getWebInlineRecommendedFeedQuery } from './graphql.js'; -export default async (ctx) => { +export const route: Route = { + path: '/for-you/:user', + categories: ['blog'], + example: '/medium/for-you/imsingee', + parameters: { user: 'Username' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Personalized Recommendations - For You', + maintainers: ['ImSingee'], + handler, + description: `:::warning + Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. + :::`, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const cookie = config.medium.cookies[user]; @@ -23,9 +45,9 @@ export default async (ctx) => { const parsedArticles = await Promise.all(urls.map((url) => parseArticle(ctx, url))); - ctx.set('data', { + return { title: `${user} Medium For You`, link: 'https://medium.com/', item: parsedArticles, - }); -}; + }; +} diff --git a/lib/routes/medium/list.ts b/lib/routes/medium/list.ts index ee630b765..4b447baaf 100644 --- a/lib/routes/medium/list.ts +++ b/lib/routes/medium/list.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import { config } from '@/config'; import parseArticle from './parse-article.js'; import { getUserCatalogMainContentQuery } from './graphql.js'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:user/:catalogId', + categories: ['blog'], + example: '/medium/list/imsingee/f2d8d48096a9', + parameters: { user: 'Username', catalogId: 'List ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'List', + maintainers: ['ImSingee'], + handler, + description: `The List ID is the last part of the URL after \`-\`, for example, the username in [https://medium.com/@imsingee/list/collection-7e67004f23f9](https://medium.com/@imsingee/list/collection-7e67004f23f9) is \`imsingee\`, and the ID is \`7e67004f23f9\`. + + :::warning + To access private lists, only self-hosting is supported. + :::`, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const catalogId = ctx.req.param('catalogId'); @@ -24,9 +48,9 @@ export default async (ctx) => { const parsedArticles = await Promise.all(urls.map((url) => parseArticle(ctx, url))); - ctx.set('data', { + return { title: `List: ${name}`, link: `https://medium.com/@${user}/list/${catalogId}`, item: parsedArticles, - }); -}; + }; +} diff --git a/lib/routes/medium/maintainer.ts b/lib/routes/medium/maintainer.ts deleted file mode 100644 index 227a195ee..000000000 --- a/lib/routes/medium/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/following/:user': ['ImSingee'], - '/for-you/:user': ['ImSingee'], - '/list/:user/:catalogId': ['ImSingee'], - '/tag/:user/:tag': ['ImSingee'], -}; diff --git a/lib/routes/medium/namespace.ts b/lib/routes/medium/namespace.ts new file mode 100644 index 000000000..605e31be9 --- /dev/null +++ b/lib/routes/medium/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Medium', + url: 'medium.com', +}; diff --git a/lib/routes/medium/radar.ts b/lib/routes/medium/radar.ts deleted file mode 100644 index 120e911f1..000000000 --- a/lib/routes/medium/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'medium.com': { - _name: 'Medium', - '.': [ - { - title: '个性推荐 - For You', - docs: 'https://docs.rsshub.app/routes/blog#medium-ge-xing-tui-jian-for-you', - }, - { - title: '个性推荐 - Following', - docs: 'https://docs.rsshub.app/routes/blog#medium-ge-xing-tui-jian-following', - }, - { - title: '个性推荐 - Tag', - docs: 'https://docs.rsshub.app/routes/blog#medium-ge-xing-tui-jian-tag', - }, - { - title: 'List', - docs: 'https://docs.rsshub.app/routes/blog#medium-list', - }, - ], - }, -}; diff --git a/lib/routes/medium/router.ts b/lib/routes/medium/router.ts deleted file mode 100644 index e3f3554cb..000000000 --- a/lib/routes/medium/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/following/:user', './following'); - router.get('/for-you/:user', './for-you'); - router.get('/list/:user/:catalogId', './list'); - router.get('/tag/:user/:tag', './tag'); -}; diff --git a/lib/routes/medium/tag.ts b/lib/routes/medium/tag.ts index 4cfe293e1..81f80e652 100644 --- a/lib/routes/medium/tag.ts +++ b/lib/routes/medium/tag.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import { config } from '@/config'; import parseArticle from './parse-article.js'; import { getWebInlineTopicFeedQuery } from './graphql.js'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:user/:tag', + categories: ['blog'], + example: '/medium/tag/imsingee/cybersecurity', + parameters: { user: 'Username', tag: 'Subscribed Tag' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Personalized Recommendations - Tag', + maintainers: ['ImSingee'], + handler, + description: `There are many tags, which can be obtained by clicking on a tag from the homepage and looking at the URL. For example, if the URL is \`https://medium.com/?tag=web3\`, then the tag is \`web3\`. + + :::warning + Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. + :::`, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const tag = ctx.req.param('tag'); @@ -24,9 +48,9 @@ export default async (ctx) => { const parsedArticles = await Promise.all(urls.map((url) => parseArticle(ctx, url))); - ctx.set('data', { + return { title: `${user} Medium Following Tag ${tag}`, link: `https://medium.com/?tag=${tag}`, item: parsedArticles, - }); -}; + }; +} diff --git a/lib/routes/medsci/index.ts b/lib/routes/medsci/index.ts index 719fe8e08..4695fd9e7 100644 --- a/lib/routes/medsci/index.ts +++ b/lib/routes/medsci/index.ts @@ -1,9 +1,69 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:sid?/:tid?', + categories: ['new-media'], + example: '/medsci', + parameters: { sid: '科室,见下表,默认为推荐', tid: '亚专业,可在对应科室页 URL 中找到,默认为该科室的全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '资讯', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 下表为科室对应的 sid,若想获得 tid,可以到对应科室页面 URL 中寻找 \`t_id\` 字段的值,下面是一个例子: + + 如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5\&t_id=277) 的 URL 为 \`https://www.medsci.cn/department/details?s_id=5&t_id=277\`,可以看到此时 \`s_id\` 对应 \`sid\` 的值为 5, \`t_id\` 对应 \`tid\` 的值为 277,所以可以得到路由 [\`/medsci/5/277\`](https://rsshub.app/medsci/5/277) + ::: + + | 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 | + | ------ | ------ | ---- | ---- | ------ | + | 2 | 6 | 4 | 12 | 17 | + + | 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 | + | ------ | -------- | ------ | -------- | ------ | + | 9 | 13 | 14 | 15 | 21 | + + | 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 | + | -------- | -------- | -------- | -------- | ---- | + | 19 | 76 | 92 | 91 | 10 | + + | 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 | + | -------- | -------- | -------- | -------- | ------ | + | 23 | 24 | 25 | 26 | 27 | + + | 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 | + | ------ | -------- | ------ | -------- | ---- | + | 28 | 29 | 304 | 95 | 11 | + + | 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 | + | ---- | -------- | ------ | ---- | -------- | + | 18 | 30 | 31 | 32 | 33 | + + | 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 | + | -------- | -------- | ------ | ------ | ------ | + | 34 | 35 | 36 | 37 | 38 | + + | 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 | + | -------- | -------- | -------- | -------- | ---- | + | 39 | 40 | 42 | 69 | 79 | + + | 糖尿病 | 冠心病 | 肝病 | 乳腺癌 | + | ------ | ------ | ---- | ------ | + | 8 | 43 | 22 | 89 |`, +}; + +async function handler(ctx) { let sid = ctx.req.param('sid') ?? ''; const tid = ctx.req.param('tid') ?? ''; @@ -60,9 +120,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${sid ? $('.department-header-active').text() : '推荐'} -${tid ? ` ${$('.department-keywords-ul .active').text()} -` : ''} MedSci.cn`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/medsci/maintainer.ts b/lib/routes/medsci/maintainer.ts deleted file mode 100644 index ef13c7c6a..000000000 --- a/lib/routes/medsci/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:sid?/:tid?': ['nczitzk'], -}; diff --git a/lib/routes/medsci/namespace.ts b/lib/routes/medsci/namespace.ts new file mode 100644 index 000000000..934037825 --- /dev/null +++ b/lib/routes/medsci/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '梅斯医学 MedSci', + url: 'medsci.cn', +}; diff --git a/lib/routes/medsci/radar.ts b/lib/routes/medsci/radar.ts deleted file mode 100644 index 9791f67a9..000000000 --- a/lib/routes/medsci/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'medsci.cn': { - _name: '梅斯医学', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#mei-si-yi-xue-zi-xun', - source: ['/department/details', '/'], - target: (params) => `/medsci${params.s_id ? `/${params.s_id}${params.t_id ? `/${params.s_id}` : ''}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/medsci/router.ts b/lib/routes/medsci/router.ts deleted file mode 100644 index 8bd5fb4f1..000000000 --- a/lib/routes/medsci/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:sid?/:tid?', './index'); -}; diff --git a/lib/routes/metacritic/index.ts b/lib/routes/metacritic/index.ts index 636598ff9..6dcac3344 100644 --- a/lib/routes/metacritic/index.ts +++ b/lib/routes/metacritic/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import * as path from 'node:path'; import { sorts, types } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:sort?/:filter?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { type = 'game', sort = 'new', filter } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -108,7 +116,7 @@ export default async (ctx) => { const icon = new URL($('meta[data-hid="msapplication-task-metacritic"]').prop('content').split('icon-uri=').pop(), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -120,5 +128,5 @@ export default async (ctx) => { subtitle: $('meta[name="msapplication-tooltip"]').prop('content'), author: $('meta[name="twitter:site"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/metacritic/maintainer.ts b/lib/routes/metacritic/maintainer.ts deleted file mode 100644 index 545d7066c..000000000 --- a/lib/routes/metacritic/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/game/:sort?/:filter?': ['HenryQW', 'nczitzk'], - '/movie/:sort?/:filter?': ['nczitzk'], - '/tv/:sort?/:filter?': ['nczitzk'], -}; diff --git a/lib/routes/metacritic/namespace.ts b/lib/routes/metacritic/namespace.ts new file mode 100644 index 000000000..839c7172e --- /dev/null +++ b/lib/routes/metacritic/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Metacritic', + url: 'metacritic.com', +}; diff --git a/lib/routes/metacritic/radar.ts b/lib/routes/metacritic/radar.ts deleted file mode 100644 index f41a16c63..000000000 --- a/lib/routes/metacritic/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'metacritic.com': { - _name: 'Metacritic', - '.': [ - { - title: 'Games', - docs: 'https://docs.rsshub.app/routes/new-media#metacritic-games', - source: ['/browse/game/:params*'], - target: (params, url) => { - url = new URL(url); - const sort = params.params.split(/\//).pop(); - const filter = url.searchParams.toString(); - - return `/metacritic/game${sort ? `/${sort}${filter ? `/${filter}` : ''}` : ''}`; - }, - }, - { - title: 'Movies', - docs: 'https://docs.rsshub.app/routes/new-media#metacritic-movies', - source: ['/browse/movie/:params*'], - target: (params, url) => { - url = new URL(url); - const sort = params.params.split(/\//).pop(); - const filter = url.searchParams.toString(); - - return `/metacritic/movie${sort ? `/${sort}${filter ? `/${filter}` : ''}` : ''}`; - }, - }, - { - title: 'TV Shows', - docs: 'https://docs.rsshub.app/routes/new-media#metacritic-tv-shows', - source: ['/browse/tv/:params*'], - target: (params, url) => { - url = new URL(url); - const sort = params.params.split(/\//).pop(); - const filter = url.searchParams.toString(); - - return `/metacritic/tv${sort ? `/${sort}${filter ? `/${filter}` : ''}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/metacritic/release.ts b/lib/routes/metacritic/release.ts index e4c9d54ec..7f4b0170f 100644 --- a/lib/routes/metacritic/release.ts +++ b/lib/routes/metacritic/release.ts @@ -41,7 +41,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: toTitleCase(`Metacritic ${ctx.req.param('platform')} games ${title}`), link: url, item: result.map((item) => ({ @@ -49,5 +49,5 @@ export default async (ctx) => { description: `Release Date: ${item.date}
    Metacritic Score: ${item.metascore}
    User Score: ${item.userscore}
    `, link: item.url, })), - }); + }; }; diff --git a/lib/routes/metacritic/router.ts b/lib/routes/metacritic/router.ts deleted file mode 100644 index 61300f6d2..000000000 --- a/lib/routes/metacritic/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:sort?/:filter?', './'); -}; diff --git a/lib/routes/meteor/boards.ts b/lib/routes/meteor/boards.ts index 781151708..57836db98 100644 --- a/lib/routes/meteor/boards.ts +++ b/lib/routes/meteor/boards.ts @@ -1,12 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseUrl, getBoards } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/boards', + categories: ['bbs'], + example: '/meteor/boards', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['meteor.today/'], + }, + name: '看板列表', + maintainers: ['TonyRL'], + handler, + url: 'meteor.today/', +}; + +async function handler() { const items = await getBoards(cache.tryGet); - ctx.set('data', { + return { title: '看板列表', link: `${baseUrl}/board/all`, item: items, - }); -}; + }; +} diff --git a/lib/routes/meteor/index.ts b/lib/routes/meteor/index.ts index b09b2c63e..5d83fdd40 100644 --- a/lib/routes/meteor/index.ts +++ b/lib/routes/meteor/index.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, getBoards, renderDesc } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:board?', + categories: ['bbs'], + example: '/meteor/all', + parameters: { board: '看板 ID 或簡稱,可在 URL 或下方路由找到,預設為 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '看板', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { let { board = 'all' } = ctx.req.param(); const boards = await getBoards(cache.tryGet); @@ -36,11 +55,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${board === 'all' ? '全部看板' : boardInfo.title} | Meteor 學生社群`, description: board === 'all' ? null : boardInfo.feedDescription, image: board === 'all' ? null : boardInfo.imgUrl === 'not_set' ? null : boardInfo.imgUrl, link: `${board === 'all' ? `${baseUrl}/board/all` : boardInfo.link}/new`, item: items, - }); -}; + }; +} diff --git a/lib/routes/meteor/maintainer.ts b/lib/routes/meteor/maintainer.ts deleted file mode 100644 index 81bc0e68f..000000000 --- a/lib/routes/meteor/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/boards': ['TonyRL'], - '/:board?': ['TonyRL'], -}; diff --git a/lib/routes/meteor/namespace.ts b/lib/routes/meteor/namespace.ts new file mode 100644 index 000000000..b064b1926 --- /dev/null +++ b/lib/routes/meteor/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Meteor', + url: 'meteor.today', +}; diff --git a/lib/routes/meteor/radar.ts b/lib/routes/meteor/radar.ts deleted file mode 100644 index 3385845ed..000000000 --- a/lib/routes/meteor/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'meteor.today': { - _name: 'Meteor', - '.': [ - { - title: '看板', - docs: 'https://docs.rsshub.app/routes/bbs#meteor', - source: ['/board/:board', '/board/:board/new'], - target: '/meteor/board/:board', - }, - { - title: '看板列表', - docs: 'https://docs.rsshub.app/routes/bbs#meteor', - source: ['/'], - target: '/meteor/boards', - }, - ], - }, -}; diff --git a/lib/routes/meteor/router.ts b/lib/routes/meteor/router.ts deleted file mode 100644 index c4223ab36..000000000 --- a/lib/routes/meteor/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/boards', './boards'); - router.get('/:board?', './index'); -}; diff --git a/lib/routes/metmuseum/exhibitions.ts b/lib/routes/metmuseum/exhibitions.ts index 84d35e380..e2d2594ee 100644 --- a/lib/routes/metmuseum/exhibitions.ts +++ b/lib/routes/metmuseum/exhibitions.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -11,7 +12,14 @@ function generateExhibitionItem(result) { }; } -export default async (ctx) => { +export const route: Route = { + path: '/exhibitions/:state?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const searchType = ctx.req.param('state') ?? 'current'; const url = `https://www.metmuseum.org/ghidorah/ExhibitionListing/Search?searchType=${searchType}`; @@ -23,9 +31,9 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: 'The Metropolitan Museum of Art - Exhibitions', link: 'https://www.metmuseum.org/exhibitions', item: data.results.map((element) => generateExhibitionItem(element)), - }); -}; + }; +} diff --git a/lib/routes/metmuseum/maintainer.ts b/lib/routes/metmuseum/maintainer.ts deleted file mode 100644 index cfaf9ced0..000000000 --- a/lib/routes/metmuseum/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/exhibitions': ['chazeon'], -}; diff --git a/lib/routes/metmuseum/namespace.ts b/lib/routes/metmuseum/namespace.ts new file mode 100644 index 000000000..e2f6675de --- /dev/null +++ b/lib/routes/metmuseum/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'www.metmuseum.org', +}; diff --git a/lib/routes/metmuseum/radar.ts b/lib/routes/metmuseum/radar.ts deleted file mode 100644 index e56ea40b7..000000000 --- a/lib/routes/metmuseum/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'metmuseum.org': { - _name: 'The Metropolitan Museum of Art', - www: [ - { - title: 'Exhibitions', - docs: 'https://docs.rsshub.app/routes/travel#the-metropolitan-museum-of-art', - }, - ], - }, -}; diff --git a/lib/routes/metmuseum/router.ts b/lib/routes/metmuseum/router.ts deleted file mode 100644 index 80cefced5..000000000 --- a/lib/routes/metmuseum/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/exhibitions/:state?', './exhibitions'); -}; diff --git a/lib/routes/microsoft/addon.ts b/lib/routes/microsoft/addon.ts index 896af34a1..550696349 100644 --- a/lib/routes/microsoft/addon.ts +++ b/lib/routes/microsoft/addon.ts @@ -1,6 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/edge/addon/:crxid', + categories: ['program-update'], + example: '/microsoft/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln', + parameters: { crxid: 'Addon id, can be found in addon url' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['microsoftedge.microsoft.com/addons/detail/:name/:crxid'], + }, + name: 'Addons Update', + maintainers: ['hoilc', 'DIYgod'], + handler, +}; + +async function handler(ctx) { const crxid = ctx.req.param('crxid'); const page_url = `https://microsoftedge.microsoft.com/addons/detail/${crxid}`; @@ -13,7 +35,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `${data.name} - Microsoft Edge Addons`, description: data.shortDescription, image: `https:${data.thumbnail}`, @@ -28,5 +50,5 @@ export default async (ctx) => { link: page_url, }, ], - }); -}; + }; +} diff --git a/lib/routes/microsoft/maintainer.ts b/lib/routes/microsoft/maintainer.ts deleted file mode 100644 index 1959f717d..000000000 --- a/lib/routes/microsoft/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/edge/addon/:crxid': ['hoilc', 'DIYgod'], -}; diff --git a/lib/routes/microsoft/namespace.ts b/lib/routes/microsoft/namespace.ts new file mode 100644 index 000000000..74ca7a261 --- /dev/null +++ b/lib/routes/microsoft/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Microsoft Edge', + url: 'microsoftedge.microsoft.com', +}; diff --git a/lib/routes/microsoft/radar.ts b/lib/routes/microsoft/radar.ts deleted file mode 100644 index ffab80530..000000000 --- a/lib/routes/microsoft/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'microsoft.com': { - _name: 'Microsoft', - microsoftedge: [ - { - title: 'Addon Update', - source: '/addons/detail/:name/:crxid', - docs: 'https://docs.rsshub.app/routes/program-update#microsoft-edge', - target: '/microsoft/edge/addon/:crxid', - }, - ], - }, -}; diff --git a/lib/routes/microsoft/router.ts b/lib/routes/microsoft/router.ts deleted file mode 100644 index 84c39a043..000000000 --- a/lib/routes/microsoft/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/edge/addon/:crxid', './addon'); -}; diff --git a/lib/routes/mihoyo/bbs/follow-list.ts b/lib/routes/mihoyo/bbs/follow-list.ts index 39abe3b3e..6368763fd 100644 --- a/lib/routes/mihoyo/bbs/follow-list.ts +++ b/lib/routes/mihoyo/bbs/follow-list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,25 @@ import cache from './cache'; const renderDescription = (description, images) => art(path.join(__dirname, '../templates/description.art'), { description, images }); -export default async (ctx) => { +export const route: Route = { + path: '/bbs/follow-list/:uid', + categories: ['game'], + example: '/mihoyo/bbs/follow-list/77005350', + parameters: { uid: '用户uid' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '米游社 - 用户关注', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const page_size = ctx.req.query('limit') || '20'; const searchParams = { @@ -50,4 +69,4 @@ export default async (ctx) => { item: items, }; ctx.set('data', data); -}; +} diff --git a/lib/routes/mihoyo/bbs/img-ranking.ts b/lib/routes/mihoyo/bbs/img-ranking.ts index 5e19ece2b..de362ecb8 100644 --- a/lib/routes/mihoyo/bbs/img-ranking.ts +++ b/lib/routes/mihoyo/bbs/img-ranking.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { DATA_MAP, RANKING_TYPE_MAP } from './static-data'; import { post2item } from './utils'; @@ -38,7 +39,67 @@ const getRankingTypeInfo = (game, ranking_type) => { }; }; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/img-ranking/:game/:routeParams?', + categories: ['game'], + example: '/mihoyo/bbs/img-ranking/ys/forumType=tongren&cateType=illustration&rankingType=daily', + parameters: { game: '游戏缩写', routeParams: '额外参数;请参阅以下说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['miyoushe.com/:game/imgRanking/:forum_id/:ranking_id/:cate_id'], + target: '/bbs/img-ranking/:game', + }, + name: '米游社 - 同人榜', + maintainers: ['CaoMeiYouRen'], + handler, + description: `| 键 | 含义 | 接受的值 | 默认值 | + | ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ | + | forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren | + | cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration | + | rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily | + | lastId | 当前页 id(用于分页) | 数字 | 1 | + + 游戏缩写(目前绝区零还没有同人榜 + + | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 | + | ------ | ---- | ------ | ---------- | -------- | ------ | + | bh3 | ys | bh2 | wd | sr | dby | + + 主榜类型 + + | 同人榜 | COS 榜 | + | ------- | ------ | + | tongren | cos | + + 子榜类型 + + 崩坏三 子榜 + + | 插画 | 漫画 | COS | + | ------------ | ----- | --- | + | illustration | comic | cos | + + 原神 子榜 + + | 插画 | 漫画 | Q 版 | 手工 | + | ------------ | ----- | ---- | ------ | + | illustration | comic | qute | manual | + + 排行榜类型 + + | 日榜 | 周榜 | 月榜 | + | ----- | ------ | ------- | + | daily | weekly | monthly |`, +}; + +async function handler(ctx) { const game = ctx.req.param('game'); const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const { forumType: forum_type = 'tongren', cateType: cate_type, rankingType: ranking_type, lastId: last_id = '' } = routeParams; @@ -78,4 +139,4 @@ export default async (ctx) => { item: items, }; ctx.set('data', data); -}; +} diff --git a/lib/routes/mihoyo/bbs/official.ts b/lib/routes/mihoyo/bbs/official.ts index f4c62408e..55235369d 100644 --- a/lib/routes/mihoyo/bbs/official.ts +++ b/lib/routes/mihoyo/bbs/official.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { post2item } from './utils'; // 游戏id @@ -17,7 +18,36 @@ const TYPE_MAP = { 3: '资讯', }; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/official/:gids/:type?/:page_size?/:last_id?', + categories: ['game'], + example: '/mihoyo/bbs/official/2/3/20/', + parameters: { gids: '游戏id', type: '公告类型,默认为 2(即 活动)', page_size: '分页大小,默认为 20 ', last_id: '跳过的公告数,例如指定为 40 就是从第 40 条公告开始,可用于分页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '米游社 - 官方公告', + maintainers: ['CaoMeiYouRen'], + handler, + description: `游戏 id + + | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 | + | ------ | ---- | ------ | ---------- | -------- | ------ | + | 1 | 2 | 3 | 4 | 6 | 8 | + + 公告类型 + + | 公告 | 活动 | 资讯 | + | ---- | ---- | ---- | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const { gids, type = '2', page_size = '20', last_id = '' } = ctx.req.param(); const query = new URLSearchParams({ gids, @@ -43,4 +73,4 @@ export default async (ctx) => { }; ctx.set('data', data); -}; +} diff --git a/lib/routes/mihoyo/bbs/timeline.ts b/lib/routes/mihoyo/bbs/timeline.ts index c66c5c9db..7bc711190 100644 --- a/lib/routes/mihoyo/bbs/timeline.ts +++ b/lib/routes/mihoyo/bbs/timeline.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; import { config } from '@/config'; import { post2item } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/timeline', + categories: ['game'], + example: '/mihoyo/bbs/timeline', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['miyoushe.com/:game/timeline'], + }, + name: '米游社 - 用户关注动态', + maintainers: ['CaoMeiYouRen'], + handler, + description: `:::warning + 用户关注动态需要米游社登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler(ctx) { if (!config.mihoyo.cookie) { throw new Error('Miyoushe Timeline is not available due to the absense of [Miyoushe Cookie]. Check relevant config tutorial'); } @@ -38,4 +63,4 @@ export default async (ctx) => { item: items, }; ctx.set('data', data); -}; +} diff --git a/lib/routes/mihoyo/bbs/user-post.ts b/lib/routes/mihoyo/bbs/user-post.ts index 7e394bb6e..00365ba6c 100644 --- a/lib/routes/mihoyo/bbs/user-post.ts +++ b/lib/routes/mihoyo/bbs/user-post.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { post2item } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/user-post/:uid', + categories: ['game'], + example: '/mihoyo/bbs/user-post/77005350', + parameters: { uid: '用户uid' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '米游社 - 用户帖子', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const size = ctx.req.query('limit') || '20'; const searchParams = { @@ -29,4 +48,4 @@ export default async (ctx) => { item: items, }; ctx.set('data', data); -}; +} diff --git a/lib/routes/mihoyo/maintainer.ts b/lib/routes/mihoyo/maintainer.ts deleted file mode 100644 index 4ddbdbbbf..000000000 --- a/lib/routes/mihoyo/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/bbs/follow-list/:uid': ['CaoMeiYouRen'], - '/bbs/img-ranking/:game/:routeParams?': ['CaoMeiYouRen'], - '/bbs/official/:gids/:type?/:page_size?/:last_id?': ['CaoMeiYouRen'], - '/bbs/timeline': ['CaoMeiYouRen'], - '/bbs/user-post/:uid': ['CaoMeiYouRen'], - '/sr/:location?/:category?': ['shinanory'], - '/ys/:location?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/mihoyo/namespace.ts b/lib/routes/mihoyo/namespace.ts new file mode 100644 index 000000000..ba70ba417 --- /dev/null +++ b/lib/routes/mihoyo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '米哈游', + url: 'genshin.hoyoverse.com', +}; diff --git a/lib/routes/mihoyo/radar.ts b/lib/routes/mihoyo/radar.ts deleted file mode 100644 index 6f5b1b1f6..000000000 --- a/lib/routes/mihoyo/radar.ts +++ /dev/null @@ -1,101 +0,0 @@ -const bbs = [ - { - title: '米游社 - 用户关注', - docs: 'https://docs.rsshub.app/routes/game#mi-ha-you', - source: '/:game/accountCenter/postList', - target: (params, url) => { - const uid = new URL(url).searchParams.get('id'); - return `/mihoyo/bbs/follow-list/${uid}`; - }, - }, - { - title: '米游社 - 同人榜', - docs: 'https://docs.rsshub.app/routes/game#mi-ha-you', - source: '/:game/imgRanking/:forum_id/:ranking_id/:cate_id', - target: `/mihoyo/bbs/img-ranking/:game`, - }, - { - title: '米游社 - 官方公告', - docs: 'https://docs.rsshub.app/routes/game#mi-ha-you', - source: ['/:game/home/28', '/:game/home/6', '/:game/home/31', '/:game/home/33', '/:game/home/53', '/:game/home/58'], - target: (params, url) => { - const GITS_MAP = { - bh3: 1, // '崩坏三', - ys: 2, // '原神', - bh2: 3, // '崩坏二', - wd: 4, // '未定事件簿', - sr: 6, // '崩坏:星穹铁道', - zzz: 8, // '绝区零' - }; - const { game } = params; - const gids = GITS_MAP[game]; - if (!gids) { - return ''; - } - const type = new URL(url).searchParams.get('type') || '1'; - const page_size = '20'; - const last_id = ''; - return `/mihoyo/bbs/official/${gids}/${type}/${page_size}/${last_id}`; - }, - }, - { - title: '米游社 - 用户帖子', - docs: 'https://docs.rsshub.app/routes/game#mi-ha-you', - source: '/:game/accountCenter/postList', - target: (params, url) => { - const uid = new URL(url).searchParams.get('id'); - return `/mihoyo/bbs/user-post/${uid}`; - }, - }, - { - title: '米游社 - 用户关注动态', - docs: 'https://docs.rsshub.app/routes/game#mi-ha-you', - source: '/:game/timeline', - target: '/mihoyo/bbs/timeline', - }, -]; -export default { - 'hoyoverse.com': { - _name: '米哈游', - genshin: [ - { - title: '原神 - 新闻', - docs: 'https://docs.rsshub.app/routes/game##mi-ha-you', - source: '/:location/news', - target: '/mihoyo/ys/:location', - }, - ], - hsr: [ - { - title: '崩坏:星穹铁道 - 新闻', - docs: 'https://docs.rsshub.app/routes/game##mi-ha-you', - source: '/:location/news', - target: '/mihoyo/sr/:location', - }, - ], - }, - 'mihoyo.com': { - _name: '米哈游', - bbs, - sr: [ - { - title: '崩坏:星穹铁道 - 新闻', - docs: 'https://docs.rsshub.app/routes/game##mi-ha-you', - source: '/news', - target: '/mihoyo/sr', - }, - ], - ys: [ - { - title: '原神 - 新闻', - docs: 'https://docs.rsshub.app/routes/game##mi-ha-you', - source: '/:location/news/:category', - target: '/mihoyo/ys/:location/:category', - }, - ], - }, - 'miyoushe.com': { - _name: '米游社', - '.': bbs, - }, -}; diff --git a/lib/routes/mihoyo/router.ts b/lib/routes/mihoyo/router.ts deleted file mode 100644 index b4a4f2583..000000000 --- a/lib/routes/mihoyo/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/bbs/follow-list/:uid', './bbs/follow-list'); - router.get('/bbs/img-ranking/:game/:routeParams?', './bbs/img-ranking'); - router.get('/bbs/official/:gids/:type?/:page_size?/:last_id?', './bbs/official'); - router.get('/bbs/timeline', './bbs/timeline'); - router.get('/bbs/user-post/:uid', './bbs/user-post'); - router.get('/sr/:location?/:category?', './sr/news'); - router.get('/ys/:location?/:category?', './ys/news'); -}; diff --git a/lib/routes/mihoyo/sr/news.ts b/lib/routes/mihoyo/sr/news.ts index 41ab69ffc..9a1605b70 100644 --- a/lib/routes/mihoyo/sr/news.ts +++ b/lib/routes/mihoyo/sr/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -42,7 +43,35 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/sr/:location?/:category?', + categories: ['game'], + example: '/mihoyo/sr', + parameters: { location: '区域,可选 `zh-cn`(国服,简中)或 `zh-tw`(国际服,繁中)', category: '分类,见下表,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sr.mihoyo.com/news'], + target: '/sr', + }, + name: '崩坏:星穹铁道', + maintainers: ['shinanory'], + handler, + url: 'sr.mihoyo.com/news', + description: `#### 新闻 {#mi-ha-you-beng-huai-xing-qiong-tie-dao-xin-wen} + + | 最新 | 新闻 | 公告 | 活动 | + | -------- | ---- | ------ | -------- | + | news-all | news | notice | activity |`, +}; + +async function handler(ctx) { // location 地区 category 类型 const { location = 'zh-cn', category = 'news-all' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -61,9 +90,9 @@ export default async (ctx) => { category: item.sCategoryName, })); - ctx.set('data', { + return { title: `${categories[location][category].title}-崩坏:星穹铁道`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/mihoyo/ys/news.ts b/lib/routes/mihoyo/ys/news.ts index 861595d57..8e2ab9200 100644 --- a/lib/routes/mihoyo/ys/news.ts +++ b/lib/routes/mihoyo/ys/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -79,7 +80,34 @@ const apiUrls = { 'zh-tw': '/content_v2_user/app/a1b1f9d3315447cc/getContentList', }; -export default async (ctx) => { +export const route: Route = { + path: '/ys/:location?/:category?', + categories: ['game'], + example: '/mihoyo/ys', + parameters: { location: '区域,可选 `main`(简中)或 `zh-tw`(繁中)', category: '分类,见下表,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['genshin.hoyoverse.com/:location/news'], + target: '/ys/:location', + }, + name: '原神', + maintainers: ['nczitzk'], + handler, + description: `#### 新闻 {#mi-ha-you-yuan-shen-xin-wen} + + | 最新 | 新闻 | 公告 | 活动 | + | ------ | ---- | ------ | -------- | + | latest | news | notice | activity |`, +}; + +async function handler(ctx) { const location = ctx.req.param('location') ?? 'main'; const category = ctx.req.param('category') ?? 'latest'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; @@ -157,9 +185,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `原神 - ${categories[category][location].title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mindmeister/example.ts b/lib/routes/mindmeister/example.ts index ff10677e1..67d76c4d3 100644 --- a/lib/routes/mindmeister/example.ts +++ b/lib/routes/mindmeister/example.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,54 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const baseUrl = 'https://www.mindmeister.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:language?', + categories: ['study'], + example: '/mindmeister/mind-map-examples', + parameters: { category: 'Categories, see the table below, `mind-map-examples` by default', language: 'Languages, see the table below, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Public Maps', + maintainers: ['TonyRL'], + handler, + description: `| Categories | parameter | + | ------------- | ----------------- | + | Featured Map | mind-map-examples | + | Business | business | + | Design | design | + | Education | education | + | Entertainment | entertainment | + | Life | life | + | Marketing | marketing | + | Productivity | productivity | + | Summaries | summaries | + | Technology | technology | + | Other | other | + + | Languages | parameter | + | ---------- | --------- | + | English | en | + | Deutsch | de | + | Français | fr | + | Español | es | + | Português | pt | + | Nederlands | nl | + | Dansk | da | + | Русский | ru | + | 日本語 | ja | + | Italiano | it | + | 简体中文 | zh | + | 한국어 | ko | + | Other | other |`, +}; + +async function handler(ctx) { const { category = 'mind-map-examples', language = 'en' } = ctx.req.param(); const link = `${baseUrl}${language === 'en' || language === 'other' ? '' : `/${language}`}/${category === 'mind-map-examples' ? category : `mind-maps/${category}?language=${language}`}`; const respsonse = await got(link); @@ -37,11 +85,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name=description]').text(), link, item: items, language, - }); -}; + }; +} diff --git a/lib/routes/mindmeister/maintainer.ts b/lib/routes/mindmeister/maintainer.ts deleted file mode 100644 index f8543b7a4..000000000 --- a/lib/routes/mindmeister/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:language?': ['TonyRL'], -}; diff --git a/lib/routes/mindmeister/namespace.ts b/lib/routes/mindmeister/namespace.ts new file mode 100644 index 000000000..079a1a78f --- /dev/null +++ b/lib/routes/mindmeister/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MindMeister', + url: 'mindmeister.com', +}; diff --git a/lib/routes/mindmeister/radar.ts b/lib/routes/mindmeister/radar.ts deleted file mode 100644 index d4264e4b2..000000000 --- a/lib/routes/mindmeister/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mindmeister.com': { - _name: 'MindMeister', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/study#mindmeister', - source: ['/:language/mind-maps/:category', '/:language/:category', '/:category'], - target: (params) => `/mindmeister/${params.category}${params.language ? `/${params.language}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/mindmeister/router.ts b/lib/routes/mindmeister/router.ts deleted file mode 100644 index 6b11823f5..000000000 --- a/lib/routes/mindmeister/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:language?', './example'); -}; diff --git a/lib/routes/minecraft/maintainer.ts b/lib/routes/minecraft/maintainer.ts deleted file mode 100644 index 9f0f0979b..000000000 --- a/lib/routes/minecraft/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/version': ['TheresaQWQ'], -}; diff --git a/lib/routes/minecraft/namespace.ts b/lib/routes/minecraft/namespace.ts new file mode 100644 index 000000000..f02a2ec81 --- /dev/null +++ b/lib/routes/minecraft/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Minecraft', + url: 'minecraft.net', +}; diff --git a/lib/routes/minecraft/radar.ts b/lib/routes/minecraft/radar.ts deleted file mode 100644 index d6896e1b9..000000000 --- a/lib/routes/minecraft/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'minecraft.net': { - _name: '我的世界', - '.': [ - { - title: 'Java 版游戏更新', - docs: 'https://docs.rsshub.app/routes/game#minecraft', - source: ['/'], - target: '/minecraft/version', - }, - ], - }, -}; diff --git a/lib/routes/minecraft/router.ts b/lib/routes/minecraft/router.ts deleted file mode 100644 index 66109a201..000000000 --- a/lib/routes/minecraft/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/version', './version'); -}; diff --git a/lib/routes/minecraft/version.ts b/lib/routes/minecraft/version.ts index 10a717a5d..9d402057a 100644 --- a/lib/routes/minecraft/version.ts +++ b/lib/routes/minecraft/version.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/version', + categories: ['game'], + example: '/minecraft/version', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['minecraft.net/'], + }, + name: 'Java Game Update', + maintainers: ['TheresaQWQ'], + handler, + url: 'minecraft.net/', +}; + +async function handler() { const url = 'https://launchermeta.mojang.com/mc/game/version_manifest.json'; const response = await got({ @@ -19,7 +42,7 @@ export default async (ctx) => { const title = `Minecraft Java版游戏更新`; - ctx.set('data', { + return { title, link: `https://www.minecraft.net/`, description: title, @@ -30,5 +53,5 @@ export default async (ctx) => { link: `https://www.minecraft.net`, guid: item.id + item.type, })), - }); -}; + }; +} diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index 3d7924514..f24b9b82f 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -21,7 +22,14 @@ const renderDesc = (media, desc) => desc, }); -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:category?', + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'ins'; const category = ctx.req.param('category') ?? (type === 'ins' ? 'all' : 's00001'); const link = `https://news.mingpao.com/rss/${type}/${category}.xml`; @@ -92,12 +100,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, image: feed.image.url, language: feed.language, - }); -}; + }; +} diff --git a/lib/routes/mingpao/maintainer.ts b/lib/routes/mingpao/maintainer.ts deleted file mode 100644 index c842f4d7a..000000000 --- a/lib/routes/mingpao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:category?': ['TonyRL'], -}; diff --git a/lib/routes/mingpao/namespace.ts b/lib/routes/mingpao/namespace.ts new file mode 100644 index 000000000..b50003246 --- /dev/null +++ b/lib/routes/mingpao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Ming Pao 明报', + url: 'mingpao.com', +}; diff --git a/lib/routes/mingpao/radar.ts b/lib/routes/mingpao/radar.ts deleted file mode 100644 index 7114215f6..000000000 --- a/lib/routes/mingpao/radar.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - 'mingpao.com': { - _name: '明报', - '.': [ - { - title: '即时新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#ming-bao', - source: ['/'], - target: '/mingpao/ins/:type?', - }, - { - title: '每日明报', - docs: 'https://docs.rsshub.app/routes/traditional-media#ming-bao', - source: ['/'], - target: '/mingpao/pns/:type?', - }, - ], - }, - 'mpfinance.com': { - _name: '明报', - '.': [ - { - title: '即时新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#ming-bao', - source: ['/'], - target: '/mingpao/ins/:type?', - }, - { - title: '每日明报', - docs: 'https://docs.rsshub.app/routes/traditional-media#ming-bao', - source: ['/'], - target: '/mingpao/pns/:type?', - }, - ], - }, -}; diff --git a/lib/routes/mingpao/router.ts b/lib/routes/mingpao/router.ts deleted file mode 100644 index 8591b5062..000000000 --- a/lib/routes/mingpao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:category?', './index'); -}; diff --git a/lib/routes/mirror/index.ts b/lib/routes/mirror/index.ts index 0e36a74b5..8dc33bc21 100644 --- a/lib/routes/mirror/index.ts +++ b/lib/routes/mirror/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; @@ -7,7 +8,25 @@ const md = MarkdownIt({ }); import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['new-media'], + example: '/mirror/tingfei.eth', + parameters: { id: 'user id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User', + maintainers: ['fifteen42', 'rde9', 'nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); if (!id.endsWith('.eth') && !isValidHost(id)) { throw new Error('Invalid id'); @@ -32,11 +51,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${data.props.pageProps.publicationLayoutProject.displayName} - Mirror`, description: data.props.pageProps.publicationLayoutProject.description, image: data.props.pageProps.publicationLayoutProject.avatarURL, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mirror/maintainer.ts b/lib/routes/mirror/maintainer.ts deleted file mode 100644 index 094bf149d..000000000 --- a/lib/routes/mirror/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['fifteen42', 'rde9', 'nczitzk'], -}; diff --git a/lib/routes/mirror/namespace.ts b/lib/routes/mirror/namespace.ts new file mode 100644 index 000000000..017ce9fb8 --- /dev/null +++ b/lib/routes/mirror/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Mirror', + url: 'mirror.xyz', +}; diff --git a/lib/routes/mirror/radar.ts b/lib/routes/mirror/radar.ts deleted file mode 100644 index b4aadbb9b..000000000 --- a/lib/routes/mirror/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'mirror.xyz': { - _name: 'Mirror', - '.': [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/new-media#mirror-user', - source: ['/:id', '/'], - target: (params, url) => { - const matches = new URL(url).toString().match(/https:\/\/(.*?)\.mirror\.xyz/); - const id = matches ? matches[1] : params.id; - return `/mirror/${id}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/mirror/router.ts b/lib/routes/mirror/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/mirror/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/missav/maintainer.ts b/lib/routes/missav/maintainer.ts deleted file mode 100644 index d9dd75bdc..000000000 --- a/lib/routes/missav/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/new': ['TonyRL'], -}; diff --git a/lib/routes/missav/namespace.ts b/lib/routes/missav/namespace.ts new file mode 100644 index 000000000..a0216d376 --- /dev/null +++ b/lib/routes/missav/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MissAV.com', + url: 'missav.com', +}; diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.ts index 48a579d6e..3b66e54b3 100644 --- a/lib/routes/missav/new.ts +++ b/lib/routes/missav/new.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/new', + categories: ['multimedia'], + example: '/missav/new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['missav.com/dm397/new', 'missav.com/new', 'missav.com/'], + }, + name: '最近更新', + maintainers: ['TonyRL'], + handler, + url: 'missav.com/dm397/new', +}; + +async function handler() { const baseUrl = 'https://missav.com'; const { data: response } = await got(`${baseUrl}/dm397/new`); const $ = load(response); @@ -30,10 +53,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/missav/radar.ts b/lib/routes/missav/radar.ts deleted file mode 100644 index 2b1729427..000000000 --- a/lib/routes/missav/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'missav.com': { - _name: 'MissAV.com', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/multimedia#missav-com', - source: ['/dm397/new', '/new', '/'], - target: '/missav/new', - }, - ], - }, -}; diff --git a/lib/routes/missav/router.ts b/lib/routes/missav/router.ts deleted file mode 100644 index b850a6c37..000000000 --- a/lib/routes/missav/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new', './new'); -}; diff --git a/lib/routes/misskey/featured-notes.ts b/lib/routes/misskey/featured-notes.ts index 4a6bb1d2c..5fa9d8c11 100644 --- a/lib/routes/misskey/featured-notes.ts +++ b/lib/routes/misskey/featured-notes.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/featured/:site', + categories: ['social-media'], + example: '/misskey/notes/featured/misskey.io', + parameters: { site: 'instance address, domain only, without `http://` or `https://` protocol header' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Featured Notes', + maintainers: ['Misaka13514'], + handler, +}; + +async function handler(ctx) { const site = ctx.req.param('site'); if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { throw new Error(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); @@ -21,9 +40,9 @@ export default async (ctx) => { const list = response.data; - ctx.set('data', { + return { title: `Featured Notes on ${site}`, link: `https://${site}/explore`, item: utils.parseNotes(list, site), - }); -}; + }; +} diff --git a/lib/routes/misskey/maintainer.ts b/lib/routes/misskey/maintainer.ts deleted file mode 100644 index 8c6281e6e..000000000 --- a/lib/routes/misskey/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/notes/featured/:site': ['Misaka13514'], -}; diff --git a/lib/routes/misskey/namespace.ts b/lib/routes/misskey/namespace.ts new file mode 100644 index 000000000..2851e1f58 --- /dev/null +++ b/lib/routes/misskey/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Misskey', + url: 'misskey.io', +}; diff --git a/lib/routes/misskey/radar.ts b/lib/routes/misskey/radar.ts deleted file mode 100644 index 063372e3b..000000000 --- a/lib/routes/misskey/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'misskey.io': { - _name: 'Misskey', - '.': [ - { - title: 'Featured Notes', - docs: 'https://docs.rsshub.app/routes/social-media#misskey', - source: ['/explore'], - target: '/misskey/notes/featured/misskey.io', - }, - ], - }, - 'madost.one': { - _name: 'Misskey', - '.': [ - { - title: 'Featured Notes', - docs: 'https://docs.rsshub.app/routes/social-media#misskey', - source: ['/explore'], - target: '/misskey/notes/featured/madost.one', - }, - ], - }, - 'mk.nixnet.social': { - _name: 'Misskey', - '.': [ - { - title: 'Featured Notes', - docs: 'https://docs.rsshub.app/routes/social-media#misskey', - source: ['/explore'], - target: '/misskey/notes/featured/mk.nixnet.social', - }, - ], - }, -}; diff --git a/lib/routes/misskey/router.ts b/lib/routes/misskey/router.ts deleted file mode 100644 index e91487e3f..000000000 --- a/lib/routes/misskey/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/notes/featured/:site', './featured-notes'); -}; diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index 464c41cff..e1828b015 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['new-media'], + example: '/mittrchina/index', + parameters: { type: '类型,见下表,默认为首页资讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['EsuRt', 'queensferryme'], + handler, + description: `| 快讯 | 本周热文 | 首页资讯 | 视频 | + | -------- | -------- | -------- | ----- | + | breaking | hot | index | video |`, +}; + +async function handler(ctx) { const typeMap = { breaking: { title: '快讯', @@ -95,9 +117,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `MIT 科技评论 - ${typeMap[type].title}`, link: `https://www.mittrchina.com/${type}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/mittrchina/maintainer.ts b/lib/routes/mittrchina/maintainer.ts deleted file mode 100644 index e467a364e..000000000 --- a/lib/routes/mittrchina/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['EsuRt', 'queensferryme'], -}; diff --git a/lib/routes/mittrchina/namespace.ts b/lib/routes/mittrchina/namespace.ts new file mode 100644 index 000000000..de5d9694d --- /dev/null +++ b/lib/routes/mittrchina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '麻省理工科技评论', + url: 'mittrchina.com', +}; diff --git a/lib/routes/mittrchina/radar.ts b/lib/routes/mittrchina/radar.ts deleted file mode 100644 index ee3db2e42..000000000 --- a/lib/routes/mittrchina/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'mittrchina.com': { - _name: '麻省理工科技评论', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#ma-sheng-li-gong-ke-ji-ping-lun', - source: ['/', '/news'], - target: '/mittrchina/index', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#ma-sheng-li-gong-ke-ji-ping-lun', - source: ['/', '/breaking'], - target: '/mittrchina/breaking', - }, - { - title: '本周热文', - docs: 'https://docs.rsshub.app/routes/new-media#ma-sheng-li-gong-ke-ji-ping-lun', - source: ['/'], - target: '/mittrchina/hot', - }, - { - title: '视频', - docs: 'https://docs.rsshub.app/routes/new-media#ma-sheng-li-gong-ke-ji-ping-lun', - source: ['/', '/video'], - target: '/mittrchina/video', - }, - ], - }, -}; diff --git a/lib/routes/mittrchina/router.ts b/lib/routes/mittrchina/router.ts deleted file mode 100644 index e2f6d76d3..000000000 --- a/lib/routes/mittrchina/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './'); -}; diff --git a/lib/routes/mixcloud/index.ts b/lib/routes/mixcloud/index.ts index 03c81af6a..5c8ef282d 100644 --- a/lib/routes/mixcloud/index.ts +++ b/lib/routes/mixcloud/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import CryptoJS from 'crypto-js'; import { parseDate } from '@/utils/parse-date'; import { queries } from './queries'; -export default async (ctx) => { +export const route: Route = { + path: '/:username/:type?', + categories: ['multimedia'], + example: '/mixcloud/dholbach/uploads', + parameters: { username: 'Username, can be found in URL', type: 'Type, see below, uploads by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: 'User', + maintainers: ['Misaka13514'], + handler, + description: `| Shows | Favorites | History | Stream | + | ------- | --------- | ------- | ------ | + | uploads | favorites | listens | stream |`, +}; + +async function handler(ctx) { const host = 'https://www.mixcloud.com'; const imageBaseURL = 'https://thumbnailer.mixcloud.com/unsafe/480x480/'; const graphqlURL = 'https://app.mixcloud.com/graphql'; @@ -102,12 +124,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Mixcloud - ${data.user.displayName}'s ${config[type].name}`, description: biog.replaceAll('\n', '
    '), itunes_author: data.user.displayName, image, link: `${host}/${username}/${type}/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/mixcloud/maintainer.ts b/lib/routes/mixcloud/maintainer.ts deleted file mode 100644 index 559146535..000000000 --- a/lib/routes/mixcloud/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:username/:type?': ['Misaka13514'], -}; diff --git a/lib/routes/mixcloud/namespace.ts b/lib/routes/mixcloud/namespace.ts new file mode 100644 index 000000000..fc6d82260 --- /dev/null +++ b/lib/routes/mixcloud/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Mixcloud', + url: 'www.mixcloud.com', +}; diff --git a/lib/routes/mixcloud/radar.ts b/lib/routes/mixcloud/radar.ts deleted file mode 100644 index a3a9f1aae..000000000 --- a/lib/routes/mixcloud/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'mixcloud.com': { - _name: 'Mixcloud', - www: [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/multimedia#mixcloud', - source: ['/:username/:type?'], - target: (params) => { - if (params.username !== undefined) { - if (['stream', 'uploads', 'favorites', 'listens'].includes(params.type)) { - return `/mixcloud/${params.username}/${params.type}`; - } else if (params.type === undefined) { - return `/mixcloud/${params.username}/uploads`; - } - } - }, - }, - ], - '.': [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/multimedia#mixcloud', - source: ['/:username/:type?'], - target: (params) => { - if (params.username !== undefined) { - if (['stream', 'uploads', 'favorites', 'listens'].includes(params.type)) { - return `/mixcloud/${params.username}/${params.type}`; - } else if (params.type === undefined) { - return `/mixcloud/${params.username}/uploads`; - } - } - }, - }, - ], - }, -}; diff --git a/lib/routes/mixcloud/router.ts b/lib/routes/mixcloud/router.ts deleted file mode 100644 index 2d7a70a21..000000000 --- a/lib/routes/mixcloud/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:username/:type?', './index'); -}; diff --git a/lib/routes/modb/maintainer.ts b/lib/routes/modb/maintainer.ts deleted file mode 100644 index c3f4210f0..000000000 --- a/lib/routes/modb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:id': ['yueneiqi'], -}; diff --git a/lib/routes/modb/namespace.ts b/lib/routes/modb/namespace.ts new file mode 100644 index 000000000..1cbe88ce5 --- /dev/null +++ b/lib/routes/modb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '墨天轮', + url: 'modb.pro', +}; diff --git a/lib/routes/modb/radar.ts b/lib/routes/modb/radar.ts deleted file mode 100644 index 2412e96d5..000000000 --- a/lib/routes/modb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'modb.pro': { - _name: '墨天轮', - '.': [ - { - title: '合辑', - docs: 'https://docs.rsshub.app/routes/programming#mo-tian-lun', - source: ['/', '/topic/:id'], - target: (params) => `/modb/topic/${params.id}`, - }, - ], - }, -}; diff --git a/lib/routes/modb/router.ts b/lib/routes/modb/router.ts deleted file mode 100644 index b9f5c8ad5..000000000 --- a/lib/routes/modb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:id', './topic'); -}; diff --git a/lib/routes/modb/topic.ts b/lib/routes/modb/topic.ts index 1cc16a91f..696669421 100644 --- a/lib/routes/modb/topic.ts +++ b/lib/routes/modb/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -5,7 +6,25 @@ import logger from '@/utils/logger'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id', + categories: ['programming'], + example: '/modb/topic/44158', + parameters: { id: '合辑序号' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '合辑', + maintainers: ['yueneiqi'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://www.modb.pro'; const topicId = ctx.req.param('id'); const response = await got({ @@ -52,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '墨天轮合辑', link: `${baseUrl}/topic/${topicId}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/modelscope/community.ts b/lib/routes/modelscope/community.ts index 02c271cf6..49a95ffab 100644 --- a/lib/routes/modelscope/community.ts +++ b/lib/routes/modelscope/community.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/community', + categories: ['programming'], + example: '/modelscope/community', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['community.modelscope.cn/'], + }, + name: 'DevPress 官方社区', + maintainers: ['TonyRL'], + handler, + url: 'community.modelscope.cn/', +}; + +async function handler(ctx) { const baseUrl = 'https://community.modelscope.cn'; const { data } = await got.post(`${baseUrl}/v1/namespace_page/article`, { @@ -49,11 +72,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'ModelScope魔搭社区-DevPress官方社区', description: 'ModelScope魔搭社区 DevPress官方社区-ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单。', image: 'https://g.alicdn.com/sail-web/maas/0.8.10/favicon/128.ico', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/modelscope/datasets.ts b/lib/routes/modelscope/datasets.ts index d61ef74ac..77b64a3a5 100644 --- a/lib/routes/modelscope/datasets.ts +++ b/lib/routes/modelscope/datasets.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,29 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/datasets', + categories: ['programming'], + example: '/modelscope/datasets', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['modelscope.cn/datasets'], + }, + name: '数据集', + maintainers: ['TonyRL'], + handler, + url: 'modelscope.cn/datasets', +}; + +async function handler(ctx) { const baseUrl = 'https://modelscope.cn'; const link = `${baseUrl}/datasets`; @@ -50,11 +73,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '数据集首页 · 魔搭社区', description: 'ModelScope——汇聚各领域先进的机器学习模型,提供模型探索体验、推理、训练、部署和应用的一站式服务。在这里,共建模型开源社区,发现、学习、定制和分享心仪的模型。', image: 'https://g.alicdn.com/sail-web/maas/0.8.10/favicon/128.ico', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/modelscope/maintainer.ts b/lib/routes/modelscope/maintainer.ts deleted file mode 100644 index bf7c4e9b7..000000000 --- a/lib/routes/modelscope/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/community': ['TonyRL'], - '/datasets': ['TonyRL'], - '/models': ['TonyRL'], - '/studios': ['TonyRL'], -}; diff --git a/lib/routes/modelscope/models.ts b/lib/routes/modelscope/models.ts index 46f58ad10..c22f38f7e 100644 --- a/lib/routes/modelscope/models.ts +++ b/lib/routes/modelscope/models.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import MarkdownIt from 'markdown-it'; @@ -7,7 +8,29 @@ const md = MarkdownIt({ }); import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/models', + categories: ['programming'], + example: '/modelscope/models', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['modelscope.cn/models'], + }, + name: '模型库', + maintainers: ['TonyRL'], + handler, + url: 'modelscope.cn/models', +}; + +async function handler(ctx) { const baseUrl = 'https://modelscope.cn'; const link = `${baseUrl}/models`; @@ -37,11 +60,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '模型库首页 · 魔搭社区', description: 'ModelScope——汇聚各领域先进的机器学习模型,提供模型探索体验、推理、训练、部署和应用的一站式服务。在这里,共建模型开源社区,发现、学习、定制和分享心仪的模型。', image: 'https://g.alicdn.com/sail-web/maas/0.8.10/favicon/128.ico', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/modelscope/namespace.ts b/lib/routes/modelscope/namespace.ts new file mode 100644 index 000000000..1bd398f85 --- /dev/null +++ b/lib/routes/modelscope/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ModelScope 魔搭社区', + url: 'modelscope.cn', +}; diff --git a/lib/routes/modelscope/radar.ts b/lib/routes/modelscope/radar.ts deleted file mode 100644 index 17a37d7f1..000000000 --- a/lib/routes/modelscope/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'modelscope.cn': { - _name: 'ModelScope 魔搭社区', - '.': [ - { - title: '数据集', - docs: 'https://docs.rsshub.app/routes/programming#modelscope-mo-da-she-qu', - source: ['/datasets'], - target: '/modelscope/datasets', - }, - { - title: '模型库', - docs: 'https://docs.rsshub.app/routes/programming#modelscope-mo-da-she-qu', - source: ['/models'], - target: '/modelscope/models', - }, - { - title: '创空间', - docs: 'https://docs.rsshub.app/routes/programming#modelscope-mo-da-she-qu', - source: ['/studios'], - target: '/modelscope/studios', - }, - ], - community: [ - { - title: 'DevPress 官方社区', - docs: 'https://docs.rsshub.app/routes/programming#modelscope-mo-da-she-qu', - source: ['/'], - target: '/modelscope/community', - }, - ], - }, -}; diff --git a/lib/routes/modelscope/router.ts b/lib/routes/modelscope/router.ts deleted file mode 100644 index 5ef5a762a..000000000 --- a/lib/routes/modelscope/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/community', './community'); - router.get('/datasets', './datasets'); - router.get('/models', './models'); - router.get('/studios', './studios'); -}; diff --git a/lib/routes/modelscope/studios.ts b/lib/routes/modelscope/studios.ts index a2cdb823e..f2118bfbe 100644 --- a/lib/routes/modelscope/studios.ts +++ b/lib/routes/modelscope/studios.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,29 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/studios', + categories: ['programming'], + example: '/modelscope/studios', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['modelscope.cn/studios'], + }, + name: '创空间', + maintainers: ['TonyRL'], + handler, + url: 'modelscope.cn/studios', +}; + +async function handler(ctx) { const baseUrl = 'https://modelscope.cn'; const link = `${baseUrl}/studios`; @@ -52,11 +75,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '创空间首页 · 魔搭社区', description: 'ModelScope——汇聚各领域先进的机器学习模型,提供模型探索体验、推理、训练、部署和应用的一站式服务。在这里,共建模型开源社区,发现、学习、定制和分享心仪的模型。', image: 'https://g.alicdn.com/sail-web/maas/0.8.10/favicon/128.ico', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/modrinth/maintainer.ts b/lib/routes/modrinth/maintainer.ts deleted file mode 100644 index 2bfc1b605..000000000 --- a/lib/routes/modrinth/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/project/:id/versions/:routeParams?': ['SettingDust'], -}; diff --git a/lib/routes/modrinth/namespace.ts b/lib/routes/modrinth/namespace.ts new file mode 100644 index 000000000..c85ca0d9f --- /dev/null +++ b/lib/routes/modrinth/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Modrinth', + url: 'modrinth.com', +}; diff --git a/lib/routes/modrinth/radar.ts b/lib/routes/modrinth/radar.ts deleted file mode 100644 index 96d8ab23a..000000000 --- a/lib/routes/modrinth/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'modrinth.com': { - _name: 'Modrinth', - '.': [ - { - title: 'Project versions', - docs: 'https://docs.rsshub.app/routes/game#modrinth-project-versions', - source: ['/mod/:id/*', '/plugin/:id/*', '/datapack/:id/*', '/shader/:id/*', '/resourcepack/:id/*', '/modpack/:id/*', '/mod/:id', '/plugin/:id', '/datapack/:id', '/shader/:id', '/resourcepack/:id', '/modpack/:id'], - target: '/modrinth/project/:id/versions', - }, - ], - }, -}; diff --git a/lib/routes/modrinth/router.ts b/lib/routes/modrinth/router.ts deleted file mode 100644 index fd0f19b94..000000000 --- a/lib/routes/modrinth/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/project/:id/versions/:routeParams?', './versions'); -}; diff --git a/lib/routes/modrinth/versions.ts b/lib/routes/modrinth/versions.ts index 5c6740f8e..4c21cc420 100644 --- a/lib/routes/modrinth/versions.ts +++ b/lib/routes/modrinth/versions.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -18,10 +19,52 @@ const md = MarkdownIt({ html: true, }); -export default async ( - /** @type {import('koa').Context} */ - ctx -) => { +export const route: Route = { + path: '/models', + categories: ['game'], + example: '/modrinth/project/sodium/versions', + parameters: { + id: 'Id or slug of the Modrinth project', + routeParams: 'Extra route params. See the table below for options', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: [ + 'modrinth.com/mod/:id/*', + 'modrinth.com/plugin/:id/*', + 'modrinth.com/datapack/:id/*', + 'modrinth.com/shader/:id/*', + 'modrinth.com/resourcepack/:id/*', + 'modrinth.com/modpack/:id/*', + 'modrinth.com/mod/:id', + 'modrinth.com/plugin/:id', + 'modrinth.com/datapack/:id', + 'modrinth.com/shader/:id', + 'modrinth.com/resourcepack/:id', + 'modrinth.com/modpack/:id', + ], + target: '/project/:id/versions', + }, + description: + '| Name | Example |\n| -------------- | -------------------------------------------- |\n| loaders | loaders=fabric\\&loaders=quilt\\&loaders=forge |\n| game\\_versions | game\\_versions=1.20.1\\&game\\_versions=1.20.2 |\n| featured | featured=true |', + name: 'Project versions', + maintainers: ['SettingDust'], + handler, + description: `| Name | Example | +| -------------- | -------------------------------------------- | +| loaders | loaders=fabric\&loaders=quilt\&loaders=forge | +| game\_versions | game\_versions=1.20.1\&game\_versions=1.20.2 | +| featured | featured=true |`, +}; + +async function handler(ctx) { const { /** @type string */ id, @@ -55,7 +98,7 @@ export default async ( }, }).json(); - ctx.set('data', { + return { title: `${project.title} Modrinth versions`, description: project.description, link: `https://modrinth.com/project/${id}`, @@ -70,11 +113,11 @@ export default async ( guid: it.id, author: authors[index].name, })), - }); + }; } catch (error) { if (error?.response?.statusCode === 404) { throw new Error(`${error.message}: Project ${id} not found`); } throw error; } -}; +} diff --git a/lib/routes/mohw/clarification.ts b/lib/routes/mohw/clarification.ts index 8ad67fecf..7b0c297c4 100644 --- a/lib/routes/mohw/clarification.ts +++ b/lib/routes/mohw/clarification.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/clarification', + categories: ['government'], + example: '/mohw/clarification', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mohw.gov.tw/'], + }, + name: '即時新聞澄清', + maintainers: ['nczitzk'], + handler, + url: 'mohw.gov.tw/', +}; + +async function handler() { const rootUrl = 'https://www.mohw.gov.tw'; const currentUrl = `${rootUrl}/lp-17-1.html`; @@ -43,9 +66,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '即時新聞澄清 - 台灣衛生福利部', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mohw/maintainer.ts b/lib/routes/mohw/maintainer.ts deleted file mode 100644 index b347df604..000000000 --- a/lib/routes/mohw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/clarification': ['nczitzk'], -}; diff --git a/lib/routes/mohw/namespace.ts b/lib/routes/mohw/namespace.ts new file mode 100644 index 000000000..9e456195c --- /dev/null +++ b/lib/routes/mohw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '台灣衛生福利部', + url: 'mohw.gov.tw', +}; diff --git a/lib/routes/mohw/radar.ts b/lib/routes/mohw/radar.ts deleted file mode 100644 index 5ab620779..000000000 --- a/lib/routes/mohw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mohw.gov.tw': { - _name: '台灣衛生福利部', - '.': [ - { - title: '即時新聞澄清', - docs: 'https://docs.rsshub.app/routes/government#tai-wan-wei-sheng-fu-li-bu-ji-shi-xin-wen-cheng-qing', - source: ['/'], - target: '/mohw/clarification', - }, - ], - }, -}; diff --git a/lib/routes/mohw/router.ts b/lib/routes/mohw/router.ts deleted file mode 100644 index 18f2af226..000000000 --- a/lib/routes/mohw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/clarification', './clarification'); -}; diff --git a/lib/routes/mox/index.ts b/lib/routes/mox/index.ts index 3367aab42..7f1a487e3 100644 --- a/lib/routes/mox/index.ts +++ b/lib/routes/mox/index.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['anime'], + example: '/mox', + parameters: { category: '分类,可在对应分类页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mox.moe/l/:category', 'mox.moe/'], + }, + name: '首頁', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 在首页将分类参数选择确定后跳转到的分类页面 URL 中,\`/l/\` 后的字段即为分类参数。 + + 如 [科幻 + 日語 + 日本 + 長篇 + 完結 + 最近更新](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) 的 URL 为 [https://mox.moe/l/CAT%2A 科幻,日本,完結,lastupdate,jpn,l,BL](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL),此时 \`/l/\` 后的字段为 \`CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL\`。最终获得路由为 [\`/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL\`](https://rsshub.app/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://mox.moe'; @@ -50,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Mox.moe', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mox/maintainer.ts b/lib/routes/mox/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/mox/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/mox/namespace.ts b/lib/routes/mox/namespace.ts new file mode 100644 index 000000000..4d329b352 --- /dev/null +++ b/lib/routes/mox/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Mox.moe', + url: 'mox.moe', +}; diff --git a/lib/routes/mox/radar.ts b/lib/routes/mox/radar.ts deleted file mode 100644 index 80f16a115..000000000 --- a/lib/routes/mox/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mox.moe': { - _name: 'Mox.moe', - '.': [ - { - title: '首頁', - docs: 'https://docs.rsshub.app/routes/anime#mox-moe-shou-ye', - source: ['/l/:category', '/'], - target: '/mox/:category?', - }, - ], - }, -}; diff --git a/lib/routes/mox/router.ts b/lib/routes/mox/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/mox/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/mpaypass/main.ts b/lib/routes/mpaypass/main.ts index a697868a9..4e89f445a 100644 --- a/lib/routes/mpaypass/main.ts +++ b/lib/routes/mpaypass/main.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/main/:type?', + categories: ['new-media'], + example: '/mpaypass/main/policy', + parameters: { type: '新闻类型,类型可在URL中找到,类似`policy`,`eye`等,空或其他任意值展示最新新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['zhuan-zhu'], + handler, +}; + +async function handler(ctx) { const { type = '' } = ctx.req.param(); const title_url = type ? `http://www.mpaypass.com.cn/${type}.html` : 'http://www.mpaypass.com.cn'; @@ -52,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `移动支付网-${title_cn}`, link: title_url, item: out, - }); -}; + }; +} diff --git a/lib/routes/mpaypass/maintainer.ts b/lib/routes/mpaypass/maintainer.ts deleted file mode 100644 index 61849138c..000000000 --- a/lib/routes/mpaypass/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/main/:type?': ['zhuan-zhu'], - '/news': ['LogicJake', 'genghis-yang'], -}; diff --git a/lib/routes/mpaypass/namespace.ts b/lib/routes/mpaypass/namespace.ts new file mode 100644 index 000000000..e7112a1bc --- /dev/null +++ b/lib/routes/mpaypass/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '移动支付网', + url: 'mpaypass.com.cn', +}; diff --git a/lib/routes/mpaypass/news.ts b/lib/routes/mpaypass/news.ts index a3db5318d..294fd04a4 100644 --- a/lib/routes/mpaypass/news.ts +++ b/lib/routes/mpaypass/news.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/mpaypass/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mpaypass.com.cn/'], + }, + name: '新闻', + maintainers: ['LogicJake', 'genghis-yang'], + handler, + url: 'mpaypass.com.cn/', +}; + +async function handler() { const link = 'http://m.mpaypass.com.cn'; const listData = await got(link); const $list = load(listData.data); - ctx.set('data', { + return { title: '新闻 - 移动支付网', link, language: 'zh-CN', @@ -36,5 +59,5 @@ export default async (ctx) => { }) .get() ), - }); -}; + }; +} diff --git a/lib/routes/mpaypass/radar.ts b/lib/routes/mpaypass/radar.ts deleted file mode 100644 index 08ce89810..000000000 --- a/lib/routes/mpaypass/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'mpaypass.com.cn': { - _name: '移动支付网', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#yi-dong-zhi-fu-wang', - source: '/', - target: '/mpaypass/news', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#yi-dong-zhi-fu-wang', - source: ['/:type', '/'], - target: (params) => `/mpaypass/main/${params.type.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/mpaypass/router.ts b/lib/routes/mpaypass/router.ts deleted file mode 100644 index 7811c54a7..000000000 --- a/lib/routes/mpaypass/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/main/:type?', './main'); - router.get('/news', './news'); -}; diff --git a/lib/routes/mrdx/daily.ts b/lib/routes/mrdx/daily.ts index 88374a7a6..128d2803c 100644 --- a/lib/routes/mrdx/daily.ts +++ b/lib/routes/mrdx/daily.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -8,7 +9,29 @@ dayjs.extend(utc); import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['traditional-media'], + example: '/mrdx/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mrdx.cn*'], + }, + name: '今日', + maintainers: ['Dustin-Jiang'], + handler, + url: 'mrdx.cn*', +}; + +async function handler() { const dateFormatted = dayjs().utcOffset(8).format('YYYYMMDD'); const baseUrl = `http://mrdx.cn/content/${dateFormatted}`; @@ -70,11 +93,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '新华每日电讯', link, item: passages, description: '中国报纸发行前三强。位列《人民日报》,《参考消息》之后。《新华每日电讯》是新华社出版的一份新闻电讯报,1993年创办,具有很高的权威性和准确性,有“一报在手,便知天下”之美誉。《新华每日电讯》为对开八版日报,集中刊登[新华社]每天向国内播发的电讯稿及图片稿。打开《新华每日电讯》,中国和全世界每天发生的重大事件便将一目了然。在人类生活节奏日益加快的当今世界,《新华每日电讯》以最便捷、最醒目的方式为公众提供最重要的新闻报道,受到公众的喜爱和拥护。', - }); -}; + }; +} diff --git a/lib/routes/mrdx/maintainer.ts b/lib/routes/mrdx/maintainer.ts deleted file mode 100644 index ce81e43bc..000000000 --- a/lib/routes/mrdx/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/today': ['Dustin-Jiang'], -}; diff --git a/lib/routes/mrdx/namespace.ts b/lib/routes/mrdx/namespace.ts new file mode 100644 index 000000000..7a7e83bf4 --- /dev/null +++ b/lib/routes/mrdx/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新华每日电讯', + url: 'mrdx.cn', +}; diff --git a/lib/routes/mrdx/radar.ts b/lib/routes/mrdx/radar.ts deleted file mode 100644 index e70208183..000000000 --- a/lib/routes/mrdx/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mrdx.cn': { - _name: '新华每日电讯', - '.': [ - { - title: '今日', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-hua-mei-ri-dian-xun', - source: ['*'], - target: '/mrdx/today', - }, - ], - }, -}; diff --git a/lib/routes/mrdx/router.ts b/lib/routes/mrdx/router.ts deleted file mode 100644 index 478f6624e..000000000 --- a/lib/routes/mrdx/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/today', './daily'); -}; diff --git a/lib/routes/mrm/index.ts b/lib/routes/mrm/index.ts index 06bc5620c..22ace8e8a 100644 --- a/lib/routes/mrm/index.ts +++ b/lib/routes/mrm/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['finance'], + example: '/mrm', + parameters: { category: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '通知', + maintainers: ['TonyRL'], + handler, + description: `| 交易通知 | 政策规定 | 业务通知 | + | ------------ | -------------------- | ----------------- | + | zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list |`, +}; + +async function handler(ctx) { const { category = 'zonghezixun3' } = ctx.req.param(); const baseUrl = 'http://www.mrm.com.cn'; const link = `${baseUrl}/${category}.html`; @@ -35,9 +57,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/mrm/maintainer.ts b/lib/routes/mrm/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/mrm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/mrm/namespace.ts b/lib/routes/mrm/namespace.ts new file mode 100644 index 000000000..e3827f119 --- /dev/null +++ b/lib/routes/mrm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华储网', + url: 'mrm.com.cn', +}; diff --git a/lib/routes/mrm/radar.ts b/lib/routes/mrm/radar.ts deleted file mode 100644 index 1c80dc70f..000000000 --- a/lib/routes/mrm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mrm.com.cn': { - _name: '华储网', - '.': [ - { - title: '通知', - docs: 'https://docs.rsshub.app/finance#hua-chu-wang', - source: ['/:category'], - target: (params) => `/mrm/${params.category.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/mrm/router.ts b/lib/routes/mrm/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/mrm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/mvm/index.ts b/lib/routes/mvm/index.ts index 8889441bb..8d4c4553c 100644 --- a/lib/routes/mvm/index.ts +++ b/lib/routes/mvm/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['journal'], + example: '/mvm', + parameters: { category: '分类,见下表,默认为本期要目' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mwm.net.cn/web/:category', 'mwm.net.cn/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 本期要目 | 网络首发 | 学术活动 | 通知公告 | + | -------- | -------- | -------- | -------- | + | bqym | wlsf | xshd | tzgg |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'bqym'; const rootUrl = 'http://www.mwm.net.cn'; @@ -51,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mvm/maintainer.ts b/lib/routes/mvm/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/mvm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/mvm/namespace.ts b/lib/routes/mvm/namespace.ts new file mode 100644 index 000000000..fcbb22cdc --- /dev/null +++ b/lib/routes/mvm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '管理世界', + url: 'mwm.net.cn', +}; diff --git a/lib/routes/mvm/radar.ts b/lib/routes/mvm/radar.ts deleted file mode 100644 index df4e5b933..000000000 --- a/lib/routes/mvm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mwm.net.cn': { - _name: '管理世界', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/journal#guan-li-shi-jie-fen-lei', - source: ['/web/:category', '/'], - target: '/mvm/:category?', - }, - ], - }, -}; diff --git a/lib/routes/mvm/router.ts b/lib/routes/mvm/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/mvm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/mydrivers/cid.ts b/lib/routes/mydrivers/cid.ts index d3c0d3013..bd16717e0 100644 --- a/lib/routes/mydrivers/cid.ts +++ b/lib/routes/mydrivers/cid.ts @@ -1,10 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import parser from '@/utils/rss-parser'; import { rootUrl, rootRSSUrl, title, categories, getInfo, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: ['/cid/:id?', '/zhibo'], + name: 'Unknown', + maintainers: [], + handler, + url: 'm.mydrivers.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -29,10 +38,10 @@ export default async (ctx) => { items = await processItems(items, cache.tryGet); } - ctx.set('data', { + return { ...(await getInfo(currentUrl, cache.tryGet)), item: items, title: `${title} - ${feed.title.split(/_/).pop() || categories.zhibo}`, - }); -}; + }; +} diff --git a/lib/routes/mydrivers/index.ts b/lib/routes/mydrivers/index.ts index eef2c9021..d9fabae91 100644 --- a/lib/routes/mydrivers/index.ts +++ b/lib/routes/mydrivers/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,14 @@ import * as path from 'node:path'; import { rootUrl, title, categories, convertToQueryString, getInfo, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let { category = 'new' } = ctx.req.param(); let newTitle = ''; @@ -53,7 +61,7 @@ export default async (ctx) => { items = await processItems(items, cache.tryGet); - ctx.set('data', { + return { ...(await getInfo(currentUrl, cache.tryGet)), ...Object.fromEntries( Object.entries({ @@ -61,5 +69,5 @@ export default async (ctx) => { title: newTitle, }).filter(([value]) => value) ), - }); -}; + }; +} diff --git a/lib/routes/mydrivers/maintainer.ts b/lib/routes/mydrivers/maintainer.ts deleted file mode 100644 index 16bbdd14b..000000000 --- a/lib/routes/mydrivers/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/hot': ['nczitzk'], - '/new': ['kt286', 'nczitzk'], - '/rank/:range?': ['nczitzk'], - '/zhibo': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/mydrivers/namespace.ts b/lib/routes/mydrivers/namespace.ts new file mode 100644 index 000000000..1bd863aea --- /dev/null +++ b/lib/routes/mydrivers/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '快科技', + url: 'm.mydrivers.com', +}; diff --git a/lib/routes/mydrivers/radar.ts b/lib/routes/mydrivers/radar.ts deleted file mode 100644 index 601ad8876..000000000 --- a/lib/routes/mydrivers/radar.ts +++ /dev/null @@ -1,214 +0,0 @@ -export default { - 'mydrivers.com': { - _name: '快科技', - m: [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-zui-xin', - source: ['/'], - target: '/mydrivers/new', - }, - { - title: '热门', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-re-men', - source: ['/'], - target: '/mydrivers/hot', - }, - { - title: '发布会', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fa-bu-hui', - source: ['/'], - target: '/mydrivers/zhibo', - }, - { - title: '排行', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-pai-hang', - source: ['/newsclass.aspx'], - target: '/mydrivers/rank', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: (params, url) => { - url = new URL(url); - - const theParam = [...url.searchParams.entries()] - .filter(([key, value]) => key && value !== '') - .map(([key, value]) => `${key}/${value}`) - .pop(); - - return `/mydrivers/${theParam}`; - }, - }, - { - title: '板块 - 电脑', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/bcid/801', - }, - { - title: '板块 - 手机', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/bcid/802', - }, - { - title: '板块 - 汽车', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/bcid/807', - }, - { - title: '板块 - 业界', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/bcid/803', - }, - { - title: '板块 - 游戏', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/bcid/806', - }, - { - title: '话题 - 科学', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/tid/1000', - }, - { - title: '话题 - 排行', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/tid/1001', - }, - { - title: '话题 - 评测', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/tid/1002', - }, - { - title: '话题 - 一图', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/tid/1003', - }, - { - title: '品牌 - 安卓', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/121', - }, - { - title: '品牌 - 阿里', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/270', - }, - { - title: '品牌 - 微软', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/90', - }, - { - title: '品牌 - 百度', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/67', - }, - { - title: '品牌 - PS5', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/6950', - }, - { - title: '品牌 - Xbox', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/194', - }, - { - title: '品牌 - 华为', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/136', - }, - { - title: '品牌 - 小米', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/9355', - }, - { - title: '品牌 - VIVO', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/288', - }, - { - title: '品牌 - 三星', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/154', - }, - { - title: '品牌 - 魅族', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/140', - }, - { - title: '品牌 - 一加', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/385', - }, - { - title: '品牌 - 比亚迪', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/770', - }, - { - title: '品牌 - 小鹏', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/7259', - }, - { - title: '品牌 - 蔚来', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/7318', - }, - { - title: '品牌 - 理想', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/12947', - }, - { - title: '品牌 - 奔驰', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/429', - }, - { - title: '品牌 - 宝马', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/461', - }, - { - title: '品牌 - 大众', - docs: 'https://docs.rsshub.app/routes/new-media#kuai-ke-ji-fen-lei', - source: ['/newsclass.aspx'], - target: '/mydrivers/icid/481', - }, - ], - }, -}; diff --git a/lib/routes/mydrivers/rank.ts b/lib/routes/mydrivers/rank.ts index a15e646a8..d0714ac8d 100644 --- a/lib/routes/mydrivers/rank.ts +++ b/lib/routes/mydrivers/rank.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, getInfo, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/rank/:range?', + categories: ['new-media'], + example: '/mydrivers/rank', + parameters: { range: '时间范围,见下表,默认为24小时最热' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.mydrivers.com/newsclass.aspx'], + target: '/rank', + }, + name: '排行', + maintainers: ['nczitzk'], + handler, + url: 'm.mydrivers.com/newsclass.aspx', + description: `| 24 小时最热 | 本周最热 | 本月最热 | + | ----------- | -------- | -------- | + | 0 | 1 | 2 |`, +}; + +async function handler(ctx) { const { range = '0' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -34,8 +61,8 @@ export default async (ctx) => { items = await processItems(items, cache.tryGet); - ctx.set('data', { + return { item: items, ...(await getInfo(currentUrl, cache.tryGet, Number.parseInt(range, 10))), - }); -}; + }; +} diff --git a/lib/routes/mydrivers/router.ts b/lib/routes/mydrivers/router.ts deleted file mode 100644 index ca671dcd7..000000000 --- a/lib/routes/mydrivers/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cid/:id?', './cid'); - router.get('/rank/:range?', './rank'); - router.get('/zhibo', './cid'); - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/myfigurecollection/activity.ts b/lib/routes/myfigurecollection/activity.ts index 916053b03..9ff77f14e 100644 --- a/lib/routes/myfigurecollection/activity.ts +++ b/lib/routes/myfigurecollection/activity.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,61 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?', + categories: ['shopping'], + example: '/myfigurecollection/activity', + parameters: { + category: 'Category, Figures by default', + language: 'Language, as above, `en` by default', + latestAdditions: 'Latest Additions, on as `1` by default, off as `0`', + latestEdits: 'Changes, on as `1` by default, off as `0`', + latestAlerts: 'Alerts, on as `1` by default, off as `0`', + latestPictures: 'Pictures, on as `1` by default, off as `0`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zh.myfigurecollection.net/browse', 'zh.myfigurecollection.net/'], + target: '/:category?/:language?', + }, + name: 'Activity', + maintainers: ['nczitzk'], + handler, + url: 'zh.myfigurecollection.net/browse', + description: `Category + + | Figures | Goods | Media | + | ------- | ----- | ----- | + | 0 | 1 | 2 | + + Language + + | Id | Language | + | -- | ---------- | + | | en | + | de | Deutsch | + | es | Español | + | fi | Suomeksi | + | fr | Français | + | it | Italiano | + | ja | 日本語 | + | nl | Nederlands | + | no | Norsk | + | pl | Polski | + | pt | Português | + | ru | Русский | + | sv | Svenska | + | zh | 中文 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '-1'; const language = ctx.req.param('language') ?? ''; const latestAdditions = ctx.req.param('latestAdditions') ?? '1'; @@ -56,11 +111,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title') .text() .replace(/ \(.*\)/, ''), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/myfigurecollection/index.ts b/lib/routes/myfigurecollection/index.ts index 207cd0c59..d2f3632a6 100644 --- a/lib/routes/myfigurecollection/index.ts +++ b/lib/routes/myfigurecollection/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -14,7 +15,32 @@ const shortcuts = { potm: 'picture/browse/potm/', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:language?', + categories: ['shopping'], + example: '/myfigurecollection/potd', + parameters: { category: '分类,默认为每日圖片', language: '语言,见上表,默认为空,即 `en`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zh.myfigurecollection.net/browse', 'zh.myfigurecollection.net/'], + }, + name: '圖片', + maintainers: ['nczitzk'], + handler, + url: 'zh.myfigurecollection.net/browse', + description: `| 每日圖片 | 每週圖片 | 每月圖片 | + | -------- | -------- | -------- | + | potd | potw | potm |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? ''; const category = ctx.req.param('category') ?? 'figure'; if (language && !isValidHost(language)) { @@ -76,11 +102,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title') .text() .replace(/ \(.*\)/, ''), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/myfigurecollection/maintainer.ts b/lib/routes/myfigurecollection/maintainer.ts deleted file mode 100644 index 99e3e732f..000000000 --- a/lib/routes/myfigurecollection/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?': ['nczitzk'], - '/:category?/:language?': ['nczitzk'], -}; diff --git a/lib/routes/myfigurecollection/namespace.ts b/lib/routes/myfigurecollection/namespace.ts new file mode 100644 index 000000000..9122016b8 --- /dev/null +++ b/lib/routes/myfigurecollection/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MyFigureCollection', + url: 'myfigurecollection.net', +}; diff --git a/lib/routes/myfigurecollection/radar.ts b/lib/routes/myfigurecollection/radar.ts deleted file mode 100644 index d5d8b5286..000000000 --- a/lib/routes/myfigurecollection/radar.ts +++ /dev/null @@ -1,44 +0,0 @@ -const myFigureCollection = [ - { - title: '活動', - docs: 'https://docs.rsshub.app/routes/shopping#MyFigureCollection-huo-dong', - source: ['/browse/activity', '/'], - target: '/myfigurecollection/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?', - }, - { - title: '資料庫', - docs: 'https://docs.rsshub.app/routes/shopping#MyFigureCollection-zi-liao-ku', - source: ['/browse', '/'], - target: '/myfigurecollection/:category?/:language?', - }, - { - title: '圖片', - docs: 'https://docs.rsshub.app/routes/shopping#MyFigureCollection-tu-pian', - source: ['/picture/browse/:category', '/'], - target: (params) => { - if (params.category === 'potd' || params.category === 'potw' || params.category === 'potm') { - return '/myfigurecollection/:category?/:language?'; - } - }, - }, -]; - -export default { - 'myfigurecollection.net': { - _name: 'MyFigureCollection', - '.': myFigureCollection, - de: myFigureCollection, - es: myFigureCollection, - fi: myFigureCollection, - fr: myFigureCollection, - it: myFigureCollection, - ja: myFigureCollection, - nl: myFigureCollection, - no: myFigureCollection, - pl: myFigureCollection, - pt: myFigureCollection, - ru: myFigureCollection, - sv: myFigureCollection, - zh: myFigureCollection, - }, -}; diff --git a/lib/routes/myfigurecollection/router.ts b/lib/routes/myfigurecollection/router.ts deleted file mode 100644 index 4a21404ed..000000000 --- a/lib/routes/myfigurecollection/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?', './activity'); - router.get('/:category?/:language?', './index'); -}; diff --git a/lib/routes/mygopen/index.ts b/lib/routes/mygopen/index.ts index e892c0f35..9b328c450 100644 --- a/lib/routes/mygopen/index.ts +++ b/lib/routes/mygopen/index.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:label?', + categories: ['new-media'], + example: '/mygopen', + parameters: { label: '分類,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mygopen.com/search/label/:label', 'mygopen.com/'], + }, + name: '分類', + maintainers: ['nczitzk'], + handler, + description: `| 謠言 | 詐騙 | 真實資訊 | 教學 | + | ---- | ---- | -------- | ---- |`, +}; + +async function handler(ctx) { const label = ctx.req.param('label') ?? ''; const rootUrl = 'https://www.mygopen.com'; @@ -20,10 +44,10 @@ export default async (ctx) => { link: item.link.pop().href, })); - ctx.set('data', { + return { title: `MyGoPen${label ? `: ${label}` : ''}`, link: currentUrl, item: items, description: '詐騙與謠言頻傳的年代,「MyGoPen|這是假消息」提醒網路使用者隨時要用謹慎懷疑的態度面對網路上的消息。', - }); -}; + }; +} diff --git a/lib/routes/mygopen/maintainer.ts b/lib/routes/mygopen/maintainer.ts deleted file mode 100644 index 930575d2e..000000000 --- a/lib/routes/mygopen/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:label?': ['nczitzk'], -}; diff --git a/lib/routes/mygopen/namespace.ts b/lib/routes/mygopen/namespace.ts new file mode 100644 index 000000000..a88837a40 --- /dev/null +++ b/lib/routes/mygopen/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MyGoPen', + url: 'mygopen.com', +}; diff --git a/lib/routes/mygopen/radar.ts b/lib/routes/mygopen/radar.ts deleted file mode 100644 index 5cb0f0fc8..000000000 --- a/lib/routes/mygopen/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mygopen.com': { - _name: 'MyGoPen', - '.': [ - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/new-media#mygopen-fen-lei', - source: ['/search/label/:label', '/'], - target: '/mygopen/:label?', - }, - ], - }, -}; diff --git a/lib/routes/mygopen/router.ts b/lib/routes/mygopen/router.ts deleted file mode 100644 index cd2f44358..000000000 --- a/lib/routes/mygopen/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:label?', './index'); -}; diff --git a/lib/routes/mymusicsheet/maintainer.ts b/lib/routes/mymusicsheet/maintainer.ts deleted file mode 100644 index 659b5f5f1..000000000 --- a/lib/routes/mymusicsheet/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/sheets/:username/:iso?/:freeOnly?': ['Freddd13'], -}; diff --git a/lib/routes/mymusicsheet/namespace.ts b/lib/routes/mymusicsheet/namespace.ts new file mode 100644 index 000000000..a08efb2df --- /dev/null +++ b/lib/routes/mymusicsheet/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MyMusicSheet', + url: 'mymusicsheet.com', +}; diff --git a/lib/routes/mymusicsheet/radar.ts b/lib/routes/mymusicsheet/radar.ts deleted file mode 100644 index f5461f759..000000000 --- a/lib/routes/mymusicsheet/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mymusicsheet.com': { - _name: 'MyMusicSheet', - '.': [ - { - title: 'User Sheets', - docs: 'https://docs.rsshub.app/routes/shopping#mymusicsheet-user-sheets', - source: [':username/*', '/:username'], - target: '/mymusicsheet/user/sheets/:username', - }, - ], - }, -}; diff --git a/lib/routes/mymusicsheet/router.ts b/lib/routes/mymusicsheet/router.ts deleted file mode 100644 index aea58bea5..000000000 --- a/lib/routes/mymusicsheet/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/sheets/:username/:iso?/:freeOnly?', './usersheets'); -}; diff --git a/lib/routes/mymusicsheet/usersheets.ts b/lib/routes/mymusicsheet/usersheets.ts index 1d4cafb55..90a3835ed 100644 --- a/lib/routes/mymusicsheet/usersheets.ts +++ b/lib/routes/mymusicsheet/usersheets.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,30 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/user/sheets/:username/:iso?/:freeOnly?', + categories: ['shopping'], + example: '/mymusicsheet/user/sheets/HalcyonMusic/USD/1', + parameters: { username: '用户名,可在URL中找到', iso: '用于显示价格的ISO 4217货币代码, 支持常见代码, 默认为人民币, 即`CNY`', freeOnly: '只返回免费谱, 任意值为开启' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mymusicsheet.com/:username/*', 'mymusicsheet.com/:username'], + target: '/user/sheets/:username', + }, + name: 'User Sheets', + maintainers: ['Freddd13'], + handler, + description: `关于 ISO 4217,请参考[维基百科](https://zh.wikipedia.org/zh-cn/ISO_4217#%E7%8E%B0%E8%A1%8C%E4%BB%A3%E7%A0%81)`, +}; + +async function handler(ctx) { const baseUrl = 'https://www.mymusicsheet.com'; const graphqlUrl = 'https://mms.pd.mapia.io/mms/graphql'; const exchangeRateUrl = 'https://payport.pd.mapia.io/v2/currency'; @@ -115,9 +139,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${username}'s sheets`, link: `https://www.mymusicsheet.com/${username}?viewType=sheet&orderBy=createdAt`, item: items, - }); -}; + }; +} diff --git a/lib/routes/mysql/maintainer.ts b/lib/routes/mysql/maintainer.ts deleted file mode 100644 index 88f024ec9..000000000 --- a/lib/routes/mysql/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/release/:version?': ['nczitzk'], -}; diff --git a/lib/routes/mysql/namespace.ts b/lib/routes/mysql/namespace.ts new file mode 100644 index 000000000..42e8810c4 --- /dev/null +++ b/lib/routes/mysql/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MySQL', + url: 'dev.mysql.com', +}; diff --git a/lib/routes/mysql/radar.ts b/lib/routes/mysql/radar.ts deleted file mode 100644 index 2780fbc79..000000000 --- a/lib/routes/mysql/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'mysql.com': { - _name: 'MySQL', - dev: [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/programming#mysql-release-notes', - source: ['/'], - target: (params, url) => `/mysql/release/${new URL(url).toString().match(/\/mysql\/(.*?)\//)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/mysql/release.ts b/lib/routes/mysql/release.ts index ac107baaf..b865c133f 100644 --- a/lib/routes/mysql/release.ts +++ b/lib/routes/mysql/release.ts @@ -1,9 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/release/:version?', + categories: ['programming'], + example: '/mysql/release/8.0', + parameters: { version: 'Version, see below, 8.0 by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Release Notes', + maintainers: ['nczitzk'], + handler, + description: `| 8.0 | 5.7 | 5.6 | + | --- | --- | --- |`, +}; + +async function handler(ctx) { const version = ctx.req.param('version') ?? '8.0'; const rootUrl = 'https://dev.mysql.com'; @@ -55,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/mysql/router.ts b/lib/routes/mysql/router.ts deleted file mode 100644 index cd7e499d1..000000000 --- a/lib/routes/mysql/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/release/:version?', './release'); -}; diff --git a/lib/routes/nasa/apod-cn.ts b/lib/routes/nasa/apod-cn.ts index 572dacb8c..a3c2a2402 100644 --- a/lib/routes/nasa/apod-cn.ts +++ b/lib/routes/nasa/apod-cn.ts @@ -1,7 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/apod-cn', + categories: ['picture'], + example: '/nasa/apod-cn', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apod.nasa.govundefined'], + }, + name: 'NASA 中文', + maintainers: ['nczitzk', 'williamgateszhao'], + handler, + url: 'apod.nasa.govundefined', + description: `:::tip + [NASA 中文](https://www.nasachina.cn/) 提供了每日天文图的中英双语图文说明,但在更新上偶尔略有一两天的延迟。 + :::`, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; const rootUrl = `https://www.nasachina.cn/wp-json/wp/v2/posts?categories=2&per_page=${limit}`; const { data } = await got({ @@ -16,9 +42,9 @@ export default async (ctx) => { link: item.link, })); - ctx.set('data', { + return { title: 'NASA中文 - 天文·每日一图', link: 'https://www.nasachina.cn/nasa-image-of-the-day', item: items, - }); -}; + }; +} diff --git a/lib/routes/nasa/apod-ncku.ts b/lib/routes/nasa/apod-ncku.ts index c363505fd..bb9bfc221 100644 --- a/lib/routes/nasa/apod-ncku.ts +++ b/lib/routes/nasa/apod-ncku.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/apod-ncku', + categories: ['picture'], + example: '/nasa/apod-ncku', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apod.nasa.govundefined'], + }, + name: 'Cheng Kung University Mirror', + maintainers: ['nczitzk', 'williamgateszhao'], + handler, + url: 'apod.nasa.govundefined', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; const rootUrl = 'http://sprite.phys.ncku.edu.tw/astrolab/mirrors/apod/archivepix.html'; const response = await got({ @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'NASA 每日一天文圖 (成大物理分站) ', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nasa/apod.ts b/lib/routes/nasa/apod.ts index d37488c74..62b19b81f 100644 --- a/lib/routes/nasa/apod.ts +++ b/lib/routes/nasa/apod.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/apod', + categories: ['picture'], + example: '/nasa/apod', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['apod.nasa.govundefined'], + }, + name: 'NASA', + maintainers: ['nczitzk', 'williamgateszhao'], + handler, + url: 'apod.nasa.govundefined', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; const rootUrl = 'https://apod.nasa.gov/apod/archivepix.html'; const response = await got({ @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'NASA Astronomy Picture of the Day', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nasa/maintainer.ts b/lib/routes/nasa/maintainer.ts deleted file mode 100644 index 6923768ce..000000000 --- a/lib/routes/nasa/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/apod': ['nczitzk', 'williamgateszhao'], - '/apod-ncku': ['nczitzk', 'williamgateszhao'], - '/apod-cn': ['nczitzk', 'williamgateszhao'], -}; diff --git a/lib/routes/nasa/namespace.ts b/lib/routes/nasa/namespace.ts new file mode 100644 index 000000000..d53c8c193 --- /dev/null +++ b/lib/routes/nasa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NASA Astronomy Picture of the Day', + url: 'apod.nasa.gov', +}; diff --git a/lib/routes/nasa/radar.ts b/lib/routes/nasa/radar.ts deleted file mode 100644 index 85ab3de0b..000000000 --- a/lib/routes/nasa/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'nasa.gov': { - _name: 'NASA 每日天文图片', - apod: [ - { - title: 'NASA', - docs: 'https://docs.rsshub.app/routes/picture#nasa-mei-ri-tian-wen-tu-pian', - target: '/nasa/apod', - }, - { - title: '台湾成功大学镜像', - docs: 'https://docs.rsshub.app/routes/picture#nasa-mei-ri-tian-wen-tu-pian', - target: '/nasa/apod-ncku', - }, - { - title: 'NASA 中文', - docs: 'https://docs.rsshub.app/routes/picture#nasa-mei-ri-tian-wen-tu-pian', - target: '/nasa/apod-cn', - }, - ], - }, -}; diff --git a/lib/routes/nasa/router.ts b/lib/routes/nasa/router.ts deleted file mode 100644 index 243cccc7d..000000000 --- a/lib/routes/nasa/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/apod', './apod'); - router.get('/apod-ncku', './apod-ncku'); - router.get('/apod-cn', './apod-cn'); -}; diff --git a/lib/routes/natgeo/dailyphoto.ts b/lib/routes/natgeo/dailyphoto.ts index aeca1f1f5..6cfef7900 100644 --- a/lib/routes/natgeo/dailyphoto.ts +++ b/lib/routes/natgeo/dailyphoto.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyphoto', + categories: ['picture'], + example: '/natgeo/dailyphoto', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nationalgeographic.com/photo-of-the-day/*', 'nationalgeographic.com/'], + }, + name: '每日一图', + maintainers: ['LogicJake', 'OrangeEd1t', 'TonyRL'], + handler, + url: 'nationalgeographic.com/photo-of-the-day/*', +}; + +async function handler() { const rootUrl = 'https://www.nationalgeographic.com'; const apiUrl = `${rootUrl}/photo-of-the-day`; const response = await cache.tryGet(apiUrl, async () => (await got(apiUrl)).data, config.cache.contentExpire, false); @@ -28,9 +51,9 @@ export default async (ctx) => { author: item.img.crdt, })); - ctx.set('data', { + return { title: 'Nat Geo Photo of the Day', link: apiUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/natgeo/dailyselection.ts b/lib/routes/natgeo/dailyselection.ts index 944b920ea..d7c0e89ff 100644 --- a/lib/routes/natgeo/dailyselection.ts +++ b/lib/routes/natgeo/dailyselection.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dailyselection', + name: 'Unknown', + maintainers: ['OrangeEd1t'], + handler, +}; + +async function handler() { const host = 'http://dili.bdatu.com/jiekou/mains/p1.html'; const data = await got(host); @@ -33,9 +41,9 @@ export default async (ctx) => { return info; }); - ctx.set('data', { + return { title: 'Photo of the Daily Selection', link: api, item: out, - }); -}; + }; +} diff --git a/lib/routes/natgeo/maintainer.ts b/lib/routes/natgeo/maintainer.ts deleted file mode 100644 index 132708442..000000000 --- a/lib/routes/natgeo/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/dailyselection': ['OrangeEd1t'], - '/dailyphoto': ['LogicJake', 'OrangeEd1t', 'TonyRL'], - '/:cat/:type?': ['fengkx'], -}; diff --git a/lib/routes/natgeo/namespace.ts b/lib/routes/natgeo/namespace.ts new file mode 100644 index 000000000..f7ab78408 --- /dev/null +++ b/lib/routes/natgeo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家地理', + url: 'nationalgeographic.com', +}; diff --git a/lib/routes/natgeo/natgeo.ts b/lib/routes/natgeo/natgeo.ts index 2397a9880..5f0c6613a 100644 --- a/lib/routes/natgeo/natgeo.ts +++ b/lib/routes/natgeo/natgeo.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -26,7 +27,29 @@ async function loadContent(link) { }; } -export default async (ctx) => { +export const route: Route = { + path: '/:cat/:type?', + categories: ['travel'], + example: '/natgeo/environment/article', + parameters: { cat: '分类', type: '类型, 例如`https://www.natgeomedia.com/environment/photo/`对应 `cat`, `type` 分别为 `environment`, `photo`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['natgeomedia.com/:cat/:type', 'natgeomedia.com/'], + target: '/:cat/:type', + }, + name: '分类', + maintainers: ['fengkx'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? ''; const url = `https://www.natgeomedia.com/${ctx.req.param('cat')}/${type}`; const res = await got(url); @@ -49,9 +72,9 @@ export default async (ctx) => { return { ...single, ...other }; }) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/natgeo/radar.ts b/lib/routes/natgeo/radar.ts deleted file mode 100644 index db5881fc3..000000000 --- a/lib/routes/natgeo/radar.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default { - 'nationalgeographic.com': { - _name: '国家地理', - '.': [ - { - title: '每日一图', - docs: 'https://docs.rsshub.app/routes/picture#guo-jia-di-li', - source: ['/photo-of-the-day/*', '/'], - target: '/natgeo/dailyphoto', - }, - ], - }, - 'natgeomedia.com': { - _name: '国家地理', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/travel#guo-jia-di-li', - source: ['/:cat/:type', '/'], - target: '/natgeo/:cat/:type', - }, - ], - }, -}; diff --git a/lib/routes/natgeo/router.ts b/lib/routes/natgeo/router.ts deleted file mode 100644 index e93a2f2cc..000000000 --- a/lib/routes/natgeo/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/dailyphoto', './dailyphoto'); - router.get('/dailyselection', './dailyselection'); - router.get('/:cat/:type?', './natgeo'); -}; diff --git a/lib/routes/nationalgeographic/latest-stories.ts b/lib/routes/nationalgeographic/latest-stories.ts index fc04fc702..76b0441ea 100644 --- a/lib/routes/nationalgeographic/latest-stories.ts +++ b/lib/routes/nationalgeographic/latest-stories.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +16,29 @@ const findNatgeo = ($) => .match(/\['__natgeo__']=({.*?});/)[1] ); -export default async (ctx) => { +export const route: Route = { + path: '/latest-stories', + categories: ['travel'], + example: '/nationalgeographic/latest-stories', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.nationalgeographic.com/pages/topic/latest-stories'], + }, + name: 'Latest Stories', + maintainers: ['miles170'], + handler, + url: 'www.nationalgeographic.com/pages/topic/latest-stories', +}; + +async function handler() { const currentUrl = 'https://www.nationalgeographic.com/pages/topic/latest-stories'; const response = await got(currentUrl); const $ = load(response.data); @@ -52,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('meta[property="og:title"]').attr('content'), link: currentUrl, item: items.filter((item) => item !== null), - }); -}; + }; +} diff --git a/lib/routes/nationalgeographic/maintainer.ts b/lib/routes/nationalgeographic/maintainer.ts deleted file mode 100644 index ab3fef56b..000000000 --- a/lib/routes/nationalgeographic/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest-stories': ['miles170'], -}; diff --git a/lib/routes/nationalgeographic/namespace.ts b/lib/routes/nationalgeographic/namespace.ts new file mode 100644 index 000000000..6b8cb85a7 --- /dev/null +++ b/lib/routes/nationalgeographic/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'National Geographic', + url: 'www.nationalgeographic.com', +}; diff --git a/lib/routes/nationalgeographic/radar.ts b/lib/routes/nationalgeographic/radar.ts deleted file mode 100644 index 26a781162..000000000 --- a/lib/routes/nationalgeographic/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nationalgeographic.com': { - _name: 'National Geographic', - www: [ - { - title: 'Latest Stories', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-shi-xin-wen', - source: '/pages/topic/latest-stories', - target: '/nationalgeographic/latest-stories', - }, - ], - }, -}; diff --git a/lib/routes/nationalgeographic/router.ts b/lib/routes/nationalgeographic/router.ts deleted file mode 100644 index 6ca7e0685..000000000 --- a/lib/routes/nationalgeographic/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest-stories', './latest-stories'); -}; diff --git a/lib/routes/nature/cover.ts b/lib/routes/nature/cover.ts index a08a3823f..d67382a62 100644 --- a/lib/routes/nature/cover.ts +++ b/lib/routes/nature/cover.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // The content is generateed by undocumentated API of nature journals // This router has **just** been tested in: @@ -21,7 +22,30 @@ import { parseDate } from '@/utils/parse-date'; import { baseUrl, journalMap } from './utils'; import { CookieJar } from 'tough-cookie'; -export default async (ctx) => { +export const route: Route = { + path: '/cover', + categories: ['journal'], + example: '/nature/cover', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nature.com/'], + }, + name: 'Cover Story', + maintainers: ['y9c'], + handler, + url: 'nature.com/', + description: `Subscribe to the cover images of the Nature journals, and get the latest publication updates in time.`, +}; + +async function handler() { const cookieJar = new CookieJar(); await got('https://www.nature.com', { cookieJar }); @@ -59,10 +83,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Nature Covers Story', description: 'Find out the cover story of some Nature journals.', link: baseUrl, item: out, - }); -}; + }; +} diff --git a/lib/routes/nature/highlight.ts b/lib/routes/nature/highlight.ts index 66b8f51eb..30d71e743 100644 --- a/lib/routes/nature/highlight.ts +++ b/lib/routes/nature/highlight.ts @@ -1,8 +1,34 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import { baseUrl, cookieJar, getArticleList, getArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/highlight/:journal?', + categories: ['journal'], + example: '/nature/highlight', + parameters: { journal: 'short name for a journal, `nature` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['nature.com/:journal/articles', 'nature.com/:journal', 'nature.com/'], + target: '/highlight/:journal', + }, + name: 'Research Highlight', + maintainers: [], + handler, + description: `:::warning + Only some journals are supported. + :::`, +}; + +async function handler(ctx) { const { journal = 'nature' } = ctx.req.param(); const url = `${baseUrl}/${journal}/articles?type=research-highlight`; @@ -13,10 +39,10 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => getArticle(item))); - ctx.set('data', { + return { title: $('title').text().trim(), description: $('meta[name=description]').attr('content'), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/nature/maintainer.ts b/lib/routes/nature/maintainer.ts deleted file mode 100644 index 2936bdbb6..000000000 --- a/lib/routes/nature/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/cover': ['y9c'], - '/highlight/:journal?/:year?': ['y9c', 'TonyRL'], - '/news': ['y9c', 'TonyRL'], - '/news-and-comment/:journal?': ['y9c', 'TonyRL'], - '/research/:journal?': ['y9c', 'TonyRL'], - '/siteindex': ['TonyRL'], -}; diff --git a/lib/routes/nature/namespace.ts b/lib/routes/nature/namespace.ts new file mode 100644 index 000000000..1ac08accd --- /dev/null +++ b/lib/routes/nature/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Nature Journal', + url: 'nature.com', + description: `:::tip +You can get all short name of a journal from [https://www.nature.com/siteindex](https://www.nature.com/siteindex) or [Journal List](#nature-journal-journal-list). +:::`, +}; diff --git a/lib/routes/nature/news-and-comment.ts b/lib/routes/nature/news-and-comment.ts index 33e783370..ea78f13ef 100644 --- a/lib/routes/nature/news-and-comment.ts +++ b/lib/routes/nature/news-and-comment.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; // example usage: `/nature/news-and-comment/ng` // The journals from NPG are run by different group of people, // and the website of may not be consitent for all the journals @@ -16,7 +17,19 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import { baseUrl, cookieJar, getArticleList, getArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news-and-comment/:journal?', + radar: { + source: ['nature.com/latest-news', 'nature.com/news', 'nature.com/'], + target: '/news', + }, + name: 'Unknown', + maintainers: ['y9c', 'TonyRL'], + handler, + url: 'nature.com/latest-news', +}; + +async function handler(ctx) { const journal = ctx.req.param('journal'); const pageURL = `${baseUrl}/${journal}/news-and-comment`; @@ -28,10 +41,10 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => getArticle(item))); - ctx.set('data', { + return { title: pageCapture('title').text(), description: pageDescription, link: pageURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/nature/news.ts b/lib/routes/nature/news.ts index 1599d3134..377903df7 100644 --- a/lib/routes/nature/news.ts +++ b/lib/routes/nature/news.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, cookieJar, getArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['journal'], + example: '/nature/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['nature.com/latest-news', 'nature.com/news', 'nature.com/'], + }, + name: 'Nature News', + maintainers: ['y9c', 'TonyRL'], + handler, + url: 'nature.com/latest-news', +}; + +async function handler() { const url = `${baseUrl}/latest-news`; const res = await got(url, { cookieJar }); const $ = load(res.data); @@ -22,10 +45,10 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => cache.tryGet(item.link, () => getArticle(item)))); - ctx.set('data', { + return { title: 'Nature | Latest News', description: $('meta[name=description]').attr('content'), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/nature/radar.ts b/lib/routes/nature/radar.ts deleted file mode 100644 index d9360626a..000000000 --- a/lib/routes/nature/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'nature.com': { - _name: 'Nature', - '.': [ - { - title: '最新成果', - docs: 'https://docs.rsshub.app/routes/journal#nature-xi-lie', - source: ['/:journal/research-articles', '/:journal', '/'], - target: '/nature/research/:journal', - }, - { - title: '新闻及评论', - docs: 'https://docs.rsshub.app/routes/journal#nature-xi-lie', - source: ['/:journal/news-and-comment', '/:journal', '/'], - target: '/nature/news-and-comment/:journal', - }, - { - title: '封面故事', - docs: 'https://docs.rsshub.app/routes/journal#nature-xi-lie', - source: ['/'], - target: '/nature/cover', - }, - { - title: '主刊 - 新闻动态', - docs: 'https://docs.rsshub.app/routes/journal#nature-xi-lie', - source: ['/latest-news', '/news', '/'], - target: '/nature/news', - }, - { - title: '精彩研究', - docs: 'https://docs.rsshub.app/routes/journal#nature-xi-lie', - source: ['/:journal/articles', '/:journal', '/'], - target: '/nature/highlight/:journal', - }, - ], - }, -}; diff --git a/lib/routes/nature/research.ts b/lib/routes/nature/research.ts index 70fb0b1e8..c365668a3 100644 --- a/lib/routes/nature/research.ts +++ b/lib/routes/nature/research.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; // example usage: `/nature/research/ng` // The journals from NPG are run by different group of people, // and the website of may not be consitent for all the journals @@ -17,7 +18,45 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import { baseUrl, cookieJar, getArticleList, getDataLayer, getArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/research/:journal?', + categories: ['journal'], + example: '/nature/research/ng', + parameters: { journal: 'short name for a journal, `nature` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['nature.com/:journal/research-articles', 'nature.com/:journal', 'nature.com/'], + target: '/research/:journal', + }, + name: 'Latest Research', + maintainers: ['y9c', 'TonyRL'], + handler, + description: `| \`:journal\` | Full Name of the Journal | Route | + | :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | + | nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) | + | nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) | + | neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) | + | ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) | + | ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) | + | nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) | + | nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) | + | nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) | + | natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) | + + - Using router (\`/nature/research/\` + "short name for a journal") to query latest research paper for a certain journal of Nature Publishing Group. + If the \`:journal\` parameter is blank, then latest research of Nature will return. + - The journals from NPG are run by different group of people, and the website of may not be consitent for all the journals + - Only abstract is rendered in some researches`, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal') ?? 'nature'; const pageURL = `${baseUrl}/${journal}/research-articles`; @@ -30,10 +69,10 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => getArticle(item))); - ctx.set('data', { + return { title: `Nature (${pageTitle}) | Latest Research`, description: pageCapture('meta[name="description"]').attr('content') || `Nature, a nature research journal`, link: pageURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/nature/router.ts b/lib/routes/nature/router.ts deleted file mode 100644 index f74be80b9..000000000 --- a/lib/routes/nature/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/cover', './cover'); - router.get('/highlight/:journal?', './highlight'); - router.get('/news', './news'); - router.get('/news-and-comment/:journal?', './news-and-comment'); - router.get('/research/:journal?', './research'); - router.get('/siteindex', './siteindex'); -}; diff --git a/lib/routes/nature/siteindex.ts b/lib/routes/nature/siteindex.ts index 93be70df8..795ecd298 100644 --- a/lib/routes/nature/siteindex.ts +++ b/lib/routes/nature/siteindex.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, cookieJar } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/siteindex', + categories: ['journal'], + example: '/nature/siteindex', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Journal List', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const response = await got(`${baseUrl}/siteindex`, { cookieJar }); const $ = load(response.data); @@ -38,12 +57,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Nature siteindex', link: response.url, item: items, - }); + }; ctx.set('json', { items, }); -}; +} diff --git a/lib/routes/nautil/maintainer.ts b/lib/routes/nautil/maintainer.ts deleted file mode 100644 index 74cbd796a..000000000 --- a/lib/routes/nautil/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:tid': ['emdoe'], -}; diff --git a/lib/routes/nautil/namespace.ts b/lib/routes/nautil/namespace.ts new file mode 100644 index 000000000..877f9173c --- /dev/null +++ b/lib/routes/nautil/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Nautilus', + url: 'nautil.us', +}; diff --git a/lib/routes/nautil/radar.ts b/lib/routes/nautil/radar.ts deleted file mode 100644 index a8788fe18..000000000 --- a/lib/routes/nautil/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nautil.us': { - _name: 'Nautilus', - '.': [ - { - title: 'Topics', - docs: 'https://docs.rsshub.app/routes/new-media#nautilus', - source: ['/topics/:tid'], - target: '/nautil/topic/:tid', - }, - ], - }, -}; diff --git a/lib/routes/nautil/router.ts b/lib/routes/nautil/router.ts deleted file mode 100644 index cea838f26..000000000 --- a/lib/routes/nautil/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:tid', './topics'); -}; diff --git a/lib/routes/nautil/topics.ts b/lib/routes/nautil/topics.ts index d315af650..1b3f3ba69 100644 --- a/lib/routes/nautil/topics.ts +++ b/lib/routes/nautil/topics.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const baseUrl = 'https://nautil.us'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:tid', + categories: ['new-media'], + example: '/nautil/topic/arts', + parameters: { tid: 'topic' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nautil.us/topics/:tid'], + }, + name: 'Topics', + maintainers: ['emdoe'], + handler, + description: `This route provides a flexible plan with full text content to subscribe specific topic(s) on the Nautilus. Please visit [nautil.us](https://nautil.us) and click \`Topics\` to acquire whole topic list.`, +}; + +async function handler(ctx) { const categoryIdMap = await cache.tryGet('nautil:categories', async () => { const { data } = await got(`${baseUrl}/wp-json/wp/v2/categories`, { searchParams: { @@ -53,9 +76,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Nautilus | ' + categoryIdMap.find((item) => item.slug === ctx.req.param('tid').toLowerCase()).name, link: `${baseUrl}/topics/${ctx.req.param('tid')}/`, item: out, - }); -}; + }; +} diff --git a/lib/routes/nbd/daily.ts b/lib/routes/nbd/daily.ts index a5a5398d8..875620990 100644 --- a/lib/routes/nbd/daily.ts +++ b/lib/routes/nbd/daily.ts @@ -1,3 +1,26 @@ -export default (ctx) => { - ctx.redirect('/nbd/332'); +import { Route } from '@/types'; +export const route: Route = { + path: '/daily', + categories: ['finance'], + example: '/nbd/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nbd.com.cn/', 'nbd.com.cn/columns/332'], + }, + name: '重磅原创', + maintainers: ['yuuow'], + handler, + url: 'nbd.com.cn/', }; + +function handler(ctx) { + ctx.redirect('/nbd/332'); +} diff --git a/lib/routes/nbd/index.ts b/lib/routes/nbd/index.ts index 3d4568e08..744801305 100644 --- a/lib/routes/nbd/index.ts +++ b/lib/routes/nbd/index.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['finance'], + example: '/nbd', + parameters: { id: '分类 id,见下表,默认为要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nbd.com.cn/', 'nbd.com.cn/columns/:id?'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + url: 'nbd.com.cn/', + description: `| 头条 | 要闻 | 图片新闻 | 推荐 | + | ---- | ---- | -------- | ---- | + | 2 | 3 | 4 | 5 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '3'; const rootUrl = 'https://www.nbd.com.cn'; @@ -48,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('h1').text() || $('.u-channelname').text()} - 每经网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nbd/maintainer.ts b/lib/routes/nbd/maintainer.ts deleted file mode 100644 index 0988798a1..000000000 --- a/lib/routes/nbd/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/daily': ['yuuow'], - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/nbd/namespace.ts b/lib/routes/nbd/namespace.ts new file mode 100644 index 000000000..3856375ec --- /dev/null +++ b/lib/routes/nbd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '每经网', + url: 'nbd.com.cn', +}; diff --git a/lib/routes/nbd/radar.ts b/lib/routes/nbd/radar.ts deleted file mode 100644 index 59cea5a92..000000000 --- a/lib/routes/nbd/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'nbd.com.cn': { - _name: '每经网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/finance#mei-jing-wang', - source: ['/', '/columns/:id?'], - target: '/nbd/:id?', - }, - { - title: '重磅原创', - docs: 'https://docs.rsshub.app/routes/finance#mei-jing-wang', - source: ['/', '/columns/332'], - target: '/nbd/daily', - }, - ], - }, -}; diff --git a/lib/routes/nbd/router.ts b/lib/routes/nbd/router.ts deleted file mode 100644 index 016eba827..000000000 --- a/lib/routes/nbd/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/daily', './daily'); - router.get('/:id?', './index'); -}; diff --git a/lib/routes/nber/index.ts b/lib/routes/nber/index.ts index 7ee7e1990..c320c8899 100644 --- a/lib/routes/nber/index.ts +++ b/lib/routes/nber/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +16,31 @@ async function getData(url) { return response.results; } -export default async (ctx) => { +export const route: Route = { + path: ['/papers', '/news'], + categories: ['journal'], + example: '/nber/papers', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['nber.org/papers'], + }, + name: 'All Papers', + maintainers: [], + handler, + url: 'nber.org/papers', + description: `Papers that are published in this week.`, + url: 'nber.org/papers', +}; + +async function handler(ctx) { const url = 'https://www.nber.org/api/v1/working_page_listing/contentType/working_paper/_/_/search'; const baseUrl = 'https://www.nber.org'; const data = await cache.tryGet(url, () => getData(url), config.cache.routeExpire, false); @@ -44,10 +69,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'NBER Working Paper', link: 'https://www.nber.org/papers', item: items, description: `National Bureau of Economic Research Working Papers articles`, - }); -}; + }; +} diff --git a/lib/routes/nber/maintainer.ts b/lib/routes/nber/maintainer.ts deleted file mode 100644 index aaea2e43b..000000000 --- a/lib/routes/nber/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/articles': ['5upernova-heng'], - '/news': ['5upernova-heng'], -}; diff --git a/lib/routes/nber/namespace.ts b/lib/routes/nber/namespace.ts new file mode 100644 index 000000000..8de1aeb51 --- /dev/null +++ b/lib/routes/nber/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'National Bureau of Economic Research', + url: 'nber.org', +}; diff --git a/lib/routes/nber/radar.ts b/lib/routes/nber/radar.ts deleted file mode 100644 index 73e2d38f6..000000000 --- a/lib/routes/nber/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'nber.org': { - _name: 'National Bureau of Economic Research', - '.': [ - { - title: 'New working paper', - docs: 'https://docs.rsshub.app/routes/journal#national-bureau-of-economic-research', - source: ['/papers'], - target: '/nber/news', - }, - { - title: 'All working paper', - docs: 'https://docs.rsshub.app/routes/journal#national-bureau-of-economic-research', - source: ['/papers'], - target: '/nber/papers', - }, - ], - }, -}; diff --git a/lib/routes/nber/router.ts b/lib/routes/nber/router.ts deleted file mode 100644 index d389d0913..000000000 --- a/lib/routes/nber/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/papers', '.'); - router.get('/news', '.'); -}; diff --git a/lib/routes/ncc-cma/cmdp.ts b/lib/routes/ncc-cma/cmdp.ts index f504bb332..3f297f448 100644 --- a/lib/routes/ncc-cma/cmdp.ts +++ b/lib/routes/ncc-cma/cmdp.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/cmdp/image/:id{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -68,7 +76,7 @@ export default async (ctx) => { const image = $('img.logo').prop('src'); const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}${titles.length === 0 ? '' : ` - ${titles.join('|')}`}`, link: currentUrl, @@ -80,5 +88,5 @@ export default async (ctx) => { subtitle, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/ncc-cma/maintainer.ts b/lib/routes/ncc-cma/maintainer.ts deleted file mode 100644 index 3b40be277..000000000 --- a/lib/routes/ncc-cma/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/cmdp/image/:id?': ['nczitzk'], -}; diff --git a/lib/routes/ncc-cma/namespace.ts b/lib/routes/ncc-cma/namespace.ts new file mode 100644 index 000000000..befbc6ab9 --- /dev/null +++ b/lib/routes/ncc-cma/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家气候中心', + url: 'cmdp.ncc-cma.net', +}; diff --git a/lib/routes/ncc-cma/radar.ts b/lib/routes/ncc-cma/radar.ts deleted file mode 100644 index c4ce12a23..000000000 --- a/lib/routes/ncc-cma/radar.ts +++ /dev/null @@ -1,229 +0,0 @@ -export default { - 'ncc-cma.net': { - _name: '国家气候中心', - cmdp: [ - { - title: '中国气温 - 日平均气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/RPJQWQYZ', - }, - { - title: '中国气温 - 近5天平均气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ5TPJQWJP', - }, - { - title: '中国气温 - 近10天平均气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ10TQWJP', - }, - { - title: '中国气温 - 近20天平均气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ20TQWJP', - }, - { - title: '中国气温 - 近30天平均气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ30TQWJP', - }, - { - title: '中国气温 - 本月以来气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BYYLQWJP', - }, - { - title: '中国气温 - 本季以来气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BJYLQWJP', - }, - { - title: '中国气温 - 本年以来气温距平', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BNYLQWJP', - }, - { - title: '中国降水 - 日降水量分布', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/QGRJSLFBT0808S', - }, - { - title: '中国降水 - 近5天降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ5TJSLFBT', - }, - { - title: '中国降水 - 近10天降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ10TJSL', - }, - { - title: '中国降水 - 近20天降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ20TJSL', - }, - { - title: '中国降水 - 近30天降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ30TJSL', - }, - { - title: '中国降水 - 本月以来降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BYYLJSL', - }, - { - title: '中国降水 - 本季以来降水量', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BJYLJSL', - }, - { - title: '中国降水 - 近10天降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ10TJSLJP', - }, - { - title: '中国降水 - 近20天降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ20TJSLJP', - }, - { - title: '中国降水 - 近30天降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/ZJ30TJSLJP', - }, - { - title: '中国降水 - 本月以来降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BYYLJSLJPZYQHZ', - }, - { - title: '中国降水 - 本季以来降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BJYLJSLJPZJQHZ', - }, - { - title: '中国降水 - 本年以来降水量距平百分率', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/BNYLJSLJP', - }, - { - title: '全球气温 - 气温距平(最近10天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmeana10_', - }, - { - title: '全球气温 - 气温距平(最近20天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmeana20_', - }, - { - title: '全球气温 - 气温距平(最近30天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmeana30_', - }, - { - title: '全球气温 - 气温距平(最近90天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmeana90_', - }, - { - title: '全球气温 - 最低气温距平(最近30天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmina30_', - }, - { - title: '全球气温 - 最低气温距平(最近90天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmina90_', - }, - { - title: '全球气温 - 最高气温距平(最近30天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmaxa30_', - }, - { - title: '全球气温 - 最高气温距平(最近90天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbtmaxa90_', - }, - { - title: '全球降水 - 降水量(最近10天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbrain10_', - }, - { - title: '全球降水 - 降水量(最近20天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbrain20_', - }, - { - title: '全球降水 - 降水量(最近30天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbrain30_', - }, - { - title: '全球降水 - 降水量(最近90天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbrain90_', - }, - { - title: '全球降水 - 降水距平百分率(最近10天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbraina10_', - }, - { - title: '全球降水 - 降水距平百分率(最近20天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbraina20_', - }, - { - title: '全球降水 - 降水距平百分率(最近30天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbraina30_', - }, - { - title: '全球降水 - 降水距平百分率(最近90天)', - docs: 'https://docs.rsshub.app/routes/forecast#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce', - source: ['/cn/index.htm'], - target: '/ncc-cma/cmdp/image/glbraina90_', - }, - ], - }, -}; diff --git a/lib/routes/ncc-cma/router.ts b/lib/routes/ncc-cma/router.ts deleted file mode 100644 index fa60d7e38..000000000 --- a/lib/routes/ncc-cma/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/cmdp/image/:id{.+}?', './cmdp'); -}; diff --git a/lib/routes/ncepu/maintainer.ts b/lib/routes/ncepu/maintainer.ts deleted file mode 100644 index b9ba76d8a..000000000 --- a/lib/routes/ncepu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/master/:type': ['nilleo'], -}; diff --git a/lib/routes/ncepu/master/masterinfo.ts b/lib/routes/ncepu/master/masterinfo.ts index fc640401c..6d83b9508 100644 --- a/lib/routes/ncepu/master/masterinfo.ts +++ b/lib/routes/ncepu/master/masterinfo.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -20,7 +21,28 @@ const url_map = { pyxx: 'pyxx/pyxx', }; -export default async (ctx) => { +export const route: Route = { + path: '/master/:type', + categories: ['university'], + example: '/ncepu/master/tzgg', + parameters: { type: '类型参数' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '北京校区研究生院', + maintainers: ['nilleo'], + handler, + description: `| 类型 | 硕士招生信息 | 通知公告 | 研究生培养信息 | + | ---- | ------------ | -------- | -------------- | + | 参数 | zsxx | tzgg | pyxx |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const response = await got(`https://yjsy.ncepu.edu.cn/${url_map[type]}/index.htm`); const data = response.data; // 获取页面 html 数据 @@ -65,10 +87,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${title_map[type]}-华北电力大学研究生院`, link: `http://yjsy.ncepu.edu.cn/${url_map[type]}`, description: `华北电力大学研究生院${description_map[type]}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ncepu/namespace.ts b/lib/routes/ncepu/namespace.ts new file mode 100644 index 000000000..19f34a792 --- /dev/null +++ b/lib/routes/ncepu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华北电力大学', + url: 'yjsy.ncepu.edu.cn', +}; diff --git a/lib/routes/ncepu/radar.ts b/lib/routes/ncepu/radar.ts deleted file mode 100644 index 530358ac6..000000000 --- a/lib/routes/ncepu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'ncepu.edu.cn': { - _name: '华北电力大学研究生院', - yjsy: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-bei-dian-li-da-xue', - source: ['/tzgg/index.htm', '/'], - target: '/ncepu/master/tzgg', - }, - { - title: '硕士招生信息', - docs: 'https://docs.rsshub.app/routes/university#hua-bei-dian-li-da-xue', - source: ['/zsxx/sszsxx/index.htm', '/'], - target: '/ncepu/master/zsxx', - }, - { - title: '研究生培养信息', - docs: 'https://docs.rsshub.app/routes/university#hua-bei-dian-li-da-xue', - source: ['/pyxx/pyxx/index.htm', '/'], - target: '/ncepu/master/pyxx', - }, - ], - }, -}; diff --git a/lib/routes/ncepu/router.ts b/lib/routes/ncepu/router.ts deleted file mode 100644 index 49fd89909..000000000 --- a/lib/routes/ncepu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/master/:type', './master/masterinfo'); -}; diff --git a/lib/routes/ncu/jwc.ts b/lib/routes/ncu/jwc.ts index 01caf4250..ce1eafae7 100644 --- a/lib/routes/ncu/jwc.ts +++ b/lib/routes/ncu/jwc.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // 自订的 got import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析器 import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/ncu/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.ncu.edu.cn/', 'jwc.ncu.edu.cn/jwtz/index.htm'], + }, + name: '教务通知', + maintainers: ['ywh555hhh'], + handler, + url: 'jwc.ncu.edu.cn/', +}; + +async function handler() { const baseUrl = 'https://jwc.ncu.edu.cn'; const response = await got(baseUrl); const $ = load(response.body); const list = $('.box3 .inner ul.img-list li'); - ctx.set('data', { + return { title: '南昌大学教务处', link: baseUrl, description: '南昌大学教务处', @@ -29,5 +52,5 @@ export default async (ctx) => { pubDate: parseDate(date, 'MM-DD').setFullYear(month < 6 ? new Date().getFullYear() - 1 : new Date().getFullYear()), }; }), - }); -}; + }; +} diff --git a/lib/routes/ncu/maintainer.ts b/lib/routes/ncu/maintainer.ts deleted file mode 100644 index e88777ace..000000000 --- a/lib/routes/ncu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jwc': ['ywh555hhh'], -}; diff --git a/lib/routes/ncu/namespace.ts b/lib/routes/ncu/namespace.ts new file mode 100644 index 000000000..b50b43a80 --- /dev/null +++ b/lib/routes/ncu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南昌大学', + url: 'jwc.ncu.edu.cn', +}; diff --git a/lib/routes/ncu/radar.ts b/lib/routes/ncu/radar.ts deleted file mode 100644 index c39adbf08..000000000 --- a/lib/routes/ncu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ncu.edu.cn': { - _name: '南昌大学', - jwc: [ - { - title: '教务通知', - docs: 'https://docs.rsshub.app/routes/university#nan-chang-da-xue', - source: ['/', '/jwtz/index.htm'], - target: '/ncu/jwc', - }, - ], - }, -}; diff --git a/lib/routes/ncu/router.ts b/lib/routes/ncu/router.ts deleted file mode 100644 index 1b3d4a031..000000000 --- a/lib/routes/ncu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jwc', './jwc'); -}; diff --git a/lib/routes/ncwu/maintainer.ts b/lib/routes/ncwu/maintainer.ts deleted file mode 100644 index 5f41d82d4..000000000 --- a/lib/routes/ncwu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/note': ['vuhe'], -}; diff --git a/lib/routes/ncwu/namespace.ts b/lib/routes/ncwu/namespace.ts new file mode 100644 index 000000000..97bce4e5d --- /dev/null +++ b/lib/routes/ncwu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华北水利水电大学', + url: 'ncwu.edu.cn', +}; diff --git a/lib/routes/ncwu/notice.ts b/lib/routes/ncwu/notice.ts index 2f4b6036d..f963ef51d 100644 --- a/lib/routes/ncwu/notice.ts +++ b/lib/routes/ncwu/notice.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; const baseUrl = 'https://www.ncwu.edu.cn/xxtz.htm'; -export default async (ctx) => { +export const route: Route = { + path: '/notice', + categories: ['university'], + example: '/ncwu/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ncwu.edu.cn/xxtz.htm'], + }, + name: '学校通知', + maintainers: [], + handler, + url: 'ncwu.edu.cn/xxtz.htm', +}; + +async function handler() { const response = await got(baseUrl); const $ = load(response.data); @@ -19,9 +42,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: baseUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/ncwu/radar.ts b/lib/routes/ncwu/radar.ts deleted file mode 100644 index 9d031bc9c..000000000 --- a/lib/routes/ncwu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ncwu.edu.cn': { - _name: '华北水利水电大学', - '.': [ - { - title: '学校通知', - docs: 'https://docs.rsshub.app/routes/university#hua-bei-shui-li-shui-dian-da-xue', - source: '/xxtz.htm', - target: '/ncwu/notice', - }, - ], - }, -}; diff --git a/lib/routes/ncwu/router.ts b/lib/routes/ncwu/router.ts deleted file mode 100644 index 542a85d08..000000000 --- a/lib/routes/ncwu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/notice', './notice'); -}; diff --git a/lib/routes/ndss-symposium/maintainer.ts b/lib/routes/ndss-symposium/maintainer.ts deleted file mode 100644 index 26dd957f0..000000000 --- a/lib/routes/ndss-symposium/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ndss': ['ZeddYu'], -}; diff --git a/lib/routes/ndss-symposium/namespace.ts b/lib/routes/ndss-symposium/namespace.ts new file mode 100644 index 000000000..ab01400d6 --- /dev/null +++ b/lib/routes/ndss-symposium/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Network and Distributed System Security (NDSS) Symposium', + url: 'ndss-symposium.org', +}; diff --git a/lib/routes/ndss-symposium/ndss.ts b/lib/routes/ndss-symposium/ndss.ts index f83778c50..5b99fe023 100644 --- a/lib/routes/ndss-symposium/ndss.ts +++ b/lib/routes/ndss-symposium/ndss.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const url = 'https://www.ndss-symposium.org'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ndss', + categories: ['journal'], + example: '/ndss-symposium/ndss', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ndss-symposium.org/'], + }, + name: 'Accepted papers', + maintainers: ['ZeddYu'], + handler, + url: 'ndss-symposium.org/', + description: `Return results from 2020`, +}; + +async function handler() { // use wordpress api to get data const { data } = await got(`${url}/wp-json/wp/v2/pages?slug=accepted-papers`); @@ -71,11 +95,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'NDSS', link: url, description: 'The Network and Distributed System Security (NDSS) Symposium Accpeted Papers', allowEmpty: true, item: items.flat(), - }); -}; + }; +} diff --git a/lib/routes/ndss-symposium/radar.ts b/lib/routes/ndss-symposium/radar.ts deleted file mode 100644 index cf93a2137..000000000 --- a/lib/routes/ndss-symposium/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ndss-symposium.org': { - _name: 'Network and Distributed System Security (NDSS) Symposium', - '.': [ - { - title: 'Accepted papers', - docs: 'https://docs.rsshub.app/routes/journal#network-and-distributed-system-security-ndss-symposium', - source: ['/'], - target: '/ndss-symposium/ndss', - }, - ], - }, -}; diff --git a/lib/routes/ndss-symposium/router.ts b/lib/routes/ndss-symposium/router.ts deleted file mode 100644 index 60721aeaa..000000000 --- a/lib/routes/ndss-symposium/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/ndss', './ndss'); -}; diff --git a/lib/routes/neatdownloadmanager/download.ts b/lib/routes/neatdownloadmanager/download.ts index f1ffdd8d1..015437622 100644 --- a/lib/routes/neatdownloadmanager/download.ts +++ b/lib/routes/neatdownloadmanager/download.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/download/:os?', + categories: ['program-update'], + example: '/neatdownloadmanager/download', + parameters: { os: 'Operating system, windows or macos, all by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['neatdownloadmanager.com/index.php', 'neatdownloadmanager.com/'], + }, + name: 'Download', + maintainers: ['nczitzk'], + handler, + url: 'neatdownloadmanager.com/index.php', +}; + +async function handler(ctx) { const os = (ctx.req.param('os') ?? '').toLowerCase(); const rootUrl = 'https://www.neatdownloadmanager.com'; @@ -38,9 +61,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Neat Download Manager', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/neatdownloadmanager/maintainer.ts b/lib/routes/neatdownloadmanager/maintainer.ts deleted file mode 100644 index 87804d4d1..000000000 --- a/lib/routes/neatdownloadmanager/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/download/:os?': ['nczitzk'], -}; diff --git a/lib/routes/neatdownloadmanager/namespace.ts b/lib/routes/neatdownloadmanager/namespace.ts new file mode 100644 index 000000000..0614af9ac --- /dev/null +++ b/lib/routes/neatdownloadmanager/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Neat Download Manager', + url: 'neatdownloadmanager.com', +}; diff --git a/lib/routes/neatdownloadmanager/radar.ts b/lib/routes/neatdownloadmanager/radar.ts deleted file mode 100644 index 84d70a408..000000000 --- a/lib/routes/neatdownloadmanager/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'neatdownloadmanager.com': { - _name: 'Neat Download Manager', - '.': [ - { - title: 'Download', - docs: 'https://docs.rsshub.app/routes/program-update#neat-download-manager-download', - source: ['/index.php', '/'], - target: '/neatdownloadmanager/download/:os?', - }, - ], - }, -}; diff --git a/lib/routes/neatdownloadmanager/router.ts b/lib/routes/neatdownloadmanager/router.ts deleted file mode 100644 index 6d2776bed..000000000 --- a/lib/routes/neatdownloadmanager/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/download/:os?', './download'); -}; diff --git a/lib/routes/neea/index.ts b/lib/routes/neea/index.ts index 7b2b26ed2..c02d90c33 100644 --- a/lib/routes/neea/index.ts +++ b/lib/routes/neea/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -19,7 +20,14 @@ function loadContent(link) { }); } -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + name: 'Unknown', + maintainers: ['SunShinenny'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const host = `http://${type}.neea.edu.cn${typeDic[type].url}`; const response = await got({ @@ -48,13 +56,13 @@ export default async (ctx) => { return Object.assign({}, single, other); }) ); - ctx.set('data', { + return { title: `${typeDic[String(type)].title}动态`, link: host, description: `${typeDic[String(type)].title}动态 `, item: process, - }); -}; + }; +} const typeDic = { // 国家教育考试 diff --git a/lib/routes/neea/jlpt.ts b/lib/routes/neea/jlpt.ts index 12c515b0c..c296f49f8 100644 --- a/lib/routes/neea/jlpt.ts +++ b/lib/routes/neea/jlpt.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jlpt', + categories: ['study'], + example: '/neea/jlpt', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jlpt.neea.cn/'], + }, + name: '教育部考试中心日本语能力测试重要通知', + maintainers: ['nczitzk'], + handler, + url: 'jlpt.neea.cn/', +}; + +async function handler() { const rootUrl = 'https://news.neea.cn'; const currentUrl = `${rootUrl}/JLPT/1/newslist.htm`; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '重要通知 - 教育部考试中心日本语能力测试', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/neea/maintainer.ts b/lib/routes/neea/maintainer.ts deleted file mode 100644 index 6acfde3ab..000000000 --- a/lib/routes/neea/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jlpt': ['nczitzk'], - '/:type?': ['SunShinenny'], -}; diff --git a/lib/routes/neea/namespace.ts b/lib/routes/neea/namespace.ts new file mode 100644 index 000000000..d3aeb74d2 --- /dev/null +++ b/lib/routes/neea/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NEEA 中国教育考试网', + url: 'jlpt.neea.cn', +}; diff --git a/lib/routes/neea/radar.ts b/lib/routes/neea/radar.ts deleted file mode 100644 index 81148ff66..000000000 --- a/lib/routes/neea/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'neea.cn': { - _name: '中国教育考试网', - jlpt: [ - { - title: '教育部考试中心日本语能力测试重要通知', - docs: 'https://docs.rsshub.app/routes/study#jiao-yu-bu-kao-shi-zhong-xin-ri-ben-yu-neng-li-ce-shi-zhong-yao-tong-zhi', - source: ['/'], - target: '/neea/jlpt', - }, - ], - }, -}; diff --git a/lib/routes/neea/router.ts b/lib/routes/neea/router.ts deleted file mode 100644 index 012dd5742..000000000 --- a/lib/routes/neea/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jlpt', './jlpt'); - router.get('/:type?', './index'); -}; diff --git a/lib/routes/nenu/maintainer.ts b/lib/routes/nenu/maintainer.ts deleted file mode 100644 index 36c2f6c83..000000000 --- a/lib/routes/nenu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/sohac/:path+': ['nczitzk'], - '/yjsy/:path+': ['nczitzk'], -}; diff --git a/lib/routes/nenu/namespace.ts b/lib/routes/nenu/namespace.ts new file mode 100644 index 000000000..ec8774201 --- /dev/null +++ b/lib/routes/nenu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东北师范大学', + url: 'sohac.nenu.edu.cn', +}; diff --git a/lib/routes/nenu/radar.ts b/lib/routes/nenu/radar.ts deleted file mode 100644 index 93735573d..000000000 --- a/lib/routes/nenu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'nenu.edu.cn': { - _name: '东北师范大学', - sohac: [ - { - title: '历史文化学院', - docs: 'https://docs.rsshub.app/routes/university#dong-bei-shi-fan-da-xue-li-shi-wen-hua-xue-yuan', - source: ['/index/xyxx.htm', '/index/tzgg.htm', '/'], - target: (params, url) => `/nenu/sohac${new URL(url).href.match(/\.edu\.cn(.*?)\.htm/)[1]}`, - }, - ], - yjsy: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#dong-bei-shi-fan-da-xue-yan-jiu-sheng-yuan', - source: ['/tzgg.htm', '/'], - target: (params, url) => `/nenu/yjsy${new URL(url).href.match(/\.edu\.cn(.*?)\.htm/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/nenu/router.ts b/lib/routes/nenu/router.ts deleted file mode 100644 index a7f731575..000000000 --- a/lib/routes/nenu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/sohac/*', './sohac'); - router.get('/yjsy/*', './yjsy'); -}; diff --git a/lib/routes/nenu/sohac.ts b/lib/routes/nenu/sohac.ts index fc61eee2d..4181dc335 100644 --- a/lib/routes/nenu/sohac.ts +++ b/lib/routes/nenu/sohac.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/sohac/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +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/, ''); @@ -54,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nenu/yjsy.ts b/lib/routes/nenu/yjsy.ts index 6a5351309..498b96d3e 100644 --- a/lib/routes/nenu/yjsy.ts +++ b/lib/routes/nenu/yjsy.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +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/, ''); @@ -58,9 +66,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/netflav/index.ts b/lib/routes/netflav/index.ts index f7590223f..a445845a9 100644 --- a/lib/routes/netflav/index.ts +++ b/lib/routes/netflav/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['netflav.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'netflav.com/', +}; + +async function handler() { const baseUrl = 'https://netflav.com'; const { data } = await got(baseUrl); @@ -30,7 +43,7 @@ export default async (ctx) => { category: [...new Set(item.tags?.map((t) => t.replace(/^(\w{2}:)/, '')))], })); - ctx.set('data', { + return { title: head.find((h) => h[0] === 'title')[1].children, description: head.find((h) => h[0] === 'meta' && h[1].name === 'description')[1].content, logo: `${baseUrl}${head.find((h) => h[0] === 'meta' && h[1].property === 'og:image')[1].content}`, @@ -38,5 +51,5 @@ export default async (ctx) => { link: baseUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/netflav/maintainer.ts b/lib/routes/netflav/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/netflav/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/netflav/namespace.ts b/lib/routes/netflav/namespace.ts new file mode 100644 index 000000000..6438e6fcf --- /dev/null +++ b/lib/routes/netflav/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Netflav', + url: 'netflav.com', +}; diff --git a/lib/routes/netflav/radar.ts b/lib/routes/netflav/radar.ts deleted file mode 100644 index b2931fbca..000000000 --- a/lib/routes/netflav/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'netflav.com': { - _name: 'Netflav', - '.': [ - { - title: 'Index', - docs: 'https://docs.rsshub.app/multimedia#netflav', - source: ['/'], - target: '/netflav', - }, - ], - }, -}; diff --git a/lib/routes/netflav/router.ts b/lib/routes/netflav/router.ts deleted file mode 100644 index f15cf51c5..000000000 --- a/lib/routes/netflav/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './'); -}; diff --git a/lib/routes/neu/bmie.ts b/lib/routes/neu/bmie.ts index d39a3ea32..f6bb3212a 100644 --- a/lib/routes/neu/bmie.ts +++ b/lib/routes/neu/bmie.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -23,7 +24,42 @@ const map = { alumni_style: 557, }; -export default async (ctx) => { +export const route: Route = { + path: '/bmie/:type', + categories: ['university'], + example: '/neu/bmie/news', + parameters: { type: '分类 id 见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '医学与生物信息工程学院', + maintainers: ['tennousuathena'], + handler, + description: `| Id | 名称 | + | ----------------------- | ---------- | + | news | 学院新闻 | + | academic | 学术科研 | + | talent\_development | 人才培养 | + | international\_exchange | 国际交流 | + | announcement | 通知公告 | + | undergraduate\_dev | 本科生培养 | + | postgraduate\_dev | 研究生培养 | + | undergraduate\_recruit | 本科生招募 | + | postgraduate\_recruit | 研究生招募 | + | CPC\_build | 党的建设 | + | CPC\_work | 党委工作 | + | union\_work | 工会工作 | + | CYL\_work | 共青团工作 | + | security\_management | 安全管理 | + | alumni\_style | 校友风采 |`, +}; + +async function handler(ctx) { let type = ctx.req.param('type'); if (map[type] !== undefined) { type = map[type]; @@ -87,9 +123,9 @@ export default async (ctx) => { return result; }) ); - ctx.set('data', { + return { title: `东北大学 医学与生物信息工程学院 ${title}`, link: newsUrl, item: results, - }); -}; + }; +} diff --git a/lib/routes/neu/maintainer.ts b/lib/routes/neu/maintainer.ts deleted file mode 100644 index d478f489e..000000000 --- a/lib/routes/neu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/bmie/:type': ['tennousuathena'], - '/news/:type': ['JeasonLau'], -}; diff --git a/lib/routes/neu/namespace.ts b/lib/routes/neu/namespace.ts new file mode 100644 index 000000000..20251e598 --- /dev/null +++ b/lib/routes/neu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东北大学', + url: 'neunews.neu.edu.cn', +}; diff --git a/lib/routes/neu/news.ts b/lib/routes/neu/news.ts index 6ef3ea6fc..0d1a04a36 100644 --- a/lib/routes/neu/news.ts +++ b/lib/routes/neu/news.ts @@ -1,10 +1,49 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://neunews.neu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type', + categories: ['university'], + example: '/neu/news/ddyw', + parameters: { type: '种类名,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['neunews.neu.edu.cn/:type/list.htm'], + }, + name: '新闻网', + maintainers: ['JeasonLau'], + handler, + description: `| 种类名 | 参数 | + | -------- | ---- | + | 东大要闻 | ddyw | + | 媒体东大 | mtdd | + | 通知公告 | tzgg | + | 新闻纵横 | xwzh | + | 人才培养 | rcpy | + | 学术科研 | xsky | + | 英文新闻 | 217 | + | 招生就业 | zsjy | + | 考研出国 | kycg | + | 校园文学 | xywx | + | 校友风采 | xyfc | + | 时事热点 | ssrd | + | 教育前沿 | jyqy | + | 文化体育 | whty | + | 最新科技 | zxkj |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const newsUrl = `${baseUrl}/${type}/list.htm`; const response = await got(newsUrl); @@ -37,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `东北大学新闻网-${$('head title').text()}`, link: newsUrl, item: results, - }); -}; + }; +} diff --git a/lib/routes/neu/radar.ts b/lib/routes/neu/radar.ts deleted file mode 100644 index 908f47f61..000000000 --- a/lib/routes/neu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'neu.edu.cn': { - _name: '东北大学', - neunews: [ - { - title: '新闻网', - docs: 'https://docs.rsshub.app/routes/university#dong-bei-da-xue', - source: ['/:type/list.htm'], - target: '/neu/news/:type', - }, - ], - 'www.bmie': [ - { - title: '学院新闻 - 医学与生物信息工程学院', - docs: 'https://docs.rsshub.app/routes/university#dong-bei-da-xue', - source: ['/'], - target: '/neu/bmie/news', - }, - ], - }, -}; diff --git a/lib/routes/neu/router.ts b/lib/routes/neu/router.ts deleted file mode 100644 index bd331e19b..000000000 --- a/lib/routes/neu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/bmie/:type', './bmie'); - router.get('/news/:type', './news'); -}; diff --git a/lib/routes/newmuseum/exhibitions.ts b/lib/routes/newmuseum/exhibitions.ts index ea4a1889e..9c9df292c 100644 --- a/lib/routes/newmuseum/exhibitions.ts +++ b/lib/routes/newmuseum/exhibitions.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/exhibitions', + categories: ['travel'], + example: '/newmuseum/exhibitions', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Exhibitions', + maintainers: ['chazeon'], + handler, +}; + +async function handler(ctx) { let link; const state = ctx.req.query('state'); @@ -27,4 +46,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/newmuseum/maintainer.ts b/lib/routes/newmuseum/maintainer.ts deleted file mode 100644 index cfaf9ced0..000000000 --- a/lib/routes/newmuseum/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/exhibitions': ['chazeon'], -}; diff --git a/lib/routes/newmuseum/namespace.ts b/lib/routes/newmuseum/namespace.ts new file mode 100644 index 000000000..e135dfc83 --- /dev/null +++ b/lib/routes/newmuseum/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'New Museum 纽约新美术馆', + url: 'www.newmuseum.org', +}; diff --git a/lib/routes/newmuseum/radar.ts b/lib/routes/newmuseum/radar.ts deleted file mode 100644 index e08330281..000000000 --- a/lib/routes/newmuseum/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'newmuseum.org': { - _name: 'New Museum', - www: [ - { - title: 'Exhibitions', - docs: 'https://docs.rsshub.app/routes/travel#new-museum', - }, - ], - }, -}; diff --git a/lib/routes/newmuseum/router.ts b/lib/routes/newmuseum/router.ts deleted file mode 100644 index 5876eb541..000000000 --- a/lib/routes/newmuseum/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/exhibitions', './exhibitions'); -}; diff --git a/lib/routes/newrank/douyin.ts b/lib/routes/newrank/douyin.ts index 0dde078bc..b28b4b568 100644 --- a/lib/routes/newrank/douyin.ts +++ b/lib/routes/newrank/douyin.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/douyin/:dyid', + categories: ['social-media'], + example: '/newrank/douyin/110266463747', + parameters: { dyid: '抖音ID,可在新榜账号详情 URL 中找到' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '抖音短视频', + maintainers: ['lessmoe'], + handler, + description: `:::warning +免费版账户抖音每天查询次数 20 次,如需增加次数可购买新榜会员或等待未来多账户支持 +:::`, +}; + +async function handler(ctx) { if (!config.newrank || !config.newrank.cookie) { throw new Error('newrank RSS is disabled due to the lack of relevant config'); } @@ -54,10 +76,10 @@ export default async (ctx) => { pubDate: item.create_time, })); - ctx.set('data', { + return { title: name + ' - 抖音', description, link: 'https://xd.newrank.cn/data/d/account/workList/' + uid, item: items, - }); -}; + }; +} diff --git a/lib/routes/newrank/maintainer.ts b/lib/routes/newrank/maintainer.ts deleted file mode 100644 index 54ad8fc36..000000000 --- a/lib/routes/newrank/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/douyin/:dyid': ['lessmoe'], - '/wechat/:wxid': ['lessmoe'], -}; diff --git a/lib/routes/newrank/namespace.ts b/lib/routes/newrank/namespace.ts new file mode 100644 index 000000000..5dc50c11d --- /dev/null +++ b/lib/routes/newrank/namespace.ts @@ -0,0 +1,10 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新榜', + url: 'newrank.cn', + description: `:::warning +部署时需要配置 NEWRANK\_COOKIE,具体见部署文档 +请勿过高频抓取,新榜疑似对每天调用 token 总次数进行了限制,超限会报错 +:::`, +}; diff --git a/lib/routes/newrank/radar.ts b/lib/routes/newrank/radar.ts deleted file mode 100644 index 22dd66df0..000000000 --- a/lib/routes/newrank/radar.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - 'newrank.cn': { - _name: '新榜', - '.': [ - { - title: '微信公众号', - docs: 'https://docs.rsshub.app/routes/social-media#xin-bang', - }, - { - title: '抖音短视频', - docs: 'https://docs.rsshub.app/routes/social-media#xin-bang', - }, - ], - }, -}; diff --git a/lib/routes/newrank/router.ts b/lib/routes/newrank/router.ts deleted file mode 100644 index dd3cc884a..000000000 --- a/lib/routes/newrank/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/douyin/:dyid', './douyin'); - router.get('/wechat/:wxid', './wechat'); -}; diff --git a/lib/routes/newrank/wechat.ts b/lib/routes/newrank/wechat.ts index a85baba8b..47a875547 100644 --- a/lib/routes/newrank/wechat.ts +++ b/lib/routes/newrank/wechat.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { finishArticleItem } from '@/utils/wechat-mp'; import { load } from 'cheerio'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/wechat/:wxid', + categories: ['social-media'], + example: '/newrank/wechat/chijiread', + parameters: { wxid: '微信号,若微信号与新榜信息不一致,以新榜为准' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '微信公众号', + maintainers: ['lessmoe'], + handler, +}; + +async function handler(ctx) { if (!config.newrank || !config.newrank.cookie) { throw new Error('newrank RSS is disabled due to the lack of relevant config'); } @@ -57,9 +76,9 @@ export default async (ctx) => { })); await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title: name + ' - 微信公众号', link: `https://www.newrank.cn/new/readDetial?account=${uid}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/news/maintainer.ts b/lib/routes/news/maintainer.ts deleted file mode 100644 index 7d897838c..000000000 --- a/lib/routes/news/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/xhsxw': ['nczitzk'], -}; diff --git a/lib/routes/news/namespace.ts b/lib/routes/news/namespace.ts new file mode 100644 index 000000000..8dfc1cc04 --- /dev/null +++ b/lib/routes/news/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小黑盒', + url: 'news.cn', +}; diff --git a/lib/routes/news/radar.ts b/lib/routes/news/radar.ts deleted file mode 100644 index f8bf423fa..000000000 --- a/lib/routes/news/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'news.cn': { - _name: '新华网', - '.': [ - { - title: '新华社新闻', - docs: 'https://docs.rsshub.app/routes/new-media#xin-hua-wang-xin-hua-she-xin-wen', - source: ['/xhsxw.htm'], - target: '/news/xhsxw', - }, - ], - }, -}; diff --git a/lib/routes/news/router.ts b/lib/routes/news/router.ts deleted file mode 100644 index abc05ba3c..000000000 --- a/lib/routes/news/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/xhsxw', './xhsxw'); - router.get('/whxw', './xhsxw'); -}; diff --git a/lib/routes/news/xhsxw.ts b/lib/routes/news/xhsxw.ts index 356d042cf..199b833b6 100644 --- a/lib/routes/news/xhsxw.ts +++ b/lib/routes/news/xhsxw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: ['/xhsxw', '/whxw'], + categories: ['new-media'], + example: '/news/xhsxw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.cn/xhsxw.htm'], + }, + name: '新华社新闻', + maintainers: ['nczitzk'], + handler, + url: 'news.cn/xhsxw.htm', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; const rootUrl = 'http://www.news.cn'; @@ -70,7 +93,7 @@ export default async (ctx) => { const image = new URL('20141223_xhsxw_logo_v1.png', rootUrl).href; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -81,5 +104,5 @@ export default async (ctx) => { logo: icon, author: title.split(/_/).pop(), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/newsmarket/index.ts b/lib/routes/newsmarket/index.ts index 20c0c91a1..dac90b361 100644 --- a/lib/routes/newsmarket/index.ts +++ b/lib/routes/newsmarket/index.ts @@ -1,9 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/newsmarket', + parameters: { category: '分类,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['newsmarket.com.tw/blog/category/:category', 'newsmarket.com.tw/'], + }, + name: '分類', + maintainers: ['nczitzk'], + handler, + description: `| 時事。政策 | 食安 | 新知 | 愛地方 | 種好田 | 好吃。好玩 | + | ----------- | ----------- | --------- | ------------ | ------------ | ------------- | + | news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun | + + | 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 | + | -------------- | ------------------ | -------------------- | ------------------- | ------- | + | food-education | people-and-history | raising-and-breeding | living-green-travel | opinion |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://www.newsmarket.com.tw'; @@ -56,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/newsmarket/maintainer.ts b/lib/routes/newsmarket/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/newsmarket/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/newsmarket/namespace.ts b/lib/routes/newsmarket/namespace.ts new file mode 100644 index 000000000..62811b182 --- /dev/null +++ b/lib/routes/newsmarket/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上下游 News&Market', + url: 'newsmarket.com.tw', +}; diff --git a/lib/routes/newsmarket/radar.ts b/lib/routes/newsmarket/radar.ts deleted file mode 100644 index 7b37bbff1..000000000 --- a/lib/routes/newsmarket/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'newsmarket.com.tw': { - _name: '上下游News&Market', - '.': [ - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/new-media#shang-xia-you-news-market', - source: ['/blog/category/:category', '/'], - target: '/newsmarket/:category?', - }, - ], - }, -}; diff --git a/lib/routes/newsmarket/router.ts b/lib/routes/newsmarket/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/newsmarket/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/newzmz/index.ts b/lib/routes/newzmz/index.ts index 1ffdb34d4..812adcdfc 100644 --- a/lib/routes/newzmz/index.ts +++ b/lib/routes/newzmz/index.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, getItems, getItemInfo, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:downLinkType?', + categories: ['multimedia'], + example: '/newzmz/qEzRyY3v', + parameters: { id: '剧集 id,可在剧集下载页 URL 中找到', downLinkType: '下载链接类型,默认为磁力链' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['newzmz.com/'], + target: '', + }, + name: '指定剧集', + maintainers: ['nczitzk'], + handler, + url: 'newzmz.com/', + description: `:::tip + [雪国列车 (剧版)](https://nzmz.xyz/details-qEzRyY3v.html) 的下载页 URL 为 \`https://v.ys99.xyz/view/qEzRyY3v.html\`,即剧集 id 为 \`qEzRyY3v\` + :::`, +}; + +async function handler(ctx) { const { id = '1', downLinkType = '磁力链' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -51,7 +78,7 @@ export default async (ctx) => { const title = `${$('title').text()}${headerTitle ? ` - ${headerTitle}` : ''}`; const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: isCategory ? items : items.slice(0, limit), title, link: currentUrl, @@ -63,5 +90,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author: title, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/newzmz/maintainer.ts b/lib/routes/newzmz/maintainer.ts deleted file mode 100644 index a94b44a63..000000000 --- a/lib/routes/newzmz/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:category?/:downLinkType?': ['nczitzk'], - '/:id?/:downLinkType?': ['nczitzk'], -}; diff --git a/lib/routes/newzmz/namespace.ts b/lib/routes/newzmz/namespace.ts new file mode 100644 index 000000000..30d940e83 --- /dev/null +++ b/lib/routes/newzmz/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NEW 字幕组', + url: 'newzmz.com', +}; diff --git a/lib/routes/newzmz/radar.ts b/lib/routes/newzmz/radar.ts deleted file mode 100644 index 10fdf9657..000000000 --- a/lib/routes/newzmz/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'newzmz.com': { - _name: 'NEW 字幕组', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#new-zi-mu-zu', - source: ['/'], - target: '/newzmz', - }, - { - title: '指定剧集', - docs: 'https://docs.rsshub.app/routes/multimedia#new-zi-mu-zu', - source: ['/view/:id'], - target: (params) => `/newzmz/${params.id.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/newzmz/router.ts b/lib/routes/newzmz/router.ts deleted file mode 100644 index adf2083a8..000000000 --- a/lib/routes/newzmz/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?/:downLinkType?', './'); -}; diff --git a/lib/routes/nextapple/maintainer.ts b/lib/routes/nextapple/maintainer.ts deleted file mode 100644 index 7bd5dd788..000000000 --- a/lib/routes/nextapple/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/realtime/:category?': ['miles170'], -}; diff --git a/lib/routes/nextapple/namespace.ts b/lib/routes/nextapple/namespace.ts new file mode 100644 index 000000000..e2630f4c9 --- /dev/null +++ b/lib/routes/nextapple/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '壹蘋新聞網', + url: 'tw.nextapple.com', +}; diff --git a/lib/routes/nextapple/radar.ts b/lib/routes/nextapple/radar.ts deleted file mode 100644 index 4ef86e63c..000000000 --- a/lib/routes/nextapple/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nextapple.com': { - _name: '壹蘋新聞網', - tw: [ - { - title: '最新新聞', - docs: 'https://docs.rsshub.app/routes/new-media#yi-ping-xin-wen-wang', - source: ['/', '/realtime/:category'], - target: '/nextapple/realtime/:category?', - }, - ], - }, -}; diff --git a/lib/routes/nextapple/realtime.ts b/lib/routes/nextapple/realtime.ts index 054e67170..bca2a94e0 100644 --- a/lib/routes/nextapple/realtime.ts +++ b/lib/routes/nextapple/realtime.ts @@ -1,10 +1,40 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/realtime/:category?', + categories: ['new-media'], + example: '/nextapple/realtime/latest', + parameters: { category: '類別,見下表,默認為首頁' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tw.nextapple.com/', 'tw.nextapple.com/realtime/:category'], + }, + name: '最新新聞', + maintainers: ['miles170'], + handler, + url: 'tw.nextapple.com/', + description: `| 首頁 | 焦點 | 熱門 | 娛樂 | 生活 | 女神 | 社會 | + | ------ | --------- | ---- | ------------- | ---- | -------- | ----- | + | latest | recommend | hit | entertainment | life | gorgeous | local | + + | 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 | + | -------- | ------------- | ------- | ------ | --------- | ------- | + | politics | international | finance | sports | lifestyle | gadget |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'latest'; const currentUrl = `https://tw.nextapple.com/realtime/${category}`; const response = await got(currentUrl); @@ -37,9 +67,9 @@ export default async (ctx) => { items.push(item); } - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nextapple/router.ts b/lib/routes/nextapple/router.ts deleted file mode 100644 index 95b2f653b..000000000 --- a/lib/routes/nextapple/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/realtime/:category?', './realtime'); -}; diff --git a/lib/routes/nga/forum.ts b/lib/routes/nga/forum.ts index 64bc54b42..efdde7c5c 100644 --- a/lib/routes/nga/forum.ts +++ b/lib/routes/nga/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; const X_UA = 'NGA_skull/6.0.5(iPhone10,3;iOS 12.0.1)'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:fid/:recommend?', + categories: ['bbs'], + example: '/nga/forum/489', + parameters: { fid: '分区 id, 可在分区主页 URL 找到, 没有 fid 时 stid 同样适用', recommend: '是否只显示精华主题, 留空为否, 任意值为是' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分区帖子', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { const { fid, recommend } = ctx.req.param(); const timestamp = Math.floor(Date.now() / 1000); let cookieString = `guestJs=${timestamp};`; @@ -63,10 +82,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `NGA-${forumname}${recommend ? '-精华' : ''}`, link: `https://nga.178.com/thread.php?fid=${fid}`, description: 'NGA是国内专业的游戏玩家社区,魔兽世界,英雄联盟,炉石传说,风暴英雄,暗黑破坏神3(D3)游戏攻略讨论,以及其他热门游戏玩家社区', item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/nga/maintainer.ts b/lib/routes/nga/maintainer.ts deleted file mode 100644 index 5b44a6fc8..000000000 --- a/lib/routes/nga/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/forum/:fid/:recommend?': ['xyqfer'], - '/post/:tid/:authorId?': ['xyqfer', 'syrinka'], -}; diff --git a/lib/routes/nga/namespace.ts b/lib/routes/nga/namespace.ts new file mode 100644 index 000000000..3f47ca99f --- /dev/null +++ b/lib/routes/nga/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NGA', + url: 'bbs.nga.cn', +}; diff --git a/lib/routes/nga/post.ts b/lib/routes/nga/post.ts index f536e7b33..184dc8131 100644 --- a/lib/routes/nga/post.ts +++ b/lib/routes/nga/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/post/:tid/:authorId?', + categories: ['bbs'], + example: '/nga/post/18449558', + parameters: { tid: '帖子 id, 可在帖子 URL 找到', authorId: '作者 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '帖子', + maintainers: ['xyqfer', 'syrinka'], + handler, +}; + +async function handler(ctx) { const getPageUrl = (tid, authorId, page = 1, hash = '') => `https://nga.178.com/read.php?tid=${tid}&page=${page}${authorId ? `&authorid=${authorId}` : ''}&rand=${Math.random() * 1000}#${hash}`; const getPage = async (tid, authorId, pageId = 1) => { const link = getPageUrl(tid, authorId, pageId); @@ -114,9 +133,9 @@ export default async (ctx) => { const rssTitle = authorName ? `NGA ${authorName} ${title}` : `NGA ${title}`; - ctx.set('data', { + return { title: rssTitle, link: getPageUrl(tid, authorId, pageId), item: items.get(), - }); -}; + }; +} diff --git a/lib/routes/nga/radar.ts b/lib/routes/nga/radar.ts deleted file mode 100644 index c893e39e8..000000000 --- a/lib/routes/nga/radar.ts +++ /dev/null @@ -1,39 +0,0 @@ -const rules = [ - { - title: '分区帖子', - docs: 'https://docs.rsshub.app/routes/bbs#nga-fen-qu-tie-zi', - source: '/thread.php', - target: (params, url) => new URL(url).searchParams.get('fid') && `/nga/forum/${new URL(url).searchParams.get('fid')}`, - }, - { - title: '帖子', - docs: 'https://docs.rsshub.app/routes/bbs#nga-tie-zi', - source: '/read.php', - target: (params, url) => new URL(url).searchParams.get('tid') && `/nga/post/${new URL(url).searchParams.get('tid')}`, - }, - { - title: '帖子 - 只看作者', - docs: 'https://docs.rsshub.app/routes/bbs#nga-tie-zi', - source: '/read.php', - target: (params, url, document) => { - const tid = new URL(url).searchParams.get('tid'); - const authorId = document.documentElement.innerHTML.match(/commonui\.userInfo\.setAll\(\s{3}{"(\d+)"/)[1]; - return `/nga/post/${tid}/${authorId}`; - }, - }, -]; - -export default { - 'nga.cn': { - _name: 'NGA', - bbs: rules, - }, - '178.com': { - _name: 'NGA', - nga: rules, - }, - 'ngabbs.com': { - _name: 'NGA', - '.': rules, - }, -}; diff --git a/lib/routes/nga/router.ts b/lib/routes/nga/router.ts deleted file mode 100644 index 4e1686e35..000000000 --- a/lib/routes/nga/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/forum/:fid/:recommend?', './forum'); - router.get('/post/:tid/:authorId?', './post'); -}; diff --git a/lib/routes/ngocn2/index.ts b/lib/routes/ngocn2/index.ts index 5a5811659..fbdd72299 100644 --- a/lib/routes/ngocn2/index.ts +++ b/lib/routes/ngocn2/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/ngocn2', + parameters: { category: '分类,见下表,默认为所有文章' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ngocn2.org/'], + }, + name: '首页', + maintainers: ['nczitzk'], + handler, + url: 'ngocn2.org/', + description: `| 所有文章 | 早报 | 热点 | + | -------- | ----------- | -------- | + | article | daily-brief | trending |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'article'; const rootUrl = 'https://ngocn2.org'; @@ -49,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.sectitle__content').text()} - NGOCN`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ngocn2/maintainer.ts b/lib/routes/ngocn2/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/ngocn2/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/ngocn2/namespace.ts b/lib/routes/ngocn2/namespace.ts new file mode 100644 index 000000000..879cb18a9 --- /dev/null +++ b/lib/routes/ngocn2/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NGOCN', + url: 'ngocn2.org', +}; diff --git a/lib/routes/ngocn2/radar.ts b/lib/routes/ngocn2/radar.ts deleted file mode 100644 index 2e5c37986..000000000 --- a/lib/routes/ngocn2/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ngocn2.org': { - _name: 'NGOCN', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#ngocn2-fen-lei', - source: ['/'], - target: '/ngocn2/:category?', - }, - ], - }, -}; diff --git a/lib/routes/ngocn2/router.ts b/lib/routes/ngocn2/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/ngocn2/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/nhentai/maintainer.ts b/lib/routes/nhentai/maintainer.ts deleted file mode 100644 index 024d68137..000000000 --- a/lib/routes/nhentai/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/search/:keyword/:mode?': ['MegrezZhu', 'hoilc'], - '/:key/:keyword/:mode?': ['MegrezZhu', 'hoilc'], -}; diff --git a/lib/routes/nhentai/namespace.ts b/lib/routes/nhentai/namespace.ts new file mode 100644 index 000000000..3d10d8736 --- /dev/null +++ b/lib/routes/nhentai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'nhentai', + url: 'nhentai.net', +}; diff --git a/lib/routes/nhentai/other.ts b/lib/routes/nhentai/other.ts index cd70a1d32..67ad5f5c6 100644 --- a/lib/routes/nhentai/other.ts +++ b/lib/routes/nhentai/other.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getSimple, getDetails, getTorrents } from './util'; const supportedKeys = new Set(['parody', 'character', 'tag', 'artist', 'group', 'language', 'category']); -export default async (ctx) => { +export const route: Route = { + path: '/:key/:keyword/:mode?', + categories: ['anime'], + example: '/nhentai/language/chinese', + parameters: { + key: 'Filter term, can be: `parody`, `character`, `tag`, `artist`, `group`, `language` or `category`', + keyword: 'Filter value', + mode: 'mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nhentai.net/:key/:keyword'], + target: '/:key/:keyword', + }, + name: 'Filter', + maintainers: ['MegrezZhu', 'hoilc'], + handler, +}; + +async function handler(ctx) { const { key, keyword, mode } = ctx.req.param(); if (!supportedKeys.has(key)) { @@ -22,10 +49,10 @@ export default async (ctx) => { items = await getTorrents(cache, simples, limit); } - ctx.set('data', { + return { title: `nhentai - ${key} - ${keyword}`, link: url, description: 'hentai', item: items, - }); -}; + }; +} diff --git a/lib/routes/nhentai/radar.ts b/lib/routes/nhentai/radar.ts deleted file mode 100644 index 685067585..000000000 --- a/lib/routes/nhentai/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'nhentai.net': { - _name: 'nhentai', - '.': [ - { - title: '分类筛选', - docs: 'https://docs.rsshub.app/routes/anime#nhentai', - source: ['/:key/:keyword'], - target: '/nhentai/:key/:keyword', - }, - { - title: '高级搜索', - docs: 'https://docs.rsshub.app/routes/anime#nhentai', - source: ['/search'], - target: (_, url) => `/nhentai/search/${new URL(url).searchParams.get('q')}`, - }, - ], - }, -}; diff --git a/lib/routes/nhentai/router.ts b/lib/routes/nhentai/router.ts deleted file mode 100644 index dbf21204d..000000000 --- a/lib/routes/nhentai/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/search/:keyword/:mode?', './search'); - router.get('/:key/:keyword/:mode?', './other'); -}; diff --git a/lib/routes/nhentai/search.ts b/lib/routes/nhentai/search.ts index 55bdbe2b2..06bbacb82 100644 --- a/lib/routes/nhentai/search.ts +++ b/lib/routes/nhentai/search.ts @@ -1,7 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getSimple, getDetails, getTorrents } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword/:mode?', + categories: ['anime'], + example: '/nhentai/search/language%3Ajapanese+-scat+-yaoi+-guro+-"mosaic+censorship"', + parameters: { + keyword: 'Keywords for search. You can copy the content after `q=` after searching on the original website, or you can enter it directly. See the [official website](https://nhentai.net/info/) for details', + mode: 'mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nhentai.net/:key/:keyword'], + target: '/:key/:keyword', + }, + name: 'Advanced Search', + maintainers: ['MegrezZhu', 'hoilc'], + handler, +}; + +async function handler(ctx) { const { keyword, mode } = ctx.req.param(); const url = `https://nhentai.net/search/?q=${keyword}`; @@ -16,9 +42,9 @@ export default async (ctx) => { items = await getTorrents(cache, simples, limit); } - ctx.set('data', { + return { title: `nhentai - search - ${keyword}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/nhk/maintainer.ts b/lib/routes/nhk/maintainer.ts deleted file mode 100644 index a25972e2a..000000000 --- a/lib/routes/nhk/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:lang?': ['TonyRL'], - '/news_web_easy': ['Andiedie'], -}; diff --git a/lib/routes/nhk/namespace.ts b/lib/routes/nhk/namespace.ts new file mode 100644 index 000000000..d1c485f1a --- /dev/null +++ b/lib/routes/nhk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NHK', + url: 'www3.nhk.or.jp', +}; diff --git a/lib/routes/nhk/news-web-easy.ts b/lib/routes/nhk/news-web-easy.ts index 1f8b7715d..7998a688d 100644 --- a/lib/routes/nhk/news-web-easy.ts +++ b/lib/routes/nhk/news-web-easy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news_web_easy', + categories: ['traditional-media'], + example: '/nhk/news_web_easy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www3.nhk.or.jp/news/easy/', 'www3.nhk.or.jp/'], + }, + name: 'News Web Easy', + maintainers: ['Andiedie'], + handler, + url: 'www3.nhk.or.jp/news/easy/', +}; + +async function handler(ctx) { const { data } = await got('https://www3.nhk.or.jp/news/easy/news-list.json'); const dates = data[0]; @@ -44,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'NEWS WEB EASY', link: 'https://www3.nhk.or.jp/news/easy/', description: 'NEWS WEB EASYは、小学生・中学生の皆さんや、日本に住んでいる外国人のみなさんに、わかりやすいことば でニュースを伝えるウェブサイトです。', item: items, - }); -}; + }; +} diff --git a/lib/routes/nhk/news.ts b/lib/routes/nhk/news.ts index 7ecdbb3e8..a1d1cfa23 100644 --- a/lib/routes/nhk/news.ts +++ b/lib/routes/nhk/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,40 @@ import * as path from 'node:path'; const baseUrl = 'https://www3.nhk.or.jp'; const apiUrl = 'https://nwapi.nhk.jp'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:lang?', + categories: ['traditional-media'], + example: '/nhk/news/en', + parameters: { lang: 'Language, see below, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www3.nhk.or.jp/nhkworld/:lang/news/list/', 'www3.nhk.or.jp/nhkworld/:lang/news/'], + target: '/news/:lang', + }, + name: 'WORLD-JAPAN - Top Stories', + maintainers: ['TonyRL'], + handler, + description: `| العربية | বাংলা | မြန်မာဘာသာစကား | 中文(简体) | 中文(繁體) | English | Français | + | ------- | -- | ------------ | ------------ | ------------ | ------- | -------- | + | ar | bn | my | zh | zt | en | fr | + + | हिन्दी | Bahasa Indonesia | 코리언 | فارسی | Português | Русский | Español | + | -- | ---------------- | ------ | ----- | --------- | ------- | ------- | + | hi | id | ko | fa | pt | ru | es | + + | Kiswahili | ภาษาไทย | Türkçe | Українська | اردو | Tiếng Việt | + | --------- | ------- | ------ | ---------- | ---- | ---------- | + | sw | th | tr | uk | ur | vi |`, +}; + +async function handler(ctx) { const { lang = 'en' } = ctx.req.param(); const { data } = await got(`${apiUrl}/nhkworld/rdnewsweb/v7b/${lang}/outline/list.json`); const meta = await got(`${baseUrl}/nhkworld/common/assets/news/config/${lang}.json`); @@ -37,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${Object.values(meta.data.config.navigation.header).find((h) => h.keyname === 'topstories')?.name} | NHK WORLD-JAPAN News`, link: `${baseUrl}/nhkworld/${lang}/news/list/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/nhk/radar.ts b/lib/routes/nhk/radar.ts deleted file mode 100644 index b77efca62..000000000 --- a/lib/routes/nhk/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'nhk.or.jp': { - _name: 'NHK', - www3: [ - { - title: 'News Web Easy', - docs: 'https://docs.rsshub.app/routes/traditional-media#nhk', - source: ['/news/easy/', '/'], - target: '/nhk/news_web_easy', - }, - { - title: 'WORLD-JAPAN - 新闻提要', - docs: 'https://docs.rsshub.app/routes/traditional-media#nhk', - source: ['/nhkworld/:lang/news/list/', '/nhkworld/:lang/news/'], - target: '/nhk/news/:lang', - }, - ], - }, -}; diff --git a/lib/routes/nhk/router.ts b/lib/routes/nhk/router.ts deleted file mode 100644 index 3f02e824a..000000000 --- a/lib/routes/nhk/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:lang?', './news'); - router.get('/news_web_easy', './news-web-easy'); -}; diff --git a/lib/routes/niaogebiji/cat.ts b/lib/routes/niaogebiji/cat.ts index 59d050e64..ed3649b44 100644 --- a/lib/routes/niaogebiji/cat.ts +++ b/lib/routes/niaogebiji/cat.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/cat/:cat', + categories: ['new-media'], + example: '/niaogebiji/cat/103', + parameters: { cat: '如 https://www.niaogebiji.com/cat/103,最后的数字就是id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['niaogebiji.com/cat/:cat'], + }, + name: '分类目录', + maintainers: ['cKotoriKat'], + handler, + url: 'niaogebiji.com/', +}; + +async function handler(ctx) { const categoryId = ctx.req.param('cat'); const link = `https://www.niaogebiji.com/cat/${categoryId}`; @@ -45,10 +68,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/niaogebiji/index.ts b/lib/routes/niaogebiji/index.ts index 13d6c8992..ef12f665b 100644 --- a/lib/routes/niaogebiji/index.ts +++ b/lib/routes/niaogebiji/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['niaogebiji.com/', 'niaogebiji.com/bulletin'], + target: '', + }, + name: 'Unknown', + maintainers: ['WenryXu'], + handler, + url: 'niaogebiji.com/', +}; + +async function handler() { const baseUrl = 'https://www.niaogebiji.com'; const { data: response } = await got(`${baseUrl}/pc/index/getMoreArticle`); @@ -34,9 +47,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '鸟哥笔记', link: baseUrl, item: result, - }); -}; + }; +} diff --git a/lib/routes/niaogebiji/maintainer.ts b/lib/routes/niaogebiji/maintainer.ts deleted file mode 100644 index 2f696aba9..000000000 --- a/lib/routes/niaogebiji/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/': ['WenryXu'], - '/cat/:cat': ['cKotoriKat'], - '/today': ['KotoriK'], -}; diff --git a/lib/routes/niaogebiji/namespace.ts b/lib/routes/niaogebiji/namespace.ts new file mode 100644 index 000000000..3a259c592 --- /dev/null +++ b/lib/routes/niaogebiji/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '鸟哥笔记', + url: 'niaogebiji.com', +}; diff --git a/lib/routes/niaogebiji/radar.ts b/lib/routes/niaogebiji/radar.ts deleted file mode 100644 index f34c26518..000000000 --- a/lib/routes/niaogebiji/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'niaogebiji.com': { - _name: '鸟哥笔记', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#niao-ge-bi-ji', - source: ['/'], - target: '/niaogebiji', - }, - { - title: '今日事', - docs: 'https://docs.rsshub.app/routes/new-media#niao-ge-bi-ji', - source: ['/', '/bulletin'], - target: '/niaogebiji', - }, - { - title: '分类目录', - docs: 'https://docs.rsshub.app/routes/new-media#niao-ge-bi-ji', - source: ['/cat/:cat'], - target: '/niaogebiji/cat/:cat', - }, - ], - }, -}; diff --git a/lib/routes/niaogebiji/router.ts b/lib/routes/niaogebiji/router.ts deleted file mode 100644 index 1caac6bd0..000000000 --- a/lib/routes/niaogebiji/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/cat/:cat', './cat'); - router.get('/today', './today'); -}; diff --git a/lib/routes/niaogebiji/today.ts b/lib/routes/niaogebiji/today.ts index 5ea6da459..6ab31aded 100644 --- a/lib/routes/niaogebiji/today.ts +++ b/lib/routes/niaogebiji/today.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['new-media'], + example: '/niaogebiji/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['niaogebiji.com/', 'niaogebiji.com/bulletin'], + target: '', + }, + name: '今日事', + maintainers: ['KotoriK'], + handler, + url: 'niaogebiji.com/', +}; + +async function handler() { const response = await got({ method: 'post', url: 'https://www.niaogebiji.com/pc/bulletin/index', @@ -18,7 +42,7 @@ export default async (ctx) => { const data = response.data.return_data; - ctx.set('data', { + return { title: '鸟哥笔记-今日事', link: 'https://www.niaogebiji.com/bulletin', item: data.map((item) => ({ @@ -30,5 +54,5 @@ export default async (ctx) => { category: item.seo_keywords.split(','), author: item.user_info.nickname, })), - }); -}; + }; +} diff --git a/lib/routes/nifd/maintainer.ts b/lib/routes/nifd/maintainer.ts deleted file mode 100644 index d6f5a978f..000000000 --- a/lib/routes/nifd/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/research/:categoryGuid?': ['Fatpandac'], -}; diff --git a/lib/routes/nifd/namespace.ts b/lib/routes/nifd/namespace.ts new file mode 100644 index 000000000..ed6a0e889 --- /dev/null +++ b/lib/routes/nifd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国家金融与发展实验室', + url: 'www.nifd.cn', +}; diff --git a/lib/routes/nifd/radar.ts b/lib/routes/nifd/radar.ts deleted file mode 100644 index 7b620a2e4..000000000 --- a/lib/routes/nifd/radar.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default { - 'nifd.cn': { - _name: '国家金融与发展实验室', - www: [ - { - title: '周报', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '7a6a826d-b525-42aa-b550-4236e524227f') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '双周刊', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '128d602c-7041-4546-beff-83e605f8a370') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '月报', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '0712e220-fa3b-44d4-9226-bc3d57944e19') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '季报', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === 'b66aa691-87ee-4bfe-ac6b-2460386166ee') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '年报', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === 'c714853a-f09e-4510-8835-30a448fff7e3') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '课题报告', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '17d0b29b-7912-498a-b9c3-d30508220158') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '学术论文', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === 'e6a6d3a5-4bda-4739-9765-e4e41c900bcc') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '工作论文', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '3d23ba0e-4f46-44c2-9d21-6b38df4cdd70') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '研究评论', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '3333d2af-91d6-429b-be83-28b92f31b6d7') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - { - title: '其他报告', - docs: 'https://docs.rsshub.app/routes/finance#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu', - source: ['/Research'], - target: (_, url) => { - const categoryGuid = new URL(url).searchParams.get('categoryGuid'); - if (categoryGuid === '6363bdc7-3e1b-4771-a904-6162cd3a3143') { - return `/nifd/research/${categoryGuid}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/nifd/research.ts b/lib/routes/nifd/research.ts index e45248836..48d21b205 100644 --- a/lib/routes/nifd/research.ts +++ b/lib/routes/nifd/research.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,28 @@ const titleMap = { '6363bdc7-3e1b-4771-a904-6162cd3a3143': '其他报告', }; -export default async (ctx) => { +export const route: Route = { + path: '/research/:categoryGuid?', + categories: ['finance'], + example: '/nifd/research/3333d2af-91d6-429b-be83-28b92f31b6d7', + parameters: { categoryGuid: '资讯类型,默认为周报' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究', + maintainers: ['Fatpandac'], + handler, + description: `资讯类型可以从网址中获取,如: + + \`http://www.nifd.cn/Research?categoryGuid=7a6a826d-b525-42aa-b550-4236e524227f\` 对应 \`/nifd/research/7a6a826d-b525-42aa-b550-4236e524227f\``, +}; + +async function handler(ctx) { const categoryGuid = ctx.req.param('categoryGuid') ?? '7a6a826d-b525-42aa-b550-4236e524227f'; const url = `${rootUrl}/Research?categoryGuid=${categoryGuid}`; @@ -45,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `国家金融与发展实验室 - ${titleMap[categoryGuid]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/nifd/router.ts b/lib/routes/nifd/router.ts deleted file mode 100644 index 06ee6d497..000000000 --- a/lib/routes/nifd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/research/:categoryGuid?', './research'); -}; diff --git a/lib/routes/nikkei/asia/index.ts b/lib/routes/nikkei/asia/index.ts index e72f13ee1..af125fd88 100644 --- a/lib/routes/nikkei/asia/index.ts +++ b/lib/routes/nikkei/asia/index.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/asia', + categories: ['traditional-media'], + example: '/nikkei/asia', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['asia.nikkei.com/'], + }, + name: 'Nikkei Asia Latest News', + maintainers: ['rainrdx'], + handler, + url: 'asia.nikkei.com/', +}; + +async function handler() { const currentUrl = 'https://main-asianreview-nikkei.content.pugpig.com/editionfeed/4519/pugpig_atom_contents.json'; const response = await got({ @@ -45,10 +68,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Nikkei Asia', link: 'https://asia.nikkei.com', image: 'https://main-asianreview-nikkei.content.pugpig.com/pugpig_assets/admin/pub120x120.jpg', item: items, - }); -}; + }; +} diff --git a/lib/routes/nikkei/cn/index.ts b/lib/routes/nikkei/cn/index.ts index b92ce5582..8437b838a 100644 --- a/lib/routes/nikkei/cn/index.ts +++ b/lib/routes/nikkei/cn/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -6,7 +7,14 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import parser from '@/utils/rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: '/cn/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { let language = ''; let path = getSubPath(ctx); @@ -84,10 +92,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: isOfficialRSS ? officialFeed.title : $('title').first().text(), description: isOfficialRSS ? officialFeed.description : '', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nikkei/index.ts b/lib/routes/nikkei/index.ts index ab8322ad5..3767f2a55 100644 --- a/lib/routes/nikkei/index.ts +++ b/lib/routes/nikkei/index.ts @@ -1,7 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: ['/', '/index'], + name: 'Unknown', + maintainers: [], + handler, + url: 'www.nikkei.com/', +}; + +async function handler() { const url = 'https://www.nikkei.com'; const response = await got(url); const $ = load(response.data); @@ -28,9 +37,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '日本経済新聞', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/nikkei/maintainer.ts b/lib/routes/nikkei/maintainer.ts deleted file mode 100644 index 840a6f6e4..000000000 --- a/lib/routes/nikkei/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/asia': ['rainrdx'], - '/cn/:language?/:path?': ['nczitzk'], - '/index': ['zjysdhr'], - '/:category/:article_type?': ['Arracc'], -}; diff --git a/lib/routes/nikkei/namespace.ts b/lib/routes/nikkei/namespace.ts new file mode 100644 index 000000000..ea3cef383 --- /dev/null +++ b/lib/routes/nikkei/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Nikkei 日本経済新聞', + url: 'asia.nikkei.com', +}; diff --git a/lib/routes/nikkei/news.ts b/lib/routes/nikkei/news.ts index b6337b090..bb7033d3d 100644 --- a/lib/routes/nikkei/news.ts +++ b/lib/routes/nikkei/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,32 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category/:article_type?', + categories: ['traditional-media'], + example: '/nikkei/news', + parameters: { category: 'Category, see table below', article_type: 'Only includes free articles, set `free` to enable, disabled by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.nikkei.com/:category/archive', 'www.nikkei.com/:category'], + target: '/:category', + }, + name: 'News', + maintainers: ['Arracc'], + handler, + description: `| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル | + | ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- | + | news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |`, +}; + +async function handler(ctx) { const baseUrl = 'https://www.nikkei.com'; const { category, article_type = 'paid' } = ctx.req.param(); let url = ''; @@ -80,12 +106,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '日本経済新聞 - ' + categoryName, description: $('meta[name="description"]').attr('content'), link: url, image: $('meta[property="og:image"]').attr('content'), language: 'ja', item: article_type === 'free' ? items.filter((item) => !item.paywall) : items, - }); -}; + }; +} diff --git a/lib/routes/nikkei/radar.ts b/lib/routes/nikkei/radar.ts deleted file mode 100644 index 34a5e980a..000000000 --- a/lib/routes/nikkei/radar.ts +++ /dev/null @@ -1,59 +0,0 @@ -export default { - 'nikkei.com': { - _name: '日本经济新闻', - asia: [ - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/traditional-media#ri-ben-jing-ji-xin-wen', - source: '/', - target: '/nikkei/asia', - }, - ], - cn: [ - { - title: '中文版新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#ri-ben-jing-ji-xin-wen-zhong-wen-ban-xin-wen', - source: ['/:category/:type', '/:category', '/'], - target: (params) => { - if (params.category && params.type) { - return `/nikkei/cn/cn/${params.category}/${params.type.replace('.html', '')}`; - } else if (params.category && !params.type) { - return `/nikkei/cn/cn/${params.category.replace('.html', '')}`; - } else { - return `/nikkei/cn/cn`; - } - }, - }, - ], - www: [ - { - title: 'ホームページ', - docs: 'https://docs.rsshub.app/routes/traditional-media#ri-ben-jing-ji-xin-wen', - source: '/', - target: '/nikkei/index', - }, - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#ri-ben-jing-ji-xin-wen', - source: ['/:category/archive', '/:category'], - target: '/nikkei/:category', - }, - ], - 'zh.cn': [ - { - title: '中文版新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#ri-ben-jing-ji-xin-wen-zhong-wen-ban-xin-wen', - source: ['/:category/:type', '/:category', '/'], - target: (params) => { - if (params.category && params.type) { - return `/nikkei/cn/zh/${params.category}/${params.type.replace('.html', '')}`; - } else if (params.category && !params.type) { - return `/nikkei/cn/zh/${params.category.replace('.html', '')}`; - } else { - return `/nikkei/cn/zh`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/nikkei/router.ts b/lib/routes/nikkei/router.ts deleted file mode 100644 index 52fe50d3d..000000000 --- a/lib/routes/nikkei/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/asia', './asia/index'); - router.get('/cn/*', './cn/index'); - router.get('/index', './index'); - router.get('/:category/:article_type?', './news'); -}; diff --git a/lib/routes/nintendo/direct.ts b/lib/routes/nintendo/direct.ts index 74f6167fd..ec6784cd3 100644 --- a/lib/routes/nintendo/direct.ts +++ b/lib/routes/nintendo/direct.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/direct', + categories: ['game'], + example: '/nintendo/direct', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nintendo.com/nintendo-direct/archive', 'nintendo.com/'], + }, + name: 'Nintendo Direct', + maintainers: ['HFO4'], + handler, + url: 'nintendo.com/nintendo-direct/archive', +}; + +async function handler() { const response = await got('https://www.nintendo.com/nintendo-direct/archive/'); const data = response.data; @@ -25,10 +48,10 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: 'Nintendo Direct(任天堂直面会)', link: 'https://www.nintendo.com/nintendo-direct/archive/', description: '最新的任天堂直面会日程信息', item: result, - }); -}; + }; +} diff --git a/lib/routes/nintendo/eshop-cn.ts b/lib/routes/nintendo/eshop-cn.ts index eab811396..387e0d30b 100644 --- a/lib/routes/nintendo/eshop-cn.ts +++ b/lib/routes/nintendo/eshop-cn.ts @@ -1,10 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; const software_url = 'https://www.nintendoswitch.com.cn/software/'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/eshop/cn', + radar: { + source: ['nintendoswitch.com.cn/software', 'nintendoswitch.com.cn/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'nintendoswitch.com.cn/software', +}; + +async function handler() { const response = await got(software_url); // 获取Nuxt对象 @@ -36,10 +48,10 @@ export default async (ctx) => { data = await util.ProcessItemChina(data, cache); - ctx.set('data', { + return { title: 'Nintendo eShop(国服)新游戏', link: 'https://www.nintendoswitch.com.cn/software', description: 'Nintendo(国服)新上架的游戏', item: data, - }); -}; + }; +} diff --git a/lib/routes/nintendo/eshop-hk.ts b/lib/routes/nintendo/eshop-hk.ts index f77a0a9ba..d347d9297 100644 --- a/lib/routes/nintendo/eshop-hk.ts +++ b/lib/routes/nintendo/eshop-hk.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,18 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/eshop/hk', + radar: { + source: ['nintendo.com.hk/software/switch', 'nintendo.com.hk/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'nintendo.com.hk/software/switch', +}; + +async function handler(ctx) { const response = await got('https://www.nintendo.com.hk/data/json/switch_software.json'); const data = response.data.filter(({ link }) => link.startsWith('https://')).slice(0, ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30); @@ -74,10 +86,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Nintendo eShop(港服)新游戏', link: 'https://www.nintendo.com.hk/software/switch/', description: 'Nintendo eShop(港服)新上架的游戏', item: result, - }); -}; + }; +} diff --git a/lib/routes/nintendo/eshop-jp.ts b/lib/routes/nintendo/eshop-jp.ts index 86422e6e1..6c422ed9f 100644 --- a/lib/routes/nintendo/eshop-jp.ts +++ b/lib/routes/nintendo/eshop-jp.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,18 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/eshop/jp', + radar: { + source: ['nintendo.co.jp/software/switch/index.html', 'nintendo.co.jp/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'nintendo.co.jp/software/switch/index.html', +}; + +async function handler(ctx) { const response = await got('https://search.nintendo.jp/nintendo_soft/search.json', { searchParams: { opt_sshow: 1, @@ -21,7 +33,7 @@ export default async (ctx) => { }); const data = response.data.result.items; - ctx.set('data', { + return { title: 'Nintendo eShop(日服)新游戏', link: 'https://www.nintendo.co.jp/software/switch/index.html', description: 'Nintendo eShop(日服)新上架的游戏', @@ -33,5 +45,5 @@ export default async (ctx) => { link: `https://ec.nintendo.com/JP/ja/titles/${item.id}`, pubDate: parseDate(item.pdate), })), - }); -}; + }; +} diff --git a/lib/routes/nintendo/eshop-us.ts b/lib/routes/nintendo/eshop-us.ts index 0260146d7..545f08cc0 100644 --- a/lib/routes/nintendo/eshop-us.ts +++ b/lib/routes/nintendo/eshop-us.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,18 @@ import { art } from '@/utils/render'; import got from '@/utils/got'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/eshop/us', + radar: { + source: ['nintendo.com/store/games', 'nintendo.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'nintendo.com/store/games', +}; + +async function handler(ctx) { const response = await got.post('https://u3b6gr4ua3-dsn.algolia.net/1/indexes/store_game_en_us_release_des/query', { headers: { 'x-algolia-api-key': 'a29c6927638bfd8cee23993e51e721c9', @@ -21,7 +33,7 @@ export default async (ctx) => { }); const data = response.data.hits; - ctx.set('data', { + return { title: `Nintendo eShop(美服)新游戏`, link: `https://www.nintendo.com/store/games/`, description: `Nintendo eShop(美服)新上架的游戏`, @@ -30,6 +42,6 @@ export default async (ctx) => { description: art(path.join(__dirname, 'templates/eshop_us.art'), item), link: `https://www.nintendo.com${item.url}`, })), - }); + }; ctx.set('json', response.data); -}; +} diff --git a/lib/routes/nintendo/maintainer.ts b/lib/routes/nintendo/maintainer.ts deleted file mode 100644 index f5f5a0abd..000000000 --- a/lib/routes/nintendo/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/direct': ['HFO4'], - '/eshop/:region': ['HFO4'], - '/news': ['HFO4'], - '/news/china': ['NeverBehave'], - '/system-update': ['hoilc'], -}; diff --git a/lib/routes/nintendo/namespace.ts b/lib/routes/nintendo/namespace.ts new file mode 100644 index 000000000..99783728b --- /dev/null +++ b/lib/routes/nintendo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Nintendo', + url: 'nintendo.com', +}; diff --git a/lib/routes/nintendo/news-china.ts b/lib/routes/nintendo/news-china.ts index 91bf9574a..a283f7e95 100644 --- a/lib/routes/nintendo/news-china.ts +++ b/lib/routes/nintendo/news-china.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; const news_url = 'https://www.nintendoswitch.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/news/china', + categories: ['game'], + example: '/nintendo/news/china', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nintendoswitch.com.cn/'], + }, + name: '首页资讯(中国)', + maintainers: ['NeverBehave'], + handler, + url: 'nintendoswitch.com.cn/', +}; + +async function handler() { const response = await got(news_url); // 获取Nuxt对象 @@ -27,10 +50,10 @@ export default async (ctx) => { data = await util.ProcessNewsChina(data, cache); - ctx.set('data', { + return { title: 'Nintendo(中国大陆)主页资讯', link: 'https://www.nintendoswitch.com.cn', description: 'Nintendo 中国大陆官网刊登的资讯', item: data, - }); -}; + }; +} diff --git a/lib/routes/nintendo/news.ts b/lib/routes/nintendo/news.ts index 24fae9ff4..a4fdbbbf8 100644 --- a/lib/routes/nintendo/news.ts +++ b/lib/routes/nintendo/news.ts @@ -1,16 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import util from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/nintendo/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nintendo.com.hk/topics', 'nintendo.com.hk/'], + }, + name: 'News(Hong Kong only)', + maintainers: ['HFO4'], + handler, + url: 'nintendo.com.hk/topics', +}; + +async function handler(ctx) { const response = await got('https://www.nintendo.com.hk/data/json/topics.json'); const data = response.data.filter((val) => val.only_for !== 'tw' && val.url.startsWith('/topics/article/')).slice(0, ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30); // 获取新闻正文 const result = await util.ProcessNews(data, cache); - ctx.set('data', { + return { title: 'Nintendo(香港)主页资讯', link: 'https://www.nintendo.com.hk/topics/', description: 'Nintendo 香港有限公司官网刊登的资讯', @@ -20,5 +43,5 @@ export default async (ctx) => { link: `https://www.nintendo.com.hk${item.url}`, pubDate: parseDate(item.release_date, 'YYYY.M.D'), })), - }); -}; + }; +} diff --git a/lib/routes/nintendo/radar.ts b/lib/routes/nintendo/radar.ts deleted file mode 100644 index 9036c136d..000000000 --- a/lib/routes/nintendo/radar.ts +++ /dev/null @@ -1,70 +0,0 @@ -export default { - 'nintendo.com': { - _name: 'Nintendo', - '.': [ - { - title: '直面会', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/nintendo-direct/archive', '/'], - target: '/nintendo/direct', - }, - { - title: 'eShop 新发售游戏', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/store/games', '/'], - target: '/nintendo/eshop/us', - }, - ], - }, - 'nintendo.com.hk': { - _name: 'Nintendo', - '.': [ - { - title: 'eShop 新发售游戏', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/software/switch', '/'], - target: '/nintendo/eshop/hk', - }, - { - title: '首页资讯(香港)', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/topics', '/'], - target: '/nintendo/news', - }, - ], - }, - 'nintendo.co.jp': { - _name: 'Nintendo', - '.': [ - { - title: 'eShop 新发售游戏', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/software/switch/index.html', '/'], - target: '/nintendo/eshop/jp', - }, - { - title: 'Switch 本体更新情报(日本)', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/support/switch/system_update/index.html', '/'], - target: '/nintendo/system-update', - }, - ], - }, - 'nintendoswitch.com.cn': { - _name: 'Nintendo', - '.': [ - { - title: 'eShop 新发售游戏', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/software', '/'], - target: '/nintendo/eshop/cn', - }, - { - title: '首页资讯(中国)', - docs: 'https://docs.rsshub.app/routes/game#nintendo', - source: ['/'], - target: '/nintendo/news/china', - }, - ], - }, -}; diff --git a/lib/routes/nintendo/router.ts b/lib/routes/nintendo/router.ts deleted file mode 100644 index ced9f9985..000000000 --- a/lib/routes/nintendo/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/direct', './direct'); - router.get('/eshop/cn', './eshop-cn'); - router.get('/eshop/hk', './eshop-hk'); - router.get('/eshop/jp', './eshop-jp'); - router.get('/eshop/us', './eshop-us'); - router.get('/news', './news'); - router.get('/news/china', './news-china'); - router.get('/system-update', './system-update'); -}; diff --git a/lib/routes/nintendo/system-update.ts b/lib/routes/nintendo/system-update.ts index 065314a1b..784b6111a 100644 --- a/lib/routes/nintendo/system-update.ts +++ b/lib/routes/nintendo/system-update.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/system-update', + categories: ['game'], + example: '/nintendo/system-update', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nintendo.co.jp/support/switch/system_update/index.html', 'nintendo.co.jp/'], + }, + name: 'Switch System Update(Japan)', + maintainers: ['hoilc'], + handler, + url: 'nintendo.co.jp/support/switch/system_update/index.html', +}; + +async function handler() { const url = 'https://www.nintendo.co.jp/support/switch/system_update/index.html'; const response = await got(url); @@ -9,7 +32,7 @@ export default async (ctx) => { const list = $('.c-heading-lv3').toArray().slice(1, -2); - ctx.set('data', { + return { title: 'Nintendo Switch 本体更新情報', link: url, item: list.map((update) => { @@ -34,5 +57,5 @@ export default async (ctx) => { pubDate: new Date(Number.parseInt(matched_date[1]), Number.parseInt(matched_date[2]) - 1, Number.parseInt(matched_date[3])), }; }), - }); -}; + }; +} diff --git a/lib/routes/nippon/index.ts b/lib/routes/nippon/index.ts index 7a5bd4d02..8c3072a74 100644 --- a/lib/routes/nippon/index.ts +++ b/lib/routes/nippon/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['travel'], + example: '/nippon/Politics', + parameters: { category: '默认政治,可选如下' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.nippon.com/nippon/:category?', 'www.nippon.com/cn'], + }, + name: 'Unknown', + maintainers: ['laampui'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'Politics'; const path = category === 'Science,Technology' ? 'condition4' : 'category_code'; const res = await got.get(`https://www.nippon.com/api/search/cn/${path}/20/1/${category}?t=${Date.now()}`); @@ -24,9 +46,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `走进日本 - ${category}`, link: 'https://www.nippon.com/cn/economy/', item, - }); -}; + }; +} diff --git a/lib/routes/nippon/maintainer.ts b/lib/routes/nippon/maintainer.ts deleted file mode 100644 index f735e41db..000000000 --- a/lib/routes/nippon/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['laampui'], -}; diff --git a/lib/routes/nippon/namespace.ts b/lib/routes/nippon/namespace.ts new file mode 100644 index 000000000..43e0269f9 --- /dev/null +++ b/lib/routes/nippon/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '走进日本', + url: 'www.nippon.com', +}; diff --git a/lib/routes/nippon/radar.ts b/lib/routes/nippon/radar.ts deleted file mode 100644 index 12cb62d07..000000000 --- a/lib/routes/nippon/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nippon.com': { - _name: '走进日本', - www: [ - { - title: '政治外交', - docs: 'https://docs.rsshub.app/routes/travel#zou-jin-ri-ben', - source: ['/nippon/:category?', '/cn'], - target: '/nippon/:category?', - }, - ], - }, -}; diff --git a/lib/routes/nippon/router.ts b/lib/routes/nippon/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/nippon/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/njglyy/maintainer.ts b/lib/routes/njglyy/maintainer.ts deleted file mode 100644 index e62e1d424..000000000 --- a/lib/routes/njglyy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ygbjypx': ['real-jiakai'], -}; diff --git a/lib/routes/njglyy/namespace.ts b/lib/routes/njglyy/namespace.ts new file mode 100644 index 000000000..242cb9f1c --- /dev/null +++ b/lib/routes/njglyy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京鼓楼医院', + url: 'njglyy.com', +}; diff --git a/lib/routes/njglyy/radar.ts b/lib/routes/njglyy/radar.ts deleted file mode 100644 index fde86a7c6..000000000 --- a/lib/routes/njglyy/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'njglyy.com': { - _name: '南京鼓楼医院', - '.': [ - { - title: '员工版教育培训', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-gu-lou-yi-yuan-yuan-gong-ban-jiao-yu-pei-xun', - source: ['/ygb/jypx/jypx.aspx', '/'], - target: '/njglyy/ygbjypx', - }, - ], - }, -}; diff --git a/lib/routes/njglyy/router.ts b/lib/routes/njglyy/router.ts deleted file mode 100644 index 7588cd42d..000000000 --- a/lib/routes/njglyy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/ygbjypx', './ygbjypx'); -}; diff --git a/lib/routes/njglyy/ygbjypx.ts b/lib/routes/njglyy/ygbjypx.ts index 087ed34f4..ca501a06b 100644 --- a/lib/routes/njglyy/ygbjypx.ts +++ b/lib/routes/njglyy/ygbjypx.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://njglyy.com/ygb/jypx/jypx.aspx'; const host = 'https://njglyy.com/ygb/jypx/'; -export default async (ctx) => { +export const route: Route = { + path: '/ygbjypx', + categories: ['government'], + example: '/njglyy/ygbjypx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['njglyy.com/ygb/jypx/jypx.aspx', 'njglyy.com/'], + }, + name: '员工版教育培训', + maintainers: ['real-jiakai'], + handler, + url: 'njglyy.com/ygb/jypx/jypx.aspx', +}; + +async function handler(ctx) { const out = await getNoticeList(ctx, url, host, '.mtbd-list > dl', 'a', 'dt', { title: '.detail', content: '.detail2', date: 'span:contains("发布时间")', }); - ctx.set('data', { + return { title: '南京鼓楼医院 -- 员工版教育培训', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/njit/jwc.ts b/lib/routes/njit/jwc.ts index 1d3d28671..c1a1d1d7f 100644 --- a/lib/routes/njit/jwc.ts +++ b/lib/routes/njit/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://jwc.njit.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/njit/jwc/jx', + parameters: { type: '默认为 `jx`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '南京工程学院教务处', + maintainers: ['zefengdaguo'], + handler, + description: `| 教学 | 考试 | 信息 | 实践 | +| ---- | ---- | ---- | ---- | +| jx | ks | xx | sj |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'jx'; const link = host + '/index/' + type + '.htm'; const response = await got({ @@ -99,9 +121,9 @@ export default async (ctx) => { info = '教学'; break; } - ctx.set('data', { + return { title: '南京工程学院教务处 -- ' + info, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/njit/maintainer.ts b/lib/routes/njit/maintainer.ts deleted file mode 100644 index f2e33d39d..000000000 --- a/lib/routes/njit/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/tzgg': ['zefengdaguo'], - '/jwc/:type?': ['zefengdaguo'], -}; diff --git a/lib/routes/njit/namespace.ts b/lib/routes/njit/namespace.ts new file mode 100644 index 000000000..08f0e64bb --- /dev/null +++ b/lib/routes/njit/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京工程学院', + url: 'jwc.njit.edu.cn', +}; diff --git a/lib/routes/njit/radar.ts b/lib/routes/njit/radar.ts deleted file mode 100644 index ebf6573f1..000000000 --- a/lib/routes/njit/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'njit.edu.cn': { - _name: '南京工程学院', - jwc: [ - { - title: '南京工程学院教务处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-gong-cheng-xue-yuan-nan-jing-gong-cheng-xue-yuan-jiao-wu-chu', - source: '/index/:type', - target: (params) => `/njit/jwc/${params.type.replace('.htm', '')}`, - }, - ], - www: [ - { - title: '南京工程学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-gong-cheng-xue-yuan-nan-jing-gong-cheng-xue-yuan-tong-zhi-gong-gao', - source: '/', - target: '/njit/tzgg', - }, - ], - }, -}; diff --git a/lib/routes/njit/router.ts b/lib/routes/njit/router.ts deleted file mode 100644 index 5e409bb57..000000000 --- a/lib/routes/njit/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/tzgg', './tzgg'); - router.get('/jwc/:type?', './jwc'); -}; diff --git a/lib/routes/njit/tzgg.ts b/lib/routes/njit/tzgg.ts index 6175a6e71..78b81db57 100644 --- a/lib/routes/njit/tzgg.ts +++ b/lib/routes/njit/tzgg.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const url = 'https://www.njit.edu.cn/index/tzgg.htm'; const host = 'https://www.njit.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/tzgg', + categories: ['university'], + example: '/njit/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.njit.edu.cn/'], + }, + name: '南京工程学院通知公告', + maintainers: ['zefengdaguo'], + handler, + url: 'www.njit.edu.cn/', +}; + +async function handler() { const response = await got({ method: 'get', url, @@ -67,9 +90,9 @@ export default async (ctx) => { } }) ); - ctx.set('data', { + return { title: '南京工程学院 -- 通知公告', url, item: out, - }); -}; + }; +} diff --git a/lib/routes/njnu/ceai/ceai.ts b/lib/routes/njnu/ceai/ceai.ts index 437c92a43..8e059bb9b 100644 --- a/lib/routes/njnu/ceai/ceai.ts +++ b/lib/routes/njnu/ceai/ceai.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/ceai/:type', + categories: ['university'], + example: '/njnu/ceai/xszx', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机与电子信息学院 - 人工智能学院', + maintainers: ['Shujakuinkuraudo'], + handler, + description: `| 学院公告 | 学院新闻 | 学生资讯 | + | -------- | -------- | -------- | + | xygg | xyxw | xszx |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let title, path; switch (type) { @@ -36,10 +58,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: '南京师范大学计电人院 - ' + title, link: 'http://ceai.njnu.edu.cn/', description: '南京师范大学计电人院', item: result, - }); -}; + }; +} diff --git a/lib/routes/njnu/jwc/jwc.ts b/lib/routes/njnu/jwc/jwc.ts index a68f52068..e67b8aed7 100644 --- a/lib/routes/njnu/jwc/jwc.ts +++ b/lib/routes/njnu/jwc/jwc.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type', + categories: ['university'], + example: '/njnu/jwc/xstz', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务通知', + maintainers: ['Shujakuinkuraudo'], + handler, + description: `| 教师通知 | 新闻动态 | 学生通知 | + | -------- | -------- | -------- | + | jstz | xwdt | xstz |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let title, path; switch (type) { @@ -35,10 +57,10 @@ export default async (ctx) => { const result = await util.ProcessFeed(list, cache); - ctx.set('data', { + return { title: '南京师范大学教务处 - ' + title, link: 'http://jwc.njnu.edu.cn/', description: '南京师范大学教务处', item: result, - }); -}; + }; +} diff --git a/lib/routes/njnu/maintainer.ts b/lib/routes/njnu/maintainer.ts deleted file mode 100644 index e2af17e11..000000000 --- a/lib/routes/njnu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jwc/:type': ['Shujakuinkuraudo'], - '/ceai/:type': ['Shujakuinkuraudo'], -}; diff --git a/lib/routes/njnu/namespace.ts b/lib/routes/njnu/namespace.ts new file mode 100644 index 000000000..2f4434bea --- /dev/null +++ b/lib/routes/njnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京师范大学', + url: 'ceai.njnu.edu.cn', +}; diff --git a/lib/routes/njnu/radar.ts b/lib/routes/njnu/radar.ts deleted file mode 100644 index e0a54b6ea..000000000 --- a/lib/routes/njnu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'njnu.edu.cn': { - _name: '南京师范大学', - ceai: [ - { - title: '计算机与电子信息学院-人工智能学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-shi-fan-da-xue', - source: '/', - target: '/njnu/ceai/xygg', - }, - ], - jwc: [ - { - title: '教务通知', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-shi-fan-da-xue', - source: '/', - target: '/njnu/jwc/xwdt', - }, - ], - }, -}; diff --git a/lib/routes/njnu/router.ts b/lib/routes/njnu/router.ts deleted file mode 100644 index d8c7565fa..000000000 --- a/lib/routes/njnu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jwc/:type', './jwc/jwc'); - router.get('/ceai/:type', './ceai/ceai'); -}; diff --git a/lib/routes/nju/admission.ts b/lib/routes/nju/admission.ts index f6020b6a0..bd3b78d45 100644 --- a/lib/routes/nju/admission.ts +++ b/lib/routes/nju/admission.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/admission', + categories: ['university'], + example: '/nju/admission', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['admission.nju.edu.cn/tzgg/index.html', 'admission.nju.edu.cn/tzgg', 'admission.nju.edu.cn/'], + }, + name: '本科迎新', + maintainers: ['ret-1'], + handler, + url: 'admission.nju.edu.cn/tzgg/index.html', +}; + +async function handler() { const category_dict = { tzgg: '通知公告', }; @@ -31,9 +54,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '本科迎新-通知公告', link: 'https://admission.nju.edu.cn/tzgg', item: items[0], - }); -}; + }; +} diff --git a/lib/routes/nju/dafls.ts b/lib/routes/nju/dafls.ts index c60cd495c..84c2eee94 100644 --- a/lib/routes/nju/dafls.ts +++ b/lib/routes/nju/dafls.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/dafls', + categories: ['university'], + example: '/nju/dafls', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dafls.nju.edu.cn/13167/list.html', 'dafls.nju.edu.cn/'], + }, + name: '大学外语部', + maintainers: ['ret-1'], + handler, + url: 'dafls.nju.edu.cn/13167/list.html', +}; + +async function handler() { const category_dict = { tzgg: '通知公告', }; @@ -29,9 +52,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '大外部-通知公告', link: 'https://dafls.nju.edu.cn/13167/list.htm', item: [...items[0]], - }); -}; + }; +} diff --git a/lib/routes/nju/exchangesys.ts b/lib/routes/nju/exchangesys.ts index 32b81bc34..baabbf874 100644 --- a/lib/routes/nju/exchangesys.ts +++ b/lib/routes/nju/exchangesys.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import dayjs from 'dayjs'; -export default async (ctx) => { +export const route: Route = { + path: '/exchangesys/:type', + categories: ['university'], + example: '/nju/exchangesys/proj', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '本科生交换生系统', + maintainers: [], + handler, + description: `| 新闻通知 | 交换生项目 | + | -------- | ---------- | + | news | proj |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const type_dict = { news: ['http://elite.nju.edu.cn/exchangesystem/index/moreList', 'http://elite.nju.edu.cn/exchangesystem/index/more?type=xw', '新闻通知'], @@ -16,7 +38,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `本科生交换生管理系统-${type_dict[type][2]}`, link: type_dict[type][1], item: @@ -42,5 +64,5 @@ export default async (ctx) => { } return null; }), - }); -}; + }; +} diff --git a/lib/routes/nju/gra.ts b/lib/routes/nju/gra.ts index 10cfa6114..bdf231bc5 100644 --- a/lib/routes/nju/gra.ts +++ b/lib/routes/nju/gra.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/gra', + categories: ['university'], + example: '/nju/gra', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grawww.nju.edu.cn/main.htm', 'grawww.nju.edu.cn/'], + }, + name: '研究生院', + maintainers: ['ret-1'], + handler, + url: 'grawww.nju.edu.cn/main.htm', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://grawww.nju.edu.cn/905/list.htm', @@ -14,7 +37,7 @@ export default async (ctx) => { const $ = load(data); const list = $('li.news'); - ctx.set('data', { + return { title: '研究生院-动态通知', link: 'https://grawww.nju.edu.cn/905/list.htm', item: list @@ -35,5 +58,5 @@ export default async (ctx) => { }) .get() .filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/nju/hosptial.ts b/lib/routes/nju/hosptial.ts index 5b7699cbb..92fbe6d95 100644 --- a/lib/routes/nju/hosptial.ts +++ b/lib/routes/nju/hosptial.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hospital', + categories: ['university'], + example: '/nju/hospital', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hospital.nju.edu.cn/ggtz/index.html'], + }, + name: '校医院', + maintainers: ['ret-1'], + handler, + url: 'hospital.nju.edu.cn/ggtz/index.html', +}; + +async function handler() { const category_dict = { ggtz: '公告通知', }; @@ -31,9 +54,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '校医院-公告通知', link: 'https://hospital.nju.edu.cn/ggtz/index.html', item: items[0], - }); -}; + }; +} diff --git a/lib/routes/nju/hqjt.ts b/lib/routes/nju/hqjt.ts index 2b0f14dc0..6d5b6aa2c 100644 --- a/lib/routes/nju/hqjt.ts +++ b/lib/routes/nju/hqjt.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/hqjt', + categories: ['university'], + example: '/nju/hqjt', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['webplus.nju.edu.cn/_s25/main.psp'], + }, + name: '后勤集团', + maintainers: ['ret-1'], + handler, + url: 'webplus.nju.edu.cn/_s25/main.psp', +}; + +async function handler() { const category_dict = { zbcg: '招标采购', }; @@ -29,9 +52,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '后勤集团-招标采购', link: 'https://webplus.nju.edu.cn/_s25/zbcg/list.psp', item: [...items[0]], - }); -}; + }; +} diff --git a/lib/routes/nju/itsc.ts b/lib/routes/nju/itsc.ts index 632215068..ff0ada3ee 100644 --- a/lib/routes/nju/itsc.ts +++ b/lib/routes/nju/itsc.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/itsc', + categories: ['university'], + example: '/nju/itsc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['itsc.nju.edu.cn/tzgg/list.htm'], + }, + name: 'ITSC 信息中心', + maintainers: ['ret-1'], + handler, + url: 'itsc.nju.edu.cn/tzgg/list.htm', +}; + +async function handler() { const category_dict = { tzgg: '通知公告', }; @@ -36,9 +59,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'ITSC-公告通知', link: 'https://itsc.nju.edu.cn/tzgg/list.htm', item: items[0], - }); -}; + }; +} diff --git a/lib/routes/nju/jjc.ts b/lib/routes/nju/jjc.ts index 803dcdb32..3cff468d9 100644 --- a/lib/routes/nju/jjc.ts +++ b/lib/routes/nju/jjc.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/jjc', + categories: ['university'], + example: '/nju/jjc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jjc.nju.edu.cn/main.htm', 'jjc.nju.edu.cn/'], + }, + name: '基建处', + maintainers: ['ret-1'], + handler, + url: 'jjc.nju.edu.cn/main.htm', +}; + +async function handler() { const category_dict = { cgxx: '采购信息', cjgg: '成交公告', @@ -32,9 +55,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `南京大学基建处`, link: 'https://jjc.nju.edu.cn/main.htm', item: [...items[0], ...items[1], ...items[2]], - }); -}; + }; +} diff --git a/lib/routes/nju/jw.ts b/lib/routes/nju/jw.ts index e411b2bc9..beaee75f9 100644 --- a/lib/routes/nju/jw.ts +++ b/lib/routes/nju/jw.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/jw/:type', + categories: ['university'], + example: '/nju/jw/ggtz', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jw.nju.edu.cn/:type/list.htm'], + }, + name: '本科生院', + maintainers: ['cqjjjzr'], + handler, + description: `| 公告通知 | 教学动态 | + | -------- | -------- | + | ggtz | jxdt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const type_dict = { ggtz: [ @@ -37,7 +62,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `本科生院-${type_dict[type][1]}`, link: type_dict[type][4], item: @@ -55,5 +80,5 @@ export default async (ctx) => { } return ret; }), - }); -}; + }; +} diff --git a/lib/routes/nju/maintainer.ts b/lib/routes/nju/maintainer.ts deleted file mode 100644 index 55616d715..000000000 --- a/lib/routes/nju/maintainer.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - '/admission': ['ret-1'], - '/dafls': ['ret-1'], - '/exchangesys': ['cqjjjzr'], - '/gra': ['ret-1'], - '/hospital': ['ret-1'], - '/hqjt': ['ret-1'], - '/itsc': ['ret-1'], - '/jjc': ['ret-1'], - '/jw/:type': ['cqjjjzr'], - '/rczp/:type': ['ret-1'], - '/scit/:type': ['ret-1'], - '/zbb/:type': ['ret-1'], - '/zcc': ['ret-1'], -}; diff --git a/lib/routes/nju/namespace.ts b/lib/routes/nju/namespace.ts new file mode 100644 index 000000000..187fdd60c --- /dev/null +++ b/lib/routes/nju/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京大学', + url: 'admission.nju.edu.cn', +}; diff --git a/lib/routes/nju/radar.ts b/lib/routes/nju/radar.ts deleted file mode 100644 index 4a5f1a6a7..000000000 --- a/lib/routes/nju/radar.ts +++ /dev/null @@ -1,124 +0,0 @@ -export default { - 'nju.edu.cn': { - _name: '南京大学', - admission: [ - { - title: '本科迎新', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ben-ke-ying-xin', - source: ['/tzgg/index.html', '/tzgg', '/'], - target: '/nju/admission', - }, - ], - dafls: [ - { - title: '大学外语部', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-da-xue-wai-yu-bu', - source: ['/13167/list.html', '/'], - target: '/nju/dafls', - }, - ], - elite: [ - { - title: '本科生交换生系统', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ben-ke-sheng-yuan-jiao-huan-sheng-xi-tong', - source: ['/exchangesystem/index/more', '/exchangesystem', '/'], - target: (_, url) => `/nju/exchangesys/${new URL(url).searchParams.get('type') === 'xw' ? 'news' : 'proj'}`, - }, - ], - grawww: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-yan-jiu-sheng-yuan', - source: ['/main.htm', '/'], - target: '/nju/gra', - }, - ], - hospital: [ - { - title: '校医院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-xiao-yi-yuan', - source: ['/ggtz/index.html'], - target: '/nju/hospital', - }, - ], - itsc: [ - { - title: 'ITSC信息中心', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-itsc-xin-xi-zhong-xin', - source: ['/tzgg/list.htm'], - target: '/nju/itsc', - }, - ], - jjc: [ - { - title: '基建处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ji-jian-chu', - source: ['/main.htm', '/'], - target: '/nju/jjc', - }, - ], - jw: [ - { - title: '本科生院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ben-ke-sheng-yuan', - source: ['/:type/list.htm'], - target: '/nju/jw/:type', - }, - ], - rczp: [ - { - title: '人才招聘网', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ren-cai-zhao-pin-wang', - source: ['/sylm/:type/index.html'], - target: '/nju/rczp/:type', - }, - ], - scit: [ - { - title: '科学技术处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-ke-xue-ji-shu-chu', - source: ['/:type/list.htm'], - target: (params) => `/nju/scit/${params.type === '11003' ? 'kydt' : 'tzgg'}`, - }, - ], - webplus: [ - { - title: '后勤集团', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-hou-qin-ji-tuan', - source: ['/_s25/main.psp'], - target: '/nju/hqjt', - }, - ], - zbb: [ - { - title: '招标办公室', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-zhao-biao-ban-gong-shi', - source: ['/:type/index.chtml'], - target: (params) => { - let type; - switch (params.type) { - case 'cjgshw': - type = 'cjgs'; - break; - case 'zfcgyxgk': - type = params.type; - break; - case 'cgxxhw': - default: - type = 'cgxx'; - break; - } - return `/nju/zbb/${type}`; - }, - }, - ], - zcc: [ - { - title: '资产管理处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-da-xue-zi-chan-guan-li-chu', - source: ['/tzgg/gyfytdglk/index.html', '/tzgg/index.html', '/'], - target: '/nju/zcc', - }, - ], - }, -}; diff --git a/lib/routes/nju/rczp.ts b/lib/routes/nju/rczp.ts index b7c14ea5c..fa88c2223 100644 --- a/lib/routes/nju/rczp.ts +++ b/lib/routes/nju/rczp.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/rczp/:type', + categories: ['university'], + example: '/nju/rczp/xxfb', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rczp.nju.edu.cn/sylm/:type/index.html'], + }, + name: '人才招聘网', + maintainers: ['ret-1'], + handler, + description: `| 信息发布 | 教研类岗位 | 管理岗位及其他 | + | -------- | ---------- | -------------- | + | xxfb | jylgw | gllgw |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const title_dict = { xxfb: { title: '信息发布', channelid: '9531,9532,9533,9534,9535,9419' }, @@ -41,9 +66,9 @@ export default async (ctx) => { author: item.username, })); - ctx.set('data', { + return { title: `人才招聘-${title_dict[type].title}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nju/router.ts b/lib/routes/nju/router.ts deleted file mode 100644 index e2177177e..000000000 --- a/lib/routes/nju/router.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (router) => { - router.get('/admission', './admission'); - router.get('/dafls', './dafls'); - router.get('/exchangesys/:type', './exchangesys'); - router.get('/gra', './gra'); - router.get('/hospital', './hosptial'); - router.get('/hqjt', './hqjt'); - router.get('/itsc', './itsc'); - router.get('/jjc', './jjc'); - router.get('/jw/:type', './jw'); - router.get('/rczp/:type', './rczp'); - router.get('/scit/:type', './scit'); - router.get('/zbb/:type', './zbb'); - router.get('/zcc', './zcc'); -}; diff --git a/lib/routes/nju/scit.ts b/lib/routes/nju/scit.ts index 96e56baa2..a31b97116 100644 --- a/lib/routes/nju/scit.ts +++ b/lib/routes/nju/scit.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/scit/:type', + categories: ['university'], + example: '/nju/scit/tzgg', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '科学技术处', + maintainers: ['ret-1'], + handler, + description: `| 通知公告 | 科研动态 | + | -------- | -------- | + | tzgg | kydt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const type_dict = { tzgg: ['https://scit.nju.edu.cn/10916/list.htm', '通知公告'], @@ -19,7 +41,7 @@ export default async (ctx) => { const $ = load(data); const list = $('li.list_item'); - ctx.set('data', { + return { title: `科学技术处-${type_dict[type][1]}`, link: type_dict[type][0], item: list @@ -32,5 +54,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/nju/zbb.ts b/lib/routes/nju/zbb.ts index 26948cd0b..d8fdf49f7 100644 --- a/lib/routes/nju/zbb.ts +++ b/lib/routes/nju/zbb.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/zbb/:type', + categories: ['university'], + example: '/nju/zbb/cgxx', + parameters: { type: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '招标办公室', + maintainers: ['ret-1'], + handler, + description: `| 采购信息 | 成交公示 | 政府采购意向公开 | + | -------- | -------- | ---------------- | + | cgxx | cjgs | zfcgyxgk |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); if (type === 'zfcgyxgk') { const url = `https://zbb.nju.edu.cn/zfcgyxgk/index.chtml`; @@ -18,7 +40,7 @@ export default async (ctx) => { const $ = load(data); const list = $('dd[cid]'); - ctx.set('data', { + return { title: '政府采购意向公开', link: url, item: list @@ -32,7 +54,7 @@ export default async (ctx) => { }; }) .get(), - }); + }; } else { const title_dict = { cgxx: '采购信息', @@ -70,10 +92,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: title_dict[type], link: `https://zbb.nju.edu.cn/${type}hw/index.chtml`, item: [...items[0], ...items[1], ...items[2]], - }); + }; } -}; +} diff --git a/lib/routes/nju/zcc.ts b/lib/routes/nju/zcc.ts index 5482efef2..6d97c5a8b 100644 --- a/lib/routes/nju/zcc.ts +++ b/lib/routes/nju/zcc.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zcc', + categories: ['university'], + example: '/nju/zcc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zcc.nju.edu.cn/tzgg/gyfytdglk/index.html', 'zcc.nju.edu.cn/tzgg/index.html', 'zcc.nju.edu.cn/'], + }, + name: '资产管理处', + maintainers: ['ret-1'], + handler, + url: 'zcc.nju.edu.cn/tzgg/gyfytdglk/index.html', +}; + +async function handler() { const category_dict = { ggtz: '公告通知', }; @@ -30,9 +53,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '资产管理处-公告通知', link: 'https://zcc.nju.edu.cn/sy/tzzhxx/index.html', item: items[0], - }); -}; + }; +} diff --git a/lib/routes/njucm/grabs.ts b/lib/routes/njucm/grabs.ts index f265a71eb..36086ed56 100644 --- a/lib/routes/njucm/grabs.ts +++ b/lib/routes/njucm/grabs.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://gra.njucm.edu.cn/2899/list.htm'; const host = 'https://gra.njucm.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/grabszs', + categories: ['university'], + example: '/njucm/grabszs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lib.njucm.edu.cn/2899/list.htm', 'lib.njucm.edu.cn/'], + }, + name: '研究生院博士招生', + maintainers: ['real-jiakai'], + handler, + url: 'lib.njucm.edu.cn/2899/list.htm', +}; + +async function handler(ctx) { const out = await getNoticeList(ctx, url, host, '#wp_news_w3 > table > tbody > tr', 'a', { title: '.Article_Title', content: '.Article_Content', date: '.Article_PublishDate', }); - ctx.set('data', { + return { title: '南京中医药大学 -- 博士招生', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/njucm/maintainer.ts b/lib/routes/njucm/maintainer.ts deleted file mode 100644 index e4245c0a2..000000000 --- a/lib/routes/njucm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/grabszs': ['real-jiakai'], -}; diff --git a/lib/routes/njucm/namespace.ts b/lib/routes/njucm/namespace.ts new file mode 100644 index 000000000..c777e9830 --- /dev/null +++ b/lib/routes/njucm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京中医药大学', + url: 'lib.njucm.edu.cn', +}; diff --git a/lib/routes/njucm/radar.ts b/lib/routes/njucm/radar.ts deleted file mode 100644 index e2c46c17d..000000000 --- a/lib/routes/njucm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'njucm.edu.cn': { - _name: '南京中医药大学', - lib: [ - { - title: '研究生院博士招生', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-zhong-yi-yao-da-xue-yan-jiu-sheng-yuan-bo-shi-zhao-sheng', - source: ['/2899/list.htm', '/'], - target: '/njucm/grabszs', - }, - ], - }, -}; diff --git a/lib/routes/njucm/router.ts b/lib/routes/njucm/router.ts deleted file mode 100644 index 27a20410b..000000000 --- a/lib/routes/njucm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/grabszs', './grabs'); -}; diff --git a/lib/routes/njupt/jwc.ts b/lib/routes/njupt/jwc.ts index 1362ea35a..73d0e7a91 100644 --- a/lib/routes/njupt/jwc.ts +++ b/lib/routes/njupt/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,28 @@ const map = { news: '/1596', }; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/njupt/jwc/notice', + parameters: { type: '默认为 `notice`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处通知与新闻', + maintainers: ['shaoye'], + handler, + description: `| 通知公告 | 教务快讯 | + | -------- | -------- | + | notice | news |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'notice'; const link = host + map[type] + '/list.htm'; const response = await got({ @@ -83,9 +105,9 @@ export default async (ctx) => { if (type === 'news') { info = '教务快讯'; } - ctx.set('data', { + return { title: '南京邮电大学 -- ' + info, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/njupt/maintainer.ts b/lib/routes/njupt/maintainer.ts deleted file mode 100644 index c0af83602..000000000 --- a/lib/routes/njupt/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jwc/:type?': ['shaoye'], -}; diff --git a/lib/routes/njupt/namespace.ts b/lib/routes/njupt/namespace.ts new file mode 100644 index 000000000..2316f3939 --- /dev/null +++ b/lib/routes/njupt/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京邮电大学', + url: 'jwc.njupt.edu.cn', +}; diff --git a/lib/routes/njupt/radar.ts b/lib/routes/njupt/radar.ts deleted file mode 100644 index 0635059e7..000000000 --- a/lib/routes/njupt/radar.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - 'njupt.edu.cn': { - _name: '南京邮电大学', - jwc: [ - { - title: '教务处通知与新闻', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-you-dian-da-xue', - source: '/*/list.htm', - target: (_params, url) => { - url = new URL(url); - if (url.pathname.includes('/1594')) { - return '/njupt/notice'; - } else if (url.pathname.includes('/1596')) { - return '/njupt/news'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/njupt/router.ts b/lib/routes/njupt/router.ts deleted file mode 100644 index 85091c3c0..000000000 --- a/lib/routes/njupt/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jwc/:type?', './jwc'); -}; diff --git a/lib/routes/njust/cwc.ts b/lib/routes/njust/cwc.ts index 13f5a61bf..4f37a672a 100644 --- a/lib/routes/njust/cwc.ts +++ b/lib/routes/njust/cwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -10,7 +11,28 @@ const map = new Map([ const host = 'https://cwc.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/cwc/:type?', + categories: ['university'], + example: '/njust/cwc/tzgg', + parameters: { type: '分类名,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '财务处', + maintainers: ['MilkShakeYoung', 'jasongzy'], + handler, + description: `| 通知公告 | 办事流程 | + | -------- | -------- | + | tzgg | bslc |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'tzgg'; const info = map.get(type); if (!info) { @@ -23,7 +45,7 @@ export default async (ctx) => { const $ = load(html); const list = $('ul.news_list').find('li'); - ctx.set('data', { + return { title: info.title, link: siteUrl, item: @@ -35,5 +57,5 @@ export default async (ctx) => { link: $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/njust/dgxg.ts b/lib/routes/njust/dgxg.ts index e4bb32aa2..1be3db32b 100644 --- a/lib/routes/njust/dgxg.ts +++ b/lib/routes/njust/dgxg.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -11,7 +12,28 @@ const map = new Map([ const host = 'https://dgxg.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/dgxg/:type?', + categories: ['university'], + example: '/njust/dgxg/gstz', + parameters: { type: '分类名,见下表,默认为公示通知' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '电光学院研学网', + maintainers: ['jasongzy'], + handler, + description: `| 公示通知 | 学术文化 | 就业指导 | + | -------- | -------- | -------- | + | gstz | xswh | jyzd |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'gstz'; const info = map.get(type); if (!info) { @@ -24,7 +46,7 @@ export default async (ctx) => { const $ = load(html); const list = $('ul.wp_article_list').find('li'); - ctx.set('data', { + return { title: info.title, link: siteUrl, item: @@ -36,5 +58,5 @@ export default async (ctx) => { link: $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/njust/eo.ts b/lib/routes/njust/eo.ts index 2fe977734..3039cc441 100644 --- a/lib/routes/njust/eo.ts +++ b/lib/routes/njust/eo.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -16,7 +17,39 @@ const map = new Map([ const host = 'https://dgxg.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/eo/:grade?/:type?', + categories: ['university'], + example: '/njust/eo/17/tz', + parameters: { + grade: '年级,见下表,默认为本科 2017 级,未列出的年级所对应的参数可以从级网二级页面的 URL Path 中找到,例如:本科 2020 级为 `_t1316`', + type: '类别,见下表,默认为年级通知(通知公告),未列出的类别所对应的参数可以从级网二级页面的 URL Path 中找到,例如:电光 20 的通知公告为 `tzgg_12969`', + }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '电光学院年级网站', + maintainers: ['jasongzy'], + handler, + description: `\`grade\` 列表: + + | 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 | + | ------------ | ------------ | ------------ | ------------ | + | 16 | 17 | 18 | 19 | + + \`type\` 列表: + + | 年级通知(通知公告) | 每日动态(主任寄语) | + | -------------------- | -------------------- | + | tz | dt |`, +}; + +async function handler(ctx) { const grade = ctx.req.param('grade') ?? '17'; const type = ctx.req.param('type') ?? 'tz'; let info = map.get(grade + type); @@ -34,7 +67,7 @@ export default async (ctx) => { } const list = $('li.list_item'); - ctx.set('data', { + return { title: info.title, link: siteUrl, item: @@ -46,5 +79,5 @@ export default async (ctx) => { link: $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/njust/eoe.ts b/lib/routes/njust/eoe.ts index 976f5ce43..96562cdc0 100644 --- a/lib/routes/njust/eoe.ts +++ b/lib/routes/njust/eoe.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -10,7 +11,28 @@ const map = new Map([ const host = 'https://eoe.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/eoe/:type?', + categories: ['university'], + example: '/njust/eoe/tzgg', + parameters: { type: '分类名,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '电光学院', + maintainers: ['jasongzy'], + handler, + description: `| 通知公告 | 新闻动态 | + | -------- | -------- | + | tzgg | xwdt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'tzgg'; const info = map.get(type); if (!info) { @@ -23,7 +45,7 @@ export default async (ctx) => { const $ = load(html); const list = $('ul.news_ul').find('li'); - ctx.set('data', { + return { title: info.title, link: siteUrl, item: @@ -35,5 +57,5 @@ export default async (ctx) => { link: $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/njust/gs.ts b/lib/routes/njust/gs.ts index a01bd76d4..9740f5494 100644 --- a/lib/routes/njust/gs.ts +++ b/lib/routes/njust/gs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -5,7 +6,32 @@ import { getContent } from './utils'; const host = 'https://gs.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gs/:type?', + categories: ['university'], + example: '/njust/gs/sytzgg_4568', + parameters: { type: '分类 ID,部分示例参数见下表,默认为首页通知公告,其他分类 ID 可以从网站 URL Path 中找到,如国际交流为 `gjjl`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.njust.edu.cn/:type/list.htm'], + target: '/gs/:type', + }, + name: '研究生院', + maintainers: ['MilkShakeYoung', 'jasongzy'], + handler, + description: `| 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 | + | ------------ | ------------ | -------- | -------- | -------- | -------- | + | sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'sytzgg_4568'; const id = '/' + type; const siteUrl = host + id + '/list.htm'; @@ -33,9 +59,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, link: siteUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/njust/jwc.ts b/lib/routes/njust/jwc.ts index e60bc95a9..44b9b3663 100644 --- a/lib/routes/njust/jwc.ts +++ b/lib/routes/njust/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -12,7 +13,28 @@ const map = new Map([ const host = 'https://jwc.njust.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/njust/jwc/xstz', + parameters: { type: '分类名,见下表,默认为学生通知' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['MilkShakeYoung', 'jasongzy'], + handler, + description: `| 教师通知 | 学生通知 | 新闻 | 学院动态 | + | -------- | -------- | ---- | -------- | + | jstz | xstz | xw | xydt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'xstz'; const info = map.get(type); if (!info) { @@ -25,7 +47,7 @@ export default async (ctx) => { const $ = load(html); const list = $('div#wp_news_w3').find('tr'); - ctx.set('data', { + return { title: info.title, link: siteUrl, item: @@ -37,5 +59,5 @@ export default async (ctx) => { link: $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/njust/maintainer.ts b/lib/routes/njust/maintainer.ts deleted file mode 100644 index aa3b3c594..000000000 --- a/lib/routes/njust/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/cwc/:type?': ['MilkShakeYoung', 'jasongzy'], - '/dgxg/:type?': ['jasongzy'], - '/eo/:grade?/:type?': ['jasongzy'], - '/eoe/:type?': ['jasongzy'], - '/gs/:type?': ['MilkShakeYoung', 'jasongzy'], - '/jwc/:type?': ['MilkShakeYoung', 'jasongzy'], -}; diff --git a/lib/routes/njust/namespace.ts b/lib/routes/njust/namespace.ts new file mode 100644 index 000000000..39ef6dab4 --- /dev/null +++ b/lib/routes/njust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京理工大学', + url: 'jwc.njust.edu.cn', +}; diff --git a/lib/routes/njust/radar.ts b/lib/routes/njust/radar.ts deleted file mode 100644 index 45befbc96..000000000 --- a/lib/routes/njust/radar.ts +++ /dev/null @@ -1,110 +0,0 @@ -export default { - 'njust.edu.cn': { - _name: '南京理工大学', - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-li-gong-da-xue', - source: ['/:type/list.htm'], - target: (params) => { - let type = ''; - switch (params.type) { - case '1216': - type = 'jstz'; - break; - case '1217': - type = 'xstz'; - break; - case '1218': - type = 'xw'; - break; - case '1219': - type = 'xydt'; - break; - default: - return; - } - return `/njust/jwc/${type}`; - }, - }, - ], - cwc: [ - { - title: '财务处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-li-gong-da-xue', - source: ['/:type/list.htm'], - target: (params) => { - let type = ''; - switch (params.type) { - case '12432': - type = 'tzgg'; - break; - case '1382': - type = 'bslc'; - break; - default: - return; - } - return `/njust/cwc/${type}`; - }, - }, - ], - gs: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-li-gong-da-xue', - source: ['/:type/list.htm'], - target: `/njust/gs/:type`, - }, - ], - eoe: [ - { - title: '电光学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-li-gong-da-xue', - source: ['/:type/list.htm'], - target: (params) => { - let type = ''; - switch (params.type) { - case '1920': - type = 'tzgg'; - break; - case '1919': - type = 'xwdt'; - break; - default: - return; - } - return `/njust/eoe/${type}`; - }, - }, - ], - dgxg: [ - { - title: '电光学院研学网/年级网站', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-li-gong-da-xue', - source: ['/:type/list.htm', '/:grade/:type/list.htm'], - target: (params) => { - if (params.grade) { - return `/njust/eo/${params.grade}/${params.type}`; - } else { - let type = ''; - switch (params.type) { - case '6509': - type = 'gstz'; - break; - case '6511': - type = 'xswh'; - break; - case '6510': - type = 'jyzd'; - break; - default: - return; - } - return `/njust/dgxg/${type}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/njust/router.ts b/lib/routes/njust/router.ts deleted file mode 100644 index 3d2e25fc1..000000000 --- a/lib/routes/njust/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/cwc/:type?', './cwc'); - router.get('/dgxg/:type?', './dgxg'); - router.get('/eo/:grade?/:type?', './eo'); - router.get('/eoe/:type?', './eoe'); - router.get('/gs/:type?', './gs'); - router.get('/jwc/:type?', './jwc'); -}; diff --git a/lib/routes/njxzc/home.ts b/lib/routes/njxzc/home.ts index 94de93fc0..3efd25058 100644 --- a/lib/routes/njxzc/home.ts +++ b/lib/routes/njxzc/home.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://www.njxzc.edu.cn/89/list.htm'; const host = 'https://www.njxzc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/tzgg', + categories: ['university'], + example: '/njxzc/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.njxzc.edu.cn/89/list.htm', 'www.njxzc.edu.cn/'], + }, + name: '官网通知公告', + maintainers: ['real-jiakai'], + handler, + url: 'www.njxzc.edu.cn/89/list.htm', +}; + +async function handler(ctx) { const out = await getNoticeList( ctx, url, @@ -18,9 +41,9 @@ export default async (ctx) => { '.news_list .news' ); - ctx.set('data', { + return { title: '南京晓庄学院 -- 通知公告', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/njxzc/lib.ts b/lib/routes/njxzc/lib.ts index b18c2a5f7..7d58f840b 100644 --- a/lib/routes/njxzc/lib.ts +++ b/lib/routes/njxzc/lib.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import { getNoticeList } from './utils'; const url = 'https://lib.njxzc.edu.cn/pxyhd/list.htm'; const host = 'https://lib.njxzc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/libtzgg', + categories: ['university'], + example: '/njxzc/libtzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lib.njxzc.edu.cn/pxyhd/list.htm', 'lib.njxzc.edu.cn/'], + }, + name: '图书馆通知公告', + maintainers: ['real-jiakai'], + handler, + url: 'lib.njxzc.edu.cn/pxyhd/list.htm', +}; + +async function handler(ctx) { const out = await getNoticeList( ctx, url, @@ -18,9 +41,9 @@ export default async (ctx) => { '.news' ); - ctx.set('data', { + return { title: '南京晓庄学院 -- 图书馆通知公告', link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/njxzc/maintainer.ts b/lib/routes/njxzc/maintainer.ts deleted file mode 100644 index a204aa3c8..000000000 --- a/lib/routes/njxzc/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/libtzgg': ['real-jiakai'], - '/tzgg': ['real-jiakai'], -}; diff --git a/lib/routes/njxzc/namespace.ts b/lib/routes/njxzc/namespace.ts new file mode 100644 index 000000000..7d8b37305 --- /dev/null +++ b/lib/routes/njxzc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京晓庄学院', + url: 'lib.njxzc.edu.cn', +}; diff --git a/lib/routes/njxzc/radar.ts b/lib/routes/njxzc/radar.ts deleted file mode 100644 index ecd72f6a9..000000000 --- a/lib/routes/njxzc/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'njxzc.edu.cn': { - _name: '南京晓庄学院', - lib: [ - { - title: '图书馆通知公告', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xiao-zhuang-xue-yuan-tu-shu-guan-tong-zhi-gong-gao', - source: ['/pxyhd/list.htm', '/'], - target: '/njxzc/libtzgg', - }, - ], - www: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xiao-zhuang-xue-yuan-guan-wang-tong-zhi-gong-gao', - source: ['/89/list.htm', '/'], - target: '/njxzc/tzgg', - }, - ], - }, -}; diff --git a/lib/routes/njxzc/router.ts b/lib/routes/njxzc/router.ts deleted file mode 100644 index a4142a1a7..000000000 --- a/lib/routes/njxzc/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - // 南京晓庄学院图书馆通知公告 - router.get('/libtzgg', './lib'); - // 南京晓庄学院通知公告 - router.get('/tzgg', './home'); -}; diff --git a/lib/routes/nlc/maintainer.ts b/lib/routes/nlc/maintainer.ts deleted file mode 100644 index 36eae4e39..000000000 --- a/lib/routes/nlc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/read/:type?': ['nczitzk'], -}; diff --git a/lib/routes/nlc/namespace.ts b/lib/routes/nlc/namespace.ts new file mode 100644 index 000000000..7165ef0e7 --- /dev/null +++ b/lib/routes/nlc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国国家图书馆', + url: 'read.nlc.cn', +}; diff --git a/lib/routes/nlc/radar.ts b/lib/routes/nlc/radar.ts deleted file mode 100644 index 993e0ed08..000000000 --- a/lib/routes/nlc/radar.ts +++ /dev/null @@ -1,66 +0,0 @@ -export default { - 'nlc.cn': { - _name: '中国国家图书馆', - read: [ - { - title: '读者云平台', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: (_, url) => { - url = new URL(url); - const type = url.searchParams.get('type'); - - return `/nlc/read/${type ? `/${type}` : ''}`; - }, - }, - { - title: '电子图书', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/电子图书', - }, - { - title: '电子期刊', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/电子期刊', - }, - { - title: '电子论文', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/电子论文', - }, - { - title: '电子报纸', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/电子报纸', - }, - { - title: '音视频', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/音视频', - }, - { - title: '标准专利', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/标准专利', - }, - { - title: '工具书', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/工具书', - }, - { - title: '少儿资源', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai', - source: ['/outRes/outResList'], - target: '/nlc/read/少儿资源', - }, - ], - }, -}; diff --git a/lib/routes/nlc/read.ts b/lib/routes/nlc/read.ts index f9afd6468..ecc536df7 100644 --- a/lib/routes/nlc/read.ts +++ b/lib/routes/nlc/read.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/read/:type?', + categories: ['other'], + example: '/nlc/read/电子图书', + parameters: { type: '分类,见下表,默认为电子图书' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '读者云平台', + maintainers: ['nczitzk'], + handler, + description: `| [电子图书](http://read.nlc.cn/outRes/outResList?type=电子图书) | [电子期刊](http://read.nlc.cn/outRes/outResList?type=电子期刊) | [电子论文](http://read.nlc.cn/outRes/outResList?type=电子论文) | [电子报纸](http://read.nlc.cn/outRes/outResList?type=电子报纸) | [音视频](http://read.nlc.cn/outRes/outResList?type=音视频) | + | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | + + | [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) | + | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |`, +}; + +async function handler(ctx) { const { type = '电子图书' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -55,7 +79,7 @@ export default async (ctx) => { const image = new URL('static/style/css/images/YMH_home_main_logo.png', rootUrl).href; const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$('title').text()} - ${type}`, link: currentUrl, @@ -67,5 +91,5 @@ export default async (ctx) => { subtitle: type, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/nlc/router.ts b/lib/routes/nlc/router.ts deleted file mode 100644 index 87a34ad55..000000000 --- a/lib/routes/nlc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/read/:type?', './read'); -}; diff --git a/lib/routes/nltimes/maintainer.ts b/lib/routes/nltimes/maintainer.ts deleted file mode 100644 index 7b12b830b..000000000 --- a/lib/routes/nltimes/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['Hivol'], -}; diff --git a/lib/routes/nltimes/namespace.ts b/lib/routes/nltimes/namespace.ts new file mode 100644 index 000000000..39a69ecc1 --- /dev/null +++ b/lib/routes/nltimes/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NL Times', + url: 'nltimes.nl', +}; diff --git a/lib/routes/nltimes/news.ts b/lib/routes/nltimes/news.ts index 0bcb9439d..9fd34fd17 100644 --- a/lib/routes/nltimes/news.ts +++ b/lib/routes/nltimes/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -17,7 +18,32 @@ const map = new Map([ ['1-1-2', { title: 'NL Times -- 1-1-2', suffix: '/categories/1-1-2' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['new-media'], + example: '/nltimes/news/top-stories', + parameters: { category: 'category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nltimes.nl/categories/:category'], + target: '/news/:category', + }, + name: 'News', + maintainers: ['Hivol'], + handler, + description: `| Top Stories (default) | Health | Crime | Politics | Business | Tech | Culture | Sports | Weird | 1-1-2 | + | --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- | + | top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'top-stories'; const suffix = map.get(category).suffix; @@ -80,11 +106,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: map.get(category).title, language: 'en', link: apiUrl, description: map.get(category).title, item: items, - }); -}; + }; +} diff --git a/lib/routes/nltimes/radar.ts b/lib/routes/nltimes/radar.ts deleted file mode 100644 index 5e1d3a66b..000000000 --- a/lib/routes/nltimes/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'nltimes.nl': { - _name: 'NL Times', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#nl-times', - source: '/categories/:category', - target: '/nltimes/news/:category', - }, - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#nl-times', - source: '/top-stories', - target: '/nltimes/news/top-stories', - }, - ], - }, -}; diff --git a/lib/routes/nltimes/router.ts b/lib/routes/nltimes/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/nltimes/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/nmc/maintainer.ts b/lib/routes/nmc/maintainer.ts deleted file mode 100644 index 434781165..000000000 --- a/lib/routes/nmc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/weatheralarm/:province?': ['ylc395'], -}; diff --git a/lib/routes/nmc/namespace.ts b/lib/routes/nmc/namespace.ts new file mode 100644 index 000000000..492740c8b --- /dev/null +++ b/lib/routes/nmc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中央气象台', + url: 'nmc.cn', +}; diff --git a/lib/routes/nmc/radar.ts b/lib/routes/nmc/radar.ts deleted file mode 100644 index 81860a4a5..000000000 --- a/lib/routes/nmc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nmc.cn': { - _name: '中央气象台', - '.': [ - { - title: '全国气象预警', - docs: 'https://docs.rsshub.app/routes/forecast#zhong-yang-qi-xiang-tai', - source: ['/publish/alarm.html', '/'], - target: '/nmc/weatheralarm', - }, - ], - }, -}; diff --git a/lib/routes/nmc/router.ts b/lib/routes/nmc/router.ts deleted file mode 100644 index fde453364..000000000 --- a/lib/routes/nmc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/weatheralarm/:province?', './weatheralarm'); -}; diff --git a/lib/routes/nmc/weatheralarm.ts b/lib/routes/nmc/weatheralarm.ts index 825d35650..f5b040fef 100644 --- a/lib/routes/nmc/weatheralarm.ts +++ b/lib/routes/nmc/weatheralarm.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import * as cheerio from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/weatheralarm/:province?', + categories: ['forecast'], + example: '/nmc/weatheralarm/广东省', + parameters: { province: '省份' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nmc.cn/publish/alarm.html', 'nmc.cn/'], + target: '/weatheralarm', + }, + name: 'Unknown', + maintainers: ['ylc395'], + handler, + url: 'nmc.cn/publish/alarm.html', +}; + +async function handler(ctx) { const { province } = ctx.req.param(); const alarmInfoURL = `http://www.nmc.cn/rest/findAlarm`; const { data: response } = await got(alarmInfoURL, { @@ -41,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中央气象台全国气象预警', link: 'http://www.nmc.cn/publish/alarm.html', item: items, - }); -}; + }; +} diff --git a/lib/routes/nmtv/column.ts b/lib/routes/nmtv/column.ts index 9cc4423fc..11ac0d096 100644 --- a/lib/routes/nmtv/column.ts +++ b/lib/routes/nmtv/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id?', + categories: ['traditional-media'], + example: '/nmtv/column/877', + parameters: { id: '栏目 id,可在对应栏目 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '点播', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 如 [蒙古语卫视新闻联播](http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877) 的 URL 为 \`http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877\`,其栏目 id 为末尾数字编号,即 \`877\`。可以得到其对应路由为 [\`/nmtv/column/877\`](https://rsshub.app/nmtv/column/877) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '877'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -46,11 +68,11 @@ export default async (ctx) => { const author = data[0].column_name; const imageUrl = data[0].column_info.indexpic; - ctx.set('data', { + return { title: `内蒙古广播电视台 - ${author}`, link: items[0].link.split(/\/\d{4}-\d{2}-\d{2}\//)[0], item: items, image: `${imageUrl.host}${imageUrl.filepath}${imageUrl.filename}`, itunes_author: author, - }); -}; + }; +} diff --git a/lib/routes/nmtv/maintainer.ts b/lib/routes/nmtv/maintainer.ts deleted file mode 100644 index 1fee68285..000000000 --- a/lib/routes/nmtv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/column/:id?': ['nczitzk'], -}; diff --git a/lib/routes/nmtv/namespace.ts b/lib/routes/nmtv/namespace.ts new file mode 100644 index 000000000..097d9fc4c --- /dev/null +++ b/lib/routes/nmtv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '内蒙古广播电视台', + url: 'nmtv.cn', +}; diff --git a/lib/routes/nmtv/radar.ts b/lib/routes/nmtv/radar.ts deleted file mode 100644 index 64aec14b4..000000000 --- a/lib/routes/nmtv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nmtv.cn': { - _name: '内蒙古广播电视台', - '.': [ - { - title: '点播', - docs: 'https://docs.rsshub.app/routes/traditional-media#nei-meng-gu-guang-bo-dian-shi-tai-dian-bo', - source: ['/'], - target: (params, url) => `/nmtv/column/${url.split(/\/folder/).pop()}`, - }, - ], - }, -}; diff --git a/lib/routes/nmtv/router.ts b/lib/routes/nmtv/router.ts deleted file mode 100644 index fb223e8b1..000000000 --- a/lib/routes/nmtv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/column/:id?', './column'); -}; diff --git a/lib/routes/nodejs/blog.ts b/lib/routes/nodejs/blog.ts index bfa010c21..84ef3aa81 100644 --- a/lib/routes/nodejs/blog.ts +++ b/lib/routes/nodejs/blog.ts @@ -1,9 +1,46 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:language?', + categories: ['programming'], + example: '/nodejs/blog', + parameters: { language: 'Language, see below, en by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nodejs.org/:language/blog', 'nodejs.org/'], + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + description: `| العربية | Catalan | Deutsch | Español | زبان فارسی | + | ------- | ------- | ------- | ------- | ---------- | + | ar | ca | de | es | fa | + + | Français | Galego | Italiano | 日本語 | 한국어 | + | -------- | ------ | -------- | ------ | ------ | + | fr | gl | it | ja | ko | + + | Português do Brasil | limba română | Русский | Türkçe | Українська | + | ------------------- | ------------ | ------- | ------ | ---------- | + | pt-br | ro | ru | tr | uk | + + | 简体中文 | 繁體中文 | + | -------- | -------- | + | zh-cn | zh-tw |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'en'; const rootUrl = 'https://nodejs.org'; @@ -53,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'News - Node.js', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nodejs/maintainer.ts b/lib/routes/nodejs/maintainer.ts deleted file mode 100644 index 18c0085ea..000000000 --- a/lib/routes/nodejs/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog/:language?': ['nczitzk'], -}; diff --git a/lib/routes/nodejs/namespace.ts b/lib/routes/nodejs/namespace.ts new file mode 100644 index 000000000..8a845ce47 --- /dev/null +++ b/lib/routes/nodejs/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Node.js', + url: 'nodejs.org', +}; diff --git a/lib/routes/nodejs/radar.ts b/lib/routes/nodejs/radar.ts deleted file mode 100644 index 072d3a56c..000000000 --- a/lib/routes/nodejs/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nodejs.org': { - _name: 'Node.js', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/programming#nodejs-news', - source: ['/:language/blog', '/'], - target: '/nodejs/blog/:language?', - }, - ], - }, -}; diff --git a/lib/routes/nodejs/router.ts b/lib/routes/nodejs/router.ts deleted file mode 100644 index 46410d3d1..000000000 --- a/lib/routes/nodejs/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:language?', './blog'); -}; diff --git a/lib/routes/nogizaka46/blog.ts b/lib/routes/nogizaka46/blog.ts index 7c9c128e1..91562d46f 100644 --- a/lib/routes/nogizaka46/blog.ts +++ b/lib/routes/nogizaka46/blog.ts @@ -1,9 +1,77 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.nogizaka46.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:id?', + categories: ['new-media'], + example: '/nogizaka46/blog', + parameters: { id: 'Member ID, see below, `all` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['blog.nogizaka46.com/s/n46/diary/MEMBER'], + target: '/blog', + }, + name: 'Nogizaka46 Blog 乃木坂 46 博客', + maintainers: ['Kasper4649', 'akashigakki'], + handler, + url: 'blog.nogizaka46.com/s/n46/diary/MEMBER', + description: `Member ID + + | Member ID | Name | + | --------- | --------------------- | + | 55401 | 岡本 姫奈 | + | 55400 | 川﨑 桜 | + | 55397 | 池田 瑛紗 | + | 55396 | 五百城 茉央 | + | 55395 | 中西 アルノ | + | 55394 | 奥田 いろは | + | 55393 | 冨里 奈央 | + | 55392 | 小川 彩 | + | 55391 | 菅原 咲月 | + | 55390 | 一ノ瀬 美空 | + | 55389 | 井上 和 | + | 55387 | 弓木 奈於 | + | 55386 | 松尾 美佑 | + | 55385 | 林 瑠奈 | + | 55384 | 佐藤 璃果 | + | 55383 | 黒見 明香 | + | 48014 | 清宮 レイ | + | 48012 | 北川 悠理 | + | 48010 | 金川 紗耶 | + | 48019 | 矢久保 美緒 | + | 48018 | 早川 聖来 | + | 48009 | 掛橋 沙耶香 | + | 48008 | 賀喜 遥香 | + | 48017 | 筒井 あやめ | + | 48015 | 田村 真佑 | + | 48013 | 柴田 柚菜 | + | 48006 | 遠藤 さくら | + | 36760 | 与田 祐希 | + | 36759 | 吉田 綾乃クリスティー | + | 36758 | 山下 美月 | + | 36757 | 向井 葉月 | + | 36756 | 中村 麗乃 | + | 36755 | 佐藤 楓 | + | 36754 | 阪口 珠美 | + | 36753 | 久保 史緒里 | + | 36752 | 大園 桃子 | + | 36751 | 梅澤 美波 | + | 36750 | 岩本 蓮加 | + | 36749 | 伊藤 理々杏 | + | 264 | 齋藤 飛鳥 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'all'; const params = id === 'all' ? '' : `?ct=${id}`; const currentUrl = `${rootUrl}/s/n46/api/list/blog${params}`; @@ -15,7 +83,7 @@ export default async (ctx) => { const list = JSON.parse(response.data.slice(4).slice(0, -2)).data; - ctx.set('data', { + return { allowEmpty: true, title: '乃木坂46 公式ブログ', link: 'https://www.nogizaka46.com/s/n46/diary/MEMBER', @@ -29,5 +97,5 @@ export default async (ctx) => { description: item.text, guid: rootUrl + new URL(item.link).pathname, })), - }); -}; + }; +} diff --git a/lib/routes/nogizaka46/maintainer.ts b/lib/routes/nogizaka46/maintainer.ts deleted file mode 100644 index a88edeca7..000000000 --- a/lib/routes/nogizaka46/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news': ['crispgm', 'Fatpandac'], - '/blog/:id?': ['Kasper4649', 'akashigakki'], -}; diff --git a/lib/routes/nogizaka46/namespace.ts b/lib/routes/nogizaka46/namespace.ts new file mode 100644 index 000000000..c22f9f1c0 --- /dev/null +++ b/lib/routes/nogizaka46/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sakamichi Series 坂道系列官网资讯', + url: 'news.nogizaka46.com', +}; diff --git a/lib/routes/nogizaka46/news.ts b/lib/routes/nogizaka46/news.ts index 1f035eaee..b0f1cc8e7 100644 --- a/lib/routes/nogizaka46/news.ts +++ b/lib/routes/nogizaka46/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.nogizaka46.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/nogizaka46/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.nogizaka46.com/s/n46/news/list'], + }, + name: 'Nogizaka46 News 乃木坂 46 新闻', + maintainers: ['crispgm', 'Fatpandac'], + handler, + url: 'news.nogizaka46.com/s/n46/news/list', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; const response = await got({ @@ -24,10 +47,10 @@ export default async (ctx) => { guid: rootUrl + new URL(item.link_url).pathname, })); - ctx.set('data', { + return { allowEmpty: true, title: '乃木坂46官网 NEWS', link: 'http://www.nogizaka46.com/news/', item: items, - }); -}; + }; +} diff --git a/lib/routes/nogizaka46/radar.ts b/lib/routes/nogizaka46/radar.ts deleted file mode 100644 index 63e34dc47..000000000 --- a/lib/routes/nogizaka46/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'nogizaka46.com': { - _name: '乃木坂46', - news: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-nai-mu-ban-46-xin-wen', - source: ['/s/n46/news/list'], - target: '/nogizaka46/news', - }, - ], - blog: [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-nai-mu-ban-46-bo-ke', - source: ['/s/n46/diary/MEMBER'], - target: '/nogizaka46/blog', - }, - ], - }, -}; diff --git a/lib/routes/nogizaka46/router.ts b/lib/routes/nogizaka46/router.ts deleted file mode 100644 index f055a2dee..000000000 --- a/lib/routes/nogizaka46/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news', './news'); - router.get('/blog/:id?', './blog'); -}; diff --git a/lib/routes/notateslaapp/maintainer.ts b/lib/routes/notateslaapp/maintainer.ts deleted file mode 100644 index 85fdad6ca..000000000 --- a/lib/routes/notateslaapp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ota': ['mrbruce516'], -}; diff --git a/lib/routes/notateslaapp/namespace.ts b/lib/routes/notateslaapp/namespace.ts new file mode 100644 index 000000000..383dc416b --- /dev/null +++ b/lib/routes/notateslaapp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Not a Tesla App', + url: 'notateslaapp.com', +}; diff --git a/lib/routes/notateslaapp/radar.ts b/lib/routes/notateslaapp/radar.ts deleted file mode 100644 index 44c4542af..000000000 --- a/lib/routes/notateslaapp/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'notateslaapp.com': { - _name: 'Not a Tesla App', - '.': [ - { - title: '特斯拉系统更新', - docs: 'https://docs.rsshub.app/routes/program-update#not-a-tesla-app', - source: ['/software-updates/history', '/software-updates', '/'], - target: '/notateslaapp/ota', - }, - ], - }, -}; diff --git a/lib/routes/notateslaapp/router.ts b/lib/routes/notateslaapp/router.ts deleted file mode 100644 index 31539db21..000000000 --- a/lib/routes/notateslaapp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/ota', './update'); -}; diff --git a/lib/routes/notateslaapp/update.ts b/lib/routes/notateslaapp/update.ts index dfa98abf2..8c6145130 100644 --- a/lib/routes/notateslaapp/update.ts +++ b/lib/routes/notateslaapp/update.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/ota', + categories: ['program-update'], + example: '/notateslaapp/ota', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['notateslaapp.com/software-updates/history', 'notateslaapp.com/software-updates', 'notateslaapp.com/'], + }, + name: 'Tesla Software Updates', + maintainers: ['mrbruce516'], + handler, + url: 'notateslaapp.com/software-updates/history', +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://www.notateslaapp.com/software-updates/history/', @@ -15,7 +38,7 @@ export default async (ctx) => { const $ = load(data); const list = $('article[id]'); - ctx.set('data', { + return { title: '特斯拉系统更新', link: 'https://www.notateslaapp.com/software-updates/history/', description: '特斯拉系统更新 - 最新发布', @@ -32,5 +55,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/notefolio/maintainer.ts b/lib/routes/notefolio/maintainer.ts deleted file mode 100644 index 0965e2e05..000000000 --- a/lib/routes/notefolio/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/search/:category?/:order?/:time?/:query?': ['BianTan'], -}; diff --git a/lib/routes/notefolio/namespace.ts b/lib/routes/notefolio/namespace.ts new file mode 100644 index 000000000..4c6d91470 --- /dev/null +++ b/lib/routes/notefolio/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Notefolio', + url: 'notefolio.net', +}; diff --git a/lib/routes/notefolio/radar.ts b/lib/routes/notefolio/radar.ts deleted file mode 100644 index 747387807..000000000 --- a/lib/routes/notefolio/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'notefolio.net': { - _name: 'Notefolio', - '.': [ - { - title: 'Search', - docs: 'https://docs.rsshub.app/routes/design#notefolio', - source: ['/search'], - target: '/notefolio/search/:category?/:order?/:time?/:query?', - }, - ], - }, -}; diff --git a/lib/routes/notefolio/router.ts b/lib/routes/notefolio/router.ts deleted file mode 100644 index 2c24e6156..000000000 --- a/lib/routes/notefolio/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/search/:category?/:order?/:time?/:query?', './search'); -}; diff --git a/lib/routes/notefolio/search.ts b/lib/routes/notefolio/search.ts index c3d7aca0b..281e193db 100644 --- a/lib/routes/notefolio/search.ts +++ b/lib/routes/notefolio/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -67,7 +68,49 @@ const categoryMap = [ * @param query 搜索词 * @query limit 分页,默认20 */ -export default async (ctx) => { +export const route: Route = { + path: '/search/:category?/:order?/:time?/:query?', + categories: ['design'], + example: '/notefolio/search/1/pick/all/life', + parameters: { + category: 'Category, see below, `all` by default', + order: 'Order, `pick` as Notefolio Pick, `published` as Newest, `like` as like, `pick` by default', + time: 'Time, `all` as All the time, `one-day` as Latest 24 hours, `week` as Latest week, `month` as Latest month, `three-month` as Latest 3 months, `all` by default', + query: 'Keyword, empty by default', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['notefolio.net/search'], + }, + name: 'Works', + maintainers: ['BianTan'], + handler, + url: 'notefolio.net/search', + description: `| Category | Name in Korean | Name in English | + | -------- | ------------------ | ----------------------- | + | all | 전체 | All | + | 1 | 영상/모션그래픽 | Video / Motion Graphics | + | 2 | 그래픽 디자인 | Graphic Design | + | 3 | 브랜딩/편집 | Branding / Editing | + | 4 | UI/UX | UI/UX | + | 5 | 일러스트레이션 | Illustration | + | 6 | 디지털 아트 | Digital Art | + | 7 | 캐릭터 디자인 | Character Design | + | 8 | 제품/패키지 디자인 | Product Package Design | + | 9 | 포토그래피 | Photography | + | 10 | 타이포그래피 | Typography | + | 11 | 공예 | Crafts | + | 12 | 파인아트 | Fine Art |`, +}; + +async function handler(ctx) { // 分类、排序、时间范围、搜索词 const { category = 'all', order = 'pick', time = 'all', query = '' } = ctx.req.param(); // 分页 @@ -136,12 +179,12 @@ export default async (ctx) => { }; }) || []; - ctx.set('data', { + return { // 源标题 title: `${category}/${order}/${time}/${query} search`, // 源链接 // link: '', // 源文章 item: items, - }); -}; + }; +} diff --git a/lib/routes/notion/database.ts b/lib/routes/notion/database.ts index 9783b286a..951508fb7 100644 --- a/lib/routes/notion/database.ts +++ b/lib/routes/notion/database.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { Client, isNotionClientError, APIErrorCode } from '@notionhq/client'; import logger from '@/utils/logger'; @@ -12,7 +13,40 @@ const md = MarkdownIt({ linkify: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/database/:databaseId', + categories: ['other'], + example: '/notion/database/a7cc133b68454f138011f1530a13531e', + parameters: { databaseId: 'Database ID' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['notion.so/:id'], + target: '/database/:id', + }, + name: 'Database', + maintainers: ['curly210102'], + handler, + description: `There is an optional query parameter called \`properties=\` that can be used to customize field mapping. There are three built-in fields: author, pubTime and link, which can be used to add additional information. + + For example, if you have set up three properties in your database - "Publish Time", "Author", and "Original Article Link" - then execute the following JavaScript code to get the result for the properties parameter. + + \`\`\`js + encodeURIComponent(JSON.stringify({"pubTime": "Publish Time", "author": "Author", "link": "Original Article Link"})) + \`\`\` + + There is an optional query parameter called \`query=\` that can be used to customize the search rules for your database, such as custom sorting and filtering rules. + + please refer to the [Notion API documentation](https://developers.notion.com/reference/post-database-query) and execute \`encodeURIComponent(JSON.stringify(custom rules))\` to provide the query parameter.`, +}; + +async function handler(ctx) { if (!config.notion.key) { throw new Error('Notion RSS is disabled due to the lack of NOTION_TOKEN(relevant config)'); } @@ -107,14 +141,14 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `Notion - ${title}`, link, description, image, item: items, allowEmpty: true, - }); + }; } catch (error) { logger.error(error); @@ -130,7 +164,7 @@ export default async (ctx) => { ctx.throw(error); } } -}; +} function parseCustomQuery(queryString) { try { diff --git a/lib/routes/notion/maintainer.ts b/lib/routes/notion/maintainer.ts deleted file mode 100644 index 0a830f127..000000000 --- a/lib/routes/notion/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/database/:databaseId': ['curly210102'], -}; diff --git a/lib/routes/notion/namespace.ts b/lib/routes/notion/namespace.ts new file mode 100644 index 000000000..8ff221865 --- /dev/null +++ b/lib/routes/notion/namespace.ts @@ -0,0 +1,13 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Notion', + url: 'notion.so', + description: `:::warning +Need to set up Notion integration, please refer to [Route-specific Configurations](https://docs.rsshub.app/install/#Deployment) for details. +::: + +:::tip[Recommendation] +It is recommended to use with clipping tools such as Notion Web Clipper. +:::`, +}; diff --git a/lib/routes/notion/radar.ts b/lib/routes/notion/radar.ts deleted file mode 100644 index ff5998b05..000000000 --- a/lib/routes/notion/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'notion.so': { - _name: 'Notion', - '.': [ - { - title: 'Database', - docs: 'https://docs.rsshub.app/routes/other#notion', - source: ['/:id'], - target: '/notion/database/:id', - }, - ], - }, -}; diff --git a/lib/routes/notion/router.ts b/lib/routes/notion/router.ts deleted file mode 100644 index 078dfbde5..000000000 --- a/lib/routes/notion/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/database/:databaseId', './database'); -}; diff --git a/lib/routes/now/maintainer.ts b/lib/routes/now/maintainer.ts deleted file mode 100644 index bc69fa100..000000000 --- a/lib/routes/now/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?/:id?': ['nczitzk'], -}; diff --git a/lib/routes/now/namespace.ts b/lib/routes/now/namespace.ts new file mode 100644 index 000000000..f38a66d6b --- /dev/null +++ b/lib/routes/now/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Now 新聞', + url: 'news.now.com', +}; diff --git a/lib/routes/now/news.ts b/lib/routes/now/news.ts index 1581c1c5c..ebe6f1b6d 100644 --- a/lib/routes/now/news.ts +++ b/lib/routes/now/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +10,46 @@ const categories = { opinion: 125, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?/:id?', + categories: ['traditional-media'], + example: '/now/news', + parameters: { category: '分类,见下表,默认为首页', id: '编号,可在对应专题/节目页 URL 中找到 topicId' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.now.com/'], + }, + name: '新聞', + maintainers: ['nczitzk'], + handler, + url: 'news.now.com/', + description: `:::tip + **编号** 仅对事件追蹤、評論節目、新聞專題三个分类起作用,例子如下: + + 对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123\&topicId=1056) 话题,其网址为 \`https://news.now.com/home/tracker/detail?catCode=123&topicId=1056\`,其中 \`topicId\` 为 1056,则对应路由为 [\`/now/news/tracker/1056\`](https://rsshub.app/now/news/tracker/1056) + ::: + + | 首頁 | 港聞 | 兩岸國際 | 娛樂 | + | ---- | ----- | ------------- | ------------- | + | | local | international | entertainment | + + | 生活 | 科技 | 財經 | 體育 | + | ---- | ---------- | ------- | ------ | + | life | technology | finance | sports | + + | 事件追蹤 | 評論節目 | 新聞專題 | + | -------- | -------- | -------- | + | tracker | feature | opinion |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || ''; const id = ctx.req.param('id') || ''; @@ -54,9 +94,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: String(Object.hasOwn(categories, category) ? $('title').text() : ($('.smallSpace.active').text() || '首頁') + ' | Now 新聞'), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/now/radar.ts b/lib/routes/now/radar.ts deleted file mode 100644 index 46e4b67cc..000000000 --- a/lib/routes/now/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'news.now.com': { - _name: 'Now 新聞', - '.': [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#now-xin-wen', - source: ['/'], - target: '/now/news/:category?/:id?', - }, - ], - }, -}; diff --git a/lib/routes/now/router.ts b/lib/routes/now/router.ts deleted file mode 100644 index ea7f3d6f3..000000000 --- a/lib/routes/now/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?/:id?', './news'); -}; diff --git a/lib/routes/nowcoder/discuss.ts b/lib/routes/nowcoder/discuss.ts index 2b85d3b87..58e5bedd7 100644 --- a/lib/routes/nowcoder/discuss.ts +++ b/lib/routes/nowcoder/discuss.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; const host = 'https://www.nowcoder.com'; -export default async (ctx) => { +export const route: Route = { + path: '/discuss/:type/:order', + categories: ['bbs'], + example: '/nowcoder/discuss/2/4', + parameters: { type: '讨论区分区id 在 URL 中可以找到', order: '排序方式' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '讨论区', + maintainers: ['LogicJake'], + handler, + description: `| 最新回复 | 最新发表 | 最新 | 精华 | + | -------- | -------- | ---- | ---- | + | 0 | 3 | 1 | 4 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const order = ctx.req.param('order'); @@ -50,9 +72,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${type_name}${order_name}——牛客网讨论区`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/nowcoder/experience.ts b/lib/routes/nowcoder/experience.ts index 4aa10bfd6..e2d92df56 100644 --- a/lib/routes/nowcoder/experience.ts +++ b/lib/routes/nowcoder/experience.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,35 @@ import timezone from '@/utils/timezone'; const host = 'https://www.nowcoder.com'; -export default async (ctx) => { +export const route: Route = { + path: '/experience/:tagId', + categories: ['bbs'], + example: '/nowcoder/experience/639?order=3&companyId=665&phaseId=0', + parameters: { tagId: '职位id [🔗查询链接](https://www.nowcoder.com/profile/all-jobs)复制打开' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nowcoder.com/'], + target: '/experience', + }, + name: '面经', + maintainers: ['huyyi'], + handler, + url: 'nowcoder.com/', + description: `可选参数: + + - companyId:公司 id,[🔗查询链接](https://www.nowcoder.com/discuss/tag/exp), 复制打开 + - order:3 - 最新;1 - 最热 + - phaseId:0 - 所有;1 - 校招;2 - 实习;3 - 社招`, +}; + +async function handler(ctx) { const params = new URLSearchParams(ctx.req.query()); params.append('tagId', ctx.req.param('tagId')); @@ -41,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `牛客面经Tag${ctx.req.param('tagId')}`, link: link.href, item: out, - }); -}; + }; +} diff --git a/lib/routes/nowcoder/jobcenter.ts b/lib/routes/nowcoder/jobcenter.ts index 743cdc3a4..e01fc32e2 100644 --- a/lib/routes/nowcoder/jobcenter.ts +++ b/lib/routes/nowcoder/jobcenter.ts @@ -1,9 +1,52 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import * as url from 'node:url'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/jobcenter/:recruitType?/:city?/:type?/:order?/:latest?', + categories: ['bbs'], + example: '/nowcoder/jobcenter/1/北京/1/1/true', + parameters: { + recruitType: '招聘分类,`1` 指 实习广场,`2` 指 社招广场,默认为 `1`', + city: '所在城市,可选城市见下表,若空则为 `全国`', + type: '职位类型,可选职位代码见下表,若空则为 `全部`', + order: '排序参数,可选排序参数代码见下表,若空则为 `默认`', + latest: '是否仅查看最近一周,可选 `true` 和 `false`,默认为 `false`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nowcoder.com/'], + target: '/jobcenter', + }, + name: '实习广场 & 社招广场', + maintainers: ['nczitzk'], + handler, + url: 'nowcoder.com/', + description: `可选城市有:北京、上海、广州、深圳、杭州、南京、成都、厦门、武汉、西安、长沙、哈尔滨、合肥、其他 + + 职位类型代码见下表: + + | 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | + + 排序参数见下表: + + | 最新发布 | 最快处理 | 处理率最高 | + | -------- | -------- | ---------- | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const rootUrl = `https://www.nowcoder.com/job/center/`; const currentUrl = `${rootUrl}?${ctx.req.param('type') ? 'type=' + ctx.req.param('type') : ''}${ctx.req.param('city') ? '&city=' + ctx.req.param('city') : ''}${ctx.req.param('order') ? '&order=' + ctx.req.param('order') : ''}${ ctx.req.param('recruitType') ? '&recruitType=' + ctx.req.param('recruitType') : '' @@ -50,9 +93,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${ctx.req.param('recruitType') ? (ctx.req.param('recruitType') === '2' ? '社招广场' : '实习广场') : '实习广场'} - 牛客网`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nowcoder/maintainer.ts b/lib/routes/nowcoder/maintainer.ts deleted file mode 100644 index de0a64a52..000000000 --- a/lib/routes/nowcoder/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/discuss/:type/:order': ['LogicJake'], - '/experience/:tagId': ['huyyi'], - '/jobcenter/:recruitType?/:city?/:type?/:order?/:latest?': ['nczitzk'], - '/recommend': ['junfengP'], - '/schedule/:propertyId?/:typeId?': ['junfengP'], -}; diff --git a/lib/routes/nowcoder/namespace.ts b/lib/routes/nowcoder/namespace.ts new file mode 100644 index 000000000..bf41b34e7 --- /dev/null +++ b/lib/routes/nowcoder/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '牛客网', + url: 'nowcoder.com', +}; diff --git a/lib/routes/nowcoder/radar.ts b/lib/routes/nowcoder/radar.ts deleted file mode 100644 index c78c1a40e..000000000 --- a/lib/routes/nowcoder/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - 'nowcoder.com': { - _name: '牛客网', - '.': [ - { - title: '面经', - docs: 'https://docs.rsshub.app/routes/bbs#niu-ke-wang-mian-jing', - source: ['/'], - target: '/nowcoder/experience', - }, - { - title: '讨论区', - docs: 'https://docs.rsshub.app/routes/bbs#niu-ke-wang', - source: ['/discuss'], - target: (_params, url) => { - const href = new URL(url); - return `/nowcoder/${href.searchParams.get('type')}/${href.searchParams.get('order')}`; - }, - }, - { - title: '实习广场 & 社招广场', - docs: 'https://docs.rsshub.app/routes/bbs#niu-ke-wang', - source: ['/'], - target: '/nowcoder/jobcenter', - }, - { - title: '校招日程', - docs: 'https://docs.rsshub.app/routes/bbs#niu-ke-wang', - source: ['/'], - target: '/nowcoder/schedule', - }, - { - title: '求职推荐', - docs: 'https://docs.rsshub.app/routes/bbs#niu-ke-wang', - source: ['/'], - target: '/nowcoder/recommend', - }, - ], - }, -}; diff --git a/lib/routes/nowcoder/recommend.ts b/lib/routes/nowcoder/recommend.ts index 5cc704c12..aa0f17522 100644 --- a/lib/routes/nowcoder/recommend.ts +++ b/lib/routes/nowcoder/recommend.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/recommend', + categories: ['bbs'], + example: '/nowcoder/recommend', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nowcoder.com/'], + }, + name: '求职推荐', + maintainers: ['junfengP'], + handler, + url: 'nowcoder.com/', +}; + +async function handler() { const link = `https://www.nowcoder.com/recommand/activity?token=&type=3&_=${Date.now()}`; const responseBody = (await got.get(link)).data; if (responseBody.code !== 0) { throw new Error(`接口错误,错误代码:${responseBody.code},错误原因:${responseBody.msg}`); } const data = responseBody.data.activitys; - ctx.set('data', { + return { title: '牛客网-推荐', link: 'https://www.nowcoder.com/recommend', description: '牛客网-推荐', @@ -16,5 +39,5 @@ export default async (ctx) => { description: ``, link: `https://www.nowcoder.com${item.url}`, })), - }); -}; + }; +} diff --git a/lib/routes/nowcoder/router.ts b/lib/routes/nowcoder/router.ts deleted file mode 100644 index 4568984b0..000000000 --- a/lib/routes/nowcoder/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/discuss/:type/:order', './discuss'); - router.get('/experience/:tagId', './experience'); - router.get('/jobcenter/:recruitType?/:city?/:type?/:order?/:latest?', './jobcenter'); - router.get('/recommend', './recommend'); - router.get('/schedule/:propertyId?/:typeId?', './schedule'); -}; diff --git a/lib/routes/nowcoder/schedule.ts b/lib/routes/nowcoder/schedule.ts index 5e2ff6836..3c86902ed 100644 --- a/lib/routes/nowcoder/schedule.ts +++ b/lib/routes/nowcoder/schedule.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/schedule/:propertyId?/:typeId?', + categories: ['bbs'], + example: '/nowcoder/schedule', + parameters: { propertyId: '行业, 在控制台中抓取接口,可获得行业id,默认0', typeId: '类别,同上' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nowcoder.com/'], + target: '/schedule', + }, + name: '校招日程', + maintainers: ['junfengP'], + handler, + url: 'nowcoder.com/', +}; + +async function handler(ctx) { const propertyId = ctx.req.param('propertyId') ?? 0; const typeId = ctx.req.param('typeId') ?? 0; @@ -12,7 +36,7 @@ export default async (ctx) => { } const data = responseBody.data.companyList; - ctx.set('data', { + return { title: '名企校招日程', link: 'https://www.nowcoder.com/school/schedule', description: '名企校招日程', @@ -28,5 +52,5 @@ export default async (ctx) => { link: `https://www.nowcoder.com/school/schedule/${item.id}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/npm/maintainer.ts b/lib/routes/npm/maintainer.ts deleted file mode 100644 index e480453ab..000000000 --- a/lib/routes/npm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/package/:name': ['Fatpandac'], -}; diff --git a/lib/routes/npm/namespace.ts b/lib/routes/npm/namespace.ts new file mode 100644 index 000000000..f4b4fc058 --- /dev/null +++ b/lib/routes/npm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'NPM', + url: 'npmjs.com', +}; diff --git a/lib/routes/npm/package.ts b/lib/routes/npm/package.ts index 3dbc597a4..b9df3b328 100644 --- a/lib/routes/npm/package.ts +++ b/lib/routes/npm/package.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,14 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: 'package/:name{(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const packageDownloadLastMonthAPI = `https://api.npmjs.org/downloads/point/last-month/${name}`; // 按月统计 const packageDownloadLastWeekAPI = `https://api.npmjs.org/downloads/point/last-week/${name}`; // 按周统计 @@ -25,7 +33,7 @@ export default async (ctx) => { })) .toReversed(); - ctx.set('data', { + return { title: `${name} - npm`, link: `https://www.npmjs.com/package/${name}`, description: `${name} - npm`, @@ -42,5 +50,5 @@ export default async (ctx) => { guid: `https://www.npmjs.com/package/${name}${packageVersion.modified}`, }, ], - }); -}; + }; +} diff --git a/lib/routes/npm/radar.ts b/lib/routes/npm/radar.ts deleted file mode 100644 index 09b24d7f6..000000000 --- a/lib/routes/npm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'npmjs.com': { - _name: 'npm', - '.': [ - { - title: '包', - docs: 'https://docs.rsshub.app/routes/program-update#npm', - source: ['/package/:name'], - target: '/npm/package/:name', - }, - ], - }, -}; diff --git a/lib/routes/npm/router.ts b/lib/routes/npm/router.ts deleted file mode 100644 index 0b04076bb..000000000 --- a/lib/routes/npm/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - // https://github.com/dword-design/package-name-regex/blob/master/src/index.js - router.get('package/:name{(@[a-z0-9-~][a-z0-9-._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*}', './package'); -}; diff --git a/lib/routes/npr/full.ts b/lib/routes/npr/full.ts index 3b6c5f1c3..2114d9459 100644 --- a/lib/routes/npr/full.ts +++ b/lib/routes/npr/full.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import got from '@/utils/got'; @@ -58,7 +59,26 @@ const getArticleDetail = (link) => return { article, categories }; }); -export default async (ctx) => { +export const route: Route = { + path: '/:endpoint?', + categories: ['traditional-media'], + example: '/npr/1001', + parameters: { endpoint: 'Channel ID, can be found in Official RSS URL, `1001` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['bennyyip'], + handler, + description: `Provide full article RSS for CBC topics.`, +}; + +async function handler(ctx) { const endpoint = ctx.req.param('endpoint') || '1001'; const feed = await parser.parseURL(`https://feeds.npr.org/${endpoint}/rss.xml`); @@ -78,11 +98,11 @@ export default async (ctx) => { ) ).filter(Boolean); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, icon: 'https://media.npr.org/images/podcasts/primary/npr_generic_image_300.jpg?s=200', item: items, - }); -}; + }; +} diff --git a/lib/routes/npr/maintainer.ts b/lib/routes/npr/maintainer.ts deleted file mode 100644 index cc2638b51..000000000 --- a/lib/routes/npr/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:endpoint?': ['bennyyip'], -}; diff --git a/lib/routes/npr/namespace.ts b/lib/routes/npr/namespace.ts new file mode 100644 index 000000000..c996fcb0a --- /dev/null +++ b/lib/routes/npr/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'National Public Radio', + url: 'npr.org', +}; diff --git a/lib/routes/npr/radar.ts b/lib/routes/npr/radar.ts deleted file mode 100644 index 828b72846..000000000 --- a/lib/routes/npr/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'npr.org': { - _name: 'National Public Radio', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#npr', - }, - ], - }, -}; diff --git a/lib/routes/npr/router.ts b/lib/routes/npr/router.ts deleted file mode 100644 index da2caff13..000000000 --- a/lib/routes/npr/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:endpoint?', './full'); -}; diff --git a/lib/routes/ntdtv/channel.ts b/lib/routes/ntdtv/channel.ts index 8aff1a5f9..a356327f3 100644 --- a/lib/routes/ntdtv/channel.ts +++ b/lib/routes/ntdtv/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,31 @@ import timezone from '@/utils/timezone'; const host = 'https://www.ntdtv.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:language/:id', + categories: ['traditional-media'], + example: '/ntdtv/b5/prog1201', + parameters: { language: '语言,简体为`gb`,繁体为`b5`', id: '子频道名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ntdtv.com/:language/:id'], + }, + name: '频道', + maintainers: ['Fatpandac'], + handler, + description: `参数均可在官网获取,如: + + \`https://www.ntdtv.com/b5/prog1201\` 对应 \`/ntdtv/b5/prog1201\``, +}; + +async function handler(ctx) { const language = ctx.req.param('language'); const id = ctx.req.param('id'); const url = `${host}/${language}/${id}`; @@ -37,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `新唐人电视台 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/ntdtv/maintainer.ts b/lib/routes/ntdtv/maintainer.ts deleted file mode 100644 index 94ac4e0ac..000000000 --- a/lib/routes/ntdtv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language/:id': ['Fatpandac'], -}; diff --git a/lib/routes/ntdtv/namespace.ts b/lib/routes/ntdtv/namespace.ts new file mode 100644 index 000000000..deff9f98c --- /dev/null +++ b/lib/routes/ntdtv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新唐人电视台', + url: 'www.ntdtv.com', +}; diff --git a/lib/routes/ntdtv/radar.ts b/lib/routes/ntdtv/radar.ts deleted file mode 100644 index abc2d3b2a..000000000 --- a/lib/routes/ntdtv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ntdtv.com': { - _name: '新唐人电视台', - www: [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-tang-ren-dian-shi-tai', - source: '/:language/:id', - target: '/ntdtv/:language/:id', - }, - ], - }, -}; diff --git a/lib/routes/ntdtv/router.ts b/lib/routes/ntdtv/router.ts deleted file mode 100644 index 5c218bb8b..000000000 --- a/lib/routes/ntdtv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language/:id', './channel'); -}; diff --git a/lib/routes/nua/dc.ts b/lib/routes/nua/dc.ts index d0db9ac0d..21befa70e 100644 --- a/lib/routes/nua/dc.ts +++ b/lib/routes/nua/dc.ts @@ -1,6 +1,36 @@ +import { Route } from '@/types'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/dc/:type', + categories: ['university'], + example: '/nua/dc/news', + parameters: { type: 'News Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dc.nua.edu.cn/:type/list.htm'], + }, + name: 'School of Design', + maintainers: ['evnydd0sf'], + handler, + description: `| News Type | Parameters | + | ------------------------ | ---------- | + | 学院新闻 NEWS | news | + | 展览 EXHIBITION | exhibition | + | 研创 RESEARCH & CREATION | rc | + | 项目 PROJECT | project | + | 党团 PARTY | party | + | 后浪 YOUTH | youth |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const baseUrl = 'https://dc.nua.edu.cn'; @@ -54,10 +84,10 @@ export default async (ctx) => { const items = await util.ProcessList(baseUrl, baseUrl, listName, listDate, webPageName); const results = await util.ProcessFeed(items[0], artiContent); - ctx.set('data', { + return { title: 'NUA-设计学院-' + items[1], link: baseUrl, description: '南京艺术学院 设计学院 ' + items[1], item: results, - }); -}; + }; +} diff --git a/lib/routes/nua/gra.ts b/lib/routes/nua/gra.ts index 8920d4c0c..e314be6c4 100644 --- a/lib/routes/nua/gra.ts +++ b/lib/routes/nua/gra.ts @@ -1,7 +1,34 @@ +import { Route } from '@/types'; import util from './utils'; const baseUrl = 'https://grad.nua.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gra/:type', + categories: ['university'], + example: '/nua/gra/1959', + parameters: { type: 'News Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['grad.nua.edu.cn/:type/list.htm'], + }, + name: 'Graduate Institute', + maintainers: ['evnydd0sf'], + handler, + description: `| News Type | Parameters | + | --------- | ---------- | + | 招生工作 | 1959 | + | 培养工作 | 1962 | + | 学位工作 | 1958 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const newsUrl = `${baseUrl}/${type}/list.htm`; const listName = 'li.list_item'; @@ -12,10 +39,10 @@ export default async (ctx) => { const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName); const results = await util.ProcessFeed(items[0], artiContent); - ctx.set('data', { + return { title: 'NUA-研究生处-' + items[1], link: `${baseUrl}/${type}/list.htm`, description: '南京艺术学院 研究生处 ' + items[1], item: results, - }); -}; + }; +} diff --git a/lib/routes/nua/index.ts b/lib/routes/nua/index.ts index 2b2ccda47..73ed98663 100644 --- a/lib/routes/nua/index.ts +++ b/lib/routes/nua/index.ts @@ -1,6 +1,32 @@ +import { Route } from '@/types'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/index/:type', + categories: ['university'], + example: '/nua/index/346', + parameters: { type: 'News Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['index.nua.edu.cn/:type/list.htm'], + }, + name: 'Official Information', + maintainers: ['evnydd0sf'], + handler, + description: `| News Type | Parameters | + | --------- | ---------- | + | 公告 | 346 | + | 南艺要闻 | 332 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const baseUrl = 'https://www.nua.edu.cn'; @@ -13,10 +39,10 @@ export default async (ctx) => { const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName); const results = await util.ProcessFeed(items[0], artiContent); - ctx.set('data', { + return { title: 'NUA-' + items[1], link: newsUrl, description: '南京艺术学院 ' + items[1], item: results, - }); -}; + }; +} diff --git a/lib/routes/nua/lib.ts b/lib/routes/nua/lib.ts index 0f6c14561..ac791f52a 100644 --- a/lib/routes/nua/lib.ts +++ b/lib/routes/nua/lib.ts @@ -1,7 +1,35 @@ +import { Route } from '@/types'; import util from './utils'; const baseUrl = 'https://lib.nua.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/lib/:type', + categories: ['university'], + example: '/nua/lib/xwdt', + parameters: { type: 'News Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lib.nua.edu.cn/:type/list.htm'], + }, + name: 'Library', + maintainers: ['evnydd0sf'], + handler, + description: `| News Type | Parameters | + | --------- | ---------- | + | 新闻动态 | xwdt | + | 党建动态 | djdt | + | 资源动态 | zydt | + | 服务动态 | fwdt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let webPageName; @@ -30,10 +58,10 @@ export default async (ctx) => { const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName); const results = await util.ProcessFeed(items[0], artiContent); - ctx.set('data', { + return { title: 'NUA-图书馆-' + items[1], link: `${baseUrl}/${type}/list.htm`, description: '南京艺术学院 图书馆 ' + items[1], item: results, - }); -}; + }; +} diff --git a/lib/routes/nua/maintainer.ts b/lib/routes/nua/maintainer.ts deleted file mode 100644 index 45135475a..000000000 --- a/lib/routes/nua/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/dc/:type': ['evnydd0sf'], - '/gra/:type': ['evnydd0sf'], - '/index/:type': ['evnydd0sf'], - '/lib/:type': ['evnydd0sf'], - '/sxw/:type': ['evnydd0sf'], -}; diff --git a/lib/routes/nua/namespace.ts b/lib/routes/nua/namespace.ts new file mode 100644 index 000000000..cab64c211 --- /dev/null +++ b/lib/routes/nua/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Nanjing University of the Arts 南京艺术学院', + url: 'index.nua.edu.cn', +}; diff --git a/lib/routes/nua/radar.ts b/lib/routes/nua/radar.ts deleted file mode 100644 index cde1138c3..000000000 --- a/lib/routes/nua/radar.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - 'nua.edu.cn': { - _name: '南京艺术学院', - index: [ - { - title: '官网信息', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-yi-shu-xue-yuan', - source: ['/:type/list.htm'], - target: '/nua/index/:type', - }, - ], - sxw: [ - { - title: '双馨网', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-yi-shu-xue-yuan', - source: ['/:type/list.htm'], - target: '/nua/sxw/:type', - }, - ], - dc: [ - { - title: '设计学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-yi-shu-xue-yuan', - source: ['/:type/list.htm'], - target: '/nua/dc/:type', - }, - ], - grad: [ - { - title: '研究生处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-yi-shu-xue-yuan', - source: ['/:type/list.htm'], - target: '/nua/gra/:type', - }, - ], - lib: [ - { - title: '图书馆', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-yi-shu-xue-yuan', - source: ['/:type/list.htm'], - target: '/nua/lib/:type', - }, - ], - }, -}; diff --git a/lib/routes/nua/router.ts b/lib/routes/nua/router.ts deleted file mode 100644 index f1e32b9db..000000000 --- a/lib/routes/nua/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/dc/:type', './dc'); - router.get('/gra/:type', './gra'); - router.get('/index/:type', './index'); - router.get('/lib/:type', './lib'); - router.get('/sxw/:type', './sxw'); -}; diff --git a/lib/routes/nua/sxw.ts b/lib/routes/nua/sxw.ts index fd6d5a163..9bd3431e3 100644 --- a/lib/routes/nua/sxw.ts +++ b/lib/routes/nua/sxw.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import util from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/sxw/:type', + categories: ['university'], + example: '/nua/sxw/230', + parameters: { type: 'News Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sxw.nua.edu.cn/:type/list.htm'], + }, + name: 'Shuangxing Information', + maintainers: ['evnydd0sf'], + handler, + description: `| News Type | Parameters | + | --------- | ---------- | + | 校园电视 | 230 | + | 院部动态 | 232 | + | 动感校园 | 233 | + | 招就指南 | 234 | + | 南艺院报 | 236 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const baseUrl = 'https://sxw.nua.edu.cn'; @@ -13,10 +42,10 @@ export default async (ctx) => { const items = await util.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName); const results = await util.ProcessFeed(items[0], artiContent); - ctx.set('data', { + return { title: 'NUA-双馨网-' + items[1], link: newsUrl, description: '南京艺术学院 双馨网 ' + items[1], item: results, - }); -}; + }; +} diff --git a/lib/routes/nuaa/college/cae.ts b/lib/routes/nuaa/college/cae.ts index f0f5a51ea..4340975d4 100644 --- a/lib/routes/nuaa/college/cae.ts +++ b/lib/routes/nuaa/college/cae.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -17,7 +18,14 @@ const map = new Map([ ['dbgg', { title: '答辩公告 | 南京航空航天大学自动化学院', suffix: 'dbgg/list.htm' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/cae/:type/:getDescription?', + name: 'Unknown', + maintainers: ['Xm798'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const suffix = map.get(type).suffix; const getDescription = Boolean(ctx.req.param('getDescription')) || false; @@ -71,10 +79,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: map.get(type).title, link, description: '南京航空航天大学自动化学院RSS', item: out, - }); -}; + }; +} diff --git a/lib/routes/nuaa/college/cs.ts b/lib/routes/nuaa/college/cs.ts index cfe4731b2..bb521288c 100644 --- a/lib/routes/nuaa/college/cs.ts +++ b/lib/routes/nuaa/college/cs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,28 @@ const map = new Map([ ['xsgz', { title: '学生工作 | 南京航空航天大学计算机科学与技术学院', suffix: '1959/list.htm' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/cs/:type/:getDescription?', + categories: ['university'], + example: '/nuaa/cs/jxdt', + parameters: { type: '分类名,见下表', getDescription: '是否获取全文' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机科学与技术学院', + maintainers: ['LogicJake', 'Seiry', 'qrzbing', 'Xm798'], + handler, + description: `| 通知公告 | 热点新闻 | 学科科研 | 教学动态 | 本科生培养 | 研究生培养 | 学生工作 | + | -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | + | tzgg | rdxw | xkky | jxdt | be | me | xsgz |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const getDescription = Boolean(ctx.req.param('getDescription')) || false; const suffix = map.get(type).suffix; @@ -70,10 +92,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: map.get(type).title, link, description: '南京航空航天大学计算机科学与技术学院RSS', item: out, - }); -}; + }; +} diff --git a/lib/routes/nuaa/jwc/jwc.ts b/lib/routes/nuaa/jwc/jwc.ts index 7bd79335d..459e455e8 100644 --- a/lib/routes/nuaa/jwc/jwc.ts +++ b/lib/routes/nuaa/jwc/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -13,7 +14,28 @@ const map = new Map([ ['jxzy', { title: '教学资源 | 南京航空航天大学教务处', suffix: '8233/list.htm' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type/:getDescription?', + categories: ['university'], + example: '/nuaa/jwc/tzgg/getDescription', + parameters: { type: '分类名,见下表', getDescription: '是否获取全文' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['arcosx', 'Seiry', 'qrzbing', 'Xm798'], + handler, + description: `| 通知公告 | 教学服务 | 教学建设 | 学生培养 | 教学资源 | + | -------- | -------- | -------- | -------- | -------- | + | tzgg | jxfw | jxjs | xspy | jxzy |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const suffix = map.get(type).suffix; const getDescription = Boolean(ctx.req.param('getDescription')) || false; @@ -68,10 +90,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: map.get(type).title, link, description: '南京航空航天大学教务处RSS', item: out, - }); -}; + }; +} diff --git a/lib/routes/nuaa/maintainer.ts b/lib/routes/nuaa/maintainer.ts deleted file mode 100644 index 4702210bd..000000000 --- a/lib/routes/nuaa/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cae/:type/:getDescription?': ['Xm798'], - '/cs/:type/:getDescription?': ['LogicJake', 'Seiry', 'qrzbing', 'Xm798'], - '/jwc/:type/:getDescription?': ['arcosx', 'Seiry', 'qrzbing', 'Xm798'], - '/yjsy/:type/:getDescription?': ['junfengP', 'Seiry', 'Xm798'], -}; diff --git a/lib/routes/nuaa/namespace.ts b/lib/routes/nuaa/namespace.ts new file mode 100644 index 000000000..cbdc87595 --- /dev/null +++ b/lib/routes/nuaa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京航空航天大学', + url: 'aao.nuaa.edu.cn', +}; diff --git a/lib/routes/nuaa/radar.ts b/lib/routes/nuaa/radar.ts deleted file mode 100644 index 4033da5cd..000000000 --- a/lib/routes/nuaa/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'nuaa.edu.cn': { - _name: '南京航空航天大学', - aao: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-hang-kong-hang-tian-da-xue', - }, - ], - cae: [ - { - title: '自动化学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-hang-kong-hang-tian-da-xue', - }, - ], - cs: [ - { - title: '计算机科学与技术学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-hang-kong-hang-tian-da-xue', - }, - ], - 'www.graduate': [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-hang-kong-hang-tian-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/nuaa/router.ts b/lib/routes/nuaa/router.ts deleted file mode 100644 index 1671cc9ff..000000000 --- a/lib/routes/nuaa/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cae/:type/:getDescription?', './college/cae'); - router.get('/cs/:type/:getDescription?', './college/cs'); - router.get('/jwc/:type/:getDescription?', './jwc/jwc'); - router.get('/yjsy/:type/:getDescription?', './yjsy/yjsy'); -}; diff --git a/lib/routes/nuaa/yjsy/yjsy.ts b/lib/routes/nuaa/yjsy/yjsy.ts index e2fa4b759..0275aa9af 100644 --- a/lib/routes/nuaa/yjsy/yjsy.ts +++ b/lib/routes/nuaa/yjsy/yjsy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,28 @@ const map = new Map([ ['ssfc', { title: '师生风采 | 南京航空航天大学研究生院', suffix: '13278/list.htm' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/:type/:getDescription?', + categories: ['university'], + example: '/nuaa/yjsy/tzgg/getDescription', + parameters: { type: '分类名,见下表', getDescription: '是否获取全文' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生院', + maintainers: ['junfengP', 'Seiry', 'Xm798'], + handler, + description: `| 通知公告 | 新闻动态 | 学术信息 | 师生风采 | + | -------- | -------- | -------- | -------- | + | tzgg | xwdt | xsxx | ssfc |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const suffix = map.get(type).suffix; const getDescription = Boolean(ctx.req.param('getDescription')) || false; @@ -66,10 +88,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: map.get(type).title, link, description: '南京航空航天大学研究生院RSS', item: out, - }); -}; + }; +} diff --git a/lib/routes/nuist/bulletin.ts b/lib/routes/nuist/bulletin.ts index bc787602c..e328a8107 100644 --- a/lib/routes/nuist/bulletin.ts +++ b/lib/routes/nuist/bulletin.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -21,7 +22,40 @@ const map = { qt: '其他', }; -export default async (ctx) => { +export const route: Route = { + path: '/bulletin/:category?', + categories: ['university'], + example: '/nuist/bulletin/791', + parameters: { category: '默认为 `791`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bulletin.nuist.edu.cn/:category/list.htm'], + target: '/bulletin/:category', + }, + name: '南信大信息公告栏', + maintainers: ['gylidian'], + handler, + description: `| 全部 | 文件公告 | 学术报告 | 招标信息 | 会议通知 | 党政事务 | 组织人事 | + | ---- | -------- | -------- | -------- | -------- | -------- | -------- | + | 791 | 792 | xsbgw | 779 | 780 | 781 | 782 | + + | 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 | + | -------- | -------- | -------- | -------- | -------- | -------- | ---- | + | 783 | 784 | 785 | 786 | 788 | 789 | qt | + + :::warning + 全文内容需使用 校园网或[VPN](http://vpn.nuist.edu.cn) 获取 + :::`, +}; + +async function handler(ctx) { const category = Object.hasOwn(map, ctx.req.param('category')) ? ctx.req.param('category') : '791'; const link = `${baseUrl}/${category}/list.htm`; @@ -29,7 +63,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('.news_list').find('.news'); - ctx.set('data', { + return { title: baseTitle + (category === '791' ? '' : ':' + map[category]), link, item: list @@ -57,5 +91,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/nuist/cas.ts b/lib/routes/nuist/cas.ts index 83a87bd24..835f8c74c 100644 --- a/lib/routes/nuist/cas.ts +++ b/lib/routes/nuist/cas.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,28 @@ import timezone from '@/utils/timezone'; const baseTitle = 'NUIST AS(南信大大气科学学院)'; const baseUrl = 'https://cas.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/cas/:category?', + categories: ['university'], + example: '/nuist/cas/xxgg', + parameters: { category: '默认为信息公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'NUIST AS(南信大大气科学学院)', + maintainers: ['gylidian'], + handler, + description: `| 信息公告 | 新闻快讯 | 科学研究 | 网上公示 | 本科教育 | 研究生教育 | + | -------- | -------- | -------- | -------- | -------- | ---------- | + | xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy |`, +}; + +async function handler(ctx) { const { category = 'xxgg' } = ctx.req.param(); const link = `${baseUrl}/index/${category}.htm`; @@ -63,10 +85,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle + ':' + $('.dqlm').find('a').eq(1).text(), description: $('meta[name=description]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nuist/jwc.ts b/lib/routes/nuist/jwc.ts index bfafdb4b4..be2550c62 100644 --- a/lib/routes/nuist/jwc.ts +++ b/lib/routes/nuist/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = '南京信息工程大学-教务处'; const baseUrl = 'https://jwc.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:category?', + categories: ['university'], + example: '/nuist/jwc/jxyw', + parameters: { category: '默认为教学要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['gylidian'], + handler, + description: `| 教学要闻 | 学院教学 | 教务管理 | 教学研究 | 教务管理 | 教材建设 | 考试中心 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx |`, +}; + +async function handler(ctx) { const { category = 'jxyw' } = ctx.req.param(); const link = `${baseUrl}/${category === 'jxyw' || category === 'xyjx' ? 'index' : 'xxtz'}/${category}.htm`; @@ -36,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle + ':' + $('.dqwz').find('a').eq(1).text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nuist/library/lib.ts b/lib/routes/nuist/library/lib.ts index 9585dba88..ae078fba1 100644 --- a/lib/routes/nuist/library/lib.ts +++ b/lib/routes/nuist/library/lib.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,18 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = '南京信息工程大学图书馆通知'; const baseUrl = 'https://lib.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/lib', + radar: { + source: ['lib.nuist.edu.cn/', 'lib.nuist.edu.cn/index/tzgg.htm'], + }, + name: 'Unknown', + maintainers: ['gylidian'], + handler, + url: 'lib.nuist.edu.cn/', +}; + +async function handler() { const link = baseUrl + '/index/tzgg.htm'; const response = await got(link); @@ -36,9 +48,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nuist/maintainer.ts b/lib/routes/nuist/maintainer.ts deleted file mode 100644 index 5b9a24b29..000000000 --- a/lib/routes/nuist/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/bulletin/:category?': ['gylidian'], - '/cas/:category?': ['gylidian'], - '/jwc/:category?': ['gylidian'], - '/lib': ['gylidian'], - '/scs/:category?': ['gylidian'], - '/sese/:category?': ['gylidian'], - '/xgc': ['gylidian'], - '/yjs/:path+': ['gylidian', 'nczitzk'], -}; diff --git a/lib/routes/nuist/namespace.ts b/lib/routes/nuist/namespace.ts new file mode 100644 index 000000000..0b77a2e99 --- /dev/null +++ b/lib/routes/nuist/namespace.ts @@ -0,0 +1,19 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南京信息工程大学', + url: 'bulletin.nuist.edu.cn', + description: `:::tip +路由地址全部按照 **学校官网域名和栏目编号** 设计 + +使用方法: + +以[南信大信息公告栏](https://bulletin.nuist.edu.cn)为例,点开任意一个栏目 + +获得 URL 中的**分域名**和**栏目编号(可选)**:https\://\`bulletin\`.nuist.edu.cn/\`791\`/list.htm + +将其替换到 RSS 路由地址中即可: + +[https://rsshub.app/**nuist**/\`bulletin\`](https://rsshub.app/nuist/bulletin) 或 [https://rsshub.app/**nuist**/\`bulletin\`/\`791\`](https://rsshub.app/nuist/bulletin) +:::`, +}; diff --git a/lib/routes/nuist/radar.ts b/lib/routes/nuist/radar.ts deleted file mode 100644 index a8da2ef17..000000000 --- a/lib/routes/nuist/radar.ts +++ /dev/null @@ -1,69 +0,0 @@ -export default { - 'nuist.edu.cn': { - _name: '南京信息工程大学', - bulletin: [ - { - title: '信息公告栏', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/:category/list.htm'], - target: '/nuist/bulletin/:category', - }, - ], - cas: [ - { - title: '大气科学学院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/index/:category'], - target: (params) => `/nuist/cas/${params.category.replace('.htm', '')}`, - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/index/:category', '/xxtz/:category'], - target: (params) => `/nuist/jwc/${params.category.replace('.htm', '')}`, - }, - ], - lib: [ - { - title: '图书馆', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/', '/index/tzgg.htm'], - target: '/nuist/lib', - }, - ], - scs: [ - { - title: '计软院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/:category/list.htm'], - target: '/nuist/scs/:category', - }, - ], - sese: [ - { - title: '环科院', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/:category'], - target: (params) => `/nuist/sese/${params.category.replace('.htm', '')}`, - }, - ], - xgc: [ - { - title: '学生工作处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/', '/419/list.htm'], - target: '/nuist/xgc', - }, - ], - yjs: [ - { - title: '研究生院学科建设处', - docs: 'https://docs.rsshub.app/routes/university#nan-jing-xin-xi-gong-cheng-da-xue', - source: ['/'], - target: '/nuist/jwc/:path+', - }, - ], - }, -}; diff --git a/lib/routes/nuist/router.ts b/lib/routes/nuist/router.ts deleted file mode 100644 index 17187c37e..000000000 --- a/lib/routes/nuist/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/bulletin/:category?', './bulletin'); - router.get('/cas/:category?', './cas'); - router.get('/jwc/:category?', './jwc'); - router.get('/lib', './library/lib'); - router.get('/scs/:category?', './scs'); - router.get('/sese/:category?', './sese'); - router.get('/xgc', './xgc'); - router.get('/yjs/*', './yjs'); -}; diff --git a/lib/routes/nuist/scs.ts b/lib/routes/nuist/scs.ts index b4744aa80..74599c3f0 100644 --- a/lib/routes/nuist/scs.ts +++ b/lib/routes/nuist/scs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,32 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = 'NUIST CS(南信大计软院)'; const baseUrl = 'https://scs.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/scs/:category?', + categories: ['university'], + example: '/nuist/scs/xwkx', + parameters: { category: '默认为新闻快讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scs.nuist.edu.cn/:category/list.htm'], + target: '/scs/:category', + }, + name: 'NUIST CS(南信大计软院)', + maintainers: ['gylidian'], + handler, + description: `| 新闻快讯 | 通知公告 | 教务信息 | 科研动态 | 学子风采 | + | -------- | -------- | -------- | -------- | -------- | + | xwkx | tzgg | jwxx | kydt | xzfc |`, +}; + +async function handler(ctx) { const { category = 'xwkx' } = ctx.req.param(); const link = `${baseUrl}/${category}/list.htm`; @@ -41,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle + ':' + $('head title').text(), description: $('meta[name=description]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nuist/sese.ts b/lib/routes/nuist/sese.ts index aa0b759f0..8915e7d93 100644 --- a/lib/routes/nuist/sese.ts +++ b/lib/routes/nuist/sese.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = 'NUIST ESE(南信大环科院)'; const baseUrl = 'https://sese.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/sese/:category?', + categories: ['university'], + example: '/nuist/sese/tzgg1', + parameters: { category: '默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'NUIST ESE(南信大环科院)', + maintainers: ['gylidian'], + handler, + description: `| 通知公告 | 新闻快讯 | 学术动态 | 学生工作 | 研究生教育 | 本科教育 | + | -------- | -------- | -------- | -------- | ---------- | -------- | + | tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 |`, +}; + +async function handler(ctx) { const { category = 'tzgg1' } = ctx.req.param(); const link = `${baseUrl}/${category}.htm`; @@ -37,10 +59,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle + ':' + $('.lmtitle').text(), description: $('meta[name=description]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/nuist/xgc.ts b/lib/routes/nuist/xgc.ts index ba30f0181..dbb513177 100644 --- a/lib/routes/nuist/xgc.ts +++ b/lib/routes/nuist/xgc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = '南信大学生工作处'; const baseUrl = 'https://xgc.nuist.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/xgc', + categories: ['university'], + example: '/nuist/xgc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xgc.nuist.edu.cn/', 'xgc.nuist.edu.cn/419/list.htm'], + }, + name: '南信大学生工作处', + maintainers: ['gylidian'], + handler, + url: 'xgc.nuist.edu.cn/', +}; + +async function handler() { const link = baseUrl + '/419/list.htm'; const response = await got(link); @@ -42,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: baseTitle, link, item: items.filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/nuist/yjs.ts b/lib/routes/nuist/yjs.ts index 5ee986836..c3306fc48 100644 --- a/lib/routes/nuist/yjs.ts +++ b/lib/routes/nuist/yjs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = getSubPath(ctx) === '/yjs/' ? 'index/tzgg' : getSubPath(ctx).replace(/^\/yjs\//, ''); const rootUrl = 'https://yjs.nuist.edu.cn'; @@ -54,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nwafu/all.ts b/lib/routes/nwafu/all.ts index d996e6b9f..4bf13ada0 100644 --- a/lib/routes/nwafu/all.ts +++ b/lib/routes/nwafu/all.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { nwafuMap } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['university'], + example: '/nwafu/lib', + parameters: { type: '默认为 `jiaowu`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '校园要闻', + maintainers: ['karinido'], + handler, + description: `通知类别 + + | 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 | + | ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ | + | lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm |`, +}; + +async function handler(ctx) { const { type = 'jiaowu' } = ctx.req.param(); const response = await got.get(nwafuMap.get(type)[0]); const $ = load(response.data); @@ -35,10 +59,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: nwafuMap.get(type)[4], link: nwafuMap.get(type)[0], description: nwafuMap.get(type)[4], item: out, - }); -}; + }; +} diff --git a/lib/routes/nwafu/maintainer.ts b/lib/routes/nwafu/maintainer.ts deleted file mode 100644 index 5e0921ffe..000000000 --- a/lib/routes/nwafu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['karinido'], -}; diff --git a/lib/routes/nwafu/namespace.ts b/lib/routes/nwafu/namespace.ts new file mode 100644 index 000000000..11372b744 --- /dev/null +++ b/lib/routes/nwafu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西北农林科技大学', + url: 'nwafu.edu.cn', +}; diff --git a/lib/routes/nwafu/radar.ts b/lib/routes/nwafu/radar.ts deleted file mode 100644 index 3b8795a77..000000000 --- a/lib/routes/nwafu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'nwafu.edu.cn': { - _name: '西北农林科技大学', - '.': [ - { - title: '校园要闻', - docs: 'https://docs.rsshub.app/routes/university#xi-bei-nong-lin-ke-ji-da-xue-xiao-yuan-yao-wen', - source: ['/tzgg.htm', '/'], - target: '/nwafu/jiaowu', - }, - ], - }, -}; diff --git a/lib/routes/nwafu/router.ts b/lib/routes/nwafu/router.ts deleted file mode 100644 index 872c7309c..000000000 --- a/lib/routes/nwafu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './all'); -}; diff --git a/lib/routes/nyaa/main.ts b/lib/routes/nyaa/main.ts index d5e05e0f2..284dd5888 100644 --- a/lib/routes/nyaa/main.ts +++ b/lib/routes/nyaa/main.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import { config } from '@/config'; import Parser from 'rss-parser'; -export default async (ctx) => { +export const route: Route = { + path: ['/search/:query?', '/user/:username?', '/user/:username/search/:query?', '/sukebei/search/:query?', '/sukebei/user/:username?', '/sukebei/user/:username/search/:query?'], + categories: ['multimedia'], + example: '/nyaa/search/psycho-pass', + parameters: { query: 'Search keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search Result', + maintainers: ['Lava-Swimmer', 'noname1776'], + handler, +}; + +async function handler(ctx) { const parser = new Parser({ customFields: { item: ['magnet', ['nyaa:infoHash', 'infoHash']], @@ -36,10 +55,10 @@ export default async (ctx) => { return item; }); - ctx.set('data', { + return { title: feed.title, link: currentLink, description: feed.description, item: feed.items, - }); -}; + }; +} diff --git a/lib/routes/nyaa/maintainer.ts b/lib/routes/nyaa/maintainer.ts deleted file mode 100644 index e125f24b9..000000000 --- a/lib/routes/nyaa/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/search/:query?': ['Lava-Swimmer', 'noname1776'], - '/user/:username?': ['Lava-Swimmer', 'noname1776'], - '/user/:username/search/:query?': ['Lava-Swimmer', 'noname1776'], - - '/sukebei/search/:query?': ['Lava-Swimmer', 'noname1776'], - '/sukebei/user/:username?': ['Lava-Swimmer', 'noname1776'], - '/sukebei/user/:username/search/:query?': ['Lava-Swimmer', 'noname1776'], -}; diff --git a/lib/routes/nyaa/namespace.ts b/lib/routes/nyaa/namespace.ts new file mode 100644 index 000000000..2e35b2d87 --- /dev/null +++ b/lib/routes/nyaa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Nyaa', + url: 'nyaa.si', +}; diff --git a/lib/routes/nyaa/radar.ts b/lib/routes/nyaa/radar.ts deleted file mode 100644 index bcc2814f8..000000000 --- a/lib/routes/nyaa/radar.ts +++ /dev/null @@ -1,47 +0,0 @@ -export default { - 'nyaa.si': { - _name: 'nyaa', - '.': [ - { - title: 'nyaa 的搜索结果、指定用户、指定用户的搜索结果', - docs: 'https://docs.rsshub.app/routes/multimedia#nyaa', - source: ['/', '/user/:username'], - target: (params, url) => { - url = new URL(url); - const username = params.username; - const query = url.searchParams.get('q'); - - let currentURL = '/nyaa'; - if (username !== undefined) { - currentURL = `${currentURL}/user/${username}`; - } - if (query !== null) { - currentURL = `${currentURL}/search/${query}`; - } - return currentURL; - }, - }, - ], - sukebei: [ - { - title: 'sukebei 的搜索结果、指定用户、指定用户的搜索结果', - docs: 'https://docs.rsshub.app/routes/multimedia#nyaa', - source: ['/', '/user/:username'], - target: (params, url) => { - url = new URL(url); - const username = params.username; - const query = url.searchParams.get('q'); - - let currentURL = '/nyaa/sukebei'; - if (username !== undefined) { - currentURL = `${currentURL}/user/${username}`; - } - if (query !== null) { - currentURL = `${currentURL}/search/${query}`; - } - return currentURL; - }, - }, - ], - }, -}; diff --git a/lib/routes/nyaa/router.ts b/lib/routes/nyaa/router.ts deleted file mode 100644 index 839a2b9db..000000000 --- a/lib/routes/nyaa/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/search/:query?', './main'); - router.get('/user/:username?', './main'); - router.get('/user/:username/search/:query?', './main'); - - router.get('/sukebei/search/:query?', './main'); - router.get('/sukebei/user/:username?', './main'); - router.get('/sukebei/user/:username/search/:query?', './main'); -}; diff --git a/lib/routes/nytimes/book.ts b/lib/routes/nytimes/book.ts index 90dfef9a4..ae5171c5f 100644 --- a/lib/routes/nytimes/book.ts +++ b/lib/routes/nytimes/book.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,43 @@ const categoryList = { 'young-adult-hardcover': '青少年', }; -export default async (ctx) => { +export const route: Route = { + path: '/book/:category?', + categories: ['traditional-media'], + example: '/nytimes/book/combined-print-and-e-book-nonfiction', + parameters: { category: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nytimes.com/'], + target: '', + }, + name: 'Best Seller Books', + maintainers: ['melvinto'], + handler, + url: 'nytimes.com/', + description: `| Category | +| ------------------------------------ | +| combined-print-and-e-book-nonfiction | +| hardcover-nonfiction | +| paperback-nonfiction | +| advice-how-to-and-miscellaneous | +| combined-print-and-e-book-fiction | +| hardcover-fiction | +| trade-fiction-paperback | +| childrens-middle-grade-hardcover | +| picture-books | +| series-books | +| young-adult-hardcover |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'combined-print-and-e-book-nonfiction'; const url = `https://www.nytimes.com/books/best-sellers/${category}`; @@ -63,9 +100,9 @@ export default async (ctx) => { .get(); } - ctx.set('data', { + return { title: `The New York Times Best Sellers - ${dataTitle}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.ts index 20764ef42..0c942b8dd 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,31 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/daily_briefing_chinese', + categories: ['traditional-media'], + example: '/nytimes/daily_briefing_chinese', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nytimes.com/'], + target: '', + }, + name: '新闻简报', + maintainers: ['yueyericardo', 'nczitzk'], + handler, + url: 'nytimes.com/', + description: `网站地址:[https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese)`, +}; + +async function handler() { const rootUrl = 'https://www.nytimes.com'; const currentUrl = `${rootUrl}/zh-hans/series/daily-briefing-chinese`; @@ -63,9 +88,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '新闻简报 - The New York Times', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/nytimes/index.ts b/lib/routes/nytimes/index.ts index 1f6545b69..869ceae2d 100644 --- a/lib/routes/nytimes/index.ts +++ b/lib/routes/nytimes/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; @@ -5,7 +6,35 @@ import utils from './utils'; import { load } from 'cheerio'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/:lang?', + categories: ['traditional-media'], + example: '/nytimes/dual', + parameters: { lang: 'language, default to Chinese' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nytimes.com/'], + target: '', + }, + name: 'News', + maintainers: ['HenryQW'], + handler, + url: 'nytimes.com/', + description: `By extracting the full text of articles, we provide a better reading experience (full text articles) over the official one. + + | Default to Chinese | Chinese-English | English | Chinese-English (Traditional Chinese) | Traditional Chinese | + | ------------------ | --------------- | ------- | ------------------------------------- | ------------------- | + | (empty) | dual | en | dual-traditionalchinese | traditionalchinese |`, +}; + +async function handler(ctx) { let { lang = '' } = ctx.req.param(); lang = lang.toLowerCase(); @@ -115,10 +144,10 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title, link: 'https://cn.nytimes.com', description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/nytimes/maintainer.ts b/lib/routes/nytimes/maintainer.ts deleted file mode 100644 index ebc42236d..000000000 --- a/lib/routes/nytimes/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/author/:byline': ['kevinschaul'], - '/book/:category?': ['melvinto'], - '/daily_briefing_chinese': ['yueyericardo', 'nczitzk'], - '/:lang?': ['HenryQW'], -}; diff --git a/lib/routes/nytimes/namespace.ts b/lib/routes/nytimes/namespace.ts new file mode 100644 index 000000000..9871c92eb --- /dev/null +++ b/lib/routes/nytimes/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The New York Times 纽约时报', + url: 'nytimes.com', +}; diff --git a/lib/routes/nytimes/radar.ts b/lib/routes/nytimes/radar.ts deleted file mode 100644 index 5463aba46..000000000 --- a/lib/routes/nytimes/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'nytimes.com': { - _name: '纽约时报', - '.': [ - { - title: '新闻简报', - docs: 'https://docs.rsshub.app/routes/traditional-media#niu-yue-shi-bao', - source: '/zh-hans/series/daily-briefing-chinese', - target: '/nytimes/daily_briefing_chinese', - }, - { - title: '畅销书排行榜', - docs: 'https://docs.rsshub.app/routes/traditional-media#niu-yue-shi-bao', - source: ['/books/best-sellers/:category', '/books/best-sellers/'], - target: '/nytimes/book/:category', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#niu-yue-shi-bao', - source: '/', - target: '/nytimes', - }, - ], - }, -}; diff --git a/lib/routes/nytimes/router.ts b/lib/routes/nytimes/router.ts deleted file mode 100644 index 86544838f..000000000 --- a/lib/routes/nytimes/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/book/:category?', './book.js'); - router.get('/daily_briefing_chinese', './daily-briefing-chinese.js'); - router.get('/:lang?', './index'); -}; diff --git a/lib/routes/oceanengine/arithmetic-index.ts b/lib/routes/oceanengine/arithmetic-index.ts index e0d51d7f1..e2f932871 100644 --- a/lib/routes/oceanengine/arithmetic-index.ts +++ b/lib/routes/oceanengine/arithmetic-index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -81,7 +82,14 @@ const createContent = (keyword, queryList, queryListText) => })), }); -export default async (ctx) => { +export const route: Route = { + path: '/index/:keyword/:channel?', + name: 'Unknown', + maintainers: ['Jkker'], + handler, +}; + +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'); @@ -140,11 +148,11 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: `${keyword} - ${channelName}指数波峰`, link, description: `巨量算数 - ${channelName}算数指数 | 关键词: ${keyword}`, language: 'zh-cn', item, - }); -}; + }; +} diff --git a/lib/routes/oceanengine/maintainer.ts b/lib/routes/oceanengine/maintainer.ts deleted file mode 100644 index eea8b7827..000000000 --- a/lib/routes/oceanengine/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/index/:keyword/:channel?': ['Jkker'], -}; diff --git a/lib/routes/oceanengine/namespace.ts b/lib/routes/oceanengine/namespace.ts new file mode 100644 index 000000000..b19df4d41 --- /dev/null +++ b/lib/routes/oceanengine/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '巨量算数 - 算数指数', + url: 'trendinsight.oceanengine.com', +}; diff --git a/lib/routes/oceanengine/radar.ts b/lib/routes/oceanengine/radar.ts deleted file mode 100644 index 2e08d9fcb..000000000 --- a/lib/routes/oceanengine/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'oceanengine.com': { - _name: '巨量算数', - trendinsight: [ - { - title: '抖音/头条指数波峰', - docs: 'https://docs.rsshub.app/routes/other#ju-liang-suan-shu-suan-shu-zhi-shu', - source: ['/arithmetic-index/analysis'], - target: (params, url) => `/oceanengine/index/${new URL(url).searchParams.get('keyword')}`, - }, - ], - }, -}; diff --git a/lib/routes/oceanengine/router.ts b/lib/routes/oceanengine/router.ts deleted file mode 100644 index 191f9459e..000000000 --- a/lib/routes/oceanengine/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/index/:keyword/:channel?', './arithmetic-index'); -}; diff --git a/lib/routes/odaily/activity.ts b/lib/routes/odaily/activity.ts index 629c82e4d..e97b8be4f 100644 --- a/lib/routes/odaily/activity.ts +++ b/lib/routes/odaily/activity.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/activity', + categories: ['new-media'], + example: '/odaily/activity', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['0daily.com/activityPage', '0daily.com/'], + }, + name: '活动', + maintainers: ['nczitzk'], + handler, + url: '0daily.com/activityPage', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/service/scheme/group/8?page=1&per_page=${ctx.req.query('limit') ?? 25}`; const response = await got({ @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '活动 - Odaily星球日报', link: `${rootUrl}/activityPage`, item: items, - }); -}; + }; +} diff --git a/lib/routes/odaily/maintainer.ts b/lib/routes/odaily/maintainer.ts deleted file mode 100644 index 2cc595864..000000000 --- a/lib/routes/odaily/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/activity': ['nczitzk'], - '/newsflash': ['nczitzk'], - '/search/news/:keyword': ['snowraincloud'], - '/user/:id': ['nczitzk'], - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/odaily/namespace.ts b/lib/routes/odaily/namespace.ts new file mode 100644 index 000000000..e36c8e61f --- /dev/null +++ b/lib/routes/odaily/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Odaily 星球日报', + url: 'odaily.news', +}; diff --git a/lib/routes/odaily/newsflash.ts b/lib/routes/odaily/newsflash.ts index 8ead5db58..44b638859 100644 --- a/lib/routes/odaily/newsflash.ts +++ b/lib/routes/odaily/newsflash.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/newsflash', + categories: ['new-media'], + example: '/odaily/newsflash', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['0daily.com/newsflash', '0daily.com/'], + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + url: '0daily.com/newsflash', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/api/pp/api/info-flow/newsflash_columns/newsflashes?b_id=&per_page=${ctx.req.query('limit') ?? 100}`; const response = await got({ @@ -18,9 +41,9 @@ export default async (ctx) => { description: `

    ${item.description}

    `, })); - ctx.set('data', { + return { title: '快讯 - Odaily星球日报', link: `${rootUrl}/newsflash`, item: items, - }); -}; + }; +} diff --git a/lib/routes/odaily/post.ts b/lib/routes/odaily/post.ts index b42858e28..74591e846 100644 --- a/lib/routes/odaily/post.ts +++ b/lib/routes/odaily/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -16,7 +17,32 @@ const titles = { 296: '活动', }; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['new-media'], + example: '/odaily', + parameters: { id: 'id,见下表,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['0daily.com/'], + }, + name: '文章', + maintainers: ['nczitzk'], + handler, + url: '0daily.com/', + description: `| 最新 | 新品 | DeFi | NFT | 存储 | 波卡 | 行情 | 活动 | + | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | + | 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '280'; const currentUrl = `${rootUrl}/api/pp/api/app-front/feed-stream?feed_id=${id}&b_id=&per_page=${ctx.req.query('limit') ?? 25}`; @@ -56,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[id]} - Odaily星球日报`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/odaily/radar.ts b/lib/routes/odaily/radar.ts deleted file mode 100644 index 37b0cb001..000000000 --- a/lib/routes/odaily/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -const odaily = { - _name: 'Odaily 星球日报', - '.': [ - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#odaily-xing-qiu-ri-bao-kuai-xun', - source: ['/newsflash', '/'], - target: '/odaily/newsflash', - }, - { - title: '搜索快讯', - docs: 'https://docs.rsshub.app/routes/new-media#odaily-xing-qiu-ri-bao-sou-suo-kuai-xun', - source: ['/search/:keyword'], - target: '/odaily/search/news/:keyword', - }, - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/new-media#odaily-xing-qiu-ri-bao-wen-zhang', - source: ['/'], - target: '/odaily/:id?', - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/new-media#odaily-xing-qiu-ri-bao-yong-hu-wen-zhang', - source: ['/user/:id', '/'], - target: '/odaily/user/:id', - }, - { - title: '活动', - docs: 'https://docs.rsshub.app/routes/new-media#odaily-xing-qiu-ri-bao-huo-dong', - source: ['/activityPage', '/'], - target: '/odaily/activity', - }, - ], -}; - -export default { - 'odaily.news': odaily, - '0daily.com': odaily, -}; diff --git a/lib/routes/odaily/router.ts b/lib/routes/odaily/router.ts deleted file mode 100644 index 53b983c16..000000000 --- a/lib/routes/odaily/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/activity', './activity'); - router.get('/newsflash', './newsflash'); - router.get('/search/news/:keyword', './search-news'); - router.get('/user/:id', './user'); - router.get('/:id?', './post'); -}; diff --git a/lib/routes/odaily/search-news.ts b/lib/routes/odaily/search-news.ts index 0c083d6dc..c06332bea 100644 --- a/lib/routes/odaily/search-news.ts +++ b/lib/routes/odaily/search-news.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/news/:keyword', + categories: ['new-media'], + example: '/odaily/search/news/RSS3', + parameters: { keyword: '搜索关键字' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['0daily.com/search/:keyword'], + }, + name: '搜索快讯', + maintainers: ['snowraincloud'], + handler, +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/api/pp/api/search/entity-search?per_page=${ctx.req.query('limit') ?? 25}&keyword=${ctx.req.param('keyword')}&entity_type=newsflash`; const response = await got({ @@ -18,9 +40,9 @@ export default async (ctx) => { description: `

    ${item.description}

    `, })); - ctx.set('data', { + return { title: '快讯 - Odaily星球日报', link: `${rootUrl}/search/${ctx.req.param('keyword')}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/odaily/user.ts b/lib/routes/odaily/user.ts index ddd46b318..fc2b210a8 100644 --- a/lib/routes/odaily/user.ts +++ b/lib/routes/odaily/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['new-media'], + example: '/odaily/user/2147486902', + parameters: { id: '用户 id,可在用户页地址栏中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['0daily.com/user/:id', '0daily.com/'], + }, + name: '用户文章', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const currentUrl = `${rootUrl}/service/feed_stream/user/${id}?b_id=10&per_page=${ctx.req.query('limit') ?? 25}`; @@ -46,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${author} - Odaily星球日报`, link: `${rootUrl}/user/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/oeeee/app/channel.ts b/lib/routes/oeeee/app/channel.ts index dd4428e59..125ebcafa 100644 --- a/lib/routes/oeeee/app/channel.ts +++ b/lib/routes/oeeee/app/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import { parseArticle } from '../utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/app/channel/:id', + name: 'Unknown', + maintainers: ['TimWu007'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 50; const currentUrl = `https://api-ndapp.oeeee.com/friends.php?m=Zone&a=SpaceDoclist&uid=${id}&type=doc`; @@ -32,9 +40,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `南方都市报客户端 - ${channel}`, link: `https://m.mp.oeeee.com/u/${id}.html`, item: items, - }); -}; + }; +} diff --git a/lib/routes/oeeee/app/reporter.ts b/lib/routes/oeeee/app/reporter.ts index 8e73c16af..11b01b943 100644 --- a/lib/routes/oeeee/app/reporter.ts +++ b/lib/routes/oeeee/app/reporter.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,26 @@ import { parseArticle } from '../utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/app/reporter/:id', + categories: ['traditional-media'], + example: '/oeeee/app/reporter/249', + parameters: { id: '记者 UID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '南都客户端(按记者)', + maintainers: ['TimWu007'], + handler, + description: `记者的 UID 可通过 \`m.mp.oeeee.com\` 下的文章页面获取。点击文章下方的作者头像,进入该作者的个人主页,即可从 url 中获取。`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 0; const currentUrl = `https://m.mp.oeeee.com/show.php?m=Doc&a=getAuthorInfo&id=${id}`; @@ -26,9 +46,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `南方都市报奥一网 - ${author}`, link: `https://m.mp.oeeee.com/w/${id}.html`, item: items, - }); -}; + }; +} diff --git a/lib/routes/oeeee/maintainer.ts b/lib/routes/oeeee/maintainer.ts deleted file mode 100644 index 7e014618d..000000000 --- a/lib/routes/oeeee/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/web/:channel': ['TimWu007'], - '/app/channel/:id': ['TimWu007'], - '/app/reporter/:id': ['TimWu007'], -}; diff --git a/lib/routes/oeeee/namespace.ts b/lib/routes/oeeee/namespace.ts new file mode 100644 index 000000000..83351b500 --- /dev/null +++ b/lib/routes/oeeee/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南方都市报', + url: 'oeeee.com', +}; diff --git a/lib/routes/oeeee/radar.ts b/lib/routes/oeeee/radar.ts deleted file mode 100644 index 9d45ff5d3..000000000 --- a/lib/routes/oeeee/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'oeeee.com': { - _name: '奥一网', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#nan-fang-du-shi-bao', - source: ['/'], - }, - ], - }, -}; diff --git a/lib/routes/oeeee/router.ts b/lib/routes/oeeee/router.ts deleted file mode 100644 index b7cb56df5..000000000 --- a/lib/routes/oeeee/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/web/:channel', './web'); - router.get('/app/channel/:id', './app/channel'); - router.get('/app/reporter/:id', './app/reporter'); -}; diff --git a/lib/routes/oeeee/web.ts b/lib/routes/oeeee/web.ts index 87c6ae1e2..527efbeb4 100644 --- a/lib/routes/oeeee/web.ts +++ b/lib/routes/oeeee/web.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,27 @@ import { parseArticle } from './utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/web/:channel', + categories: ['traditional-media'], + example: '/oeeee/web/170', + parameters: { channel: '频道 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '奥一网', + maintainers: ['TimWu007'], + handler, + description: `- 若在桌面端打开奥一网栏目页(如 \`https://www.oeeee.com/api/channel.php?s=/index/index/channel/gz\`),可查看该页源代码,搜索 \`OECID\`。 + - 若在移动端打开奥一网栏目页(格式例:\`https://m.oeeee.com/m.php?s=/m2/channel&channel_id=169\`),即可从 url 中获取。需注意的是,如果该栏目页的 url 格式为 \`https://m.oeeee.com/detailChannel_indexData.html?channel_id=266\` ,则 \`266\` 并非为本路由可用的频道 ID,建议从桌面端获取。`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? 0; const currentUrl = `https://www.oeeee.com/api/channel.php?m=Js4channelNews&a=newLatest&cid=${channel}`; @@ -32,9 +53,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `南方都市报奥一网`, link: `https://www.oeeee.com/api/channel.php?s=/index/index/channel/${channelEname}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/oilchem/index.ts b/lib/routes/oilchem/index.ts index 10b349e60..f0db0e833 100644 --- a/lib/routes/oilchem/index.ts +++ b/lib/routes/oilchem/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,32 @@ import routes from './routes'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:category?/:subCategory?', + categories: ['new-media'], + example: '/oilchem/list/140/18263', + parameters: { type: '类别 id,可在对应类别页中找到,默认为首页', category: '分类 id,可在对应分类页中找到', subCategory: '子分类 id,可在对应分类页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '资讯', + maintainers: ['nczitzk'], + handler, + description: `以下是几个例子: + + [**化工**](https://chem.oilchem.net) \`https://chem.oilchem.net\` 中,类别 id 为 \`chem\`,分类 id 为空,子分类 id 为空,对应路由即为 [\`/oilchem/chem\`](https://rsshub.app/oilchem/list/140/18263) + + [**甲醇**](https://chem.oilchem.net/chemical/methanol.shtml) 的相关资讯有两个页面入口:其一 \`https://chem.oilchem.net/chemical/methanol.shtml\` 中,类别 id 为 \`chem\`,分类 id 为 \`chemical\`,子分类 id 为 \`methanol\`,对应路由即为 [\`/oilchem/chem/chemical/methanol\`](https://rsshub.app/oilchem/chem/chemical/methanol) 或其二 \`https://list.oilchem.net/140\` 中,类别 id 为 \`list\`,分类 id 为 \`140\`,子分类 id 为空,对应路由即为 [\`/oilchem/list/140\`](https://rsshub.app/oilchem/list/140); + + [**甲醇热点聚焦**](https://list.oilchem.net/140/18263) \`https://list.oilchem.net/140/18263\` 中,类别 id 为 \`list\`,分类 id 为 \`140\`,子分类 id 为 \`18263\`,对应路由即为 [\`/oilchem/list/140/18263\`](https://rsshub.app/oilchem/list/140/18263)`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? ''; const category = ctx.req.param('category') ?? ''; const subCategory = ctx.req.param('subCategory') ?? ''; @@ -59,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.hdbox h3').text()} - 隆众资讯`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/oilchem/maintainer.ts b/lib/routes/oilchem/maintainer.ts deleted file mode 100644 index 2e0c19c7c..000000000 --- a/lib/routes/oilchem/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?/:category?/:subCategory?': ['nczitzk'], -}; diff --git a/lib/routes/oilchem/namespace.ts b/lib/routes/oilchem/namespace.ts new file mode 100644 index 000000000..99edb194b --- /dev/null +++ b/lib/routes/oilchem/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '隆众资讯', + url: 'oilchem.net', +}; diff --git a/lib/routes/oilchem/radar.ts b/lib/routes/oilchem/radar.ts deleted file mode 100644 index 43c66b87f..000000000 --- a/lib/routes/oilchem/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'oilchem.net': { - _name: '隆众资讯', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#long-zhong-zi-xun', - }, - ], - }, -}; diff --git a/lib/routes/oilchem/router.ts b/lib/routes/oilchem/router.ts deleted file mode 100644 index ec258d923..000000000 --- a/lib/routes/oilchem/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:category?/:subCategory?', './'); -}; diff --git a/lib/routes/oncc/index.ts b/lib/routes/oncc/index.ts index f2176e47b..1ed636f9f 100644 --- a/lib/routes/oncc/index.ts +++ b/lib/routes/oncc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -38,7 +39,30 @@ const channelMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:language/:channel?', + categories: ['traditional-media'], + example: '/oncc/zh-hant/news', + parameters: { language: '`zh-hans` 为简体,`zh-hant` 为繁体', channel: '频道,默认为港澳' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '即時新聞', + maintainers: ['Fatpandac'], + handler, + description: `频道参数可以从官网的地址中获取,如: + + \`https://hk.on.cc/hk/finance/index_cn.html\` 对应 \`/oncc/zh-hans/finance\` + + \`https://hk.on.cc/hk/finance/index.html\` 对应 \`/oncc/zh-hant/finance\``, +}; + +async function handler(ctx) { const language = ctx.req.param('language'); const channel = ctx.req.param('channel') ?? 'news'; const newsUrl = `${rootUrl}/hk/${channel}/index${languageMap[language]}.html`; @@ -79,9 +103,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `東網 - ${channelMap[channel][language]}`, link: newsUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/oncc/maintainer.ts b/lib/routes/oncc/maintainer.ts deleted file mode 100644 index 17b14fd1b..000000000 --- a/lib/routes/oncc/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:language/:channel?': ['Fatpandac'], - '/money18/:id?': ['nczitzk'], -}; diff --git a/lib/routes/oncc/money18.ts b/lib/routes/oncc/money18.ts index 91bad30ea..421e60f2f 100644 --- a/lib/routes/oncc/money18.ts +++ b/lib/routes/oncc/money18.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -23,7 +24,28 @@ const sections = { tech: '科技財情', }; -export default async (ctx) => { +export const route: Route = { + path: '/money18/:id?', + categories: ['traditional-media'], + example: '/oncc/money18/exp', + parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,默认为 exp,即新聞總覽' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Money18', + maintainers: ['nczitzk'], + handler, + description: `| 新聞總覽 | 全日焦點 | 板塊新聞 | 國際金融 | 大行報告 | A 股新聞 | 地產新聞 | 投資理財 | 新股 IPO | 科技財情 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | + | exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'exp'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30; @@ -111,9 +133,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `東網產經 - ${sections[id]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/oncc/namespace.ts b/lib/routes/oncc/namespace.ts new file mode 100644 index 000000000..601f972b0 --- /dev/null +++ b/lib/routes/oncc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东网', + url: 'hk.on.cc', +}; diff --git a/lib/routes/oncc/radar.ts b/lib/routes/oncc/radar.ts deleted file mode 100644 index 73b330cc6..000000000 --- a/lib/routes/oncc/radar.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - 'on.cc': { - _name: '东网', - hk: [ - { - title: '港澳', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/hk/news/index.html', '/hk/news/index_cn.html'], - target: '/oncc/zh-hans/news', - }, - { - title: '两岸', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/hk/cnnews/index.html', '/hk/cnnews/index_cn.html'], - target: '/oncc/zh-hans/cnnews', - }, - { - title: '国际', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/hk/intnews/index.html', '/hk/intnews/index_cn.html'], - target: '/oncc/zh-hans/intnews', - }, - { - title: '评论', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/hk/commentary/index.html', '/hk/commentary/index_cn.html'], - target: '/oncc/zh-hans/commentary', - }, - { - title: '产经', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/hk/finance/index.html', '/hk/finance/index_cn.html'], - target: '/oncc/zh-hans/finance', - }, - ], - money18: [ - { - title: '產經', - docs: 'https://docs.rsshub.app/routes/traditional-media#dong-wang', - source: ['/finnews/news_breaking.html'], - target: (params, url) => `/oncc/money18/${new URL(url).searchParams.get('section')}`, - }, - ], - }, -}; diff --git a/lib/routes/oncc/router.ts b/lib/routes/oncc/router.ts deleted file mode 100644 index b1fde7304..000000000 --- a/lib/routes/oncc/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/money18/:id?', './money18'); - router.get('/:language/:channel?', './index'); -}; diff --git a/lib/routes/onehu/common.ts b/lib/routes/onehu/common.ts index deec272d2..76c109be3 100644 --- a/lib/routes/onehu/common.ts +++ b/lib/routes/onehu/common.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + name: 'Unknown', + maintainers: ['ruoshui9527'], + handler, +}; + +async function handler() { const link = 'https://onehu.xyz'; const response = await got(link); const data = response.data; @@ -20,9 +28,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link, item: list, - }); -}; + }; +} diff --git a/lib/routes/onehu/maintainer.ts b/lib/routes/onehu/maintainer.ts deleted file mode 100644 index 8f8f0c2ce..000000000 --- a/lib/routes/onehu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['ruoshui9527'], -}; diff --git a/lib/routes/onehu/namespace.ts b/lib/routes/onehu/namespace.ts new file mode 100644 index 000000000..04d3cab66 --- /dev/null +++ b/lib/routes/onehu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '我不是盐神', + url: 'onehu.xyz', +}; diff --git a/lib/routes/onehu/radar.ts b/lib/routes/onehu/radar.ts deleted file mode 100644 index 6a6fd0856..000000000 --- a/lib/routes/onehu/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'onehu.xyz': { - _name: '我不是盐神', - '.': [ - { - title: '我不是盐神', - docs: 'https://docs.rsshub.app/routes/new-media#wo-bu-shi-yan-shen', - }, - ], - }, -}; diff --git a/lib/routes/onehu/router.ts b/lib/routes/onehu/router.ts deleted file mode 100644 index d8324ea27..000000000 --- a/lib/routes/onehu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './common'); -}; diff --git a/lib/routes/onet/maintainer.ts b/lib/routes/onet/maintainer.ts deleted file mode 100644 index 747de7786..000000000 --- a/lib/routes/onet/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['Vegann'], -}; diff --git a/lib/routes/onet/namespace.ts b/lib/routes/onet/namespace.ts new file mode 100644 index 000000000..79d7362fa --- /dev/null +++ b/lib/routes/onet/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Onet', + url: 'wiadomosci.onet.pl', +}; diff --git a/lib/routes/onet/news.ts b/lib/routes/onet/news.ts index d522a9368..a040d89ad 100644 --- a/lib/routes/onet/news.ts +++ b/lib/routes/onet/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseArticleContent, parseMainImage } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/onet/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wiadomosci.onet.pl/'], + }, + name: 'News', + maintainers: ['Vegann'], + handler, + url: 'wiadomosci.onet.pl/', + description: `This route provides a better reading experience (full text articles) over the official one for \`https://wiadomosci.onet.pl\`.`, +}; + +async function handler() { const rssUrl = 'https://wiadomosci.onet.pl/.feed'; const feed = await parser.parseURL(rssUrl); const items = await Promise.all( @@ -49,12 +73,12 @@ export default async (ctx) => { }; }) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.title, item: items, language: 'pl', image: 'https://ocdn.eu/wiadomosciucs/static/logo2017/onet2017big_dark.png', - }); -}; + }; +} diff --git a/lib/routes/onet/radar.ts b/lib/routes/onet/radar.ts deleted file mode 100644 index 434e4e439..000000000 --- a/lib/routes/onet/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'onet.pl': { - _name: 'Onet', - wiadomosci: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#onet', - source: '/', - target: '/onet/news', - }, - ], - }, -}; diff --git a/lib/routes/onet/router.ts b/lib/routes/onet/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/onet/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/oo-software/changelog.ts b/lib/routes/oo-software/changelog.ts index b3f0ff224..37be9504a 100644 --- a/lib/routes/oo-software/changelog.ts +++ b/lib/routes/oo-software/changelog.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog/:id', + categories: ['program-update'], + example: '/oo-software/changelog/shutup10', + parameters: { id: 'Software id, see below, shutup10 by default, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Changelog', + maintainers: ['nczitzk'], + handler, + description: `| Software | Id | + | --------------- | ----------- | + | O\&O ShutUp10++ | shutup10 | + | O\&O AppBuster | ooappbuster | + | O\&O Lanytix | oolanytix | + | O\&O DeskInfo | oodeskinfo |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'shutup10'; const rootUrl = 'https://www.oo-software.com'; @@ -32,9 +57,9 @@ export default async (ctx) => { items[0].enclosure_url = $('.banner-inlay').find('a').attr('href'); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/oo-software/maintainer.ts b/lib/routes/oo-software/maintainer.ts deleted file mode 100644 index 6d612890b..000000000 --- a/lib/routes/oo-software/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/changelog/:id': ['nczitzk'], -}; diff --git a/lib/routes/oo-software/namespace.ts b/lib/routes/oo-software/namespace.ts new file mode 100644 index 000000000..0b5d4bfb8 --- /dev/null +++ b/lib/routes/oo-software/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'O&O Software', + url: 'oo-software.com', +}; diff --git a/lib/routes/oo-software/radar.ts b/lib/routes/oo-software/radar.ts deleted file mode 100644 index 3b985c680..000000000 --- a/lib/routes/oo-software/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'oo-software.com': { - _name: 'O&O Software', - '.': [ - { - title: 'Changelog', - docs: 'https://docs.rsshub.app/routes/program-update#oo-software-changelog', - source: ['/en/changelog'], - target: (params, url) => `/oo-software/changelog/${url.match(/\/en\/(.*?)\/changelog/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/oo-software/router.ts b/lib/routes/oo-software/router.ts deleted file mode 100644 index d726e61d9..000000000 --- a/lib/routes/oo-software/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/changelog/:id', './changelog'); -}; diff --git a/lib/routes/openai/blog.ts b/lib/routes/openai/blog.ts index 39cbc1601..b7814380c 100644 --- a/lib/routes/openai/blog.ts +++ b/lib/routes/openai/blog.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { toTitleCase } from '@/utils/common-utils'; import { getApiUrl, parseArticle } from './common'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:tag?', + categories: ['new-media'], + example: '/openai/blog', + parameters: { tag: 'Tag, see below, All by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Blog', + maintainers: ['StevenRCE0', 'nczitzk'], + handler, + description: `| All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research | + | --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | + | | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research |`, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag') || ''; const rootUrl = 'https://openai.com'; @@ -36,9 +58,9 @@ export default async (ctx) => { const title = `OpenAI Blog${tag ? ` - ${toTitleCase(tag)}` : ''}`; - ctx.set('data', { + return { title, link: blogOriginUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/openai/chatgpt.ts b/lib/routes/openai/chatgpt.ts index 4a6d6fda2..507dc15a5 100644 --- a/lib/routes/openai/chatgpt.ts +++ b/lib/routes/openai/chatgpt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import dayjs from 'dayjs'; import got from '@/utils/got'; @@ -7,7 +8,25 @@ import { config } from '@/config'; import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; dayjs.extend(isSameOrBefore); -export default async (ctx) => { +export const route: Route = { + path: '/chatgpt/release-notes', + categories: ['new-media'], + example: '/openai/chatgpt/release-notes', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'ChatGPT - Release Notes', + maintainers: [], + handler, +}; + +async function handler() { const articleUrl = 'https://help.openai.com/en/articles/6825453-chatgpt-release-notes'; const cacheIn = await cache.tryGet( @@ -91,10 +110,10 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: cacheIn.feedTitle, description: cacheIn.feedDesc, link: articleUrl, item: cacheIn.items, - }); -}; + }; +} diff --git a/lib/routes/openai/maintainer.ts b/lib/routes/openai/maintainer.ts deleted file mode 100644 index 59fea07ea..000000000 --- a/lib/routes/openai/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog/:tag?': ['StevenRCE0', 'nczitzk'], - '/research': ['yuguorui'], -}; diff --git a/lib/routes/openai/namespace.ts b/lib/routes/openai/namespace.ts new file mode 100644 index 000000000..768232c88 --- /dev/null +++ b/lib/routes/openai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'OpenAI', + url: 'openai.com', +}; diff --git a/lib/routes/openai/radar.ts b/lib/routes/openai/radar.ts deleted file mode 100644 index 624b8bb28..000000000 --- a/lib/routes/openai/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'openai.com': { - _name: 'OpenAI', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/new-media#openai', - source: '/blog', - target: (_, url) => { - const topics = new URL(url).searchParams.get('topics'); - if (topics) { - return `/openai/blog/${topics}`; - } - return '/openai/blog'; - }, - }, - ], - chat: [ - { - title: 'ChatGPT - Release Notes', - docs: 'https://docs.rsshub.app/routes/new-media#openai', - source: '/chat', - target: () => '/openai/chatgpt/release-notes', - }, - ], - research: [ - { - title: 'Research', - docs: 'https://docs.rsshub.app/routes/new-media#openai', - source: '/research', - target: () => '/openai/research', - }, - ], - }, -}; diff --git a/lib/routes/openai/research.ts b/lib/routes/openai/research.ts index 08433fbb8..9a6dba235 100644 --- a/lib/routes/openai/research.ts +++ b/lib/routes/openai/research.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { getApiUrl, parseArticle } from './common'; -export default async (ctx) => { +export const route: Route = { + path: '/research', + categories: ['new-media'], + example: '/openai/research', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Research', + maintainers: ['yuguorui'], + handler, +}; + +async function handler(ctx) { const apiUrl = new URL('/api/v1/research-publications', await getApiUrl()); const researchRootUrl = 'https://openai.com/research'; @@ -24,9 +43,9 @@ export default async (ctx) => { const title = 'OpenAI Research'; - ctx.set('data', { + return { title, link: researchRootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/openai/router.ts b/lib/routes/openai/router.ts deleted file mode 100644 index 6a519630f..000000000 --- a/lib/routes/openai/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/blog/:tag?', './blog'); - router.get('/chatgpt/release-notes', './chatgpt'); - router.get('/research', './research'); -}; diff --git a/lib/routes/openwrt/maintainer.ts b/lib/routes/openwrt/maintainer.ts deleted file mode 100644 index 4023edaec..000000000 --- a/lib/routes/openwrt/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/releases/:model?': ['DIYgod'], -}; diff --git a/lib/routes/openwrt/namespace.ts b/lib/routes/openwrt/namespace.ts new file mode 100644 index 000000000..d3fb396c4 --- /dev/null +++ b/lib/routes/openwrt/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'openwrt.org', +}; diff --git a/lib/routes/openwrt/radar.ts b/lib/routes/openwrt/radar.ts deleted file mode 100644 index a26daacd6..000000000 --- a/lib/routes/openwrt/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'openwrt.org': { - _name: 'Openwrt', - '.': [ - { - title: 'Model Releases', - docs: 'https://docs.rsshub.app/routes/program-update#openwrt', - source: '/toh/:band/:model', - target: '/openwrt/releases/:model', - }, - ], - }, -}; diff --git a/lib/routes/openwrt/releases.ts b/lib/routes/openwrt/releases.ts index 33fc38e25..c939e9133 100644 --- a/lib/routes/openwrt/releases.ts +++ b/lib/routes/openwrt/releases.ts @@ -1,7 +1,19 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/releases/:brand/:model', + radar: { + source: ['openwrt.org/toh/:band/:model'], + target: '/releases/:model', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const brand = ctx.req.param('brand'); const model = ctx.req.param('model'); const url = `https://openwrt.org/toh/${brand}/${model}`; @@ -9,7 +21,7 @@ export default async (ctx) => { const $ = load(response.data); const table = $('#installation').next(); - ctx.set('data', { + return { title: $('h1').text() + ' - OpenWrt Releases', link: url, description: $('.dw-content div.level1').text(), @@ -21,5 +33,5 @@ export default async (ctx) => { description: `Firmware OpenWrt Install: ${table.find('.firmware_openwrt_install_url').html()}

    Firmware OpenWrt Upgrade: ${$('.firmware_openwrt_upgrade_url').html()}'`, }, ], - }); -}; + }; +} diff --git a/lib/routes/openwrt/router.ts b/lib/routes/openwrt/router.ts deleted file mode 100644 index e661601bc..000000000 --- a/lib/routes/openwrt/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/releases/:brand/:model', './releases'); -}; diff --git a/lib/routes/orcid/index.ts b/lib/routes/orcid/index.ts index b9e1758d1..d26e88af5 100644 --- a/lib/routes/orcid/index.ts +++ b/lib/routes/orcid/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,25 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['study'], + example: '/orcid/0000-0002-4731-9700', + parameters: { id: 'Open Researcher and Contributor ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Works List', + maintainers: ['OrangeEd1t'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://orcid.org/'; const currentUrl = `${rootUrl}${id}/worksPage.json?offset=0&sort=date&sortAsc=false&pageSize=20`; @@ -47,9 +66,9 @@ export default async (ctx) => { return info; }); - ctx.set('data', { + return { title: 'ORCID Works List' + id, link: currentUrl, item: out, - }); -}; + }; +} diff --git a/lib/routes/orcid/maintainer.ts b/lib/routes/orcid/maintainer.ts deleted file mode 100644 index 9d5aa3f39..000000000 --- a/lib/routes/orcid/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['OrangeEd1t'], -}; diff --git a/lib/routes/orcid/namespace.ts b/lib/routes/orcid/namespace.ts new file mode 100644 index 000000000..b425eea7e --- /dev/null +++ b/lib/routes/orcid/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ORCID', + url: 'orcid.org', +}; diff --git a/lib/routes/orcid/radar.ts b/lib/routes/orcid/radar.ts deleted file mode 100644 index 8b2b7d872..000000000 --- a/lib/routes/orcid/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'orcid.org': { - _name: 'ORCID', - '.': [ - { - title: '作品列表', - docs: 'https://docs.rsshub.app/routes/study#orcid', - source: ['/:id', '/'], - target: '/ocrid/:id', - }, - ], - }, -}; diff --git a/lib/routes/orcid/router.ts b/lib/routes/orcid/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/orcid/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.ts index ef2f5f7fd..d16ae84ab 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -38,7 +39,28 @@ function get_user_url(rootUrl, ctx, sort) { } return userUrl; } -export default async (ctx) => { +export const route: Route = { + path: ['/authors/:authorid/:sort/:pagelimit?', '/characters/:characterid/:sort/:pagelimit?', '/origins/:originid/:sort/:pagelimit?', '/search/:keyword/:sort/:pagelimit?', '/tags/:tagid/:sort/:pagelimit?'], + categories: ['anime'], + example: '/oreno3d/authors/3189/latest/1', + parameters: { authorid: 'Author id, can be found in URL', sort: 'Sort method, see the table above', pagelimit: 'The maximum number of pages to be crawled, the default is 1' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Author Search', + maintainers: ['xueli_sherryli'], + handler, + description: `| favorites | hot | latest | popularity | + | --------- | --- | ------ | ---------- | + | favorites | hot | latest | popularity |`, +}; + +async function handler(ctx) { // 获取视频链接列表及标题 function getLinksTitle(response) { const selector = 'a.box'; @@ -153,9 +175,9 @@ export default async (ctx) => { item: realItem, }; // 生成RSS源码 - ctx.set('data', { + return { title: `${data.title} - ${sortRename[sort]}(Page 1-${pagelimit})`, link: userUrl, item: data.item, - }); -}; + }; +} diff --git a/lib/routes/oreno3d/maintainer.ts b/lib/routes/oreno3d/maintainer.ts deleted file mode 100644 index 491691e93..000000000 --- a/lib/routes/oreno3d/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/authors/:authorid/:sort/:pagelimit?': ['xueli_sherryli'], - '/characters/:characterid/:sort/:pagelimit?': ['xueli_sherryli'], - '/origins/:originid/:sort/:pagelimit?': ['xueli_sherryli'], - '/search/:keyword/:sort/:pagelimit?': ['xueli_sherryli'], - '/tags/:tagid/:sort/:pagelimit?': ['xueli_sherryli'], -}; diff --git a/lib/routes/oreno3d/namespace.ts b/lib/routes/oreno3d/namespace.ts new file mode 100644 index 000000000..afedd3195 --- /dev/null +++ b/lib/routes/oreno3d/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '俺の 3D エロ動画 (oreno3d)', + url: 'oreno3d.com', + description: `:::tip +You can use some RSS parsing libraries (like \`feedpraser\` in \`Python\`) to receive the video update messages and download them automatically +:::`, +}; diff --git a/lib/routes/oreno3d/radar.ts b/lib/routes/oreno3d/radar.ts deleted file mode 100644 index 514ab95fb..000000000 --- a/lib/routes/oreno3d/radar.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default { - 'oreno3d.com': { - _name: '俺の3Dエロ動画', - '.': [ - { - title: '关键词搜索', - docs: 'https://docs.rsshub.app/routes/anime#an-の3dエロ-dong-hua-oreno3d-guan-jian-ci-sou-suo', - source: ['/search'], - target: (_params, url) => { - const searchParams = new URL(url).searchParams; - return `/oreno3d/search/${searchParams.get('keyword')}${searchParams.has('sort') ? '/' + searchParams.get('sort') : ''}`; - }, - }, - { - title: '角色搜索', - docs: 'https://docs.rsshub.app/routes/anime#an-の3dエロ-dong-hua-oreno3d-jiao-se-sou-suo', - source: ['/characters/:characterid'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/oreno3d/characters/${params.characterid}${searchParams.has('sort') ? '/' + searchParams.get('sort') : ''}`; - }, - }, - { - title: '作者搜索', - docs: 'https://docs.rsshub.app/routes/anime#an-の3dエロ-dong-hua-oreno3d-zuo-zhe-sou-suo', - source: ['/authors/:authorid'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/oreno3d/authors/${params.authorid}${searchParams.has('sort') ? '/' + searchParams.get('sort') : ''}`; - }, - }, - { - title: '标签搜索', - docs: 'https://docs.rsshub.app/routes/anime#an-の3dエロ-dong-hua-oreno3d-biao-qian-sou-suo', - source: ['/tags/:tagid'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/oreno3d/tags/${params.tagid}${searchParams.has('sort') ? '/' + searchParams.get('sort') : ''}`; - }, - }, - { - title: '原作搜索', - docs: 'https://docs.rsshub.app/routes/anime#an-の3dエロ-dong-hua-oreno3d-yuan-zuo-sou-suo', - source: ['/origins/:originid'], - target: (params, url) => { - const searchParams = new URL(url).searchParams; - return `/oreno3d/origins/${params.originid}${searchParams.has('sort') ? '/' + searchParams.get('sort') : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/oreno3d/router.ts b/lib/routes/oreno3d/router.ts deleted file mode 100644 index 5092b66e2..000000000 --- a/lib/routes/oreno3d/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/authors/:authorid/:sort/:pagelimit?', './main'); - router.get('/characters/:characterid/:sort/:pagelimit?', './main'); - router.get('/origins/:originid/:sort/:pagelimit?', './main'); - router.get('/search/:keyword/:sort/:pagelimit?', './main'); - router.get('/tags/:tagid/:sort/:pagelimit?', './main'); -}; diff --git a/lib/routes/oschina/maintainer.ts b/lib/routes/oschina/maintainer.ts deleted file mode 100644 index 15543bbeb..000000000 --- a/lib/routes/oschina/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/news/:category?': ['tgly307', 'zengxs'], - '/topic/:topic': ['loveely7'], - '/u/:id': ['dxmpalb'], - '/user/:id': ['dxmpalb'], -}; diff --git a/lib/routes/oschina/namespace.ts b/lib/routes/oschina/namespace.ts new file mode 100644 index 000000000..c14d84446 --- /dev/null +++ b/lib/routes/oschina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '开源中国', + url: 'oschina.net', +}; diff --git a/lib/routes/oschina/news.ts b/lib/routes/oschina/news.ts index 877fd72fe..84dd58ca9 100644 --- a/lib/routes/oschina/news.ts +++ b/lib/routes/oschina/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; @@ -32,7 +33,44 @@ const configs = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['programming'], + example: '/oschina/news/project', + parameters: { category: '板块名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['oschina.net/news/:category'], + target: '/news/:category', + }, + name: '资讯', + maintainers: ['tgly307', 'zengxs'], + handler, + description: `| [综合资讯][osc_gen] | [软件更新资讯][osc_proj] | [行业资讯][osc_ind] | [编程语言资讯][osc_pl] | + | ------------------- | ------------------------ | ------------------- | ---------------------- | + | industry | project | industry-news | programming | + + 订阅 [全部板块资讯][osc_all] 可以使用 [https://rsshub.app/oschina/news](https://rsshub.app/oschina/news) + + [osc_all]: https://www.oschina.net/news "开源中国 - 全部资讯" + + [osc_gen]: https://www.oschina.net/news/industry "开源中国 - 综合资讯" + + [osc_proj]: https://www.oschina.net/news/project "开源中国 - 软件更新资讯" + + [osc_ind]: https://www.oschina.net/news/industry-news "开源中国 - 行业资讯" + + [osc_pl]: https://www.oschina.net/news/programming "开源中国 - 编程语言资讯"`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const config = configs[category]; @@ -87,9 +125,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `开源中国-${config.name}`, link: config.link, item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/oschina/radar.ts b/lib/routes/oschina/radar.ts deleted file mode 100644 index bb40dce35..000000000 --- a/lib/routes/oschina/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'oschina.net': { - _name: '开源中国', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/programming#kai-yuan-zhong-guo', - source: ['/news/:category'], - target: '/oschina/news/:category', - }, - { - title: '问答主题', - docs: 'https://docs.rsshub.app/routes/programming#kai-yuan-zhong-guo', - source: ['/question/topic/:topic'], - target: '/oschina/topic/:topic', - }, - ], - my: [ - { - title: '用户博客', - docs: 'https://docs.rsshub.app/routes/programming#kai-yuan-zhong-guo', - source: ['/:id'], - target: '/oschina/user/:id', - }, - { - title: '数字型账号用户博客', - docs: 'https://docs.rsshub.app/routes/programming#kai-yuan-zhong-guo', - source: ['/u/:uid'], - target: '/oschina/u/:uid', - }, - ], - }, -}; diff --git a/lib/routes/oschina/router.ts b/lib/routes/oschina/router.ts deleted file mode 100644 index b0dac120b..000000000 --- a/lib/routes/oschina/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); - router.get('/topic/:topic', './topic'); - router.get('/u/:uid', './user'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/oschina/topic.ts b/lib/routes/oschina/topic.ts index c2e1ef675..6ccfa5ef3 100644 --- a/lib/routes/oschina/topic.ts +++ b/lib/routes/oschina/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; @@ -10,7 +11,28 @@ async function loadContent(link) { return content; } -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['programming'], + example: '/oschina/topic/weekly-news', + parameters: { topic: '主题名,可从 [全部主题](https://www.oschina.net/question/topics) 进入主题页,在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['oschina.net/question/topic/:topic'], + }, + name: '问答主题', + maintainers: ['loveely7'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const topicUrl = `https://www.oschina.net/question/topic/${topic}?show=time`; @@ -45,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `开源中国-${topicName}`, description: $('.topic-introduction').text(), link: topicUrl, item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/oschina/user.ts b/lib/routes/oschina/user.ts index 4ab3a3417..4ab097706 100644 --- a/lib/routes/oschina/user.ts +++ b/lib/routes/oschina/user.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: ['/u/:uid', '/user/:id'], + categories: ['programming'], + example: '/oschina/u/3920392', + parameters: { uid: '用户 id,可通过查看用户博客网址得到,以 u/数字结尾,数字即为 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['my.oschina.net/u/:uid'], + }, + name: '数字型账号用户博客', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { id, uid } = ctx.req.param(); const res = id ? await got(`https://my.oschina.net/${id}`) : await got(`https://my.oschina.net/u/${uid}`); const $ = load(res.data); @@ -42,10 +64,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: author + '的博客', description: $('.user-text .user-signature').text(), link: `https://my.oschina.net/${id ?? uid}`, item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/oshwhub/explore.ts b/lib/routes/oshwhub/explore.ts index 41d985cfe..1d9a41dd1 100644 --- a/lib/routes/oshwhub/explore.ts +++ b/lib/routes/oshwhub/explore.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -52,7 +53,25 @@ const requestImages = (url, tryGet) => return { images, boms }; }); -export default async (ctx) => { +export const route: Route = { + path: '/:sortType?', + categories: ['other'], + example: '/oshwhub', + parameters: { sortType: 'sortType' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'OpenSource Square', + maintainers: ['tylinux'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://oshwhub.com'; const sortType = ctx.req.param('sortType') ?? 'updatedTime'; @@ -117,10 +136,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, link: url, description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/oshwhub/maintainer.ts b/lib/routes/oshwhub/maintainer.ts deleted file mode 100644 index c696e80b3..000000000 --- a/lib/routes/oshwhub/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:sortType?': ['tylinux'], -}; diff --git a/lib/routes/oshwhub/namespace.ts b/lib/routes/oshwhub/namespace.ts new file mode 100644 index 000000000..b03916bfa --- /dev/null +++ b/lib/routes/oshwhub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'oshwhub 立创开源硬件平台', + url: 'oshwhub.com', +}; diff --git a/lib/routes/oshwhub/radar.ts b/lib/routes/oshwhub/radar.ts deleted file mode 100644 index 9ba77568c..000000000 --- a/lib/routes/oshwhub/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'oshwhub.com': { - _name: '立创开源硬件平台', - '.': [ - { - title: '开源广场', - docs: 'https://docs.rsshub.app/routes/other#li-chuang-kai-yuan-ying-jian-ping-tai', - source: ['/explore'], - target: (_, url) => { - const sortType = new URL(url).searchParams.get('projectSort'); - return sortType ? `/oshwhub/${sortType}` : ''; - }, - }, - ], - }, -}; diff --git a/lib/routes/oshwhub/router.ts b/lib/routes/oshwhub/router.ts deleted file mode 100644 index 26dc16c7c..000000000 --- a/lib/routes/oshwhub/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:sortType?', './explore'); -}; diff --git a/lib/routes/osu/beatmaps/packs.ts b/lib/routes/osu/beatmaps/packs.ts index d36ca5ce2..e48bc2b96 100644 --- a/lib/routes/osu/beatmaps/packs.ts +++ b/lib/routes/osu/beatmaps/packs.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/packs/:type?', + categories: ['game'], + example: '/osu/packs', + parameters: { type: 'pack type, default to `standard`, can choose from `featured`, `tournament`, `loved`, `chart`, `theme` and `artist`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Beatmap Packs', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const { type = 'standard' } = ctx.req.param(); const link = `https://osu.ppy.sh/beatmaps/packs?type=${type}`; @@ -11,7 +30,7 @@ export default async (ctx) => { const $ = load(response.data); const itemList = $('.beatmap-pack'); - ctx.set('data', { + return { title: `osu! Beatmap Pack - ${type}`, link, item: itemList.toArray().map((element) => { @@ -31,5 +50,5 @@ export default async (ctx) => { author, }; }), - }); -}; + }; +} diff --git a/lib/routes/osu/maintainer.ts b/lib/routes/osu/maintainer.ts deleted file mode 100644 index 0029e7da0..000000000 --- a/lib/routes/osu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/packs/:type?': ['JimenezLi'], -}; diff --git a/lib/routes/osu/namespace.ts b/lib/routes/osu/namespace.ts new file mode 100644 index 000000000..0ae63e530 --- /dev/null +++ b/lib/routes/osu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'osu!', + url: 'osu.ppy.sh', +}; diff --git a/lib/routes/osu/radar.ts b/lib/routes/osu/radar.ts deleted file mode 100644 index f80361bd3..000000000 --- a/lib/routes/osu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ppy.sh': { - _name: 'osu!', - osu: [ - { - title: 'Beatmap Pack', - docs: 'https://docs.rsshub.app/routes/game#osu-beatmap-packs', - source: '/beatmaps/packs', - target: (params, url) => `https://osu.ppy.sh/beatmaps/packs?type=${new URL(url).searchParams.get('type') ?? 'standard'}`, - }, - ], - }, -}; diff --git a/lib/routes/osu/router.ts b/lib/routes/osu/router.ts deleted file mode 100644 index b6add5e08..000000000 --- a/lib/routes/osu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/packs/:type?', './beatmaps/packs'); -}; diff --git a/lib/routes/otobanana/cast.ts b/lib/routes/otobanana/cast.ts index ca0f2ea5c..30ef1bab0 100644 --- a/lib/routes/otobanana/cast.ts +++ b/lib/routes/otobanana/cast.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiBase, baseUrl, getUserInfo, renderCast } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/cast', + categories: ['multimedia'], + example: '/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/cast', + parameters: { id: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['otobanana.com/user/:id/cast', 'otobanana.com/user/:id'], + }, + name: 'Cast 音声投稿', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const userInfo = await getUserInfo(id, cache.tryGet); @@ -10,7 +32,7 @@ export default async (ctx) => { const casts = castData.results.map((item) => renderCast(item)); - ctx.set('data', { + return { title: `${userInfo.name} (@${userInfo.username}) - 音声投稿 | OTOBANANA`, description: userInfo.bio.replaceAll('\n', ' '), link: `${baseUrl}/user/${id}`, @@ -21,10 +43,10 @@ export default async (ctx) => { author: userInfo.name, itunes_author: userInfo.name, item: casts, - }); + }; ctx.set('json', { userInfo, castData, }); -}; +} diff --git a/lib/routes/otobanana/livestream.ts b/lib/routes/otobanana/livestream.ts index 2fe9d9ba9..959bedcbf 100644 --- a/lib/routes/otobanana/livestream.ts +++ b/lib/routes/otobanana/livestream.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiBase, baseUrl, getUserInfo, renderLive } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/livestream', + categories: ['multimedia'], + example: '/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/livestream', + parameters: { id: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['otobanana.com/user/:id/livestream', 'otobanana.com/user/:id'], + }, + name: 'Livestream ライブ配信', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const userInfo = await getUserInfo(id, cache.tryGet); @@ -10,7 +32,7 @@ export default async (ctx) => { const casts = liveData.results.map((item) => renderLive(item)); - ctx.set('data', { + return { title: `${userInfo.name} (@${userInfo.username}) - ライブ配信 | OTOBANANA`, description: userInfo.bio.replaceAll('\n', ' '), link: `${baseUrl}/user/${id}`, @@ -21,10 +43,10 @@ export default async (ctx) => { author: userInfo.name, itunes_author: userInfo.name, item: casts, - }); + }; ctx.set('json', { userInfo, liveData, }); -}; +} diff --git a/lib/routes/otobanana/maintainer.ts b/lib/routes/otobanana/maintainer.ts deleted file mode 100644 index 2643faa59..000000000 --- a/lib/routes/otobanana/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/user/:id': ['TonyRL'], - '/user/:id/cast': ['TonyRL'], - '/user/:id/livestream': ['TonyRL'], -}; diff --git a/lib/routes/otobanana/namespace.ts b/lib/routes/otobanana/namespace.ts new file mode 100644 index 000000000..d7fc4fe8d --- /dev/null +++ b/lib/routes/otobanana/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'OTOBANANA', + url: 'otobanana.com', +}; diff --git a/lib/routes/otobanana/radar.ts b/lib/routes/otobanana/radar.ts deleted file mode 100644 index 348a5b43a..000000000 --- a/lib/routes/otobanana/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'otobanana.com': { - _name: 'OTOBANANA', - '.': [ - { - title: 'Timeline タイムライン', - docs: 'https://docs.rsshub.app/multimedia#otobanana', - source: ['/user/:id'], - target: '/otobanana/user/:id', - }, - { - title: 'Cast 音声投稿', - docs: 'https://docs.rsshub.app/multimedia#otobanana', - source: ['/user/:id/cast', '/user/:id'], - target: '/otobanana/user/:id/cast', - }, - { - title: 'Livestream ライブ配信', - docs: 'https://docs.rsshub.app/multimedia#otobanana', - source: ['/user/:id/livestream', '/user/:id'], - target: '/otobanana/user/:id/livestream', - }, - ], - }, -}; diff --git a/lib/routes/otobanana/router.ts b/lib/routes/otobanana/router.ts deleted file mode 100644 index 3cfd941f4..000000000 --- a/lib/routes/otobanana/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/user/:id', './timeline'); - router.get('/user/:id/cast', './cast'); - router.get('/user/:id/livestream', './livestream'); -}; diff --git a/lib/routes/otobanana/timeline.ts b/lib/routes/otobanana/timeline.ts index 946d3e89b..2a7579244 100644 --- a/lib/routes/otobanana/timeline.ts +++ b/lib/routes/otobanana/timeline.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiBase, baseUrl, getUserInfo, renderPost } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['multimedia'], + example: '/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1', + parameters: { id: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['otobanana.com/user/:id'], + }, + name: 'Timeline タイムライン', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const userInfo = await getUserInfo(id, cache.tryGet); @@ -10,7 +32,7 @@ export default async (ctx) => { const posts = postData.results.map((item) => renderPost(item)); - ctx.set('data', { + return { title: `${userInfo.name} (@${userInfo.username}) - タイムライン | OTOBANANA`, description: userInfo.bio.replaceAll('\n', ' '), link: `${baseUrl}/user/${id}`, @@ -21,10 +43,10 @@ export default async (ctx) => { author: userInfo.name, itunes_author: userInfo.name, item: posts, - }); + }; ctx.set('json', { userInfo, postData, }); -}; +} diff --git a/lib/routes/ouc/it-postgraduate.ts b/lib/routes/ouc/it-postgraduate.ts index 89f329927..634c058f2 100644 --- a/lib/routes/ouc/it-postgraduate.ts +++ b/lib/routes/ouc/it-postgraduate.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/it/postgraduate', + categories: ['university'], + example: '/ouc/it/postgraduate', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['it.ouc.edu.cn/_s381/16619/list.psp', 'it.ouc.edu.cn/16619/list.htm', 'it.ouc.edu.cn/'], + }, + name: '信息科学与工程学院研究生招生通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'it.ouc.edu.cn/_s381/16619/list.psp', +}; + +async function handler() { const link = 'https://it.ouc.edu.cn/_s381/16619/list.psp'; const response = await got(link); const $ = load(response.data); const list = $('.col_news_list .news_list li'); - ctx.set('data', { + return { title: '中国海洋大学信息科学与工程学院', link, description: '中国海洋大学信息科学与工程学院研究生招生通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/ouc/it-tx.ts b/lib/routes/ouc/it-tx.ts index bf761ffdc..30fb1c545 100644 --- a/lib/routes/ouc/it-tx.ts +++ b/lib/routes/ouc/it-tx.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/it/tx/:id?', + categories: ['university'], + example: '/ouc/it/tx/xwdt', + parameters: { id: '默认为 `xwdt`,id过多,这里只举几个例' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['it.ouc.edu.cn/tx/:id/list.htm'], + target: '/it/tx/:id', + }, + name: '信息科学与工程学院团学工作', + maintainers: ['3401797899'], + handler, + url: 'it.ouc.edu.cn/', + description: `| 新闻动态 | 学院活动 | 奖助工作获奖情况 | + | -------- | -------- | ---------------- | + | xwdt | tzgg | 21758 |`, +}; + +async function handler(ctx) { const host = 'https://it.ouc.edu.cn'; const id = ctx.req.param('id') || 'xwdt'; const link = `${host}/tx/${id}/list.htm`; @@ -36,10 +63,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `信息科学与工程学院团学工作 - ${typeTitle}${title === typeTitle ? '' : title}`, description: '中国海洋大学信息科学与工程学院团学工作', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/ouc/it.ts b/lib/routes/ouc/it.ts index 528558e57..6e8a37cf5 100644 --- a/lib/routes/ouc/it.ts +++ b/lib/routes/ouc/it.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/it/:type?', + categories: ['university'], + example: '/ouc/it/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['it.ouc.edu.cn/'], + target: '/it', + }, + name: '信息科学与工程学院', + maintainers: ['GeoffreyChen777', '3401797899'], + handler, + url: 'it.ouc.edu.cn/', + description: `| 学院要闻 | 学院公告 | 学院活动 | + | -------- | -------- | -------- | + | 0 | 1 | 2 |`, +}; + +async function handler(ctx) { const host = 'https://it.ouc.edu.cn'; const typelist = ['学院要闻', '学院公告', '学术活动']; const urlList = ['xyyw/list.htm', 'xygg/list.htm', 'xshd/list.htm']; @@ -36,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `中国海洋大学信息科学与工程学院${typelist[type]}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/ouc/jwc.ts b/lib/routes/ouc/jwc.ts index ba50ff5b7..e4f25f6b0 100644 --- a/lib/routes/ouc/jwc.ts +++ b/lib/routes/ouc/jwc.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/ouc/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.ouc.edu.cn/', 'jwc.ouc.edu.cn/6517/list.htm'], + }, + name: '教务处', + maintainers: ['3401797899'], + handler, + url: 'jwc.ouc.edu.cn/', +}; + +async function handler() { const link = 'https://jwc.ouc.edu.cn/6517/list.htm'; const response = await got(link); const $ = load(response.data); @@ -31,10 +54,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中国海洋大学教务处', link, description: '中国海洋大学教务处最新通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/ouc/jwgl.ts b/lib/routes/ouc/jwgl.ts index 7d181856f..ff8d019bb 100644 --- a/lib/routes/ouc/jwgl.ts +++ b/lib/routes/ouc/jwgl.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jwgl', + categories: ['university'], + example: '/ouc/jwgl', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwgl.ouc.edu.cn/cas/login.action', 'jwgl.ouc.edu.cn/public/SchoolNotice.jsp'], + }, + name: '选课信息教务通知', + maintainers: ['3401797899'], + handler, + url: 'jwgl.ouc.edu.cn/cas/login.action', + description: `:::warning + 由于选课通知仅允许校园网访问,需自行部署。 + :::`, +}; + +async function handler() { const link = 'http://jwgl.ouc.edu.cn/public/listSchoolNotices.action?currentPage=1&recordsPerPage=15&qtitle='; const response = await got(link); const $ = load(response.data); @@ -34,10 +60,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中国海洋大学选课信息教务通知', link, description: '中国海洋大学选课信息教务通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/ouc/maintainer.ts b/lib/routes/ouc/maintainer.ts deleted file mode 100644 index 1e33d54a7..000000000 --- a/lib/routes/ouc/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/it/postgraduate': ['shengmaosu'], - '/it/tx/:id?': ['3401797899'], - '/it/:type?': ['GeoffreyChen777', '3401797899'], - '/jwc': ['3401797899'], - '/jwgl': ['3401797899'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/ouc/namespace.ts b/lib/routes/ouc/namespace.ts new file mode 100644 index 000000000..4ece75f72 --- /dev/null +++ b/lib/routes/ouc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国海洋大学', + url: 'it.ouc.edu.cn', +}; diff --git a/lib/routes/ouc/radar.ts b/lib/routes/ouc/radar.ts deleted file mode 100644 index be94b2e50..000000000 --- a/lib/routes/ouc/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'ouc.edu.cn': { - _name: '中国海洋大学', - it: [ - { - title: '信息科学与工程学院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue', - source: ['/'], - target: '/ouc/it', - }, - { - title: '信息科学与工程学院研究生招生通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue', - source: ['/_s381/16619/list.psp', '/16619/list.htm', '/'], - target: '/ouc/it/postgraduate', - }, - { - title: '信息科学与工程学部团学工作', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-tuan-xue-gong-zuo', - source: ['/tx/:id/list.htm'], - target: '/ouc/it/tx/:id', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue', - source: ['/', '/6517/list.htm'], - target: '/ouc/jwc', - }, - ], - jwgl: [ - { - title: '选课信息教务通知', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue', - source: ['/cas/login.action', '/public/SchoolNotice.jsp'], - target: '/ouc/jwgl', - }, - ], - yz: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-hai-yang-da-xue', - source: ['/5926/list.htm'], - target: '/ouc/yjs', - }, - ], - }, -}; diff --git a/lib/routes/ouc/router.ts b/lib/routes/ouc/router.ts deleted file mode 100644 index 368bf9b05..000000000 --- a/lib/routes/ouc/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/it/postgraduate', './it-postgraduate'); - router.get('/it/tx/:id?', './it-tx'); - router.get('/it/:type?', './it'); - router.get('/jwc', './jwc'); - router.get('/jwgl', './jwgl'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/ouc/yjs.ts b/lib/routes/ouc/yjs.ts index 553db0cf9..f19aec865 100644 --- a/lib/routes/ouc/yjs.ts +++ b/lib/routes/ouc/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/ouc/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.ouc.edu.cn/5926/list.htm'], + }, + name: '研究生院', + maintainers: ['shengmaosu'], + handler, + url: 'yz.ouc.edu.cn/5926/list.htm', +}; + +async function handler() { const link = 'https://yz.ouc.edu.cn/5926/list.htm'; const response = await got(link); const $ = load(response.data); const list = $('.wp_article_list li'); - ctx.set('data', { + return { title: '中国海洋大学研究生院', link, description: '中国海洋大学研究生院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('.Article_PublishDate').text()), }; }), - }); -}; + }; +} diff --git a/lib/routes/oup/index.ts b/lib/routes/oup/index.ts index 9e5008728..f4715e70e 100644 --- a/lib/routes/oup/index.ts +++ b/lib/routes/oup/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import { art } from '@/utils/render'; const rootUrl = 'https://academic.oup.com'; -export default async (ctx) => { +export const route: Route = { + path: '/journals/:name', + categories: ['journal'], + example: '/oup/journals/adaptation', + parameters: { name: 'short name for a journal, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['academic.oup.com/', 'academic.oup.com/:name/issue'], + }, + name: 'Oxford Academic', + maintainers: [], + handler, + url: 'academic.oup.com/', + description: `#### Journal {#oxford-university-press-oxford-academic-journal}`, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const url = `${rootUrl}/${name}/issue`; @@ -49,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `OUP - ${name}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/oup/maintainer.ts b/lib/routes/oup/maintainer.ts deleted file mode 100644 index 35f7e8a7b..000000000 --- a/lib/routes/oup/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:name': ['Fatpandac'], -}; diff --git a/lib/routes/oup/namespace.ts b/lib/routes/oup/namespace.ts new file mode 100644 index 000000000..0be762567 --- /dev/null +++ b/lib/routes/oup/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Oxford University Press', + url: 'academic.oup.com', +}; diff --git a/lib/routes/oup/radar.ts b/lib/routes/oup/radar.ts deleted file mode 100644 index 5f2bb271e..000000000 --- a/lib/routes/oup/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'oup.com': { - _name: 'Oxford University Press', - academic: [ - { - title: '期刊', - docs: 'https://docs.rsshub.app/routes/journal#oxford-university-press', - source: ['/', '/:name/issue'], - target: '/oup/journals/:name', - }, - ], - }, -}; diff --git a/lib/routes/oup/router.ts b/lib/routes/oup/router.ts deleted file mode 100644 index 281b92222..000000000 --- a/lib/routes/oup/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journals/:name', './index'); -}; diff --git a/lib/routes/outagereport/index.ts b/lib/routes/outagereport/index.ts index d012344d3..6585dc39b 100644 --- a/lib/routes/outagereport/index.ts +++ b/lib/routes/outagereport/index.ts @@ -1,8 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; const baseUrl = 'https://outage.report/'; -export default async (ctx) => { +export const route: Route = { + path: '/:name/:count?', + categories: ['forecast'], + example: '/outagereport/ubisoft/5', + parameters: { name: 'Service name, spelling format must be consistent with URL', count: 'Counting threshold, will only be written in RSS if the number of people who report to stop serving is not less than this number' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Report', + maintainers: ['cxumol', 'nczitzk'], + handler, + description: `Please skip the local service area code for \`name\`, for example \`https://outage.report/us/verizon-wireless\` to \`verizon-wireless\`.`, +}; + +async function handler(ctx) { const serviceName = ctx.req.param('name'); // Which service do you want to monitor? Have to be the same as what it appears in URL. const watchCount = ctx.req.param('count') || 10; // How many reports is received during last 20 minutes? 10 reports as default. const url = `${baseUrl}${serviceName}`; @@ -41,11 +61,11 @@ export default async (ctx) => { } // how this RSS feed looks like - ctx.set('data', { + return { title: `Is ${serviceName} Down Right Now?`, link: url, description: rssDescribe, item: outageHistory, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/outagereport/maintainer.ts b/lib/routes/outagereport/maintainer.ts deleted file mode 100644 index 191e3dcfb..000000000 --- a/lib/routes/outagereport/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:name/:count?': ['cxumol', 'nczitzk'], -}; diff --git a/lib/routes/outagereport/namespace.ts b/lib/routes/outagereport/namespace.ts new file mode 100644 index 000000000..2f29f3a0c --- /dev/null +++ b/lib/routes/outagereport/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Outage.Report', + url: 'outage.report', +}; diff --git a/lib/routes/outagereport/radar.ts b/lib/routes/outagereport/radar.ts deleted file mode 100644 index 2f610f265..000000000 --- a/lib/routes/outagereport/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'outage.report': { - _name: 'Outage.Report', - '.': [ - { - title: 'Report', - docs: 'https://docs.rsshub.app/routes/forecast#outage-report', - source: ['/'], - target: (params, url) => `/outagereport/${new URL(url).toString().split('/').pop()}`, - }, - ], - }, -}; diff --git a/lib/routes/outagereport/router.ts b/lib/routes/outagereport/router.ts deleted file mode 100644 index 6d7cb82d2..000000000 --- a/lib/routes/outagereport/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:name/:count?', './index'); -}; diff --git a/lib/routes/panewslab/author.ts b/lib/routes/panewslab/author.ts index 30beb1cc9..eef250164 100644 --- a/lib/routes/panewslab/author.ts +++ b/lib/routes/panewslab/author.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/author/:id', '/column/:id'], + categories: ['new-media'], + example: '/panewslab/author/166', + parameters: { id: '专栏 id,可在地址栏 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['panewslab.com/'], + }, + name: '专栏', + maintainers: ['nczitzk'], + handler, + url: 'panewslab.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://panewslab.com'; @@ -41,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `PANews - ${items[0].author}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/panewslab/index.ts b/lib/routes/panewslab/index.ts index 66cc99ef5..bfee9ce42 100644 --- a/lib/routes/panewslab/index.ts +++ b/lib/routes/panewslab/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,31 @@ const categories = { 活动: 'zqives', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/panewslab', + parameters: { category: '分类,见下表,默认为精选' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['panewslab.com/'], + }, + name: '深度', + maintainers: ['nczitzk'], + handler, + url: 'panewslab.com/', + description: `| 精选 | 链游 | 元宇宙 | NFT | DeFi | 监管 | 央行数字货币 | 波卡 | Layer 2 | DAO | 融资 | 活动 | + | ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '精选'; const rootUrl = 'https://panewslab.com'; @@ -56,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `PANews - ${category}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/panewslab/maintainer.ts b/lib/routes/panewslab/maintainer.ts deleted file mode 100644 index 071487c0c..000000000 --- a/lib/routes/panewslab/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/author/:id': ['nczitzk'], - '/column/:id': ['nczitzk'], - '/news': ['nczitzk'], - '/newsflash': ['nczitzk'], - '/topic/:id': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/panewslab/namespace.ts b/lib/routes/panewslab/namespace.ts new file mode 100644 index 000000000..c814b552d --- /dev/null +++ b/lib/routes/panewslab/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PANews', + url: 'panewslab.com', +}; diff --git a/lib/routes/panewslab/news.ts b/lib/routes/panewslab/news.ts index 84f648516..78fc768dc 100644 --- a/lib/routes/panewslab/news.ts +++ b/lib/routes/panewslab/news.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/news', '/newsflash'], + categories: ['new-media'], + example: '/panewslab/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['panewslab.com/'], + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + url: 'panewslab.com/', + url: 'panewslab.com/', +}; + +async function handler(ctx) { const rootUrl = 'https://panewslab.com'; const apiUrl = `${rootUrl}/webapi/flashnews?LId=1&Rn=${ctx.req.query('limit') ?? 50}&tw=0`; const currentUrl = `${rootUrl}/zh/news/index.html`; @@ -20,9 +44,9 @@ export default async (ctx) => { category: item.tags, })); - ctx.set('data', { + return { title: 'PANews - 快讯', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/panewslab/radar.ts b/lib/routes/panewslab/radar.ts deleted file mode 100644 index 2ac83fdb9..000000000 --- a/lib/routes/panewslab/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'panewslab.com': { - _name: 'PANews', - '.': [ - { - title: '深度', - docs: 'https://docs.rsshub.app/routes/new-media#panews-shen-du', - source: '/', - target: '/panewslab/:category?', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#panews-kuai-xun', - source: '/', - target: '/panewslab/news', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#panews-zhuan-lan', - source: '/', - target: '/panewslab/author/:id', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#panews-zhuan-ti', - source: '/', - target: '/panewslab/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/panewslab/router.ts b/lib/routes/panewslab/router.ts deleted file mode 100644 index b99c746b4..000000000 --- a/lib/routes/panewslab/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/author/:id', './author'); - router.get('/column/:id', './author'); - router.get('/news', './news'); - router.get('/newsflash', './news'); - router.get('/topic/:id', './topic'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/panewslab/topic.ts b/lib/routes/panewslab/topic.ts index 93f7b3949..5a291f22d 100644 --- a/lib/routes/panewslab/topic.ts +++ b/lib/routes/panewslab/topic.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id', + categories: ['new-media'], + example: '/panewslab/topic/1629365774078402', + parameters: { id: '专题 id,可在地址栏 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['panewslab.com/'], + }, + name: '专题', + maintainers: ['nczitzk'], + handler, + url: 'panewslab.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://panewslab.com'; @@ -41,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `PANews - ${id}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/papers/index.ts b/lib/routes/papers/index.ts index 424b0cda8..244788624 100644 --- a/lib/routes/papers/index.ts +++ b/lib/routes/papers/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'arxiv/cs.CL' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 150; @@ -67,7 +75,7 @@ export default async (ctx) => { const title = $('title').text(); const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: title.split(/-/)[0].trim(), link: currentUrl, @@ -75,5 +83,5 @@ export default async (ctx) => { icon, logo: icon, subtitle: $('h1').first().text(), - }); -}; + }; +} diff --git a/lib/routes/papers/maintainer.ts b/lib/routes/papers/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/papers/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/papers/namespace.ts b/lib/routes/papers/namespace.ts new file mode 100644 index 000000000..51e9be2ec --- /dev/null +++ b/lib/routes/papers/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Cool Papers', + url: 'papers.cool', +}; diff --git a/lib/routes/papers/radar.ts b/lib/routes/papers/radar.ts deleted file mode 100644 index 8e644338e..000000000 --- a/lib/routes/papers/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'papers.cool': { - _name: 'Cool Papers', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/journal#cool-papers-category', - source: ['/:category*'], - target: (params) => { - const category = params.category; - - return `/papers${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/papers/router.ts b/lib/routes/papers/router.ts deleted file mode 100644 index acb19ed1b..000000000 --- a/lib/routes/papers/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category{.+}?', './'); -}; diff --git a/lib/routes/paradigm/maintainer.ts b/lib/routes/paradigm/maintainer.ts deleted file mode 100644 index ecfa2a2dd..000000000 --- a/lib/routes/paradigm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/writing': ['Fatpandac'], -}; diff --git a/lib/routes/paradigm/namespace.ts b/lib/routes/paradigm/namespace.ts new file mode 100644 index 000000000..524d79b45 --- /dev/null +++ b/lib/routes/paradigm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Paradigm', + url: 'paradigm.xyz', +}; diff --git a/lib/routes/paradigm/radar.ts b/lib/routes/paradigm/radar.ts deleted file mode 100644 index d3f79567d..000000000 --- a/lib/routes/paradigm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'paradigm.xyz': { - _name: 'Paradigm', - '.': [ - { - title: 'Writing', - docs: 'https://docs.rsshub.app/routes/finance#paradigm', - source: ['/writing'], - target: '/paradigm/writing', - }, - ], - }, -}; diff --git a/lib/routes/paradigm/router.ts b/lib/routes/paradigm/router.ts deleted file mode 100644 index cebd17566..000000000 --- a/lib/routes/paradigm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/writing', './writing'); -}; diff --git a/lib/routes/paradigm/writing.ts b/lib/routes/paradigm/writing.ts index 15ca73957..dd994fbd3 100644 --- a/lib/routes/paradigm/writing.ts +++ b/lib/routes/paradigm/writing.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.paradigm.xyz'; -export default async (ctx) => { +export const route: Route = { + path: '/writing', + categories: ['finance'], + example: '/paradigm/writing', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['paradigm.xyz/writing'], + }, + name: 'Writing', + maintainers: ['Fatpandac'], + handler, + url: 'paradigm.xyz/writing', +}; + +async function handler() { const url = `${baseUrl}/writing`; const response = await got(url); @@ -37,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Paradigm - Writing', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/parliament/maintainer.ts b/lib/routes/parliament/maintainer.ts deleted file mode 100644 index 7237afa86..000000000 --- a/lib/routes/parliament/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/section77/:type?': ['itpcc'], -}; diff --git a/lib/routes/parliament/namespace.ts b/lib/routes/parliament/namespace.ts new file mode 100644 index 000000000..c9835b111 --- /dev/null +++ b/lib/routes/parliament/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Thailand Parliament', + url: 'parliament.go.th', +}; diff --git a/lib/routes/parliament/radar.ts b/lib/routes/parliament/radar.ts deleted file mode 100644 index d40190f7b..000000000 --- a/lib/routes/parliament/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'parliament.go.th': { - _name: 'รัฐสภา', - '.': [ - { - title: 'รับฟังความคิดเห็นต่อร่าง พ.ร.บ. ตามมาตรา 77 ของรัฐธรรมนูญ', - docs: 'https://docs.rsshub.app/routes/government#thailand-parliament', - source: ['/section77/index.php', '/section77/survey_list77.php', '/section77/survey_more_news.php'], - target: (_params, url) => { - const queryParams = new URL(url).searchParams; - let rssPath = '/parliament/section77'; - if (!queryParams.has('type')) { - return rssPath; - } - - rssPath += `/${encodeURIComponent(queryParams.get('type'))}`; - return rssPath; - }, - }, - ], - }, -}; diff --git a/lib/routes/parliament/router.ts b/lib/routes/parliament/router.ts deleted file mode 100644 index 4823c2dc9..000000000 --- a/lib/routes/parliament/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/section77/:type?', './section77'); -}; diff --git a/lib/routes/parliament/section77.ts b/lib/routes/parliament/section77.ts index 2d65202a1..ba55902f1 100644 --- a/lib/routes/parliament/section77.ts +++ b/lib/routes/parliament/section77.ts @@ -1,10 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { CookieJar } from 'tough-cookie'; -export default async (ctx) => { +export const route: Route = { + path: '/section77/:type?', + categories: ['government'], + example: '/parliament/section77', + parameters: { type: 'Type of hearing status, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: "Thailand Parliament Draft of Law's public hearing system", + maintainers: ['itpcc'], + handler, + description: `| Presented by MP \* | Presented by People \* | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected | + | ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- | + | presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm | + | เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง | + + *Note:* For \`presentbymp\` and \`presentbyperson\`, it can also add: + + - \`-m\` for the draft which Speaker of Parliament considered as a monetary draft (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า เป็นร่างการเงิน), or + - \`-nm\` for non-monetary one (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า ไม่เป็นร่างการเงิน).`, +}; + +async function handler(ctx) { const baseUrl = 'https://www.parliament.go.th/section77'; const { type = '' } = ctx.req.param(); const cookieJar = new CookieJar(); @@ -159,4 +187,4 @@ export default async (ctx) => { result.item = actListFull; ctx.set('data', result); -}; +} diff --git a/lib/routes/patagonia/maintainer.ts b/lib/routes/patagonia/maintainer.ts deleted file mode 100644 index 9ae867863..000000000 --- a/lib/routes/patagonia/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/patagonia/new-arrivals/:category': ['EthanWng97'], -}; diff --git a/lib/routes/patagonia/namespace.ts b/lib/routes/patagonia/namespace.ts new file mode 100644 index 000000000..dc1334c7a --- /dev/null +++ b/lib/routes/patagonia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Patagonia', + url: 'patagonia.com', +}; diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.ts index 6d33ec678..8bf6a8e77 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -18,7 +19,28 @@ function extractSfrmUrl(url) { urlObj.search = new URLSearchParams({ sfrm: sfrmValue }).toString(); return urlObj.toString(); } -export default async (ctx) => { +export const route: Route = { + path: '/new-arrivals/:category', + categories: ['shopping'], + example: '/patagonia/new-arrivals/mens', + parameters: { category: 'category, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'New Arrivals', + maintainers: [], + handler, + description: `| Men's | Women's | Kids' & Baby | Packs & Gear | + | ----- | ------- | ------------ | ------------ | + | mens | womens | kids | luggage |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const url = `${host}/on/demandware.store/Sites-patagonia-us-Site/en_US/Search-LazyGrid`; const response = await got({ @@ -50,7 +72,7 @@ export default async (ctx) => { return data; }) .get(); - ctx.set('data', { + return { title: `Patagonia - New Arrivals - ${category.toUpperCase()}`, link: `${host}/shop/${categoryMap[category][1]}`, description: `Patagonia - New Arrivals - ${category.toUpperCase()}`, @@ -60,5 +82,5 @@ export default async (ctx) => { link: item.link, category: item.category, })), - }); -}; + }; +} diff --git a/lib/routes/patagonia/radar.ts b/lib/routes/patagonia/radar.ts deleted file mode 100644 index 1cdce49b5..000000000 --- a/lib/routes/patagonia/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'patagonia.com': { - _name: 'Patagonia', - '.': [ - { - title: 'New Arrivals', - docs: 'https://docs.rsshub.app/routes/shopping#patagonia', - source: ['/shop/*new-arrivals'], - target: (_, url) => { - const param = new URL(url).pathname.split('/').pop().replace('-new-arrivals', ''); - if (param === 'new-arrivals') { - return ''; - } - return param === 'kids-baby' ? '/patagonia/new-arrivals/kids' : `/patagonia/new-arrivals/${param}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/patagonia/router.ts b/lib/routes/patagonia/router.ts deleted file mode 100644 index c239f63c3..000000000 --- a/lib/routes/patagonia/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new-arrivals/:category', './new-arrivals'); -}; diff --git a/lib/routes/paulgraham/article.ts b/lib/routes/paulgraham/article.ts index 1899ea143..1327ca1f5 100644 --- a/lib/routes/paulgraham/article.ts +++ b/lib/routes/paulgraham/article.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/articles', '/essays', '/'], + categories: ['blog'], + example: '/paulgraham/articles', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['paulgraham.com/articles.html'], + }, + name: 'Essays', + maintainers: ['Maecenas', 'nczitzk'], + handler, + url: 'paulgraham.com/articles.html', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; const rootUrl = 'http://paulgraham.com'; @@ -47,7 +70,7 @@ export default async (ctx) => { const title = $('title').text(); const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `${author} - ${title}`, link: currentUrl, @@ -59,5 +82,5 @@ export default async (ctx) => { subtitle: title, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/paulgraham/maintainer.ts b/lib/routes/paulgraham/maintainer.ts deleted file mode 100644 index ec344aa60..000000000 --- a/lib/routes/paulgraham/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/articles': ['Maecenas', 'nczitzk'], -}; diff --git a/lib/routes/paulgraham/namespace.ts b/lib/routes/paulgraham/namespace.ts new file mode 100644 index 000000000..c25c4be92 --- /dev/null +++ b/lib/routes/paulgraham/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Paul Graham', + url: 'paulgraham.com', +}; diff --git a/lib/routes/paulgraham/radar.ts b/lib/routes/paulgraham/radar.ts deleted file mode 100644 index cf5714ede..000000000 --- a/lib/routes/paulgraham/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'paulgraham.com': { - _name: 'Paul Graham', - '.': [ - { - title: 'Essays', - docs: 'https://docs.rsshub.app/routes/blog#paulgraham-essays', - source: ['/articles.html'], - target: '/paulgraham/articles', - }, - ], - }, -}; diff --git a/lib/routes/paulgraham/router.ts b/lib/routes/paulgraham/router.ts deleted file mode 100644 index 2ce60784c..000000000 --- a/lib/routes/paulgraham/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/articles', './article'); - router.get('/essays', './article'); - router.get('/', './article'); -}; diff --git a/lib/routes/penguin-random-house/articles.ts b/lib/routes/penguin-random-house/articles.ts index 34f7103a1..2d6eca048 100644 --- a/lib/routes/penguin-random-house/articles.ts +++ b/lib/routes/penguin-random-house/articles.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/articles', + categories: ['reading'], + example: '/penguin-random-house/articles', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['penguinrandomhouse.com/articles'], + }, + name: 'Articles', + maintainers: ['StevenRCE0'], + handler, + url: 'penguinrandomhouse.com/articles', +}; + +async function handler(ctx) { const link = 'https://www.penguinrandomhouse.com/articles/'; const res = await got(link); const $ = load(res.data); @@ -18,10 +41,10 @@ export default async (ctx) => { const out = await utils.parseList(itemArray, ctx, utils.parseArticle); - ctx.set('data', { + return { title: 'Penguin Random House Articles', link, description: 'In-depth interviews, author essays, fascinating essays. Go deeper into the books you love.', item: out, - }); -}; + }; +} diff --git a/lib/routes/penguin-random-house/maintainer.ts b/lib/routes/penguin-random-house/maintainer.ts deleted file mode 100644 index 236c7c5b8..000000000 --- a/lib/routes/penguin-random-house/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/the-read-down': ['StevenRCE0'], - '/articles': ['StevenRCE0'], -}; diff --git a/lib/routes/penguin-random-house/namespace.ts b/lib/routes/penguin-random-house/namespace.ts new file mode 100644 index 000000000..e8f75805d --- /dev/null +++ b/lib/routes/penguin-random-house/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Penguin Random House', + url: 'penguinrandomhouse.com', +}; diff --git a/lib/routes/penguin-random-house/radar.ts b/lib/routes/penguin-random-house/radar.ts deleted file mode 100644 index 5a8222417..000000000 --- a/lib/routes/penguin-random-house/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'penguinrandomhouse.com': { - _name: 'Penguin Random House', - '.': [ - { - title: 'Penguin Random House Book Lists', - docs: 'https://docs.rsshub.app/routes/reading#penguin-random-house', - source: ['/the-read-down'], - target: '/penguin-random-house/the-read-down', - }, - { - title: 'Penguin Random House Articles', - docs: 'https://docs.rsshub.app/routes/reading#penguin-random-house', - source: ['/articles'], - target: '/penguin-random-house/articles', - }, - ], - }, -}; diff --git a/lib/routes/penguin-random-house/router.ts b/lib/routes/penguin-random-house/router.ts deleted file mode 100644 index 47a09d3b7..000000000 --- a/lib/routes/penguin-random-house/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/articles', './articles'); - router.get('/the-read-down', './thereaddown'); -}; diff --git a/lib/routes/penguin-random-house/thereaddown.ts b/lib/routes/penguin-random-house/thereaddown.ts index 95e492020..31986da90 100644 --- a/lib/routes/penguin-random-house/thereaddown.ts +++ b/lib/routes/penguin-random-house/thereaddown.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/the-read-down', + categories: ['reading'], + example: '/penguin-random-house/the-read-down', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['penguinrandomhouse.com/the-read-down'], + }, + name: 'Book Lists', + maintainers: ['StevenRCE0'], + handler, + url: 'penguinrandomhouse.com/the-read-down', +}; + +async function handler(ctx) { const link = 'https://www.penguinrandomhouse.com/the-read-down/'; const res = await got(link); const $ = load(res.data); @@ -18,10 +41,10 @@ export default async (ctx) => { const out = await utils.parseList(itemArray, ctx, utils.parseBooks); - ctx.set('data', { + return { title: 'Penguin Random House Book Lists', link, description: 'Never wonder what to read next! Check out these lists to find your next favorite book.', item: out, - }); -}; + }; +} diff --git a/lib/routes/people/index.ts b/lib/routes/people/index.ts index 363b4bb75..67bb30fa5 100644 --- a/lib/routes/people/index.ts +++ b/lib/routes/people/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,14 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:site?/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { site = 'www' } = ctx.req.param(); let { category = site === 'www' ? '59476' : '' } = ctx.req.param(); category = site === 'cpc' && category === '24h' ? '87228' : category; @@ -71,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/people/liuyan.ts b/lib/routes/people/liuyan.ts index 6a66bc46e..f5927ac25 100644 --- a/lib/routes/people/liuyan.ts +++ b/lib/routes/people/liuyan.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/liuyan/:id/:state?', + categories: ['traditional-media'], + example: '/people/liuyan/539', + parameters: { id: '编号,可在对应人物页 URL 中找到', state: '状态,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['liuyan.people.com.cn/'], + }, + name: '领导留言板', + maintainers: ['nczitzk'], + handler, + url: 'liuyan.people.com.cn/', + description: `| 全部 | 待回复 | 办理中 | 已办理 | + | ---- | ------ | ------ | ------ | + | 1 | 2 | 3 | 4 |`, +}; + +async function handler(ctx) { const fid = ctx.req.param('id'); const state = ctx.req.param('state') ?? '1'; @@ -47,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${currentForum} - 领导留言板 - 人民网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/people/maintainer.ts b/lib/routes/people/maintainer.ts deleted file mode 100644 index f2db14ecd..000000000 --- a/lib/routes/people/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cpc/24h': ['nczitzk'], - '/liuyan/:id/:state?': ['nczitzk'], - '/xjpjh/:keyword?/:year': ['LogicJake'], - '/:site?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/people/namespace.ts b/lib/routes/people/namespace.ts new file mode 100644 index 000000000..75641eaf9 --- /dev/null +++ b/lib/routes/people/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '人民网', + url: 'people.com.cn', +}; diff --git a/lib/routes/people/radar.ts b/lib/routes/people/radar.ts deleted file mode 100644 index 2a14d2054..000000000 --- a/lib/routes/people/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'people.com.cn': { - _name: '人民网', - '.': [ - { - title: '通用', - docs: 'https://docs.rsshub.app/routes/traditional-media#ren-min-wang-tong-yong', - source: '/', - target: '/people/:site?/:category?', - }, - ], - liuyan: [ - { - title: '领导留言板', - docs: 'https://docs.rsshub.app/routes/traditional-media#ren-min-wang-ling-dao-liu-yan-ban', - source: '/', - target: '/people/liuyan/:id/:state?', - }, - ], - }, -}; diff --git a/lib/routes/people/router.ts b/lib/routes/people/router.ts deleted file mode 100644 index b222f1251..000000000 --- a/lib/routes/people/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/liuyan/:id/:state?', './liuyan'); - router.get('/xjpjh/:keyword?/:year?', './xjpjh'); - router.get('/:site?/:category{.+}?', './'); -}; diff --git a/lib/routes/people/xjpjh.ts b/lib/routes/people/xjpjh.ts index 8a7bbe7ce..35dd77ec4 100644 --- a/lib/routes/people/xjpjh.ts +++ b/lib/routes/people/xjpjh.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,30 @@ import * as url from 'node:url'; const host = 'http://jhsjk.people.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/xjpjh/:keyword?/:year?', + categories: ['traditional-media'], + example: '/people/xjpjh', + parameters: { keyword: '关键词,默认不填', year: '年份,默认 all' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['people.com.cn/'], + target: '/:site?/:category?', + }, + name: '习近平系列重要讲话', + maintainers: [], + handler, + url: 'people.com.cn/', +}; + +async function handler(ctx) { let keyword = ctx.req.param('keyword') || 'all'; let year = ctx.req.param('year') || 0; @@ -61,9 +85,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/peopo/maintainer.ts b/lib/routes/peopo/maintainer.ts deleted file mode 100644 index a7b02b05e..000000000 --- a/lib/routes/peopo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:topic?': ['TonyRL'], -}; diff --git a/lib/routes/peopo/namespace.ts b/lib/routes/peopo/namespace.ts new file mode 100644 index 000000000..5bc1f24bf --- /dev/null +++ b/lib/routes/peopo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PeoPo 公民新聞', + url: 'peopo.org', +}; diff --git a/lib/routes/peopo/radar.ts b/lib/routes/peopo/radar.ts deleted file mode 100644 index 2eb1d6986..000000000 --- a/lib/routes/peopo/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'peopo.org': { - _name: 'PeoPo 公民新聞', - '.': [ - { - title: '新聞分類', - docs: 'https://docs.rsshub.app/routes/new-media#peopo-gong-min-xin-wen', - source: '/topic/:topicId', - target: '/peopo/topic/:topicId', - }, - ], - }, -}; diff --git a/lib/routes/peopo/router.ts b/lib/routes/peopo/router.ts deleted file mode 100644 index a7ac0aa6b..000000000 --- a/lib/routes/peopo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:topicId?', './topic'); -}; diff --git a/lib/routes/peopo/topic.ts b/lib/routes/peopo/topic.ts index 485a8765f..459ca6c2f 100644 --- a/lib/routes/peopo/topic.ts +++ b/lib/routes/peopo/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,48 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const baseUrl = 'https://www.peopo.org'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topicId?', + categories: ['new-media'], + example: '/peopo/topic/159', + parameters: { topicId: '分類 ID,見下表,默認為社會關懷' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['peopo.org/topic/:topicId'], + target: '/topic/:topicId', + }, + name: '新聞分類', + maintainers: [], + handler, + description: `| 分類 | ID | + | -------- | --- | + | 社會關懷 | 159 | + | 生態環保 | 113 | + | 文化古蹟 | 143 | + | 社區改造 | 160 | + | 教育學習 | 161 | + | 農業 | 163 | + | 生活休閒 | 162 | + | 媒體觀察 | 164 | + | 運動科技 | 165 | + | 政治經濟 | 166 | + | 北台灣 | 223 | + | 中台灣 | 224 | + | 南台灣 | 225 | + | 東台灣 | 226 | + | 校園中心 | 167 | + | 原住民族 | 227 | + | 天然災害 | 168 |`, +}; + +async function handler(ctx) { const { topicId = '159' } = ctx.req.param(); const url = `${baseUrl}/topic/${topicId}`; const response = await got(url); @@ -38,10 +80,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, language: 'zh-TW', item: items, - }); -}; + }; +} diff --git a/lib/routes/phoronix/index.ts b/lib/routes/phoronix/index.ts index be09d30bd..33cff859e 100644 --- a/lib/routes/phoronix/index.ts +++ b/lib/routes/phoronix/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; @@ -111,7 +112,31 @@ const tryFetch = async (category, topic) => { return feed; }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:topic?', + categories: ['new-media'], + example: '/phoronix/linux/KDE', + parameters: { + category: 'Category', + topic: 'Topic. You may find available parameters from their navigator links. E.g. to subscribe to `https://www.phoronix.com/reviews/Operating+Systems`, fill in the path `/phoronix/reviews/Operating+Systems`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['phoronix.com/:category?/:topic?'], + }, + name: 'News & Reviews', + maintainers: ['oppliate', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { const { category, topic } = ctx.req.param(); let feed; switch (category) { @@ -234,4 +259,4 @@ export default async (ctx) => { ); ctx.set('data', feed); -}; +} diff --git a/lib/routes/phoronix/maintainer.ts b/lib/routes/phoronix/maintainer.ts deleted file mode 100644 index 5616928c7..000000000 --- a/lib/routes/phoronix/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:topic?': ['oppliate', 'Rongronggg9'], -}; diff --git a/lib/routes/phoronix/namespace.ts b/lib/routes/phoronix/namespace.ts new file mode 100644 index 000000000..43ea439ab --- /dev/null +++ b/lib/routes/phoronix/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Phoronix', + url: 'phoronix.com', +}; diff --git a/lib/routes/phoronix/radar.ts b/lib/routes/phoronix/radar.ts deleted file mode 100644 index 4af1a7137..000000000 --- a/lib/routes/phoronix/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'phoronix.com': { - _name: 'Phoronix', - '.': [ - { - title: 'News & Reviews', - docs: 'https://docs.rsshub.app/routes/new-media#phoronix', - source: ['/:category?/:topic?'], - target: '/phoronix/:category?/:topic?', - }, - ], - }, -}; diff --git a/lib/routes/phoronix/router.ts b/lib/routes/phoronix/router.ts deleted file mode 100644 index 0a5493c46..000000000 --- a/lib/routes/phoronix/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:topic?', './index'); -}; diff --git a/lib/routes/pianyuan/app.ts b/lib/routes/pianyuan/app.ts index d19a24077..3a1c6f3cb 100644 --- a/lib/routes/pianyuan/app.ts +++ b/lib/routes/pianyuan/app.ts @@ -1,8 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/index/:media?', + categories: ['multimedia'], + example: '/pianyuan/index', + parameters: { media: '类别,见下表,默认为首页' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pianyuan.org/'], + target: '/index', + }, + name: '最新资源', + maintainers: ['greatcodeeer', 'jerry1119'], + handler, + url: 'pianyuan.org/', + description: `| 电影 | 剧集 | +| ---- | ---- | +| mv | tv |`, +}; + +async function handler(ctx) { const media = ctx.req.param('media') ?? -1; const link_base = 'https://pianyuan.org/'; let description = '电影和剧集'; @@ -26,10 +53,10 @@ export default async (ctx) => { detailLinks.shift(); const items = await utils.ProcessFeed(detailLinks, cache); - ctx.set('data', { + return { title: '片源网', description, link: link_base, item: items, - }); -}; + }; +} diff --git a/lib/routes/pianyuan/maintainer.ts b/lib/routes/pianyuan/maintainer.ts deleted file mode 100644 index 34ef2013a..000000000 --- a/lib/routes/pianyuan/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/index/:media?': ['greatcodeeer', 'jerry1119'], - '/indexers/pianyuan/results/search/api': ['jerry1119'], -}; diff --git a/lib/routes/pianyuan/namespace.ts b/lib/routes/pianyuan/namespace.ts new file mode 100644 index 000000000..6bb98737b --- /dev/null +++ b/lib/routes/pianyuan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '片源网', + url: 'pianyuan.org', +}; diff --git a/lib/routes/pianyuan/radar.ts b/lib/routes/pianyuan/radar.ts deleted file mode 100644 index 640510540..000000000 --- a/lib/routes/pianyuan/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pianyuan.org': { - _name: '片源网', - '.': [ - { - title: '电影和剧集', - docs: 'https://docs.rsshub.app/routes/multimedia#pian-yuan', - source: '/', - target: '/pianyuan/index', - }, - ], - }, -}; diff --git a/lib/routes/pianyuan/router.ts b/lib/routes/pianyuan/router.ts deleted file mode 100644 index f2a5f687b..000000000 --- a/lib/routes/pianyuan/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/index/:media?', './app'); - router.get('/indexers/pianyuan/results/search/api', './search'); -}; diff --git a/lib/routes/pianyuan/search.ts b/lib/routes/pianyuan/search.ts index 546fb8c31..c9d8e1ef8 100644 --- a/lib/routes/pianyuan/search.ts +++ b/lib/routes/pianyuan/search.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/indexers/pianyuan/results/search/api', + radar: { + source: ['pianyuan.org/'], + target: '/index', + }, + name: 'Unknown', + maintainers: ['jerry1119'], + handler, + url: 'pianyuan.org/', +}; + +async function handler(ctx) { const link_base = 'https://pianyuan.org/'; const description = '搜索'; // 适配jackett 搜索api, eg: https://rsshub.app/pianyuan/indexers/pianyuan/results/search/api?t=test&q=halo @@ -37,10 +50,10 @@ export default async (ctx) => { const items = await utils.ProcessFeed(detailLinks, cache); - ctx.set('data', { + return { title: '片源网', description, link: link_base, item: items, - }); -}; + }; +} diff --git a/lib/routes/picnob/maintainer.ts b/lib/routes/picnob/maintainer.ts deleted file mode 100644 index 7bc28cc2e..000000000 --- a/lib/routes/picnob/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:id': ['TonyRL', 'micheal-death'], -}; diff --git a/lib/routes/picnob/namespace.ts b/lib/routes/picnob/namespace.ts new file mode 100644 index 000000000..9a1fe65da --- /dev/null +++ b/lib/routes/picnob/namespace.ts @@ -0,0 +1,9 @@ +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. +:::`, +}; diff --git a/lib/routes/picnob/radar.ts b/lib/routes/picnob/radar.ts deleted file mode 100644 index da619f453..000000000 --- a/lib/routes/picnob/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'picnob.com': { - _name: 'Picnob', - '.': [ - { - title: 'User profile', - docs: 'https://docs.rsshub.app/routes/social-media#picnob', - source: ['/profile/:id/*'], - target: '/picnob/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/picnob/router.ts b/lib/routes/picnob/router.ts deleted file mode 100644 index a7fbaa70a..000000000 --- a/lib/routes/picnob/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index 4e1b4c5fd..7e3190533 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,17 @@ import * as path from 'node:path'; import { puppeteerGet } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + radar: { + source: ['picnob.com/profile/:id/*'], + }, + name: 'Unknown', + maintainers: ['TonyRL', 'micheal-death'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://www.picnob.com'; const id = ctx.req.param('id'); const url = `${baseUrl}/profile/${id}/`; @@ -93,11 +104,11 @@ export default async (ctx) => { ); await browser.close(); - ctx.set('data', { + return { title: `${profileName} (@${id}) - Picnob`, description: $('.info .sum').text(), link: url, image: $('.ava .pic img').attr('src'), item: list, - }); -}; + }; +} diff --git a/lib/routes/picuki/maintainer.ts b/lib/routes/picuki/maintainer.ts deleted file mode 100644 index 36033a632..000000000 --- a/lib/routes/picuki/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/profile/:id/:functionalFlag?': ['hoilc', 'Rongronggg9', 'devinmugen'], -}; diff --git a/lib/routes/picuki/namespace.ts b/lib/routes/picuki/namespace.ts new file mode 100644 index 000000000..b74e2b1da --- /dev/null +++ b/lib/routes/picuki/namespace.ts @@ -0,0 +1,9 @@ +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. +:::`, +}; diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts index 75aa881bb..b539b6c5d 100644 --- a/lib/routes/picuki/profile.ts +++ b/lib/routes/picuki/profile.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -23,7 +24,39 @@ function deVideo(media) { return media_deVideo; } -export default async (ctx) => { +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' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.picuki.com/profile/:id'], + target: '/profile/:id', + }, + 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 | + + :::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. + :::`, +}; + +async function handler(ctx) { // use Puppeteer due to the obstacle by cloudflare challenge const browser = await puppeteer(); @@ -166,11 +199,11 @@ export default async (ctx) => { await browser.close(); - ctx.set('data', { + return { title: `${profileName} (@${id}) - Picuki`, link: profileUrl, image: profileImg, description: profileDescription, item: items, - }); -}; + }; +} diff --git a/lib/routes/picuki/radar.ts b/lib/routes/picuki/radar.ts deleted file mode 100644 index f8e54823c..000000000 --- a/lib/routes/picuki/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'picuki.com': { - _name: 'Picuki', - www: [ - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#picuki-yong-hu', - source: '/profile/:id', - target: '/picuki/profile/:id', - }, - ], - }, -}; diff --git a/lib/routes/picuki/router.ts b/lib/routes/picuki/router.ts deleted file mode 100644 index 5673f37e1..000000000 --- a/lib/routes/picuki/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/profile/:id/:functionalFlag?', './profile'); -}; diff --git a/lib/routes/pikabu/community.ts b/lib/routes/pikabu/community.ts index 62810917a..e656943ac 100644 --- a/lib/routes/pikabu/community.ts +++ b/lib/routes/pikabu/community.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, fixImage, fixVideo } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:type/:name', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { type, name, sort = 'new' } = ctx.req.param(); const sortString = sort === 'default' || type === 'tag' ? '' : `/${sort}`; const { data: response } = await got(`${baseUrl}/ajax/${type}/${name}${sortString}`); @@ -28,10 +36,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: response.data.title, link: `${baseUrl}/${type}/${name}`, language: 'ru-RU', item: items, - }); -}; + }; +} diff --git a/lib/routes/pikabu/maintainer.ts b/lib/routes/pikabu/maintainer.ts deleted file mode 100644 index 7e3d8dfcc..000000000 --- a/lib/routes/pikabu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/community/:name': ['TonyRL'], - '/tag/:name': ['TonyRL'], - '/user/:name': ['TonyRL'], -}; diff --git a/lib/routes/pikabu/namespace.ts b/lib/routes/pikabu/namespace.ts new file mode 100644 index 000000000..6cdfe65fd --- /dev/null +++ b/lib/routes/pikabu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Pikabu', + url: 'pikabu.ru', +}; diff --git a/lib/routes/pikabu/radar.ts b/lib/routes/pikabu/radar.ts deleted file mode 100644 index 5d69cbd86..000000000 --- a/lib/routes/pikabu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'pikabu.ru': { - _name: 'Pikabu', - '.': [ - { - title: 'Community', - docs: 'https://docs.rsshub.app/routes/bbs#pikabu', - source: ['/community/:name'], - target: '/pikabu/community/:name', - }, - { - title: 'Tag', - docs: 'https://docs.rsshub.app/routes/bbs#pikabu', - source: ['/tag/:name'], - target: '/pikabu/tag/:name', - }, - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/bbs#pikabu', - source: ['/:name'], - target: '/pikabu/user/:name', - }, - ], - }, -}; diff --git a/lib/routes/pikabu/router.ts b/lib/routes/pikabu/router.ts deleted file mode 100644 index 8c4f03e0d..000000000 --- a/lib/routes/pikabu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/user/:name', './user'); - router.get('/:type/:name', './community'); -}; diff --git a/lib/routes/pikabu/user.ts b/lib/routes/pikabu/user.ts index 04cd49f6c..824d25fe4 100644 --- a/lib/routes/pikabu/user.ts +++ b/lib/routes/pikabu/user.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, fixImage, fixVideo } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:name', + categories: ['bbs'], + example: '/pikabu/user/@bula.dragon', + parameters: { name: 'User name' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pikabu.ru/:name'], + }, + name: 'User', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const link = `${baseUrl}/${name}`; const response = await got(link, { @@ -35,12 +57,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('meta[property="og:title"]').attr('content'), description: $('.profile__user-about-content').text(), image: $('meta[property="og:image"]').attr('content'), language: 'ru-RU', link, item: items, - }); -}; + }; +} diff --git a/lib/routes/pincong/hot.ts b/lib/routes/pincong/hot.ts index cb6e978f4..d1385260c 100644 --- a/lib/routes/pincong/hot.ts +++ b/lib/routes/pincong/hot.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, puppeteerGet } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:category?', + categories: ['bbs'], + example: '/pincong/hot', + parameters: { category: '分类,与官网分类 URL `category-` 后的数字对应,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '精选', + maintainers: ['zphw'], + handler, +}; + +async function handler(ctx) { const { category = '0' } = ctx.req.param(); const url = `${baseUrl}/hot/list/category-${category}`; @@ -14,7 +33,7 @@ export default async (ctx) => { const $ = load(html); const list = $('div.aw-item'); - ctx.set('data', { + return { title: '品葱 - 精选', link: `${baseUrl}/hot/${category === '0' ? '' : `category-${category}`}`, item: list @@ -25,5 +44,5 @@ export default async (ctx) => { pubDate: parseDate($(item).find('div.mod-footer .aw-small-text').text()), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/pincong/index.ts b/lib/routes/pincong/index.ts index 957f50c71..17327444c 100644 --- a/lib/routes/pincong/index.ts +++ b/lib/routes/pincong/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, puppeteerGet } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category?/:sort?', + categories: ['bbs'], + example: '/pincong/category/1/new', + parameters: { category: '分类,与官网分类 URL `category-` 后的数字对应,默认为全部', sort: '排序方式,参数可见下表,默认为推荐' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '发现', + maintainers: ['zphw'], + handler, + description: `| 最新 | 推荐 | 热门 | +| ---- | --------- | ---- | +| new | recommend | hot |`, +}; + +async function handler(ctx) { let url = `${baseUrl}/`; const sortMap = { @@ -21,7 +43,7 @@ export default async (ctx) => { const $ = load(html); const list = $('div.aw-item'); - ctx.set('data', { + return { title: '品葱 - 发现', link: url, item: list @@ -31,5 +53,5 @@ export default async (ctx) => { pubDate: parseDate($(item).attr('data-created-at') * 1000), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/pincong/maintainer.ts b/lib/routes/pincong/maintainer.ts deleted file mode 100644 index ad1c1be84..000000000 --- a/lib/routes/pincong/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/category/:category?/:sort?': ['zphw'], - '/hot/:category?': ['zphw'], - '/topic/:topic': ['zphw'], -}; diff --git a/lib/routes/pincong/namespace.ts b/lib/routes/pincong/namespace.ts new file mode 100644 index 000000000..d87c741de --- /dev/null +++ b/lib/routes/pincong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '品葱', + url: 'pincong.rocks', +}; diff --git a/lib/routes/pincong/radar.ts b/lib/routes/pincong/radar.ts deleted file mode 100644 index cfd0fa592..000000000 --- a/lib/routes/pincong/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'pincong.rocks': { - _name: '品葱', - '.': [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/bbs#pin-cong', - source: '/', - target: (_params, url) => { - const sortMap = { - 'sort_type-new': 'new', - 'recommend-1': 'recommend', - 'sort_type-hot__day2': 'hot', - }; - const path = new URL(url).pathname; - const category = (/__category/.test(path) ? path.split('__')[1] : path).replace('category-', ''); - const sort = sortMap[/__category/.test(path) ? path.split('__')[0] : 'recommend-1']; - return `/pincong/category/${category}/${sort}`; - }, - }, - { - title: '精选', - docs: 'https://docs.rsshub.app/routes/bbs#pin-cong', - source: ['/hot/:category'], - target: (params) => `/pincong/hot${params.category ? `/${params.category.replace('category-', '')}` : ''}`, - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/bbs#pin-cong', - source: '/topic/:topic', - target: '/pincong/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/pincong/router.ts b/lib/routes/pincong/router.ts deleted file mode 100644 index 42a0bc025..000000000 --- a/lib/routes/pincong/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/category/:category?/:sort?', './index'); - router.get('/hot/:category?', './hot'); - router.get('/topic/:topic', './topic'); -}; diff --git a/lib/routes/pincong/topic.ts b/lib/routes/pincong/topic.ts index ab367dcd7..51e92d7b8 100644 --- a/lib/routes/pincong/topic.ts +++ b/lib/routes/pincong/topic.ts @@ -1,9 +1,20 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, puppeteerGet } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + radar: { + source: ['pincong.rocks/topic/:topic'], + }, + name: 'Unknown', + maintainers: ['zphw'], + handler, +}; + +async function handler(ctx) { const url = `${baseUrl}/topic/${ctx.req.param('topic')}`; // use Puppeteer due to the obstacle by cloudflare challenge @@ -12,7 +23,7 @@ export default async (ctx) => { const $ = load(html); const list = $('div.aw-item'); - ctx.set('data', { + return { title: `品葱 - ${ctx.req.param('topic')}`, link: url, item: list @@ -22,5 +33,5 @@ export default async (ctx) => { pubDate: parseDate($(item).attr('data-created-at') * 1000), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/pingwest/maintainer.ts b/lib/routes/pingwest/maintainer.ts deleted file mode 100644 index 18bde69a0..000000000 --- a/lib/routes/pingwest/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/status': ['sanmmm'], - '/tag/:tag/:type/:option?': ['sanmmm'], - '/user/:uid/:type?/:option?': ['sanmmm'], -}; diff --git a/lib/routes/pingwest/namespace.ts b/lib/routes/pingwest/namespace.ts new file mode 100644 index 000000000..9fbdae4e9 --- /dev/null +++ b/lib/routes/pingwest/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '品玩', + url: 'pingwest.com', +}; diff --git a/lib/routes/pingwest/radar.ts b/lib/routes/pingwest/radar.ts deleted file mode 100644 index 534b1b43c..000000000 --- a/lib/routes/pingwest/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'pingwest.com': { - _name: '品玩', - '.': [ - { - title: '实时要闻', - docs: 'https://docs.rsshub.app/routes/new-media#ping-wan', - source: ['/status', '/'], - target: '/pingwest/status', - }, - { - title: '话题动态', - docs: 'https://docs.rsshub.app/routes/new-media#ping-wan', - source: ['/tag/:tag', '/'], - target: '/pingwest/tag/:tag/1/fulltext', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/new-media#ping-wan', - source: ['/user/:uid/:type', '/'], - target: '/pingwest/user/:uid/:type', - }, - ], - }, -}; diff --git a/lib/routes/pingwest/router.ts b/lib/routes/pingwest/router.ts deleted file mode 100644 index 132adfabd..000000000 --- a/lib/routes/pingwest/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/status', './status'); - router.get('/tag/:tag/:type/:option?', './tag'); - router.get('/user/:uid/:type?/:option?', './user'); -}; diff --git a/lib/routes/pingwest/status.ts b/lib/routes/pingwest/status.ts index 8ae9e6487..849b38e24 100644 --- a/lib/routes/pingwest/status.ts +++ b/lib/routes/pingwest/status.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/status', + categories: ['new-media'], + example: '/pingwest/status', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pingwest.com/status', 'pingwest.com/'], + }, + name: '实时要闻', + maintainers: ['sanmmm'], + handler, + url: 'pingwest.com/status', +}; + +async function handler() { const baseUrl = 'https://www.pingwest.com'; const url = `${baseUrl}/api/state/list`; const response = await got(url, { @@ -38,10 +61,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '品玩 - 实时要闻', description: '品玩 - 实时要闻', link: `${baseUrl}/status`, item: items, - }); -}; + }; +} diff --git a/lib/routes/pingwest/tag.ts b/lib/routes/pingwest/tag.ts index 35ba7ca3a..60e1807b0 100644 --- a/lib/routes/pingwest/tag.ts +++ b/lib/routes/pingwest/tag.ts @@ -1,9 +1,41 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag/:type/:option?', + categories: ['new-media'], + example: '/pingwest/tag/ChinaJoy/1', + parameters: { tag: '话题名或话题id, 可从话题页url中得到', type: '内容类型', option: '参数, 默认无' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '话题动态', + maintainers: ['sanmmm'], + handler, + description: `内容类型 + + | 最新 | 热门 | + | ---- | ---- | + | 1 | 2 | + + 参数 + + - \`fulltext\`,全文输出,例如:\`/pingwest/tag/ChinaJoy/1/fulltext\` + + :::tip + 该路由一次最多显示 30 条文章 + :::`, +}; + +async function handler(ctx) { const { tag, type, option } = ctx.req.param(); const needFullText = option === 'fulltext'; @@ -35,10 +67,10 @@ export default async (ctx) => { const $ = load(response.data.data.list); const items = await utils.articleListParser($, needFullText, cache); - ctx.set('data', { + return { title: `品玩 - ${tagName}`, description: `品玩 - ${tagName}`, link: tagUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pingwest/user.ts b/lib/routes/pingwest/user.ts index 43f599951..b632e3676 100644 --- a/lib/routes/pingwest/user.ts +++ b/lib/routes/pingwest/user.ts @@ -1,9 +1,41 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid/:type?/:option?', + categories: ['new-media'], + example: '/pingwest/user/7781550877/article', + parameters: { uid: '用户id, 可从用户主页中得到', type: '内容类型, 默认为`article`', option: '参数' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pingwest.com/user/:uid/:type', 'pingwest.com/'], + target: '/user/:uid/:type', + }, + name: '用户', + maintainers: ['sanmmm'], + handler, + description: `内容类型 + + | 文章 | 动态 | + | ------- | ----- | + | article | state | + + 参数 + + - \`fulltext\`,全文输出,例如:\`/pingwest/user/7781550877/article/fulltext\``, +}; + +async function handler(ctx) { const { uid, type = 'article', option } = ctx.req.param(); const baseUrl = 'https://www.pingwest.com'; const aimUrl = `${baseUrl}/user/${uid}/${type}`; @@ -50,11 +82,11 @@ export default async (ctx) => { article: '文章', state: '动态', }; - ctx.set('data', { + return { title: `品玩 - ${userName} - ${typeToLabel[type]}`, description: userSign, image: userAvatar, link: aimUrl, item, - }); -}; + }; +} diff --git a/lib/routes/pixabay/maintainer.ts b/lib/routes/pixabay/maintainer.ts deleted file mode 100644 index dc38c0dc8..000000000 --- a/lib/routes/pixabay/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/search/:q/:order?': ['TonyRL'], -}; diff --git a/lib/routes/pixabay/namespace.ts b/lib/routes/pixabay/namespace.ts new file mode 100644 index 000000000..cfbd60f5f --- /dev/null +++ b/lib/routes/pixabay/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Pixabay', + url: 'pixabay.com', +}; diff --git a/lib/routes/pixabay/radar.ts b/lib/routes/pixabay/radar.ts deleted file mode 100644 index a9d794f21..000000000 --- a/lib/routes/pixabay/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pixabay.com': { - _name: 'Pixabay', - '.': [ - { - title: 'Search', - docs: 'https://docs.rsshub.app/routes/picture#pixabay', - source: ['/:searchType/search/:q'], - target: '/pixabay/search/:q', - }, - ], - }, -}; diff --git a/lib/routes/pixabay/router.ts b/lib/routes/pixabay/router.ts deleted file mode 100644 index 9c2a2543a..000000000 --- a/lib/routes/pixabay/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/search/:q/:order?', './search'); -}; diff --git a/lib/routes/pixabay/search.ts b/lib/routes/pixabay/search.ts index 136cc11e2..989b307ff 100644 --- a/lib/routes/pixabay/search.ts +++ b/lib/routes/pixabay/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { config } from '@/config'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:q/:order?', + categories: ['picture'], + example: '/pixabay/search/cat', + parameters: { q: 'Search term', order: 'Order, `popular` or `latest`, `latest` by default' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pixabay.com/:searchType/search/:q'], + target: '/search/:q', + }, + name: 'Search', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { q, order = 'latest' } = ctx.req.param(); const key = config.pixabay?.key ?? '7329690-bbadad6d872ba577d5a358679'; const baseUrl = 'https://pixabay.com'; @@ -43,12 +66,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Search ${q} - Pixabay`, description: 'Download & use free nature stock photos in high resolution ✓ New free images everyday ✓ HD to 4K ✓ Best nature pictures for all devices on Pixabay', link: `${baseUrl}/images/search/${q}/${order === 'latest' ? '?order=latest' : ''}`, image: `https://pixabay.com/apple-touch-icon.png`, language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/pixiv/bookmarks.ts b/lib/routes/pixiv/bookmarks.ts index e3a4e9a24..a6ab6de00 100644 --- a/lib/routes/pixiv/bookmarks.ts +++ b/lib/routes/pixiv/bookmarks.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getToken } from './token'; import getBookmarks from './api/get-bookmarks'; @@ -6,7 +7,28 @@ import { config } from '@/config'; import pixivUtils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/bookmarks/:id', + categories: ['social-media'], + example: '/pixiv/user/bookmarks/15288095', + parameters: { id: "user id, available in user's homepage URL" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.pixiv.net/users/:id/bookmarks/artworks'], + }, + name: 'User Bookmark', + maintainers: ['EYHN'], + handler, +}; + +async function handler(ctx) { if (!config.pixiv || !config.pixiv.refreshToken) { throw new Error('pixiv RSS is disabled due to the lack of relevant config'); } @@ -23,7 +45,7 @@ export default async (ctx) => { const illusts = bookmarksResponse.data.illusts; const username = userDetailResponse.data.user.name; - ctx.set('data', { + return { title: `${username} 的收藏`, link: `https://www.pixiv.net/users/${id}/bookmarks/artworks`, description: `${username} 的 pixiv 最新收藏`, @@ -37,5 +59,5 @@ export default async (ctx) => { link: `https://www.pixiv.net/artworks/${illust.id}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/pixiv/illustfollow.ts b/lib/routes/pixiv/illustfollow.ts index 09589648d..06a04464b 100644 --- a/lib/routes/pixiv/illustfollow.ts +++ b/lib/routes/pixiv/illustfollow.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getToken } from './token'; import getIllustFollows from './api/get-illust-follows'; @@ -5,7 +6,32 @@ import { config } from '@/config'; import pixivUtils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/illustfollows', + categories: ['social-media'], + example: '/pixiv/user/illustfollows', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.pixiv.net/bookmark_new_illust.php'], + }, + name: 'Following timeline', + maintainers: ['ClarkeCheng'], + handler, + url: 'www.pixiv.net/bookmark_new_illust.php', + description: `:::warning + Only for self-hosted + :::`, +}; + +async function handler() { if (!config.pixiv || !config.pixiv.refreshToken) { throw new Error('pixiv RSS is disabled due to the lack of relevant config'); } @@ -17,7 +43,7 @@ export default async (ctx) => { const response = await getIllustFollows(token); const illusts = response.data.illusts; - ctx.set('data', { + return { title: `Pixiv关注的新作品`, link: 'https://www.pixiv.net/bookmark_new_illust.php', description: `Pixiv关注的画师们的最新作品`, @@ -31,5 +57,5 @@ export default async (ctx) => { link: `https://www.pixiv.net/artworks/${illust.id}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/pixiv/maintainer.ts b/lib/routes/pixiv/maintainer.ts deleted file mode 100644 index 4cff8f15a..000000000 --- a/lib/routes/pixiv/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/ranking/:mode/:date?': ['EYHN'], - '/search/:keyword/:order?/:mode?': ['DIYgod'], - '/user/bookmarks/:id': ['EYHN'], - '/user/illustfollows': ['ClarkeCheng'], - '/user/novels/:id': ['TonyRL'], - '/user/:id': ['DIYgod'], -}; diff --git a/lib/routes/pixiv/namespace.ts b/lib/routes/pixiv/namespace.ts new file mode 100644 index 000000000..130b407d9 --- /dev/null +++ b/lib/routes/pixiv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'pixiv', + url: 'www.pixiv.net', +}; diff --git a/lib/routes/pixiv/novels.ts b/lib/routes/pixiv/novels.ts index e68638645..1c46d0bfc 100644 --- a/lib/routes/pixiv/novels.ts +++ b/lib/routes/pixiv/novels.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.pixiv.net'; -export default async (ctx) => { +export const route: Route = { + path: '/user/novels/:id', + categories: ['social-media'], + example: '/pixiv/user/novels/27104704', + parameters: { id: "User id, available in user's homepage URL" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.pixiv.net/users/:id/novels'], + }, + name: 'User Novels', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { limit = 100 } = ctx.req.query(); const url = `${baseUrl}/users/${id}/novels`; @@ -37,11 +59,11 @@ export default async (ctx) => { category: item.tags, })); - ctx.set('data', { + return { title: data.body.extraData.meta.title, description: data.body.extraData.meta.ogp.description, image: Object.values(data.body.works)[0].profileImageUrl, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/pixiv/radar.ts b/lib/routes/pixiv/radar.ts deleted file mode 100644 index cb6e29ce2..000000000 --- a/lib/routes/pixiv/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'pixiv.net': { - _name: 'Pixiv', - www: [ - { - title: '用户收藏', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: '/users/:id/bookmarks/artworks', - target: '/pixiv/user/bookmarks/:id', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: '/users/:id', - target: '/pixiv/user/:id', - }, - { - title: '用户小说', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: '/users/:id/novels', - target: '/pixiv/user/novels/:id', - }, - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: '/ranking.php', - target: (params, url) => `/pixiv/ranking/${new URL(url).searchParams.get('mode') || 'daily'}`, - }, - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: ['/tags/:keyword', '/tags/:keyword/:type?'], - target: (params, url) => `/pixiv/search/:keyword/${new URL(url).searchParams.get('order')}/${new URL(url).searchParams.get('mode')}`, - }, - { - title: '关注的新作品', - docs: 'https://docs.rsshub.app/routes/social-media#pixiv', - source: '/bookmark_new_illust.php', - target: '/pixiv/user/illustfollows', - }, - ], - }, -}; diff --git a/lib/routes/pixiv/ranking.ts b/lib/routes/pixiv/ranking.ts index c8d39cfbd..5f6205ce5 100644 --- a/lib/routes/pixiv/ranking.ts +++ b/lib/routes/pixiv/ranking.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getToken } from './token'; import getRanking from './api/get-ranking'; @@ -56,7 +57,32 @@ const alias = { r18g: 'week_r18g', }; -export default async (ctx) => { +export const route: Route = { + path: '/ranking/:mode/:date?', + categories: ['social-media'], + example: '/pixiv/ranking/week', + parameters: { mode: 'rank type', date: 'format: `2018-4-25`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Rankings', + maintainers: ['EYHN'], + handler, + description: `| daily rank | weekly rank | monthly rank | male rank | female rank | AI-generated work Rankings | original rank | rookie user rank | + | ---------- | ----------- | ------------ | --------- | ----------- | -------------------------- | -------------- | ---------------- | + | day | week | month | day\_male | day\_female | day\_ai | week\_original | week\_rookie | + + | R-18 daily rank | R-18 AI-generated work | R-18 male rank | R-18 female rank | R-18 weekly rank | R-18G rank | + | --------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------- | + | day\_r18 | day\_r18\_ai | day\_male\_r18 | day\_female\_r18 | week\_r18 | week\_r18g |`, +}; + +async function handler(ctx) { if (!config.pixiv || !config.pixiv.refreshToken) { throw new Error('pixiv RSS is disabled due to the lack of relevant config'); } @@ -75,7 +101,7 @@ export default async (ctx) => { const dateStr = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 `; - ctx.set('data', { + return { title: (ctx.req.param('date') ? dateStr : '') + titles[mode], link: links[mode], description: dateStr + titles[mode], @@ -90,5 +116,5 @@ export default async (ctx) => { category: illust.tags.map((tag) => tag.name), }; }), - }); -}; + }; +} diff --git a/lib/routes/pixiv/router.ts b/lib/routes/pixiv/router.ts deleted file mode 100644 index e825db5a8..000000000 --- a/lib/routes/pixiv/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/ranking/:mode/:date?', './ranking'); - router.get('/search/:keyword/:order?/:mode?', './search'); - router.get('/user/bookmarks/:id', './bookmarks'); - router.get('/user/illustfollows', './illustfollow'); - router.get('/user/novels/:id', './novels'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/pixiv/search.ts b/lib/routes/pixiv/search.ts index f04cdca6f..e84b6b990 100644 --- a/lib/routes/pixiv/search.ts +++ b/lib/routes/pixiv/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getToken } from './token'; import searchPopularIllust from './api/search-popular-illust'; @@ -6,7 +7,28 @@ import { config } from '@/config'; import pixivUtils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword/:order?/:mode?', + categories: ['social-media'], + example: '/pixiv/search/Nezuko/popular/2', + parameters: { keyword: 'keyword', order: 'rank mode, empty or other for time order, popular for popular order', mode: 'filte R18 content' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keyword', + maintainers: ['DIYgod'], + handler, + description: `| only not R18 | only R18 | no filter | + | ------------ | -------- | -------------- | + | safe | r18 | empty or other |`, +}; + +async function handler(ctx) { if (!config.pixiv || !config.pixiv.refreshToken) { throw new Error('pixiv RSS is disabled due to the lack of relevant config'); } @@ -29,7 +51,7 @@ export default async (ctx) => { illusts = illusts.filter((item) => item.x_restrict === 1); } - ctx.set('data', { + return { title: `${keyword} 的 pixiv ${order === 'popular' ? '热门' : ''}内容`, link: `https://www.pixiv.net/tags/${keyword}/artworks`, item: illusts.map((illust) => { @@ -43,5 +65,5 @@ export default async (ctx) => { }; }), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/pixiv/user.ts b/lib/routes/pixiv/user.ts index 27c03e5ad..5e24048aa 100644 --- a/lib/routes/pixiv/user.ts +++ b/lib/routes/pixiv/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getToken } from './token'; import getIllusts from './api/get-illusts'; @@ -5,7 +6,28 @@ import { config } from '@/config'; import pixivUtils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/pixiv/user/15288095', + parameters: { id: "user id, available in user's homepage URL" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.pixiv.net/users/:id'], + }, + name: 'User Activity', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { if (!config.pixiv || !config.pixiv.refreshToken) { throw new Error('pixiv RSS is disabled due to the lack of relevant config'); } @@ -21,7 +43,7 @@ export default async (ctx) => { const illusts = response.data.illusts; const username = illusts[0].user.name; - ctx.set('data', { + return { title: `${username} 的 pixiv 动态`, link: `https://www.pixiv.net/users/${id}`, description: `${username} 的 pixiv 最新动态`, @@ -36,5 +58,5 @@ export default async (ctx) => { category: illust.tags.map((t) => t.name), }; }), - }); -}; + }; +} diff --git a/lib/routes/piyao/jrpy.ts b/lib/routes/piyao/jrpy.ts index 36584bd4c..0267be058 100644 --- a/lib/routes/piyao/jrpy.ts +++ b/lib/routes/piyao/jrpy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.piyao.org.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jrpy', + categories: ['other'], + example: '/piyao/jrpy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['piyao.org.cn/jrpy/index.htm'], + }, + name: '今日辟谣', + maintainers: ['Fatpandac'], + handler, + url: 'piyao.org.cn/jrpy/index.htm', +}; + +async function handler() { const currentUrl = `${rootUrl}/jrpy/index.htm`; const response = await got(currentUrl); @@ -32,9 +55,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '今日辟谣', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/piyao/maintainer.ts b/lib/routes/piyao/maintainer.ts deleted file mode 100644 index 81ad6ed27..000000000 --- a/lib/routes/piyao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jrpy': ['Fatpandac'], -}; diff --git a/lib/routes/piyao/namespace.ts b/lib/routes/piyao/namespace.ts new file mode 100644 index 000000000..1a308490f --- /dev/null +++ b/lib/routes/piyao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国互联网联合辟谣平台', + url: 'piyao.org.cn', +}; diff --git a/lib/routes/piyao/radar.ts b/lib/routes/piyao/radar.ts deleted file mode 100644 index 54b1fe4bf..000000000 --- a/lib/routes/piyao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'piyao.org.cn': { - _name: '中国互联网联合辟谣平台', - '.': [ - { - title: '今日辟谣', - docs: 'https://docs.rsshub.app/routes/other#zhong-guo-hu-lian-wang-lian-he-pi-yao-ping-tai', - source: ['/jrpy/index.htm'], - target: '/piyao/jrpy', - }, - ], - }, -}; diff --git a/lib/routes/piyao/router.ts b/lib/routes/piyao/router.ts deleted file mode 100644 index 5536e1565..000000000 --- a/lib/routes/piyao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jrpy', './jrpy'); -}; diff --git a/lib/routes/pkmer/maintainer.ts b/lib/routes/pkmer/maintainer.ts deleted file mode 100644 index 7af0867b2..000000000 --- a/lib/routes/pkmer/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/recent': ['Gnoyong'], -}; diff --git a/lib/routes/pkmer/namespace.ts b/lib/routes/pkmer/namespace.ts new file mode 100644 index 000000000..5c46a75fa --- /dev/null +++ b/lib/routes/pkmer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PKMer', + url: 'pkmer.cn', +}; diff --git a/lib/routes/pkmer/radar.ts b/lib/routes/pkmer/radar.ts deleted file mode 100644 index e905a3c95..000000000 --- a/lib/routes/pkmer/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pkmer.cn': { - _name: 'PKMer', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/routes/bbs#pkmer-zui-jin-geng-xin', - source: ['/page/*'], - target: '/pkmer/recent', - }, - ], - }, -}; diff --git a/lib/routes/pkmer/recent.ts b/lib/routes/pkmer/recent.ts index 000c03b4c..43a81e6f9 100644 --- a/lib/routes/pkmer/recent.ts +++ b/lib/routes/pkmer/recent.ts @@ -1,22 +1,45 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const baseUrl = 'https://pkmer.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/recent', + categories: ['bbs'], + example: '/pkmer/recent', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pkmer.cn/page/*'], + }, + name: '最近更新', + maintainers: ['Gnoyong'], + handler, + url: 'pkmer.cn/page/*', +}; + +async function handler() { const { data: response } = await got(`${baseUrl}/page/1/`); const $ = load(response); const items = process($); - ctx.set('data', { + return { title: 'PKMer', icon: 'https://cdn.pkmer.cn/covers/logo.png!nomark', logo: 'https://cdn.pkmer.cn/covers/logo.png!nomark', link: baseUrl, allowEmpty: true, item: items, - }); -}; + }; +} function process($) { const container = $('#pages > div.grid > .relative'); diff --git a/lib/routes/pkmer/router.ts b/lib/routes/pkmer/router.ts deleted file mode 100644 index a442ba56e..000000000 --- a/lib/routes/pkmer/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/recent', './recent.js'); -}; diff --git a/lib/routes/pku/bbs/hot.ts b/lib/routes/pku/bbs/hot.ts index 2c15a1355..5c8408632 100644 --- a/lib/routes/pku/bbs/hot.ts +++ b/lib/routes/pku/bbs/hot.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { config } from '@/config'; import { load } from 'cheerio'; @@ -5,7 +6,32 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/bbs/hot', + categories: ['university'], + example: '/pku/bbs/hot', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bbs.pku.edu.cn/v2/hot-topic.php', 'bbs.pku.edu.cn/'], + }, + name: '北大未名 BBS 全站十大', + maintainers: ['wooddance'], + handler, + url: 'bbs.pku.edu.cn/v2/hot-topic.php', + description: `:::warning + 论坛部分帖子正文内容的获取需要用户登录后的 Cookie 值,详情见部署页面的配置模块。 + :::`, +}; + +async function handler() { const cookie = config.pkubbs.cookie; const headers = {}; if (cookie) { @@ -48,10 +74,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: '北大未名BBS 全站十大', link: 'https://bbs.pku.edu.cn/v2/hot-topic.php', description: '北大未名BBS 全站热门话题前十名', item, - }); -}; + }; +} diff --git a/lib/routes/pku/cls/announcement.ts b/lib/routes/pku/cls/announcement.ts index cf54e6407..308813a1a 100644 --- a/lib/routes/pku/cls/announcement.ts +++ b/lib/routes/pku/cls/announcement.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,29 @@ const homeUrl = 'https://bio.pku.edu.cn/homes/Index/news/21/21.html'; const baseUrl = 'https://bio.pku.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/cls/announcement', + categories: ['university'], + example: '/pku/cls/announcement', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bio.pku.edu.cn/homes/Index/news/21/21.html', 'bio.pku.edu.cn/'], + }, + name: '生命科学学院通知公告', + maintainers: ['william-swl'], + handler, + url: 'bio.pku.edu.cn/homes/Index/news/21/21.html', +}; + +async function handler() { const response = await got(homeUrl); const $ = load(response.data); @@ -35,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '北京大学生命科学学院通知公告', link: homeUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pku/cls/lecture.ts b/lib/routes/pku/cls/lecture.ts index 511d4da78..29021181b 100644 --- a/lib/routes/pku/cls/lecture.ts +++ b/lib/routes/pku/cls/lecture.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,11 +6,33 @@ import { parseDate } from '@/utils/parse-date'; const homeUrl = 'http://bio.pku.edu.cn/homes/Index/news_jz/7/7.html'; const baseUrl = 'http://bio.pku.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/cls/lecture', + categories: ['university'], + example: '/pku/cls/lecture', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bio.pku.edu.cn/homes/Index/news_jz/7/7.html', 'bio.pku.edu.cn/'], + }, + name: '生命科学学院近期讲座', + maintainers: ['TPOB'], + handler, + url: 'bio.pku.edu.cn/homes/Index/news_jz/7/7.html', +}; + +async function handler() { const response = await got(homeUrl); const $ = load(response.data); - ctx.set('data', { + return { title: `北京大学生命科学学院近期讲座`, link: homeUrl, description: `北京大学生命科学学院近期讲座`, @@ -21,5 +44,5 @@ export default async (ctx) => { link: baseUrl + $('a.clearfix').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/pku/eecs.ts b/lib/routes/pku/eecs.ts index d74abbf6a..2d336cd33 100644 --- a/lib/routes/pku/eecs.ts +++ b/lib/routes/pku/eecs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; import { eecsMap } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/eecs/:type?', + name: 'Unknown', + maintainers: ['Ir1d'], + handler, +}; + +async function handler(ctx) { const host = 'https://eecs.pku.edu.cn'; let type = ctx.params && Number.parseInt(ctx.req.param('type')); @@ -56,10 +64,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: host + '/xygk1/ggtz/' + eecsMap.get(type), description: '北大信科 公告通知', item: items, - }); -}; + }; +} diff --git a/lib/routes/pku/hr.ts b/lib/routes/pku/hr.ts index 93dbd5750..45eff614a 100644 --- a/lib/routes/pku/hr.ts +++ b/lib/routes/pku/hr.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hr/:category?', + categories: ['university'], + example: '/pku/hr', + parameters: { category: '分类,见下方说明,默认为首页最新公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hr.pku.edu.cn/'], + }, + name: '人事处', + maintainers: ['nczitzk'], + handler, + url: 'hr.pku.edu.cn/', + description: `:::tip + 分类字段处填写的是对应北京大学人事处分类页网址中介于 **\`http://hr.pku.edu.cn/\`** 和 **/index.htm** 中间的一段,并将其中的 \`/\` 修改为 \`-\`。 + + 如 [北京大学人事处 - 人才招聘 - 教师 - 教学科研人员](https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm) 的网址为 \`https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm\` 其中介于 **\`http://hr.pku.edu.cn/\`** 和 **\`/index.ht\`** 中间的一段为 \`rczp/js/jxkyry\`。随后,并将其中的 \`/\` 修改为 \`-\`,可以得到 \`rczp-js-jxkyry\`。所以最终我们的路由为 [\`/pku/hr/rczp-js-jxkyry\`](https://rsshub.app/pku/hr/rczp-js-jxkyry) + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category')?.replace(/-/g, '/') ?? 'zxgg'; const rootUrl = 'https://hr.pku.edu.cn/'; @@ -47,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('h2').text()} - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pku/maintainer.ts b/lib/routes/pku/maintainer.ts deleted file mode 100644 index 2319de949..000000000 --- a/lib/routes/pku/maintainer.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default { - '/admission/sszs': ['pkuyjs'], - '/bbs/hot': ['wooddance'], - '/cls/announcement': ['william-swl'], - '/cls/lecture': ['TPOB'], - '/eecs/:type?': ['Ir1d'], - '/hr/:category?': ['nczitzk'], - '/nsd/gd': ['MisLink'], - '/rccp/mzyt': ['vhxubo'], - '/scc/recruit/:type?': ['DylanXie123'], - '/ss/notice': ['legr4ndk'], - '/ss/admission': ['legr4ndk'], - '/ss/pgadmin': ['legr4ndk'], -}; diff --git a/lib/routes/pku/namespace.ts b/lib/routes/pku/namespace.ts new file mode 100644 index 000000000..f31271589 --- /dev/null +++ b/lib/routes/pku/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京大学', + url: 'admission.pku.edu.cn', +}; diff --git a/lib/routes/pku/nsd.ts b/lib/routes/pku/nsd.ts index dfe720b83..b9fa845b2 100644 --- a/lib/routes/pku/nsd.ts +++ b/lib/routes/pku/nsd.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -20,7 +21,29 @@ const pageType = (href) => { } }; -export default async (ctx) => { +export const route: Route = { + path: '/nsd/gd', + categories: ['university'], + example: '/pku/nsd/gd', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['nsd.pku.edu.cn/'], + }, + name: '观点 - 国家发展研究院', + maintainers: ['MisLink'], + handler, + url: 'nsd.pku.edu.cn/', +}; + +async function handler() { const response = await got({ url: baseUrl, https: { rejectUnauthorized: false } }); const $ = load(response.data); @@ -62,9 +85,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '观点 - 北京大学国家发展研究院', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pku/pkuyjs.ts b/lib/routes/pku/pkuyjs.ts index 7b109b8f1..3fd956103 100644 --- a/lib/routes/pku/pkuyjs.ts +++ b/lib/routes/pku/pkuyjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/admission/sszs', + categories: ['university'], + example: '/pku/admission/sszs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['admission.pku.edu.cn/zsxx/sszs/index.htm', 'admission.pku.edu.cn/'], + }, + name: '研究生招生网', + maintainers: ['pkuyjs'], + handler, + url: 'admission.pku.edu.cn/zsxx/sszs/index.htm', +}; + +async function handler() { const link = 'https://admission.pku.edu.cn/zsxx/sszs/index.htm'; const response = await got(link); const $ = load(response.data); const list = $('.zsxx_cont_list li'); - ctx.set('data', { + return { title: `${$('.twostage_title_C').text()} - ${$('title').text()}`, link, description: '北京大学研究生院通知公告', @@ -25,5 +48,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/pku/radar.ts b/lib/routes/pku/radar.ts deleted file mode 100644 index 704f5cded..000000000 --- a/lib/routes/pku/radar.ts +++ /dev/null @@ -1,156 +0,0 @@ -export default { - 'pku.edu.cn': { - _name: '北京大学', - admission: [ - { - title: '硕士招生', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/zsxx/sszs/index.htm', '/'], - target: '/pku/admission/sszs', - }, - ], - bbs: [ - { - title: '北大未名 BBS 全站十大', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/v2/hot-topic.php', '/'], - target: '/pku/bbs/hot', - }, - ], - bio: [ - { - title: '生命科学学院近期讲座', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/homes/Index/news_jz/7/7.html', '/'], - target: '/pku/cls/lecture', - }, - { - title: '生命科学学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/homes/Index/news/21/21.html', '/'], - target: '/pku/cls/announcement', - }, - ], - eecs: [ - { - title: '信科公告通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/xygk1/ggtz/:type', '/xygk1/ggtz.htm', '/'], - target: (params) => { - let type = params.type; - switch (type) { - case 'qb.htm': - type = 0; - break; - case 'xytz.htm': - type = 1; - break; - case 'rstz.htm': - type = 2; - break; - case 'jwtz.htm': - type = 6; - break; - case 'xgtz.htm': - type = 8; - break; - case 'kytz.htm': - type = 7; - break; - case 'cwtz.htm': - type = 5; - break; - case 'ghtz.htm': - type = 3; - break; - case 'yytz.htm': - type = 4; - break; - default: - type = 0; - break; - } - return `/pku/eecs/${type}`; - }, - }, - ], - hr: [ - { - title: '人事处', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue-ren-shi-chu', - source: ['/'], - target: '/pku/hr/:category?', - }, - ], - nsd: [ - { - title: '观点 - 北京大学国家发展研究院', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/'], - target: '/pku/nsd/gd', - }, - ], - 'www.rccp': [ - { - title: '每周一推 - 中国政治学研究中心', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue-ren-shi-chu', - source: ['/'], - target: '/pku/rccp/mzyt', - }, - ], - scc: [ - { - title: '学生就业指导服务中心', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue-ren-shi-chu', - source: ['/*path'], - target: (params) => { - let type; - switch (params.path) { - case 'home!newsHome.action?category=12': - type = 'xwrd'; - break; - case 'home!newsHome.action?category=13': - type = 'tzgg'; - break; - case 'home!recruit.action?category=1&jobType=110001': - type = 'zpxx'; - break; - case 'home!recruitList.action?category=1&jobType=110002': - type = 'gfjgxx'; - break; - case 'home!recruitList.action?category=2': - type = 'sxxx'; - break; - case 'home!newsHome.action?category=11': - type = 'cyxx'; - break; - default: - type = 'zpxx'; - break; - } - return `/pku/scc/recruit/${type}`; - }, - }, - ], - ss: [ - { - title: '软微-通知公告', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/index.php/newscenter/notice', '/'], - target: '/pku/ss/notice', - }, - { - title: '软微-招生通知', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/admission/admnotice', '/'], - target: '/pku/ss/admission', - }, - { - title: '软微-硕士统考招生', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-da-xue', - source: ['/admission/admbrochure/admission01', '/'], - target: '/pku/ss/pgadmin', - }, - ], - }, -}; diff --git a/lib/routes/pku/rccp/mzyt.ts b/lib/routes/pku/rccp/mzyt.ts index fb436b2d8..81023ff7f 100644 --- a/lib/routes/pku/rccp/mzyt.ts +++ b/lib/routes/pku/rccp/mzyt.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.rccp.pku.edu.cn/mzyt/'; -export default async (ctx) => { +export const route: Route = { + path: '/rccp/mzyt', + categories: ['university'], + example: '/pku/rccp/mzyt', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.rccp.pku.edu.cn/'], + }, + name: '每周一推 - 中国政治学研究中心', + maintainers: ['vhxubo'], + handler, + url: 'www.rccp.pku.edu.cn/', +}; + +async function handler() { const response = await got(baseUrl); const $ = load(response.data); - ctx.set('data', { + return { title: '每周一推 - 北京大学中国政治学研究中心', link: baseUrl, description: $('meta[name="description"]').attr('content'), @@ -19,5 +42,5 @@ export default async (ctx) => { link: baseUrl + $(item).find('a').attr('href'), })) .get(), - }); -}; + }; +} diff --git a/lib/routes/pku/router.ts b/lib/routes/pku/router.ts deleted file mode 100644 index 1575454cf..000000000 --- a/lib/routes/pku/router.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default (router) => { - router.get('/admission/sszs', './pkuyjs'); - router.get('/bbs/hot', './bbs/hot'); - router.get('/cls/announcement', './cls/announcement'); - router.get('/cls/lecture', './cls/lecture'); - router.get('/eecs/:type?', './eecs'); - router.get('/hr/:category?', './hr'); - router.get('/nsd/gd', './nsd'); - router.get('/rccp/mzyt', './rccp/mzyt'); - router.get('/scc/recruit/:type?', './scc/recruit'); - router.get('/ss/notice', './ss/notice.js'); - router.get('/ss/admission', './ss/admission.js'); - router.get('/ss/pgadmin', './ss/pg-admin.js'); -}; diff --git a/lib/routes/pku/scc/recruit.ts b/lib/routes/pku/scc/recruit.ts index a06d66172..9248466e7 100644 --- a/lib/routes/pku/scc/recruit.ts +++ b/lib/routes/pku/scc/recruit.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,28 @@ const arr = { }; const baseUrl = 'https://scc.pku.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/scc/recruit/:type?', + categories: ['university'], + example: '/pku/scc/recruit/zpxx', + parameters: { type: '分区,见下表,默认请求 `zpxx`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '学生就业指导服务中心', + maintainers: ['DylanXie123'], + handler, + description: `| xwrd | tzgg | zpxx | sxxx | cyxx | + | -------- | -------- | -------- | -------- | -------- | + | 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'zpxx'; const rootUrl = baseUrl + arr[type]; @@ -36,7 +58,7 @@ export default async (ctx) => { const sorted = list.sort((a, b) => b.pubDate.getTime() - a.pubDate.getTime()).slice(0, 10); - ctx.set('data', { + return { title: `北京大学学生就业指导服务中心 - ${feed_title}`, link: rootUrl, item: await Promise.all( @@ -54,5 +76,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/pku/ss/admission.ts b/lib/routes/pku/ss/admission.ts index 7738cd5cf..0028c2146 100644 --- a/lib/routes/pku/ss/admission.ts +++ b/lib/routes/pku/ss/admission.ts @@ -1,16 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseUrl, getSingleRecord, getArticle } from './common'; const host = `${baseUrl}/admission/admnotice/`; -export default async (ctx) => { +export const route: Route = { + path: '/ss/admission', + categories: ['university'], + example: '/pku/ss/admission', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ss.pku.edu.cn/admission/admnotice', 'ss.pku.edu.cn/'], + }, + name: '软件与微电子学院 - 招生通知', + maintainers: ['legr4ndk'], + handler, + url: 'ss.pku.edu.cn/admission/admnotice', +}; + +async function handler() { const items = await getSingleRecord(host); const out = await Promise.all(items.map((item) => getArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '北大软微-招生通知', description: '北京大学软件与微电子学院 - 招生通知', link: host, item: out, - }); -}; + }; +} diff --git a/lib/routes/pku/ss/notice.ts b/lib/routes/pku/ss/notice.ts index a37b0d687..70ee3fc42 100644 --- a/lib/routes/pku/ss/notice.ts +++ b/lib/routes/pku/ss/notice.ts @@ -1,16 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseUrl, getSingleRecord, getArticle } from './common'; const host = `${baseUrl}/newscenter/notice/`; -export default async (ctx) => { +export const route: Route = { + path: '/ss/notice', + radar: { + source: ['ss.pku.edu.cn/index.php/newscenter/notice', 'ss.pku.edu.cn/'], + }, + name: 'Unknown', + maintainers: ['legr4ndk'], + handler, + url: 'ss.pku.edu.cn/index.php/newscenter/notice', +}; + +async function handler() { const items = await getSingleRecord(host); const out = await Promise.all(items.map((item) => getArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '北大软微-通知公告', description: '北京大学软件与微电子学院 - 通知公告', link: host, item: out, - }); -}; + }; +} diff --git a/lib/routes/pku/ss/pg-admin.ts b/lib/routes/pku/ss/pg-admin.ts index 197ef857f..7dc987ba2 100644 --- a/lib/routes/pku/ss/pg-admin.ts +++ b/lib/routes/pku/ss/pg-admin.ts @@ -1,16 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { baseUrl, getSingleRecord, getArticle } from './common'; const host = `${baseUrl}/admission/admbrochure/`; -export default async (ctx) => { +export const route: Route = { + path: '/ss/pgadmin', + categories: ['university'], + example: '/pku/ss/pgadmin', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ss.pku.edu.cn/admission/admbrochure/admission01', 'ss.pku.edu.cn/'], + }, + name: '软件与微电子学院 - 硕士统考招生通知', + maintainers: ['legr4ndk'], + handler, + url: 'ss.pku.edu.cn/admission/admbrochure/admission01', +}; + +async function handler() { const items = await getSingleRecord(host); const out = await Promise.all(items.map((item) => getArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '北大软微-硕士统考招生', description: '北京大学软件与微电子学院 - 硕士统考招生通知', link: host, item: out, - }); -}; + }; +} diff --git a/lib/routes/playno1/av.ts b/lib/routes/playno1/av.ts index 35b87fdf3..7b8f7384a 100644 --- a/lib/routes/playno1/av.ts +++ b/lib/routes/playno1/av.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,32 @@ import timezone from '@/utils/timezone'; import { cookieJar, processArticle } from './utils'; const baseUrl = 'http://www.playno1.com'; -export default async (ctx) => { +export const route: Route = { + path: '/av/:catid?', + categories: ['bbs'], + example: '/playno1/av', + parameters: { catid: '分类,见下表,默认为全部文章' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'AV', + maintainers: ['TonyRL'], + handler, + description: `:::warning +目前观测到该博客可能禁止日本 IP 访问。建议部署在日本区以外的服务器上。 +::: + + | 全部文章 | AV 新聞 | AV 導覽 | + | -------- | ------- | ------- | + | 78 | 3 | 5 |`, +}; + +async function handler(ctx) { const { catid = '78' } = ctx.req.param(); const url = `${baseUrl}/portal.php?mod=list&catid=${catid}`; const response = await got(url, { @@ -33,10 +59,10 @@ export default async (ctx) => { items = await processArticle(items, cache); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: items, language: 'zh-TW', - }); -}; + }; +} diff --git a/lib/routes/playno1/maintainer.ts b/lib/routes/playno1/maintainer.ts deleted file mode 100644 index fa8726329..000000000 --- a/lib/routes/playno1/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/av/:catid?': ['TonyRL'], - '/st/:catid?': ['TonyRL'], -}; diff --git a/lib/routes/playno1/namespace.ts b/lib/routes/playno1/namespace.ts new file mode 100644 index 000000000..f7d64bf8d --- /dev/null +++ b/lib/routes/playno1/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PLAYNO.1 玩樂達人', + url: 'stno1.playno1.com', +}; diff --git a/lib/routes/playno1/radar.ts b/lib/routes/playno1/radar.ts deleted file mode 100644 index 58e1cc5f5..000000000 --- a/lib/routes/playno1/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'playno1.com': { - _name: 'PLAYNO.1玩樂達人', - stno1: [ - { - title: '情趣', - docs: 'https://docs.rsshub.app/routes/bbs#playno-1-wan-le-da-ren', - source: ['/stno1/:catid/'], - target: '/playno1/st/:catid', - }, - ], - www: [ - { - title: 'AV', - docs: 'https://docs.rsshub.app/routes/bbs#playno-1-wan-le-da-ren', - source: ['/portal.php'], - target: (_params, url) => `/playno1/av/${new URL(url).searchParams.get('catid')}`, - }, - ], - }, -}; diff --git a/lib/routes/playno1/router.ts b/lib/routes/playno1/router.ts deleted file mode 100644 index 7d934c69b..000000000 --- a/lib/routes/playno1/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/av/:catid?', './av'); - router.get('/st/:catid?', './st'); -}; diff --git a/lib/routes/playno1/st.ts b/lib/routes/playno1/st.ts index 73625fdf9..f51ce9514 100644 --- a/lib/routes/playno1/st.ts +++ b/lib/routes/playno1/st.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,32 @@ import timezone from '@/utils/timezone'; import { cookieJar, processArticle } from './utils'; const baseUrl = 'http://stno1.playno1.com'; -export default async (ctx) => { +export const route: Route = { + path: '/st/:catid?', + categories: ['bbs'], + example: '/playno1/st', + parameters: { catid: '分类,见下表,默认为全部文章' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['stno1.playno1.com/stno1/:catid/'], + target: '/st/:catid', + }, + name: '情趣', + maintainers: ['TonyRL'], + handler, + description: `| 全部文章 | 情趣體驗報告 | 情趣新聞 | 情趣研究所 | + | -------- | ------------ | -------- | ---------- | + | all | experience | news | graduate |`, +}; + +async function handler(ctx) { const { catid = 'all' } = ctx.req.param(); const url = `${baseUrl}/stno1/${catid}/`; const response = await got(url, { @@ -28,10 +54,10 @@ export default async (ctx) => { items = await processArticle(items, cache); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: items, language: 'zh-TW', - }); -}; + }; +} diff --git a/lib/routes/playpcesor/maintainer.ts b/lib/routes/playpcesor/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/playpcesor/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/playpcesor/namespace.ts b/lib/routes/playpcesor/namespace.ts new file mode 100644 index 000000000..ec98208b9 --- /dev/null +++ b/lib/routes/playpcesor/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '电脑玩物', + url: 'playpcesor.com', +}; diff --git a/lib/routes/playpcesor/radar.ts b/lib/routes/playpcesor/radar.ts deleted file mode 100644 index d7343f287..000000000 --- a/lib/routes/playpcesor/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'playpcesor.com': { - _name: '电脑玩物', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#dian-nao-wan-wu', - source: ['/'], - target: '/playpcesor', - }, - ], - }, -}; diff --git a/lib/routes/playpcesor/router.ts b/lib/routes/playpcesor/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/playpcesor/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/playpcesor/rss.ts b/lib/routes/playpcesor/rss.ts index 2b90bced9..022e2f273 100644 --- a/lib/routes/playpcesor/rss.ts +++ b/lib/routes/playpcesor/rss.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['playpcesor.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'playpcesor.com/', +}; + +async function handler() { const url = 'https://www.playpcesor.com/'; const response = await got({ method: 'get', url }); const $ = load(response.data); @@ -24,9 +37,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '电脑玩物', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/plurk/anonymous.ts b/lib/routes/plurk/anonymous.ts index cc8e438aa..de9041fe8 100644 --- a/lib/routes/plurk/anonymous.ts +++ b/lib/routes/plurk/anonymous.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/anonymous', + categories: ['social-media'], + example: '/plurk/anonymous', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['plurk.com/anonymous'], + }, + name: 'Anonymous', + maintainers: ['TonyRL'], + handler, + url: 'plurk.com/anonymous', +}; + +async function handler(ctx) { const { data: apiResponse } = await got(`${baseUrl}/Stats/getAnonymousPlurks`, { searchParams: { offset: 0, @@ -15,10 +38,10 @@ export default async (ctx) => { const items = await Promise.all(Object.values(apiResponse).map((item) => getPlurk(`plurk:${item.plurk_id}`, item, 'ಠ_ಠ', cache.tryGet))); - ctx.set('data', { + return { title: 'Anonymous - Plurk', image: 'https://s.plurk.com/2c1574c02566f3b06e91.png', link: `${baseUrl}/anonymous`, item: items, - }); -}; + }; +} diff --git a/lib/routes/plurk/hotlinks.ts b/lib/routes/plurk/hotlinks.ts index 4b32f2557..17172263a 100644 --- a/lib/routes/plurk/hotlinks.ts +++ b/lib/routes/plurk/hotlinks.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/hotlinks', + categories: ['social-media'], + example: '/plurk/hotlinks', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['plurk.com/hotlinks'], + }, + name: 'Hotlinks', + maintainers: ['TonyRL'], + handler, + url: 'plurk.com/hotlinks', +}; + +async function handler(ctx) { const { data: apiResponse } = await got(`${baseUrl}/hotlinks/getLinks`, { searchParams: { offset: 0, @@ -12,10 +35,10 @@ export default async (ctx) => { const items = await Promise.all(apiResponse.map((item) => getPlurk(item.link_url.startsWith('https://www.plurk.com/p/') ? item.link_url : `plurk:${item.link_url}`, item, null, cache.tryGet))); - ctx.set('data', { + return { title: `Hot Links - Plurk`, image: 'https://s.plurk.com/2c1574c02566f3b06e91.png', link: `${baseUrl}/hotlinks`, item: items, - }); -}; + }; +} diff --git a/lib/routes/plurk/maintainer.ts b/lib/routes/plurk/maintainer.ts deleted file mode 100644 index c50f95b6d..000000000 --- a/lib/routes/plurk/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/anonymous': ['TonyRL'], - '/hotlinks': ['TonyRL'], - '/news/:lang?': ['TonyRL'], - '/search/:keyword': ['TonyRL'], - '/top/:category?/:lang?': ['TonyRL'], - '/topic/:topic': ['TonyRL'], - '/user/:user': ['TonyRL'], -}; diff --git a/lib/routes/plurk/namespace.ts b/lib/routes/plurk/namespace.ts new file mode 100644 index 000000000..85196dbde --- /dev/null +++ b/lib/routes/plurk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Plurk', + url: 'plurk.com', +}; diff --git a/lib/routes/plurk/news.ts b/lib/routes/plurk/news.ts index 68957fbdc..cb7bbde7e 100644 --- a/lib/routes/plurk/news.ts +++ b/lib/routes/plurk/news.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, fetchFriends, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:lang?', + categories: ['social-media'], + example: '/plurk/news/:lang?', + parameters: { lang: 'Language, see the table above, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['plurk.com/news'], + target: '/news', + }, + name: 'Plurk News', + maintainers: ['TonyRL'], + handler, + url: 'plurk.com/news', +}; + +async function handler(ctx) { const { lang = 'en' } = ctx.req.param(); const { data: apiResponse } = await got(`${baseUrl}/PlurkTop/fetchOfficialPlurks`, { searchParams: { @@ -15,10 +39,10 @@ export default async (ctx) => { const items = await Promise.all(apiResponse.map((item) => getPlurk(`plurk:${item.plurk_id}`, item, names[item.user_id].display_name, cache.tryGet))); - ctx.set('data', { + return { title: 'Plurk News - Plurk', image: 'https://s.plurk.com/2c1574c02566f3b06e91.png', link: `${baseUrl}/news`, item: items, - }); -}; + }; +} diff --git a/lib/routes/plurk/radar.ts b/lib/routes/plurk/radar.ts deleted file mode 100644 index 7f55791c3..000000000 --- a/lib/routes/plurk/radar.ts +++ /dev/null @@ -1,56 +0,0 @@ -export default { - 'plurk.com': { - _name: 'Plurk', - '.': [ - { - title: '話題', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/topic/:topic'], - target: '/plurk/topic/:topic', - }, - { - title: '話題排行榜', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/top'], - target: (_, url) => { - const hash = new URL(url).hash; - return `/plurk/top/${hash ? hash.slice(1) : 'topReplurks'}`; - }, - }, - { - title: '偷偷說', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/anonymous'], - target: '/plurk/anonymous', - }, - { - title: '搜尋', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/search'], - target: (_, url) => `/plurk/search/${new URL(url).searchParams.get('q')}`, - }, - { - title: '最近分享', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/hotlinks'], - target: '/plurk/hotlinks', - }, - { - title: '噗浪消息', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/news'], - target: '/plurk/news', - }, - { - title: '用戶', - docs: 'https://docs.rsshub.app/routes/social-media#plurk', - source: ['/:user'], - target: (params) => { - if (params.user !== 'portal' && params.user !== 'top' && params.user !== 'anonymous' && params.user !== 'search' && params.user !== 'hotlinks' && params.user !== 'news') { - return `/plurk/user/${params.user}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/plurk/router.ts b/lib/routes/plurk/router.ts deleted file mode 100644 index 36278fc14..000000000 --- a/lib/routes/plurk/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/anonymous', './anonymous'); - router.get('/hotlinks', './hotlinks'); - router.get('/news/:lang?', './news'); - router.get('/search/:keyword', './search'); - router.get('/top/:category?/:lang?', './top'); - router.get('/topic/:topic', './topic'); - router.get('/user/:user', './user'); -}; diff --git a/lib/routes/plurk/search.ts b/lib/routes/plurk/search.ts index f5b9675b9..58764cb40 100644 --- a/lib/routes/plurk/search.ts +++ b/lib/routes/plurk/search.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import dayjs from 'dayjs'; import { baseUrl, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['social-media'], + example: '/plurk/search/FGO', + parameters: { keyword: 'Search keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const { data: apiResponse } = await got.post(`${baseUrl}/Search/search2`, { searchParams: { @@ -18,11 +37,11 @@ export default async (ctx) => { const items = await Promise.all(plurks.map((item) => getPlurk(`plurk:${item.plurk_id}`, item, users[item.user_id].display_name, cache.tryGet))); - ctx.set('data', { + return { title: `Search "${keyword}" - Plurk`, description: 'Search messages on Plurk', image: 'https://s.plurk.com/e8266f512246cdbc2721.jpg', link: `${baseUrl}/search?q=${encodeURIComponent(keyword)}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/plurk/top.ts b/lib/routes/plurk/top.ts index 075ed8286..07a8939d9 100644 --- a/lib/routes/plurk/top.ts +++ b/lib/routes/plurk/top.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getPlurk } from './utils'; const categoryList = new Set(['topReplurks', 'topFavorites', 'topResponded']); -export default async (ctx) => { +export const route: Route = { + path: '/top/:category?/:lang?', + categories: ['social-media'], + example: '/plurk/top/topReplurks', + parameters: { category: 'Category, see the table below, `topReplurks` by default', lang: 'Language, see the table below, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Top', + maintainers: ['TonyRL'], + handler, + description: `| Top Replurks | Top Favorites | Top Responded | + | ------------ | ------------- | ------------- | + | topReplurks | topFavorites | topResponded | + + | English | 中文(繁體) | + | ------- | ------------ | + | en | zh |`, +}; + +async function handler(ctx) { const { category = 'topReplurks', lang = 'en' } = ctx.req.param(); if (!categoryList.has(category)) { throw new Error(`Invalid category: ${category}`); @@ -20,11 +46,11 @@ export default async (ctx) => { const items = await Promise.all(apiResponse.stats.map((item) => item[1]).map((item) => getPlurk(`plurk:${item.plurk_id}`, item, item.owner.display_name, cache.tryGet))); - ctx.set('data', { + return { title: 'Top Plurk - Plurk', image: 'https://s.plurk.com/2c1574c02566f3b06e91.png', link: `${baseUrl}/top#${category}`, item: items, language: lang, - }); -}; + }; +} diff --git a/lib/routes/plurk/topic.ts b/lib/routes/plurk/topic.ts index 87e3ada62..52248b606 100644 --- a/lib/routes/plurk/topic.ts +++ b/lib/routes/plurk/topic.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, fetchFriends, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['social-media'], + example: '/plurk/topic/standwithukraine', + parameters: { topic: 'Topic ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['plurk.com/topic/:topic'], + }, + name: 'Topic', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const { data: pageResponse } = await got(`${baseUrl}/topic/${topic}`); const { data: apiResponse } = await got(`${baseUrl}/topic/getPlurks`, { @@ -24,11 +46,11 @@ export default async (ctx) => { const items = await Promise.all(Object.values(apiResponse).map((item) => getPlurk(`plurk:${item.plurk_id}`, item, names[item.user_id].display_name, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[property=og:description]').attr('content'), image: $('meta[property=og:image]').attr('content') || $('meta[name=msapplication-TileImage]').attr('content'), link: `${baseUrl}/topic/${topic}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/plurk/user.ts b/lib/routes/plurk/user.ts index 380b2faae..ac5f24f02 100644 --- a/lib/routes/plurk/user.ts +++ b/lib/routes/plurk/user.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, fetchFriends, getPlurk } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user', + categories: ['social-media'], + example: '/plurk/user/plurkoffice', + parameters: { user: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const user = ctx.req.param('user'); const { data: pageResponse } = await got(`${baseUrl}/${user}`); @@ -22,11 +41,11 @@ export default async (ctx) => { const items = await Promise.all(publicPlurks.map((item) => getPlurk(`plurk:${item.plurk_id}`, item, names[item.user_id].display_name, cache.tryGet))); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[property=og:description]').attr('content'), image: $('meta[property=og:image]').attr('content') || $('meta[name=msapplication-TileImage]').attr('content'), link: `${baseUrl}/${user}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/pnas/index.ts b/lib/routes/pnas/index.ts index c667ff730..fed48a52f 100644 --- a/lib/routes/pnas/index.ts +++ b/lib/routes/pnas/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,19 @@ import { CookieJar } from 'tough-cookie'; import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/:topicPath{.+}?', + radar: { + source: ['pnas.org/*topicPath'], + target: '/:topicPath', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'pnas.org/*topicPath', +}; + +async function handler(ctx) { const baseUrl = 'https://www.pnas.org'; const topicPath = ctx.req.param('topicPath'); const link = `${baseUrl}/${topicPath ?? 'latest'}`; @@ -95,12 +108,12 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: `${$('.banner-widget__content h1').text()} - PNAS`, description: $('.banner-widget__content p').text(), image: 'https://www.pnas.org/favicon.ico', language: 'en-US', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/pnas/maintainer.ts b/lib/routes/pnas/maintainer.ts deleted file mode 100644 index 244c0c673..000000000 --- a/lib/routes/pnas/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:topicPath*': ['emdoe', 'y9c'], -}; diff --git a/lib/routes/pnas/namespace.ts b/lib/routes/pnas/namespace.ts new file mode 100644 index 000000000..350e1d68a --- /dev/null +++ b/lib/routes/pnas/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Proceedings of The National Academy of Sciences', + url: 'pnas.org', +}; diff --git a/lib/routes/pnas/radar.ts b/lib/routes/pnas/radar.ts deleted file mode 100644 index bf9928dec..000000000 --- a/lib/routes/pnas/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pnas.org': { - _name: 'Proceedings of the National Academy of Sciences', - '.': [ - { - title: '期刊', - docs: 'https://docs.rsshub.app/routes/journal#proceedings-of-the-national-academy-of-sciences', - source: ['/*topicPath'], - target: '/pnas/:topicPath', - }, - ], - }, -}; diff --git a/lib/routes/pnas/router.ts b/lib/routes/pnas/router.ts deleted file mode 100644 index c83bd2982..000000000 --- a/lib/routes/pnas/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:topicPath{.+}?', './index'); -}; diff --git a/lib/routes/pornhub/category-url.ts b/lib/routes/pornhub/category-url.ts index e6afedc8c..cbb09cd1d 100644 --- a/lib/routes/pornhub/category-url.ts +++ b/lib/routes/pornhub/category-url.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; import { headers, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/category_url/:url?', + categories: ['multimedia'], + example: '/pornhub/category_url/video%3Fc%3D15%26o%3Dmv%26t%3Dw%26cc%3Djp', + parameters: { language: 'language, see below', url: 'relative path after `pornhub.com/`, need to be URL encoded' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Video List', + maintainers: ['I2IMk', 'queensferryme'], + handler, + description: `**\`language\`** + + Refer to [Pornhub F.A.Qs](https://help.pornhub.com/hc/en-us/articles/360044327034-How-do-I-change-the-language-), English by default. For example: + + - \`cn\` (Chinese), for Pornhub in China [https://cn.pornhub.com](https://cn.pornhub.com); + + - \`jp\` (Japanese), for Pornhub in Japan [https://jp.pornhub.com](https://jp.pornhub.com) etc.`, +}; + +async function handler(ctx) { const { language = 'www', url = 'video' } = ctx.req.param(); const link = `https://${language}.pornhub.com/${url}`; if (!isValidHost(language)) { @@ -16,10 +42,10 @@ export default async (ctx) => { .toArray() .map((e) => parseItems($(e))); - ctx.set('data', { + return { title: $('title').first().text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/pornhub/category.ts b/lib/routes/pornhub/category.ts index 0c9ed7269..dba121779 100644 --- a/lib/routes/pornhub/category.ts +++ b/lib/routes/pornhub/category.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { defaultDomain, renderDescription } from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:caty', + categories: ['multimedia'], + example: '/pornhub/category/popular-with-women', + parameters: { caty: 'category, see [categories](https://www.pornhub.com/webmasters/categories)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('caty'); const categories = await cache.tryGet('pornhub:categories', async () => { @@ -37,9 +56,9 @@ export default async (ctx) => { category: [...new Set([...item.tags.map((t) => t.tag_name), ...item.categories.map((c) => c.category)])], })); - ctx.set('data', { + return { title: `Pornhub - ${categoryName}`, link: `${defaultDomain}/video?c=${categoryId}`, item: list, - }); -}; + }; +} diff --git a/lib/routes/pornhub/maintainer.ts b/lib/routes/pornhub/maintainer.ts deleted file mode 100644 index 7cae02042..000000000 --- a/lib/routes/pornhub/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/category/:caty': ['nczitzk'], - '/search/:keyword': ['nczitzk'], - '/:language?/category_url/:url?': ['I2IMk', 'queensferryme'], - '/:language?/model/:username/:sort?': ['I2IMk', 'queensferryme'], - '/:language?/pornstar/:username/:sort?': ['I2IMk', 'queensferryme'], - '/:language?/users/:username': ['I2IMk', 'queensferryme'], -}; diff --git a/lib/routes/pornhub/model.ts b/lib/routes/pornhub/model.ts index d43620ca3..7485cc753 100644 --- a/lib/routes/pornhub/model.ts +++ b/lib/routes/pornhub/model.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; import { headers, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/model/:username/:sort?', + categories: ['multimedia'], + example: '/pornhub/model/stacy-starando', + parameters: { language: 'language, see below', username: 'username, part of the url e.g. `pornhub.com/model/stacy-starando`', sort: 'sorting method, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pornhub.com/model/:username/*'], + target: '/model/:username', + }, + name: 'Verified amateur / Model', + maintainers: ['I2IMk', 'queensferryme'], + handler, +}; + +async function handler(ctx) { const { language = 'www', username, sort = '' } = ctx.req.param(); const link = `https://${language}.pornhub.com/model/${username}/videos${sort ? `?o=${sort}` : ''}`; if (!isValidHost(language)) { @@ -16,7 +39,7 @@ export default async (ctx) => { .toArray() .map((e) => parseItems($(e))); - ctx.set('data', { + return { title: $('title').first().text(), description: $('section.aboutMeSection').text().trim(), link, @@ -25,5 +48,5 @@ export default async (ctx) => { icon: $('#getAvatar').attr('src'), language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/pornhub/namespace.ts b/lib/routes/pornhub/namespace.ts new file mode 100644 index 000000000..a44ea7fb1 --- /dev/null +++ b/lib/routes/pornhub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PornHub', + url: 'pornhub.com', +}; diff --git a/lib/routes/pornhub/pornstar.ts b/lib/routes/pornhub/pornstar.ts index 57a6fd369..48ace7b5c 100644 --- a/lib/routes/pornhub/pornstar.ts +++ b/lib/routes/pornhub/pornstar.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; import { headers, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/pornstar/:username/:sort?', + categories: ['multimedia'], + example: '/pornhub/pornstar/june-liu', + parameters: { language: 'language, see below', username: 'username, part of the url e.g. `pornhub.com/pornstar/june-liu`', sort: 'sorting method, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pornhub.com/pornstar/:username/*'], + target: '/pornstar/:username', + }, + name: 'Verified model / Pornstar', + maintainers: ['I2IMk', 'queensferryme'], + handler, + description: `**\`sort\`** + + | Most Recent | Most Viewed | Top Rated | Longest | Best | + | ----------- | ----------- | --------- | ------- | ---- | + | mr | mv | tr | lg | |`, +}; + +async function handler(ctx) { const { language = 'www', username, sort = 'mr' } = ctx.req.param(); const link = `https://${language}.pornhub.com/pornstar/${username}/videos?o=${sort}`; if (!isValidHost(language)) { @@ -16,7 +44,7 @@ export default async (ctx) => { .toArray() .map((e) => parseItems($(e))); - ctx.set('data', { + return { title: $('title').first().text(), description: $('section.aboutMeSection').text().trim(), link, @@ -25,5 +53,5 @@ export default async (ctx) => { icon: $('#getAvatar').attr('src'), language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/pornhub/radar.ts b/lib/routes/pornhub/radar.ts deleted file mode 100644 index 1740234cc..000000000 --- a/lib/routes/pornhub/radar.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default { - 'pornhub.com': { - _name: 'PornHub', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - source: ['/categories/:caty', '/video'], - target: (params, url) => { - if (params.caty) { - return `/pornhub/category/${params.caty}`; - } - return `/pornhub/category/${new URL(url).searchParams.get('c')}`; - }, - }, - { - title: 'Keyword Search', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - source: ['/video/search'], - target: (_, url) => `/pornhub/category/${new URL(url).searchParams.get('search')}`, - }, - { - title: 'Users', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - source: ['/users/:username/*'], - target: '/pornhub/users/:username', - }, - { - title: 'Verified amateur / Model', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - source: ['/model/:username/*'], - target: '/pornhub/model/:username', - }, - { - title: 'Verified model / Pornstar', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - source: ['/pornstar/:username/*'], - target: '/pornhub/pornstar/:username', - }, - { - title: 'Video List', - docs: 'https://docs.rsshub.app/routes/multimedia#pornhub', - }, - ], - }, -}; diff --git a/lib/routes/pornhub/router.ts b/lib/routes/pornhub/router.ts deleted file mode 100644 index 05bf2e74e..000000000 --- a/lib/routes/pornhub/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/category/:caty', './category'); - router.get('/search/:keyword', './search'); - router.get('/:language?/category_url/:url?', './category-url'); - router.get('/:language?/model/:username/:sort?', './model'); - router.get('/:language?/pornstar/:username/:sort?', './pornstar'); - router.get('/:language?/users/:username', './users'); -}; diff --git a/lib/routes/pornhub/search.ts b/lib/routes/pornhub/search.ts index 626b5b50e..07dd7bb1b 100644 --- a/lib/routes/pornhub/search.ts +++ b/lib/routes/pornhub/search.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { defaultDomain, renderDescription } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['multimedia'], + example: '/pornhub/search/stepsister', + parameters: { keyword: 'keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keyword Search', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const currentUrl = `${defaultDomain}/webmasters/search?search=${keyword}`; const response = await got(currentUrl); @@ -15,9 +34,9 @@ export default async (ctx) => { category: [...new Set([...item.tags.map((t) => t.tag_name), ...item.categories.map((c) => c.category)])], })); - ctx.set('data', { + return { title: `Pornhub - ${keyword}`, link: currentUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/pornhub/users.ts b/lib/routes/pornhub/users.ts index a3284b7fe..5c231ea74 100644 --- a/lib/routes/pornhub/users.ts +++ b/lib/routes/pornhub/users.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; import { headers, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/users/:username', + categories: ['multimedia'], + example: '/pornhub/users/pornhubmodels', + parameters: { language: 'language, see below', username: 'username, part of the url e.g. `pornhub.com/users/pornhubmodels`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pornhub.com/users/:username/*'], + target: '/users/:username', + }, + name: 'Users', + maintainers: ['I2IMk', 'queensferryme'], + handler, +}; + +async function handler(ctx) { const { language = 'www', username } = ctx.req.param(); const link = `https://${language}.pornhub.com/users/${username}/videos`; if (!isValidHost(language)) { @@ -16,7 +39,7 @@ export default async (ctx) => { .toArray() .map((e) => parseItems($(e))); - ctx.set('data', { + return { title: $('title').first().text(), description: $('.aboutMeText').text().trim(), link, @@ -26,5 +49,5 @@ export default async (ctx) => { language: $('html').attr('lang'), allowEmpty: true, item: items, - }); -}; + }; +} diff --git a/lib/routes/postman/maintainer.ts b/lib/routes/postman/maintainer.ts deleted file mode 100644 index 87761789c..000000000 --- a/lib/routes/postman/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/release-notes': ['nczitzk'], -}; diff --git a/lib/routes/postman/namespace.ts b/lib/routes/postman/namespace.ts new file mode 100644 index 000000000..c35f2c0cb --- /dev/null +++ b/lib/routes/postman/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Postman', + url: 'postman.com', +}; diff --git a/lib/routes/postman/radar.ts b/lib/routes/postman/radar.ts deleted file mode 100644 index 3501d94cc..000000000 --- a/lib/routes/postman/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'postman.com': { - _name: 'Postman', - '.': [ - { - title: 'Release Notes', - docs: 'https://docs.rsshub.app/routes/program-update#postman-release-notes', - source: ['/downloads/release-notes', '/'], - target: '/postman/release-notes', - }, - ], - }, -}; diff --git a/lib/routes/postman/release-notes.ts b/lib/routes/postman/release-notes.ts index 56f31b94c..c3e137e82 100644 --- a/lib/routes/postman/release-notes.ts +++ b/lib/routes/postman/release-notes.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/release-notes', + categories: ['program-update'], + example: '/postman/release-notes', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['postman.com/downloads/release-notes', 'postman.com/'], + }, + name: 'Release Notes', + maintainers: ['nczitzk'], + handler, + url: 'postman.com/downloads/release-notes', +}; + +async function handler() { const rootUrl = 'https://www.postman.com'; const apiUrl = `${rootUrl}/mkapi/release.json`; const currentUrl = `${rootUrl}/downloads/release-notes`; @@ -20,9 +43,9 @@ export default async (ctx) => { description: md.render(item.content), })); - ctx.set('data', { + return { title: 'Release Notes | Postman', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/postman/router.ts b/lib/routes/postman/router.ts deleted file mode 100644 index 26822698d..000000000 --- a/lib/routes/postman/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/release-notes', './release-notes'); -}; diff --git a/lib/routes/priconne-redive/maintainer.ts b/lib/routes/priconne-redive/maintainer.ts deleted file mode 100644 index 260d91f19..000000000 --- a/lib/routes/priconne-redive/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['SayaSS'], -}; diff --git a/lib/routes/priconne-redive/namespace.ts b/lib/routes/priconne-redive/namespace.ts new file mode 100644 index 000000000..06e85aafe --- /dev/null +++ b/lib/routes/priconne-redive/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PRINCESS CONNECT! Re Dive プリンセスコネクト!Re Dive', + url: 'priconne-redive.jp', +}; diff --git a/lib/routes/priconne-redive/news.ts b/lib/routes/priconne-redive/news.ts index b24e24487..9ff273fae 100644 --- a/lib/routes/priconne-redive/news.ts +++ b/lib/routes/priconne-redive/news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import cache from '@/utils/cache'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/priconne-redive/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['priconne-redive.jp/news'], + }, + name: '日服公告', + maintainers: ['SayaSS'], + handler, + url: 'priconne-redive.jp/news', +}; + +async function handler() { const parseContent = (htmlString) => { const $ = load(htmlString); @@ -46,10 +69,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '公主链接日服-新闻', link: 'https://priconne-redive.jp/news/', language: 'ja', item: out, - }); -}; + }; +} diff --git a/lib/routes/priconne-redive/radar.ts b/lib/routes/priconne-redive/radar.ts deleted file mode 100644 index 65793b493..000000000 --- a/lib/routes/priconne-redive/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'priconne-redive.jp': { - _name: 'プリンセスコネクト!Re:Dive', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/game#princess-connect-re-dive-%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BB%E3%82%B9%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%88%EF%BC%81re-dive', - source: ['/news'], - target: '/priconne-redive/news', - }, - ], - }, -}; diff --git a/lib/routes/priconne-redive/router.ts b/lib/routes/priconne-redive/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/priconne-redive/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/producthunt/maintainer.ts b/lib/routes/producthunt/maintainer.ts deleted file mode 100644 index eef241fbe..000000000 --- a/lib/routes/producthunt/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/today': ['miaoyafeng', 'Fatpandac'], -}; diff --git a/lib/routes/producthunt/namespace.ts b/lib/routes/producthunt/namespace.ts new file mode 100644 index 000000000..2132b871f --- /dev/null +++ b/lib/routes/producthunt/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Product Hunt', + url: 'www.producthunt.com', + description: `> 官方 Feed 地址为: [https://www.producthunt.com/feed](https://www.producthunt.com/feed)`, +}; diff --git a/lib/routes/producthunt/radar.ts b/lib/routes/producthunt/radar.ts deleted file mode 100644 index 1677e3e70..000000000 --- a/lib/routes/producthunt/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'producthunt.com': { - _name: 'Product Hunt', - www: [ - { - title: 'Today Popular', - docs: 'https://docs.rsshub.app/routes/other#product-hunt', - source: ['/'], - target: '/producthunt/today', - }, - ], - }, -}; diff --git a/lib/routes/producthunt/router.ts b/lib/routes/producthunt/router.ts deleted file mode 100644 index c582a661c..000000000 --- a/lib/routes/producthunt/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/today', './today'); -}; diff --git a/lib/routes/producthunt/today.ts b/lib/routes/producthunt/today.ts index 658189578..173077c0d 100644 --- a/lib/routes/producthunt/today.ts +++ b/lib/routes/producthunt/today.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['other'], + example: '/producthunt/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.producthunt.com/'], + }, + name: 'Today Popular', + maintainers: ['miaoyafeng', 'Fatpandac'], + handler, + url: 'www.producthunt.com/', +}; + +async function handler() { const response = await got('https://www.producthunt.com/'); const data = JSON.parse(load(response.data)('#__NEXT_DATA__').html()); @@ -40,9 +63,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Product Hunt Today Popular', link: 'https://www.producthunt.com/', item: items, - }); -}; + }; +} diff --git a/lib/routes/ps/maintainer.ts b/lib/routes/ps/maintainer.ts deleted file mode 100644 index ea8e76814..000000000 --- a/lib/routes/ps/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/monthly-games': ['justjustCC'], - '/trophy/:id': ['DIYgod'], -}; diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts index e1cc6605e..8fe30bbda 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { load } from 'cheerio'; import * as path from 'node:path'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/monthly-games', + categories: ['game'], + example: '/ps/monthly-games', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.playstation.com/en-sg/ps-plus/whats-new'], + }, + name: 'PlayStation Monthly Games', + maintainers: ['justjustCC'], + handler, + url: 'www.playstation.com/en-sg/ps-plus/whats-new', +}; + +async function handler() { const baseUrl = 'https://www.playstation.com/en-sg/ps-plus/whats-new/'; const { data: response } = await got(baseUrl); @@ -26,9 +49,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'PlayStation Plus Monthly Games', link: baseUrl, item: list, - }); -}; + }; +} diff --git a/lib/routes/ps/namespace.ts b/lib/routes/ps/namespace.ts new file mode 100644 index 000000000..420fe0c37 --- /dev/null +++ b/lib/routes/ps/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PlayStation Store', + url: 'www.playstation.com', +}; diff --git a/lib/routes/ps/radar.ts b/lib/routes/ps/radar.ts deleted file mode 100644 index fbdd1d203..000000000 --- a/lib/routes/ps/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'playstation.com': { - _name: 'PlayStation Store', - www: [ - { - title: 'Monthly Games', - docs: 'https://docs.rsshub.app/routes/game#playstation-store', - source: ['/en-sg/ps-plus/whats-new'], - target: '/ps/monthly-games', - }, - { - title: 'User trophy', - docs: 'https://docs.rsshub.app/routes/game#playstation-store', - }, - ], - }, -}; diff --git a/lib/routes/ps/router.ts b/lib/routes/ps/router.ts deleted file mode 100644 index 4651511fa..000000000 --- a/lib/routes/ps/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/monthly-games', './monthly-games'); - router.get('/trophy/:id', './trophy'); -}; diff --git a/lib/routes/ps/trophy.ts b/lib/routes/ps/trophy.ts index c25f1f618..4c1d24686 100644 --- a/lib/routes/ps/trophy.ts +++ b/lib/routes/ps/trophy.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/trophy/:id', + categories: ['game'], + example: '/ps/trophy/DIYgod_', + parameters: { id: 'User ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'PlayStation Network user trophy', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got({ @@ -78,9 +97,9 @@ export default async (ctx) => { } result = result.sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)); - ctx.set('data', { + return { title: `${id} 的 PSN 奖杯`, link: `https://psnprofiles.com/${id}/log`, item: result, - }); -}; + }; +} diff --git a/lib/routes/pts/curations.ts b/lib/routes/pts/curations.ts index 2456fa633..6fd718b66 100644 --- a/lib/routes/pts/curations.ts +++ b/lib/routes/pts/curations.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/curations', + categories: ['traditional-media'], + example: '/pts/curations', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.pts.org.tw/curations', 'news.pts.org.tw/'], + }, + name: '專題策展', + maintainers: ['nczitzk'], + handler, + url: 'news.pts.org.tw/curations', +}; + +async function handler() { const rootUrl = 'https://news.pts.org.tw'; const currentUrl = `${rootUrl}/curations`; @@ -37,11 +60,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title') .text() .replace(/第\d+頁 | /, ''), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pts/index.ts b/lib/routes/pts/index.ts index 702f9b55a..b64162ea6 100644 --- a/lib/routes/pts/index.ts +++ b/lib/routes/pts/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://news.pts.org.tw'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/dailynews' : getSubPath(ctx)}`; @@ -63,11 +71,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title') .text() .replace(/第\d+頁 | /, ''), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pts/live.ts b/lib/routes/pts/live.ts index 2a3143349..e0cc1e2fc 100644 --- a/lib/routes/pts/live.ts +++ b/lib/routes/pts/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/live/:id', + categories: ['traditional-media'], + example: '/pts/live/62e8e4bbb4de2cbd74468b2b', + parameters: { id: '報導 id,可在对应整理報導页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.pts.org.tw/live/:id', 'news.pts.org.tw/'], + }, + name: '整理報導', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://news.pts.org.tw'; @@ -45,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `公視新聞網 PNN - ${response.data.data.title.replace(/【不斷更新】/, '')}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pts/maintainer.ts b/lib/routes/pts/maintainer.ts deleted file mode 100644 index a4ff6185d..000000000 --- a/lib/routes/pts/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/category/:id': ['nczitzk'], - '/curations': ['nczitzk'], - '/dailynews': ['nczitzk'], - '/live/:id?': ['nczitzk'], - '/opinion': ['nczitzk'], - '/projects': ['nczitzk'], - '/report': ['nczitzk'], - '/tag/:id': ['nczitzk'], -}; diff --git a/lib/routes/pts/namespace.ts b/lib/routes/pts/namespace.ts new file mode 100644 index 000000000..df77e836c --- /dev/null +++ b/lib/routes/pts/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '公視新聞網', + url: 'news.pts.org.tw', +}; diff --git a/lib/routes/pts/projects.ts b/lib/routes/pts/projects.ts index bfcb0ecc2..209d9d913 100644 --- a/lib/routes/pts/projects.ts +++ b/lib/routes/pts/projects.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/projects', + categories: ['traditional-media'], + example: '/pts/projects', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.pts.org.tw/projects', 'news.pts.org.tw/'], + }, + name: '數位敘事', + maintainers: ['nczitzk'], + handler, + url: 'news.pts.org.tw/projects', +}; + +async function handler() { const rootUrl = 'https://news.pts.org.tw'; const currentUrl = `${rootUrl}/projects`; @@ -37,11 +60,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title') .text() .replace(/第\d+頁 | /, ''), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pts/radar.ts b/lib/routes/pts/radar.ts deleted file mode 100644 index 4b5f6a31e..000000000 --- a/lib/routes/pts/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'pts.org.tw': { - _name: '公視新聞網 PNN', - news: [ - { - title: '即時新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-ji-shi-xin-wen', - source: ['/dailynews', '/'], - target: '/pts/dailynews', - }, - { - title: '專題策展', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-zhuan-ti-ce-zhan', - source: ['/curations', '/'], - target: '/pts/curations', - }, - { - title: '整理報導', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-zheng-li-bao-dao', - source: ['/live/:id', '/'], - target: '/pts/live/:id', - }, - { - title: '觀點', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-guan-dian', - source: ['/opinion', '/'], - target: '/pts/opinion', - }, - { - title: '數位敘事', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-shu-wei-xu-shi', - source: ['/projects', '/'], - target: '/pts/projects', - }, - { - title: '深度報導', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-shen-du-bao-dao', - source: ['/report', '/'], - target: '/pts/report', - }, - { - title: '分類', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-fen-lei', - source: ['/category/:id', '/'], - target: '/pts/category/:id', - }, - { - title: '標籤', - docs: 'https://docs.rsshub.app/routes/traditional-media#gong-shi-xin-wen-wang-biao-qian', - source: ['/tag/:id', '/'], - target: '/pts/tag/:id', - }, - ], - }, -}; diff --git a/lib/routes/pts/router.ts b/lib/routes/pts/router.ts deleted file mode 100644 index 017040b30..000000000 --- a/lib/routes/pts/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/curations', './curations'); - router.get('/live/:id', './live'); - router.get('/projects', './projects'); - router.get('*', './index'); -}; diff --git a/lib/routes/pubmed/maintainer.ts b/lib/routes/pubmed/maintainer.ts deleted file mode 100644 index f4637a024..000000000 --- a/lib/routes/pubmed/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/trending/:filters?': ['nczitzk'], -}; diff --git a/lib/routes/pubmed/namespace.ts b/lib/routes/pubmed/namespace.ts new file mode 100644 index 000000000..b5d0d6801 --- /dev/null +++ b/lib/routes/pubmed/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PubMed', + url: 'pubmed.ncbi.nlm.nih.gov', +}; diff --git a/lib/routes/pubmed/radar.ts b/lib/routes/pubmed/radar.ts deleted file mode 100644 index 9af313771..000000000 --- a/lib/routes/pubmed/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pubmed.ncbi.nlm.nih.gov': { - _name: 'PubMed', - '.': [ - { - title: 'Trending articles', - docs: 'https://docs.rsshub.app/routes/journal#pubmed-trending-articles', - source: ['/trending', '/'], - target: (params, url) => `/pubmed/trending/${new URL(url).searchParams.getAll('filter').join(',')}`, - }, - ], - }, -}; diff --git a/lib/routes/pubmed/router.ts b/lib/routes/pubmed/router.ts deleted file mode 100644 index a78a929cc..000000000 --- a/lib/routes/pubmed/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/trending/:filters?', './trending'); -}; diff --git a/lib/routes/pubmed/trending.ts b/lib/routes/pubmed/trending.ts index cd4c8d69d..ea176d27d 100644 --- a/lib/routes/pubmed/trending.ts +++ b/lib/routes/pubmed/trending.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/trending/:filters?', + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const filters = ctx.req.param('filters'); const rootUrl = 'https://pubmed.ncbi.nlm.nih.gov'; @@ -54,9 +62,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Trending page - PubMed', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pumc/maintainer.ts b/lib/routes/pumc/maintainer.ts deleted file mode 100644 index 0bb0af0b1..000000000 --- a/lib/routes/pumc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/mdadmission': ['nczitzk'], -}; diff --git a/lib/routes/pumc/mdadmission.ts b/lib/routes/pumc/mdadmission.ts index 210061d84..888509b4f 100644 --- a/lib/routes/pumc/mdadmission.ts +++ b/lib/routes/pumc/mdadmission.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/mdadmission', + categories: ['university'], + example: '/pumc/mdadmission', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mdadmission.pumc.edu.cn/mdweb/site', 'mdadmission.pumc.edu.cn/'], + }, + name: '“4+4” 试点班招生网通知公告', + maintainers: ['nczitzk'], + handler, + url: 'mdadmission.pumc.edu.cn/mdweb/site', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; const rootUrl = 'https://mdadmission.pumc.edu.cn'; @@ -55,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '北京协和医学院招生网 - 通知公告', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/pumc/namespace.ts b/lib/routes/pumc/namespace.ts new file mode 100644 index 000000000..64ec7ab6d --- /dev/null +++ b/lib/routes/pumc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京协和医学院', + url: 'mdadmission.pumc.edu.cn', +}; diff --git a/lib/routes/pumc/radar.ts b/lib/routes/pumc/radar.ts deleted file mode 100644 index 4f3e0f9f2..000000000 --- a/lib/routes/pumc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pumc.edu.cn': { - _name: '北京协和医学院', - mdadmission: [ - { - title: '“4+4”试点班招生网通知公告', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-xie-he-yi-xue-yuan', - source: ['/mdweb/site', '/'], - target: '/pumc/mdadmission', - }, - ], - }, -}; diff --git a/lib/routes/pumc/router.ts b/lib/routes/pumc/router.ts deleted file mode 100644 index 08fa6ceaa..000000000 --- a/lib/routes/pumc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/mdadmission', './mdadmission'); -}; diff --git a/lib/routes/putty/changes.ts b/lib/routes/putty/changes.ts index 2613e2280..c049f5680 100644 --- a/lib/routes/putty/changes.ts +++ b/lib/routes/putty/changes.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/changes', + categories: ['program-update'], + example: '/putty/changes', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.chiark.greenend.org.uk/~sgtatham/putty/changes.html', 'www.chiark.greenend.org.uk/'], + }, + name: 'Change Log', + maintainers: ['nczitzk'], + handler, + url: 'www.chiark.greenend.org.uk/~sgtatham/putty/changes.html', +}; + +async function handler() { const rootUrl = 'https://www.chiark.greenend.org.uk'; const currentUrl = `${rootUrl}/~sgtatham/putty/changes.html`; @@ -28,9 +51,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/putty/maintainer.ts b/lib/routes/putty/maintainer.ts deleted file mode 100644 index 8fa74ff48..000000000 --- a/lib/routes/putty/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/changes': ['nczitzk'], -}; diff --git a/lib/routes/putty/namespace.ts b/lib/routes/putty/namespace.ts new file mode 100644 index 000000000..6ef5b65a2 --- /dev/null +++ b/lib/routes/putty/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PuTTY', + url: 'www.chiark.greenend.org.uk', +}; diff --git a/lib/routes/putty/radar.ts b/lib/routes/putty/radar.ts deleted file mode 100644 index 918064e2c..000000000 --- a/lib/routes/putty/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'chiark.greenend.org.uk': { - _name: 'PuTTY', - www: [ - { - title: 'Change Log', - docs: 'https://docs.rsshub.app/routes/program-update#putty-change-log', - source: ['/~sgtatham/putty/changes.html', '/'], - target: '/putty/changes', - }, - ], - }, -}; diff --git a/lib/routes/putty/router.ts b/lib/routes/putty/router.ts deleted file mode 100644 index 3a46a9927..000000000 --- a/lib/routes/putty/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/changes', './changes'); -}; diff --git a/lib/routes/pwc/maintainer.ts b/lib/routes/pwc/maintainer.ts deleted file mode 100644 index adb7c8f24..000000000 --- a/lib/routes/pwc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/strategyand/sustainability': ['mintyfrankie'], -}; diff --git a/lib/routes/pwc/namespace.ts b/lib/routes/pwc/namespace.ts new file mode 100644 index 000000000..0d4baf77a --- /dev/null +++ b/lib/routes/pwc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PwC Strategy&', + url: 'strategyand.pwc.com', +}; diff --git a/lib/routes/pwc/radar.ts b/lib/routes/pwc/radar.ts deleted file mode 100644 index 241659981..000000000 --- a/lib/routes/pwc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'pwc.com': { - _name: 'PwC Strategy&', - strategyand: [ - { - title: 'Sustainability', - docs: 'https://docs.rsshub.app/routes/other#pwc-strategy', - source: ['/at/en/functions/sustainability-strategy/publications.html', '/'], - target: '/pwc/strategyand/sustainability', - }, - ], - }, -}; diff --git a/lib/routes/pwc/router.ts b/lib/routes/pwc/router.ts deleted file mode 100644 index bf657de15..000000000 --- a/lib/routes/pwc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/strategyand/sustainability', './sustainability'); -}; diff --git a/lib/routes/pwc/sustainability.ts b/lib/routes/pwc/sustainability.ts index b32fb1f11..f292faf25 100644 --- a/lib/routes/pwc/sustainability.ts +++ b/lib/routes/pwc/sustainability.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/strategyand/sustainability', + categories: ['other'], + example: '/pwc/strategyand/sustainability', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['strategyand.pwc.com/at/en/functions/sustainability-strategy/publications.html', 'strategyand.pwc.com/'], + }, + name: 'Sustainability', + maintainers: ['mintyfrankie'], + handler, + url: 'strategyand.pwc.com/at/en/functions/sustainability-strategy/publications.html', +}; + +async function handler() { const baseUrl = 'https://www.strategyand.pwc.com/at/en/functions/sustainability-strategy/publications.html'; const feedLang = 'en'; const feedDescription = 'Sustainability Publications from PwC Strategy&'; @@ -49,11 +72,11 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: 'PwC Strategy& - Sustainability Publications', link: baseUrl, language: feedLang, description: feedDescription, item: items, - }); -}; + }; +} diff --git a/lib/routes/qbitai/category.ts b/lib/routes/qbitai/category.ts index 9a6bffbbb..b8706af5e 100644 --- a/lib/routes/qbitai/category.ts +++ b/lib/routes/qbitai/category.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['new-media'], + example: '/qbitai/category/资讯', + parameters: { category: '分类名,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qbitai.com/category/:category'], + }, + name: '分类', + maintainers: ['FuryMartin'], + handler, + description: `| 资讯 | 数码 | 智能车 | 智库 | 活动 | +| ---- | -------- | ------ | ----- | ------- | +| 资讯 | ebandeng | auto | zhiku | huodong |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const link = encodeURI(`https://www.qbitai.com/category/${category}/feed`); const feed = await parser.parseURL(link); @@ -16,12 +41,12 @@ export default async (ctx) => { description: item['content:encoded'], })); - ctx.set('data', { + return { // 源标题 title: `量子位-${category}`, // 源链接 link: `https://www.qbitai.com/category/${category}`, // 源文章 item: items, - }); -}; + }; +} diff --git a/lib/routes/qbitai/maintainer.ts b/lib/routes/qbitai/maintainer.ts deleted file mode 100644 index ca2421ca1..000000000 --- a/lib/routes/qbitai/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/category/:category': ['FuryMartin'], - '/tag/:tag': ['FuryMartin'], -}; diff --git a/lib/routes/qbitai/namespace.ts b/lib/routes/qbitai/namespace.ts new file mode 100644 index 000000000..b5d49ad0f --- /dev/null +++ b/lib/routes/qbitai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '量子位', + url: 'qbitai.com', +}; diff --git a/lib/routes/qbitai/radar.ts b/lib/routes/qbitai/radar.ts deleted file mode 100644 index 077cab2f4..000000000 --- a/lib/routes/qbitai/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'qbitai.com': { - _name: '量子位', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#liang-zi-wei', - source: ['/category/:category'], - target: '/qbitai/category/:category', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#liang-zi-wei', - source: ['/tag/:tag'], - target: '/qbitai/tag/:tag', - }, - ], - }, -}; diff --git a/lib/routes/qbitai/router.ts b/lib/routes/qbitai/router.ts deleted file mode 100644 index 164278fb4..000000000 --- a/lib/routes/qbitai/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/category/:category', './category'); - router.get('/tag/:tag', './tag'); -}; diff --git a/lib/routes/qbitai/tag.ts b/lib/routes/qbitai/tag.ts index cd8b4742b..2965d917b 100644 --- a/lib/routes/qbitai/tag.ts +++ b/lib/routes/qbitai/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:tag', + categories: ['new-media'], + example: '/qbitai/tag/大语言模型', + parameters: { tag: '标签名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qbitai.com/tag/:tag'], + }, + name: '标签', + maintainers: ['FuryMartin'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const link = encodeURI(`https://www.qbitai.com/tag/${tag}/feed`); const feed = await parser.parseURL(link); @@ -16,12 +38,12 @@ export default async (ctx) => { description: item['content:encoded'], })); - ctx.set('data', { + return { // 源标题 title: `量子位-${tag}`, // 源链接 link: `https://www.qbitai.com/tag/${tag}`, // 源文章 item: items, - }); -}; + }; +} diff --git a/lib/routes/qbittorrent/maintainer.ts b/lib/routes/qbittorrent/maintainer.ts deleted file mode 100644 index 620b552e5..000000000 --- a/lib/routes/qbittorrent/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['TonyRL'], -}; diff --git a/lib/routes/qbittorrent/namespace.ts b/lib/routes/qbittorrent/namespace.ts new file mode 100644 index 000000000..6d3679e47 --- /dev/null +++ b/lib/routes/qbittorrent/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'qBittorrent', + url: 'qbittorrent.org', +}; diff --git a/lib/routes/qbittorrent/news.ts b/lib/routes/qbittorrent/news.ts index 154405601..50de12921 100644 --- a/lib/routes/qbittorrent/news.ts +++ b/lib/routes/qbittorrent/news.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['program-update'], + example: '/qbittorrent/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qbittorrent.org/news.php', 'qbittorrent.org/'], + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + url: 'qbittorrent.org/news.php', +}; + +async function handler(ctx) { const baseUrl = 'https://www.qbittorrent.org'; const response = await cache.tryGet( @@ -46,15 +69,15 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'qBittorrent News', link: `${baseUrl}/news.php`, item, - }); + }; ctx.set('json', { title: 'qBittorrent News', link: `${baseUrl}/news.php`, item, }); -}; +} diff --git a/lib/routes/qbittorrent/radar.ts b/lib/routes/qbittorrent/radar.ts deleted file mode 100644 index bc25c8f5a..000000000 --- a/lib/routes/qbittorrent/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qbittorrent.org': { - _name: 'qBittorrent', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/program-update#qbittorrent', - source: ['/news.php', '/'], - target: '/qbittorrent/news', - }, - ], - }, -}; diff --git a/lib/routes/qbittorrent/router.ts b/lib/routes/qbittorrent/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/qbittorrent/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/qdu/houqin.ts b/lib/routes/qdu/houqin.ts index d4cfa6792..b499ee8ad 100644 --- a/lib/routes/qdu/houqin.ts +++ b/lib/routes/qdu/houqin.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const base = 'https://houqin.qdu.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/houqin', + categories: ['university'], + example: '/qdu/houqin', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['houqin.qdu.edu.cn/tzgg.htm', 'houqin.qdu.edu.cn/'], + }, + name: '后勤管理处通知', + maintainers: ['abc1763613206'], + handler, + url: 'houqin.qdu.edu.cn/tzgg.htm', +}; + +async function handler() { const response = await got({ method: 'get', url: `${base}index/tzgg.htm`, @@ -55,10 +78,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '青岛大学 - 后勤管理处通知', link: `${base}index/tzgg.htm`, description: '青岛大学 - 后勤管理处通知', item: items, - }); -}; + }; +} diff --git a/lib/routes/qdu/jwc.ts b/lib/routes/qdu/jwc.ts index b6bd78b6d..6f1588001 100644 --- a/lib/routes/qdu/jwc.ts +++ b/lib/routes/qdu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const base = 'https://jwc.qdu.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/qdu/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.qdu.edu.cn/jwtz.htm', 'jwc.qdu.edu.cn/'], + }, + name: '教务处通知', + maintainers: ['abc1763613206'], + handler, + url: 'jwc.qdu.edu.cn/jwtz.htm', +}; + +async function handler() { const response = await got({ method: 'get', url: `${base}jwtz.htm`, @@ -44,10 +67,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '青岛大学 - 教务处通知', link: `${base}jwtz.htm`, description: '青岛大学 - 教务处通知', item: items, - }); -}; + }; +} diff --git a/lib/routes/qdu/maintainer.ts b/lib/routes/qdu/maintainer.ts deleted file mode 100644 index eec93c892..000000000 --- a/lib/routes/qdu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/houqin': ['abc1763613206'], - '/jwc': ['abc1763613206'], -}; diff --git a/lib/routes/qdu/namespace.ts b/lib/routes/qdu/namespace.ts new file mode 100644 index 000000000..23a52f5c2 --- /dev/null +++ b/lib/routes/qdu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '青岛大学', + url: 'jwc.qdu.edu.cn', +}; diff --git a/lib/routes/qdu/radar.ts b/lib/routes/qdu/radar.ts deleted file mode 100644 index 756d590f5..000000000 --- a/lib/routes/qdu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'qdu.edu.cn': { - _name: '青岛大学', - jwc: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#qing-dao-da-xue', - source: ['/jwtz.htm', '/'], - target: '/qdu/jwc', - }, - ], - houqin: [ - { - title: '后勤管理处通知', - docs: 'https://docs.rsshub.app/routes/university#qing-dao-da-xue', - source: ['/tzgg.htm', '/'], - target: '/qdu/houqin', - }, - ], - }, -}; diff --git a/lib/routes/qdu/router.ts b/lib/routes/qdu/router.ts deleted file mode 100644 index 926e6fa0b..000000000 --- a/lib/routes/qdu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/houqin', './houqin'); - router.get('/jwc', './jwc'); -}; diff --git a/lib/routes/qianp/maintainer.ts b/lib/routes/qianp/maintainer.ts deleted file mode 100644 index 0437d37a5..000000000 --- a/lib/routes/qianp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:path*': ['TonyRL'], -}; diff --git a/lib/routes/qianp/namespace.ts b/lib/routes/qianp/namespace.ts new file mode 100644 index 000000000..74e99f151 --- /dev/null +++ b/lib/routes/qianp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '千篇网', + url: 'qianp.com', +}; diff --git a/lib/routes/qianp/news.ts b/lib/routes/qianp/news.ts index e0c47ba38..1136b70c1 100644 --- a/lib/routes/qianp/news.ts +++ b/lib/routes/qianp/news.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { getTokenAndSecret } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:path{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://qianp.com'; const { path = 'news/recommend' } = ctx.req.param(); const url = `${baseUrl}/${path}/`; @@ -48,11 +56,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name="description"]').attr('content'), link: url, image: `${baseUrl}/favicon.ico`, item: items, - }); -}; + }; +} diff --git a/lib/routes/qianp/radar.ts b/lib/routes/qianp/radar.ts deleted file mode 100644 index 7608c12fc..000000000 --- a/lib/routes/qianp/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qianp.com': { - _name: '千篇网', - '.': [ - { - title: '知识库/资讯', - docs: 'https://docs.rsshub.app/routes/new-media#qian-pian-wang', - source: ['/*path'], - target: (params) => (params.path.endsWith('.html') ? null : `/qianp/news/${params.path}`), - }, - ], - }, -}; diff --git a/lib/routes/qianp/router.ts b/lib/routes/qianp/router.ts deleted file mode 100644 index 07023a099..000000000 --- a/lib/routes/qianp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:path{.+}?', './news'); -}; diff --git a/lib/routes/qianzhan/column.ts b/lib/routes/qianzhan/column.ts index 30c5f8e38..c72318da9 100644 --- a/lib/routes/qianzhan/column.ts +++ b/lib/routes/qianzhan/column.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/analyst/column/:type?', + categories: ['finance'], + example: '/qianzhan/analyst/column/all', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章列表', + maintainers: ['moke8'], + handler, + description: `| 全部 | 研究员专栏 | 规划师专栏 | 观察家专栏 | + | ---- | ---------- | ---------- | ---------- | + | all | 220 | 627 | 329 |`, +}; + +async function handler(ctx) { let rootUrl = 'https://www.qianzhan.com/analyst/'; const titles = { all: '最新文章', @@ -43,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `前瞻经济学人 - ${titles[type]}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qianzhan/maintainer.ts b/lib/routes/qianzhan/maintainer.ts deleted file mode 100644 index 3e94f9da5..000000000 --- a/lib/routes/qianzhan/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/analyst/column/:type?': ['moke8'], - '/analyst/rank/:type?': ['moke8'], -}; diff --git a/lib/routes/qianzhan/namespace.ts b/lib/routes/qianzhan/namespace.ts new file mode 100644 index 000000000..0002eecbb --- /dev/null +++ b/lib/routes/qianzhan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '前瞻网', + url: 'qianzhan.com', +}; diff --git a/lib/routes/qianzhan/radar.ts b/lib/routes/qianzhan/radar.ts deleted file mode 100644 index eb1720af2..000000000 --- a/lib/routes/qianzhan/radar.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default { - 'qianzhan.com': { - _name: '前瞻网', - '.': [ - { - title: '文章列表', - docs: 'https://docs.rsshub.app/routes/finance#qian-zhan-wang', - source: ['/analyst', '/analyst/list/:html'], - target: (params) => { - if (params.html) { - const type = params.html.match(/\d+/)[0]; - return '/qianzhan/analyst/column/' + type; - } else { - return '/qianzhan/analyst/column/all'; - } - }, - }, - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/finance#qian-zhan-wang', - source: ['/analyst', '/'], - target: '/qianzhan/analyst/rank', - }, - ], - }, -}; diff --git a/lib/routes/qianzhan/rank.ts b/lib/routes/qianzhan/rank.ts index a1018f4d4..18120180c 100644 --- a/lib/routes/qianzhan/rank.ts +++ b/lib/routes/qianzhan/rank.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/analyst/rank/:type?', + categories: ['finance'], + example: '/qianzhan/analyst/rank/week', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qianzhan.com/analyst', 'qianzhan.com/'], + target: '/analyst/rank', + }, + name: '排行榜', + maintainers: ['moke8'], + handler, + url: 'qianzhan.com/analyst', + description: `| 周排行 | 月排行 | + | ------ | ------ | + | week | month |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') === 'week' ? 1 : 2; const rootUrl = 'https://www.qianzhan.com/analyst/'; @@ -33,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `前瞻经济学人 - ${type === 1 ? '周排行' : '月排行'}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qianzhan/router.ts b/lib/routes/qianzhan/router.ts deleted file mode 100644 index cd36a2a6e..000000000 --- a/lib/routes/qianzhan/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/analyst/column/:type?', './column'); - router.get('/analyst/rank/:type?', './rank'); -}; diff --git a/lib/routes/qidian/author.ts b/lib/routes/qidian/author.ts index 9ad46cbe4..96d333f72 100644 --- a/lib/routes/qidian/author.ts +++ b/lib/routes/qidian/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:id', + categories: ['reading'], + example: '/qidian/author/9639927', + parameters: { id: '作者 id, 可在作者页面 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['my.qidian.com/author/:id'], + }, + name: '作者', + maintainers: ['miles170'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://my.qidian.com'; const currentUrl = `${rootUrl}/author/${id}/`; @@ -35,10 +57,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${authorName} - 起点中文网`, description: $('.header-msg-desc').text().trim(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qidian/chapter.ts b/lib/routes/qidian/chapter.ts index 867f3c882..fccf6819d 100644 --- a/lib/routes/qidian/chapter.ts +++ b/lib/routes/qidian/chapter.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/qidian/chapter/1010400217', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['book.qidian.com/info/:id'], + }, + name: '章节', + maintainers: ['fuzy112'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`https://m.qidian.com/book/${id}.html`); @@ -23,11 +45,11 @@ export default async (ctx) => { link: `https://vipreader.qidian.com/chapter/${id}/${c.id}`, })); - ctx.set('data', { + return { title: `起点 ${name}`, link: `https://book.qidian.com/info/${id}`, description: $('#bookSummary content').text(), image: coverUrl, item: chapterItem, - }); -}; + }; +} diff --git a/lib/routes/qidian/forum.ts b/lib/routes/qidian/forum.ts index 685b433ed..f8fdeeb42 100644 --- a/lib/routes/qidian/forum.ts +++ b/lib/routes/qidian/forum.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id', + categories: ['reading'], + example: '/qidian/forum/1010400217', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['book.qidian.com/info/:id'], + }, + name: '讨论区', + maintainers: ['fuzy112'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = `https://forum.qidian.com/NewForum/List.aspx?BookId=${id}`; @@ -29,10 +51,10 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title: `起点 《${name}》讨论区`, link: url, image: cover_url, item: items, - }); -}; + }; +} diff --git a/lib/routes/qidian/free-next.ts b/lib/routes/qidian/free-next.ts index 2f4daaf10..3e85b2a7b 100644 --- a/lib/routes/qidian/free-next.ts +++ b/lib/routes/qidian/free-next.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/free-next/:type?', + categories: ['reading'], + example: '/qidian/free-next', + parameters: { type: '默认不填为起点中文网,填 mm 为起点女生网' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.qidian.com/free'], + target: '/free', + }, + name: '限时免费下期预告', + maintainers: ['LogicJake'], + handler, + url: 'www.qidian.com/free', +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let link, title; @@ -33,10 +57,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title, description: `限时免费下期预告-${title}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/qidian/free.ts b/lib/routes/qidian/free.ts index 34b00bf6d..09695c6dc 100644 --- a/lib/routes/qidian/free.ts +++ b/lib/routes/qidian/free.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/free/:type?', + categories: ['reading'], + example: '/qidian/free', + parameters: { type: '默认不填为起点中文网,填 mm 为起点女生网' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.qidian.com/free'], + target: '/free', + }, + name: '限时免费', + maintainers: ['LogicJake'], + handler, + url: 'www.qidian.com/free', +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let link, title; @@ -36,10 +60,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title, description: `限时免费-${title}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/qidian/maintainer.ts b/lib/routes/qidian/maintainer.ts deleted file mode 100644 index f4373cb51..000000000 --- a/lib/routes/qidian/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/author/:id': ['miles170'], - '/chapter/:id': ['fuzy112'], - '/forum/:id': ['fuzy112'], - '/free/:type?': ['LogicJake'], - '/free-next/:type?': ['LogicJake'], -}; diff --git a/lib/routes/qidian/namespace.ts b/lib/routes/qidian/namespace.ts new file mode 100644 index 000000000..212b22f4e --- /dev/null +++ b/lib/routes/qidian/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '起点', + url: 'book.qidian.com', +}; diff --git a/lib/routes/qidian/radar.ts b/lib/routes/qidian/radar.ts deleted file mode 100644 index 1cf0dff4b..000000000 --- a/lib/routes/qidian/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'qidian.com': { - _name: '起点', - book: [ - { - title: '章节', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian', - source: '/info/:id', - target: '/qidian/chapter/:id', - }, - { - title: '讨论区', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian', - source: '/info/:id', - target: '/qidian/forum/:id', - }, - ], - my: [ - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian', - source: '/author/:id', - target: '/qidian/author/:id', - }, - ], - www: [ - { - title: '限免', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian', - source: '/free', - target: '/qidian/free', - }, - { - title: '女生限免', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian', - source: '/mm/free', - target: '/qidian/free/mm', - }, - ], - }, -}; diff --git a/lib/routes/qidian/router.ts b/lib/routes/qidian/router.ts deleted file mode 100644 index 09687ce21..000000000 --- a/lib/routes/qidian/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/author/:id', './author'); - router.get('/chapter/:id', './chapter'); - router.get('/forum/:id', './forum'); - router.get('/free/:type?', './free'); - router.get('/free-next/:type?', './free-next'); -}; diff --git a/lib/routes/qingting/channel.ts b/lib/routes/qingting/channel.ts index c47412e67..27c08b96c 100644 --- a/lib/routes/qingting/channel.ts +++ b/lib/routes/qingting/channel.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id', + categories: ['multimedia'], + example: '/qingting/channel/293411', + parameters: { id: '专辑id, 可在专辑页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '专辑', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const channelUrl = `https://i.qingting.fm/capi/v3/channel/${ctx.req.param('id')}`; let response = await got(channelUrl); const title = response.data.data.title; @@ -16,7 +35,7 @@ export default async (ctx) => { pubDate: timezone(parseDate(item.update_time), +8), })); - ctx.set('data', { + return { title: `${title} - 蜻蜓FM`, link: `https://www.qingting.fm/channels/${ctx.req.param('id')}`, item: await Promise.all( @@ -29,5 +48,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/qingting/maintainer.ts b/lib/routes/qingting/maintainer.ts deleted file mode 100644 index 83a8f4d71..000000000 --- a/lib/routes/qingting/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/channel/:id': ['nczitzk'], - '/podcast/:id': ['RookieZoe', 'huyyi'], -}; diff --git a/lib/routes/qingting/namespace.ts b/lib/routes/qingting/namespace.ts new file mode 100644 index 000000000..c675b7934 --- /dev/null +++ b/lib/routes/qingting/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '蜻蜓 FM', + url: 'qingting.fm', +}; diff --git a/lib/routes/qingting/podcast.ts b/lib/routes/qingting/podcast.ts index f432a32f0..e0d597f9f 100644 --- a/lib/routes/qingting/podcast.ts +++ b/lib/routes/qingting/podcast.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import crypto from 'crypto'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/podcast/:id', + categories: ['multimedia'], + example: '/qingting/podcast/293411', + parameters: { id: '专辑id, 可在专辑页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['qingting.fm/channels/:id'], + }, + name: '播客', + maintainers: ['RookieZoe', 'huyyi'], + handler, + description: `获取的播放 URL 有效期只有 1 天,需要开启播客 APP 的自动下载功能。`, +}; + +async function handler(ctx) { const channelUrl = `https://i.qingting.fm/capi/v3/channel/${ctx.req.param('id')}`; let response = await got({ method: 'get', @@ -67,12 +90,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title} - 蜻蜓FM`, description: desc, itunes_author: authors, image: channel_img, link: `https://www.qingting.fm/channels/${ctx.req.param('id')}`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/qingting/radar.ts b/lib/routes/qingting/radar.ts deleted file mode 100644 index 73313be2b..000000000 --- a/lib/routes/qingting/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'qingting.fm': { - _name: '蜻蜓 FM', - '.': [ - { - title: '专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#qing-ting-fm', - source: '/channels/:id', - target: '/qingting/channels/:id', - }, - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/multimedia#qing-ting-fm', - source: '/channels/:id', - target: '/qingting/podcast/:id', - }, - ], - }, -}; diff --git a/lib/routes/qingting/router.ts b/lib/routes/qingting/router.ts deleted file mode 100644 index f1f70e0e6..000000000 --- a/lib/routes/qingting/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/channel/:id', './channel'); - router.get('/podcast/:id', './podcast'); -}; diff --git a/lib/routes/qipamaijia/index.ts b/lib/routes/qipamaijia/index.ts index d5ed7f4eb..84b6d9b40 100644 --- a/lib/routes/qipamaijia/index.ts +++ b/lib/routes/qipamaijia/index.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const rootUrl = 'https://www.qipamaijia.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:cate?', + categories: ['picture'], + example: '/qipamaijia/fuli', + parameters: { cate: '频道名,可在对应网址中找到,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qipamaijia.com/', 'qipamaijia.com/:cate'], + target: '/:cate', + }, + name: 'Unknown', + maintainers: ['Fatpandac', 'nczitzk'], + handler, + url: 'qipamaijia.com/', +}; + +async function handler(ctx) { const cate = ctx.req.param('cate') ?? ''; const url = `${rootUrl}/${cate}`; @@ -24,9 +48,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: `奇葩买家秀 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/qipamaijia/maintainer.ts b/lib/routes/qipamaijia/maintainer.ts deleted file mode 100644 index f96afd436..000000000 --- a/lib/routes/qipamaijia/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:cate?': ['Fatpandac', 'nczitzk'], -}; diff --git a/lib/routes/qipamaijia/namespace.ts b/lib/routes/qipamaijia/namespace.ts new file mode 100644 index 000000000..1eee452ef --- /dev/null +++ b/lib/routes/qipamaijia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '奇葩买家秀', + url: 'qipamaijia.com', +}; diff --git a/lib/routes/qipamaijia/radar.ts b/lib/routes/qipamaijia/radar.ts deleted file mode 100644 index f9f0968bc..000000000 --- a/lib/routes/qipamaijia/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qipamaijia.com': { - _name: '奇葩买家秀', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/reading#qi-dian-tu-shou-ding', - source: ['/', '/:cate'], - target: '/qipamaijia/:cate', - }, - ], - }, -}; diff --git a/lib/routes/qipamaijia/router.ts b/lib/routes/qipamaijia/router.ts deleted file mode 100644 index 8d10a6f3b..000000000 --- a/lib/routes/qipamaijia/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:cate?', './index'); -}; diff --git a/lib/routes/qiyoujiage/maintainer.ts b/lib/routes/qiyoujiage/maintainer.ts deleted file mode 100644 index 6bd724112..000000000 --- a/lib/routes/qiyoujiage/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path+': ['TonyRL'], -}; diff --git a/lib/routes/qiyoujiage/namespace.ts b/lib/routes/qiyoujiage/namespace.ts new file mode 100644 index 000000000..bd4ecec1c --- /dev/null +++ b/lib/routes/qiyoujiage/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '汽油价格网', + url: 'qiyoujiage.com', +}; diff --git a/lib/routes/qiyoujiage/price.ts b/lib/routes/qiyoujiage/price.ts index ed714aa8f..795cf519e 100644 --- a/lib/routes/qiyoujiage/price.ts +++ b/lib/routes/qiyoujiage/price.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/:path{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const link = `http://www.qiyoujiage.com/${path}.shtml`; @@ -19,10 +27,10 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: $('title').text(), description: $('meta[name="Description"]').attr('content'), link, item, - }); -}; + }; +} diff --git a/lib/routes/qiyoujiage/radar.ts b/lib/routes/qiyoujiage/radar.ts deleted file mode 100644 index 539bb49e2..000000000 --- a/lib/routes/qiyoujiage/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qiyoujiage.com': { - _name: '汽油价格网', - '.': [ - { - title: '今日油价查询', - docs: 'https://docs.rsshub.app/routes/other#qi-you-jia-ge-wang', - source: ['/*'], - target: (_, url) => `/qiyoujiage${new URL(url).pathname.replace('.shtml', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/qiyoujiage/router.ts b/lib/routes/qiyoujiage/router.ts deleted file mode 100644 index 414b3edc9..000000000 --- a/lib/routes/qiyoujiage/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:path{.+}', './price'); -}; diff --git a/lib/routes/qlu/maintainer.ts b/lib/routes/qlu/maintainer.ts deleted file mode 100644 index 08db11a02..000000000 --- a/lib/routes/qlu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/notice': ['SunBK201'], -}; diff --git a/lib/routes/qlu/namespace.ts b/lib/routes/qlu/namespace.ts new file mode 100644 index 000000000..cbfc02bba --- /dev/null +++ b/lib/routes/qlu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '齐鲁工业大学', + url: 'qlu.edu.cn', +}; diff --git a/lib/routes/qlu/notice.ts b/lib/routes/qlu/notice.ts index 6d64549cf..7429ae058 100644 --- a/lib/routes/qlu/notice.ts +++ b/lib/routes/qlu/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://www.qlu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/notice', + categories: ['university'], + example: '/qlu/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qlu.edu.cn/tzggsh/list1.htm'], + }, + name: '通知公告', + maintainers: ['SunBK201'], + handler, + url: 'qlu.edu.cn/tzggsh/list1.htm', +}; + +async function handler() { const response = await got({ method: 'get', url: `${host}/tzggsh/list1.htm`, @@ -41,10 +64,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `齐鲁工业大学 - 通知公告`, link: `${host}/tzggsh/list1.htm`, description: '齐鲁工业大学 - 通知公告', item: items, - }); -}; + }; +} diff --git a/lib/routes/qlu/radar.ts b/lib/routes/qlu/radar.ts deleted file mode 100644 index 995691d4f..000000000 --- a/lib/routes/qlu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qlu.edu.cn': { - _name: '齐鲁工业大学', - '.': [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#qi-lu-gong-ye-da-xue', - source: ['/tzggsh/list1.htm'], - target: '/qlu/notice', - }, - ], - }, -}; diff --git a/lib/routes/qlu/router.ts b/lib/routes/qlu/router.ts deleted file mode 100644 index 542a85d08..000000000 --- a/lib/routes/qlu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/notice', './notice'); -}; diff --git a/lib/routes/qm120/maintainer.ts b/lib/routes/qm120/maintainer.ts deleted file mode 100644 index 062d245bd..000000000 --- a/lib/routes/qm120/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/qm120/namespace.ts b/lib/routes/qm120/namespace.ts new file mode 100644 index 000000000..0687ba180 --- /dev/null +++ b/lib/routes/qm120/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '全民健康网', + url: 'qm120.com', +}; diff --git a/lib/routes/qm120/news.ts b/lib/routes/qm120/news.ts index 2645a18ce..899dbc93b 100644 --- a/lib/routes/qm120/news.ts +++ b/lib/routes/qm120/news.ts @@ -1,10 +1,44 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['new-media'], + example: '/qm120/news', + parameters: { category: '分类,见下表,默认为健康焦点' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qm120.com/'], + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + url: 'qm120.com/', + description: `| 健康焦点 | 行业动态 | 医学前沿 | 法规动态 | + | -------- | -------- | -------- | -------- | + | jdxw | hydt | yxqy | fgdt | + + | 食品安全 | 医疗事故 | 医药会展 | 医药信息 | + | -------- | -------- | -------- | -------- | + | spaq | ylsg | yyhz | yyxx | + + | 新闻专题 | 行业新闻 | + | -------- | -------- | + | zhuanti | xyxw |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'jdxw'; const rootUrl = 'http://www.qm120.com'; @@ -43,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.zt_liebiao_tit').text()} - 全民健康网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qm120/radar.ts b/lib/routes/qm120/radar.ts deleted file mode 100644 index b24d6895c..000000000 --- a/lib/routes/qm120/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qm120.com': { - _name: '全民健康网', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#quan-min-jian-kang-wang-xin-wen', - source: ['/'], - target: '/qm120/news/:category?', - }, - ], - }, -}; diff --git a/lib/routes/qm120/router.ts b/lib/routes/qm120/router.ts deleted file mode 100644 index ec7c5eda5..000000000 --- a/lib/routes/qm120/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); -}; diff --git a/lib/routes/qoo-app/apps/card.ts b/lib/routes/qoo-app/apps/card.ts index 9f624065b..98f5eda7e 100644 --- a/lib/routes/qoo-app/apps/card.ts +++ b/lib/routes/qoo-app/apps/card.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { appsUrl } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/apps/:lang?/card/:id', + categories: ['anime'], + example: '/qoo-app/apps/en/card/7675', + parameters: { lang: 'Language, see the table above, empty means `中文`', id: 'Game ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Game Store - Cards', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { id, lang = '' } = ctx.req.param(); const link = `${appsUrl}${lang ? `/${lang}` : ''}/app-card/${id}`; @@ -29,10 +48,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/apps/comment.ts b/lib/routes/qoo-app/apps/comment.ts index fc594bc76..5c5fbf62a 100644 --- a/lib/routes/qoo-app/apps/comment.ts +++ b/lib/routes/qoo-app/apps/comment.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { appsUrl } from '../utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/apps/:lang?/comment/:id', + categories: ['anime'], + example: '/qoo-app/apps/en/comment/7675', + parameters: { lang: 'Language, see the table below, empty means `中文`', id: 'Game ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Game Store - Review', + maintainers: ['TonyRL'], + handler, + description: `| 中文 | English | 한국어 | Español | 日本語 | ไทย | Tiếng Việt | + | ---- | ------- | ------ | ------- | ------ | --- | ---------- | + | | en | ko | es | ja | th | vi |`, +}; + +async function handler(ctx) { const { id, lang = '' } = ctx.req.param(); const link = `${appsUrl}${lang ? `/${lang}` : ''}/app-comment/${id}`; @@ -37,10 +59,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/apps/note.ts b/lib/routes/qoo-app/apps/note.ts index 3a531f80c..f18933b84 100644 --- a/lib/routes/qoo-app/apps/note.ts +++ b/lib/routes/qoo-app/apps/note.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { appsUrl } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/apps/:lang?/note/:id', + categories: ['anime'], + example: '/qoo-app/apps/en/note/7675', + parameters: { lang: 'Language, see the table above, empty means `中文`', id: 'Game ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Game Store - Notes', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { id, lang = '' } = ctx.req.param(); const link = `${appsUrl}${lang ? `/${lang}` : ''}/app-note/${id}`; @@ -39,10 +58,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/apps/post.ts b/lib/routes/qoo-app/apps/post.ts index d7fd247be..0cf396882 100644 --- a/lib/routes/qoo-app/apps/post.ts +++ b/lib/routes/qoo-app/apps/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { appsUrl, newsUrl, fixImg } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/apps/:lang?/post/:id', + categories: ['anime'], + example: '/qoo-app/apps/en/post/7675', + parameters: { lang: 'Language, see the table above, empty means `中文`', id: 'Game ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Game Store - Article', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { id, lang = '' } = ctx.req.param(); const link = `${appsUrl}${lang ? `/${lang}` : ''}/app-post/${id}`; @@ -43,10 +62,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/maintainer.ts b/lib/routes/qoo-app/maintainer.ts deleted file mode 100644 index 4504ac840..000000000 --- a/lib/routes/qoo-app/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/apps/:lang?/card/:id': ['TonyRL'], - '/apps/:lang?/comment/:id': ['TonyRL'], - '/apps/:lang?/note/:id': ['TonyRL'], - '/apps/:lang?/post/:id': ['TonyRL'], - '/notes/:lang?/note/:id': ['TonyRL'], - '/notes/:lang?/topic/:topic': ['TonyRL'], - '/notes/:lang?/user/:uid': ['TonyRL'], - '/news/:lang?': ['TonyRL'], - '/user/:lang?/appComment/:uid': ['TonyRL'], -}; diff --git a/lib/routes/qoo-app/namespace.ts b/lib/routes/qoo-app/namespace.ts new file mode 100644 index 000000000..8cdc14f96 --- /dev/null +++ b/lib/routes/qoo-app/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'QooApp', + url: 'apps.qoo-app.com', +}; diff --git a/lib/routes/qoo-app/news.ts b/lib/routes/qoo-app/news.ts index 73b72c164..068a8e102 100644 --- a/lib/routes/qoo-app/news.ts +++ b/lib/routes/qoo-app/news.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { newsUrl, siteIcon, fixImg } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:lang?', + categories: ['anime'], + example: '/qoo-app/news/en', + parameters: { lang: 'Language, see the table below, empty means `中文`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + description: `| 中文 | English | + | ---- | ------- | + | | en |`, +}; + +async function handler(ctx) { const { lang = '' } = ctx.req.param(); const apiUrl = `${newsUrl}${lang ? `/${lang}` : ''}/wp-json/wp/v2/posts`; @@ -27,7 +49,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'QooApp : Anime Game Platform', description: lang === 'en' @@ -37,5 +59,5 @@ export default async (ctx) => { link: `${newsUrl}${lang ? `/${lang}` : ''}`, language: lang === 'en' ? 'en' : 'zh', item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/notes/note.ts b/lib/routes/qoo-app/notes/note.ts index 37b584d20..f0181f3ab 100644 --- a/lib/routes/qoo-app/notes/note.ts +++ b/lib/routes/qoo-app/notes/note.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,25 @@ import { ssoUrl, notesUrl } from '../utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/:lang?/note/:id', + categories: ['anime'], + example: '/qoo-app/notes/en/note/2329113', + parameters: { lang: 'Language, see the table above, empty means `中文`', id: 'Note ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Note Comments', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const api = `${ssoUrl}/api/v1/comments`; const link = `${notesUrl}/note/${id}`; @@ -37,10 +56,10 @@ export default async (ctx) => { guid: `qoo-app:notes:note:${id}:${item.id}`, })); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/notes/topic.ts b/lib/routes/qoo-app/notes/topic.ts index 939fd389a..b1d69f421 100644 --- a/lib/routes/qoo-app/notes/topic.ts +++ b/lib/routes/qoo-app/notes/topic.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { notesUrl, extractNotes } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/:lang?/topic/:topic', + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { topic, lang } = ctx.req.param(); const link = `${notesUrl}${lang ? `/${lang}` : ''}/topic/${topic}`; @@ -11,10 +19,10 @@ export default async (ctx) => { const items = extractNotes($); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/notes/user.ts b/lib/routes/qoo-app/notes/user.ts index 386085d29..9b9f6398a 100644 --- a/lib/routes/qoo-app/notes/user.ts +++ b/lib/routes/qoo-app/notes/user.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { notesUrl, extractNotes } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/notes/:lang?/user/:uid', + categories: ['anime'], + example: '/qoo-app/notes/en/user/35399143', + parameters: { lang: 'Language, see the table above, empty means `中文`', uid: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Notes', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { uid, lang } = ctx.req.param(); const link = `${notesUrl}${lang ? `/${lang}` : ''}/user/${uid}`; @@ -11,10 +30,10 @@ export default async (ctx) => { const items = extractNotes($); - ctx.set('data', { + return { title: $('head title').text(), link, language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qoo-app/radar.ts b/lib/routes/qoo-app/radar.ts deleted file mode 100644 index 9f7161ee5..000000000 --- a/lib/routes/qoo-app/radar.ts +++ /dev/null @@ -1,73 +0,0 @@ -export default { - 'qoo-app.com': { - _name: 'QooApp', - apps: [ - { - title: '遊戲庫 - 評論', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/app-comment/:id', '/app-comment/:id', '/app/:id'], - target: (params) => `/qoo-app/apps${params.lang ? `/${params.lang}` : ''}/comment/:id`, - }, - { - title: '遊戲庫 - 情報', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/app-post/:id', '/app-post/:id', '/app/:id'], - target: (params) => `/qoo-app/apps${params.lang ? `/${params.lang}` : ''}/post/:id`, - }, - { - title: '遊戲庫 - 筆記', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/app-note/:id', '/app-note/:id', '/app/:id'], - target: (params) => `/qoo-app/apps${params.lang ? `/${params.lang}` : ''}/note/:id`, - }, - { - title: '遊戲庫 - 曬卡', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/app-card/:id', '/app-card/:id', '/app/:id'], - target: (params) => `/qoo-app/apps${params.lang ? `/${params.lang}` : ''}/card/:id`, - }, - ], - news: [ - { - title: '資訊', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang', '/'], - target: (params) => `/qoo-app/news${params.lang ? `/${params.lang}` : ''}`, - }, - ], - notes: [ - { - title: '筆記留言', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/note/:id', '/note/:id'], - target: (params) => `/qoo-app/notes${params.lang ? `/${params.lang}` : ''}/note/:id`, - }, - { - title: '熱門話題', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/topic/:topic', '/topic/:topic'], - target: (params) => `/qoo-app/notes${params.lang ? `/${params.lang}` : ''}/topic/:topic`, - }, - { - title: '用户筆記', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/user/:uid', '/user/:uid'], - target: (params) => `/qoo-app/notes${params.lang ? `/${params.lang}` : ''}/user/:uid`, - }, - ], - user: [ - { - title: '遊戲評論', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/:uid', '/:uid'], - target: (params) => `/qoo-app/user${params.lang ? `/${params.lang}` : ''}/appComment/:uid`, - }, - { - title: '用户筆記', - docs: 'https://docs.rsshub.app/routes/anime#qooapp', - source: ['/:lang/:uid', '/:uid'], - target: (params) => `/qoo-app/notes${params.lang ? `/${params.lang}` : ''}/user/:uid`, - }, - ], - }, -}; diff --git a/lib/routes/qoo-app/router.ts b/lib/routes/qoo-app/router.ts deleted file mode 100644 index fc39d0e26..000000000 --- a/lib/routes/qoo-app/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/apps/:lang?/card/:id', './apps/card'); - router.get('/apps/:lang?/comment/:id', './apps/comment'); - router.get('/apps/:lang?/note/:id', './apps/note'); - router.get('/apps/:lang?/post/:id', './apps/post'); - router.get('/news/:lang?', './news'); - router.get('/notes/:lang?/note/:id', './notes/note'); - router.get('/notes/:lang?/topic/:topic', './notes/topic'); - router.get('/notes/:lang?/user/:uid', './notes/user'); - router.get('/user/:lang?/appComment/:uid', './user/app-comment'); -}; diff --git a/lib/routes/qoo-app/user/app-comment.ts b/lib/routes/qoo-app/user/app-comment.ts index bb582e72a..415b4ec96 100644 --- a/lib/routes/qoo-app/user/app-comment.ts +++ b/lib/routes/qoo-app/user/app-comment.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,25 @@ import { userUrl, appsUrl } from '../utils'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:lang?/appComment/:uid', + categories: ['anime'], + example: '/qoo-app/user/en/appComment/35399143', + parameters: { lang: 'Language, see the table above, empty means `中文`', uid: 'User ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Game Comments', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { uid, lang = '' } = ctx.req.param(); const link = `${userUrl}${lang ? `/${lang}` : ''}/${uid}`; @@ -34,11 +53,11 @@ export default async (ctx) => { author: username, })); - ctx.set('data', { + return { title: $('head title').text(), link, image: decodeURIComponent($('.person div.slot').attr('data-args')).replace('avatar=', '').split('?')[0], language: $('html').attr('lang'), item: items, - }); -}; + }; +} diff --git a/lib/routes/qq/ac/comic.ts b/lib/routes/qq/ac/comic.ts index 8e1e58601..1ecf04838 100644 --- a/lib/routes/qq/ac/comic.ts +++ b/lib/routes/qq/ac/comic.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, mobileRootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/ac/comic/:id?', + radar: { + source: ['ac.qq.com/Comic/ComicInfo/id/:id', 'ac.qq.com/'], + target: '/ac/comic/:id', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const currentUrl = `${rootUrl}/Comic/comicInfo/id/${id}`; @@ -34,10 +46,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${$('h1').text()} - 腾讯动漫`, link: currentUrl, item: items, description: `

    ${$('.head-info-desc').text()}

    `, - }); -}; + }; +} diff --git a/lib/routes/qq/ac/rank.ts b/lib/routes/qq/ac/rank.ts index 59c2126ba..d3026d462 100644 --- a/lib/routes/qq/ac/rank.ts +++ b/lib/routes/qq/ac/rank.ts @@ -1,6 +1,35 @@ +import { Route } from '@/types'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/ac/rank/:type?/:time?', + categories: ['anime'], + example: '/qq/ac/rank', + parameters: { type: '分类,见下表,默认为月票榜', time: '时间,`cur` 为当周、`prev` 为上周' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ac.qq.com/Rank/comicRank/type/:type', 'ac.qq.com/'], + }, + name: '排行榜', + maintainers: ['nczitzk'], + handler, + description: `| 月票榜 | 飙升榜 | 新作榜 | 畅销榜 | TOP100 | 男生榜 | 女生榜 | + | ------ | ------ | ------ | ------ | ------ | ------ | ------ | + | mt | rise | new | pay | top | male | female | + + :::tip + \`time\` 参数仅在 \`type\` 参数选为 **月票榜** 的时候生效。 + :::`, +}; + +async function handler(ctx) { const titles = { mt: '月票榜', rise: '飙升榜', @@ -17,4 +46,4 @@ export default async (ctx) => { const currentUrl = `${rootUrl}/Rank/comicRank/type/${type}`; ctx.set('data', await ProcessItems(ctx, currentUrl, time, titles[type])); -}; +} diff --git a/lib/routes/qq/fact/index.ts b/lib/routes/qq/fact/index.ts index e28481077..b58ba4553 100644 --- a/lib/routes/qq/fact/index.ts +++ b/lib/routes/qq/fact/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -17,7 +18,29 @@ const getRequestToken = () => { const baseUrl = 'https://vp.fact.qq.com'; -export default async (ctx) => { +export const route: Route = { + path: '/fact', + categories: ['other'], + example: '/qq/fact', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vp.fact.qq.com/home', 'vp.fact.qq.com/'], + }, + name: '最新辟谣', + maintainers: ['hoilc'], + handler, + url: 'vp.fact.qq.com/home', +}; + +async function handler() { const { data: response } = await got(`${baseUrl}/api/article/list`, { headers: { Referer: `${baseUrl}/home`, @@ -57,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '较真查证平台 - 腾讯新闻', link: `${baseUrl}/home`, item: items, - }); -}; + }; +} diff --git a/lib/routes/qq/kg/reply.ts b/lib/routes/qq/kg/reply.ts index ed29bc9ba..901de7909 100644 --- a/lib/routes/qq/kg/reply.ts +++ b/lib/routes/qq/kg/reply.ts @@ -1,12 +1,31 @@ +import { Route } from '@/types'; import cache from './cache'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/kg/reply/:playId', + categories: ['social-media'], + example: '/qq/kg/reply/OhXHMdO1VxLWQOOm', + parameters: { playId: '音频页 ID, 可在对应页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户作品评论动态', + maintainers: ['zhangxiang012'], + handler, +}; + +async function handler(ctx) { const playId = ctx.req.param('playId'); const url = `https://node.kg.qq.com/play?s=${playId}`; const play_item = await cache.getPlayInfo(ctx, playId, ''); - ctx.set('data', { + return { title: `${play_item.name} - ${play_item.author} 的评论`, link: url, image: play_item.itunes_item_image, @@ -17,5 +36,5 @@ export default async (ctx) => { link: url, guid: `ksong:${play_item.ksong_mid}:${item.comment_id}`, })), - }); -}; + }; +} diff --git a/lib/routes/qq/kg/user.ts b/lib/routes/qq/kg/user.ts index 3bf402d24..97cadacbe 100644 --- a/lib/routes/qq/kg/user.ts +++ b/lib/routes/qq/kg/user.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { JSDOM } from 'jsdom'; import cache from './cache'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/kg/:userId', + categories: ['social-media'], + example: '/qq/kg/639a9a86272c308e33', + parameters: { userId: '用户 ID, 可在对应页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '用户作品列表', + maintainers: ['zhangxiang012'], + handler, +}; + +async function handler(ctx) { const userId = ctx.req.param('userId'); const url = `https://node.kg.qq.com/personal?uid=${userId}`; const response = await got(url); @@ -37,7 +56,7 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${author} - 全民K歌`, link: url, description: data.share.content, @@ -46,5 +65,5 @@ export default async (ctx) => { image: authorimg, itunes_author: author, itunes_category: '全民K歌', - }); -}; + }; +} diff --git a/lib/routes/qq/maintainer.ts b/lib/routes/qq/maintainer.ts deleted file mode 100644 index 2ba1d937f..000000000 --- a/lib/routes/qq/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/ac/comic/:id': ['nczitzk'], - '/ac/rank/:type?/:time?': ['nczitzk'], - '/fact': ['hoilc'], - '/kg/:userId': ['zhangxiang012'], - '/kg/reply/:playId': ['zhangxiang012'], -}; diff --git a/lib/routes/qq/namespace.ts b/lib/routes/qq/namespace.ts new file mode 100644 index 000000000..72d8f17b3 --- /dev/null +++ b/lib/routes/qq/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '腾讯新闻较真查证平台', + url: 'ac.qq.com', +}; diff --git a/lib/routes/qq/radar.ts b/lib/routes/qq/radar.ts deleted file mode 100644 index 9d2bb8682..000000000 --- a/lib/routes/qq/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'qq.com': { - _name: '腾讯网', - ac: [ - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/anime#teng-xun-dong-man-pai-hang-bang', - source: ['/Rank/comicRank/type/:type', '/'], - target: '/qq/ac/rank/:type?/:time?', - }, - { - title: '漫画', - docs: 'https://docs.rsshub.app/routes/anime#teng-xun-dong-man-man-hua', - source: ['/Comic/ComicInfo/id/:id', '/'], - target: '/qq/ac/comic/:id', - }, - ], - 'node.kg': [ - { - title: '用户作品列表 - 全民 K 歌', - docs: 'https://docs.rsshub.app/routes/live#qi-e-zhi-bo-zhi-bo-jian-ti-xing', - source: ['/personal'], - target: (_params, url) => `/qq/kg/${new URL(url).searchParams.get('uid')}`, - }, - { - title: '用户作品评论动态 - 全民 K 歌', - docs: 'https://docs.rsshub.app/routes/live#qi-e-zhi-bo-zhi-bo-jian-ti-xing', - source: ['/play'], - target: (_params, url) => `/qq/kg/${new URL(url).searchParams.get('s')}`, - }, - ], - 'vp.fact': [ - { - title: '最新辟谣', - docs: 'https://docs.rsshub.app/routes/other#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai', - source: ['/home', '/'], - target: '/qq/fact', - }, - ], - }, -}; diff --git a/lib/routes/qq/router.ts b/lib/routes/qq/router.ts deleted file mode 100644 index 18aa5a623..000000000 --- a/lib/routes/qq/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/ac/comic/:id?', './ac/comic'); - router.get('/ac/rank/:type?/:time?', './ac/rank'); - router.get('/fact', './fact'); - router.get('/kg/:userId', './kg/user'); - router.get('/kg/reply/:playId', './kg/reply'); -}; diff --git a/lib/routes/qq88/index.ts b/lib/routes/qq88/index.ts index 1d8a9de9e..72d352f3a 100644 --- a/lib/routes/qq88/index.ts +++ b/lib/routes/qq88/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['multimedia'], + example: '/qq88', + parameters: { category: '分类 id,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 首页 | オトナの土ドラ | 日剧 | 日剧 SP | + | ---- | -------------- | ---- | ------- | + | | 10 | 5 | 11 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://qq88.info'; @@ -53,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.page-title').text() || '首页'} - 秋爸日字`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qq88/maintainer.ts b/lib/routes/qq88/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/qq88/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/qq88/namespace.ts b/lib/routes/qq88/namespace.ts new file mode 100644 index 000000000..1f9fc0f1c --- /dev/null +++ b/lib/routes/qq88/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '秋爸日字', + url: 'qq88.info', +}; diff --git a/lib/routes/qq88/radar.ts b/lib/routes/qq88/radar.ts deleted file mode 100644 index 63a639de0..000000000 --- a/lib/routes/qq88/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qq88.info': { - _name: '秋爸日字', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#qiu-ba-ri-zi', - source: '/', - target: (_params, url) => (new URL(url).searchParams.get('cat') ? `/qq88/${new URL(url).searchParams.get('cat')}` : '/qq88'), - }, - ], - }, -}; diff --git a/lib/routes/qq88/router.ts b/lib/routes/qq88/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/qq88/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/qqorw/index.ts b/lib/routes/qqorw/index.ts index fd0b6de8d..23723b86f 100644 --- a/lib/routes/qqorw/index.ts +++ b/lib/routes/qqorw/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/qqorw', + parameters: { category: '分类,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['qqorw.cn/:category', 'qqorw.cn/'], + }, + name: '每日早报', + maintainers: ['nczitzk'], + handler, + description: `| 首页 | 每日早报 | 国际早报 | 生活冷知识 | + | ---- | -------- | -------- | ---------- | + | | mrzb | zbapp | zbzzd |`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -63,7 +88,7 @@ export default async (ctx) => { const icon = new URL('favicon.ico', rootUrl).href; const title = $('header.archive-header h1 a').last().text(); - ctx.set('data', { + return { item: items, title: `${author}${title ? ` - ${title}` : ''}`, link: currentUrl, @@ -74,5 +99,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="keywords"]').prop('content'), author, - }); -}; + }; +} diff --git a/lib/routes/qqorw/maintainer.ts b/lib/routes/qqorw/maintainer.ts deleted file mode 100644 index e308ed51a..000000000 --- a/lib/routes/qqorw/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/qqorw/namespace.ts b/lib/routes/qqorw/namespace.ts new file mode 100644 index 000000000..c1c35d266 --- /dev/null +++ b/lib/routes/qqorw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '早报网', + url: 'qqorw.cn', +}; diff --git a/lib/routes/qqorw/radar.ts b/lib/routes/qqorw/radar.ts deleted file mode 100644 index 2e1f999a2..000000000 --- a/lib/routes/qqorw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qqorw.cn': { - _name: '早报网', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#zao-bao-wang-fen-lei', - source: ['/:category', '/'], - target: '/qqorw/:category?', - }, - ], - }, -}; diff --git a/lib/routes/qqorw/router.ts b/lib/routes/qqorw/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/qqorw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/questmobile/maintainer.ts b/lib/routes/questmobile/maintainer.ts deleted file mode 100644 index ed07dbbf9..000000000 --- a/lib/routes/questmobile/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/report/:industry?/:label?': ['nczitzk'], -}; diff --git a/lib/routes/questmobile/namespace.ts b/lib/routes/questmobile/namespace.ts new file mode 100644 index 000000000..5a9cac1bb --- /dev/null +++ b/lib/routes/questmobile/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'QuestMobile', + url: 'questmobile.com.cn', +}; diff --git a/lib/routes/questmobile/radar.ts b/lib/routes/questmobile/radar.ts deleted file mode 100644 index 8a477c290..000000000 --- a/lib/routes/questmobile/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'questmobile.com.cn': { - _name: 'QuestMobile', - '.': [ - { - title: '行业研究报告', - docs: 'https://docs.rsshub.app/routes/new-media#questmobile-hang-ye-yan-jiu-bao-gao', - source: ['/research/reports/:industry/:label'], - target: (params) => { - const industry = params.industry; - const label = params.label; - - return `/questmobile/report/${industry}/${label}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index d1c7fc5b0..4d0181a4f 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -28,7 +29,135 @@ const parseTree = (tree, result = []) => { return result; }; -export default async (ctx) => { +export const route: Route = { + path: '/report/:industry?/:label?', + categories: ['new-media'], + example: '/questmobile/report', + parameters: { industry: '行业,见下表,默认为 `-1`,即全部行业', label: '标签,见下表,默认为 `-1`,即全部标签' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '行业研究报告', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 若订阅行业 [互联网行业](https://www.questmobile.com.cn/research/reports/1/-1),网址为 \`https://www.questmobile.com.cn/research/reports/1/-1\` + 参数 industry 为 \`互联网行业\` 或 \`1\`,此时路由为 [\`/questmobile/report/互联网行业\`](https://rsshub.app/questmobile/report/互联网行业) 或 [\`/questmobile/report/1/-1\`](https://rsshub.app/questmobile/report/1/-1)。 + + 若订阅标签 [榜单](https://www.questmobile.com.cn/research/reports/-1/11),网址为 \`https://www.questmobile.com.cn/research/reports/-1/11\` + 参数 label 为 \`榜单\` 或 \`11\`,此时路由为 [\`/questmobile/report/榜单\`](https://rsshub.app/questmobile/report/榜单) 或 [\`/questmobile/report/-1/11\`](https://rsshub.app/questmobile/report/-1/11)。 + + 若订阅行业和标签 [品牌领域 - 互联网经济](https://www.questmobile.com.cn/research/reports/2/1),网址为 \`https://www.questmobile.com.cn/research/reports/2/1\` + 参数 industry 为 \`品牌领域\` 或 \`2\`,参数 label 为 \`互联网经济\` 或 \`1\`,此时路由为 [\`/questmobile/report/品牌领域/互联网经济\`](https://rsshub.app/questmobile/report/品牌领域/互联网经济) 或 [\`/questmobile/report/2/1\`](https://rsshub.app/questmobile/report/2/1),甚至 [\`/questmobile/report/品牌领域/1\`](https://rsshub.app/questmobile/report/品牌领域/1)。 + ::: + +
    + 全部行业和标签 + + #### 行业 + + | 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 | + | ---------- | -------- | -------- | -------- | -------- | + | 1 | 1001 | 1002 | 1003 | 1004 | + + | 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 | + | -------- | -------- | -------- | -------- | -------- | + | 1005 | 1006 | 1007 | 1008 | 1009 | + + | 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 | + | -------- | -------- | -------- | -------- | -------- | + | 1010 | 1011 | 1012 | 1013 | 1014 | + + | 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 | + | -------- | -------- | -------- | -------- | -------- | + | 1015 | 1016 | 1017 | 1018 | 1020 | + + | 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 | + | -------- | -------- | -------- | -------- | -------- | + | 1022 | 1023 | 1024 | 2 | 2001 | + + | 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 | + | -------- | -------- | ------------ | -------- | ------------ | + | 2002 | 2003 | 2004 | 2005 | 2006 | + + #### 标签 + + | 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 | + | ---------- | -------- | -------- | -------- | -------- | + | 1 | 1001 | 1002 | 1004 | 1005 | + + | 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 | + | -------- | ------ | ------ | ---------- | ------------ | + | 1007 | 1009 | 1010 | 1011 | 1012 | + + | 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 | + | -------- | -------- | -------- | -------- | -------- | + | 1013 | 1014 | 1015 | 1016 | 1017 | + + | 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 | + | -------- | -------- | ------------------- | -------- | ----- | + | 1018 | 1020 | 1622842051677753346 | 2 | 2002 | + + | Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 | + | ------ | ------ | -------- | -------- | -------- | + | 2003 | 2004 | 2005 | 2007 | 2008 | + + | 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 | + | -------- | -------- | -------- | ------ | ------ | + | 2009 | 2010 | 2012 | 2013 | 2014 | + + | 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 | + | ------------ | ------ | ---------- | -------- | -------- | + | 2018 | 2022 | 3 | 3001 | 3002 | + + | 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 | + | -------- | -------- | ---------- | -------- | -------- | + | 3003 | 3004 | 3005 | 3006 | 3008 | + + | 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 | + | -------- | ---------- | ------------------- | -------- | -------------- | + | 3009 | 3010 | 1630464311158738945 | 4 | 4001 | + + | 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 | + | ------------ | -------- | ------------ | ------------ | -------- | + | 4002 | 4003 | 4004 | 4007 | 5 | + + | 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 | + | -------- | -------- | -------- | -------- | -------- | + | 5001 | 5002 | 5003 | 5004 | 5007 | + + | 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 | + | ------------------- | -------- | -------- | -------- | ---------- | + | 1622841828310093825 | 6 | 6001 | 6002 | 6003 | + + | 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 | + | -------- | -------- | -------- | -------- | ---------- | + | 6004 | 6005 | 6007 | 7 | 7001 | + + | 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC | + | -------- | ------ | ---- | ---------- | ------------------- | + | 7002 | 7003 | 7004 | 7005 | 1645677998450511873 | + + | OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 | + | ------------------- | ------------------- | -------- | -------- | ---------- | + | 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 | + + | 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 | + | ------------ | -------------- | ------------------- | ------------------- | -------- | + | 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 | + + | 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 | + | -------- | -------- | ------- | ---- | -------- | + | 9001 | 9002 | 9003 | 10 | 10001 | +
    `, +}; + +async function handler(ctx) { const { industry, label } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -115,7 +244,7 @@ export default async (ctx) => { const image = $(`img[alt="${author}"]`).prop('src'); const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `${author}${categories.length === 0 ? '' : ` - ${categories.join(' - ')}`}`, link: currentUrl, @@ -127,5 +256,5 @@ export default async (ctx) => { subtitle: $('meta[name="keywords"]').prop('content'), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/questmobile/router.ts b/lib/routes/questmobile/router.ts deleted file mode 100644 index 7a9858a93..000000000 --- a/lib/routes/questmobile/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/report/:industry?/:label?', './report'); -}; diff --git a/lib/routes/quicker/maintainer.ts b/lib/routes/quicker/maintainer.ts deleted file mode 100644 index f0c1f261e..000000000 --- a/lib/routes/quicker/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/qa/:category?/:state?': ['Cesaryuan', 'nczitzk'], - '/share/:category?': ['nczitzk'], - '/update': ['Cesaryuan', 'nczitzk'], - '/user/:category/:id': ['Cesaryuan', 'nczitzk'], - '/versions': ['Cesaryuan', 'nczitzk'], -}; diff --git a/lib/routes/quicker/namespace.ts b/lib/routes/quicker/namespace.ts new file mode 100644 index 000000000..f507523cf --- /dev/null +++ b/lib/routes/quicker/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Quicker', + url: 'getquicker.net', +}; diff --git a/lib/routes/quicker/qa.ts b/lib/routes/quicker/qa.ts index 36d8c1059..c99584e65 100644 --- a/lib/routes/quicker/qa.ts +++ b/lib/routes/quicker/qa.ts @@ -1,10 +1,48 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/qa/:category?/:state?', + categories: ['programming'], + example: '/quicker/qa', + parameters: { category: '分类,见下表,默认为全部', state: '状态,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '讨论区', + maintainers: ['Cesaryuan', 'nczitzk'], + handler, + description: `分类 + + | 使用问题 | 动作开发 | BUG 反馈 | 功能建议 | + | -------- | -------- | -------- | -------- | + | 1 | 9 | 3 | 4 | + + | 动作需求 | 经验创意 | 动作推荐 | 信息发布 | + | -------- | -------- | -------- | -------- | + | 6 | 2 | 7 | 5 | + + | 随便聊聊 | 异常报告 | 全部 | + | -------- | -------- | ---- | + | 8 | 10 | all | + + 状态 + + | 全部 | 精华 | 已归档 | + | ---- | ------ | ------- | + | | digest | achived |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const state = ctx.req.param('state') ?? ''; @@ -57,10 +95,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/quicker/radar.ts b/lib/routes/quicker/radar.ts deleted file mode 100644 index d7cc6900d..000000000 --- a/lib/routes/quicker/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'getquicker.net': { - _name: 'Quicker', - '.': [ - { - title: '动作分享', - docs: 'https://docs.rsshub.app/routes/programming#quicker-dong-zuo-fen-xiang', - source: ['/Share/:category', '/'], - target: '/quicker/share/:category?', - }, - { - title: '讨论区', - docs: 'https://docs.rsshub.app/routes/programming#quicker-tao-lun-qu', - source: ['/QA', '/'], - target: (params, url) => `/quicker/qa/${new URL(url).searchParams.get('category') ?? ''}/${new URL(url).searchParams.get('state') ?? ''}`, - }, - { - title: '用户动作更新', - docs: 'https://docs.rsshub.app/routes/programming#quicker-yong-hu-dong-zuo-geng-xin', - source: ['/QA', '/'], - target: (params, url) => `/quicker/qa/${new URL(url).searchParams.get('category') ?? ''}/${new URL(url).searchParams.get('state') ?? ''}`, - }, - { - title: '版本更新', - docs: 'https://docs.rsshub.app/routes/programming#quicker-ban-ben-geng-xin', - source: ['/Help/Versions', '/'], - target: '/quicker/versions', - }, - ], - }, -}; diff --git a/lib/routes/quicker/router.ts b/lib/routes/quicker/router.ts deleted file mode 100644 index 19703281f..000000000 --- a/lib/routes/quicker/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/qa/:category?/:state?', './qa'); - router.get('/share/:category?', './share'); - router.get('/update', './versions'); - router.get('/user/:category/:id', './user'); - router.get('/versions', './versions'); -}; diff --git a/lib/routes/quicker/share.ts b/lib/routes/quicker/share.ts index d845d5f43..bd0e6ec01 100644 --- a/lib/routes/quicker/share.ts +++ b/lib/routes/quicker/share.ts @@ -1,10 +1,39 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/share/:category?', + categories: ['programming'], + example: '/quicker/share/Recent', + parameters: { category: '分类,见下表,默认为动作库最新更新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['getquicker.net/Share/:category', 'getquicker.net/'], + }, + name: '动作分享', + maintainers: ['nczitzk'], + handler, + description: `| 动作库最新更新 | 动作库最多赞 | 动作库新动作 | 动作库最近赞 | + | -------------- | ------------ | ------------ | ------------ | + | Recent | Recommended | NewActions | RecentLiked | + + | 子程序 | 扩展热键 | 文本指令 | + | ----------- | --------- | ------------ | + | SubPrograms | PowerKeys | TextCommands |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'Recent'; const rootUrl = 'https://getquicker.net'; @@ -53,10 +82,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/quicker/user.ts b/lib/routes/quicker/user.ts index 7ca03a24c..ee987652b 100644 --- a/lib/routes/quicker/user.ts +++ b/lib/routes/quicker/user.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:category/:id', + categories: ['programming'], + example: '/quicker/user/Actions/3-CL', + parameters: { category: '分类,见下表', id: '用户 id,可在对应用户页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户更新', + maintainers: ['Cesaryuan', 'nczitzk'], + handler, + description: `| 动作 | 子程序 | 动作单 | + | ------- | ----------- | ----------- | + | Actions | SubPrograms | ActionLists |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const id = ctx.req.param('id'); @@ -54,10 +76,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/quicker/versions.ts b/lib/routes/quicker/versions.ts index 05192b024..f99d8fd9c 100644 --- a/lib/routes/quicker/versions.ts +++ b/lib/routes/quicker/versions.ts @@ -1,8 +1,17 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/update', '/versions'], + name: 'Unknown', + maintainers: ['Cesaryuan', 'nczitzk'], + handler, + url: 'getquicker.net/Help/Versions', +}; + +async function handler() { const rootUrl = 'https://getquicker.net'; const currentUrl = `${rootUrl}/Help/Versions`; @@ -28,9 +37,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/qust/jw.ts b/lib/routes/qust/jw.ts index eb8e7f8eb..33edff56d 100644 --- a/lib/routes/qust/jw.ts +++ b/lib/routes/qust/jw.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const baseUrl = 'https://jw.qust.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/jw', + categories: ['university'], + example: '/qust/jw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jw.qust.edu.cn/jwtz.htm', 'jw.qust.edu.cn/'], + }, + name: '教务通知', + maintainers: ['Silent-wqh'], + handler, + url: 'jw.qust.edu.cn/jwtz.htm', +}; + +async function handler() { const response = await got({ method: 'get', url: `${baseUrl}jwtz.htm`, @@ -22,9 +45,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '青岛科技大学 - 教务通知', link: `${baseUrl}jwtz.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/qust/maintainer.ts b/lib/routes/qust/maintainer.ts deleted file mode 100644 index 0f581dab3..000000000 --- a/lib/routes/qust/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jw': ['Silent-wqh'], -}; diff --git a/lib/routes/qust/namespace.ts b/lib/routes/qust/namespace.ts new file mode 100644 index 000000000..41d66ab15 --- /dev/null +++ b/lib/routes/qust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '青岛科技大学', + url: 'jw.qust.edu.cn', +}; diff --git a/lib/routes/qust/radar.ts b/lib/routes/qust/radar.ts deleted file mode 100644 index d249ba0fa..000000000 --- a/lib/routes/qust/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'qust.edu.cn': { - _name: '青岛科技大学', - jw: [ - { - title: '教务通知', - docs: 'https://docs.rsshub.app/routes/university#qing-dao-ke-ji-da-xue', - source: ['/jwtz.htm', '/'], - target: '/qust/jw', - }, - ], - }, -}; diff --git a/lib/routes/qust/router.ts b/lib/routes/qust/router.ts deleted file mode 100644 index 3a69b3ed0..000000000 --- a/lib/routes/qust/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jw', './jw'); -}; diff --git a/lib/routes/qweather/3days.ts b/lib/routes/qweather/3days.ts index 566c8229f..13ecae079 100644 --- a/lib/routes/qweather/3days.ts +++ b/lib/routes/qweather/3days.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,26 @@ const AIR_QUALITY_API = 'https://devapi.qweather.com/v7/air/5d'; const CIRY_LOOKUP_API = 'https://geoapi.qweather.com/v2/city/lookup'; const author = 'QWeather'; -export default async (ctx) => { +export const route: Route = { + path: '/3days/:location', + categories: ['forecast'], + example: '/qweather/3days/广州', + parameters: { location: 'N' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '近三天天气', + maintainers: ['Rein-Ou', 'la3rence'], + handler, + description: `需自行注册获取 api 的 key,并在环境变量 HEFENG\_KEY 中进行配置,获取订阅近三天天气预报`, +}; + +async function handler(ctx) { if (!config.hefeng.key) { throw new Error('QWeather RSS is disabled due to the lack of relevant config'); } @@ -67,11 +87,11 @@ export default async (ctx) => { author, })); - ctx.set('data', { + return { title: ctx.req.param('location') + '未来三天天气', description: ctx.req.param('location') + '未来三天天气情况,使用和风彩云 API (包括空气质量)', item: items, link: combined.fxLink, author, - }); -}; + }; +} diff --git a/lib/routes/qweather/maintainer.ts b/lib/routes/qweather/maintainer.ts deleted file mode 100644 index edc3247bf..000000000 --- a/lib/routes/qweather/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/3days/:location': ['Rein-Ou', 'la3rence'], - '/now/:location': ['Rein-Ou'], -}; diff --git a/lib/routes/qweather/namespace.ts b/lib/routes/qweather/namespace.ts new file mode 100644 index 000000000..f2504a208 --- /dev/null +++ b/lib/routes/qweather/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '和风天气', + url: 'qweather.com', +}; diff --git a/lib/routes/qweather/now.ts b/lib/routes/qweather/now.ts index 1a770f033..c93578ba0 100644 --- a/lib/routes/qweather/now.ts +++ b/lib/routes/qweather/now.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,26 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; const rootUrl = 'https://devapi.qweather.com/v7/weather/now?'; -export default async (ctx) => { +export const route: Route = { + path: '/now/:location', + categories: ['forecast'], + example: '/qweather/广州', + parameters: { location: 'N' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '实时天气', + maintainers: ['Rein-Ou'], + handler, + description: `需自行注册获取 api 的 key,每小时更新一次数据`, +}; + +async function handler(ctx) { const id = await cache.tryGet(ctx.req.param('location') + '_id', async () => { const response = await got(`https://geoapi.qweather.com/v2/city/lookup?location=${ctx.req.param('location')}&key=${config.hefeng.key}`); const data = []; @@ -34,7 +54,7 @@ export default async (ctx) => { const time_show = timeObj.toLocaleString(); - ctx.set('data', { + return { title: ctx.req.param('location') + '实时天气', description: ctx.req.param('location') + '实时天气状况', item: data.map((item) => ({ @@ -45,5 +65,5 @@ export default async (ctx) => { link: responseData.fxLink, })), link: responseData.fxLink, - }); -}; + }; +} diff --git a/lib/routes/qweather/radar.ts b/lib/routes/qweather/radar.ts deleted file mode 100644 index 78b35c1ff..000000000 --- a/lib/routes/qweather/radar.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - 'qweather.com': { - _name: '和风天气', - '.': [ - { - title: '近三天天气', - docs: 'https://docs.rsshub.app/routes/forecast#he-feng-tian-qi', - }, - { - title: '实时天气', - docs: 'https://docs.rsshub.app/routes/forecast#he-feng-tian-qi', - }, - ], - }, -}; diff --git a/lib/routes/qweather/router.ts b/lib/routes/qweather/router.ts deleted file mode 100644 index 2e05629ac..000000000 --- a/lib/routes/qweather/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/3days/:location', './3days'); - router.get('/now/:location', './now'); -}; diff --git a/lib/routes/radio-canada/latest.ts b/lib/routes/radio-canada/latest.ts index accb7d5c0..63eab895b 100644 --- a/lib/routes/radio-canada/latest.ts +++ b/lib/routes/radio-canada/latest.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/latest/:language?', + categories: ['new-media'], + example: '/radio-canada/latest', + parameters: { language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ici.radio-canada.ca/rci/:lang', 'ici.radio-canada.ca/'], + }, + name: 'Latest News', + maintainers: ['nczitzk'], + handler, + description: `| Français | English | Español | 简体中文 | 繁體中文 | العربية | ਪੰਜਾਬੀ | Tagalog | + | -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- | + | fr | en | es | zh-hans | zh-hant | ar | pa | tl |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'en'; const rootUrl = 'https://ici.radio-canada.ca'; @@ -43,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: response.data.meta.title, link: response.data.metric.metrikContent.omniture.url, item: items, - }); -}; + }; +} diff --git a/lib/routes/radio-canada/maintainer.ts b/lib/routes/radio-canada/maintainer.ts deleted file mode 100644 index 8fe710970..000000000 --- a/lib/routes/radio-canada/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest/:language?': ['nczitzk'], -}; diff --git a/lib/routes/radio-canada/namespace.ts b/lib/routes/radio-canada/namespace.ts new file mode 100644 index 000000000..ac78210e8 --- /dev/null +++ b/lib/routes/radio-canada/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Radio-Canada.ca', + url: 'ici.radio-canada.ca', +}; diff --git a/lib/routes/radio-canada/radar.ts b/lib/routes/radio-canada/radar.ts deleted file mode 100644 index 82e38351f..000000000 --- a/lib/routes/radio-canada/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ici.radio-canada.ca': { - _name: 'Radio Canada', - '.': [ - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/new-media#jia-na-da-guo-ji-guang-bo-dian-tai-zui-xin-xiao-xi', - source: ['/rci/:lang', '/'], - target: '/radio-canada/latest/:language?', - }, - ], - }, -}; diff --git a/lib/routes/radio-canada/router.ts b/lib/routes/radio-canada/router.ts deleted file mode 100644 index 1c11d39d5..000000000 --- a/lib/routes/radio-canada/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest/:language?', './latest'); -}; diff --git a/lib/routes/radio/album.ts b/lib/routes/radio/album.ts index bb0ee6781..bcd726fee 100644 --- a/lib/routes/radio/album.ts +++ b/lib/routes/radio/album.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import CryptoJS from 'crypto-js'; -export default async (ctx) => { +export const route: Route = { + path: '/album/:id', + categories: ['multimedia'], + example: '/radio/album/15682090498666', + parameters: { id: '专辑 id,可在对应专辑页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '专辑', + maintainers: ['nczitzk'], + handler, + description: `如果订阅 [中国相声榜](https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666),其 URL 为 \`https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666\`,可以得到 \`columnId\` 为 \`15682090498666\` + + 所以对应路由为 [\`/radio/album/15682090498666\`](https://rsshub.app/radio/album/15682090498666) + + :::tip + 部分专辑不适用该路由,此时可以尝试 [节目](#yun-ting-jie-mu) 路由 + :::`, +}; + +async function handler(ctx) { const KEY = 'f0fc4c668392f9f9a447e48584c214ee'; const id = ctx.req.param('id'); @@ -97,7 +123,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `云听 - ${data.columnName}`, link: currentUrl, item: items, @@ -105,5 +131,5 @@ export default async (ctx) => { itunes_author: data.anchorpersons, description: data.descriptions ?? data.descriptionSimple, itunes_category: data.atypeInfo.map((c) => c.categoryName).join(','), - }); -}; + }; +} diff --git a/lib/routes/radio/index.ts b/lib/routes/radio/index.ts index d155279f8..b9b7b4471 100644 --- a/lib/routes/radio/index.ts +++ b/lib/routes/radio/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,34 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['multimedia'], + example: '/radio/1552135', + parameters: { id: '专辑 id,可在对应专辑页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '节目', + maintainers: ['kt286', 'nczitzk'], + handler, + description: `如果订阅 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135),其 URL 为 \`https://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135\`,可以得到 \`columnId\` 为 \`1552135\` + + 所以对应路由为 [\`/radio/1552135\`](https://rsshub.app/radio/1552135) + + :::tip + 该路由仅适用于更新时间较早的电台节目,如 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135) + + 与适用于 [专辑](#yun-ting-zhuan-ji) 路由的专辑其 \`columnId\` 长度相比,它们的 \`columnId\` 长度较短 + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const size = ctx.req.query('limit') ?? '100'; @@ -47,12 +75,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `云听 - ${data.odchannel.name}`, link: currentUrl, item: items, image: data.odchannel.imageUrl[0].url, itunes_author: data.odchannel.commissioningEditorName || data.odchannel.editorName || data.odchannel.source || 'radio.cn', description: data.odchannel.description || data.odchannel.sub_title || '', - }); -}; + }; +} diff --git a/lib/routes/radio/maintainer.ts b/lib/routes/radio/maintainer.ts deleted file mode 100644 index 3575e8547..000000000 --- a/lib/routes/radio/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/album/:id': ['nczitzk'], - '/zhibo/:id': ['nczitzk'], - '/:id': ['kt286', 'nczitzk'], -}; diff --git a/lib/routes/radio/namespace.ts b/lib/routes/radio/namespace.ts new file mode 100644 index 000000000..b8c597698 --- /dev/null +++ b/lib/routes/radio/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '云听', + url: 'radio.cn', +}; diff --git a/lib/routes/radio/radar.ts b/lib/routes/radio/radar.ts deleted file mode 100644 index 73847f78b..000000000 --- a/lib/routes/radio/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'radio.cn': { - _name: '云听', - '.': [ - { - title: '专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#yun-ting-zhuan-ji', - source: ['/pc-portal/sanji/detail.html', '/share/albumDetail', '/'], - target: (params, url) => `/radio/album/${new URL(url).searchParams.get('columnId')}`, - }, - { - title: '节目', - docs: 'https://docs.rsshub.app/routes/multimedia#yun-ting-jie-mu', - source: ['/pc-portal/sanji/detail.html', '/share/albumDetail', '/'], - target: (params, url) => `/radio/${new URL(url).searchParams.get('columnId')}`, - }, - { - title: '直播', - docs: 'https://docs.rsshub.app/routes/multimedia#yun-ting-zhi-bo', - source: ['/pc-portal/sanji/zhibo_2.html', '/'], - target: (params, url) => `/radio/zhibo/${new URL(url).searchParams.get('name')}`, - }, - ], - }, -}; diff --git a/lib/routes/radio/router.ts b/lib/routes/radio/router.ts deleted file mode 100644 index d71b6870b..000000000 --- a/lib/routes/radio/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/album/:id', './album'); - router.get('/zhibo/:id', './zhibo'); - router.get('/:id', './index'); -}; diff --git a/lib/routes/radio/zhibo.ts b/lib/routes/radio/zhibo.ts index e96a2abd3..1e7da15ba 100644 --- a/lib/routes/radio/zhibo.ts +++ b/lib/routes/radio/zhibo.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import CryptoJS from 'crypto-js'; -export default async (ctx) => { +export const route: Route = { + path: '/zhibo/:id', + categories: ['multimedia'], + example: '/radio/zhibo/1395528', + parameters: { id: '直播 id,可在对应点播页面的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '直播', + maintainers: ['nczitzk'], + handler, + description: `如果订阅 [新闻和报纸摘要](http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528),其 URL 为 \`http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528\`,可以得到 \`name\` 为 \`1395528\` + + 所以对应路由为 [\`/radio/zhibo/1395528\`](https://rsshub.app/radio/zhibo/1395528) + + :::tip + 查看更多电台直播节目,可前往 [电台直播](http://www.radio.cn/pc-portal/erji/radioStation.html) + :::`, +}; + +async function handler(ctx) { const KEY = 'f0fc4c668392f9f9a447e48584c214ee'; const id = ctx.req.param('id'); @@ -65,12 +91,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `云听 - ${data[0].name}`, link: currentUrl, item: items, image: iconUrl, itunes_author: 'radio.cn', description: data[0].des, - }); -}; + }; +} diff --git a/lib/routes/rarehistoricalphotos/index.ts b/lib/routes/rarehistoricalphotos/index.ts index 64b0319be..e4434dc10 100644 --- a/lib/routes/rarehistoricalphotos/index.ts +++ b/lib/routes/rarehistoricalphotos/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://rarehistoricalphotos.com'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['rarehistoricalphotos.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'rarehistoricalphotos.com/', +}; + +async function handler(ctx) { const { data } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { per_page: ctx.req.query('limit') ? Number(ctx.req.query('limit')) : undefined, @@ -17,12 +30,12 @@ export default async (ctx) => { pubDate: parseDate(item.date_gmt), })); - ctx.set('data', { + return { title: 'Rare Historical Photos', description: 'And the story behind them...', link: baseUrl, image: 'https://rarehistoricalphotos.com/wp-content/uploads/2022/04/cropped-rarehistoricalphotos-32x32.png', language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/rarehistoricalphotos/maintainer.ts b/lib/routes/rarehistoricalphotos/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/rarehistoricalphotos/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/rarehistoricalphotos/namespace.ts b/lib/routes/rarehistoricalphotos/namespace.ts new file mode 100644 index 000000000..df543e16a --- /dev/null +++ b/lib/routes/rarehistoricalphotos/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Rare Historical Photos', + url: 'rarehistoricalphotos.com', +}; diff --git a/lib/routes/rarehistoricalphotos/radar.ts b/lib/routes/rarehistoricalphotos/radar.ts deleted file mode 100644 index e8cd1de23..000000000 --- a/lib/routes/rarehistoricalphotos/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rarehistoricalphotos.com': { - _name: 'Rare Historical Photos', - '.': [ - { - title: 'Home', - docs: 'https://docs.rsshub.app/routes/picture#rare-historical-photos', - source: ['/'], - target: '/rarehistoricalphotos', - }, - ], - }, -}; diff --git a/lib/routes/rarehistoricalphotos/router.ts b/lib/routes/rarehistoricalphotos/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/rarehistoricalphotos/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/rattibha/maintainer.ts b/lib/routes/rattibha/maintainer.ts deleted file mode 100644 index f1e194078..000000000 --- a/lib/routes/rattibha/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:user': ['yshalsager'], -}; diff --git a/lib/routes/rattibha/namespace.ts b/lib/routes/rattibha/namespace.ts new file mode 100644 index 000000000..b4537f1f7 --- /dev/null +++ b/lib/routes/rattibha/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Rattibha', + url: 'rattibha.com', +}; diff --git a/lib/routes/rattibha/radar.ts b/lib/routes/rattibha/radar.ts deleted file mode 100644 index 7cd89b5f7..000000000 --- a/lib/routes/rattibha/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rattibha.com': { - _name: 'رتبها - Rattibha', - '.': [ - { - title: 'User Threads', - docs: 'https://docs.rsshub.app/routes/social-media#rattibha', - source: ['/:user'], - target: '/rattibha/user/:user', - }, - ], - }, -}; diff --git a/lib/routes/rattibha/router.ts b/lib/routes/rattibha/router.ts deleted file mode 100644 index db66760a3..000000000 --- a/lib/routes/rattibha/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:user', './user'); -}; diff --git a/lib/routes/rattibha/user.ts b/lib/routes/rattibha/user.ts index 9d3f900c8..9c92fab46 100644 --- a/lib/routes/rattibha/user.ts +++ b/lib/routes/rattibha/user.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user', + categories: ['social-media'], + example: '/rattibha/user/elonmusk', + parameters: { user: 'Twitter username, without @' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rattibha.com/:user'], + }, + name: 'User Threads', + maintainers: ['yshalsager'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://rattibha.com'; const { user: twitterUser } = ctx.req.param(); @@ -38,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `سلاسل تغريدات ${twitterUser}`, link: `${baseUrl}/${twitterUser}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/rawkuma/maintainer.ts b/lib/routes/rawkuma/maintainer.ts deleted file mode 100644 index 37da61e3e..000000000 --- a/lib/routes/rawkuma/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/manga/:id': ['nczitzk'], -}; diff --git a/lib/routes/rawkuma/manga.ts b/lib/routes/rawkuma/manga.ts index 0f0f1b57b..b3befb5c0 100644 --- a/lib/routes/rawkuma/manga.ts +++ b/lib/routes/rawkuma/manga.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/manga/:id', + categories: ['anime'], + example: '/rawkuma/manga/tensei-shitara-dai-nana-ouji-dattanode-kimamani-majutsu-o-kiwamemasu', + parameters: { id: 'Manga ID, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rawkuma.com/manga/:id', 'rawkuma.com/'], + }, + name: 'Manga', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -71,7 +93,7 @@ export default async (ctx) => { .prop('href') .replace(/-\d+x\d+/, ''); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -81,5 +103,5 @@ export default async (ctx) => { logo: icon, subtitle: $('div.wd-full span').text(), author, - }); -}; + }; +} diff --git a/lib/routes/rawkuma/namespace.ts b/lib/routes/rawkuma/namespace.ts new file mode 100644 index 000000000..965181049 --- /dev/null +++ b/lib/routes/rawkuma/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Rawkuma', + url: 'rawkuma.com', +}; diff --git a/lib/routes/rawkuma/radar.ts b/lib/routes/rawkuma/radar.ts deleted file mode 100644 index 3311c4eee..000000000 --- a/lib/routes/rawkuma/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rawkuma.com': { - _name: 'Rawkuma', - '.': [ - { - title: 'Manga', - docs: 'https://docs.rsshub.app/routes/anime#rawkuma-manga', - source: ['/manga/:id', '/'], - target: '/rawkuma/manga/:id', - }, - ], - }, -}; diff --git a/lib/routes/rawkuma/router.ts b/lib/routes/rawkuma/router.ts deleted file mode 100644 index 747da842c..000000000 --- a/lib/routes/rawkuma/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/manga/:id', './manga'); -}; diff --git a/lib/routes/reactnewsletter/maintainer.ts b/lib/routes/reactnewsletter/maintainer.ts deleted file mode 100644 index 84722b5c8..000000000 --- a/lib/routes/reactnewsletter/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['meixger'], -}; diff --git a/lib/routes/reactnewsletter/namespace.ts b/lib/routes/reactnewsletter/namespace.ts new file mode 100644 index 000000000..99b9f6beb --- /dev/null +++ b/lib/routes/reactnewsletter/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ui.dev', + url: 'bytes.dev', +}; diff --git a/lib/routes/reactnewsletter/radar.ts b/lib/routes/reactnewsletter/radar.ts deleted file mode 100644 index 28575e545..000000000 --- a/lib/routes/reactnewsletter/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'bytes.dev': { - _name: 'ui.dev', - '.': [ - { - title: 'React Newsletter', - docs: 'https://docs.rsshub.app/routes/programming#ui-dev-bytes', - source: ['/issues', '/'], - target: '/reactnewsletter', - }, - ], - }, -}; diff --git a/lib/routes/reactnewsletter/reactnewsletter.ts b/lib/routes/reactnewsletter/reactnewsletter.ts index 6b687169a..3ec5778da 100644 --- a/lib/routes/reactnewsletter/reactnewsletter.ts +++ b/lib/routes/reactnewsletter/reactnewsletter.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const currentURL = 'https://reactnewsletter.com/issues'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['bytes.dev/issues', 'bytes.dev/'], + target: '', + }, + name: 'Unknown', + maintainers: ['meixger'], + handler, + url: 'bytes.dev/issues', +}; + +async function handler() { const resp = await got(currentURL); const $ = load(resp.data); const text = $('script#__NEXT_DATA__').text(); @@ -16,10 +29,10 @@ export default async (ctx) => { link: `/issues/${item.slug}`, })); - ctx.set('data', { + return { title: 'reactnewsletter.dev', description: 'Stay up to date on the latest React news, tutorials, resources, and more. Delivered every Tuesday, for free.', link: currentURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/reactnewsletter/router.ts b/lib/routes/reactnewsletter/router.ts deleted file mode 100644 index 6aefc032e..000000000 --- a/lib/routes/reactnewsletter/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './reactnewsletter'); -}; diff --git a/lib/routes/readhub/daily.ts b/lib/routes/readhub/daily.ts index 9a0ac794a..ca44b077c 100644 --- a/lib/routes/readhub/daily.ts +++ b/lib/routes/readhub/daily.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/daily', + categories: ['new-media'], + example: '/readhub/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['readhub.cn/daily'], + }, + name: '每日早报', + maintainers: ['nczitzk'], + handler, + url: 'readhub.cn/daily', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 11; const currentUrl = new URL('daily', rootUrl).href; @@ -28,7 +51,7 @@ export default async (ctx) => { const image = 'https://readhub-oss.nocode.com/static/readhub.png'; const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl); - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -40,5 +63,5 @@ export default async (ctx) => { subtitle, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index 51e9114d4..1b154fd33 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import * as path from 'node:path'; import { rootUrl, apiTopicUrl, art, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/readhub', + parameters: { category: '分类,见下表,默认为热门话题' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['WhiteWorld', 'nczitzk', 'Fatpandac'], + handler, + description: `| 热门话题 | 科技动态 | 医疗产业 | 财经快讯 | + | -------- | -------- | -------- | ------------------ | + | | news | medical | financial\_express |`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -50,7 +72,7 @@ export default async (ctx) => { const image = $('link[rel="preload"][as="image"]').prop('href'); const icon = $('meta[property="og:image"]').prop('content'); - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -62,5 +84,5 @@ export default async (ctx) => { subtitle, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/readhub/maintainer.ts b/lib/routes/readhub/maintainer.ts deleted file mode 100644 index fc44347cc..000000000 --- a/lib/routes/readhub/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/daily': ['nczitzk'], - '/:category?': ['WhiteWorld', 'nczitzk', 'Fatpandac'], -}; diff --git a/lib/routes/readhub/namespace.ts b/lib/routes/readhub/namespace.ts new file mode 100644 index 000000000..cfbf4916e --- /dev/null +++ b/lib/routes/readhub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Readhub', + url: 'readhub.cn', +}; diff --git a/lib/routes/readhub/radar.ts b/lib/routes/readhub/radar.ts deleted file mode 100644 index 40d0afb7c..000000000 --- a/lib/routes/readhub/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'readhub.cn': { - _name: 'Readhub', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#readhub-fen-lei', - source: ['/', '/:category'], - target: (params) => { - const category = params.category; - - return `/readhub${category ? `/${category}` : ''}`; - }, - }, - { - title: '每日早报', - docs: 'https://docs.rsshub.app/routes/new-media#readhub-mei-ri-zao-bao', - source: ['/daily'], - target: '/readhub/daily', - }, - ], - }, -}; diff --git a/lib/routes/readhub/router.ts b/lib/routes/readhub/router.ts deleted file mode 100644 index b1b3fc277..000000000 --- a/lib/routes/readhub/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/daily', './daily'); - router.get('/:category?', './'); -}; diff --git a/lib/routes/remnote/changelog.ts b/lib/routes/remnote/changelog.ts index 8b52d6ff2..e8b265d99 100644 --- a/lib/routes/remnote/changelog.ts +++ b/lib/routes/remnote/changelog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const FQDN = 'feedback.remnote.com'; const apiGateway = 'https://gateway.hellonext.co'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog', + categories: ['program-update'], + example: '/remnote/changelog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['remnote.com/changelog', 'remnote.com/'], + }, + name: 'Changelog', + maintainers: ['TonyRL', 'amakerlife'], + handler, + url: 'remnote.com/changelog', +}; + +async function handler() { const { data } = await got(`${apiGateway}/api/v2/changelogs`, { headers: { 'x-organization': FQDN, @@ -21,12 +44,12 @@ export default async (ctx) => { pubDate: parseDate(item.published_at.timestamp), })); - ctx.set('data', { + return { title: 'Changelog | RemNote', description: 'Vote or request new RemNote features. Subscribe to get updates about new features from RemNote.', link: `https://${FQDN}/changelog`, image: 'https://vault.hnxt.dev/uploads/organization_customization/favicon/3970/88153ff13b4b03492ddfee6e675228c1.png', item: items, language: 'en-US', - }); -}; + }; +} diff --git a/lib/routes/remnote/maintainer.ts b/lib/routes/remnote/maintainer.ts deleted file mode 100644 index fdea8c498..000000000 --- a/lib/routes/remnote/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/changelog': ['TonyRL', 'amakerlife'], -}; diff --git a/lib/routes/remnote/namespace.ts b/lib/routes/remnote/namespace.ts new file mode 100644 index 000000000..ee1ff24f4 --- /dev/null +++ b/lib/routes/remnote/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'RemNote', + url: 'remnote.com', +}; diff --git a/lib/routes/remnote/radar.ts b/lib/routes/remnote/radar.ts deleted file mode 100644 index df29c0773..000000000 --- a/lib/routes/remnote/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'remnote.com': { - _name: 'RemNote', - '.': [ - { - title: 'Changelog', - docs: 'https://docs.rsshub.app/routes/program-update#remnote', - source: ['/changelog', '/'], - target: '/remnote/changelog', - }, - ], - }, -}; diff --git a/lib/routes/remnote/router.ts b/lib/routes/remnote/router.ts deleted file mode 100644 index 697b95cbd..000000000 --- a/lib/routes/remnote/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/changelog', './changelog'); -}; diff --git a/lib/routes/researchgate/maintainer.ts b/lib/routes/researchgate/maintainer.ts deleted file mode 100644 index 7c2422b8d..000000000 --- a/lib/routes/researchgate/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/publications/:username': ['nczitzk'], -}; diff --git a/lib/routes/researchgate/namespace.ts b/lib/routes/researchgate/namespace.ts new file mode 100644 index 000000000..ed2d0f927 --- /dev/null +++ b/lib/routes/researchgate/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ResearchGate', + url: 'researchgate.net', +}; diff --git a/lib/routes/researchgate/publications.ts b/lib/routes/researchgate/publications.ts index aa9e0d6c0..2edf93016 100644 --- a/lib/routes/researchgate/publications.ts +++ b/lib/routes/researchgate/publications.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/publications/:id', + radar: { + source: ['researchgate.net/profile/:username'], + target: '/publications/:username', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.researchgate.net'; @@ -64,9 +76,9 @@ export default async (ctx) => { await browser.close(); - ctx.set('data', { + return { title: `${$('meta[property="profile:username"]').attr('content')}'s Publications - ResearchGate`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/researchgate/radar.ts b/lib/routes/researchgate/radar.ts deleted file mode 100644 index 037e269da..000000000 --- a/lib/routes/researchgate/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'researchgate.net': { - _name: 'ResearchGate', - '.': [ - { - title: 'Publications', - docs: 'https://docs.rsshub.app/routes/study#researchgate', - source: ['/profile/:username'], - target: '/researchgate/publications/:username', - }, - ], - }, -}; diff --git a/lib/routes/researchgate/router.ts b/lib/routes/researchgate/router.ts deleted file mode 100644 index e591369dd..000000000 --- a/lib/routes/researchgate/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/publications/:id', './publications'); -}; diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index 5ee17716b..402c0b740 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,59 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category/:topic?', + categories: ['traditional-media'], + example: '/reuters/world/us', + parameters: { category: 'find it in the URL, or tables below', topic: 'find it in the URL, or tables below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['reuters.com/:category/:topic?', 'reuters.com/'], + }, + name: 'Category/Topic/Author', + maintainers: ['LyleLee', 'HenryQW', 'proletarius101', 'black-desk', 'nczitzk'], + handler, + description: `- \`:category\`: + + | World | Business | Legal | Markets | Breakingviews | Technology | Graphics | + | ----- | -------- | ----- | ------- | ------------- | ---------- | -------- | + | world | business | legal | markets | breakingviews | technology | graphics | + + - \`world/:topic\`: + + | All | Africa | Americas | Asia Pacific | China | Europe | India | Middle East | United Kingdom | United States | The Great Reboot | Reuters Next | + | --- | ------ | -------- | ------------ | ----- | ------ | ----- | ----------- | -------------- | ------------- | ---------------- | ------------ | + | | africa | americas | asia-pacific | china | europe | india | middle-east | uk | us | the-great-reboot | reuters-next | + + - \`business/:topic\`: + + | All | Aerospace & Defense | Autos & Transportation | Energy | Environment | Finance | Healthcare & Pharmaceuticals | Media & Telecom | Retail & Consumer | Sustainable Business | Charged | Future of Health | Future of Money | Take Five | Reuters Impact | + | --- | ------------------- | ---------------------- | ------ | ----------- | ------- | ---------------------------- | --------------- | ----------------- | -------------------- | ------- | ---------------- | --------------- | --------- | -------------- | + | | aerospace-defense | autos-transportation | energy | environment | finance | healthcare-pharmaceuticals | media-telecom | retail-consumer | sustainable-business | charged | future-of-health | future-of-money | take-five | reuters-impact | + + - \`legal/:topic\`: + + | All | Government | Legal Industry | Litigation | Transactional | + | --- | ---------- | -------------- | ---------- | ------------- | + | | government | legalindustry | litigation | transactional | + + - \`authors/:topic\`: + + | Default | Jonathan Landay | any other authors | + | ------- | --------------- | ----------------- | + | reuters | jonathan-landay | their name in URL | + + More could be found in the URL of the category/topic page.`, +}; + +async function handler(ctx) { const MUST_FETCH_BY_TOPICS = new Set(['authors']); const CAN_USE_SOPHI = ['world']; @@ -135,11 +188,11 @@ export default async (ctx) => { ); items = results.filter((r) => r.status === 'fulfilled').map((r) => r.value); - ctx.set('data', { + return { title, description, image: 'https://www.reuters.com/pf/resources/images/reuters/logo-vertical-default-512x512.png?d=116', link: `https://www.reuters.com${section_id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/reuters/investigates.ts b/lib/routes/reuters/investigates.ts index a4bdfe3bf..8cc64eb8d 100644 --- a/lib/routes/reuters/investigates.ts +++ b/lib/routes/reuters/investigates.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/investigates', + categories: ['traditional-media'], + example: '/reuters/investigates', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Inverstigates', + maintainers: ['LyleLee'], + handler, +}; + +async function handler() { const rootUrl = 'https://www.reuters.com'; const currentUrl = `${rootUrl}/investigates/`; const response = await got(currentUrl); @@ -32,9 +51,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('h1.series-subtitle').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/reuters/maintainer.ts b/lib/routes/reuters/maintainer.ts deleted file mode 100644 index 69e43d5de..000000000 --- a/lib/routes/reuters/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/investigates': ['LyleLee'], - '/:category/:topic?': ['LyleLee', 'HenryQW', 'proletarius101', 'black-desk', 'nczitzk'], -}; diff --git a/lib/routes/reuters/namespace.ts b/lib/routes/reuters/namespace.ts new file mode 100644 index 000000000..25ab99bf9 --- /dev/null +++ b/lib/routes/reuters/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Reuters 路透社', + url: 'reuters.com', + description: `:::tip +You can use \`sophi=true\` query parameter to invoke the **experimental** method, which can, if possible, fetch more articles(between 20 and 100) with \`limit\` given. But some articles from the old method might not be available. +:::`, +}; diff --git a/lib/routes/reuters/radar.ts b/lib/routes/reuters/radar.ts deleted file mode 100644 index 213a70f7d..000000000 --- a/lib/routes/reuters/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'reuters.com': { - _name: '路透社', - '.': [ - { - title: '分类/话题/作者', - docs: 'https://docs.rsshub.app/routes/traditional-media#lu-tou-she', - source: ['/:category/:topic?', '/'], - target: '/reuters/:category/:topic?', - }, - { - title: '深度调查栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#lu-tou-she', - source: ['/investigates'], - target: '/reuters/inverstigates', - }, - ], - }, -}; diff --git a/lib/routes/reuters/router.ts b/lib/routes/reuters/router.ts deleted file mode 100644 index c83540057..000000000 --- a/lib/routes/reuters/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/investigates', './investigates'); - router.get('/:category/:topic?', './common'); -}; diff --git a/lib/routes/rfa/index.ts b/lib/routes/rfa/index.ts index e68be85e4..f18cbbd7e 100644 --- a/lib/routes/rfa/index.ts +++ b/lib/routes/rfa/index.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/:channel?/:subChannel?', + categories: ['traditional-media'], + example: '/rfa/english', + parameters: { language: 'language, English by default', channel: 'channel', subChannel: 'subchannel, where applicable' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['zphw'], + handler, + description: `Delivers a better experience by supporting parameter specification. + +Parameters can be obtained from the official website, for instance: + +\`https://www.rfa.org/cantonese/news\` corresponds to \`/rfa/cantonese/news\` + +\`https://www.rfa.org/cantonese/news/htm\` corresponds to \`/rfa/cantonese/news/htm\``, +}; + +async function handler(ctx) { let url = 'https://www.rfa.org/' + (ctx.req.param('language') ?? 'english'); if (ctx.req.param('channel')) { @@ -44,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'RFA', link: 'https://www.rfa.org/', item: result, - }); -}; + }; +} diff --git a/lib/routes/rfa/maintainer.ts b/lib/routes/rfa/maintainer.ts deleted file mode 100644 index 1dc365f84..000000000 --- a/lib/routes/rfa/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language?/:channel?/:subChannel?': ['zphw'], -}; diff --git a/lib/routes/rfa/namespace.ts b/lib/routes/rfa/namespace.ts new file mode 100644 index 000000000..f028b2d73 --- /dev/null +++ b/lib/routes/rfa/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Radio Free Asia (RFA) 自由亚洲电台', + url: 'rfa.org', +}; diff --git a/lib/routes/rfa/radar.ts b/lib/routes/rfa/radar.ts deleted file mode 100644 index ea8ba331f..000000000 --- a/lib/routes/rfa/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rfa.org': { - _name: '自由亚洲电台', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#zi-you-ya-zhou-dian-tai', - source: '/:language/:channel/:subChannel', - target: '/rfa/:language/:channel/:subChannel', - }, - ], - }, -}; diff --git a/lib/routes/rfa/router.ts b/lib/routes/rfa/router.ts deleted file mode 100644 index d242b9ffe..000000000 --- a/lib/routes/rfa/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language?/:channel?/:subChannel?', './index'); -}; diff --git a/lib/routes/rfi/maintainer.ts b/lib/routes/rfi/maintainer.ts deleted file mode 100644 index f86c68ace..000000000 --- a/lib/routes/rfi/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path*': ['nczitzk'], -}; diff --git a/lib/routes/rfi/namespace.ts b/lib/routes/rfi/namespace.ts new file mode 100644 index 000000000..b98bdd5b1 --- /dev/null +++ b/lib/routes/rfi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Radio France Internationale 法国国际广播电台', + url: 'rfi.fr', +}; diff --git a/lib/routes/rfi/news.ts b/lib/routes/rfi/news.ts index 3e1602cde..7ef3a85db 100644 --- a/lib/routes/rfi/news.ts +++ b/lib/routes/rfi/news.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:path{.+}?', + radar: { + source: ['rfi.fr/*path'], + target: '/:path', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'rfi.fr/*path', +}; + +async function handler(ctx) { const rootUrl = 'https://www.rfi.fr/'; const path = ctx.req.param('path') ?? 'en'; const currentUrl = `${rootUrl}${path.endsWith('/') ? path : `${path}/`}`; @@ -57,7 +70,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), description: $('meta[name="description"]').attr('content'), link: currentUrl, @@ -66,5 +79,5 @@ export default async (ctx) => { logo: new URL($('link[rel="apple-touch-icon"]').attr('href'), currentUrl).href, item: items, language: $('html').attr('lang'), - }); -}; + }; +} diff --git a/lib/routes/rfi/radar.ts b/lib/routes/rfi/radar.ts deleted file mode 100644 index a642a4ab1..000000000 --- a/lib/routes/rfi/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rfi.fr': { - _name: 'Radio France Internationale', - '.': [ - { - title: 'Generic News', - docs: 'https://docs.rsshub.app/routes/traditional-media##radio-france-internationale-fa-guo-guo-ji-guang-bo-dian-tai', - source: ['/*path'], - target: '/rfi/:path', - }, - ], - }, -}; diff --git a/lib/routes/rfi/router.ts b/lib/routes/rfi/router.ts deleted file mode 100644 index 8c1a0817b..000000000 --- a/lib/routes/rfi/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:path{.+}?', './news'); -}; diff --git a/lib/routes/right/forum.ts b/lib/routes/right/forum.ts index 760007a32..e0152337a 100644 --- a/lib/routes/right/forum.ts +++ b/lib/routes/right/forum.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id?', + categories: ['bbs'], + example: '/right/forum/31', + parameters: { id: '板块 id,可在板块页 URL 中找到,默认为新手入门及其它(硬件)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '板块', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '31'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -58,9 +77,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.xs2 a').text()} - 恩山无线论坛`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/right/maintainer.ts b/lib/routes/right/maintainer.ts deleted file mode 100644 index 43966ad62..000000000 --- a/lib/routes/right/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/forum/:id?': ['nczitzk'], -}; diff --git a/lib/routes/right/namespace.ts b/lib/routes/right/namespace.ts new file mode 100644 index 000000000..b2f769d5f --- /dev/null +++ b/lib/routes/right/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '恩山无线论坛', + url: 'right.com.cn', +}; diff --git a/lib/routes/right/radar.ts b/lib/routes/right/radar.ts deleted file mode 100644 index e37fce7f1..000000000 --- a/lib/routes/right/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'right.com.cn': { - _name: '恩山无线论坛', - '.': [ - { - title: '板块', - docs: 'https://docs.rsshub.app/routes/bbs#en-shan-wu-xian-lun-tan', - source: ['/forum', '/'], - target: (params, url) => `/right/forum/${new URL(url).href.match(/\/forum-(\d+)-\d+.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/right/router.ts b/lib/routes/right/router.ts deleted file mode 100644 index fbe01a2d7..000000000 --- a/lib/routes/right/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/forum/:id?', './forum'); -}; diff --git a/lib/routes/rodong/maintainer.ts b/lib/routes/rodong/maintainer.ts deleted file mode 100644 index 61c7a3cf1..000000000 --- a/lib/routes/rodong/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:language?': ['TonyRL'], -}; diff --git a/lib/routes/rodong/namespace.ts b/lib/routes/rodong/namespace.ts new file mode 100644 index 000000000..24887a695 --- /dev/null +++ b/lib/routes/rodong/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Rodong Sinmun 劳动新闻', + url: 'rodong.rep.kp', +}; diff --git a/lib/routes/rodong/news.ts b/lib/routes/rodong/news.ts index 520927853..16bcb3039 100644 --- a/lib/routes/rodong/news.ts +++ b/lib/routes/rodong/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,33 @@ import { parseDate } from '@/utils/parse-date'; const host = 'http://www.rodong.rep.kp'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:language?', + categories: ['traditional-media'], + example: '/rodong/news', + parameters: { language: 'Language, see below, `ko` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rodong.rep.kp/cn/index.php', 'rodong.rep.kp/en/index.php', 'rodong.rep.kp/ko/index.php', 'rodong.rep.kp/cn', 'rodong.rep.kp/en', 'rodong.rep.kp/ko'], + target: '/news', + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + url: 'rodong.rep.kp/cn/index.php', + description: `| 조선어 | English | 中文 | + | ------ | ------- | ---- | + | ko | en | cn |`, +}; + +async function handler(ctx) { const { language = 'ko' } = ctx.req.param(); const link = `${host}/${language}/index.php?MkBAMkAxQA==`; const { data: response } = await got(link); @@ -37,10 +64,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/rodong/radar.ts b/lib/routes/rodong/radar.ts deleted file mode 100644 index 9d2c62b5a..000000000 --- a/lib/routes/rodong/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rodong.rep.kp': { - _name: '劳动新闻', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#lao-dong-xin-wen', - source: ['/cn/index.php', '/en/index.php', '/ko/index.php', '/cn', '/en', '/ko'], - target: '/rodong/news', - }, - ], - }, -}; diff --git a/lib/routes/rodong/router.ts b/lib/routes/rodong/router.ts deleted file mode 100644 index 5b0be5e7a..000000000 --- a/lib/routes/rodong/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:language?', './news'); -}; diff --git a/lib/routes/routledge/book-series.ts b/lib/routes/routledge/book-series.ts index 07811ff4a..20faf1fac 100644 --- a/lib/routes/routledge/book-series.ts +++ b/lib/routes/routledge/book-series.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,17 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:bookName/book-series/:bookId', + radar: { + source: ['routledge.com/:bookName/book-series/:bookId'], + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { bookName, bookId } = ctx.req.param(); const baseUrl = 'https://www.routledge.com'; const pageUrl = `${baseUrl}/${bookName}/book-series/${bookId}`; @@ -73,10 +84,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/routledge/maintainer.ts b/lib/routes/routledge/maintainer.ts deleted file mode 100644 index 41c8b9bd7..000000000 --- a/lib/routes/routledge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:bookName/book-series/:bookId': ['TonyRL'], -}; diff --git a/lib/routes/routledge/namespace.ts b/lib/routes/routledge/namespace.ts new file mode 100644 index 000000000..1a5460871 --- /dev/null +++ b/lib/routes/routledge/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Routledge', + url: 'routledge.com', +}; diff --git a/lib/routes/routledge/radar.ts b/lib/routes/routledge/radar.ts deleted file mode 100644 index e654e37e5..000000000 --- a/lib/routes/routledge/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'routledge.com': { - _name: 'Routledge', - '.': [ - { - title: 'Book Series', - docs: 'https://docs.rsshub.app/routes/journals#routledge', - source: ['/:bookName/book-series/:bookId'], - target: '/routledge/:bookName/book-series/:bookId', - }, - ], - }, -}; diff --git a/lib/routes/routledge/router.ts b/lib/routes/routledge/router.ts deleted file mode 100644 index 818aef1c7..000000000 --- a/lib/routes/routledge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:bookName/book-series/:bookId', './book-series'); -}; diff --git a/lib/routes/rsc/journal.ts b/lib/routes/rsc/journal.ts index c60cad9d2..ff590b82d 100644 --- a/lib/routes/rsc/journal.ts +++ b/lib/routes/rsc/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,32 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/journal/:id/:category?', + categories: ['journal'], + example: '/rsc/journal/ta', + parameters: { id: 'Journal id, can be found in URL', category: 'Category, see below, All Recent Articles by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Journal', + maintainers: ['nczitzk'], + handler, + description: `:::tip + All journals at [Current journals](https://pubs.rsc.org/en/journals) + ::: + + | All Recent Articles | Advance Articles | + | ------------------- | ---------------- | + | allrecentarticles | advancearticles |`, +}; + +async function handler(ctx) { const { id, category = 'allrecentarticles' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -94,7 +120,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('meta[name="citation_title"]').prop('content'), link: currentUrl, @@ -106,5 +132,5 @@ export default async (ctx) => { subtitle: $('title').text(), author: $('meta[name="citation_journal_abbrev"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/rsc/maintainer.ts b/lib/routes/rsc/maintainer.ts deleted file mode 100644 index 570eded42..000000000 --- a/lib/routes/rsc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/journal/:id/:category?': ['nczitzk'], -}; diff --git a/lib/routes/rsc/namespace.ts b/lib/routes/rsc/namespace.ts new file mode 100644 index 000000000..e113dcacd --- /dev/null +++ b/lib/routes/rsc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Royal Society of Chemistry', + url: 'pubs.rsc.org', +}; diff --git a/lib/routes/rsc/radar.ts b/lib/routes/rsc/radar.ts deleted file mode 100644 index 69e21e769..000000000 --- a/lib/routes/rsc/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'rsc.org': { - _name: 'The Royal Society of Chemistry', - pubs: [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#royal-society-of-chemistry', - source: ['/en/journals/journalissues/:id', '/en/content/articlelanding', '/en/content/articlehtml'], - target: (params, url) => { - url = new URL(url); - const matches = url.href.match(/(?:journals\/journalissues\/|content\/articlelanding\/\d+\/|content\/articlehtml\/\d+\/)(\w+)/); - - if (matches) { - const id = matches[1]; - return `/rsc/journal/${id}`; - } - - return '/rsc/journal/:id'; - }, - }, - ], - }, -}; diff --git a/lib/routes/rsc/router.ts b/lib/routes/rsc/router.ts deleted file mode 100644 index 87fb6e33d..000000000 --- a/lib/routes/rsc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journal/:id/:category?', './journal'); -}; diff --git a/lib/routes/rsshub/maintainer.ts b/lib/routes/rsshub/maintainer.ts deleted file mode 100644 index 8bcc0e7e5..000000000 --- a/lib/routes/rsshub/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/routes/:lang?': ['DIYgod'], - '/transform/html/:url/:routeParams': ['ttttmr'], - '/transform/json/:url/:routeParams': ['ttttmr'], - '/transform/sitemap/:url/:routeParams?': ['flrngel'], -}; diff --git a/lib/routes/rsshub/namespace.ts b/lib/routes/rsshub/namespace.ts new file mode 100644 index 000000000..bdd708414 --- /dev/null +++ b/lib/routes/rsshub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'RSSHub', + url: 'docs.rsshub.app', +}; diff --git a/lib/routes/rsshub/radar.ts b/lib/routes/rsshub/radar.ts deleted file mode 100644 index 56c4f6c92..000000000 --- a/lib/routes/rsshub/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rsshub.app': { - _name: 'RSSHub', - docs: [ - { - title: '有新路由啦', - docs: 'https://docs.rsshub.app/routes/program-update#rsshub', - source: ['/*'], - target: '/rsshub/routes', - }, - ], - }, -}; diff --git a/lib/routes/rsshub/router.ts b/lib/routes/rsshub/router.ts deleted file mode 100644 index 1f25613c3..000000000 --- a/lib/routes/rsshub/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/routes/:lang?', './routes'); - router.get('/transform/html/:url/:routeParams', './transform/html'); - router.get('/transform/json/:url/:routeParams', './transform/json'); - router.get('/transform/sitemap/:url/:routeParams?', './transform/sitemap'); -}; diff --git a/lib/routes/rsshub/routes.ts b/lib/routes/rsshub/routes.ts index 0b679cf00..ca9b646db 100644 --- a/lib/routes/rsshub/routes.ts +++ b/lib/routes/rsshub/routes.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/routes/:lang?', + categories: ['program-update'], + example: '/rsshub/routes/en', + parameters: { lang: 'Language, `zh` means Chinese docs, other values or null means English docs, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['docs.rsshub.app/*'], + target: '/routes', + }, + name: 'New routes', + maintainers: ['DIYgod'], + handler, + url: 'docs.rsshub.app/*', +}; + +async function handler(ctx) { const isEnglish = ctx.req.param('lang') !== 'zh'; const lang = isEnglish ? '' : 'zh/'; @@ -44,7 +68,7 @@ export default async (ctx) => { ); const list = all.flatMap(({ page, item, type }) => item.map((item) => ({ page, item, type }))); - ctx.set('data', { + return { title: isEnglish ? 'RSSHub has new routes' : 'RSSHub 有新路由啦', link: 'https://docs.rsshub.app', description: isEnglish ? 'Everything is RSSible' : '万物皆可 RSS', @@ -61,5 +85,5 @@ export default async (ctx) => { guid: item.attr('id'), }; }), - }); -}; + }; +} diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index 0ee1d89c5..c879b2fa6 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -1,8 +1,56 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/transform/html/:url/:routeParams', + categories: ['other'], + example: '/rsshub/transform/html/https%3A%2F%2Fwechat2rss.xlab.app%2Fposts%2Flist%2F/item=div%5Bclass%3D%27post%2Dcontent%27%5D%20p%20a', + parameters: { url: '`encodeURIComponent`ed URL address', routeParams: 'Transformation rules, requires URL encode' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Transformation - HTML', + maintainers: ['ttttmr'], + handler, + description: `Pass URL and transformation rules to convert HTML/JSON into RSS. + +Specify options (in the format of query string) in parameter \`routeParams\` parameter to extract data from HTML. + +| Key | Meaning | Accepted Values | Default | +| ----------------- | -------------------------------------------------------------- | --------------- | ---------------------- | +| \`title\` | The title of the RSS | \`string\` | Extract from \`\` | +| \`item\` | The HTML elements as \`item\` using CSS selector | \`string\` | html | +| \`itemTitle\` | The HTML elements as \`title\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemTitleAttr\` | The attributes of \`title\` element as title | \`string\` | Element text | +| \`itemLink\` | The HTML elements as \`link\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemLinkAttr\` | The attributes of \`link\` element as link | \`string\` | \`href\` | +| \`itemDesc\` | The HTML elements as \`descrption\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemDescAttr\` | The attributes of \`descrption\` element as description | \`string\` | Element html | +| \`itemPubDate\` | The HTML elements as \`pubDate\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemPubDateAttr\` | The attributes of \`pubDate\` element as pubDate | \`string\` | Element html | + + Parameters parsing in the above example: + + | Parameter | Value | + | ------------- | ----------------------------------------- | + | \`url\` | \`https://wechat2rss.xlab.app/posts/list/\` | + | \`routeParams\` | \`item=div[class='post-content'] p a\` | + + Parsing of \`routeParams\` parameter: + + | Parameter | Value | + | --------- | ------------------------------- | + | \`item\` | \`div[class='post-content'] p a\` |`, +}; + +async function handler(ctx) { if (!config.feature.allow_user_supply_unsafe_domain) { throw new Error(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } @@ -56,10 +104,10 @@ export default async (ctx) => { }) .filter(Boolean); - ctx.set('data', { + return { title: rssTitle, link: url, description: `Proxy ${url}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/rsshub/transform/json.ts b/lib/routes/rsshub/transform/json.ts index 4d8b82f38..277592809 100644 --- a/lib/routes/rsshub/transform/json.ts +++ b/lib/routes/rsshub/transform/json.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; @@ -14,7 +15,55 @@ function jsonGet(obj, attr) { return obj; } -export default async (ctx) => { +export const route: Route = { + path: '/transform/json/:url/:routeParams', + categories: ['other'], + example: '/rsshub/transform/json/https%3A%2F%2Fapi.github.com%2Frepos%2Fginuerzh%2Fgost%2Freleases/title=Gost%20releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body', + parameters: { url: '`encodeURIComponent`ed URL address', routeParams: 'Transformation rules, requires URL encode' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Transformation - JSON', + maintainers: ['ttttmr'], + handler, + description: `Specify options (in the format of query string) in parameter \`routeParams\` parameter to extract data from JSON. + +| Key | Meaning | Accepted Values | Default | +| ------------- | ---------------------------------------- | --------------- | ------------------------------------------ | +| \`title\` | The title of the RSS | \`string\` | Extracted from home page of current domain | +| \`item\` | The JSON Path as \`item\` element | \`string\` | Entire JSON response | +| \`itemTitle\` | The JSON Path as \`title\` in \`item\` | \`string\` | None | +| \`itemLink\` | The JSON Path as \`link\` in \`item\` | \`string\` | None | +| \`itemDesc\` | The JSON Path as \`description\` in \`item\` | \`string\` | None | +| \`itemPubDate\` | The JSON Path as \`pubDate\` in \`item\` | \`string\` | None | + +:::tip +JSON Path only supports format like \`a.b.c\`. if you need to access arrays, like \`a[0].b\`, you can write it as \`a.0.b\`. +::: + + Parameters parsing in the above example: + + | Parameter | Value | + | ------------- | ------------------------------------------------------------------------ | + | \`url\` | \`https://api.github.com/repos/ginuerzh/gost/releases\` | + | \`routeParams\` | \`title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body\` | + + Parsing of \`routeParams\` parameter: + + | Parameter | Value | + | ----------- | --------------- | + | \`title\` | \`Gost releases\` | + | \`itemTitle\` | \`tag_name\` | + | \`itemLink\` | \`html_url\` | + | \`itemDesc\` | \`body\` |`, +}; + +async function handler(ctx) { if (!config.feature.allow_user_supply_unsafe_domain) { throw new Error(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } @@ -49,10 +98,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: rssTitle, link: url, description: `Proxy ${url}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/rsshub/transform/sitemap.ts b/lib/routes/rsshub/transform/sitemap.ts index 482454a33..19f5d8d32 100644 --- a/lib/routes/rsshub/transform/sitemap.ts +++ b/lib/routes/rsshub/transform/sitemap.ts @@ -1,8 +1,16 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/transform/sitemap/:url/:routeParams?', + name: 'Unknown', + maintainers: ['flrngel'], + handler, +}; + +async function handler(ctx) { if (!config.feature.allow_user_supply_unsafe_domain) { throw new Error(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } @@ -41,10 +49,10 @@ export default async (ctx) => { .filter(Boolean) : []; - ctx.set('data', { + return { title: rssTitle, link: url, description: `Proxy ${url}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ruancan/category.ts b/lib/routes/ruancan/category.ts index e7b48d198..dca50dfb1 100644 --- a/lib/routes/ruancan/category.ts +++ b/lib/routes/ruancan/category.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import fetchFeed from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category?', + categories: ['new-media'], + example: '/ruancan/category/news', + parameters: { category: '分类 id,可在对应分类页 URL 中找到,默认为业界' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ruancan.com/cat/:category', 'ruancan.com/'], + target: '/category/:category', + }, + name: '分类', + maintainers: [], + handler, + url: 'ruancan.com/', +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const currentUrl = `/cat/${category}`; ctx.set('data', await fetchFeed(ctx, currentUrl)); -}; +} diff --git a/lib/routes/ruancan/index.ts b/lib/routes/ruancan/index.ts index 1a5a347cf..d2702b0a5 100644 --- a/lib/routes/ruancan/index.ts +++ b/lib/routes/ruancan/index.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import fetchFeed from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['ruancan.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'ruancan.com/', +}; + +async function handler(ctx) { const currentUrl = ''; ctx.set('data', await fetchFeed(ctx, currentUrl)); -}; +} diff --git a/lib/routes/ruancan/maintainer.ts b/lib/routes/ruancan/maintainer.ts deleted file mode 100644 index b03de8064..000000000 --- a/lib/routes/ruancan/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/ruancan/category/:category?': ['nczitzk'], - '/ruancan/search/:keyword?': ['nczitzk'], - '/ruancan/user/:id': ['nczitzk'], - '/ruancan': ['nczitzk'], -}; diff --git a/lib/routes/ruancan/namespace.ts b/lib/routes/ruancan/namespace.ts new file mode 100644 index 000000000..baf1c61d2 --- /dev/null +++ b/lib/routes/ruancan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '软餐', + url: 'ruancan.com', +}; diff --git a/lib/routes/ruancan/radar.ts b/lib/routes/ruancan/radar.ts deleted file mode 100644 index c55bc6adf..000000000 --- a/lib/routes/ruancan/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'ruancan.com': { - _name: '软餐', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#ruan-can-shou-ye', - source: ['/'], - target: '/ruancan', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#ruan-can-fen-lei', - source: ['/cat/:category', '/'], - target: '/ruancan/category/:category', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/new-media#ruan-can-sou-suo', - source: ['/'], - target: (params, url) => `/ruancan/search/${new URL(url).searchParams.get('s')}`, - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/new-media#ruan-can-yong-hu-wen-zhang', - source: ['/i/:id', '/'], - target: '/ruancan/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/ruancan/router.ts b/lib/routes/ruancan/router.ts deleted file mode 100644 index 9bb955a17..000000000 --- a/lib/routes/ruancan/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/category/:category?', './category'); - router.get('/search/:keyword?', './search'); - router.get('/user/:id', './user'); - router.get('/', './index'); -}; diff --git a/lib/routes/ruancan/search.ts b/lib/routes/ruancan/search.ts index 00a871c66..367fe198d 100644 --- a/lib/routes/ruancan/search.ts +++ b/lib/routes/ruancan/search.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import fetchFeed from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword?', + categories: ['new-media'], + example: '/ruancan/search/Windows', + parameters: { keyword: '关键字,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ruancan.com/'], + target: '', + }, + name: '搜索', + maintainers: [], + handler, + url: 'ruancan.com/', +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const currentUrl = `/?s=${keyword}`; ctx.set('data', await fetchFeed(ctx, currentUrl)); -}; +} diff --git a/lib/routes/ruancan/user.ts b/lib/routes/ruancan/user.ts index 1be09ad8d..7e59bf91d 100644 --- a/lib/routes/ruancan/user.ts +++ b/lib/routes/ruancan/user.ts @@ -1,8 +1,20 @@ +import { Route } from '@/types'; import fetchFeed from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + radar: { + source: ['ruancan.com/i/:id', 'ruancan.com/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'ruancan.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const currentUrl = `/i/${id}`; ctx.set('data', await fetchFeed(ctx, currentUrl)); -}; +} diff --git a/lib/routes/ruc/hr.ts b/lib/routes/ruc/hr.ts index fa2a5250c..ec8ab3974 100644 --- a/lib/routes/ruc/hr.ts +++ b/lib/routes/ruc/hr.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hr/:category?', + categories: ['university'], + example: '/ruc/hr', + parameters: { category: '分类,见下方说明,默认为首页通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hr.ruc.edu.cn/'], + }, + name: '人事处', + maintainers: ['nczitzk'], + handler, + url: 'hr.ruc.edu.cn/', + description: `:::tip + 分类字段处填写的是对应中国人民大学人事处分类页网址中介于 **\`http://hr.ruc.edu.cn/\`** 和 **/index.htm** 中间的一段,并将其中的 \`/\` 修改为 \`-\`。 + + 如 [中国人民大学人事处 - 办事机构 - 教师事务办公室 - 教师通知公告](http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm) 的网址为 \`http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm\` 其中介于 **\`http://hr.ruc.edu.cn/\`** 和 **/index.htm** 中间的一段为 \`bsjg/bsjsswbgs/jstzgg\`。随后,并将其中的 \`/\` 修改为 \`-\`,可以得到 \`bsjg-bsjsswbgs-jstzgg\`。所以最终我们的路由为 [\`/ruc/hr/bsjg-bsjsswbgs-jstzgg\`](https://rsshub.app/ruc/hr/bsjg-bsjsswbgs-jstzgg) + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category')?.replace(/-/g, '/') ?? 'tzgg'; const rootUrl = 'http://hr.ruc.edu.cn'; @@ -51,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ruc/maintainer.ts b/lib/routes/ruc/maintainer.ts deleted file mode 100644 index 5c031c332..000000000 --- a/lib/routes/ruc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/hr/:category?': ['nczitzk'], -}; diff --git a/lib/routes/ruc/namespace.ts b/lib/routes/ruc/namespace.ts new file mode 100644 index 000000000..5f6d61edb --- /dev/null +++ b/lib/routes/ruc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国人民大学', + url: 'hr.ruc.edu.cn', +}; diff --git a/lib/routes/ruc/radar.ts b/lib/routes/ruc/radar.ts deleted file mode 100644 index bc1b025f2..000000000 --- a/lib/routes/ruc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ruc.edu.cn': { - _name: '中国人民大学', - hr: [ - { - title: '人事处', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ren-min-da-xue-ren-shi-chu', - source: ['/'], - target: '/ruc/hr/:category?', - }, - ], - }, -}; diff --git a/lib/routes/ruc/router.ts b/lib/routes/ruc/router.ts deleted file mode 100644 index 82d438e8c..000000000 --- a/lib/routes/ruc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/hr/:category?', './hr'); -}; diff --git a/lib/routes/runtrail/maintainer.ts b/lib/routes/runtrail/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/runtrail/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/runtrail/namespace.ts b/lib/routes/runtrail/namespace.ts new file mode 100644 index 000000000..015a9d010 --- /dev/null +++ b/lib/routes/runtrail/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '跑野大爆炸', + url: 'runtrail.cn', +}; diff --git a/lib/routes/runtrail/posts.ts b/lib/routes/runtrail/posts.ts index 49f2ac85d..55edd4462 100644 --- a/lib/routes/runtrail/posts.ts +++ b/lib/routes/runtrail/posts.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['runtrail.cn/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'runtrail.cn/', +}; + +async function handler(ctx) { const baseUrl = 'https://runtrail.cn'; const { data: response } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { @@ -26,9 +39,9 @@ export default async (ctx) => { link: item.link, })); - ctx.set('data', { + return { title: '最新文章 - 跑野大爆炸', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/runtrail/radar.ts b/lib/routes/runtrail/radar.ts deleted file mode 100644 index e20e7da33..000000000 --- a/lib/routes/runtrail/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'runtrail.cn': { - _name: '跑野大爆炸', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/new-media#pao-ye', - source: ['/'], - target: '/runtrail', - }, - ], - }, -}; diff --git a/lib/routes/runtrail/router.ts b/lib/routes/runtrail/router.ts deleted file mode 100644 index 59494d73c..000000000 --- a/lib/routes/runtrail/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './posts'); -}; diff --git a/lib/routes/rustcc/jobs.ts b/lib/routes/rustcc/jobs.ts index b2d990265..b0e60ebf5 100644 --- a/lib/routes/rustcc/jobs.ts +++ b/lib/routes/rustcc/jobs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; const base_url = 'https://rustcc.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jobs', + categories: ['programming'], + example: '/rustcc/jobs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rustcc.cn/'], + }, + name: '招聘', + maintainers: ['CcccFz'], + handler, + url: 'rustcc.cn/', +}; + +async function handler() { const jobs_url = 'https://rustcc.cn/section?id=fed6b7de-0a74-48eb-8988-1978858c9b35'; const response = await got({ @@ -18,13 +41,13 @@ export default async (ctx) => { const $ = load(response.data); const list = $('.article-list li').get(); - ctx.set('data', { + return { title: 'Rust语言中文社区 | 招聘', link: jobs_url, description: `获取Rust语言中文社区的最新招聘`, item: await Promise.all(list.map((item) => getFeedItem(item))), - }); -}; + }; +} function getFeedItem(item) { const $ = load(item); diff --git a/lib/routes/rustcc/maintainer.ts b/lib/routes/rustcc/maintainer.ts deleted file mode 100644 index 4d018a752..000000000 --- a/lib/routes/rustcc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jobs': ['CcccFz'], -}; diff --git a/lib/routes/rustcc/namespace.ts b/lib/routes/rustcc/namespace.ts new file mode 100644 index 000000000..61a89cbbc --- /dev/null +++ b/lib/routes/rustcc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Rust 语言中文社区', + url: 'rustcc.cn', +}; diff --git a/lib/routes/rustcc/radar.ts b/lib/routes/rustcc/radar.ts deleted file mode 100644 index 6ff65e52f..000000000 --- a/lib/routes/rustcc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'rustcc.cn': { - _name: 'Rust语言中文社区', - '.': [ - { - title: '招聘', - docs: 'https://docs.rsshub.app/routes/programming#rust-yu-yan-zhong-wen-she-qu', - source: ['/'], - target: '/rustcc/jobs', - }, - ], - }, -}; diff --git a/lib/routes/rustcc/router.ts b/lib/routes/rustcc/router.ts deleted file mode 100644 index 9c69a9e50..000000000 --- a/lib/routes/rustcc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jobs', './jobs'); -}; diff --git a/lib/routes/sakurazaka46/blog.ts b/lib/routes/sakurazaka46/blog.ts index 8bc20073b..f3c3061c9 100644 --- a/lib/routes/sakurazaka46/blog.ts +++ b/lib/routes/sakurazaka46/blog.ts @@ -1,10 +1,67 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:id?/:page?', + categories: ['new-media'], + example: '/sakurazaka46/blog', + parameters: { id: 'Member ID, see below, `all` by default', page: 'Page, `0` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Sakurazaka46 Blog 櫻坂 46 博客', + maintainers: ['victor21813', 'nczitzk', 'akashigakki'], + handler, + description: `Member ID + + | Member ID | Name | + | --------- | ------------ | + | 2000 | 三期生リレー | + | 69 | 山下 瞳月 | + | 68 | 村山 美羽 | + | 67 | 村井 優 | + | 66 | 向井 純葉 | + | 65 | 的野 美青 | + | 64 | 中嶋 優月 | + | 63 | 谷口 愛季 | + | 62 | 小島 凪紗 | + | 61 | 小田倉 麗奈 | + | 60 | 遠藤 理子 | + | 59 | 石森 璃花 | + | 58 | 守屋 麗奈 | + | 57 | 増本 綺良 | + | 56 | 幸阪 茉里乃 | + | 55 | 大沼 晶保 | + | 54 | 大園 玲 | + | 53 | 遠藤 光莉 | + | 51 | 山﨑 天 | + | 50 | 森田 ひかる | + | 48 | 松田 里奈 | + | 47 | 藤吉 夏鈴 | + | 46 | 田村 保乃 | + | 45 | 武元 唯衣 | + | 44 | 関 有美子 | + | 43 | 井上 梨名 | + | 15 | 原田 葵 | + | 14 | 土生 瑞穂 | + | 11 | 菅井 友香 | + | 08 | 齋藤 冬優花 | + | 07 | 小林 由依 | + | 06 | 小池 美波 | + | 04 | 尾関 梨香 | + | 03 | 上村 莉菜 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'all'; const page = ctx.req.param('page') ?? '0'; @@ -49,9 +106,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('title').text()}${id ? ` - ${$('.name').first().text()}` : ''}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sakurazaka46/maintainer.ts b/lib/routes/sakurazaka46/maintainer.ts deleted file mode 100644 index 47efc0013..000000000 --- a/lib/routes/sakurazaka46/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog/:id?/:page?': ['victor21813', 'nczitzk', 'akashigakki'], - '/news': ['nczitzk'], -}; diff --git a/lib/routes/sakurazaka46/namespace.ts b/lib/routes/sakurazaka46/namespace.ts new file mode 100644 index 000000000..aa773a04c --- /dev/null +++ b/lib/routes/sakurazaka46/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sakamichi Series 坂道系列官网资讯', + url: 'sakurazaka46.com', +}; diff --git a/lib/routes/sakurazaka46/news.ts b/lib/routes/sakurazaka46/news.ts index bb737212e..0faf1ea6d 100644 --- a/lib/routes/sakurazaka46/news.ts +++ b/lib/routes/sakurazaka46/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/sakurazaka46/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sakurazaka46.com/s/s46/news/list', 'sakurazaka46.com/'], + }, + name: 'Sakurazaka46 News 櫻坂 46 新闻', + maintainers: ['nczitzk'], + handler, + url: 'sakurazaka46.com/s/s46/news/list', +}; + +async function handler(ctx) { const rootUrl = 'https://sakurazaka46.com'; const currentUrl = `${rootUrl}/s/s46/news/list`; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sakurazaka46/radar.ts b/lib/routes/sakurazaka46/radar.ts deleted file mode 100644 index 9c1584dfb..000000000 --- a/lib/routes/sakurazaka46/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'sakurazaka46.com': { - _name: '櫻坂46', - '.': [ - { - title: '公式ブログ', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-ying-ban-46-bo-ke', - source: ['/s/s46/diary/blog/list', '/'], - target: (params, url) => `/sakurazaka46/blog/${new URL(url).searchParams.get('ct')}`, - }, - { - title: 'ニュース', - docs: 'https://docs.rsshub.app/routes/new-media#ban-dao-xi-lie-guan-wang-zi-xun-ying-ban-46-xin-wen', - source: ['/s/s46/news/list', '/'], - target: '/sakurazaka46/news', - }, - ], - }, -}; diff --git a/lib/routes/sakurazaka46/router.ts b/lib/routes/sakurazaka46/router.ts deleted file mode 100644 index 98134845b..000000000 --- a/lib/routes/sakurazaka46/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/blog/:id?/:page?', './blog'); - router.get('/news', './news'); -}; diff --git a/lib/routes/samsung/maintainer.ts b/lib/routes/samsung/maintainer.ts deleted file mode 100644 index 75e369bb8..000000000 --- a/lib/routes/samsung/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/research/blog': ['nczitzk'], -}; diff --git a/lib/routes/samsung/namespace.ts b/lib/routes/samsung/namespace.ts new file mode 100644 index 000000000..e6da53bb2 --- /dev/null +++ b/lib/routes/samsung/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Samsung', + url: 'research.samsung.com', +}; diff --git a/lib/routes/samsung/radar.ts b/lib/routes/samsung/radar.ts deleted file mode 100644 index 68400f243..000000000 --- a/lib/routes/samsung/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'samsung.com': { - _name: 'Samsung', - research: [ - { - title: 'Research Blog', - docs: 'https://docs.rsshub.app/routes/new-media#samsung-research-blog', - source: ['/blog', '/'], - target: '/samsung/research/blog', - }, - ], - }, -}; diff --git a/lib/routes/samsung/research/blog.ts b/lib/routes/samsung/research/blog.ts index 9f840498b..51accf925 100644 --- a/lib/routes/samsung/research/blog.ts +++ b/lib/routes/samsung/research/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/research/blog', + categories: ['new-media'], + example: '/samsung/research/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['research.samsung.com/blog', 'research.samsung.com/'], + }, + name: 'Research Blog', + maintainers: ['nczitzk'], + handler, + url: 'research.samsung.com/blog', +}; + +async function handler() { const rootUrl = 'https://research.samsung.com'; const currentUrl = `${rootUrl}/blogMain/list.json`; @@ -42,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'BLOG | Samsung Research', link: `${rootUrl}/blog`, item: items, - }); -}; + }; +} diff --git a/lib/routes/samsung/router.ts b/lib/routes/samsung/router.ts deleted file mode 100644 index 74ac3f8eb..000000000 --- a/lib/routes/samsung/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/research/blog', './research/blog'); -}; diff --git a/lib/routes/saraba1st/digest.ts b/lib/routes/saraba1st/digest.ts index 4c6b0edca..4aeefd111 100644 --- a/lib/routes/saraba1st/digest.ts +++ b/lib/routes/saraba1st/digest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,26 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/digest/:tid', + categories: ['bbs'], + example: '/saraba1st/digest/forum-75-1', + parameters: { tid: '论坛 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '论坛摘要', + maintainers: ['shinemoon'], + handler, + description: `版面网址如果为 \`https://bbs.saraba1st.com/2b/forum-75-1.html\` 那么论坛 id 就是 \`forum-75-1\`。`, +}; + +async function handler(ctx) { const tid = ctx.req.param('tid'); const cookieString = config.saraba1st.cookie ?? ''; const res = await got('https://bbs.saraba1st.com/2b/' + tid + '.html', { @@ -45,13 +65,13 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Stage1 论坛 - ${title}`, link: `https://bbs.saraba1st.com/2b/${tid}.html`, // item: await resultItems, item: resultItems, - }); -}; + }; +} async function fetchContent(url) { // Fetch the subpageinof diff --git a/lib/routes/saraba1st/maintainer.ts b/lib/routes/saraba1st/maintainer.ts deleted file mode 100644 index 7731d7e4f..000000000 --- a/lib/routes/saraba1st/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/digest/:tid': ['shinemoon'], - '/thread/:tid': ['zengxs'], -}; diff --git a/lib/routes/saraba1st/namespace.ts b/lib/routes/saraba1st/namespace.ts new file mode 100644 index 000000000..a975ccee9 --- /dev/null +++ b/lib/routes/saraba1st/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Saraba1st', + url: 'bbs.saraba1st.com', +}; diff --git a/lib/routes/saraba1st/radar.ts b/lib/routes/saraba1st/radar.ts deleted file mode 100644 index 2ace2ce91..000000000 --- a/lib/routes/saraba1st/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'saraba1st.com': { - _name: 'Saraba1st', - bbs: [ - { - title: '论坛', - docs: 'https://docs.rsshub.app/routes/bbs#saraba1st', - source: '/2b/:id', - target: (params) => { - let id = params.id; - // For Digest - if (id.match('forum') !== null) { - id = id.substring(0, id.length - 5); - return `/saraba1st/digest/${id}`; - } - // For Thread - else if (id.match('thread') !== null) { - id = params.id.includes('thread') ? params.id.split('-')[1] : ''; - return id ? `/saraba1st/thread/${id}` : ''; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/saraba1st/router.ts b/lib/routes/saraba1st/router.ts deleted file mode 100644 index 0bde67f48..000000000 --- a/lib/routes/saraba1st/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/thread/:tid', './thread'); - router.get('/digest/:tid', './digest'); -}; diff --git a/lib/routes/saraba1st/thread.ts b/lib/routes/saraba1st/thread.ts index 722a65337..5a62efb6e 100644 --- a/lib/routes/saraba1st/thread.ts +++ b/lib/routes/saraba1st/thread.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import queryString from 'query-string'; @@ -5,7 +6,26 @@ import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/thread/:tid', + categories: ['bbs'], + example: '/saraba1st/thread/1842868', + parameters: { tid: '帖子 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '帖子', + maintainers: ['zengxs'], + handler, + description: `帖子网址如果为 \`https://bbs.saraba1st.com/2b/thread-1842868-1-1.html\` 那么帖子 id 就是 \`1789863\`。`, +}; + +async function handler(ctx) { const tid = ctx.req.param('tid'); const cookieString = config.saraba1st.cookie ?? ''; @@ -55,9 +75,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Stage1 论坛 - ${title}`, link: `https://bbs.saraba1st.com/2b/thread-${tid}-1-1.html`, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/sass/gs/index.ts b/lib/routes/sass/gs/index.ts index a5def11c9..03f3730c0 100644 --- a/lib/routes/sass/gs/index.ts +++ b/lib/routes/sass/gs/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const host = 'https://gs.sass.org.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gs/:type', + categories: ['university'], + example: '/sass/gs/1793', + parameters: { type: '类别 ID,见下表,其他未列出的栏目参数可以从页面的 URL Path 中找到,例如:硕士统考招生的网址为 `https://gs.sass.org.cn/1793/list.htm`,则类别 ID 为`1793`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.sass.org.cn/:type/list.htm'], + }, + name: '研究生院', + maintainers: ['yanbot-team'], + handler, + description: `| 硕士统考招生 | 硕士推免招生 | + | ------------ | ------------ | + | 1793 | sstmzs |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `${host}/${type}/list.htm`; @@ -38,10 +63,10 @@ export default async (ctx) => { }) ); // 处理返回 - ctx.set('data', { + return { title: '上海社会科学院 - 研究生院', link: url, description: '上海社会科学院 - 研究生院', item: items, - }); -}; + }; +} diff --git a/lib/routes/sass/maintainer.ts b/lib/routes/sass/maintainer.ts deleted file mode 100644 index e9b5206ab..000000000 --- a/lib/routes/sass/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/gs/:type': ['yanbot-team'], -}; diff --git a/lib/routes/sass/namespace.ts b/lib/routes/sass/namespace.ts new file mode 100644 index 000000000..9e100f2c5 --- /dev/null +++ b/lib/routes/sass/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海社会科学院', + url: 'gs.sass.org.cn', +}; diff --git a/lib/routes/sass/radar.ts b/lib/routes/sass/radar.ts deleted file mode 100644 index 2a03fdc4b..000000000 --- a/lib/routes/sass/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sass.org.cn': { - _name: '上海社会科学院', - gs: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-she-hui-ke-xue-yuan-yan-jiu-sheng-yuan', - source: ['/:type/list.htm'], - target: '/sass/gs/:type', - }, - ], - }, -}; diff --git a/lib/routes/sass/router.ts b/lib/routes/sass/router.ts deleted file mode 100644 index a338f3b18..000000000 --- a/lib/routes/sass/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/gs/:type', './gs/index'); -}; diff --git a/lib/routes/scau/maintainer.ts b/lib/routes/scau/maintainer.ts deleted file mode 100644 index bb7604931..000000000 --- a/lib/routes/scau/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/yzb': ['shengmaosu'], - '/yjsy': ['Chunssu'], -}; diff --git a/lib/routes/scau/namespace.ts b/lib/routes/scau/namespace.ts new file mode 100644 index 000000000..568a62805 --- /dev/null +++ b/lib/routes/scau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华南农业大学', + url: 'yzb.scau.edu.cn', +}; diff --git a/lib/routes/scau/radar.ts b/lib/routes/scau/radar.ts deleted file mode 100644 index 0f1cc3cc7..000000000 --- a/lib/routes/scau/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'scau.edu.cn': { - _name: '华南农业大学', - yzb: [ - { - title: '华农研讯', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-nong-ye-da-xue', - source: ['/2136/list1.htm', '/'], - target: '/scau/yzb', - }, - ], - yjsy: [ - { - title: '研究生院通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-nong-ye-da-xue', - source: ['/208/list.htm', '/'], - target: '/scau/yjsy', - }, - ], - }, -}; diff --git a/lib/routes/scau/router.ts b/lib/routes/scau/router.ts deleted file mode 100644 index b0781951a..000000000 --- a/lib/routes/scau/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/yzb', './yjs'); - router.get('/yjsy', './yjsy'); -}; diff --git a/lib/routes/scau/yjs.ts b/lib/routes/scau/yjs.ts index 1c2756e6a..826679584 100644 --- a/lib/routes/scau/yjs.ts +++ b/lib/routes/scau/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yzb', + categories: ['university'], + example: '/scau/yzb', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yzb.scau.edu.cn/2136/list1.htm', 'yzb.scau.edu.cn/'], + }, + name: '华农研讯', + maintainers: ['shengmaosu'], + handler, + url: 'yzb.scau.edu.cn/2136/list1.htm', +}; + +async function handler() { const link = 'https://yzb.scau.edu.cn/2136/list1.htm'; const response = await got(link); const $ = load(response.data); const list = $('#wp_news_w25 tr'); - ctx.set('data', { + return { title: '华南农业大学研招办', link, description: '华农研讯', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('td').eq(3).text(), 'YYYY/MM/DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/scau/yjsy.ts b/lib/routes/scau/yjsy.ts index 510089aaf..ae903bd09 100644 --- a/lib/routes/scau/yjsy.ts +++ b/lib/routes/scau/yjsy.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy', + categories: ['university'], + example: '/scau/yjsy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yjsy.scau.edu.cn/208/list.htm', 'yjsy.scau.edu.cn/'], + }, + name: '研究生院通知', + maintainers: ['Chunssu'], + handler, + url: 'yjsy.scau.edu.cn/208/list.htm', +}; + +async function handler() { const link = 'https://yjsy.scau.edu.cn/208/list1.htm'; const response = await got(link); const $ = load(response.data); const list = $('#wp_news_w25 tr td tr'); - ctx.set('data', { + return { title: '华南农业大学研究生院', link, description: '通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('td').eq(2).text(), 'YYYY/MM/DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/science/blogs.ts b/lib/routes/science/blogs.ts index 285af0714..ef1e79a59 100644 --- a/lib/routes/science/blogs.ts +++ b/lib/routes/science/blogs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,30 @@ import { baseUrl } from './utils'; import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/blogs/:name?', + categories: ['journal'], + example: '/science/blogs/pipeline', + parameters: { name: 'Short name for the blog, get this from the url. Defaults to pipeline' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['science.org/blogs/:name'], + target: '/blogs/:name', + }, + name: 'Blogs', + maintainers: ['TomHodson'], + handler, + description: `To subscribe to [IN THE PIPELINE by Derek Lowe’s](https://science.org/blogs/pipeline) or the [science editor's blog](https://science.org/blogs/editors-blog), use the name parameter \`pipeline\` or \`editors-blog\`.`, +}; + +async function handler(ctx) { const { name = 'pipeline' } = ctx.req.param(); const link = `${baseUrl}/blogs/${name}/feed`; @@ -53,12 +77,12 @@ export default async (ctx) => { const name_re = /Keyword search result for Blog Series: (?<blog_name>[^-]+) --/; const { blog_name = 'Unknown Title' } = $('channel > description').text().match(name_re).groups; - ctx.set('data', { + return { title: `Science Blogs: ${blog_name}`, description: `A Science.org blog called ${blog_name}`, image: `${baseUrl}/apple-touch-icon.png`, link: `${baseUrl}/blogs/${name}`, language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/science/cover.ts b/lib/routes/science/cover.ts index 3dc7cc250..f1bfc1f3c 100644 --- a/lib/routes/science/cover.ts +++ b/lib/routes/science/cover.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -17,7 +18,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { baseUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/cover', + categories: ['journal'], + example: '/science/cover', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['science.org/'], + }, + name: 'Cover Story', + maintainers: ['y9c', 'TonyRL'], + handler, + url: 'science.org/', + description: `Subscribe to the cover images of Science journals, and get the latest publication updates in time. + + Including 'Science', 'Science Advances', 'Science Immunology', 'Science Robotics', 'Science Signaling' and 'Science Translational Medicine'.`, +}; + +async function handler() { const pageURL = `${baseUrl}/journals`; const { data: pageResponse } = await got(pageURL, { @@ -61,12 +87,12 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[property="og:description"]').attr('content'), image: `${baseUrl}/apple-touch-icon.png`, link: pageURL, language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/science/current.ts b/lib/routes/science/current.ts index 403bf50f3..af2aab37e 100644 --- a/lib/routes/science/current.ts +++ b/lib/routes/science/current.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // journals form AAAS publishing group // @@ -13,7 +14,40 @@ import got from '@/utils/got'; import { baseUrl, fetchDesc, getItem } from './utils'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/current/:journal?', + categories: ['journal'], + example: '/science/current/science', + parameters: { journal: 'Short name for a journal' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['science.org/journal/:journal', 'science.org/toc/:journal/current'], + target: '/current/:journal', + }, + name: 'Current Issue', + maintainers: ['y9c', 'TonyRL'], + handler, + description: `| Short name | Full name of the journal | Route | + | :---------: | :----------------------------: | ------------------------------------------------------------------------------ | + | science | Science | [/science/current/science](https://rsshub.app/science/current/science) | + | sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) | + | sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) | + | scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) | + | signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) | + | stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) | + + - Using route (\`/science/current/\` + "short name for a journal") to get current issue of a journal from AAAS. + - Leaving it empty (\`/science/current\`) to get update from Science.`, +}; + +async function handler(ctx) { const { journal = 'science' } = ctx.req.param(); const pageURL = `${baseUrl}/toc/${journal}/current`; @@ -33,12 +67,12 @@ export default async (ctx) => { const items = await fetchDesc(list, browser, cache.tryGet); await browser.close(); - ctx.set('data', { + return { title: `${pageTitleName} | Current Issue`, description: `Current Issue of ${pageTitleName}`, image: `${baseUrl}/apple-touch-icon.png`, link: pageURL, language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/science/early.ts b/lib/routes/science/early.ts index 64c8cdb80..644557dc8 100644 --- a/lib/routes/science/early.ts +++ b/lib/routes/science/early.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -5,7 +6,30 @@ import puppeteer from '@/utils/puppeteer'; import { baseUrl, fetchDesc, getItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/early/:journal?', + categories: ['journal'], + example: '/science/early', + parameters: { journal: 'Short name for a journal' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + radar: { + source: ['science.org/journal/:journal', 'science.org/toc/:journal/0/0'], + target: '/early/:journal', + }, + name: 'First Release', + maintainers: ['y9c', 'TonyRL'], + handler, + description: `*only Science, Science Immunology and Science Translational Medicine have first release*`, +}; + +async function handler(ctx) { const { journal = 'science' } = ctx.req.param(); const pageUrl = `${baseUrl}/toc/${journal}/0/0`; @@ -24,12 +48,12 @@ export default async (ctx) => { const items = await fetchDesc(list, browser, cache.tryGet); await browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('.body02').text().trim(), image: `${baseUrl}/apple-touch-icon.png`, link: pageUrl, language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/science/maintainer.ts b/lib/routes/science/maintainer.ts deleted file mode 100644 index f6954eba8..000000000 --- a/lib/routes/science/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/blogs/:name?': ['TomHodson'], - '/cover': ['y9c', 'TonyRL'], - '/current/:journal?': ['y9c', 'TonyRL'], - '/early/:journal?': ['y9c', 'TonyRL'], -}; diff --git a/lib/routes/science/namespace.ts b/lib/routes/science/namespace.ts new file mode 100644 index 000000000..f648fcebf --- /dev/null +++ b/lib/routes/science/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Science Magazine', + url: 'science.org', +}; diff --git a/lib/routes/science/radar.ts b/lib/routes/science/radar.ts deleted file mode 100644 index 9c6624541..000000000 --- a/lib/routes/science/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'science.org': { - _name: 'Science Magazine', - '.': [ - { - title: '本期刊物', - docs: 'https://docs.rsshub.app/routes/journal#science-xi-lie', - source: ['/journal/:journal', '/toc/:journal/current'], - target: '/science/current/:journal', - }, - { - title: '封面故事', - docs: 'https://docs.rsshub.app/routes/journal#science-xi-lie', - source: ['/'], - target: '/science/cover', - }, - { - title: '在线发表', - docs: 'https://docs.rsshub.app/routes/journal#science-xi-lie', - source: ['/journal/:journal', '/toc/:journal/0/0'], - target: '/science/early/:journal', - }, - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/journal#science-xi-lie', - source: ['/blogs/:name'], - target: '/science/blogs/:name', - }, - ], - }, -}; diff --git a/lib/routes/science/router.ts b/lib/routes/science/router.ts deleted file mode 100644 index c4e549275..000000000 --- a/lib/routes/science/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/blogs/:name?', './blogs'); - router.get('/cover', './cover'); - router.get('/current/:journal?', './current'); - router.get('/early/:journal?', './early'); -}; diff --git a/lib/routes/sciencedirect/journal.ts b/lib/routes/sciencedirect/journal.ts index 069de8316..554e96fbc 100644 --- a/lib/routes/sciencedirect/journal.ts +++ b/lib/routes/sciencedirect/journal.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { decodeCFEmail } from './cf-email'; -export default async (ctx) => { +export const route: Route = { + path: '/journal/:id', + categories: ['journal'], + example: '/sciencedirect/journal/research-policy', + parameters: { id: 'Journal id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sciencedirect.com/journal/:id', 'sciencedirect.com/'], + }, + name: 'Journal', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.sciencedirect.com'; @@ -62,9 +84,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${response.data.match(/\\"displayName\\":\\"(.*?)\\",\\"/)[1]} - ScienceDirect`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sciencedirect/maintainer.ts b/lib/routes/sciencedirect/maintainer.ts deleted file mode 100644 index 257956556..000000000 --- a/lib/routes/sciencedirect/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/journal/:id': ['nczitzk'], -}; diff --git a/lib/routes/sciencedirect/namespace.ts b/lib/routes/sciencedirect/namespace.ts new file mode 100644 index 000000000..9bc71f805 --- /dev/null +++ b/lib/routes/sciencedirect/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ScienceDirect', + url: 'sciencedirect.com', +}; diff --git a/lib/routes/sciencedirect/radar.ts b/lib/routes/sciencedirect/radar.ts deleted file mode 100644 index c501ef3aa..000000000 --- a/lib/routes/sciencedirect/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sciencedirect.com': { - _name: 'ScienceDirect', - '.': [ - { - title: 'Journal', - docs: 'https://docs.rsshub.app/routes/journal#sciencedirect-journal', - source: ['/journal/:id', '/'], - target: '/sciencedirect/journal/:id', - }, - ], - }, -}; diff --git a/lib/routes/sciencedirect/router.ts b/lib/routes/sciencedirect/router.ts deleted file mode 100644 index 7026d3b4d..000000000 --- a/lib/routes/sciencedirect/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journal/:id', './journal'); -}; diff --git a/lib/routes/sciencenet/blog.ts b/lib/routes/sciencenet/blog.ts index e54f47b51..c6d43419d 100644 --- a/lib/routes/sciencenet/blog.ts +++ b/lib/routes/sciencenet/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,42 @@ import iconv from 'iconv-lite'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:type?/:time?/:sort?', + categories: ['new-media'], + example: '/sciencenet/blog', + parameters: { type: '类型,见下表,默认为推荐', time: '时间,见下表,默认为所有时间', sort: '排序,见下表,默认为按发表时间排序' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '精选博客', + maintainers: ['nczitzk'], + handler, + description: `类型 + + | 精选 | 最新 | 热门 | + | --------- | ---- | ---- | + | recommend | new | hot | + + 时间 + + | 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 | + | ----------------- | -------------- | -------------- | -------------- | ---------------- | + | 1 | 2 | 3 | 4 | 5 | + + 排序 + + | 按发表时间排序 | 按评论数排序 | 按点击数排序 | + | -------------- | ------------ | ------------ | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'recommend'; const time = ctx.req.param('time') ?? '5'; const sort = ctx.req.param('sort') ?? '1'; @@ -54,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '科学网 - 精选博文', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sciencenet/maintainer.ts b/lib/routes/sciencenet/maintainer.ts deleted file mode 100644 index 4636c5f51..000000000 --- a/lib/routes/sciencenet/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog/:type?/:time?/:sort?': ['nczitzk'], - '/user/:id': ['nczitzk'], -}; diff --git a/lib/routes/sciencenet/namespace.ts b/lib/routes/sciencenet/namespace.ts new file mode 100644 index 000000000..2c785b6be --- /dev/null +++ b/lib/routes/sciencenet/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '科学网', + url: 'blog.sciencenet.cn', +}; diff --git a/lib/routes/sciencenet/radar.ts b/lib/routes/sciencenet/radar.ts deleted file mode 100644 index 34ad3e3cc..000000000 --- a/lib/routes/sciencenet/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'sciencenet.cn': { - _name: '科学网', - blog: [ - { - title: '精选博客', - docs: 'https://docs.rsshub.app/routes/new-media#ke-xue-wang-jing-xuan-bo-ke', - source: ['/blog.php', '/'], - target: (params, url) => `/sciencenet/blog/${new URL(url).searchParams.get('mod')}/${new URL(url).searchParams.get('op')}/${new URL(url).searchParams.get('ord')}`, - }, - { - title: '用户博客', - docs: 'https://docs.rsshub.app/routes/new-media#ke-xue-wang-jing-xuan-bo-ke', - source: ['/u/:id', '/'], - target: '/sciencenet/user/:id', - }, - ], - }, -}; diff --git a/lib/routes/sciencenet/router.ts b/lib/routes/sciencenet/router.ts deleted file mode 100644 index b9a93d117..000000000 --- a/lib/routes/sciencenet/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/blog/:type?/:time?/:sort?', './blog'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/sciencenet/user.ts b/lib/routes/sciencenet/user.ts index 64ca36677..40d50e265 100644 --- a/lib/routes/sciencenet/user.ts +++ b/lib/routes/sciencenet/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import iconv from 'iconv-lite'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['new-media'], + example: '/sciencenet/user/tony8310', + parameters: { id: '用户 id,可在对用户博客页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['blog.sciencenet.cn/u/:id', 'blog.sciencenet.cn/'], + }, + name: '用户博客', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://blog.sciencenet.cn'; @@ -58,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `科学网 - ${items[0].author}的博文`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/scmp/coronavirus.ts b/lib/routes/scmp/coronavirus.ts index 91452f7f4..7745656b4 100644 --- a/lib/routes/scmp/coronavirus.ts +++ b/lib/routes/scmp/coronavirus.ts @@ -1,3 +1,22 @@ -export default (ctx) => { - ctx.redirect('/scmp/topics/coronavirus-pandemic-all-stories'); +import { Route } from '@/types'; +export const route: Route = { + path: '/coronavirus', + categories: ['other'], + example: '/scmp/coronavirus', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'South China Morning Post - China coronavirus outbreak', + maintainers: ['DIYgod'], + handler, }; + +function handler(ctx) { + ctx.redirect('/scmp/topics/coronavirus-pandemic-all-stories'); +} diff --git a/lib/routes/scmp/index.ts b/lib/routes/scmp/index.ts index cb50e24da..8d9c72f07 100644 --- a/lib/routes/scmp/index.ts +++ b/lib/routes/scmp/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:category_id', + categories: ['traditional-media'], + example: '/scmp/3', + parameters: { category_id: 'Category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scmp.com/rss/:category_id/feed'], + }, + name: 'News', + maintainers: ['proletarius101'], + handler, + description: `See the [official RSS page](https://www.scmp.com/rss) to get the ID of each category. This route provides fulltext that the offical feed doesn't.`, +}; + +async function handler(ctx) { const categoryId = ctx.req.param('category_id'); const rssUrl = `https://www.scmp.com/rss/${categoryId}/feed`; const { data: response } = await got(rssUrl); @@ -49,7 +72,7 @@ export default async (ctx) => { items, }); - ctx.set('data', { + return { title: $('channel > title').text(), link: $('channel > link').text(), description: $('channel > description').text(), @@ -58,5 +81,5 @@ export default async (ctx) => { icon: 'https://assets.i-scmp.com/static/img/icons/scmp-icon-256x256.png', logo: 'https://customerservice.scmp.com/img/logo_scmp@2x.png', image: $('channel > image > url').text(), - }); -}; + }; +} diff --git a/lib/routes/scmp/maintainer.ts b/lib/routes/scmp/maintainer.ts deleted file mode 100644 index 03d3c8444..000000000 --- a/lib/routes/scmp/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/:category_id': ['proletarius101'], - '/topics/:topic': ['TonyRL'], - '/coronavirus': ['DIYgod'], -}; diff --git a/lib/routes/scmp/namespace.ts b/lib/routes/scmp/namespace.ts new file mode 100644 index 000000000..be4d0f4ad --- /dev/null +++ b/lib/routes/scmp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Corona Virus Disease 2019', + url: 'scmp.com', +}; diff --git a/lib/routes/scmp/radar.ts b/lib/routes/scmp/radar.ts deleted file mode 100644 index 479d3714e..000000000 --- a/lib/routes/scmp/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'scmp.com': { - _name: 'South China Morning Post', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media#south-china-morning-post', - source: ['/rss/:category_id/feed'], - target: '/scmp/:category_id', - }, - { - title: 'Topics', - docs: 'https://docs.rsshub.app/routes/traditional-media#south-china-morning-post', - source: ['/topics/:topic'], - target: '/scmp/topics/:topic', - }, - ], - }, -}; diff --git a/lib/routes/scmp/router.ts b/lib/routes/scmp/router.ts deleted file mode 100644 index 8dce8942f..000000000 --- a/lib/routes/scmp/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/coronavirus', './coronavirus'); - router.get('/:category_id', './index'); - router.get('/topics/:topic', './topic'); -}; diff --git a/lib/routes/scmp/topic.ts b/lib/routes/scmp/topic.ts index 4b4207924..55992aba3 100644 --- a/lib/routes/scmp/topic.ts +++ b/lib/routes/scmp/topic.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/topics/:topic', + categories: ['traditional-media'], + example: '/scmp/topics/coronavirus-pandemic-all-stories', + parameters: { topic: 'Topic, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scmp.com/topics/:topic'], + }, + name: 'Topics', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic'); const limit = Number.parseInt(ctx.req.query('limit'), 10) || 30; const pageUrl = `https://www.scmp.com/topics/${topic}`; @@ -54,7 +76,7 @@ export default async (ctx) => { apiResponse, }); - ctx.set('data', { + return { title: topicData.name, link: pageUrl, description: topicData.description.text, @@ -63,5 +85,5 @@ export default async (ctx) => { icon: 'https://assets.i-scmp.com/static/img/icons/scmp-icon-256x256.png', logo: 'https://customerservice.scmp.com/img/logo_scmp@2x.png', image: 'https://assets-v2.i-scmp.com/production/_next/static/media/default-image.d1be8967.png', - }); -}; + }; +} diff --git a/lib/routes/scnu/cs/match.ts b/lib/routes/scnu/cs/match.ts index 16db6bc98..d639f9b21 100644 --- a/lib/routes/scnu/cs/match.ts +++ b/lib/routes/scnu/cs/match.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cs/match', + categories: ['university'], + example: '/scnu/cs/match', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cs.scnu.edu.cn/xueshenggongzuo/chengchangfazhan/kejichuangxin/', 'cs.scnu.edu.cn/'], + }, + name: '计算机学院竞赛通知', + maintainers: ['fengkx'], + handler, + url: 'cs.scnu.edu.cn/xueshenggongzuo/chengchangfazhan/kejichuangxin/', +}; + +async function handler() { const baseUrl = 'http://cs.scnu.edu.cn'; const url = `${baseUrl}/xueshenggongzuo/chengchangfazhan/kejichuangxin/`; const res = await got({ @@ -15,7 +38,7 @@ export default async (ctx) => { const $ = load(res.data); const list = $('.listshow li a'); - ctx.set('data', { + return { title: $('title').text(), link: url, description: '华南师范大学计算机学院 学科竞赛', @@ -32,5 +55,5 @@ export default async (ctx) => { link: item.attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/scnu/jw.ts b/lib/routes/scnu/jw.ts index 7006cd4fa..75fbdf763 100644 --- a/lib/routes/scnu/jw.ts +++ b/lib/routes/scnu/jw.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/jw', + categories: ['university'], + example: '/scnu/jw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jw.scnu.edu.cn/ann/index.html', 'jw.scnu.edu.cn/'], + }, + name: '教务处通知', + maintainers: ['fengkx'], + handler, + url: 'jw.scnu.edu.cn/ann/index.html', +}; + +async function handler() { const baseUrl = 'http://jw.scnu.edu.cn'; const url = `${baseUrl}/ann/index.html`; const res = await got({ @@ -15,7 +38,7 @@ export default async (ctx) => { const $ = load(res.data); const list = $('.notice_01').find('li'); - ctx.set('data', { + return { title: $('title').first().text(), link: url, description: '华南师范大学教务处 - 通知公告', @@ -29,5 +52,5 @@ export default async (ctx) => { link: item.find('a').attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/scnu/library.ts b/lib/routes/scnu/library.ts index e791b8b3a..454d56dc2 100644 --- a/lib/routes/scnu/library.ts +++ b/lib/routes/scnu/library.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/library', + categories: ['university'], + example: '/scnu/library', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['lib.scnu.edu.cn/news/zuixingonggao', 'lib.scnu.edu.cn/'], + }, + name: '图书馆通知', + maintainers: ['fengkx'], + handler, + url: 'lib.scnu.edu.cn/news/zuixingonggao', +}; + +async function handler() { const baseUrl = 'https://lib.scnu.edu.cn'; const url = `${baseUrl}/news/zuixingonggao/`; const res = await got({ @@ -15,7 +38,7 @@ export default async (ctx) => { const $ = load(res.data); const list = $('.article-list').find('li'); - ctx.set('data', { + return { title: $('title').text(), link: url, description: '华南师范大学图书馆 - 通知公告', @@ -29,5 +52,5 @@ export default async (ctx) => { link: item.find('a').attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/scnu/maintainer.ts b/lib/routes/scnu/maintainer.ts deleted file mode 100644 index 6562c1d0e..000000000 --- a/lib/routes/scnu/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/cs/match': ['fengkx'], - '/jw': ['fengkx'], - '/library': ['fengkx'], - '/physics-school-announcements': ['Shinonome28'], - '/physics-school-news': ['Shinonome28'], - '/physics-school-research-news': ['Shinonome28'], - '/ss': ['shengmaosu'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/scnu/namespace.ts b/lib/routes/scnu/namespace.ts new file mode 100644 index 000000000..d6cbfa5fb --- /dev/null +++ b/lib/routes/scnu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华南师范大学', + url: 'cs.scnu.edu.cn', +}; diff --git a/lib/routes/scnu/physics-school-announcements-and-news.ts b/lib/routes/scnu/physics-school-announcements-and-news.ts index 082ff971b..47e0f7ffa 100644 --- a/lib/routes/scnu/physics-school-announcements-and-news.ts +++ b/lib/routes/scnu/physics-school-announcements-and-news.ts @@ -44,7 +44,7 @@ const getItemsFromURLs = async (URLs, cache) => { return items; }; -export const announcementsRouter = async (ctx) => { +export const announcementsRouter = async () => { const URLs = { 党政: 'https://physics.scnu.edu.cn/NEWS/Notices/PartyAndGovernment/', 教务: 'https://physics.scnu.edu.cn/NEWS/Notices/Education/', @@ -54,14 +54,14 @@ export const announcementsRouter = async (ctx) => { 学工: 'https://physics.scnu.edu.cn/NEWS/Notices/Students/', }; const items = await getItemsFromURLs(URLs, cache); - ctx.set('data', { + return { title: '华南师范大学物理与电信工程学院通知', link: 'https://physics.scnu.edu.cn/NEWS/Notices/', item: items, - }); + }; }; -export const newsRouter = async (ctx) => { +export const newsRouter = async () => { const URLs = { 学院新闻: 'https://physics.scnu.edu.cn/NEWS/News/College/', 教务新闻: 'https://physics.scnu.edu.cn/NEWS/News/Education/', @@ -70,14 +70,14 @@ export const newsRouter = async (ctx) => { 院友新闻: 'https://physics.scnu.edu.cn/NEWS/News/People/', }; const items = await getItemsFromURLs(URLs, cache); - ctx.set('data', { + return { title: '华南师范大学物理与电信工程学院新闻动态', link: 'https://physics.scnu.edu.cn/NEWS/News/', item: items, - }); + }; }; -export const researchNewsRouter = async (ctx) => { +export const researchNewsRouter = async () => { const URLs = { 学术报告: 'https://physics.scnu.edu.cn/RESEARCH/EVENTS/Seminars/', 学术会议: 'https://physics.scnu.edu.cn/RESEARCH/EVENTS/Conferences/', @@ -87,9 +87,9 @@ export const researchNewsRouter = async (ctx) => { 科研成果: 'https://physics.scnu.edu.cn/RESEARCH/Achievements/', }; const items = await getItemsFromURLs(URLs, cache); - ctx.set('data', { + return { title: '华南师范大学物理与电信工程学院科学研究动态', link: 'https://physics.scnu.edu.cn/RESEARCH/', item: items, - }); + }; }; diff --git a/lib/routes/scnu/radar.ts b/lib/routes/scnu/radar.ts deleted file mode 100644 index fb3a443c0..000000000 --- a/lib/routes/scnu/radar.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default { - 'scnu.edu.cn': { - _name: '华南师范大学', - cs: [ - { - title: '计算机学院竞赛通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/xueshenggongzuo/chengchangfazhan/kejichuangxin/', '/'], - target: '/scnu/cs/match', - }, - ], - jw: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/ann/index.html', '/'], - target: '/scnu/jw', - }, - ], - lib: [ - { - title: '图书馆通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/news/zuixingonggao', '/'], - target: '/scnu/library', - }, - ], - physics: [ - { - title: '物理与电信工程学院通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/NEWS/Notices/'], - target: '/scnu/physics-school-announcements', - }, - { - title: '物理与电信工程学院新闻动态', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/NEWS/News/'], - target: '/scnu/physics-school-news', - }, - { - title: '物理与电信工程学院科学研究动态', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/RESEARCH/'], - target: '/scnu/physics-school-research-news', - }, - ], - ss: [ - { - title: '软件学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/tongzhigonggao', '/'], - target: '/scnu/ss', - }, - ], - yz: [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-shi-fan-da-xue', - source: ['/tongzhigonggao/ssgg', '/'], - target: '/scnu/yjs', - }, - ], - }, -}; diff --git a/lib/routes/scnu/router.ts b/lib/routes/scnu/router.ts deleted file mode 100644 index 89f786e65..000000000 --- a/lib/routes/scnu/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/cs/match', './cs/match'); - router.get('/jw', './jw'); - router.get('/library', './library'); - router.get('/physics-school-announcements', './announcements-router'); - router.get('/physics-school-news', './news-router'); - router.get('/physics-school-research-news', './research-news-router'); - router.get('/ss', './ss'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/scnu/ss.ts b/lib/routes/scnu/ss.ts index ed09f72d1..8b819a696 100644 --- a/lib/routes/scnu/ss.ts +++ b/lib/routes/scnu/ss.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ss', + categories: ['university'], + example: '/scnu/ss', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ss.scnu.edu.cn/tongzhigonggao', 'ss.scnu.edu.cn/'], + }, + name: '软件学院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'ss.scnu.edu.cn/tongzhigonggao', +}; + +async function handler() { const link = 'http://ss.scnu.edu.cn/tongzhigonggao/'; const response = await got(link); const $ = load(response.data); const list = $('.listshow li a'); - ctx.set('data', { + return { title: '华南师范大学软件学院', link, item: @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('.time').text()), }; }), - }); -}; + }; +} diff --git a/lib/routes/scnu/yjs.ts b/lib/routes/scnu/yjs.ts index 3122134d4..65f19c1e0 100644 --- a/lib/routes/scnu/yjs.ts +++ b/lib/routes/scnu/yjs.ts @@ -1,13 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/scnu/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.scnu.edu.cn/tongzhigonggao/ssgg', 'yz.scnu.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'yz.scnu.edu.cn/tongzhigonggao/ssgg', +}; + +async function handler() { const link = 'https://yz.scnu.edu.cn/tongzhigonggao/ssgg/'; const response = await got(link); const $ = load(response.data); const list = $('.listmod div a'); - ctx.set('data', { + return { title: '华南师范大学研究生院', link, description: '华南师范大学研究生院通知公告', @@ -20,5 +43,5 @@ export default async (ctx) => { link: item.attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/sctv/maintainer.ts b/lib/routes/sctv/maintainer.ts deleted file mode 100644 index f1d0b9a7d..000000000 --- a/lib/routes/sctv/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/programme/:id?/:limit?/:isFull?': ['nczitzk'], -}; diff --git a/lib/routes/sctv/namespace.ts b/lib/routes/sctv/namespace.ts new file mode 100644 index 000000000..52e9a6ec5 --- /dev/null +++ b/lib/routes/sctv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四川广播电视台', + url: 'sctv.com', +}; diff --git a/lib/routes/sctv/programme.ts b/lib/routes/sctv/programme.ts index 2e3a0a93b..b9b5b2ff7 100644 --- a/lib/routes/sctv/programme.ts +++ b/lib/routes/sctv/programme.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,78 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/programme/:id?/:limit?/:isFull?', + categories: ['traditional-media'], + example: '/sctv/programme/1', + parameters: { id: '节目 id,可在对应节目页中找到,默认为 `1`,即四川新闻联播', limit: '期数,默认为 15,即单次获取最新 15 期', isFull: '是否仅获取完整视频,填写 true/yes 表示是、false/no 表示否,默认是' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '电视回放', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 参数 **是否仅获取完整视频** 设置为 \`true\` \`yes\` \`t\` \`y\` 等值后,路由仅返回当期节目的完整视频,而不会返回节目所提供的节选视频。 + + 查看更多电视节目请前往 [电视回放](https://www.sctv.com/column/list) + ::: + + | 节目 | id | + | ---------------------- | ------- | + | 四川新闻联播 | 1 | + | 早安四川 | 2 | + | 今日视点 | 3 | + | 龙门阵摆四川 | 10523 | + | 非常话题 | 1014756 | + | 新闻现场 | 8385 | + | 黄金三十分 | 8386 | + | 全媒直播间 | 8434 | + | 晚报十点半 | 8435 | + | 现场快报 | 8436 | + | 四川乡村新闻 | 3673 | + | 四川文旅报道 | 8174 | + | 乡村会客厅 | 3674 | + | 金字招牌 | 3675 | + | 问您所 “?” | 3677 | + | 蜀你最能 | 3679 | + | 美丽乡村印象 | 3678 | + | 美丽乡村 | 3676 | + | 乡村大篷车 | 3680 | + | 华西论健 | 3681 | + | 乡村聚乐部 | 3682 | + | 医保近距离 | 6403 | + | 音你而来 | 7263 | + | 吃八方 | 7343 | + | 世界那么大 | 7344 | + | 风云川商 | 7345 | + | 麻辣烫 | 7346 | + | 财经快报 | 7473 | + | 医生来了 | 7873 | + | 安逸的旅途 | 8383 | + | 运动 + | 8433 | + | 好戏连台 | 9733 | + | 防癌大讲堂 | 1018673 | + | 消费新观察 | 1017153 | + | 天天耍大牌 | 1014753 | + | 廉洁四川 | 1014754 | + | 看世界 | 1014755 | + | 金熊猫说教育(资讯版) | 1014757 | + | 她说 | 1014759 | + | 嗨宝贝 | 1014762 | + | 萌眼看世界 | 1014764 | + | 乡村大讲堂 | 1014765 | + | 四川党建 | 1014766 | + | 健康四川 | 1014767 | + | 技能四川 | 12023 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1'; const limit = ctx.req.param('limit') ? Number.parseInt(ctx.req.param('limit')) : 15; const isFull = /t|y/i.test(ctx.req.param('isFull') ?? 'true'); @@ -75,10 +147,10 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: `四川广播电视台 - ${name}`, link: currentUrl, item: items.slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100), image: cover, - }); -}; + }; +} diff --git a/lib/routes/sctv/radar.ts b/lib/routes/sctv/radar.ts deleted file mode 100644 index 7adc6eb71..000000000 --- a/lib/routes/sctv/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sctv.com': { - _name: '四川广播电视台', - '.': [ - { - title: '电视回放', - docs: 'https://docs.rsshub.app/routes/traditional-media#si-chuan-guang-bo-dian-shi-tai-dian-shi-hui-fang', - source: ['/column/list', '/column/detail', '/'], - target: (params, url) => `/sctv/programme/${new URL(url).searchParams.get('programmeId')}`, - }, - ], - }, -}; diff --git a/lib/routes/sctv/router.ts b/lib/routes/sctv/router.ts deleted file mode 100644 index f725a95de..000000000 --- a/lib/routes/sctv/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/programme/:id?/:limit?/:isFull?', './programme'); -}; diff --git a/lib/routes/scut/jwc/news.ts b/lib/routes/scut/jwc/news.ts index 9d25af9f5..2643f2163 100644 --- a/lib/routes/scut/jwc/news.ts +++ b/lib/routes/scut/jwc/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; @@ -46,7 +47,25 @@ const generateArticleLink = (id) => `<p>链接:<a href="${getArticleUrlById(id const generateArticleFullText = (data) => generateBannerImgHtml(data.bannerUrl) + resolveRelativeUrl(data.content) + generateArticleLink(data.id); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/news', + categories: ['university'], + example: '/scut/jwc/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处新闻动态', + maintainers: ['imkero'], + handler, +}; + +async function handler() { const qs = querystring.stringify({ pageNo: 1, pageSize: 20, @@ -104,9 +123,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '华南理工大学教务处新闻动态', link: listPageUrl, item: out, - }); -}; + }; +} diff --git a/lib/routes/scut/jwc/notice.ts b/lib/routes/scut/jwc/notice.ts index c91c39a30..3be1efc2d 100644 --- a/lib/routes/scut/jwc/notice.ts +++ b/lib/routes/scut/jwc/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; @@ -54,7 +55,28 @@ const generateArticleLink = (id) => `<p>链接:<a href="${getArticleUrlById(id const generateArticleFullText = (data) => resolveRelativeUrl(data.content) + generateArticleLink(data.id); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/notice/:category?', + categories: ['university'], + example: '/scut/jwc/notice/all', + parameters: { category: '通知分类,默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处通知公告', + maintainers: ['imkero'], + handler, + description: `| 全部 | 选课 | 考试 | 实践 | 交流 | 教师 | 信息 | + | ---- | ------ | ---- | -------- | ------------- | ------- | ---- | + | all | course | exam | practice | communication | teacher | info |`, +}; + +async function handler(ctx) { const categoryName = ctx.req.param('category') || 'all'; const categoryMeta = categoryMap[categoryName]; @@ -116,9 +138,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '华南理工大学教务处通知公告 - ' + categoryMeta.title, link: listPageUrl, item: out, - }); -}; + }; +} diff --git a/lib/routes/scut/jwc/school.ts b/lib/routes/scut/jwc/school.ts index dbf79de21..3fc24a533 100644 --- a/lib/routes/scut/jwc/school.ts +++ b/lib/routes/scut/jwc/school.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; @@ -51,7 +52,28 @@ const generateArticleLink = (id) => `<p>链接:<a href="${getArticleUrlById(id const generateArticleFullText = (data) => resolveRelativeUrl(data.content) + generateArticleLink(data.id); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/school/:category?', + categories: ['university'], + example: '/scut/jwc/school/all', + parameters: { category: '通知分类,默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处学院通知', + maintainers: ['imkero', 'Rongronggg9'], + handler, + description: `| 全部 | 选课 | 考试 | 信息 | + | ---- | ------ | ---- | ---- | + | all | course | exam | info |`, +}; + +async function handler(ctx) { const categoryName = ctx.req.param('category') || 'all'; const categoryMeta = categoryMap[categoryName]; @@ -114,9 +136,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '华南理工大学教务处学院通知 - ' + categoryMeta.title, link: listPageUrl, item: out, - }); -}; + }; +} diff --git a/lib/routes/scut/maintainer.ts b/lib/routes/scut/maintainer.ts deleted file mode 100644 index 0bf681b5c..000000000 --- a/lib/routes/scut/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/jwc/news': ['imkero'], - '/jwc/notice/:category?': ['imkero'], - '/jwc/school/:category?': ['imkero', 'Rongronggg9'], - '/scet/notice': ['railzy'], - '/seie/news_center': ['auto-bot-ty'], - '/smae/:category?': ['Ermaotie'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/scut/namespace.ts b/lib/routes/scut/namespace.ts new file mode 100644 index 000000000..1c22a9858 --- /dev/null +++ b/lib/routes/scut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华南理工大学', + url: 'jw.scut.edu.cn', +}; diff --git a/lib/routes/scut/radar.ts b/lib/routes/scut/radar.ts deleted file mode 100644 index a4bb459a8..000000000 --- a/lib/routes/scut/radar.ts +++ /dev/null @@ -1,67 +0,0 @@ -export default { - 'scut.edu.cn': { - _name: '华南理工大学', - jw: [ - { - title: '教务处通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - }, - { - title: '教务处学院通知', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - }, - { - title: '教务处新闻动态', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - }, - ], - www2: [ - { - title: '电子与信息学院 - 新闻速递', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - source: ['/ee/16285/list.htm'], - target: '/scut/seie/news_center', - }, - { - title: '机械与汽车工程学院 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - source: ['/smae/:category/list.htm'], - target: (params) => { - let tid; - switch (params.category) { - case '20616': - tid = 'gwxx'; - break; - case '20617': - tid = 'djgz'; - break; - case '20622': - tid = 'rsgz'; - break; - case 'xsgz': - tid = 'xsgz'; - break; - case '20618': - tid = 'kysys'; - break; - case '20619': - tid = 'bksjw'; - break; - case '20620': - tid = 'yjsjw'; - break; - default: - return false; - } - return `/scut/smae/${tid}`; - }, - }, - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#hua-nan-li-gong-da-xue', - source: ['/graduate/14562/list.htm'], - target: '/scut/yjs', - }, - ], - }, -}; diff --git a/lib/routes/scut/router.ts b/lib/routes/scut/router.ts deleted file mode 100644 index c1da89677..000000000 --- a/lib/routes/scut/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/jwc/news', './jwc/news'); - router.get('/jwc/notice/:category?', './jwc/notice'); - router.get('/jwc/school/:category?', './jwc/school'); - router.get('/scet/notice', './scet/notice'); - router.get('/seie/news_center', './seie/news-ccenter'); - router.get('/smae/:category?', './smae/notice'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/scut/scet/notice.ts b/lib/routes/scut/scet/notice.ts index e84425e6b..ddbacbaca 100644 --- a/lib/routes/scut/scet/notice.ts +++ b/lib/routes/scut/scet/notice.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/scet/notice', + categories: ['university'], + example: '/scut/scet/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '土木与交通学院 - 学工通知', + maintainers: ['railzy'], + handler, +}; + +async function handler() { const link = 'https://www2.scut.edu.cn/jtxs/24241/list.htm'; const response = await got({ method: 'get', @@ -13,7 +32,7 @@ export default async (ctx) => { const $ = load(data); const list = $('#wp_news_w5 li'); - ctx.set('data', { + return { title: '华南理工大学土木与交通学院 - 学工通知', link, item: @@ -27,5 +46,5 @@ export default async (ctx) => { pubDate: item.find('.Article_PublishDate').text(), }; }), - }); -}; + }; +} diff --git a/lib/routes/scut/seie/news-ccenter.ts b/lib/routes/scut/seie/news-ccenter.ts index c456f9d65..4148ad8ee 100644 --- a/lib/routes/scut/seie/news-ccenter.ts +++ b/lib/routes/scut/seie/news-ccenter.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/seie/news_center', + categories: ['university'], + example: '/scut/seie/news_center', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www2.scut.edu.cn/ee/16285/list.htm'], + }, + name: '电子与信息学院 - 新闻速递', + maintainers: ['auto-bot-ty'], + handler, + url: 'www2.scut.edu.cn/ee/16285/list.htm', + description: `:::warning +由于学院官网对非大陆 IP 的访问存在限制,需自行部署。 +:::`, +}; + +async function handler() { const rootUrl = 'https://www2.scut.edu.cn'; const url = `${rootUrl}/ee/16285/list.htm`; const response = await got(url); @@ -45,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '华南理工大学电子与信息学院 - 新闻速递', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/scut/smae/notice.ts b/lib/routes/scut/smae/notice.ts index 187dd1f5d..e534261cc 100644 --- a/lib/routes/scut/smae/notice.ts +++ b/lib/routes/scut/smae/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; @@ -14,7 +15,28 @@ const categoryMap = { yjsjw: { title: '研究生教务', tag: '20620' }, }; -export default async (ctx) => { +export const route: Route = { + path: '/smae/:category?', + categories: ['university'], + example: '/scut/smae/yjsjw', + parameters: { category: '通知分类,默认为 `yjsjw`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '机械与汽车工程学院 - 通知公告', + maintainers: ['Ermaotie'], + handler, + description: `| 公务信息 | 党建工作 | 人事工作 | 学生工作 | 科研实验室 | 本科生教务 | 研究生教务 | + | -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- | + | gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw |`, +}; + +async function handler(ctx) { const baseUrl = 'http://www2.scut.edu.cn'; const categoryName = ctx.req.param('category') || 'yjsjw'; @@ -47,9 +69,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: `华南理工大学机械与汽车工程学院 - ${categoryMeta.title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/scut/yjs.ts b/lib/routes/scut/yjs.ts index e6d415d77..12b2c36ee 100644 --- a/lib/routes/scut/yjs.ts +++ b/lib/routes/scut/yjs.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/scut/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www2.scut.edu.cn/graduate/14562/list.htm'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'www2.scut.edu.cn/graduate/14562/list.htm', +}; + +async function handler() { const baseUrl = 'https://www2.scut.edu.cn'; const link = `${baseUrl}/graduate/14562/list.htm`; const response = await got(link); const $ = load(response.data); const list = $('#wp_news_w4 a'); - ctx.set('data', { + return { title: '华南理工大学研究生院', link, description: '华南理工大学研究生院通知公告', @@ -26,5 +49,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text()), }; }), - }); -}; + }; +} diff --git a/lib/routes/scvtc/maintainer.ts b/lib/routes/scvtc/maintainer.ts deleted file mode 100644 index 8a79a23f8..000000000 --- a/lib/routes/scvtc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/xygg': ['nczitzk'], -}; diff --git a/lib/routes/scvtc/namespace.ts b/lib/routes/scvtc/namespace.ts new file mode 100644 index 000000000..b9deea444 --- /dev/null +++ b/lib/routes/scvtc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四川职业技术学院', + url: 'scvtc.edu.cn', +}; diff --git a/lib/routes/scvtc/radar.ts b/lib/routes/scvtc/radar.ts deleted file mode 100644 index 69a7b1e43..000000000 --- a/lib/routes/scvtc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'scvtc.edu.cn': { - _name: '四川职业技术学院', - '.': [ - { - title: '学院公告', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-zhi-ye-ji-shu-xue-yuan', - source: ['/ggfw1/xygg.htm', '/'], - target: '/scvtc/xygg', - }, - ], - }, -}; diff --git a/lib/routes/scvtc/router.ts b/lib/routes/scvtc/router.ts deleted file mode 100644 index 510f9a8f5..000000000 --- a/lib/routes/scvtc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/xygg', './xygg'); -}; diff --git a/lib/routes/scvtc/xygg.ts b/lib/routes/scvtc/xygg.ts index bc51e0586..c00c5ee44 100644 --- a/lib/routes/scvtc/xygg.ts +++ b/lib/routes/scvtc/xygg.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xygg', + categories: ['university'], + example: '/scvtc/xygg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scvtc.edu.cn/ggfw1/xygg.htm', 'scvtc.edu.cn/'], + }, + name: '学院公告', + maintainers: ['nczitzk'], + handler, + url: 'scvtc.edu.cn/ggfw1/xygg.htm', +}; + +async function handler() { const currentUrl = 'https://www.scvtc.edu.cn/ggfw1/xygg.htm'; const response = await got(currentUrl); const $ = load(response.data); @@ -32,10 +55,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), decription: $('meta[name=description]').attr('content'), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sdu/cmse.ts b/lib/routes/sdu/cmse.ts index b035d8438..6cdc04292 100644 --- a/lib/routes/sdu/cmse.ts +++ b/lib/routes/sdu/cmse.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,28 @@ const host = 'http://www.cmse.sdu.edu.cn/'; const typelist = ['通知公告', '学院新闻', '本科生教育', '研究生教育', '学术动态']; const urlList = ['zxzx/tzgg.htm', 'zxzx/xyxw.htm', 'zxzx/bksjy.htm', 'zxzx/yjsjy.htm', 'zxzx/xsdt.htm']; -export default async (ctx) => { +export const route: Route = { + path: '/cmse/:type?', + categories: ['university'], + example: '/sdu/cmse/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '材料科学与工程学院通知', + maintainers: ['Ji4n1ng'], + handler, + description: `| 通知公告 | 学院新闻 | 本科生教育 | 研究生教育 | 学术动态 | + | -------- | -------- | ---------- | ---------- | -------- | + | 0 | 1 | 2 | 3 | 4 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const link = new URL(urlList[type], host).href; const response = await got(link); @@ -51,10 +73,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `山东大学材料科学与工程学院${typelist[type]}`, description: $('title').text(), link, item, - }); -}; + }; +} diff --git a/lib/routes/sdu/cs.ts b/lib/routes/sdu/cs.ts index 2cf44c0e9..daa6671f5 100644 --- a/lib/routes/sdu/cs.ts +++ b/lib/routes/sdu/cs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,28 @@ const host = 'https://www.cs.sdu.edu.cn/'; const typelist = ['学院公告', '学术报告', '科技简讯']; const urlList = ['xygg.htm', 'xsbg.htm', 'kjjx.htm']; -export default async (ctx) => { +export const route: Route = { + path: '/cs/:type?', + categories: ['university'], + example: '/sdu/cs/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机科学与技术学院通知', + maintainers: ['Ji4n1ng'], + handler, + description: `| 学院公告 | 学术报告 | 科技简讯 | + | -------- | -------- | -------- | + | 0 | 1 | 2 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const link = new URL(urlList[type], host).href; @@ -49,10 +71,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `山东大学计算机科学与技术学院${typelist[type]}通知`, description: $('title').text(), link, item, - }); -}; + }; +} diff --git a/lib/routes/sdu/epe.ts b/lib/routes/sdu/epe.ts index a3adaf37f..82ee1992d 100644 --- a/lib/routes/sdu/epe.ts +++ b/lib/routes/sdu/epe.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,28 @@ const host = 'https://www.epe.sdu.edu.cn/'; const typelist = ['学院动态', '通知公告', '学术论坛']; const urlList = ['zxzx/xydt.htm', 'zxzx/tzgg.htm', 'zxzx/xslt.htm']; -export default async (ctx) => { +export const route: Route = { + path: '/epe/:type?', + categories: ['university'], + example: '/sdu/epe/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '能源与动力工程学院通知', + maintainers: ['Ji4n1ng'], + handler, + description: `| 学院动态 | 通知公告 | 学术论坛 | + | -------- | -------- | -------- | + | 0 | 1 | 2 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const link = new URL(urlList[type], host).href; const response = await got(link); @@ -47,10 +69,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `山东大学能源与动力工程学院${typelist[type]}`, description: $('title').text(), link, item, - }); -}; + }; +} diff --git a/lib/routes/sdu/maintainer.ts b/lib/routes/sdu/maintainer.ts deleted file mode 100644 index 98abfa0b1..000000000 --- a/lib/routes/sdu/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/cmse/:type?': ['Ji4n1ng'], - '/cs/:type?': ['Ji4n1ng'], - '/epe/:type?': ['Ji4n1ng'], - '/mech/:type?': ['Ji4n1ng'], - '/sc/:type?': ['Ji4n1ng'], - '/wh/news/:column?': ['kxxt'], - '/wh/jwc/:column?': ['kxxt'], -}; diff --git a/lib/routes/sdu/mech.ts b/lib/routes/sdu/mech.ts index 74031ec68..02b37de81 100644 --- a/lib/routes/sdu/mech.ts +++ b/lib/routes/sdu/mech.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,28 @@ const typelist = ['通知公告', '院所新闻', '教学信息', '学术动态' const urlList = ['xwdt/tzgg.htm', 'xwdt/ysxw.htm', 'xwdt/jxxx.htm', 'xwdt/xsdt.htm', 'xwdt/xyjb.htm']; const host = 'https://www.mech.sdu.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/mech/:type?', + categories: ['university'], + example: '/sdu/mech/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '机械工程学院通知', + maintainers: ['Ji4n1ng'], + handler, + description: `| 通知公告 | 院所新闻 | 教学信息 | 学术动态 | 学院简报 | + | -------- | -------- | -------- | -------- | -------- | + | 0 | 1 | 2 | 3 | 4 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const link = new URL(urlList[type], host).href; const response = await got(link); @@ -52,10 +74,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `山东大学机械工程学院${typelist[type]}`, description: $('title').text(), link, item, - }); -}; + }; +} diff --git a/lib/routes/sdu/namespace.ts b/lib/routes/sdu/namespace.ts new file mode 100644 index 000000000..2b52456a9 --- /dev/null +++ b/lib/routes/sdu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '山东大学(威海)', + url: 'xinwen.wh.sdu.edu.cn', +}; diff --git a/lib/routes/sdu/radar.ts b/lib/routes/sdu/radar.ts deleted file mode 100644 index 196c6d249..000000000 --- a/lib/routes/sdu/radar.ts +++ /dev/null @@ -1,159 +0,0 @@ -import data from './data'; - -export default { - 'sdu.edu.cn': { - _name: '山东大学', - 'xinwen.wh': Object.entries(data.wh.news.columns).map(([, value]) => ({ - title: data.wh.news.titlePrefix + value.name, - docs: data.wh.news.docs, - source: data.wh.news.source, - target: '/sdu/wh' + data.wh.news.getTarget(value.url), - })), - 'jwc.wh': Object.entries(data.wh.jwc.columns).map(([, value]) => ({ - title: data.wh.jwc.titlePrefix + value.name, - docs: data.wh.jwc.docs, - source: data.wh.jwc.source, - target: '/sdu/wh' + data.wh.jwc.getTarget(value.url), - })), - 'www.cmse': [ - { - title: '材料科学与工程学院通知', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'zxzx/tzgg.htm': - type = '0'; - break; - case 'zxzx/xyxw.htm': - type = '1'; - break; - case 'zxzx/bksjy.htm': - type = '2'; - break; - case 'zxzx/yjsjy.htm': - type = '3'; - break; - case 'zxzx/xsdt.htm': - type = '4'; - break; - default: - type = '0'; - break; - } - return `/sdu/cmse/${type}`; - }, - }, - ], - 'www.cs': [ - { - title: '计算机科学与技术学院通知', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'xygg.htm': - type = '0'; - break; - case 'xsbg.htm': - type = '1'; - break; - case 'kjjx.htm': - type = '2'; - break; - default: - type = '0'; - break; - } - return `/sdu/cs/${type}`; - }, - }, - ], - 'www.epe': [ - { - title: '能源与动力工程学院通知', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'zxzx/xydt.htm': - type = '0'; - break; - case 'zxzx/tzgg.htm': - type = '1'; - break; - case 'zxzx/xslt.htm': - type = '2'; - break; - default: - type = '0'; - break; - } - return `/sdu/epe/${type}`; - }, - }, - ], - 'www.mech': [ - { - title: '机械工程学院通知', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'xwdt/tzgg.htm': - type = '0'; - break; - case 'xwdt/ysxw.htm': - type = '1'; - break; - case 'xwdt/jxxx.htm': - type = '2'; - break; - case 'xwdt/xsdt.htm': - type = '3'; - break; - case 'xwdt/xyjb.htm': - type = '4'; - break; - default: - type = '0'; - break; - } - return `/sdu/mech/${type}`; - }, - }, - ], - 'www.sc': [ - { - title: '软件学院通知', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'tzgg.htm': - type = '0'; - break; - case 'kxyj/xsyg.htm': - type = '1'; - break; - case 'rcpy/bkjy.htm': - type = '2'; - break; - case 'rcpy/yjsjy.htm': - type = '3'; - break; - default: - type = '0'; - break; - } - return `/sdu/sc/${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/sdu/router.ts b/lib/routes/sdu/router.ts deleted file mode 100644 index 1f96b172f..000000000 --- a/lib/routes/sdu/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/cmse/:type?', './cmse'); - router.get('/cs/:type?', './cs'); - router.get('/epe/:type?', './epe'); - router.get('/mech/:type?', './mech'); - router.get('/sc/:type?', './sc'); - router.get('/wh/news/:column?', './wh/news'); - router.get('/wh/jwc/:column?', './wh/jwc'); -}; diff --git a/lib/routes/sdu/sc.ts b/lib/routes/sdu/sc.ts index 5633b676f..98ed037dd 100644 --- a/lib/routes/sdu/sc.ts +++ b/lib/routes/sdu/sc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,28 @@ const host = 'https://www.sc.sdu.edu.cn/'; const typelist = ['通知公告', '学术动态', '本科教育', '研究生教育']; const urlList = ['tzgg.htm', 'kxyj/xsyg.htm', 'rcpy/bkjy.htm', 'rcpy/yjsjy.htm']; -export default async (ctx) => { +export const route: Route = { + path: '/sc/:type?', + categories: ['university'], + example: '/sdu/sc/0', + parameters: { type: '默认为 `0`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '软件学院通知', + maintainers: ['Ji4n1ng'], + handler, + description: `| 通知公告 | 学术动态 | 本科教育 | 研究生教育 | + | -------- | -------- | -------- | ---------- | + | 0 | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ? Number.parseInt(ctx.req.param('type')) : 0; const link = new URL(urlList[type], host).href; const response = await got(link); @@ -53,10 +75,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `山东大学软件学院${typelist[type]}`, description: $('title').text(), link, item, - }); -}; + }; +} diff --git a/lib/routes/sdu/wh/jwc.ts b/lib/routes/sdu/wh/jwc.ts index 6404486da..645398d70 100644 --- a/lib/routes/sdu/wh/jwc.ts +++ b/lib/routes/sdu/wh/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import extractor from '../extractor'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/wh/jwc/:column?', + categories: ['university'], + example: '/sdu/wh/jwc/gztz', + parameters: { column: '专栏名称,默认为工作通知(`gztz`)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['kxxt'], + handler, + description: `| 规章制度 | 专业建设 | 实践教学 | 支部风采 | 服务指南 | 教务要闻 | 工作通知 | 教务简报 | 常用下载 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz |`, +}; + +async function handler(ctx) { const column = ctx.req.param('column') ?? 'gztz'; const baseUrl = data.wh.jwc.url; const response = await got(baseUrl + data.wh.jwc.columns[column].url); @@ -35,9 +57,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${data.wh.jwc.name} ${data.wh.jwc.columns[column].name}`, link: baseUrl + data.wh.jwc.columns[column].url, item: out, - }); -}; + }; +} diff --git a/lib/routes/sdu/wh/news.ts b/lib/routes/sdu/wh/news.ts index a48509f2e..94e2fe66c 100644 --- a/lib/routes/sdu/wh/news.ts +++ b/lib/routes/sdu/wh/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import data from '../data'; import extractor from '../extractor'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/wh/news/:column?', + categories: ['university'], + example: '/sdu/wh/news/xyyw', + parameters: { column: '专栏名称,默认为校园要闻(`xyyw`)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻网', + maintainers: ['kxxt'], + handler, + description: `| 校园要闻 | 学生动态 | 综合新闻 | 山大视点 | 菁菁校园 | 校园简讯 | 玛珈之窗 | 热点专题 | 媒体视角 | 高教视野 | 理论学习 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx |`, +}; + +async function handler(ctx) { const column = ctx.req.param('column') ?? 'xyyw'; const baseUrl = data.wh.news.url; const response = await got(baseUrl + data.wh.news.columns[column].url); @@ -31,9 +53,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${data.wh.news.name} ${data.wh.news.columns[column].name}`, link: baseUrl + data.wh.news.columns[column].url, item: out, - }); -}; + }; +} diff --git a/lib/routes/sdust/maintainer.ts b/lib/routes/sdust/maintainer.ts deleted file mode 100644 index e2777f666..000000000 --- a/lib/routes/sdust/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/yjsy/zhaosheng/:id?': ['nczitzk'], -}; diff --git a/lib/routes/sdust/namespace.ts b/lib/routes/sdust/namespace.ts new file mode 100644 index 000000000..69786c300 --- /dev/null +++ b/lib/routes/sdust/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '山东科技大学', + url: 'sdust.edu.cn', +}; diff --git a/lib/routes/sdust/radar.ts b/lib/routes/sdust/radar.ts deleted file mode 100644 index daecf3200..000000000 --- a/lib/routes/sdust/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sdust.edu.cn': { - _name: '山东科技大学', - '.': [ - { - title: '研究生招生网', - docs: 'https://docs.rsshub.app/routes/university#shan-dong-ke-ji-da-xue-yan-jiu-sheng-zhao-sheng-wang', - source: ['/zhaosheng', '/'], - target: (params, url) => `/sdust/yjsy/zhaosheng/${new URL(url).href.match(/zhaosheng\/(.*)\.htm/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/sdust/router.ts b/lib/routes/sdust/router.ts deleted file mode 100644 index 4e9550434..000000000 --- a/lib/routes/sdust/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/yjsy/zhaosheng/:id?', './yjsy/zhaosheng'); -}; diff --git a/lib/routes/sdust/yjsy/zhaosheng.ts b/lib/routes/sdust/yjsy/zhaosheng.ts index 4b69d1790..dae4baa99 100644 --- a/lib/routes/sdust/yjsy/zhaosheng.ts +++ b/lib/routes/sdust/yjsy/zhaosheng.ts @@ -1,9 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/zhaosheng/:id?', + categories: ['university'], + example: '/sdust/yjsy/zhaosheng', + parameters: { id: '栏目 id,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生招生网', + maintainers: ['nczitzk'], + handler, + description: `栏目 + + | 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 | + | -------- | -------- | -------- | -------- | -------- | + | zsjz | zyml | wjlq | glgd | zlxz | + + | 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 | + | -------- | -------- | -------- | ---------- | -------- | + | tzgg | bszs | sszs | tms | zsxc |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'tzgg'; const rootUrl = 'https://yjsy.sdust.edu.cn'; @@ -45,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sdzk/index.ts b/lib/routes/sdzk/index.ts index aa07a8841..33f899c4f 100644 --- a/lib/routes/sdzk/index.ts +++ b/lib/routes/sdzk/index.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:bcid?/:cid?', + categories: ['study'], + example: '/sdzk', + parameters: { bcid: '板块 id,可在对应板块页 URL 中找到,默认为 `1`,即信息与政策', cid: '栏目 id,可在对应板块页 URL 中找到,默认为 `16`,即通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 若订阅 [信息与政策](https://www.sdzk.cn/NewsList.aspx?BCID=1),网址为 \`https://www.sdzk.cn/NewsList.aspx?BCID=1\`。截取 \`BCID=1\` 作为参数,此时路由为 [\`/sdzk/1\`](https://rsshub.app/sdzk/1)。 + + 若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1\&CID=16),网址为 \`https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16\`。截取 \`BCID=1\` 与 \`CID=16\` 作为参数,此时路由为 [\`/sdzk/1/16\`](https://rsshub.app/sdzk/1/16)。 + :::`, +}; + +async function handler(ctx) { const bcid = ctx.req.param('bcid') ?? '1'; const cid = ctx.req.param('cid') ?? '16'; @@ -48,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sdzk/maintainer.ts b/lib/routes/sdzk/maintainer.ts deleted file mode 100644 index d06ad9693..000000000 --- a/lib/routes/sdzk/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:bcid?/:cid?': ['nczitzk'], -}; diff --git a/lib/routes/sdzk/namespace.ts b/lib/routes/sdzk/namespace.ts new file mode 100644 index 000000000..4711c53fc --- /dev/null +++ b/lib/routes/sdzk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '山东省教育招生考试院', + url: 'sdzk.cn', +}; diff --git a/lib/routes/sdzk/radar.ts b/lib/routes/sdzk/radar.ts deleted file mode 100644 index a76a37992..000000000 --- a/lib/routes/sdzk/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'sdzk.cn': { - _name: '山东省教育招生考试院', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/study#shan-dong-sheng-jiao-yu-zhao-sheng-kao-shi-yuan-xin-wen', - source: ['/NewsList.aspx', '/'], - target: (params, url) => { - const bcid = new URL(url).searchParams.get('BCID'); - const cid = new URL(url).searchParams.get('CID'); - return `/sdzk${bcid ? `/${bcid}${cid ? `/${cid}` : ''}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/sdzk/router.ts b/lib/routes/sdzk/router.ts deleted file mode 100644 index 72058399c..000000000 --- a/lib/routes/sdzk/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:bcid?/:cid?', './index'); -}; diff --git a/lib/routes/sec-in/index.ts b/lib/routes/sec-in/index.ts index e0aebabba..ad5c680d6 100644 --- a/lib/routes/sec-in/index.ts +++ b/lib/routes/sec-in/index.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + name: 'Unknown', + maintainers: ['p7e4'], + handler, +}; + +async function handler() { const { data } = await got('https://sec-in.com/api/v1/Common/getArticleList?tabs=newest'); const items = data.result.data.map((item) => ({ title: item.article_title, @@ -11,9 +19,9 @@ export default async (ctx) => { author: item.member_info.nickname, category: item.article_tag, })); - ctx.set('data', { + return { title: 'SecIN信息安全技术社区', link: 'https://sec-in.com/', item: items, - }); -}; + }; +} diff --git a/lib/routes/sec-in/maintainer.ts b/lib/routes/sec-in/maintainer.ts deleted file mode 100644 index b41d8c880..000000000 --- a/lib/routes/sec-in/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['p7e4'], -}; diff --git a/lib/routes/sec-in/namespace.ts b/lib/routes/sec-in/namespace.ts new file mode 100644 index 000000000..20ed71678 --- /dev/null +++ b/lib/routes/sec-in/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SecIN 信息安全技术社区', + url: 'sec-in.com', +}; diff --git a/lib/routes/sec-in/radar.ts b/lib/routes/sec-in/radar.ts deleted file mode 100644 index 4e2eebe7e..000000000 --- a/lib/routes/sec-in/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'sec-in.com': { - _name: 'SecIN信息安全技术社区', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/bbs#secin-xin-xi-an-quan-ji-shu-she-qu', - }, - ], - }, -}; diff --git a/lib/routes/sec-in/router.ts b/lib/routes/sec-in/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/sec-in/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/sec-wiki/maintainer.ts b/lib/routes/sec-wiki/maintainer.ts deleted file mode 100644 index 5e06d8254..000000000 --- a/lib/routes/sec-wiki/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/weekly': ['p7e4'], -}; diff --git a/lib/routes/sec-wiki/namespace.ts b/lib/routes/sec-wiki/namespace.ts new file mode 100644 index 000000000..cc30205e3 --- /dev/null +++ b/lib/routes/sec-wiki/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SecWiki - 安全维基', + url: 'www.sec-wiki.com', +}; diff --git a/lib/routes/sec-wiki/radar.ts b/lib/routes/sec-wiki/radar.ts deleted file mode 100644 index 015cc5664..000000000 --- a/lib/routes/sec-wiki/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'sec-wiki.com': { - _name: 'SecWiki-安全维基', - www: [ - { - title: '最新周刊', - docs: 'https://docs.rsshub.app/routes/other#secwiki-an-quan-wei-ji', - }, - ], - }, -}; diff --git a/lib/routes/sec-wiki/router.ts b/lib/routes/sec-wiki/router.ts deleted file mode 100644 index 35ef74c8d..000000000 --- a/lib/routes/sec-wiki/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/weekly', './weekly'); -}; diff --git a/lib/routes/sec-wiki/weekly.ts b/lib/routes/sec-wiki/weekly.ts index 10cf0fb70..4a50ce3fb 100644 --- a/lib/routes/sec-wiki/weekly.ts +++ b/lib/routes/sec-wiki/weekly.ts @@ -1,16 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly', + categories: ['programming'], + example: '/sec-wiki/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新周刊', + maintainers: ['p7e4'], + handler, +}; + +async function handler() { const { data } = await got('https://www.sec-wiki.com/weekly/index'); const items = [...data.matchAll(/\/weekly\/(\d+)">(.+?)<\/a><\/h5>\s*<p>(.+?)<\/p>/g)].map((item) => ({ title: item[2], link: `https://www.sec-wiki.com/weekly/${item[1]}`, description: item[3], })); - ctx.set('data', { + return { title: 'SecWiki-安全维基', link: 'https://www.sec-wiki.com/', item: items, - }); -}; + }; +} diff --git a/lib/routes/sec/radar.ts b/lib/routes/sec/radar.ts deleted file mode 100644 index 1132e3131..000000000 --- a/lib/routes/sec/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sec.today': { - _name: '每日安全', - '.': [ - { - title: '动态', - docs: 'https://docs.rsshub.app/', - source: ['/pulses', '/'], - target: '/rsshub/transform/html/https%3A%2F%2Fsec.today%2Fpulses%2F/item=div[class="card-body"]', - }, - ], - }, -}; diff --git a/lib/routes/secrss/author.ts b/lib/routes/secrss/author.ts index 02744641b..9fefa7d73 100644 --- a/lib/routes/secrss/author.ts +++ b/lib/routes/secrss/author.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:author', + categories: ['programming'], + example: '/secrss/author/网络安全威胁和漏洞信息共享平台', + parameters: { author: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作者', + maintainers: ['XinRoom', 'SunBK201'], + handler, +}; + +async function handler(ctx) { const api = 'https://www.secrss.com/api/articles/group?author='; const author = ctx.req.param('author'); const host = 'https://www.secrss.com'; @@ -28,9 +47,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `安全内参-${author}`, link: 'https://www.secrss.com', item: items, - }); -}; + }; +} diff --git a/lib/routes/secrss/category.ts b/lib/routes/secrss/category.ts index 0b1ccb830..d4d46da67 100644 --- a/lib/routes/secrss/category.ts +++ b/lib/routes/secrss/category.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category?', + categories: ['programming'], + example: '/secrss/category/产业趋势', + parameters: { category: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['XinRoom', 'SunBK201'], + handler, +}; + +async function handler(ctx) { const api = 'https://www.secrss.com/api/articles?tag='; const { category = '' } = ctx.req.param(); const host = 'https://www.secrss.com'; @@ -30,9 +49,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `安全内参-${category}`, link: 'https://www.secrss.com', item: items, - }); -}; + }; +} diff --git a/lib/routes/secrss/maintainer.ts b/lib/routes/secrss/maintainer.ts deleted file mode 100644 index 689c84834..000000000 --- a/lib/routes/secrss/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/author/:author': ['XinRoom', 'SunBK201'], - '/category/:category?': ['XinRoom', 'SunBK201'], -}; diff --git a/lib/routes/secrss/namespace.ts b/lib/routes/secrss/namespace.ts new file mode 100644 index 000000000..11123c82b --- /dev/null +++ b/lib/routes/secrss/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '安全内参', + url: 'secrss.com', +}; diff --git a/lib/routes/secrss/radar.ts b/lib/routes/secrss/radar.ts deleted file mode 100644 index 4ecd41fa4..000000000 --- a/lib/routes/secrss/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'secrss.com': { - _name: '安全内参', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/programming#an-quan-nei-can', - source: ['/articles', '/'], - target: (_, url) => `/secrss/category${new URL(url).searchParams.has('tag') ? `/${new URL(url).searchParams.get('tag')}` : ''}`, - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/programming#an-quan-nei-can', - source: ['/articles', '/'], - target: (_, url) => `/secrss/author${new URL(url).searchParams.get('author')}`, - }, - ], - }, -}; diff --git a/lib/routes/secrss/router.ts b/lib/routes/secrss/router.ts deleted file mode 100644 index 9315f80fe..000000000 --- a/lib/routes/secrss/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/author/:author', './author'); - router.get('/category/:category?', './category'); -}; diff --git a/lib/routes/seekingalpha/index.ts b/lib/routes/seekingalpha/index.ts index a7fa5f76e..28ed0fbed 100644 --- a/lib/routes/seekingalpha/index.ts +++ b/lib/routes/seekingalpha/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,32 @@ import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; const baseUrl = 'https://seekingalpha.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:symbol/:category?', + categories: ['finance'], + example: '/seekingalpha/TSM/transcripts', + parameters: { symbol: 'Stock symbol', category: 'Category, see below, `news` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['seekingalpha.com/symbol/:symbol/:category', 'seekingalpha.com/symbol/:symbol/earnings/:category'], + target: '/:symbol/:category', + }, + name: 'Summary', + maintainers: ['TonyRL'], + handler, + description: `| Analysis | News | Transcripts | Press Releases | Related Analysis | + | -------- | ---- | ----------- | -------------- | ---------------- | + | analysis | news | transcripts | press-releases | related-analysis |`, +}; + +async function handler(ctx) { const { category = 'news', symbol } = ctx.req.param(); const pageUrl = `${baseUrl}/symbol/${symbol.toUpperCase()}/${category === 'transcripts' ? `earnings/${category}` : category}`; @@ -45,7 +71,7 @@ export default async (ctx) => { ) : []; - ctx.set('data', { + return { title: response.data.meta.page.title, description: response.data.meta.page.description, link: pageUrl, @@ -53,5 +79,5 @@ export default async (ctx) => { item: items, allowEmpty: true, language: 'en-US', - }); -}; + }; +} diff --git a/lib/routes/seekingalpha/maintainer.ts b/lib/routes/seekingalpha/maintainer.ts deleted file mode 100644 index 4e175eca2..000000000 --- a/lib/routes/seekingalpha/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:symbol/:category?': ['TonyRL'], -}; diff --git a/lib/routes/seekingalpha/namespace.ts b/lib/routes/seekingalpha/namespace.ts new file mode 100644 index 000000000..4eb4528e6 --- /dev/null +++ b/lib/routes/seekingalpha/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Seeking Alpha', + url: 'seekingalpha.com', +}; diff --git a/lib/routes/seekingalpha/radar.ts b/lib/routes/seekingalpha/radar.ts deleted file mode 100644 index 4b9043c0c..000000000 --- a/lib/routes/seekingalpha/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'seekingalpha.com': { - _name: 'Seeking Alpha', - '.': [ - { - title: 'Summary', - docs: 'https://docs.rsshub.app/routes/finance#seeking-alpha', - source: ['/symbol/:symbol/:category', '/symbol/:symbol/earnings/:category'], - target: '/seekingalpha/:symbol/:category', - }, - ], - }, -}; diff --git a/lib/routes/seekingalpha/router.ts b/lib/routes/seekingalpha/router.ts deleted file mode 100644 index 951f253e8..000000000 --- a/lib/routes/seekingalpha/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:symbol/:category?', './index'); -}; diff --git a/lib/routes/sega/maintainer.ts b/lib/routes/sega/maintainer.ts deleted file mode 100644 index ae0f7d36c..000000000 --- a/lib/routes/sega/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/pjsekai/news': ['15x15G'], -}; diff --git a/lib/routes/sega/namespace.ts b/lib/routes/sega/namespace.ts new file mode 100644 index 000000000..794d05bdb --- /dev/null +++ b/lib/routes/sega/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SEGA', + url: 'pjsekai.sega.jp', +}; diff --git a/lib/routes/sega/pjsekai.ts b/lib/routes/sega/pjsekai.ts index 4b9cd2066..437d1730b 100644 --- a/lib/routes/sega/pjsekai.ts +++ b/lib/routes/sega/pjsekai.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import * as cheerio from 'cheerio'; import timezone from '@/utils/timezone'; import cache from '@/utils/cache'; -export default async (ctx) => { +export const route: Route = { + path: '/pjsekai/news', + categories: ['game'], + example: '/sega/pjsekai/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['pjsekai.sega.jp/news/index.html'], + }, + name: '世界计划 多彩舞台 | ProjectSekai | プロセカ', + maintainers: ['15x15G'], + handler, + url: 'pjsekai.sega.jp/news/index.html', +}; + +async function handler() { // 从仓库 Sekai-World/sekai-master-db-diff 获取最新公告 const response = await got.get(`https://cdn.jsdelivr.net/gh/Sekai-World/sekai-master-db-diff@master/userInformations.json`); const posts = response.data || []; @@ -41,10 +64,10 @@ export default async (ctx) => { return item; }) ); - ctx.set('data', { + return { title: 'Project Sekai - News', link: 'https://pjsekai.sega.jp/', description: 'プロジェクトセカイ カラフルステージ! feat.初音ミク', item: list, - }); -}; + }; +} diff --git a/lib/routes/sega/radar.ts b/lib/routes/sega/radar.ts deleted file mode 100644 index 54cef5442..000000000 --- a/lib/routes/sega/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sega.jp': { - _name: 'SEGA', - pjsekai: [ - { - title: 'Project Sekai / プロセカ Game News', - docs: 'https://docs.rsshub.app/routes/game#sega', - source: ['/news/index.html'], - target: '/sega/pjsekai/news', - }, - ], - }, -}; diff --git a/lib/routes/sega/router.ts b/lib/routes/sega/router.ts deleted file mode 100644 index d816418c0..000000000 --- a/lib/routes/sega/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/pjsekai/news', './pjsekai.ts'); -}; diff --git a/lib/routes/segmentfault/blogs.ts b/lib/routes/segmentfault/blogs.ts index df4002a94..35a6b45b7 100644 --- a/lib/routes/segmentfault/blogs.ts +++ b/lib/routes/segmentfault/blogs.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { host, acw_sc__v2, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/blogs/:tag', + categories: ['programming'], + example: '/segmentfault/blogs/go', + parameters: { tag: '标签名称,在 [标签](https://segmentfault.com/tags) 中可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['segmentfault.com/t/:tag/blogs'], + }, + name: '博客', + maintainers: ['shiluanzzz'], + handler, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const apiURL = `${host}/gateway/tag/${tag}/articles?loadMoreType=pagination&initData=true&page=1&sort=newest&pageSize=30`; const response = await got(apiURL); @@ -14,9 +36,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItems(acwScV2Cookie, item, cache.tryGet))); - ctx.set('data', { + return { title: `segmentfault-Blogs-${tag}`, link: `${host}/t/${tag}/blogs`, item: items, - }); -}; + }; +} diff --git a/lib/routes/segmentfault/channel.ts b/lib/routes/segmentfault/channel.ts index d5a2ca0e9..ae5e31393 100644 --- a/lib/routes/segmentfault/channel.ts +++ b/lib/routes/segmentfault/channel.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { host, acw_sc__v2, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:name', + categories: ['programming'], + example: '/segmentfault/channel/frontend', + parameters: { name: '频道名称,在频道 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['segmentfault.com/channel/:name'], + }, + name: '频道', + maintainers: ['LogicJake', 'Fatpandac'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const link = `${host}/channel/${name}`; @@ -27,9 +49,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItems(acwScV2Cookie, item, cache.tryGet))); - ctx.set('data', { + return { title: `segmentfault - ${channelName}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/segmentfault/maintainer.ts b/lib/routes/segmentfault/maintainer.ts deleted file mode 100644 index 3075cea85..000000000 --- a/lib/routes/segmentfault/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/blogs/:tag': ['shiluanzzz'], - '/channel/:name': ['LogicJake', 'Fatpandac'], - '/user/:name': ['leyuuu', 'Fatpandac'], -}; diff --git a/lib/routes/segmentfault/namespace.ts b/lib/routes/segmentfault/namespace.ts new file mode 100644 index 000000000..a022f7242 --- /dev/null +++ b/lib/routes/segmentfault/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SegmentFault', + url: 'segmentfault.com', +}; diff --git a/lib/routes/segmentfault/radar.ts b/lib/routes/segmentfault/radar.ts deleted file mode 100644 index 9214ae4c6..000000000 --- a/lib/routes/segmentfault/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'segmentfault.com': { - _name: 'SegmentFault', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/programming#segmentfault', - source: ['/channel/:name'], - target: '/segmentfault/channel/:name', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/programming#segmentfault', - source: ['/u/:name'], - target: '/segmentfault/user/:name', - }, - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/programming#segmentfault', - source: ['/t/:tag/blogs'], - target: '/segmentfault/blogs/:tag', - }, - ], - }, -}; diff --git a/lib/routes/segmentfault/router.ts b/lib/routes/segmentfault/router.ts deleted file mode 100644 index 366423adb..000000000 --- a/lib/routes/segmentfault/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/blogs/:tag', './blogs'); - router.get('/channel/:name', './channel'); - router.get('/user/:name', './user'); -}; diff --git a/lib/routes/segmentfault/user.ts b/lib/routes/segmentfault/user.ts index 114d03aa4..599992222 100644 --- a/lib/routes/segmentfault/user.ts +++ b/lib/routes/segmentfault/user.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { host, acw_sc__v2, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:name', + categories: ['programming'], + example: '/segmentfault/user/minnanitkong', + parameters: { name: '用户 Id,用户详情页 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['segmentfault.com/u/:name'], + }, + name: '用户', + maintainers: ['leyuuu', 'Fatpandac'], + handler, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const apiURL = `${host}/gateway/homepage/${name}/timeline?size=20&offset=`; @@ -16,9 +38,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItems(acwScV2Cookie, item, cache.tryGet))); - ctx.set('data', { + return { title: `segmentfault - ${author}`, link: `${host}/u/${name}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/sehuatang/index.ts b/lib/routes/sehuatang/index.ts index ee0a265e0..6687b4790 100644 --- a/lib/routes/sehuatang/index.ts +++ b/lib/routes/sehuatang/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -38,7 +39,25 @@ const forumIdMaps = { hrxazp: '98', // 华人性爱自拍 }; -export default async (ctx) => { +export const route: Route = { + path: ['/bt/:subforumid?', '/picture/:subforumid', '/:subforumid?/:type?', '/:subforumid?', ''], + name: 'Unknown', + maintainers: ['qiwihui', 'junfengP', 'nczitzk'], + handler, + description: `**原创 BT 电影** + + | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | + | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | + | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + + **色花图片** + + | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |`, +}; + +async function handler(ctx) { const subformName = ctx.req.param('subforumid') ?? 'gqzwzm'; const subformId = subformName in forumIdMaps ? forumIdMaps[subformName] : subformName; const type = ctx.req.param('type'); @@ -122,9 +141,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `色花堂 - ${$('#pt > div:nth-child(1) > a:last-child').text()}`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/sehuatang/maintainer.ts b/lib/routes/sehuatang/maintainer.ts deleted file mode 100644 index 40b8b168a..000000000 --- a/lib/routes/sehuatang/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/bt/:subforumid?': ['qiwihui', 'junfengP', 'nczitzk'], - '/picture/:subforumid': ['qiwihui', 'junfengP', 'nczitzk'], - '/user/:uid': ['JamYiz'], - '/:subforumid?/:type?': ['qiwihui', 'junfengP', 'nczitzk'], - '/:subforumid?': ['qiwihui', 'junfengP', 'nczitzk'], - '/': ['qiwihui', 'junfengP', 'nczitzk'], -}; diff --git a/lib/routes/sehuatang/namespace.ts b/lib/routes/sehuatang/namespace.ts new file mode 100644 index 000000000..6327b48f4 --- /dev/null +++ b/lib/routes/sehuatang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '色花堂', + url: 'sehuatang.net', +}; diff --git a/lib/routes/sehuatang/radar.ts b/lib/routes/sehuatang/radar.ts deleted file mode 100644 index 18900c34b..000000000 --- a/lib/routes/sehuatang/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'sehuatang.net': { - _name: '色花堂', - '.': [ - { - title: '分区帖子', - docs: 'https://docs.rsshub.app/routes/multimedia#se-hua-tang-fen-qu-tie-zi', - source: ['/:category', '/'], - target: (params, url) => { - const theUrl = new URL(url); - const matches = theUrl.href.match(/forum-(\d)+-\d+/); - const fid = theUrl.searchParams.get('fid') || (matches ? matches[1] : ''); - const tid = theUrl.searchParams.get('typeid'); - return `/sehuatang${fid ? `/${fid}` : ''}${tid ? `/${tid}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/sehuatang/router.ts b/lib/routes/sehuatang/router.ts deleted file mode 100644 index ada03ff2f..000000000 --- a/lib/routes/sehuatang/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/bt/:subforumid?', './index'); - router.get('/picture/:subforumid', './index'); - router.get('/user/:uid', './user'); - router.get('/:subforumid?/:type?', './index'); - router.get('/:subforumid?', './index'); - router.get('', './index'); -}; diff --git a/lib/routes/sehuatang/user.ts b/lib/routes/sehuatang/user.ts index a23e92262..5ebd90790 100644 --- a/lib/routes/sehuatang/user.ts +++ b/lib/routes/sehuatang/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got @@ -7,7 +8,25 @@ import { config } from '@/config'; const baseUrl = 'https://sehuatang.org/'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid', + categories: ['multimedia'], + example: '/sehuatang/user/411096', + parameters: { uid: '用户 uid, 可在用户主页 URL 中找到' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作者文章', + maintainers: ['JamYiz'], + handler, +}; + +async function handler(ctx) { if (!config.sehuatang.cookie) { throw new Error('Sehuatang RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -104,10 +123,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { // 在此处输出您的 RSS title: `${$('.mt').text()}的帖子-色花堂`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/sensortower/blog.ts b/lib/routes/sensortower/blog.ts index 66b2989ed..ef986e283 100644 --- a/lib/routes/sensortower/blog.ts +++ b/lib/routes/sensortower/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,33 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:language?', + categories: ['new-media'], + example: '/sensortower/blog', + parameters: { language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sensortower.com/blog', 'sensortower.com/zh-CN/blog', 'sensortower.com/ja/blog', 'sensortower.com/ko/blog', 'sensortower.com/'], + target: '/blog', + }, + name: 'Blog', + maintainers: ['nczitzk'], + handler, + url: 'sensortower.com/blog', + description: `| English | Chinese | Japanese | Korean | + | ------- | ------- | -------- | ------ | + | | zh-CN | ja | ko |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? ''; const rootUrl = 'https://sensortower.com'; @@ -64,10 +91,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Sensor Tower - Blog', link: currentUrl, item: items, language: language || 'en-US', - }); -}; + }; +} diff --git a/lib/routes/sensortower/maintainer.ts b/lib/routes/sensortower/maintainer.ts deleted file mode 100644 index 18c0085ea..000000000 --- a/lib/routes/sensortower/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog/:language?': ['nczitzk'], -}; diff --git a/lib/routes/sensortower/namespace.ts b/lib/routes/sensortower/namespace.ts new file mode 100644 index 000000000..2b7507c43 --- /dev/null +++ b/lib/routes/sensortower/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sensor Tower', + url: 'sensortower.com', +}; diff --git a/lib/routes/sensortower/radar.ts b/lib/routes/sensortower/radar.ts deleted file mode 100644 index 1d9f94f42..000000000 --- a/lib/routes/sensortower/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sensortower.com': { - _name: 'Sensor Tower', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/new-media#sensor-tower-blog', - source: ['/blog', '/zh-CN/blog', '/ja/blog', '/ko/blog', '/'], - target: '/sensortower/blog', - }, - ], - }, -}; diff --git a/lib/routes/sensortower/router.ts b/lib/routes/sensortower/router.ts deleted file mode 100644 index 46410d3d1..000000000 --- a/lib/routes/sensortower/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:language?', './blog'); -}; diff --git a/lib/routes/setn/index.ts b/lib/routes/setn/index.ts index 3c61d0cad..87ddd5e06 100644 --- a/lib/routes/setn/index.ts +++ b/lib/routes/setn/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -42,7 +43,41 @@ const getCurrentUrl = (category) => { return `${rootUrl}/viewall`; }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/setn', + parameters: { category: '分类,见下表,默认为即時' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['setn.com/ViewAll.aspx', 'setn.com/'], + target: '', + }, + name: '新聞', + maintainers: ['nczitzk'], + handler, + url: 'setn.com/ViewAll.aspx', + description: `| 即時 | 熱門 | 娛樂 | 政治 | 社會 | + | ---- | ---- | ---- | ---- | ---- | + + | 國際 | 兩岸 | 生活 | 健康 | 旅遊 | + | ---- | ---- | ---- | ---- | ---- | + + | 運動 | 地方 | 財經 | 富房網 | 名家 | + | ---- | ---- | ---- | ------ | ---- | + + | 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 | + | ---- | ---- | ---- | ---- | ---- | -------- |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '即時'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 42; @@ -93,9 +128,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `三立新聞網 - ${category}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/setn/maintainer.ts b/lib/routes/setn/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/setn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/setn/namespace.ts b/lib/routes/setn/namespace.ts new file mode 100644 index 000000000..711efdae2 --- /dev/null +++ b/lib/routes/setn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '三立新聞網', + url: 'setn.com', +}; diff --git a/lib/routes/setn/radar.ts b/lib/routes/setn/radar.ts deleted file mode 100644 index cf87c176c..000000000 --- a/lib/routes/setn/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'setn.com': { - _name: '三立新聞網', - '.': [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/ViewAll.aspx', '/'], - target: '/setn', - }, - ], - star: [ - { - title: '娛樂新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/viewall', '/'], - target: '/setn/娛樂', - }, - ], - health: [ - { - title: '健康新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/viewall', '/'], - target: '/setn/健康', - }, - ], - travel: [ - { - title: '旅遊新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/viewall', '/'], - target: '/setn/旅遊', - }, - ], - fuhouse: [ - { - title: '富房網新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/viewall', '/'], - target: '/setn/富房網', - }, - ], - watch: [ - { - title: '女孩新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#san-li-xin-wen-wang-xin-wen', - source: ['/viewall', '/'], - target: '/setn/女孩', - }, - ], - }, -}; diff --git a/lib/routes/setn/router.ts b/lib/routes/setn/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/setn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/seu/cse/index.ts b/lib/routes/seu/cse/index.ts index 2e932d8a9..3a52bdb90 100644 --- a/lib/routes/seu/cse/index.ts +++ b/lib/routes/seu/cse/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/cse/:type?', + categories: ['university'], + example: '/seu/cse/xyxw', + parameters: { type: '分类名,默认为 `xyxw`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cse.seu.edu.cn/:type/list.htm', 'cse.seu.edu.cn/'], + }, + name: '计算机技术与工程学院', + maintainers: ['LogicJake'], + handler, + description: `| 学院新闻 | 通知公告 | 教务信息 | 就业信息 | 学工事务 | + | -------- | -------- | -------- | -------- | -------- | + | xyxw | tzgg | jwxx | jyxx | xgsw |`, +}; + +async function handler(ctx) { const host = 'https://cse.seu.edu.cn'; const map = { @@ -55,10 +80,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { link, title: `${$('meta[name=keywords]').attr('content')}${$('meta[name=description]').attr('content')} -- ${$('head title').text()}`, description: '东南大学计算机技术与工程学院RSS', item: out, - }); -}; + }; +} diff --git a/lib/routes/seu/maintainer.ts b/lib/routes/seu/maintainer.ts deleted file mode 100644 index 876088aca..000000000 --- a/lib/routes/seu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cse/:type?': ['LogicJake'], - '/radio/academic': ['HenryQW'], - '/yjs': ['Denkiyohou'], - '/yzb/:type': ['fuzy112'], -}; diff --git a/lib/routes/seu/namespace.ts b/lib/routes/seu/namespace.ts new file mode 100644 index 000000000..5b7d535da --- /dev/null +++ b/lib/routes/seu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '东南大学', + url: 'cse.seu.edu.cn', +}; diff --git a/lib/routes/seu/radar.ts b/lib/routes/seu/radar.ts deleted file mode 100644 index 9afc50260..000000000 --- a/lib/routes/seu/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'seu.edu.cn': { - _name: '东南大学', - cse: [ - { - title: '计算机技术与工程学院', - docs: 'https://docs.rsshub.app/routes/university#dong-nan-da-xue', - source: ['/:type/list.htm', '/'], - target: '/seu/cse/:type?', - }, - ], - radio: [ - { - title: '信息科学与工程学院学术活动', - docs: 'https://docs.rsshub.app/routes/university#dong-nan-da-xue', - source: ['/_s29/15986/list.psp', '/'], - target: '/seu/radio/academic', - }, - ], - seugs: [ - { - title: '研究生院全部公告', - docs: 'https://docs.rsshub.app/routes/university#dong-nan-da-xue-yan-jiu-sheng-yuan-quan-bu-gong-gao', - source: ['/26671/list.htm', '/'], - target: '/seu/yjs', - }, - ], - yzb: [ - { - title: '研究生招生网通知公告', - docs: 'https://docs.rsshub.app/routes/university#dong-nan-da-xue', - source: ['/:type/list.htm'], - target: '/seu/yzb/:type', - }, - ], - }, -}; diff --git a/lib/routes/seu/radio/academic.ts b/lib/routes/seu/radio/academic.ts index c4f6d20c5..bf3e7478e 100644 --- a/lib/routes/seu/radio/academic.ts +++ b/lib/routes/seu/radio/academic.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/radio/academic', + categories: ['university'], + example: '/seu/radio/academic', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['radio.seu.edu.cn/_s29/15986/list.psp', 'radio.seu.edu.cn/'], + }, + name: '信息科学与工程学院学术活动', + maintainers: ['HenryQW'], + handler, + url: 'radio.seu.edu.cn/_s29/15986/list.psp', +}; + +async function handler() { const host = 'https://radio.seu.edu.cn'; const link = new URL('_s29/15986/list.psp', host).href; const response = await got(link); @@ -36,9 +59,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '东南大学信息科学与工程学院 -- 学术活动', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/seu/router.ts b/lib/routes/seu/router.ts deleted file mode 100644 index 0007ce604..000000000 --- a/lib/routes/seu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cse/:type?', './cse'); - router.get('/radio/academic', './radio/academic'); - router.get('/yjs', './yjs'); - router.get('/yzb/:type', './yzb'); -}; diff --git a/lib/routes/seu/yjs.ts b/lib/routes/seu/yjs.ts index 383cae806..f60df402e 100644 --- a/lib/routes/seu/yjs.ts +++ b/lib/routes/seu/yjs.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const url = 'https://seugs.seu.edu.cn/26671/list.htm'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/seu/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['seugs.seu.edu.cn/26671/list.htm', 'seugs.seu.edu.cn/'], + }, + name: '研究生院全部公告', + maintainers: ['Denkiyohou'], + handler, + url: 'seugs.seu.edu.cn/26671/list.htm', +}; + +async function handler() { const response = await got(url); const $ = load(response.data); const list = $('.news') @@ -30,9 +53,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '东南大学研究生公告', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/seu/yzb/index.ts b/lib/routes/seu/yzb/index.ts index 8957cc10e..1a617e3aa 100644 --- a/lib/routes/seu/yzb/index.ts +++ b/lib/routes/seu/yzb/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yzb/:type', + categories: ['university'], + example: '/seu/yzb/6676', + parameters: { type: '分类名,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yzb.seu.edu.cn/:type/list.htm'], + }, + name: '研究生招生网通知公告', + maintainers: ['fuzy112'], + handler, + description: `| 硕士招生 | 博士招生 | 港澳台及中外合作办学 | + | -------- | -------- | -------------------- | + | 6676 | 6677 | 6679 |`, +}; + +async function handler(ctx) { const host = 'https://yzb.seu.edu.cn'; const map = { @@ -44,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { link: url, title: `东南大学研究生招生网 -- ${$('head title').text()}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/sfacg/maintainer.ts b/lib/routes/sfacg/maintainer.ts deleted file mode 100644 index 6407f1715..000000000 --- a/lib/routes/sfacg/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/novel/chapter/:id': ['keocheung'], -}; diff --git a/lib/routes/sfacg/namespace.ts b/lib/routes/sfacg/namespace.ts new file mode 100644 index 000000000..348f9d63e --- /dev/null +++ b/lib/routes/sfacg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SF 轻小说', + url: 'book.sfacg.com', +}; diff --git a/lib/routes/sfacg/novel-chapter.ts b/lib/routes/sfacg/novel-chapter.ts index c7eaa94f2..b5d741095 100644 --- a/lib/routes/sfacg/novel-chapter.ts +++ b/lib/routes/sfacg/novel-chapter.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/novel/chapter/:id', + categories: ['reading'], + example: '/sfacg/novel/chapter/672431', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['book.sfacg.com/Novel/:id/*'], + }, + name: '章节', + maintainers: ['keocheung'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 20; @@ -42,11 +64,11 @@ export default async (ctx) => { const { data: intro } = await got(`${baseUrl}/Novel/${id}/`); const $i = load(intro); - ctx.set('data', { + return { title: `SF轻小说 ${$('h1.story-title').text()}`, link: `${baseUrl}/Novel/${id}`, description: $i('p.introduce').text(), image: $i('div.summary-pic img').attr('src').replace('http://', 'https://'), item: items, - }); -}; + }; +} diff --git a/lib/routes/sfacg/radar.ts b/lib/routes/sfacg/radar.ts deleted file mode 100644 index ec02cb754..000000000 --- a/lib/routes/sfacg/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sfacg.com': { - _name: 'SF 轻小说', - book: [ - { - title: '章节', - docs: 'https://docs.rsshub.app/routes/reading#sf-qing-xiao-shuo', - source: ['/Novel/:id/*'], - target: '/sfacg/novel/chapter/:id', - }, - ], - }, -}; diff --git a/lib/routes/sfacg/router.ts b/lib/routes/sfacg/router.ts deleted file mode 100644 index 72374499e..000000000 --- a/lib/routes/sfacg/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/novel/chapter/:id', './novel-chapter'); -}; diff --git a/lib/routes/shcstheatre/maintainer.ts b/lib/routes/shcstheatre/maintainer.ts deleted file mode 100644 index 80f6300c9..000000000 --- a/lib/routes/shcstheatre/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/programs': ['fuzy112'], -}; diff --git a/lib/routes/shcstheatre/namespace.ts b/lib/routes/shcstheatre/namespace.ts new file mode 100644 index 000000000..f5fd55e8c --- /dev/null +++ b/lib/routes/shcstheatre/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海文化广场', + url: 'www.shcstheatre.com', +}; diff --git a/lib/routes/shcstheatre/programs.ts b/lib/routes/shcstheatre/programs.ts index 6cadad842..e972f9bc5 100644 --- a/lib/routes/shcstheatre/programs.ts +++ b/lib/routes/shcstheatre/programs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import timezone from '@/utils/timezone'; import { load } from 'cheerio'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/programs', + categories: ['shopping'], + example: '/shcstheatre/programs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.shcstheatre.com/Program/programList.aspx'], + }, + name: '节目列表', + maintainers: ['fuzy112'], + handler, + url: 'www.shcstheatre.com/Program/programList.aspx', +}; + +async function handler() { const url = 'https://www.shcstheatre.com/Program/programList.aspx'; const res = await got.get(url); const $ = load(res.data); @@ -34,10 +57,10 @@ export default async (ctx) => { ); const image = $('.menu-logo img').attr('src'); - ctx.set('data', { + return { title: '上海文化广场 - 节目列表', link: url, image, item: items, - }); -}; + }; +} diff --git a/lib/routes/shcstheatre/radar.ts b/lib/routes/shcstheatre/radar.ts deleted file mode 100644 index 0325422a4..000000000 --- a/lib/routes/shcstheatre/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shcstheatre.com': { - _name: '上海文化广场', - www: [ - { - title: '节目列表', - docs: 'https://docs.rsshub.app/routes/shopping#shang-hai-wen-hua-guang-chang-jie-mu-lie-biao', - source: ['/Program/programList.aspx'], - target: '/shcstheatre/programs', - }, - ], - }, -}; diff --git a/lib/routes/shcstheatre/router.ts b/lib/routes/shcstheatre/router.ts deleted file mode 100644 index 119388dd6..000000000 --- a/lib/routes/shcstheatre/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/programs', './programs'); -}; diff --git a/lib/routes/shiep/index.ts b/lib/routes/shiep/index.ts index 2be412f87..283575490 100644 --- a/lib/routes/shiep/index.ts +++ b/lib/routes/shiep/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,56 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import { config } from './config'; -export default async (ctx) => { +export const route: Route = { + path: '/:type/:id?', + categories: ['university'], + example: '/shiep/news/notice', + parameters: { type: '类型名称,见下表', id: '页面 ID,默认为通知公告或学院公告所对应的 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻网与学院通知', + maintainers: ['gumibea', 'TeamSUEP'], + handler, + description: `类型名称与默认 ID: + + 学院一览: + + | 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) | + | ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- | + | energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy | + | 892 | 1231 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 | + + 党群部门: + + | 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 | + | ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ | + | dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc | + | 4014 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 | + + 行政部门: + + | 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 | + | -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ | + | office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx | + | 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 | + + 其它: + + | 新闻网 | Shanghai University of Electric Power | 信息公开网 | 本科招生网 | 本科就业信息网 | 妇工委 | 文明办 | 学习路上 | 上海热交换系统节能工程技术研究中心 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源化学实验教学中心 | 教师教学发展中心 | 电力装备设计与制造虚拟仿真中心 | 上海市电力材料防护与新材料重点实验室 | 能源电力智库 | 国家新能源电力系统实验教学示范中心 | 智能发电实验教学中心 | + | ------ | ------------------------------------- | ---------- | ---------- | -------------- | ------ | ------- | -------- | ---------------------------------- | ------------------------------ | ---------------------------- | -------------------- | ---------------- | ------------------------------ | ------------------------------------ | ------------ | ---------------------------------- | -------------------- | + | news | english | xxgk | zs | career | fgw | wenming | ztjy | energy-saving | gec | green-energy | hhsyzx | jsjxfzzx | jxfz | mpep | nydlzk | restec | spgc | + | notice | events | zxgkxx | zxxx | tzgg | 1411 | 2202 | 5575 | tzgg | 1959 | 118 | 3709 | 3909 | 3330 | 1134 | tzgg | 1366 | 4449 | + + 参数与来源页面对应规则为:\`https://\${type}.shiep.edu.cn/\${id}/list.htm\``, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); if (!Object.keys(config).includes(type)) { @@ -68,9 +118,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `上海电力大学-${title}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/shiep/maintainer.ts b/lib/routes/shiep/maintainer.ts deleted file mode 100644 index c50cda76d..000000000 --- a/lib/routes/shiep/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type/:id?': ['gumibea', 'TeamSUEP'], -}; diff --git a/lib/routes/shiep/namespace.ts b/lib/routes/shiep/namespace.ts new file mode 100644 index 000000000..d7acb5335 --- /dev/null +++ b/lib/routes/shiep/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海电力大学', + url: 'bwc.shiep.edu.cn', +}; diff --git a/lib/routes/shiep/radar.ts b/lib/routes/shiep/radar.ts deleted file mode 100644 index 997db6718..000000000 --- a/lib/routes/shiep/radar.ts +++ /dev/null @@ -1,509 +0,0 @@ -export default { - 'shiep.edu.cn': { - _name: '上海电力大学', - bwc: [ - { - title: '武装部保卫处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/bwc/:id', - }, - ], - career: [ - { - title: '本科就业信息网', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/news/index/tag/:id'], - target: '/shiep/career/:id', - }, - ], - cyb: [ - { - title: '资产经营公司/产业办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/cyb/:id', - }, - ], - dangban: [ - { - title: '党委办公室', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/dangban/:id', - }, - ], - djfwzxdcs: [ - { - title: '党建服务中心/党建督查室', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/djfwzxdcs/:id', - }, - ], - dqxy: [ - { - title: '电气工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/dqxy/:id', - }, - ], - dwllc: [ - { - title: '对外联络处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/dwllc/:id', - }, - ], - dxxy: [ - { - title: '电子与信息工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/dxxy/:id', - }, - ], - energy: [ - { - title: '能源与机械工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/energy/:id', - }, - ], - 'energy-saving': [ - { - title: '上海热交换系统节能工程技术研究中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/energy-saving/:id', - }, - ], - english: [ - { - title: 'Shanghai University of Electric Power', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/english/:id', - }, - ], - fao: [ - { - title: '国际交流与合作处(港澳台办公室)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/fao/:id', - }, - ], - fgw: [ - { - title: '妇工委', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/fgw/:id', - }, - ], - fzghc: [ - { - title: '发展规划处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/fzghc/:id', - }, - ], - gec: [ - { - title: '上海新能源人才技术教育交流中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/gec/:id', - }, - ], - gonghui: [ - { - title: '工会', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/gonghui/:id', - }, - ], - 'green-energy': [ - { - title: '上海绿色能源并网技术研究中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/green-energy/:id', - }, - ], - hhsyzx: [ - { - title: '能源化学实验教学中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/hhsyzx/:id', - }, - ], - hhxy: [ - { - title: '环境与化学工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/hhxy/:id', - }, - ], - hqglc: [ - { - title: '后勤管理处(后勤服务中心)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/hqglc/:id', - }, - ], - ieetc: [ - { - title: '创新创业工程训练中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/ieetc/:id', - }, - ], - jgdw: [ - { - title: '机关党委', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jgdw/:id', - }, - ], - jgxy: [ - { - title: '经济与管理学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jgxy/:id', - }, - ], - jijian: [ - { - title: '纪委(监察专员办公室)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jijian/:id', - }, - ], - jjc: [ - { - title: '基建处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jjc/:id', - }, - ], - jjxy: [ - { - title: '继续教育学院(国际教育学院)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jjxy/:id', - }, - ], - jsjxfzzx: [ - { - title: '教师教学发展中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jsjxfzzx/:id', - }, - ], - jsjxy: [ - { - title: '计算机科学与技术学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jsjxy/:id', - }, - ], - jszyzx: [ - { - title: '技术转移中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jszyzx/:id', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jwc/:id', - }, - ], - jxfz: [ - { - title: '电力装备设计与制造虚拟仿真中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/jxfz/:id', - }, - ], - kczx: [ - { - title: '能源电力科创中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/kczx/:id', - }, - ], - kyc: [ - { - title: '科研处/融合办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/kyc/:id', - }, - ], - lgxq: [ - { - title: '临港新校区建设综合办公室', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/lgxq/:id', - }, - ], - library: [ - { - title: '图书馆', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/library/:id', - }, - ], - metc: [ - { - title: '现代教育技术中心/信息办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/metc/:id', - }, - ], - mpep: [ - { - title: '上海市电力材料防护与新材料重点实验室', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/mpep/:id', - }, - ], - news: [ - { - title: '新闻网', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/news/:id', - }, - ], - nydlzk: [ - { - title: '能源电力智库', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/nydlzk/:id', - }, - ], - office: [ - { - title: '校长办公室(档案馆)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/office/:id', - }, - ], - rpstec: [ - { - title: '国家新能源电力系统实验教学示范中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/rpstec/:id', - }, - ], - rsc: [ - { - title: '党委教师工作部/人事处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/rsc/:id', - }, - ], - rwysxy: [ - { - title: '人文艺术学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/rwysxy/:id', - }, - ], - sjc: [ - { - title: '审计处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/sjc/:id', - }, - ], - skb: [ - { - title: '马克思主义学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/skb/:id', - }, - ], - slxy: [ - { - title: '数理学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/slxy/:id', - }, - ], - spgc: [ - { - title: '智能发电实验教学中心', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/spgc/:id', - }, - ], - sysyzcglc: [ - { - title: '实验室与资产管理处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/sysyzcglc/:id', - }, - ], - tgb: [ - { - title: '离退休党委/退管办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/tgb/:id', - }, - ], - tw: [ - { - title: '团委', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/tw/:id', - }, - ], - tyb: [ - { - title: '体育学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/tyb/:id', - }, - ], - tzb: [ - { - title: '统战部', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/tzb/:id', - }, - ], - wenming: [ - { - title: '文明办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/wenming/:id', - }, - ], - wgyxy: [ - { - title: '外国语学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/wgyxy/:id', - }, - ], - xcb: [ - { - title: '宣传部(文明办、融媒体中心)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/xcb/:id', - }, - ], - xsc: [ - { - title: '学生处', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/xsc/:id', - }, - ], - xunchaban: [ - { - title: '巡查办', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/xunchaban/:id', - }, - ], - xxgk: [ - { - title: '信息公开网', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/xxgk/:id', - }, - ], - yjsc: [ - { - title: '研究生院/研工部', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/yjsc/:id', - }, - ], - zdhxy: [ - { - title: '自动化工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/zdhxy/:id', - }, - ], - zs: [ - { - title: '本科招生网', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/zs/:id', - }, - ], - ztjy: [ - { - title: '学习路上', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/ztjy/:id', - }, - ], - zzb: [ - { - title: '组织部(老干部处、党校)', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:id/list.htm'], - target: '/shiep/zzb/:id', - }, - ], - }, -}; diff --git a/lib/routes/shiep/router.ts b/lib/routes/shiep/router.ts deleted file mode 100644 index f1f031a95..000000000 --- a/lib/routes/shiep/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type/:id?', './index'); -}; diff --git a/lib/routes/shisu/maintainer.ts b/lib/routes/shisu/maintainer.ts deleted file mode 100644 index ecd8c1505..000000000 --- a/lib/routes/shisu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category': ['Duuckjing'], -}; diff --git a/lib/routes/shisu/namespace.ts b/lib/routes/shisu/namespace.ts new file mode 100644 index 000000000..e25ff24e1 --- /dev/null +++ b/lib/routes/shisu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海外国语大学', + url: 'news.shisu.edu.cn', +}; diff --git a/lib/routes/shisu/news.ts b/lib/routes/shisu/news.ts index dd0c9ca54..c6a73ac29 100644 --- a/lib/routes/shisu/news.ts +++ b/lib/routes/shisu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,31 @@ import timezone from '@/utils/timezone'; const url = 'https://news.shisu.edu.cn'; const banner = 'https://news.shisu.edu.cn/news/index/39adf3d9ae414bc39c6d3b9316ae531f.png'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category', + categories: ['university'], + example: '/shisu/news/notice', + parameters: { category: '新闻的分类可根据自己的需要选择,首页为全部新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.shisu.edu.cn/:category/index.html'], + }, + name: '上外新闻', + maintainers: ['Duuckjing'], + handler, + description: `| 首页 | 特稿 | 学术 | 教学 | 国际 | 校园 | 人物 | 视讯 | 公告 | + | ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ | + | news | gazette | research- | academics- | international | campus | people | multimedia | notice |`, +}; + +async function handler(ctx) { const { section = 'news' } = ctx.req.param(); const { data: r } = await got(`${url}/${section}/index.html`); const $ = load(r); @@ -56,10 +81,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `上外新闻|SISU TODAY -${section.charAt(0).toUpperCase() + section.slice(1)}`, image: 'https://bkimg.cdn.bcebos.com/pic/8d5494eef01f3a296b70affa9825bc315c607c4d?x-bce-process=image/resize,m_lfit,w_536,limit_1/quality,Q_70', link: `${url}/${section}/index.html`, item: items, - }); -}; + }; +} diff --git a/lib/routes/shisu/radar.ts b/lib/routes/shisu/radar.ts deleted file mode 100644 index 3e58529ff..000000000 --- a/lib/routes/shisu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shisu.edu.cn': { - _name: '上海外国语大学', - news: [ - { - title: '上外新闻', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-wai-guo-yu-da-xue', - source: ['/:category/index.html'], - target: '/shisu/news/:category', - }, - ], - }, -}; diff --git a/lib/routes/shisu/router.ts b/lib/routes/shisu/router.ts deleted file mode 100644 index cc284c6f1..000000000 --- a/lib/routes/shisu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category', './news'); -}; diff --git a/lib/routes/shmeea/index.ts b/lib/routes/shmeea/index.ts index cf84b1e27..13cb21bf2 100644 --- a/lib/routes/shmeea/index.ts +++ b/lib/routes/shmeea/index.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['study'], + example: '/shmeea/08000', + parameters: { id: '页面 ID,可在 URL 中找到,默认为消息速递' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '消息', + maintainers: ['jialinghui', 'Misaka13514'], + handler, + description: `:::tip + 例如:消息速递的网址为 \`https://www.shmeea.edu.cn/page/08000/index.html\`,则页面 ID 为 \`08000\`。 + ::: + + :::warning + 暂不支持大类分类和[院内动态](https://www.shmeea.edu.cn/page/19000/index.html) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '08000'; const baseURL = 'https://www.shmeea.edu.cn'; const link = `${baseURL}/page/${id}/index.html`; @@ -46,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/shmeea/maintainer.ts b/lib/routes/shmeea/maintainer.ts deleted file mode 100644 index aba2aeb63..000000000 --- a/lib/routes/shmeea/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:id?': ['jialinghui', 'Misaka13514'], - '/self-study': ['h2ws'], -}; diff --git a/lib/routes/shmeea/namespace.ts b/lib/routes/shmeea/namespace.ts new file mode 100644 index 000000000..c3bc55070 --- /dev/null +++ b/lib/routes/shmeea/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海市教育考试院', + url: 'www.shmeea.edu.cn', + description: `官方网址:[https://www.shmeea.edu.cn](https://www.shmeea.edu.cn)`, +}; diff --git a/lib/routes/shmeea/radar.ts b/lib/routes/shmeea/radar.ts deleted file mode 100644 index 3dc2ce241..000000000 --- a/lib/routes/shmeea/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - 'shmeea.edu.cn': { - _name: '上海市教育考试院', - www: [ - { - title: '消息', - docs: 'https://docs.rsshub.app/routes/study#shang-hai-shi-jiao-yu-kao-shi-yuan', - source: ['/page/:id?/index.html'], - target: (params, url, document) => { - const li = document.querySelector('#main .pageList li'); - return li ? '/shmeea/:id?' : ''; - }, - }, - { - title: '自学考试通知公告', - docs: 'https://docs.rsshub.app/routes/study#shang-hai-shi-jiao-yu-kao-shi-yuan', - source: ['/page/04000/index.html', '/'], - target: '/shmeea/self-study', - }, - ], - }, -}; diff --git a/lib/routes/shmeea/router.ts b/lib/routes/shmeea/router.ts deleted file mode 100644 index 570ab1677..000000000 --- a/lib/routes/shmeea/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/self-study', './self-study'); - router.get('/:id?', './index'); -}; diff --git a/lib/routes/shmeea/self-study.ts b/lib/routes/shmeea/self-study.ts index ba9e164e5..b10c2dbf9 100644 --- a/lib/routes/shmeea/self-study.ts +++ b/lib/routes/shmeea/self-study.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -38,7 +39,29 @@ function load_detail(list, cache) { ); } -export default async (ctx) => { +export const route: Route = { + path: '/self-study', + categories: ['study'], + example: '/shmeea/self-study', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.shmeea.edu.cn/page/04000/index.html', 'www.shmeea.edu.cn/'], + }, + name: '自学考试通知公告', + maintainers: ['h2ws'], + handler, + url: 'www.shmeea.edu.cn/page/04000/index.html', +}; + +async function handler() { const response = await got({ method: 'get', url: 'http://www.shmeea.edu.cn/page/04000/index.html', @@ -54,9 +77,9 @@ export default async (ctx) => { const detail = await load_detail(list, cache); - ctx.set('data', { + return { title: '上海自学考试 - 通知公告', link: 'http://www.shmeea.edu.cn/page/04000/index.html', item: detail, - }); -}; + }; +} diff --git a/lib/routes/shmtu/jwc.ts b/lib/routes/shmtu/jwc.ts index 742a89106..fdc369bd8 100644 --- a/lib/routes/shmtu/jwc.ts +++ b/lib/routes/shmtu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,31 @@ const ProcessFeed = (list, caches) => ) ); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type', + categories: ['university'], + example: '/shmtu/jwc/jwgg', + parameters: { type: '类型名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.shmtu.edu.cn/:type'], + }, + name: '教务信息', + maintainers: ['imbytecat', 'simonsmh'], + handler, + description: `| 教务公告 | 教务新闻 | +| -------- | -------- | +| jwgg | jwxw |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const info = type === 'jwgg' ? '教务公告' : '教务新闻'; @@ -49,10 +74,10 @@ export default async (ctx) => { const result = await ProcessFeed(list, cache); - ctx.set('data', { + return { title: `上海海事大学 ${info}`, link: `${host}/${type}`, description: '上海海事大学 教务信息', item: result, - }); -}; + }; +} diff --git a/lib/routes/shmtu/maintainer.ts b/lib/routes/shmtu/maintainer.ts deleted file mode 100644 index eac2ec78c..000000000 --- a/lib/routes/shmtu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/jwc/:type': ['imbytecat', 'simonsmh'], - '/portal/:type': ['imbytecat'], - '/www/:type': ['imbytecat', 'simonsmh'], -}; diff --git a/lib/routes/shmtu/namespace.ts b/lib/routes/shmtu/namespace.ts new file mode 100644 index 000000000..664e2b931 --- /dev/null +++ b/lib/routes/shmtu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海海事大学', + url: 'jwc.shmtu.edu.cn', +}; diff --git a/lib/routes/shmtu/portal.ts b/lib/routes/shmtu/portal.ts index 32a98e4f1..7f2820772 100644 --- a/lib/routes/shmtu/portal.ts +++ b/lib/routes/shmtu/portal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -41,7 +42,31 @@ const processFeed = (list, caches) => ) ); -export default async (ctx) => { +export const route: Route = { + path: '/portal/:type', + categories: ['university'], + example: '/shmtu/portal/bmtzgg', + parameters: { type: '类型名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['portal.shmtu.edu.cn/:type'], + }, + name: '数字平台', + maintainers: ['imbytecat'], + handler, + description: `| 部门通知公告 | 学术与大型活动公告 | 部门动态 | +| ------------ | ------------------ | -------- | +| bmtzgg | xsydxhdgg | bmdt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let info; switch (type) { @@ -76,10 +101,10 @@ export default async (ctx) => { const result = await processFeed(list, cache); - ctx.set('data', { + return { title: `上海海事大学 ${info}`, link: 'https://portal.shmtu.edu.cn/bumentongzhigonggao', description: '上海海事大学 数字平台', item: result, - }); -}; + }; +} diff --git a/lib/routes/shmtu/radar.ts b/lib/routes/shmtu/radar.ts deleted file mode 100644 index 8664d6a87..000000000 --- a/lib/routes/shmtu/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'shmtu.edu.cn': { - _name: '上海海事大学', - jwc: [ - { - title: '教务信息', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:type'], - target: '/shmtu/jwc/:type', - }, - ], - portal: [ - { - title: '数字平台', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:type'], - target: '/shmtu/portal/:type', - }, - ], - www: [ - { - title: '官网信息', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-dian-li-da-xue', - source: ['/:type'], - target: '/shmtu/www/:type', - }, - ], - }, -}; diff --git a/lib/routes/shmtu/router.ts b/lib/routes/shmtu/router.ts deleted file mode 100644 index 330fc3569..000000000 --- a/lib/routes/shmtu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/jwc/:type', './jwc'); - router.get('/portal/:type', './portal'); - router.get('/www/:type', './www'); -}; diff --git a/lib/routes/shmtu/www.ts b/lib/routes/shmtu/www.ts index 18e6159ff..a961b9b5a 100644 --- a/lib/routes/shmtu/www.ts +++ b/lib/routes/shmtu/www.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,31 @@ const ProcessFeed = (list, caches) => ) ); -export default async (ctx) => { +export const route: Route = { + path: '/www/:type', + categories: ['university'], + example: '/shmtu/www/events', + parameters: { type: '类型名称' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.shmtu.edu.cn/:type'], + }, + name: '官网信息', + maintainers: ['imbytecat', 'simonsmh'], + handler, + description: `| 学术讲座 | 通知公告 | +| -------- | -------- | +| events | notes |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const info = type === 'notes' ? '通知公告' : '学术讲座'; @@ -50,10 +75,10 @@ export default async (ctx) => { const result = await ProcessFeed(list, cache); - ctx.set('data', { + return { title: `上海海事大学 ${info}`, link: `${host}/${type}`, description: '上海海事大学 官网信息', item: result, - }); -}; + }; +} diff --git a/lib/routes/shoac/maintainer.ts b/lib/routes/shoac/maintainer.ts deleted file mode 100644 index c33cc0c8a..000000000 --- a/lib/routes/shoac/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/recent-show': ['TonyRL'], -}; diff --git a/lib/routes/shoac/namespace.ts b/lib/routes/shoac/namespace.ts new file mode 100644 index 000000000..a0b4cc8c0 --- /dev/null +++ b/lib/routes/shoac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海东方艺术中心', + url: 'shoac.com.cn', +}; diff --git a/lib/routes/shoac/radar.ts b/lib/routes/shoac/radar.ts deleted file mode 100644 index 6bf6cd91d..000000000 --- a/lib/routes/shoac/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shoac.com.cn': { - _name: '上海东方艺术中心', - '.': [ - { - title: '演出月历', - docs: 'https://docs.rsshub.app/routes/shopping#shang-hai-dong-fang-yi-shu-zhong-xin', - source: ['/'], - target: '/shoac/recent-show', - }, - ], - }, -}; diff --git a/lib/routes/shoac/recent-show.ts b/lib/routes/shoac/recent-show.ts index 43a3db354..3671b130f 100644 --- a/lib/routes/shoac/recent-show.ts +++ b/lib/routes/shoac/recent-show.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/recent-show', + categories: ['shopping'], + example: '/shoac/recent-show', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['shoac.com.cn/'], + }, + name: '演出月历', + maintainers: ['TonyRL'], + handler, + url: 'shoac.com.cn/', +}; + +async function handler() { const baseUrl = 'https://www.shoac.com.cn'; const headers = { @@ -68,9 +91,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '演出月历 - 上海东方艺术中心管理有限公司', link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/shoac/router.ts b/lib/routes/shoac/router.ts deleted file mode 100644 index 7f3d9721c..000000000 --- a/lib/routes/shoac/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/recent-show', './recent-show'); -}; diff --git a/lib/routes/shopback/maintainer.ts b/lib/routes/shopback/maintainer.ts deleted file mode 100644 index 2dd34eb71..000000000 --- a/lib/routes/shopback/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:store': ['nczitzk'], -}; diff --git a/lib/routes/shopback/namespace.ts b/lib/routes/shopback/namespace.ts new file mode 100644 index 000000000..ab77fd201 --- /dev/null +++ b/lib/routes/shopback/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ShopBack', + url: 'shopback.com.tw', +}; diff --git a/lib/routes/shopback/radar.ts b/lib/routes/shopback/radar.ts deleted file mode 100644 index a16169aa0..000000000 --- a/lib/routes/shopback/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shopback.com.tw': { - _name: 'ShopBack', - '.': [ - { - title: 'Store', - docs: 'https://docs.rsshub.app/routes/shopping#shopback-store', - source: ['/:category', '/'], - target: '/shopback/:store', - }, - ], - }, -}; diff --git a/lib/routes/shopback/router.ts b/lib/routes/shopback/router.ts deleted file mode 100644 index 1dfaf4d85..000000000 --- a/lib/routes/shopback/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:store', './store'); -}; diff --git a/lib/routes/shopback/store.ts b/lib/routes/shopback/store.ts index d0853b60c..83e2f77f1 100644 --- a/lib/routes/shopback/store.ts +++ b/lib/routes/shopback/store.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:store', + categories: ['shopping'], + example: '/shopback/shopee-mart', + parameters: { store: 'Store, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['shopback.com.tw/:category', 'shopback.com.tw/'], + }, + name: 'Store', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const store = ctx.req.param('store'); const rootUrl = 'https://www.shopback.com.tw'; @@ -29,9 +51,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `${$('h1').text()} - ShopBack`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/shoppingdesign/maintainer.ts b/lib/routes/shoppingdesign/maintainer.ts deleted file mode 100644 index ab817b8c8..000000000 --- a/lib/routes/shoppingdesign/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/posts': ['miles170'], -}; diff --git a/lib/routes/shoppingdesign/namespace.ts b/lib/routes/shoppingdesign/namespace.ts new file mode 100644 index 000000000..02e790135 --- /dev/null +++ b/lib/routes/shoppingdesign/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Shopping Design', + url: 'www.shoppingdesign.com.tw', +}; diff --git a/lib/routes/shoppingdesign/posts.ts b/lib/routes/shoppingdesign/posts.ts index 5fa67c254..24a902a9a 100644 --- a/lib/routes/shoppingdesign/posts.ts +++ b/lib/routes/shoppingdesign/posts.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/posts', + categories: ['design'], + example: '/shoppingdesign/posts', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.shoppingdesign.com.tw/post'], + }, + name: '文章列表', + maintainers: ['miles170'], + handler, + url: 'www.shoppingdesign.com.tw/post', +}; + +async function handler() { // sn_f parameter is required to prevent redirection const currentUrl = 'https://www.shoppingdesign.com.tw/post?sn_f=1'; const response = await got(currentUrl); @@ -35,10 +58,10 @@ export default async (ctx) => { items.push(data); } - ctx.set('data', { + return { title: $('meta[property="og:title"]').attr('content'), link: currentUrl, description: $('meta[property="og:description"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/shoppingdesign/radar.ts b/lib/routes/shoppingdesign/radar.ts deleted file mode 100644 index 3154ae2ea..000000000 --- a/lib/routes/shoppingdesign/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shoppingdesign.com.tw': { - _name: 'Shopping Design', - www: [ - { - title: '文章列表', - docs: 'https://docs.rsshub.app/routes/design#shopping-design', - source: '/post', - target: '/shoppingdesign/posts', - }, - ], - }, -}; diff --git a/lib/routes/shoppingdesign/router.ts b/lib/routes/shoppingdesign/router.ts deleted file mode 100644 index 38d28718f..000000000 --- a/lib/routes/shoppingdesign/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/posts', './posts'); -}; diff --git a/lib/routes/showstart/artist.ts b/lib/routes/showstart/artist.ts index b8a444614..a54a07160 100644 --- a/lib/routes/showstart/artist.ts +++ b/lib/routes/showstart/artist.ts @@ -1,15 +1,40 @@ +import { Route } from '@/types'; import { TITLE, HOST } from './const'; import { fetchPerformerInfo } from './service'; -export default async (ctx) => { +export const route: Route = { + path: '/artist/:id', + categories: ['shopping'], + example: '/showstart/artist/301783', + parameters: { id: '音乐人 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.showstart.com/artist/:id'], + }, + name: '音乐人 - 演出更新', + maintainers: ['lchtao26'], + handler, + description: `:::tip +音乐人 ID 查询: \`/showstart/search/artist/:keyword\`,如: [https://rsshub.app/showstart/search/artist/ 周杰伦](https://rsshub.app/showstart/search/artist/周杰伦) +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const artist = await fetchPerformerInfo({ performerId: id, }); - ctx.set('data', { + return { title: `${TITLE} - ${artist.name}`, description: artist.content, link: `${HOST}/artist/${artist.id}`, item: artist.activityList, - }); -}; + }; +} diff --git a/lib/routes/showstart/brand.ts b/lib/routes/showstart/brand.ts index f15ab750c..ce4665bb1 100644 --- a/lib/routes/showstart/brand.ts +++ b/lib/routes/showstart/brand.ts @@ -1,15 +1,40 @@ +import { Route } from '@/types'; import { TITLE, HOST } from './const'; import { fetchBrandInfo } from './service'; -export default async (ctx) => { +export const route: Route = { + path: '/brand/:id', + categories: ['shopping'], + example: '/showstart/brand/34707', + parameters: { id: '厂牌 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.showstart.com/host/:id'], + }, + name: '厂牌 - 演出更新', + maintainers: ['lchtao26'], + handler, + description: `:::tip +厂牌 ID 查询: \`/showstart/search/brand/:keyword\`,如: [https://rsshub.app/showstart/search/brand/ 声场](https://rsshub.app/showstart/search/brand/声场) +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const brand = await fetchBrandInfo({ brandId: id, }); - ctx.set('data', { + return { title: `${TITLE} - ${brand.name}`, description: brand.content, link: `${HOST}/host/${brand.id}`, item: brand.activityList, - }); -}; + }; +} diff --git a/lib/routes/showstart/event.ts b/lib/routes/showstart/event.ts index 31b067e29..45d26e253 100644 --- a/lib/routes/showstart/event.ts +++ b/lib/routes/showstart/event.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import { TITLE, HOST } from './const'; import { fetchActivityList, fetchDictionary } from './service'; -export default async (ctx) => { +export const route: Route = { + path: '/event/:cityCode/:showStyle?', + categories: ['shopping'], + example: '/showstart/event/571/3', + parameters: { cityCode: '演出城市 (编号)', showStyle: '演出风格 (编号)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '演出更新', + maintainers: ['lchtao26'], + handler, + description: `:::tip +- 演出城市 \`cityCode\` 查询: \`/showstart/search/city/:keyword\`, 如: [https://rsshub.app/showstart/search/city/ 杭州](https://rsshub.app/showstart/search/city/杭州) + +- 演出风格 \`showStyle\` 查询: \`/showstart/search/style/:keyword\`,如: [https://rsshub.app/showstart/search/style/ 摇滚](https://rsshub.app/showstart/search/style/摇滚) +:::`, +}; + +async function handler(ctx) { const cityCode = Number.parseInt(ctx.req.param('cityCode')); const showStyle = Number.parseInt(ctx.req.param('showStyle')); const items = await fetchActivityList({ @@ -10,9 +34,9 @@ export default async (ctx) => { }); const { cityName, showName } = await fetchDictionary(cityCode, showStyle); const tags = [cityName, showName].filter(Boolean).join(' - '); - ctx.set('data', { + return { title: `${TITLE} - ${tags}`, link: HOST, item: items, - }); -}; + }; +} diff --git a/lib/routes/showstart/maintainer.ts b/lib/routes/showstart/maintainer.ts deleted file mode 100644 index 830d974fd..000000000 --- a/lib/routes/showstart/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/artist/:id': ['lchtao26'], - '/brand/:id': ['lchtao26'], - '/event/:cityCode/:showStyle?': ['lchtao26'], - '/search/:type/:keyword?': ['lchtao26'], -}; diff --git a/lib/routes/showstart/namespace.ts b/lib/routes/showstart/namespace.ts new file mode 100644 index 000000000..d267d925b --- /dev/null +++ b/lib/routes/showstart/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '秀动网', + url: 'www.showstart.com', +}; diff --git a/lib/routes/showstart/radar.ts b/lib/routes/showstart/radar.ts deleted file mode 100644 index 3a8c8e46e..000000000 --- a/lib/routes/showstart/radar.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default { - 'showstart.com': { - _name: '秀动网', - www: [ - { - title: '演出更新', - docs: 'https://docs.rsshub.app/routes/shopping#xiu-dong-wang-yan-chu-geng-xin', - source: ['/event/list'], - target: (_, url) => { - const search = new URL(url).searchParams; - const cityCode = search.get('cityCode') || 0; - const showStyle = search.get('showStyle') || 0; - return `/showstart/event/${cityCode}/${showStyle}`; - }, - }, - { - title: '演出搜索', - docs: 'https://docs.rsshub.app/routes/shopping#xiu-dong-wang-yan-chu-sou-suo', - source: ['/event/list'], - target: (_, url) => { - const search = new URL(url).searchParams; - const keyword = search.get('keyword') || ''; - return `/showstart/search/event/${keyword}`; - }, - }, - { - title: '音乐人 - 演出更新', - docs: 'https://docs.rsshub.app/routes/shopping#yin-yue-ren-yan-chu-geng-xin', - source: ['/artist/:id'], - target: '/showstart/artist/:id', - }, - { - title: '厂牌 - 演出更新', - docs: 'https://docs.rsshub.app/routes/shopping#chang-pai-yan-chu-geng-xin', - source: ['/host/:id'], - target: '/showstart/brand/:id', - }, - ], - }, -}; diff --git a/lib/routes/showstart/router.ts b/lib/routes/showstart/router.ts deleted file mode 100644 index 38c1e21bd..000000000 --- a/lib/routes/showstart/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/artist/:id', './artist'); - router.get('/brand/:id', './brand'); - router.get('/event/:cityCode/:showStyle?', './event'); - router.get('/search/:type/:keyword?', './search'); -}; diff --git a/lib/routes/showstart/search.ts b/lib/routes/showstart/search.ts index 8276762ec..e06dc76e4 100644 --- a/lib/routes/showstart/search.ts +++ b/lib/routes/showstart/search.ts @@ -1,51 +1,70 @@ +import { Route } from '@/types'; import { TITLE, HOST } from './const'; import { fetchActivityList, fetchPerformerList, fetchBrandList, fetchCityList, fetchStyleList } from './service'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:type/:keyword?', + categories: ['shopping'], + example: '/showstart/search/live', + parameters: { type: '类别', keyword: '搜索关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '演出搜索', + maintainers: ['lchtao26'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || ''; const keyword = ctx.req.param('keyword') || ''; switch (type) { case 'event': - ctx.set('data', { + return { title: `${TITLE} - 搜演出 - ${keyword || '全部'}`, link: HOST, item: await fetchActivityList({ keyword }), - }); + }; break; case 'artist': - ctx.set('data', { + return { title: `${TITLE} - 搜艺人 - ${keyword || '全部'}`, link: HOST, item: await fetchPerformerList({ searchKeyword: keyword }), - }); + }; break; case 'brand': - ctx.set('data', { + return { title: `${TITLE} - 搜厂牌 - ${keyword || '全部'}`, link: HOST, item: await fetchBrandList({ searchKeyword: keyword }), - }); + }; break; case 'city': - ctx.set('data', { + return { title: `${TITLE} - 搜城市 - ${keyword || '全部'}`, link: HOST, item: await fetchCityList(keyword), - }); + }; break; case 'style': - ctx.set('data', { + return { title: `${TITLE} - 搜风格 - ${keyword || '全部'}`, link: HOST, item: await fetchStyleList(keyword), - }); + }; break; default: - ctx.set('data', { + return { title: `${TITLE} - 搜演出 - ${type || '全部'}`, link: HOST, item: await fetchActivityList({ keyword: type }), - }); + }; } -}; +} diff --git a/lib/routes/shu/index.ts b/lib/routes/shu/index.ts index 5f3a337fc..deb0150ec 100644 --- a/lib/routes/shu/index.ts +++ b/lib/routes/shu/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,32 @@ const alias = new Map([ ['important', 'zyxw'], // 重要新闻 ]); -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['university'], + example: '/shu/news', + parameters: { type: '消息类型,默认为`news`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.shu.edu.cn/:type'], + target: '/:type', + }, + name: '官网信息', + maintainers: ['lonelyion'], + handler, + description: `| 综合新闻 | 科研动态 | 通知公告 | 重要新闻 | + | -------- | -------- | -------- | --------- | + | news | research | notice | important |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'news'; const link = `https://www.shu.edu.cn/${alias.get(type) || type}.htm`; const respond = await got.get(link); @@ -41,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, item: all, - }); -}; + }; +} diff --git a/lib/routes/shu/jwb.ts b/lib/routes/shu/jwb.ts index bb3e7971e..f1447821f 100644 --- a/lib/routes/shu/jwb.ts +++ b/lib/routes/shu/jwb.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -10,7 +11,21 @@ const alias = new Map([ ['policy', 'zcwj'], // 政策文件 ]); -export default async (ctx) => { +export const route: Route = { + path: ['/jwc/:type?', '/jwb/:type?'], + radar: { + source: ['www.shu.edu.cn/:type'], + target: '/:type', + }, + name: 'Unknown', + maintainers: [], + handler, + description: `| 通知通告 | 新闻 | 政策文件 | + | -------- | ---- | -------- | + | notice | news | policy |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'notice'; const link = `https://jwb.shu.edu.cn/index/${alias.get(type) || type}.htm`; const respond = await got.get(link); @@ -38,9 +53,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title, link, item: all, - }); -}; + }; +} diff --git a/lib/routes/shu/maintainer.ts b/lib/routes/shu/maintainer.ts deleted file mode 100644 index cd088b5ef..000000000 --- a/lib/routes/shu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:type?': ['lonelyion'], - '/jwb/:type?': ['tuxinghuan'], -}; diff --git a/lib/routes/shu/namespace.ts b/lib/routes/shu/namespace.ts new file mode 100644 index 000000000..46b8e5f50 --- /dev/null +++ b/lib/routes/shu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海大学', + url: 'jwb.shu.edu.cn', +}; diff --git a/lib/routes/shu/radar.ts b/lib/routes/shu/radar.ts deleted file mode 100644 index 62fda3161..000000000 --- a/lib/routes/shu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'shu.edu.cn': { - _name: '上海大学', - jwb: [ - { - title: '教务处通知公告', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-da-xue', - source: ['/index/:type'], - target: '/shu/jwb/:type', - }, - ], - www: [ - { - title: '官网信息', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-da-xue', - source: ['/:type'], - target: '/shu/:type', - }, - ], - }, -}; diff --git a/lib/routes/shu/router.ts b/lib/routes/shu/router.ts deleted file mode 100644 index 1faa752d4..000000000 --- a/lib/routes/shu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); - router.get('/jwc/:type?', './jwb'); // TODO: deprecated, remove this line when someone update this file next time - router.get('/jwb/:type?', './jwb'); -}; diff --git a/lib/routes/shuiguopai/index.ts b/lib/routes/shuiguopai/index.ts index 03e147228..9f04574cd 100644 --- a/lib/routes/shuiguopai/index.ts +++ b/lib/routes/shuiguopai/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['shuiguopai.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'shuiguopai.com/', +}; + +async function handler(ctx) { const rootUrl = 'https://sgptv.vip'; const apiRootUrl = 'https://api.cbbee0.com'; const listUrl = `${apiRootUrl}/v1_2/homePage`; @@ -82,9 +95,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '水果派', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/shuiguopai/maintainer.ts b/lib/routes/shuiguopai/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/shuiguopai/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/shuiguopai/namespace.ts b/lib/routes/shuiguopai/namespace.ts new file mode 100644 index 000000000..c6bedb145 --- /dev/null +++ b/lib/routes/shuiguopai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '水果派', + url: 'shuiguopai.com', +}; diff --git a/lib/routes/shuiguopai/radar.ts b/lib/routes/shuiguopai/radar.ts deleted file mode 100644 index 4f769c311..000000000 --- a/lib/routes/shuiguopai/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'shuiguopai.com': { - _name: '水果派', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#shui-guo-pai-shou-ye', - source: ['/'], - target: '/shuiguopai', - }, - ], - }, -}; diff --git a/lib/routes/shuiguopai/router.ts b/lib/routes/shuiguopai/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/shuiguopai/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/sicau/dky.ts b/lib/routes/sicau/dky.ts index deaed62e8..5b5b2179a 100644 --- a/lib/routes/sicau/dky.ts +++ b/lib/routes/sicau/dky.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/dky/:category?', + categories: ['university'], + example: '/sicau/dky/tzgg', + parameters: { category: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dky.sicau.edu.cn/'], + }, + name: '动物科技学院', + maintainers: ['nczitzk'], + handler, + url: 'dky.sicau.edu.cn/', + description: `| 通知公告 | 学院动态 | 教学管理 | 动科大讲堂 | 就业信息 | + | -------- | -------- | -------- | ---------- | -------- | + | tzgg | xydt | jxgl | dkdjt | zpxx |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'tzgg'; const rootUrl = 'https://dky.sicau.edu.cn'; @@ -45,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sicau/maintainer.ts b/lib/routes/sicau/maintainer.ts deleted file mode 100644 index 5ce255de9..000000000 --- a/lib/routes/sicau/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/dky/:category?': ['nczitzk'], - '/yan/:category?': ['nczitzk'], - '/zsjy/:category?': ['nczitzk'], -}; diff --git a/lib/routes/sicau/namespace.ts b/lib/routes/sicau/namespace.ts new file mode 100644 index 000000000..ad63336b5 --- /dev/null +++ b/lib/routes/sicau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四川农业大学', + url: 'dky.sicau.edu.cn', +}; diff --git a/lib/routes/sicau/radar.ts b/lib/routes/sicau/radar.ts deleted file mode 100644 index c6f68f5ac..000000000 --- a/lib/routes/sicau/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'sicau.edu.cn': { - _name: '', - dky: [ - { - title: '招生就业', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-nong-ye-da-xue-zhao-sheng-jiu-ye', - source: ['/'], - target: '/sicau/zsjy/:category?', - }, - { - title: '动物科技学院', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-nong-ye-da-xue', - source: ['/'], - target: '/sicau/dky/:category?', - }, - ], - yan: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-nong-ye-da-xue', - source: ['/'], - target: '/sicau/yan/:category?', - }, - ], - }, -}; diff --git a/lib/routes/sicau/router.ts b/lib/routes/sicau/router.ts deleted file mode 100644 index 0b74ca1db..000000000 --- a/lib/routes/sicau/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/dky/:category?', './dky'); - router.get('/yan/:category?', './yan'); - router.get('/zsjy/:category?', './zsjy'); -}; diff --git a/lib/routes/sicau/yan.ts b/lib/routes/sicau/yan.ts index da96d503a..e518e9a66 100644 --- a/lib/routes/sicau/yan.ts +++ b/lib/routes/sicau/yan.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/yan/:category?', + categories: ['university'], + example: '/sicau/yan/xwgg', + parameters: { category: '分类,见下表,默认为新闻公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yan.sicau.edu.cn/'], + }, + name: '研究生院', + maintainers: ['nczitzk'], + handler, + url: 'yan.sicau.edu.cn/', + description: `| 新闻公告 | 学术报告 | + | -------- | -------- | + | xwgg | xsbg |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'xwgg'; const rootUrl = 'https://yan.sicau.edu.cn'; @@ -45,9 +71,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sicau/zsjy.ts b/lib/routes/sicau/zsjy.ts index f2ac1e627..afecc141a 100644 --- a/lib/routes/sicau/zsjy.ts +++ b/lib/routes/sicau/zsjy.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zsjy/:category?', + categories: ['university'], + example: '/sicau/zsjy/bkszs', + parameters: { category: '分类,见下表,默认为本科生招生' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['dky.sicau.edu.cn/'], + }, + name: '招生就业', + maintainers: ['nczitzk'], + handler, + url: 'dky.sicau.edu.cn/', + description: `| 本科生招生 | 研究生招生 | 毕业生选录指南 | + | ---------- | ---------- | -------------- | + | bkszs | yjszs | bysxlzn |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'bkszs'; const rootUrl = 'https://dky.sicau.edu.cn'; @@ -46,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sigsac/ccs.ts b/lib/routes/sigsac/ccs.ts index 8bb350dbd..98194bf24 100644 --- a/lib/routes/sigsac/ccs.ts +++ b/lib/routes/sigsac/ccs.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const url = 'https://www.sigsac.org/'; import { parseDate } from '@/utils/parse-date'; // https://www.sigsac.org/ccs/CCS2022/program/accepted-papers.html -export default async (ctx) => { +export const route: Route = { + path: '/ccs', + categories: ['journal'], + example: '/sigsac/ccs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sigsac.org/ccs.html', 'sigsac.org/'], + }, + name: 'The ACM Conference on Computer and Communications Security', + maintainers: [], + handler, + url: 'sigsac.org/ccs.html', + description: `Return results from 2020`, +}; + +async function handler() { const last = new Date().getFullYear() + 1; const yearList = Array.from({ length: last - 2020 }, (_, v) => `${url}ccs/CCS${v + 2020}/`); const yearResponses = await got.all(yearList.map((url) => got(url))); @@ -47,11 +71,11 @@ export default async (ctx) => { return paperSection.length ? paperSection : paperTable; }); - ctx.set('data', { + return { title: 'ACM CCS', link: url, description: 'The ACM Conference on Computer and Communications Security (CCS) Accepted Papers', allowEmpty: true, item: items.flat(), - }); -}; + }; +} diff --git a/lib/routes/sigsac/maintainer.ts b/lib/routes/sigsac/maintainer.ts deleted file mode 100644 index d8fa9ef56..000000000 --- a/lib/routes/sigsac/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/ccs/': ['ZeddYu'], -}; diff --git a/lib/routes/sigsac/namespace.ts b/lib/routes/sigsac/namespace.ts new file mode 100644 index 000000000..3adbea9e4 --- /dev/null +++ b/lib/routes/sigsac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ACM Special Interest Group on Security Audit and Control', + url: 'sigsac.org', +}; diff --git a/lib/routes/sigsac/radar.ts b/lib/routes/sigsac/radar.ts deleted file mode 100644 index 206291250..000000000 --- a/lib/routes/sigsac/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sigsac.org': { - _name: 'ACM Special Interest Group on Security Audit and Control', - '.': [ - { - title: 'ACM Conference on Computer and Communications Security', - docs: 'https://docs.rsshub.app/routes/journal#acm-special-interest-group-on-security-audit-and-control', - source: ['/ccs.html', '/'], - target: '/sigsac/ccs', - }, - ], - }, -}; diff --git a/lib/routes/sigsac/router.ts b/lib/routes/sigsac/router.ts deleted file mode 100644 index 5b63e9fa9..000000000 --- a/lib/routes/sigsac/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/ccs', './ccs'); -}; diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index 819e30060..49ddabc9b 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,40 @@ import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/simpleinfo', + parameters: { category: '分类名' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['blog.simpleinfo.cc/blog/:category'], + target: '/:category', + }, + name: '志祺七七', + maintainers: ['haukeng'], + handler, + description: `| 夥伴聊聊 | 專案設計 | + | -------- | -------- | + | work | talk | + + | 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 | + | ---------- | ---------- | ---------- | --------------------- | + | news | politics | society | psychology-philosophy | + + | 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 | + | ---------- | ------------------ | ---------- | ------------ | ------------ | + | science | environment-health | acg | book-sharing | other-topics |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const rootUrl = 'https://blog.simpleinfo.cc'; const link = `${rootUrl}${category ? (category === 'work' || category === 'talk' ? `/blog/${category}` : `/shasha77?category=${category}`) : '/shasha77'}`; @@ -45,10 +79,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link, language: 'zh-tw', item: items, - }); -}; + }; +} diff --git a/lib/routes/simpleinfo/maintainer.ts b/lib/routes/simpleinfo/maintainer.ts deleted file mode 100644 index 4e22064c3..000000000 --- a/lib/routes/simpleinfo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['haukeng'], -}; diff --git a/lib/routes/simpleinfo/namespace.ts b/lib/routes/simpleinfo/namespace.ts new file mode 100644 index 000000000..aebbcb29a --- /dev/null +++ b/lib/routes/simpleinfo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '簡訊設計', + url: 'blog.simpleinfo.cc', +}; diff --git a/lib/routes/simpleinfo/radar.ts b/lib/routes/simpleinfo/radar.ts deleted file mode 100644 index 5143e3e96..000000000 --- a/lib/routes/simpleinfo/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'blog.simpleinfo.cc': { - _name: '簡訊設計', - '.': [ - { - title: '志祺七七', - docs: 'https://docs.rsshub.app/routes/new-media#jian-xun-she-ji', - source: '/shasha77', - target: (_, url) => `/simpleinfo/${new URL(url).searchParams.get('category')}`, - }, - { - title: '夥伴聊聊 / 專案作品', - docs: 'https://docs.rsshub.app/routes/new-media#jian-xun-she-ji', - source: '/blog/:category', - target: '/simpleinfo/:category', - }, - ], - }, -}; diff --git a/lib/routes/simpleinfo/router.ts b/lib/routes/simpleinfo/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/simpleinfo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/sina/chuangshiji.ts b/lib/routes/sina/chuangshiji.ts index 330b47c9c..20a4a05ef 100644 --- a/lib/routes/sina/chuangshiji.ts +++ b/lib/routes/sina/chuangshiji.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getRollNewsList, parseRollNewsList, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/csj', + categories: ['new-media'], + example: '/sina/csj', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tech.sina.com.cn/chuangshiji', 'tech.sina.com.cn/'], + }, + name: '专栏 - 创事记', + maintainers: ['xapool'], + handler, + url: 'tech.sina.com.cn/chuangshiji', +}; + +async function handler(ctx) { const pageid = '402'; const lid = '2559'; const { limit = '50' } = ctx.req.query(); @@ -10,9 +33,9 @@ export default async (ctx) => { const out = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '新浪专栏-创事记', link: 'https://tech.sina.com.cn/chuangshiji', item: out, - }); -}; + }; +} diff --git a/lib/routes/sina/discovery.ts b/lib/routes/sina/discovery.ts index 0414749cd..6af21973c 100644 --- a/lib/routes/sina/discovery.ts +++ b/lib/routes/sina/discovery.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getRollNewsList, parseRollNewsList, parseArticle } from './utils'; @@ -13,7 +14,28 @@ const map = new Map([ ['kjqy', { title: '科技前沿', id: '1802' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/discovery/:type', + categories: ['new-media'], + example: '/sina/discovery/zx', + parameters: { type: '订阅分区类型,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '科技 - 科学探索', + maintainers: ['LogicJake'], + handler, + description: `| 最新 | 天文航空 | 动物植物 | 自然地理 | 历史考古 | 生命医学 | 生活百科 | 科技前沿 | + | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const lid = map.get(type).id; const title = map.get(type).title; @@ -25,9 +47,9 @@ export default async (ctx) => { const out = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `${title}-新浪科技科学探索`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/sina/finance/china.ts b/lib/routes/sina/finance/china.ts index 81bdc06a2..6e2df44df 100644 --- a/lib/routes/sina/finance/china.ts +++ b/lib/routes/sina/finance/china.ts @@ -1,7 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getRollNewsList, parseRollNewsList, parseArticle } from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/finance/china/:lid?', + categories: ['new-media'], + example: '/sina/finance/china', + parameters: { lid: '分区 id,见下表,默认为 `1686`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['finance.sina.com.cn/china', 'finance.sina.com.cn/'], + target: '/finance/china', + }, + name: '财经-国內', + maintainers: ['yubinbai'], + handler, + url: 'finance.sina.com.cn/china', + description: `| 国内滚动 | 宏观经济 | 金融新闻 | 地方经济 | 部委动态 | 今日财经 TOP10 | + | -------- | -------- | -------- | -------- | -------- | -------------- | + | 1686 | 1687 | 1690 | 1688 | 1689 | 3231 |`, +}; + +async function handler(ctx) { const map = { 1686: '国内滚动', 1687: '宏观经济', @@ -18,9 +45,9 @@ export default async (ctx) => { const out = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `新浪财经-${map[lid]}`, link: 'http://finance.sina.com.cn/china/', item: out, - }); -}; + }; +} diff --git a/lib/routes/sina/finance/stock/usstock.ts b/lib/routes/sina/finance/stock/usstock.ts index 3f7c589d8..4ded80c55 100644 --- a/lib/routes/sina/finance/stock/usstock.ts +++ b/lib/routes/sina/finance/stock/usstock.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { parseArticle } from '../../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/finance/stock/usstock/:cids?', + categories: ['new-media'], + example: '/sina/finance/stock/usstock', + parameters: { cids: '分区 id,见下表,默认为 `57045`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['finance.sina.com.cn/stock/usstock', 'finance.sina.com.cn/'], + target: '/finance/stock/usstock', + }, + name: '美股', + maintainers: ['TonyRL'], + handler, + url: 'finance.sina.com.cn/stock/usstock', + description: `| 最新报道 | 中概股 | 国际财经 | 互联网 | + | -------- | ------ | -------- | ------ | + | 57045 | 57046 | 56409 | 40811 |`, +}; + +async function handler(ctx) { const { cids = '57045' } = ctx.req.param(); const { limit = '50' } = ctx.req.query(); const { data: response } = await got('https://interface.sina.cn/pc_api/public_news_data.d.json', { @@ -30,9 +57,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: '美股|美股行情|美股新闻 - 新浪财经', link: 'https://finance.sina.com.cn/stock/usstock/', item: items, - }); -}; + }; +} diff --git a/lib/routes/sina/maintainer.ts b/lib/routes/sina/maintainer.ts deleted file mode 100644 index 71df43a07..000000000 --- a/lib/routes/sina/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/csj': ['xapool'], - '/discovery/:type': ['LogicJake'], - '/finance/china/:lid?': ['yubinbai'], - '/finance/stock/usstock/:cids?': ['TonyRL'], - '/rollnews/:lid?': ['xyqfer'], - '/sports/:type?': ['nczitzk'], -}; diff --git a/lib/routes/sina/namespace.ts b/lib/routes/sina/namespace.ts new file mode 100644 index 000000000..963869786 --- /dev/null +++ b/lib/routes/sina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新浪', + url: 'finance.sina.com.cn', +}; diff --git a/lib/routes/sina/radar.ts b/lib/routes/sina/radar.ts deleted file mode 100644 index 5d56f9d84..000000000 --- a/lib/routes/sina/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'sina.com.cn': { - _name: '新浪', - finance: [ - { - title: '财经 - 国內', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/china', '/'], - target: '/sina/finance/china', - }, - { - title: '美股', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/stock/usstock', '/'], - target: '/sina/finance/stock/usstock', - }, - ], - news: [ - { - title: '滚动新闻', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/roll'], - target: (_, url) => `/sina/rollnews/${new URL(url).hash.match(/lid=(\d+)/)[1]}`, - }, - ], - sports: [ - { - title: '体育 - 综合', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/others/:type', '/:type'], - target: (params) => `/sina/sports/${params.type}`, - }, - ], - tech: [ - { - title: '专栏 - 创事记', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/chuangshiji', '/'], - target: '/sina/csj', - }, - { - title: '科技 - 科学探索', - docs: 'https://docs.rsshub.app/routes/new-media#xin-lang', - source: ['/discovery', '/'], - target: '/sina/discovery/zx', - }, - ], - }, -}; diff --git a/lib/routes/sina/rollnews.ts b/lib/routes/sina/rollnews.ts index 07d5cf1e0..c0a89efb2 100644 --- a/lib/routes/sina/rollnews.ts +++ b/lib/routes/sina/rollnews.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getRollNewsList, parseRollNewsList, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/rollnews/:lid?', + categories: ['new-media'], + example: '/sina/rollnews', + parameters: { lid: '分区 id,可在 URL 中找到,默认为 `2509`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '滚动新闻', + maintainers: ['xyqfer'], + handler, + description: `| 全部 | 国内 | 国际 | 社会 | 体育 | 娱乐 | 军事 | 科技 | 财经 | 股市 | 美股 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 |`, +}; + +async function handler(ctx) { const map = { 2509: '全部', 2510: '国内', @@ -24,9 +46,9 @@ export default async (ctx) => { const out = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `新浪${map[lid]}滚动新闻`, link: `https://news.sina.com.cn/roll/#pageid=${pageid}&lid=${lid}&k=&num=${limit}&page=1`, item: out, - }); -}; + }; +} diff --git a/lib/routes/sina/router.ts b/lib/routes/sina/router.ts deleted file mode 100644 index 61f838bbd..000000000 --- a/lib/routes/sina/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/csj', './chuangshiji'); - router.get('/discovery/:type', './discovery'); - router.get('/finance/china/:lid?', './finance/china'); - router.get('/finance/stock/usstock/:cids?', './finance/stock/usstock'); - router.get('/rollnews/:lid?', './rollnews'); - router.get('/sports/:type?', './sports'); -}; diff --git a/lib/routes/sina/sports.ts b/lib/routes/sina/sports.ts index 6a518bb2e..637c8418b 100644 --- a/lib/routes/sina/sports.ts +++ b/lib/routes/sina/sports.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/sports/:type?', + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); let currentUrl = `https://sports.sina.com.cn/others/${type}.shtml`; @@ -35,10 +43,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `${$('title').text().split('_')[0]} - 新浪体育`, description: $('meta[name="description"]').attr('content'), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sinchew/index.ts b/lib/routes/sinchew/index.ts index 6d85f52d2..b4db67cf0 100644 --- a/lib/routes/sinchew/index.ts +++ b/lib/routes/sinchew/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + radar: { + source: ['sinchew.com.my/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'sinchew.com.my/', +}; + +async function handler(ctx) { const rootUrl = 'https://www.sinchew.com.my'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '' : getSubPath(ctx)}`; @@ -65,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sinchew/maintainer.ts b/lib/routes/sinchew/maintainer.ts deleted file mode 100644 index eaac34c74..000000000 --- a/lib/routes/sinchew/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/category/:category?': ['nczitzk'], - '/latest': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/sinchew/namespace.ts b/lib/routes/sinchew/namespace.ts new file mode 100644 index 000000000..f68110e7e --- /dev/null +++ b/lib/routes/sinchew/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '星洲网', + url: 'sinchew.com.my', +}; diff --git a/lib/routes/sinchew/radar.ts b/lib/routes/sinchew/radar.ts deleted file mode 100644 index 3fc2e6751..000000000 --- a/lib/routes/sinchew/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'sinchew.com.my': { - _name: '星洲网', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/traditional-media#xing-zhou-wang-shou-ye', - source: ['/'], - target: '/sinchew', - }, - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/traditional-media#xing-zhou-wang-zui-xin', - source: ['/latest', '/'], - target: '/sinchew/latest', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#xing-zhou-wang-fen-lei', - source: ['/category/:category', '/'], - target: (params, url) => `/sinchew/category/${new URL(url).toString().match(/\/category\/(.*)$/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/sinchew/router.ts b/lib/routes/sinchew/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/sinchew/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/sis001/forum.ts b/lib/routes/sis001/forum.ts index 7f2b06aeb..784db054e 100644 --- a/lib/routes/sis001/forum.ts +++ b/lib/routes/sis001/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const baseUrl = 'https://www.sis001.com'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id?', + categories: ['bbs'], + example: '/sis001/forum/322', + parameters: { id: '子版块 ID,可在子论坛 URL 找到,默认为 `Funny Jokes | 短篇笑话区`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '子版块', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { id = 76 } = ctx.req.param(); const url = `${baseUrl}/forum/forum-${id}-1.html`; @@ -54,10 +73,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/sis001/maintainer.ts b/lib/routes/sis001/maintainer.ts deleted file mode 100644 index 13ad76930..000000000 --- a/lib/routes/sis001/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/forum/:id': ['TonyRL'], -}; diff --git a/lib/routes/sis001/namespace.ts b/lib/routes/sis001/namespace.ts new file mode 100644 index 000000000..42ca5d651 --- /dev/null +++ b/lib/routes/sis001/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '第一会所', + url: 'sis001.com', +}; diff --git a/lib/routes/sis001/radar.ts b/lib/routes/sis001/radar.ts deleted file mode 100644 index 9f19e588d..000000000 --- a/lib/routes/sis001/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sis001.com': { - _name: '第一会所', - '.': [ - { - title: '子版块', - docs: 'https://docs.rsshub.app/routes/bbs#di-yi-hui-suo', - source: ['/forum/:id'], - target: (params) => `/sis001/forum/${params.id.replace('forum-', '').replace('-1.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/sis001/router.ts b/lib/routes/sis001/router.ts deleted file mode 100644 index fbe01a2d7..000000000 --- a/lib/routes/sis001/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/forum/:id?', './forum'); -}; diff --git a/lib/routes/sjtu/gs.ts b/lib/routes/sjtu/gs.ts index d0cbee929..7155a87cc 100644 --- a/lib/routes/sjtu/gs.ts +++ b/lib/routes/sjtu/gs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,44 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { fetchArticle } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/gs/:type/:num?', + categories: ['university'], + example: '/sjtu/gs/enroll/59', + parameters: { type: '类别', num: '细分类别, 仅对`type`为`enroll`或`exchange`有效' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.sjtu.edu.cn/announcement/:type'], + target: '/gs/:type', + }, + name: '研究生通知公告', + maintainers: ['dzx-dzx'], + handler, + description: `| 工作信息 | 招生信息 | 培养信息 | 学位学科 | 国际交流 | 创新工程 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | work | enroll | train | degree | exchange | xsjy | + + 当\`type\`为\`enroll\`, \`num\`可选字段: + + | 58 | 59 | 60 | 61 | 62 | + | -------- | -------- | ---------- | -------- | -------- | + | 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | + + 当\`type\`为\`exchange\`, \`num\`可选字段: + + | 67 | 68 | 69 | 70 | 71 | + | -------------- | -------------- | -------------- | -------------- | -------------- | + | 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const num = ctx.req.param('num') ?? ''; @@ -53,9 +91,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${num === '' ? '' : `${$('.category-nav-block .active').text().trim()} - `}${$('div.inner-banner-text .title').text().trim()} - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sjtu/jwc.ts b/lib/routes/sjtu/jwc.ts index 0c764f442..0b726132a 100644 --- a/lib/routes/sjtu/jwc.ts +++ b/lib/routes/sjtu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -26,7 +27,28 @@ async function getFullArticle(link) { return content.html() + ($('.Newslist2').length ? $('.Newslist2').html() : ''); } -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/sjtu/jwc', + parameters: { type: '默认为 notice' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处通知公告', + maintainers: ['SeanChao'], + handler, + description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | + | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | + | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'notice'; const config = { all: { @@ -109,9 +131,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '上海交通大学教务处 ' + config[type].section, link: sectionLink, item: out, - }); -}; + }; +} diff --git a/lib/routes/sjtu/maintainer.ts b/lib/routes/sjtu/maintainer.ts deleted file mode 100644 index 02ce1fbb0..000000000 --- a/lib/routes/sjtu/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/gs/:type/:num?': ['dzx-dzx'], - '/jwc/:type?': ['SeanChao'], - '/seiee/academic': ['HenryQW'], - '/seiee/bjwb/:type': ['Polynomia'], - '/seiee/xsb/:type?': ['Polynomia', 'xxchan'], - '/tongqu/:type?': ['SeanChao'], - '/yzb/zkxx/:type': ['stdrc'], -}; diff --git a/lib/routes/sjtu/namespace.ts b/lib/routes/sjtu/namespace.ts new file mode 100644 index 000000000..eaa03d155 --- /dev/null +++ b/lib/routes/sjtu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海交通大学', + url: 'bjwb.seiee.sjtu.edu.cn', +}; diff --git a/lib/routes/sjtu/radar.ts b/lib/routes/sjtu/radar.ts deleted file mode 100644 index 75e38b168..000000000 --- a/lib/routes/sjtu/radar.ts +++ /dev/null @@ -1,126 +0,0 @@ -export default { - 'sjtu.edu.cn': { - _name: '上海交通大学', - 'bjwb.seiee': [ - { - title: '电子信息与电气工程学院', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-jiao-tong-da-xue', - source: ['/seiee/list/:type', '/bkjwb/list/:type', '/xsb/list/:type'], - target: (params) => { - let type = ''; - switch (params.type) { - // /sjtu/seiee/academic - case '683-1-20.htm': - type = 'academic'; - break; - // /sjtu/seiee/bjwb/:type - case '1503-1-20.htm': - type = 'bjwb/academic'; - break; - case '1505-1-20.htm': - type = 'bjwb/academic'; - break; - case '1506-1-20.htm': - type = 'bjwb/postgraduate'; - break; - case '1507-1-20.htm': - type = 'bjwb/abroad'; - break; - case '2281-1-20.htm': - type = 'bjwb/international'; - break; - // /sjtu/seiee/xsb/:type? - case '2938-1-20.htm': - type = 'xsb/news'; - break; - case '611-1-20.htm': - type = 'xsb/scholarship'; - break; - case '2676-1-20.htm': - type = 'xsb/activity'; - break; - case '1981-1-20.htm': - type = 'xsb/lecture'; - break; - case '705-1-20.htm': - type = 'xsb/all'; - break; - case '1001-1-20.htm': - type = 'xsb/financialAid'; - break; - case '3016-1-20.htm': - type = 'xsb/zhcp'; - break; - default: - return null; - } - return `/sjtu/seiee/${type}`; - }, - }, - ], - gs: [ - { - title: '研究生通知公告', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-jiao-tong-da-xue-yan-jiu-sheng-tong-zhi-gong-gao', - source: ['/announcement/:type'], - target: '/sjtu/gs/:type', - }, - ], - jwc: [ - { - title: '教务处通知公告', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-jiao-tong-da-xue', - source: ['/xwtg/:type'], - target: (params) => { - let type = ''; - switch (params.type) { - case 'xwzx.htm': - type = 'news'; - break; - case 'tztg.htm': - case '': - type = 'notice'; - break; - case 'jxyx.htm': - type = 'operation'; - break; - case 'zcxw.htm': - type = 'affairs'; - break; - case 'yjb.htm': - type = 'yjb'; - break; - case 'jgb.htm': - type = 'jgb'; - break; - case 'zhb.htm': - type = 'zhb'; - break; - case 'yywz.htm': - type = 'language'; - break; - case 'ghyzb.htm': - type = 'party'; - break; - case 'tsjy.htm': - type = 'ge'; - break; - default: - type = 'notice'; - break; - } - return `/sjtu/jwc/${type}`; - }, - }, - ], - tongqu: [{ title: '同去网最新活动', docs: 'https://docs.rsshub.app/routes/university#shang-hai-jiao-tong-da-xue' }], - yzb: [ - { - title: '研究生招生网招考信息', - docs: 'https://docs.rsshub.app/routes/university#shang-hai-jiao-tong-da-xue', - source: ['/index/zkxx/:type'], - target: (params) => `/sjtu/yzb/zkxx/${params.type.replace('.htm', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/sjtu/router.ts b/lib/routes/sjtu/router.ts deleted file mode 100644 index 1b9204bc4..000000000 --- a/lib/routes/sjtu/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/gs/:type/:num?', './gs'); - router.get('/jwc/:type?', './jwc'); - router.get('/seiee/academic', './seiee/academic'); - router.get('/seiee/bjwb/:type', './seiee/bjwb'); - router.get('/seiee/xsb/:type?', './seiee/xsb'); - router.get('/tongqu/:type?', './tongqu/activity'); - router.get('/yzb/zkxx/:type', './yzb/zkxx'); -}; diff --git a/lib/routes/sjtu/seiee/utils.ts b/lib/routes/sjtu/seiee/utils.ts index 75ce02869..2ba1d9fd9 100644 --- a/lib/routes/sjtu/seiee/utils.ts +++ b/lib/routes/sjtu/seiee/utils.ts @@ -32,10 +32,10 @@ export default function (meta, extract) { }) ); - ctx.set('data', { + return { title, link, item: out, - }); + }; }; } diff --git a/lib/routes/sjtu/tongqu/activity.ts b/lib/routes/sjtu/tongqu/activity.ts index 7a76aac1a..912301ec4 100644 --- a/lib/routes/sjtu/tongqu/activity.ts +++ b/lib/routes/sjtu/tongqu/activity.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,28 @@ import * as path from 'node:path'; const urlRoot = 'https://tongqu.sjtu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/tongqu/:type?', + categories: ['university'], + example: '/sjtu/tongqu/lecture', + parameters: { type: '类型,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '同去网最新活动', + maintainers: ['SeanChao'], + handler, + description: `| 全部 | 最新 | 招新 | 讲座 | 户外 | 招聘 | 游学 | 比赛 | 公益 | 主题党日 | 学生事务 | 广告 | 其他 | + | ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ | + | all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'all'; const config = { all: 0, @@ -39,9 +61,9 @@ export default async (ctx) => { description: art(path.join(__dirname, '../templates/activity.art'), { e }), })); - ctx.set('data', { + return { title: '同去网活动', link, item: feeds, - }); -}; + }; +} diff --git a/lib/routes/sjtu/yzb/zkxx.ts b/lib/routes/sjtu/yzb/zkxx.ts index b17bea1e6..a90cbb629 100644 --- a/lib/routes/sjtu/yzb/zkxx.ts +++ b/lib/routes/sjtu/yzb/zkxx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const baseTitle = '上海交通大学研究生招生网招考信息'; const baseUrl = 'https://yzb.sjtu.edu.cn/index/zkxx/'; -export default async (ctx) => { +export const route: Route = { + path: '/yzb/zkxx/:type', + categories: ['university'], + example: '/sjtu/yzb/zkxx/sszs', + parameters: { type: '无默认选项' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生招生网招考信息', + maintainers: ['stdrc'], + handler, + description: `| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | + | -------- | -------- | ---------- | -------- | -------- | + | bszs | sszs | gatzs | kdxx | yxdt |`, +}; + +async function handler(ctx) { const pageUrl = `${baseUrl}${ctx.req.param('type')}.htm`; const response = await got({ @@ -18,7 +40,7 @@ export default async (ctx) => { const $ = load(response.data); - ctx.set('data', { + return { link: pageUrl, title: `${baseTitle} -- ${$('title').text().split('-')[0]}`, item: $('li[id^="line"] a') @@ -28,5 +50,5 @@ export default async (ctx) => { title: elem.attribs.title, pubDate: parseDate($(elem.next).text().trim()), })), - }); -}; + }; +} diff --git a/lib/routes/skysports/maintainer.ts b/lib/routes/skysports/maintainer.ts deleted file mode 100644 index d13b1b30e..000000000 --- a/lib/routes/skysports/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:team': ['nczitzk'], -}; diff --git a/lib/routes/skysports/namespace.ts b/lib/routes/skysports/namespace.ts new file mode 100644 index 000000000..df4e6542f --- /dev/null +++ b/lib/routes/skysports/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sky Sports', + url: 'skysports.com', +}; diff --git a/lib/routes/skysports/news.ts b/lib/routes/skysports/news.ts index 32a85f360..5c297fbff 100644 --- a/lib/routes/skysports/news.ts +++ b/lib/routes/skysports/news.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:team', + categories: ['new-media'], + example: '/skysports/news/ac-milan', + parameters: { team: 'Team id, can be found in URL to the team page' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const team = ctx.req.param('team'); const rootUrl = 'https://www.skysports.com'; @@ -48,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/skysports/radar.ts b/lib/routes/skysports/radar.ts deleted file mode 100644 index 1f550de16..000000000 --- a/lib/routes/skysports/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'skysports.com': { - _name: 'Sky Sports', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/new-media#sky-sports-news', - source: ['/'], - target: (params, url) => `/skysports/news/${new URL(url).toString().match(/\/(.*)-news$/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/skysports/router.ts b/lib/routes/skysports/router.ts deleted file mode 100644 index 9f0512b64..000000000 --- a/lib/routes/skysports/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:team', './news'); -}; diff --git a/lib/routes/slowmist/maintainer.ts b/lib/routes/slowmist/maintainer.ts deleted file mode 100644 index ca6bb2341..000000000 --- a/lib/routes/slowmist/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['AtlasQuan'], -}; diff --git a/lib/routes/slowmist/namespace.ts b/lib/routes/slowmist/namespace.ts new file mode 100644 index 000000000..e955bf77e --- /dev/null +++ b/lib/routes/slowmist/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '慢雾科技', + url: 'slowmist.com', +}; diff --git a/lib/routes/slowmist/radar.ts b/lib/routes/slowmist/radar.ts deleted file mode 100644 index afc59035e..000000000 --- a/lib/routes/slowmist/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'slowmist.com': { - _name: '慢雾科技 SLOWMIST', - '.': [ - { - title: '动态', - docs: 'https://docs.rsshub.app/routes/new-media#man-wu-ke-ji', - source: ['/zh/news.html'], - target: '/slowmist/:type?', - }, - ], - }, -}; diff --git a/lib/routes/slowmist/router.ts b/lib/routes/slowmist/router.ts deleted file mode 100644 index adf4cfbfa..000000000 --- a/lib/routes/slowmist/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './slowmist'); -}; diff --git a/lib/routes/slowmist/slowmist.ts b/lib/routes/slowmist/slowmist.ts index 4683b7804..0b859ca5b 100644 --- a/lib/routes/slowmist/slowmist.ts +++ b/lib/routes/slowmist/slowmist.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.slowmist.com'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['new-media'], + example: '/slowmist/research', + parameters: { type: '分类,见下表,默认为公司新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['slowmist.com/zh/news.html'], + }, + name: '动态', + maintainers: ['AtlasQuan'], + handler, + url: 'slowmist.com/zh/news.html', + description: `| 公司新闻 | 漏洞披露 | 技术研究 | + | -------- | -------- | -------- | + | news | vul | research |`, +}; + +async function handler(ctx) { let type = ctx.req.param('type'); let title = '慢雾科技 - '; @@ -41,9 +67,9 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/smashingmagazine/category.ts b/lib/routes/smashingmagazine/category.ts index e8d266932..2162da629 100644 --- a/lib/routes/smashingmagazine/category.ts +++ b/lib/routes/smashingmagazine/category.ts @@ -1,9 +1,68 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['programming'], + example: '/smashingmagazine/react', + parameters: { category: 'Find in URL or Table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['smashingmagazine.com/category/:category'], + target: '/:category', + }, + name: 'Category', + maintainers: ['Rjnishant530'], + handler, + url: 'smashingmagazine.com/articles/', + description: `| **Category** | | + | ------------------ | ------------------ | + | Accessibility | accessibility | + | Best practices | best-practices | + | Business | business | + | Career | career | + | Checklists | checklists | + | CSS | css | + | Data Visualization | data-visualization | + | Design | design | + | Design Patterns | design-patterns | + | Design Systems | design-systems | + | E-Commerce | e-commerce | + | Figma | figma | + | Freebies | freebies | + | HTML | html | + | Illustrator | illustrator | + | Inspiration | inspiration | + | JavaScript | javascript | + | Mobile | mobile | + | Performance | performance | + | Privacy | privacy | + | React | react | + | Responsive Design | responsive-design | + | Round-Ups | round-ups | + | SEO | seo | + | Typography | typography | + | Tools | tools | + | UI | ui | + | Usability | usability | + | UX | ux | + | Vue | vue | + | Wallpapers | wallpapers | + | Web Design | web-design | + | Workflow | workflow |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const baseUrl = 'https://www.smashingmagazine.com'; const route = category ? `/category/${category}` : '/articles'; @@ -52,7 +111,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Smashing Magazine Articles', link: `${baseUrl}${route}`, item: items, @@ -60,5 +119,5 @@ export default async (ctx) => { logo: 'https://www.smashingmagazine.com/images/favicon/apple-touch-icon.png', icon: 'https://www.smashingmagazine.com/images/favicon/favicon.svg', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/smashingmagazine/maintainer.ts b/lib/routes/smashingmagazine/maintainer.ts deleted file mode 100644 index 3fdb89556..000000000 --- a/lib/routes/smashingmagazine/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['Rjnishant530'], -}; diff --git a/lib/routes/smashingmagazine/namespace.ts b/lib/routes/smashingmagazine/namespace.ts new file mode 100644 index 000000000..60a7f1d15 --- /dev/null +++ b/lib/routes/smashingmagazine/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Smashing Magazine', + url: 'smashingmagazine.com', +}; diff --git a/lib/routes/smashingmagazine/radar.ts b/lib/routes/smashingmagazine/radar.ts deleted file mode 100644 index 564c0a9f3..000000000 --- a/lib/routes/smashingmagazine/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'smashingmagazine.com': { - _name: 'Smashing Magazine', - '.': [ - { - title: 'Articles', - docs: 'https://docs.rsshub.app/routes/programming#a-list-apart', - source: ['/articles/'], - target: '/smashingmagazine', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/programming#a-list-apart', - source: ['/category/:category'], - target: '/smashingmagazine/:category', - }, - ], - }, -}; diff --git a/lib/routes/smashingmagazine/router.ts b/lib/routes/smashingmagazine/router.ts deleted file mode 100644 index 22dfff62d..000000000 --- a/lib/routes/smashingmagazine/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './category'); -}; diff --git a/lib/routes/smzdm/article.ts b/lib/routes/smzdm/article.ts index 21b48710d..b7666e3af 100644 --- a/lib/routes/smzdm/article.ts +++ b/lib/routes/smzdm/article.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/article/:uid', + categories: ['shopping'], + example: '/smzdm/article/6902738986', + parameters: { uid: '用户id,网址上直接可以看到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhiyou.smzdm.com/member/:uid/article'], + }, + name: '用户文章', + maintainers: ['xfangbao'], + handler, +}; + +async function handler(ctx) { const link = `https://zhiyou.smzdm.com/member/${ctx.req.param('uid')}/article/`; const response = await got(link); @@ -36,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title}-什么值得买`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/smzdm/baoliao.ts b/lib/routes/smzdm/baoliao.ts index 3b4a9b0bc..d81ac3c94 100644 --- a/lib/routes/smzdm/baoliao.ts +++ b/lib/routes/smzdm/baoliao.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/baoliao/:uid', + categories: ['shopping'], + example: '/smzdm/baoliao/7367111021', + parameters: { uid: '用户id,网址上直接可以看到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhiyou.smzdm.com/member/:uid/baoliao'], + }, + name: '用户爆料', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const link = `https://zhiyou.smzdm.com/member/${ctx.req.param('uid')}/baoliao/`; const response = await got(link); @@ -36,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title}的爆料 - 什么值得买`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/smzdm/haowen-fenlei.ts b/lib/routes/smzdm/haowen-fenlei.ts index aafd0467f..005c1d12c 100644 --- a/lib/routes/smzdm/haowen-fenlei.ts +++ b/lib/routes/smzdm/haowen-fenlei.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/haowen/fenlei/:name/:sort?', + categories: ['shopping'], + example: '/smzdm/haowen/fenlei/shenghuodianqi', + parameters: { name: '分类名,可在 URL 中查看', sort: '排序方式,默认为最新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['post.smzdm.com/fenlei/:name'], + target: '/haowen/fenlei/:name', + }, + name: '好文分类', + maintainers: ['LogicJake'], + handler, + description: `| 最新 | 周排行 | 月排行 | + | ---- | ------ | ------ | + | 0 | 7 | 30 |`, +}; + +async function handler(ctx) { const name = ctx.req.param('name'); const sort = ctx.req.param('sort') || '0'; @@ -44,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title}- 什么值得买好文分类`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/smzdm/haowen.ts b/lib/routes/smzdm/haowen.ts index 48264b0f7..a7732cc65 100644 --- a/lib/routes/smzdm/haowen.ts +++ b/lib/routes/smzdm/haowen.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/haowen/:day?', + categories: ['shopping'], + example: '/smzdm/haowen/1', + parameters: { day: '以天为时间跨度,默认为 `all`,其余可以选择 `1`,`7`,`30`,`365`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '好文', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const day = ctx.req.param('day') ?? 'all'; const link = `https://post.smzdm.com/hot_${day}/`; @@ -41,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${title}-什么值得买好文`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/smzdm/keyword.ts b/lib/routes/smzdm/keyword.ts index 9664789e0..d5d4799a2 100644 --- a/lib/routes/smzdm/keyword.ts +++ b/lib/routes/smzdm/keyword.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/keyword/:keyword', + categories: ['shopping'], + example: '/smzdm/keyword/女装', + parameters: { keyword: '你想订阅的关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '关键词', + maintainers: ['DIYgod', 'MeanZhang'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const response = await got(`https://search.smzdm.com`, { @@ -24,7 +43,7 @@ export default async (ctx) => { const $ = load(data); const list = $('.feed-row-wide'); - ctx.set('data', { + return { title: `${keyword} - 什么值得买`, link: `https://search.smzdm.com/?c=home&s=${encodeURIComponent(keyword)}&order=time`, item: @@ -38,5 +57,5 @@ export default async (ctx) => { link: item.find('.feed-block-title a').attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/smzdm/maintainer.ts b/lib/routes/smzdm/maintainer.ts deleted file mode 100644 index f4041cacf..000000000 --- a/lib/routes/smzdm/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/article/:uid': ['xfangbao'], - '/baoliao/:uid': ['nczitzk'], - '/haowen/:day?': ['LogicJake'], - '/haowen/fenlei/:name/:sort?': ['LogicJake'], - '/keyword/:keyword': ['DIYgod', 'MeanZhang'], - '/ranking/:rank_type/:rank_id/:hour': ['DIYgod'], -}; diff --git a/lib/routes/smzdm/namespace.ts b/lib/routes/smzdm/namespace.ts new file mode 100644 index 000000000..85fc6c216 --- /dev/null +++ b/lib/routes/smzdm/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '什么值得买', + url: 'post.smzdm.com', + description: `:::tip +网站也提供了部分 RSS: [https://www.smzdm.com/dingyue](https://www.smzdm.com/dingyue) +:::`, +}; diff --git a/lib/routes/smzdm/radar.ts b/lib/routes/smzdm/radar.ts deleted file mode 100644 index 57213a102..000000000 --- a/lib/routes/smzdm/radar.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default { - 'smzdm.com': { - _name: '什么值得买', - post: [ - { - title: '好文', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: '/:day', - target: (params) => `/smzdm/haowen/${params.day.replace('hot_', '')}`, - }, - { - title: '好文分类', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: ['/fenlei/:name'], - target: '/smzdm/haowen/fenlei/:name', - }, - ], - search: [ - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: '/', - target: (_, url) => `/smzdm/keyword/${new URL(url).searchParams.get('s')}`, - }, - ], - www: [ - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: '/top', - }, - ], - zhiyou: [ - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: '/member/:uid/article', - target: '/smzdm/article/:uid', - }, - { - title: '用户爆料', - docs: 'https://docs.rsshub.app/routes/shopping#shen-me-zhi-de-mai', - source: '/member/:uid/baoliao', - target: '/smzdm/baoliao/:uid', - }, - ], - }, -}; diff --git a/lib/routes/smzdm/ranking.ts b/lib/routes/smzdm/ranking.ts index 665db0fcc..c12be8399 100644 --- a/lib/routes/smzdm/ranking.ts +++ b/lib/routes/smzdm/ranking.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; @@ -12,7 +13,68 @@ const getTrueHour = (rank_type, rank_id, hour) => { } }; -export default async (ctx) => { +export const route: Route = { + path: '/ranking/:rank_type/:rank_id/:hour', + categories: ['shopping'], + example: '/smzdm/ranking/pinlei/11/3', + parameters: { rank_type: '榜单类型', rank_id: '榜单ID', hour: '时间跨度' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + 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) { const { rank_type, rank_id, hour } = ctx.req.param(); // When the hour is 3, some special rank_id require a special hour num @@ -42,7 +104,7 @@ export default async (ctx) => { } const list = [...list1, ...list2]; - ctx.set('data', { + return { title: `${rank_type}榜-${rank_id}-${hour}小时`, link: 'https://www.smzdm.com/top/', allowEmpty: true, @@ -52,5 +114,5 @@ export default async (ctx) => { pubDate: timezone(item.article_pubdate, +8), link: item.article_url, })), - }); -}; + }; +} diff --git a/lib/routes/smzdm/router.ts b/lib/routes/smzdm/router.ts deleted file mode 100644 index bc1cab07c..000000000 --- a/lib/routes/smzdm/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/article/:uid', './article'); - router.get('/baoliao/:uid', './baoliao'); - router.get('/haowen/:day?', './haowen'); - router.get('/haowen/fenlei/:name/:sort?', './haowen-fenlei'); - router.get('/keyword/:keyword', './keyword'); - router.get('/ranking/:rank_type/:rank_id/:hour', './ranking'); -}; diff --git a/lib/routes/snowpeak/maintainer.ts b/lib/routes/snowpeak/maintainer.ts deleted file mode 100644 index 1d5231e0d..000000000 --- a/lib/routes/snowpeak/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/us/new-arrivals': ['EthanWng97'], -}; diff --git a/lib/routes/snowpeak/namespace.ts b/lib/routes/snowpeak/namespace.ts new file mode 100644 index 000000000..883689e7f --- /dev/null +++ b/lib/routes/snowpeak/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Snow Peak', + url: 'snowpeak.com', +}; diff --git a/lib/routes/snowpeak/radar.ts b/lib/routes/snowpeak/radar.ts deleted file mode 100644 index 6acb1f049..000000000 --- a/lib/routes/snowpeak/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'snowpeak.com': { - _name: 'Snow Peak', - '.': [ - { - title: 'New Arrivals(USA)', - docs: 'https://docs.rsshub.app/routes/shopping#snow-peak', - source: ['/collections/new-arrivals', '/'], - target: '/snowpeak/us/new-arrivals', - }, - ], - }, -}; diff --git a/lib/routes/snowpeak/router.ts b/lib/routes/snowpeak/router.ts deleted file mode 100644 index b81754ec8..000000000 --- a/lib/routes/snowpeak/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/us/new-arrivals', './us-new-arrivals'); -}; diff --git a/lib/routes/snowpeak/us-new-arrivals.ts b/lib/routes/snowpeak/us-new-arrivals.ts index a3abd0059..8fb97dcc5 100644 --- a/lib/routes/snowpeak/us-new-arrivals.ts +++ b/lib/routes/snowpeak/us-new-arrivals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { load } from 'cheerio'; const host = 'https://www.snowpeak.com'; -export default async (ctx) => { +export const route: Route = { + path: '/us/new-arrivals', + categories: ['shopping'], + example: '/snowpeak/us/new-arrivals', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['snowpeak.com/collections/new-arrivals', 'snowpeak.com/'], + }, + name: 'New Arrivals(USA)', + maintainers: ['EthanWng97'], + handler, + url: 'snowpeak.com/collections/new-arrivals', +}; + +async function handler() { const url = `${host}/collections/new-arrivals`; const response = await got({ method: 'get', @@ -33,7 +56,7 @@ export default async (ctx) => { return data; }) .get(); - ctx.set('data', { + return { title: 'Snow Peak - New Arrivals', link: `${host}/new-arrivals`, description: 'Snow Peak - New Arrivals', @@ -44,5 +67,5 @@ export default async (ctx) => { pubDate: item.pubDate, link: item.link, })), - }); -}; + }; +} diff --git a/lib/routes/sobooks/date.ts b/lib/routes/sobooks/date.ts index 03675b458..2eb105ea2 100644 --- a/lib/routes/sobooks/date.ts +++ b/lib/routes/sobooks/date.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/date/:date?', + categories: ['reading'], + example: '/sobooks/date/2020-11', + parameters: { date: '日期,见例子,默认为当前年月' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sobooks.net/:category'], + target: '/:category', + }, + name: '归档', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const date = ctx.req.param('date') ?? `${new Date().getFullYear()}/${new Date().getMonth()}`; ctx.set('data', await utils(ctx, `books/date/${date.replace('-', '/')}`)); -}; +} diff --git a/lib/routes/sobooks/index.ts b/lib/routes/sobooks/index.ts index bba1f4b1a..e308fbcc7 100644 --- a/lib/routes/sobooks/index.ts +++ b/lib/routes/sobooks/index.ts @@ -1,7 +1,40 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['reading'], + example: '/sobooks', + parameters: { category: '分类, 见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sobooks.net/:category'], + target: '/:category', + }, + name: '首页', + maintainers: ['nczitzk'], + handler, + description: `| 分类 | 分类名 | + | -------- | ---------------- | + | 小说文学 | xiaoshuowenxue | + | 历史传记 | lishizhuanji | + | 人文社科 | renwensheke | + | 励志成功 | lizhichenggong | + | 经济管理 | jingjiguanli | + | 学习教育 | xuexijiaoyu | + | 生活时尚 | shenghuoshishang | + | 英文原版 | yingwenyuanban |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; ctx.set('data', await utils(ctx, category)); -}; +} diff --git a/lib/routes/sobooks/maintainer.ts b/lib/routes/sobooks/maintainer.ts deleted file mode 100644 index 0fa36b10c..000000000 --- a/lib/routes/sobooks/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/tag/:id?': ['nczitzk'], - '/date/:date?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/sobooks/namespace.ts b/lib/routes/sobooks/namespace.ts new file mode 100644 index 000000000..1e9c392dc --- /dev/null +++ b/lib/routes/sobooks/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SoBooks', + url: 'sobooks.net', +}; diff --git a/lib/routes/sobooks/radar.ts b/lib/routes/sobooks/radar.ts deleted file mode 100644 index 04b720557..000000000 --- a/lib/routes/sobooks/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'sobooks.net': { - _name: 'SoBooks', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/reading#sobooks', - source: ['/:category'], - target: '/sobooks/:category', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/reading#sobooks', - source: ['/books/tag/:tag'], - target: '/sobooks/tag/:tag', - }, - { - title: '归档', - docs: 'https://docs.rsshub.app/routes/reading#sobooks', - source: ['/books/date/*date'], - target: (params) => `/sobooks/date/${params.date.repalce('/', '-')}`, - }, - ], - }, -}; diff --git a/lib/routes/sobooks/router.ts b/lib/routes/sobooks/router.ts deleted file mode 100644 index 648d1ab02..000000000 --- a/lib/routes/sobooks/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/tag/:id?', './tag'); - router.get('/date/:date?', './date'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/sobooks/tag.ts b/lib/routes/sobooks/tag.ts index 1d9b35711..5a10dd142 100644 --- a/lib/routes/sobooks/tag.ts +++ b/lib/routes/sobooks/tag.ts @@ -1,7 +1,39 @@ +import { Route } from '@/types'; import utils from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:id?', + categories: ['reading'], + example: '/sobooks/tag/小说', + parameters: { id: '标签, 见下表,默认为小说' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sobooks.net/books/tag/:tag'], + target: '/tag/:tag', + }, + name: '标签', + maintainers: ['nczitzk'], + handler, + description: `热门标签 + + | 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | + | 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 | + | 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 | + | 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 | + | 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 | + | 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '小说'; ctx.set('data', await utils(ctx, `books/tag/${id}`)); -}; +} diff --git a/lib/routes/sogou/doodles.ts b/lib/routes/sogou/doodles.ts index a43dbc287..1ee23c790 100644 --- a/lib/routes/sogou/doodles.ts +++ b/lib/routes/sogou/doodles.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/doodles', + categories: ['other'], + example: '/sogou/doodles', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '特色 LOGO', + maintainers: ['xyqfer'], + handler, +}; + +async function handler() { const response = await got({ method: 'get', url: 'http://help.sogou.com/logo/doodle_logo_list.html', @@ -8,7 +27,7 @@ export default async (ctx) => { const data = response.data.split(/\r\n/).slice(1); - ctx.set('data', { + return { title: '搜狗特色LOGO', link: 'http://help.sogou.com/logo/', item: data.map((item) => { @@ -22,5 +41,5 @@ export default async (ctx) => { guid: item[4], }; }), - }); -}; + }; +} diff --git a/lib/routes/sogou/maintainer.ts b/lib/routes/sogou/maintainer.ts deleted file mode 100644 index 4029ab4f7..000000000 --- a/lib/routes/sogou/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/doodles': ['xyqfer'], - '/search/:keyword': ['CaoMeiYouRen'], -}; diff --git a/lib/routes/sogou/namespace.ts b/lib/routes/sogou/namespace.ts new file mode 100644 index 000000000..dab4d6b92 --- /dev/null +++ b/lib/routes/sogou/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '搜狗', + url: 'www.sogou.com', +}; diff --git a/lib/routes/sogou/radar.ts b/lib/routes/sogou/radar.ts deleted file mode 100644 index 084e03288..000000000 --- a/lib/routes/sogou/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'sogou.com': { - _name: '搜狗', - www: [ - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/other#sou-gou-sou-suo', - source: '/', - target: (params, url) => { - const keyword = new URL(url).searchParams.get('query'); - return `/sogou/search/${keyword}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/sogou/router.ts b/lib/routes/sogou/router.ts deleted file mode 100644 index a07db9d91..000000000 --- a/lib/routes/sogou/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/doodles', './doodles'); - router.get('/search/:keyword', './search'); -}; diff --git a/lib/routes/sogou/search.ts b/lib/routes/sogou/search.ts index 7e80b3b57..98de3fca0 100644 --- a/lib/routes/sogou/search.ts +++ b/lib/routes/sogou/search.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,25 @@ import { config } from '@/config'; const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword', + categories: ['other'], + example: '/sogou/search/rss', + parameters: { keyword: '搜索关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const url = `https://www.sogou.com/web?query=${encodeURIComponent(keyword)}`; const key = `sogou-search:${url}`; @@ -49,10 +68,10 @@ export default async (ctx) => { false ); - ctx.set('data', { + return { title: `${keyword} - 搜狗搜索`, description: `${keyword} - 搜狗搜索`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/sohu/maintainer.ts b/lib/routes/sohu/maintainer.ts deleted file mode 100644 index 3d37581e5..000000000 --- a/lib/routes/sohu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/mp/:id': ['HenryQW'], -}; diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.ts index 897d581f1..5a198eefc 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,27 @@ import { parseDate } from '@/utils/parse-date'; import * as path from 'node:path'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/mp/:id', + categories: ['new-media'], + example: '/sohu/mp/119097', + parameters: { id: '搜狐号 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '更新', + maintainers: ['HenryQW'], + handler, + description: `1. 通过浏览器搜索相关搜狐号 \`果壳 site: mp.sohu.com\`。 + 2. 通过浏览器控制台执行 \`contentData.mkey\`,返回的即为搜狐号 ID。`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const authorArticleAPI = `https://v2.sohu.com/author-page-api/author-articles/pc/${id}`; @@ -61,9 +82,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `搜狐号 - ${author}`, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/sohu/namespace.ts b/lib/routes/sohu/namespace.ts new file mode 100644 index 000000000..b857e377d --- /dev/null +++ b/lib/routes/sohu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '搜狐号', + url: 'sohu.com', +}; diff --git a/lib/routes/sohu/radar.ts b/lib/routes/sohu/radar.ts deleted file mode 100644 index 44c1beee0..000000000 --- a/lib/routes/sohu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sohu.com': { - _name: '搜狐', - '.': [ - { - title: '搜狐号', - docs: 'https://docs.rsshub.app/routes/new-media#sou-hu-hao', - source: ['/a/:id'], - target: (params) => `/sohu/mp/${params.id.split('_')[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/sohu/router.ts b/lib/routes/sohu/router.ts deleted file mode 100644 index bebc12286..000000000 --- a/lib/routes/sohu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/mp/:id', './mp'); -}; diff --git a/lib/routes/solidot/main.ts b/lib/routes/solidot/main.ts index b5defdbb6..34a61afec 100644 --- a/lib/routes/solidot/main.ts +++ b/lib/routes/solidot/main.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // Warning: The author still knows nothing about javascript! @@ -9,7 +10,34 @@ import { load } from 'cheerio'; // html parser import get_article from './_article'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + categories: ['traditional-media'], + example: '/solidot/linux', + parameters: { type: '消息类型。默认为 www. 在网站上方选择后复制子域名即可' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新消息', + maintainers: ['sgqy', 'hang333', 'TonyRL'], + handler, + description: `:::tip + Solidot 提供的 feed: + + - [https://www.solidot.org/index.rss](https://www.solidot.org/index.rss) + ::: + + | 全部 | 创业 | Linux | 科学 | 科技 | 移动 | 苹果 | 硬件 | 软件 | 安全 | 游戏 | 书籍 | ask | idle | 博客 | 云计算 | 奇客故事 | + | ---- | ------- | ----- | ------- | ---------- | ------ | ----- | -------- | -------- | -------- | ----- | ----- | --- | ---- | ---- | ------ | -------- | + | www | startup | linux | science | technology | mobile | apple | hardware | software | security | games | books | ask | idle | blog | cloud | story |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'www'; if (!isValidHost(type)) { throw new Error('Invalid type'); @@ -34,9 +62,9 @@ export default async (ctx) => { const msg_list = await Promise.all(urls.map((u) => cache.tryGet(u, () => get_article(u)))); // feed the data - ctx.set('data', { + return { title: '奇客的资讯,重要的东西', link: base_url, item: msg_list, - }); -}; + }; +} diff --git a/lib/routes/solidot/maintainer.ts b/lib/routes/solidot/maintainer.ts deleted file mode 100644 index d2e1a40b3..000000000 --- a/lib/routes/solidot/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['sgqy', 'hang333', 'TonyRL'], -}; diff --git a/lib/routes/solidot/namespace.ts b/lib/routes/solidot/namespace.ts new file mode 100644 index 000000000..da8e7dc28 --- /dev/null +++ b/lib/routes/solidot/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Solidot', + url: 'www.solidot.org', +}; diff --git a/lib/routes/solidot/radar.ts b/lib/routes/solidot/radar.ts deleted file mode 100644 index 279a872b5..000000000 --- a/lib/routes/solidot/radar.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default { - 'solidot.org': { - _name: 'Solidot', - www: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/www', - }, - ], - linux: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/linux', - }, - ], - science: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/science', - }, - ], - technology: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/technology', - }, - ], - mobile: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/mobile', - }, - ], - apple: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/apple', - }, - ], - hardware: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/hardware', - }, - ], - software: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/software', - }, - ], - security: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/security', - }, - ], - games: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/games', - }, - ], - books: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/books', - }, - ], - idle: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/idle', - }, - ], - cloud: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/cloud', - }, - ], - story: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#solidot', - source: ['/'], - target: '/solidot/story', - }, - ], - }, -}; diff --git a/lib/routes/solidot/router.ts b/lib/routes/solidot/router.ts deleted file mode 100644 index 227d20a1c..000000000 --- a/lib/routes/solidot/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './main'); -}; diff --git a/lib/routes/sony/downloads.ts b/lib/routes/sony/downloads.ts index 8d05d9f96..63651e174 100644 --- a/lib/routes/sony/downloads.ts +++ b/lib/routes/sony/downloads.ts @@ -1,7 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'https://www.sony.com'; -export default async (ctx) => { +export const route: Route = { + path: '/downloads/:productType/:productId', + categories: ['program-update'], + example: '/sony/downloads/product/nw-wm1am2', + parameters: { productType: 'product type', productId: 'product id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sony.com/electronics/support/:productType/:productId/downloads'], + }, + name: 'Software Downloads', + maintainers: ['EthanWng97'], + 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\`. + :::`, +}; + +async function handler(ctx) { const { productType, productId } = ctx.req.param(); const url = `${host}/electronics/support/${productType}/${productId}/downloads`; const response = await got({ @@ -34,7 +59,7 @@ export default async (ctx) => { } return data; }); - ctx.set('data', { + return { title: `Sony - ${productId.toUpperCase()}`, link: url, description: `Sony - ${productId.toUpperCase()}`, @@ -44,5 +69,5 @@ export default async (ctx) => { link: item.url, pubDate: item.pubDate, })), - }); -}; + }; +} diff --git a/lib/routes/sony/maintainer.ts b/lib/routes/sony/maintainer.ts deleted file mode 100644 index 9639a58ec..000000000 --- a/lib/routes/sony/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/downloads/:productType/:productId': ['EthanWng97'], -}; diff --git a/lib/routes/sony/namespace.ts b/lib/routes/sony/namespace.ts new file mode 100644 index 000000000..7a09fd386 --- /dev/null +++ b/lib/routes/sony/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sony', + url: 'sony.com', +}; diff --git a/lib/routes/sony/radar.ts b/lib/routes/sony/radar.ts deleted file mode 100644 index f5a8a096d..000000000 --- a/lib/routes/sony/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sony.com': { - _name: 'Sony', - '.': [ - { - title: 'Software Downloads', - docs: 'https://docs.rsshub.app/routes/program-update#sony', - source: ['/electronics/support/:productType/:productId/downloads'], - target: '/sony/downloads/:productType/:productId', - }, - ], - }, -}; diff --git a/lib/routes/sony/router.ts b/lib/routes/sony/router.ts deleted file mode 100644 index 4a01f99dc..000000000 --- a/lib/routes/sony/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/downloads/:productType/:productId', './downloads'); -}; diff --git a/lib/routes/soundofhope/channel.ts b/lib/routes/soundofhope/channel.ts index c8033fc60..c4d7c764a 100644 --- a/lib/routes/soundofhope/channel.ts +++ b/lib/routes/soundofhope/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,31 @@ import timezone from '@/utils/timezone'; const host = 'https://www.soundofhope.org'; -export default async (ctx) => { +export const route: Route = { + path: '/:channel/:id', + categories: ['traditional-media'], + example: '/soundofhope/term/203', + parameters: { channel: '频道', id: '子频道 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['soundofhope.org/:channel/:id'], + }, + name: '频道', + maintainers: ['Fatpandac'], + handler, + description: `参数均可在官网获取,如: + + \`https://www.soundofhope.org/term/203\` 对应 \`/soundofhope/term/203\``, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const id = ctx.req.param('id'); const url = `${host}/${channel}/${id}`; @@ -35,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `希望之声 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/soundofhope/maintainer.ts b/lib/routes/soundofhope/maintainer.ts deleted file mode 100644 index 8c77120f1..000000000 --- a/lib/routes/soundofhope/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel/:id': ['Fatpandac'], -}; diff --git a/lib/routes/soundofhope/namespace.ts b/lib/routes/soundofhope/namespace.ts new file mode 100644 index 000000000..9eaf84054 --- /dev/null +++ b/lib/routes/soundofhope/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '希望之声', + url: 'soundofhope.org', +}; diff --git a/lib/routes/soundofhope/radar.ts b/lib/routes/soundofhope/radar.ts deleted file mode 100644 index 8c0cf9af6..000000000 --- a/lib/routes/soundofhope/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'soundofhope.org': { - _name: '希望之声', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/traditional-media#xi-wang-zhi-sheng', - source: ['/:channel/:id'], - target: '/soundofhope/:channel/:id', - }, - ], - }, -}; diff --git a/lib/routes/soundofhope/router.ts b/lib/routes/soundofhope/router.ts deleted file mode 100644 index 2ab074810..000000000 --- a/lib/routes/soundofhope/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel/:id', './channel'); -}; diff --git a/lib/routes/sourceforge/index.ts b/lib/routes/sourceforge/index.ts index b638b4464..b3f181d43 100644 --- a/lib/routes/sourceforge/index.ts +++ b/lib/routes/sourceforge/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:routeParams?', + categories: ['program-update'], + example: '/sourceforge/topic=artificial-intelligence&os=windows', + parameters: { routeParams: 'route params, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Software', + maintainers: ['JimenezLi'], + handler, + description: `For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows"](https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows), thus subscribing to \`/sourceforge/topic=artificial-intelligence&os=windows\`. + + URL params can duplicate, such as \`/sourceforge/topic=artificial-intelligence&os=windows&os=linux\`.`, +}; + +async function handler(ctx) { const routeParams = ctx.req.param('routeParams'); const baseURL = 'https://sourceforge.net'; @@ -12,7 +34,7 @@ export default async (ctx) => { const $ = load(response.data); const itemList = $('ul.projects li[itemprop=itemListElement]'); - ctx.set('data', { + return { title: $('.content h1').text().trim(), link, item: itemList.toArray().map((element) => { @@ -29,5 +51,5 @@ export default async (ctx) => { pubDate, }; }), - }); -}; + }; +} diff --git a/lib/routes/sourceforge/maintainer.ts b/lib/routes/sourceforge/maintainer.ts deleted file mode 100644 index e4e394f65..000000000 --- a/lib/routes/sourceforge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:routeParams?': ['JimenezLi'], -}; diff --git a/lib/routes/sourceforge/namespace.ts b/lib/routes/sourceforge/namespace.ts new file mode 100644 index 000000000..1ca5a9ac5 --- /dev/null +++ b/lib/routes/sourceforge/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SourceForge', + url: 'www.sourceforge.net', +}; diff --git a/lib/routes/sourceforge/radar.ts b/lib/routes/sourceforge/radar.ts deleted file mode 100644 index d201bae52..000000000 --- a/lib/routes/sourceforge/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'sourceforge.net': { - _name: 'SourceForge', - www: [ - { - title: 'Software', - docs: 'https://docs.rsshub.app/routes/program-update#sourceforge', - source: '/directory', - }, - ], - }, -}; diff --git a/lib/routes/sourceforge/router.ts b/lib/routes/sourceforge/router.ts deleted file mode 100644 index 1c2aa31e1..000000000 --- a/lib/routes/sourceforge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:routeParams?', './index'); -}; diff --git a/lib/routes/southcn/maintainer.ts b/lib/routes/southcn/maintainer.ts deleted file mode 100644 index f8094cb28..000000000 --- a/lib/routes/southcn/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/nfapp/column/:column?': ['TimWu007'], - '/nfapp/reporter/:reporter': ['TimWu007'], -}; diff --git a/lib/routes/southcn/namespace.ts b/lib/routes/southcn/namespace.ts new file mode 100644 index 000000000..962c514bc --- /dev/null +++ b/lib/routes/southcn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南方网', + url: 'nfapp.southcn.com', +}; diff --git a/lib/routes/southcn/nfapp/column.ts b/lib/routes/southcn/nfapp/column.ts index d46229abe..d044a5e60 100644 --- a/lib/routes/southcn/nfapp/column.ts +++ b/lib/routes/southcn/nfapp/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,32 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/nfapp/column/:column?', + categories: ['traditional-media'], + example: '/southcn/nfapp/column/38', + parameters: { column: '栏目或南方号 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '南方 +(按栏目 ID)', + maintainers: ['TimWu007'], + handler, + description: `:::tip + 若此处输入的是栏目 ID(而非南方号 ID),则该接口会返回与输入栏目相关联栏目的文章。例如,输入栏目 ID \`38\`(广州),则返回的结果还会包含 ID 为 \`3547\`(市长报道集)的文章。 + ::: + + 1. \`pc.nfapp.southcn.com\` 下的文章页面,可通过 url 查看,例:\`http://pc.nfapp.southcn.com/13707/7491109.html\` 的栏目 ID 为 \`13707\`。 + 2. \`static.nfapp.southcn.com\` 下的文章页面,可查看网页源代码,搜索 \`columnid\`。 + 3. [https://m.nfapp.southcn.com/column/all](https://m.nfapp.southcn.com/column/all) 列出了部分栏目,\`id\` 即为栏目 ID。`, +}; + +async function handler(ctx) { const columnId = ctx.req.param('column') ?? 38; const getColumnDetail = `https://api.nfapp.southcn.com/nanfang_if/getColumn?columnId=${columnId}`; @@ -41,9 +67,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: columnName, link: columnLink, item: items, - }); -}; + }; +} diff --git a/lib/routes/southcn/nfapp/reporter.ts b/lib/routes/southcn/nfapp/reporter.ts index e3bdf039d..eb5cc62bd 100644 --- a/lib/routes/southcn/nfapp/reporter.ts +++ b/lib/routes/southcn/nfapp/reporter.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,26 @@ import { art } from '@/utils/render'; import { parseArticle } from './utils'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/nfapp/reporter/:reporter', + categories: ['traditional-media'], + example: '/southcn/nfapp/reporter/969927791', + parameters: { reporter: '作者 UUID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '南方 +(按作者)', + maintainers: ['TimWu007'], + handler, + description: `作者的 UUID 只可通过 \`static.nfapp.southcn.com\` 下的文章页面获取。点击文章下方的作者介绍,进入该作者的个人主页,即可从 url 中获取。`, +}; + +async function handler(ctx) { const reporterId = ctx.req.param('reporter'); const currentUrl = `https://api.nfapp.southcn.com/nanfang_if/reporter/list?reporterUuid=${reporterId}&pageSize=20&pageNo=1&origin=0`; @@ -29,9 +49,9 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `南方+ - ${response.data.reportInfo.reporterName}`, link: `https://static.nfapp.southcn.com/apptpl/reporterWorksList/index.html?reporterUuid=${reporterId}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/southcn/radar.ts b/lib/routes/southcn/radar.ts deleted file mode 100644 index 32f7c2354..000000000 --- a/lib/routes/southcn/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'nfapp.southcn.com': { - _name: '南方网', - '.': [ - { - title: '南方+', - docs: 'https://docs.rsshub.app/routes/traditional-media#nan-fang-wang', - source: ['/'], - }, - ], - }, -}; diff --git a/lib/routes/southcn/router.ts b/lib/routes/southcn/router.ts deleted file mode 100644 index c4a77f8fb..000000000 --- a/lib/routes/southcn/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/nfapp/column/:column?', './nfapp/column'); - router.get('/nfapp/reporter/:reporter', './nfapp/reporter'); -}; diff --git a/lib/routes/spotify/artist.ts b/lib/routes/spotify/artist.ts index b4d9625d3..670e7645a 100644 --- a/lib/routes/spotify/artist.ts +++ b/lib/routes/spotify/artist.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/artist/:id', + categories: ['multimedia'], + example: '/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1', + parameters: { id: 'Artist ID' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/artist/:id'], + }, + name: 'Artist Albums', + maintainers: ['outloudvi'], + handler, +}; + +async function handler(ctx) { const token = await utils.getPublicToken(); const id = ctx.req.param('id'); const meta = await got @@ -22,7 +44,7 @@ export default async (ctx) => { .json(); const albums = itemsResponse.items; - ctx.set('data', { + return { title: `Albums of ${meta.name}`, link: meta.external_urls.spotify, allowEmpty: true, @@ -34,5 +56,5 @@ export default async (ctx) => { link: x.external_urls.spotify, })), image: meta.images.length ? meta.images[0].url : undefined, - }); -}; + }; +} diff --git a/lib/routes/spotify/artists-top.ts b/lib/routes/spotify/artists-top.ts index 90983d4a4..cd0cc3acc 100644 --- a/lib/routes/spotify/artists-top.ts +++ b/lib/routes/spotify/artists-top.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/top/artists', + categories: ['multimedia'], + example: '/spotify/top/artists', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/'], + }, + name: 'Personal Top Artists', + maintainers: ['outloudvi'], + handler, + url: 'open.spotify.com/', +}; + +async function handler() { const token = await utils.getPrivateToken(); const itemsResponse = await got .get(`https://api.spotify.com/v1/me/top/artists`, { @@ -12,9 +35,9 @@ export default async (ctx) => { .json(); const items = itemsResponse.items; - ctx.set('data', { + return { title: `Spotify: My Top Artists`, allowEmpty: true, item: items.map((element) => utils.parseArtist(element)), - }); -}; + }; +} diff --git a/lib/routes/spotify/maintainer.ts b/lib/routes/spotify/maintainer.ts deleted file mode 100644 index 8103c6876..000000000 --- a/lib/routes/spotify/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/artist/:id': ['outloudvi'], - '/playlist/:id': ['outloudvi'], - '/saved/:limit?': ['outloudvi'], - '/show/:id': ['caiohsramos'], - '/top/tracks': ['outloudvi'], - '/top/artists': ['outloudvi'], -}; diff --git a/lib/routes/spotify/namespace.ts b/lib/routes/spotify/namespace.ts new file mode 100644 index 000000000..20b9e3dca --- /dev/null +++ b/lib/routes/spotify/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Spotify', + url: 'open.spotify.com', +}; diff --git a/lib/routes/spotify/playlist.ts b/lib/routes/spotify/playlist.ts index 5e2668a39..409afa916 100644 --- a/lib/routes/spotify/playlist.ts +++ b/lib/routes/spotify/playlist.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/playlist/:id', + categories: ['multimedia'], + example: '/spotify/playlist/4UBVy1LttvodwivPUuwJk2', + parameters: { id: 'Playlist ID' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/playlist/:id'], + }, + name: 'Playlist', + maintainers: ['outloudvi'], + handler, +}; + +async function handler(ctx) { const token = await utils.getPublicToken(); const id = ctx.req.param('id'); const meta = await got @@ -14,7 +36,7 @@ export default async (ctx) => { .json(); const tracks = meta.tracks.items; - ctx.set('data', { + return { title: meta.name, link: meta.external_urls.spotify, description: meta.description, @@ -24,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(x.added_at), })), image: meta.images.length ? meta.images[0].url : undefined, - }); -}; + }; +} diff --git a/lib/routes/spotify/radar.ts b/lib/routes/spotify/radar.ts deleted file mode 100644 index 1d35ff7ef..000000000 --- a/lib/routes/spotify/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'spotify.com': { - _name: 'Spotify', - open: [ - { - title: '歌手专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/artist/:id'], - target: '/spotify/artist/:id', - }, - { - title: '播放列表', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/playlist/:id'], - target: '/spotify/playlist/:id', - }, - { - title: '用户 Saved Tracks', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/collection/tracks'], - target: '/spotify/saved', - }, - { - title: '节目', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/show/:id'], - target: '/spotify/show/:id', - }, - { - title: '用户 Top Artists', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/'], - target: '/spotify/top/artists', - }, - { - title: '用户 Top Tracks', - docs: 'https://docs.rsshub.app/routes/multimedia#spotify', - source: ['/'], - target: '/spotify/top/tracks', - }, - ], - }, -}; diff --git a/lib/routes/spotify/router.ts b/lib/routes/spotify/router.ts deleted file mode 100644 index ecc2c3112..000000000 --- a/lib/routes/spotify/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/artist/:id', './artist'); - router.get('/playlist/:id', './playlist'); - router.get('/saved/:limit?', './saved'); - router.get('/show/:id', './show'); - router.get('/top/artists', './artists-top'); - router.get('/top/tracks', './tracks-top'); -}; diff --git a/lib/routes/spotify/saved.ts b/lib/routes/spotify/saved.ts index 6afd65e4f..9e92f3c52 100644 --- a/lib/routes/spotify/saved.ts +++ b/lib/routes/spotify/saved.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/saved/:limit?', + categories: ['multimedia'], + example: '/spotify/saved/50', + parameters: { limit: 'Track count, 50 by default' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/collection/tracks'], + target: '/saved', + }, + name: 'Personal Saved Tracks', + maintainers: ['outloudvi'], + handler, + url: 'open.spotify.com/collection/tracks', +}; + +async function handler(ctx) { const token = await utils.getPrivateToken(); const limit = ctx.req.param('limit'); @@ -17,7 +41,7 @@ export default async (ctx) => { .json(); const tracks = itemsResponse.items; - ctx.set('data', { + return { title: 'Spotify: My Saved Tracks', link: 'https://open.spotify.com/collection/tracks', description: `Latest ${pageSize} saved tracks on Spotify.`, @@ -26,5 +50,5 @@ export default async (ctx) => { ...utils.parseTrack(x.track), pubDate: parseDate(x.added_at), })), - }); -}; + }; +} diff --git a/lib/routes/spotify/show.ts b/lib/routes/spotify/show.ts index 0eb684ef6..3f26f60ff 100644 --- a/lib/routes/spotify/show.ts +++ b/lib/routes/spotify/show.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/show/:id', + categories: ['multimedia'], + example: '/spotify/show/5CfCWKI5pZ28U0uOzXkDHe', + parameters: { id: 'Show ID' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/show/:id'], + }, + name: 'Show', + maintainers: ['caiohsramos'], + handler, +}; + +async function handler(ctx) { const token = await utils.getPublicToken(); const id = ctx.req.param('id'); @@ -16,7 +38,7 @@ export default async (ctx) => { const episodes = meta.episodes.items; - ctx.set('data', { + return { title: meta.name, description: meta.description, link: meta.external_urls.spotify, @@ -36,5 +58,5 @@ export default async (ctx) => { enclosure_type: 'audio/mpeg', })), image: meta.images.length ? meta.images[0].url : undefined, - }); -}; + }; +} diff --git a/lib/routes/spotify/tracks-top.ts b/lib/routes/spotify/tracks-top.ts index 5bd558d72..a148ddb78 100644 --- a/lib/routes/spotify/tracks-top.ts +++ b/lib/routes/spotify/tracks-top.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/top/tracks', + categories: ['multimedia'], + example: '/spotify/top/tracks', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['open.spotify.com/'], + }, + name: 'Personal Top Tracks', + maintainers: ['outloudvi'], + handler, + url: 'open.spotify.com/', +}; + +async function handler() { const token = await utils.getPrivateToken(); const itemsResponse = await got .get(`https://api.spotify.com/v1/me/top/tracks`, { @@ -12,9 +35,9 @@ export default async (ctx) => { .json(); const items = itemsResponse.items; - ctx.set('data', { + return { title: `Spotify: My Top Tracks`, allowEmpty: true, item: items.map((element) => utils.parseTrack(element)), - }); -}; + }; +} diff --git a/lib/routes/springer/journal.ts b/lib/routes/springer/journal.ts index 03988c335..c82c08b7b 100644 --- a/lib/routes/springer/journal.ts +++ b/lib/routes/springer/journal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,28 @@ import { art } from '@/utils/render'; import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); -export default async (ctx) => { +export const route: Route = { + path: '/journal/:journal', + categories: ['journal'], + example: '/springer/journal/10450', + parameters: { journal: 'Journal Code, the number in the URL from the journal homepage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.springer.com/journal/:journal/*'], + }, + name: 'Journal', + maintainers: ['Derekmini', 'TonyRL'], + handler, +}; + +async function handler(ctx) { const host = 'https://www.springer.com'; const journal = ctx.req.param('journal'); const jrnlUrl = `${host}/journal/${journal}`; @@ -68,9 +90,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: jrnlName, link: jrnlUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/springer/maintainer.ts b/lib/routes/springer/maintainer.ts deleted file mode 100755 index ee248d38a..000000000 --- a/lib/routes/springer/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/journal/:journal': ['Derekmini', 'TonyRL'], -}; diff --git a/lib/routes/springer/namespace.ts b/lib/routes/springer/namespace.ts new file mode 100644 index 000000000..311d8908d --- /dev/null +++ b/lib/routes/springer/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Springer', + url: 'www.springer.com', +}; diff --git a/lib/routes/springer/radar.ts b/lib/routes/springer/radar.ts deleted file mode 100755 index 227526f6b..000000000 --- a/lib/routes/springer/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'springer.com': { - _name: 'Springer', - www: [ - { - title: 'latest', - docs: 'https://docs.rsshub.app/routes/journal#Springer', - source: '/journal/:journal/*', - target: '/springer/journal/:journal', - }, - ], - }, -}; diff --git a/lib/routes/springer/router.ts b/lib/routes/springer/router.ts deleted file mode 100755 index d88a34837..000000000 --- a/lib/routes/springer/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journal/:journal', './journal'); -}; diff --git a/lib/routes/sputniknews/index.ts b/lib/routes/sputniknews/index.ts index 93e5624a4..0e0f1e41d 100644 --- a/lib/routes/sputniknews/index.ts +++ b/lib/routes/sputniknews/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -36,7 +37,71 @@ const languages = { portuguese: 'https://br.sputniknews.com', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:language?', + categories: ['traditional-media'], + example: '/sputniknews', + parameters: { category: 'Category, can be found in URL, `news` by default', language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `Categories for International site: + + | WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION | + | ----- | -------- | -------- | ----- | ---- | ------- | + | world | covid-19 | business | sport | tech | opinion | + + Categories for Chinese site: + + | 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 | + | ---- | ----- | ------ | --------------- | ------------------------ | ------- | + | news | china | russia | category\_guoji | russia\_china\_relations | opinion | + + Language + + | Language | Id | + | ----------- | ----------- | + | English | english | + | Spanish | spanish | + | German | german | + | French | french | + | Greek | greek | + | Italian | italian | + | Czech | czech | + | Polish | polish | + | Serbian | serbian | + | Latvian | latvian | + | Lithuanian | lithuanian | + | Moldavian | moldavian | + | Belarusian | belarusian | + | Armenian | armenian | + | Abkhaz | abkhaz | + | Ssetian | ssetian | + | Georgian | georgian | + | Azerbaijani | azerbaijani | + | Arabic | arabic | + | Turkish | turkish | + | Persian | persian | + | Dari | dari | + | Kazakh | kazakh | + | Kyrgyz | kyrgyz | + | Uzbek | uzbek | + | Tajik | tajik | + | Vietnamese | vietnamese | + | Japanese | japanese | + | Chinese | chinese | + | Portuguese | portuguese |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'news'; const language = ctx.req.param('language') ?? 'english'; @@ -87,9 +152,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${category} - Sputnik News`, link: `${rootUrl}/${category}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/sputniknews/maintainer.ts b/lib/routes/sputniknews/maintainer.ts deleted file mode 100644 index dfebb1f9d..000000000 --- a/lib/routes/sputniknews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:language?': ['nczitzk'], -}; diff --git a/lib/routes/sputniknews/namespace.ts b/lib/routes/sputniknews/namespace.ts new file mode 100644 index 000000000..762bce7a9 --- /dev/null +++ b/lib/routes/sputniknews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sputnik News 俄罗斯卫星通讯社', + url: 'sputniknews.cn', +}; diff --git a/lib/routes/sputniknews/radar.ts b/lib/routes/sputniknews/radar.ts deleted file mode 100644 index 9598c89dd..000000000 --- a/lib/routes/sputniknews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sputniknews.cn': { - _name: '俄罗斯卫星通讯社', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/traditional-media#e-luo-si-wei-xing-tong-xun-she-fen-lei', - source: ['/:category', '/'], - target: '/sputniknews/:category/:language', - }, - ], - }, -}; diff --git a/lib/routes/sputniknews/router.ts b/lib/routes/sputniknews/router.ts deleted file mode 100644 index e569ecced..000000000 --- a/lib/routes/sputniknews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:language?', './index'); -}; diff --git a/lib/routes/sqmc/maintainer.ts b/lib/routes/sqmc/maintainer.ts deleted file mode 100644 index 5821e6aed..000000000 --- a/lib/routes/sqmc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/www/:category?': ['nyaShine'], -}; diff --git a/lib/routes/sqmc/namespace.ts b/lib/routes/sqmc/namespace.ts new file mode 100644 index 000000000..a68bc4c61 --- /dev/null +++ b/lib/routes/sqmc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新乡医学院三全学院', + url: 'sqmc.edu.cn', +}; diff --git a/lib/routes/sqmc/radar.ts b/lib/routes/sqmc/radar.ts deleted file mode 100644 index 30cb1689b..000000000 --- a/lib/routes/sqmc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'sqmc.edu.cn': { - _name: '新乡医学院三全学院', - '.': [ - { - title: '官网信息', - docs: 'https://docs.rsshub.app/routes/university#xin-xiang-yi-xue-yuan-san-quan-xue-yuan', - source: ['/:category/list.htm'], - target: '/sqmc/www/:category?', - }, - ], - }, -}; diff --git a/lib/routes/sqmc/router.ts b/lib/routes/sqmc/router.ts deleted file mode 100644 index 1f8b3546d..000000000 --- a/lib/routes/sqmc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/www/:category?', './www'); -}; diff --git a/lib/routes/sqmc/www.ts b/lib/routes/sqmc/www.ts index a44a5b3b9..f110aee71 100644 --- a/lib/routes/sqmc/www.ts +++ b/lib/routes/sqmc/www.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/www/:category?', + categories: ['university'], + example: '/sqmc/www/3157', + parameters: { category: '分类ID,默认为`3157`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sqmc.edu.cn/:category/list.htm'], + }, + name: '官网信息', + maintainers: ['nyaShine'], + handler, + description: `| 学校要闻 | 通知 | 学术讲座 | 基层风采书院 | 基层风采院系 | 外媒报道 | 三全学院报 | + | -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- | + | 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') || '3157'; const rootUrl = 'https://www.sqmc.edu.cn'; @@ -18,7 +43,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('div#wp_news_w9 ul li').get(); - ctx.set('data', { + return { title: `新乡医学院三全学院官网信息${$('title').text()}`, link: currentUrl, item: await Promise.all( @@ -46,5 +71,5 @@ export default async (ctx) => { return cacheIn; }) ), - }); -}; + }; +} diff --git a/lib/routes/sse/convert.ts b/lib/routes/sse/convert.ts index 0dd9c461f..478f76467 100644 --- a/lib/routes/sse/convert.ts +++ b/lib/routes/sse/convert.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/convert/:query?', + categories: ['finance'], + example: '/sse/convert/beginDate=2018-08-18&endDate=2019-08-18&companyCode=603283&title=股份', + parameters: { query: '筛选条件,见示例' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '可转换公司债券公告', + maintainers: ['kt286'], + handler, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; // beginDate=2018-08-18&endDate=2019-08-18&companyCode=603283&title=股份 const pageUrl = 'https://bond.sse.com.cn/disclosure/announ/convertible/'; const host = 'https://www.sse.com.cn'; @@ -31,9 +50,9 @@ export default async (ctx) => { author: item.security_Code, })); - ctx.set('data', { + return { title: '上证债券信息网 - 可转换公司债券公告', link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sse/disclosure.ts b/lib/routes/sse/disclosure.ts index 44bbb6295..3cce8842f 100644 --- a/lib/routes/sse/disclosure.ts +++ b/lib/routes/sse/disclosure.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/disclosure/:query?', + categories: ['finance'], + example: '/sse/disclosure/beginDate=2018-08-18&endDate=2020-08-25&productId=600696', + parameters: { query: '筛选条件,见示例' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '上市公司信息最新公告披露', + maintainers: ['harveyqiu'], + handler, +}; + +async function handler(ctx) { const query = ctx.req.param('query') ?? ''; // beginDate=2018-08-18&endDate=2020-09-01&productId=600696 const queries = query.split('&').reduce((acc, cur) => { const [key, value] = cur.split('='); @@ -39,9 +58,9 @@ export default async (ctx) => { author: item.SECURITY_NAME, })); - ctx.set('data', { + return { title: `上海证券交易所 - 上市公司信息 - ${items[0].author}最新公告`, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sse/inquire.ts b/lib/routes/sse/inquire.ts index 412c3ca83..0937f5e98 100644 --- a/lib/routes/sse/inquire.ts +++ b/lib/routes/sse/inquire.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/inquire', + categories: ['finance'], + example: '/sse/inquire', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.sse.com.cn/disclosure/credibility/supervision/inquiries', 'www.sse.com.cn/'], + }, + name: '监管问询', + maintainers: ['Jeason0228'], + handler, + url: 'www.sse.com.cn/disclosure/credibility/supervision/inquiries', +}; + +async function handler() { const refererUrl = 'https://www.sse.com.cn/disclosure/credibility/supervision/inquiries/'; const response = await got('https://query.sse.com.cn/commonSoaQuery.do', { searchParams: { @@ -40,9 +63,9 @@ export default async (ctx) => { author: item.extGSJC, })); - ctx.set('data', { + return { title: '上海证券交易所 - 科创板股票审核', link: refererUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sse/lawandrules.ts b/lib/routes/sse/lawandrules.ts index fce7a7ac7..72f17adc5 100644 --- a/lib/routes/sse/lawandrules.ts +++ b/lib/routes/sse/lawandrules.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/lawandrules/:slug?', + categories: ['finance'], + example: '/sse/lawandrules', + parameters: { slug: '见下文,默认为 `latest`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '本所业务指南与流程', + maintainers: ['nczitzk'], + handler, + description: `将目标栏目的网址拆解为 \`https://www.sse.com.cn/lawandrules/guide/\` 和后面的字段,把后面的字段中的 \`/\` 替换为 \`-\`,即为该路由的 slug + + 如:(最新指南与流程)\`https://www.sse.com.cn/lawandrules/guide/latest\` 的网址在 \`https://www.sse.com.cn/lawandrules/guide/\` 后的字段是 \`latest\`,则对应的 slug 为 \`latest\`,对应的路由即为 \`/sse/lawandrules/latest\` + + 又如:(主板业务指南与流程 - 发行承销业务指南)\`https://www.sse.com.cn/lawandrules/guide/zbywznylc/fxcxywzn\` 的网址在 \`https://www.sse.com.cn/lawandrules/guide/\` 后的字段是 \`zbywznylc/fxcxywzn\`,则对应的 slug 为 \`zbywznylc-fxcxywzn\`,对应的路由即为 \`/sse/lawandrules/zbywznylc-fxcxywzn\``, +}; + +async function handler(ctx) { const slug = ctx.req.param('slug') ?? 'latest'; const rootUrl = 'https://www.sse.com.cn'; @@ -36,9 +60,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sse/maintainer.ts b/lib/routes/sse/maintainer.ts deleted file mode 100644 index afce85802..000000000 --- a/lib/routes/sse/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/convert/:query?': ['kt286'], - '/disclosure/:query?': ['harveyqiu'], - '/inquire': ['Jeason0228'], - '/lawandrules/:slug?': ['nczitzk'], - '/renewal': ['Jeason0228'], -}; diff --git a/lib/routes/sse/namespace.ts b/lib/routes/sse/namespace.ts new file mode 100644 index 000000000..3bff470eb --- /dev/null +++ b/lib/routes/sse/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海证券交易所', + url: 'bond.sse.com.cn', +}; diff --git a/lib/routes/sse/radar.ts b/lib/routes/sse/radar.ts deleted file mode 100644 index 363f038da..000000000 --- a/lib/routes/sse/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'sse.com.cn': { - _name: '上海证券交易所', - bond: [ - { - title: '可转换公司债券公告', - docs: 'https://docs.rsshub.app/routes/finance#shang-hai-zheng-quan-jiao-yi-suo', - source: ['/disclosure/announ/convertible', '/'], - // target: '/sse/convert/:query', - }, - ], - kcb: [ - { - title: '科创板项目动态', - docs: 'https://docs.rsshub.app/routes/finance#shang-hai-zheng-quan-jiao-yi-suo', - source: ['/home', '/'], - target: '/sse/renewal', - }, - ], - www: [ - { - title: '监管问询', - docs: 'https://docs.rsshub.app/routes/finance#shang-hai-zheng-quan-jiao-yi-suo', - source: ['/disclosure/credibility/supervision/inquiries', '/'], - target: '/sse/inquire', - }, - { - title: '上市公司信息最新公告披露', - docs: 'https://docs.rsshub.app/routes/finance#shang-hai-zheng-quan-jiao-yi-suo', - source: ['/assortment/stock/list/info/announcement/index.shtml', '/'], - // target: '/sse/disclosure/:query' - }, - { - title: '本所业务指南与流程', - docs: 'https://docs.rsshub.app/routes/finance#shang-hai-zheng-quan-jiao-yi-suo', - source: ['/lawandrules/guide/*slug', '/'], - target: (params) => `/sse/lawandrules/${params.slug.replaceAll('/', '-')}`, - }, - ], - }, -}; diff --git a/lib/routes/sse/renewal.ts b/lib/routes/sse/renewal.ts index 7570952de..dae0829bd 100644 --- a/lib/routes/sse/renewal.ts +++ b/lib/routes/sse/renewal.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,29 @@ dayjs.extend(localizedFormat); const currStatusName = ['全部', '已受理', '已询问', '通过', '未通过', '提交注册', '补充审核', '注册结果', '中止', '终止']; -export default async (ctx) => { +export const route: Route = { + path: '/renewal', + categories: ['finance'], + example: '/sse/renewal', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['kcb.sse.com.cn/home', 'kcb.sse.com.cn/'], + }, + name: '科创板项目动态', + maintainers: ['Jeason0228'], + handler, + url: 'kcb.sse.com.cn/home', +}; + +async function handler() { const pageUrl = 'https://kcb.sse.com.cn/renewal/'; const host = `https://kcb.sse.com.cn`; @@ -52,9 +75,9 @@ export default async (ctx) => { author: item.stockAuditName, })); - ctx.set('data', { + return { title: '上海证券交易所 - 科创板项目动态', link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/sse/router.ts b/lib/routes/sse/router.ts deleted file mode 100644 index 8d94a30fb..000000000 --- a/lib/routes/sse/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/convert/:query?', './convert'); - router.get('/disclosure/:query?', './disclosure'); - router.get('/inquire', './inquire'); - router.get('/lawandrules/:slug?', './lawandrules'); - router.get('/renewal', './renewal'); -}; diff --git a/lib/routes/ssm/maintainer.ts b/lib/routes/ssm/maintainer.ts deleted file mode 100644 index bf888fff8..000000000 --- a/lib/routes/ssm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['Fatpandac'], -}; diff --git a/lib/routes/ssm/namespace.ts b/lib/routes/ssm/namespace.ts new file mode 100644 index 000000000..58c020462 --- /dev/null +++ b/lib/routes/ssm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '澳门卫生局', + url: 'www.ssm.gov.mo', +}; diff --git a/lib/routes/ssm/news.ts b/lib/routes/ssm/news.ts index c68d9c58d..68fa2d1c3 100644 --- a/lib/routes/ssm/news.ts +++ b/lib/routes/ssm/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,29 @@ import { art } from '@/utils/render'; const rootUrl = `https://www.ssm.gov.mo`; const newsUrl = `${rootUrl}/apps1/content/ch/973/itemlist.aspx?defaultcss=false&dlimit=20&showdate=true&dorder=cridate%20desc,displaydate%20desc&withattach=true`; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['government'], + example: '/ssm/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ssm.gov.mo/', 'www.ssm.gov.mo/portal'], + }, + name: '最新消息', + maintainers: ['Fatpandac'], + handler, + url: 'www.ssm.gov.mo/', +}; + +async function handler() { const response = await got.get(newsUrl); const $ = load(response.data); const list = $('body > div > div > ul > li'); @@ -33,9 +56,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '澳门卫生局-最新消息', link: rootUrl, item, - }); -}; + }; +} diff --git a/lib/routes/ssm/radar.ts b/lib/routes/ssm/radar.ts deleted file mode 100644 index b54944cf3..000000000 --- a/lib/routes/ssm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'ssm.gov.mo': { - _name: '澳门卫生局', - www: [ - { - title: '最新消息', - docs: 'https://docs.rsshub.app/routes/government#ao-men-wei-sheng-ju-zui-xin-xiao-xi', - source: ['/', '/portal'], - target: '/ssm/news', - }, - ], - }, -}; diff --git a/lib/routes/ssm/router.ts b/lib/routes/ssm/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/ssm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/sspai/activity.ts b/lib/routes/sspai/activity.ts index a411e7850..4f196a0c9 100644 --- a/lib/routes/sspai/activity.ts +++ b/lib/routes/sspai/activity.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/activity/:slug', + categories: ['new-media'], + example: '/sspai/activity/urfp0d9i', + parameters: { slug: '作者 slug,可在作者主页URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/u/:id/updates'], + target: '/activity/:id', + }, + name: '作者动态', + maintainers: ['umm233'], + handler, +}; + +async function handler(ctx) { const slug = ctx.req.param('slug'); const link = `https://sspai.com/u/${slug}/updates`; @@ -29,7 +52,7 @@ export default async (ctx) => { let item_desc = ''; let item_url = ''; - ctx.set('data', { + return { title: `少数派用户「${user_nickname}」动态更新`, link, description: `少数派用户「${user_nickname}」的动态更新`, @@ -79,5 +102,5 @@ export default async (ctx) => { pubDate: parseDate(item.created_at * 1000), }; }), - }); -}; + }; +} diff --git a/lib/routes/sspai/author.ts b/lib/routes/sspai/author.ts index e57ad2bd0..38eebbe41 100644 --- a/lib/routes/sspai/author.ts +++ b/lib/routes/sspai/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -18,7 +19,28 @@ async function getUserId(slug) { return response.data.data.id; } -export default async (ctx) => { +export const route: Route = { + path: '/author/:id', + categories: ['new-media'], + example: '/sspai/author/796518', + parameters: { id: '作者 slug 或 id,slug 可在作者主页URL中找到,id 不易查找,仅作兼容' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/u/:id/posts'], + }, + name: '作者', + maintainers: ['SunShinenny', 'hoilc'], + handler, +}; + +async function handler(ctx) { const id = /^\d+$/.test(ctx.req.param('id')) ? ctx.req.param('id') : await getUserId(ctx.req.param('id')); const api_url = `https://sspai.com/api/v1/articles?offset=0&limit=20&author_ids=${id}&include_total=false`; const resp = await got({ @@ -49,10 +71,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${author_nickname} - 少数派作者`, link: `https://sspai.com/u/${author_slug}/posts`, description: `${author_nickname} 更新推送 `, item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/bookmarks.ts b/lib/routes/sspai/bookmarks.ts index d185bffb5..596ee098b 100644 --- a/lib/routes/sspai/bookmarks.ts +++ b/lib/routes/sspai/bookmarks.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bookmarks/:slug', + categories: ['new-media'], + example: '/sspai/bookmarks/urfp0d9i', + parameters: { slug: '用户 slug,可在个人主页URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/u/:slug/bookmark_posts'], + }, + name: '用户收藏', + maintainers: ['curly210102'], + handler, +}; + +async function handler(ctx) { const slug = ctx.req.param('slug'); const link = `https://sspai.com/u/${slug}/bookmark_posts`; @@ -26,7 +48,7 @@ export default async (ctx) => { ).data.data; const { nickname } = user; - ctx.set('data', { + return { title: `${nickname} 的全部收藏 - 少数派`, link, description: `少数派用户「${nickname}」的全部收藏`, @@ -37,5 +59,5 @@ export default async (ctx) => { pubDate: parseDate(article.released_time * 1000), author: article.author.nickname, })), - }); -}; + }; +} diff --git a/lib/routes/sspai/column.ts b/lib/routes/sspai/column.ts index d3df7b3fc..beb878a7d 100644 --- a/lib/routes/sspai/column.ts +++ b/lib/routes/sspai/column.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['new-media'], + example: '/sspai/column/262', + parameters: { id: '专栏 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/column/:id'], + }, + name: '专栏', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://sspai.com/column/${id}`; @@ -54,10 +76,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `少数派专栏-${title}`, link, description, item: out, - }); -}; + }; +} diff --git a/lib/routes/sspai/index.ts b/lib/routes/sspai/index.ts index 8b1b7ad67..81e09e587 100644 --- a/lib/routes/sspai/index.ts +++ b/lib/routes/sspai/index.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/index', + categories: ['new-media'], + example: '/sspai/index', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/index'], + }, + name: '首页', + maintainers: ['HenryQW'], + handler, + url: 'sspai.com/index', +}; + +async function handler() { const api_url = 'https://sspai.com/api/v1/article/index/page/get?limit=10&offset=0&created_at=0'; const resp = await got({ method: 'get', @@ -29,10 +52,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '少数派 -- 首页', link: 'https://sspai.com', description: '少数派 -- 首页', item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/maintainer.ts b/lib/routes/sspai/maintainer.ts deleted file mode 100644 index eb31cd7be..000000000 --- a/lib/routes/sspai/maintainer.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default { - '/activity/:slug': ['umm233'], - '/author/:id': ['SunShinenny', 'hoilc'], - '/bookmarks/:slug': ['curly210102'], - '/column/:id': ['LogicJake'], - '/index': ['HenryQW'], - '/matrix': ['feigaoxyz'], - '/series': ['HenryQW'], - '/series/:id': ['TonyRL'], - '/shortcuts': ['Andiedie'], - '/tag/:keyword': ['Jeason0228'], - '/topic/:id': ['SunShinenny'], - '/topics': ['SunShinenny'], -}; diff --git a/lib/routes/sspai/matrix.ts b/lib/routes/sspai/matrix.ts index 0c8a37508..66501ea13 100644 --- a/lib/routes/sspai/matrix.ts +++ b/lib/routes/sspai/matrix.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/matrix', + categories: ['new-media'], + example: '/sspai/matrix', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/matrix'], + }, + name: 'Matrix', + maintainers: ['feigaoxyz'], + handler, + url: 'sspai.com/matrix', +}; + +async function handler() { const api_url = 'https://sspai.com/api/v1/articles?offset=0&limit=20&is_matrix=1&sort=matrix_at&include_total=false'; const resp = await got({ method: 'get', @@ -30,10 +53,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '少数派 -- Matrix', link: 'https://sspai.com/matrix', description: '少数派 -- Matrix', item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/namespace.ts b/lib/routes/sspai/namespace.ts new file mode 100644 index 000000000..f06919315 --- /dev/null +++ b/lib/routes/sspai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '少数派 sspai', + url: 'sspai.com', +}; diff --git a/lib/routes/sspai/radar.ts b/lib/routes/sspai/radar.ts deleted file mode 100644 index 93dae8f48..000000000 --- a/lib/routes/sspai/radar.ts +++ /dev/null @@ -1,81 +0,0 @@ -export default { - 'sspai.com': { - _name: '少数派', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/index', - target: '/sspai/index', - }, - { - title: '最新上架付费专栏', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/series', - target: '/sspai/series', - }, - { - title: '付费专栏文章更新', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: ['/series/:id', '/series/:id/list', '/series/:id/metadata'], - target: '/sspai/series/:id', - }, - { - title: 'Matrix', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/matrix', - target: '/sspai/matrix', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/column/:id', - target: '/sspai/column/:id', - }, - { - title: '作者动态', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/u/:id/updates', - target: '/sspai/activity/:id', - }, - { - title: '作者已发布文章', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/u/:id/posts', - target: '/sspai/author/:id', - }, - { - title: '用户收藏', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: ['/u/:slug/bookmark_posts'], - target: '/sspai/bookmarks/:slug', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/topics', - target: '/sspai/topics', - }, - { - title: '专题内文章更新', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/topic/:id', - target: '/sspai/topic/:id', - }, - { - title: '标签订阅', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: '/tag/:keyword', - target: '/sspai/tag/:keyword', - }, - ], - shortcuts: [ - { - title: 'Shortcuts Gallery', - docs: 'https://docs.rsshub.app/routes/new-media#shao-shu-pai-sspai', - source: ['/*'], - target: '/sspai/shortcuts', - }, - ], - }, -}; diff --git a/lib/routes/sspai/router.ts b/lib/routes/sspai/router.ts deleted file mode 100644 index 2b6b2e36e..000000000 --- a/lib/routes/sspai/router.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default (router) => { - router.get('/activity/:slug', './activity'); - router.get('/author/:id', './author'); - router.get('/bookmarks/:slug', './bookmarks'); - router.get('/column/:id', './column'); - router.get('/index', './index'); - router.get('/matrix', './matrix'); - router.get('/series', './series'); - router.get('/series/:id', './series-update'); - router.get('/shortcuts', './shortcuts-gallery'); - router.get('/tag/:keyword', './tag'); - router.get('/topic/:id', './topic'); - router.get('/topics', './topics'); -}; diff --git a/lib/routes/sspai/series-update.ts b/lib/routes/sspai/series-update.ts index 3fabb9b1a..53cf8c13b 100644 --- a/lib/routes/sspai/series-update.ts +++ b/lib/routes/sspai/series-update.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/series/:id', + categories: ['new-media'], + example: '/sspai/series/77', + parameters: { id: '专栏 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/series/:id', 'sspai.com/series/:id/list', 'sspai.com/series/:id/metadata'], + }, + name: '付费专栏文章更新', + maintainers: ['TonyRL'], + handler, + url: 'sspai.com/series', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const seriesInfo = await got.get(`https://sspai.com/api/v1/series/info/get?id=${id}&view=second`); @@ -27,10 +50,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${seriesInfo.data.data.title} - 少数派`, description: `${seriesInfo.data.data.description} - 少数派`, link: `https://sspai.com/series/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/series.ts b/lib/routes/sspai/series.ts index c2201716d..2e5a1777c 100644 --- a/lib/routes/sspai/series.ts +++ b/lib/routes/sspai/series.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/series', + categories: ['new-media'], + example: '/sspai/series', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/series'], + }, + name: '最新上架付费专栏', + maintainers: ['HenryQW'], + handler, + url: 'sspai.com/series', + description: `> 少数派专栏需要付费订阅,RSS 仅做更新提醒,不含付费内容.`, +}; + +async function handler() { const response = await got('https://sspai.com/api/v1/series/tag/all/get'); const products = response.data.data.reduce((acc, cate) => { @@ -38,10 +62,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '少数派 -- 最新上架付费专栏', link: 'https://sspai.com/series', description: '少数派 -- 最新上架付费专栏', item, - }); -}; + }; +} diff --git a/lib/routes/sspai/shortcuts-gallery.ts b/lib/routes/sspai/shortcuts-gallery.ts index 641d23d6e..168711e37 100644 --- a/lib/routes/sspai/shortcuts-gallery.ts +++ b/lib/routes/sspai/shortcuts-gallery.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/shortcuts', + categories: ['new-media'], + example: '/sspai/shortcuts', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['shortcuts.sspai.com/*'], + }, + name: 'Shortcuts Gallery', + maintainers: ['Andiedie'], + handler, + url: 'shortcuts.sspai.com/*', +}; + +async function handler() { const { data: { data: categories }, } = await got('https://shortcuts.sspai.com/api/v1/user/workflow/all/get'); @@ -20,10 +43,10 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: 'Shortcuts Gallery - 少数派', link: 'https://shortcuts.sspai.com/#/main/workflow', description: 'Shortcuts Gallery - 少数派', item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/tag.ts b/lib/routes/sspai/tag.ts index fa4f5f59f..9ac4e4160 100644 --- a/lib/routes/sspai/tag.ts +++ b/lib/routes/sspai/tag.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/tag/:keyword', + categories: ['new-media'], + example: '/sspai/tag/apple', + parameters: { keyword: '关键词' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/tag/:keyword'], + }, + name: '标签订阅', + maintainers: ['Jeason0228'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const keyword_encode = encodeURIComponent(decodeURIComponent(keyword)); const api_url = `https://sspai.com/api/v1/articles?offset=0&limit=50&has_tag=1&tag=${keyword_encode}&include_total=false`; @@ -34,10 +56,10 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: `#${keyword} - 少数派`, link: host, description: `${keyword} 更新推送 `, item: items, - }); -}; + }; +} diff --git a/lib/routes/sspai/topic.ts b/lib/routes/sspai/topic.ts index e36a7f0ac..71b522555 100644 --- a/lib/routes/sspai/topic.ts +++ b/lib/routes/sspai/topic.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id', + categories: ['new-media'], + example: '/sspai/topic/250', + parameters: { id: '专题 id,可在专题主页URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/topic/:id'], + }, + name: '专题内文章更新', + maintainers: ['SunShinenny'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const api_url = `https://sspai.com/api/v1/articles?offset=0&limit=20&topic_id=${id}&sort=created_at&include_total=false`; const response = await got({ @@ -42,10 +64,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `少数派专题-${topic_title}`, link: topic_link, description: topic_des, item: out, - }); -}; + }; +} diff --git a/lib/routes/sspai/topics.ts b/lib/routes/sspai/topics.ts index 2fb2466e0..922a89be4 100644 --- a/lib/routes/sspai/topics.ts +++ b/lib/routes/sspai/topics.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topics', + categories: ['new-media'], + example: '/sspai/topics', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sspai.com/topics'], + }, + name: '专题', + maintainers: ['SunShinenny'], + handler, + url: 'sspai.com/topics', + description: `此为专题广场更新提示 => 集合型而非单篇文章。与下方 "专题内文章更新" 存在明显区别!`, +}; + +async function handler() { const api_url = `https://sspai.com/api/v1/topics?offset=0&limit=20&include_total=false`; const resp = await got({ method: 'get', @@ -29,10 +53,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `少数派专题广场更新推送`, link: `https://sspai.com/topics`, description: `仅仅推送新的专题(集合型而非具体文章) `, item: items, - }); -}; + }; +} diff --git a/lib/routes/sspu/jwc.ts b/lib/routes/sspu/jwc.ts index 475645b4b..3d4e15c76 100644 --- a/lib/routes/sspu/jwc.ts +++ b/lib/routes/sspu/jwc.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:listId', + radar: { + source: ['jwc.sspu.edu.cn/jwc/:listId/list.htm'], + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const listId = ctx.req.param('listId'); const baseUrl = 'https://jwc.sspu.edu.cn'; @@ -37,9 +48,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/sspu/maintainer.ts b/lib/routes/sspu/maintainer.ts deleted file mode 100644 index c64f53ded..000000000 --- a/lib/routes/sspu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jwc/:listId': ['TonyRL'], - '/pe/:id?': ['nczitzk'], -}; diff --git a/lib/routes/sspu/namespace.ts b/lib/routes/sspu/namespace.ts new file mode 100644 index 000000000..f9e1516ea --- /dev/null +++ b/lib/routes/sspu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '上海第二工业大学', + url: 'jwc.sspu.edu.cn', +}; diff --git a/lib/routes/sspu/pe.ts b/lib/routes/sspu/pe.ts index 415633747..2f8ab8971 100644 --- a/lib/routes/sspu/pe.ts +++ b/lib/routes/sspu/pe.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/pe/:id?', + radar: { + source: ['pe2016.sspu.edu.cn/:id/list.htm'], + target: '/pe/:id', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const { id = '342' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -52,7 +64,7 @@ export default async (ctx) => { const subtitle = $('title').text(); const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author} - ${subtitle}`, link: currentUrl, @@ -62,5 +74,5 @@ export default async (ctx) => { logo: icon, subtitle, author, - }); -}; + }; +} diff --git a/lib/routes/sspu/radar.ts b/lib/routes/sspu/radar.ts deleted file mode 100644 index 352e57f55..000000000 --- a/lib/routes/sspu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'sspu.edu.cn': { - _name: '上海第二工业大学', - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/university#shang-hai-di-er-gong-ye-da-xue', - source: ['/jwc/:listId/list.htm'], - target: '/sspu/jwc/:listId', - }, - ], - pe2016: [ - { - title: '体育部', - docs: 'https://docs.rsshub.app/university#shang-hai-di-er-gong-ye-da-xue-ti-yu-bu', - source: ['/:id/list.htm'], - target: '/sspu/pe/:id', - }, - ], - }, -}; diff --git a/lib/routes/sspu/router.ts b/lib/routes/sspu/router.ts deleted file mode 100644 index d54803699..000000000 --- a/lib/routes/sspu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jwc/:listId', './jwc'); - router.get('/pe/:id?', './pe'); -}; diff --git a/lib/routes/startuplatte/index.ts b/lib/routes/startuplatte/index.ts index 29783c283..e19e5ed9f 100644 --- a/lib/routes/startuplatte/index.ts +++ b/lib/routes/startuplatte/index.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/startuplatte', + parameters: { category: '分类,见下表,默认为首頁' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['startuplatte.com/category/:category', 'startuplatte.com/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 首頁 | 大師智慧 | 深度分析 | 新知介紹 | + | ---- | -------- | -------- | -------- | + | | quote | analysis | trend |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://startuplatte.com'; @@ -49,9 +74,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/startuplatte/maintainer.ts b/lib/routes/startuplatte/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/startuplatte/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/startuplatte/namespace.ts b/lib/routes/startuplatte/namespace.ts new file mode 100644 index 000000000..4d961bf5c --- /dev/null +++ b/lib/routes/startuplatte/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '創新拿鐵', + url: 'startuplatte.com', +}; diff --git a/lib/routes/startuplatte/radar.ts b/lib/routes/startuplatte/radar.ts deleted file mode 100644 index 3b9f0a280..000000000 --- a/lib/routes/startuplatte/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'startuplatte.com': { - _name: '創新拿鐵', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#chuang-xin-na-tie-fen-lei', - source: ['/category/:category', '/'], - target: '/startuplatte/:category?', - }, - ], - }, -}; diff --git a/lib/routes/startuplatte/router.ts b/lib/routes/startuplatte/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/startuplatte/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/stbu/jsjxy.ts b/lib/routes/stbu/jsjxy.ts index 45df6d1d0..a3087a37b 100644 --- a/lib/routes/stbu/jsjxy.ts +++ b/lib/routes/stbu/jsjxy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,32 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const gbk2utf8 = (s) => iconv.decode(s, 'gbk'); -export default async (ctx) => { +export const route: Route = { + path: '/jsjxy', + categories: ['university'], + example: '/stbu/jsjxy', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jsjxy.stbu.edu.cn/news', 'jsjxy.stbu.edu.cn/'], + }, + name: '计算机学院通知公告', + maintainers: ['HyperCherry'], + handler, + url: 'jsjxy.stbu.edu.cn/news', + description: `:::warning +计算机学院通知公告疑似禁止了非大陆 IP 访问,使用路由需要自行 [部署](https://docs.rsshub.app/install)。 +:::`, +}; + +async function handler() { const baseUrl = 'https://jsjxy.stbu.edu.cn/news/'; const { data: response } = await got(baseUrl, { responseType: 'buffer', @@ -43,10 +69,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '四川工商学院计算机学院 - 新闻动态', link: baseUrl, description: '四川工商学院计算机学院 - 新闻动态', item: items, - }); -}; + }; +} diff --git a/lib/routes/stbu/maintainer.ts b/lib/routes/stbu/maintainer.ts deleted file mode 100644 index 6fd75aa00..000000000 --- a/lib/routes/stbu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jsjxy': ['HyperCherry'], - '/xyxw': ['HyperCherry'], -}; diff --git a/lib/routes/stbu/namespace.ts b/lib/routes/stbu/namespace.ts new file mode 100644 index 000000000..5fca5944e --- /dev/null +++ b/lib/routes/stbu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四川工商学院', + url: 'stbu.edu.cn', +}; diff --git a/lib/routes/stbu/radar.ts b/lib/routes/stbu/radar.ts deleted file mode 100644 index ec29e6745..000000000 --- a/lib/routes/stbu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'stbu.edu.cn': { - _name: '四川工商学院', - '.': [ - { - title: '学院新闻', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-gong-shang-xue-yuan', - source: ['/html/news/xueyuan', '/'], - target: '/stbu/xyxw', - }, - ], - jsjxy: [ - { - title: '计算机学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#si-chuan-gong-shang-xue-yuan', - source: ['/news', '/'], - target: '/stbu/jsjxy', - }, - ], - }, -}; diff --git a/lib/routes/stbu/router.ts b/lib/routes/stbu/router.ts deleted file mode 100644 index 67db2e22d..000000000 --- a/lib/routes/stbu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jsjxy', './jsjxy'); - router.get('/xyxw', './xyxw'); -}; diff --git a/lib/routes/stbu/xyxw.ts b/lib/routes/stbu/xyxw.ts index 726a923e2..fe74e78c7 100644 --- a/lib/routes/stbu/xyxw.ts +++ b/lib/routes/stbu/xyxw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,18 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const gbk2utf8 = (s) => iconv.decode(s, 'gbk'); -export default async (ctx) => { +export const route: Route = { + path: '/xyxw', + radar: { + source: ['stbu.edu.cn/html/news/xueyuan', 'stbu.edu.cn/'], + }, + name: 'Unknown', + maintainers: ['HyperCherry'], + handler, + url: 'stbu.edu.cn/html/news/xueyuan', +}; + +async function handler() { const baseUrl = 'https://www.stbu.edu.cn'; const requestUrl = `${baseUrl}/html/news/xueyuan/`; const { data: response } = await got(requestUrl, { @@ -44,10 +56,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '四川工商学院 - 学院新闻', link: requestUrl, description: '四川工商学院 - 学院新闻', item: items, - }); -}; + }; +} diff --git a/lib/routes/stcn/index.ts b/lib/routes/stcn/index.ts index c47f0828e..162282876 100644 --- a/lib/routes/stcn/index.ts +++ b/lib/routes/stcn/index.ts @@ -1,10 +1,64 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['finance'], + example: '/stcn/yw', + parameters: { id: '栏目 id,见下表,默认为要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `| 快讯 | 要闻 | 股市 | 公司 | 数据 | + | ---- | ---- | ---- | ------- | ---- | + | kx | yw | gs | company | data | + + | 基金 | 金融 | 评论 | 产经 | 创投 | + | ---- | ------- | ------- | ---- | ---- | + | fund | finance | comment | cj | ct | + + | 科创板 | 新三板 | 投教 | ESG | 滚动 | + | ------ | ------ | ---- | --- | ---- | + | kcb | xsb | tj | zk | gd | + + | 股市一览 | 独家解读 | + | -------- | -------- | + | gsyl | djjd | + + | 公司新闻 | 公司动态 | + | -------- | -------- | + | gsxw | gsdt | + + | 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 | + | -------- | -------- | -------- | ------- | -------- | + | djsj | kd | zj | sj\_kcb | hq | + + | 专栏 | 作者 | + | ---- | ------ | + | zl | author | + + | 行业 | 汽车 | + | ---- | ---- | + | cjhy | cjqc | + + | 投教课堂 | 政策知识 | 投教动态 | 专题活动 | + | -------- | -------- | -------- | -------- | + | tjkt | zczs | tjdt | zthd |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'yw'; const rootUrl = 'https://www.stcn.com'; @@ -57,9 +111,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `证券时报网 - ${$('.breadcrumb a').last().text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/stcn/maintainer.ts b/lib/routes/stcn/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/stcn/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/stcn/namespace.ts b/lib/routes/stcn/namespace.ts new file mode 100644 index 000000000..92ff6dfbe --- /dev/null +++ b/lib/routes/stcn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '证券时报网', + url: 'stcn.com', +}; diff --git a/lib/routes/stcn/radar.ts b/lib/routes/stcn/radar.ts deleted file mode 100644 index 172355981..000000000 --- a/lib/routes/stcn/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'stcn.com': { - _name: '证券时报网', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/finance#zheng-quan-shi-bao-wang-lan-mu', - source: ['/'], - target: (params, url) => `/stcn/${new URL(url).toString().match(/article\/list\/(.*)\.html/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/stcn/router.ts b/lib/routes/stcn/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/stcn/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/stdaily/digitalpaper.ts b/lib/routes/stdaily/digitalpaper.ts index 021e9b297..b35f2fe2b 100644 --- a/lib/routes/stdaily/digitalpaper.ts +++ b/lib/routes/stdaily/digitalpaper.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -96,7 +97,25 @@ const getListArticles = async (list, cache) => { return items; }; -export default async (ctx) => { +export const route: Route = { + path: '/digitalpaper', + categories: ['traditional-media'], + example: '/stdaily/digitalpaper', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '科技日报', + maintainers: ['lyqluis'], + handler, +}; + +async function handler() { const date = new Date(); const dateStr = date.toLocaleDateString('zh-CN', { year: 'numeric', @@ -121,9 +140,9 @@ export default async (ctx) => { // get all articles const items = await getListArticles(allPageArticleLists, cache); - ctx.set('data', { + return { title: `科技日报`, link: 'http://digitalpaper.stdaily.com', item: items, - }); -}; + }; +} diff --git a/lib/routes/stdaily/maintainer.ts b/lib/routes/stdaily/maintainer.ts deleted file mode 100644 index 79dfd8695..000000000 --- a/lib/routes/stdaily/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/digitalpaper': ['lyqluis'], -}; diff --git a/lib/routes/stdaily/namespace.ts b/lib/routes/stdaily/namespace.ts new file mode 100644 index 000000000..6d15d93ca --- /dev/null +++ b/lib/routes/stdaily/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科技网', + url: 'digitalpaper.stdaily.com', +}; diff --git a/lib/routes/stdaily/radar.ts b/lib/routes/stdaily/radar.ts deleted file mode 100644 index 7f84de5aa..000000000 --- a/lib/routes/stdaily/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'stdaily.com': { - _name: '中国科技网', - digitalpaper: [ - { - title: '科技日报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhong-guo-ke-ji-wang', - }, - ], - }, -}; diff --git a/lib/routes/stdaily/router.ts b/lib/routes/stdaily/router.ts deleted file mode 100644 index b21ecddfa..000000000 --- a/lib/routes/stdaily/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/digitalpaper', './digitalpaper'); -}; diff --git a/lib/routes/stheadline/maintainer.ts b/lib/routes/stheadline/maintainer.ts deleted file mode 100644 index 44778c2a2..000000000 --- a/lib/routes/stheadline/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/std/realtime/:category*': ['TonyRL'], -}; diff --git a/lib/routes/stheadline/namespace.ts b/lib/routes/stheadline/namespace.ts new file mode 100644 index 000000000..3aae5c26d --- /dev/null +++ b/lib/routes/stheadline/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '星島日報', + url: 'std.stheadline.com', +}; diff --git a/lib/routes/stheadline/radar.ts b/lib/routes/stheadline/radar.ts deleted file mode 100644 index 7e043a68f..000000000 --- a/lib/routes/stheadline/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'stheadline.com': { - _name: '星島日報', - std: [ - { - title: '即時', - docs: 'https://docs.rsshub.app/routes/traditional-media#xing-dao-ri-bao', - source: ['/realtime/*category'], - target: (params) => `/stdheadline/std/realtime/${params.category}`, - }, - ], - }, -}; diff --git a/lib/routes/stheadline/router.ts b/lib/routes/stheadline/router.ts deleted file mode 100644 index 3f445f0fb..000000000 --- a/lib/routes/stheadline/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/std/realtime/:category{.+}?', './std/realtime'); -}; diff --git a/lib/routes/stheadline/std/realtime.ts b/lib/routes/stheadline/std/realtime.ts index 88ac8f443..7e5b9155d 100644 --- a/lib/routes/stheadline/std/realtime.ts +++ b/lib/routes/stheadline/std/realtime.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,14 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://std.stheadline.com'; -export default async (ctx) => { +export const route: Route = { + path: '/std/realtime/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = '即時' } = ctx.req.param(); const url = `${baseUrl}/realtime/${category}`; const { data: response } = await got(url); @@ -39,11 +47,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('meta[name=description]').attr('content'), image: 'https://std.stheadline.com/dist/images/favicon/icon-512.png', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/stockedge/daily-news.ts b/lib/routes/stockedge/daily-news.ts index 650560b0c..7fdc50a21 100644 --- a/lib/routes/stockedge/daily-news.ts +++ b/lib/routes/stockedge/daily-news.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getData, getList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/daily-updates/news', + categories: ['finance'], + example: '/stockedge/daily-updates/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['web.stockedge.com/daily-updates/news'], + }, + name: 'Daily Updates News', + maintainers: ['Rjnishant530'], + handler, + url: 'web.stockedge.com/daily-updates/news', +}; + +async function handler() { const baseUrl = 'https://web.stockedge.com/daily-updates?section=news'; const apiPath = 'https://api.stockedge.com/Api/DailyDashboardApi/GetLatestNewsItems'; const apiInfo = 'https://api.stockedge.com/Api/SecurityDashboardApi/GetSecurityOverview'; @@ -18,7 +41,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Stock Edge', link: baseUrl, item: items, @@ -26,5 +49,5 @@ export default async (ctx) => { logo: 'https://web.stockedge.com/assets/icon/favicon.png', icon: 'https://web.stockedge.com/assets/img/light/icon.png', language: 'en-us', - }); -}; + }; +} diff --git a/lib/routes/stockedge/maintainer.ts b/lib/routes/stockedge/maintainer.ts deleted file mode 100644 index 4c7290e27..000000000 --- a/lib/routes/stockedge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/daily-updates/news': ['Rjnishant530'], -}; diff --git a/lib/routes/stockedge/namespace.ts b/lib/routes/stockedge/namespace.ts new file mode 100644 index 000000000..1550910c8 --- /dev/null +++ b/lib/routes/stockedge/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Stock Edge', + url: 'web.stockedge.com', +}; diff --git a/lib/routes/stockedge/radar.ts b/lib/routes/stockedge/radar.ts deleted file mode 100644 index 7955190ce..000000000 --- a/lib/routes/stockedge/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'stockedge.com': { - _name: 'Stock Edge', - web: [ - { - title: 'Daily Updates News', - docs: 'https://docs.rsshub.app/routes/finance#stock-edge', - source: ['/daily-updates/news'], - target: '/stockedge/daily-updates/news', - }, - ], - }, -}; diff --git a/lib/routes/stockedge/router.ts b/lib/routes/stockedge/router.ts deleted file mode 100644 index e2e086194..000000000 --- a/lib/routes/stockedge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/daily-updates/news', './daily-news'); -}; diff --git a/lib/routes/storm/index.ts b/lib/routes/storm/index.ts index c4f12355e..4c2ea00d6 100644 --- a/lib/routes/storm/index.ts +++ b/lib/routes/storm/index.ts @@ -1,9 +1,40 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?/:id?', + categories: ['new-media'], + example: '/storm', + parameters: { category: '分类,见下表,默认为新聞總覽', id: '子分类 ID,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['storm.mg/:category/:id'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 新聞總覽 | 地方新聞 | 歷史頻道 | 評論總覽 | + | -------- | ------------- | -------- | ----------- | + | articles | localarticles | history | all-comment | + + :::tip + 支持形如 \`https://www.storm.mg/category/118\` 的路由,即 [\`/storm/category/118\`](https://rsshub.app/storm/category/118) + + 支持形如 \`https://www.storm.mg/localarticle-category/s149845\` 的路由,即 [\`/storm/localarticle-category/s149845\`](https://rsshub.app/storm/localarticle-category/s149845) + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'articles'; const id = ctx.req.param('id') ?? ''; @@ -50,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/storm/maintainer.ts b/lib/routes/storm/maintainer.ts deleted file mode 100644 index 069307bb7..000000000 --- a/lib/routes/storm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?/:id?': ['nczitzk'], -}; diff --git a/lib/routes/storm/namespace.ts b/lib/routes/storm/namespace.ts new file mode 100644 index 000000000..fe2bb53c7 --- /dev/null +++ b/lib/routes/storm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '風傳媒', + url: 'storm.mg', +}; diff --git a/lib/routes/storm/radar.ts b/lib/routes/storm/radar.ts deleted file mode 100644 index 9143c96de..000000000 --- a/lib/routes/storm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'storm.mg': { - _name: '風傳媒', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#feng-chuan-mei', - source: ['/:category/:id'], - target: '/storm/:category?/:id?', - }, - ], - }, -}; diff --git a/lib/routes/storm/router.ts b/lib/routes/storm/router.ts deleted file mode 100644 index 053ae4cee..000000000 --- a/lib/routes/storm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?/:id?', './index'); -}; diff --git a/lib/routes/storyfm/episodes.ts b/lib/routes/storyfm/episodes.ts index 97e77a614..0b188987f 100644 --- a/lib/routes/storyfm/episodes.ts +++ b/lib/routes/storyfm/episodes.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/episodes', + categories: ['multimedia'], + example: '/storyfm/episodes', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['storyfm.cn/episodes-list', 'storyfm.cn/'], + }, + name: '播客', + maintainers: ['nczitzk'], + handler, + url: 'storyfm.cn/episodes-list', +}; + +async function handler() { const rootUrl = 'https://storyfm.cn'; const currentUrl = `${rootUrl}/episodes-list/`; @@ -57,11 +80,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '故事FM', link: currentUrl, item: items, itunes_author: '故事FM', image: $('.custom-logo-link img').attr('src'), - }); -}; + }; +} diff --git a/lib/routes/storyfm/index.ts b/lib/routes/storyfm/index.ts index 29bab8b8c..7cbd6b8f0 100644 --- a/lib/routes/storyfm/index.ts +++ b/lib/routes/storyfm/index.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/index', + categories: ['multimedia'], + example: '/storyfm/index', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['storyfm.cn/'], + }, + name: '首页', + maintainers: ['sanmmm'], + handler, + url: 'storyfm.cn/', +}; + +async function handler() { const url = 'http://storyfm.cn'; const response = await got(url); const $ = load(response.data); @@ -35,10 +58,10 @@ export default async (ctx) => { }; }) .get(); - ctx.set('data', { + return { title: '故事说FM', description: '故事说FM', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/storyfm/maintainer.ts b/lib/routes/storyfm/maintainer.ts deleted file mode 100644 index be55cea99..000000000 --- a/lib/routes/storyfm/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/episodes': ['nczitzk'], - '/index': ['sanmmm'], -}; diff --git a/lib/routes/storyfm/namespace.ts b/lib/routes/storyfm/namespace.ts new file mode 100644 index 000000000..7b9d85b62 --- /dev/null +++ b/lib/routes/storyfm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '故事 FM', + url: 'storyfm.cn', +}; diff --git a/lib/routes/storyfm/radar.ts b/lib/routes/storyfm/radar.ts deleted file mode 100644 index f182a2d0e..000000000 --- a/lib/routes/storyfm/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'storyfm.cn': { - _name: '故事FM', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/multimedia#ge-shi-fm', - source: ['/'], - target: '/storyfm/index', - }, - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/multimedia#ge-shi-fm', - source: ['/episodes-list', '/'], - target: '/storyfm/episodes', - }, - ], - }, -}; diff --git a/lib/routes/storyfm/router.ts b/lib/routes/storyfm/router.ts deleted file mode 100644 index 9c140dea9..000000000 --- a/lib/routes/storyfm/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/episodes', './episodes'); - router.get('/index', './index'); -}; diff --git a/lib/routes/stratechery/index.ts b/lib/routes/stratechery/index.ts index 0939b8880..db1d7667c 100644 --- a/lib/routes/stratechery/index.ts +++ b/lib/routes/stratechery/index.ts @@ -1,6 +1,14 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; -export default async (ctx) => { +export const route: Route = { + path: '/', + name: 'Unknown', + maintainers: ['chazeon'], + handler, +}; + +async function handler(ctx) { const link = 'https://stratechery.com/'; ctx.set( @@ -20,4 +28,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/stratechery/maintainer.ts b/lib/routes/stratechery/maintainer.ts deleted file mode 100644 index 198d0fd54..000000000 --- a/lib/routes/stratechery/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['chazeon'], -}; diff --git a/lib/routes/stratechery/namespace.ts b/lib/routes/stratechery/namespace.ts new file mode 100644 index 000000000..40d0ef324 --- /dev/null +++ b/lib/routes/stratechery/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Stratechery by Ben Thompson', + url: 'blog.stratechery.com', +}; diff --git a/lib/routes/stratechery/radar.ts b/lib/routes/stratechery/radar.ts deleted file mode 100644 index ea8e5a1f7..000000000 --- a/lib/routes/stratechery/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'stratechery.com': { - _name: 'Stratechery by Ben Thompson', - blog: [ - { - title: 'Articles', - docs: 'https://docs.rsshub.app/routes/blog#stratechery-by-ben-thompson', - }, - ], - }, -}; diff --git a/lib/routes/stratechery/router.ts b/lib/routes/stratechery/router.ts deleted file mode 100644 index 34ce5b45c..000000000 --- a/lib/routes/stratechery/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', '.'); -}; diff --git a/lib/routes/studygolang/go.ts b/lib/routes/studygolang/go.ts index 8ab2780b5..0df89fc3f 100644 --- a/lib/routes/studygolang/go.ts +++ b/lib/routes/studygolang/go.ts @@ -1,5 +1,27 @@ +import { Route } from '@/types'; import { FetchGoItems } from './utils'; -export default async (ctx) => { - ctx.set('data', await FetchGoItems(ctx)); +export const route: Route = { + path: '/go/:id?', + categories: ['programming'], + example: '/studygolang/go/daily', + parameters: { id: '板块 id,默认为周刊' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['studygolang.com/go/:id', 'studygolang.com/'], + }, + name: '板块', + maintainers: ['nczitzk'], + handler, }; + +async function handler(ctx) { + ctx.set('data', await FetchGoItems(ctx)); +} diff --git a/lib/routes/studygolang/jobs.ts b/lib/routes/studygolang/jobs.ts index c3cd7a5e9..5044654d0 100644 --- a/lib/routes/studygolang/jobs.ts +++ b/lib/routes/studygolang/jobs.ts @@ -1,5 +1,24 @@ +import { Route } from '@/types'; import { FetchGoItems } from './utils'; -export default async (ctx) => { - ctx.set('data', await FetchGoItems(ctx, 'jobs')); +export const route: Route = { + path: '/jobs', + categories: ['programming'], + example: '/studygolang/jobs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '招聘', + maintainers: ['CcccFz', 'nczitzk'], + handler, }; + +async function handler(ctx) { + ctx.set('data', await FetchGoItems(ctx, 'jobs')); +} diff --git a/lib/routes/studygolang/maintainer.ts b/lib/routes/studygolang/maintainer.ts deleted file mode 100644 index 314e859bd..000000000 --- a/lib/routes/studygolang/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/go/:id?': ['nczitzk'], - '/jobs': ['CcccFz', 'nczitzk'], - '/weekly': ['CWeilet', 'nczitzk'], -}; diff --git a/lib/routes/studygolang/namespace.ts b/lib/routes/studygolang/namespace.ts new file mode 100644 index 000000000..d0cd84f68 --- /dev/null +++ b/lib/routes/studygolang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Go 语言中文网', + url: 'studygolang.com', +}; diff --git a/lib/routes/studygolang/radar.ts b/lib/routes/studygolang/radar.ts deleted file mode 100644 index 78577000e..000000000 --- a/lib/routes/studygolang/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'studygolang.com': { - _name: 'Go 语言中文网', - '.': [ - { - title: '板块', - docs: 'https://docs.rsshub.app/routes/programming#go-yu-yan-zhong-wen-wang', - source: ['/go/:id', '/'], - target: '/studygolang/go/:id?', - }, - { - title: '招聘', - docs: 'https://docs.rsshub.app/routes/programming#go-yu-yan-zhong-wen-wang', - source: ['/go/jobs', '/'], - target: '/studygolang/go/jobs', - }, - { - title: '周刊', - docs: 'https://docs.rsshub.app/routes/programming#go-yu-yan-zhong-wen-wang', - source: ['/go/weekly', '/'], - target: '/studygolang/go/weekly', - }, - ], - }, -}; diff --git a/lib/routes/studygolang/router.ts b/lib/routes/studygolang/router.ts deleted file mode 100644 index c4943130b..000000000 --- a/lib/routes/studygolang/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/go/:id?', './go'); - router.get('/jobs', './jobs'); - router.get('/weekly', './weekly'); -}; diff --git a/lib/routes/studygolang/weekly.ts b/lib/routes/studygolang/weekly.ts index 1e557343c..8a8278357 100644 --- a/lib/routes/studygolang/weekly.ts +++ b/lib/routes/studygolang/weekly.ts @@ -1,5 +1,24 @@ +import { Route } from '@/types'; import { FetchGoItems } from './utils'; -export default async (ctx) => { - ctx.set('data', await FetchGoItems(ctx, 'weekly')); +export const route: Route = { + path: '/weekly', + categories: ['programming'], + example: '/studygolang/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '周刊', + maintainers: ['CWeilet', 'nczitzk'], + handler, }; + +async function handler(ctx) { + ctx.set('data', await FetchGoItems(ctx, 'weekly')); +} diff --git a/lib/routes/subhd/index.ts b/lib/routes/subhd/index.ts index dba7e2be8..7033df399 100644 --- a/lib/routes/subhd/index.ts +++ b/lib/routes/subhd/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,14 @@ const config = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'sub'; const category = ctx.req.param('category') ?? config[type].category; @@ -72,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/subhd/maintainer.ts b/lib/routes/subhd/maintainer.ts deleted file mode 100644 index 9381dbd97..000000000 --- a/lib/routes/subhd/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/sub/:category?': ['nczitzk'], - '/zu/:category?': ['nczitzk'], -}; diff --git a/lib/routes/subhd/namespace.ts b/lib/routes/subhd/namespace.ts new file mode 100644 index 000000000..bb684a7f8 --- /dev/null +++ b/lib/routes/subhd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Sub HD', + url: 'subhd.tv', +}; diff --git a/lib/routes/subhd/radar.ts b/lib/routes/subhd/radar.ts deleted file mode 100644 index ba261e1e8..000000000 --- a/lib/routes/subhd/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'subhd.tv': { - _name: 'Sub HD', - '.': [ - { - title: '字幕', - docs: 'https://docs.rsshub.app/routes/multimedia#subhd-zi-mu', - source: ['/sub/:category', '/'], - target: '/subhd/sub/:category?', - }, - { - title: '字幕组', - docs: 'https://docs.rsshub.app/routes/multimedia#subhd-zi-mu-zu', - source: ['/zu/:category', '/'], - target: '/subhd/zu/:category?', - }, - ], - }, -}; diff --git a/lib/routes/subhd/router.ts b/lib/routes/subhd/router.ts deleted file mode 100644 index 8591b5062..000000000 --- a/lib/routes/subhd/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?/:category?', './index'); -}; diff --git a/lib/routes/supchina/index.ts b/lib/routes/supchina/index.ts index 829117ecb..97ef410d4 100644 --- a/lib/routes/supchina/index.ts +++ b/lib/routes/supchina/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['supchina.com/feed', 'supchina.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'supchina.com/feed', +}; + +async function handler(ctx) { const rootUrl = 'https://supchina.com'; const currentUrl = `${rootUrl}/feed/`; @@ -60,9 +73,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').first().text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/supchina/maintainer.ts b/lib/routes/supchina/maintainer.ts deleted file mode 100644 index 87b510156..000000000 --- a/lib/routes/supchina/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/podcasts': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/supchina/namespace.ts b/lib/routes/supchina/namespace.ts new file mode 100644 index 000000000..571807c6c --- /dev/null +++ b/lib/routes/supchina/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SupChina', + url: 'supchina.com', +}; diff --git a/lib/routes/supchina/podcasts.ts b/lib/routes/supchina/podcasts.ts index 52abf75ff..7d15e39bc 100644 --- a/lib/routes/supchina/podcasts.ts +++ b/lib/routes/supchina/podcasts.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/podcasts', + categories: ['new-media'], + example: '/supchina/podcasts', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['supchina.com/podcasts', 'supchina.com/'], + }, + name: 'Podcasts', + maintainers: ['nczitzk'], + handler, + url: 'supchina.com/podcasts', +}; + +async function handler(ctx) { const rootUrl = 'https://supchina.com'; const currentUrl = `${rootUrl}/feed/podcast`; @@ -57,11 +80,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'SupChina - Podcasts', link: `${rootUrl}/podcasts`, itunes_author: $('channel itunes\\:author').first().text(), image: $('itunes\\:image').attr('href'), item: items, - }); -}; + }; +} diff --git a/lib/routes/supchina/radar.ts b/lib/routes/supchina/radar.ts deleted file mode 100644 index 56820e7ad..000000000 --- a/lib/routes/supchina/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'supchina.com': { - _name: 'SupChina', - '.': [ - { - title: 'Feed', - docs: 'https://docs.rsshub.app/routes/new-media#supchina-feed', - source: ['/feed', '/'], - target: '/supchina', - }, - { - title: 'Podcasts', - docs: 'https://docs.rsshub.app/routes/new-media#supchina-podcasts', - source: ['/podcasts', '/'], - target: '/supchina/podcasts', - }, - ], - }, -}; diff --git a/lib/routes/supchina/router.ts b/lib/routes/supchina/router.ts deleted file mode 100644 index 87b28bab0..000000000 --- a/lib/routes/supchina/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/podcasts', './podcasts'); - router.get('/', './index'); -}; diff --git a/lib/routes/surfshark/blog.ts b/lib/routes/surfshark/blog.ts index fbe55e12d..c908a62aa 100644 --- a/lib/routes/surfshark/blog.ts +++ b/lib/routes/surfshark/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; @@ -80,7 +88,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -91,5 +99,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[property="og:title"]').prop('content'), author: $('meta[property="og:site_name"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/surfshark/maintainer.ts b/lib/routes/surfshark/maintainer.ts deleted file mode 100644 index 02d417413..000000000 --- a/lib/routes/surfshark/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog/:category?': ['nczitzk'], -}; diff --git a/lib/routes/surfshark/namespace.ts b/lib/routes/surfshark/namespace.ts new file mode 100644 index 000000000..18a86726a --- /dev/null +++ b/lib/routes/surfshark/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Surfshark', + url: 'surfshark.com', +}; diff --git a/lib/routes/surfshark/radar.ts b/lib/routes/surfshark/radar.ts deleted file mode 100644 index a87b2a07c..000000000 --- a/lib/routes/surfshark/radar.ts +++ /dev/null @@ -1,90 +0,0 @@ -export default { - 'surfshark.com': { - _name: 'Surfshark', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/blog/:category*'], - target: (params, url) => { - url = new URL(url); - const path = params.category ?? url.href.match(/\/blog\/(.*?)/)[1]; - - return `/surfshark/blog${path ? `/${path}` : ''}`; - }, - }, - { - title: 'Blog - Cybersecurity', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/cybersecurity'], - target: '/surfshark/blog/cybersecurity', - }, - { - title: 'Blog - All things VPN', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/all-things-vpn'], - target: '/surfshark/blog/all-things-vpn', - }, - { - title: 'Blog - Internet censorship', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/internet-censorship'], - target: '/surfshark/blog/internet-censorship', - }, - { - title: 'Blog - Entertainment', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/entertainment'], - target: '/surfshark/blog/entertainment', - }, - { - title: 'Blog - News', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/news'], - target: '/surfshark/blog/news', - }, - { - title: 'Blog - Internet Security', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/cybersecurity/internet-security', '/blog/cybersecurity'], - target: '/surfshark/blog/cybersecurity/internet-security', - }, - { - title: 'Blog - Mobile Security', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/cybersecurity/mobile-security', '/blog/cybersecurity'], - target: '/surfshark/blog/cybersecurity/mobile-security', - }, - { - title: 'Blog - Identity Protection', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/cybersecurity/identity-protection', '/blog/cybersecurity'], - target: '/surfshark/blog/cybersecurity/identity-protection', - }, - { - title: 'Blog - Phishing', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/cybersecurity/phishing', '/blog/cybersecurity'], - target: '/surfshark/blog/cybersecurity/phishing', - }, - { - title: 'Blog - Must-knows', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/all-things-vpn/must-knows', '/blog/all-things-vpn'], - target: '/surfshark/blog/all-things-vpn/must-knows', - }, - { - title: 'Blog - Technology', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/all-things-vpn/technology', '/blog/all-things-vpn'], - target: '/surfshark/blog/all-things-vpn/technology', - }, - { - title: 'Blog - Tips & Advice', - docs: 'https://docs.rsshub.app/routes/blog#surfshark-blog', - source: ['/blog/all-things-vpn/tips-and-advice', '/blog/all-things-vpn'], - target: '/surfshark/blog/all-things-vpn/tips-and-advice', - }, - ], - }, -}; diff --git a/lib/routes/surfshark/router.ts b/lib/routes/surfshark/router.ts deleted file mode 100644 index 0da94e664..000000000 --- a/lib/routes/surfshark/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:category{.+}?', './blog'); -}; diff --git a/lib/routes/sustech/bidding.ts b/lib/routes/sustech/bidding.ts index 6d4b10203..442345ca4 100644 --- a/lib/routes/sustech/bidding.ts +++ b/lib/routes/sustech/bidding.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bidding', + categories: ['university'], + example: '/sustech/bidding', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['biddingoffice.sustech.edu.cn/'], + }, + name: '采购与招标管理部', + maintainers: ['sparkcyf'], + handler, + url: 'biddingoffice.sustech.edu.cn/', +}; + +async function handler() { const link = 'http://biddingoffice.sustech.edu.cn'; const response = await got({ method: 'get', @@ -15,7 +38,7 @@ export default async (ctx) => { const list = $('.index-wrap.index-2 ul li'); - ctx.set('data', { + return { title: '南方科技大学采购与招标管理部', link, item: @@ -30,5 +53,5 @@ export default async (ctx) => { link: a.attr('href'), }; }), - }); -}; + }; +} diff --git a/lib/routes/sustech/maintainer.ts b/lib/routes/sustech/maintainer.ts deleted file mode 100644 index 80123b754..000000000 --- a/lib/routes/sustech/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/bidding': ['sparkcyf'], - '/newshub-zh': ['sparkcyf'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/sustech/namespace.ts b/lib/routes/sustech/namespace.ts new file mode 100644 index 000000000..257dec6ee --- /dev/null +++ b/lib/routes/sustech/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南方科技大学', + url: 'biddingoffice.sustech.edu.cn', +}; diff --git a/lib/routes/sustech/newshub-zh.ts b/lib/routes/sustech/newshub-zh.ts index d0d147792..586f8cf0b 100644 --- a/lib/routes/sustech/newshub-zh.ts +++ b/lib/routes/sustech/newshub-zh.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/newshub-zh', + categories: ['university'], + example: '/sustech/newshub-zh', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['newshub.sustech.edu.cn/news'], + }, + name: '新闻网(中文)', + maintainers: ['sparkcyf'], + handler, + url: 'newshub.sustech.edu.cn/news', +}; + +async function handler() { const baseUrl = 'https://newshub.sustech.edu.cn'; const link = `${baseUrl}/news`; const response = await got({ @@ -16,7 +39,7 @@ export default async (ctx) => { const list = $('.m-newslist ul li'); - ctx.set('data', { + return { title: '南方科技大学新闻网-中文', link, item: @@ -35,5 +58,5 @@ export default async (ctx) => { link: `${baseUrl}${item.find('a').attr('href')}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/sustech/radar.ts b/lib/routes/sustech/radar.ts deleted file mode 100644 index 5ad89fc03..000000000 --- a/lib/routes/sustech/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'sustech.edu.cn': { - _name: '南方科技大学', - biddingoffice: [ - { - title: '采购与招标管理部', - docs: 'https://docs.rsshub.app/routes/university#nan-fang-ke-ji-da-xue', - source: ['/'], - target: '/sustech/bidding', - }, - ], - gs: [ - { - title: '研究生网通知公告', - docs: 'https://docs.rsshub.app/routes/university#nan-fang-ke-ji-da-xue', - source: ['/'], - target: '/sustech/yjs', - }, - ], - newshub: [ - { - title: '新闻网(中文)', - docs: 'https://docs.rsshub.app/routes/university#nan-fang-ke-ji-da-xue', - source: ['/news'], - target: '/sustech/newshub-zh', - }, - ], - }, -}; diff --git a/lib/routes/sustech/router.ts b/lib/routes/sustech/router.ts deleted file mode 100644 index 11514d5f5..000000000 --- a/lib/routes/sustech/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/bidding', './bidding'); - router.get('/newshub-zh', './newshub-zh'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/sustech/yjs.ts b/lib/routes/sustech/yjs.ts index 522c668ab..b52ff9e5a 100644 --- a/lib/routes/sustech/yjs.ts +++ b/lib/routes/sustech/yjs.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/sustech/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.sustech.edu.cn/'], + }, + name: '研究生网通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'gs.sustech.edu.cn/', +}; + +async function handler() { const baseUrl = 'https://gs.sustech.edu.cn'; const link = `${baseUrl}/#/common/index?current_id=99&id=99`; const response = await got(`${baseUrl}/api/www/v1/article/list`, { @@ -20,10 +43,10 @@ export default async (ctx) => { pubDate: parseDate(item.published_at, 'YYYY-MM-DD'), })); - ctx.set('data', { + return { title: '南方科技大学研究生院', link, description: '南方科技大学研招网通知公告', item: list, - }); -}; + }; +} diff --git a/lib/routes/swissinfo/index.ts b/lib/routes/swissinfo/index.ts index 2e488f3cf..7c9dc5701 100644 --- a/lib/routes/swissinfo/index.ts +++ b/lib/routes/swissinfo/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:language?/:category?', + categories: ['new-media'], + example: '/swissinfo/eng/latest-news', + parameters: { language: 'Language, eng by default', category: 'Category, Latest News by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swissinfo.ch/:language/:category', 'swissinfo.ch/'], + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'eng'; const category = ctx.req.param('category') ?? 'latest-news'; @@ -66,9 +88,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/swissinfo/maintainer.ts b/lib/routes/swissinfo/maintainer.ts deleted file mode 100644 index b8e519b1f..000000000 --- a/lib/routes/swissinfo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:language?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/swissinfo/namespace.ts b/lib/routes/swissinfo/namespace.ts new file mode 100644 index 000000000..17aa0c2ec --- /dev/null +++ b/lib/routes/swissinfo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'swissinfo', + url: 'swissinfo.ch', +}; diff --git a/lib/routes/swissinfo/radar.ts b/lib/routes/swissinfo/radar.ts deleted file mode 100644 index da54d4883..000000000 --- a/lib/routes/swissinfo/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'swissinfo.ch': { - _name: 'swissinfo', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/new-media#swissinfo-category', - source: ['/:language/:category', '/'], - target: '/swissinfo/:language?/:category?', - }, - ], - }, -}; diff --git a/lib/routes/swissinfo/router.ts b/lib/routes/swissinfo/router.ts deleted file mode 100644 index 58669f6d5..000000000 --- a/lib/routes/swissinfo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:language?/:category?', './index'); -}; diff --git a/lib/routes/swjtu/jtys/yjs.ts b/lib/routes/swjtu/jtys/yjs.ts index b26aaf0d5..9ee5cbb4a 100644 --- a/lib/routes/swjtu/jtys/yjs.ts +++ b/lib/routes/swjtu/jtys/yjs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -31,7 +32,26 @@ const getItem = (item, cache) => { }); }; -export default async (ctx) => { +export const route: Route = { + path: '/jtys/yjs', + categories: ['university'], + example: '/swjtu/jtys/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '交通运输与物流学院', + maintainers: ['qizidog'], + handler, + description: `#### 研究生通知 {#xi-nan-jiao-tong-da-xue-jiao-tong-yun-shu-yu-wu-liu-xue-yuan-yan-jiu-sheng-tong-zhi}`, +}; + +async function handler() { const resp = await got({ method: 'get', url: url_addr, @@ -47,10 +67,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '西南交大交运学院-研究生通知', link: url_addr, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/swjtu/jwc.ts b/lib/routes/swjtu/jwc.ts index b6fab2468..badf64fa3 100644 --- a/lib/routes/swjtu/jwc.ts +++ b/lib/routes/swjtu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -43,7 +44,29 @@ const getItem = (item, cache) => { }); }; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/swjtu/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.swjtu.edu.cn/vatuu/WebAction', 'jwc.swjtu.edu.cn/'], + }, + name: '教务网', + maintainers: ['mobyw'], + handler, + url: 'jwc.swjtu.edu.cn/vatuu/WebAction', +}; + +async function handler() { const resp = await got({ method: 'get', url: pageURL, @@ -59,10 +82,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '西南交大-教务网通知', link: pageURL, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/swjtu/jyzpxx.ts b/lib/routes/swjtu/jyzpxx.ts index 51f6c3482..f018882de 100644 --- a/lib/routes/swjtu/jyzpxx.ts +++ b/lib/routes/swjtu/jyzpxx.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import got from '@/utils/got'; const rootURL = 'https://jiuye.swjtu.edu.cn/career'; -export default async (ctx) => { +export const route: Route = { + path: '/jyzpxx', + categories: ['university'], + example: '/swjtu/jyzpxx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jiuye.swjtu.edu.cn/career', 'jiuye.swjtu.edu.cn/'], + }, + name: '就业招聘信息', + maintainers: ['qizidog'], + handler, + url: 'jiuye.swjtu.edu.cn/career', +}; + +async function handler(ctx) { const limit = Math.min(ctx.req.query('limit') ?? 10, 50); const resp = await got({ method: 'post', @@ -20,10 +43,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '西南交大-就业招聘信息', link: `${rootURL}/zpxx/zpxx`, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/swjtu/maintainer.ts b/lib/routes/swjtu/maintainer.ts deleted file mode 100644 index bcdfc7409..000000000 --- a/lib/routes/swjtu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/jtys/yjs': ['qizidog'], - '/jyzpxx': ['qizidog'], - '/jwc': ['mobyw'], - '/xg/:code?': ['mobyw'], -}; diff --git a/lib/routes/swjtu/namespace.ts b/lib/routes/swjtu/namespace.ts new file mode 100644 index 000000000..be986e9ec --- /dev/null +++ b/lib/routes/swjtu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西南交通大学', + url: 'ctt.swjtu.edu.cn', +}; diff --git a/lib/routes/swjtu/radar.ts b/lib/routes/swjtu/radar.ts deleted file mode 100644 index af8cedbc5..000000000 --- a/lib/routes/swjtu/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'swjtu.edu.cn': { - _name: '西南交通大学', - ctt: [ - { - title: '交通运输与物流学院 - 研究生通知', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-jiao-tong-da-xue', - source: ['/yethan/WebIndexAction', '/'], - target: (_, url) => (new URL(url).searchParams.get('setAction') === 'newsList' && new URL(url).searchParams.get('bigTypeId') === '0E4BF4D36E232918' ? '/swjtu/jtys/yjs' : null), - }, - ], - jiuye: [ - { - title: '就业招聘信息', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-jiao-tong-da-xue', - source: ['/career', '/'], - target: '/swjtu/jyzpxx', - }, - ], - jwc: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-jiao-tong-da-xue', - source: ['/vatuu/WebAction', '/'], - target: '/swjtu/jwc', - }, - ], - xg: [ - { - title: '扬华素质网', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-jiao-tong-da-xue', - source: ['/web/Home/PushNewsList', '/web/Home/NewsList', '/web/Home/ColourfulCollegeNewsList', '/web/Publicity/List', '/'], - target: '/swjtu/xg', - }, - ], - }, -}; diff --git a/lib/routes/swjtu/router.ts b/lib/routes/swjtu/router.ts deleted file mode 100644 index 87f3690c5..000000000 --- a/lib/routes/swjtu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/jtys/yjs', './jtys/yjs'); - router.get('/jyzpxx', './jyzpxx'); - router.get('/jwc', './jwc'); - router.get('/xg/:code?', './xg'); -}; diff --git a/lib/routes/swjtu/xg.ts b/lib/routes/swjtu/xg.ts index 311012499..674f0c54b 100644 --- a/lib/routes/swjtu/xg.ts +++ b/lib/routes/swjtu/xg.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -48,7 +49,35 @@ const getItem = (item, cache) => { }); }; -export default async (ctx) => { +export const route: Route = { + path: '/xg/:code?', + categories: ['university'], + example: '/swjtu/xg/tzgg', + parameters: { code: '栏目(默认为tzgg)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xg.swjtu.edu.cn/web/Home/PushNewsList', 'xg.swjtu.edu.cn/web/Home/NewsList', 'xg.swjtu.edu.cn/web/Home/ColourfulCollegeNewsList', 'xg.swjtu.edu.cn/web/Publicity/List', 'xg.swjtu.edu.cn/'], + target: '/xg', + }, + name: '扬华素质网', + maintainers: ['mobyw'], + handler, + url: 'xg.swjtu.edu.cn/web/Home/PushNewsList', + description: `栏目列表: + + | 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 | + | -------- | -------- | -------- | -------- | + | tzgg | yhxw | dcxy | xgzj |`, +}; + +async function handler(ctx) { const code = ctx.req.param('code') ?? 'tzgg'; const pageURL = listURL[code]; @@ -71,10 +100,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '西南交大-扬华素质网', link: pageURL, item: items, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/swpu/bgw.ts b/lib/routes/swpu/bgw.ts index 5a9b629f6..7dfac4d4a 100644 --- a/lib/routes/swpu/bgw.ts +++ b/lib/routes/swpu/bgw.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { joinUrl } from './utils'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,33 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/bgw/:code', + categories: ['university'], + example: '/swpu/bgw/zytzgg', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '办公网', + maintainers: ['CYTMWIA'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 重要通知公告 | 部门通知公告 | 本周活动 | 学术报告 | + | ---- | ------------ | ------------ | -------- | -------- | + | 代码 | zytzgg | bmtzgg | bzhd | xsbg |`, +}; + +async function handler(ctx) { const url = `https://www.swpu.edu.cn/bgw2/${ctx.req.param('code')}.htm`; const res = await got.get(url); @@ -49,11 +76,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `西南石油大学办公网 ${title}`, link: url, description: `西南石油大学办公网 ${title} 列表`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/swpu/cjxy.ts b/lib/routes/swpu/cjxy.ts index 649966d3d..c38bb35c1 100644 --- a/lib/routes/swpu/cjxy.ts +++ b/lib/routes/swpu/cjxy.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/cjxy/:code', + categories: ['university'], + example: '/swpu/cjxy/xyxw', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '财经学院', + maintainers: ['RiverTwilight'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 学院新闻 | 学院通知 | + | ---- | -------- | -------- | + | 代码 | xyxw | xytz |`, +}; + +async function handler(ctx) { const url = `https://www.swpu.edu.cn/nccjxy/xydt/${ctx.req.param('code')}.htm`; const res = await got(url); @@ -44,11 +71,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `西南石油大学财经学院 ${title}`, link: url, description: `西南石油大学财经学院 ${title}`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/swpu/dean.ts b/lib/routes/swpu/dean.ts index 9cd74cbbf..bb83462a3 100644 --- a/lib/routes/swpu/dean.ts +++ b/lib/routes/swpu/dean.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { joinUrl } from './utils'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,33 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/dean/:code', + categories: ['university'], + example: '/swpu/dean/tzgg', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '教务处', + maintainers: ['CYTMWIA'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 通知公告 | 新闻报道 | 视点声音 | + | ---- | -------- | -------- | -------- | + | 代码 | tzgg | xwbd | sdsy |`, +}; + +async function handler(ctx) { const url = `https://www.swpu.edu.cn/dean/${ctx.req.param('code')}.htm`; const res = await got.get(url); @@ -50,11 +77,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `西南石油大学教务处 ${title}`, link: url, description: `西南石油大学教务处 ${title}`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/swpu/dxy.ts b/lib/routes/swpu/dxy.ts index 210a7a0d9..c687a0fbe 100644 --- a/lib/routes/swpu/dxy.ts +++ b/lib/routes/swpu/dxy.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { joinUrl } from './utils'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,33 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/dxy/:code', + categories: ['university'], + example: '/swpu/dxy/1156', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '电气信息学院', + maintainers: ['CYTMWIA'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 学院新闻 | 学院通知 | + | ---- | -------- | -------- | + | 代码 | 1122 | 1156 |`, +}; + +async function handler(ctx) { // 移除 urltype=tree.TreeTempUrl 虽然也能顺利访问页面, // 但标题会缺失,而且在其他地方定位提取标题也比较麻烦。 const url = `https://www.swpu.edu.cn/dxy/list1.jsp?urltype=tree.TreeTempUrl&wbtreeid=${ctx.req.param('code')}`; @@ -52,11 +79,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `西南石油大学电气信息学院 ${title}`, link: url, description: `西南石油大学电气信息学院 ${title}`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/swpu/is.ts b/lib/routes/swpu/is.ts index 2707d4370..00ce43968 100644 --- a/lib/routes/swpu/is.ts +++ b/lib/routes/swpu/is.ts @@ -1,10 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/is/:code', + categories: ['university'], + example: '/swpu/is/xyxw', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '信息学院', + maintainers: ['RiverTwilight'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 学院新闻 | 通知公告 | 教育教学 | 学生工作 | 招生就业 | + | ---- | -------- | -------- | -------- | -------- | -------- | + | 代码 | xyxw | tzgg | jyjx | xsgz | zsjy |`, +}; + +async function handler(ctx) { const url = `https://www.swpu.edu.cn/is/xydt/${ctx.req.param('code')}.htm`; const res = await got(url); @@ -44,11 +71,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `西南石油大学信息学院 ${title}`, link: url, description: `西南石油大学信息学院 ${title}`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/swpu/maintainer.ts b/lib/routes/swpu/maintainer.ts deleted file mode 100644 index e95f50da6..000000000 --- a/lib/routes/swpu/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/bgw/:code': ['CYTMWIA'], - '/cjxy/:code': ['RiverTwilight'], - '/dean/:code': ['CYTMWIA'], - '/dxy/:code': ['CYTMWIA'], - '/is/:code': ['RiverTwilight'], - '/scs/:code': ['CYTMWIA'], -}; diff --git a/lib/routes/swpu/namespace.ts b/lib/routes/swpu/namespace.ts new file mode 100644 index 000000000..3c1b53703 --- /dev/null +++ b/lib/routes/swpu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西南石油大学', + url: 'swpu.edu.cn', +}; diff --git a/lib/routes/swpu/radar.ts b/lib/routes/swpu/radar.ts deleted file mode 100644 index 92847b9d9..000000000 --- a/lib/routes/swpu/radar.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 'swpu.edu.cn': { - _name: '西南石油大学', - '.': [ - { - title: '办公网', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - { - title: '计算机科学学院', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - { - title: '电气信息学院', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - { - title: '信息学院', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - { - title: '财经学院', - docs: 'https://docs.rsshub.app/routes/university#xi-nan-shi-you-da-xue', - source: ['/'], - target: '', - }, - ], - }, -}; diff --git a/lib/routes/swpu/router.ts b/lib/routes/swpu/router.ts deleted file mode 100644 index ecb8f062f..000000000 --- a/lib/routes/swpu/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/bgw/:code', './bgw'); - router.get('/cjxy/:code', './cjxy'); - router.get('/dean/:code', './dean'); - router.get('/dxy/:code', './dxy'); - router.get('/is/:code', './is'); - router.get('/scs/:code', './scs'); -}; diff --git a/lib/routes/swpu/scs.ts b/lib/routes/swpu/scs.ts index a83553edd..d67d82f9b 100644 --- a/lib/routes/swpu/scs.ts +++ b/lib/routes/swpu/scs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { joinUrl } from './utils'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,33 @@ import { load } from 'cheerio'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/scs/:code', + categories: ['university'], + example: '/swpu/scs/tzgg', + parameters: { code: '栏目代码' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swpu.edu.cn/'], + target: '', + }, + name: '计算机科学学院', + maintainers: ['CYTMWIA'], + handler, + url: 'swpu.edu.cn/', + description: `| 栏目 | 通知公告 | 新闻速递 | + | ---- | -------- | -------- | + | 代码 | tzgg | xwsd |`, +}; + +async function handler(ctx) { const url = `https://www.swpu.edu.cn/scs/index/${ctx.req.param('code')}.htm`; const res = await got.get(url); @@ -49,11 +76,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `西南石油大学计算机科学学院 ${title}`, link: url, description: `西南石油大学计算机科学学院 ${title}`, language: 'zh-CN', item: out, - }); -}; + }; +} diff --git a/lib/routes/syosetu/chapter.ts b/lib/routes/syosetu/chapter.ts index 2e64eb8fa..199b7974e 100644 --- a/lib/routes/syosetu/chapter.ts +++ b/lib/routes/syosetu/chapter.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,29 @@ import { CookieJar } from 'tough-cookie'; const cookieJar = new CookieJar(); cookieJar.setCookieSync('over18=yes', 'https://novel18.syosetu.com/'); -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/syosetu/chapter/n1976ey', + parameters: { id: 'Novel id, can be found in URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['novel18.syosetu.com/:id'], + }, + name: 'chapter', + maintainers: ['huangliangshusheng'], + handler, + description: `Eg: \`https://ncode.syosetu.com/n1976ey/\``, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = Number.parseInt(ctx.req.query('limit')) || 5; const link = `https://ncode.syosetu.com/${id}`; @@ -42,14 +65,14 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, description, link, language: 'ja', item: item_list, - }); -}; + }; +} const get = async (url) => { const response = await got({ diff --git a/lib/routes/syosetu/maintainer.ts b/lib/routes/syosetu/maintainer.ts deleted file mode 100644 index 9a546de2a..000000000 --- a/lib/routes/syosetu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/chapter/:id': ['huangliangshusheng'], -}; diff --git a/lib/routes/syosetu/namespace.ts b/lib/routes/syosetu/namespace.ts new file mode 100644 index 000000000..4bec78aa0 --- /dev/null +++ b/lib/routes/syosetu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'syosetu', + url: 'ncode.syosetu.com', +}; diff --git a/lib/routes/syosetu/radar.ts b/lib/routes/syosetu/radar.ts deleted file mode 100644 index 3009bf271..000000000 --- a/lib/routes/syosetu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'syosetu.com': { - _name: 'syosetu', - ncode: [ - { - title: '章节更新', - docs: 'https://docs.rsshub.app/routes/reading#syosetu-zhang-jie-geng-xin', - source: ['/:id'], - target: '/syosetu/chapter/:id', - }, - ], - novel18: [ - { - title: '章节更新', - docs: 'https://docs.rsshub.app/routes/reading#syosetu-zhang-jie-geng-xin', - source: ['/:id'], - target: '/syosetu/chapter/:id', - }, - ], - }, -}; diff --git a/lib/routes/syosetu/router.ts b/lib/routes/syosetu/router.ts deleted file mode 100644 index da9b4fd23..000000000 --- a/lib/routes/syosetu/router.ts +++ /dev/null @@ -1 +0,0 @@ -export default (router) => router.get('/chapter/:id', './chapter.js'); diff --git a/lib/routes/sysu/cse.ts b/lib/routes/sysu/cse.ts index 00b129d0c..f39aed733 100644 --- a/lib/routes/sysu/cse.ts +++ b/lib/routes/sysu/cse.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/cse', + categories: ['university'], + example: '/sysu/cse', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cse.sysu.edu.cn/'], + }, + name: '数据科学与计算机学院动态', + maintainers: [], + handler, + url: 'cse.sysu.edu.cn/', +}; + +async function handler() { const response = await got({ method: 'get', url: 'http://cse.sysu.edu.cn/', @@ -93,11 +116,11 @@ export default async (ctx) => { item_data.sort(compareLink); // console.log(item_data); - ctx.set('data', { + return { title: `中山大学 - 数据科学与计算机学院`, link: `http://cse.sysu.edu.cn`, description: `中山大学 - 数据科学与计算机学院`, language: `zh-cn`, item: item_data, - }); -}; + }; +} diff --git a/lib/routes/sysu/maintainer.ts b/lib/routes/sysu/maintainer.ts deleted file mode 100644 index fb4832222..000000000 --- a/lib/routes/sysu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/sysu/cse': ['Neutrino3316', 'MegrezZhu', 'nczitzk'], - '/ygafz/:type?': ['TonyRL'], -}; diff --git a/lib/routes/sysu/namespace.ts b/lib/routes/sysu/namespace.ts new file mode 100644 index 000000000..20a7ed3c4 --- /dev/null +++ b/lib/routes/sysu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中山大学', + url: 'cse.sysu.edu.cn', +}; diff --git a/lib/routes/sysu/radar.ts b/lib/routes/sysu/radar.ts deleted file mode 100644 index 858b4fb83..000000000 --- a/lib/routes/sysu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'sysu.edu.cn': { - _name: '中山大学', - cse: [ - { - title: '计算机学院(软件学院)', - docs: 'https://docs.rsshub.app/routes/universities#zhong-shan-da-xue-ji-suan-ji-xue-yuan', - source: ['/'], - target: '/sysu/cse', - }, - ], - ygafz: [ - { - title: '粤港澳发展研究院', - docs: 'https://docs.rsshub.app/routes/universities#zhong-shan-da-xue', - source: ['/:type?'], - target: '/sysu/ygafz/:type?', - }, - ], - }, -}; diff --git a/lib/routes/sysu/router.ts b/lib/routes/sysu/router.ts deleted file mode 100644 index bcf348ae6..000000000 --- a/lib/routes/sysu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/cse', './cse'); - router.get('/ygafz/:type?', './ygafz'); -}; diff --git a/lib/routes/sysu/ygafz.ts b/lib/routes/sysu/ygafz.ts index 54f9f5d8c..55fd6eaf8 100644 --- a/lib/routes/sysu/ygafz.ts +++ b/lib/routes/sysu/ygafz.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import logger from '@/utils/logger'; import { CookieJar } from 'tough-cookie'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/ygafz/:type?', + categories: ['university'], + example: '/sysu/ygafz', + parameters: { type: '分类,见下表,默认为 `notice`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ygafz.sysu.edu.cn/:type?'], + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { type = 'notice' } = ctx.req.param(); const baseUrl = 'https://ygafz.sysu.edu.cn'; const url = `${baseUrl}/${type}`; @@ -63,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/szse/inquire.ts b/lib/routes/szse/inquire.ts index d2d61f16a..c7a7b38b5 100644 --- a/lib/routes/szse/inquire.ts +++ b/lib/routes/szse/inquire.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,40 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/inquire/:category?/:select?/:keyword?', + categories: ['finance'], + example: '/szse/inquire', + parameters: { category: '类型,见下表,默认为 `0` 即 主板', select: '函件类别, 见下表,默认为全部函件类别', keyword: '公司代码或简称,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['szse.cn/disclosure/supervision/inquire/index.html', 'szse.cn/'], + target: '/inquire', + }, + name: '问询函件', + maintainers: ['Jeason0228', 'nczitzk'], + handler, + url: 'szse.cn/disclosure/supervision/inquire/index.html', + description: `类型 + + | 主板 | 创业板 | + | ---- | ------ | + | 0 | 1 | + + 函件类别 + + | 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 | + | ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? '0'; const select = ctx.req.param('select') ?? '全部函件类别'; const keyword = ctx.req.param('keyword') ?? ''; @@ -35,10 +69,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `深圳证券交易所 - 问询函件 - ${data.metadata.name}`, link: `${rootUrl}/disclosure/supervision/inquire/index.html`, item: items, description: `函件类别:${select}${keyword ? `; 公司代码或简称:${keyword}` : ''}`, - }); -}; + }; +} diff --git a/lib/routes/szse/maintainer.ts b/lib/routes/szse/maintainer.ts deleted file mode 100644 index ac8c5a5e0..000000000 --- a/lib/routes/szse/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/inquire/:category?/:select?/:keyword?': ['Jeason0228', 'nczitzk'], - '/notice': ['Jeason0228', 'nczitzk'], - '/projectdynamic/:type?/:stage?/:status?': ['nczitzk'], - '/rule': ['nczitzk'], -}; diff --git a/lib/routes/szse/namespace.ts b/lib/routes/szse/namespace.ts new file mode 100644 index 000000000..1a7dc9516 --- /dev/null +++ b/lib/routes/szse/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '深圳证券交易所', + url: 'szse.cn', +}; diff --git a/lib/routes/szse/notice.ts b/lib/routes/szse/notice.ts index 4b777516c..89da2cb73 100644 --- a/lib/routes/szse/notice.ts +++ b/lib/routes/szse/notice.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import * as url from 'node:url'; const host = 'http://www.szse.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/notice', + categories: ['finance'], + example: '/szse/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['szse.cn/disclosure/notice/company/index.html', 'szse.cn/'], + }, + name: '上市公告 - 可转换债券', + maintainers: ['Jeason0228', 'nczitzk'], + handler, + url: 'szse.cn/disclosure/notice/company/index.html', +}; + +async function handler() { const link = 'http://www.szse.cn/disclosure/notice/company/index.html'; const response = await got.get(link, { Referer: host, @@ -64,9 +87,9 @@ export default async (ctx) => { return single; }) ); - ctx.set('data', { + return { title: '深圳证券交易所——上市公告-可转换债券', link, item: out, - }); -}; + }; +} diff --git a/lib/routes/szse/projectdynamic.ts b/lib/routes/szse/projectdynamic.ts index 1f017f10c..6c90cc1bb 100644 --- a/lib/routes/szse/projectdynamic.ts +++ b/lib/routes/szse/projectdynamic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,62 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/projectdynamic/:type?/:stage?/:status?', + categories: ['finance'], + example: '/szse/projectdynamic', + parameters: { type: '类型,见下表,默认为IPO', stage: '阶段,见下表,默认为全部', status: '状态,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['listing.szse.cn/projectdynamic/1/index.html', 'listing.szse.cn/projectdynamic/2/index.html', 'listing.szse.cn/projectdynamic/3/index.html', 'listing.szse.cn/'], + }, + name: '创业板项目动态', + maintainers: ['nczitzk'], + handler, + url: 'listing.szse.cn/projectdynamic/1/index.html', + description: `类型 + + | IPO | 再融资 | 重大资产重组 | + | --- | ------ | ------------ | + | 1 | 2 | 3 | + + 阶段 + + | 全部 | 受理 | 问询 | 上市委会议 | + | ---- | ---- | ---- | ---------- | + | 0 | 10 | 20 | 30 | + + | 提交注册 | 注册结果 | 中止 | 终止 | + | -------- | -------- | ---- | ---- | + | 35 | 40 | 50 | 60 | + + 状态 + + | 全部 | 新受理 | 已问询 | 通过 | 未通过 | + | ---- | ------ | ------ | ---- | ------ | + | 0 | 20 | 30 | 45 | 44 | + + | 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 | + | -------- | -------- | ---------- | -------- | + | 46 | 56 | 54 | 60 | + + | 注册生效 | 不予注册 | 补充审核 | 终止注册 | + | -------- | -------- | -------- | -------- | + | 70 | 74 | 78 | 76 | + + | 中止 | 审核不通过 | 撤回 | + | ---- | ---------- | ---- | + | 80 | 90 | 95 |`, +}; + +async function handler(ctx) { const typeMap = { 1: 'IPO', 2: '再融资', @@ -86,9 +142,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${typeMap[type]}项目动态${status === '0' ? (stage === '0' ? '' : ` (${stageMap[stage]}) `) : ` (${statusMap[status]}) `} - 创业板发行上市审核信息公开网站 - 深圳证券交易所`, link: `${rootUrl}/projectdynamic/${type}/index.html`, item: items, - }); -}; + }; +} diff --git a/lib/routes/szse/radar.ts b/lib/routes/szse/radar.ts deleted file mode 100644 index 6e8b48395..000000000 --- a/lib/routes/szse/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'szse.cn': { - _name: '深圳证券交易所', - '.': [ - { - title: '上市公告 - 可转换债券', - docs: 'https://docs.rsshub.app/routes/finance#shen-zhen-zheng-quan-jiao-yi-suo-shang-shi-gong-gao-ke-zhu-huan-zheng-zhi-quan', - source: ['/disclosure/notice/company/index.html', '/'], - target: '/szse/notice', - }, - { - title: '问询函件', - docs: 'https://docs.rsshub.app/routes/finance#shen-zhen-zheng-quan-jiao-yi-suo-wen-xun-huan-jian', - source: ['/disclosure/supervision/inquire/index.html', '/'], - target: '/szse/inquire', - }, - { - title: '最新规则', - docs: 'https://docs.rsshub.app/routes/finance#shen-zhen-zheng-quan-jiao-yi-suo-zui-xin-gui-ze', - source: ['/lawrules/rule/new', '/'], - target: '/szse/rule', - }, - ], - listing: [ - { - title: '创业板项目动态', - docs: 'https://docs.rsshub.app/routes/finance#shen-zhen-zheng-quan-jiao-yi-suo-chuang-ye-ban-xiang-mu-dong-tai', - source: ['/projectdynamic/1/index.html', '/projectdynamic/2/index.html', '/projectdynamic/3/index.html', '/'], - target: '/szse/projectdynamic/:type?/:stage?/:status?', - }, - ], - }, -}; diff --git a/lib/routes/szse/router.ts b/lib/routes/szse/router.ts deleted file mode 100644 index 1569f521b..000000000 --- a/lib/routes/szse/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/inquire/:category?/:select?/:keyword?', './inquire'); - router.get('/notice', './notice'); - router.get('/projectdynamic/:type?/:stage?/:status?', './projectdynamic'); - router.get('/rule', './rule'); -}; diff --git a/lib/routes/szse/rule.ts b/lib/routes/szse/rule.ts index e2b4ab757..8f23ee75b 100644 --- a/lib/routes/szse/rule.ts +++ b/lib/routes/szse/rule.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/rule', + categories: ['finance'], + example: '/szse/rule', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['szse.cn/lawrules/rule/new', 'szse.cn/'], + }, + name: '最新规则', + maintainers: ['nczitzk'], + handler, + url: 'szse.cn/lawrules/rule/new', +}; + +async function handler() { const rootUrl = 'http://www.szse.cn'; const currentUrl = `${rootUrl}/api/search/content`; @@ -44,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '最新规则 - 深圳证券交易所', link: `${rootUrl}/lawrules/rule/new`, item: items, - }); -}; + }; +} diff --git a/lib/routes/szu/maintainer.ts b/lib/routes/szu/maintainer.ts deleted file mode 100644 index cc2d97b5d..000000000 --- a/lib/routes/szu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/yz/:type?': ['NagaruZ'], -}; diff --git a/lib/routes/szu/namespace.ts b/lib/routes/szu/namespace.ts new file mode 100644 index 000000000..fc4521e37 --- /dev/null +++ b/lib/routes/szu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '深圳大学', + url: 'yz.szu.edu.cn', +}; diff --git a/lib/routes/szu/radar.ts b/lib/routes/szu/radar.ts deleted file mode 100644 index cf58e2c10..000000000 --- a/lib/routes/szu/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'szu.edu.cn': { - _name: '深圳大学', - yz: [ - { - title: '硕士招生 - 研究生招生网', - docs: 'https://docs.rsshub.app/routes/university#shen-zhen-da-xue', - source: ['/sszs/gg.htm', '/'], - target: '/szu/yz/1', - }, - { - title: '博士招生 - 研究生招生网', - docs: 'https://docs.rsshub.app/routes/university#shen-zhen-da-xue', - source: ['/sszs/bszs/gg.htm', '/'], - target: '/szu/yz/2', - }, - ], - }, -}; diff --git a/lib/routes/szu/router.ts b/lib/routes/szu/router.ts deleted file mode 100644 index 9127a7865..000000000 --- a/lib/routes/szu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/yz/:type?', './yz'); -}; diff --git a/lib/routes/szu/yz/index.ts b/lib/routes/szu/yz/index.ts index 81ddf1278..bbd038b1e 100644 --- a/lib/routes/szu/yz/index.ts +++ b/lib/routes/szu/yz/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,28 @@ const map = new Map([ [2, { title: '博士招生 - 深圳大学研究生招生网' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/yz/:type?', + categories: ['university'], + example: '/szu/yz/1', + parameters: { type: '默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生招生网', + maintainers: ['NagaruZ'], + handler, + description: `| 研究生 | 博士生 | + | ------ | ------ | + | 1 | 2 |`, +}; + +async function handler(ctx) { let type = Number.parseInt(ctx.req.param('type')); const struct = { 1: { @@ -43,10 +65,10 @@ export default async (ctx) => { const name = $('title').text(); const result = await util.ProcessFeed(list, cache, struct[type]); - ctx.set('data', { + return { title: map.get(type).title, link: url, description: name, item: result, - }); -}; + }; +} diff --git a/lib/routes/t66y/index.ts b/lib/routes/t66y/index.ts index e4384cc6c..e316d4084 100644 --- a/lib/routes/t66y/index.ts +++ b/lib/routes/t66y/index.ts @@ -1,10 +1,42 @@ +import { Route } from '@/types'; import * as cheerio from 'cheerio'; import got from '@/utils/got'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, parseContent } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:id/:type?', + categories: ['multimedia'], + example: '/t66y/20/2', + parameters: { id: '分区 id, 可在分区页 URL 中找到', type: '类型 id, 可在分区类型过滤后的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分区帖子', + maintainers: ['zhboner'], + handler, + description: `> 注意:并非所有的分区都有子类型,可以参考成人文学交流区的 \`古典武侠\` 这一子类型。 + + | 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 | + | -------------- | -------------- | ---------- | ---------- | ---------- | + | 2 | 15 | 4 | 5 | 25 | + + | 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 | + | ---------- | ---------- | ----------- | ---------- | + | 26 | 27 | 21 | 22 | + + | 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 | + | ---------- | ------------ | ------------ | ------------ | + | 7 | 8 | 16 | 20 |`, +}; + +async function handler(ctx) { const { id, type } = ctx.req.param(); const url = new URL(`thread0806.php?fid=${id}&search=today`, baseUrl); @@ -47,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: (type ? `[${$('.t .fn b').text()}]` : '') + $('head title').text(), link: url.href, item: out, - }); -}; + }; +} diff --git a/lib/routes/t66y/maintainer.ts b/lib/routes/t66y/maintainer.ts deleted file mode 100644 index 0522da08d..000000000 --- a/lib/routes/t66y/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/post/:tid': ['cnzgray'], - '/:id/:type?': ['zhboner'], -}; diff --git a/lib/routes/t66y/namespace.ts b/lib/routes/t66y/namespace.ts new file mode 100644 index 000000000..e51ba523e --- /dev/null +++ b/lib/routes/t66y/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '草榴社区', + url: 't66y.com', +}; diff --git a/lib/routes/t66y/post.ts b/lib/routes/t66y/post.ts index 87cb3916e..809d14cae 100644 --- a/lib/routes/t66y/post.ts +++ b/lib/routes/t66y/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import * as cheerio from 'cheerio'; import got from '@/utils/got'; import cache from '@/utils/cache'; @@ -29,7 +30,30 @@ function parseItems(tid: string, $: cheerio.CheerioAPI) { }); } -export default async (ctx) => { +export const route: Route = { + path: '/post/:tid', + categories: ['multimedia'], + example: '/t66y/post/3286088', + parameters: { tid: '帖子 id, 可在帖子 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '帖子跟踪', + maintainers: ['cnzgray'], + handler, + description: `:::tip + 帖子 id 查找办法: + + 打开想跟踪的帖子,比如:\`https://t66y.com/htm_data/20/1811/3286088.html\` 其中 \`3286088\` 就是帖子 id。 + :::`, +}; + +async function handler(ctx) { const tid = ctx.req.param('tid') as string; const { data: response } = await got(`${baseUrl}/read.php?tid=${tid}`); // 跟踪重定向 @@ -67,9 +91,9 @@ export default async (ctx) => { const items = [...firstPage, ...nextPages.flat()]; - ctx.set('data', { + return { title: $('head title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/t66y/radar.ts b/lib/routes/t66y/radar.ts deleted file mode 100644 index 99a3d0842..000000000 --- a/lib/routes/t66y/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 't66y.com': { - _name: '草榴社區', - '.': [ - { - title: '分区帖子', - docs: 'https://docs.rsshub.app/routes/multimedia#cao-liu-she-qu', - source: ['/thread0806.php'], - target: (param, url) => { - const { searchParams } = new URL(url); - return `/t66y/${searchParams.get('fid')}${searchParams.has('type') ? `/${searchParams.get('type')}` : ''}`; - }, - }, - { - title: '帖子跟踪', - docs: 'https://docs.rsshub.app/routes/multimedia#cao-liu-she-qu', - source: ['/htm_data/:YYMM/DD/:tid', '/read.php'], - target: (param, url) => { - const link = new URL(url); - return link.pathname === '/read.php' ? `/t66y/post/${link.searchParams.get('tid')}` : `/t66y/post/${param.tid}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/t66y/router.ts b/lib/routes/t66y/router.ts deleted file mode 100644 index 0d3e3b558..000000000 --- a/lib/routes/t66y/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/post/:tid', './post'); - router.get('/:id/:type?', './index'); -}; diff --git a/lib/routes/tableau/maintainer.ts b/lib/routes/tableau/maintainer.ts deleted file mode 100644 index 29c09a440..000000000 --- a/lib/routes/tableau/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/app/discover/viz-of-the-day': ['KaiyoungYu'], -}; diff --git a/lib/routes/tableau/namespace.ts b/lib/routes/tableau/namespace.ts new file mode 100644 index 000000000..5eb48b7fc --- /dev/null +++ b/lib/routes/tableau/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Tableau', + url: 'public.tableau.com', +}; diff --git a/lib/routes/tableau/radar.ts b/lib/routes/tableau/radar.ts deleted file mode 100644 index 4fadc9d98..000000000 --- a/lib/routes/tableau/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'tableau.com': { - _name: 'Tableau', - public: [ - { - title: 'Viz of the day', - docs: 'https://docs.rsshub.app/routes/study#tableau', - }, - ], - }, -}; diff --git a/lib/routes/tableau/router.ts b/lib/routes/tableau/router.ts deleted file mode 100644 index 3076fe3f4..000000000 --- a/lib/routes/tableau/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/viz-of-the-day', './viz-of-the-day'); -}; diff --git a/lib/routes/tableau/viz-of-the-day.ts b/lib/routes/tableau/viz-of-the-day.ts index 8dfa559d0..43d913cba 100644 --- a/lib/routes/tableau/viz-of-the-day.ts +++ b/lib/routes/tableau/viz-of-the-day.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/viz-of-the-day', + categories: ['study'], + example: '/tableau/viz-of-the-day', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Viz of the day', + maintainers: [], + handler, +}; + +async function handler() { // Your logic here const rootUrl = 'https://public.tableau.com/api/gallery?page=0&count=20&galleryType=viz-of-the-day'; const { data: response } = await got(rootUrl); @@ -16,11 +35,11 @@ export default async (ctx) => { itunes_item_image: item.screenshot, })); - ctx.set('data', { + return { // Your RSS output here title: 'Tableau Viz of the Day', link: 'https://public.tableau.com/app/discover/viz-of-the-day', image: 'https://help.tableau.com/current/pro/desktop/en-us/Resources/tableau-logo.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/taiwannews/hot.ts b/lib/routes/taiwannews/hot.ts index 14dd0bc2c..ac238b01c 100644 --- a/lib/routes/taiwannews/hot.ts +++ b/lib/routes/taiwannews/hot.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:lang?', + categories: ['traditional-media'], + example: '/taiwannews/hot', + parameters: { lang: 'Language, `en` or `zh`, `en` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['taiwannews.com.tw/:lang/index'], + target: '/hot/:lang', + }, + name: 'Hot News', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://www.taiwannews.com.tw'; const { lang = 'en' } = ctx.req.param(); const url = `${baseUrl}/${lang}/index`; @@ -44,11 +67,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.categories').eq(0).text()} - ${$('head title').text()}`, description: $('meta[name="description"]').attr('content'), link: url, item: items, language: lang, - }); -}; + }; +} diff --git a/lib/routes/taiwannews/maintainer.ts b/lib/routes/taiwannews/maintainer.ts deleted file mode 100644 index 2c7f2165f..000000000 --- a/lib/routes/taiwannews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/hot/:lang?': ['TonyRL'], -}; diff --git a/lib/routes/taiwannews/namespace.ts b/lib/routes/taiwannews/namespace.ts new file mode 100644 index 000000000..88f6a1432 --- /dev/null +++ b/lib/routes/taiwannews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Taiwan News 台灣英文新聞', + url: 'taiwannews.com.tw', +}; diff --git a/lib/routes/taiwannews/radar.ts b/lib/routes/taiwannews/radar.ts deleted file mode 100644 index d26ce79b4..000000000 --- a/lib/routes/taiwannews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'taiwannews.com.tw': { - _name: '台灣英文新聞', - '.': [ - { - title: '最新熱門消息', - docs: 'https://docs.rsshub.app/routes/traditional-media#tai-wan-ying-wen-xin-wen', - source: '/:lang/index', - target: '/taiwannews/hot/:lang', - }, - ], - }, -}; diff --git a/lib/routes/taiwannews/router.ts b/lib/routes/taiwannews/router.ts deleted file mode 100644 index f382bd3df..000000000 --- a/lib/routes/taiwannews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/hot/:lang?', './hot'); -}; diff --git a/lib/routes/tangshufang/index.ts b/lib/routes/tangshufang/index.ts index 92368c7b2..a8bf0de09 100644 --- a/lib/routes/tangshufang/index.ts +++ b/lib/routes/tangshufang/index.ts @@ -1,9 +1,42 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/tangshufang', + parameters: { category: '分类,见下表,默认为首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tangshufang.com/:category', 'tangshufang.com/'], + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 首页 | 老唐实盘 | 书房拾遗 | 理念 & 估值 | 经典陪读 | 财务套利 | + | ---- | -------- | -------- | ----------- | -------- | -------- | + | | shipan | wenda | linian | peidu | taoli | + + | 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | qiye | baijiu | tengxun | fenzhong | haikang | qita | + + | 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | hexin | tougao | suibi | caibao | youji | bamang |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; @@ -52,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/tangshufang/maintainer.ts b/lib/routes/tangshufang/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/tangshufang/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/tangshufang/namespace.ts b/lib/routes/tangshufang/namespace.ts new file mode 100644 index 000000000..596eef187 --- /dev/null +++ b/lib/routes/tangshufang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '唐书房', + url: 'tangshufang.com', +}; diff --git a/lib/routes/tangshufang/radar.ts b/lib/routes/tangshufang/radar.ts deleted file mode 100644 index b4bcc1e9e..000000000 --- a/lib/routes/tangshufang/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tangshufang.com': { - _name: '唐书房', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#tang-shu-fang-fen-lei', - source: ['/:category', '/'], - target: '/tangshufang/:category?', - }, - ], - }, -}; diff --git a/lib/routes/tangshufang/router.ts b/lib/routes/tangshufang/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/tangshufang/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/taobao/maintainer.ts b/lib/routes/taobao/maintainer.ts deleted file mode 100644 index f60357cd4..000000000 --- a/lib/routes/taobao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/zhongchou/:type?': ['xyqfer', 'Fatpandac'], -}; diff --git a/lib/routes/taobao/namespace.ts b/lib/routes/taobao/namespace.ts new file mode 100644 index 000000000..7247f08d3 --- /dev/null +++ b/lib/routes/taobao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '淘宝众筹', + url: 'izhongchou.taobao.com', +}; diff --git a/lib/routes/taobao/radar.ts b/lib/routes/taobao/radar.ts deleted file mode 100644 index d870cddd2..000000000 --- a/lib/routes/taobao/radar.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default { - 'taobao.com': { - _name: '淘宝', - izhongchou: [ - { - title: '淘宝众筹全部', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '') { - return '/taobao/zhongchou/all'; - } - }, - }, - { - title: '淘宝众筹科技', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121288001') { - return '/taobao/zhongchou/tech'; - } - }, - }, - { - title: '淘宝众筹食品', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '123330001,125672021') { - return '/taobao/zhongchou/agriculture'; - } - }, - }, - { - title: '淘宝众筹动漫', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '122018001') { - return '/taobao/zhongchou/acg'; - } - }, - }, - { - title: '淘宝众筹设计', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121292001,126176002,126202001') { - return '/taobao/zhongchou/design'; - } - }, - }, - { - title: '淘宝众筹公益', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121280001') { - return '/taobao/zhongchou/love'; - } - }, - }, - { - title: '淘宝众筹娱乐', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121284001') { - return '/taobao/zhongchou/tele'; - } - }, - }, - { - title: '淘宝众筹影音', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121278001') { - return '/taobao/zhongchou/music'; - } - }, - }, - { - title: '淘宝众筹书籍', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '121274002') { - return '/taobao/zhongchou/book'; - } - }, - }, - { - title: '淘宝众筹游戏', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '122020001') { - return '/taobao/zhongchou/game'; - } - }, - }, - { - title: '淘宝众筹其他', - docs: 'https://docs.rsshub.app/routes/shopping#tao-bao-zhong-chou-zhong-chou-xiang-mu', - source: ['/list.htm'], - target: (params, url) => { - if (new URLSearchParams(new URL(url).search).get('type') === '125706031,125888001,125886001,123332001') { - return '/taobao/zhongchou/other'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/taobao/router.ts b/lib/routes/taobao/router.ts deleted file mode 100644 index 47537d54e..000000000 --- a/lib/routes/taobao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/zhongchou/:type?', './zhongchou'); -}; diff --git a/lib/routes/taobao/zhongchou.ts b/lib/routes/taobao/zhongchou.ts index f6bee5020..15d4af9b3 100644 --- a/lib/routes/taobao/zhongchou.ts +++ b/lib/routes/taobao/zhongchou.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -5,7 +6,28 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/zhongchou/:type?', + categories: ['shopping'], + example: '/taobao/zhongchou/all', + parameters: { type: '类型, 默认为 `all` 全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '众筹项目', + maintainers: ['xyqfer', 'Fatpandac'], + handler, + description: `| 全部 | 科技 | 食品 | 动漫 | 设计 | 公益 | 娱乐 | 影音 | 书籍 | 游戏 | 其他 | + | ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- | + | all | tech | agriculture | acg | design | love | tele | music | book | game | other |`, +}; + +async function handler(ctx) { const { type = 'all' } = ctx.req.param(); const map = { all: '', @@ -41,9 +63,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `淘宝众筹-${type}`, link: 'https://izhongchou.taobao.com/index.htm', item: items, - }); -}; + }; +} diff --git a/lib/routes/taoguba/blog.ts b/lib/routes/taoguba/blog.ts index 43b4690e1..6d423a4ae 100644 --- a/lib/routes/taoguba/blog.ts +++ b/lib/routes/taoguba/blog.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/blog/:id', '/user/:id'], + categories: ['finance'], + example: '/taoguba/blog/252069', + parameters: { id: '博客 id,可在对应博客页中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['taoguba.com.cn/blog/:id', 'taoguba.com.cn/'], + }, + name: '用户博客', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.taoguba.com.cn'; @@ -75,11 +97,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `淘股吧 - ${author}`, description: $('meta[http-equiv="description"]').attr('content'), image: $('meta[property="og:image"]').attr('content'), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/taoguba/index.ts b/lib/routes/taoguba/index.ts index 67f8349c1..ce5c54cde 100644 --- a/lib/routes/taoguba/index.ts +++ b/lib/routes/taoguba/index.ts @@ -1,10 +1,21 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: ['/index', '/:category?'], + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + description: `| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 | + | -------- | -------- | -------- | -------- | + | bbs | zongban | jinghua | dianzan |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'zongban'; const rootUrl = 'https://www.taoguba.com.cn'; @@ -75,9 +86,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim().split('_')[0], link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/taoguba/maintainer.ts b/lib/routes/taoguba/maintainer.ts deleted file mode 100644 index 67a91c684..000000000 --- a/lib/routes/taoguba/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/blog/:id': ['nczitzk'], - '/index': ['nczitzk'], - '/user/:id': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/taoguba/namespace.ts b/lib/routes/taoguba/namespace.ts new file mode 100644 index 000000000..869a807a6 --- /dev/null +++ b/lib/routes/taoguba/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '淘股吧', + url: 'taoguba.com.cn', +}; diff --git a/lib/routes/taoguba/radar.ts b/lib/routes/taoguba/radar.ts deleted file mode 100644 index 5b9f3754c..000000000 --- a/lib/routes/taoguba/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'taoguba.com.cn': { - _name: '淘股吧', - '.': [ - { - title: '淘股论坛', - docs: 'https://docs.rsshub.app/routes/finance#tao-gu-ba-tao-gu-lun-tan', - source: ['/:category', '/'], - target: '/taoguba/:category', - }, - { - title: '用户博客', - docs: 'https://docs.rsshub.app/routes/finance#tao-gu-ba-yong-hu-bo-ke', - source: ['/blog/:id', '/'], - target: '/taoguba/blog/:id', - }, - ], - }, -}; diff --git a/lib/routes/taoguba/router.ts b/lib/routes/taoguba/router.ts deleted file mode 100644 index 79b04389a..000000000 --- a/lib/routes/taoguba/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/blog/:id', './blog'); - router.get('/index', './index'); - router.get('/user/:id', './blog'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/taptap/changelog.ts b/lib/routes/taptap/changelog.ts index 979564505..d83cb33d3 100644 --- a/lib/routes/taptap/changelog.ts +++ b/lib/routes/taptap/changelog.ts @@ -1,8 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { getRootUrl, appDetail, X_UA } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/changelog/:id/:lang?', '/intl/changelog/:id/:lang?'], + categories: ['game'], + example: '/taptap/changelog/60809/en_US', + parameters: { id: '游戏 ID,游戏主页 URL 中获取', lang: '语言,默认使用 `zh_CN`,亦可使用 `en_US`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['taptap.com/app/:id'], + target: '/changelog/:id', + }, + name: '游戏更新', + maintainers: ['hoilc', 'ETiV'], + handler, + description: `#### 语言代码 + + | English (US) | 繁體中文 | 한국어 | 日本語 | + | ------------ | -------- | ------ | ------ | + | en\_US | zh\_TW | ko\_KR | ja\_JP |`, +}; + +async function handler(ctx) { const is_intl = ctx.req.url.indexOf('/intl/') === 0; const id = ctx.req.param('id'); const lang = ctx.req.param('lang') ?? (is_intl ? 'en_US' : 'zh_CN'); @@ -25,7 +53,7 @@ export default async (ctx) => { const list = response.data.data.list; - ctx.set('data', { + return { title: `TapTap 更新记录 ${app_name}`, description: app_description, link: url, @@ -37,5 +65,5 @@ export default async (ctx) => { link: url, guid: item.version_label, })), - }); -}; + }; +} diff --git a/lib/routes/taptap/maintainer.ts b/lib/routes/taptap/maintainer.ts deleted file mode 100644 index 0599c14c6..000000000 --- a/lib/routes/taptap/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/changelog/:id/:lang?': ['hoilc', 'ETiV'], - '/review/:id/:order?/:lang?': ['hoilc', 'TonyRL'], - '/topic/:id/:type?/:sort?/:lang?': ['hoilc', 'TonyRL'], - '/intl/changelog/:id/:lang?': ['hoilc', 'ETiV'], - '/intl/review/:id/:order?/:lang?': ['hoilc', 'TonyRL', 'ETiV'], -}; diff --git a/lib/routes/taptap/namespace.ts b/lib/routes/taptap/namespace.ts new file mode 100644 index 000000000..a09009cac --- /dev/null +++ b/lib/routes/taptap/namespace.ts @@ -0,0 +1,10 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TapTap 中国', + url: 'taptap.com', + description: `:::warning +由于区域限制,需要在有国内 IP 的机器上自建才能正常获取 RSS。\ +而对于《TapTap 国际版》则需要部署在具有海外出口的 IP 上才可正常获取 RSS。 +:::`, +}; diff --git a/lib/routes/taptap/radar.ts b/lib/routes/taptap/radar.ts deleted file mode 100644 index 33d8d0456..000000000 --- a/lib/routes/taptap/radar.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default { - 'taptap.com': { - _name: 'TapTap', - '.': [ - { - title: '游戏论坛', - docs: 'https://docs.rsshub.app/routes/game#taptap', - source: ['/app/:id/topic', '/app/:id'], - target: '/taptap/topic/:id', - }, - { - title: '游戏更新', - docs: 'https://docs.rsshub.app/routes/game#taptap', - source: ['/app/:id'], - target: '/taptap/changelog/:id', - }, - { - title: '游戏评价', - docs: 'https://docs.rsshub.app/routes/game#taptap', - source: ['/app/:id/review', '/app/:id'], - target: '/taptap/review/:id', - }, - ], - }, - 'taptap.io': { - _name: 'TapTap International', - '.': [ - { - title: 'Changelog', - docs: 'https://docs.rsshub.app/routes/game#taptap', - source: ['/app/:id'], - target: '/taptap/intl/changelog/:id', - }, - { - title: 'Ratings & Reviews', - docs: 'https://docs.rsshub.app/routes/game#taptap', - source: ['/app/:id/review', '/app/:id'], - target: '/taptap/intl/review/:id', - }, - ], - }, -}; diff --git a/lib/routes/taptap/review.ts b/lib/routes/taptap/review.ts index 4e4a068db..0fc0ac67e 100644 --- a/lib/routes/taptap/review.ts +++ b/lib/routes/taptap/review.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { getRootUrl, appDetail, X_UA } from './utils'; @@ -103,7 +104,43 @@ const fetchIntlItems = async (params) => { }); }; -export default async (ctx) => { +export const route: Route = { + path: ['/review/:id/:order?/:lang?', '/intl/review/:id/:order?/:lang?'], + categories: ['game'], + example: '/taptap/review/142793/hot', + parameters: { id: '游戏 ID,游戏主页 URL 中获取', order: '排序方式,空为默认排序,可选如下', lang: '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['taptap.com/app/:id/review', 'taptap.com/app/:id'], + target: '/review/:id', + }, + name: '游戏评价', + maintainers: ['hoilc', 'TonyRL'], + handler, + description: `#### 排序方式 + + | 最相关 | 最新 | + | ------- | ---- | + | default | new | + + #### 语言代码 + + | English (US) | 繁體中文 | 한국어 | 日本語 | + | ------------ | -------- | ------ | ------ | + | en\_US | zh\_TW | ko\_KR | ja\_JP |`, + description: `| 最新 | 最热 | 游戏时长 | 默认排序 | + | ------ | ---- | -------- | -------- | + | update | hot | spent | default |`, +}; + +async function handler(ctx) { const is_intl = ctx.req.url.indexOf('/intl/') === 0; const id = ctx.req.param('id'); const order = ctx.req.param('order') ?? 'default'; @@ -115,12 +152,12 @@ export default async (ctx) => { const items = is_intl ? await fetchIntlItems(ctx.params) : await fetchMainlandItems(ctx.params); - ctx.set('data', { + return { title: `TapTap 评价 ${app_name} - ${(is_intl ? intlSortMap : sortMap)[order][lang]}排序`, link: `${getRootUrl(is_intl)}/app/${id}/review?${makeSortParam(is_intl, order)}`, image: app_img, item: items, - }); + }; ctx.set('json', { title: `TapTap 评价 ${app_name} - ${(is_intl ? intlSortMap : sortMap)[order][lang]}排序`, @@ -128,4 +165,4 @@ export default async (ctx) => { image: app_img, item: items, }); -}; +} diff --git a/lib/routes/taptap/router.ts b/lib/routes/taptap/router.ts deleted file mode 100644 index e9573ad18..000000000 --- a/lib/routes/taptap/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/changelog/:id/:lang?', './changelog'); - router.get('/review/:id/:order?/:lang?', './review'); - router.get('/topic/:id/:type?/:sort?/:lang?', './topic'); - // TapTap.io, the international website - router.get('/intl/changelog/:id/:lang?', './changelog'); - router.get('/intl/review/:id/:order?/:lang?', './review'); -}; diff --git a/lib/routes/taptap/topic.ts b/lib/routes/taptap/topic.ts index 1fb97879b..bcc9863d4 100644 --- a/lib/routes/taptap/topic.ts +++ b/lib/routes/taptap/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -22,7 +23,36 @@ const typeMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:id/:type?/:sort?/:lang?', + categories: ['game'], + example: '/taptap/topic/142793/official', + parameters: { id: '游戏 ID,游戏主页 URL 中获取', type: '论坛版块,默认显示所有帖子,论坛版块 URL 中 `type` 参数,见下表,默认为 `feed`', sort: '排序,见下表,默认为 `created`', lang: '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['taptap.com/app/:id/topic', 'taptap.com/app/:id'], + target: '/topic/:id', + }, + name: '游戏论坛', + maintainers: ['hoilc', 'TonyRL'], + handler, + description: `| 全部 | 精华 | 官方 | 影片 | + | ---- | ----- | -------- | ----- | + | feed | elite | official | video | + + | 发布时间 | 回复时间 | + | -------- | --------- | + | created | commented |`, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang') ?? 'zh_CN'; const appId = ctx.req.param('id'); const appData = await appDetail(appId, lang); @@ -67,12 +97,12 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${app_name} - ${typeMap[type][lang]} - TapTap 论坛`, link: `${getRootUrl(false)}/app/${appId}/topic?type=${type}&sort=${sort}`, image: app_img, item: out.filter((item) => item !== ''), - }); + }; ctx.set('json', { title: `${app_name} - ${typeMap[type][lang]} - TapTap 论坛`, @@ -83,4 +113,4 @@ export default async (ctx) => { groupId, topics_list, }); -}; +} diff --git a/lib/routes/tass/maintainer.ts b/lib/routes/tass/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/tass/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/tass/namespace.ts b/lib/routes/tass/namespace.ts new file mode 100644 index 000000000..0acbce624 --- /dev/null +++ b/lib/routes/tass/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Russian News Agency TASS', + url: 'tass.com', +}; diff --git a/lib/routes/tass/news.ts b/lib/routes/tass/news.ts index 22d62f19e..9ad8205ad 100644 --- a/lib/routes/tass/news.ts +++ b/lib/routes/tass/news.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/tass/politics', + parameters: { category: 'Category, can be found in URL, `politics` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tass.com/:category'], + target: '/:category', + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + description: `| Russian Politics & Diplomacy | World | Business & Economy | Military & Defense | Science & Space | Emergencies | Society & Culture | Press Review | Sports | + | ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ | + | politics | world | economy | defense | science | emergencies | society | pressreview | sports |`, +}; + +async function handler(ctx) { const { category = 'politics' } = ctx.req.param(); const { data: categoryPage, url: link } = await got(`https://tass.com/${category}`); @@ -47,7 +73,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link, language: 'en', @@ -55,5 +81,5 @@ export default async (ctx) => { icon: $('head link[rel="apple-touch-icon"]').attr('href'), logo: $('head link[rel="apple-touch-icon"]').attr('href'), item: items, - }); -}; + }; +} diff --git a/lib/routes/tass/radar.ts b/lib/routes/tass/radar.ts deleted file mode 100644 index ba66ed1d3..000000000 --- a/lib/routes/tass/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tass.com': { - _name: 'Russian News Agency TASS', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/traditional-media.html#russian-news-agency-tass', - source: ['/:category'], - target: '/tass/:category', - }, - ], - }, -}; diff --git a/lib/routes/tass/router.ts b/lib/routes/tass/router.ts deleted file mode 100644 index 009a87867..000000000 --- a/lib/routes/tass/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './news'); -}; diff --git a/lib/routes/techcrunch/maintainer.ts b/lib/routes/techcrunch/maintainer.ts deleted file mode 100644 index 4a84e5e27..000000000 --- a/lib/routes/techcrunch/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['EthanWng97'], -}; diff --git a/lib/routes/techcrunch/namespace.ts b/lib/routes/techcrunch/namespace.ts new file mode 100644 index 000000000..0558c9f0d --- /dev/null +++ b/lib/routes/techcrunch/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TechCrunch', + url: 'techcrunch.com', +}; diff --git a/lib/routes/techcrunch/news.ts b/lib/routes/techcrunch/news.ts index ca0697bb0..7f642bdac 100644 --- a/lib/routes/techcrunch/news.ts +++ b/lib/routes/techcrunch/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'https://techcrunch.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/techcrunch/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['techcrunch.com/'], + }, + name: 'News', + maintainers: ['EthanWng97'], + handler, + url: 'techcrunch.com/', +}; + +async function handler() { const rssUrl = `${host}/feed/`; const feed = await parser.parseURL(rssUrl); const items = await Promise.all( @@ -30,10 +53,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'TechCrunch', link: host, description: 'Reporting on the business of technology, startups, venture capital funding, and Silicon Valley.', item: items, - }); -}; + }; +} diff --git a/lib/routes/techcrunch/radar.ts b/lib/routes/techcrunch/radar.ts deleted file mode 100644 index ae37ea9d4..000000000 --- a/lib/routes/techcrunch/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'techcrunch.com': { - _name: 'TechCrunch', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#techcrunch', - source: '/', - target: '/techcrunch/news', - }, - ], - }, -}; diff --git a/lib/routes/techcrunch/router.ts b/lib/routes/techcrunch/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/techcrunch/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/techflowpost/express.ts b/lib/routes/techflowpost/express.ts index cf2270a8e..7d574371d 100644 --- a/lib/routes/techflowpost/express.ts +++ b/lib/routes/techflowpost/express.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; -export default async (ctx) => { +export const route: Route = { + path: ['/express', '/newsflash'], + categories: ['finance'], + example: '/techflowpost/express', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['techflowpost.com/newsletter/index.html'], + }, + name: '快讯', + maintainers: ['nczitzk'], + handler, + url: 'techflowpost.com/', + url: 'techflowpost.com/newsletter/index.html', +}; + +async function handler(ctx) { const rootUrl = 'https://www.techflowpost.com'; const currentUrl = `${rootUrl}/newsletter/index.html`; @@ -23,9 +47,9 @@ export default async (ctx) => { description: item.scontent, })); - ctx.set('data', { + return { title: '深潮TechFlow - 快讯', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/techflowpost/index.ts b/lib/routes/techflowpost/index.ts index 3ee9370e8..1e182e953 100644 --- a/lib/routes/techflowpost/index.ts +++ b/lib/routes/techflowpost/index.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['techflowpost.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'techflowpost.com/', +}; + +async function handler(ctx) { const rootUrl = 'https://www.techflowpost.com'; const { data: response } = await got.post('https://www.techflowpost.com/ashx/index.ashx', { @@ -22,9 +35,9 @@ export default async (ctx) => { description: item.scontent, })); - ctx.set('data', { + return { title: '深潮TechFlow', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/techflowpost/maintainer.ts b/lib/routes/techflowpost/maintainer.ts deleted file mode 100644 index 96d89cb21..000000000 --- a/lib/routes/techflowpost/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/express': ['nczitzk'], - '/': ['nczitzk'], -}; diff --git a/lib/routes/techflowpost/namespace.ts b/lib/routes/techflowpost/namespace.ts new file mode 100644 index 000000000..35a074606 --- /dev/null +++ b/lib/routes/techflowpost/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '深潮 TechFlow', + url: 'techflowpost.com', +}; diff --git a/lib/routes/techflowpost/radar.ts b/lib/routes/techflowpost/radar.ts deleted file mode 100644 index 428158861..000000000 --- a/lib/routes/techflowpost/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'techflowpost.com': { - _name: '深潮TechFlow', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/finance#shen-chao-techflow-shou-ye', - source: ['/'], - target: '/techflowpost', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/finance#shen-chao-techflow-kuai-xun', - source: ['/newsletter/index.html'], - target: '/techflowpost/express', - }, - ], - }, -}; diff --git a/lib/routes/techflowpost/router.ts b/lib/routes/techflowpost/router.ts deleted file mode 100644 index f4dd69e12..000000000 --- a/lib/routes/techflowpost/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/express', './express'); - router.get('/newsflash', './express'); - router.get('/', './index'); -}; diff --git a/lib/routes/techpowerup/index.ts b/lib/routes/techpowerup/index.ts index be235b4cd..6d9feeacf 100644 --- a/lib/routes/techpowerup/index.ts +++ b/lib/routes/techpowerup/index.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, headers, fixImages, parseReviews } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['techpowerup.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'techpowerup.com/', +}; + +async function handler() { const { data: response } = await got(baseUrl, { headers, }); @@ -60,11 +73,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'TechPowerUp', link: baseUrl, language: 'en', image: 'https://tpucdn.com/apple-touch-icon-v1684568903519.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/techpowerup/maintainer.ts b/lib/routes/techpowerup/maintainer.ts deleted file mode 100644 index 6cca50181..000000000 --- a/lib/routes/techpowerup/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['TonyRL'], - '/review/:keyword?': ['TonyRL'], -}; diff --git a/lib/routes/techpowerup/namespace.ts b/lib/routes/techpowerup/namespace.ts new file mode 100644 index 000000000..d520cf3ae --- /dev/null +++ b/lib/routes/techpowerup/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TechPowerUp', + url: 'techpowerup.com', +}; diff --git a/lib/routes/techpowerup/radar.ts b/lib/routes/techpowerup/radar.ts deleted file mode 100644 index f7af0dc2a..000000000 --- a/lib/routes/techpowerup/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'techpowerup.com': { - _name: 'TechPowerUp', - '.': [ - { - title: 'Latest Content', - docs: 'https://docs.rsshub.app/routes/new-media#techpowerup', - source: ['/'], - target: '/techpowerup', - }, - { - title: 'Reviews', - docs: 'https://docs.rsshub.app/routes/new-media#techpowerup', - source: ['/review/search', '/review'], - target: (_, url) => `/techpowerup/review${new URL(url).searchParams.has('q') ? `/${new URL(url).searchParams.get('q')}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/techpowerup/review.ts b/lib/routes/techpowerup/review.ts index 27250e63c..6a51d294d 100644 --- a/lib/routes/techpowerup/review.ts +++ b/lib/routes/techpowerup/review.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, headers, fixImages, parseReviews } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/review/:keyword?', + categories: ['new-media'], + example: '/techpowerup/review/4090', + parameters: { keyword: 'Search Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['techpowerup.com/'], + target: '', + }, + name: 'Reviews', + maintainers: ['TonyRL'], + handler, + url: 'techpowerup.com/', +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const url = new URL(`${baseUrl}/review/${keyword ? 'search/' : ''}`); @@ -60,11 +84,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Reviews | TechPowerUp', link: url.href, language: 'en', image: 'https://tpucdn.com/apple-touch-icon-v1684568903519.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/techpowerup/router.ts b/lib/routes/techpowerup/router.ts deleted file mode 100644 index d5f8ecaba..000000000 --- a/lib/routes/techpowerup/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/review/:keyword?', './review'); -}; diff --git a/lib/routes/telecompaper/maintainer.ts b/lib/routes/telecompaper/maintainer.ts deleted file mode 100644 index 31b958c8b..000000000 --- a/lib/routes/telecompaper/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:caty/:year?/:country?/:type?': ['nczitzk'], - '/search/:keyword?/:company?/:sort?/:period?': ['nczitzk'], -}; diff --git a/lib/routes/telecompaper/namespace.ts b/lib/routes/telecompaper/namespace.ts new file mode 100644 index 000000000..8712b73ad --- /dev/null +++ b/lib/routes/telecompaper/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Telecompaper', + url: 'telecompaper.com', +}; diff --git a/lib/routes/telecompaper/news.ts b/lib/routes/telecompaper/news.ts index 9f8a35aab..ba7af4a4d 100644 --- a/lib/routes/telecompaper/news.ts +++ b/lib/routes/telecompaper/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,41 @@ import tough from 'tough-cookie'; // eslint-disable-next-line n/no-extraneous-require import FormData from 'form-data'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:caty/:year?/:country?/:type?', + categories: ['journal'], + example: '/telecompaper/news/mobile/2020/China/News', + parameters: { + caty: 'Category, see table below', + year: 'Year. The year in respective category page filter, `all` for unlimited year, empty by default', + country: 'Country or continent, `all` for unlimited country or continent, empty by default', + type: 'Type, can be found in the `Types` filter, `all` for unlimited type, unlimited by default', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + description: `Category + + | WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES | + | -------- | --------- | --------- | ------- | -- | ------------------ | + | mobile | internet | boardcast | general | it | industry-resources | + + :::tip + If \`country\` or \`type\` includes empty space, use \`-\` instead. For example, \`United States\` needs to be replaced with \`United-States\`, \`White paper\` needs to be replaced with \`White-paper\` + + Filters in [INDUSTRY RESOURCES](https://www.telecompaper.com/industry-resources) only provides \`Content Type\` which corresponds to \`type\`. \`year\` and \`country\` are not supported. + :::`, +}; + +async function handler(ctx) { const rootUrl = `https://www.telecompaper.com/${ctx.req.param('caty') === 'industry-resources' ? ctx.req.param('caty') : 'international/news/' + ctx.req.param('caty')}`; const year = ctx.req.param('year') ?? 'all'; const country = ctx.req.param('country') ? ctx.req.param('country').split('-').join(' ') : 'all'; @@ -94,9 +129,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Telecompaper - ' + $('h1').text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/telecompaper/radar.ts b/lib/routes/telecompaper/radar.ts deleted file mode 100644 index b0e504b71..000000000 --- a/lib/routes/telecompaper/radar.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - 'telecompaper.com': { - _name: 'Telecompaper', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/journal#telecompaper', - }, - { - title: 'Search', - docs: 'https://docs.rsshub.app/routes/journal#telecompaper', - }, - ], - }, -}; diff --git a/lib/routes/telecompaper/router.ts b/lib/routes/telecompaper/router.ts deleted file mode 100644 index 0f40a1624..000000000 --- a/lib/routes/telecompaper/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:caty/:year?/:country?/:type?', './news'); - router.get('/search/:keyword?/:company?/:sort?/:period?', './search'); -}; diff --git a/lib/routes/telecompaper/search.ts b/lib/routes/telecompaper/search.ts index d8fb9beb6..605ac8ebb 100644 --- a/lib/routes/telecompaper/search.ts +++ b/lib/routes/telecompaper/search.ts @@ -1,8 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/search/:keyword?/:company?/:sort?/:period?', + categories: ['journal'], + example: '/telecompaper/search/Nokia', + parameters: { keyword: 'Keyword', company: 'Company name, empty by default', sort: 'Sorting, see table below, `Date Descending` by default', period: 'Date selection, Last 12 months by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['nczitzk'], + handler, + description: `Sorting + + | Date Ascending | Date Descending | + | -------------- | --------------- | + | 1 | 2 | + + Date selection + + | 1 month | 3 months | 6 months | 12 months | 24 months | + | ------- | -------- | -------- | --------- | --------- | + | 1 | 3 | 6 | 12 | 24 |`, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword') || ''; const company = ctx.req.param('company') || ''; const sort = ctx.req.param('sort') || '2'; @@ -69,9 +99,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Telecompaper Search - ${keyword}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/telegram/blog.ts b/lib/routes/telegram/blog.ts index af54242bc..7ffe77ff4 100644 --- a/lib/routes/telegram/blog.ts +++ b/lib/routes/telegram/blog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import cherrio from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['social-media'], + example: '/telegram/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['telegram.org/blog'], + }, + name: 'Telegram Blog', + maintainers: ['fengkx'], + handler, + url: 'telegram.org/blog', +}; + +async function handler() { const link = 'https://telegram.org/blog'; const res = await got(link); @@ -28,9 +51,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: $$('title').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index e41b05968..88ed1a83e 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -54,7 +55,58 @@ const mediaTagDict = { PARTIALLY_UNSUPPORTED: ['', ''], }; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:username/:routeParams?', + categories: ['social-media'], + example: '/telegram/channel/awesomeDIYgod/searchQuery=twitter', + parameters: { username: 'channel username', routeParams: 'extra parameters, see the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['t.me/s/:username'], + target: '/channel/:username', + }, + name: 'Channel', + maintainers: ['DIYgod', 'Rongronggg9'], + handler, + description: `| Key | Description | Accepts | Defaults to | + | --------------------- | --------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | + | showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true | + | showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true | + | showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true | + | showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true | + | showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true | + | showInlineButtons | Show inline buttons | 0/1/true/false | false | + | showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true | + | showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true | + | includeFwd | Include forwarded messages | 0/1/true/false | true | + | includeReply | Include reply messages | 0/1/true/false | true | + | includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true | + | includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false | + | searchQuery | search query | keywords; replace \`#\` by \`%23\` for hashtag searching | (search disabled) | + + Specify different option values than default values can meet different needs, URL + + \`\`\` + https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0 + \`\`\` + + generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions. + + :::tip + For backward compatibility reasons, invalid \`routeParams\` will be treated as \`searchQuery\` . + + Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`. + :::`, +}; + +async function handler(ctx) { const useWeb = ctx.req.param('routeParams') || !config.telegram.session; if (!useWeb) { return tglibchannel(ctx); @@ -116,7 +168,7 @@ export default async (ctx) => { const channelName = $('.tgme_channel_info_header_title').text(); const feedTitle = (searchQuery ? `"${searchQuery}" - ` : '') + channelName + ' - Telegram Channel'; - ctx.set('data', { + return { title: feedTitle, description: $('.tgme_channel_info_description').text(), link: resourceUrl, @@ -598,5 +650,5 @@ export default async (ctx) => { .get() .filter(Boolean) .reverse(), - }); -}; + }; +} diff --git a/lib/routes/telegram/maintainer.ts b/lib/routes/telegram/maintainer.ts deleted file mode 100644 index 61cd659c5..000000000 --- a/lib/routes/telegram/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/blog': ['fengkx'], - '/channel/:username': ['synchrone'], - '/channel/:username/:routeParams?': ['DIYgod', 'Rongronggg9'], - '/stickerpack/:name': ['DIYgod'], -}; diff --git a/lib/routes/telegram/namespace.ts b/lib/routes/telegram/namespace.ts new file mode 100644 index 000000000..34414965a --- /dev/null +++ b/lib/routes/telegram/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Telegram', + url: 't.me', +}; diff --git a/lib/routes/telegram/radar.ts b/lib/routes/telegram/radar.ts deleted file mode 100644 index 239219868..000000000 --- a/lib/routes/telegram/radar.ts +++ /dev/null @@ -1,34 +0,0 @@ -export default { - 't.me': { - _name: 'Telegram', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/social-media#telegram', - source: '/:username', - target: (params, url, document) => { - if (document?.querySelector('a[href^="/s/"]')) { - return '/telegram/channel/:username'; - } - }, - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/social-media#telegram', - source: '/s/:username', - target: '/telegram/channel/:username', - }, - ], - }, - 'telegram.org': { - _name: 'Telegram', - '.': [ - { - title: 'Telegram Blog', - docs: 'https://docs.rsshub.app/routes/social-media#telegram-telegram-blog', - source: '/blog', - target: '/telegram/blog', - }, - ], - }, -}; diff --git a/lib/routes/telegram/router.ts b/lib/routes/telegram/router.ts deleted file mode 100644 index ffe122a1f..000000000 --- a/lib/routes/telegram/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/channel/:username/:routeParams?', './channel'); - router.get('/stickerpack/:name', './stickerpack'); - router.get('/blog', './blog'); -}; diff --git a/lib/routes/telegram/stickerpack.ts b/lib/routes/telegram/stickerpack.ts index a06a61275..4525169b5 100644 --- a/lib/routes/telegram/stickerpack.ts +++ b/lib/routes/telegram/stickerpack.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/stickerpack/:name', + categories: ['social-media'], + example: '/telegram/stickerpack/DIYgod', + parameters: { name: 'Sticker Pack name, available in the sharing URL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Sticker Pack', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { if (!config.telegram || !config.telegram.token) { throw new Error('Telegram Sticker Pack RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -14,7 +33,7 @@ export default async (ctx) => { const data = response.data.result; - ctx.set('data', { + return { title: `${data.title} - Telegram Sticker Pack`, link: `https://t.me/addstickers/${name}`, item: data.stickers.map((item) => ({ @@ -22,5 +41,5 @@ export default async (ctx) => { description: item.file_id, guid: item.file_id, })), - }); -}; + }; +} diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index b31f7f2c0..41c61e503 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -152,14 +152,14 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: channelInfo.title, language: null, link: `https://t.me/${channelInfo.username}`, item, allowEmpty: ctx.req.param('id') === 'allow_empty', description: `@${channelInfo.username} on Telegram`, - }); + }; }; export { getMedia }; diff --git a/lib/routes/tencent/maintainer.ts b/lib/routes/tencent/maintainer.ts deleted file mode 100644 index 655b1f73d..000000000 --- a/lib/routes/tencent/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/news/author/:mid': ['LogicJake', 'miles170'], - '/news/coronavirus/data/:province?/:city?': ['CaoMeiYouRen'], - '/news/coronavirus/total': ['CaoMeiYouRen'], - '/pvp/newsindex/:type': ['Jeason0228', 'HenryQW'], - '/qq/sdk/changelog/:platform': ['nuomi1'], -}; diff --git a/lib/routes/tencent/namespace.ts b/lib/routes/tencent/namespace.ts new file mode 100644 index 000000000..00130d612 --- /dev/null +++ b/lib/routes/tencent/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '王者荣耀', + url: 'mp.weixin.qq.com', +}; diff --git a/lib/routes/tencent/news/author.ts b/lib/routes/tencent/news/author.ts index 1f951195a..eac4a6291 100644 --- a/lib/routes/tencent/news/author.ts +++ b/lib/routes/tencent/news/author.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { config } from '@/config'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/author/:mid', + categories: ['new-media'], + example: '/tencent/news/author/5933889', + parameters: { mid: '企鹅号 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['new.qq.com/omn/author/:mid'], + }, + name: '更新', + maintainers: ['LogicJake', 'miles170'], + handler, +}; + +async function handler(ctx) { const mid = ctx.req.param('mid'); const homePageInfoUrl = `https://i.news.qq.com/i/getUserHomepageInfo?chlid=${mid}`; const userInfo = await cache.tryGet(homePageInfoUrl, async () => (await got(homePageInfoUrl)).data.userinfo); @@ -67,10 +89,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title, description, link: `https://new.qq.com/omn/author/${mid}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/tencent/news/coronavirus/data.ts b/lib/routes/tencent/news/coronavirus/data.ts index 9a009f61d..269703665 100644 --- a/lib/routes/tencent/news/coronavirus/data.ts +++ b/lib/routes/tencent/news/coronavirus/data.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/coronavirus/data/:province?/:city?', + name: 'Unknown', + maintainers: ['CaoMeiYouRen'], + handler, +}; + +async function handler(ctx) { const province = ctx.req.param('province') || ''; const city = ctx.req.param('city') || ''; @@ -66,9 +74,9 @@ export default async (ctx) => { item.push(info); - ctx.set('data', { + return { title, link, item, - }); -}; + }; +} diff --git a/lib/routes/tencent/news/coronavirus/total.ts b/lib/routes/tencent/news/coronavirus/total.ts index 6c56690e8..3b2f9a6c0 100644 --- a/lib/routes/tencent/news/coronavirus/total.ts +++ b/lib/routes/tencent/news/coronavirus/total.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,18 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/coronavirus/total', + radar: { + source: ['new.qq.com/zt2020/page/feiyan.htm'], + }, + name: 'Unknown', + maintainers: ['CaoMeiYouRen'], + handler, + url: 'new.qq.com/zt2020/page/feiyan.htm', +}; + +async function handler() { const title = '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪'; const link = 'https://news.qq.com/zt2020/page/feiyan.htm#/'; const item = []; @@ -29,9 +41,9 @@ export default async (ctx) => { }; item.push(info); - ctx.set('data', { + return { title, link, item, - }); -}; + }; +} diff --git a/lib/routes/tencent/pvp/newsindex.ts b/lib/routes/tencent/pvp/newsindex.ts index 59acf790c..41064e33b 100644 --- a/lib/routes/tencent/pvp/newsindex.ts +++ b/lib/routes/tencent/pvp/newsindex.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const map = new Map([ @@ -36,7 +37,28 @@ const getPage = async (id, typeName) => { ); }; -export default async (ctx) => { +export const route: Route = { + path: '/pvp/newsindex/:type', + categories: ['game'], + example: '/tencent/pvp/newsindex/all', + parameters: { type: '栏目分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻中心', + maintainers: ['Jeason0228', 'HenryQW'], + handler, + description: `| 全部 | 热门 | 新闻 | 公告 | 活动 | 赛事 | 优化 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | all | rm | xw | gg | hd | ss | yh |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const OutName = map.get(type).name; const OutId = map.get(type).channelid; @@ -57,10 +79,10 @@ export default async (ctx) => { item = await getPage(OutId, OutName); } - ctx.set('data', { + return { title: `【${OutName}】 - 王者荣耀 - 新闻列表`, link, description: `《王者荣耀》是腾讯天美工作室历时3年推出的东方英雄即时对战手游大作,抗塔强杀、团灭超神,领略爽热血竞技的酣畅淋漓!1v1、3v3、闯关等丰富游戏模式,随时战,更自由!跨服匹配秒开局,好友组队战排位,不靠装备、没有等级,更公平、更爽快的无差异对战!`, item, - }); -}; + }; +} diff --git a/lib/routes/tencent/qq/sdk/changelog.ts b/lib/routes/tencent/qq/sdk/changelog.ts index 9ce663461..3b7d92762 100644 --- a/lib/routes/tencent/qq/sdk/changelog.ts +++ b/lib/routes/tencent/qq/sdk/changelog.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/qq/sdk/changelog/:platform', + categories: ['program-update'], + example: '/tencent/qq/sdk/changelog/iOS', + parameters: { platform: '平台,iOS / Android' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '更新日志', + maintainers: ['nuomi1'], + handler, +}; + +async function handler(ctx) { const platform = ctx.req.param('platform'); let title = ''; @@ -48,9 +67,9 @@ export default async (ctx) => { return changelog; }); - ctx.set('data', { + return { title, link, item: changelogs, - }); -}; + }; +} diff --git a/lib/routes/tencent/radar.ts b/lib/routes/tencent/radar.ts deleted file mode 100644 index 598a54957..000000000 --- a/lib/routes/tencent/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'qq.com': { - _name: '腾讯', - 'mp.weixin': [ - { - title: '微信公众号栏目', - docs: 'https://docs.rsshub.app/routes/new-media#gong-zhong-hao-lan-mu-fei-tui-song-li-shi-xiao-xi', - source: '/mp/homepage', - target: (params, url) => `/wechat/mp/homepage/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('hid')}/${new URL(url).searchParams.get('cid') ?? ''}`, - }, - { - title: '微信公众号话题', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin-gong-zhong-hao-wen-zhang-hua-ti-tag', - source: '/mp/appmsgalbum', - target: (params, url) => `/wechat/mp/msgalbum/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('album_id')}`, - }, - ], - new: [ - { - title: '腾讯企鹅号 - 更新', - docs: 'https://docs.rsshub.app/routes/new-media#teng-xun-qi-e-hao-geng-xin', - source: ['/omn/author/:mid'], - target: '/tencent/news/author/:mid', - }, - { - title: '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪', - docs: 'https://docs.rsshub.app/routes/other#xin-guan-fei-yan-yi-qing-xin-wen-dong-tai', - source: ['/zt2020/page/feiyan.htm'], - target: '/tencent/news/coronavirus/total', - }, - ], - pvp: [ - { - title: '王者荣耀 - 新闻中心', - docs: 'https://docs.rsshub.app/routes/game#wang-zhe-rong-yao', - source: ['/web201706/*', '/'], - target: '/tencent/pvp/newsindex/all', - }, - ], - 'wiki.connect': [ - { - title: 'QQ 互联 SDK 更新日志', - docs: 'https://docs.rsshub.app/routes/program-update#qq-hu-lian-sdk', - source: '/', - target: (_params, url) => `/tencent/qq/sdk/changelog/${new URL(url).pathname === '/ios_sdk历史变更' ? 'iOS' : 'Android'}`, - }, - ], - }, -}; diff --git a/lib/routes/tencent/router.ts b/lib/routes/tencent/router.ts deleted file mode 100644 index 389e576b6..000000000 --- a/lib/routes/tencent/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/news/author/:mid', './news/author'); - router.get('/news/coronavirus/data/:province?/:city?', './news/coronavirus/data'); - router.get('/news/coronavirus/total', './news/coronavirus/total'); - router.get('/pvp/newsindex/:type', './pvp/newsindex'); - router.get('/qq/sdk/changelog/:platform', './qq/sdk/changelog'); -}; diff --git a/lib/routes/tesla/cx.ts b/lib/routes/tesla/cx.ts index f19cf9e61..4644cdc72 100644 --- a/lib/routes/tesla/cx.ts +++ b/lib/routes/tesla/cx.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,101 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/cx/:category?/:city?', + categories: ['shopping'], + example: '/tesla/cx/生活方式/北京', + parameters: { category: '分类,见下表,默认为空,即全部', city: '城市,默认为空,即全国' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '权益中心', + maintainers: ['simonsmh', 'nczitzk'], + handler, + description: `| 充电免停 | 酒店 | 美食 | 生活方式 | + | -------- | ---- | ---- | -------- | + + :::tip + 分类为 **充电免停** 时,城市参数不起作用 + ::: + + <details> + <summary>可选城市</summary> + + | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | + | ---- | ---- | ------------------ | ---- | ---- | ---- | + + | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | + | ---- | ---- | ---- | ---- | ---- | ------ | + + | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | + | ---- | ---- | ---- | ---- | ---- | ------ | + + | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | + | ---- | ---- | ---- | ---- | ---- | ------ | + + | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | + | ------ | ---- | ---- | ---- | ---- | ---- | + + | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | + | ---- | ---- | ---- | ---- | ------ | ---- | + + | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | + | ---- | ---- | ---- | ---- | ---- | ---- | + + | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | + | ---- | ---- | -------------- | ---- | ---- | ------ | + + | 曲阜 | 郴州 | 济源 | 兴义 | + | ---- | ---- | ---- | ---- | + </details>`, +}; + +async function handler(ctx) { const { category, city } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -107,7 +202,7 @@ export default async (ctx) => { const description = `${city ?? ''}${category ?? ''}`; const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author}权益中心${description ? ` - ${description}` : ''}`, link: currentUrl, @@ -119,5 +214,5 @@ export default async (ctx) => { subtitle: description, author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/tesla/maintainer.ts b/lib/routes/tesla/maintainer.ts deleted file mode 100644 index 7a6ae038a..000000000 --- a/lib/routes/tesla/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/price': ['xiaokyo'], - '/cx/:category?/:city?': ['simonsmh', 'nczitzk'], -}; diff --git a/lib/routes/tesla/namespace.ts b/lib/routes/tesla/namespace.ts new file mode 100644 index 000000000..166ec1bcb --- /dev/null +++ b/lib/routes/tesla/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '特斯拉中国', + url: 'tesla.cn', +}; diff --git a/lib/routes/tesla/price/index.ts b/lib/routes/tesla/price/index.ts index 8631a2f40..ad54c1673 100644 --- a/lib/routes/tesla/price/index.ts +++ b/lib/routes/tesla/price/index.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import { getTeslaPrice } from './get-price'; -export default async (ctx) => { +export const route: Route = { + path: '/price', + categories: ['shopping'], + example: '/tesla/price', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tesla.cn/model3/design', 'tesla.cn/'], + }, + name: '价格', + maintainers: ['xiaokyo'], + handler, + url: 'tesla.cn/model3/design', +}; + +async function handler() { const cars = [ { name: 'Model 3', @@ -27,7 +50,7 @@ export default async (ctx) => { const promises = cars.map((car) => getTeslaPrice(car.link)); const prices = await Promise.all(promises); - ctx.set('data', { + return { title: 'Tesla Model 系列价格更新', link: 'https://www.tesla.cn/model3/design#overview', description: 'Tesla Model 系列价格更新', @@ -37,5 +60,5 @@ export default async (ctx) => { author: 'Tesla', guid: `https://www.tesla.cn/${cars[index].slug}/design#overview#${price}`, })), - }); -}; + }; +} diff --git a/lib/routes/tesla/radar.ts b/lib/routes/tesla/radar.ts deleted file mode 100644 index 03a54a592..000000000 --- a/lib/routes/tesla/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'tesla.cn': { - _name: '特斯拉中国', - '.': [ - { - title: '价格', - docs: 'https://docs.rsshub.app/routes/shopping#te-si-la-zhong-guo-jia-ge', - source: ['/model3/design', '/'], - target: '/tesla/price', - }, - ], - cx: [ - { - title: '权益中心', - docs: 'https://docs.rsshub.app/routes/shopping#te-si-la-zhong-guo-quan-yi-zhong-xin', - source: ['/user-right/list/:category'], - target: (params) => { - const category = params.category; - - return `/tesla/cx${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/tesla/router.ts b/lib/routes/tesla/router.ts deleted file mode 100644 index bd412c1fc..000000000 --- a/lib/routes/tesla/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/cx/:category?/:city?', './cx'); - router.get('/price', './price'); -}; diff --git a/lib/routes/test/index.ts b/lib/routes/test/index.ts index 4d249c8f2..52c884ea0 100644 --- a/lib/routes/test/index.ts +++ b/lib/routes/test/index.ts @@ -1,12 +1,19 @@ +import { Route, DataItem } from '@/types'; import { config } from '@/config'; import got from '@/utils/got'; import wait from '@/utils/wait'; import cache from '@/utils/cache'; -import { DataItem } from '@/types'; let cacheIndex = 0; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + name: 'Unknown', + maintainers: ['DIYgod', 'NeverBehave'], + handler, +}; + +async function handler(ctx) { if (ctx.req.param('id') === 'error') { throw new Error('Error test'); } @@ -373,7 +380,7 @@ export default async (ctx) => { ]; } - ctx.set('data', { + return { title: `Test ${ctx.req.param('id')}`, itunes_author: ctx.req.param('id') === 'enclosure' ? 'DIYgod' : null, link: 'https://github.com/DIYgod/RSSHub', @@ -381,5 +388,5 @@ export default async (ctx) => { allowEmpty: ctx.req.param('id') === 'allow_empty', description: ctx.req.param('id') === 'complicated' ? '<img src="http://mock.com/DIYgod/DIYgod/RSSHub">' : ctx.req.param('id') === 'multimedia' ? '<video src="http://mock.com/DIYgod/DIYgod/RSSHub"></video>' : 'A test route for RSSHub', - }); -}; + }; +} diff --git a/lib/routes/test/maintainer.ts b/lib/routes/test/maintainer.ts deleted file mode 100644 index 6c5d131db..000000000 --- a/lib/routes/test/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id': ['DIYgod', 'NeverBehave'], -}; diff --git a/lib/routes/test/namespace.ts b/lib/routes/test/namespace.ts new file mode 100644 index 000000000..f236265dc --- /dev/null +++ b/lib/routes/test/namespace.ts @@ -0,0 +1,5 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', +}; diff --git a/lib/routes/test/router.ts b/lib/routes/test/router.ts deleted file mode 100644 index c79f907ed..000000000 --- a/lib/routes/test/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id', './index'); -}; diff --git a/lib/routes/tfc-taiwan/index.ts b/lib/routes/tfc-taiwan/index.ts index 87becb498..cac1cf358 100644 --- a/lib/routes/tfc-taiwan/index.ts +++ b/lib/routes/tfc-taiwan/index.ts @@ -1,9 +1,19 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { baseUrl, parseList, parseItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: ['/', '/category/:id{.+}', '/info', '/report', '/topic/:id'], + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'tfc-taiwan.org.tw/articles/report', + url: 'tfc-taiwan.org.tw/articles/info', +}; + +async function handler(ctx) { const requestPath = ctx.req.path; const isTopic = requestPath.startsWith('/topic/'); let link = baseUrl; @@ -25,7 +35,7 @@ export default async (ctx) => { const items = await parseItems(list, cache.tryGet); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), image: $('head meta[property="og:image"]').attr('content'), @@ -33,5 +43,5 @@ export default async (ctx) => { icon: $('head link[rel="shortcut icon"]').attr('href'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/tfc-taiwan/maintainer.ts b/lib/routes/tfc-taiwan/maintainer.ts deleted file mode 100644 index af914a7eb..000000000 --- a/lib/routes/tfc-taiwan/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/': ['TonyRL'], - '/:type?': ['TonyRL'], // /info and /report - '/:type/:id+': ['TonyRL'], // /category/:id+ and /topic/:id - '/category/:id+': ['TonyRL'], - '/info': ['TonyRL'], - '/report': ['TonyRL'], - '/topic/:id': ['TonyRL'], -}; diff --git a/lib/routes/tfc-taiwan/namespace.ts b/lib/routes/tfc-taiwan/namespace.ts new file mode 100644 index 000000000..7704954e3 --- /dev/null +++ b/lib/routes/tfc-taiwan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '台灣事實查核中心', + url: 'tfc-taiwan.org.tw', +}; diff --git a/lib/routes/tfc-taiwan/radar.ts b/lib/routes/tfc-taiwan/radar.ts deleted file mode 100644 index e7c88b5df..000000000 --- a/lib/routes/tfc-taiwan/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'tfc-taiwan.org.tw': { - _name: '台灣事實查核中心', - '.': [ - { - title: '專題', - docs: 'https://docs.rsshub.app/routes/other#tai-wan-shi-shi-cha-he-zhong-xin', - source: '/articles/category/:id+', - target: '/tfc-taiwan/category/:id', - }, - { - title: '最新相關資訊', - docs: 'https://docs.rsshub.app/routes/other#tai-wan-shi-shi-cha-he-zhong-xin', - source: ['/articles/info', '/'], - target: '/tfc-taiwan/info', - }, - { - title: '最新查核報告', - docs: 'https://docs.rsshub.app/routes/other#tai-wan-shi-shi-cha-he-zhong-xin', - source: ['/articles/report', '/'], - target: '/tfc-taiwan/report', - }, - { - title: '重點專區', - docs: 'https://docs.rsshub.app/routes/other#tai-wan-shi-shi-cha-he-zhong-xin', - source: '/topic/:id', - target: '/tfc-taiwan/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/tfc-taiwan/router.ts b/lib/routes/tfc-taiwan/router.ts deleted file mode 100644 index 7544e0d48..000000000 --- a/lib/routes/tfc-taiwan/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/category/:id{.+}', './index'); - router.get('/info', './index'); - router.get('/report', './index'); - router.get('/topic/:id', './index'); -}; diff --git a/lib/routes/theatlantic/maintainer.ts b/lib/routes/theatlantic/maintainer.ts deleted file mode 100644 index 6f129f48f..000000000 --- a/lib/routes/theatlantic/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category': ['EthanWng97'], -}; diff --git a/lib/routes/theatlantic/namespace.ts b/lib/routes/theatlantic/namespace.ts new file mode 100644 index 000000000..02a59a606 --- /dev/null +++ b/lib/routes/theatlantic/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Atlantic', + url: 'www.theatlantic.com', +}; diff --git a/lib/routes/theatlantic/news.ts b/lib/routes/theatlantic/news.ts index 135d111ae..c04cf0d3b 100644 --- a/lib/routes/theatlantic/news.ts +++ b/lib/routes/theatlantic/news.ts @@ -1,7 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { getArticleDetails } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + categories: ['traditional-media'], + example: '/theatlantic/latest', + parameters: { category: 'category, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.theatlantic.com/:category'], + }, + name: 'News', + maintainers: ['EthanWng97'], + handler, + description: `| Popular | Latest | Politics | Technology | Business | + | ------------ | ------ | -------- | ---------- | -------- | + | most-popular | latest | politics | technology | business | + + More categories (except photo) can be found within the navigation bar at [https://www.theatlantic.com](https://www.theatlantic.com)`, +}; + +async function handler(ctx) { const host = 'https://www.theatlantic.com'; const category = ctx.req.param('category'); const url = `${host}/${category}/`; @@ -23,10 +50,10 @@ export default async (ctx) => { }); const items = await getArticleDetails(list); - ctx.set('data', { + return { title: `The Atlantic - ${category.toUpperCase()}`, link: url, description: `The Atlantic - ${category.toUpperCase()}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/theatlantic/radar.ts b/lib/routes/theatlantic/radar.ts deleted file mode 100644 index 66390039d..000000000 --- a/lib/routes/theatlantic/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'theatlantic.com': { - _name: 'The Atlantic', - www: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#the-atlantic', - source: '/:category', - target: '/theatlantic/:category', - }, - ], - }, -}; diff --git a/lib/routes/theatlantic/router.ts b/lib/routes/theatlantic/router.ts deleted file mode 100644 index 3eb67b2b4..000000000 --- a/lib/routes/theatlantic/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category', './news'); -}; diff --git a/lib/routes/theblockbeats/index.ts b/lib/routes/theblockbeats/index.ts index 4055513c0..0ffd888e1 100644 --- a/lib/routes/theblockbeats/index.ts +++ b/lib/routes/theblockbeats/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -20,7 +21,28 @@ const channelMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:channel?', + categories: ['finance'], + example: '/theblockbeats/newsflash', + parameters: { channel: '类型,见下表,默认为快讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻快讯', + maintainers: ['Fatpandac', 'jameshih'], + handler, + description: `| 快讯 | 文章 | + | :-------: | :-----: | + | newsflash | article |`, +}; + +async function handler(ctx) { const { channel = 'newsflash' } = ctx.req.param(); const { data: response } = await got(channelMap[channel].api); @@ -46,9 +68,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: `TheBlockBeats - ${channelMap[channel].title}`, link: channelMap[channel].link, item: list, - }); -}; + }; +} diff --git a/lib/routes/theblockbeats/maintainer.ts b/lib/routes/theblockbeats/maintainer.ts deleted file mode 100644 index f7d0f8207..000000000 --- a/lib/routes/theblockbeats/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel?': ['Fatpandac', 'jameshih'], -}; diff --git a/lib/routes/theblockbeats/namespace.ts b/lib/routes/theblockbeats/namespace.ts new file mode 100644 index 000000000..da29bc682 --- /dev/null +++ b/lib/routes/theblockbeats/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '律动', + url: 'rszhaopin.theblockbeats.info', +}; diff --git a/lib/routes/theblockbeats/radar.ts b/lib/routes/theblockbeats/radar.ts deleted file mode 100644 index 1342fddf6..000000000 --- a/lib/routes/theblockbeats/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'theblockbeats.info': { - _name: '律动', - rszhaopin: [ - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/finance#lv-dong', - source: ['/'], - target: '/theblockbeats/newsflash', - }, - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/finance#lv-dong', - source: ['/'], - target: '/theblockbeats/article', - }, - ], - }, -}; diff --git a/lib/routes/theblockbeats/router.ts b/lib/routes/theblockbeats/router.ts deleted file mode 100644 index 0b562c0f7..000000000 --- a/lib/routes/theblockbeats/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel?', './index'); -}; diff --git a/lib/routes/thecatcity/index.ts b/lib/routes/thecatcity/index.ts index cd4b12a80..4c5d756f9 100644 --- a/lib/routes/thecatcity/index.ts +++ b/lib/routes/thecatcity/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,33 @@ import { termsMap } from './terms-map'; const baseUrl = 'https://thecatcity.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:term?', + categories: ['new-media'], + example: '/thecatcity', + parameters: { term: '見下表,留空為全部文章' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['thecatcity.com/'], + target: '', + }, + name: '分類', + maintainers: ['TonyRL'], + handler, + url: 'thecatcity.com/', + description: `| 貓物分享 | 貓咪新聞 | 養貓大全 | 貓奴景點 | 新手養貓教學 | + | -------- | -------- | -------- | -------- | ------------ | + | 1 | 2 | 3 | 4 | 5 |`, +}; + +async function handler(ctx) { const term = ctx.req.param('term'); const { data } = await got(`${baseUrl}/node_api/v1/articles/posts`, { searchParams: { @@ -39,11 +66,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: termsMap[term] ? termsMap[term].title : termsMap[''].title, description: '提供貓咪日常照顧、新手準備、貓用品、貓咪醫療、貓飲食與行為等相關知識,以及療癒貓影片、貓趣聞、貓小物流行資訊,不論你是貓奴、還是貓控,一切所需都在貓奴日常找到', link: baseUrl, image: 'https://assets.presslogic.com/presslogic-hk-tc/static/favicon.ico', item: items, - }); -}; + }; +} diff --git a/lib/routes/thecatcity/maintainer.ts b/lib/routes/thecatcity/maintainer.ts deleted file mode 100644 index 26825a33d..000000000 --- a/lib/routes/thecatcity/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:term?': ['TonyRL'], -}; diff --git a/lib/routes/thecatcity/namespace.ts b/lib/routes/thecatcity/namespace.ts new file mode 100644 index 000000000..297bbae54 --- /dev/null +++ b/lib/routes/thecatcity/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '貓奴日常', + url: 'thecatcity.com', +}; diff --git a/lib/routes/thecatcity/radar.ts b/lib/routes/thecatcity/radar.ts deleted file mode 100644 index 047861832..000000000 --- a/lib/routes/thecatcity/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { termsMap } from './terms-map'; - -export default { - 'thecatcity.com': { - _name: '貓奴日常', - '.': Object.entries(termsMap).map(([key, value]) => ({ - title: value.title, - docs: 'https://docs.rsshub.app/routes/new-media#mao-nu-ri-chang', - source: [...new Set([value.slug, '/'])], - target: `/thecatcity${key ? `/${key}` : ''}`, - })), - }, -}; diff --git a/lib/routes/thecatcity/router.ts b/lib/routes/thecatcity/router.ts deleted file mode 100644 index 7dadc4b85..000000000 --- a/lib/routes/thecatcity/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:term?', './index'); -}; diff --git a/lib/routes/thecover/channel.ts b/lib/routes/thecover/channel.ts index 87caf6c0f..162338c0c 100644 --- a/lib/routes/thecover/channel.ts +++ b/lib/routes/thecover/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -23,7 +24,28 @@ const nodes = { 17: '封面号', }; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id?', + categories: ['new-media'], + example: '/thecover/channel/3560', + parameters: { id: '对应id,可在频道链接中获取,默认为3892' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道', + maintainers: ['yuxinliu-alex'], + handler, + description: `| 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 | + | ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ | + | 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '3892'; const targetUrl = rootUrl.concat(`/channel_${id}`); const resp = await got({ @@ -57,11 +79,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${nodes[id]}-封面新闻`, link: targetUrl, description: `封面新闻作为华西都市报深度融合转型和打造新型主流媒体的载体,牢固确立移动优先战略,创新移动新闻产品,打造移动传播矩阵,封面新闻的传播力、引导力、影响力和公信力不断得到各方肯定。封面新闻突破千万的用户下载量,呈现出以四川为主阵地的全国分布态势,用户年龄构成以20-35岁为主,“亿万年轻人的生活方式”的定位初步得到体现。`, language: 'zh-cn', item: items, - }); -}; + }; +} diff --git a/lib/routes/thecover/maintainer.ts b/lib/routes/thecover/maintainer.ts deleted file mode 100644 index 0d9b6a1c1..000000000 --- a/lib/routes/thecover/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/channel/:id?': ['yuxinliu-alex'], -}; diff --git a/lib/routes/thecover/namespace.ts b/lib/routes/thecover/namespace.ts new file mode 100644 index 000000000..536da3af1 --- /dev/null +++ b/lib/routes/thecover/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '封面新闻', + url: 'thecover.cn', +}; diff --git a/lib/routes/thecover/radar.ts b/lib/routes/thecover/radar.ts deleted file mode 100644 index f64c99473..000000000 --- a/lib/routes/thecover/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'thecover.cn': { - _name: '封面新闻', - '.': [ - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#the-cover', - source: ['/:id', '/'], - target: (params) => `/thecover/channel/${params.id.replace('channel_', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/thecover/router.ts b/lib/routes/thecover/router.ts deleted file mode 100644 index f067105bd..000000000 --- a/lib/routes/thecover/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/channel/:id?', './channel'); -}; diff --git a/lib/routes/thehindu/maintainer.ts b/lib/routes/thehindu/maintainer.ts deleted file mode 100644 index 971a30f85..000000000 --- a/lib/routes/thehindu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/topic/:topic': ['TonyRL'], -}; diff --git a/lib/routes/thehindu/namespace.ts b/lib/routes/thehindu/namespace.ts new file mode 100644 index 000000000..bc44ae863 --- /dev/null +++ b/lib/routes/thehindu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Hindu', + url: 'thehindu.com', +}; diff --git a/lib/routes/thehindu/radar.ts b/lib/routes/thehindu/radar.ts deleted file mode 100644 index a91248c4e..000000000 --- a/lib/routes/thehindu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'thehindu.com': { - _name: 'The Hindu', - '.': [ - { - title: 'Topic', - docs: 'https://docs.rsshub.app/routes/traditional-media#the-hindu', - source: ['/topic/:topic'], - target: '/thehindu/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/thehindu/router.ts b/lib/routes/thehindu/router.ts deleted file mode 100644 index b90fa69a3..000000000 --- a/lib/routes/thehindu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/topic/:topic', './topic'); -}; diff --git a/lib/routes/thehindu/topic.ts b/lib/routes/thehindu/topic.ts index 913a322aa..7f12b76d1 100644 --- a/lib/routes/thehindu/topic.ts +++ b/lib/routes/thehindu/topic.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic', + categories: ['traditional-media'], + example: '/thehindu/topic/rains', + parameters: { topic: 'Topic slug, can be found in URL.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['thehindu.com/topic/:topic'], + }, + name: 'Topic', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://www.thehindu.com'; const topic = ctx.req.param('topic'); const link = `${baseUrl}/topic/${topic}/`; @@ -46,7 +68,7 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim(), link: `${baseUrl}/topic/${topic}/`, image: $('meta[property="og:image"]').attr('content'), @@ -54,5 +76,5 @@ export default async (ctx) => { icon: $('link[rel="icon"]').attr('href'), language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/theinitium/full.ts b/lib/routes/theinitium/full.ts index a762f7338..4a680f0d6 100644 --- a/lib/routes/theinitium/full.ts +++ b/lib/routes/theinitium/full.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; @@ -6,7 +7,14 @@ import { parseDate } from '@/utils/parse-date'; const TOKEN = 'Basic YW5vbnltb3VzOkdpQ2VMRWp4bnFCY1ZwbnA2Y0xzVXZKaWV2dlJRY0FYTHY='; -export default async (ctx) => { +export const route: Route = { + path: '/:model?/:type?/:language?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { // model是channel/tag/etc.,而type是latest/feature/quest-academy这些一级栏目/标签/作者名的slug名。如果是追踪的话,那就是model是follow,type是articles。 const model = ctx.req.param('model') ?? 'channel'; const type = ctx.req.param('type') ?? 'latest'; @@ -160,11 +168,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `端传媒 - ${name}`, link: listLink, icon: 'https://theinitium.com/misc/about/logo192.png', item: items, image, - }); -}; + }; +} diff --git a/lib/routes/theinitium/maintainer.ts b/lib/routes/theinitium/maintainer.ts deleted file mode 100644 index 95ed8441a..000000000 --- a/lib/routes/theinitium/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/author/:type/:language?': ['AgFlore'], - '/channel/:type?/:language?': ['prnake'], - '/follow/articles/:language?': ['AgFlore'], - '/tags/:type/:language?': ['AgFlore'], -}; diff --git a/lib/routes/theinitium/namespace.ts b/lib/routes/theinitium/namespace.ts new file mode 100644 index 000000000..ee7f8b25b --- /dev/null +++ b/lib/routes/theinitium/namespace.ts @@ -0,0 +1,11 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '端传媒', + url: 'theinitium.com', + description: `通过提取文章全文,以提供比官方源更佳的阅读体验。 + +:::warning +付费内容全文可能需要登陆获取,详情见部署页面的配置模块。 +:::`, +}; diff --git a/lib/routes/theinitium/radar.ts b/lib/routes/theinitium/radar.ts deleted file mode 100644 index dde38a52c..000000000 --- a/lib/routes/theinitium/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'theinitium.com': { - _name: '端传媒', - '.': [ - { - title: '专题・栏目', - docs: 'https://docs.rsshub.app/routes/new-media#duan-chuan-mei', - source: '/channel/:type', - target: '/theinitium/channel/:type', - }, - { - title: '话题・标签', - docs: 'https://docs.rsshub.app/routes/new-media#duan-chuan-mei', - source: '/tags/:type', - target: '/theinitions/tags/:type', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/new-media#duan-chuan-mei', - source: '/author/:type', - target: '/theinitium/author/:type', - }, - ], - }, -}; diff --git a/lib/routes/theinitium/router.ts b/lib/routes/theinitium/router.ts deleted file mode 100644 index 82f55a4a7..000000000 --- a/lib/routes/theinitium/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:model?/:type?/:language?', './full'); -}; diff --git a/lib/routes/themoviedb/collection.ts b/lib/routes/themoviedb/collection.ts index 3d73ca37a..b1f529860 100644 --- a/lib/routes/themoviedb/collection.ts +++ b/lib/routes/themoviedb/collection.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import apiKey from './api-key'; import { handleMovieItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:id/:lang?', + categories: ['multimedia'], + example: '/themoviedb/collection/131292/en-US', + parameters: { id: 'Collection ID', lang: 'Language' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Collection', + maintainers: ['x2cf'], + handler, +}; + +async function handler(ctx) { const { id, lang } = ctx.req.param(); const { data } = await got(`https://api.themoviedb.org/3/collection/${id}`, { searchParams: { @@ -11,11 +30,11 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `${data.name} — TMDB`, description: data.overview.trim(), image: `https://image.tmdb.org/t/p/original${data.poster_path}`, link: `https://www.themoviedb.org/collection/${data.id}`, item: data.parts.map((item) => handleMovieItem(item, lang)), - }); -}; + }; +} diff --git a/lib/routes/themoviedb/episodes.ts b/lib/routes/themoviedb/episodes.ts index 9cc783c6d..99fb2db74 100644 --- a/lib/routes/themoviedb/episodes.ts +++ b/lib/routes/themoviedb/episodes.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import apiKey from './api-key'; import { handleDescription } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/:id/seasons/:seasonNumber/episodes/:lang?', + categories: ['multimedia'], + example: '/themoviedb/tv/70593/seasons/1/episodes/en-US', + parameters: { id: 'TV show ID', seasonNumber: 'Season number', lang: 'Language' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'TV Show Episodes', + maintainers: ['x2cf'], + handler, +}; + +async function handler(ctx) { const { id, seasonNumber, lang } = ctx.req.param(); const searchParams = { language: lang, @@ -12,7 +31,7 @@ export default async (ctx) => { const { data: tvShowDetails } = await got(`https://api.themoviedb.org/3/tv/${id}`, { searchParams }); const { data: seasonDetails } = await got(`https://api.themoviedb.org/3/tv/${id}/season/${seasonNumber}`, { searchParams }); - ctx.set('data', { + return { title: `${tvShowDetails.name} ${seasonDetails.name} — TMDB`, description: seasonDetails.overview.trim(), image: `https://image.tmdb.org/t/p/original${seasonDetails.poster_path}`, @@ -23,5 +42,5 @@ export default async (ctx) => { description: handleDescription(item), pubDate: item.air_date ? parseDate(item.air_date) : undefined, })), - }); -}; + }; +} diff --git a/lib/routes/themoviedb/maintainer.ts b/lib/routes/themoviedb/maintainer.ts deleted file mode 100644 index 6b710f83b..000000000 --- a/lib/routes/themoviedb/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/collection/:id/:lang?': ['x2cf'], - '/trending/:mediaType/:timeWindow/:lang?': ['x2cf'], - '/tv/:id/seasons/:lang?': ['x2cf'], - '/tv/:id/seasons/:seasonNumber/episodes/:lang?': ['x2cf'], - '/:mediaType/:sheet/:lang?': ['x2cf'], -}; diff --git a/lib/routes/themoviedb/namespace.ts b/lib/routes/themoviedb/namespace.ts new file mode 100644 index 000000000..1b74e3691 --- /dev/null +++ b/lib/routes/themoviedb/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Movie Database', + url: 'themoviedb.org', + description: `:::tip +Refer to [https://developers.themoviedb.org/3/getting-started/languages](https://developers.themoviedb.org/3/getting-started/languages) for the language parameter in the route. +:::`, +}; diff --git a/lib/routes/themoviedb/radar.ts b/lib/routes/themoviedb/radar.ts deleted file mode 100644 index 944f1e0b8..000000000 --- a/lib/routes/themoviedb/radar.ts +++ /dev/null @@ -1,73 +0,0 @@ -export default { - 'themoviedb.org': { - _name: 'The Movie Database', - '.': [ - { - title: 'Collection', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/collection/:name'], - target: (params) => `/themoviedb/collection/${params.name.split('-')[0]}`, - }, - { - title: 'Popular Movies', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/movie'], - target: '/themoviedb/trending/movie/week', - }, - { - title: 'Popular TV Shows', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv'], - target: '/themoviedb/trending/tv/week', - }, - { - title: 'TV Show Seasons', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv/:id/seasons', '/tv/:id'], - target: (params) => `/themoviedb/tv/${params.id.split('-')[0]}/seasons`, - }, - { - title: 'TV Show Episodes', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv/:id/season/:seasonNumber'], - target: (params) => `/themoviedb/tv/${params.id.split('-')[0]}/seasons/${params.seasonNumber}/episodes`, - }, - { - title: 'TV Shows Airing Today', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv/airing-today'], - target: '/themoviedb/tv/airing-today', - }, - { - title: 'Currently Airing TV Shows', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv/on-the-air'], - target: '/themoviedb/tv/on-the-air', - }, - { - title: 'Top Rated TV Shows', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/tv/top-rated'], - target: '/themoviedb/tv/top-rated', - }, - { - title: 'Now Playing Movies', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/movie/now-playing'], - target: '/themoviedb/movie/now-playing', - }, - { - title: 'Upcoming Movies', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/movie/upcoming'], - target: '/themoviedb/movie/upcoming', - }, - { - title: 'Top Rated Movies', - docs: 'https://docs.rsshub.app/routes/multimedia#the-movie-database', - source: ['/movie/top-rated'], - target: '/themoviedb/movie/top-rated', - }, - ], - }, -}; diff --git a/lib/routes/themoviedb/router.ts b/lib/routes/themoviedb/router.ts deleted file mode 100644 index dc5151e5f..000000000 --- a/lib/routes/themoviedb/router.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (router) => { - router.get('/collection/:id/:lang?', './collection'); - router.get('/trending/:mediaType/:timeWindow/:lang?', './trending'); - router.get('/tv/:id/seasons/:lang?', './seasons'); - router.get('/tv/:id/seasons/:seasonNumber/episodes/:lang?', './episodes'); - router.get('/:mediaType/:sheet/:lang?', './sheet'); -}; diff --git a/lib/routes/themoviedb/seasons.ts b/lib/routes/themoviedb/seasons.ts index 798848f97..0de7c8195 100644 --- a/lib/routes/themoviedb/seasons.ts +++ b/lib/routes/themoviedb/seasons.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import apiKey from './api-key'; import { handleDescription } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/tv/:id/seasons/:lang?', + categories: ['multimedia'], + example: '/themoviedb/tv/70593/seasons/en-US', + parameters: { id: 'TV show ID', lang: 'Language' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'TV Show Seasons', + maintainers: ['x2cf'], + handler, +}; + +async function handler(ctx) { const { id, lang } = ctx.req.param(); const { data } = await got(`https://api.themoviedb.org/3/tv/${id}`, { searchParams: { @@ -12,7 +31,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `${data.name} - Seasons — TMDB`, description: data.overview.trim(), image: `https://image.tmdb.org/t/p/original${data.poster_path}`, @@ -27,5 +46,5 @@ export default async (ctx) => { pubDate: item.air_date ? parseDate(item.air_date) : undefined, }; }), - }); -}; + }; +} diff --git a/lib/routes/themoviedb/sheet.ts b/lib/routes/themoviedb/sheet.ts index 483b81b28..032df08bc 100644 --- a/lib/routes/themoviedb/sheet.ts +++ b/lib/routes/themoviedb/sheet.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import apiKey from './api-key'; import { MEDIA_TYPE_TO_ITEM_HANDLE } from './utils'; @@ -28,7 +29,36 @@ const TITLE = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:mediaType/:sheet/:lang?', + categories: ['multimedia'], + example: '/themoviedb/tv/top-rated/en-US', + parameters: { mediaType: '`movie` or `tv`', sheet: 'Sheet, see below', lang: 'Language' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Sheet', + maintainers: ['x2cf'], + handler, + description: `When \`mediaType\` is \`tv\`, \`sheet\` should be: + + | Airing Today | On TV | Top Rated | + | ------------ | ---------- | --------- | + | airing-today | on-the-air | top-rated | + + When \`mediaType\` is \`movie\`, \`sheet\` should be: + + | Now Playing | Upcoming | Top Rated | + | ----------- | -------- | --------- | + | now-playing | upcoming | top-rated |`, +}; + +async function handler(ctx) { const { mediaType, sheet, lang } = ctx.req.param(); const { data } = await got(`https://api.themoviedb.org/3/${API_PATH[mediaType][sheet]}`, { searchParams: { @@ -37,9 +67,9 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `${TITLE[mediaType][sheet]} — TMDB`, link: `https://www.themoviedb.org/${mediaType}/${sheet}`, item: data.results.map((item) => MEDIA_TYPE_TO_ITEM_HANDLE[mediaType](item, lang)), - }); -}; + }; +} diff --git a/lib/routes/themoviedb/trending.ts b/lib/routes/themoviedb/trending.ts index 117ee4bfc..f43754aa8 100644 --- a/lib/routes/themoviedb/trending.ts +++ b/lib/routes/themoviedb/trending.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import apiKey from './api-key'; import { MEDIA_TYPE_TO_ITEM_HANDLE } from './utils'; @@ -7,7 +8,25 @@ const MEDIA_TYPE_TO_TITLE = { movie: 'Movies', }; -export default async (ctx) => { +export const route: Route = { + path: '/trending/:mediaType/:timeWindow/:lang?', + categories: ['multimedia'], + example: '/themoviedb/trending/tv/day/en-US', + parameters: { mediaType: '`movie` or `tv`', timeWindow: '`day` or `week`', lang: 'Language' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Trending', + maintainers: ['x2cf'], + handler, +}; + +async function handler(ctx) { const { mediaType, timeWindow, lang } = ctx.req.param(); const { data } = await got(`https://api.themoviedb.org/3/trending/${mediaType}/${timeWindow}`, { searchParams: { @@ -16,9 +35,9 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: `Popular ${MEDIA_TYPE_TO_TITLE[mediaType]} — TMDB`, link: `https://www.themoviedb.org/${mediaType}`, item: data.results.map((item) => MEDIA_TYPE_TO_ITEM_HANDLE[mediaType](item, lang)), - }); -}; + }; +} diff --git a/lib/routes/thenewslens/index.ts b/lib/routes/thenewslens/index.ts index b7b49412e..6d7544604 100644 --- a/lib/routes/thenewslens/index.ts +++ b/lib/routes/thenewslens/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://www.thenewslens.com'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/latest-article' : getSubPath(ctx)}`; @@ -76,9 +84,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/thenewslens/maintainer.ts b/lib/routes/thenewslens/maintainer.ts deleted file mode 100644 index 7a716fe1d..000000000 --- a/lib/routes/thenewslens/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/author/:id/:sort?': ['nczitzk'], - '/category/:id/:sort?': ['nczitzk'], - '/channel/:id/:sort?': ['nczitzk'], - '/latest-article/:sort?': ['nczitzk'], - '/news/:sort?': ['nczitzk'], - '/review/:sort?': ['nczitzk'], - '/tag/:id/:sort?': ['nczitzk'], - '/videos/Projects/:sort?': ['nczitzk'], -}; diff --git a/lib/routes/thenewslens/namespace.ts b/lib/routes/thenewslens/namespace.ts new file mode 100644 index 000000000..5d9f3c0bd --- /dev/null +++ b/lib/routes/thenewslens/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The News Lens 關鍵評論', + url: 'thenewslens.com', +}; diff --git a/lib/routes/thenewslens/radar.ts b/lib/routes/thenewslens/radar.ts deleted file mode 100644 index ebe6afa00..000000000 --- a/lib/routes/thenewslens/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'thenewslens.com': { - _name: 'The News Lens 關鍵評論', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/latest-article/:sort?', '/'], - target: '/thenewslens/latest-article/:sort?', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/news/:sort?', '/'], - target: '/thenewslens/news/:sort?', - }, - { - title: '作者', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/author/:id/:sort?', '/'], - target: '/thenewslens/author/:id/:sort?', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/category/:id/:sort?', '/'], - target: '/thenewslens/category/:id/:sort?', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/tag/:id/:sort?', '/'], - target: '/thenewslens/tag/:id/:sort?', - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/channel/:id/:sort?', '/'], - target: '/thenewslens/channel/:id/:sort?', - }, - { - title: '评论', - docs: 'https://docs.rsshub.app/routes/new-media#the-news-lens-guan-jian-ping-lun', - source: ['/review/:sort?', '/'], - target: '/thenewslens/review/:sort?', - }, - ], - }, -}; diff --git a/lib/routes/thenewslens/router.ts b/lib/routes/thenewslens/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/thenewslens/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/thepaper/839studio/category.ts b/lib/routes/thepaper/839studio/category.ts index c9debbbc4..05c290e7e 100644 --- a/lib/routes/thepaper/839studio/category.ts +++ b/lib/routes/thepaper/839studio/category.ts @@ -1,7 +1,19 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/839studio/:id', + radar: { + source: ['thepaper.cn/'], + }, + name: 'Unknown', + maintainers: ['umm233'], + handler, + url: 'thepaper.cn/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `http://projects.thepaper.cn/thepaper-cases/839studio/?cat=${id}`; @@ -20,7 +32,7 @@ export default async (ctx) => { const category = $('div[class=lefth]').find('h1').text(); const desc = $('div[class=leftc]').find('p').text(); - ctx.set('data', { + return { title: `澎湃美数课作品集-${category}`, link, description: desc, @@ -36,5 +48,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/thepaper/839studio/studio.ts b/lib/routes/thepaper/839studio/studio.ts index f1edd5ede..eba04c445 100644 --- a/lib/routes/thepaper/839studio/studio.ts +++ b/lib/routes/thepaper/839studio/studio.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/839studio', + name: 'Unknown', + maintainers: ['umm233'], + handler, +}; + +async function handler() { // 发起 HTTP GET 请求 const response = await got({ method: 'get', @@ -14,7 +22,7 @@ export default async (ctx) => { const $ = load(data); const list = $('div[class=imgtext]'); - ctx.set('data', { + return { title: '澎湃美数课作品集', link: 'http://projects.thepaper.cn/thepaper-cases/839studio/', item: @@ -29,5 +37,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/thepaper/channel.ts b/lib/routes/thepaper/channel.ts index d8c6694c6..96fccb26d 100644 --- a/lib/routes/thepaper/channel.ts +++ b/lib/routes/thepaper/channel.ts @@ -1,8 +1,42 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id', + categories: ['traditional-media'], + example: '/thepaper/channel/25950', + parameters: { id: '频道 id,可在频道页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道', + maintainers: ['xyqfer', 'nczitzk', 'bigfei'], + handler, + description: `| 频道 ID | 频道名 | + | ------- | ------ | + | 26916 | 视频 | + | 108856 | 战疫 | + | 25950 | 时事 | + | 25951 | 财经 | + | 36079 | 澎湃号 | + | 119908 | 科技 | + | 25952 | 思想 | + | 119489 | 智库 | + | 25953 | 生活 | + | 26161 | 问吧 | + | 122908 | 国际 | + | -21 | 体育 | + | -24 | 评论 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const channel_url = `https://m.thepaper.cn/channel/${id}`; const channel_url_resp = await got(channel_url); @@ -16,11 +50,11 @@ export default async (ctx) => { const list = resp.data.data.list; const items = await Promise.all(list.map((item) => utils.ProcessItem(item, ctx))); - ctx.set('data', { + return { title: `澎湃新闻频道 - ${utils.ChannelIdToName(id, channel_url_data)}`, link: channel_url, item: items, itunes_author: '澎湃新闻', image: utils.ExtractLogo(channel_url_resp), - }); -}; + }; +} diff --git a/lib/routes/thepaper/factpaper.ts b/lib/routes/thepaper/factpaper.ts index 374881834..529b43690 100644 --- a/lib/routes/thepaper/factpaper.ts +++ b/lib/routes/thepaper/factpaper.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,30 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/factpaper/:status?', + categories: ['traditional-media'], + example: '/thepaper/factpaper', + parameters: { status: '状态 id,可选 `1` 即 有定论 或 `0` 即 核查中,默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['factpaper.cn/'], + target: '/factpaper/:status', + }, + name: '明查', + maintainers: ['nczitzk'], + handler, + url: 'factpaper.cn/', +}; + +async function handler(ctx) { const status = Number.parseInt(ctx.req.param('status') ?? '1'); const rootUrl = 'https://www.factpaper.cn'; @@ -57,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `澎湃明查 - ${status === 1 ? '有定论' : '核查中'}`, link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/thepaper/featured.ts b/lib/routes/thepaper/featured.ts index 3cd1bf014..cb2b51ec4 100644 --- a/lib/routes/thepaper/featured.ts +++ b/lib/routes/thepaper/featured.ts @@ -1,18 +1,41 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/featured', + categories: ['traditional-media'], + example: '/thepaper/featured', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['thepaper.cn/'], + }, + name: '首页头条', + maintainers: ['HenryQW', 'nczitzk', 'bigfei'], + handler, + url: 'thepaper.cn/', +}; + +async function handler(ctx) { const response = await got('https://m.thepaper.cn'); const data = JSON.parse(load(response.data)('#__NEXT_DATA__').html()); const list = [...data.props.pageProps.data.list, ...data.props.pageProps.topData.recommendImg]; const items = await Promise.all(list.map((item) => utils.ProcessItem(item, ctx))); - ctx.set('data', { + return { title: '澎湃新闻 - 首页头条', link: 'https://m.thepaper.cn', item: items, itunes_author: '澎湃新闻', image: utils.ExtractLogo(response), - }); -}; + }; +} diff --git a/lib/routes/thepaper/list.ts b/lib/routes/thepaper/list.ts index fc0915e55..16dd6f749 100644 --- a/lib/routes/thepaper/list.ts +++ b/lib/routes/thepaper/list.ts @@ -1,8 +1,126 @@ +import { Route } from '@/types'; import utils from './utils'; import { load } from 'cheerio'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:id', + categories: ['traditional-media'], + example: '/thepaper/list/25457', + parameters: { id: '栏目 id,可在栏目页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '栏目', + maintainers: ['nczitzk', 'bigfei'], + handler, + description: `| 栏目 ID | 栏目名 | + | ------- | ------------ | + | 26912 | 上直播 | + | 26913 | 七环视频 | + | 26965 | 温度计 | + | 26908 | 一级视场 | + | 27260 | World 湃 | + | 26907 | 湃客科技 | + | 33168 | 纪录湃 | + | 26911 | 围观 | + | 26918 | @所有人 | + | 26906 | 大都会 | + | 26909 | 追光灯 | + | 26910 | 运动装 | + | 26914 | 健寻记 | + | 82188 | AI 播报 | + | 89035 | 眼界 | + | 92278 | 关键帧 | + | 90069 | 战疫 | + | 25462 | 中国政库 | + | 25488 | 中南海 | + | 97924 | 初心之路 | + | 25489 | 舆论场 | + | 25490 | 打虎记 | + | 25423 | 人事风向 | + | 25426 | 法治中国 | + | 25424 | 一号专案 | + | 25463 | 港台来信 | + | 25491 | 长三角政商 | + | 25428 | 直击现场 | + | 68750 | 公益湃 | + | 27604 | 暖闻 | + | 25464 | 澎湃质量报告 | + | 25425 | 绿政公署 | + | 25429 | 澎湃国际 | + | 25481 | 外交学人 | + | 25430 | 澎湃防务 | + | 25678 | 唐人街 | + | 25427 | 澎湃人物 | + | 25422 | 浦江头条 | + | 25487 | 教育家 | + | 25634 | 全景现场 | + | 25635 | 美数课 | + | 25600 | 快看 | + | 25434 | 10% 公司 | + | 25436 | 能见度 | + | 25433 | 地产界 | + | 25438 | 财经上下游 | + | 25435 | 金改实验室 | + | 25437 | 牛市点线面 | + | 119963 | IPO 最前线 | + | 25485 | 澎湃商学院 | + | 25432 | 自贸区连线 | + | 37978 | 进博会在线 | + | 36079 | 湃客 | + | 27392 | 政务 | + | 77286 | 媒体 | + | 27234 | 科学湃 | + | 119445 | 生命科学 | + | 119447 | 未来 2% | + | 119446 | 元宇宙观察 | + | 119448 | 科创 101 | + | 119449 | 科学城邦 | + | 25444 | 社论 | + | 27224 | 澎湃评论 | + | 26525 | 思想湃 | + | 26878 | 上海书评 | + | 25483 | 思想市场 | + | 25457 | 私家历史 | + | 25574 | 翻书党 | + | 25455 | 艺术评论 | + | 26937 | 古代艺术 | + | 25450 | 文化课 | + | 25482 | 逝者 | + | 25536 | 专栏 | + | 26506 | 异次元 | + | 97313 | 海平面 | + | 103076 | 一问三知 | + | 25445 | 澎湃研究所 | + | 25446 | 全球智库 | + | 26915 | 城市漫步 | + | 25456 | 市政厅 | + | 104191 | 世界会客厅 | + | 25448 | 有戏 | + | 26609 | 文艺范 | + | 25942 | 身体 | + | 26015 | 私・奔 | + | 25599 | 运动家 | + | 25842 | 私家地理 | + | 80623 | 非常品 | + | 26862 | 楼市 | + | 25769 | 生活方式 | + | 25990 | 澎湃联播 | + | 26173 | 视界 | + | 26202 | 亲子学堂 | + | 26404 | 赢家 | + | 26490 | 汽车圈 | + | 115327 | IP SH | + | 117340 | 酒业 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const list_url = `https://m.thepaper.cn/list/${id}`; const list_url_resp = await got(list_url); @@ -17,11 +135,11 @@ export default async (ctx) => { const list = pagePropsData.list; const items = await Promise.all(list.map((item) => utils.ProcessItem(item, ctx))); - ctx.set('data', { + return { title: `澎湃新闻栏目 - ${utils.ListIdToName(id, list_url_data)}`, link: list_url, item: items, itunes_author: '澎湃新闻', image: pagePropsData.nodeInfo?.pic ?? utils.ExtractLogo(list_url_resp), - }); -}; + }; +} diff --git a/lib/routes/thepaper/maintainer.ts b/lib/routes/thepaper/maintainer.ts deleted file mode 100644 index 17f9a9b8a..000000000 --- a/lib/routes/thepaper/maintainer.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - '/839studio/:id': ['umm233'], - '/839studio': ['umm233'], - '/channel/:id': ['xyqfer', 'nczitzk', 'bigfei'], - '/featured': ['HenryQW', 'nczitzk', 'bigfei'], - '/list/:id': ['nczitzk', 'bigfei'], - '/factpaper/:status?': ['nczitzk'], - '/sidebar/:sec?': ['bigfei'], -}; diff --git a/lib/routes/thepaper/namespace.ts b/lib/routes/thepaper/namespace.ts new file mode 100644 index 000000000..504d2f77e --- /dev/null +++ b/lib/routes/thepaper/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '澎湃新闻', + url: 'thepaper.cn', + description: `以下所有路由可使用参数\`old\`以采取旧全文获取方法。该方法会另外获取网页中的图片与视频资源。在原始 url 追加\`?old=yes\`以启用.`, +}; diff --git a/lib/routes/thepaper/radar.ts b/lib/routes/thepaper/radar.ts deleted file mode 100644 index beaa36a9e..000000000 --- a/lib/routes/thepaper/radar.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default { - 'thepaper.cn': { - _name: '澎湃新闻', - '.': [ - { - title: '首页头条', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-shou-ye-tou-tiao', - source: ['/'], - target: '/thepaper/featured', - }, - { - title: '侧边栏', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-ce-bian-lan', - source: ['/'], - target: '/thepaper/sidebar', - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-pin-dao', - source: ['/'], - target: (params, url) => `/thepaper/channel/${url.match(/channel_(\d+)/)?.[1]}`, - }, - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-lie-biao', - source: ['/'], - target: (params, url) => `/thepaper/list/${url.search(/list_(\d+)/)?.[1]}`, - }, - { - title: '澎湃美数组作品集', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-peng-pai-mei-shu-zuo-pin-ji', - source: ['/'], - target: '/thepaper/839studio/:id', - }, - ], - }, - 'factpaper.cn': { - _name: '澎湃新闻', - '.': [ - { - title: '明查', - docs: 'https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-ming-cha', - source: ['/'], - target: '/thepaper/factpaper/:status', - }, - ], - }, -}; diff --git a/lib/routes/thepaper/router.ts b/lib/routes/thepaper/router.ts deleted file mode 100644 index fb498f89b..000000000 --- a/lib/routes/thepaper/router.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default (router) => { - router.get('/839studio', './839studio/studio'); - router.get('/839studio/:id', './839studio/category'); - router.get('/channel/:id', './channel'); - router.get('/list/:id', './list'); - router.get('/featured', './featured'); - router.get('/factpaper/:status?', './factpaper'); - router.get('/sidebar/:sec?', './sidebar'); -}; diff --git a/lib/routes/thepaper/sidebar.ts b/lib/routes/thepaper/sidebar.ts index e89a20b96..09e011ca2 100644 --- a/lib/routes/thepaper/sidebar.ts +++ b/lib/routes/thepaper/sidebar.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import utils from './utils'; import got from '@/utils/got'; @@ -7,7 +8,19 @@ const sections = { morningEveningNews: '早晚报', }; -export default async (ctx) => { +export const route: Route = { + path: '/sidebar/:sec?', + radar: { + source: ['thepaper.cn/'], + target: '/sidebar', + }, + name: 'Unknown', + maintainers: ['bigfei'], + handler, + url: 'thepaper.cn/', +}; + +async function handler(ctx) { const { sec = 'hotNews' } = ctx.req.param(); const sidebar_url = `https://cache.thepaper.cn/contentapi/wwwIndex/rightSidebar`; @@ -16,9 +29,9 @@ export default async (ctx) => { const list = sidebar_url_data.data[sec]; const items = await Promise.all(list.filter((item) => item.contId).map((item) => utils.ProcessItem(item, ctx))); - ctx.set('data', { + return { title: `澎湃新闻 - ${sections[sec]}`, item: items, link: 'https://www.thepaper.cn', - }); -}; + }; +} diff --git a/lib/routes/theverge/index.ts b/lib/routes/theverge/index.ts index a668168fb..41fa5f9cb 100644 --- a/lib/routes/theverge/index.ts +++ b/lib/routes/theverge/index.ts @@ -1,9 +1,47 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:hub?', + categories: ['new-media'], + example: '/theverge', + parameters: { hub: 'Hub, see below, All Posts by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['theverge.com/:hub', 'theverge.com/'], + }, + name: 'The Verge', + maintainers: ['HenryQW', 'vbali'], + handler, + description: `| Hub | Hub name | + | ----------- | ------------------- | + | | All Posts | + | android | Android | + | apple | Apple | + | apps | Apps & Software | + | blackberry | BlackBerry | + | culture | Culture | + | gaming | Gaming | + | hd | HD & Home | + | microsoft | Microsoft | + | photography | Photography & Video | + | policy | Policy & Law | + | web | Web & Social | + + Provides a better reading experience (full text articles) over the official one.`, +}; + +async function handler(ctx) { const link = ctx.req.param('hub') ? `https://www.theverge.com/${ctx.req.param('hub')}/rss/index.xml` : 'https://www.theverge.com/rss/index.xml'; const feed = await parser.parseURL(link); @@ -84,10 +122,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/theverge/maintainer.ts b/lib/routes/theverge/maintainer.ts deleted file mode 100644 index b47f96749..000000000 --- a/lib/routes/theverge/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:hub?': ['HenryQW', 'vbali'], -}; diff --git a/lib/routes/theverge/namespace.ts b/lib/routes/theverge/namespace.ts new file mode 100644 index 000000000..6bc9fe21a --- /dev/null +++ b/lib/routes/theverge/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Verge', + url: 'theverge.com', +}; diff --git a/lib/routes/theverge/radar.ts b/lib/routes/theverge/radar.ts deleted file mode 100644 index 128a327bb..000000000 --- a/lib/routes/theverge/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'theverge.com': { - _name: 'The Verge', - '.': [ - { - title: 'The Verge', - docs: 'https://docs.rsshub.app/routes/new-media#the-verge', - source: ['/:hub', '/'], - target: '/theverge/:hub?', - }, - ], - }, -}; diff --git a/lib/routes/theverge/router.ts b/lib/routes/theverge/router.ts deleted file mode 100644 index 11a64382a..000000000 --- a/lib/routes/theverge/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:hub?', './index'); -}; diff --git a/lib/routes/thoughtco/index.ts b/lib/routes/thoughtco/index.ts index 07f043ebc..17c1dbe7f 100644 --- a/lib/routes/thoughtco/index.ts +++ b/lib/routes/thoughtco/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,320 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/thoughtco', + parameters: { category: 'Category id, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['nczitzk'], + handler, + description: `#### Science, Tech, Math + + | category | id | + | ---------------- | -------------------------- | + | Science | science-4132464 | + | Math | math-4133545 | + | Social Sciences | social-sciences-4133522 | + | Computer Science | computer-science-4133486 | + | Animals & Nature | animals-and-nature-4133421 | + + #### Humanities + + | category | id | + | ----------------- | --------------------------- | + | History & Culture | history-and-culture-4133356 | + | Visual Arts | visual-arts-4132957 | + | Literature | literature-4133251 | + | English | english-4688281 | + | Geography | geography-4133035 | + | Philosophy | philosophy-4133025 | + | Issues | issues-4133022 | + + #### Languages + + | category | id | + | ---------------------------- | ---------------- | + | English as a Second Language | esl-4133095 | + | Spanish | spanish-4133085 | + | French | french-4133079 | + | German | german-4133073 | + | Italian | italian-4133069 | + | Japanese | japanese-4133062 | + | Mandarin | mandarin-4133057 | + | Russian | russian-4175265 | + + #### Resources + + | category | id | + | ---------------------- | ---------------------------- | + | For Students & Parents | for-students-parents-4132588 | + | For Educators | for-educators-4132509 | + | For Adult Learners | for-adult-learners-4132469 | + + <details> + <summary>More categories</summary> + + #### Science + + | category | id | + | ----------------- | --------------------------- | + | Chemistry | chemistry-4133594 | + | Biology | biology-4133580 | + | Physics | physics-4133571 | + | Geology | geology-4133564 | + | Astronomy | astronomy-4133558 | + | Weather & Climate | weather-and-climate-4133550 | + + #### Math + + | category | id | + | --------------------- | ------------------------------- | + | Math Tutorials | math-tutorials-4133543 | + | Geometry | geometry-4133540 | + | Arithmetic | arithmetic-4133542 | + | Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 | + | Statistics | statistics-4133539 | + | Exponential Decay | exponential-decay-4133528 | + | Worksheets By Grade | worksheets-by-grade-4133526 | + | Resources | math-resources-4133523 | + + #### Social Sciences + + | category | id | + | ----------- | ------------------- | + | Psychology | psychology-4160512 | + | Sociology | sociology-4133515 | + | Archaeology | archaeology-4133504 | + | Economics | economics-4133521 | + | Ergonomics | ergonomics-4133492 | + + #### Computer Science + + | category | id | + | ---------------------- | -------------------------------- | + | PHP Programming | php-4133485 | + | Perl | perl-4133481 | + | Python | python-4133477 | + | Java Programming | java-programming-4133478 | + | Javascript Programming | javascript-programming-4133476 | + | Delphi Programming | delphi-programming-4133475 | + | C & C++ Programming | c-and-c-plus-programming-4133470 | + | Ruby Programming | ruby-programming-4133469 | + | Visual Basic | visual-basic-4133468 | + + #### Animals and Nature + + | category | id | + | ---------------- | ------------------------ | + | Amphibians | amphibians-4133418 | + | Birds | birds-4133416 | + | Habitat Profiles | habitat-profiles-4133412 | + | Mammals | mammals-4133411 | + | Reptiles | reptiles-4133408 | + | Insects | insects-4133406 | + | Marine Life | marine-life-4133393 | + | Forestry | forestry-4133386 | + | Dinosaurs | dinosaurs-4133376 | + | Evolution | evolution-4133366 | + + #### History and Culture + + | category | id | + | ------------------------------ | ---------------------------------------- | + | American History | american-history-4133354 | + | African American History | african-american-history-4133344 | + | African History | african-history-4133338 | + | Ancient History and Culture | ancient-history-4133336 | + | Asian History | asian-history-4133325 | + | European History | european-history-4133316 | + | Genealogy | genealogy-4133308 | + | Inventions | inventions-4133303 | + | Latin American History | latin-american-history-4133296 | + | Medieval & Renaissance History | medieval-and-renaissance-history-4133289 | + | Military History | military-history-4133285 | + | The 20th Century | 20th-century-4133273 | + | Women's History | womens-history-4133260 | + + #### Visual Arts + + | category | id | + | ------------- | -------------------- | + | Art & Artists | art-4132956 | + | Architecture | architecture-4132953 | + + #### Literature + + | category | id | + | ------------------ | -------------------------- | + | Best Sellers | best-sellers-4133250 | + | Classic Literature | classic-literature-4133245 | + | Plays & Drama | plays-and-drama-4133239 | + | Poetry | poetry-4133232 | + | Quotations | quotations-4133229 | + | Shakespeare | shakespeare-4133223 | + | Short Stories | short-stories-4133217 | + | Children's Books | childrens-books-4133216 | + + #### English + + | category | id | + | --------------- | ----------------------- | + | English Grammar | english-grammar-4133049 | + | Writing | writing-4133048 | + + #### Geography + + | category | id | + | ------------------------ | ---------------------------------- | + | Basics | geography-basics-4133034 | + | Physical Geography | physical-geography-4133032 | + | Political Geography | political-geography-4133033 | + | Population | population-4133031 | + | Country Information | country-information-4133030 | + | Key Figures & Milestones | key-figures-and-milestones-4133029 | + | Maps | maps-4133027 | + | Urban Geography | urban-geography-4133026 | + + #### Philosophy + + | category | id | + | ------------------------------ | ---------------------------------------- | + | Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 | + | Major Philosophers | major-philosophers-4133023 | + + #### Issues + + | category | id | + | --------------------------------- | -------------------------------- | + | The U. S. Government | us-government-4133021 | + | U.S. Foreign Policy | us-foreign-policy-4133010 | + | U.S. Liberal Politics | us-liberal-politics-4133009 | + | U.S. Conservative Politics | us-conservative-politics-4133006 | + | Women's Issues | womens-issues-4133002 | + | Civil Liberties | civil-liberties-4132996 | + | The Middle East | middle-east-4132989 | + | Race Relations | race-relations-4132982 | + | Immigration | immigration-4132977 | + | Crime & Punishment | crime-and-punishment-4132972 | + | Canadian Government | canadian-government-4132959 | + | Understanding Types of Government | types-of-government-5179107 | + + #### English as a Second Language + + | category | id | + | ---------------------------- | ------------------------------------------ | + | Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 | + | Vocabulary | esl-vocabulary-4133092 | + | Writing Skills | esl-writing-skills-4133091 | + | Reading Comprehension | esl-reading-comprehension-4133090 | + | Grammar | esl-grammar-4133089 | + | Business English | esl-business-english-4133088 | + | Resources for Teachers | resources-for-esl-teachers-4133087 | + + #### Spanish + + | category | id | + | ----------------- | ----------------------------------- | + | History & Culture | spanish-history-and-culture-4133084 | + | Pronunciation | spanish-pronunciation-4133083 | + | Vocabulary | spanish-vocabulary-4133082 | + | Writing Skills | spanish-writing-skills-4133081 | + | Grammar | spanish-grammar-4133080 | + + #### French + + | category | id | + | ---------------------------- | -------------------------------------------- | + | Pronunciation & Conversation | french-pronunciation-4133075 | + | Vocabulary | french-vocabulary-4133076 | + | Grammar | french-grammar-4133074 | + | Resources For Teachers | french-resources-for-french-teachers-4133077 | + + #### German + + | category | id | + | ---------------------------- | ---------------------------------- | + | History & Culture | german-history-and-culture-4133071 | + | Pronunciation & Conversation | german-pronunciation-4133070 | + | Vocabulary | german-vocabulary-4133068 | + | Grammar | german-grammar-4133067 | + + #### Italian + + | category | id | + | ----------------- | ----------------------------------- | + | History & Culture | italian-history-and-culture-4133065 | + | Vocabulary | italian-vocabulary-4133061 | + | Grammar | italian-grammar-4133063 | + + #### Japanese + + | category | id | + | ----------------------------- | ------------------------------------ | + | History & Culture | japanese-history-and-culture-4133058 | + | Essential Japanese Vocabulary | japanese-vocabulary-4133060 | + | Japanese Grammar | japanese-grammar-4133056 | + + #### Mandarin + + | category | id | + | -------------------------------- | ---------------------------------------- | + | Mandarin History and Culture | mandarin-history-and-culture-4133054 | + | Pronunciation | mandarin-pronunciation-4133053 | + | Vocabulary | mandarin-vocabulary-4133052 | + | Understanding Chinese Characters | understanding-chinese-characters-4133051 | + + #### Russian + + | category | id | + | -------- | --------------- | + | Russian | russian-4175265 | + + #### For Students & Parents + + | category | id | + | ------------------ | -------------------------- | + | Homework Help | homework-help-4132587 | + | Private School | private-school-4132514 | + | Test Prep | test-prep-4132578 | + | College Admissions | college-admissions-4132565 | + | College Life | college-life-4132553 | + | Graduate School | graduate-school-4132543 | + | Business School | business-school-4132536 | + | Law School | law-school-4132527 | + | Distance Learning | distance-learning-4132521 | + + #### For Educators + + | category | id | + | -------------------- | ----------------------------- | + | Becoming A Teacher | becoming-a-teacher-4132510 | + | Assessments & Tests | assessments-and-tests-4132508 | + | Elementary Education | elementary-education-4132507 | + | Secondary Education | secondary-education-4132504 | + | Special Education | special-education-4132499 | + | Teaching | teaching-4132488 | + | Homeschooling | homeschooling-4132480 | + + #### For Adult Learners + + | category | id | + | ----------------------- | ------------------------------- | + | Tips For Adult Students | tips-for-adult-students-4132468 | + | Getting Your Ged | getting-your-ged-4132466 | + </details>`, +}; + +async function handler(ctx) { const { category = '' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; @@ -84,7 +398,7 @@ export default async (ctx) => { const title = $('meta[property="og:title"]').prop('content'); const icon = new URL($('link[rel="apple-touch-icon-precomposed"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${author}${title.startsWith(author) ? '' : ` - ${title}`}`, link: currentUrl, @@ -95,5 +409,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[property="og:title"]').prop('content'), author, - }); -}; + }; +} diff --git a/lib/routes/thoughtco/maintainer.ts b/lib/routes/thoughtco/maintainer.ts deleted file mode 100644 index bc6b30fa1..000000000 --- a/lib/routes/thoughtco/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/thoughtco/namespace.ts b/lib/routes/thoughtco/namespace.ts new file mode 100644 index 000000000..8cb061f83 --- /dev/null +++ b/lib/routes/thoughtco/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ThoughtCo', + url: 'thoughtco.com', +}; diff --git a/lib/routes/thoughtco/radar.ts b/lib/routes/thoughtco/radar.ts deleted file mode 100644 index adfbc884e..000000000 --- a/lib/routes/thoughtco/radar.ts +++ /dev/null @@ -1,155 +0,0 @@ -export default { - 'thoughtco.com': { - _name: 'ThoughtCo', - '.': [ - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category', - source: ['/:category'], - target: (params) => { - const category = params.category; - - return `/thoughtco${category ? `/${category}` : ''}`; - }, - }, - { - title: 'Science, Tech, Math - Science', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-science-tech-math', - source: ['/science-4132464'], - target: '/thoughtco/science-4132464', - }, - { - title: 'Science, Tech, Math - Math', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-science-tech-math', - source: ['/math-4133545'], - target: '/thoughtco/math-4133545', - }, - { - title: 'Science, Tech, Math - Social Sciences', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-science-tech-math', - source: ['/social-sciences-4133522'], - target: '/thoughtco/social-sciences-4133522', - }, - { - title: 'Science, Tech, Math - Computer Science', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-science-tech-math', - source: ['/computer-science-4133486'], - target: '/thoughtco/computer-science-4133486', - }, - { - title: 'Science, Tech, Math - Animals & Nature', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-science-tech-math', - source: ['/animals-and-nature-4133421'], - target: '/thoughtco/animals-and-nature-4133421', - }, - { - title: 'Humanities - History & Culture', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/history-and-culture-4133356'], - target: '/thoughtco/history-and-culture-4133356', - }, - { - title: 'Humanities - Visual Arts', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/visual-arts-4132957'], - target: '/thoughtco/visual-arts-4132957', - }, - { - title: 'Humanities - Literature', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/literature-4133251'], - target: '/thoughtco/literature-4133251', - }, - { - title: 'Humanities - English', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/english-4688281'], - target: '/thoughtco/english-4688281', - }, - { - title: 'Humanities - Geography', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/geography-4133035'], - target: '/thoughtco/geography-4133035', - }, - { - title: 'Humanities - Philosophy', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/philosophy-4133025'], - target: '/thoughtco/philosophy-4133025', - }, - { - title: 'Humanities - Issues', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-humanities', - source: ['/issues-4133022'], - target: '/thoughtco/issues-4133022', - }, - { - title: 'Languages - English as a Second Language', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/esl-4133095'], - target: '/thoughtco/esl-4133095', - }, - { - title: 'Languages - Spanish', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/spanish-4133085'], - target: '/thoughtco/spanish-4133085', - }, - { - title: 'Languages - French', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/french-4133079'], - target: '/thoughtco/french-4133079', - }, - { - title: 'Languages - German', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/german-4133073'], - target: '/thoughtco/german-4133073', - }, - { - title: 'Languages - Italian', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/italian-4133069'], - target: '/thoughtco/italian-4133069', - }, - { - title: 'Languages - Japanese', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/japanese-4133062'], - target: '/thoughtco/japanese-4133062', - }, - { - title: 'Languages - Mandarin', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/mandarin-4133057'], - target: '/thoughtco/mandarin-4133057', - }, - { - title: 'Languages - Russian', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-languages', - source: ['/russian-4175265'], - target: '/thoughtco/russian-4175265', - }, - { - title: 'Resources - For Students & Parents', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-resources', - source: ['/for-students-parents-4132588'], - target: '/thoughtco/for-students-parents-4132588', - }, - { - title: 'Resources - For Educators', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-resources', - source: ['/for-educators-4132509'], - target: '/thoughtco/for-educators-4132509', - }, - { - title: 'Resources - For Adult Learners', - docs: 'https://docs.rsshub.app/routes/new-media#thoughtco-category-resources', - source: ['/for-adult-learners-4132469'], - target: '/thoughtco/for-adult-learners-4132469', - }, - ], - }, -}; diff --git a/lib/routes/thoughtco/router.ts b/lib/routes/thoughtco/router.ts deleted file mode 100644 index 74ed533fc..000000000 --- a/lib/routes/thoughtco/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './'); -}; diff --git a/lib/routes/threads/index.ts b/lib/routes/threads/index.ts index 876ebeb32..909268d87 100644 --- a/lib/routes/threads/index.ts +++ b/lib/routes/threads/index.ts @@ -1,8 +1,44 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { PROFILE_QUERY, REPLIES_QUERY, THREADS_QUERY, apiUrl, threadUrl, profileUrl, extractTokens, makeHeader, buildContent } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/:user/:routeParams?', + categories: ['social-media'], + example: '/threads/zuck', + parameters: { user: 'Username', routeParams: 'Extra parameters, see the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User timeline', + maintainers: ['ninboy'], + handler, + description: `Specify options (in the format of query string) in parameter \`routeParams\` to control some extra features for threads + + | Key | Description | Accepts | Defaults to | + | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- | + | \`showAuthorInTitle\` | Show author name in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | + | \`showAuthorInDesc\` | Show author name in description (RSS body) | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | + | \`showQuotedAuthorAvatarInDesc\` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | + | \`showAuthorAvatarInDesc\` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`falseP\` | + | \`showEmojiForQuotesAndReply\` | Use "🔁" instead of "QT", "↩️" instead of "Re" | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | + | \`showQuotedInTitle\` | Show quoted tweet in title | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | + | \`replies\` | Show replies | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | + + Specify different option values than default values to improve readability. The URL + + \`\`\` + https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1 + \`\`\``, +}; + +async function handler(ctx) { const { user, routeParams } = ctx.req.param(); const { lsd, userId } = await extractTokens(user, ctx); @@ -66,11 +102,11 @@ export default async (ctx) => { json.items = items; ctx.set('json', json); - ctx.set('data', { + return { title: `${user} (@${user}) on Threads`, link: profileUrl(user), image: userData.hd_profile_pic_versions?.sort((a, b) => b.width - a.width)[0].url ?? userData.profile_pic_url, description: userData.biography, item: items, - }); -}; + }; +} diff --git a/lib/routes/threads/maintainer.ts b/lib/routes/threads/maintainer.ts deleted file mode 100644 index ac194e20d..000000000 --- a/lib/routes/threads/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:user/:routeParams?': ['ninboy'], -}; diff --git a/lib/routes/threads/namespace.ts b/lib/routes/threads/namespace.ts new file mode 100644 index 000000000..63d33a478 --- /dev/null +++ b/lib/routes/threads/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Threads', + url: 'threads.net', +}; diff --git a/lib/routes/threads/radar.ts b/lib/routes/threads/radar.ts deleted file mode 100644 index 6cf251ba2..000000000 --- a/lib/routes/threads/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'threads.net': { - _name: 'Threads', - '.': [ - { - title: 'User timeline', - docs: 'https://docs.rsshub.app/routes/social-media#threads', - source: ['/:user'], - target: (params) => `/threads/${params.user.substring(1)}`, - }, - ], - }, -}; diff --git a/lib/routes/threads/router.ts b/lib/routes/threads/router.ts deleted file mode 100644 index 4d67bf6f7..000000000 --- a/lib/routes/threads/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:user/:routeParams?', './index'); -}; diff --git a/lib/routes/thwiki/index.ts b/lib/routes/thwiki/index.ts index b423a5eab..2ec822de5 100644 --- a/lib/routes/thwiki/index.ts +++ b/lib/routes/thwiki/index.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import dayjs from 'dayjs'; -export default async (ctx) => { +export const route: Route = { + path: '/calendar/:before?/:after?', + categories: ['anime'], + example: '/thwiki/calendar', + parameters: { before: 'From how many days ago (default 30)', after: 'To how many days after (default 30)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['thwiki.cc/', 'thwiki.cc/日程表'], + target: '/calendar', + }, + name: 'Calendar', + maintainers: ['aether17'], + handler, + url: 'thwiki.cc/', +}; + +async function handler(ctx) { const beforeDays = ctx.req.param('before') ? Number.parseInt(ctx.req.param('before')) : 30; const afterDays = ctx.req.param('after') ? Number.parseInt(ctx.req.param('after')) : 30; const before = dayjs().subtract(beforeDays, 'day').format('YYYY-MM-DD'); @@ -16,7 +40,7 @@ export default async (ctx) => { }); const data = response.data.results; - ctx.set('data', { + return { title: 'Touhou events calendar (THBWiki)', link: `https://calendar.thwiki.cc/`, description: 'A Touhou related events calendar api from THBWiki', @@ -28,5 +52,5 @@ export default async (ctx) => { guid: item.id, link: item.url, })), - }); -}; + }; +} diff --git a/lib/routes/thwiki/maintainer.ts b/lib/routes/thwiki/maintainer.ts deleted file mode 100644 index 067012b1a..000000000 --- a/lib/routes/thwiki/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/calendar/:before?/:after?': ['aether17'], -}; diff --git a/lib/routes/thwiki/namespace.ts b/lib/routes/thwiki/namespace.ts new file mode 100644 index 000000000..3a7ad2a04 --- /dev/null +++ b/lib/routes/thwiki/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'THBWiki', + url: 'thwiki.cc', +}; diff --git a/lib/routes/thwiki/radar.ts b/lib/routes/thwiki/radar.ts deleted file mode 100644 index 54738f0e3..000000000 --- a/lib/routes/thwiki/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'thwiki.cc': { - _name: 'THBWiki', - '.': [ - { - title: '日历', - docs: 'https://docs.rsshub.app/routes/anime#thbwiki', - source: ['/', '/日程表'], - target: '/thwiki/calendar', - }, - ], - }, -}; diff --git a/lib/routes/thwiki/router.ts b/lib/routes/thwiki/router.ts deleted file mode 100644 index acbb6a722..000000000 --- a/lib/routes/thwiki/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/calendar/:before?/:after?', './index'); -}; diff --git a/lib/routes/tiktok/maintainer.ts b/lib/routes/tiktok/maintainer.ts deleted file mode 100644 index a3110a1e9..000000000 --- a/lib/routes/tiktok/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/user/:user/:iframe?': ['TonyRL'], -}; diff --git a/lib/routes/tiktok/namespace.ts b/lib/routes/tiktok/namespace.ts new file mode 100644 index 000000000..b754c6bd6 --- /dev/null +++ b/lib/routes/tiktok/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TikTok', + url: 'tiktok.com', +}; diff --git a/lib/routes/tiktok/radar.ts b/lib/routes/tiktok/radar.ts deleted file mode 100644 index 6702e36e6..000000000 --- a/lib/routes/tiktok/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tiktok.com': { - _name: 'TikTok', - '.': [ - { - title: 'User', - docs: 'https://docs.rsshub.app/routes/social-media#tiktok', - source: ['/:user'], - target: '/tiktok/user/:user', - }, - ], - }, -}; diff --git a/lib/routes/tiktok/router.ts b/lib/routes/tiktok/router.ts deleted file mode 100644 index 0950e9e94..000000000 --- a/lib/routes/tiktok/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/user/:user/:iframe?', './user'); -}; diff --git a/lib/routes/tiktok/user.ts b/lib/routes/tiktok/user.ts index 72da96c53..3efad0864 100644 --- a/lib/routes/tiktok/user.ts +++ b/lib/routes/tiktok/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,29 @@ import puppeteer from '@/utils/puppeteer'; const baseUrl = 'https://www.tiktok.com'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user/:iframe?', + categories: ['social-media'], + example: '/tiktok/user/@linustech/true', + parameters: { user: 'User ID, including @', iframe: 'Use the official iframe to embed the video, which allows you to view the video if the default option does not work. Default to `false`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tiktok.com/:user'], + target: '/user/:user', + }, + name: 'User', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { user, iframe } = ctx.req.param(); const useIframe = queryToBoolean(iframe); @@ -54,12 +77,12 @@ export default async (ctx) => { category: item.textExtra.map((t) => `#${t.hashtagName}`), })); - ctx.set('data', { + return { title: data.SharingMetaState.value['og:title'], description: data.SharingMetaState.value['og:description'], image: data.SharingMetaState.value['og:image'], link: `${baseUrl}/${user}`, item: items, language: data.lang, - }); -}; + }; +} diff --git a/lib/routes/timednews/maintainer.ts b/lib/routes/timednews/maintainer.ts deleted file mode 100644 index 9acdedf26..000000000 --- a/lib/routes/timednews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['linbuxiao'], -}; diff --git a/lib/routes/timednews/namespace.ts b/lib/routes/timednews/namespace.ts new file mode 100644 index 000000000..9bd490199 --- /dev/null +++ b/lib/routes/timednews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '时刻新闻', + url: 'timednews.com', +}; diff --git a/lib/routes/timednews/news.ts b/lib/routes/timednews/news.ts index 86d9e90f3..405fa26d2 100644 --- a/lib/routes/timednews/news.ts +++ b/lib/routes/timednews/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -52,7 +53,30 @@ const PATH_LIST = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['new-media'], + example: '/timednews/news', + parameters: { type: '子分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['linbuxiao'], + handler, + description: `子分类 + + | 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 | + | ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- | + | all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'all'; const url = `${BASE}/${PATH_LIST[type].path}`; const res = await got({ @@ -91,12 +115,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '时刻新闻', link: url, description: `时刻新闻 ${PATH_LIST[type].name}`, item: items, - }); + }; ctx.set('json', { title: '时刻新闻', @@ -104,4 +128,4 @@ export default async (ctx) => { description: `时刻新闻 ${PATH_LIST[type].name}`, item: items, }); -}; +} diff --git a/lib/routes/timednews/radar.ts b/lib/routes/timednews/radar.ts deleted file mode 100644 index af4b76ac1..000000000 --- a/lib/routes/timednews/radar.ts +++ /dev/null @@ -1,57 +0,0 @@ -export default { - 'timednews.com': { - _name: '时刻新闻', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#shi-ke-xin-wen', - source: ['/topic/:type/:id'], - target: ({ type, id }) => { - let name = ''; - if (type === 'cat') { - if (id === '1') { - name = 'all'; - } - } else if (type === 'subcat') { - switch (id) { - case '1': - name = 'currentAffairs'; - break; - case '2': - name = 'finance'; - break; - case '3': - name = 'technology'; - break; - case '4': - name = 'social'; - break; - case '5': - name = 'sports'; - break; - case '6': - name = 'international'; - break; - case '7': - name = 'usa'; - break; - case '8': - name = 'cn'; - break; - case '9': - name = 'europe'; - break; - case '14': - name = 'comments'; - break; - default: - break; - } - } - - return `/timednews/news/${name}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/timednews/router.ts b/lib/routes/timednews/router.ts deleted file mode 100644 index eb19f8f1f..000000000 --- a/lib/routes/timednews/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/tingshuitz/changsha.ts b/lib/routes/tingshuitz/changsha.ts index 3582c4946..aa4fa2ab1 100644 --- a/lib/routes/tingshuitz/changsha.ts +++ b/lib/routes/tingshuitz/changsha.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'http://www.supplywater.com'; -export default async (ctx) => { +export const route: Route = { + path: '/changsha/:channelId?', + categories: ['forecast'], + example: '/tingshuitz/changsha/78', + parameters: { channelId: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '长沙市', + maintainers: ['shansing'], + handler, + description: `可能仅限于中国大陆服务器访问,以实际情况为准。 + + | channelId | 分类 | + | --------- | -------- | + | 78 | 计划停水 | + | 157 | 抢修停水 |`, +}; + +async function handler(ctx) { const { channelId = 78 } = ctx.req.param(); const listPage = await got('http://www.supplywater.com/tstz-' + channelId + '.aspx'); const $ = load(listPage.data); @@ -35,9 +60,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${pageName}通知 - 长沙水业集团`, link: `${baseUrl}/fuwuzhinan.aspx`, item: items, - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/dalian.ts b/lib/routes/tingshuitz/dalian.ts index f1b047cda..493afe0ae 100644 --- a/lib/routes/tingshuitz/dalian.ts +++ b/lib/routes/tingshuitz/dalian.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dalian', + categories: ['forecast'], + example: '/tingshuitz/dalian', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['swj.dl.gov.cn/col/col4296/index.html', 'swj.dl.gov.cn/'], + }, + name: '大连市', + maintainers: ['DIYgod'], + handler, + url: 'swj.dl.gov.cn/col/col4296/index.html', +}; + +async function handler() { const url = 'https://swj.dl.gov.cn/module/web/jpage/dataproxy.jsp?page=1&webid=28&path=https://swj.dl.gov.cn/&columnid=4296&unitid=31227&webname=%25E5%25A4%25A7%25E8%25BF%259E%25E5%25B8%2582%25E6%25B0%25B4%25E5%258A%25A1%25E5%25B1%2580&permissiontype=0'; const response = await got(url); @@ -20,10 +43,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: '停水通知 - 大连市水务局', link: 'https://swj.dl.gov.cn/col/col4296/index.html', description: '停水通知 - 大连市水务局', item: items, - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/dongguan.ts b/lib/routes/tingshuitz/dongguan.ts index c9ea88655..7dde2ca96 100644 --- a/lib/routes/tingshuitz/dongguan.ts +++ b/lib/routes/tingshuitz/dongguan.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dongguan', + categories: ['forecast'], + example: '/tingshuitz/dongguan', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '东莞市', + maintainers: ['victoriqueko'], + handler, +}; + +async function handler() { const url = 'http://www.djsw.com.cn/news/tstz/index.html'; const response = await got({ method: 'get', @@ -13,7 +32,7 @@ export default async (ctx) => { const $ = load(data); const list = $('#cntR li'); - ctx.set('data', { + return { title: $('title').text() || '停水通知 - 东莞市东江水务有限公司', link: 'http://www.djsw.com.cn/news/tstz/index.html', description: $('title').text() || '停水通知 - 东莞市东江水务有限公司', @@ -30,5 +49,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/guangzhou.ts b/lib/routes/tingshuitz/guangzhou.ts index f37e25cee..0142497f4 100644 --- a/lib/routes/tingshuitz/guangzhou.ts +++ b/lib/routes/tingshuitz/guangzhou.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/guangzhou', + categories: ['forecast'], + example: '/tingshuitz/guangzhou', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '广州市', + maintainers: ['xyqfer'], + handler, +}; + +async function handler() { const response = await got({ method: 'post', url: `https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDE0NzAxMw%3D%3D&hid=15&sn=270abafdcf67ce4e2b52a049a0aa219a&scene=1&sharer_username=&clicktime=${Math.floor( @@ -15,9 +34,9 @@ export default async (ctx) => { description: `${title}<br>${digest}...`, })); - ctx.set('data', { + return { title: '停水通知 - 广州市自来水96968', link: 'https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDE0NzAxMw%3D%3D&hid=15&sn=270abafdcf67ce4e2b52a049a0aa219a&scene=1&sharer_username=&clicktime=&devicetype=iOS12.2&version=1700042b&lang=zh_CN&nettype=WIFI&ascene=0&fontScale=100&wx_header=1', item: items, - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/hangzhou.ts b/lib/routes/tingshuitz/hangzhou.ts index 5163099f5..ca98a5b28 100644 --- a/lib/routes/tingshuitz/hangzhou.ts +++ b/lib/routes/tingshuitz/hangzhou.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/hangzhou', + categories: ['forecast'], + example: '/tingshuitz/hangzhou', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.hzwgc.com/public/stop_the_water', 'www.hzwgc.com/'], + }, + name: '杭州市', + maintainers: ['znhocn'], + handler, + url: 'www.hzwgc.com/public/stop_the_water', +}; + +async function handler() { // const area = ctx.req.param('area'); const url = 'http://www.hzwgc.com/public/stop_the_water/'; const response = await got({ @@ -13,7 +36,7 @@ export default async (ctx) => { const $ = load(data); const list = $('.datalist li'); - ctx.set('data', { + return { title: $('title').text(), link: 'http://www.hzwgc.com/public/stop_the_water/', description: $('meta[name="description"]').attr('content') || $('title').text(), @@ -30,5 +53,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/maintainer.ts b/lib/routes/tingshuitz/maintainer.ts deleted file mode 100644 index 4cb2914a9..000000000 --- a/lib/routes/tingshuitz/maintainer.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - '/changsha/:channelId?': ['shansing'], - '/dalian': ['DIYgod'], - '/dongguan': ['victoriqueko'], - '/guangzhou': ['xyqfer'], - '/hangzhou': ['znhocn'], - '/nanjing': ['ocleo1'], - '/shenzhen': ['lilPiper'], - '/wuhan': ['MoonBegonia'], - '/xian': ['ciaranchen'], - '/xiaoshan': ['znhocn'], - '/yangjiang': ['ciaranchen'], -}; diff --git a/lib/routes/tingshuitz/namespace.ts b/lib/routes/tingshuitz/namespace.ts new file mode 100644 index 000000000..bce8ce8da --- /dev/null +++ b/lib/routes/tingshuitz/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '停水通知', + url: 'swj.dl.gov.cn', + description: `配合 [IFTTT](https://ifttt.com/) Applets [邮件通知](https://ifttt.com/applets/SEvmDVKY-) 使用实现自动通知效果.`, +}; diff --git a/lib/routes/tingshuitz/nanjing.ts b/lib/routes/tingshuitz/nanjing.ts index 0fa1b4598..0042460c4 100644 --- a/lib/routes/tingshuitz/nanjing.ts +++ b/lib/routes/tingshuitz/nanjing.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const HOME_PAGE = 'http://www.jlwater.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/nanjing', + categories: ['forecast'], + example: '/tingshuitz/nanjing', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jlwater.com/portal/10000013', 'jlwater.com/'], + }, + name: '南京市', + maintainers: ['ocleo1'], + handler, + url: 'jlwater.com/portal/10000013', +}; + +async function handler() { const url = `${HOME_PAGE}portal/10000013`; const response = await got(url); @@ -11,7 +34,7 @@ export default async (ctx) => { const $ = load(data); const list = $('.list-content ul li'); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: list @@ -29,5 +52,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/radar.ts b/lib/routes/tingshuitz/radar.ts deleted file mode 100644 index a9327a40e..000000000 --- a/lib/routes/tingshuitz/radar.ts +++ /dev/null @@ -1,89 +0,0 @@ -export default { - 'dl.gov.cn': { - _name: '停水通知', - swj: [ - { - title: '大连市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/col/col4296/index.html', '/'], - target: '/tingshuitz/dalian', - }, - ], - }, - 'hzwgc.com': { - _name: '停水通知', - www: [ - { - title: '杭州市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/public/stop_the_water', '/'], - target: '/tingshuitz/hangzhou', - }, - ], - }, - 'jlwater.com': { - _name: '停水通知', - '.': [ - { - title: '南京市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/portal/10000013', '/'], - target: '/tingshuitz/nanjing', - }, - ], - }, - 'supplywater.com': { - _name: '停水通知', - www: [ - { - title: '长沙市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/*'], - }, - ], - }, - 'sz-water.com.cn': { - _name: '停水通知', - '.': [ - { - title: '深圳市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/*'], - target: '/tingshuitz/shenzhen', - }, - ], - }, - 'whwater.com': { - _name: '停水通知', - '.': [ - { - title: '武汉市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/IWater.shtml', '/'], - target: '/tingshuitz/wuhan', - }, - ], - }, - 'xswater.com': { - _name: '停水通知', - www: [ - { - title: '萧山区', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/gongshui/channels/227.html', '/'], - target: '/tingshuitz/xiaoshan', - }, - ], - }, - 'yjsswjt.com': { - _name: '停水通知', - '.': [ - { - title: '阳江市', - docs: 'https://docs.rsshub.app/routes/forecast#ting-shui-tong-zhi', - source: ['/zxdt_list.jsp', '/'], - target: '/tingshuitz/yangjiang', - }, - ], - }, -}; diff --git a/lib/routes/tingshuitz/router.ts b/lib/routes/tingshuitz/router.ts deleted file mode 100644 index b396300a4..000000000 --- a/lib/routes/tingshuitz/router.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default (router) => { - router.get('/changsha/:channelId?', './changsha'); - router.get('/dalian', './dalian'); - router.get('/dongguan', './dongguan'); - router.get('/guangzhou', './guangzhou'); - router.get('/hangzhou', './hangzhou'); - router.get('/nanjing', './nanjing'); - router.get('/shenzhen', './shenzhen'); - router.get('/wuhan/:channelId?', './wuhan'); - router.get('/xian', './xian'); - router.get('/xiaoshan', './xiaoshan'); - router.get('/yangjiang', './yangjiang'); -}; diff --git a/lib/routes/tingshuitz/shenzhen.ts b/lib/routes/tingshuitz/shenzhen.ts index c4dd877e8..f144fff23 100644 --- a/lib/routes/tingshuitz/shenzhen.ts +++ b/lib/routes/tingshuitz/shenzhen.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,30 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/shenzhen', + categories: ['forecast'], + example: '/tingshuitz/shenzhen', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sz-water.com.cn/*'], + }, + name: '深圳市', + maintainers: ['lilPiper'], + handler, + url: 'sz-water.com.cn/*', + description: `可能仅限中国大陆服务器访问,以实际情况为准。`, +}; + +async function handler() { const url = 'https://szgk.sz-water.com.cn/api/wechat/op/getStopWaterNotice'; const response = await got({ method: 'get', @@ -16,7 +40,7 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: '停水通知 - 深圳水务', link: 'https://www.sz-water.com.cn/', item: data.map((item) => ({ @@ -28,5 +52,5 @@ export default async (ctx) => { link: 'https://szgk.sz-water.com.cn/wechat_web/Water_stop.html', guid: `${item.position}${item.stopStartTime}`, })), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/wuhan.ts b/lib/routes/tingshuitz/wuhan.ts index 2108ea016..2ea27480f 100644 --- a/lib/routes/tingshuitz/wuhan.ts +++ b/lib/routes/tingshuitz/wuhan.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://www.whwater.com'; -export default async (ctx) => { +export const route: Route = { + path: '/wuhan/:channelId?', + radar: { + source: ['whwater.com/IWater.shtml', 'whwater.com/'], + target: '/wuhan', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'whwater.com/IWater.shtml', +}; + +async function handler(ctx) { const { channelId = 68 } = ctx.req.param(); const response = await got.post('https://manager.whwater.com:8900/website/article/findChannelArticle', { form: { @@ -24,9 +37,9 @@ export default async (ctx) => { link: `https://${baseUrl}/IPolicyDetails.shtml?id=31&sid=${channelId}${item.articleLink}`, })); - ctx.set('data', { + return { title: `${data.channelName}通知 - 武汉市水务集团有限公司`, link: `${baseUrl}/IWater.shtml?id=31&sid=48`, item: items, - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/xian.ts b/lib/routes/tingshuitz/xian.ts index 9a76686f2..132135bb5 100644 --- a/lib/routes/tingshuitz/xian.ts +++ b/lib/routes/tingshuitz/xian.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/xian', + categories: ['forecast'], + example: '/tingshuitz/xian', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '西安市', + maintainers: ['ciaranchen'], + handler, +}; + +async function handler() { const url = 'http://www.xazls.com/tsgg/index.htm'; const response = await got(url, { responseType: 'buffer', @@ -12,7 +31,7 @@ export default async (ctx) => { const $ = load(iconv.decode(data, 'gb2312')); const list = $('#body > div.M > div.AboutUsDetail > ul > li'); - ctx.set('data', { + return { title: $('title').text() || '停水通知 - 西安市自来水有限公司', link: 'http://www.xazls.com/tsgg/index.htm', item: list @@ -27,5 +46,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/xiaoshan.ts b/lib/routes/tingshuitz/xiaoshan.ts index f87285b2e..3a7460544 100644 --- a/lib/routes/tingshuitz/xiaoshan.ts +++ b/lib/routes/tingshuitz/xiaoshan.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/xiaoshan', + categories: ['forecast'], + example: '/tingshuitz/xiaoshan', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.xswater.com/gongshui/channels/227.html', 'www.xswater.com/'], + }, + name: '萧山区', + maintainers: ['znhocn'], + handler, + url: 'www.xswater.com/gongshui/channels/227.html', +}; + +async function handler() { // const area = ctx.req.param('area'); const url = 'https://www.xswater.com/gongshui/channels/227.html'; const response = await got({ @@ -13,7 +36,7 @@ export default async (ctx) => { const $ = load(data); const list = $('.ul-list li'); - ctx.set('data', { + return { title: $('title').text(), link: 'https://www.xswater.com/gongshui/channels/227.html', description: $('meta[name="description"]').attr('content') || $('title').text(), @@ -30,5 +53,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingshuitz/yangjiang.ts b/lib/routes/tingshuitz/yangjiang.ts index 0be09b1ae..59ef3dedb 100644 --- a/lib/routes/tingshuitz/yangjiang.ts +++ b/lib/routes/tingshuitz/yangjiang.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yangjiang', + categories: ['forecast'], + example: '/tingshuitz/yangjiang', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yjsswjt.com/zxdt_list.jsp', 'yjsswjt.com/'], + }, + name: '阳江市', + maintainers: ['ciaranchen'], + handler, + url: 'yjsswjt.com/zxdt_list.jsp', +}; + +async function handler() { const url = 'https://www.yjsswjt.com/zxdt_list.jsp?flbz=7'; const response = await got(url); const $ = load(response.data); const list = $('div.list_ul_div > ul > li'); - ctx.set('data', { + return { title: '停水通知 - 阳江市水务集团有限公司', link: 'https://www.yjsswjt.com/zxdt_list.jsp?flbz=7', item: list @@ -25,5 +48,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/tingtingfm/maintainer.ts b/lib/routes/tingtingfm/maintainer.ts deleted file mode 100644 index 9408052dd..000000000 --- a/lib/routes/tingtingfm/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/program/:programId': ['TonyRL'], -}; diff --git a/lib/routes/tingtingfm/namespace.ts b/lib/routes/tingtingfm/namespace.ts new file mode 100644 index 000000000..2fb66670e --- /dev/null +++ b/lib/routes/tingtingfm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '听听 FM', + url: 'mobile.tingtingfm.com', +}; diff --git a/lib/routes/tingtingfm/program.ts b/lib/routes/tingtingfm/program.ts index cfc635459..68b087dc0 100644 --- a/lib/routes/tingtingfm/program.ts +++ b/lib/routes/tingtingfm/program.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { getClientVal, sign } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/program/:programId', + categories: ['multimedia'], + example: '/tingtingfm/program/M7VJv6Jj4R', + parameters: { programId: '节目 ID,可以在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: { + source: ['mobile.tingtingfm.com/v3/program/:programId'], + }, + name: '节目', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const programId = ctx.req.param('programId'); const apiBaseUrl = 'https://api-v3.tingtingfm.com'; const mobileBaseUrl = 'https://mobile.tingtingfm.com'; @@ -95,7 +117,7 @@ export default async (ctx) => { enclosure_type: 'audio/x-m4a', })); - ctx.set('data', { + return { title: `${radioInfo.title} - ${radioInfo.belong_radio}${radioInfo.belong_fm}`, description: radioInfo.description, link: `${mobileBaseUrl}/v3/program/${programId}`, @@ -104,5 +126,5 @@ export default async (ctx) => { itunes_category: radioInfo.category, itunes_explicit: false, item: items, - }); -}; + }; +} diff --git a/lib/routes/tingtingfm/radar.ts b/lib/routes/tingtingfm/radar.ts deleted file mode 100644 index f250648cf..000000000 --- a/lib/routes/tingtingfm/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tingtingfm.com': { - _name: '听听 FM', - mobile: [ - { - title: '节目', - docs: 'https://docs.rsshub.app/routes/multimedia#ting-ting-fm', - source: ['/v3/program/:programId'], - target: '/tingtingfm/program/:programId', - }, - ], - }, -}; diff --git a/lib/routes/tingtingfm/router.ts b/lib/routes/tingtingfm/router.ts deleted file mode 100644 index 3cb597ede..000000000 --- a/lib/routes/tingtingfm/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/program/:programId', './program'); -}; diff --git a/lib/routes/tisi/index.ts b/lib/routes/tisi/index.ts index 1f1cba2b4..b1f43b847 100644 --- a/lib/routes/tisi/index.ts +++ b/lib/routes/tisi/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://www.tisi.org'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/tisi/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最近更新', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler() { const url = `${rootUrl}/?page_id=11151`; const response = await got(url); @@ -31,9 +50,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '腾讯研究院 - 最近更新', link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/tisi/maintainer.ts b/lib/routes/tisi/maintainer.ts deleted file mode 100644 index 446de56f0..000000000 --- a/lib/routes/tisi/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['Fatpandac'], -}; diff --git a/lib/routes/tisi/namespace.ts b/lib/routes/tisi/namespace.ts new file mode 100644 index 000000000..6ea4ab10c --- /dev/null +++ b/lib/routes/tisi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '腾讯研究院', + url: 'tisi.org', +}; diff --git a/lib/routes/tisi/radar.ts b/lib/routes/tisi/radar.ts deleted file mode 100644 index 2707e9dad..000000000 --- a/lib/routes/tisi/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'tisi.org': { - _name: '腾讯研究院', - '.': [ - { - title: '最近更新', - docs: 'https://docs.rsshub.app/routes/new-media#teng-xun-yan-jiu-yuan', - source: ['/'], - target: (_params, url) => { - if (new URL(url).searchParams.get('page_id') === '11151') { - return '/tisi/latest'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/tisi/router.ts b/lib/routes/tisi/router.ts deleted file mode 100644 index d51494559..000000000 --- a/lib/routes/tisi/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/latest', './index'); -}; diff --git a/lib/routes/tju/cic/index.ts b/lib/routes/tju/cic/index.ts index 5280a3eeb..bbecef32c 100644 --- a/lib/routes/tju/cic/index.ts +++ b/lib/routes/tju/cic/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,28 @@ const pageType = (href) => { return url.hostname === 'cic.tju.edu.cn' ? 'tju-cic' : 'unknown'; }; -export default async (ctx) => { +export const route: Route = { + path: '/cic/:type?', + categories: ['university'], + example: '/tju/cic/news', + parameters: { type: 'default `news`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'College of Intelligence and Computing', + maintainers: ['SuperPung'], + handler, + description: `| College News | Notification | TJU Forum for CIC | + | :----------: | :----------: | :---------------: | + | news | notification | forum |`, +}; + +async function handler(ctx) { const type = ctx.params && ctx.req.param('type'); let path, subtitle; @@ -49,7 +71,7 @@ export default async (ctx) => { } if (response === null) { - ctx.set('data', { + return { title: '天津大学智能与计算学部 - ' + subtitle, link: cic_base_url + path, description: '链接失效' + cic_base_url + path, @@ -60,7 +82,7 @@ export default async (ctx) => { description: `<h2>请到<a href=${repo_url}>此处</a>提交Issue</h2>`, }, ], - }); + }; } else { const $ = load(response.data); const list = $('.wenzi_list_ul > li') @@ -100,11 +122,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '天津大学智能与计算学部 - ' + subtitle, link: cic_base_url + path, description: null, item: items, - }); + }; } -}; +} diff --git a/lib/routes/tju/maintainer.ts b/lib/routes/tju/maintainer.ts deleted file mode 100644 index 3be8bd22e..000000000 --- a/lib/routes/tju/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cic/:type?': ['SuperPung'], - '/news/:type?': ['SuperPung'], - '/oaa/:type?': ['AmosChenYQ', 'SuperPung'], - '/yzb/:type?': ['SuperPung'], -}; diff --git a/lib/routes/tju/namespace.ts b/lib/routes/tju/namespace.ts new file mode 100644 index 000000000..797cb1aba --- /dev/null +++ b/lib/routes/tju/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Tianjin University 天津大学', + url: 'cic.tju.edu.cn', +}; diff --git a/lib/routes/tju/news/index.ts b/lib/routes/tju/news/index.ts index 1b3e73301..d7e0d54b7 100644 --- a/lib/routes/tju/news/index.ts +++ b/lib/routes/tju/news/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -17,7 +18,28 @@ const pageType = (href) => { return url.hostname === 'news.tju.edu.cn' ? 'tju-news' : 'unknown'; }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/tju/news/focus', + parameters: { type: 'default `focus`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['SuperPung'], + handler, + description: `| Focus on TJU | General News | Internal News | Media Report | Pictures of TJU | + | :----------: | :----------: | :-----------: | :----------: | :-------------: | + | focus | general | internal | media | picture |`, +}; + +async function handler(ctx) { const type = ctx.params && ctx.req.param('type'); let path, subtitle; @@ -59,7 +81,7 @@ export default async (ctx) => { } if (response === null) { - ctx.set('data', { + return { title: '天津大学新闻网 - ' + subtitle, link: news_base_url + path, description: '链接失效' + news_base_url + path, @@ -70,7 +92,7 @@ export default async (ctx) => { description: `<h2>请到<a href=${repo_url}>此处</a>提交Issue</h2>`, }, ], - }); + }; } else { const $ = load(response.data); @@ -119,10 +141,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '天津大学新闻网 - ' + subtitle, link: news_base_url + path, item: items, - }); + }; } -}; +} diff --git a/lib/routes/tju/oaa/index.ts b/lib/routes/tju/oaa/index.ts index c06e6b151..4b58b9f9b 100644 --- a/lib/routes/tju/oaa/index.ts +++ b/lib/routes/tju/oaa/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -22,7 +23,28 @@ const pageType = (href) => { } }; -export default async (ctx) => { +export const route: Route = { + path: '/oaa/:type?', + categories: ['university'], + example: '/tju/oaa/news', + parameters: { type: 'default `news`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'The Office of Academic Affairs', + maintainers: ['AmosChenYQ', 'SuperPung'], + handler, + description: `| News | Notification | + | :--: | :----------: | + | news | notification |`, +}; + +async function handler(ctx) { const type = ctx.params && ctx.req.param('type'); let path, subtitle; @@ -52,7 +74,7 @@ export default async (ctx) => { } if (response === null) { - ctx.set('data', { + return { title: '天津大学教务处 - ' + subtitle, link: oaa_base_url + path, description: '链接失效' + oaa_base_url + path, @@ -63,7 +85,7 @@ export default async (ctx) => { description: `<h2>请到<a href=${repo_url}>此处</a>提交Issue</h2>`, }, ], - }); + }; } else { const $ = load(response.data); const list = $('.notice_l > ul > li > dl > dt') @@ -103,11 +125,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '天津大学教务处 - ' + subtitle, link: oaa_base_url + path, description: null, item: items, - }); + }; } -}; +} diff --git a/lib/routes/tju/radar.ts b/lib/routes/tju/radar.ts deleted file mode 100644 index 2ea39217e..000000000 --- a/lib/routes/tju/radar.ts +++ /dev/null @@ -1,97 +0,0 @@ -export default { - 'tju.edu.cn': { - _name: '天津大学', - cic: [ - { - title: '智能与计算学部 - 学部新闻', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-zhi-neng-yu-ji-suan-xue-bu', - source: ['/xwzx/xyxw.htm', '/'], - target: '/tju/cic/news', - }, - { - title: '智能与计算学部 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-zhi-neng-yu-ji-suan-xue-bu', - source: ['/xwzx/tzgg.htm', '/'], - target: '/tju/cic/notification', - }, - { - title: '智能与计算学部 - 北洋智算论坛', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-zhi-neng-yu-ji-suan-xue-bu', - source: ['/byzslt.htm', '/'], - target: '/tju/cic/forum', - }, - ], - news: [ - { - title: '新闻网 - 聚焦天大', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-xin-wen-wang', - source: ['/jjtd.htm', '/'], - target: '/tju/news/focus', - }, - { - title: '新闻网 - 综合新闻', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-xin-wen-wang', - source: ['/zhxw.htm', '/'], - target: '/tju/news/general', - }, - { - title: '新闻网 - 校内新闻', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-xin-wen-wang', - source: ['/xnxw1/qb.htm', '/'], - target: '/tju/news/internal', - }, - { - title: '新闻网 - 媒体报道', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-xin-wen-wang', - source: ['/mtbd.htm', '/'], - target: '/tju/news/media', - }, - { - title: '新闻网 - 图说天大', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-xin-wen-wang', - source: ['/tstd.htm', '/'], - target: '/tju/news/picture', - }, - ], - oaa: [ - { - title: '教务处 - 新闻动态', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-jiao-wu-chu', - source: ['/xwdt.htm', '/'], - target: '/tju/oaa/news', - }, - { - title: '教务处 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-jiao-wu-chu', - source: ['/tzgg.htm', '/'], - target: '/tju/oaa/notification', - }, - ], - yzb: [ - { - title: '研究生招生网 - 校级公告', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-yan-jiu-sheng-zhao-sheng-wang', - source: ['/xwzx/zxxx/', '/'], - target: '/tju/yzb/notice', - }, - { - title: '研究生招生网 - 统考硕士', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-yan-jiu-sheng-zhao-sheng-wang', - source: ['/xwzx/tkss_xw/', '/'], - target: '/tju/yzb/master', - }, - { - title: '研究生招生网 - 统考博士', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-yan-jiu-sheng-zhao-sheng-wang', - source: ['/xwzx/tkbs_xw/', '/'], - target: '/tju/yzb/doctor', - }, - { - title: '研究生招生网 - 在职学位', - docs: 'https://docs.rsshub.app/routes/university#tian-jin-da-xue-yan-jiu-sheng-zhao-sheng-wang', - source: ['/xwzx/zzxw/', '/'], - target: '/tju/yzb/job', - }, - ], - }, -}; diff --git a/lib/routes/tju/router.ts b/lib/routes/tju/router.ts deleted file mode 100644 index ec8f0b351..000000000 --- a/lib/routes/tju/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cic/:type?', './cic'); - router.get('/news/:type?', './news'); - router.get('/oaa/:type?', './oaa'); - router.get('/yzb/:type?', './yzb'); -}; diff --git a/lib/routes/tju/yzb/index.ts b/lib/routes/tju/yzb/index.ts index 9552d9436..013fdc0d1 100644 --- a/lib/routes/tju/yzb/index.ts +++ b/lib/routes/tju/yzb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,28 @@ const pageType = (href) => { return url.hostname === 'yzb.tju.edu.cn' ? 'tju-yzb' : 'unknown'; }; -export default async (ctx) => { +export const route: Route = { + path: '/yzb/:type?', + categories: ['university'], + example: '/tju/yzb/notice', + parameters: { type: 'default `notice`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Admission Office of Graduate', + maintainers: ['SuperPung'], + handler, + description: `| School-level Notice | Master | Doctor | On-the-job Degree | + | :-----------------: | :----: | :----: | :---------------: | + | notice | master | doctor | job |`, +}; + +async function handler(ctx) { const type = ctx.params && ctx.req.param('type'); let path, subtitle; @@ -57,7 +79,7 @@ export default async (ctx) => { } if (response === null) { - ctx.set('data', { + return { title: '天津大学研究生招生网 - ' + subtitle, link: yzb_base_url + path, description: '链接失效' + yzb_base_url + path, @@ -68,7 +90,7 @@ export default async (ctx) => { description: `<h2>请到<a href=${repo_url}>此处</a>提交Issue</h2>`, }, ], - }); + }; } else { const $ = load(iconv.decode(response.data, 'gbk')); const list = $('body > table:nth-child(3) > tbody > tr > td.table_left_right > table > tbody > tr:nth-child(3) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr') @@ -109,10 +131,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '天津大学研究生招生网 - ' + subtitle, link: yzb_base_url + path, item: items, - }); + }; } -}; +} diff --git a/lib/routes/tokeninsight/blog.ts b/lib/routes/tokeninsight/blog.ts index d1dc5cfec..112e24855 100644 --- a/lib/routes/tokeninsight/blog.ts +++ b/lib/routes/tokeninsight/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ const baseURL = 'https://www.tokeninsight.com/'; const title = 'TokenInsight'; const link = 'https://www.tokeninsight.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:lang?', + categories: ['finance'], + example: '/tokeninsight/blog/en', + parameters: { lang: 'Language, see below, Chinese by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tokeninsight.com/:lang/blogs'], + target: '/blog/:lang', + }, + name: 'Blogs', + maintainers: ['fuergaosi233'], + handler, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang') ?? 'zh'; const getBlogs = async () => { @@ -45,9 +68,9 @@ export default async (ctx) => { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30; const blogs = (await getBlogs()).slice(0, limit); const list = await Promise.all(blogs.map((element) => getBlogInfomation(element))); - ctx.set('data', { + return { title: `${lang === 'zh' ? '博客' : 'Blogs'} | ${title}`, link: `${link}${lang}/blogs`, item: list, - }); -}; + }; +} diff --git a/lib/routes/tokeninsight/bulletin.ts b/lib/routes/tokeninsight/bulletin.ts index 35d7d5ec8..af40ed8dc 100644 --- a/lib/routes/tokeninsight/bulletin.ts +++ b/lib/routes/tokeninsight/bulletin.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -12,7 +13,29 @@ const get_articles = async () => { return data; }; -export default async (ctx) => { +export const route: Route = { + path: '/bulletin/:lang?', + categories: ['finance'], + example: '/tokeninsight/bulletin/en', + parameters: { lang: 'Language, see below, Chinese by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tokeninsight.com/:lang/latest'], + target: '/bulletin/:lang', + }, + name: 'Latest', + maintainers: [], + handler, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang') ?? 'zh'; const get_article_info = async (article) => { @@ -37,9 +60,9 @@ export default async (ctx) => { const articles = await get_articles(); const list = await Promise.all(articles.map((element) => get_article_info(element))); - ctx.set('data', { + return { title: `${lang === 'zh' ? '快讯' : 'Latest'} | ${title}`, link: `${link}${lang}/latest`, item: list, - }); -}; + }; +} diff --git a/lib/routes/tokeninsight/maintainer.ts b/lib/routes/tokeninsight/maintainer.ts deleted file mode 100644 index 4086162a5..000000000 --- a/lib/routes/tokeninsight/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/blog/:lang?': ['fuergaosi233'], - '/bulletin:lang?': ['fuergaosi233'], - '/report:lang?': ['fuergaosi233'], -}; diff --git a/lib/routes/tokeninsight/namespace.ts b/lib/routes/tokeninsight/namespace.ts new file mode 100644 index 000000000..b8a9eec04 --- /dev/null +++ b/lib/routes/tokeninsight/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TokenInsight', + url: 'tokeninsight.com', + description: `:::tip +TokenInsight also provides official RSS, you can take a look at [https://api.tokeninsight.com/reference/rss](https://api.tokeninsight.com/reference/rss). +:::`, +}; diff --git a/lib/routes/tokeninsight/radar.ts b/lib/routes/tokeninsight/radar.ts deleted file mode 100644 index 6efd1132e..000000000 --- a/lib/routes/tokeninsight/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'tokeninsight.com': { - _name: 'TokenInsight', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/new-media#tokeninsight', - source: ['/:lang/blogs'], - target: '/tokeninsight/blog/:lang', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/new-media#tokeninsight', - source: ['/:lang/latest'], - target: '/tokeninsight/bulletin/:lang', - }, - { - title: '报告', - docs: 'https://docs.rsshub.app/routes/new-media#tokeninsight', - source: ['/:lang/report'], - target: '/tokeninsight/report/:lang', - }, - ], - }, -}; diff --git a/lib/routes/tokeninsight/report.ts b/lib/routes/tokeninsight/report.ts index 3636d223e..7ba58343d 100644 --- a/lib/routes/tokeninsight/report.ts +++ b/lib/routes/tokeninsight/report.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,34 @@ const baseURL = 'https://www.tokeninsight.com/'; const title = 'TokenInsight'; const link = 'https://www.tokeninsight.com/'; -export default async (ctx) => { +export const route: Route = { + path: '/report/:lang?', + categories: ['finance'], + example: '/tokeninsight/report/en', + parameters: { lang: 'Language, see below, Chinese by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tokeninsight.com/:lang/report'], + target: '/report/:lang', + }, + name: 'Research', + maintainers: [], + handler, + description: `Language: + + | Chinese | English | + | ------- | ------- | + | zh | en |`, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang') ?? 'zh'; const getReports = async () => { @@ -45,9 +73,9 @@ export default async (ctx) => { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30; const reports = (await getReports()).slice(0, limit); const list = await Promise.all(reports.map((element) => getReportInfomation(element))); - ctx.set('data', { + return { title: `${lang === 'zh' ? '报告' : 'Research'} | ${title}`, link: `${link}${lang}/report`, item: list, - }); -}; + }; +} diff --git a/lib/routes/tokeninsight/router.ts b/lib/routes/tokeninsight/router.ts deleted file mode 100644 index 642c0de63..000000000 --- a/lib/routes/tokeninsight/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/blog/:lang?', './blog.js'); - router.get('/bulletin/:lang?', './bulletin.js'); - router.get('/report/:lang?', './report.js'); -}; diff --git a/lib/routes/tongji/bks.ts b/lib/routes/tongji/bks.ts index 7e5ae4db0..0d1547984 100644 --- a/lib/routes/tongji/bks.ts +++ b/lib/routes/tongji/bks.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/bks', + categories: ['university'], + example: '/tongji/bks', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['bksy.tongji.edu.cn/'], + }, + name: '本科生院通知公告', + maintainers: ['shiquda'], + handler, + url: 'bksy.tongji.edu.cn/', +}; + +async function handler() { const link = 'https://bksy.tongji.edu.cn/30359/list.htm'; const response = await got(link); const $ = load(response.data); const list = $('.wcts-a0018 li'); - ctx.set('data', { + return { title: '同济大学本科生院', link, description: '同济大学本科生院通知公告', @@ -26,5 +49,5 @@ export default async (ctx) => { pubDate: parseDate(date, 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/tongji/maintainer.ts b/lib/routes/tongji/maintainer.ts deleted file mode 100644 index 3a22ac414..000000000 --- a/lib/routes/tongji/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/bks': ['shiquda'], - '/sse/:type?': ['sgqy'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/tongji/namespace.ts b/lib/routes/tongji/namespace.ts new file mode 100644 index 000000000..b96d5051b --- /dev/null +++ b/lib/routes/tongji/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '同济大学', + url: 'bksy.tongji.edu.cn', +}; diff --git a/lib/routes/tongji/radar.ts b/lib/routes/tongji/radar.ts deleted file mode 100644 index 5068ca7b3..000000000 --- a/lib/routes/tongji/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'tongji.edu.cn': { - _name: '同济大学', - bksy: [ - { - title: '本科生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#tong-ji-da-xue', - source: ['/'], - target: '/tongji/bks', - }, - ], - sse: [ - { - title: '软件学院通知', - docs: 'https://docs.rsshub.app/routes/university#tong-ji-da-xue', - source: ['/xxzx/xytz/:type', '/xxzx/:type', '/'], - target: (params) => `/tongji/sse${params.type ? `/${params.type.replace('.htm', '')}` : ''}`, - }, - ], - yz: [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#tong-ji-da-xue', - source: ['/zsxw/ggtz.htm', '/'], - target: '/tongji/yjs', - }, - ], - }, -}; diff --git a/lib/routes/tongji/router.ts b/lib/routes/tongji/router.ts deleted file mode 100644 index ac7b8624d..000000000 --- a/lib/routes/tongji/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/bks', './bks'); - router.get('/sse/:type?', './sse/notice'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/tongji/sse/notice.ts b/lib/routes/tongji/sse/notice.ts index 945e22dcc..920441bba 100644 --- a/lib/routes/tongji/sse/notice.ts +++ b/lib/routes/tongji/sse/notice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // Warning: The author still knows nothing about javascript! @@ -9,7 +10,30 @@ import { load } from 'cheerio'; // html parser import getArticle from './_article'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/sse/:type?', + categories: ['university'], + example: '/tongji/sse/xytz', + parameters: { type: '通知类型,默认为 `xytz`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '软件学院通知', + maintainers: ['sgqy'], + handler, + description: `| 本科生通知 | 研究生通知 | 教工通知 | 全体通知 | 学院通知 | 学院新闻 | 学院活动 | + | ---------- | ---------- | -------- | -------- | -------- | -------- | -------- | + | bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd | + + 注意: \`qttz\` 与 \`xytz\` 在原网站等价.`, +}; + +async function handler(ctx) { const baseUrl = 'https://sse.tongji.edu.cn'; const type = ctx.req.param('type') || 'xytz'; const subType = ['bkstz', 'yjstz', 'jgtz', 'qttz']; @@ -39,9 +63,9 @@ export default async (ctx) => { const articleList = await Promise.all(detailUrls.map((item) => cache.tryGet(item.link, () => getArticle(item)))); // feed the data - ctx.set('data', { + return { title: '同济大学软件学院', link: listUrl, item: articleList, - }); -}; + }; +} diff --git a/lib/routes/tongji/yjs.ts b/lib/routes/tongji/yjs.ts index 753172aef..a26108341 100644 --- a/lib/routes/tongji/yjs.ts +++ b/lib/routes/tongji/yjs.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/tongji/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yz.tongji.edu.cn/zsxw/ggtz.htm', 'yz.tongji.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'yz.tongji.edu.cn/zsxw/ggtz.htm', +}; + +async function handler() { const link = 'https://yz.tongji.edu.cn/zsxw/ggtz.htm'; const response = await got(link); const $ = load(response.data); const list = $('.list_main_content li'); - ctx.set('data', { + return { title: '同济大学研究生院', link, description: '同济大学研究生院通知公告', @@ -23,5 +46,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('span').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/tongli/maintainer.ts b/lib/routes/tongli/maintainer.ts deleted file mode 100644 index 6f11dc3ba..000000000 --- a/lib/routes/tongli/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type': ['CokeMine'], -}; diff --git a/lib/routes/tongli/namespace.ts b/lib/routes/tongli/namespace.ts new file mode 100644 index 000000000..659eef189 --- /dev/null +++ b/lib/routes/tongli/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '東立出版社', + url: 'tongli.com.tw', +}; diff --git a/lib/routes/tongli/news.ts b/lib/routes/tongli/news.ts index 339663ea1..da9072b13 100644 --- a/lib/routes/tongli/news.ts +++ b/lib/routes/tongli/news.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import * as cheerio from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type', + categories: ['reading'], + example: '/tongli/news/6', + parameters: { type: '分類,可以在“新聞”鏈接中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞', + maintainers: ['CokeMine'], + handler, +}; + +async function handler(ctx) { const { type } = ctx.req.param(); const baseURL = 'https://www.tongli.com.tw/'; const url = `${baseURL}TNews_List.aspx`; @@ -48,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('.entry_title .n1').text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/tongli/radar.ts b/lib/routes/tongli/radar.ts deleted file mode 100644 index f00b2e8b1..000000000 --- a/lib/routes/tongli/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'tongli.com.tw': { - _name: '東立出版社', - '.': [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/reading#dong-li-chu-ban-she', - source: ['/TNews_List.aspx'], - target: (_param, url) => { - const searchParams = new URL(url).searchParams; - return searchParams.has('Type') ? `/tongli/news/${searchParams.get('Type')}` : null; - }, - }, - ], - }, -}; diff --git a/lib/routes/tongli/router.ts b/lib/routes/tongli/router.ts deleted file mode 100644 index a8049677b..000000000 --- a/lib/routes/tongli/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type', '/news'); -}; diff --git a/lib/routes/toodaylab/index.ts b/lib/routes/toodaylab/index.ts index 9a7c328a0..09f770350 100644 --- a/lib/routes/toodaylab/index.ts +++ b/lib/routes/toodaylab/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:params{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { params = 'posts' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -85,7 +93,7 @@ export default async (ctx) => { const title = $('title').text().split(/\s-/)[0]; const icon = $('link[rel="apple-touch-icon"]').last().prop('href'); - ctx.set('data', { + return { item: items, title: isHot ? title.replace(/[^|]+/, '最热 ') : title, link: currentUrl, @@ -96,5 +104,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[name="keywords"]').prop('content'), author: $('h3.logo a img').prop('alt'), - }); -}; + }; +} diff --git a/lib/routes/toodaylab/maintainer.ts b/lib/routes/toodaylab/maintainer.ts deleted file mode 100644 index 9c328e103..000000000 --- a/lib/routes/toodaylab/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/column/:id': ['nczitzk'], - '/field/:id': ['nczitzk'], - '/hot': ['nczitzk'], - '/posts': ['nczitzk'], - '/topic/:id': ['nczitzk'], -}; diff --git a/lib/routes/toodaylab/namespace.ts b/lib/routes/toodaylab/namespace.ts new file mode 100644 index 000000000..be0d4305f --- /dev/null +++ b/lib/routes/toodaylab/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '理想生活实验室', + url: 'toodaylab.com', +}; diff --git a/lib/routes/toodaylab/radar.ts b/lib/routes/toodaylab/radar.ts deleted file mode 100644 index 90138ef0d..000000000 --- a/lib/routes/toodaylab/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'toodaylab.com': { - _name: '理想生活实验室', - '.': [ - { - title: '滚动', - docs: 'https://docs.rsshub.app/routes/new-media#li-xiang-sheng-huo-shi-yan-shi-gun-dong', - source: ['/posts'], - target: '/toodaylab/posts', - }, - { - title: '最热', - docs: 'https://docs.rsshub.app/routes/new-media#li-xiang-sheng-huo-shi-yan-shi-zui-re', - source: ['/posts'], - target: '/toodaylab/hot', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#li-xiang-sheng-huo-shi-yan-shi-zhuan-lan', - source: ['/column/:id'], - target: '/toodaylab/column/:id', - }, - { - title: '领域', - docs: 'https://docs.rsshub.app/routes/new-media#li-xiang-sheng-huo-shi-yan-shi-ling-yu', - source: ['/field/:id'], - target: '/toodaylab/field/:id', - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/new-media#li-xiang-sheng-huo-shi-yan-shi-hua-ti', - source: ['/topic/:id'], - target: '/toodaylab/topic/:id', - }, - ], - }, -}; diff --git a/lib/routes/toodaylab/router.ts b/lib/routes/toodaylab/router.ts deleted file mode 100644 index ba6dabf5d..000000000 --- a/lib/routes/toodaylab/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:params{.+}?', './'); -}; diff --git a/lib/routes/tophub/index.ts b/lib/routes/tophub/index.ts index 97280bb86..169014fa2 100644 --- a/lib/routes/tophub/index.ts +++ b/lib/routes/tophub/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['new-media'], + example: '/tophub/Om4ejxvxEN', + parameters: { id: '榜单id,可在 URL 中找到' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tophub.today/n/:id'], + }, + name: '榜单', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://tophub.today/n/${id}`; @@ -26,9 +48,9 @@ export default async (ctx) => { return info; }); - ctx.set('data', { + return { title, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/tophub/list.ts b/lib/routes/tophub/list.ts index db272cb60..7853f97c3 100644 --- a/lib/routes/tophub/list.ts +++ b/lib/routes/tophub/list.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,31 @@ import { config } from '@/config'; import * as path from 'node:path'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:id', + categories: ['new-media'], + example: '/tophub/list/Om4ejxvxEN', + parameters: { id: '榜单id,可在 URL 中找到' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tophub.today/n/:id'], + }, + name: '榜单列表', + maintainers: ['akynazh'], + handler, + description: `:::tip +将榜单条目集合到一个列表中,可避免推送大量条目,更符合阅读习惯且有热度排序,推荐使用。 +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://tophub.today/n/${id}`; const response = await got.get(link, { @@ -28,7 +53,7 @@ export default async (ctx) => { const combinedTitles = items.map((item) => item.title).join(''); const renderRank = art(path.join(__dirname, 'templates/rank.art'), { items }); - ctx.set('data', { + return { title, link, item: [ @@ -39,5 +64,5 @@ export default async (ctx) => { guid: combinedTitles, }, ], - }); -}; + }; +} diff --git a/lib/routes/tophub/maintainer.ts b/lib/routes/tophub/maintainer.ts deleted file mode 100644 index d594e7237..000000000 --- a/lib/routes/tophub/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:id': ['LogicJake'], - '/list/:id': ['akynazh'], -}; diff --git a/lib/routes/tophub/namespace.ts b/lib/routes/tophub/namespace.ts new file mode 100644 index 000000000..02f7a7086 --- /dev/null +++ b/lib/routes/tophub/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '今日热榜', + url: 'tophub.today', + description: `:::warning +由于需要登录后的 Cookie 值才能获取原始链接,所以需要自建,需要在环境变量中配置 \`TOPHUB_COOKIE\`,详情见部署页面的配置模块。 +:::`, +}; diff --git a/lib/routes/tophub/radar.ts b/lib/routes/tophub/radar.ts deleted file mode 100644 index f0b2b5b78..000000000 --- a/lib/routes/tophub/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'tophub.today': { - _name: '今日热榜', - '.': [ - { - title: '榜单', - docs: 'https://docs.rsshub.app/routes/new-media#jin-ri-re-bang-bang-dan', - source: ['/n/:id'], - target: '/tophub/:id', - }, - { - title: '榜单列表', - docs: 'https://docs.rsshub.app/routes/new-media#jin-ri-re-bang-bang-dan-lie-biao', - source: ['/n/:id'], - target: '/tophub/list/:id', - }, - ], - }, -}; diff --git a/lib/routes/tophub/router.ts b/lib/routes/tophub/router.ts deleted file mode 100644 index 143f5d833..000000000 --- a/lib/routes/tophub/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:id', './'); - router.get('/list/:id', './list'); -}; diff --git a/lib/routes/topys/index.ts b/lib/routes/topys/index.ts index f9f6d1968..9bf1a21ff 100644 --- a/lib/routes/topys/index.ts +++ b/lib/routes/topys/index.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:keyword?', + categories: ['new-media'], + example: '/topys', + parameters: { keyword: '关键字,可在对应结果页的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['topys.cn/search/:keyword', 'topys.cn/'], + }, + name: '关键字', + maintainers: ['nczitzk'], + handler, + description: `| 创意 | 设计 | 商业 | 艺术 | 文化 | 科技 | + | ---- | ---- | ---- | ---- | ---- | ---- |`, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword') ?? ''; const rootUrl = 'https://www.topys.cn'; @@ -59,9 +83,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${keyword ? `${keyword} - ` : ''}TOPYS`, link: keyword ? currentUrl : `${rootUrl}/pick`, item: items, - }); -}; + }; +} diff --git a/lib/routes/topys/maintainer.ts b/lib/routes/topys/maintainer.ts deleted file mode 100644 index 31525f87e..000000000 --- a/lib/routes/topys/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:keyword?': ['nczitzk'], -}; diff --git a/lib/routes/topys/namespace.ts b/lib/routes/topys/namespace.ts new file mode 100644 index 000000000..64869c7be --- /dev/null +++ b/lib/routes/topys/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TOPYS', + url: 'topys.cn', +}; diff --git a/lib/routes/topys/radar.ts b/lib/routes/topys/radar.ts deleted file mode 100644 index 01157742b..000000000 --- a/lib/routes/topys/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'topys.cn': { - _name: 'TOPYS', - '.': [ - { - title: '关键字', - docs: 'https://docs.rsshub.app/routes/new-media#topys-guan-jian-zi', - source: ['/search/:keyword', '/'], - target: '/topys/:keyword?', - }, - ], - }, -}; diff --git a/lib/routes/topys/router.ts b/lib/routes/topys/router.ts deleted file mode 100644 index 4d1097162..000000000 --- a/lib/routes/topys/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:keyword?', './index'); -}; diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index 420094973..61acfa12b 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,14 @@ import asyncPool from 'tiny-async-pool'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'en' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 22; @@ -94,7 +102,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -103,5 +111,5 @@ export default async (ctx) => { icon, logo: icon, subtitle: $('h1.site-title').text(), - }); -}; + }; +} diff --git a/lib/routes/tradingview/desktop.ts b/lib/routes/tradingview/desktop.ts index 5f1d0d3db..96d913d9b 100644 --- a/lib/routes/tradingview/desktop.ts +++ b/lib/routes/tradingview/desktop.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/desktop', + categories: ['program-update'], + example: '/tradingview/desktop', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tradingview.com/support/solutions/43000673888-tradingview-desktop-releases-and-release-notes/'], + }, + name: 'Desktop releases and release notes', + maintainers: ['nczitzk'], + handler, + url: 'tradingview.com/support/solutions/43000673888-tradingview-desktop-releases-and-release-notes/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const rootUrl = 'https://www.tradingview.com'; @@ -47,7 +70,7 @@ export default async (ctx) => { const titleSplits = title.split(/—/); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -57,5 +80,5 @@ export default async (ctx) => { logo: icon, subtitle: titleSplits[0], author: titleSplits.pop(), - }); -}; + }; +} diff --git a/lib/routes/tradingview/maintainer.ts b/lib/routes/tradingview/maintainer.ts deleted file mode 100644 index d2b239601..000000000 --- a/lib/routes/tradingview/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/blog/:language?/category/:category?': ['nczitzk'], - '/desktop': ['nczitzk'], -}; diff --git a/lib/routes/tradingview/namespace.ts b/lib/routes/tradingview/namespace.ts new file mode 100644 index 000000000..11db94dd4 --- /dev/null +++ b/lib/routes/tradingview/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TradingView', + url: 'tradingview.com', +}; diff --git a/lib/routes/tradingview/pine.ts b/lib/routes/tradingview/pine.ts index 507aa32a7..a332a7196 100644 --- a/lib/routes/tradingview/pine.ts +++ b/lib/routes/tradingview/pine.ts @@ -1,8 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/pine/:version?', + radar: { + source: ['tradingview.com/pine-script-docs/en/:version/Release_notes.html'], + target: '/pine/:version', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { version = 'v5' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -41,7 +53,7 @@ export default async (ctx) => { const image = new URL('_images/Pine_Script_logo.svg', currentUrl).href; const icon = new URL('favicon.ico', rootUrl).href; - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, @@ -50,5 +62,5 @@ export default async (ctx) => { image, icon, logo: icon, - }); -}; + }; +} diff --git a/lib/routes/tradingview/radar.ts b/lib/routes/tradingview/radar.ts deleted file mode 100644 index 679a32e50..000000000 --- a/lib/routes/tradingview/radar.ts +++ /dev/null @@ -1,109 +0,0 @@ -export default { - 'tradingview.com': { - _name: 'TradingView', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/'], - target: '/tradingview/blog/:language/', - }, - { - title: 'Blog - Alerts', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/alerts/'], - target: '/tradingview/blog/:language/category/alerts', - }, - { - title: 'Blog - Bitcoin and Crypto', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/bitcoin-charts/'], - target: '/tradingview/blog/:language/category/bitcoin-charts', - }, - { - title: 'Blog - Business Updates', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/business-updates/'], - target: '/tradingview/blog/:language/category/business-updates', - }, - { - title: 'Blog - Charting', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/charts/'], - target: '/tradingview/blog/:language/category/charts', - }, - { - title: 'Blog - Charting Library', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/charting-library/'], - target: '/tradingview/blog/:language/category/charting-library', - }, - { - title: 'Blog - Data Feeds and Exchanges', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/data-feeds-exchanges/'], - target: '/tradingview/blog/:language/category/data-feeds-exchanges', - }, - { - title: 'Blog - Desktop', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/desktop/'], - target: '/tradingview/blog/:language/category/desktop', - }, - { - title: 'Blog - Market Analysis', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/market-analysis/'], - target: '/tradingview/blog/:language/category/market-analysis', - }, - { - title: 'Blog - Mobile', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/mobile/'], - target: '/tradingview/blog/:language/category/mobile', - }, - { - title: 'Blog - Pine Script®', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/pine/'], - target: '/tradingview/blog/:language/category/pine', - }, - { - title: 'Blog - Screener', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/stock-screener/'], - target: '/tradingview/blog/:language/category/stock-screener', - }, - { - title: 'Blog - Social', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/social/'], - target: '/tradingview/blog/:language/category/social', - }, - { - title: 'Blog - Trading and Brokerage', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/trading/'], - target: '/tradingview/blog/:language/category/trading', - }, - { - title: 'Blog - Widgets', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-blog', - source: ['/blog/:language/category/widgets/'], - target: '/tradingview/blog/:language/category/widgets', - }, - { - title: 'Desktop releases and release notes', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-desktop-releases-and-release-notes', - source: ['/support/solutions/43000673888-tradingview-desktop-releases-and-release-notes/'], - target: '/tradingview/desktop', - }, - { - title: 'Pine Script™ Release notes', - docs: 'https://docs.rsshub.app/routes/program-update#tradingview-pine-script%E2%84%A2-release-notes', - source: ['/pine-script-docs/en/:version/Release_notes.html'], - target: '/tradingview/pine/:version', - }, - ], - }, -}; diff --git a/lib/routes/tradingview/router.ts b/lib/routes/tradingview/router.ts deleted file mode 100644 index f0055be50..000000000 --- a/lib/routes/tradingview/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/blog/:category{.+}?', './blog'); - router.get('/desktop', './desktop'); - router.get('/pine/:version?', './pine'); -}; diff --git a/lib/routes/transcriptforest/index.ts b/lib/routes/transcriptforest/index.ts index 107eeb6b6..b212785e1 100644 --- a/lib/routes/transcriptforest/index.ts +++ b/lib/routes/transcriptforest/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -20,7 +21,19 @@ const bakeTimestamp = (seconds) => { return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`; }; -export default async (ctx) => { +export const route: Route = { + path: '/:channel?', + radar: { + source: ['www.transcriptforest.com/en/channel'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'www.transcriptforest.com/en/channel', +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -104,7 +117,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href; const author = title.split(/\|/)[0].trim(); - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -116,5 +129,5 @@ export default async (ctx) => { author, itunes_author: author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/transcriptforest/maintainer.ts b/lib/routes/transcriptforest/maintainer.ts deleted file mode 100644 index cd9ab9943..000000000 --- a/lib/routes/transcriptforest/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel?': ['nczitzk'], -}; diff --git a/lib/routes/transcriptforest/namespace.ts b/lib/routes/transcriptforest/namespace.ts new file mode 100644 index 000000000..9032fba56 --- /dev/null +++ b/lib/routes/transcriptforest/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Transcript Forest', + url: 'www.transcriptforest.com', +}; diff --git a/lib/routes/transcriptforest/radar.ts b/lib/routes/transcriptforest/radar.ts deleted file mode 100644 index 03a13b1d8..000000000 --- a/lib/routes/transcriptforest/radar.ts +++ /dev/null @@ -1,307 +0,0 @@ -export default { - 'transcriptforest.com': { - _name: 'Transcript Forest', - www: [ - { - title: 'All', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel'], - target: '/transcriptforest', - }, - { - title: 'a16z podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/a16z-podcast'], - target: '/transcriptforest/a16z-podcast', - }, - { - title: "Aarthi and Sriram's Good Time Show", - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/aarthi-and-srirams-good-time-show'], - target: '/transcriptforest/aarthi-and-srirams-good-time-show', - }, - { - title: 'Acquired', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/acquired'], - target: '/transcriptforest/acquired', - }, - { - title: 'All-In with Chamath, Jason, Sacks & Friedberg', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/all-in-with-chamath-jason-sacks-friedberg'], - target: '/transcriptforest/all-in-with-chamath-jason-sacks-friedberg', - }, - { - title: 'All the Hacks', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/all-the-hacks'], - target: '/transcriptforest/all-the-hacks', - }, - { - title: 'Breaking Points', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/breaking-points'], - target: '/transcriptforest/breaking-points', - }, - { - title: 'Cartoon Avatars', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/cartoon-avatars'], - target: '/transcriptforest/cartoon-avatars', - }, - { - title: 'Conversations With Coleman', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/conversations-with-coleman'], - target: '/transcriptforest/conversations-with-coleman', - }, - { - title: 'CSPI Podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/cspi-podcast'], - target: '/transcriptforest/cspi-podcast', - }, - { - title: 'Culpable', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/culpable'], - target: '/transcriptforest/culpable', - }, - { - title: 'Dateline NBC', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/dateline-nbc'], - target: '/transcriptforest/dateline-nbc', - }, - { - title: 'Execs', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/execs'], - target: '/transcriptforest/execs', - }, - { - title: 'Exponent', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/exponent'], - target: '/transcriptforest/exponent', - }, - { - title: 'Freakonomics', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/freakonomics'], - target: '/transcriptforest/freakonomics', - }, - { - title: 'Future of StoryTelling', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/future-of-storytelling'], - target: '/transcriptforest/future-of-storytelling', - }, - { - title: 'Gamecraft', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/gamecraft'], - target: '/transcriptforest/gamecraft', - }, - { - title: 'Get WIRED', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/get-wired'], - target: '/transcriptforest/get-wired', - }, - { - title: 'Greymatter', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/greymatter'], - target: '/transcriptforest/greymatter', - }, - { - title: 'How I built this', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/how-I-built-this'], - target: '/transcriptforest/how-I-built-this', - }, - { - title: 'Huberman Lab', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/huberman-lab'], - target: '/transcriptforest/huberman-lab', - }, - { - title: 'ICYMI', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/icymi'], - target: '/transcriptforest/icymi', - }, - { - title: 'In Machines We Trust', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/in-machines-we-trust'], - target: '/transcriptforest/in-machines-we-trust', - }, - { - title: "Invest Like the Best with Patrick O'Shaughnessy", - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/invest-like-the-best-with-patrick-o-shaughnessy'], - target: '/transcriptforest/invest-like-the-best-with-patrick-o-shaughnessy', - }, - { - title: 'Joe Rogan Experience Review podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/joe-rogan-experience-review-podcast'], - target: '/transcriptforest/joe-rogan-experience-review-podcast', - }, - { - title: 'Land of Giants', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/land-of-giants'], - target: '/transcriptforest/land-of-giants', - }, - { - title: "Lenny's Podcast: Product | Growth | Career", - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/lenny-podcast-product-growth-career'], - target: '/transcriptforest/lenny-podcast-product-growth-career', - }, - { - title: 'Lex Fridman Podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/lex-fridman-podcast'], - target: '/transcriptforest/lex-fridman-podcast', - }, - { - title: 'Making Sense with Sam Harris', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/making-sense-with-sam-harris'], - target: '/transcriptforest/making-sense-with-sam-harris', - }, - { - title: 'Masters of Scale', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/masters-of-scale'], - target: '/transcriptforest/masters-of-scale', - }, - { - title: 'Modern Wisdom', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/modern-wisdom'], - target: '/transcriptforest/modern-wisdom', - }, - { - title: 'Moment of Zen', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/moment-of-zen'], - target: '/transcriptforest/moment-of-zen', - }, - { - title: 'Morbid', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/morbid'], - target: '/transcriptforest/morbid', - }, - { - title: 'My First Million', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/my-first-million'], - target: '/transcriptforest/my-first-million', - }, - { - title: 'Naval', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/naval'], - target: '/transcriptforest/naval', - }, - { - title: 'Newcomer Podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/newcomer-podcast'], - target: '/transcriptforest/newcomer-podcast', - }, - { - title: 'Not investment advice', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/not-investment-advice'], - target: '/transcriptforest/not-investment-advice', - }, - { - title: 'Odd Lots', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/odd-lots'], - target: '/transcriptforest/odd-lots', - }, - { - title: 'On with Kara Swisher', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/on-with-kara-swisher'], - target: '/transcriptforest/on-with-kara-swisher', - }, - { - title: 'Proof: A True Crime Podcast', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/proof-a-true-crime-podcast'], - target: '/transcriptforest/proof-a-true-crime-podcast', - }, - { - title: 'Reply All', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/reply-all'], - target: '/transcriptforest/reply-all', - }, - { - title: 'Revisionist History', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/revisionist-history'], - target: '/transcriptforest/revisionist-history', - }, - { - title: 'Serial', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/serial-podcast'], - target: '/transcriptforest/serial-podcast', - }, - { - title: 'Slow Burn', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/slow-burn'], - target: '/transcriptforest/slow-burn', - }, - { - title: 'StrictlyVC Download', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/strictlyvc-download'], - target: '/transcriptforest/strictlyvc-download', - }, - { - title: 'Stuff You Should Know:', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/stuff-you-should-know'], - target: '/transcriptforest/stuff-you-should-know', - }, - { - title: 'Subversive w/Alex Kaschuta', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/subversive-w-alex-kaschuta'], - target: '/transcriptforest/subversive-w-alex-kaschuta', - }, - { - title: 'TED Radio Hour', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/ted-radio-hour'], - target: '/transcriptforest/ted-radio-hour', - }, - { - title: 'The Bootstrapped Founder', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/the-bootstrapped-founder'], - target: '/transcriptforest/the-bootstrapped-founder', - }, - { - title: 'The Boyscast with Ryan Long', - docs: 'https://docs.rsshub.app/routes/multimedia#transcript-forest', - source: ['/en/channel/the-boyscast-with-ryan-long'], - target: '/transcriptforest/the-boyscast-with-ryan-long', - }, - ], - }, -}; diff --git a/lib/routes/transcriptforest/router.ts b/lib/routes/transcriptforest/router.ts deleted file mode 100644 index 8c83b5062..000000000 --- a/lib/routes/transcriptforest/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel?', './'); -}; diff --git a/lib/routes/trending/all-trending.ts b/lib/routes/trending/all-trending.ts index 6c9ac0ebb..8bfaa312a 100644 --- a/lib/routes/trending/all-trending.ts +++ b/lib/routes/trending/all-trending.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -160,7 +161,30 @@ const createItem = ({ dateTime, data, count, newItemCount }, keywords, isToday) }; // Main -export default async (ctx) => { +export const route: Route = { + path: '/:keywords/:numberOfDays?', + categories: ['other'], + example: '/trending/唐山,打人/3', + parameters: { keywords: '通过逗号区隔的关键词列表', numberOfDays: '向前追溯的天数,默认为3天' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '关键词聚合追踪', + maintainers: ['Jkker'], + handler, + description: `追踪各大热搜榜上包含特定关键词的条目。 + +当前收录榜单:*微博热搜*、*今日头条热搜*、*知乎热搜*、*知乎热门视频*、*知乎热门话题*。 + +数据源: [trending-in-one](https://github.com/huqi-pr/trending-in-one)`, +}; + +async function handler(ctx) { // Prevent making over 100 requests per invocation if (ctx.req.param('numberOfDays') > 14) { throw new Error('days must be less than 14'); @@ -194,10 +218,10 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: `${keywordStr} | 热点聚合`, description: `${keywordStr} | 今日头条热搜,知乎热门视频,知乎热搜榜,知乎热门话题,微博热搜榜聚合追踪`, language: 'zh-cn', item, - }); -}; + }; +} diff --git a/lib/routes/trending/maintainer.ts b/lib/routes/trending/maintainer.ts deleted file mode 100644 index 63059f3c5..000000000 --- a/lib/routes/trending/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:keywords/:numberOfDays?': ['Jkker'], -}; diff --git a/lib/routes/trending/namespace.ts b/lib/routes/trending/namespace.ts new file mode 100644 index 000000000..f2bd9447d --- /dev/null +++ b/lib/routes/trending/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '热搜聚合', + url: 'so.toutiao.com', +}; diff --git a/lib/routes/trending/radar.ts b/lib/routes/trending/radar.ts deleted file mode 100644 index 9c3baeb58..000000000 --- a/lib/routes/trending/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'toutiao.com': { - _name: '今日头条', - so: [ - { - title: '热搜关键词聚合追踪', - docs: 'https://docs.rsshub.app/routes/social-media#re-sou-ju-he', - source: ['/search'], - target: (params, url) => `/trending/${new URL(url).searchParams.get('keyword')}`, - }, - ], - }, - 'weibo.com': { - _name: '微博', - s: [ - { - title: '热搜关键词聚合追踪', - docs: 'https://docs.rsshub.app/routes/social-media#re-sou-ju-he', - source: '/weibo/:keyword', - target: (params) => `/trending/${params.keyword}}`, - }, - ], - }, - 'zhihu.com': { - _name: '知乎', - www: [ - { - title: '热搜关键词聚合追踪', - docs: 'https://docs.rsshub.app/routes/social-media#re-sou-ju-he', - source: ['/search'], - target: (params, url) => `/trending/${new URL(url).searchParams.get('q')}`, - }, - ], - }, -}; diff --git a/lib/routes/trending/router.ts b/lib/routes/trending/router.ts deleted file mode 100644 index bbc9d99de..000000000 --- a/lib/routes/trending/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:keywords/:numberOfDays?', './all-trending'); -}; diff --git a/lib/routes/trendingpapers/maintainer.ts b/lib/routes/trendingpapers/maintainer.ts deleted file mode 100644 index ec94d3016..000000000 --- a/lib/routes/trendingpapers/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/papers/:category?/:time?/:cited?': ['CookiePieWw'], -}; diff --git a/lib/routes/trendingpapers/namespace.ts b/lib/routes/trendingpapers/namespace.ts new file mode 100644 index 000000000..4ad41558c --- /dev/null +++ b/lib/routes/trendingpapers/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Trending Papers', + url: 'trendingpapers.com', +}; diff --git a/lib/routes/trendingpapers/papers.ts b/lib/routes/trendingpapers/papers.ts index 1dfd553d2..1c0c8de2f 100644 --- a/lib/routes/trendingpapers/papers.ts +++ b/lib/routes/trendingpapers/papers.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/papers/:category?/:time?/:cited?', + categories: ['journal'], + example: '/trendingpapers/papers', + parameters: { + category: 'Category of papers, can be found in URL. `All categories` by default.', + time: 'Time like `24 hours` to specify the duration of ranking, can be found in URL. `Since beginning` by default.', + cited: 'Cited or uncited papers, can be found in URL. `Cited and uncited papers` by default.', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Trending Papers on arXiv', + maintainers: ['CookiePieWw'], + handler, +}; + +async function handler(ctx) { const { time = 'Since beginning', cited = 'Cited and uncited papers', category = 'All categories' } = ctx.req.param(); const rootUrl = 'https://trendingpapers.com'; @@ -33,9 +56,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Trending Papers on arXiv.org | ${category} | ${time} | ${cited} | `, link: currentUrl, item: papers, - }); -}; + }; +} diff --git a/lib/routes/trendingpapers/radar.ts b/lib/routes/trendingpapers/radar.ts deleted file mode 100644 index 51693745d..000000000 --- a/lib/routes/trendingpapers/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'trendingpapers.com': { - _name: 'trendingpapers', - '.': [ - { - title: 'Trending Papers on arXiv', - docs: 'https://docs.rsshub.app/routes/journal#trending-papers-trending-papers-on-arxiv', - }, - ], - }, -}; diff --git a/lib/routes/trendingpapers/router.ts b/lib/routes/trendingpapers/router.ts deleted file mode 100644 index fc53d7c67..000000000 --- a/lib/routes/trendingpapers/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/papers/:category?/:time?/:cited?', './papers.js'); -}; diff --git a/lib/routes/tribalfootball/latest.ts b/lib/routes/tribalfootball/latest.ts index d7a1dca04..e915f9c67 100644 --- a/lib/routes/tribalfootball/latest.ts +++ b/lib/routes/tribalfootball/latest.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,19 @@ import { parseDate } from '@/utils/parse-date'; const rssUrl = 'https://www.tribalfootball.com/rss/mediafed/general/rss.xml'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['tribalfootball.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['Rongronggg9'], + handler, + url: 'tribalfootball.com/', +}; + +async function handler() { const rss = await got(rssUrl); const $ = load(rss.data, { xmlMode: true }); const items = $('rss > channel > item') @@ -62,11 +75,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Tribal Football - Latest', description: 'Tribal Football - Football News, Soccer News, Transfers & Rumours', link: 'https://www.tribalfootball.com/articles', image: 'https://www.tribalfootball.com/images/tribal-logo-rss.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/tribalfootball/maintainer.ts b/lib/routes/tribalfootball/maintainer.ts deleted file mode 100644 index 294d9ed62..000000000 --- a/lib/routes/tribalfootball/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['Rongronggg9'], -}; diff --git a/lib/routes/tribalfootball/namespace.ts b/lib/routes/tribalfootball/namespace.ts new file mode 100644 index 000000000..286245e7d --- /dev/null +++ b/lib/routes/tribalfootball/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Tribal Football', + url: 'tribalfootball.com', +}; diff --git a/lib/routes/tribalfootball/radar.ts b/lib/routes/tribalfootball/radar.ts deleted file mode 100644 index 15f5decd1..000000000 --- a/lib/routes/tribalfootball/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tribalfootball.com': { - _name: 'Tribal Football', - '.': [ - { - title: 'Latest News', - docs: 'https://docs.rsshub.app/routes/new-media#tribal-football', - source: ['/'], - target: '/tribalfootball', - }, - ], - }, -}; diff --git a/lib/routes/tribalfootball/router.ts b/lib/routes/tribalfootball/router.ts deleted file mode 100644 index e1279c909..000000000 --- a/lib/routes/tribalfootball/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './latest'); -}; diff --git a/lib/routes/trow/maintainer.ts b/lib/routes/trow/maintainer.ts deleted file mode 100644 index 1aa1700ee..000000000 --- a/lib/routes/trow/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/portal': ['shiningdracon'], -}; diff --git a/lib/routes/trow/namespace.ts b/lib/routes/trow/namespace.ts new file mode 100644 index 000000000..6440b6891 --- /dev/null +++ b/lib/routes/trow/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Ring of Wonder', + url: 'trow.cc', +}; diff --git a/lib/routes/trow/portal.ts b/lib/routes/trow/portal.ts index edeb3796a..06ce86bf1 100644 --- a/lib/routes/trow/portal.ts +++ b/lib/routes/trow/portal.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/portal', + categories: ['bbs'], + example: '/trow/portal', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['trow.cc/'], + }, + name: '首页更新', + maintainers: ['shiningdracon'], + handler, + url: 'trow.cc/', +}; + +async function handler() { let data; const response = await got.extend({ followRedirect: false }).get({ url: `https://trow.cc`, @@ -23,7 +46,7 @@ export default async (ctx) => { const $ = load(data); const list = $('#portal_content .borderwrap[style="display:show"]'); - ctx.set('data', { + return { title: `The Ring of Wonder - Portal`, link: `https://trow.cc`, description: `The Ring of Wonder 首页更新`, @@ -42,5 +65,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/trow/radar.ts b/lib/routes/trow/radar.ts deleted file mode 100644 index d1378f881..000000000 --- a/lib/routes/trow/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'trow.cc': { - _name: 'The Ring of Wonder', - '.': [ - { - title: '首页更新', - docs: 'https://docs.rsshub.app/routes/bbs#the-ring-of-wonder', - source: ['/'], - target: '/portal', - }, - ], - }, -}; diff --git a/lib/routes/trow/router.ts b/lib/routes/trow/router.ts deleted file mode 100644 index 1d18dbbab..000000000 --- a/lib/routes/trow/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/portal', './portal'); -}; diff --git a/lib/routes/tvb/maintainer.ts b/lib/routes/tvb/maintainer.ts deleted file mode 100644 index bb19c9cd8..000000000 --- a/lib/routes/tvb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:category?/:language?': ['nczitzk'], -}; diff --git a/lib/routes/tvb/namespace.ts b/lib/routes/tvb/namespace.ts new file mode 100644 index 000000000..f7cbc339f --- /dev/null +++ b/lib/routes/tvb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '无线新闻', + url: 'tvb.com', +}; diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.ts index 858565dba..66b7d7cdb 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -45,7 +46,39 @@ const titles = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?/:language?', + categories: ['traditional-media'], + example: '/tvb/news', + parameters: { category: '分类,见下表,默认为要聞', language: '语言,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['tvb.com/:language/:category', 'tvb.com/'], + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + description: `分类 + + | 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 | + | ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- | + | focus | instant | local | greaterchina | world | finance | sports | parliament | weather | + + 语言 + + | 繁 | 简 | + | -- | -- | + | tc | sc |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'focus'; const language = ctx.req.param('language') ?? 'tc'; @@ -75,9 +108,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `${response.data.meta.title} - ${titles[category][language]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/tvb/radar.ts b/lib/routes/tvb/radar.ts deleted file mode 100644 index 03b285aea..000000000 --- a/lib/routes/tvb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tvb.com': { - _name: '无线新闻', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#wu-xian-xin-wen-xin-wen', - source: ['/:language/:category', '/'], - target: '/tvb/news/:category?/:language?', - }, - ], - }, -}; diff --git a/lib/routes/tvb/router.ts b/lib/routes/tvb/router.ts deleted file mode 100644 index 9e60a8705..000000000 --- a/lib/routes/tvb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:category?/:language?', './news'); -}; diff --git a/lib/routes/tvtropes/featured.ts b/lib/routes/tvtropes/featured.ts index 4cd1dec79..0a0621d00 100644 --- a/lib/routes/tvtropes/featured.ts +++ b/lib/routes/tvtropes/featured.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,28 @@ const categories = { newest: 'right', }; -export default async (ctx) => { +export const route: Route = { + path: '/featured/:category?', + categories: ['other'], + example: '/tvtropes/featured/today', + parameters: { category: "Category, see below, Today's Featured Trope by default" }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Featured', + maintainers: ['nczitzk'], + handler, + description: `| Today's Featured Trope | Newest Trope | + | ---------------------- | ------------ | + | today | newest |`, +}; + +async function handler(ctx) { const { category = 'today' } = ctx.req.param(); const rootUrl = 'https://tvtropes.org'; @@ -60,7 +82,7 @@ export default async (ctx) => { const image = new URL($('img.logo-big').prop('src'), rootUrl).href; const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `${$('title').text()} - ${item.find('span.box-title').text()}`, link: rootUrl, @@ -72,5 +94,5 @@ export default async (ctx) => { subtitle: $('meta[property="og:title"]').prop('content'), author: $('meta[property="og:site_name"]').prop('content'), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/tvtropes/maintainer.ts b/lib/routes/tvtropes/maintainer.ts deleted file mode 100644 index 7b86a6a89..000000000 --- a/lib/routes/tvtropes/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/featured/:category?': ['nczitzk'], -}; diff --git a/lib/routes/tvtropes/namespace.ts b/lib/routes/tvtropes/namespace.ts new file mode 100644 index 000000000..a10ee1e5e --- /dev/null +++ b/lib/routes/tvtropes/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'TV Tropes', + url: 'tvtropes.org', +}; diff --git a/lib/routes/tvtropes/radar.ts b/lib/routes/tvtropes/radar.ts deleted file mode 100644 index 25f5e348a..000000000 --- a/lib/routes/tvtropes/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'tvtropes.org': { - _name: 'TV Tropes', - '.': [ - { - title: "Featured - Today's Featured Trope", - docs: 'https://docs.rsshub.app/routes/other#tvtropes-featured', - source: ['/'], - target: '/tvtropes/featured/today', - }, - { - title: 'Featured - Newest Trope', - docs: 'https://docs.rsshub.app/routes/other#tvtropes-featured', - source: ['/'], - target: '/tvtropes/featured/newest', - }, - ], - }, -}; diff --git a/lib/routes/tvtropes/router.ts b/lib/routes/tvtropes/router.ts deleted file mode 100644 index 676e3be26..000000000 --- a/lib/routes/tvtropes/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/featured/:category?', './featured'); -}; diff --git a/lib/routes/twitch/live.ts b/lib/routes/twitch/live.ts index ba62e95b5..53edae709 100644 --- a/lib/routes/twitch/live.ts +++ b/lib/routes/twitch/live.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; // https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/twitch.py#L286 const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko'; -export default async (ctx) => { +export const route: Route = { + path: '/live/:login', + categories: ['live'], + example: '/twitch/live/riotgames', + parameters: { login: 'Twitch username' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Live', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const login = ctx.req.param('login'); const response = await got({ @@ -79,10 +98,10 @@ export default async (ctx) => { }); } - ctx.set('data', { + return { title: `Twitch - ${displayName} - Live`, link: `https://www.twitch.tv/${login}`, item: liveItem, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/twitch/maintainer.ts b/lib/routes/twitch/maintainer.ts deleted file mode 100644 index 10da3f2b7..000000000 --- a/lib/routes/twitch/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/live/:login': ['hoilc'], - '/video/:login/:filter?': ['hoilc'], - '/schedule/:login': ['hoilc'], -}; diff --git a/lib/routes/twitch/namespace.ts b/lib/routes/twitch/namespace.ts new file mode 100644 index 000000000..06d66837e --- /dev/null +++ b/lib/routes/twitch/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Twitch', + url: 'www.twitch.tv', +}; diff --git a/lib/routes/twitch/radar.ts b/lib/routes/twitch/radar.ts deleted file mode 100644 index ac078a4e6..000000000 --- a/lib/routes/twitch/radar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - 'twitch.tv': { - _name: 'Twitch', - www: [ - { - title: 'Live', - docs: 'https://docs.rsshub.app/routes/live#twitch-live', - source: '/:login', - target: (params) => { - if ( - params.login !== 'directory' && - params.login !== 'downloads' && - params.login !== 'store' && - params.login !== 'turbo' && - params.login !== 'search' && - params.login !== 'subscriptions' && - params.login !== 'wallet' - ) { - return '/twitch/live/:login'; - } - }, - }, - { - title: 'Channel Video', - docs: 'https://docs.rsshub.app/routes/live#twitch-channel-video', - source: '/:login/videos', - target: '/twitch/video/:login', - }, - { - title: 'Stream Schedule', - docs: 'https://docs.rsshub.app/routes/live#twitch-stream-schedule', - source: '/:login/schedule', - target: '/twitch/schedule/:login', - }, - ], - }, -}; diff --git a/lib/routes/twitch/router.ts b/lib/routes/twitch/router.ts deleted file mode 100644 index a03a61f4d..000000000 --- a/lib/routes/twitch/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/live/:login', './live'); - router.get('/video/:login/:filter?', './video'); - router.get('/schedule/:login', './schedule'); -}; diff --git a/lib/routes/twitch/schedule.ts b/lib/routes/twitch/schedule.ts index 2fd170511..69ccd90e7 100644 --- a/lib/routes/twitch/schedule.ts +++ b/lib/routes/twitch/schedule.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/twitch.py#L286 const TWITCH_CLIENT_ID = 'kimne78kx3ncx6brgo4mv6wki5h1ko'; -export default async (ctx) => { +export const route: Route = { + path: '/schedule/:login', + categories: ['live'], + example: '/twitch/schedule/riotgames', + parameters: { login: 'Twitch username' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.twitch.tv/:login/schedule'], + }, + name: 'Stream Schedule', + maintainers: ['hoilc'], + handler, +}; + +async function handler(ctx) { const login = ctx.req.param('login'); const today = new Date(); @@ -67,10 +89,10 @@ export default async (ctx) => { category: item.categories.map((item) => item.name), })); - ctx.set('data', { + return { title: `Twitch - ${displayName} - Schedule`, link: `https://www.twitch.tv/${login}`, item: out, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/twitch/video.ts b/lib/routes/twitch/video.ts index c434da3ec..e3a052ea4 100644 --- a/lib/routes/twitch/video.ts +++ b/lib/routes/twitch/video.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -10,7 +11,32 @@ const FILTER_NODE_TYPE_MAP = { all: 'ALL_VIDEOS', }; -export default async (ctx) => { +export const route: Route = { + path: '/video/:login/:filter?', + categories: ['live'], + example: '/twitch/video/riotgames/highlights', + parameters: { login: 'Twitch username', filter: 'Video type, Default to all' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.twitch.tv/:login/videos'], + target: '/video/:login', + }, + name: 'Channel Video', + maintainers: ['hoilc'], + handler, + description: `| archive | highlights | all | +| ----------------- | ----------------------------- | ---------- | +| Recent broadcasts | Recent highlights and uploads | All videos |`, +}; + +async function handler(ctx) { const login = ctx.req.param('login'); const filter = ctx.req.param('filter')?.toLowerCase() || 'all'; if (!FILTER_NODE_TYPE_MAP[filter]) { @@ -63,9 +89,9 @@ export default async (ctx) => { category: item.game && [item.game.displayName], // item.game may be null })); - ctx.set('data', { + return { title: `Twitch - ${displayName} - ${videoShelvesEdge.node.title}`, link: `https://www.twitch.tv/${login}`, item: out, - }); -}; + }; +} diff --git a/lib/routes/twitter/collection.ts b/lib/routes/twitter/collection.ts index 6f4cd3b7d..451cecc85 100644 --- a/lib/routes/twitter/collection.ts +++ b/lib/routes/twitter/collection.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; import { config } from '@/config'; const T = {}; import { TwitterApi } from 'twitter-api-v2'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:uid/:collectionId/:routeParams?', + categories: ['social-media'], + example: '/twitter/collection/DIYgod/1527857429467172864', + parameters: { uid: 'username, should match the generated token', collectionId: 'collection ID, can be found in URL', routeParams: 'extra parameters, see the table above' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Collection', + maintainers: ['TonyRL'], + handler, + description: `:::warning + This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const collectionId = ctx.req.param('collectionId'); const cookie = config.twitter.tokens[uid]; @@ -37,7 +59,7 @@ export default async (ctx) => { } } - ctx.set('data', { + return { title: data.objects.timelines[id].name, description: data.objects.timelines[id].description, link: data.objects.timelines[id].collection_url, @@ -51,5 +73,5 @@ export default async (ctx) => { showAuthorInDesc: fallback(undefined, queryToBoolean(routeParams.get('showAuthorInDesc')), true), } ), - }); -}; + }; +} diff --git a/lib/routes/twitter/developer-api/search.ts b/lib/routes/twitter/developer-api/search.ts index 551d10db6..3afb40b4a 100644 --- a/lib/routes/twitter/developer-api/search.ts +++ b/lib/routes/twitter/developer-api/search.ts @@ -11,12 +11,12 @@ export default async (ctx) => { result_type: 'recent', }); - ctx.set('data', { + return { title: `Twitter Keyword - ${keyword}`, link: `https://twitter.com/search?q=${encodeURIComponent(keyword)}`, item: utils.ProcessFeed(ctx, { data: data.statuses, }), allowEmpty: true, - }); + }; }; diff --git a/lib/routes/twitter/developer-api/user.ts b/lib/routes/twitter/developer-api/user.ts index 8eb27f724..9153336af 100644 --- a/lib/routes/twitter/developer-api/user.ts +++ b/lib/routes/twitter/developer-api/user.ts @@ -25,7 +25,7 @@ export default async (ctx) => { } const profileImageUrl = userInfo.profile_image_url || userInfo.profile_image_url_https; - ctx.set('data', { + return { title: `Twitter @${userInfo.name}`, link: `https://twitter.com/${screen_name}`, image: profileImageUrl, @@ -33,5 +33,5 @@ export default async (ctx) => { item: utils.ProcessFeed(ctx, { data, }), - }); + }; }; diff --git a/lib/routes/twitter/followings.ts b/lib/routes/twitter/followings.ts index 0dfc32f0e..23662fabe 100644 --- a/lib/routes/twitter/followings.ts +++ b/lib/routes/twitter/followings.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import utils from './utils'; import { config } from '@/config'; const T = {}; import { TwitterApi } from 'twitter-api-v2'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/followings/:id/:routeParams?', + categories: ['social-media'], + example: '/twitter/followings/DIYgod', + parameters: { id: 'username', routeParams: 'extra parameters, see the table above' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User following timeline', + maintainers: ['DIYgod'], + handler, + description: `:::warning + This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const cookie = config.twitter.tokens[id]; if (!cookie) { @@ -27,7 +49,7 @@ export default async (ctx) => { // undefined and strings like "exclude_rts_replies" is also safely parsed, so no if branch is needed const routeParams = new URLSearchParams(ctx.req.param('routeParams')); - ctx.set('data', { + return { title: `${id} 的 Twitter 关注时间线`, link: `https://twitter.com/${id}/`, item: utils.ProcessFeed( @@ -40,5 +62,5 @@ export default async (ctx) => { showAuthorInDesc: fallback(undefined, queryToBoolean(routeParams.get('showAuthorInDesc')), true), } ), - }); -}; + }; +} diff --git a/lib/routes/twitter/keyword.ts b/lib/routes/twitter/keyword.ts index 027c410c4..37c86265a 100644 --- a/lib/routes/twitter/keyword.ts +++ b/lib/routes/twitter/keyword.ts @@ -1,3 +1,24 @@ +import { Route } from '@/types'; import webApiImpl from './web-api/search'; -export default async (ctx) => await webApiImpl(ctx); +export const route: Route = { + path: '/keyword/:keyword/:routeParams?', + categories: ['social-media'], + example: '/twitter/keyword/RSSHub', + parameters: { keyword: 'keyword', routeParams: 'extra parameters, see the table above' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Keyword', + maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { + return await webApiImpl(ctx); +} diff --git a/lib/routes/twitter/likes.ts b/lib/routes/twitter/likes.ts index 2ca952023..509d0b489 100644 --- a/lib/routes/twitter/likes.ts +++ b/lib/routes/twitter/likes.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/likes/:id/:routeParams?', + categories: ['social-media'], + example: '/twitter/likes/DIYgod', + parameters: { id: 'username', routeParams: 'extra parameters, see the table above' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User likes', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { if (!config.twitter || !config.twitter.consumer_key || !config.twitter.consumer_secret) { throw new Error('Twitter RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -12,11 +31,11 @@ export default async (ctx) => { tweet_mode: 'extended', }); - ctx.set('data', { + return { title: `Twitter Likes - ${id}`, link: `https://twitter.com/${id}/likes`, item: utils.ProcessFeed(ctx, { data, }), - }); -}; + }; +} diff --git a/lib/routes/twitter/list.ts b/lib/routes/twitter/list.ts index bb32e1629..2abbb1372 100644 --- a/lib/routes/twitter/list.ts +++ b/lib/routes/twitter/list.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:id/:name/:routeParams?', + categories: ['social-media'], + example: '/twitter/list/ladyleet/javascript', + parameters: { id: 'username', name: 'list name', routeParams: 'extra parameters, see the table above' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'List timeline', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { if (!config.twitter || !config.twitter.consumer_key || !config.twitter.consumer_secret) { throw new Error('Twitter RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -29,11 +48,11 @@ export default async (ctx) => { tweet_mode: 'extended', }); - ctx.set('data', { + return { title: `Twitter List - ${id}/${name}`, link: `https://twitter.com/${id}/lists/${name}`, item: utils.ProcessFeed(ctx, { data, }), - }); -}; + }; +} diff --git a/lib/routes/twitter/maintainer.ts b/lib/routes/twitter/maintainer.ts deleted file mode 100644 index cb1b68b07..000000000 --- a/lib/routes/twitter/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/collection/:uid/:collectionId/:routeParams?': ['TonyRL'], - '/followings/:id/:routeParams?': ['DIYgod'], - '/keyword/:keyword/:routeParams?': ['DIYgod', 'yindaheng98', 'Rongronggg9'], - '/likes/:id/:routeParams?': ['xyqfer'], - '/list/:id/:name/:routeParams?': ['xyqfer'], - '/media/:id/:routeParams?': ['yindaheng98', 'Rongronggg9'], - '/trends/:woeid?': ['sakamossan'], - '/tweet/:id/status/:status/:original?': ['LarchLiu', 'Rongronggg9'], - '/user/:id/:routeParams?': ['DIYgod', 'yindaheng98', 'Rongronggg9'], -}; diff --git a/lib/routes/twitter/media.ts b/lib/routes/twitter/media.ts index 81eba9162..f98b94bfb 100644 --- a/lib/routes/twitter/media.ts +++ b/lib/routes/twitter/media.ts @@ -1,3 +1,24 @@ +import { Route } from '@/types'; import webApiImpl from './web-api/media'; -export default async (ctx) => await webApiImpl(ctx); +export const route: Route = { + path: '/media/:id/:routeParams?', + categories: ['social-media'], + example: '/twitter/media/DIYgod', + parameters: { id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', routeParams: 'extra parameters, see the table above.' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User media', + maintainers: ['yindaheng98', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { + return await webApiImpl(ctx); +} diff --git a/lib/routes/twitter/namespace.ts b/lib/routes/twitter/namespace.ts new file mode 100644 index 000000000..abf688618 --- /dev/null +++ b/lib/routes/twitter/namespace.ts @@ -0,0 +1,40 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Twitter', + url: 'twitter.com', + description: `Specify options (in the format of query string) in parameter \`routeParams\` to control some extra features for Tweets + +| Key | Description | Accepts | Defaults to | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ----------------------------------------- | +| \`readable\` | Enable readable layout | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`authorNameBold\` | Display author name in bold | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showAuthorInTitle\` | Show author name in title | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` (\`true\` in \`/twitter/followings\`) | +| \`showAuthorInDesc\` | Show author name in description (RSS body) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` (\`true\` in \`/twitter/followings\`) | +| \`showQuotedAuthorAvatarInDesc\` | Show avatar of quoted Tweet's author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showAuthorAvatarInDesc\` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showEmojiForRetweetAndReply\` | Use "🔁" instead of "RT", "↩️" & "💬" instead of "Re" | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showSymbolForRetweetAndReply\` | Use " RT " instead of "", " Re " instead of "" | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | +| \`showRetweetTextInTitle\` | Show quote comments in title (if \`false\`, only the retweeted tweet will be shown in the title) | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | +| \`addLinkForPics\` | Add clickable links for Tweet pictures | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showTimestampInDescription\` | Show timestamp in description | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`showQuotedInTitle\` | Show quoted tweet in title | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`widthOfPics\` | Width of Tweet pictures | Unspecified/Integer | Unspecified | +| \`heightOfPics\` | Height of Tweet pictures | Unspecified/Integer | Unspecified | +| \`sizeOfAuthorAvatar\` | Size of author's avatar | Integer | \`48\` | +| \`sizeOfQuotedAuthorAvatar\` | Size of quoted tweet's author's avatar | Integer | \`24\` | +| \`excludeReplies\` | Exclude replies, only available in \`/twitter/user\` | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`includeRts\` | Include retweets, only available in \`/twitter/user\` | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | +| \`forceWebApi\` | Force using Web API even if Developer API is configured, only available in \`/twitter/user\` and \`/twitter/keyword\` | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | +| \`count\` | \`count\` parameter passed to Twitter API, only available in \`/twitter/user\` | Unspecified/Integer | Unspecified | + +Specify different option values than default values to improve readability. The URL + +\`\`\` +https://rsshub.app/twitter/user/durov/readable=1&authorNameBold=1&showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForRetweetAndReply=1&showRetweetTextInTitle=0&addLinkForPics=1&showTimestampInDescription=1&showQuotedInTitle=1&heightOfPics=150 +\`\`\` + +generates + +<img loading="lazy" src="/img/readable-twitter.png" alt="Readable Twitter RSS of Durov" />`, +}; diff --git a/lib/routes/twitter/radar.ts b/lib/routes/twitter/radar.ts deleted file mode 100644 index adeb29378..000000000 --- a/lib/routes/twitter/radar.ts +++ /dev/null @@ -1,83 +0,0 @@ -export default { - 'twitter.com': { - _name: 'Twitter', - '.': [ - { - title: '用户时间线', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id', - target: (params) => { - if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') { - return '/twitter/user/:id'; - } - }, - }, - { - title: '用户媒体时间线', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id/media', - target: (params) => { - if (!['home', 'explore', 'notifications', 'messages', 'explore', 'search'].includes(params.id)) { - return '/twitter/media/:id'; - } - }, - }, - { - title: '用户关注时间线', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id', - target: (params) => { - if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') { - return '/twitter/followings/:id'; - } - }, - }, - { - title: '用户喜欢列表', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id', - target: (params) => { - if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') { - return '/twitter/likes/:id'; - } - }, - }, - { - title: '列表时间线', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id/lists/:name', - target: (params) => { - if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') { - return '/twitter/list/:id/:name'; - } - }, - }, - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/search', - target: (params, url) => `/twitter/keyword/${new URL(url).searchParams.get('q')}`, - }, - { - title: '推文收集', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:uid/timelines/:collectionId', - target: (params) => { - if (params.uid !== 'home' && params.uid !== 'explore' && params.uid !== 'notifications' && params.uid !== 'messages' && params.uid !== 'explore' && params.uid !== 'search') { - return '/twitter/collection/:uid/:collectionId'; - } - }, - }, - { - title: '推文详情', - docs: 'https://docs.rsshub.app/routes/social-media#twitter', - source: '/:id/status/:status', - target: (params) => { - if (params.id !== 'home' && params.id !== 'explore' && params.id !== 'notifications' && params.id !== 'messages' && params.id !== 'explore' && params.id !== 'search') { - return '/twitter/tweet/:id/suatus/:status'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/twitter/router.ts b/lib/routes/twitter/router.ts deleted file mode 100644 index a5f629a8a..000000000 --- a/lib/routes/twitter/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/collection/:uid/:collectionId/:routeParams?', './collection'); - router.get('/followings/:id/:routeParams?', './followings'); - router.get('/keyword/:keyword/:routeParams?', './keyword'); - router.get('/likes/:id/:routeParams?', './likes'); - router.get('/list/:id/:name/:routeParams?', './list'); - router.get('/media/:id/:routeParams?', './media'); - router.get('/trends/:woeid?', './trends'); - router.get('/tweet/:id/status/:status/:original?', './tweet'); - router.get('/user/:id/:routeParams?', './user'); -}; diff --git a/lib/routes/twitter/trends.ts b/lib/routes/twitter/trends.ts index bd068e9ee..0757fe23c 100644 --- a/lib/routes/twitter/trends.ts +++ b/lib/routes/twitter/trends.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import utils from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/trends/:woeid?', + categories: ['social-media'], + example: '/twitter/trends/23424856', + parameters: { woeid: 'Yahoo! Where On Earth ID. default to woeid=1 (World Wide)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Trends', + maintainers: ['sakamossan'], + handler, +}; + +async function handler(ctx) { if (!config.twitter || !config.twitter.consumer_key || !config.twitter.consumer_secret) { throw new Error('Twitter RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -10,7 +29,7 @@ export default async (ctx) => { const data = await client.v1.get('trends/place.json', { id: woeid }); const [{ trends }] = data; - ctx.set('data', { + return { title: `Twitter Trends on ${data[0].locations[0].name}`, link: `https://twitter.com/i/trends`, item: trends @@ -20,5 +39,5 @@ export default async (ctx) => { link: t.url, description: t.name + (t.tweet_volume ? ` (${t.tweet_volume})` : ''), })), - }); -}; + }; +} diff --git a/lib/routes/twitter/tweet.ts b/lib/routes/twitter/tweet.ts index 16d93a203..ceea2390e 100644 --- a/lib/routes/twitter/tweet.ts +++ b/lib/routes/twitter/tweet.ts @@ -1,5 +1,28 @@ +import { Route } from '@/types'; import webApiImpl from './web-api/tweet'; -export default async (ctx) => { - await webApiImpl(ctx); +export const route: Route = { + path: '/tweet/:id/status/:status/:original?', + categories: ['social-media'], + example: '/twitter/tweet/DIYgod/status/1650844643997646852', + parameters: { + id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', + status: 'tweet ID', + original: 'extra parameters, data type of return, if the value is not `0`/`false` and `config.isPackage` is `true`, return the original data of twitter', + }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Tweet Details', + maintainers: ['LarchLiu', 'Rongronggg9'], + handler, }; + +async function handler(ctx) { + return await webApiImpl(ctx); +} diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index c3074f040..48ef48353 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -1,3 +1,28 @@ +import { Route } from '@/types'; import webApiImpl from './web-api/user'; -export default (ctx) => webApiImpl(ctx); +export const route: Route = { + path: '/user/:id/:routeParams?', + categories: ['social-media'], + example: '/twitter/user/DIYgod', + parameters: { + id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', + routeParams: + 'extra parameters, see the table above; particularly when `routeParams=exclude_replies`, replies are excluded; `routeParams=exclude_rts` excludes retweets,`routeParams=exclude_rts_replies` exclude replies and retweets; for default include all.', + }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User timeline', + maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { + return await webApiImpl(ctx); +} diff --git a/lib/routes/twitter/web-api/media.ts b/lib/routes/twitter/web-api/media.ts index 4a1ab7918..9aa8c472a 100644 --- a/lib/routes/twitter/web-api/media.ts +++ b/lib/routes/twitter/web-api/media.ts @@ -13,7 +13,7 @@ export default async (ctx) => { const data = await getUserMedia(id, params); const profileImageUrl = userInfo.profile_image_url || userInfo.profile_image_url_https; - ctx.set('data', { + return { title: `Twitter @${userInfo.name}`, link: `https://twitter.com/${userInfo.screen_name}/media`, image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'), @@ -21,5 +21,5 @@ export default async (ctx) => { item: utils.ProcessFeed(ctx, { data, }), - }); + }; }; diff --git a/lib/routes/twitter/web-api/search.ts b/lib/routes/twitter/web-api/search.ts index dc83731f1..2544e6ed9 100644 --- a/lib/routes/twitter/web-api/search.ts +++ b/lib/routes/twitter/web-api/search.ts @@ -7,12 +7,12 @@ export default async (ctx) => { await initToken(); const data = await getSearch(keyword); - ctx.set('data', { + return { title: `Twitter Keyword - ${keyword}`, link: `https://twitter.com/search?q=${encodeURIComponent(keyword)}`, item: utils.ProcessFeed(ctx, { data, }), allowEmpty: true, - }); + }; }; diff --git a/lib/routes/twitter/web-api/tweet.ts b/lib/routes/twitter/web-api/tweet.ts index 081e06989..b0bcb3f3d 100644 --- a/lib/routes/twitter/web-api/tweet.ts +++ b/lib/routes/twitter/web-api/tweet.ts @@ -17,11 +17,11 @@ export default async (ctx) => { const profileImageUrl = userInfo.profile_image_url || userInfo.profile_image_url_https; const item = original && config.isPackage ? data : utils.ProcessFeed(ctx, { data }); - ctx.set('data', { + return { title: `Twitter @${userInfo.name}`, link: `https://twitter.com/${userInfo.screen_name}/status/${status}`, image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'), description: userInfo.description, item, - }); + }; }; diff --git a/lib/routes/twitter/web-api/user.ts b/lib/routes/twitter/web-api/user.ts index 5670e59ac..7ee0d88cc 100644 --- a/lib/routes/twitter/web-api/user.ts +++ b/lib/routes/twitter/web-api/user.ts @@ -18,7 +18,7 @@ export default async (ctx) => { const profileImageUrl = userInfo.profile_image_url || userInfo.profile_image_url_https; - ctx.set('data', { + return { title: `Twitter @${userInfo.name}`, link: `https://twitter.com/${userInfo.screen_name}`, image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'), @@ -26,5 +26,5 @@ export default async (ctx) => { item: utils.ProcessFeed(ctx, { data, }), - }); + }; }; diff --git a/lib/routes/twreporter/maintainer.ts b/lib/routes/twreporter/maintainer.ts deleted file mode 100644 index eaad2523b..000000000 --- a/lib/routes/twreporter/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/newest': ['emdoe'], -}; diff --git a/lib/routes/twreporter/namespace.ts b/lib/routes/twreporter/namespace.ts new file mode 100644 index 000000000..0ba0ed845 --- /dev/null +++ b/lib/routes/twreporter/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '報導者', + url: 'twreporter.org', +}; diff --git a/lib/routes/twreporter/newest.ts b/lib/routes/twreporter/newest.ts index 0eea8a05d..931ff7001 100644 --- a/lib/routes/twreporter/newest.ts +++ b/lib/routes/twreporter/newest.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; import fetch from './fetch-article'; -export default async (ctx) => { +export const route: Route = { + path: '/newest', + categories: ['new-media'], + example: '/twreporter/newest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['twreporter.org/'], + }, + name: '最新', + maintainers: ['emdoe'], + handler, + url: 'twreporter.org/', +}; + +async function handler() { const url = 'https://www.twreporter.org'; const res = await got(url); const $ = load(res.data); @@ -22,9 +45,9 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: `報導者 | 最新`, link: url, item: out, - }); -}; + }; +} diff --git a/lib/routes/twreporter/radar.ts b/lib/routes/twreporter/radar.ts deleted file mode 100644 index 7da818de3..000000000 --- a/lib/routes/twreporter/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'twreporter.org': { - _name: '報導者', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#bao-dao-zhe', - source: ['/'], - target: '/twreporter/newest', - }, - ], - }, -}; diff --git a/lib/routes/twreporter/router.ts b/lib/routes/twreporter/router.ts deleted file mode 100644 index 89baddaeb..000000000 --- a/lib/routes/twreporter/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/newest', './newest'); -}; diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.ts index f1d88920d..e8bb7e9b4 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,28 @@ import * as path from 'node:path'; const rootUrl = 'https://www.txrjy.com'; -export default async (ctx) => { +export const route: Route = { + path: '/fornumtopic/:channel?', + categories: ['bbs'], + example: '/txrjy/fornumtopic', + parameters: { channel: '频道的 id,见下表,默认为最新500个主题帖' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '论坛 频道', + maintainers: ['Fatpandac'], + handler, + description: `| 最新 500 个主题帖 | 最新 500 个回复帖 | 最新精华帖 | 最新精华帖 | 一周热帖 | 本月热帖 | + | :---------------: | :---------------: | :--------: | :--------: | :------: | :------: | + | 1 | 2 | 3 | 4 | 5 | 6 |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? '1'; const url = `${rootUrl}/c114-listnewtopic.php?typeid=${channel}`; @@ -68,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `通信人家园 - 论坛 ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/txrjy/maintainer.ts b/lib/routes/txrjy/maintainer.ts deleted file mode 100644 index 5c6c098fe..000000000 --- a/lib/routes/txrjy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/fornumtopic/:channel?': ['Fatpandac'], -}; diff --git a/lib/routes/txrjy/namespace.ts b/lib/routes/txrjy/namespace.ts new file mode 100644 index 000000000..e623d125a --- /dev/null +++ b/lib/routes/txrjy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '通信人家园', + url: 'txrjy.com', +}; diff --git a/lib/routes/txrjy/radar.ts b/lib/routes/txrjy/radar.ts deleted file mode 100644 index 0949c85db..000000000 --- a/lib/routes/txrjy/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'txrjy.com': { - _name: '通信人家园', - '.': [ - { - title: '论坛 频道', - docs: 'https://docs.rsshub.app/routes/bbs#tong-xin-ren-jia-yuan', - source: ['/c114-listnewtopic.php'], - target: (params, url) => { - const channel = new URL(url).searchParams.get('typeid'); - - return `/txrjy/fornumtopic/${channel ?? ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/txrjy/router.ts b/lib/routes/txrjy/router.ts deleted file mode 100644 index 777e27f22..000000000 --- a/lib/routes/txrjy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/fornumtopic/:channel?', './fornumtopic'); -}; diff --git a/lib/routes/tynu/maintainer.ts b/lib/routes/tynu/maintainer.ts deleted file mode 100644 index 01d8acdf3..000000000 --- a/lib/routes/tynu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['2PoL'], -}; diff --git a/lib/routes/tynu/namespace.ts b/lib/routes/tynu/namespace.ts new file mode 100644 index 000000000..9066fc6d5 --- /dev/null +++ b/lib/routes/tynu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '太原师范学院', + url: 'tynu.edu.cn', +}; diff --git a/lib/routes/tynu/radar.ts b/lib/routes/tynu/radar.ts deleted file mode 100644 index 19ba62f99..000000000 --- a/lib/routes/tynu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'tynu.edu.cn': { - _name: '太原师范学院', - '.': [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/university#tai-yuan-shi-fan-xue-yuan', - source: ['/index/tzgg.htm', '/index.htm', '/'], - target: '/tynu', - }, - ], - }, -}; diff --git a/lib/routes/tynu/router.ts b/lib/routes/tynu/router.ts deleted file mode 100644 index c703e2a30..000000000 --- a/lib/routes/tynu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './tynu'); -}; diff --git a/lib/routes/tynu/tynu.ts b/lib/routes/tynu/tynu.ts index 23cb7c785..f19ba14b1 100644 --- a/lib/routes/tynu/tynu.ts +++ b/lib/routes/tynu/tynu.ts @@ -1,10 +1,23 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'http://www.tynu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['tynu.edu.cn/index/tzgg.htm', 'tynu.edu.cn/index.htm', 'tynu.edu.cn/'], + target: '', + }, + name: 'Unknown', + maintainers: ['2PoL'], + handler, + url: 'tynu.edu.cn/index/tzgg.htm', +}; + +async function handler() { const link = `${baseUrl}/index/tzgg.htm`; const response = await got(link); const data = response.data; @@ -32,9 +45,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '太原师范学院通知公告', link, item: list, - }); -}; + }; +} diff --git a/lib/routes/typora/changelog-dev.ts b/lib/routes/typora/changelog-dev.ts index 06402805b..7833bcbc9 100644 --- a/lib/routes/typora/changelog-dev.ts +++ b/lib/routes/typora/changelog-dev.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog/dev', + categories: ['program-update'], + example: '/typora/changelog/dev', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['support.typora.io/'], + target: '/changelog', + }, + name: 'Dev Release Changelog', + maintainers: ['nczitzk'], + handler, + url: 'support.typora.io/', +}; + +async function handler() { const currentUrl = 'https://typora.io/releases/dev'; const response = await got(currentUrl); @@ -22,10 +46,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `Typora Changelog - Dev`, link: currentUrl, description: 'Typora Changelog', item: items, - }); -}; + }; +} diff --git a/lib/routes/typora/changelog.ts b/lib/routes/typora/changelog.ts index 3b550b297..6a27ca563 100644 --- a/lib/routes/typora/changelog.ts +++ b/lib/routes/typora/changelog.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/changelog', + categories: ['program-update'], + example: '/typora/changelog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['support.typora.io/'], + }, + name: 'Changelog', + maintainers: ['cnzgray'], + handler, + url: 'support.typora.io/', +}; + +async function handler() { const host = 'https://support.typora.io'; const { data } = await got(`${host}/store/`); @@ -31,11 +54,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Typora Changelog', link: host, description: 'Typora Changelog', image: `${host}/assets/img/favicon-128.png`, item: items, - }); -}; + }; +} diff --git a/lib/routes/typora/maintainer.ts b/lib/routes/typora/maintainer.ts deleted file mode 100644 index 70507f806..000000000 --- a/lib/routes/typora/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/changelog': ['cnzgray'], - '/changelog/dev': ['nczitzk'], -}; diff --git a/lib/routes/typora/namespace.ts b/lib/routes/typora/namespace.ts new file mode 100644 index 000000000..70c459a49 --- /dev/null +++ b/lib/routes/typora/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Typora', + url: 'typora.io', +}; diff --git a/lib/routes/typora/radar.ts b/lib/routes/typora/radar.ts deleted file mode 100644 index 29a129406..000000000 --- a/lib/routes/typora/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'typora.io': { - _name: 'Typora', - '.': [ - { - title: 'Dev Release Changelog', - docs: 'https://docs.rsshub.app/routes/program-update#typora', - source: ['/releases/dev'], - target: '/typora/changelog/dev', - }, - ], - support: [ - { - title: 'Changelog', - docs: 'https://docs.rsshub.app/routes/program-update#typora', - source: ['/'], - target: '/typora/changelog', - }, - ], - }, -}; diff --git a/lib/routes/typora/router.ts b/lib/routes/typora/router.ts deleted file mode 100644 index 845c16dc3..000000000 --- a/lib/routes/typora/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/changelog', './changelog'); - router.get('/changelog/dev', './changelog-dev'); -}; diff --git a/lib/routes/u3c3/index.ts b/lib/routes/u3c3/index.ts index acd41d539..05e575731 100644 --- a/lib/routes/u3c3/index.ts +++ b/lib/routes/u3c3/index.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: ['/search/:keyword/:preview?', '/:type?/:preview?'], + categories: ['multimedia'], + example: '/u9a9/search/新片速递', + parameters: { keyword: 'Search keyword', preview: 'Show image preview, off by default, non empty value means on' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: true, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['storytellerF'], + handler, +}; + +async function handler(ctx) { const { type, keywoard, preview } = ctx.req.param(); // should be: // undefined @@ -65,10 +84,10 @@ export default async (ctx) => { ) : list; - ctx.set('data', { + return { title, description: title, link: currentURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/u3c3/maintainer.ts b/lib/routes/u3c3/maintainer.ts deleted file mode 100644 index 721ee9dc5..000000000 --- a/lib/routes/u3c3/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/search/:keyword/:preview?': ['storytellerF'], - '/:type?/:preview?': ['noname1897', 'storytellerF'], -}; diff --git a/lib/routes/u3c3/namespace.ts b/lib/routes/u3c3/namespace.ts new file mode 100644 index 000000000..9a928ed6e --- /dev/null +++ b/lib/routes/u3c3/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'U9A9', + url: 'u3c3.com', +}; diff --git a/lib/routes/u3c3/radar.ts b/lib/routes/u3c3/radar.ts deleted file mode 100644 index 7cbc66d26..000000000 --- a/lib/routes/u3c3/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'u3c3.com': { - _name: 'u3c3', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#u3c3-fen-lei', - source: '/', - target: (params, url) => { - const searchParams = new URL(url).searchParams; - const type = searchParams.has('type') ? searchParams.get('type') : ''; - return `/u3c3/${type}`; - }, - }, - { - title: '关键词搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#u3c3-guan-jian-ci-sou-suo', - source: '/', - target: (params, url) => { - const searchParams = new URL(url).searchParams; - if (searchParams.has('search')) { - const keyword = searchParams.get('search'); - return `/u3c3/search/${keyword}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/u3c3/router.ts b/lib/routes/u3c3/router.ts deleted file mode 100644 index d0a800a12..000000000 --- a/lib/routes/u3c3/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/search/:keyword/:preview?', './index'); - router.get('/:type?/:preview?', './index'); -}; diff --git a/lib/routes/u9a9/index.ts b/lib/routes/u9a9/index.ts index 4e0783377..43868c936 100644 --- a/lib/routes/u9a9/index.ts +++ b/lib/routes/u9a9/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,20 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://u9a9.com'; -export default async (ctx) => { +export const route: Route = { + path: ['/:preview?', '/search/:keyword/:preview?'], + radar: { + source: ['u9a9.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'u9a9.com/', + url: 'u9a9.com/', +}; + +async function handler(ctx) { const { preview, keyword } = ctx.req.param(); let link; @@ -59,9 +73,9 @@ export default async (ctx) => { ) : list; - ctx.set('data', { + return { title, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/u9a9/maintainer.ts b/lib/routes/u9a9/maintainer.ts deleted file mode 100644 index a9c233023..000000000 --- a/lib/routes/u9a9/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:preview?': ['TonyRL'], - '/search/:keyword/:preview?': ['TonyRL'], -}; diff --git a/lib/routes/u9a9/namespace.ts b/lib/routes/u9a9/namespace.ts new file mode 100644 index 000000000..0d065f96a --- /dev/null +++ b/lib/routes/u9a9/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unknown', + url: 'u9a9.com', +}; diff --git a/lib/routes/u9a9/radar.ts b/lib/routes/u9a9/radar.ts deleted file mode 100644 index f6d584261..000000000 --- a/lib/routes/u9a9/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'u9a9.com': { - _name: 'U9A9', - '.': [ - { - title: '首页', - docs: 'https://docs.rsshub.app/routes/multimedia#u9a9', - source: ['/'], - target: '/u9a9', - }, - { - title: '搜索', - docs: 'https://docs.rsshub.app/routes/multimedia#u9a9', - source: ['/'], - target: (_, url) => `/u9a9/search/${new URL(url).searchParams.get('search')}`, - }, - ], - }, -}; diff --git a/lib/routes/u9a9/router.ts b/lib/routes/u9a9/router.ts deleted file mode 100644 index 7c6709e0d..000000000 --- a/lib/routes/u9a9/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:preview?', './index'); - router.get('/search/:keyword/:preview?', './index'); -}; diff --git a/lib/routes/uber/blog.ts b/lib/routes/uber/blog.ts index 379544b55..7b59e93ad 100644 --- a/lib/routes/uber/blog.ts +++ b/lib/routes/uber/blog.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,30 @@ import { parseDate } from '@/utils/parse-date'; const rootURL = 'https://www.uber.com'; const apiURL = 'https://blogapi.uber.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog/:maxPage?', + categories: ['blog'], + example: '/uber/blog', + parameters: { maxPage: 'max number of pages to retrieve, default to 1 page at most' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.uber.com/blog/pittsburgh/engineering'], + target: '/blog', + }, + name: 'Engineering', + maintainers: ['hulb'], + handler, + url: 'www.uber.com/blog/pittsburgh/engineering', +}; + +async function handler(ctx) { let maxPage = Number(ctx.req.param('maxPage')); if (Number.isNaN(maxPage)) { maxPage = 1; @@ -50,10 +74,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Uber Engineering Blog`, link: rootURL + '/blog/engineering', description: 'The technology behind Uber Engineering', item: result.flat(), - }); -}; + }; +} diff --git a/lib/routes/uber/maintainer.ts b/lib/routes/uber/maintainer.ts deleted file mode 100644 index 30b90e88e..000000000 --- a/lib/routes/uber/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog/:maxPage?': ['hulb'], -}; diff --git a/lib/routes/uber/namespace.ts b/lib/routes/uber/namespace.ts new file mode 100644 index 000000000..bdba13c06 --- /dev/null +++ b/lib/routes/uber/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Uber 优步', + url: 'www.uber.com', +}; diff --git a/lib/routes/uber/radar.ts b/lib/routes/uber/radar.ts deleted file mode 100644 index e2f150384..000000000 --- a/lib/routes/uber/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'uber.com': { - _name: 'Uber Blog', - www: [ - { - title: 'Engineering', - docs: 'https://docs.rsshub.app/routes/blog#you-bu', - source: ['/blog/pittsburgh/engineering'], - target: '/uber/blog', - }, - ], - }, -}; diff --git a/lib/routes/uber/router.ts b/lib/routes/uber/router.ts deleted file mode 100644 index 45a3c4421..000000000 --- a/lib/routes/uber/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog/:maxPage?', './blog'); -}; diff --git a/lib/routes/ucas/ai.ts b/lib/routes/ucas/ai.ts index dda5af2be..b857c76a5 100644 --- a/lib/routes/ucas/ai.ts +++ b/lib/routes/ucas/ai.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ai', + categories: ['university'], + example: '/ucas/ai', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ai.ucas.ac.cn/index.php/zh-cn/tzgg', 'ai.ucas.ac.cn/'], + }, + name: '人工智能学院', + maintainers: ['shengmaosu'], + handler, + url: 'ai.ucas.ac.cn/index.php/zh-cn/tzgg', +}; + +async function handler() { const baseUrl = 'https://ai.ucas.ac.cn'; const link = `${baseUrl}/index.php/zh-cn/tzgg`; const response = await got(link); const $ = load(response.data); const list = $('.b-list li'); - ctx.set('data', { + return { title: '中科院人工智能所', link, description: '中科院人工智能通知公告', @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('.m-date').text(), 'YYYY-MM-DD'), }; }), - }); -}; + }; +} diff --git a/lib/routes/ucas/index.ts b/lib/routes/ucas/index.ts index 607648522..96ee2e13a 100644 --- a/lib/routes/ucas/index.ts +++ b/lib/routes/ucas/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -19,7 +20,28 @@ const titleMap = { bsh: '博士后', }; -export default async (ctx) => { +export const route: Route = { + path: '/job/:type?', + categories: ['university'], + example: '/ucas/job', + parameters: { type: '招聘类型,默认为博士后' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '招聘信息', + maintainers: ['Fatpandac'], + handler, + description: `| 招聘类型 | 博士后 | 课题项目聘用 | 管理支撑人才 | 教学科研人才 | + | :------: | :----: | :----------: | :----------: | :----------: | + | 参数 | bsh | ktxmpy | glzcrc | jxkyrc |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'bsh'; const url = `${rootUrl}/gjob/login.do?method=contentList&t=zhaopin&c=${idMap[type]}`; const response = await got.get(url); @@ -52,9 +74,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `中国科学院大学招聘 - ${titleMap[type]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/ucas/maintainer.ts b/lib/routes/ucas/maintainer.ts deleted file mode 100644 index 44d0570bd..000000000 --- a/lib/routes/ucas/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/ai': ['shengmaosu'], - '/job/:type?': ['Fatpandac'], -}; diff --git a/lib/routes/ucas/namespace.ts b/lib/routes/ucas/namespace.ts new file mode 100644 index 000000000..2df1600d7 --- /dev/null +++ b/lib/routes/ucas/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科学院大学', + url: 'ai.ucas.ac.cn', +}; diff --git a/lib/routes/ucas/radar.ts b/lib/routes/ucas/radar.ts deleted file mode 100644 index 7287e7e2c..000000000 --- a/lib/routes/ucas/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'ucas.ac.cn': { - _name: '中国科学院大学', - ai: [ - { - title: '人工智能学院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan-da-xue', - source: ['/index.php/zh-cn/tzgg', '/'], - target: '/ucas/ai', - }, - ], - zhaopin: [ - { - title: '招聘信息', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan-da-xue', - source: ['/gjob/login.do', '/'], - target: (_, url) => { - const c = new URL(url).searchParams.get('c'); - let type = ''; - switch (c) { - case '3': - type = 'jxkyrc'; - break; - case '4': - type = 'glzcrc'; - break; - case '5': - type = 'ktxmpy'; - break; - case '6': - type = 'bsh'; - break; - default: - break; - } - return `/ucas/job${type ? `/${type}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/ucas/router.ts b/lib/routes/ucas/router.ts deleted file mode 100644 index dd69d8dcc..000000000 --- a/lib/routes/ucas/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/ai', './ai'); - router.get('/job/:type?', './index'); -}; diff --git a/lib/routes/uchicago/current.ts b/lib/routes/uchicago/current.ts index c0571cbe4..04d4f2b9f 100644 --- a/lib/routes/uchicago/current.ts +++ b/lib/routes/uchicago/current.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -5,7 +6,28 @@ import { getCookies, setCookies } from '@/utils/puppeteer-utils'; import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/journals/current/:journal', + categories: ['journal'], + example: '/uchicago/journals/current/jpe', + parameters: { journal: 'Journal id, can be found in URL. [Browse journals by title](https://www.journals.uchicago.edu/action/showPublications)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['journals.uchicago.edu/toc/:journal/current', 'journals.uchicago.edu/journal/:journal'], + }, + name: 'Current Issue', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const journal = ctx.req.param('journal'); const baseUrl = 'https://www.journals.uchicago.edu'; const link = `${baseUrl}/toc/${journal}/current`; @@ -72,11 +94,11 @@ export default async (ctx) => { browser.close(); - ctx.set('data', { + return { title: $('head title').text(), description: $('.jumbotron-journal-info').text(), link, image: $('head meta[property="og:image"]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/uchicago/maintainer.ts b/lib/routes/uchicago/maintainer.ts deleted file mode 100644 index 7ec4b304b..000000000 --- a/lib/routes/uchicago/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/journals/current/:journal': ['TonyRL'], -}; diff --git a/lib/routes/uchicago/namespace.ts b/lib/routes/uchicago/namespace.ts new file mode 100644 index 000000000..1a4ed461b --- /dev/null +++ b/lib/routes/uchicago/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The University of Chicago Press: Journals', + url: 'journals.uchicago.edu', +}; diff --git a/lib/routes/uchicago/radar.ts b/lib/routes/uchicago/radar.ts deleted file mode 100644 index c6e1414e5..000000000 --- a/lib/routes/uchicago/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'journals.uchicago.edu': { - _name: 'The University of Chicago Press: Journals', - '.': [ - { - title: 'Current Issue', - docs: 'https://docs.rsshub.app/routes/journal#the-university-of-chicago-press-journals', - source: ['/toc/:journal/current', '/journal/:journal'], - target: '/uchicago/journals/current/:journal', - }, - ], - }, -}; diff --git a/lib/routes/uchicago/router.ts b/lib/routes/uchicago/router.ts deleted file mode 100644 index 12168e5e3..000000000 --- a/lib/routes/uchicago/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/journals/current/:journal', './current'); -}; diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index dcc9bd4c5..d32f290cb 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,31 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/breakingnews/:id', + categories: ['traditional-media'], + example: '/udn/news/breakingnews/99', + parameters: { id: '类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['udn.com/news/breaknews/1/:id', 'udn.com/'], + }, + name: '即時新聞', + maintainers: ['miles170'], + handler, + description: `| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 99 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | + | 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `/news/breaknews/1/${id}#breaknews`; const name = await getLinkName(link); @@ -70,13 +95,13 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `即時${name} - 聯合新聞網`, link: `${rootUrl}${link}`, description: 'udn.com 提供即時新聞以及豐富的政治、社會、地方、兩岸、國際、財經、數位、運動、NBA、娛樂、生活、健康、旅遊新聞,以最即時、多元的內容,滿足行動世代的需求', item: items, - }); -}; + }; +} const getLinkName = async (link) => { const url = 'https://udn.com/news/breaknews'; diff --git a/lib/routes/udn/global/index.ts b/lib/routes/udn/global/index.ts index f2a36ceaf..a120e24dd 100644 --- a/lib/routes/udn/global/index.ts +++ b/lib/routes/udn/global/index.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/global/:category?', + categories: ['traditional-media'], + example: '/udn/global', + parameters: { category: '分类,见下表,默认为首頁' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['global.udn.com/global_vision/index/:category', 'global.udn.com/'], + }, + name: '轉角國際 - 首頁', + maintainers: ['nczitzk'], + handler, + description: `| 首頁 | 最新文章 | 熱門文章 | + | ---- | -------- | -------- | + | | new | hot |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const start = category === 'hot' ? 6 : 0; @@ -56,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/udn/global/tag.ts b/lib/routes/udn/global/tag.ts index 58cf685e2..acd8e7a34 100644 --- a/lib/routes/udn/global/tag.ts +++ b/lib/routes/udn/global/tag.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/global/tag/:tag?', + categories: ['traditional-media'], + example: '/udn/global/tag/過去24小時', + parameters: { tag: '标签,可在对应标签页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['global.udn.com/search/tagging/1020/:tag', 'global.udn.com/'], + }, + name: '轉角國際 - 標籤', + maintainers: ['emdoe', 'nczitzk'], + handler, + description: `| 過去 24 小時 | 鏡頭背後 | 深度專欄 | 重磅廣播 | + | ------------ | -------- | -------- | -------- |`, +}; + +async function handler(ctx) { const tag = ctx.req.param('tag') ?? '過去24小時'; const rootUrl = 'https://global.udn.com'; @@ -44,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `轉角國際 udn Global - ${tag}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/udn/maintainer.ts b/lib/routes/udn/maintainer.ts deleted file mode 100644 index fa18cd19a..000000000 --- a/lib/routes/udn/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/global/:category?': ['nczitzk'], - '/global/tag/:tag?': ['emdoe', 'nczitzk'], - '/news/breakingnews/:id': ['miles170'], -}; diff --git a/lib/routes/udn/namespace.ts b/lib/routes/udn/namespace.ts new file mode 100644 index 000000000..ca9b4cd9f --- /dev/null +++ b/lib/routes/udn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '聯合新聞網', + url: 'udn.com', +}; diff --git a/lib/routes/udn/radar.ts b/lib/routes/udn/radar.ts deleted file mode 100644 index bde760154..000000000 --- a/lib/routes/udn/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'udn.com': { - _name: '聯合新聞網', - '.': [ - { - title: '即時新聞', - docs: 'https://docs.rsshub.app/routes/new-media#lian-he-xin-wen-wang-ji-shi-xin-wen', - source: ['/news/breaknews/1/:id', '/'], - target: '/udn/news/breakingnews/:id', - }, - ], - global: [ - { - title: '轉角國際 - 首頁', - docs: 'https://docs.rsshub.app/routes/new-media#lian-he-xin-wen-wang-zhuan-jiao-guo-ji-shou-ye', - source: ['/global_vision/index/:category', '/'], - target: '/udn/global/:category?', - }, - { - title: '轉角國際 - 標籤', - docs: 'https://docs.rsshub.app/routes/new-media#lian-he-xin-wen-wang-zhuan-jiao-guo-ji-biao-qian', - source: ['/search/tagging/1020/:tag', '/'], - target: '/udn/global/tag/:tag?', - }, - ], - }, -}; diff --git a/lib/routes/udn/router.ts b/lib/routes/udn/router.ts deleted file mode 100644 index b8ce3956a..000000000 --- a/lib/routes/udn/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/global/tag/:tag?', './global/tag'); - router.get('/global/:category?', './global/index'); - router.get('/news/breakingnews/:id', './breaking-news'); -}; diff --git a/lib/routes/uestc/auto.ts b/lib/routes/uestc/auto.ts index ec08536c3..2cc9e4577 100644 --- a/lib/routes/uestc/auto.ts +++ b/lib/routes/uestc/auto.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; @@ -5,7 +6,29 @@ import puppeteer from '@/utils/puppeteer'; const baseIndexUrl = 'https://www.auto.uestc.edu.cn/index/tzgg1.htm'; const host = 'https://www.auto.uestc.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/auto', + categories: ['university'], + example: '/uestc/auto', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['auto.uestc.edu.cn/'], + }, + name: '自动化工程学院', + maintainers: ['talengu', 'mobyw'], + handler, + url: 'auto.uestc.edu.cn/', +}; + +async function handler() { const browser = await puppeteer({ stealth: true }); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -37,10 +60,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '电子科技大学自动化学院通知', link: baseIndexUrl, description: '电子科技大学自动化工程学院通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/cqe.ts b/lib/routes/uestc/cqe.ts index 702b3fc7f..2385a73ac 100644 --- a/lib/routes/uestc/cqe.ts +++ b/lib/routes/uestc/cqe.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; @@ -14,7 +15,33 @@ const mapTitle = { tzgg: '通知公告', }; -export default async (ctx) => { +export const route: Route = { + path: '/cqe/:type?', + categories: ['university'], + example: '/uestc/cqe/tzgg', + parameters: { type: '默认为 `tzgg`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cqe.uestc.edu.cn/'], + target: '/cqe', + }, + name: '文化素质教育中心', + maintainers: ['truobel', 'mobyw'], + handler, + url: 'cqe.uestc.edu.cn/', + description: `| 活动预告 | 通知公告 | + | -------- | -------- | + | hdyg | tzgg |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'tzgg'; const pageUrl = mapUrl[type]; if (!pageUrl) { @@ -52,10 +79,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `大学生文化素质教育中心-${mapTitle[type]}`, link: baseUrl, description: '电子科技大学大学生文化素质教育中心通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/gr.ts b/lib/routes/uestc/gr.ts index ad29df19e..f571426f2 100644 --- a/lib/routes/uestc/gr.ts +++ b/lib/routes/uestc/gr.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://gr.uestc.edu.cn/tongzhi/'; const baseIndexUrl = 'https://gr.uestc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gr', + categories: ['university'], + example: '/uestc/gr', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gr.uestc.edu.cn/'], + }, + name: '研究生院', + maintainers: ['huyyi', 'mobyw'], + handler, + url: 'gr.uestc.edu.cn/', +}; + +async function handler() { const response = await got.get(baseIndexUrl); const $ = load(response.data); @@ -40,10 +63,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '研究生院通知', link: baseUrl, description: '电子科技大学研究生院通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/jwc.ts b/lib/routes/uestc/jwc.ts index 021c6b5bd..de29eb05d 100644 --- a/lib/routes/uestc/jwc.ts +++ b/lib/routes/uestc/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -15,7 +16,33 @@ const map = { office: 'list/ff80808160bcf79c0160c010a8d20020/?page=1', }; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/uestc/jwc/student', + parameters: { type: '默认为 `important`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.uestc.edu.cn/'], + target: '/jwc', + }, + name: '教务处', + maintainers: ['achjqz', 'mobyw'], + handler, + url: 'jwc.uestc.edu.cn/', + description: `| 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | + | --------- | ------------ | ------------ | -------- | ------ | + | important | student | teacher | teach | office |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'important'; const pageUrl = map[type]; if (!pageUrl) { @@ -43,10 +70,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '教务处通知', link: baseUrl, description: '电子科技大学教务处通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/maintainer.ts b/lib/routes/uestc/maintainer.ts deleted file mode 100644 index 3c848c5b7..000000000 --- a/lib/routes/uestc/maintainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - // departments - '/gr': ['huyyi', 'mobyw'], - '/cqe/:type?': ['truobel', 'mobyw'], - '/jwc/:type?': ['achjqz', 'mobyw'], - '/news/:type?': ['achjqz', 'mobyw'], - // schools - '/auto': ['talengu', 'mobyw'], - '/scse': ['talengu', 'mobyw'], - '/sice': ['huyyi', 'mobyw'], - '/sise/:type?': ['Yadomin', 'mobyw'], -}; diff --git a/lib/routes/uestc/namespace.ts b/lib/routes/uestc/namespace.ts new file mode 100644 index 000000000..0522f690b --- /dev/null +++ b/lib/routes/uestc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '电子科技大学', + url: 'gr.uestc.edu.cn', +}; diff --git a/lib/routes/uestc/news.ts b/lib/routes/uestc/news.ts index 22f7afd68..ae3cf8514 100644 --- a/lib/routes/uestc/news.ts +++ b/lib/routes/uestc/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -12,7 +13,33 @@ const map = { announcement: '/?n=UestcNews.Front.CategoryV2.Page&CatId=68', }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/uestc/news/culture', + parameters: { type: '默认为 `announcement`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.uestc.edu.cn/'], + target: '/news', + }, + name: '新闻中心', + maintainers: ['achjqz', 'mobyw'], + handler, + url: 'news.uestc.edu.cn/', + description: `| 学术 | 文化 | 公告 | 校内通知 | + | ------- | ------- | ------------ | ------------ | + | academy | culture | announcement | notification |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'announcement'; const pageUrl = map[type]; if (!pageUrl) { @@ -42,10 +69,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '新闻网通知', link: baseUrl, description: '电子科技大学新闻网信息公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/radar.ts b/lib/routes/uestc/radar.ts deleted file mode 100644 index 020c974c4..000000000 --- a/lib/routes/uestc/radar.ts +++ /dev/null @@ -1,69 +0,0 @@ -export default { - 'uestc.edu.cn': { - _name: '电子科技大学', - gr: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/gr', - }, - ], - cqe: [ - { - title: '大学生文化素质教育中心', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/cqe', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/jwc', - }, - ], - news: [ - { - title: '新闻网', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/news', - }, - ], - auto: [ - { - title: '自动化学院', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/auto', - }, - ], - scse: [ - { - title: '计算机学院', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/scse', - }, - ], - sice: [ - { - title: '信通学院', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/sice', - }, - ], - sise: [ - { - title: '信软学院', - docs: 'https://docs.rsshub.app/routes/university#dian-zi-ke-ji-da-xue', - source: ['/'], - target: '/uestc/sise', - }, - ], - }, -}; diff --git a/lib/routes/uestc/router.ts b/lib/routes/uestc/router.ts deleted file mode 100644 index 1a9664fcb..000000000 --- a/lib/routes/uestc/router.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default (router) => { - // departments - router.get('/gr', './gr'); - router.get('/cqe/:type?', './cqe'); // type: tzgg/hdyg - router.get('/jwc/:type?', './jwc'); // type: important/student/teacher/teach/office - router.get('/news/:type?', './news'); // type: announcement/academy/culture - // schools - router.get('/auto', './auto'); - router.get('/scse', './scse'); - router.get('/sice', './sice'); - router.get('/sise/:type?', './sise'); // type: 1/2/3/4/5/6/7/8/9 -}; diff --git a/lib/routes/uestc/scse.ts b/lib/routes/uestc/scse.ts index 44a76f692..04f8215cd 100644 --- a/lib/routes/uestc/scse.ts +++ b/lib/routes/uestc/scse.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; @@ -19,7 +20,29 @@ const prefixes = { 1022: '【安全工作】', }; -export default async (ctx) => { +export const route: Route = { + path: '/scse', + categories: ['university'], + example: '/uestc/scse', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['scse.uestc.edu.cn/'], + }, + name: '计算机科学与工程学院', + maintainers: ['talengu', 'mobyw'], + handler, + url: 'scse.uestc.edu.cn/', +}; + +async function handler() { const browser = await puppeteer({ stealth: true }); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -82,10 +105,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '计算机学院通知', link: baseIndexUrl, description: '电子科技大学计算机科学与工程学院通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/sice.ts b/lib/routes/uestc/sice.ts index 8a47ca55a..2ec07c088 100644 --- a/lib/routes/uestc/sice.ts +++ b/lib/routes/uestc/sice.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; @@ -6,7 +7,29 @@ import puppeteer from '@/utils/puppeteer'; const baseIndexUrl = 'https://www.sice.uestc.edu.cn/index.htm'; const host = 'https://www.sice.uestc.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/sice', + categories: ['university'], + example: '/uestc/sice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sice.uestc.edu.cn/'], + }, + name: '信息与通信工程学院', + maintainers: ['huyyi', 'mobyw'], + handler, + url: 'sice.uestc.edu.cn/', +}; + +async function handler() { const browser = await puppeteer({ stealth: true }); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -38,10 +61,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '信通学院通知', link: baseIndexUrl, description: '电子科技大学信息与通信工程学院通知公告', item: out, - }); -}; + }; +} diff --git a/lib/routes/uestc/sise.ts b/lib/routes/uestc/sise.ts index 282802b9b..27bcd74e5 100644 --- a/lib/routes/uestc/sise.ts +++ b/lib/routes/uestc/sise.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; @@ -29,7 +30,33 @@ const mapTitle = { 9: "Int'I", }; -export default async (ctx) => { +export const route: Route = { + path: '/sise/:type?', + categories: ['university'], + example: '/uestc/sise/1', + parameters: { type: '默认为 `1`' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sise.uestc.edu.cn/'], + target: '/sise', + }, + name: '信息与软件工程学院', + maintainers: ['Yadomin', 'mobyw'], + handler, + url: 'sise.uestc.edu.cn/', + description: `| 最新 | 院办 | 学生科 | 教务科 | 研管科 | 组织 | 人事 | 实践教育中心 | Int'I | + | ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- | + | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 1; const divId = mapId[type]; if (!divId) { @@ -72,10 +99,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `信软学院通知-${mapTitle[type]}`, link: baseUrl, description: '电子科技大学信息与软件工程学院通知', item: out, - }); -}; + }; +} diff --git a/lib/routes/uibe/hr.ts b/lib/routes/uibe/hr.ts index 7b120f446..e9c3f5ad5 100644 --- a/lib/routes/uibe/hr.ts +++ b/lib/routes/uibe/hr.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hr/:category?/:type?', + categories: ['university'], + example: '/uibe/hr', + parameters: { category: '分类,可在对应页 URL 中找到,默认为通知公告', type: '类型,可在对应页 URL 中找到,默认为空' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['hr.uibe.edu.cn/:category/:type', 'hr.uibe.edu.cn/:category', 'hr.uibe.edu.cn/'], + }, + name: '人力资源处', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 如 [通知公告](http://hr.uibe.edu.cn/tzgg) 的 URL 为 \`http://hr.uibe.edu.cn/tzgg\`,其路由为 [\`/uibe/hr/tzgg\`](https://rsshub.app/uibe/hr/tzgg) + + 如 [教师招聘](http://hr.uibe.edu.cn/jszp) 中的 [招聘信息](http://hr.uibe.edu.cn/jszp/zpxx) 的 URL 为 \`http://hr.uibe.edu.cn/jszp/zpxx\`,其路由为 [\`/uibe/hr/jszp/zpxx\`](https://rsshub.app/uibe/jszp/zpxx) + :::`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'tzgg'; const type = ctx.req.param('type') ?? ''; @@ -51,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.picTit').text()} - 对外经济贸易大学人力资源处`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/uibe/maintainer.ts b/lib/routes/uibe/maintainer.ts deleted file mode 100644 index c506190b8..000000000 --- a/lib/routes/uibe/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/hr/:category?/:type?': ['nczitzk'], -}; diff --git a/lib/routes/uibe/namespace.ts b/lib/routes/uibe/namespace.ts new file mode 100644 index 000000000..38ecd569a --- /dev/null +++ b/lib/routes/uibe/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '对外经济贸易大学', + url: 'hr.uibe.edu.cn', +}; diff --git a/lib/routes/uibe/radar.ts b/lib/routes/uibe/radar.ts deleted file mode 100644 index 162d13a6f..000000000 --- a/lib/routes/uibe/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'uibe.edu.cn': { - _name: '对外经济贸易大学', - hr: [ - { - title: '人力资源处', - docs: 'https://docs.rsshub.app/routes/university#dui-wai-jing-ji-mao-yi-da-xue-ren-li-zi-yuan-chu', - source: ['/:category/:type', '/:category', '/'], - target: '/uibe/hr/:category?/:type?', - }, - ], - }, -}; diff --git a/lib/routes/uibe/router.ts b/lib/routes/uibe/router.ts deleted file mode 100644 index fdf200aee..000000000 --- a/lib/routes/uibe/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/hr/:category?/:type?', './hr'); -}; diff --git a/lib/routes/ulapia/index.ts b/lib/routes/ulapia/index.ts index 0f3220c7b..0182e6af6 100644 --- a/lib/routes/ulapia/index.ts +++ b/lib/routes/ulapia/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -22,7 +23,28 @@ const selectorMap = { ipo_research: 'div.col-md-6', }; -export default async (ctx) => { +export const route: Route = { + path: '/reports/:category?', + categories: ['finance'], + example: '/ulapia/reports/stock_research', + parameters: { category: '频道类型,默认为券商晨报(今日晨报)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '频道', + maintainers: ['Fatpandac'], + handler, + description: `| 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) | + | :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: | + | stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'brokerage_news'; const url = `${rootUrl}/reports/${category}`; @@ -39,9 +61,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: ` ulapia - ${titleMap[category]}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/ulapia/maintainer.ts b/lib/routes/ulapia/maintainer.ts deleted file mode 100644 index 0d4d62c29..000000000 --- a/lib/routes/ulapia/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/reports/:category?': ['Fatpandac'], -}; diff --git a/lib/routes/ulapia/namespace.ts b/lib/routes/ulapia/namespace.ts new file mode 100644 index 000000000..4054ab81a --- /dev/null +++ b/lib/routes/ulapia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '乌拉邦', + url: 'www.ulapia.com', +}; diff --git a/lib/routes/ulapia/radar.ts b/lib/routes/ulapia/radar.ts deleted file mode 100644 index 8cc18de29..000000000 --- a/lib/routes/ulapia/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'ulapia.com': { - _name: '乌拉邦 ulapia', - www: [ - { - title: '今日晨报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/'], - target: '/ulapia/reports/brokerage_news', - }, - { - title: '最新研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-zui-xin-yan-bao', - source: ['/'], - target: '/ulapia/research/latest', - }, - { - title: '个股研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/stock_research'], - target: '/ulapia/reports/stock_research', - }, - { - title: '行业研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/industry_research'], - target: '/ulapia/reports/industry_research', - }, - { - title: '策略研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/strategy_research'], - target: '/ulapia/reports/strategy_research', - }, - { - title: '宏观研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/macro_research'], - target: '/ulapia/reports/macro_research', - }, - { - title: '新股研报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/ipo_research'], - target: '/ulapia/reports/ipo_research', - }, - { - title: '券商晨报', - docs: 'https://docs.rsshub.app/routes/finance#wu-la-bang-pin-dao', - source: ['/reports/brokerage_news'], - target: '/ulapia/reports/brokerage_news', - }, - ], - }, -}; diff --git a/lib/routes/ulapia/research.ts b/lib/routes/ulapia/research.ts index deb81d563..89c12cb0d 100644 --- a/lib/routes/ulapia/research.ts +++ b/lib/routes/ulapia/research.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +8,29 @@ const rootUrl = 'http://www.ulapia.com'; const researchList = ['stock_research', 'industry_research', 'strategy_research', 'macro_research', 'ipo_research']; -export default async (ctx) => { +export const route: Route = { + path: '/research/latest', + categories: ['finance'], + example: '/ulapia/research/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.ulapia.com/'], + }, + name: '最新研报', + maintainers: [], + handler, + url: 'www.ulapia.com/', +}; + +async function handler() { const items = await Promise.all( researchList.map((item) => { const url = `${rootUrl}/reports/${item}`; @@ -31,9 +54,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: 'Ulapia - 最新研报', link: rootUrl, item: items.flat(), - }); -}; + }; +} diff --git a/lib/routes/ulapia/router.ts b/lib/routes/ulapia/router.ts deleted file mode 100644 index b6a6ec520..000000000 --- a/lib/routes/ulapia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/reports/:category?', './index'); - router.get('/research/latest', './research'); -}; diff --git a/lib/routes/uniqlo/maintainer.ts b/lib/routes/uniqlo/maintainer.ts deleted file mode 100644 index 89174c814..000000000 --- a/lib/routes/uniqlo/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/new/:country/:category': ['DIYgod'], -}; diff --git a/lib/routes/uniqlo/namespace.ts b/lib/routes/uniqlo/namespace.ts new file mode 100644 index 000000000..12ff69ce1 --- /dev/null +++ b/lib/routes/uniqlo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Uniqlo', + url: 'www.uniqlo.com', +}; diff --git a/lib/routes/uniqlo/new.ts b/lib/routes/uniqlo/new.ts index 13d2522f9..7909d4ff9 100644 --- a/lib/routes/uniqlo/new.ts +++ b/lib/routes/uniqlo/new.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/new/:country/:category', + categories: ['shopping'], + example: '/uniqlo/new/sg/men', + parameters: { country: 'currently only supports sg, us, jp', category: 'supports `men` `women`, `kids`, `baby`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'New Arrivals', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const { country, category } = ctx.req.param(); const map = { @@ -54,9 +73,9 @@ export default async (ctx) => { }${item.images.sub.map((image) => `<img src="${image.url || image.image}">`).join('')}`, })); - ctx.set('data', { + return { title: `Uniqlo ${category} new arrivals in ${country}`, link: `https://www.uniqlo.com/${country}/${map[country].lang || 'en'}/feature/new/${category}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/uniqlo/radar.ts b/lib/routes/uniqlo/radar.ts deleted file mode 100644 index f5805acc1..000000000 --- a/lib/routes/uniqlo/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'uniqlo.com': { - _name: 'Uniqlo', - www: [ - { - title: 'New Arrivals', - docs: 'https://docs.rsshub.app/routes/shopping#uniqlo', - source: ['/sg', '/us', '/jp'], - }, - ], - }, -}; diff --git a/lib/routes/uniqlo/router.ts b/lib/routes/uniqlo/router.ts deleted file mode 100644 index d68a73ce2..000000000 --- a/lib/routes/uniqlo/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new/:country/:category', './new'); -}; diff --git a/lib/routes/unraid/community-apps.ts b/lib/routes/unraid/community-apps.ts index 6f6567d34..13e090185 100644 --- a/lib/routes/unraid/community-apps.ts +++ b/lib/routes/unraid/community-apps.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const appFeedUrl = 'https://raw.githubusercontent.com/Squidly271/AppFeed/master/applicationFeed.json'; const defaultLimit = 20; -export default async (ctx) => { +export const route: Route = { + path: '/community-apps', + categories: ['program-update'], + example: '/unraid/community-apps', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['unraid.net/community/apps'], + }, + name: 'Community Apps', + maintainers: ['KTachibanaM'], + handler, + url: 'unraid.net/community/apps', +}; + +async function handler(ctx) { const { data } = await got(appFeedUrl); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : defaultLimit; @@ -19,7 +42,7 @@ export default async (ctx) => { appList.sort((a, b) => b._pubDate - a._pubDate); const returnedAppList = appList.slice(0, limit); - ctx.set('data', { + return { title: 'Unraid Community Apps', link: 'https://unraid.net/community/apps', image: 'https://craftassets.unraid.net/static/favicon/favicon.ico?v=1.0', @@ -31,5 +54,5 @@ export default async (ctx) => { category: app.CategoryList, upvotes: app.stars, })), - }); -}; + }; +} diff --git a/lib/routes/unraid/maintainer.ts b/lib/routes/unraid/maintainer.ts deleted file mode 100644 index f329d94a7..000000000 --- a/lib/routes/unraid/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/community-apps': ['KTachibanaM'], -}; diff --git a/lib/routes/unraid/namespace.ts b/lib/routes/unraid/namespace.ts new file mode 100644 index 000000000..4170cac12 --- /dev/null +++ b/lib/routes/unraid/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unraid', + url: 'unraid.net', +}; diff --git a/lib/routes/unraid/radar.ts b/lib/routes/unraid/radar.ts deleted file mode 100644 index 791e3664c..000000000 --- a/lib/routes/unraid/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'unraid.net': { - _name: 'Unraid', - '.': [ - { - title: 'Community Apps', - docs: 'https://docs.rsshub.app/routes/program-update#unraid', - source: ['/community/apps'], - target: '/unraid/community-apps', - }, - ], - }, -}; diff --git a/lib/routes/unraid/router.ts b/lib/routes/unraid/router.ts deleted file mode 100644 index f8fdf566a..000000000 --- a/lib/routes/unraid/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/community-apps', './community-apps'); -}; diff --git a/lib/routes/unusualwhales/maintainer.ts b/lib/routes/unusualwhales/maintainer.ts deleted file mode 100644 index 620b552e5..000000000 --- a/lib/routes/unusualwhales/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['TonyRL'], -}; diff --git a/lib/routes/unusualwhales/namespace.ts b/lib/routes/unusualwhales/namespace.ts new file mode 100644 index 000000000..e18a57355 --- /dev/null +++ b/lib/routes/unusualwhales/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Unusual Whales', + url: 'unusualwhales.com', +}; diff --git a/lib/routes/unusualwhales/news.ts b/lib/routes/unusualwhales/news.ts index b646af474..d29aa0050 100644 --- a/lib/routes/unusualwhales/news.ts +++ b/lib/routes/unusualwhales/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const apiBase = 'https://phx.unusualwhales.com'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['finance'], + example: '/unusualwhales/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['unusualwhales.com/news', 'unusualwhales.com/'], + }, + name: 'News Flow', + maintainers: ['TonyRL'], + handler, + url: 'unusualwhales.com/news', +}; + +async function handler() { const { data } = await got(`${apiBase}/api/fj_articles`); const items = data.map((item) => ({ @@ -13,12 +36,12 @@ export default async (ctx) => { pubDate: parseDate(item.publish_date), })); - ctx.set('data', { + return { title: 'Flow - News', description: 'Explore unusual options, options flow, dark pools, short activity, and stock activity on unusualwhales.com. Unusual whales has a full news service available!', link: 'https://unusualwhales.com/news-feed', image: 'https://unusualwhales.com/android-icon-192x192.png', language: 'en-US', item: items, - }); -}; + }; +} diff --git a/lib/routes/unusualwhales/radar.ts b/lib/routes/unusualwhales/radar.ts deleted file mode 100644 index 4523ff29d..000000000 --- a/lib/routes/unusualwhales/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'unusualwhales.com': { - _name: 'Unusual Whales', - '.': [ - { - title: 'News Flow', - docs: 'https://docs.rsshub.app/routes/finance#unusual-whales', - source: ['/news', '/'], - target: '/unusualwhales/news', - }, - ], - }, -}; diff --git a/lib/routes/unusualwhales/router.ts b/lib/routes/unusualwhales/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/unusualwhales/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/upc/jsj.ts b/lib/routes/upc/jsj.ts index 2b9f250ac..44ea81ee0 100644 --- a/lib/routes/upc/jsj.ts +++ b/lib/routes/upc/jsj.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 计算机科学与技术学院:http://computer.upc.edu.cn/ // - 学院新闻:http://computer.upc.edu.cn/6277/list.htm @@ -25,7 +26,28 @@ const HEAD = { notice: '通知公告', }; -export default async (ctx) => { +export const route: Route = { + path: '/jsj/:type', + categories: ['university'], + example: '/upc/jsj/news', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机科学与技术学院', + maintainers: ['Veagau'], + handler, + description: `| 学院新闻 | 学术关注 | 学工动态 | 通知公告 | + | -------- | -------- | -------- | -------- | + | news | scholar | states | notice |`, +}; + +async function handler(ctx) { const baseUrl = 'https://computer.upc.edu.cn'; const type = ctx.req.param('type'); const link = `${baseUrl}/${MAP[type]}/list.htm`; @@ -69,10 +91,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: HEAD[type] + `-计算机科学与技术学院`, link, description: HEAD[type] + `-计算机科学与技术学院`, item: out, - }); -}; + }; +} diff --git a/lib/routes/upc/main.ts b/lib/routes/upc/main.ts index e917f1c34..8e5d387d1 100644 --- a/lib/routes/upc/main.ts +++ b/lib/routes/upc/main.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; // 学校官网:http://www.upc.edu.cn/ import got from '@/utils/got'; @@ -16,7 +17,28 @@ const HEAD = { scholar: '学术动态', }; -export default async (ctx) => { +export const route: Route = { + path: '/main/:type', + categories: ['university'], + example: '/upc/main/notice', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '主页', + maintainers: ['Veagau'], + handler, + description: `| 通知公告 | 学术动态 | + | -------- | -------- | + | notice | scholar |`, +}; + +async function handler(ctx) { const baseUrl = 'https://news.upc.edu.cn'; const type = ctx.req.param('type'); const link = `${baseUrl}/${MAP[type]}.htm`; @@ -64,10 +86,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: HEAD[type] + `-中国石油大学(华东)`, link, description: HEAD[type] + `-中国石油大学(华东)`, item: out, - }); -}; + }; +} diff --git a/lib/routes/upc/maintainer.ts b/lib/routes/upc/maintainer.ts deleted file mode 100644 index cfeb91426..000000000 --- a/lib/routes/upc/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/main/:type': ['Veagau'], - '/jsj/:type': ['Veagau'], - '/yjs': ['shengmaosu'], -}; diff --git a/lib/routes/upc/namespace.ts b/lib/routes/upc/namespace.ts new file mode 100644 index 000000000..674da4911 --- /dev/null +++ b/lib/routes/upc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国石油大学(华东)', + url: 'computer.upc.edu.cn', +}; diff --git a/lib/routes/upc/radar.ts b/lib/routes/upc/radar.ts deleted file mode 100644 index 6fad09bd7..000000000 --- a/lib/routes/upc/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'upc.edu.cn': { - _name: '中国石油大学(华东)', - computer: [ - { - title: '计算机科学与技术学院学院新闻', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/6277/list.htm', '/'], - target: '/upc/jsj/news', - }, - { - title: '计算机科学与技术学院学术关注', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/6278/list.htm', '/'], - target: '/upc/jsj/scholar', - }, - { - title: '计算机科学与技术学院学工动态', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/6279/list.htm', '/'], - target: '/upc/jsj/states', - }, - { - title: '计算机科学与技术学院通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/6280/list.htm', '/'], - target: '/upc/jsj/notice', - }, - ], - news: [ - { - title: '主页通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/tzgg.htm', '/'], - target: '/upc/main/notice', - }, - { - title: '主页学术动态', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/xsdt.htm', '/'], - target: '/upc/main/scholar', - }, - ], - 'zs.gs': [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-shi-you-da-xue-hua-dong', - source: ['/sszs/list.htm', '/'], - target: '/upc/yjs', - }, - ], - }, -}; diff --git a/lib/routes/upc/router.ts b/lib/routes/upc/router.ts deleted file mode 100644 index 7c6e02ea0..000000000 --- a/lib/routes/upc/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/main/:type', './main'); - router.get('/jsj/:type', './jsj'); - router.get('/yjs', './yjs'); -}; diff --git a/lib/routes/upc/yjs.ts b/lib/routes/upc/yjs.ts index 722e542dc..99337337c 100644 --- a/lib/routes/upc/yjs.ts +++ b/lib/routes/upc/yjs.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/yjs', + categories: ['university'], + example: '/upc/yjs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zs.gs.upc.edu.cn/sszs/list.htm', 'zs.gs.upc.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['shengmaosu'], + handler, + url: 'zs.gs.upc.edu.cn/sszs/list.htm', +}; + +async function handler() { const baseUrl = 'http://zs.gs.upc.edu.cn'; const link = `${baseUrl}/sszs/list.htm`; const response = await got(link); const $ = load(response.data); const list = $('.list tr'); - ctx.set('data', { + return { title: '中国石油大学研究生院', link, description: '中国石油大学研究生院通知公告', @@ -24,5 +47,5 @@ export default async (ctx) => { pubDate: parseDate(item.find('div[style]').text()), }; }), - }); -}; + }; +} diff --git a/lib/routes/uptimerobot/maintainer.ts b/lib/routes/uptimerobot/maintainer.ts deleted file mode 100644 index f5daba4c0..000000000 --- a/lib/routes/uptimerobot/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/rss/:id/:routeParams?': ['Rongronggg9'], -}; diff --git a/lib/routes/uptimerobot/namespace.ts b/lib/routes/uptimerobot/namespace.ts new file mode 100644 index 000000000..5aa2a7698 --- /dev/null +++ b/lib/routes/uptimerobot/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Uptime Robot', + url: 'rss.uptimerobot.com', +}; diff --git a/lib/routes/uptimerobot/radar.ts b/lib/routes/uptimerobot/radar.ts deleted file mode 100644 index de008f5cd..000000000 --- a/lib/routes/uptimerobot/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'uptimerobot.com': { - _name: 'Uptime Robot', - rss: [ - { - title: 'RSS', - docs: 'https://docs.rsshub.app/routes/forecast#uptime-robot', - source: ['/:id'], - target: '/uptimerobot/rss/:id', - }, - ], - }, -}; diff --git a/lib/routes/uptimerobot/router.ts b/lib/routes/uptimerobot/router.ts deleted file mode 100644 index 42009a230..000000000 --- a/lib/routes/uptimerobot/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/rss/:id/:routeParams?', './rss'); -}; diff --git a/lib/routes/uptimerobot/rss.ts b/lib/routes/uptimerobot/rss.ts index 90c9b4f6f..c029925eb 100644 --- a/lib/routes/uptimerobot/rss.ts +++ b/lib/routes/uptimerobot/rss.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -53,7 +54,35 @@ class Monitor { const rootURL = 'https://rss.uptimerobot.com'; -export default async (ctx) => { +export const route: Route = { + path: '/rss/:id/:routeParams?', + categories: ['forecast'], + example: '/uptimerobot/rss/u358785-e4323652448755805d668f1a66506f2f', + parameters: { + id: 'the last part of your RSS URL (e.g. `u358785-e4323652448755805d668f1a66506f2f` for `https://rss.uptimerobot.com/u358785-e4323652448755805d668f1a66506f2f`)', + routeParams: 'extra parameters, see the table below', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['rss.uptimerobot.com/:id'], + target: '/rss/:id', + }, + name: 'RSS', + maintainers: ['Rongronggg9'], + handler, + description: `| Key | Description | Accepts | Defaults to | + | ------ | ------------------------------------------------------------------------ | -------------- | ----------- | + | showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const showID = fallback(undefined, queryToBoolean(routeParams.showID), true); @@ -119,11 +148,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Uptime Robot - RSS (enhanced)', description: rss.description, link: rssUrl, item: items, image: 'https://uptimerobot.com/favicon.ico', - }); -}; + }; +} diff --git a/lib/routes/uraaka-joshi/maintainer.ts b/lib/routes/uraaka-joshi/maintainer.ts deleted file mode 100644 index 37167d86d..000000000 --- a/lib/routes/uraaka-joshi/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['SettingDust', 'Halcao'], - '/:id': ['SettingDust', 'Halcao'], -}; diff --git a/lib/routes/uraaka-joshi/namespace.ts b/lib/routes/uraaka-joshi/namespace.ts new file mode 100644 index 000000000..64cd2fc39 --- /dev/null +++ b/lib/routes/uraaka-joshi/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '裏垢女子まとめ', + url: 'uraaka-joshi.com', +}; diff --git a/lib/routes/uraaka-joshi/radar.ts b/lib/routes/uraaka-joshi/radar.ts deleted file mode 100644 index 8f8453715..000000000 --- a/lib/routes/uraaka-joshi/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'uraaka-joshi.com': { - _name: '裏垢女子まとめ', - '.': [ - { - title: '主页', - docs: 'https://docs.rsshub.app/routes/other#li-gou-nu-zi-まとめ', - source: ['/'], - target: '/uraaka-joshi', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/other#li-gou-nu-zi-まとめ', - source: ['/:id'], - target: '/uraaka-joshi/:id', - }, - ], - }, -}; diff --git a/lib/routes/uraaka-joshi/router.ts b/lib/routes/uraaka-joshi/router.ts deleted file mode 100644 index 04e2762f0..000000000 --- a/lib/routes/uraaka-joshi/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './uraaka-joshi'); - router.get('/:id', './uraaka-joshi-user'); -}; diff --git a/lib/routes/uraaka-joshi/uraaka-joshi-user.ts b/lib/routes/uraaka-joshi/uraaka-joshi-user.ts index d984ee317..7fe6105cf 100644 --- a/lib/routes/uraaka-joshi/uraaka-joshi-user.ts +++ b/lib/routes/uraaka-joshi/uraaka-joshi-user.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['other'], + example: '/uraaka-joshi/_rrwq', + parameters: { id: 'User ID' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['uraaka-joshi.com/:id'], + }, + name: 'User', + maintainers: ['SettingDust', 'Halcao'], + handler, + url: 'uraaka-joshi.com/', +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://www.uraaka-joshi.com/user/${id}`; @@ -98,10 +121,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: $('title').text(), description: $('meta[name="description"]').attr('content'), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/uraaka-joshi/uraaka-joshi.ts b/lib/routes/uraaka-joshi/uraaka-joshi.ts index 50280bdb9..640e80fbb 100644 --- a/lib/routes/uraaka-joshi/uraaka-joshi.ts +++ b/lib/routes/uraaka-joshi/uraaka-joshi.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['uraaka-joshi.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['SettingDust', 'Halcao'], + handler, + url: 'uraaka-joshi.com/', +}; + +async function handler() { const link = `https://www.uraaka-joshi.com/`; const title = `裏垢女子まとめ`; @@ -39,7 +52,7 @@ export default async (ctx) => { const $ = load(html); const list = $('.grid-cell'); - ctx.set('data', { + return { title, link, item: @@ -86,5 +99,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/urbandictionary/maintainer.ts b/lib/routes/urbandictionary/maintainer.ts deleted file mode 100644 index b33980998..000000000 --- a/lib/routes/urbandictionary/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/random': ['TonyRL'], -}; diff --git a/lib/routes/urbandictionary/namespace.ts b/lib/routes/urbandictionary/namespace.ts new file mode 100644 index 000000000..abd6cae4a --- /dev/null +++ b/lib/routes/urbandictionary/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Urban Dictionary', + url: 'urbandictionary.com', +}; diff --git a/lib/routes/urbandictionary/radar.ts b/lib/routes/urbandictionary/radar.ts deleted file mode 100644 index d04ac7707..000000000 --- a/lib/routes/urbandictionary/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'urbandictionary.com': { - _name: 'Urban Dictionary', - '.': [ - { - title: 'Random words', - docs: 'https://docs.rsshub.app/routes/other#urban-dictionary', - source: ['/random.php', '/'], - target: '/urbandictionary/random', - }, - ], - }, -}; diff --git a/lib/routes/urbandictionary/random.ts b/lib/routes/urbandictionary/random.ts index 7ee5081fa..54354025c 100644 --- a/lib/routes/urbandictionary/random.ts +++ b/lib/routes/urbandictionary/random.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/random', + categories: ['other'], + example: '/urbandictionary/random', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['urbandictionary.com/random.php', 'urbandictionary.com/'], + }, + name: 'Random words', + maintainers: ['TonyRL'], + handler, + url: 'urbandictionary.com/random.php', +}; + +async function handler() { const baseUrl = 'https://www.urbandictionary.com'; const { data } = await got('https://api.urbandictionary.com/v0/random'); @@ -19,9 +42,9 @@ export default async (ctx) => { author: item.author, })); - ctx.set('data', { + return { title: 'Urban Dictionary: Random words', link: `${baseUrl}/random.php`, item: items, - }); -}; + }; +} diff --git a/lib/routes/urbandictionary/router.ts b/lib/routes/urbandictionary/router.ts deleted file mode 100644 index 240123336..000000000 --- a/lib/routes/urbandictionary/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/random', './random'); -}; diff --git a/lib/routes/usenix/maintainer.ts b/lib/routes/usenix/maintainer.ts deleted file mode 100644 index 9566bfca3..000000000 --- a/lib/routes/usenix/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/usenix-security-sympoium': ['ZeddYu'], -}; diff --git a/lib/routes/usenix/namespace.ts b/lib/routes/usenix/namespace.ts new file mode 100644 index 000000000..ab4fcb47e --- /dev/null +++ b/lib/routes/usenix/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'USENIX', + url: 'usenix.org', +}; diff --git a/lib/routes/usenix/radar.ts b/lib/routes/usenix/radar.ts deleted file mode 100644 index ee38a4bbb..000000000 --- a/lib/routes/usenix/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'usenix.org': { - _name: 'USENIX', - '.': [ - { - title: 'Security Symposia', - docs: 'https://docs.rsshub.app/routes/journal#usenix', - source: ['/conferences/all', '/conferences', '/'], - target: '/usenix/usenix-security-sympoium', - }, - ], - }, -}; diff --git a/lib/routes/usenix/router.ts b/lib/routes/usenix/router.ts deleted file mode 100644 index 7469da0b2..000000000 --- a/lib/routes/usenix/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/usenix-security-sympoium', './usenix'); -}; diff --git a/lib/routes/usenix/usenix.ts b/lib/routes/usenix/usenix.ts index a7eceb69d..df018b771 100644 --- a/lib/routes/usenix/usenix.ts +++ b/lib/routes/usenix/usenix.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,30 @@ import { parseDate } from '@/utils/parse-date'; const seasons = ['spring', 'summer', 'fall', 'winter']; -export default async (ctx) => { +export const route: Route = { + path: '/usenix-security-sympoium', + categories: ['journal'], + example: '/usenix/usenix-security-sympoium', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['usenix.org/conferences/all', 'usenix.org/conferences', 'usenix.org/'], + }, + name: 'Security Symposia', + maintainers: ['ZeddYu'], + handler, + url: 'usenix.org/conferences/all', + description: `Return results from 2020`, +}; + +async function handler() { const last = new Date().getFullYear() + 1; const urlList = Array.from({ length: last - 2020 }, (_, v) => `${url}/conference/usenixsecurity${v + 20}`).flatMap((url) => seasons.map((season) => `${url}/${season}-accepted-papers`)); const responses = await got.all( @@ -49,11 +73,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'USENIX', link: url, description: 'USENIX Security Symposium Accpeted Papers', allowEmpty: true, item: items, - }); -}; + }; +} diff --git a/lib/routes/usepanda/index.ts b/lib/routes/usepanda/index.ts index d611f4723..aad60e226 100644 --- a/lib/routes/usepanda/index.ts +++ b/lib/routes/usepanda/index.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/feeds/:id', + categories: ['other'], + example: '/usepanda/feeds/5718e53e7a84fb1901e059cc', + parameters: { id: 'Feed ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Feeds', + maintainers: ['lyrl'], + handler, + description: `| Channel | feedId | + | ------- | ------------------------ | + | Github | 5718e53e7a84fb1901e059cc |`, +}; + +async function handler(ctx) { const feedId = ctx.req.param('id'); const limit = ctx.req.query('limit') ?? 30; // 默认30条 @@ -18,9 +40,9 @@ export default async (ctx) => { description: item.description, })); - ctx.set('data', { + return { title: 'Panda Feeds', link: 'https://usepanda.com/', item: items, - }); -}; + }; +} diff --git a/lib/routes/usepanda/maintainer.ts b/lib/routes/usepanda/maintainer.ts deleted file mode 100644 index 8908d325c..000000000 --- a/lib/routes/usepanda/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/feeds/:id': ['lyrl'], -}; diff --git a/lib/routes/usepanda/namespace.ts b/lib/routes/usepanda/namespace.ts new file mode 100644 index 000000000..842d79ba5 --- /dev/null +++ b/lib/routes/usepanda/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Panda', + url: 'usepanda.com', +}; diff --git a/lib/routes/usepanda/radar.ts b/lib/routes/usepanda/radar.ts deleted file mode 100644 index acff7104e..000000000 --- a/lib/routes/usepanda/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'usepanda.com': { - _name: 'Panda', - '.': [ - { - title: 'Feeds', - docs: 'https://docs.rsshub.app/routes/other#panda', - }, - ], - }, -}; diff --git a/lib/routes/usepanda/router.ts b/lib/routes/usepanda/router.ts deleted file mode 100644 index b76ebb1c6..000000000 --- a/lib/routes/usepanda/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/feeds/:id', './index'); -}; diff --git a/lib/routes/ustb/maintainer.ts b/lib/routes/ustb/maintainer.ts deleted file mode 100644 index 4dc4cbd1e..000000000 --- a/lib/routes/ustb/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/tj/news/:type?': ['henbf'], - '/yjsy/news/:type': ['DA1Y1'], - '/yzxc/tzgg': ['yanbot-team'], -}; diff --git a/lib/routes/ustb/namespace.ts b/lib/routes/ustb/namespace.ts new file mode 100644 index 000000000..1bd487063 --- /dev/null +++ b/lib/routes/ustb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '北京科技大学', + url: 'gs.ustb.edu.cn', +}; diff --git a/lib/routes/ustb/radar.ts b/lib/routes/ustb/radar.ts deleted file mode 100644 index 93fec8a0b..000000000 --- a/lib/routes/ustb/radar.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default { - 'ustb.edu.cn': { - _name: '北京科技大学', - gs: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-ke-ji-da-xue', - source: '/:type', - target: '/ustb/yjsy/news/:type', - }, - ], - tj: [ - { - title: '天津学院', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-ke-ji-da-xue', - source: ['/*'], - target: '/ustb/tj/news/all', - }, - ], - yzxc: [ - { - title: '研究生招生信息网', - docs: 'https://docs.rsshub.app/routes/university#bei-jing-ke-ji-da-xue-yan-jiu-sheng-zhao-sheng-xin-xi-wang', - source: '/', - target: '/ustb/yzxc/tzgg', - }, - ], - }, -}; diff --git a/lib/routes/ustb/router.ts b/lib/routes/ustb/router.ts deleted file mode 100644 index d3d1456b1..000000000 --- a/lib/routes/ustb/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/tj/news/:type?', './tj/news'); - router.get('/yjsy/news/:type', './yjsy/news'); - router.get('/yzxc/tzgg', './yzxc/tzgg'); -}; diff --git a/lib/routes/ustb/tj/news.ts b/lib/routes/ustb/tj/news.ts index 8a663cb30..fd3f65897 100644 --- a/lib/routes/ustb/tj/news.ts +++ b/lib/routes/ustb/tj/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -30,7 +31,28 @@ function getNews(data) { })); } -export default async (ctx) => { +export const route: Route = { + path: '/tj/news/:type?', + categories: ['university'], + example: '/ustb/tj/news/all', + parameters: { type: '默认为 `all`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '天津学院', + maintainers: ['henbf'], + handler, + description: `| 全部 | 学院新闻 | 学术活动 | 城市建设学院 | 信息工程学院 | 经济学院 | 管理学院 | 材料系 | 机械工程系 | 护理系 | 法律系 | 外语系 | 艺术系 | + | ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ | + | all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx |`, +}; + +async function handler(ctx) { let type = ctx.req.param('type') || 'all'; if (!Object.keys(maps).includes(type)) { type = 'all'; @@ -58,4 +80,4 @@ export default async (ctx) => { } ctx.set('data', responseData); -}; +} diff --git a/lib/routes/ustb/yjsy/news.ts b/lib/routes/ustb/yjsy/news.ts index 03289fafc..41592ea11 100644 --- a/lib/routes/ustb/yjsy/news.ts +++ b/lib/routes/ustb/yjsy/news.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; import { parseDate } from '@/utils/parse-date'; // import logger from '@/utils/logger'; -export default async (ctx) => { +export const route: Route = { + path: '/yjsy/news/:type', + categories: ['university'], + example: '/ustb/yjsy/news/all', + parameters: { type: '文章类别' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.ustb.edu.cn/:type'], + }, + name: '研究生院', + maintainers: ['DA1Y1'], + handler, + description: `| 北京科技大学研究生院 | 土木与资源工程学院 | 能源与环境工程学院 | 冶金与生态工程学院 | 材料科学与工程学院 | 机械工程学院 | 自动化学院 | 计算机与通信工程学院 | 数理学院 | 化学与生物工程学院 | 经济管理学院 | 文法学院 | 马克思主义学院 | 外国语学院 | 国家材料服役安全科学中心 | 新金属材料国家重点实验室 | 工程技术研究院 | 钢铁共性技术协同创新中心 | 钢铁冶金新技术国家重点实验室 | 新材料技术研究院 | 科技史与文化遗产研究院 | 顺德研究生院 | + | -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ | + | all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const struct = { all: { @@ -401,7 +426,7 @@ export default async (ctx) => { // logger.info("list:" + list); // 处理返回 - ctx.set('data', { + return { title: struct[type].name, link: struct[type].link, description: '北京科技大学研究生院', @@ -453,5 +478,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/ustb/yzxc/tzgg.ts b/lib/routes/ustb/yzxc/tzgg.ts index 41734e73a..0c263a64d 100644 --- a/lib/routes/ustb/yzxc/tzgg.ts +++ b/lib/routes/ustb/yzxc/tzgg.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://yzxc.ustb.edu.cn'; const url = `${host}/tzgg/index.htm`; -export default async (ctx) => { +export const route: Route = { + path: '/yzxc/tzgg', + categories: ['university'], + example: '/ustb/yzxc/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yzxc.ustb.edu.cn/'], + }, + name: '研究生招生信息网', + maintainers: ['yanbot-team'], + handler, + url: 'yzxc.ustb.edu.cn/', +}; + +async function handler() { const response = await got(url); const $ = load(response.data); const list = $('.page_content .ul-inline .box'); @@ -41,10 +64,10 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: '北京科技大学研究生招生信息网 - 通知公告', link: url, description: '北京科技大学研究生招生信息网 - 通知公告', item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/eeis.ts b/lib/routes/ustc/eeis.ts index 984757b32..a8004877c 100644 --- a/lib/routes/ustc/eeis.ts +++ b/lib/routes/ustc/eeis.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,33 @@ const map = new Map([ const host = 'https://eeis.ustc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/eeis/:type?', + categories: ['university'], + example: '/ustc/eeis/tzgg', + parameters: { type: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['eeis.ustc.edu.cn/'], + target: '/eeis', + }, + name: '电子工程与信息科学系', + maintainers: ['jasongzy'], + handler, + url: 'eeis.ustc.edu.cn/', + description: `| 通知公告 | 新闻信息 | + | -------- | -------- | + | tzgg | xwxx |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'tzgg'; const info = map.get(type); if (!info) { @@ -53,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: info.title, link: `${host}/${id}/list.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/gs.ts b/lib/routes/ustc/gs.ts index e2e0c920c..b574000ec 100644 --- a/lib/routes/ustc/gs.ts +++ b/lib/routes/ustc/gs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,33 @@ const map = new Map([ const host = 'https://gradschool.ustc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/gs/:type?', + categories: ['university'], + example: '/ustc/gs/tzgg', + parameters: { type: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gradschool.ustc.edu.cn/'], + target: '/gs', + }, + name: '研究生院', + maintainers: ['jasongzy'], + handler, + url: 'gradschool.ustc.edu.cn/', + description: `| 通知公告 | 新闻动态 | + | -------- | -------- | + | tzgg | xwdt |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'tzgg'; const info = map.get(type); if (!info) { @@ -52,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: info.title, link: `${host}/column/${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/index.ts b/lib/routes/ustc/index.ts index 8caa00bac..a68bb2587 100644 --- a/lib/routes/ustc/index.ts +++ b/lib/routes/ustc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -26,7 +27,33 @@ const notice_type = { // }); // } -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/ustc/news/gl', + parameters: { type: '分类,默认为管理类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ustc.edu.cn/'], + target: '/news', + }, + name: '官网通知公告', + maintainers: ['hang333', 'jasongzy'], + handler, + url: 'ustc.edu.cn/', + description: `| 教学类 | 科研类 | 管理类 | 服务类 | + | ------ | ------ | ------ | ------ | + | jx | ky | gl | fw |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'gl'; // 发起 HTTP GET 请求 const response = await got({ @@ -70,10 +97,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: notice_type[type].title, description: notice_type[type].title, link: notice_type[type].url, item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/job.ts b/lib/routes/ustc/job.ts index f739d7553..ab29cb937 100644 --- a/lib/routes/ustc/job.ts +++ b/lib/routes/ustc/job.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -9,7 +10,33 @@ const titles = { joblist2: '招聘公告', }; -export default async (ctx) => { +export const route: Route = { + path: '/job/:category?', + categories: ['university'], + example: '/ustc/job', + parameters: { category: '分类,见下表,默认为招聘公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['job.ustc.edu.cn/'], + target: '/job', + }, + name: '就业信息网', + maintainers: ['nczitzk'], + handler, + url: 'job.ustc.edu.cn/', + description: `| 专场招聘会 | 校园双选会 | 空中宣讲 | 招聘公告 | + | ----------- | ------------ | --------- | -------- | + | RecruitList | Doublechoice | Broadcast | joblist2 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'joblist2'; const rand = 0.012_345_678_901_234_56; @@ -186,9 +213,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${titles[category]} - 中国科学技术大学就业信息网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/jwc.ts b/lib/routes/ustc/jwc.ts index 310818c93..c530fe04a 100644 --- a/lib/routes/ustc/jwc.ts +++ b/lib/routes/ustc/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,33 @@ import timezone from '@/utils/timezone'; const noticeUrl = 'https://www.teach.ustc.edu.cn/category/notice'; const noticeType = { teaching: '教学', info: '信息', exam: '考试', exchange: '交流' }; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/ustc/jwc/info', + parameters: { type: '分类,默认显示所有种类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.teach.ustc.edu.cn/'], + target: '/jwc', + }, + name: '教务处通知新闻', + maintainers: ['hang333'], + handler, + url: 'www.teach.ustc.edu.cn/', + description: `| 信息 | 教学 | 考试 | 交流 | + | ---- | -------- | ---- | -------- | + | info | teaching | exam | exchange |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? ''; // 发起 HTTP GET 请求 const response = await got({ @@ -48,10 +75,10 @@ export default async (ctx) => { const desc = type === '' ? '中国科学技术大学教务处 - 通知新闻' : `中国科学技术大学教务处 - ${noticeType[type]}类通知`; - ctx.set('data', { + return { title: desc, description: desc, link: `${noticeUrl}${type === '' ? '' : '-' + type}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ustc/maintainer.ts b/lib/routes/ustc/maintainer.ts deleted file mode 100644 index a5ac9e46e..000000000 --- a/lib/routes/ustc/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/eeis/:type?': ['jasongzy'], - '/gs/:type?': ['jasongzy'], - '/job/:category?': ['nczitzk'], - '/jwc/:type?': ['hang333'], - '/news/:type?': ['hang333', 'jasongzy'], - '/sist/:type?': ['jasongzy'], -}; diff --git a/lib/routes/ustc/namespace.ts b/lib/routes/ustc/namespace.ts new file mode 100644 index 000000000..24a29b4bb --- /dev/null +++ b/lib/routes/ustc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国科学技术大学', + url: 'ustc.edu.cn', +}; diff --git a/lib/routes/ustc/radar.ts b/lib/routes/ustc/radar.ts deleted file mode 100644 index 8722a94cb..000000000 --- a/lib/routes/ustc/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'ustc.edu.cn': { - _name: '中国科学技术大学', - '.': [ - { - title: '官网通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/news', - }, - ], - 'www.teach': [ - { - title: '教务处通知新闻', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/jwc', - }, - ], - job: [ - { - title: '就业信息网', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/job', - }, - ], - gradschool: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/gs', - }, - ], - sist: [ - { - title: '信息科学技术学院', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/sist', - }, - ], - eeis: [ - { - title: '电子工程与信息科学系', - docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-ji-shu-da-xue', - source: '/', - target: '/ustc/eeis', - }, - ], - }, -}; diff --git a/lib/routes/ustc/router.ts b/lib/routes/ustc/router.ts deleted file mode 100644 index d08b42348..000000000 --- a/lib/routes/ustc/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/eeis/:type?', './eeis'); - router.get('/gs/:type?', './gs'); - router.get('/job/:category?', './job'); - router.get('/jwc/:type?', './jwc'); - router.get('/news/:type?', './index'); - router.get('/sist/:type?', './sist'); -}; diff --git a/lib/routes/ustc/sist.ts b/lib/routes/ustc/sist.ts index 80a06dea1..f90c3a7e7 100644 --- a/lib/routes/ustc/sist.ts +++ b/lib/routes/ustc/sist.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,33 @@ const map = new Map([ const host = 'https://sist.ustc.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/sist/:type?', + categories: ['university'], + example: '/ustc/sist/tzgg', + parameters: { type: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['sist.ustc.edu.cn/'], + target: '/sist', + }, + name: '信息科学技术学院', + maintainers: ['jasongzy'], + handler, + url: 'sist.ustc.edu.cn/', + description: `| 通知公告 | 招生工作 | + | -------- | -------- | + | tzgg | zsgz |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'tzgg'; const info = map.get(type); if (!info) { @@ -53,9 +80,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: info.title, link: `${host}/${id}/list.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/usts/jwch.ts b/lib/routes/usts/jwch.ts index 3591c544d..e9bf36669 100644 --- a/lib/routes/usts/jwch.ts +++ b/lib/routes/usts/jwch.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; const rootURL = 'http://jwch.usts.edu.cn/index'; -export default async (ctx) => { +export const route: Route = { + path: '/jwch/:type?', + categories: ['university'], + example: '/usts/jwch', + parameters: { type: '类型,默认为教务动态' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: [], + handler, + description: `| 类型 | 教务动态 | 公告在线 | 选课通知 | + | ---- | -------- | -------- | -------- | + | | jwdt | ggzx | xktz |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'jwdt'; const url = `${rootURL}/${type}.htm`; const response = await got(url); @@ -46,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `苏州科技大学 教务处 - ${title}`, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/usts/maintainer.ts b/lib/routes/usts/maintainer.ts deleted file mode 100644 index da6c811d0..000000000 --- a/lib/routes/usts/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/juch/:type?': ['Fatpandac'], -}; diff --git a/lib/routes/usts/namespace.ts b/lib/routes/usts/namespace.ts new file mode 100644 index 000000000..46ea0e79c --- /dev/null +++ b/lib/routes/usts/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '苏州科技大学', + url: 'jwch.usts.edu.cn', +}; diff --git a/lib/routes/usts/radar.ts b/lib/routes/usts/radar.ts deleted file mode 100644 index f6c906705..000000000 --- a/lib/routes/usts/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'usts.edu.cn': { - _name: '苏州科技大学', - jwch: [ - { - title: '教务动态', - docs: 'https://docs.rsshub.app/routes/university#su-zhou-ke-ji-da-xue', - source: ['/jwdt.htm'], - target: '/wsts/jwch/jwdt', - }, - { - title: '公告在线', - docs: 'https://docs.rsshub.app/routes/university#su-zhou-ke-ji-da-xue', - source: ['/ggzx.htm'], - target: '/wsts/jwch/ggzx', - }, - { - title: '选课通知', - docs: 'https://docs.rsshub.app/routes/university#su-zhou-ke-ji-da-xue', - source: ['/xktz.htm'], - target: '/wsts/jwch/xktz', - }, - ], - }, -}; diff --git a/lib/routes/usts/router.ts b/lib/routes/usts/router.ts deleted file mode 100644 index 5dd0cc833..000000000 --- a/lib/routes/usts/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jwch/:type?', './jwch'); -}; diff --git a/lib/routes/utgd/category.ts b/lib/routes/utgd/category.ts index dd9e1eba5..2783b3d61 100644 --- a/lib/routes/utgd/category.ts +++ b/lib/routes/utgd/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,32 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['new-media'], + example: '/utgd/method', + parameters: { category: '分类,可在对应分类页的 URL 中找到,默认为方法' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['utgd.net/category/s/:category', 'utgd.net/'], + target: '/:category', + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 方法 | 观点 | + | ------ | ------- | + | method | opinion |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'method'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -64,11 +90,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `UNTAG - ${data.category_name}`, link: currentUrl, item: items, image: data.category_image, description: data.category_description, - }); -}; + }; +} diff --git a/lib/routes/utgd/maintainer.ts b/lib/routes/utgd/maintainer.ts deleted file mode 100644 index d892ffb29..000000000 --- a/lib/routes/utgd/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/timeline': ['nczitzk'], - '/topic/:topic?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/utgd/namespace.ts b/lib/routes/utgd/namespace.ts new file mode 100644 index 000000000..e60baf5b2 --- /dev/null +++ b/lib/routes/utgd/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'UNTAG', + url: 'utgd.net', +}; diff --git a/lib/routes/utgd/radar.ts b/lib/routes/utgd/radar.ts deleted file mode 100644 index 8580bbf9d..000000000 --- a/lib/routes/utgd/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'utgd.net': { - _name: 'UNTAG', - '.': [ - { - title: '时间线', - docs: 'https://docs.rsshub.app/routes/new-media#untag-shi-jian-xian', - source: ['/'], - target: '/utgd/timeline', - }, - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#untag-fen-lei', - source: ['/category/s/:category', '/'], - target: '/utgd/:category', - }, - { - title: '专题', - docs: 'https://docs.rsshub.app/routes/new-media#untag-zhuan-ti', - source: ['/topic', '/'], - target: '/utgd/topic/:topic', - }, - ], - }, -}; diff --git a/lib/routes/utgd/router.ts b/lib/routes/utgd/router.ts deleted file mode 100644 index cf27f6c7d..000000000 --- a/lib/routes/utgd/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/timeline', './timeline'); - router.get('/topic/:topic?', './topic'); - router.get('/:category?', './category'); -}; diff --git a/lib/routes/utgd/timeline.ts b/lib/routes/utgd/timeline.ts index 1e8bf6611..221a70071 100644 --- a/lib/routes/utgd/timeline.ts +++ b/lib/routes/utgd/timeline.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,29 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/timeline', + categories: ['new-media'], + example: '/utgd/timeline', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['utgd.net/'], + }, + name: '时间线', + maintainers: ['nczitzk'], + handler, + url: 'utgd.net/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; const rootUrl = 'https://utgd.net'; @@ -52,9 +75,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'UNTAG', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/utgd/topic.ts b/lib/routes/utgd/topic.ts index 776fa4dd2..46eb6e6c0 100644 --- a/lib/routes/utgd/topic.ts +++ b/lib/routes/utgd/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,34 @@ const md = MarkdownIt({ html: true, }); -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topic?', + categories: ['new-media'], + example: '/utgd/topic/在线阅读专栏', + parameters: { topic: '专题,默认为在线阅读专栏' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['utgd.net/topic', 'utgd.net/'], + target: '/topic/:topic', + }, + name: '专题', + maintainers: ['nczitzk'], + handler, + url: 'utgd.net/topic', + description: `| 在线阅读专栏 | 卡片笔记专题 | + | ------------ | ------------ | + + 更多专栏请见 [专题广场](https://utgd.net/topic)`, +}; + +async function handler(ctx) { const topic = ctx.req.param('topic') ?? '在线阅读专栏'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -67,10 +95,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `UNTAG - ${topicItem.title}`, link: currentUrl, item: items, description: topicItem.summary, - }); -}; + }; +} diff --git a/lib/routes/uw/gix/news.ts b/lib/routes/uw/gix/news.ts index 063f6c56a..f0d5b8072 100644 --- a/lib/routes/uw/gix/news.ts +++ b/lib/routes/uw/gix/news.ts @@ -1,10 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const gixBaseURL = 'https://gixnetwork.org'; -export default async (ctx) => { +export const route: Route = { + path: '/gix/news/:category', + categories: ['university'], + example: '/uw/gix/news/blog', + parameters: { category: 'Blog Type' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gixnetwork.org/news/:category'], + }, + name: 'Global Innovation Exchange News', + maintainers: ['dykderrick'], + handler, + description: `| Blog | In The News | + | ---- | ----------- | + | blog | inthenews |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); let newsURL = gixBaseURL + '/news'; @@ -60,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feedTitle, link: newsURL, item: itemContent, - }); -}; + }; +} diff --git a/lib/routes/uw/maintainer.ts b/lib/routes/uw/maintainer.ts deleted file mode 100644 index f73e29b66..000000000 --- a/lib/routes/uw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/gix/news/:category': ['dykderrick'], -}; diff --git a/lib/routes/uw/namespace.ts b/lib/routes/uw/namespace.ts new file mode 100644 index 000000000..fc54dfa7c --- /dev/null +++ b/lib/routes/uw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'University of Washington', + url: 'gixnetwork.org', +}; diff --git a/lib/routes/uw/radar.ts b/lib/routes/uw/radar.ts deleted file mode 100644 index 6f84ffb71..000000000 --- a/lib/routes/uw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'gixnetwork.org': { - _name: 'University of Washington', - '.': [ - { - title: 'Global Innovation Exchange News', - docs: 'https://docs.rsshub.app/routes/university#university-of-washington', - source: ['/news/:category'], - target: '/uw/gix/news/:category', - }, - ], - }, -}; diff --git a/lib/routes/uw/router.ts b/lib/routes/uw/router.ts deleted file mode 100644 index 06be729b7..000000000 --- a/lib/routes/uw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/gix/news/:category', './gix/news'); -}; diff --git a/lib/routes/v1tx/index.ts b/lib/routes/v1tx/index.ts index a4c3e38fa..cce5b7e87 100644 --- a/lib/routes/v1tx/index.ts +++ b/lib/routes/v1tx/index.ts @@ -1,9 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['v1tx.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'v1tx.com/', +}; + +async function handler() { const baseUrl = 'https://www.v1tx.com'; const { data: response } = await got(baseUrl); @@ -46,11 +59,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), link: baseUrl, image: `${baseUrl}/wp-content/uploads/2018/10/cropped-Favicon.webp`, item: items, - }); -}; + }; +} diff --git a/lib/routes/v1tx/maintainer.ts b/lib/routes/v1tx/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/v1tx/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/v1tx/namespace.ts b/lib/routes/v1tx/namespace.ts new file mode 100644 index 000000000..760820d3a --- /dev/null +++ b/lib/routes/v1tx/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'v1tx', + url: 'v1tx.com', +}; diff --git a/lib/routes/v1tx/radar.ts b/lib/routes/v1tx/radar.ts deleted file mode 100644 index 63db559fe..000000000 --- a/lib/routes/v1tx/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'v1tx.com': { - _name: 'v1tx', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/blog#v1tx', - source: ['/'], - target: '/v1tx', - }, - ], - }, -}; diff --git a/lib/routes/v1tx/router.ts b/lib/routes/v1tx/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/v1tx/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/v2ex/maintainer.ts b/lib/routes/v2ex/maintainer.ts deleted file mode 100644 index 6082b581a..000000000 --- a/lib/routes/v2ex/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/post/:postid': ['kt286'], - '/tab/:tabid': ['liyefox'], - '/topics/:type': ['WhiteWorld'], -}; diff --git a/lib/routes/v2ex/namespace.ts b/lib/routes/v2ex/namespace.ts new file mode 100644 index 000000000..dcfbbd040 --- /dev/null +++ b/lib/routes/v2ex/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'V2EX', + url: 'v2ex.com', +}; diff --git a/lib/routes/v2ex/post.ts b/lib/routes/v2ex/post.ts index 04860a977..da113e743 100644 --- a/lib/routes/v2ex/post.ts +++ b/lib/routes/v2ex/post.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/post/:postid', + categories: ['bbs'], + example: '/v2ex/post/584403', + parameters: { postid: '帖子ID,在 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['v2ex.com/t/:postid'], + }, + name: '帖子', + maintainers: ['kt286'], + handler, +}; + +async function handler(ctx) { const postid = ctx.req.param('postid'); const pageUrl = `https://www.v2ex.com/t/${postid}`; @@ -19,7 +41,7 @@ export default async (ctx) => { const topic = topicResponse[0]; - ctx.set('data', { + return { title: `V2EX-${topic.title}`, link: pageUrl, description: topic.content, @@ -31,5 +53,5 @@ export default async (ctx) => { pubDate: parseDate(item.created, 'X'), })), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/v2ex/radar.ts b/lib/routes/v2ex/radar.ts deleted file mode 100644 index fbcedde53..000000000 --- a/lib/routes/v2ex/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'v2ex.com': { - _name: 'V2EX', - '.': [ - { - title: '最热 / 最新主题', - docs: 'https://docs.rsshub.app/routes/v2ex', - source: ['/'], - target: (_, url) => { - const { searchParams } = new URL(url); - if (searchParams.get('tab') === 'all' || searchParams.get('tab') === 'hot') { - return `/v2ex/topics/${searchParams.get('tab')?.replace('all', 'latest')}`; - } - }, - }, - { - title: '帖子', - docs: 'https://docs.rsshub.app/routes/v2ex', - source: ['/t/:postid'], - target: '/v2ex/post/:postid', - }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/v2ex', - source: ['/'], - target: (_, url) => { - const { searchParams } = new URL(url); - if (searchParams.get('tab') && searchParams.get('tab') !== 'all' && searchParams.get('tab') !== 'hot') { - return `/v2ex/tab/${searchParams.get('tab')}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/v2ex/router.ts b/lib/routes/v2ex/router.ts deleted file mode 100644 index dc9cc48f8..000000000 --- a/lib/routes/v2ex/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/post/:postid', './post'); - router.get('/tab/:tabid', './tab'); - router.get('/topics/:type', './topics'); -}; diff --git a/lib/routes/v2ex/tab.ts b/lib/routes/v2ex/tab.ts index 75848d7e8..a0ba456e0 100644 --- a/lib/routes/v2ex/tab.ts +++ b/lib/routes/v2ex/tab.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/tab/:tabid', + categories: ['bbs'], + example: '/v2ex/tab/hot', + parameters: { tabid: 'tab标签ID,在 URL 可以找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '标签', + maintainers: ['liyefox'], + handler, +}; + +async function handler(ctx) { const tabid = ctx.req.param('tabid'); const host = 'https://v2ex.com'; const pageUrl = `${host}/?tab=${tabid}`; @@ -48,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `V2EX-${tabid}`, link: pageUrl, description: `V2EX-tab-${tabid}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/v2ex/topics.ts b/lib/routes/v2ex/topics.ts index 31db8d06e..57c4daa31 100644 --- a/lib/routes/v2ex/topics.ts +++ b/lib/routes/v2ex/topics.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/topics/:type', + categories: ['bbs'], + example: '/v2ex/topics/latest', + parameters: { type: 'hot 或 latest' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最热 / 最新主题', + maintainers: ['WhiteWorld'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const { data } = await got(`https://www.v2ex.com/api/topics/${type}.json`); @@ -13,7 +32,7 @@ export default async (ctx) => { title = '最新主题'; } - ctx.set('data', { + return { title: `V2EX-${title}`, link: 'https://www.v2ex.com/', description: `V2EX-${title}`, @@ -26,5 +45,5 @@ export default async (ctx) => { author: item.member.username, comments: item.replies, })), - }); -}; + }; +} diff --git a/lib/routes/v2rayshare/index.ts b/lib/routes/v2rayshare/index.ts index d993b5be3..ae5615e4f 100644 --- a/lib/routes/v2rayshare/index.ts +++ b/lib/routes/v2rayshare/index.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // 自订的 got import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['v2rayshare.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['77taibai'], + handler, + url: 'v2rayshare.com/', +}; + +async function handler() { const { data: response } = await got('https://v2rayshare.com/wp-json/wp/v2/posts/?per_page=10'); const items = response.map((item) => ({ @@ -13,10 +26,10 @@ export default async (ctx) => { description: item.content.rendered, })); - ctx.set('data', { + return { title: 'V2rayShare', link: 'https://v2rayshare.com/', description: '免费节点分享网站', item: items, - }); -}; + }; +} diff --git a/lib/routes/v2rayshare/maintainer.ts b/lib/routes/v2rayshare/maintainer.ts deleted file mode 100644 index 00c7ddb54..000000000 --- a/lib/routes/v2rayshare/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['77taibai'], -}; diff --git a/lib/routes/v2rayshare/namespace.ts b/lib/routes/v2rayshare/namespace.ts new file mode 100644 index 000000000..dd6eb50b2 --- /dev/null +++ b/lib/routes/v2rayshare/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'V2rayShare', + url: 'v2rayshare.com', +}; diff --git a/lib/routes/v2rayshare/radar.ts b/lib/routes/v2rayshare/radar.ts deleted file mode 100644 index f1b977eb8..000000000 --- a/lib/routes/v2rayshare/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'v2rayshare.com': { - _name: 'V2rayShare', - '.': [ - { - title: '免费节点', - docs: 'https://docs.rsshub.app/routes/other#v2rayshare', - source: ['/'], - target: '/v2rayshare', - }, - ], - }, -}; diff --git a/lib/routes/v2rayshare/router.ts b/lib/routes/v2rayshare/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/v2rayshare/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/vcb-s/category.ts b/lib/routes/vcb-s/category.ts index ba64bae5d..9e4e01401 100644 --- a/lib/routes/vcb-s/category.ts +++ b/lib/routes/vcb-s/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,32 @@ const rootUrl = 'https://vcb-s.com'; const cateAPIUrl = `${rootUrl}/wp-json/wp/v2/categories`; const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; -export default async (ctx) => { +export const route: Route = { + path: '/category/:cate', + categories: ['anime'], + example: '/vcb-s/category/works', + parameters: { cate: '分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vcb-s.com/archives/category/:cate'], + }, + name: '分类文章', + maintainers: ['cxfksword'], + handler, + url: 'vcb-s.com/', + description: `| 作品项目 | 科普系列 | 计划与日志 | + | -------- | -------- | ---------- | + | works | kb | planlog |`, +}; + +async function handler(ctx) { const cate = ctx.req.param('cate'); const limit = ctx.req.query('limit') ?? 7; @@ -47,9 +73,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${category.name} | VCB-Studio`, link: `${rootUrl}/archives/category/${category.slug}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/vcb-s/index.ts b/lib/routes/vcb-s/index.ts index 94742a69e..eeb2cce34 100644 --- a/lib/routes/vcb-s/index.ts +++ b/lib/routes/vcb-s/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,19 @@ import * as path from 'node:path'; const rootUrl = 'https://vcb-s.com'; const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['vcb-s.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cxfksword'], + handler, + url: 'vcb-s.com/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ?? 7; const url = `${postsAPIUrl}?per_page=${limit}&_embed`; @@ -34,9 +47,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'VCB-Studio - 大家一起实现的故事!', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/vcb-s/maintainer.ts b/lib/routes/vcb-s/maintainer.ts deleted file mode 100644 index d90e1a796..000000000 --- a/lib/routes/vcb-s/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['cxfksword'], - '/category/:cate': ['cxfksword'], -}; diff --git a/lib/routes/vcb-s/namespace.ts b/lib/routes/vcb-s/namespace.ts new file mode 100644 index 000000000..f4e390819 --- /dev/null +++ b/lib/routes/vcb-s/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'VCB-Studio', + url: 'vcb-s.com', +}; diff --git a/lib/routes/vcb-s/radar.ts b/lib/routes/vcb-s/radar.ts deleted file mode 100644 index 04bf81aae..000000000 --- a/lib/routes/vcb-s/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'vcb-s.com': { - _name: 'VCB-Studio', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/anime#vcb-studio', - source: ['/'], - target: '/vcb-s', - }, - { - title: '分类文章', - docs: 'https://docs.rsshub.app/routes/anime#vcb-studio', - source: ['/archives/category/:cate'], - target: '/vcb-s/category/:cate', - }, - ], - }, -}; diff --git a/lib/routes/vcb-s/router.ts b/lib/routes/vcb-s/router.ts deleted file mode 100644 index 1cde93eab..000000000 --- a/lib/routes/vcb-s/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/category/:cate', './category'); -}; diff --git a/lib/routes/verfghbw/maintainer.ts b/lib/routes/verfghbw/maintainer.ts deleted file mode 100644 index 62a439031..000000000 --- a/lib/routes/verfghbw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/press/:keyword?': ['quinn-dev'], -}; diff --git a/lib/routes/verfghbw/namespace.ts b/lib/routes/verfghbw/namespace.ts new file mode 100644 index 000000000..d60b596ac --- /dev/null +++ b/lib/routes/verfghbw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Constitutional Court of Baden-Württemberg (Germany)', + url: 'verfgh.baden-wuerttemberg.de', +}; diff --git a/lib/routes/verfghbw/press.ts b/lib/routes/verfghbw/press.ts index 4e8e64271..b62d98efe 100644 --- a/lib/routes/verfghbw/press.ts +++ b/lib/routes/verfghbw/press.ts @@ -1,8 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/press/:keyword?', + categories: ['government'], + example: '/verfghbw/press', + parameters: { keyword: 'Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['verfgh.baden-wuerttemberg.de/de/presse-und-service/pressemitteilungen/'], + target: '/press', + }, + name: 'Press releases', + maintainers: ['quinn-dev'], + handler, + url: 'verfgh.baden-wuerttemberg.de/de/presse-und-service/pressemitteilungen/', +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const rootUrl = 'https://verfgh.baden-wuerttemberg.de'; @@ -49,10 +73,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: 'Verfassungsgerichtshof Baden-Württemberg - Pressemitteilungen', link: request.url, description: 'Pressemitteilungen des Verfassungsgerichtshof für das Land Baden-Württemberg', item: list, - }); -}; + }; +} diff --git a/lib/routes/verfghbw/radar.ts b/lib/routes/verfghbw/radar.ts deleted file mode 100644 index bd9dc68aa..000000000 --- a/lib/routes/verfghbw/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'baden-wuerttemberg.de': { - _name: 'Constitutional Court of Baden-Württemberg (Germany)', - verfgh: [ - { - title: 'Press releases', - docs: 'https://docs.rsshub.app/routes/government#constitutional-court-of-baden-wurttemberg-germany', - source: ['/de/presse-und-service/pressemitteilungen/'], - target: '/verfghbw/press', - }, - ], - }, -}; diff --git a/lib/routes/verfghbw/router.ts b/lib/routes/verfghbw/router.ts deleted file mode 100644 index 6bf48c9de..000000000 --- a/lib/routes/verfghbw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/press/:keyword?', './press'); -}; diff --git a/lib/routes/vimeo/category.ts b/lib/routes/vimeo/category.ts index 1c2f37e9e..a3700b803 100644 --- a/lib/routes/vimeo/category.ts +++ b/lib/routes/vimeo/category.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category/:staffpicks?', + categories: ['social-media'], + example: '/vimeo/category/documentary/staffpicks', + parameters: { + category: 'Category name can get from url like `documentary` in [https://vimeo.com/categories/documentary/videos](https://vimeo.com/categories/documentary/videos) ', + staffpicks: 'type `staffpicks` to sort with staffpicks', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Category', + maintainers: ['MisteryMonster'], + handler, +}; + +async function handler(ctx) { const { category, staffpicks } = ctx.req.param(); const categoryparams = category; @@ -50,7 +72,7 @@ export default async (ctx) => { return description('meta[name="description"]').attr('content'); }); - ctx.set('data', { + return { title: `${feedtitle} | Vimeo category`, link: feedlink + (staffpicks ? feedlinkstaffpicks : ''), description: feedDescription, @@ -64,5 +86,5 @@ export default async (ctx) => { link: item.link, author: item.user.name, })), - }); -}; + }; +} diff --git a/lib/routes/vimeo/channel.ts b/lib/routes/vimeo/channel.ts index 089763d8e..17d094aa7 100644 --- a/lib/routes/vimeo/channel.ts +++ b/lib/routes/vimeo/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:channel', + categories: ['social-media'], + example: '/vimeo/channel/bestoftheyear', + parameters: { channel: 'channel name can get from url like `bestoftheyear` in [https://vimeo.com/channels/bestoftheyear/videos](https://vimeo.com/channels/bestoftheyear/videos) .' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vimeo.com/channels/:channel', 'vimeo.com/channels/:channel/videos', 'vimeo.com/channels/:channel/videos/:sort/:format'], + }, + name: 'Channel', + maintainers: ['MisteryMonster'], + handler, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel'); const url = `https://vimeo.com/channels/${channel}/videos`; const page1 = await got({ @@ -52,7 +74,7 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: `${channel} | Vimeo channel`, link: url, item: list @@ -72,5 +94,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/vimeo/maintainer.ts b/lib/routes/vimeo/maintainer.ts deleted file mode 100644 index d7d024ffe..000000000 --- a/lib/routes/vimeo/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/category/:category/:staffpicks?': ['MisteryMonster'], - '/channel/:channel': ['MisteryMonster'], - '/user/:username/:cat?': ['MisteryMonster'], -}; diff --git a/lib/routes/vimeo/namespace.ts b/lib/routes/vimeo/namespace.ts new file mode 100644 index 000000000..03ea2189b --- /dev/null +++ b/lib/routes/vimeo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Vimeo', + url: 'vimeo.com', +}; diff --git a/lib/routes/vimeo/radar.ts b/lib/routes/vimeo/radar.ts deleted file mode 100644 index f80a6b731..000000000 --- a/lib/routes/vimeo/radar.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default { - 'vimeo.com': { - _name: 'Vimeo', - '.': [ - { - title: 'User videos', - docs: 'https://docs.rsshub.app/routes/social-media#vimeo-yong-hu-ye-mian', - source: '/:username/', - target: (params, url, document) => { - const uid = document && document.querySelector('html').innerHTML.match(/app.vimeo.com\/users\/(\d+)/)[1]; - return uid ? `/vimeo/user/${uid}` : ''; - }, - }, - { - title: 'User Video Category', - docs: 'https://docs.rsshub.app/routes/social-media#vimeo-yong-hu-ye-mian', - source: '/', - }, - { - title: 'Channel', - docs: 'https://docs.rsshub.app/routes/social-media#vimeo-channel', - source: ['/channels/:channel', '/channels/:channel/videos', '/channels/:channel/videos/:sort/:format'], - target: '/vimeo/channel/:channel', - }, - { - title: 'Category', - docs: 'https://docs.rsshub.app/routes/social-media#vimeo-category', - source: ['/categories/:category', '/categories/:category/:subcategory', '/categories/:category/:subcategory/videos'], - target: (params) => `/vimeo/category/:category${params.subcategory ? `/` + params.subcategory : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/vimeo/router.ts b/lib/routes/vimeo/router.ts deleted file mode 100644 index 6507d86d1..000000000 --- a/lib/routes/vimeo/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/category/:category/:staffpicks?', './category'); - router.get('/channel/:channel', './channel'); - router.get('/user/:username/:cat?', './usr-videos'); -}; diff --git a/lib/routes/vimeo/usr-videos.ts b/lib/routes/vimeo/usr-videos.ts index 4b660b9a9..8de876dab 100644 --- a/lib/routes/vimeo/usr-videos.ts +++ b/lib/routes/vimeo/usr-videos.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,31 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:username/:cat?', + categories: ['social-media'], + example: '/vimeo/user/filmsupply/picks', + parameters: { + username: 'In this example [https://vimeo.com/filmsupply](https://vimeo.com/filmsupply) is `filmsupply`', + cat: "deafult for all latest videos, others categories in this example such as `Docmentary`, `Narrative`, `Drama`. Set `picks` for promote orders, just orderd like web page. When `picks` added, published date won't show up", + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'User Profile', + maintainers: ['MisteryMonster'], + handler, + description: `:::tip[Special category name attention] + Some of the categories contain slash like \`3D/CG\` , must change the slash \`/\` to the vertical bar\`|\`. + :::`, +}; + +async function handler(ctx) { const tokenresponse = await got({ method: 'get', url: 'https://vimeo.com/_rv/viewer', @@ -56,7 +81,7 @@ export default async (ctx) => { }); const vimeojs = picked ? contentresponse.data.data[0].videos.data : contentresponse.data.data; - ctx.set('data', { + return { title: `${profilesjs.name} ${catword ? cat.replace('|', '/') : ''} ${picked ? 'picks' : ''} | Vimeo `, link: profilesjs.link, description: profilesjs.bio, @@ -75,5 +100,5 @@ export default async (ctx) => { author: profilesjs.name, }; }), - }); -}; + }; +} diff --git a/lib/routes/vocus/maintainer.ts b/lib/routes/vocus/maintainer.ts deleted file mode 100644 index 9ff861739..000000000 --- a/lib/routes/vocus/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/publication/:id': ['Maecenas'], - '/user/:id': ['LogicJake'], -}; diff --git a/lib/routes/vocus/namespace.ts b/lib/routes/vocus/namespace.ts new file mode 100644 index 000000000..0220cbf49 --- /dev/null +++ b/lib/routes/vocus/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '方格子', + url: 'vocus.cc', +}; diff --git a/lib/routes/vocus/publication.ts b/lib/routes/vocus/publication.ts index a3fb89221..e44679229 100644 --- a/lib/routes/vocus/publication.ts +++ b/lib/routes/vocus/publication.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { processList, ProcessFeed, baseUrl, apiUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/publication/:id', + categories: ['social-media'], + example: '/vocus/publication/bass', + parameters: { id: '出版專題 id,可在出版專題主页的 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vocus.cc/:id/home', 'vocus.cc/:id/introduce'], + }, + name: '出版專題', + maintainers: ['Maecenas'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `${baseUrl}/${id}/home`; @@ -34,10 +56,10 @@ export default async (ctx) => { const items = await ProcessFeed(list, cache.tryGet); - ctx.set('data', { + return { title: `${publicationData.title} - 文章列表|方格子 vocus`, link, description: publicationData.abstract, item: items, - }); -}; + }; +} diff --git a/lib/routes/vocus/radar.ts b/lib/routes/vocus/radar.ts deleted file mode 100644 index e20afcdcc..000000000 --- a/lib/routes/vocus/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'vocus.cc': { - _name: '方格子', - '.': [ - { - title: '出版專題', - docs: 'https://docs.rsshub.app/routes/social-media#fang-ge-zi', - source: ['/:id/home', '/:id/introduce'], - target: '/vocus/publication/:id', - }, - { - title: '用户个人文章', - docs: 'https://docs.rsshub.app/routes/social-media#fang-ge-zi', - source: ['/user/:id'], - target: (params) => `/vocus/user/${params.id.replace('@', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/vocus/router.ts b/lib/routes/vocus/router.ts deleted file mode 100644 index 18d682576..000000000 --- a/lib/routes/vocus/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/publication/:id', './publication'); - router.get('/user/:id', './user'); -}; diff --git a/lib/routes/vocus/user.ts b/lib/routes/vocus/user.ts index 0647e53db..95263d1d2 100644 --- a/lib/routes/vocus/user.ts +++ b/lib/routes/vocus/user.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { processList, ProcessFeed, baseUrl, apiUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id', + categories: ['social-media'], + example: '/vocus/user/tsetyan', + parameters: { id: '用户 id,可在用户主页的 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户个人文章', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `${baseUrl}/user/@${id}`; const userData = await cache.tryGet(`vocus:user:${id}`, async () => { @@ -34,11 +53,11 @@ export default async (ctx) => { const items = await ProcessFeed(list, cache.tryGet); - ctx.set('data', { + return { title: `${userData.fullname}|方格子 vocus`, link, description: userData.intro, image: userData.avatarUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/vom/featured.ts b/lib/routes/vom/featured.ts index 733f28440..33d20d242 100644 --- a/lib/routes/vom/featured.ts +++ b/lib/routes/vom/featured.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'http://www.vom.mn'; -export default async (ctx) => { +export const route: Route = { + path: '/featured/:lang?', + categories: ['traditional-media'], + example: '/vom/featured', + parameters: { lang: 'Language, see the table below, `mn` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['vom.mn/:lang', 'vom.mn/'], + target: '/featured/:lang', + }, + name: 'News', + maintainers: ['TonyRL'], + handler, + description: `| English | 日本語 | Монгол | Русский | 简体中文 | + | ------- | ------ | ------ | ------- | -------- | + | en | ja | mn | ru | zh |`, +}; + +async function handler(ctx) { const { lang = 'mn' } = ctx.req.param(); const { data: response } = await got(`${baseUrl}/${lang}`); @@ -43,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('meta[name=description]').attr('content'), image: 'http://www.vom.mn/dist/images/vom-logo.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/vom/maintainer.ts b/lib/routes/vom/maintainer.ts deleted file mode 100644 index c19526513..000000000 --- a/lib/routes/vom/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/featured/:lang?': ['TonyRL'], -}; diff --git a/lib/routes/vom/namespace.ts b/lib/routes/vom/namespace.ts new file mode 100644 index 000000000..b8c5bd4f4 --- /dev/null +++ b/lib/routes/vom/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Voice of Mongolia 蒙古之声', + url: 'vom.mn', +}; diff --git a/lib/routes/vom/radar.ts b/lib/routes/vom/radar.ts deleted file mode 100644 index e22d78069..000000000 --- a/lib/routes/vom/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'vom.mn': { - _name: '蒙古之声', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#meng-gu-zhi-sheng', - source: ['/:lang', '/'], - target: '/vom/featured/:lang', - }, - ], - }, -}; diff --git a/lib/routes/vom/router.ts b/lib/routes/vom/router.ts deleted file mode 100644 index c2ccf2431..000000000 --- a/lib/routes/vom/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/featured/:lang?', './featured.js'); -}; diff --git a/lib/routes/wallhaven/index.ts b/lib/routes/wallhaven/index.ts index db080d2cf..12f067728 100644 --- a/lib/routes/wallhaven/index.ts +++ b/lib/routes/wallhaven/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,34 @@ import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://wallhaven.cc'; -export default async (ctx) => { +export const route: Route = { + path: ['/search/:filter?/:needDetails?', '/:filter?/:needDetails?'], + categories: ['picture'], + example: '/wallhaven/search/categories=110&purity=110&sorting=date_added&order=desc', + parameters: { filter: 'Filter, empty by default', needDetails: 'Need Details, `true`/`yes` as yes, no by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wallhaven.cc/'], + }, + name: 'Search', + maintainers: ['nczitzk', 'Fatpandac'], + handler, + url: 'wallhaven.cc/', + description: `:::tip + Subscribe pages starting with \`https://wallhaven.cc/search\`, fill the text after \`?\` as \`filter\` in the route. The following is an example: + + The text after \`?\` is \`q=id%3A711&sorting=random&ref=fp&seed=8g0dgd\` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd) + :::`, +}; + +async function handler(ctx) { const filter = ctx.req.param('filter') ?? 'latest'; const needDetails = /t|y/i.test(ctx.req.param('needDetails') ?? 'false'); const url = `${rootUrl}/${filter.indexOf('=') > 0 ? `search?${filter.replaceAll(/page=\d+/g, 'page=1')}` : filter}`; @@ -48,9 +76,9 @@ export default async (ctx) => { ); } - ctx.set('data', { + return { title: $('title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/wallhaven/maintainer.ts b/lib/routes/wallhaven/maintainer.ts deleted file mode 100644 index 94b49cd66..000000000 --- a/lib/routes/wallhaven/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/search/:filter?/:needDetails?': ['nczitzk', 'Fatpandac'], - '/:filter?/:needDetails?': ['nczitzk', 'Fatpandac'], -}; diff --git a/lib/routes/wallhaven/namespace.ts b/lib/routes/wallhaven/namespace.ts new file mode 100644 index 000000000..82fc1032f --- /dev/null +++ b/lib/routes/wallhaven/namespace.ts @@ -0,0 +1,13 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'wallhaven', + url: 'wallhaven.cc', + description: `:::tip +When parameter **Need Details** is set to \`true\` \`yes\` \`t\` \`y\`, RSS will add the title, uploader, upload time, and category information of each image, which can support the filtering function of RSS reader. + +However, the number of requests to the site increases a lot when it is turned on, which causes the site to return \`Response code 429 (Too Many Requests)\`. So you need to specify a smaller \`limit\` parameter, i.e. add \`?limit=<the number of posts for a request>\` after the route, here is an example. + +For example [Latest Wallpapers](https://wallhaven.cc/latest), the route turning on **Need Details** is [/wallhaven/latest/true](https://rsshub.app/wallhaven/latest/true), and then specify a smaller \`limit\`. We can get [/wallhaven/latest/true?limit=5](https://rsshub.app/wallhaven/latest/true?limit=5). +:::`, +}; diff --git a/lib/routes/wallhaven/radar.ts b/lib/routes/wallhaven/radar.ts deleted file mode 100644 index e3d1d153d..000000000 --- a/lib/routes/wallhaven/radar.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - 'wallhaven.cc': { - _name: 'wallhaven', - '.': [ - { - title: 'Latest', - docs: 'https://docs.rsshub.app/routes/picture#wallhaven-zhu-zhu-ti', - source: ['/:category', '/'], - target: (params) => { - if (params.category === 'latest') { - return '/wallhaven/latest'; - } - }, - }, - { - title: 'Hot', - docs: 'https://docs.rsshub.app/routes/picture#wallhaven-zhu-zhu-ti', - source: ['/:category', '/'], - target: (params) => { - if (params.category === 'hot') { - return '/wallhaven/hot'; - } - }, - }, - { - title: 'TopList', - docs: 'https://docs.rsshub.app/routes/picture#wallhaven-zhu-zhu-ti', - source: ['/:category', '/'], - target: (params) => { - if (params.category === 'toplist') { - return '/wallhaven/toplist'; - } - }, - }, - { - title: 'Random', - docs: 'https://docs.rsshub.app/routes/picture#wallhaven-zhu-zhu-ti', - source: ['/:category', '/'], - target: (params) => { - if (params.category === 'random') { - return '/wallhaven/random'; - } - }, - }, - { - title: 'Search', - docs: 'https://docs.rsshub.app/routes/picture#wallhaven-sou-xiao-sou-shao-suo', - source: ['/'], - target: '/wallhaven/search/:filter?/:needDetails?', - }, - ], - }, -}; diff --git a/lib/routes/wallhaven/router.ts b/lib/routes/wallhaven/router.ts deleted file mode 100644 index e0aabb0cb..000000000 --- a/lib/routes/wallhaven/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/search/:filter?/:needDetails?', './index'); - router.get('/:filter?/:needDetails?', './index'); -}; diff --git a/lib/routes/wallpaperhub/index.ts b/lib/routes/wallpaperhub/index.ts index 4ed9d7bc3..e5d29c1b1 100644 --- a/lib/routes/wallpaperhub/index.ts +++ b/lib/routes/wallpaperhub/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['wallpaperhub.app/wallpaperhub', 'wallpaperhub.app/'], + target: '', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'wallpaperhub.app/wallpaperhub', +}; + +async function handler() { const link = 'https://wallpaperhub.app/api/v1/wallpapers/?limit=20&page=&query=&width=&height=&tags='; const response = await got({ method: 'get', @@ -23,9 +36,9 @@ export default async (ctx) => { link: `https://wallpaperhub.app/wallpapers/${item.entity.id}`, })); - ctx.set('data', { + return { title: 'WallpaperHub', link: 'https://wallpaperhub.app/wallpapers', item: list, - }); -}; + }; +} diff --git a/lib/routes/wallpaperhub/maintainer.ts b/lib/routes/wallpaperhub/maintainer.ts deleted file mode 100644 index 334664c8d..000000000 --- a/lib/routes/wallpaperhub/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['nczitzk'], -}; diff --git a/lib/routes/wallpaperhub/namespace.ts b/lib/routes/wallpaperhub/namespace.ts new file mode 100644 index 000000000..fcdcf8249 --- /dev/null +++ b/lib/routes/wallpaperhub/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'WallpaperHub', + url: 'wallpaperhub.app', +}; diff --git a/lib/routes/wallpaperhub/radar.ts b/lib/routes/wallpaperhub/radar.ts deleted file mode 100644 index 540fea8e4..000000000 --- a/lib/routes/wallpaperhub/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wallpaperhub.app': { - _name: 'WallpaperHub', - '.': [ - { - title: '壁纸', - docs: 'https://docs.rsshub.app/routes/picture#wallpaperhub', - source: ['/wallpaperhub', '/'], - target: '/wallpaperhub', - }, - ], - }, -}; diff --git a/lib/routes/wallpaperhub/router.ts b/lib/routes/wallpaperhub/router.ts deleted file mode 100644 index b84c130aa..000000000 --- a/lib/routes/wallpaperhub/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './index'); -}; diff --git a/lib/routes/wallstreetcn/hot.ts b/lib/routes/wallstreetcn/hot.ts index 1005a5cbb..08bce5b0a 100644 --- a/lib/routes/wallstreetcn/hot.ts +++ b/lib/routes/wallstreetcn/hot.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:period?', + categories: ['traditional-media'], + example: '/wallstreetcn/hot', + parameters: { period: '时期,可选 `day` 即 当日 或 `week` 即 当周,默认为当日' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wallstreetcn.com/'], + }, + name: '最热文章', + maintainers: ['nczitzk'], + handler, + url: 'wallstreetcn.com/', +}; + +async function handler(ctx) { const period = ctx.req.param('period') ?? 'day'; const rootUrl = 'https://wallstreetcn.com'; @@ -47,11 +70,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '华尔街见闻 - 最热文章', link: rootUrl, item: items, itunes_author: '华尔街见闻', image: 'https://static-alpha-wscn.awtmt.com/wscn-static/qrcode.jpg', - }); -}; + }; +} diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.ts index 26594523f..3b7c5724e 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,7 +17,32 @@ const titles = { financing: '理财', }; -export default async (ctx) => { +export const route: Route = { + path: '/live/:category?/:score?', + categories: ['traditional-media'], + example: '/wallstreetcn/live', + parameters: { category: '快讯分类,默认`global`,见下表', score: '快讯重要度,默认`1`全部快讯,可设置为`2`只看重要的' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wallstreetcn.com/live/:category', 'wallstreetcn.com/'], + target: '/live/:category?', + }, + name: '实时快讯', + maintainers: ['nczitzk'], + handler, + description: `| 要闻 | A 股 | 美股 | 港股 | 外汇 | 商品 | 理财 | + | ------ | ------- | -------- | -------- | ----- | --------- | --------- | + | global | a-stock | us-stock | hk-stock | forex | commodity | financing |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'global'; const score = ctx.req.param('score') ?? 1; @@ -44,9 +70,9 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `华尔街见闻 - 实时快讯 - ${titles[category]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/wallstreetcn/maintainer.ts b/lib/routes/wallstreetcn/maintainer.ts deleted file mode 100644 index 1745a9c3e..000000000 --- a/lib/routes/wallstreetcn/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/hot/:period?': ['nczitzk'], - '/live/:category?/:score?': ['nczitzk'], - '/news/:category?': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/wallstreetcn/namespace.ts b/lib/routes/wallstreetcn/namespace.ts new file mode 100644 index 000000000..8e8622e80 --- /dev/null +++ b/lib/routes/wallstreetcn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '华尔街见闻', + url: 'wallstreetcn.com', +}; diff --git a/lib/routes/wallstreetcn/news.ts b/lib/routes/wallstreetcn/news.ts index fa0d3bce2..eb65f89df 100644 --- a/lib/routes/wallstreetcn/news.ts +++ b/lib/routes/wallstreetcn/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -16,7 +17,30 @@ const titles = { medicine: '医药', }; -export default async (ctx) => { +export const route: Route = { + path: ['/news/:category?', '/:category?'], + radar: { + source: ['wallstreetcn.com/news/:category', 'wallstreetcn.com/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + description: `| id | 分类 | + | ------------ | ---- | + | global | 最新 | + | shares | 股市 | + | bonds | 债市 | + | commodities | 商品 | + | forex | 外汇 | + | enterprise | 公司 | + | asset-manage | 资管 | + | tmt | 科技 | + | estate | 地产 | + | car | 汽车 | + | medicine | 医药 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'global'; const rootUrl = 'https://wallstreetcn.com'; @@ -67,11 +91,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `华尔街见闻 - 资讯 - ${titles[category]}`, link: currentUrl, item: items, itunes_author: '华尔街见闻', image: 'https://static-alpha-wscn.awtmt.com/wscn-static/qrcode.jpg', - }); -}; + }; +} diff --git a/lib/routes/wallstreetcn/radar.ts b/lib/routes/wallstreetcn/radar.ts deleted file mode 100644 index e85c450f3..000000000 --- a/lib/routes/wallstreetcn/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'wallstreetcn.com': { - _name: '华尔街见闻', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-er-jie-jian-wen-zi-xun', - source: ['/news/:category', '/'], - target: '/wallstreetcn/news/:category?', - }, - { - title: '实时快讯', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-er-jie-jian-wen-shi-shi-kuai-xun', - source: ['/live/:category', '/'], - target: '/wallstreetcn/live/:category?', - }, - { - title: '最热文章', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-er-jie-jian-wen-zui-re-wen-zhang', - source: ['/'], - target: '/wallstreetcn/hot/:period?', - }, - ], - }, -}; diff --git a/lib/routes/wallstreetcn/router.ts b/lib/routes/wallstreetcn/router.ts deleted file mode 100644 index 5f7459b8c..000000000 --- a/lib/routes/wallstreetcn/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/hot/:period?', './hot'); - router.get('/live/:category?/:score?', './live'); - router.get('/news/:category?', './news'); - router.get('/:category?', './news'); -}; diff --git a/lib/routes/wanqu/maintainer.ts b/lib/routes/wanqu/maintainer.ts deleted file mode 100644 index bf888fff8..000000000 --- a/lib/routes/wanqu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['Fatpandac'], -}; diff --git a/lib/routes/wanqu/namespace.ts b/lib/routes/wanqu/namespace.ts new file mode 100644 index 000000000..8799f8b7e --- /dev/null +++ b/lib/routes/wanqu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '湾区日报', + url: 'wanqu.co', +}; diff --git a/lib/routes/wanqu/news.ts b/lib/routes/wanqu/news.ts index f6529f48e..48784d529 100644 --- a/lib/routes/wanqu/news.ts +++ b/lib/routes/wanqu/news.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['new-media'], + example: '/wanqu/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wanqu.co/'], + }, + name: '最新推荐', + maintainers: ['Fatpandac'], + handler, + url: 'wanqu.co/', +}; + +async function handler() { const rootUrl = 'https://www.wanqu.co'; const currentUrl = rootUrl; @@ -19,9 +42,9 @@ export default async (ctx) => { pubDate: parseDate($(item).find('i.text-helper-color.mr-4').text().trim()), })); - ctx.set('data', { + return { title: '湾区日报 - 最新推荐', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/wanqu/radar.ts b/lib/routes/wanqu/radar.ts deleted file mode 100644 index d920cdca2..000000000 --- a/lib/routes/wanqu/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wanqu.co': { - _name: '湾区日报', - '.': [ - { - title: '最新推荐', - docs: 'https://docs.rsshub.app/routes/new-media#wan-qu-ri-bao', - source: ['/'], - target: '/wanqu/news', - }, - ], - }, -}; diff --git a/lib/routes/wanqu/router.ts b/lib/routes/wanqu/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/wanqu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/warthunder/maintainer.ts b/lib/routes/warthunder/maintainer.ts deleted file mode 100644 index 2ede2185a..000000000 --- a/lib/routes/warthunder/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['axojhf'], -}; diff --git a/lib/routes/warthunder/namespace.ts b/lib/routes/warthunder/namespace.ts new file mode 100644 index 000000000..65641f3d2 --- /dev/null +++ b/lib/routes/warthunder/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'War Thunder', + url: 'warthunder.com', +}; diff --git a/lib/routes/warthunder/news.ts b/lib/routes/warthunder/news.ts index b798e35bf..33a92c475 100644 --- a/lib/routes/warthunder/news.ts +++ b/lib/routes/warthunder/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,31 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/warthunder/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['warthunder.com/en/news', 'warthunder.com/'], + }, + name: 'News', + maintainers: ['axojhf'], + handler, + url: 'warthunder.com/en/news', + description: `News data from [https://warthunder.com/en/news/](https://warthunder.com/en/news/) + The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!!`, +}; + +async function handler() { const rootUrl = 'https://warthunder.com/en/news/'; const response = await got(rootUrl); @@ -44,9 +69,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: 'War Thunder News', link: 'https://warthunder.com/en/news/', item: pageFace, - }); -}; + }; +} diff --git a/lib/routes/warthunder/radar.ts b/lib/routes/warthunder/radar.ts deleted file mode 100644 index f46c0c871..000000000 --- a/lib/routes/warthunder/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'warthunder.com': { - _name: 'War Thunder', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/game#war-thunder-ying-wen-news', - source: ['/en/news', '/'], - target: '/warthunder/news', - }, - ], - }, -}; diff --git a/lib/routes/warthunder/router.ts b/lib/routes/warthunder/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/warthunder/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/wdc/download.ts b/lib/routes/wdc/download.ts index f78e62c7f..fd03de6f4 100644 --- a/lib/routes/wdc/download.ts +++ b/lib/routes/wdc/download.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/download/:id?', + categories: ['program-update'], + example: '/wdc/download/279', + parameters: { id: 'Software id, can be found in URL, 279 as Western Digital Dashboard by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Download', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '279'; const rootUrl = 'https://support.wdc.com'; @@ -29,9 +48,9 @@ export default async (ctx) => { }, ]; - ctx.set('data', { + return { title: `${$('#WD_lblSelectedName').text()} | WD Support`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/wdc/maintainer.ts b/lib/routes/wdc/maintainer.ts deleted file mode 100644 index ad439811b..000000000 --- a/lib/routes/wdc/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/download/:id': ['nczitzk'], -}; diff --git a/lib/routes/wdc/namespace.ts b/lib/routes/wdc/namespace.ts new file mode 100644 index 000000000..bc0a53465 --- /dev/null +++ b/lib/routes/wdc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Western Digital', + url: 'support.wdc.com', +}; diff --git a/lib/routes/wdc/radar.ts b/lib/routes/wdc/radar.ts deleted file mode 100644 index 872084c69..000000000 --- a/lib/routes/wdc/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wdc.com': { - _name: '', - support: [ - { - title: 'Western Digital', - docs: 'https://docs.rsshub.app/routes/program-update#western-digital-download', - source: ['/downloads.aspx', '/'], - target: (params, url) => `/wdc/download/${new URL(url).searchParams.get('p')}`, - }, - ], - }, -}; diff --git a/lib/routes/wdc/router.ts b/lib/routes/wdc/router.ts deleted file mode 100644 index 79ac1b574..000000000 --- a/lib/routes/wdc/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/download/:id?', './download'); -}; diff --git a/lib/routes/web3caff/index.ts b/lib/routes/web3caff/index.ts index b1c735d97..bbac60380 100644 --- a/lib/routes/web3caff/index.ts +++ b/lib/routes/web3caff/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const params = getSubPath(ctx) === '/' ? '' : getSubPath(ctx); const rootUrl = 'https://web3caff.com'; @@ -57,9 +65,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/web3caff/maintainer.ts b/lib/routes/web3caff/maintainer.ts deleted file mode 100644 index d93743e19..000000000 --- a/lib/routes/web3caff/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path?': ['nczitzk'], -}; diff --git a/lib/routes/web3caff/namespace.ts b/lib/routes/web3caff/namespace.ts new file mode 100644 index 000000000..e64d1f163 --- /dev/null +++ b/lib/routes/web3caff/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Web3Caff', + url: 'web3caff.com', +}; diff --git a/lib/routes/web3caff/radar.ts b/lib/routes/web3caff/radar.ts deleted file mode 100644 index c8d72cf08..000000000 --- a/lib/routes/web3caff/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'web3caff.com': { - _name: 'web3caff', - '.': [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/new-media#web3caff-fa-xian', - source: ['/'], - target: (params, url) => `/web3caff${new URL(url).toString().match(/\.com(.*)/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/web3caff/router.ts b/lib/routes/web3caff/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/web3caff/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/wechat/announce.ts b/lib/routes/wechat/announce.ts index 289a8b596..dff7801b3 100644 --- a/lib/routes/wechat/announce.ts +++ b/lib/routes/wechat/announce.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/announce', + categories: ['programming'], + example: '/wechat/announce', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mp.weixin.qq.com/cgi-bin/announce'], + }, + name: '公众平台系统公告栏目', + maintainers: ['xyqfer'], + handler, + url: 'mp.weixin.qq.com/cgi-bin/announce', +}; + +async function handler() { const { data: htmlString } = await got({ method: 'get', url: 'https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncementlist&lang=zh_CN', @@ -25,9 +48,9 @@ export default async (ctx) => { }); }); - ctx.set('data', { + return { title: '微信公众平台-系统公告栏目', link: 'https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncementlist&lang=zh_CN', item: announceList, - }); -}; + }; +} diff --git a/lib/routes/wechat/ce.ts b/lib/routes/wechat/ce.ts index 9757d4049..bdbdb0673 100644 --- a/lib/routes/wechat/ce.ts +++ b/lib/routes/wechat/ce.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import got from '@/utils/got'; @@ -9,7 +10,28 @@ import { parseDate } from '@/utils/parse-date'; // mark the UA as a desktop UA with "(X11; Linux x86_64)" const UA = 'Mozilla/5.0 (X11; Linux x86_64) RSS Reader'; -export default async (ctx) => { +export const route: Route = { + path: '/ce/:id', + categories: ['new-media'], + example: '/wechat/ce/595a5b14d7164e53908f1606', + parameters: { id: '公众号 id,在 [CareerEngine](https://search.careerengine.us/) 搜索公众号,通过 URL 中找到对应的公众号 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['cimidata.com/a/:id'], + }, + name: '公众号(CareerEngine 来源)', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const feed = await parser.parseString( @@ -61,10 +83,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `微信公众号 - ${feed.title}`, link: `https://posts.careerengine.us/author/${id}/posts`, description: feed.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/wechat/data258.ts b/lib/routes/wechat/data258.ts index f7ea11069..b1ce643e4 100644 --- a/lib/routes/wechat/data258.ts +++ b/lib/routes/wechat/data258.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -18,7 +19,18 @@ const parsePage = ($item, hyperlinkSelector, timeSelector) => { }; }; -export default async (ctx) => { +export const route: Route = { + path: '/data258/:id?', + radar: { + source: ['mp.data258.com/', 'mp.data258.com/article/category/:id'], + }, + name: 'Unknown', + maintainers: ['Rongronggg9'], + handler, + url: 'mp.data258.com/', +}; + +async function handler(ctx) { // !!! here we must use a lock to prevent other requests to break the anti-anti-crawler workarounds !!! if ((await cache.get('data258:lock', false)) === '1') { throw new Error('Another request is in progress, please try again later.'); @@ -121,13 +133,13 @@ export default async (ctx) => { await Promise.all(items.map((item) => finishArticleItem(item, !!categoryPage))); - ctx.set('data', { + return { title, link: pageUrl, description, item: items, - }); -}; + }; +} // TODO: login? the valid time for cookies seems to be short, and abusing account will probably get banned... // TODO: fetch full article for the official RSS feed? unless someone who is VIP contributes their RSS feed for test... diff --git a/lib/routes/wechat/ershcimi.ts b/lib/routes/wechat/ershcimi.ts index 253e09eb2..6b72dd125 100644 --- a/lib/routes/wechat/ershcimi.ts +++ b/lib/routes/wechat/ershcimi.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { finishArticleItem } from '@/utils/wechat-mp'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/ershicimi/:id', + categories: ['new-media'], + example: '/wechat/ershicimi/813oxJOl', + parameters: { id: '公众号id,打开公众号页,在 URL 中找到 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号(二十次幂来源)', + maintainers: ['sanmmm'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const rootUrl = 'https://www.cimidata.com'; @@ -26,10 +45,10 @@ export default async (ctx) => { await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title: `微信公众号 - ${$('span.name').text()}`, link: url, description: $('div.Profile-sideColumnItemValue').text(), item: items, - }); -}; + }; +} diff --git a/lib/routes/wechat/feeddd.ts b/lib/routes/wechat/feeddd.ts index efc25cd7e..d71c01a4f 100644 --- a/lib/routes/wechat/feeddd.ts +++ b/lib/routes/wechat/feeddd.ts @@ -29,13 +29,13 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title: response.data.title, link: response.data.feed_url, description: response.data.title, item: items, allowEmpty: true, - }); + }; ctx.set('json', { title: response.data.title, diff --git a/lib/routes/wechat/feeds.ts b/lib/routes/wechat/feeds.ts index 695358d9f..e709d9d7a 100644 --- a/lib/routes/wechat/feeds.ts +++ b/lib/routes/wechat/feeds.ts @@ -14,10 +14,10 @@ export default async (ctx) => { })); await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title: feed.title, link, description: feed.description, item: items, - }); + }; }; diff --git a/lib/routes/wechat/maintainer.ts b/lib/routes/wechat/maintainer.ts deleted file mode 100644 index 3c94bcd6e..000000000 --- a/lib/routes/wechat/maintainer.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - '/announce': ['xyqfer'], - '/ce/:id': ['HenryQW'], - '/ershicimi/:id': ['sanmmm'], - '/data258/:id?': ['Rongronggg9'], - '/feeddd/:id': ['TonyRL', 'Rongronggg9'], - '/feeds': ['tylinux'], - '/mp/homepage/:biz/:hid/:cid?': ['MisteryMonster'], - '/mp/msgalbum/:biz/:aid': ['MisteryMonster'], - '/sogou/:id': ['EthanWng97'], - '/tgchannel/:id/:mpName?/:searchQueryType?': ['LogicJake', 'Rongronggg9'], - '/uread/:userid': ['kt286'], - '/wechat2rss/:id': ['TonyRL'], - '/wxnmh/:id': ['laampui'], -}; diff --git a/lib/routes/wechat/mp.ts b/lib/routes/wechat/mp.ts index 51e15ff6c..373200309 100755 --- a/lib/routes/wechat/mp.ts +++ b/lib/routes/wechat/mp.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import dayjs from 'dayjs'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/mp/homepage/:biz/:hid/:cid?', + categories: ['new-media'], + example: '/wechat/mp/homepage/MzA3MDM3NjE5NQ==/16', + parameters: { biz: '公众号id', hid: '分页id', cid: '页内栏目' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号栏目 (非推送 & 历史消息)', + maintainers: ['MisteryMonster'], + handler, + description: `只适用拥有首页模板 (分享链接带有 homepage) 的公众号。例如从公众号分享出来的链接为 \`https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4\`,\`biz\` 为 \`MzA3MDM3NjE5NQ==\`,\`hid\` 为 \`4\`。 + + 有些页面里会有分栏, \`cid\` 可以通过元素选择器选中栏目查看\`data-index\`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==\&hid=4)里的 \`京都职人\` 栏目的 \`cid\` 为 \`0\`,\`文艺时光\` 栏目的 \`cid\` 为 \`2\`。如果不清楚的话最左边的栏目为\`0\`,其右方栏目依次递增 \`1\`。`, +}; + +async function handler(ctx) { const { biz, hid, cid } = ctx.req.param(); let cidurl = ''; if (cid) { @@ -35,7 +57,7 @@ export default async (ctx) => { return finishArticleItem(single); }) ); - ctx.set('data', { + return { // 源标题,差一个cid相关的标题! title: mptitle, link: `https://mp.weixin.qq.com/mp/homepage?__biz=${biz}${hidurl}${cidurl}`, @@ -55,5 +77,5 @@ export default async (ctx) => { author: articledata[index].author, pubDate: dayjs.unix(item.sendtime).format(), })), - }); -}; + }; +} diff --git a/lib/routes/wechat/msgalbum.ts b/lib/routes/wechat/msgalbum.ts index ea758ef01..b3636b423 100644 --- a/lib/routes/wechat/msgalbum.ts +++ b/lib/routes/wechat/msgalbum.ts @@ -1,9 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import dayjs from 'dayjs'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/mp/msgalbum/:biz/:aid', + categories: ['new-media'], + example: '/wechat/mp/msgalbum/MzA3MDM3NjE5NQ==/1375870284640911361', + parameters: { biz: '公众号id', aid: 'Tag id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号文章话题 Tag', + maintainers: ['MisteryMonster'], + handler, + description: `一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 \`https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA3MDM3NjE5NQ==&action=getalbum&album_id=1375870284640911361\`,其中\`biz\` 为 \`MzA3MDM3NjE5NQ==\`,\`aid\` 为 \`1375870284640911361\`。`, +}; + +async function handler(ctx) { const { biz, aid } = ctx.req.param(); const aidurl = `&album_id=${aid}`; @@ -26,7 +46,7 @@ export default async (ctx) => { return finishArticleItem(single); }) ); - ctx.set('data', { + return { title: mptitle, link: `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=${biz}&action=getalbum${aidurl}`, item: list.map((item, index) => ({ @@ -37,5 +57,5 @@ export default async (ctx) => { author: articledata[index].author, pubDate: dayjs.unix($(item).find('.js_article_create_time').text()).format(), })), - }); -}; + }; +} diff --git a/lib/routes/wechat/namespace.ts b/lib/routes/wechat/namespace.ts new file mode 100644 index 000000000..8562552c7 --- /dev/null +++ b/lib/routes/wechat/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '微信小程序', + url: 'posts.careerengine.us', + description: `:::tip +公众号直接抓取困难,故目前提供几种间接抓取方案,请自行选择 +:::`, +}; diff --git a/lib/routes/wechat/radar.ts b/lib/routes/wechat/radar.ts deleted file mode 100644 index de6d23bed..000000000 --- a/lib/routes/wechat/radar.ts +++ /dev/null @@ -1,104 +0,0 @@ -export default { - 'careerengine.us': { - _name: '微信', - posts: [ - { - title: '公众号(CareerEngine 来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/author/*id/posts'], - target: (params) => `/wechat/ce/${params.id}`, - }, - ], - }, - 'cimidata.com': { - _name: '微信', - '.': [ - { - title: '公众号(二十次幂来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/a/:id'], - target: '/wechat/ce/:id', - }, - ], - }, - 'data258.com': { - _name: '微信', - mp: [ - { - title: '公众号(微阅读来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/', '/article/category/:id'], - target: '/wechat/data258/:id?', - }, - ], - }, - 'hamibot.com': { - _name: '微信', - feed: [ - { - title: '公众号(feeddd 来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/'], - }, - ], - }, - 'mp.weixin.qq.com': { - _name: '微信', - '.': [ - { - title: '公众平台系统公告栏目', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/cgi-bin/announce'], - target: '/wechat/announce', - }, - ], - }, - 'privacyhide.com': { - _name: '微信', - wechat: [ - { - title: '公众号(wechat-feeds 来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - }, - ], - }, - 'sogou.com': { - _name: '微信', - weixin: [ - { - title: '公众号(搜狗来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/weixin'], - target: (_, url) => { - const id = new URL(url).searchParams.get('query'); - if (id === null) { - return false; - } - return `/wechat/sogou/${id}`; - }, - }, - ], - }, - 'wxnmh.com': { - _name: '微信', - '.': [ - { - title: '公众号(wxnmh.com 来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/:id'], - target: (params) => `/wechat/wxnmh/${params.id.replace('user-', '').replace('.htm', '')}`, - }, - ], - }, - 'xlab.app': { - _name: '微信', - wechat2rss: [ - { - title: '公众号(wechat2rss 来源)', - docs: 'https://docs.rsshub.app/routes/new-media#wei-xin', - source: ['/feed/:id'], - target: (params) => `/wechat/wechat2rss/${params.id.replace('.xml', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/wechat/router.ts b/lib/routes/wechat/router.ts deleted file mode 100644 index 825009e39..000000000 --- a/lib/routes/wechat/router.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (router) => { - router.get('/announce', './announce'); - router.get('/ce/:id', './ce'); - router.get('/data258/:id?', './data258'); - router.get('/ershicimi/:id', './ershcimi'); - // router.get('/feeddd/:id', './feeddd'); // TODO: remove this - // router.get('/feeds/:id', './feeds'); // TODO: remove this - router.get('/mp/homepage/:biz/:hid/:cid?', './mp'); - router.get('/mp/msgalbum/:biz/:aid', './msgalbum'); - router.get('/sogou/:id', './sogou'); - router.get('/tgchannel/:id/:mpName?/:searchQueryType?', './tgchannel'); - router.get('/uread/:userid', './uread'); - router.get('/wechat2rss/:id', './wechat2rss'); - // router.get('/wxnmh/:id', './wxnmh'); // TODO: remove this -}; diff --git a/lib/routes/wechat/sogou.ts b/lib/routes/wechat/sogou.ts index dfd173eb3..96fef0fa4 100644 --- a/lib/routes/wechat/sogou.ts +++ b/lib/routes/wechat/sogou.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'https://weixin.sogou.com'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/sogou/:id', + categories: ['new-media'], + example: '/wechat/sogou/qimao0908', + parameters: { id: '公众号 id, 打开 weixin.sogou.com 并搜索相应公众号, 在 URL 中找到 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号(搜狗来源)', + maintainers: ['EthanWng97'], + handler, +}; + +async function handler(ctx) { const wechatId = ctx.req.param('id'); let url = `${host}/weixin`; let response = await got({ @@ -49,10 +68,10 @@ export default async (ctx) => { await finishArticleItem(item); - ctx.set('data', { + return { title: `${title} 的微信公众号`, link: url, description: `${title} 的微信公众号`, item: [item], - }); -}; + }; +} diff --git a/lib/routes/wechat/tgchannel.ts b/lib/routes/wechat/tgchannel.ts index 8fedef9a9..3f6b009d9 100644 --- a/lib/routes/wechat/tgchannel.ts +++ b/lib/routes/wechat/tgchannel.ts @@ -1,8 +1,40 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/tgchannel/:id/:mpName?/:searchQueryType?', + categories: ['new-media'], + example: '/wechat/tgchannel/lifeweek', + parameters: { id: '公众号绑定频道 id', mpName: '欲筛选的公众号全名(URL-encoded,精确匹配),在频道订阅了多个公众号时可选用', searchQueryType: '搜索查询类型,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号(Telegram 频道来源)', + maintainers: ['LogicJake', 'Rongronggg9'], + handler, + description: `| 搜索查询类型 | 将使用的搜索关键字 | 适用于 | + | :----------: | :----------------: | :-------------------------: | + | \`0\` | (禁用搜索) | 所有情况 (默认) | + | \`1\` | 公众号全名 | 未启用 efb-patch-middleware | + | \`2\` | #公众号全名 | 已启用 efb-patch-middleware | + + :::tip + 启用搜索有助于在订阅了过多公众号的频道里有效筛选,不易因为大量公众号同时推送导致一些公众号消息被遗漏,但必须正确选择搜索查询类型,否则会搜索失败。 + ::: + + :::warning + 该方法需要通过 efb 进行频道绑定,具体操作见 [https://github.com/DIYgod/RSSHub/issues/2172](https://github.com/DIYgod/RSSHub/issues/2172) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const mpName = ctx.req.param('mpName') ?? ''; let searchQueryType = ctx.req.param('searchQueryType') ?? '0'; @@ -137,10 +169,10 @@ export default async (ctx) => { ); out.reverse(); - ctx.set('data', { + return { title: $('.tgme_channel_info_header_title').text(), link: `https://t.me/s/${id}`, item: out.filter(Boolean), allowEmpty: !!mpName, - }); -}; + }; +} diff --git a/lib/routes/wechat/uread.ts b/lib/routes/wechat/uread.ts index 6f466d907..5e61f62fb 100644 --- a/lib/routes/wechat/uread.ts +++ b/lib/routes/wechat/uread.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/uread/:userid', + categories: ['new-media'], + example: '/wechat/uread/shensing', + parameters: { userid: '公众号的微信号, 可在 微信-公众号-更多资料 中找到。并不是所有的都支持,能不能用随缘' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号(优读来源)', + maintainers: ['kt286'], + handler, +}; + +async function handler(ctx) { const userid = ctx.req.param('userid'); const url = `http://119.29.146.143:8080/reading/subscription/account/recent?uid=${userid}`; const response = await got({ @@ -44,9 +63,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `优读 - ${userid}`, link: 'https://uread.ai/', item: items, - }); -}; + }; +} diff --git a/lib/routes/wechat/wechat2rss.ts b/lib/routes/wechat/wechat2rss.ts index 794d995b6..af74a81b3 100644 --- a/lib/routes/wechat/wechat2rss.ts +++ b/lib/routes/wechat/wechat2rss.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { parseDate } from '@/utils/parse-date'; import { finishArticleItem } from '@/utils/wechat-mp'; -export default async (ctx) => { +export const route: Route = { + path: '/wechat2rss/:id', + categories: ['new-media'], + example: '/wechat/wechat2rss/5b925323244e9737c39285596c53e3a2f4a30774', + parameters: { id: '公众号 id,打开 `https://wechat2rss.xlab.app/posts/list/`,在 URL 中找到 id;注意不是公众号页的 id,而是订阅的 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公众号(Wechat2RSS 来源)', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const baseUrl = 'https://wechat2rss.xlab.app'; @@ -18,11 +37,11 @@ export default async (ctx) => { items = await Promise.all(items.map((item) => finishArticleItem(item))); - ctx.set('data', { + return { title, link, description, image: image.url, item: items, - }); -}; + }; +} diff --git a/lib/routes/wechat/wxnmh.ts b/lib/routes/wechat/wxnmh.ts index 07ba3bb28..494207ce4 100644 --- a/lib/routes/wechat/wxnmh.ts +++ b/lib/routes/wechat/wxnmh.ts @@ -36,10 +36,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${name} - 微信公众号`, link: 'https://www.wxnmh.com/', description, item, - }); + }; }; diff --git a/lib/routes/weekendhk/maintainer.ts b/lib/routes/weekendhk/maintainer.ts deleted file mode 100644 index dfb1bcacb..000000000 --- a/lib/routes/weekendhk/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['TonyRL'], -}; diff --git a/lib/routes/weekendhk/namespace.ts b/lib/routes/weekendhk/namespace.ts new file mode 100644 index 000000000..2ef177506 --- /dev/null +++ b/lib/routes/weekendhk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新假期周刊', + url: 'weekendhk.com', +}; diff --git a/lib/routes/weekendhk/posts.ts b/lib/routes/weekendhk/posts.ts index ade3396c3..179e1b135 100644 --- a/lib/routes/weekendhk/posts.ts +++ b/lib/routes/weekendhk/posts.ts @@ -1,7 +1,20 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['weekendhk.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, + url: 'weekendhk.com/', +}; + +async function handler(ctx) { const baseUrl = 'https://www.weekendhk.com'; const response = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { @@ -18,12 +31,12 @@ export default async (ctx) => { author: item.creator_editor, })); - ctx.set('data', { + return { title: '新假期周刊', description: '新假期周刊網站為全港最強吃喝玩樂搵節目平台。網羅世界各地最詳盡旅遊潮流資訊;最新鮮熱辣本地飲食情報;最好玩周末玩樂節目,即時瞓身報導,全天候為你update。', link: baseUrl, language: 'zh-HK', image: `${baseUrl}/wp-content/themes/bucket/theme-content/images/196x196.png`, item: items, - }); -}; + }; +} diff --git a/lib/routes/weekendhk/radar.ts b/lib/routes/weekendhk/radar.ts deleted file mode 100644 index 9dd93d231..000000000 --- a/lib/routes/weekendhk/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'weekendhk.com': { - _name: '新假期周刊', - '.': [ - { - title: '最新文章', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-jia-qi-zhou-kan', - source: ['/'], - target: '/weekendhk', - }, - ], - }, -}; diff --git a/lib/routes/weekendhk/router.ts b/lib/routes/weekendhk/router.ts deleted file mode 100644 index 59494d73c..000000000 --- a/lib/routes/weekendhk/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './posts'); -}; diff --git a/lib/routes/weibo/friends.ts b/lib/routes/weibo/friends.ts index dc6c81478..6707d4c0f 100644 --- a/lib/routes/weibo/friends.ts +++ b/lib/routes/weibo/friends.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -5,7 +6,37 @@ import { config } from '@/config'; import weiboUtils from './utils'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/friends/:routeParams?', + categories: ['social-media'], + example: '/weibo/friends', + parameters: { routeParams: '额外参数;请参阅上面的说明和表格' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['weibo.com/'], + target: '/friends', + }, + name: '最新关注时间线', + maintainers: ['CaoMeiYouRen'], + handler, + url: 'weibo.com/', + description: `:::warning + 此方案必须使用用户\`Cookie\`进行抓取 + + 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 + + 微博用户 Cookie 的配置可参照部署文档 + :::`, +}; + +async function handler(ctx) { if (!config.weibo.cookies) { throw new Error('Weibo Friends Timeline is not available due to the absense of [Weibo Cookies]. Check <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config tutorial</a>'); } @@ -123,4 +154,4 @@ export default async (ctx) => { item: resultItems, }) ); -}; +} diff --git a/lib/routes/weibo/group.ts b/lib/routes/weibo/group.ts index 9e6a3a051..630bc0549 100644 --- a/lib/routes/weibo/group.ts +++ b/lib/routes/weibo/group.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -5,7 +6,32 @@ import { config } from '@/config'; import weiboUtils from './utils'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/group/:gid/:gname?/:routeParams?', + categories: ['social-media'], + example: '/weibo/group/4541216424989965', + parameters: { gid: '分组id, 在网页版分组地址栏末尾`?gid=`处获取', gname: '分组显示名称; 默认为: `微博分组`', routeParams: '额外参数;请参阅上面的说明和表格' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '自定义分组', + maintainers: ['monologconnor', 'Rongronggg9'], + handler, + description: `:::warning + 由于微博官方未提供自定义分组相关 api, 此方案必须使用用户\`Cookie\`进行抓取 + + 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 + + 微博用户 Cookie 的配置可参照部署文档 + :::`, +}; + +async function handler(ctx) { if (!config.weibo.cookies) { throw new Error('Weibo Group Timeline is not available due to the absense of [Weibo Cookies]. Check <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config tutorial</a>'); } @@ -86,4 +112,4 @@ export default async (ctx) => { item: resultItems, }) ); -}; +} diff --git a/lib/routes/weibo/keyword.ts b/lib/routes/weibo/keyword.ts index 1bd4a6e78..9d6ed9261 100644 --- a/lib/routes/weibo/keyword.ts +++ b/lib/routes/weibo/keyword.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -6,7 +7,25 @@ import timezone from '@/utils/timezone'; import { fallback, queryToBoolean } from '@/utils/readable-social'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/keyword/:keyword/:routeParams?', + categories: ['social-media'], + example: '/weibo/keyword/DIYgod', + parameters: { keyword: '你想订阅的微博关键词', routeParams: '额外参数;请参阅上面的说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '关键词', + maintainers: ['DIYgod', 'Rongronggg9'], + handler, +}; + +async function handler(ctx) { const keyword = ctx.req.param('keyword'); const data = await cache.tryGet( @@ -47,4 +66,4 @@ export default async (ctx) => { }), }) ); -}; +} diff --git a/lib/routes/weibo/maintainer.ts b/lib/routes/weibo/maintainer.ts deleted file mode 100644 index bd951b17a..000000000 --- a/lib/routes/weibo/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/friends/:routeParams?': ['CaoMeiYouRen'], - '/group/:gid/:gname?/:routeParams?': ['monologconnor', 'Rongronggg9'], - '/keyword/:keyword/:routeParams?': ['DIYgod', 'Rongronggg9'], - '/oasis/user/:userid': ['kt286'], - '/search/hot/:fulltext?': ['xyqfer', 'shinemoon'], - '/super_index/:id/:type?/:routeParams?': ['zengxs', 'Rongronggg9'], - '/timeline/:uid/:feature?/:routeParams?': ['zytomorrow', 'DIYgod', 'Rongronggg9'], - '/user/:uid/:routeParams?': ['DIYgod', 'iplusx', 'Rongronggg9'], -}; diff --git a/lib/routes/weibo/namespace.ts b/lib/routes/weibo/namespace.ts new file mode 100644 index 000000000..2b09d4bb0 --- /dev/null +++ b/lib/routes/weibo/namespace.ts @@ -0,0 +1,41 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '微博绿洲', + url: 'weibo.com', + description: `:::warning +微博会针对请求的来源地区返回不同的结果。\ +一个已知的例子为:部分视频因未知原因仅限中国大陆境内访问 (CDN 域名为 \`locallimit.us.sinaimg.cn\` 而非 \`f.video.weibocdn.com\`)。若一条微博含有这种视频且 RSSHub 实例部署在境外,抓取到的微博可能不含视频。将 RSSHub 部署在境内有助于抓取这种视频,但阅读器也必须处于境内网络环境以加载视频。 +::: + +对于微博内容,在 \`routeParams\` 参数中以 query string 格式指定选项,可以控制输出的样式 + +| 键 | 含义 | 接受的值 | 默认值 | +| -------------------------- | ------------------------------------------------------------------ | -------------- | ----------------------------------- | +| readable | 是否开启细节排版可读性优化 | 0/1/true/false | false | +| authorNameBold | 是否加粗作者名字 | 0/1/true/false | false | +| showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | false(\`/weibo/keyword/\`中为 true) | +| showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false(\`/weibo/keyword/\`中为 true) | +| showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | +| showEmojiForRetweet | 显示 “🔁” 取代 “转发” 两个字 | 0/1/true/false | false | +| showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发微博) | 0/1/true/false | true | +| addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false | +| showTimestampInDescription | 在正文处显示被转发微博的时间戳 | 0/1/true/false | false | +| widthOfPics | 微博配图宽(生效取决于阅读器) | 不指定 / 数字 | 不指定 | +| heightOfPics | 微博配图高(生效取决于阅读器) | 不指定 / 数字 | 不指定 | +| sizeOfAuthorAvatar | 作者头像大小 | 数字 | 48 | +| displayVideo | 是否直接显示微博视频和 Live Photo,只在博主或个人时间线 RSS 中有效 | 0/1/true/false | true | +| displayArticle | 是否直接显示微博文章,只在博主或个人时间线 RSS 中有效 | 0/1/true/false | false | +| displayComments | 是否直接显示热门评论,只在博主或个人时间线 RSS 中有效 | 0/1/true/false | false | +| showEmojiInDescription | 是否展示正文中的微博表情,关闭则替换为 \`[表情名]\` | 0/1/true/false | true | +| showLinkIconInDescription | 是否展示正文中的链接图标 | 0/1/true/false | true | +| preferMobileLink | 是否使用移动版链接(默认使用 PC 版) | 0/1/true/false | false | + +指定更多与默认值不同的参数选项可以改善 RSS 的可读性,如 + +[https://rsshub.app/weibo/user/1642909335/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=0\&addLinkForPics=1\&showTimestampInDescription=1\&showTimestampInDescription=1\&heightOfPics=150](https://rsshub.app/weibo/user/1642909335/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=0\&addLinkForPics=1\&showTimestampInDescription=1\&showTimestampInDescription=1\&heightOfPics=150) + +的效果为 + +<img loading="lazy" src="/img/readable-weibo.png" alt="微博小秘书的可读微博 RSS" />`, +}; diff --git a/lib/routes/weibo/oasis/user.ts b/lib/routes/weibo/oasis/user.ts index a0189c158..863d32711 100644 --- a/lib/routes/weibo/oasis/user.ts +++ b/lib/routes/weibo/oasis/user.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; import weiboUtils from '../utils'; -export default async (ctx) => { +export const route: Route = { + path: '/oasis/user/:userid', + categories: ['social-media'], + example: '/weibo/oasis/user/1990895721', + parameters: { userid: '用户 id, 可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.weibo.cn/u/:uid', 'm.weibo.cn/profile/:uid'], + target: '/user/:uid', + }, + name: '用户', + maintainers: ['kt286'], + handler, +}; + +async function handler(ctx) { const userid = ctx.req.param('userid'); const link = `https://oasis.weibo.cn/v1/h5/share?uid=${userid}`; ctx.set( @@ -21,4 +44,4 @@ export default async (ctx) => { }) ) ); -}; +} diff --git a/lib/routes/weibo/radar.ts b/lib/routes/weibo/radar.ts deleted file mode 100644 index 7c23c334f..000000000 --- a/lib/routes/weibo/radar.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default { - 'weibo.com': { - _name: '微博', - '.': [ - { - title: '博主', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - source: ['/u/:id', '/:id'], - target: (params, url, document) => { - let uid = document?.documentElement.innerHTML.match(/\$CONFIG\['oid']='(\d+)'/)?.[1]; - if (!uid && !Number.isNaN(params.id)) { - uid = params.id; - } - return uid ? `/weibo/user/${uid}` : ''; - }, - }, - { - title: '关键词', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - }, - { - title: '超话', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - source: '/p/:id/super_index', - target: '/weibo/super_index/:id', - }, - { - title: '最新关注时间线', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - source: '/', - target: '/weibo/friends', - }, - ], - s: [ - { - title: '热搜榜', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - source: '/top/summary', - target: '/weibo/search/hot/:fulltext?', - }, - ], - }, - 'weibo.cn': { - _name: '微博', - m: [ - { - title: '博主', - docs: 'https://docs.rsshub.app/routes/social-media#wei-bo', - source: ['/u/:uid', '/profile/:uid'], - target: '/weibo/user/:uid', - }, - ], - }, -}; diff --git a/lib/routes/weibo/router.ts b/lib/routes/weibo/router.ts deleted file mode 100644 index cbf69fdb7..000000000 --- a/lib/routes/weibo/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/friends/:routeParams?', './friends'); - router.get('/group/:gid/:gname?/:routeParams?', './group'); - router.get('/keyword/:keyword/:routeParams?', './keyword'); - router.get('/oasis/user/:userid', './oasis/user'); - router.get('/search/hot/:fulltext?', './search/hot'); - router.get('/super_index/:id/:type?/:routeParams?', './super-index'); - router.get('/timeline/:uid/:feature?/:routeParams?', './timeline'); - router.get('/user/:uid/:routeParams?', './user'); -}; diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.ts index ad4c34de4..fc8340548 100644 --- a/lib/routes/weibo/search/hot.ts +++ b/lib/routes/weibo/search/hot.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -13,7 +14,33 @@ import * as path from 'node:path'; let wpic = 'false'; let fullpic = 'false'; -export default async (ctx) => { +export const route: Route = { + path: '/search/hot/:fulltext?', + categories: ['social-media'], + example: '/weibo/search/hot', + parameters: { fulltext: 'N' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['s.weibo.com/top/summary'], + }, + name: '热搜榜', + 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) { wpic = ctx.req.query('pic') ?? 'false'; fullpic = ctx.req.query('fullpic') ?? 'false'; const { @@ -67,14 +94,14 @@ export default async (ctx) => { } // Update ctx - ctx.set('data', { + return { title: '微博热搜榜', link: 'https://s.weibo.com/top/summary?cate=realtimehot', description: '实时热点,每分钟更新一次', item: resultItems, - }); + }; // ctx.set('data', weiboUtils.sinaimgTvax(ctx.state.data)); // no image in the route -}; +} async function fetchContent(url) { // Fetch the subpageinof diff --git a/lib/routes/weibo/super-index.ts b/lib/routes/weibo/super-index.ts index cef66ba59..5cdac7392 100644 --- a/lib/routes/weibo/super-index.ts +++ b/lib/routes/weibo/super-index.ts @@ -1,10 +1,41 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import weiboUtils from './utils'; import queryString from 'query-string'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/super_index/:id/:type?/:routeParams?', + categories: ['social-media'], + example: '/weibo/super_index/1008084989d223732bf6f02f75ea30efad58a9/sort_time', + parameters: { id: '超话ID', type: '类型:见下表', routeParams: '额外参数;请参阅上面的说明和表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['weibo.com/p/:id/super_index'], + target: '/super_index/:id', + }, + name: '超话', + maintainers: ['zengxs', 'Rongronggg9'], + handler, + description: `| type | 备注 | +| ---------- | ---------------- | +| soul | 精华 | +| video | 视频(暂不支持) | +| album | 相册(暂不支持) | +| hot\_sort | 热门 | +| sort\_time | 最新帖子 | +| feed | 最新评论 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const type = ctx.req.param('type') ?? 'feed'; @@ -54,4 +85,4 @@ export default async (ctx) => { item: resultItems, }) ); -}; +} diff --git a/lib/routes/weibo/timeline.ts b/lib/routes/weibo/timeline.ts index 7171ab50e..84caf1817 100644 --- a/lib/routes/weibo/timeline.ts +++ b/lib/routes/weibo/timeline.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -6,7 +7,30 @@ import { config } from '@/config'; import weiboUtils from './utils'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/timeline/:uid/:feature?/:routeParams?', + categories: ['social-media'], + example: '/weibo/timeline/3306934123', + parameters: { uid: '用户的uid', feature: '过滤类型ID,0:全部、1:原创、2:图片、3:视频、4:音乐,默认为0。', routeParams: '额外参数;请参阅上面的说明和表格' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '个人时间线', + maintainers: ['zytomorrow', 'DIYgod', 'Rongronggg9'], + handler, + description: `:::warning + 需要对应用户打开页面进行授权生成 token 才能生成内容 + + 自部署需要申请并配置微博 key,具体见部署文档 + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const feature = ctx.req.param('feature') || 0; const routeParams = ctx.req.param('routeParams') || undefined; @@ -155,4 +179,4 @@ export default async (ctx) => { }); ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${feature}/${routeParams.replaceAll('&', '%26')}` : ''}`); } -}; +} diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index abbef06d9..24a029524 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -7,7 +8,36 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid/:routeParams?', + categories: ['social-media'], + example: '/weibo/user/1195230310', + parameters: { uid: '用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', routeParams: '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['m.weibo.cn/u/:uid', 'm.weibo.cn/profile/:uid'], + target: '/user/:uid', + }, + name: '博主', + maintainers: ['DIYgod', 'iplusx', 'Rongronggg9'], + handler, + description: `:::warning + 部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 \`https://m.weibo.cn/u/:uid\` 验证。如需要订阅该部分博主,可配置 Cookie 后订阅。 + + 未提供 Cookie 的情况下偶尔会触发反爬限制,提供 Cookie 可缓解该情况。 + + 微博用户 Cookie 的配置可参照部署文档 + :::`, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); let displayVideo = '1'; let displayArticle = '0'; @@ -149,4 +179,4 @@ export default async (ctx) => { item: resultItems, }) ); -}; +} diff --git a/lib/routes/wenku8/chapter.ts b/lib/routes/wenku8/chapter.ts index ba6da82a7..a07ea3f1c 100644 --- a/lib/routes/wenku8/chapter.ts +++ b/lib/routes/wenku8/chapter.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/chapter/:id', + categories: ['reading'], + example: '/wenku8/chapter/74', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '章节', + maintainers: ['zsakvo'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const index = Number.parseInt(id / 1000); @@ -27,9 +46,9 @@ export default async (ctx) => { }); }); - ctx.set('data', { + return { title: `轻小说文库 ${name}`, link: `https://www.wenku8.net/book/${id}.htm`, item: chapter_item, - }); -}; + }; +} diff --git a/lib/routes/wenku8/index.ts b/lib/routes/wenku8/index.ts index f1b3104e0..7d6580892 100644 --- a/lib/routes/wenku8/index.ts +++ b/lib/routes/wenku8/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; @@ -21,7 +22,14 @@ const cateTitleMap = { articlelist: '轻小说列表', }; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + name: 'Unknown', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'lastupdate'; const response = await got({ method: 'get', @@ -44,9 +52,9 @@ export default async (ctx) => { })) .get(); - ctx.set('data', { + return { title: `轻小说文库 - ${cateTitleMap[category]}`, link: cateUrlMap[category], item: items, - }); -}; + }; +} diff --git a/lib/routes/wenku8/maintainer.ts b/lib/routes/wenku8/maintainer.ts deleted file mode 100644 index fed97c3ef..000000000 --- a/lib/routes/wenku8/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/:category?': ['Fatpandac'], - '/volume/:id': ['huangliangshusheng'], - '/chapter/:id': ['zsakvo'], -}; diff --git a/lib/routes/wenku8/namespace.ts b/lib/routes/wenku8/namespace.ts new file mode 100644 index 000000000..f038d2e87 --- /dev/null +++ b/lib/routes/wenku8/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '轻小说文库', + url: 'www.wenku8.net', +}; diff --git a/lib/routes/wenku8/radar.ts b/lib/routes/wenku8/radar.ts deleted file mode 100644 index d75c60bef..000000000 --- a/lib/routes/wenku8/radar.ts +++ /dev/null @@ -1,85 +0,0 @@ -export default { - 'wenku8.net': { - _name: '轻小说文库', - www: [ - { - title: '轻小说列表', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/articlelist.php'], - target: (_, url) => { - const fullflag = new URL(url).searchParams.get('fullflag'); - if (!fullflag) { - return '/wenku8/fullflag'; - } - }, - }, - { - title: '热门轻小说', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/toplist.php'], - target: (_, url) => { - const sort = new URL(url).searchParams.get('sort'); - if (sort === 'allvisit') { - return '/wenku8/allvisit'; - } - }, - }, - { - title: '动画化作品', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/toplist.php'], - target: (_, url) => { - const sort = new URL(url).searchParams.get('sort'); - if (sort === 'anime') { - return '/wenku8/anime'; - } - }, - }, - { - title: '新书一览', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/toplist.php'], - target: (_, url) => { - const sort = new URL(url).searchParams.get('sort'); - if (sort === 'postdate') { - return '/wenku8/postdate'; - } - }, - }, - { - title: '完结全本', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/articlelist.php'], - target: (_, url) => { - const fullflag = new URL(url).searchParams.get('fullflag'); - if (fullflag === '1') { - return '/wenku8/fullflag'; - } - }, - }, - { - title: '今日更新', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-shou-ye-fen-lei', - source: ['/modules/article/toplist.php'], - target: (_, url) => { - const sort = new URL(url).searchParams.get('sort'); - if (sort === 'lastupdate') { - return '/wenku8/lastupdate'; - } - }, - }, - { - title: '章节', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-zhang-jie', - source: ['/book/:id'], - target: (params) => `/wenku8/chapter/${params.id.split('.')[0]}`, - }, - { - title: '最新卷', - docs: 'https://docs.rsshub.app/routes/reading#qing-xiao-shuo-wen-ku-zui-xin-juan', - source: ['/book/:id'], - target: (params) => `/wenku8/volume/${params.id.split('.')[0]}`, - }, - ], - }, -}; diff --git a/lib/routes/wenku8/router.ts b/lib/routes/wenku8/router.ts deleted file mode 100644 index 2270012c2..000000000 --- a/lib/routes/wenku8/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/chapter/:id', './chapter'); - router.get('/volume/:id', './volume'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/wenku8/volume.ts b/lib/routes/wenku8/volume.ts index 0054d78fd..ddb1b9920 100644 --- a/lib/routes/wenku8/volume.ts +++ b/lib/routes/wenku8/volume.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { decode } from 'iconv-lite'; -export default async (ctx) => { +export const route: Route = { + path: '/volume/:id', + categories: ['reading'], + example: '/wenku8/volume/1163', + parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '最新卷', + maintainers: ['huangliangshusheng'], + handler, +}; + +async function handler(ctx) { const aid = Number.parseInt(ctx.req.param('id')); const link = `https://www.wenku8.net/novel/${Math.floor(aid / 1000)}/${aid}/index.htm`; const $ = load(await get(link)); @@ -17,7 +36,7 @@ export default async (ctx) => { .toArray() .map((a) => ({ link: a.attribs.href })); - ctx.set('data', { + return { title: `轻小说文库 ${$('#title').text()} 最新卷`, link, item: await cache.tryGet(volumeUrl, async () => @@ -35,7 +54,7 @@ export default async (ctx) => { .filter((chapter) => chapter.description) .toReversed() ), - }); -}; + }; +} const get = async (url: string) => decode(await got(url).buffer(), 'gbk'); diff --git a/lib/routes/wfdf/maintainer.ts b/lib/routes/wfdf/maintainer.ts deleted file mode 100644 index d66861067..000000000 --- a/lib/routes/wfdf/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['HankChow'], -}; diff --git a/lib/routes/wfdf/namespace.ts b/lib/routes/wfdf/namespace.ts new file mode 100644 index 000000000..12b293edb --- /dev/null +++ b/lib/routes/wfdf/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'WFDF', + url: 'wfdf.sport', +}; diff --git a/lib/routes/wfdf/news.ts b/lib/routes/wfdf/news.ts index b4fa0a92d..40d042747 100644 --- a/lib/routes/wfdf/news.ts +++ b/lib/routes/wfdf/news.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['other'], + example: '/wfdf/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wfdf.sport/news/', 'wfdf.sport/'], + }, + name: 'News', + maintainers: ['HankChow'], + handler, + url: 'wfdf.sport/news/', +}; + +async function handler(ctx) { const baseUrl = 'https://wfdf.sport'; const { data: response } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { searchParams: { @@ -19,11 +42,11 @@ export default async (ctx) => { author: item._embedded.author[0].name, })); - ctx.set('data', { + return { title: 'WFDF News', link: `${baseUrl}/news/`, image: `${baseUrl}/favicon.ico`, description: 'WFDF 新闻', item: items, - }); -}; + }; +} diff --git a/lib/routes/wfdf/radar.ts b/lib/routes/wfdf/radar.ts deleted file mode 100644 index 61cfb41cf..000000000 --- a/lib/routes/wfdf/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wfdf.sport': { - _name: 'WFDF', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/other#wfdf', - source: ['/news/', '/'], - target: '/wfdf/news', - }, - ], - }, -}; diff --git a/lib/routes/wfdf/router.ts b/lib/routes/wfdf/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/wfdf/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/wfu/jwc.ts b/lib/routes/wfu/jwc.ts index 8f83d201b..19332c3fe 100644 --- a/lib/routes/wfu/jwc.ts +++ b/lib/routes/wfu/jwc.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,29 @@ import { load } from 'cheerio'; const baseUrl = 'https://jwc.wfu.edu.cn/3742/list.htm'; const sizeTitle = '潍坊学院教务处新闻'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/wfu/jwc', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['jwc.wfu.edu.cn/'], + }, + name: '教务处通知', + maintainers: ['cccht'], + handler, + url: 'jwc.wfu.edu.cn/', +}; + +async function handler() { const response = await got({ method: 'get', url: baseUrl, @@ -45,10 +68,10 @@ export default async (ctx) => { .get() ); - ctx.set('data', { + return { title: sizeTitle, link: baseUrl, description: '潍坊学院教务处通知(通知为文件需下载)', item: result, - }); -}; + }; +} diff --git a/lib/routes/wfu/maintainer.ts b/lib/routes/wfu/maintainer.ts deleted file mode 100644 index d4458c31e..000000000 --- a/lib/routes/wfu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jwc': ['cccht'], - '/news/:type?': ['cccht'], -}; diff --git a/lib/routes/wfu/namespace.ts b/lib/routes/wfu/namespace.ts new file mode 100644 index 000000000..7564b8be4 --- /dev/null +++ b/lib/routes/wfu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '潍坊学院', + url: 'jwc.wfu.edu.cn', +}; diff --git a/lib/routes/wfu/news.ts b/lib/routes/wfu/news.ts index 4a6202543..1c2d73e52 100644 --- a/lib/routes/wfu/news.ts +++ b/lib/routes/wfu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -45,7 +46,35 @@ async function loadContent(link) { return { description }; } -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/wfu/news/wyyw', + parameters: { type: '分类,默认为 `wyyw`,具体参数见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.wfu.edu.cn/'], + target: '/news', + }, + name: '新闻', + maintainers: ['cccht'], + handler, + url: 'news.wfu.edu.cn/', + description: `| **内容** | **参数** | + | :------: | :------: | + | 潍院要闻 | wyyw | + | 综合新闻 | zhxw | + | 学术纵横 | xszh |`, +}; + +async function handler(ctx) { // 默认 潍院要闻 然后获取列表页面 const type = ctx.req.param('type') ?? 'wyyw'; const listPageUrl = baseUrl + catrgoryMap[type][0]; @@ -88,10 +117,10 @@ export default async (ctx) => { .get() ); - ctx.set('data', { + return { title: catrgoryMap[type][1] + sizeTitle, link: baseUrl, description: catrgoryMap[type][1] + sizeTitle, item: result, - }); -}; + }; +} diff --git a/lib/routes/wfu/radar.ts b/lib/routes/wfu/radar.ts deleted file mode 100644 index a5f388d7d..000000000 --- a/lib/routes/wfu/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'wfu.edu.cn': { - _name: '潍坊学院', - jwc: [ - { - title: '教务处通知', - docs: 'https://docs.rsshub.app/routes/university#wei-fang-xue-yuan', - source: '/', - target: '/wfu/jwc', - }, - ], - news: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/university#wei-fang-xue-yuan', - source: '/', - target: '/wfu/news', - }, - ], - }, -}; diff --git a/lib/routes/wfu/router.ts b/lib/routes/wfu/router.ts deleted file mode 100644 index 63345d14b..000000000 --- a/lib/routes/wfu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jwc', './jwc'); - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/whitehouse/briefing-room.ts b/lib/routes/whitehouse/briefing-room.ts index 7e5965a67..09a7dcebc 100644 --- a/lib/routes/whitehouse/briefing-room.ts +++ b/lib/routes/whitehouse/briefing-room.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/briefing-room/:category?', + categories: ['government'], + example: '/whitehouse/briefing-room', + parameters: { category: 'Category, see below, all by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['whitehouse.gov/briefing-room/:category', 'whitehouse.gov/'], + target: '/briefing-room/:category', + }, + name: 'Briefing Room', + maintainers: ['nczitzk'], + handler, + description: `| All | Blog | Legislation | Presidential Actions | Press Briefings | Speeches and Remarks | Statements and Releases | + | --- | ---- | ----------- | -------------------- | --------------- | -------------------- | ----------------------- | + | | blog | legislation | presidential-actions | press-briefings | speeches-remarks | statements-releases |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://www.whitehouse.gov'; @@ -43,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/whitehouse/maintainer.ts b/lib/routes/whitehouse/maintainer.ts deleted file mode 100644 index ae7a54102..000000000 --- a/lib/routes/whitehouse/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/briefing-room/:category?': ['nczitzk'], - '/ostp': ['LyleLee'], -}; diff --git a/lib/routes/whitehouse/namespace.ts b/lib/routes/whitehouse/namespace.ts new file mode 100644 index 000000000..f474dfac6 --- /dev/null +++ b/lib/routes/whitehouse/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The White House', + url: 'whitehouse.gov', +}; diff --git a/lib/routes/whitehouse/ostp.ts b/lib/routes/whitehouse/ostp.ts index 25f8028f9..7cf4b2592 100644 --- a/lib/routes/whitehouse/ostp.ts +++ b/lib/routes/whitehouse/ostp.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/ostp', + categories: ['government'], + example: '/whitehouse/ostp', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['whitehouse.gov/ostp', 'whitehouse.gov/'], + }, + name: 'Office of Science and Technology Policy', + maintainers: ['LyleLee'], + handler, + url: 'whitehouse.gov/ostp', +}; + +async function handler() { const rootUrl = 'https://www.whitehouse.gov'; const currentUrl = `${rootUrl}/ostp/news-updates`; const response = await got({ @@ -42,10 +65,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Whitehouse OSTP', link: currentUrl, description: 'Whitehouse Office of Science and Technology Policy', item: items, - }); -}; + }; +} diff --git a/lib/routes/whitehouse/radar.ts b/lib/routes/whitehouse/radar.ts deleted file mode 100644 index 1597349de..000000000 --- a/lib/routes/whitehouse/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'whitehouse.gov': { - _name: '美国白宫办公厅', - '.': [ - { - title: '简报室', - docs: 'https://docs.rsshub.app/routes/government#mei-guo-bai-gong-ban-gong-ting', - source: ['/briefing-room/:category', '/'], - target: '/whitehouse/briefing-room/:category', - }, - { - title: '科技政策办公室', - docs: 'https://docs.rsshub.app/routes/government#mei-guo-bai-gong-ban-gong-ting', - source: ['/ostp', '/'], - target: '/whitehouse/ostp', - }, - ], - }, -}; diff --git a/lib/routes/whitehouse/router.ts b/lib/routes/whitehouse/router.ts deleted file mode 100644 index b27219ca8..000000000 --- a/lib/routes/whitehouse/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/briefing-room/:category?', './briefing-room'); - router.get('/ostp', './ostp'); -}; diff --git a/lib/routes/who/maintainer.ts b/lib/routes/who/maintainer.ts deleted file mode 100644 index 04408ccb3..000000000 --- a/lib/routes/who/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/news/:language?': ['nczitzk'], - '/news-room/:category?/:language?': ['LogicJake', 'nczitzk'], - '/speeches/:language?': ['nczitzk'], -}; diff --git a/lib/routes/who/namespace.ts b/lib/routes/who/namespace.ts new file mode 100644 index 000000000..0fa4d238e --- /dev/null +++ b/lib/routes/who/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'World Health Organization | WHO', + url: 'who.int', +}; diff --git a/lib/routes/who/news-room.ts b/lib/routes/who/news-room.ts index 5d4d2dd43..6bbb06346 100644 --- a/lib/routes/who/news-room.ts +++ b/lib/routes/who/news-room.ts @@ -1,9 +1,44 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news-room/:category?/:language?', + categories: ['government'], + example: '/who/news-room/feature-stories', + parameters: { category: 'Category, see below, Feature stories by default', language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['who.int/news-room/:type'], + target: '/news-room/:type', + }, + name: 'Newsroom', + maintainers: ['LogicJake', 'nczitzk'], + handler, + url: 'who.int/news', + description: `Category + + | Feature stories | Commentaries | + | --------------- | ------------ | + | feature-stories | commentaries | + + Language + + | English | العربية | 中文 | Français | Русский | Español | Português | + | ------- | ------- | ---- | -------- | ------- | ------- | --------- | + | en | ar | zh | fr | ru | es | pt |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'feature-stories'; const language = ctx.req.param('language') ?? ''; @@ -68,9 +103,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('meta[property="og:title"]').attr('content')} - WHO`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/who/news.ts b/lib/routes/who/news.ts index f0513be82..47342ac8a 100644 --- a/lib/routes/who/news.ts +++ b/lib/routes/who/news.ts @@ -1,8 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:language?', + categories: ['government'], + example: '/who/news', + parameters: { language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['who.int/news'], + target: '/news', + }, + name: 'News', + maintainers: ['nczitzk'], + handler, + url: 'who.int/news', + description: `Language + + | English | العربية | 中文 | Français | Русский | Español | Português | + | ------- | ------- | ---- | -------- | ------- | ------- | --------- | + | en | ar | zh | fr | ru | es | pt |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') ?? 'en'; const rootUrl = 'https://www.who.int'; @@ -35,9 +64,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'News - WHO', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/who/radar.ts b/lib/routes/who/radar.ts deleted file mode 100644 index 36a1b782e..000000000 --- a/lib/routes/who/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'who.int': { - _name: '世界卫生组织 WHO', - '.': [ - { - title: '新闻稿', - docs: 'https://docs.rsshub.app/routes/government#shi-jie-wei-sheng-zu-zhi-who', - source: '/news', - target: '/who/news', - }, - { - title: '媒体中心', - docs: 'https://docs.rsshub.app/routes/government#shi-jie-wei-sheng-zu-zhi-who', - source: '/news-room/:type', - target: '/who/news-room/:type', - }, - { - title: '总干事的讲话', - docs: 'https://docs.rsshub.app/routes/government#shi-jie-wei-sheng-zu-zhi-who', - source: '/director-general/speeches', - target: '/who/speeches', - }, - ], - }, -}; diff --git a/lib/routes/who/router.ts b/lib/routes/who/router.ts deleted file mode 100644 index 500a43d77..000000000 --- a/lib/routes/who/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/news/:language?', './news'); - router.get('/news-room/:category?/:language?', './news-room'); - router.get('/speeches/:language?', './speeches'); -}; diff --git a/lib/routes/who/speeches.ts b/lib/routes/who/speeches.ts index d3cde5781..7b1e95ed4 100644 --- a/lib/routes/who/speeches.ts +++ b/lib/routes/who/speeches.ts @@ -1,9 +1,38 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/speeches/:language?', + categories: ['government'], + example: '/who/speeches', + parameters: { language: 'Language, see below, English by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['who.int/director-general/speeches'], + target: '/speeches', + }, + name: 'Speeches', + maintainers: ['nczitzk'], + handler, + url: 'who.int/director-general/speeches', + description: `Language + + | English | العربية | 中文 | Français | Русский | Español | Português | + | ------- | ------- | ---- | -------- | ------- | ------- | --------- | + | en | ar | zh | fr | ru | es | pt |`, +}; + +async function handler(ctx) { const language = ctx.req.param('language') || 'en'; const rootUrl = 'https://www.who.int'; @@ -38,9 +67,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: 'Speeches - WHO', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/whu/cs.ts b/lib/routes/whu/cs.ts index 70db9fdae..8b22e8caa 100644 --- a/lib/routes/whu/cs.ts +++ b/lib/routes/whu/cs.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +7,28 @@ import { load } from 'cheerio'; const baseUrl = 'https://cs.whu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/cs/:type', + categories: ['university'], + example: '/whu/cs/2', + parameters: { type: '公告类型,详见表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '计算机学院公告', + maintainers: ['ttyfly'], + handler, + description: `| 公告类型 | 学院新闻 | 学术交流 | 通知公告 | 科研进展 | + | -------- | -------- | -------- | -------- | -------- | + | 参数 | 0 | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); let link; @@ -79,9 +101,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').first().text(), link, item: items, - }); -}; + }; +} diff --git a/lib/routes/whu/gs/index.ts b/lib/routes/whu/gs/index.ts index 0e8dbbd45..57253e24d 100644 --- a/lib/routes/whu/gs/index.ts +++ b/lib/routes/whu/gs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -15,7 +16,33 @@ const gsIndexMap = new Map([ [8, 'tzgg/zh.htm'], ]); -export default async (ctx) => { +export const route: Route = { + path: '/gs/:type?', + categories: ['university'], + example: '/whu/gs/0', + parameters: { type: '分类,默认为 `0`,具体参数见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.whu.edu.cn/index.htm', 'gs.whu.edu.cn/'], + target: '/gs', + }, + name: '研究生院', + maintainers: ['Delreyaa'], + handler, + url: 'gs.whu.edu.cn/index.htm', + description: `| 公告类型 | 新闻动态 | 学术探索 | 院系风采 | 通知 (全部) | 通知 (招生) | 通知 (培养) | 通知 (学位) | 通知 (质量与专业学位) | 通知 (综合) | + | -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- | + | 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |`, +}; + +async function handler(ctx) { const host = 'https://gs.whu.edu.cn/'; const type = (ctx.params && Number.parseInt(ctx.req.param('type'))) || 0; const response = await got(host + gsIndexMap.get(type)); @@ -77,10 +104,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `武汉大学研究生院 - ${feed_title}`, link: host + gsIndexMap.get(type), description: '武大研究生院', item: items, - }); -}; + }; +} diff --git a/lib/routes/whu/hyxt.ts b/lib/routes/whu/hyxt.ts index 9949aeb15..f89fc8f0d 100644 --- a/lib/routes/whu/hyxt.ts +++ b/lib/routes/whu/hyxt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; import { domain, processMeta, getMeta, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/hyxt/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'tzgg' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -37,7 +45,7 @@ export default async (ctx) => { const siteName = getMeta(meta, 'SiteName'); const columnName = getMeta(meta, 'ColumnName'); - ctx.set('data', { + return { item: items, title: `${siteName} - ${columnName}`, link: currentUrl, @@ -47,5 +55,5 @@ export default async (ctx) => { subtitle: columnName, author: siteName, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/whu/maintainer.ts b/lib/routes/whu/maintainer.ts deleted file mode 100644 index 1da0ee92e..000000000 --- a/lib/routes/whu/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/cs/:type': ['ttyfly'], - '/gs/:type?': ['Delreyaa'], - '/hyxt/:category?': ['nczitzk'], - '/news/:category?': ['SChen1024', 'nczitzk'], -}; diff --git a/lib/routes/whu/namespace.ts b/lib/routes/whu/namespace.ts new file mode 100644 index 000000000..5975ea2cb --- /dev/null +++ b/lib/routes/whu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '武汉大学', + url: 'cs.whu.edu.cn', +}; diff --git a/lib/routes/whu/news.ts b/lib/routes/whu/news.ts index 3830248c0..c328599bc 100644 --- a/lib/routes/whu/news.ts +++ b/lib/routes/whu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,14 @@ import * as path from 'node:path'; import { domain, processMeta, getMeta, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'wdzx/wdyw' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -58,7 +66,7 @@ export default async (ctx) => { const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${siteName} - ${columnName}`, link: currentUrl, @@ -70,5 +78,5 @@ export default async (ctx) => { subtitle: columnName, author: siteName, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/whu/radar.ts b/lib/routes/whu/radar.ts deleted file mode 100644 index 5ab600233..000000000 --- a/lib/routes/whu/radar.ts +++ /dev/null @@ -1,275 +0,0 @@ -export default { - 'whu.edu.cn': { - _name: '武汉大学', - cs: [ - { - title: '计算机学院公告', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue', - }, - ], - gs: [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-yan-jiu-sheng-yuan', - source: ['/index.htm', '/'], - target: '/whu/gs', - }, - ], - hyxt: [ - { - title: '弘毅学堂 - 新闻动态', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xwdt'], - target: '/whu/hyxt/xwdt', - }, - { - title: '弘毅学堂 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/tzgg'], - target: '/whu/hyxt/tzgg', - }, - { - title: '弘毅学堂 - 学子风采', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xzfc'], - target: '/whu/hyxt/xzfc', - }, - { - title: '弘毅学堂 - 学术论坛', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xslt'], - target: '/whu/hyxt/xslt', - }, - { - title: '弘毅学堂 - 学堂简报', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xtjb'], - target: '/whu/hyxt/xtjb', - }, - { - title: '弘毅学堂 - 人才培养', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy'], - target: '/whu/hyxt/rcpy', - }, - { - title: '弘毅学堂 - 招生工作', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy/zsgz', '/rcpy'], - target: '/whu/hyxt/rcpy/zsgz', - }, - { - title: '弘毅学堂 - 培养方案', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy/pyfa', '/rcpy'], - target: '/whu/hyxt/rcpy/pyfa', - }, - { - title: '弘毅学堂 - 科研训练', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy/kyxl', '/rcpy'], - target: '/whu/hyxt/rcpy/kyxl', - }, - { - title: '弘毅学堂 - 毕业去向', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy/byqx', '/rcpy'], - target: '/whu/hyxt/rcpy/byqx', - }, - { - title: '弘毅学堂 - 学习资源', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/rcpy/xxzy', '/rcpy'], - target: '/whu/hyxt/rcpy/xxzy', - }, - { - title: '弘毅学堂 - 学生工作', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz'], - target: '/whu/hyxt/xsgz', - }, - { - title: '弘毅学堂 - 党团建设', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz/dtjs', '/xsgz'], - target: '/whu/hyxt/xsgz/dtjs', - }, - { - title: '弘毅学堂 - 学术交流', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz/xsjl', '/xsgz'], - target: '/whu/hyxt/xsgz/xsjl', - }, - { - title: '弘毅学堂 - 书院生活', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz/sysh', '/xsgz'], - target: '/whu/hyxt/xsgz/sysh', - }, - { - title: '弘毅学堂 - 奖助体系', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz/jztx', '/xsgz'], - target: '/whu/hyxt/xsgz/jztx', - }, - { - title: '弘毅学堂 - 事务服务', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xsgz/swfw', '/xsgz'], - target: '/whu/hyxt/xsgz/swfw', - }, - { - title: '弘毅学堂 - 国际合作', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/gjhz'], - target: '/whu/hyxt/gjhz', - }, - { - title: '弘毅学堂 - 国际交流', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/gjhz/gjjl', '/gjhz'], - target: '/whu/hyxt/gjhz/gjjl', - }, - { - title: '弘毅学堂 - 交流分享', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/gjhz/jlfx', '/gjhz'], - target: '/whu/hyxt/gjhz/jlfx', - }, - { - title: '弘毅学堂 - 校友风采', - docs: 'https://docs.rsshub.app/routes/university#wu-han-da-xue-hong-yi-xue-tang', - source: ['/xyfc'], - target: '/whu/hyxt/xyfc', - }, - ], - news: [ - { - title: '新闻网 - 武大资讯', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/wdzx/wdyw', '/wdzx'], - target: '/whu/news/wdzx/wdyw', - }, - { - title: '新闻网 - 武大要闻', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/wdzx/wdyw', '/wdzx'], - target: '/whu/news/wdzx/wdyw', - }, - { - title: '新闻网 - 综合新闻', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/wdzx/zhxw', '/wdzx'], - target: '/whu/news/wdzx/zhxw', - }, - { - title: '新闻网 - 合作交流', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/wdzx/hzjl', '/wdzx'], - target: '/whu/news/wdzx/hzjl', - }, - { - title: '新闻网 - 一线传真', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/wdzx/yxcz', '/wdzx'], - target: '/whu/news/wdzx/yxcz', - }, - { - title: '新闻网 - 学术动态', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/kydt'], - target: '/whu/news/kydt', - }, - { - title: '新闻网 - 校园文化', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/xywh/bfxy', '/xywh'], - target: '/whu/news/xywh/bfxy', - }, - { - title: '新闻网 - 缤纷校园', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/xywh/bfxy', '/xywh'], - target: '/whu/news/xywh/bfxy', - }, - { - title: '新闻网 - 校友之声', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/xywh/xyzs', '/xywh'], - target: '/whu/news/xywh/xyzs', - }, - { - title: '新闻网 - 珞珈副刊', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/xywh/ljfk', '/xywh'], - target: '/whu/news/xywh/ljfk', - }, - { - title: '新闻网 - 校史钩沉', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/xywh/xsgc', '/xywh'], - target: '/whu/news/xywh/xsgc', - }, - { - title: '新闻网 - 主题教育', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ztbd/ztjy', '/ztbd'], - target: '/whu/news/ztbd/ztjy', - }, - { - title: '新闻网 - 顶天立地建学科', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ztbd/dtldjxk', '/ztbd'], - target: '/whu/news/ztbd/dtldjxk', - }, - { - title: '新闻网 - 学习在线', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ztbd/xxzx', '/ztbd'], - target: '/whu/news/ztbd/xxzx', - }, - { - title: '新闻网 - 记者调查', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ztbd/jzdc', '/ztbd'], - target: '/whu/news/ztbd/jzdc', - }, - { - title: '新闻网 - 校庆征文 我与武大', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ztbd/xqzw_wywd', '/ztbd'], - target: '/whu/news/ztbd/xqzw_wywd', - }, - { - title: '新闻网 - 媒体武大', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/mtwd'], - target: '/whu/news/mtwd', - }, - { - title: '新闻网 - 珞珈人物', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/ljrw'], - target: '/whu/news/ljrw', - }, - { - title: '新闻网 - 视听空间', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/stkj/ljyx', '/stkj'], - target: '/whu/media/stkj/ljyx', - }, - { - title: '新闻网 - 珞珈影像', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/stkj/ljyx', '/stkj'], - target: '/whu/media/stkj/ljyx', - }, - { - title: '新闻网 - 武大视频', - docs: 'https://docs.rsshub.app/routes/wu-han-da-xue#wu-han-da-xue-xin-wen-wang', - source: ['/stkj/wdsp', '/stkj'], - target: '/whu/media/stkj/wdsp', - }, - ], - }, -}; diff --git a/lib/routes/whu/router.ts b/lib/routes/whu/router.ts deleted file mode 100644 index b5dadd444..000000000 --- a/lib/routes/whu/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/cs/:type', './cs'); - router.get('/gs/:type?', './gs/index.js'); - router.get('/hyxt/:category{.+}?', './hyxt'); - router.get('/news/:category{.+}?', './news'); -}; diff --git a/lib/routes/wikinews/index.ts b/lib/routes/wikinews/index.ts index 2a68d4091..1e5e5e573 100644 --- a/lib/routes/wikinews/index.ts +++ b/lib/routes/wikinews/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const currentURL = 'https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/wikinews/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zh.wikinews.org/wiki/Special:新闻订阅'], + }, + name: '最新新闻', + maintainers: ['KotoriK'], + handler, + description: `根据维基新闻的[sitemap](https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85)获取新闻全文。目前仅支持中文维基新闻。`, +}; + +async function handler() { const resp = await got(currentURL); const $ = load(resp.data); const urls = $('url') @@ -35,9 +58,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '最新新闻 - 维基新闻', link: currentURL, item: items, - }); -}; + }; +} diff --git a/lib/routes/wikinews/maintainer.ts b/lib/routes/wikinews/maintainer.ts deleted file mode 100644 index 717baf532..000000000 --- a/lib/routes/wikinews/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/latest': ['KotoriK'], -}; diff --git a/lib/routes/wikinews/namespace.ts b/lib/routes/wikinews/namespace.ts new file mode 100644 index 000000000..d78d93212 --- /dev/null +++ b/lib/routes/wikinews/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '维基新闻', + url: 'zh.wikinews.org', +}; diff --git a/lib/routes/wikinews/radar.ts b/lib/routes/wikinews/radar.ts deleted file mode 100644 index 37d17ce8d..000000000 --- a/lib/routes/wikinews/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wikinews.org': { - _name: '维基新闻', - zh: [ - { - title: '最新新闻', - docs: 'https://docs.rsshub.app/routes/new-media#wei-ji-xin-wen', - source: ['/wiki/Special:新闻订阅'], - target: '/wikinews/latest', - }, - ], - }, -}; diff --git a/lib/routes/wikinews/router.ts b/lib/routes/wikinews/router.ts deleted file mode 100644 index f6278b7a6..000000000 --- a/lib/routes/wikinews/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -const routerIndex = './index'; -export default (router) => { - router.get('/latest', routerIndex); -}; diff --git a/lib/routes/winstall/maintainer.ts b/lib/routes/winstall/maintainer.ts deleted file mode 100644 index 0b13f654d..000000000 --- a/lib/routes/winstall/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:appId': ['TonyRL'], -}; diff --git a/lib/routes/winstall/namespace.ts b/lib/routes/winstall/namespace.ts new file mode 100644 index 000000000..6a6f5ac86 --- /dev/null +++ b/lib/routes/winstall/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'winstall', + url: 'winstall.app', +}; diff --git a/lib/routes/winstall/radar.ts b/lib/routes/winstall/radar.ts deleted file mode 100644 index c30f9b599..000000000 --- a/lib/routes/winstall/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'winstall.app': { - _name: 'winstall', - '.': [ - { - title: '应用更新', - docs: 'https://docs.rsshub.app/routes/program-update#winstall', - source: ['/apps/:appId'], - target: '/winstall/:appId', - }, - ], - }, -}; diff --git a/lib/routes/winstall/router.ts b/lib/routes/winstall/router.ts deleted file mode 100644 index e24728aae..000000000 --- a/lib/routes/winstall/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:appId', './update'); -}; diff --git a/lib/routes/winstall/update.ts b/lib/routes/winstall/update.ts index f943d2616..e219f4fd6 100644 --- a/lib/routes/winstall/update.ts +++ b/lib/routes/winstall/update.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,28 @@ import { config } from '@/config'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:appId', + categories: ['program-update'], + example: '/winstall/Mozilla.Firefox', + parameters: { appId: 'Application ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['winstall.app/apps/:appId'], + }, + name: 'Apps Update', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const baseUrl = 'https://winstall.app'; const appId = ctx.req.param('appId'); @@ -36,12 +58,12 @@ export default async (ctx) => { guid: `winstall:${appId}:${item.version}`, })); - ctx.set('data', { + return { title: `${app.name} - winstall`, description: app.desc, link: `${baseUrl}/apps/${appId}`, image: `https://api.winstall.app/icons/next/${appId}.webp`, language: 'en', item: items, - }); -}; + }; +} diff --git a/lib/routes/wise/maintainer.ts b/lib/routes/wise/maintainer.ts deleted file mode 100644 index 2bfaa0dd2..000000000 --- a/lib/routes/wise/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/pair/:source/:target': ['HenryQW'], -}; diff --git a/lib/routes/wise/namespace.ts b/lib/routes/wise/namespace.ts new file mode 100644 index 000000000..698a62f2d --- /dev/null +++ b/lib/routes/wise/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Wise', + url: 'wise.com', +}; diff --git a/lib/routes/wise/pair.ts b/lib/routes/wise/pair.ts index 183c17fe3..7411f0b4f 100644 --- a/lib/routes/wise/pair.ts +++ b/lib/routes/wise/pair.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +12,26 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const renderDesc = (content) => art(path.join(__dirname, 'templates/description.art'), content); -export default async (ctx) => { +export const route: Route = { + path: '/pair/:source/:target', + categories: ['other'], + example: '/wise/pair/GBP/USD', + parameters: { source: 'Base currency abbreviation', target: 'Quote currency abbreviation' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'FX Pair Yesterday', + maintainers: ['HenryQW'], + handler, + description: `Refer to [the list of supported currencies](https://wise.com/tools/exchange-rate-alerts/).`, +}; + +async function handler(ctx) { let yesterday = dayjs().subtract(1, 'day'); const dayBefore = yesterday.subtract(1, 'day').format('YYYY-MM-DD'); yesterday = yesterday.format('YYYY-MM-DD'); @@ -60,10 +80,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${source} to ${target} by Wise`, link, description: `Exchange Rate from Wise`, item: [single], - }); -}; + }; +} diff --git a/lib/routes/wise/radar.ts b/lib/routes/wise/radar.ts deleted file mode 100644 index 27aa53e7d..000000000 --- a/lib/routes/wise/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'wise.com': { - _name: 'Wise', - '.': [ - { - title: '昨日汇率变动', - docs: 'https://docs.rsshub.app/routes/other#wise', - }, - ], - }, -}; diff --git a/lib/routes/wise/router.ts b/lib/routes/wise/router.ts deleted file mode 100644 index e846e0c93..000000000 --- a/lib/routes/wise/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/pair/:source/:target', './pair'); -}; diff --git a/lib/routes/wizfile/index.ts b/lib/routes/wizfile/index.ts index 798f17cf3..e971b6db8 100644 --- a/lib/routes/wizfile/index.ts +++ b/lib/routes/wizfile/index.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const rootUrl = 'https://antibody-software.com'; -export default async (ctx) => { +export const route: Route = { + path: '/updates', + categories: ['program-update'], + example: '/wizfile/updates', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['antibody-software.com/wizfile/download'], + }, + name: 'Version History', + maintainers: ['Fatpandac'], + handler, + url: 'antibody-software.com/wizfile/download', +}; + +async function handler() { const currentUrl = `${rootUrl}/wizfile/download`; const response = await got(currentUrl); @@ -33,9 +56,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `WziFile - 更新日志`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/wizfile/maintainer.ts b/lib/routes/wizfile/maintainer.ts deleted file mode 100644 index 35f2ae03d..000000000 --- a/lib/routes/wizfile/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/updates': ['Fatpandac'], -}; diff --git a/lib/routes/wizfile/namespace.ts b/lib/routes/wizfile/namespace.ts new file mode 100644 index 000000000..35e60772b --- /dev/null +++ b/lib/routes/wizfile/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'WziFile', + url: 'antibody-software.com', +}; diff --git a/lib/routes/wizfile/radar.ts b/lib/routes/wizfile/radar.ts deleted file mode 100644 index edac873ed..000000000 --- a/lib/routes/wizfile/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'antibody-software.com': { - _name: 'WizFile', - '.': [ - { - title: '更新日志', - docs: 'https://docs.rsshub.app/routes/new-media#wei-ji-xin-wen', - source: ['/wizfile/download'], - target: '/wizfile/updates', - }, - ], - }, -}; diff --git a/lib/routes/wizfile/router.ts b/lib/routes/wizfile/router.ts deleted file mode 100644 index 791d47e79..000000000 --- a/lib/routes/wizfile/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/updates', './index'); -}; diff --git a/lib/routes/wmc-bj/maintainer.ts b/lib/routes/wmc-bj/maintainer.ts deleted file mode 100644 index 7cf18666e..000000000 --- a/lib/routes/wmc-bj/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/publish/:category?': ['nczitzk'], -}; diff --git a/lib/routes/wmc-bj/namespace.ts b/lib/routes/wmc-bj/namespace.ts new file mode 100644 index 000000000..388d297b8 --- /dev/null +++ b/lib/routes/wmc-bj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'World Meteorological Centre Beijing', + url: 'wmc-bj.net', +}; diff --git a/lib/routes/wmc-bj/publish.ts b/lib/routes/wmc-bj/publish.ts index 771028688..ca62d1b08 100644 --- a/lib/routes/wmc-bj/publish.ts +++ b/lib/routes/wmc-bj/publish.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/publish/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'CRA-Reanalysis/2m-Temperature/6-hour/index.html' } = ctx.req.param(); const rootUrl = 'http://www.wmc-bj.net'; @@ -46,7 +54,7 @@ export default async (ctx) => { const image = 'http://image.nmc.cn/static/wmc/img/logo-cma.png'; const icon = $('link[rel="shortcut icon"]').prop('href'); - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -57,5 +65,5 @@ export default async (ctx) => { subtitle: categories.join(' > '), author, allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/wmc-bj/radar.ts b/lib/routes/wmc-bj/radar.ts deleted file mode 100644 index 7274bbef1..000000000 --- a/lib/routes/wmc-bj/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'wmc-bj.net': { - _name: 'World Meteorological Centre Beijing', - '.': [ - { - title: 'Publish', - docs: 'https://docs.rsshub.app/routes/other#world-meteorological-centre-beijing-publish', - source: ['/publish/:category*'], - target: (params) => { - const category = params.category; - - return `/wmc-bj/publish${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/wmc-bj/router.ts b/lib/routes/wmc-bj/router.ts deleted file mode 100644 index 66a43ca62..000000000 --- a/lib/routes/wmc-bj/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/publish/:category{.+}?', './publish'); -}; diff --git a/lib/routes/wmpvp/index.ts b/lib/routes/wmpvp/index.ts index 4b07c7f1c..cf4285e0b 100644 --- a/lib/routes/wmpvp/index.ts +++ b/lib/routes/wmpvp/index.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type', + categories: ['game'], + example: '/wmpvp/news/1', + parameters: { type: '资讯分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '资讯列表', + maintainers: ['tssujt'], + handler, + description: `| DOTA2 | CS2 | + | ----- | --- | + | 1 | 2 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const response = await got({ @@ -26,9 +48,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `完美世界电竞`, link: `https://news.wmpvp.com/`, item: items, - }); -}; + }; +} diff --git a/lib/routes/wmpvp/maintainer.ts b/lib/routes/wmpvp/maintainer.ts deleted file mode 100644 index 0d78d1c53..000000000 --- a/lib/routes/wmpvp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type': ['tssujt'], -}; diff --git a/lib/routes/wmpvp/namespace.ts b/lib/routes/wmpvp/namespace.ts new file mode 100644 index 000000000..827076dda --- /dev/null +++ b/lib/routes/wmpvp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '完美世界电竞', + url: 'wmpvp.com', +}; diff --git a/lib/routes/wmpvp/radar.ts b/lib/routes/wmpvp/radar.ts deleted file mode 100644 index 8d3829548..000000000 --- a/lib/routes/wmpvp/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'wmpvp.com': { - _name: '完美世界电竞', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/game#wan-mei-shi-jie-dian-jing-zi-xun', - }, - ], - }, -}; diff --git a/lib/routes/wmpvp/router.ts b/lib/routes/wmpvp/router.ts deleted file mode 100644 index 4f35ef401..000000000 --- a/lib/routes/wmpvp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type', './index'); -}; diff --git a/lib/routes/wnacg/index.ts b/lib/routes/wnacg/index.ts index 7269f828e..d90d03475 100644 --- a/lib/routes/wnacg/index.ts +++ b/lib/routes/wnacg/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -29,7 +30,21 @@ const categories = { const baseUrl = 'https://www.wnacg.com'; -export default async (ctx) => { +export const route: Route = { + path: ['/', '/category/:cid', '/tag/:tag'], + radar: { + source: ['wnacg.org/albums.html', 'wnacg.org/'], + target: '', + }, + name: 'Unknown', + maintainers: ['KenMizz'], + handler, + url: 'wnacg.org/albums.html', + url: 'wnacg.org/albums.html', + url: 'wnacg.org/albums.html', +}; + +async function handler(ctx) { const { cid, tag } = ctx.req.param(); if (cid && !Object.keys(categories).includes(cid)) { throw new Error('此分类不存在'); @@ -100,9 +115,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/wnacg/maintainer.ts b/lib/routes/wnacg/maintainer.ts deleted file mode 100644 index 6aa3a087e..000000000 --- a/lib/routes/wnacg/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/': ['KenMizz'], - '/category/:cid': ['Gandum2077'], - '/tag/:tag': ['Gandum2077'], -}; diff --git a/lib/routes/wnacg/namespace.ts b/lib/routes/wnacg/namespace.ts new file mode 100644 index 000000000..5b1dbac6c --- /dev/null +++ b/lib/routes/wnacg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '紳士漫畫', + url: 'wnacg.org', +}; diff --git a/lib/routes/wnacg/radar.ts b/lib/routes/wnacg/radar.ts deleted file mode 100644 index 235aadd15..000000000 --- a/lib/routes/wnacg/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'wnacg.org': { - _name: '紳士漫畫', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/anime#shen-shi-man-hua', - source: ['/albums.html', '/'], - target: '/wnacg', - }, - { - title: '分类更新', - docs: 'https://docs.rsshub.app/routes/anime#shen-shi-man-hua', - source: ['/*'], - target: (_, url) => `/wnacg/category/${new URL(url).pathname.match(/albums-index-cate-(\d+)\.html$/)[1]}`, - }, - { - title: '標籤更新', - docs: 'https://docs.rsshub.app/routes/anime#shen-shi-man-hua', - source: ['/*'], - target: (_, url) => `/wnacg/tag/${new URL(url).pathname.match(/albums-index-tag-(.+?)\.html$/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/wnacg/router.ts b/lib/routes/wnacg/router.ts deleted file mode 100644 index dab26e1f9..000000000 --- a/lib/routes/wnacg/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/', './index'); - router.get('/category/:cid', './index'); - router.get('/tag/:tag', './index'); -}; diff --git a/lib/routes/worldjournal/index.ts b/lib/routes/worldjournal/index.ts index 93e6cb063..12c1d5a61 100644 --- a/lib/routes/worldjournal/index.ts +++ b/lib/routes/worldjournal/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,19 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://www.worldjournal.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:path{.+}?', + radar: { + source: ['worldjournal.com/wj/*path'], + target: '/:path', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'worldjournal.com/wj/*path', +}; + +async function handler(ctx) { const { path = 'cate/breaking' } = ctx.req.param(); const { data: response } = await got(`${baseUrl}/wj/${path}`); @@ -51,11 +64,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name="description"]').attr('content'), image: 'https://www.worldjournal.com/static/img/icons/icon-144x144.png', link: `${baseUrl}/wj/${path}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/worldjournal/maintainer.ts b/lib/routes/worldjournal/maintainer.ts deleted file mode 100644 index c05e5eef7..000000000 --- a/lib/routes/worldjournal/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:path*': ['TonyRL'], -}; diff --git a/lib/routes/worldjournal/namespace.ts b/lib/routes/worldjournal/namespace.ts new file mode 100644 index 000000000..fec6b357a --- /dev/null +++ b/lib/routes/worldjournal/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '世界新聞網', + url: 'worldjournal.com', +}; diff --git a/lib/routes/worldjournal/radar.ts b/lib/routes/worldjournal/radar.ts deleted file mode 100644 index fbe70879a..000000000 --- a/lib/routes/worldjournal/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'worldjournal.com': { - _name: '世界新聞網', - '.': [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/new-media#shi-jie-xin-wen-wang', - source: ['/wj/*path'], - target: '/worldjournal/:path', - }, - ], - }, -}; diff --git a/lib/routes/worldjournal/router.ts b/lib/routes/worldjournal/router.ts deleted file mode 100644 index 942aa4ac4..000000000 --- a/lib/routes/worldjournal/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:path{.+}?', './index'); -}; diff --git a/lib/routes/woshipm/maintainer.ts b/lib/routes/woshipm/maintainer.ts deleted file mode 100644 index 198c5025f..000000000 --- a/lib/routes/woshipm/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/popular/:range?': ['WenryXu'], - '/user_article/:id': ['LogicJake'], - '/wen': ['WenryXu'], -}; diff --git a/lib/routes/woshipm/namespace.ts b/lib/routes/woshipm/namespace.ts new file mode 100644 index 000000000..00062097f --- /dev/null +++ b/lib/routes/woshipm/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '人人都是产品经理', + url: 'woshipm.com', +}; diff --git a/lib/routes/woshipm/popular.ts b/lib/routes/woshipm/popular.ts index 0f53248eb..270123d6b 100644 --- a/lib/routes/woshipm/popular.ts +++ b/lib/routes/woshipm/popular.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -9,7 +10,33 @@ const rangeMap = { monthly: '月榜', }; -export default async (ctx) => { +export const route: Route = { + path: '/popular/:range?', + categories: ['new-media'], + example: '/woshipm/popular', + parameters: { range: '时间,见下表,默认为 `daily`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['woshipm.com/'], + target: '/popular', + }, + name: '热门文章', + maintainers: ['WenryXu'], + handler, + url: 'woshipm.com/', + description: `| 日榜 | 周榜 | 月榜 | + | ----- | ------ | ------- | + | daily | weekly | monthly |`, +}; + +async function handler(ctx) { const { range = 'daily' } = ctx.req.param(); const { data: response } = await got(`${baseUrl}/api2/app/article/popular/${range}`); @@ -26,9 +53,9 @@ export default async (ctx) => { const result = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `热门文章 - ${rangeMap[range]} - 人人都是产品经理`, link: baseUrl, item: result, - }); -}; + }; +} diff --git a/lib/routes/woshipm/radar.ts b/lib/routes/woshipm/radar.ts deleted file mode 100644 index a1abeb818..000000000 --- a/lib/routes/woshipm/radar.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - 'woshipm.com': { - _name: '人人都是产品经理', - '.': [ - { - title: '热门文章', - docs: 'https://docs.rsshub.app/routes/new-media#ren-ren-dui-shi-chan-pin-jing-li', - source: ['/'], - target: '/woshipm/popular', - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/new-media#ren-ren-dui-shi-chan-pin-jing-li', - source: ['/u/:id'], - target: '/woshipm/user_article/:id', - }, - ], - wen: [ - { - title: '天天问', - docs: 'https://docs.rsshub.app/routes/new-media#ren-ren-dui-shi-chan-pin-jing-li', - source: ['/'], - target: '/woshipm/wen', - }, - ], - }, -}; diff --git a/lib/routes/woshipm/router.ts b/lib/routes/woshipm/router.ts deleted file mode 100644 index e77fa3ff7..000000000 --- a/lib/routes/woshipm/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/popular/:range?', './popular'); - router.get('/user_article/:id', './user-article'); - router.get('/wen', './wen'); -}; diff --git a/lib/routes/woshipm/user-article.ts b/lib/routes/woshipm/user-article.ts index 9e3ef2f50..7c8cd84c6 100644 --- a/lib/routes/woshipm/user-article.ts +++ b/lib/routes/woshipm/user-article.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, parseArticle } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/user_article/:id', + categories: ['new-media'], + example: '/woshipm/user_article/324696', + parameters: { id: '用户 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['woshipm.com/u/:id'], + }, + name: '用户文章', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 12; const link = `${baseUrl}/u/${id}`; @@ -28,11 +50,11 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); - ctx.set('data', { + return { title: `${name}的文章-人人都是产品经理`, description: $('.author--meta .description').text(), image: $('.author--meta .avatar').attr('src').split('!')[0], link, item: items, - }); -}; + }; +} diff --git a/lib/routes/woshipm/wen.ts b/lib/routes/woshipm/wen.ts index 8f325747c..007c2fcab 100644 --- a/lib/routes/woshipm/wen.ts +++ b/lib/routes/woshipm/wen.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const baseUrl = 'https://wen.woshipm.com'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/wen', + categories: ['new-media'], + example: '/woshipm/wen', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wen.woshipm.com/'], + }, + name: '天天问', + maintainers: ['WenryXu'], + handler, + url: 'wen.woshipm.com/', +}; + +async function handler() { const response = await got(`${baseUrl}/m/main/indexNewData.html`); const $ = load(response.data); const postList = $('.article-list-item') @@ -29,9 +52,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '天天问 - 人人都是产品经理', link: baseUrl, item: result, - }); -}; + }; +} diff --git a/lib/routes/wsj/maintainer.ts b/lib/routes/wsj/maintainer.ts deleted file mode 100644 index 4b468acec..000000000 --- a/lib/routes/wsj/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:lang/:category?': ['oppilate'], -}; diff --git a/lib/routes/wsj/namespace.ts b/lib/routes/wsj/namespace.ts new file mode 100644 index 000000000..24ddb9913 --- /dev/null +++ b/lib/routes/wsj/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Wall Street Journal (WSJ) 华尔街日报', + url: 'cn.wsj.com', +}; diff --git a/lib/routes/wsj/news.ts b/lib/routes/wsj/news.ts index 65abc47a7..9e0d86e35 100644 --- a/lib/routes/wsj/news.ts +++ b/lib/routes/wsj/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { asyncPoolAll, parseArticle } from './utils'; @@ -6,7 +7,38 @@ const hostMap = { 'zh-cn': 'https://cn.wsj.com/zh-hans', 'zh-tw': 'https://cn.wsj.com/zh-hant', }; -export default async (ctx) => { +export const route: Route = { + path: '/:lang/:category?', + categories: ['traditional-media'], + example: '/wsj/en-us/opinion', + parameters: { lang: 'Language, `en-us`, `zh-cn`, `zh-tw`', category: 'Category. See below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['oppilate'], + handler, + description: `en\_us + + | World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports | + | ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ | + | world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports | + + zh-cn / zh-tw + + | 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 | + | ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- | + | world | china | markets | economy | business | technology | life-arts | opinion | + + Provide full article RSS for WSJ topics.`, +}; + +async function handler(ctx) { const lang = ctx.req.param('lang'); const category = ctx.req.param('category') || ''; const host = hostMap[lang]; @@ -42,10 +74,10 @@ export default async (ctx) => { }); const items = await asyncPoolAll(10, list, (item) => parseArticle(item)); - ctx.set('data', { + return { title: `WSJ${subTitle}`, link: url, description: `WSJ${subTitle}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/wsj/radar.ts b/lib/routes/wsj/radar.ts deleted file mode 100644 index fdd0c8356..000000000 --- a/lib/routes/wsj/radar.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default { - 'wsj.com': { - _name: '华尔街日报 The Wall Street Journal (WSJ)', - cn: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-er-jie-ri-bao-the-wall-street-journal-wsj', - source: '/', - target: '/wsj/zh-cn', - }, - ], - www: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#hua-er-jie-ri-bao-the-wall-street-journal-wsj', - source: '/', - target: '/wsj/en-us', - }, - ], - }, -}; diff --git a/lib/routes/wsj/router.ts b/lib/routes/wsj/router.ts deleted file mode 100644 index 0011c4977..000000000 --- a/lib/routes/wsj/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:lang/:category?', './news'); -}; diff --git a/lib/routes/wsyu/maintainer.ts b/lib/routes/wsyu/maintainer.ts deleted file mode 100644 index e28390b36..000000000 --- a/lib/routes/wsyu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['Derekmini'], -}; diff --git a/lib/routes/wsyu/namespace.ts b/lib/routes/wsyu/namespace.ts new file mode 100644 index 000000000..b35752d22 --- /dev/null +++ b/lib/routes/wsyu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '武昌首义学院', + url: 'www.wsyu.edu.cn', +}; diff --git a/lib/routes/wsyu/news.ts b/lib/routes/wsyu/news.ts index ce488fe7e..0aa8aa050 100644 --- a/lib/routes/wsyu/news.ts +++ b/lib/routes/wsyu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -20,7 +21,28 @@ const typeMap = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + categories: ['university'], + example: '/wsyu/news/xxyw', + parameters: { type: '分类,默认为 `xxyw`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻中心', + maintainers: ['Derekmini'], + handler, + description: `| 学校要闻 | 综合新闻 | 媒体聚焦 | + | -------- | -------- | -------- | + | xxyw | zhxw | mtjj |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'xxyw'; const link = baseUrl + typeMap[type].url; const response = await got({ @@ -78,9 +100,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '武昌首义学院-' + typeMap[type].name, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/wsyu/radar.ts b/lib/routes/wsyu/radar.ts deleted file mode 100644 index beaf50d80..000000000 --- a/lib/routes/wsyu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'wsyu.edu.cn': { - _name: '新闻中心', - www: [ - { - title: '学校要闻', - docs: 'https://docs.rsshub.app/routes/other#wu-chang-shou-yi-xue-yuan', - source: '/*', - target: '/wsyu/news/xxyw', - }, - { - title: '综合新闻', - docs: 'https://docs.rsshub.app/routes/other#wu-chang-shou-yi-xue-yuan', - source: '/*', - target: '/wsyu/news/zhxw', - }, - { - title: '媒体聚焦', - docs: 'https://docs.rsshub.app/routes/other#wu-chang-shou-yi-xue-yuan', - source: '/*', - target: '/wsyu/news/mtjj', - }, - ], - }, -}; diff --git a/lib/routes/wsyu/router.ts b/lib/routes/wsyu/router.ts deleted file mode 100644 index eb19f8f1f..000000000 --- a/lib/routes/wsyu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/wtu/index.ts b/lib/routes/wtu/index.ts index 1f10f65cc..b6e8ad518 100644 --- a/lib/routes/wtu/index.ts +++ b/lib/routes/wtu/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:type', + categories: ['university'], + example: '/wtu/2', + parameters: { type: '公告类型,详见表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '信息门户公告', + maintainers: ['loyio'], + handler, + description: `| 公告类型 | 通知公告 | 教务信息 | 科研动态 | + | -------- | -------- | -------- | -------- | + | 参数 | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const apiUrl = 'https://ehall.wtu.edu.cn/wtu/api/queryBulletinListByConditional.do?pageNum=1&pageSize=20&columnId='; const listUrl = 'https://ehall.wtu.edu.cn/new/list.html?type='; const psgUrl = 'https://ehall.wtu.edu.cn/new/detail-word.html?'; @@ -23,7 +45,7 @@ export default async (ctx) => { }); const resJson = res.data.bulletinList; - ctx.set('data', { + return { title: `${title} - 武汉纺织大学信息门户`, link: `${listUrl}${type}`, description: `${title} - 武汉纺织大学信息门户`, @@ -33,5 +55,5 @@ export default async (ctx) => { link: item.GOTO_URL ?? `${psgUrl}type=${type}?bulletinId=${item.WID}`, author: item.PUBLISH_USER_DEPT_NAME, })), - }); -}; + }; +} diff --git a/lib/routes/wtu/job.ts b/lib/routes/wtu/job.ts index 44d1e9fd7..a688723aa 100644 --- a/lib/routes/wtu/job.ts +++ b/lib/routes/wtu/job.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -34,7 +35,31 @@ function decodeData(str) { return content.toString('utf8').substring(substr2Num); } -export default async (ctx) => { +export const route: Route = { + path: '/job/:type', + categories: ['university'], + example: '/wtu/job/xxtz', + parameters: { type: '信息类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wtu.91wllm.com/news/index/tag/:type'], + }, + name: '就业信息', + maintainers: ['ticks-tan'], + handler, + description: `| 信息类型 | 消息通知 | 通知公告 | 新闻快递 | + | -------- | -------- | -------- | -------- | + | 参数 | xxtz | tzgg | xwkd |`, +}; + +async function handler(ctx) { // 获取参数 type const type = ctx.req.param('type'); const mapItem = typeMap.get(type); @@ -72,10 +97,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: msgTitle, link, description: msgTitle, item: items, - }); -}; + }; +} diff --git a/lib/routes/wtu/maintainer.ts b/lib/routes/wtu/maintainer.ts deleted file mode 100644 index 480d5482f..000000000 --- a/lib/routes/wtu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:type': ['loyio'], - '/job/:type': ['ticks-tan'], -}; diff --git a/lib/routes/wtu/namespace.ts b/lib/routes/wtu/namespace.ts new file mode 100644 index 000000000..c4c1d1e8f --- /dev/null +++ b/lib/routes/wtu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '武汉纺织大学', + url: 'wtu.91wllm.com', +}; diff --git a/lib/routes/wtu/radar.ts b/lib/routes/wtu/radar.ts deleted file mode 100644 index 69f40978c..000000000 --- a/lib/routes/wtu/radar.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - '91wllm.com': { - _name: '湖北高校就业网络联盟', - wtu: [ - { - title: '武汉纺织大学就业信息', - docs: 'https://docs.rsshub.app/routes/university#wu-han-fang-zhi-da-xue', - source: '/news/index/tag/:type', - target: '/wtu/job/:type', - }, - ], - }, - 'wtu.edu.cn': { - _name: '武汉纺织大学', - wtu: [ - { - title: '信息门户公告', - docs: 'https://docs.rsshub.app/routes/university#wu-han-fang-zhi-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/wtu/router.ts b/lib/routes/wtu/router.ts deleted file mode 100644 index 11bcbc181..000000000 --- a/lib/routes/wtu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:type', './index'); - router.get('/job/:type', './job'); -}; diff --git a/lib/routes/wyzxwk/article.ts b/lib/routes/wyzxwk/article.ts index ebbd2cb47..251ff575d 100644 --- a/lib/routes/wyzxwk/article.ts +++ b/lib/routes/wyzxwk/article.ts @@ -1,9 +1,72 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/article/:id?', + categories: ['new-media'], + example: '/wyzxwk/article/shushe', + parameters: { id: '栏目 id,可在栏目页 URL 中找到,默认为时代观察' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wyzxwk.com/Article/:id', 'wyzxwk.com/'], + }, + name: '栏目', + maintainers: ['nczitzk'], + handler, + description: `时政 + + | 时代观察 | 舆论战争 | + | -------- | -------- | + | shidai | yulun | + + 经济 + + | 经济视点 | 社会民生 | 三农关注 | 产业研究 | + | -------- | -------- | -------- | -------- | + | jingji | shehui | sannong | chanye | + + 国际 + + | 国际纵横 | 国防外交 | + | -------- | -------- | + | guoji | guofang | + + 思潮 + + | 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 | + | -------- | -------- | -------- | -------- | + | lixiang | sichao | wenyi | shushe | + + 历史 + + | 历史视野 | 中华文化 | 中华医药 | 共产党人 | + | -------- | -------- | -------- | -------- | + | lishi | zhonghua | zhongyi | cpers | + + 争鸣 + + | 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 | + | -------- | -------- | -------- | -------- | + | qingnian | gongnong | zatan | shiping | + + 活动 + + | 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 | + | -------- | -------- | --------- | -------- | + | gonggao | lvyou | jiangtang | shuhua |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'shidai'; const rootUrl = 'http://www.wyzxwk.com'; @@ -57,9 +120,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('title').text().split(' - ')[0]} - 乌有之乡网刊`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/wyzxwk/maintainer.ts b/lib/routes/wyzxwk/maintainer.ts deleted file mode 100644 index 41bc97955..000000000 --- a/lib/routes/wyzxwk/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/article/:id?': ['nczitzk'], -}; diff --git a/lib/routes/wyzxwk/namespace.ts b/lib/routes/wyzxwk/namespace.ts new file mode 100644 index 000000000..17510ac90 --- /dev/null +++ b/lib/routes/wyzxwk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '乌有之乡', + url: 'wyzxwk.com', +}; diff --git a/lib/routes/wyzxwk/radar.ts b/lib/routes/wyzxwk/radar.ts deleted file mode 100644 index c33ee528b..000000000 --- a/lib/routes/wyzxwk/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'wyzxwk.com': { - _name: '乌有之乡', - '.': [ - { - title: '栏目', - docs: 'https://docs.rsshub.app/routes/new-media#wu-you-zhi-xiang-lan-mu', - source: ['/Article/:id', '/'], - target: '/wyzxwk/article/:id?', - }, - ], - }, -}; diff --git a/lib/routes/wyzxwk/router.ts b/lib/routes/wyzxwk/router.ts deleted file mode 100644 index ac33a2762..000000000 --- a/lib/routes/wyzxwk/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/article/:id?', './article'); -}; diff --git a/lib/routes/wzu/maintainer.ts b/lib/routes/wzu/maintainer.ts deleted file mode 100644 index b59f1c7f9..000000000 --- a/lib/routes/wzu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news/:type?': ['Chandler-Lu'], -}; diff --git a/lib/routes/wzu/namespace.ts b/lib/routes/wzu/namespace.ts new file mode 100644 index 000000000..c53638a63 --- /dev/null +++ b/lib/routes/wzu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '温州大学', + url: 'wzu.edu.cn', +}; diff --git a/lib/routes/wzu/news.ts b/lib/routes/wzu/news.ts index 80d58fde6..5a6aca24a 100644 --- a/lib/routes/wzu/news.ts +++ b/lib/routes/wzu/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -49,7 +50,14 @@ async function loadContent(link) { return $('div[id^=vsb_content]').html(); } -export default async (ctx) => { +export const route: Route = { + path: '/news/:type?', + name: 'Unknown', + maintainers: ['Chandler-Lu'], + handler, +}; + +async function handler(ctx) { // 获取路由 Tag const routeTag = Number.parseInt(ctx.req.param('type')) || 0; // 设定新闻标题及 Url @@ -61,7 +69,7 @@ export default async (ctx) => { const $ = load(response.data); const list = $('#News-sidebar-b-nav').find('li'); - ctx.set('data', { + return { title: newsTitle, link: newsLink, description: '温州大学' + ' - ' + newsTitle, @@ -81,5 +89,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/wzu/radar.ts b/lib/routes/wzu/radar.ts deleted file mode 100644 index 41c52cb9b..000000000 --- a/lib/routes/wzu/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'wzu.edu.cn': { - _name: '温州大学', - '.': [ - { - title: '温州大学 - 主站新闻', - docs: 'https://docs.rsshub.app/routes/university#wen-zhou-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/wzu/router.ts b/lib/routes/wzu/router.ts deleted file mode 100644 index eb19f8f1f..000000000 --- a/lib/routes/wzu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news/:type?', './news'); -}; diff --git a/lib/routes/x-mol/maintainer.ts b/lib/routes/x-mol/maintainer.ts deleted file mode 100644 index ff4b2d28d..000000000 --- a/lib/routes/x-mol/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:tag?': ['cssxsh'], - '/paper/:type/:magazine': ['cssxsh'], -}; diff --git a/lib/routes/x-mol/namespace.ts b/lib/routes/x-mol/namespace.ts new file mode 100644 index 000000000..76ad6cbd2 --- /dev/null +++ b/lib/routes/x-mol/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'X-MOL', + url: 'x-mol.com', +}; diff --git a/lib/routes/x-mol/news.ts b/lib/routes/x-mol/news.ts index 1b34ca81c..d37cafde1 100644 --- a/lib/routes/x-mol/news.ts +++ b/lib/routes/x-mol/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,30 @@ import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:tag?', + categories: ['study'], + example: '/x-mol/news/3', + parameters: { tag: 'Tag number, can be obtained from news list URL. Empty value means news index.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['x-mol.com/news/index'], + target: '/news', + }, + name: 'News', + maintainers: ['cssxsh'], + handler, + url: 'x-mol.com/news/index', +}; + +async function handler(ctx) { const tag = ctx.req.param('tag'); const urlPath = tag ? `news/tag/${tag}` : 'news/index'; const link = new URL(urlPath, utils.host).href; @@ -58,10 +82,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: response.url, description: $('meta[name="description"]').attr('content'), item, - }); -}; + }; +} diff --git a/lib/routes/x-mol/paper.ts b/lib/routes/x-mol/paper.ts index 0c3077746..69c01732f 100644 --- a/lib/routes/x-mol/paper.ts +++ b/lib/routes/x-mol/paper.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,25 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/paper/:type/:magazine', + categories: ['journal'], + example: '/x-mol/paper/0/9', + parameters: { type: 'type', magazine: 'magazine' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Journal', + maintainers: ['cssxsh'], + handler, +}; + +async function handler(ctx) { const { type, magazine } = ctx.req.param(); const path = `paper/${type}/${magazine}`; const link = new URL(path, utils.host).href; @@ -65,10 +84,10 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: $('title').text(), link: response.url, description: $('meta[name="description"]').attr('content'), item, - }); -}; + }; +} diff --git a/lib/routes/x-mol/radar.ts b/lib/routes/x-mol/radar.ts deleted file mode 100644 index 4955e29d3..000000000 --- a/lib/routes/x-mol/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'x-mol.com': { - _name: 'X-MOL', - '.': [ - { - title: 'News', - docs: 'https://docs.rsshub.app/study#x-mol', - source: ['/news/:area/tag/:tag'], - target: '/x-mol/news/:tag', - }, - { - title: 'News Index', - docs: 'https://docs.rsshub.app/study#x-mol', - source: ['/news/index'], - target: '/x-mol/news', - }, - { - title: 'Journal', - docs: 'https://docs.rsshub.app/journal#x-mol', - source: ['/paper/:area/tag/:type/journal/:magazine'], - target: '/x-mol/paper/geo/:type/:magazine', - }, - ], - }, -}; diff --git a/lib/routes/x-mol/router.ts b/lib/routes/x-mol/router.ts deleted file mode 100644 index 37bd14d0a..000000000 --- a/lib/routes/x-mol/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:tag?', './news'); - router.get('/paper/:type/:magazine', './paper'); -}; diff --git a/lib/routes/x6d/index.ts b/lib/routes/x6d/index.ts index 940e4c782..ca3de354a 100644 --- a/lib/routes/x6d/index.ts +++ b/lib/routes/x6d/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,48 @@ import timezone from '@/utils/timezone'; const baseUrl = 'https://xd.x6d.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:id?', + categories: ['new-media'], + example: '/x6d/34', + parameters: { id: '分类 id,可在对应分类页面的 URL 中找到,默认为首页最近更新' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| 技巧分享 | QQ 技巧 | 微信技巧 | 其他教程 | 其他分享 | + | -------- | ------- | -------- | -------- | -------- | + | 31 | 55 | 112 | 33 | 88 | + + | 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- | + | 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 | + + | 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 | + + | 值得一看 | 找点乐子 | 热门事件 | 节目推荐 | + | -------- | -------- | -------- | -------- | + | 65 | 50 | 77 | 101 | + + | 值得一听 | 每日一听 | 歌单推荐 | + | -------- | -------- | -------- | + | 71 | 87 | 79 | + + | 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 106 | 107 | 108 | 109 | 110 | 111 | 113 |`, +}; + +async function handler(ctx) { const { id = 'latest' } = ctx.req.param(); const currentUrl = id === 'latest' ? baseUrl : `${baseUrl}/html/${id}.html`; @@ -49,9 +91,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `小刀娱乐网 - ${$('title').text().split('-')[0]}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/x6d/maintainer.ts b/lib/routes/x6d/maintainer.ts deleted file mode 100644 index a412b1ea1..000000000 --- a/lib/routes/x6d/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?': ['nczitzk'], -}; diff --git a/lib/routes/x6d/namespace.ts b/lib/routes/x6d/namespace.ts new file mode 100644 index 000000000..7a428f278 --- /dev/null +++ b/lib/routes/x6d/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小刀娱乐网', + url: 'xd.x6d.com', +}; diff --git a/lib/routes/x6d/radar.ts b/lib/routes/x6d/radar.ts deleted file mode 100644 index cf6d90350..000000000 --- a/lib/routes/x6d/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'x6d.com': { - _name: '小刀娱乐网', - xd: [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#xiao-dao-yu-le-wang', - source: ['/html/:id'], - target: (params) => `/x6d/${params.id.replace('.html', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/x6d/router.ts b/lib/routes/x6d/router.ts deleted file mode 100644 index 28cef7111..000000000 --- a/lib/routes/x6d/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?', './index'); -}; diff --git a/lib/routes/xaufe/jiaowu.ts b/lib/routes/xaufe/jiaowu.ts index f586887be..8da10d9a4 100644 --- a/lib/routes/xaufe/jiaowu.ts +++ b/lib/routes/xaufe/jiaowu.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -16,7 +17,28 @@ const categories = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/jiaowu/:category?', + categories: ['university'], + example: '/xaufe/jiaowu/tzgg', + parameters: { category: '分类,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['shaokeyibb'], + handler, + description: `| 通知公告 | + | :------: | + | tzgg |`, +}; + +async function handler(ctx) { const pCategory = ctx.req.param('category'); const category = categories[pCategory] || categories.tzgg; @@ -44,7 +66,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${category.title}-${rootMeta.title}`, link: rootMeta.url + category.url, description: `${category.title}-${rootMeta.title}`, @@ -66,5 +88,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xaufe/maintainer.ts b/lib/routes/xaufe/maintainer.ts deleted file mode 100644 index ca97c1a78..000000000 --- a/lib/routes/xaufe/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jiaowu/:category?': ['shaokeyibb'], -}; diff --git a/lib/routes/xaufe/namespace.ts b/lib/routes/xaufe/namespace.ts new file mode 100644 index 000000000..e313c3286 --- /dev/null +++ b/lib/routes/xaufe/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西安财经大学', + url: 'jiaowu.xaufe.edu.cn', +}; diff --git a/lib/routes/xaufe/radar.ts b/lib/routes/xaufe/radar.ts deleted file mode 100644 index f546a5518..000000000 --- a/lib/routes/xaufe/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'xaufe.edu.cn': { - _name: '西安财经大学', - jiaowu: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xi-an-cai-jing-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/xaufe/router.ts b/lib/routes/xaufe/router.ts deleted file mode 100644 index 5c986f5ad..000000000 --- a/lib/routes/xaufe/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jiaowu/:category?', './jiaowu'); -}; diff --git a/lib/routes/xaut/index.ts b/lib/routes/xaut/index.ts index 4feddb3b7..7768d41c9 100644 --- a/lib/routes/xaut/index.ts +++ b/lib/routes/xaut/index.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/index/:category?', + categories: ['university'], + example: '/xaut/index/tzgg', + parameters: { category: '通知类别,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '学校主页', + maintainers: ['mocusez'], + handler, + description: `| 通知公告 | 校园要闻 | 媒体播报 | 学术活动 | + | :------: | :------: | :------: | :------: | + | tzgg | xyyw | mtbd | xshd |`, +}; + +async function handler(ctx) { let category = ctx.req.param('category'); const dic_html = { tzgg: 'tzgg.htm', xyyw: 'xyyw.htm', mtbd: 'mtbd1.htm', xshd: 'xshd.htm' }; const dic_title = { tzgg: '通知公告', xyyw: '校园要闻', mtbd: '媒体播报', xshd: '学术活动' }; @@ -44,7 +66,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { // 源标题 title: '西安理工大学官网-' + dic_title[category], // 源链接 @@ -69,5 +91,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xaut/jwc.ts b/lib/routes/xaut/jwc.ts index 44de7e5a5..46206389c 100644 --- a/lib/routes/xaut/jwc.ts +++ b/lib/routes/xaut/jwc.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:category?', + categories: ['university'], + example: '/xaut/jwc/tzgg', + parameters: { category: '通知类别,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['mocusez'], + handler, + description: `:::warning + 有些内容需使用校园网或 VPN 访问知行网获取 + ::: + + | 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 | + | :------: | :------: | :------: | :----------: | :----------: | :------: | :------: | + | tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs |`, +}; + +async function handler(ctx) { let category = ctx.req.param('category'); const rootUrl = 'http://jwc.xaut.edu.cn/'; const dic_html = { tzgg: 'tzgg.htm', xwdt: 'xwdt.htm', gzzd: 'gzzd.htm', jggs: 'xkjs/jggs.htm', jsjg: 'xkjs/jsjg.htm', jsxx: 'xkjs/jsxx.htm', gkgs: 'gkgs.htm' }; @@ -37,7 +63,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { // 源标题 title: '西安理工大学教务处-' + dic_title[category], // 源链接 @@ -62,5 +88,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xaut/maintainer.ts b/lib/routes/xaut/maintainer.ts deleted file mode 100644 index 131f31085..000000000 --- a/lib/routes/xaut/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/index/:category?': ['mocusez'], - '/jwc/:category?': ['mocusez'], - '/rsc/:category?': ['mocusez', 'light0926'], -}; diff --git a/lib/routes/xaut/namespace.ts b/lib/routes/xaut/namespace.ts new file mode 100644 index 000000000..ca23d46f7 --- /dev/null +++ b/lib/routes/xaut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西安理工大学', + url: 'index.xaut.edu.cn', +}; diff --git a/lib/routes/xaut/radar.ts b/lib/routes/xaut/radar.ts deleted file mode 100644 index f0be37b7c..000000000 --- a/lib/routes/xaut/radar.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - 'xaut.edu.cn': { - _name: '西安理工大学', - index: [ - { - title: '学校官网', - docs: 'https://docs.rsshub.app/routes/university#xi-an-li-gong-da-xue', - }, - ], - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xi-an-li-gong-da-xue', - }, - ], - rsc: [ - { - title: '人事处', - docs: 'https://docs.rsshub.app/routes/university#xi-an-li-gong-da-xue', - }, - ], - }, -}; diff --git a/lib/routes/xaut/router.ts b/lib/routes/xaut/router.ts deleted file mode 100644 index 5fca51f4b..000000000 --- a/lib/routes/xaut/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/index/:category?', './index'); - router.get('/jwc/:category?', './jwc'); - router.get('/rsc/:category?', './rsc'); -}; diff --git a/lib/routes/xaut/rsc.ts b/lib/routes/xaut/rsc.ts index e08f37b42..11c6e579a 100644 --- a/lib/routes/xaut/rsc.ts +++ b/lib/routes/xaut/rsc.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/rsc/:category?', + categories: ['university'], + example: '/xaut/rsc/tzgg', + parameters: { category: '通知类别,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '人事处', + maintainers: ['mocusez', 'light0926'], + handler, + description: `:::warning + 有些内容指向外部链接,目前只提供这些链接,不提供具体内容,去除 jwc 和 index 的修改 + ::: + + | 通知公告 | 工作动态 | + | :------: | :------: | + | tzgg | gzdt |`, +}; + +async function handler(ctx) { let category = ctx.req.param('category'); // 这里的category是个形参 const dic_html = { tzgg: 'tzgg.htm', gzdt: 'gzdt.htm' }; @@ -36,7 +62,7 @@ export default async (ctx) => { }; }) .get(); - ctx.set('data', { + return { // 源标题 title: '西安理工大学人事处-' + dic_title[category], // 源链接 @@ -64,5 +90,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xboxfan/maintainer.ts b/lib/routes/xboxfan/maintainer.ts deleted file mode 100644 index b53847ba8..000000000 --- a/lib/routes/xboxfan/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['XXY233'], -}; diff --git a/lib/routes/xboxfan/namespace.ts b/lib/routes/xboxfan/namespace.ts new file mode 100644 index 000000000..d6a2831f8 --- /dev/null +++ b/lib/routes/xboxfan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '盒心光环', + url: 'xboxfan.com', +}; diff --git a/lib/routes/xboxfan/news.ts b/lib/routes/xboxfan/news.ts index 02fda23b0..2055a4e6a 100644 --- a/lib/routes/xboxfan/news.ts +++ b/lib/routes/xboxfan/news.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['game'], + example: '/xboxfan/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xboxfan.com/'], + }, + name: '资讯', + maintainers: ['XXY233'], + handler, + url: 'xboxfan.com/', +}; + +async function handler() { const baseUrl = 'https://xboxfan.com/'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -37,9 +60,9 @@ export default async (ctx) => { return data; }); - ctx.set('data', { + return { title: '盒心光环·资讯', link: 'https://xboxfan.com/', item: items, - }); -}; + }; +} diff --git a/lib/routes/xboxfan/radar.ts b/lib/routes/xboxfan/radar.ts deleted file mode 100644 index 68536487c..000000000 --- a/lib/routes/xboxfan/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xboxfan.com': { - _name: '盒心光环', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/game#he-xin-guang-huan', - source: '/', - target: '/xboxfan/news', - }, - ], - }, -}; diff --git a/lib/routes/xboxfan/router.ts b/lib/routes/xboxfan/router.ts deleted file mode 100644 index 3c9877e17..000000000 --- a/lib/routes/xboxfan/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './news'); -}; diff --git a/lib/routes/xiaohongshu/board.ts b/lib/routes/xiaohongshu/board.ts index ef4c85a18..2eb00a1ad 100644 --- a/lib/routes/xiaohongshu/board.ts +++ b/lib/routes/xiaohongshu/board.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { getBoard } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/board/:board_id', + categories: ['social-media'], + example: '/xiaohongshu/board/5db6f79200000000020032df', + parameters: { board_id: '专辑 ID' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaohongshu.com/board/:board_id'], + }, + name: '专辑', + maintainers: ['lotosbin'], + handler, +}; + +async function handler(ctx) { const url = `https://www.xiaohongshu.com/board/${ctx.req.param('board_id')}`; const main = await getBoard(url, cache); @@ -21,11 +43,11 @@ export default async (ctx) => { pubDate: timezone(parseDate(item.time), 8), })); - ctx.set('data', { + return { title, link: url, image, item: resultItem, description, - }); -}; + }; +} diff --git a/lib/routes/xiaohongshu/maintainer.ts b/lib/routes/xiaohongshu/maintainer.ts deleted file mode 100644 index d8b18f104..000000000 --- a/lib/routes/xiaohongshu/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/board/:board_id': ['lotosbin'], - '/user/:user_id/collect': ['lotosbin'], - '/user/:user_id/notes/:fulltext?': ['lotosbin', 'howerhe'], -}; diff --git a/lib/routes/xiaohongshu/namespace.ts b/lib/routes/xiaohongshu/namespace.ts new file mode 100644 index 000000000..6dc6c7cc7 --- /dev/null +++ b/lib/routes/xiaohongshu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小红书', + url: 'xiaohongshu.com', +}; diff --git a/lib/routes/xiaohongshu/notes.ts b/lib/routes/xiaohongshu/notes.ts index 1d9e2093e..03cfc5fdc 100644 --- a/lib/routes/xiaohongshu/notes.ts +++ b/lib/routes/xiaohongshu/notes.ts @@ -1,17 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getNotes, formatText, formatNote } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user_id/notes/fulltext', + radar: { + source: ['xiaohongshu.com/user/profile/:user_id'], + target: '/user/:user_id/notes', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const userId = ctx.req.param('user_id'); const url = `https://www.xiaohongshu.com/user/profile/${userId}`; const { user, notes } = await getNotes(url, cache); - ctx.set('data', { + return { title: `${user.nickname} - 笔记 • 小红书 / RED`, description: formatText(user.desc), image: user.imageb || user.images, link: url, item: notes.map((item) => formatNote(url, item)), - }); -}; + }; +} diff --git a/lib/routes/xiaohongshu/radar.ts b/lib/routes/xiaohongshu/radar.ts deleted file mode 100644 index 765a7e508..000000000 --- a/lib/routes/xiaohongshu/radar.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - 'xiaohongshu.com': { - _name: '小红书', - '.': [ - { - title: '用户笔记', - docs: 'https://docs.rsshub.app/routes/social-media#xiao-hong-shu', - source: '/user/profile/:user_id', - target: '/xiaohongshu/user/:user_id/notes', - }, - { - title: '用户收藏', - docs: 'https://docs.rsshub.app/routes/social-media#xiao-hong-shu', - source: '/user/profile/:user_id', - target: '/xiaohongshu/user/:user_id/collect', - }, - { - title: '专辑', - docs: 'https://docs.rsshub.app/routes/social-media#xiao-hong-shu', - source: '/board/:board_id', - target: '/xiaohongshu/board/:board_id', - }, - ], - }, -}; diff --git a/lib/routes/xiaohongshu/router.ts b/lib/routes/xiaohongshu/router.ts deleted file mode 100644 index fa25c1669..000000000 --- a/lib/routes/xiaohongshu/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/board/:board_id', './board'); - router.get('/user/:user_id/notes/fulltext', './notes'); - router.get('/user/:user_id/:category', './user'); -}; diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index e67ea2dda..dc60ae916 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getUser } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:user_id/:category', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const userId = ctx.req.param('user_id'); const category = ctx.req.param('category'); const url = `https://www.xiaohongshu.com/user/profile/${userId}`; @@ -45,11 +53,11 @@ export default async (ctx) => { })); }; - ctx.set('data', { + return { title, description, image, link: url, item: category === 'notes' ? renderNote(notes) : renderCollect(collect), - }); -}; + }; +} diff --git a/lib/routes/xiaomiyoupin/crowdfunding.ts b/lib/routes/xiaomiyoupin/crowdfunding.ts index 7a01dc9d5..9f23e18f2 100644 --- a/lib/routes/xiaomiyoupin/crowdfunding.ts +++ b/lib/routes/xiaomiyoupin/crowdfunding.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; const base_url = 'https://m.xiaomiyoupin.com'; -export default async (ctx) => { +export const route: Route = { + path: '/crowdfunding', + categories: ['shopping'], + example: '/xiaomiyoupin/crowdfunding', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaomiyoupin.com/'], + }, + name: '小米有品众筹', + maintainers: ['bigfei'], + handler, + url: 'xiaomiyoupin.com/', +}; + +async function handler() { const resp = await got('https://home.mi.com/lasagne/page/5'); const site_url = resp.data.redirect.location; @@ -37,10 +60,10 @@ export default async (ctx) => { pubDate: new Date(goods.fist_release_time * 1000).toUTCString(), }; }); - ctx.set('data', { + return { title: '小米有品众筹', link: site_url, description: '小米有品众筹', item: items, - }); -}; + }; +} diff --git a/lib/routes/xiaomiyoupin/latest.ts b/lib/routes/xiaomiyoupin/latest.ts index 6e63e1025..2de6af4c6 100644 --- a/lib/routes/xiaomiyoupin/latest.ts +++ b/lib/routes/xiaomiyoupin/latest.ts @@ -1,15 +1,38 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseModule, parseFloorItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['shopping'], + example: '/xiaomiyoupin/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaomiyoupin.com/'], + }, + name: '小米有品每日上新', + maintainers: ['xyqfer', 'DIYgod', 'bigfei'], + handler, + url: 'xiaomiyoupin.com/', +}; + +async function handler() { const response = await got('https://m.xiaomiyoupin.com/homepage/main/v1005'); const floors = parseModule(response.data.data.homepage.floors, 'product_hot'); const items = parseFloorItem(floors); - ctx.set('data', { + return { title: '小米有品每日上新', link: 'https://m.xiaomiyoupin.com/w/newproduct?pageid=1605', description: '小米有品每日上新', item: items, - }); -}; + }; +} diff --git a/lib/routes/xiaomiyoupin/maintainer.ts b/lib/routes/xiaomiyoupin/maintainer.ts deleted file mode 100644 index 0c6e3b007..000000000 --- a/lib/routes/xiaomiyoupin/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/crowdfunding': ['bigfei'], - '/latest': ['xyqfer', 'DIYgod', 'bigfei'], -}; diff --git a/lib/routes/xiaomiyoupin/namespace.ts b/lib/routes/xiaomiyoupin/namespace.ts new file mode 100644 index 000000000..affd53406 --- /dev/null +++ b/lib/routes/xiaomiyoupin/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小米有品', + url: 'xiaomiyoupin.com', +}; diff --git a/lib/routes/xiaomiyoupin/radar.ts b/lib/routes/xiaomiyoupin/radar.ts deleted file mode 100644 index 3fe9486e7..000000000 --- a/lib/routes/xiaomiyoupin/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'xiaomiyoupin.com': { - _name: '小米有品', - '.': [ - { - title: '小米有品众筹', - docs: 'https://docs.rsshub.app/routes/shopping#xiao-mi-you-pin-xiao-mi-you-pin-zhong-chou', - source: ['/'], - target: '/xiaomiyoupin/crowdfunding', - }, - { - title: '小米有品每日上新', - docs: 'https://docs.rsshub.app/routes/shopping#xiao-mi-you-pin-xiao-mi-you-pin-mei-ri-shang-xin', - source: ['/'], - target: '/xiaomiyoupin/latest', - }, - ], - }, -}; diff --git a/lib/routes/xiaomiyoupin/router.ts b/lib/routes/xiaomiyoupin/router.ts deleted file mode 100644 index c28e3ad2d..000000000 --- a/lib/routes/xiaomiyoupin/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/crowdfunding', './crowdfunding'); - router.get('/latest', './latest'); -}; diff --git a/lib/routes/xiaote/index.ts b/lib/routes/xiaote/index.ts index 5832bf322..c2b3463a6 100644 --- a/lib/routes/xiaote/index.ts +++ b/lib/routes/xiaote/index.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; // 自订的 got import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news', + categories: ['bbs'], + example: '/xiaote/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaote.com/'], + }, + name: '首页帖子', + maintainers: ['wxsimon'], + handler, + url: 'xiaote.com/', +}; + +async function handler() { const { data } = await got.post('https://lcen.xiaote.net//api/graphql/', { json: { query: `query($startCursor: Int) { @@ -22,7 +45,7 @@ export default async (ctx) => { }, }); - ctx.set('data', { + return { title: '小特社区', // 源链接 link: 'https://xiaote.com/', @@ -44,5 +67,5 @@ export default async (ctx) => { author: item.user.nickname, }; }), - }); -}; + }; +} diff --git a/lib/routes/xiaote/maintainer.ts b/lib/routes/xiaote/maintainer.ts deleted file mode 100644 index 1b2a3554d..000000000 --- a/lib/routes/xiaote/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/news': ['wxsimon'], -}; diff --git a/lib/routes/xiaote/namespace.ts b/lib/routes/xiaote/namespace.ts new file mode 100644 index 000000000..014ac0445 --- /dev/null +++ b/lib/routes/xiaote/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小特社区', + url: 'xiaote.com', +}; diff --git a/lib/routes/xiaote/radar.ts b/lib/routes/xiaote/radar.ts deleted file mode 100644 index 269bcc269..000000000 --- a/lib/routes/xiaote/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xiaote.com': { - _name: '小特社区', - '.': [ - { - title: '首页帖子', - docs: 'https://docs.rsshub.app/routes/bbs#xiao-te-she-qu', - source: ['/'], - target: '/xiaote/news', - }, - ], - }, -}; diff --git a/lib/routes/xiaote/router.ts b/lib/routes/xiaote/router.ts deleted file mode 100644 index c037330e2..000000000 --- a/lib/routes/xiaote/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/news', './index'); -}; diff --git a/lib/routes/xiaoyuzhou/maintainer.ts b/lib/routes/xiaoyuzhou/maintainer.ts deleted file mode 100644 index f3e1df49a..000000000 --- a/lib/routes/xiaoyuzhou/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/': ['prnake', 'Maecenas'], - '/podcast/:id': ['hondajojo', 'jtsang4'], -}; diff --git a/lib/routes/xiaoyuzhou/namespace.ts b/lib/routes/xiaoyuzhou/namespace.ts new file mode 100644 index 000000000..9e852ff18 --- /dev/null +++ b/lib/routes/xiaoyuzhou/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小宇宙', + url: 'xiaoyuzhoufm.com', +}; diff --git a/lib/routes/xiaoyuzhou/pickup.ts b/lib/routes/xiaoyuzhou/pickup.ts index 8b2b98df5..59de9b660 100644 --- a/lib/routes/xiaoyuzhou/pickup.ts +++ b/lib/routes/xiaoyuzhou/pickup.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; @@ -78,14 +79,26 @@ const ProcessFeed = async () => { }); }; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['xiaoyuzhoufm.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['prnake', 'Maecenas'], + handler, + url: 'xiaoyuzhoufm.com/', +}; + +async function handler() { let resultItems = await cache.tryGet(XIAOYUZHOU_ITEMS, () => ProcessFeed()); if (!isToday(resultItems[0].pubDate)) { // force refresh cache resultItems = await ProcessFeed(); cache.set(XIAOYUZHOU_ITEMS, resultItems); } - ctx.set('data', { + return { title: '小宇宙 - 发现', link: 'https://www.xiaoyuzhoufm.com/', description: '小宇宙的编辑精选', @@ -93,5 +106,5 @@ export default async (ctx) => { itunes_author: '小宇宙', itunes_category: 'Society & Culture', item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/xiaoyuzhou/podcast.ts b/lib/routes/xiaoyuzhou/podcast.ts index 63e027c8d..21e8f7937 100644 --- a/lib/routes/xiaoyuzhou/podcast.ts +++ b/lib/routes/xiaoyuzhou/podcast.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/podcast/:id', + categories: ['multimedia'], + example: '/xiaoyuzhou/podcast/6021f949a789fca4eff4492c', + parameters: { id: '播客id,可以在小宇宙播客的 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaoyuzhoufm.com/podcast/:id'], + }, + name: '播客', + maintainers: ['hondajojo', 'jtsang4'], + handler, + url: 'xiaoyuzhoufm.com/', +}; + +async function handler(ctx) { const link = `https://www.xiaoyuzhoufm.com/podcast/${ctx.req.param('id')}`; const response = await got({ method: 'get', @@ -24,7 +47,7 @@ export default async (ctx) => { itunes_item_image: (item.image || item.podcast?.image)?.smallPicUrl, })); - ctx.set('data', { + return { title: page_data.props.pageProps.podcast.title, link: `https://www.xiaoyuzhoufm.com/podcast/${page_data.props.pageProps.podcast.pid}`, itunes_author: page_data.props.pageProps.podcast.author, @@ -32,5 +55,5 @@ export default async (ctx) => { image: page_data.props.pageProps.podcast.image.smallPicUrl, item: episodes, description: page_data.props.pageProps.podcast.description, - }); -}; + }; +} diff --git a/lib/routes/xiaoyuzhou/radar.ts b/lib/routes/xiaoyuzhou/radar.ts deleted file mode 100644 index 2f2d79077..000000000 --- a/lib/routes/xiaoyuzhou/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'xiaoyuzhoufm.com': { - _name: '小宇宙', - '.': [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/multimedia#xiao-yu-zhou', - source: ['/'], - target: '/xiaoyuzhou', - }, - { - title: '播客', - docs: 'https://docs.rsshub.app/routes/multimedia#xiao-yu-zhou', - source: ['/podcast/:id'], - target: '/xiaoyuzhou/podcast/:id', - }, - ], - }, -}; diff --git a/lib/routes/xiaoyuzhou/router.ts b/lib/routes/xiaoyuzhou/router.ts deleted file mode 100644 index d7037812a..000000000 --- a/lib/routes/xiaoyuzhou/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/podcast/:id', './podcast'); - router.get('/', './pickup'); -}; diff --git a/lib/routes/xiaozhuanlan/column.ts b/lib/routes/xiaozhuanlan/column.ts index b2563a7ca..0fce850eb 100644 --- a/lib/routes/xiaozhuanlan/column.ts +++ b/lib/routes/xiaozhuanlan/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,28 @@ const md = MarkdownIt({ }); const baseUrl = 'https://xiaozhuanlan.com'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['new-media'], + example: '/xiaozhuanlan/column/olddriver-selection', + parameters: { id: '专栏 ID,可在专栏页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xiaozhuanlan.com/:id'], + }, + name: '专栏', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const response = await got(`${baseUrl}/${id}`); @@ -45,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text().trim(), link: `${baseUrl}/${id}`, description: $('meta[name=description]').attr('content'), item: items, - }); -}; + }; +} diff --git a/lib/routes/xiaozhuanlan/maintainer.ts b/lib/routes/xiaozhuanlan/maintainer.ts deleted file mode 100644 index 750c6105b..000000000 --- a/lib/routes/xiaozhuanlan/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/column/:id': ['TonyRL'], -}; diff --git a/lib/routes/xiaozhuanlan/namespace.ts b/lib/routes/xiaozhuanlan/namespace.ts new file mode 100644 index 000000000..e493b1c85 --- /dev/null +++ b/lib/routes/xiaozhuanlan/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '小专栏', + url: 'xiaozhuanlan.com', +}; diff --git a/lib/routes/xiaozhuanlan/radar.ts b/lib/routes/xiaozhuanlan/radar.ts deleted file mode 100644 index f344f75c7..000000000 --- a/lib/routes/xiaozhuanlan/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xiaozhuanlan.com': { - _name: '小专栏', - '.': [ - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/new-media#xiao-zhuan-lan', - source: '/:id', - target: '/xiaozhuanlan/column/:id', - }, - ], - }, -}; diff --git a/lib/routes/xiaozhuanlan/router.ts b/lib/routes/xiaozhuanlan/router.ts deleted file mode 100644 index ff71ac677..000000000 --- a/lib/routes/xiaozhuanlan/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/column/:id', './column'); -}; diff --git a/lib/routes/xidian/jwc.ts b/lib/routes/xidian/jwc.ts index 6665a8137..f985d9e5a 100644 --- a/lib/routes/xidian/jwc.ts +++ b/lib/routes/xidian/jwc.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://jwc.xidian.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:category?', + categories: ['university'], + example: '/xidian/jwc/tzgg', + parameters: { category: '通知类别,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['ShadowySpirits'], + handler, + description: `| 教学信息 | 教学研究 | 实践教学 | 质量监控 | 通知公告 | + | :------: | :------: | :------: | :------: | :------: | + | jxxx | jxyj | sjjx | zljk | tzgg |`, +}; + +async function handler(ctx) { const { category = 'tzgg' } = ctx.req.param(); const url = `${baseUrl}/${category}.htm`; const response = await got(url, { @@ -47,9 +69,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/xidian/maintainer.ts b/lib/routes/xidian/maintainer.ts deleted file mode 100644 index e16ae0350..000000000 --- a/lib/routes/xidian/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jwc/:category?': ['ShadowySpirits'], -}; diff --git a/lib/routes/xidian/namespace.ts b/lib/routes/xidian/namespace.ts new file mode 100644 index 000000000..159fe8bce --- /dev/null +++ b/lib/routes/xidian/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西安电子科技大学', + url: 'jwc.xidian.edu.cn', +}; diff --git a/lib/routes/xidian/radar.ts b/lib/routes/xidian/radar.ts deleted file mode 100644 index 737dc630e..000000000 --- a/lib/routes/xidian/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xidian.edu.cn': { - _name: '西安电子科技大学', - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xi-an-dian-zi-ke-ji-da-xue', - source: ['/:category'], - target: (params) => `/xidian/jwc${params.category ? `/${params.category}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/xidian/router.ts b/lib/routes/xidian/router.ts deleted file mode 100644 index 5db53bf7a..000000000 --- a/lib/routes/xidian/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/jwc/:category?', './jwc'); -}; diff --git a/lib/routes/ximalaya/album.ts b/lib/routes/ximalaya/album.ts index 23106e055..4c95a38d6 100644 --- a/lib/routes/ximalaya/album.ts +++ b/lib/routes/ximalaya/album.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -80,7 +81,32 @@ function judgeTrue(str, ...validStrings) { return false; } -export default async (ctx) => { +export const route: Route = { + path: ['/:type/:id/:all?', '/:type/:id/:all/:shownote?'], + categories: ['multimedia'], + example: '/ximalaya/album/299146', + parameters: { type: '专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到', id: '专辑 id, 可在对应专辑页面的 URL 中找到', all: '是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + name: '专辑(不输出 ShowNote)', + maintainers: ['lengthmin', 'jjeejj', 'prnake'], + handler, + description: `目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。 + + :::warning + 专辑类型即 url 中的分类拼音,使用通用分类 \`album\` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了 + + **付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块** + :::`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); // 专辑分类 const id = ctx.req.param('id'); // 专辑id const shouldAll = judgeTrue(ctx.req.param('all'), 'all'); @@ -209,7 +235,7 @@ export default async (ctx) => { return resultItem; }); - ctx.set('data', { + return { title: albumTitle, link: baseUrl + albumUrl, description: albumIntro, @@ -217,5 +243,5 @@ export default async (ctx) => { itunes_author: author, itunes_category: categoryDict[albumCategory] || albumCategory, item: resultItems, - }); -}; + }; +} diff --git a/lib/routes/ximalaya/maintainer.ts b/lib/routes/ximalaya/maintainer.ts deleted file mode 100644 index f002928ac..000000000 --- a/lib/routes/ximalaya/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/:type/:id/:all?': ['lengthmin', 'jjeejj', 'prnake'], - '/:type/:id/:all/:shownote?': ['lengthmin', 'jjeejj', 'prnake'], -}; diff --git a/lib/routes/ximalaya/namespace.ts b/lib/routes/ximalaya/namespace.ts new file mode 100644 index 000000000..46367a459 --- /dev/null +++ b/lib/routes/ximalaya/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '喜马拉雅', + url: 'ximalaya.com', +}; diff --git a/lib/routes/ximalaya/radar.ts b/lib/routes/ximalaya/radar.ts deleted file mode 100644 index 28d41dba4..000000000 --- a/lib/routes/ximalaya/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'ximalaya.com': { - _name: '喜马拉雅', - '.': [ - { - title: '专辑', - docs: 'https://docs.rsshub.app/routes/multimedia#xi-ma-la-ya', - source: '/:type/:id', - target: (params) => { - if (Number.parseInt(params.id) + '' === params.id) { - return '/ximalaya/:type/:id'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/ximalaya/router.ts b/lib/routes/ximalaya/router.ts deleted file mode 100644 index 8fc1a95fe..000000000 --- a/lib/routes/ximalaya/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/:type/:id/:all?', './album'); - router.get('/:type/:id/:all/:shownote?', './album'); -}; diff --git a/lib/routes/xinpianchang/index.ts b/lib/routes/xinpianchang/index.ts index b6e73fd44..1a5568dcb 100644 --- a/lib/routes/xinpianchang/index.ts +++ b/lib/routes/xinpianchang/index.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, getData, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: ['/discover/:params?', '/:params?'], + categories: ['new-media'], + example: '/xinpianchang/discover', + parameters: { params: '参数,可在对应分类页 URL 中找到,默认为 `article-0-0-all-all-0-0-score` ,即全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '发现', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 跳转到欲订阅的分类页,将 URL 的 \`/discover\` 到末尾的部分填入 \`params\` 参数。 + + 如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 \`https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score\`,其 \`/discover\` 到末尾的部分为 \`article-0-0-all-all-0-0-score\`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。 + :::`, +}; + +async function handler(ctx) { const { params = 'article-0-0-all-all-0-0-score' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 60; @@ -13,8 +37,8 @@ export default async (ctx) => { items = await processItems(items.slice(0, limit), cache.tryGet); - ctx.set('data', { + return { ...data, item: items, - }); -}; + }; +} diff --git a/lib/routes/xinpianchang/maintainer.ts b/lib/routes/xinpianchang/maintainer.ts deleted file mode 100644 index 9d4d294a5..000000000 --- a/lib/routes/xinpianchang/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/discover/:params?': ['nczitzk'], - '/rank/:category?': ['nczitzk'], -}; diff --git a/lib/routes/xinpianchang/namespace.ts b/lib/routes/xinpianchang/namespace.ts new file mode 100644 index 000000000..d88eb9225 --- /dev/null +++ b/lib/routes/xinpianchang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新片场', + url: 'xinpianchang.com', +}; diff --git a/lib/routes/xinpianchang/radar.ts b/lib/routes/xinpianchang/radar.ts deleted file mode 100644 index f541e14e4..000000000 --- a/lib/routes/xinpianchang/radar.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - 'xinpianchang.com': { - _name: '新片场', - '.': [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/new-media#xin-pian-chang-fa-xian', - source: ['/discover/:params'], - target: (params, url) => { - url = new URL(url); - const path = params.params ?? url.href.match(/discover\/(article.*?)/)[1]; - - return `/xinpianchang/discover${path ? `/${path}` : ''}`; - }, - }, - { - title: '排行榜', - docs: 'https://docs.rsshub.app/routes/new-media#xin-pian-chang-pai-hang-bang', - source: ['/rank/:params'], - target: (params, url) => { - const path = params.params.match(/article-(\w+)-\d+-\d+/)[1] ?? url.href.match(/rank\/article-(\w+)-\d+-\d+/)[1]; - - return `/xinpianchang/rank${path ? `/${path}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/xinpianchang/rank.ts b/lib/routes/xinpianchang/rank.ts index ba4575c6e..4025e06b9 100644 --- a/lib/routes/xinpianchang/rank.ts +++ b/lib/routes/xinpianchang/rank.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, getData, processItems } from './util'; -export default async (ctx) => { +export const route: Route = { + path: '/rank/:category?', + categories: ['new-media'], + example: '/xinpianchang/rank', + parameters: { category: '分类 id,可在对应排行榜页 URL 中找到,见下表,默认为 `all` ,即总榜' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '排行榜', + maintainers: ['nczitzk'], + handler, + description: `| 分类 | id | + | -------- | ---------- | + | 总榜 | all | + | 精选榜 | staffPicks | + | 广告 | ad | + | 宣传片 | publicity | + | 创意 | creative | + | 干货教程 | backstage |`, +}; + +async function handler(ctx) { const { category = 'all' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 60; @@ -27,8 +54,8 @@ export default async (ctx) => { items = await processItems(items.slice(0, limit), cache.tryGet); - ctx.set('data', { + return { ...data, item: items, - }); -}; + }; +} diff --git a/lib/routes/xinpianchang/router.ts b/lib/routes/xinpianchang/router.ts deleted file mode 100644 index b9aa89d21..000000000 --- a/lib/routes/xinpianchang/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/discover/:params?', './'); - router.get('/rank/:category?', './rank'); - router.get('/:params?', './'); -}; diff --git a/lib/routes/xjtu/2yuan/news.ts b/lib/routes/xjtu/2yuan/news.ts index 3608e6fe6..830559404 100644 --- a/lib/routes/xjtu/2yuan/news.ts +++ b/lib/routes/xjtu/2yuan/news.ts @@ -1,10 +1,41 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/2yuan/news/:id?', + categories: ['university'], + example: '/xjtu/2yuan/news', + parameters: { id: '编号,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '第二附属医院新闻', + maintainers: ['nczitzk'], + handler, + description: `| 分类 | 编号 | + | -------- | ---- | + | 通知公告 | 110 | + | 综合新闻 | 6 | + | 科室动态 | 8 | + | 教学动态 | 45 | + | 科研动态 | 51 | + | 护理动态 | 57 | + | 党群活动 | 63 | + | 外事活动 | 13 | + | 媒体二院 | 14 | + | 理论政策 | 16 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '110'; const rootUrl = 'http://2yuan.xjtu.edu.cn'; @@ -54,9 +85,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xjtu/dean.ts b/lib/routes/xjtu/dean.ts index 68a160465..f1bb553b2 100644 --- a/lib/routes/xjtu/dean.ts +++ b/lib/routes/xjtu/dean.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -29,7 +30,14 @@ const parseContent = (htmlString) => { }; }; -export default async (ctx) => { +export const route: Route = { + path: '/dean/:subpath{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const subpath = ctx.req.param('subpath'); const url = `http://dean.xjtu.edu.cn/${subpath.replaceAll('.htm', '')}.htm`; @@ -76,9 +84,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `西安交大教务处 - ${subname}`, link: url, item: out.filter((item) => item !== ''), - }); -}; + }; +} diff --git a/lib/routes/xjtu/dyyy/index.ts b/lib/routes/xjtu/dyyy/index.ts index 8855117d7..ea21e6215 100644 --- a/lib/routes/xjtu/dyyy/index.ts +++ b/lib/routes/xjtu/dyyy/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,14 @@ import { parseDate } from '@/utils/parse-date'; const baseUrl = 'http://www.dyyy.xjtu.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/dyyy/:path{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const path = ctx.req.param('path'); const response = await got(`${baseUrl}/${path}.htm`); @@ -37,9 +45,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: `${baseUrl}/${path}.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/xjtu/ee.ts b/lib/routes/xjtu/ee.ts index c20c4068a..eb90f8078 100644 --- a/lib/routes/xjtu/ee.ts +++ b/lib/routes/xjtu/ee.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/ee/:id?', + categories: ['university'], + example: '/xjtu/ee/1114', + parameters: { id: '栏目id,默认请求`1124`,可在 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ee.xjtu.edu.cn/'], + }, + name: '电气学院', + maintainers: ['DylanXie123'], + handler, + url: 'ee.xjtu.edu.cn/', +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '1124'; const rootUrl = `http://ee.xjtu.edu.cn/list.jsp?urltype=tree.TreeTempUrl&wbtreeid=${id}`; const baseUrl = 'http://ee.xjtu.edu.cn'; @@ -27,7 +50,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `西安交通大学电气学院 - ${feed_title}`, link: baseUrl, item: await Promise.all( @@ -41,5 +64,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xjtu/gs/tzgg.ts b/lib/routes/xjtu/gs/tzgg.ts index a7708c010..f3e5e10e7 100644 --- a/lib/routes/xjtu/gs/tzgg.ts +++ b/lib/routes/xjtu/gs/tzgg.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/gs/tzgg', + categories: ['university'], + example: '/xjtu/gs/tzgg', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['gs.xjtu.edu.cn/'], + }, + name: '研究生院通知公告', + maintainers: ['nczitzk'], + handler, + url: 'gs.xjtu.edu.cn/', +}; + +async function handler() { const rootUrl = 'http://gs.xjtu.edu.cn/tzgg.htm'; const response = await got({ method: 'get', @@ -23,7 +46,7 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '西安交通大学研究生院 - 通知公告', link: rootUrl, item: await Promise.all( @@ -36,5 +59,5 @@ export default async (ctx) => { }) ) ), - }); -}; + }; +} diff --git a/lib/routes/xjtu/international.ts b/lib/routes/xjtu/international.ts index d248c874a..449cc4b98 100644 --- a/lib/routes/xjtu/international.ts +++ b/lib/routes/xjtu/international.ts @@ -1,9 +1,17 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/international/:subpath{.+}', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const subpath = ctx.req.param('subpath'); const base = 'http://international.xjtu.edu.cn'; @@ -43,10 +51,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `西安交通大学国际处 - ${name}`, link: url, description: `西安交通大学国际处 - ${name}`, item, - }); -}; + }; +} diff --git a/lib/routes/xjtu/job.ts b/lib/routes/xjtu/job.ts index 9b66b0f2a..336d69939 100644 --- a/lib/routes/xjtu/job.ts +++ b/lib/routes/xjtu/job.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -18,7 +19,30 @@ const arr = { jysx: '就业实习', }; -export default async (ctx) => { +export const route: Route = { + path: '/job/:subpath?', + categories: ['university'], + example: '/xjtu/job/zxgg', + parameters: { subpath: '栏目类型,默认请求`zxgg`,详见下方表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '就业创业中心', + maintainers: ['DylanXie123'], + handler, + description: `栏目类型 + + | 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 | + | -------- | ------ | -------- | -------- | -------- | -------- | + | zxgg | xds | zddw | gjzz | cxcy | jysx |`, +}; + +async function handler(ctx) { const subpath = ctx.req.param('subpath') ?? 'zxgg'; const getTzgg = await got.post(`${baseUrl}/xsfw/sys/jyxtgktapp/modules/jywzManage/getTzgg.do`, { form: { @@ -77,9 +101,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `西安交通大学学生就业创业信息网 - ${arr[subpath]}`, link: baseUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xjtu/maintainer.ts b/lib/routes/xjtu/maintainer.ts deleted file mode 100644 index 5b5f862e8..000000000 --- a/lib/routes/xjtu/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/2yuan/news/:id?': ['nczitzk'], - '/dean/:subpath+': ['hoilc'], - '/dyyy/:path+': ['TonyRL'], - '/ee/:id?': ['DylanXie123'], - '/gs/tzgg': ['nczitzk'], - '/international/:subpath+': ['guitaoliu'], - '/job/:subpath?': ['DylanXie123'], - '/std/:category?': ['nczitzk'], -}; diff --git a/lib/routes/xjtu/namespace.ts b/lib/routes/xjtu/namespace.ts new file mode 100644 index 000000000..680fda43b --- /dev/null +++ b/lib/routes/xjtu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西安交通大学', + url: '2yuan.xjtu.edu.cn', +}; diff --git a/lib/routes/xjtu/radar.ts b/lib/routes/xjtu/radar.ts deleted file mode 100644 index fe14aa827..000000000 --- a/lib/routes/xjtu/radar.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default { - 'xjtu.edu.cn': { - _name: '西安交通大学', - '2yuan': [ - { - title: '第二附属医院新闻', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-di-er-fu-shu-yi-yuan-xin-wen', - source: ['/'], - target: (params, url) => `/xjtu/2yuan/news/${new URL(url).toString().match(/\/Columns\/(\d+)\//)[1]}`, - }, - ], - dean: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-jiao-wu-chu', - source: ['/'], - target: '/xjtu/dean/:subpath+', - }, - ], - ee: [ - { - title: '电气学院', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-dian-qi-xue-yuan', - source: ['/'], - target: '/xjtu/ee/:id?', - }, - ], - gs: [ - { - title: '研究生院通知公告', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-yan-jiu-sheng-xue-yuan-tong-zhi-gong-gao', - source: ['/'], - target: '/xjtu/gs/tzgg', - }, - ], - international: [ - { - title: '国际处通知', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-guo-ji-chu-tong-zhi', - source: ['/'], - target: '/xjtu/international/:subpath+', - }, - ], - std: [ - { - title: '科技在线', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue-ke-ji-zai-xian', - source: ['/tzgg/:category', '/'], - target: (params, url) => `/xjtu/std/${new URL(url).toString().match(/\/(\w+)\.htm/)[1]}`, - }, - ], - 'www.dyyy': [ - { - title: '第一附属医院新闻', - docs: 'https://docs.rsshub.app/routes/university#xi-an-jiao-tong-da-xue', - source: ['/*'], - target: (_, url) => `/xjtu/dyyy${new URL(url).pathname.replace('.htm', '')}`, - }, - ], - }, -}; diff --git a/lib/routes/xjtu/router.ts b/lib/routes/xjtu/router.ts deleted file mode 100644 index ed0048038..000000000 --- a/lib/routes/xjtu/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/2yuan/news/:id?', './2yuan/news'); - router.get('/dean/:subpath{.+}', './dean'); - router.get('/dyyy/:path{.+}', './dyyy/index'); - router.get('/ee/:id?', './ee'); - router.get('/gs/tzgg', './gs/tzgg'); - router.get('/international/:subpath{.+}', './international'); - router.get('/job/:subpath?', './job'); - router.get('/std/:category?', './std'); -}; diff --git a/lib/routes/xjtu/std.ts b/lib/routes/xjtu/std.ts index a9303bd97..8689acbd5 100644 --- a/lib/routes/xjtu/std.ts +++ b/lib/routes/xjtu/std.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/std/:category?', + categories: ['university'], + example: '/xjtu/std/zytz', + parameters: { category: '分类,见下表,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '科技在线', + maintainers: ['nczitzk'], + handler, + description: `| 通知公告 | 重要通知 | 项目申报 | 成果申报 | 信息快讯 | + | -------- | -------- | -------- | -------- | -------- | + | | zytz | xmsb | cgsb | xxkx |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'http://std.xjtu.edu.cn'; @@ -54,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xkb/index.ts b/lib/routes/xkb/index.ts index f5a86fa83..30d8135cb 100644 --- a/lib/routes/xkb/index.ts +++ b/lib/routes/xkb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,34 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:channel', + categories: ['traditional-media'], + example: '/xkb/350', + parameters: { channel: '栏目 ID,点击对应栏目后在地址栏找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['TimWu007'], + handler, + description: `常用栏目 ID: + + | 栏目名 | ID | + | ------ | --- | + | 首页 | 350 | + | 重点 | 359 | + | 广州 | 353 | + | 湾区 | 360 | + | 天下 | 355 |`, +}; + +async function handler(ctx) { const channel = ctx.req.param('channel') ?? 350; const currentUrl = `https://www.xkb.com.cn/xkbapp/fundapi/article/api/articles?chnlId=${channel}&visibility=1&page=0&size=20&keyword=`; @@ -50,9 +78,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `新快报新快网 - ${chnlName}`, link: `https://www.xkb.com.cn/home?id=${channel}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/xkb/maintainer.ts b/lib/routes/xkb/maintainer.ts deleted file mode 100644 index f777ff68e..000000000 --- a/lib/routes/xkb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:channel': ['TimWu007'], -}; diff --git a/lib/routes/xkb/namespace.ts b/lib/routes/xkb/namespace.ts new file mode 100644 index 000000000..185044dfc --- /dev/null +++ b/lib/routes/xkb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新快报', + url: 'xkb.com.cn', +}; diff --git a/lib/routes/xkb/radar.ts b/lib/routes/xkb/radar.ts deleted file mode 100644 index bae150489..000000000 --- a/lib/routes/xkb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xkb.com.cn': { - _name: '新快报', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xin-kuai-bao', - source: ['/'], - target: (_, url) => `/xkb/${new URL(url).hash.match(/\?id=(\d+)/)[1]}`, - }, - ], - }, -}; diff --git a/lib/routes/xkb/router.ts b/lib/routes/xkb/router.ts deleted file mode 100644 index 2a73869aa..000000000 --- a/lib/routes/xkb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:channel', './index'); -}; diff --git a/lib/routes/xmanhua/index.ts b/lib/routes/xmanhua/index.ts index e02f4d65a..a7fdd6d0a 100644 --- a/lib/routes/xmanhua/index.ts +++ b/lib/routes/xmanhua/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:uid', + categories: ['anime'], + example: '/xmanhua/73xm', + parameters: { uid: '漫画 id,在浏览器中可见,例如鬼灭之刃对应的 id 为 `73xm`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xmanhua.com/:uid'], + }, + name: '最新动态', + maintainers: ['Ye11'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); const host = 'https://xmanhua.com'; const url = `https://xmanhua.com/${uid}/`; @@ -54,11 +76,11 @@ export default async (ctx) => { .get(); const name = $('body > div.detail-info-1 > div > div > p.detail-info-title').text(); const description_ = finished ? '已完结' : '连载中'; - ctx.set('data', { + return { title: `x漫画 ${name}`, link: `https://xmanhua.com/${uid}`, description: description_, allowEmpty: true, item: items, - }); -}; + }; +} diff --git a/lib/routes/xmanhua/maintainer.ts b/lib/routes/xmanhua/maintainer.ts deleted file mode 100644 index 9a139ec89..000000000 --- a/lib/routes/xmanhua/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:uid': ['Ye11'], -}; diff --git a/lib/routes/xmanhua/namespace.ts b/lib/routes/xmanhua/namespace.ts new file mode 100644 index 000000000..476dfd893 --- /dev/null +++ b/lib/routes/xmanhua/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'X 漫画', + url: 'xmanhua.com', +}; diff --git a/lib/routes/xmanhua/radar.ts b/lib/routes/xmanhua/radar.ts deleted file mode 100644 index cfc955b24..000000000 --- a/lib/routes/xmanhua/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xmanhua.com': { - _name: 'X 漫画', - '.': [ - { - title: '最新动态', - docs: 'https://docs.rsshub.app/routes/anime#x-man-hua', - source: ['/:uid'], - target: '/xmanhua/:uid', - }, - ], - }, -}; diff --git a/lib/routes/xmanhua/router.ts b/lib/routes/xmanhua/router.ts deleted file mode 100644 index 0476ba3dc..000000000 --- a/lib/routes/xmanhua/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:uid', './index'); -}; diff --git a/lib/routes/xmnn/epaper.ts b/lib/routes/xmnn/epaper.ts index 5c75893d8..66d432d58 100644 --- a/lib/routes/xmnn/epaper.ts +++ b/lib/routes/xmnn/epaper.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/epaper/:id?', + categories: ['traditional-media'], + example: '/xmnn/epaper/xmrb', + parameters: { id: '报纸 id,见下表,默认为 `xmrb`,即厦门日报' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['epaper.xmnn.cn/:id'], + target: '/epaper/:id', + }, + name: '数字媒体', + maintainers: ['nczitzk'], + handler, + description: `| 厦门日报 | 厦门晚报 | 海西晨报 | 城市捷报 | + | -------- | -------- | -------- | -------- | + | xmrb | xmwb | hxcb | csjb |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'xmrb'; const rootUrl = 'https://epaper.xmnn.cn'; @@ -78,9 +104,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xmnn/maintainer.ts b/lib/routes/xmnn/maintainer.ts deleted file mode 100644 index 252875aad..000000000 --- a/lib/routes/xmnn/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/epaper/:id?': ['nczitzk'], - '/news/:category?': ['nczitzk'], -}; diff --git a/lib/routes/xmnn/namespace.ts b/lib/routes/xmnn/namespace.ts new file mode 100644 index 000000000..83bed8417 --- /dev/null +++ b/lib/routes/xmnn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '厦门网', + url: 'epaper.xmnn.cn', +}; diff --git a/lib/routes/xmnn/news.ts b/lib/routes/xmnn/news.ts index 6dbeff90e..018a78812 100644 --- a/lib/routes/xmnn/news.ts +++ b/lib/routes/xmnn/news.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category{.+}?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'xmxw' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -52,7 +60,7 @@ export default async (ctx) => { const title = $('title').text(); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title, link: currentUrl, @@ -62,5 +70,5 @@ export default async (ctx) => { logo: icon, subtitle: $('div.h').text(), author: title.split(/_/).pop(), - }); -}; + }; +} diff --git a/lib/routes/xmnn/radar.ts b/lib/routes/xmnn/radar.ts deleted file mode 100644 index b47bfe4fd..000000000 --- a/lib/routes/xmnn/radar.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default { - 'xmnn.cn': { - _name: '厦门网', - epaper: [ - { - title: '数字媒体', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-shu-zi-mei-ti', - source: ['/:id'], - target: '/xmnn/epaper/:id', - }, - ], - news: [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/:category*'], - target: (params) => { - const category = params.category; - - return `/xmnn/news/${category ? `/${category}` : ''}`; - }, - }, - { - title: '厦门新闻发布', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/xmxwfb'], - target: '/xmnn/news/xmxwfb', - }, - { - title: '厦门新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/xmxw'], - target: '/xmnn/news/xmxw', - }, - { - title: '本网快报', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/bwkb'], - target: '/xmnn/news/bwkb', - }, - { - title: '厦门网眼', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/xmwy'], - target: '/xmnn/news/xmwy', - }, - { - title: '福建新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/fjxw'], - target: '/xmnn/news/fjxw', - }, - { - title: '国内新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/gnxw'], - target: '/xmnn/news/gnxw', - }, - { - title: '国际新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/gjxw'], - target: '/xmnn/news/gjxw', - }, - { - title: '台海新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/thxw'], - target: '/xmnn/news/thxw', - }, - { - title: '社会新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#xia-men-wang-xin-wen', - source: ['/shxw'], - target: '/xmnn/news/shxw', - }, - ], - }, -}; diff --git a/lib/routes/xmnn/router.ts b/lib/routes/xmnn/router.ts deleted file mode 100644 index acff48cc3..000000000 --- a/lib/routes/xmnn/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/epaper/:id?', './epaper'); - router.get('/news/:category{.+}?', './news'); -}; diff --git a/lib/routes/xmut/jwc/bkjw.ts b/lib/routes/xmut/jwc/bkjw.ts index 2aae4fbcf..06b55e198 100644 --- a/lib/routes/xmut/jwc/bkjw.ts +++ b/lib/routes/xmut/jwc/bkjw.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const xmut = 'https://jwc.xmut.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/bkjw/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'jwxt' } = ctx.req.param(); const url = `${xmut}/index/tzgg/${category}.htm`; const res = await got(url, { @@ -55,9 +63,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/xmut/jwc/yjs.ts b/lib/routes/xmut/jwc/yjs.ts index 9a6d054de..2dc81d257 100644 --- a/lib/routes/xmut/jwc/yjs.ts +++ b/lib/routes/xmut/jwc/yjs.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const xmut = 'https://yjs.xmut.edu.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/jwc/yjjw/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { category = 'yjsc' } = ctx.req.param(); const url = `${xmut}/index/${category}.htm`; const res = await got(url, { @@ -44,9 +52,9 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: $('title').text(), link: url, item: itemPromises, - }); -}; + }; +} diff --git a/lib/routes/xmut/maintainer.ts b/lib/routes/xmut/maintainer.ts deleted file mode 100644 index 44e5d624c..000000000 --- a/lib/routes/xmut/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/jwc/:type/:method': ['icecliffs'], -}; diff --git a/lib/routes/xmut/namespace.ts b/lib/routes/xmut/namespace.ts new file mode 100644 index 000000000..53ad878f1 --- /dev/null +++ b/lib/routes/xmut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '厦门理工大学', + url: 'jwc.xmut.edu.cn', +}; diff --git a/lib/routes/xmut/radar.ts b/lib/routes/xmut/radar.ts deleted file mode 100644 index a976b2b7b..000000000 --- a/lib/routes/xmut/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xmut.edu.cn': { - _name: '厦门理工学院', - jwc: [ - { - title: '教务处', - docs: 'https://docs.rsshub.app/routes/university#xia-men-li-gong-da-xue', - source: ['/:category'], - target: (params) => `/xmut/jwc${params.category ? `/${params.category}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/xmut/router.ts b/lib/routes/xmut/router.ts deleted file mode 100644 index 831c6353f..000000000 --- a/lib/routes/xmut/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jwc/bkjw/:category?', './jwc/bkjw.js'); - router.get('/jwc/yjjw/:category?', './jwc/yjs.js'); -}; diff --git a/lib/routes/xsijishe/forum.ts b/lib/routes/xsijishe/forum.ts index a4d8a44ad..4ed5323dc 100644 --- a/lib/routes/xsijishe/forum.ts +++ b/lib/routes/xsijishe/forum.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://xsijishe.com'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:fid', + categories: ['bbs'], + example: '/xsijishe/forum/51', + parameters: { fid: '子论坛 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '论坛', + maintainers: ['akynazh'], + handler, + description: `:::tip[关于子论坛 id 的获取方法] + \`/xsijishe/forum/51\` 对应于论坛 \`https://xsijishe.com/forum-51-1.html\`,这个论坛的 fid 为 51,也就是 \`forum-{fid}-1\` 中的 fid。 + :::`, +}; + +async function handler(ctx) { const fid = ctx.req.param('fid'); const url = `${baseUrl}/forum-${fid}-1.html`; const resp = await got(url); @@ -48,10 +70,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title: `司机社${forumCategory}论坛`, link: url, description: `司机社${forumCategory}论坛`, item: items, - }); -}; + }; +} diff --git a/lib/routes/xsijishe/maintainer.ts b/lib/routes/xsijishe/maintainer.ts deleted file mode 100644 index 1d2cdf278..000000000 --- a/lib/routes/xsijishe/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/forum/:fid': ['akynazh'], - '/rank/:type': ['akynazh'], -}; diff --git a/lib/routes/xsijishe/namespace.ts b/lib/routes/xsijishe/namespace.ts new file mode 100644 index 000000000..96d4232a7 --- /dev/null +++ b/lib/routes/xsijishe/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '司机社', + url: 'xsijishe.com', +}; diff --git a/lib/routes/xsijishe/radar.ts b/lib/routes/xsijishe/radar.ts deleted file mode 100644 index 76ea6b0a0..000000000 --- a/lib/routes/xsijishe/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'xsijishe.com': { - _name: '司机社', - '.': [ - { - title: '论坛', - docs: 'https://docs.rsshub.app/routes/bbs#si-ji-she', - source: ['/*'], - target: (_, url) => { - const re = /forum-(\d+)-/; - const res = re.exec(url); - if (res) { - return `/xsijishe/forum/${res[1]}`; - } - }, - }, - { - title: '周排行榜', - docs: 'https://docs.rsshub.app/routes/bbs#si-ji-she', - source: ['/*'], - target: '/xsijishe/rank/weekly', - }, - { - title: '月排行榜', - docs: 'https://docs.rsshub.app/routes/bbs#si-ji-she', - source: ['/*'], - target: '/xsijishe/rank/monthly', - }, - ], - }, -}; diff --git a/lib/routes/xsijishe/rank.ts b/lib/routes/xsijishe/rank.ts index c486e78bb..fa3304e0b 100644 --- a/lib/routes/xsijishe/rank.ts +++ b/lib/routes/xsijishe/rank.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; const baseUrl = 'https://xsijishe.com'; -export default async (ctx) => { +export const route: Route = { + path: '/rank/:type', + categories: ['bbs'], + example: '/xsijishe/rank/weekly', + parameters: { type: '排行榜类型: weekly | monthly' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '排行榜', + maintainers: ['akynazh'], + handler, +}; + +async function handler(ctx) { const rankType = ctx.req.param('type'); let title; let rankId; @@ -52,10 +71,10 @@ export default async (ctx) => { }) ) ); - ctx.set('data', { + return { title, link: url, description: title, item: items, - }); -}; + }; +} diff --git a/lib/routes/xsijishe/router.ts b/lib/routes/xsijishe/router.ts deleted file mode 100644 index a9e0419b5..000000000 --- a/lib/routes/xsijishe/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/forum/:fid', './forum'); - router.get('/rank/:type', './rank'); -}; diff --git a/lib/routes/xueqiu/column.ts b/lib/routes/xueqiu/column.ts index ad94dc2e8..094f1e6e1 100644 --- a/lib/routes/xueqiu/column.ts +++ b/lib/routes/xueqiu/column.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { JSDOM } from 'jsdom'; import { CookieJar } from 'tough-cookie'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; const cookieJar = new CookieJar(); const baseUrl = 'https://xueqiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/column/:id', + categories: ['finance'], + example: '/xueqiu/column/9962554712', + parameters: { id: '用户 id, 可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/:id/column'], + }, + name: '用户专栏', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const pageUrl = `${baseUrl}/${id}/column`; @@ -33,10 +55,10 @@ export default async (ctx) => { author: SNOWMAN_TARGET.screen_name, })); - ctx.set('data', { + return { title: `${SNOWMAN_TARGET.screen_name} - 雪球`, link: pageUrl, description: SNOWMAN_TARGET.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/xueqiu/favorite.ts b/lib/routes/xueqiu/favorite.ts index 67c8c2cb0..c6b2cc859 100644 --- a/lib/routes/xueqiu/favorite.ts +++ b/lib/routes/xueqiu/favorite.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/favorite/:id', + categories: ['finance'], + example: '/xueqiu/favorite/8152922548', + parameters: { id: '用户 id, 可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/u/:id'], + }, + name: '用户收藏动态', + maintainers: ['imlonghao'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const res1 = await got({ @@ -24,7 +46,7 @@ export default async (ctx) => { }); const data = res2.data.list; - ctx.set('data', { + return { title: `ID: ${id} 的雪球收藏动态`, link: `https://xueqiu.com/u/${id}`, description: `ID: ${id} 的雪球收藏动态`, @@ -34,5 +56,5 @@ export default async (ctx) => { pubDate: parseDate(item.created_at), link: `https://xueqiu.com${item.target}`, })), - }); -}; + }; +} diff --git a/lib/routes/xueqiu/fund.ts b/lib/routes/xueqiu/fund.ts index 7ec01d5f1..b38053948 100644 --- a/lib/routes/xueqiu/fund.ts +++ b/lib/routes/xueqiu/fund.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/fund/:id', + categories: ['finance'], + example: '/xueqiu/fund/040008', + parameters: { id: '基金代码, 可在基金主页 URL 中找到. 此路由的数据为场外基金 (`F`开头)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '蛋卷基金净值更新', + maintainers: ['HenryQW', 'NathanDai'], + handler, +}; + +async function handler(ctx) { const guid = ctx.req.param('id'); const appUrl = `https://danjuanapp.com/funding/${guid}`; const url = `https://danjuanapp.com/djapi/fund/${guid}`; @@ -41,10 +60,10 @@ export default async (ctx) => { link: appUrl, }; - ctx.set('data', { + return { title: fd_name, link: appUrl, description, item: [single], - }); -}; + }; +} diff --git a/lib/routes/xueqiu/hots.ts b/lib/routes/xueqiu/hots.ts index 788fa2d8c..006756ebd 100644 --- a/lib/routes/xueqiu/hots.ts +++ b/lib/routes/xueqiu/hots.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; import sanitizeHtml from 'sanitize-html'; -export default async (ctx) => { +export const route: Route = { + path: '/hots', + categories: ['finance'], + example: '/xueqiu/hots', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/'], + }, + name: '热帖', + maintainers: ['hillerliao'], + handler, + url: 'xueqiu.com/', +}; + +async function handler() { const res1 = await got({ method: 'get', url: 'https://xueqiu.com/', @@ -28,7 +51,7 @@ export default async (ctx) => { }); const data = res2.data; - ctx.set('data', { + return { title: `热帖 - 雪球`, link: `https://xueqiu.com/`, description: `雪球热门帖子`, @@ -42,5 +65,5 @@ export default async (ctx) => { author: item.user.screen_name, }; }), - }); -}; + }; +} diff --git a/lib/routes/xueqiu/maintainer.ts b/lib/routes/xueqiu/maintainer.ts deleted file mode 100644 index 53c382407..000000000 --- a/lib/routes/xueqiu/maintainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - '/column/:id': ['TonyRL'], - '/favorite/:id': ['imlonghao'], - '/fund/:id': ['HenryQW', 'NathanDai'], - '/hots': ['hillerliao'], - '/snb/:id': ['ZhishanZhang'], - '/stock_comments/:id/:titleLength?': ['zytomorrow'], - '/stock_info/:id/:type?': ['YuYang'], - '/today': ['nczitzk'], - '/user/:id/:type?': ['imlonghao'], - '/user_stock/:id': ['hillerliao'], -}; diff --git a/lib/routes/xueqiu/namespace.ts b/lib/routes/xueqiu/namespace.ts new file mode 100644 index 000000000..ede782659 --- /dev/null +++ b/lib/routes/xueqiu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '雪球', + url: 'danjuanapp.com', +}; diff --git a/lib/routes/xueqiu/radar.ts b/lib/routes/xueqiu/radar.ts deleted file mode 100644 index f50e94f35..000000000 --- a/lib/routes/xueqiu/radar.ts +++ /dev/null @@ -1,72 +0,0 @@ -export default { - 'danjuanapp.com': { - _name: '雪球', - '.': [ - { - title: '蛋卷基金净值更新', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/funding/:id'], - target: '/xueqiu/funding/:id', - }, - ], - }, - 'xueqiu.com': { - _name: '雪球', - '.': [ - { - title: '今日话题', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/today'], - target: '/xueqiu/today', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/u/:id'], - target: '/xueqiu/user/:id', - }, - { - title: '用户收藏动态', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/u/:id'], - target: '/xueqiu/favorite/:id', - }, - { - title: '用户自选动态', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/u/:id'], - target: '/xueqiu/user_stock/:id', - }, - { - title: '用户专栏', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/:id/column'], - target: '/xueqiu/column/:id', - }, - { - title: '组合最新调仓信息', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/P/:id', '/p/:id'], - target: '/xueqiu/snb/:id', - }, - { - title: '股票信息', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/S/:id', '/s/:id'], - target: '/xueqiu/stock_info/:id', - }, - { - title: '股票评论', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/S/:id'], - target: '/xueqiu/stock_comments/:id', - }, - { - title: '热帖', - docs: 'https://docs.rsshub.app/routes/finance#xue-qiu', - source: ['/'], - target: '/xueqiu/hots', - }, - ], - }, -}; diff --git a/lib/routes/xueqiu/router.ts b/lib/routes/xueqiu/router.ts deleted file mode 100644 index 8c1797cd0..000000000 --- a/lib/routes/xueqiu/router.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default (router) => { - router.get('/column/:id', './column'); - router.get('/favorite/:id', './favorite'); - router.get('/fund/:id', './fund'); - router.get('/hots', './hots'); - router.get('/snb/:id', './snb'); - router.get('/stock_comments/:id', './stock-comments'); - router.get('/stock_info/:id/:type?', './stock-info'); - router.get('/today', './today'); - router.get('/user/:id/:type?', './user'); - router.get('/user_stock/:id', './user-stock'); -}; diff --git a/lib/routes/xueqiu/snb.ts b/lib/routes/xueqiu/snb.ts index d0ebbb309..c5d219cf6 100644 --- a/lib/routes/xueqiu/snb.ts +++ b/lib/routes/xueqiu/snb.ts @@ -1,10 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import randUserAgent from '@/utils/rand-user-agent'; const UA = randUserAgent({ browser: 'chrome', os: 'android', device: 'mobile' }); -export default async (ctx) => { +export const route: Route = { + path: '/snb/:id', + categories: ['finance'], + example: '/xueqiu/snb/ZH1288184', + parameters: { id: '组合代码, 可在组合主页 URL 中找到.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/P/:id', 'xueqiu.com/p/:id'], + }, + name: '组合最新调仓信息', + maintainers: ['ZhishanZhang'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const url = 'https://xueqiu.com/p/' + id; @@ -38,10 +60,10 @@ export default async (ctx) => { guid: `xueqiu::snb::${id}::${time}`, }; - ctx.set('data', { + return { title: snb_title, link: url, description: snb_description, item: [single], - }); -}; + }; +} diff --git a/lib/routes/xueqiu/stock-comments.ts b/lib/routes/xueqiu/stock-comments.ts index b0981723f..733f94967 100644 --- a/lib/routes/xueqiu/stock-comments.ts +++ b/lib/routes/xueqiu/stock-comments.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import sanitizeHtml from 'sanitize-html'; -export default async (ctx) => { +export const route: Route = { + path: '/stock_comments/:id', + categories: ['finance'], + example: '/xueqiu/stock_comments/SZ002626', + parameters: { id: '股票代码(需要带上交易所)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/S/:id'], + }, + name: '股票评论', + maintainers: [], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const res = await got({ @@ -28,7 +50,7 @@ export default async (ctx) => { }); const data = res.data.list; - ctx.set('data', { + return { title: `${id} ${stock_name} - 评论`, link: `https://xueqiu.com/S/${id}`, description: `${stock_name} - 评论`, @@ -45,5 +67,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/xueqiu/stock-info.ts b/lib/routes/xueqiu/stock-info.ts index b1f618a28..a9671369e 100644 --- a/lib/routes/xueqiu/stock-info.ts +++ b/lib/routes/xueqiu/stock-info.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; import sanitizeHtml from 'sanitize-html'; -export default async (ctx) => { +export const route: Route = { + path: '/stock_info/:id/:type?', + categories: ['finance'], + example: '/xueqiu/stock_info/SZ000002', + parameters: { id: '股票代码(需要带上交易所)', type: '动态的类型, 不填则为股票公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/S/:id', 'xueqiu.com/s/:id'], + target: '/stock_info/:id', + }, + name: '股票信息', + maintainers: ['YuYang'], + handler, + description: `| 公告 | 新闻 | 研报 | + | ------------ | ---- | -------- | + | announcement | news | research |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const type = ctx.req.param('type') || 'announcement'; const count = 10; @@ -49,7 +75,7 @@ export default async (ctx) => { }); const data = res2.data.list; - ctx.set('data', { + return { title: `${id} ${stock_name} - ${source}`, link: `https://xueqiu.com/S/${id}`, description: `${stock_name} - ${source}`, @@ -65,5 +91,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/xueqiu/today.ts b/lib/routes/xueqiu/today.ts index 0ab616124..16b50f4ba 100644 --- a/lib/routes/xueqiu/today.ts +++ b/lib/routes/xueqiu/today.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['finance'], + example: '/xueqiu/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/today'], + }, + name: '今日话题', + maintainers: ['nczitzk'], + handler, + url: 'xueqiu.com/today', +}; + +async function handler(ctx) { const size = ctx.req.query('limit') ?? '20'; const rootUrl = 'https://xueqiu.com'; @@ -58,9 +81,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '今日话题 - 雪球', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xueqiu/user-stock.ts b/lib/routes/xueqiu/user-stock.ts index e3e4c69d8..10e770ccf 100644 --- a/lib/routes/xueqiu/user-stock.ts +++ b/lib/routes/xueqiu/user-stock.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/user_stock/:id', + categories: ['finance'], + example: '/xueqiu/user_stock/1247347556', + parameters: { id: '用户 id, 可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/u/:id'], + }, + name: '用户自选动态', + maintainers: ['hillerliao'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const res1 = await got({ @@ -34,7 +56,7 @@ export default async (ctx) => { }); const screen_name = res3.data.user.screen_name; - ctx.set('data', { + return { title: `${screen_name} 的雪球自选动态`, link: `https://xueqiu.com/u/${id}`, description: `@${screen_name} 的雪球自选动态`, @@ -44,5 +66,5 @@ export default async (ctx) => { pubDate: parseDate(item.created), link: `https://xueqiu.com/s/${item.symbol}`, })), - }); -}; + }; +} diff --git a/lib/routes/xueqiu/user.ts b/lib/routes/xueqiu/user.ts index 23a421f08..c1efe8a41 100644 --- a/lib/routes/xueqiu/user.ts +++ b/lib/routes/xueqiu/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import queryString from 'query-string'; @@ -6,7 +7,32 @@ import sanitizeHtml from 'sanitize-html'; const rootUrl = 'https://xueqiu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:id/:type?', + categories: ['finance'], + example: '/xueqiu/user/8152922548', + parameters: { id: '用户 id, 可在用户主页 URL 中找到', type: '动态的类型, 不填则默认全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xueqiu.com/u/:id'], + target: '/user/:id', + }, + name: '用户动态', + maintainers: ['imlonghao'], + handler, + description: `| 原发布 | 长文 | 问答 | 热门 | 交易 | + | ------ | ---- | ---- | ---- | ---- | + | 0 | 2 | 4 | 9 | 11 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const type = ctx.req.param('type') || 10; const source = type === '11' ? '买卖' : ''; @@ -68,10 +94,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${data[0].user.screen_name} 的雪球${typename[type]}动态`, link: `${rootUrl}/u/${id}`, description: `${data[0].user.screen_name} 的雪球${typename[type]}动态`, item: items, - }); -}; + }; +} diff --git a/lib/routes/xunhupay/index.ts b/lib/routes/xunhupay/index.ts index ecbc10c67..d150e59ed 100644 --- a/lib/routes/xunhupay/index.ts +++ b/lib/routes/xunhupay/index.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import buildData from '@/utils/common-config'; const baseUrl = 'https://www.xunhupay.com'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/xunhupay/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.xunhupay.com/blog'], + }, + name: '文章', + maintainers: ['Joey'], + handler, + url: 'www.xunhupay.com/blog', +}; + +async function handler(ctx) { const link = `${baseUrl}/blog.html`; ctx.set( 'data', @@ -24,4 +47,4 @@ export default async (ctx) => { }, }) ); -}; +} diff --git a/lib/routes/xunhupay/maintainer.ts b/lib/routes/xunhupay/maintainer.ts deleted file mode 100644 index 61f2fc504..000000000 --- a/lib/routes/xunhupay/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['Joey'], -}; diff --git a/lib/routes/xunhupay/namespace.ts b/lib/routes/xunhupay/namespace.ts new file mode 100644 index 000000000..ff61ed970 --- /dev/null +++ b/lib/routes/xunhupay/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '虎皮椒', + url: 'www.xunhupay.com', +}; diff --git a/lib/routes/xunhupay/radar.ts b/lib/routes/xunhupay/radar.ts deleted file mode 100644 index be72a24ba..000000000 --- a/lib/routes/xunhupay/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xunhupay.com': { - _name: '虎皮椒', - www: [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#hu-pi-jiao', - source: ['/blog'], - target: '/xunhupay/blog', - }, - ], - }, -}; diff --git a/lib/routes/xunhupay/router.ts b/lib/routes/xunhupay/router.ts deleted file mode 100644 index a9a35b9bc..000000000 --- a/lib/routes/xunhupay/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './index'); -}; diff --git a/lib/routes/xys/maintainer.ts b/lib/routes/xys/maintainer.ts deleted file mode 100644 index 0a859d1d8..000000000 --- a/lib/routes/xys/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/new': ['wenzhenl'], -}; diff --git a/lib/routes/xys/namespace.ts b/lib/routes/xys/namespace.ts new file mode 100644 index 000000000..a4ea4ec30 --- /dev/null +++ b/lib/routes/xys/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '新语丝', + url: 'xys.org', +}; diff --git a/lib/routes/xys/new.ts b/lib/routes/xys/new.ts index 5878bec95..28ce3f98e 100644 --- a/lib/routes/xys/new.ts +++ b/lib/routes/xys/new.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,29 @@ import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; -export default async (ctx) => { +export const route: Route = { + path: '/new', + categories: ['blog'], + example: '/xys/new', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['xys.org/', 'xys.org/new.html'], + }, + name: '新到资料', + maintainers: ['wenzhenl'], + handler, + url: 'xys.org/', +}; + +async function handler(ctx) { const rootUrl = 'http://www.xys.org'; const currentUrl = `${rootUrl}/new.html`; @@ -70,9 +93,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '新语丝 - 新到资料', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/xys/radar.ts b/lib/routes/xys/radar.ts deleted file mode 100644 index 818234892..000000000 --- a/lib/routes/xys/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'xys.org': { - _name: '新语丝', - '.': [ - { - title: '新到资料', - docs: 'https://docs.rsshub.app/routes/blog#xin-yu-si', - source: ['/', '/new.html'], - target: '/xys/new', - }, - ], - }, -}; diff --git a/lib/routes/xys/router.ts b/lib/routes/xys/router.ts deleted file mode 100644 index b850a6c37..000000000 --- a/lib/routes/xys/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new', './new'); -}; diff --git a/lib/routes/xyzrank/index.ts b/lib/routes/xyzrank/index.ts index 4aa8d8c4e..9f5051d50 100644 --- a/lib/routes/xyzrank/index.ts +++ b/lib/routes/xyzrank/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,19 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + radar: { + source: ['xyzrank.com/'], + target: '', + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'xyzrank.com/', +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? ''; const rootUrl = 'https://xyzrank.com'; @@ -105,10 +118,10 @@ export default async (ctx) => { }), })); - ctx.set('data', { + return { title: `${$('title').text()} - ${categories[category].title}`, link: currentUrl, item: items, description: $('meta[property="og:description"]').attr('content'), - }); -}; + }; +} diff --git a/lib/routes/xyzrank/maintainer.ts b/lib/routes/xyzrank/maintainer.ts deleted file mode 100644 index 976b0a733..000000000 --- a/lib/routes/xyzrank/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/': ['nczitzk'], - '/hot-episodes-new': ['nczitzk'], - '/hot-podcasts': ['nczitzk'], - '/new-podcasts': ['nczitzk'], -}; diff --git a/lib/routes/xyzrank/namespace.ts b/lib/routes/xyzrank/namespace.ts new file mode 100644 index 000000000..33524af70 --- /dev/null +++ b/lib/routes/xyzrank/namespace.ts @@ -0,0 +1,13 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中文播客榜', + url: 'xyzrank.com', + description: `:::tip +可以通过指定 \`limit\` 参数确定榜单排名下限,默认为 250。 + +若只查看榜单前 50,可在订阅 URL 后加入 \`?limit=50\`。 + +即,以 [热门节目](https://xyzrank.com/#/) 为例,路由为[\`/xyzrank?limit=50\`](https://rsshub.app/xyzrank?limit=50)。 +:::`, +}; diff --git a/lib/routes/xyzrank/radar.ts b/lib/routes/xyzrank/radar.ts deleted file mode 100644 index f232ffaf0..000000000 --- a/lib/routes/xyzrank/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'xyzrank.com': { - _name: '中文播客榜', - '.': [ - { - title: '热门节目', - docs: 'https://docs.rsshub.app/routes/multimedia#zhong-wen-bo-ke-bang-re-men-jie-mu', - source: ['/'], - target: '/xyzrank', - }, - { - title: '热门播客', - docs: 'https://docs.rsshub.app/routes/multimedia#zhong-wen-bo-ke-bang-re-men-bo-ke', - source: ['/'], - target: (_, url) => (new URL(url).hash === '#/hot-podcasts' ? '/xyzrank/hot-podcasts' : null), - }, - { - title: '新锐节目', - docs: 'https://docs.rsshub.app/routes/multimedia#zhong-wen-bo-ke-bang-xin-rui-jie-mu', - source: ['/'], - target: (_, url) => (new URL(url).hash === '#/hot-episodes-new' ? '/xyzrank/hot-episodes-new' : null), - }, - { - title: '新锐播客', - docs: 'https://docs.rsshub.app/routes/multimedia#zhong-wen-bo-ke-bang-xin-rui-bo-ke', - source: ['/'], - target: (_, url) => (new URL(url).hash === '#/new-podcasts' ? '/xyzrank/new-podcasts' : null), - }, - ], - }, -}; diff --git a/lib/routes/xyzrank/router.ts b/lib/routes/xyzrank/router.ts deleted file mode 100644 index 0bcd82a5c..000000000 --- a/lib/routes/xyzrank/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './index'); -}; diff --git a/lib/routes/yahoo/maintainer.ts b/lib/routes/yahoo/maintainer.ts deleted file mode 100644 index e7ff88d92..000000000 --- a/lib/routes/yahoo/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/news/:region/:category?': ['KeiLongW'], - '/news/provider/:region/:providerId': ['TonyRL'], - '/news/providers/:region': ['TonyRL'], -}; diff --git a/lib/routes/yahoo/namespace.ts b/lib/routes/yahoo/namespace.ts new file mode 100644 index 000000000..80a75c2c7 --- /dev/null +++ b/lib/routes/yahoo/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Yahoo', + url: 'hk.news.yahoo.com', +}; diff --git a/lib/routes/yahoo/news/tw/index.ts b/lib/routes/yahoo/news/tw/index.ts index 8f9bf4539..7aa2a1cfc 100644 --- a/lib/routes/yahoo/news/tw/index.ts +++ b/lib/routes/yahoo/news/tw/index.ts @@ -1,7 +1,59 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getArchive, getCategories, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:region/:category?', + categories: ['new-media'], + example: '/yahoo/news/hk/world', + parameters: { region: 'Region, see the table below', category: 'Category, see the table below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yahoo.com/'], + }, + name: 'News', + maintainers: ['KeiLongW'], + handler, + url: 'yahoo.com/', + description: `\`Region\` + + | Hong Kong | Taiwan | US | + | --------- | ------ | -- | + | hk | tw | en | + + <details> + <summary>\`Category\` (Hong Kong)</summary> + + | 全部 | 港聞 | 兩岸國際 | 財經 | 娛樂 | 體育 | 健康 | 親子 | 副刊 | + | -------- | --------- | -------- | -------- | ------------- | ------ | ------ | --------- | ---------- | + | (留空) | hong-kong | world | business | entertainment | sports | health | parenting | supplement | + </details> + + <details> + <summary>\`Category\` (Taiwan)</summary> + + | 全部 | 政治 | 財經 | 娛樂 | 運動 | 社會地方 | 國際 | 生活 | 健康 | 科技 | 品味 | + | -------- | -------- | ------- | ------------- | ------ | -------- | ----- | --------- | ------ | ---------- | ----- | + | (留空) | politics | finance | entertainment | sports | society | world | lifestyle | health | technology | style | + </details> + + <details> + <summary>\`Category\` (US)</summary> + + | All | World | Business | Entertainment | Sports | Health | + | ------- | ----- | -------- | ------------- | ------ | ------ | + | (Empty) | world | business | entertainment | sports | health | + </details>`, +}; + +async function handler(ctx) { const { region, category } = ctx.req.param(); if (!['hk', 'tw'].includes(region)) { throw new Error(`Unknown region: ${region}`); @@ -16,10 +68,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `Yahoo 新聞 - ${category ? categoryMap[category].name : '所有類別'}`, link: `https://${region}.news.yahoo.com/${category ? `${category}/` : ''}archive`, image: 'https://s.yimg.com/cv/apiv2/social/images/yahoo_default_logo-1200x1200.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/yahoo/news/tw/provider-helper.ts b/lib/routes/yahoo/news/tw/provider-helper.ts index ad6df37f9..d2e9a4d32 100644 --- a/lib/routes/yahoo/news/tw/provider-helper.ts +++ b/lib/routes/yahoo/news/tw/provider-helper.ts @@ -1,7 +1,26 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getProviderList } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/providers/:region', + categories: ['new-media'], + example: '/yahoo/news/providers/tw', + parameters: { region: '地區,見上表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞來源列表', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const region = ctx.req.param('region'); if (!['hk', 'tw'].includes(region)) { throw new Error(`Unknown region: ${region}`); @@ -14,10 +33,10 @@ export default async (ctx) => { description: provider.key, })); - ctx.set('data', { + return { title: 'Yahoo 新聞 - 新聞來源列表', link: `https://${region}.news.yahoo.com`, image: 'https://s.yimg.com/cv/apiv2/social/images/yahoo_default_logo-1200x1200.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/yahoo/news/tw/provider.ts b/lib/routes/yahoo/news/tw/provider.ts index a01c52bf5..a5fffc0be 100644 --- a/lib/routes/yahoo/news/tw/provider.ts +++ b/lib/routes/yahoo/news/tw/provider.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getArchive, getProviderList, parseList, parseItem } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/provider/:region/:providerId', + categories: ['new-media'], + example: '/yahoo/news/provider/tw/udn.com', + parameters: { region: '地區,見下表', providerId: '新聞來源 ID,可透過下方新聞來源列表獲得' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞來源', + maintainers: ['TonyRL'], + handler, + description: `| 香港 | 台灣 | + | ---- | ---- | + | hk | tw |`, +}; + +async function handler(ctx) { const { region, providerId } = ctx.req.param(); if (!['hk', 'tw'].includes(region)) { throw new Error(`Unknown region: ${region}`); @@ -16,10 +38,10 @@ export default async (ctx) => { const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet))); - ctx.set('data', { + return { title: `Yahoo 新聞 - ${provider?.title ?? ''}`, link: provider?.link ?? `https://${region}.news.yahoo.com`, image: 'https://s.yimg.com/cv/apiv2/social/images/yahoo_default_logo-1200x1200.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/yahoo/news/us/index.ts b/lib/routes/yahoo/news/us/index.ts index cc38da57c..9d8e56847 100644 --- a/lib/routes/yahoo/news/us/index.ts +++ b/lib/routes/yahoo/news/us/index.ts @@ -1,10 +1,18 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/news/en/:category?', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const region = ctx.req.param('region') === 'en' ? '' : ctx.req.param('region').toLowerCase(); if (!isValidHost(region) && region !== '') { throw new Error('Invalid region'); @@ -37,10 +45,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: feed.title, link: feed.link, description: feed.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/yahoo/radar.ts b/lib/routes/yahoo/radar.ts deleted file mode 100644 index d9eaafd29..000000000 --- a/lib/routes/yahoo/radar.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default { - 'yahoo.com': { - _name: 'Yahoo', - 'hk.news': [ - { - title: '分類新聞', - docs: 'https://docs.rsshub.app/routes/new-media#yahoo', - source: ['/:category/archive', '/archive'], - target: '/yahoo/news/hk/:category?', - }, - { - title: '新聞來源', - docs: 'https://docs.rsshub.app/routes/new-media#yahoo', - source: ['/:providerId/archive', '/archive'], - target: '/yahoo/news/hk/:providerId', - }, - ], - 'tw.news': [ - { - title: '分類新聞', - docs: 'https://docs.rsshub.app/routes/new-media#yahoo', - source: ['/:category/archive', '/archive'], - target: '/yahoo/news/tw/:category?', - }, - { - title: '新聞來源', - docs: 'https://docs.rsshub.app/routes/new-media#yahoo', - source: ['/:providerId/archive', '/archive'], - target: '/yahoo/news/tw/:providerId', - }, - ], - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/new-media#yahoo', - source: ['/'], - target: '/yahoo/news/:region/:category?', - }, - ], - }, -}; diff --git a/lib/routes/yahoo/router.ts b/lib/routes/yahoo/router.ts deleted file mode 100644 index a6b206809..000000000 --- a/lib/routes/yahoo/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/news/en/:category?', './news/us/index'); - router.get('/news/provider/:region/:providerId', './news/tw/provider'); - router.get('/news/providers/:region', './news/tw/provider-helper'); - router.get('/news/:region/:category?', './news/tw/index'); -}; diff --git a/lib/routes/yangtzeu/dongke.ts b/lib/routes/yangtzeu/dongke.ts index 7cd6b3517..ee287cf1e 100644 --- a/lib/routes/yangtzeu/dongke.ts +++ b/lib/routes/yangtzeu/dongke.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -5,7 +6,14 @@ import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/dongke/*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; const rootUrl = 'https://dongke.yangtzeu.edu.cn'; @@ -51,12 +59,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { item: items, title: $('title').text(), link: currentUrl, language: 'zh-cn', image: new URL($('#head-img a img').prop('src'), rootUrl).href, author: '长江大学动物科学学院', - }); -}; + }; +} diff --git a/lib/routes/yangtzeu/maintainer.ts b/lib/routes/yangtzeu/maintainer.ts deleted file mode 100644 index 71bbd418e..000000000 --- a/lib/routes/yangtzeu/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/dongke/:path+': ['nczitzk'], -}; diff --git a/lib/routes/yangtzeu/namespace.ts b/lib/routes/yangtzeu/namespace.ts new file mode 100644 index 000000000..33da8158a --- /dev/null +++ b/lib/routes/yangtzeu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '长江大学', + url: 'yangtzeu.edu.cn', +}; diff --git a/lib/routes/yangtzeu/radar.ts b/lib/routes/yangtzeu/radar.ts deleted file mode 100644 index 2dd49e89b..000000000 --- a/lib/routes/yangtzeu/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'yangtzeu.edu.cn': { - _name: '长江大学', - '.': [ - { - title: '动物科学学院', - docs: 'https://docs.rsshub.app/routes/universities#chang-jiang-da-xue-dong-wu-ke-xue-xue-yuan', - source: ['/:category', '/'], - target: (params, url) => { - url = new URL(url); - const path = /\.edu\.cn(.*?)\.htm/.test(url.href) ? url.href.match(/\.edu\.cn(.*?)\.htm/)[1] : ''; - - return `/yangtzeu/dongke${path}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/yangtzeu/router.ts b/lib/routes/yangtzeu/router.ts deleted file mode 100644 index 2136ea041..000000000 --- a/lib/routes/yangtzeu/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/dongke/*', './dongke'); -}; diff --git a/lib/routes/ycwb/index.ts b/lib/routes/ycwb/index.ts index 27a69ce7d..16189bf47 100644 --- a/lib/routes/ycwb/index.ts +++ b/lib/routes/ycwb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,36 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:node', + categories: ['traditional-media'], + example: '/ycwb/1', + parameters: { node: '栏目 id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['TimWu007'], + handler, + description: `注:小部分栏目的 URL 会给出 nodeid。如未给出,可打开某条新闻链接后,查看网页源代码,搜索 nodeid 的值。 + + 常用栏目节点: + + | 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 | + | ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | + | 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 | + + | 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 | + | ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- | + | 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 |`, +}; + +async function handler(ctx) { const node = ctx.req.param('node') ?? 1; const currentUrl = `https://6api.ycwb.com/app_if/jy/getArticles?nodeid=${node}&pagesize=15`; @@ -78,9 +108,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `羊城晚报金羊网 - ${nodeName}`, link: String(nodeLink === '' ? 'https://www.ycwb.com/' : nodeLink), item: items, - }); -}; + }; +} diff --git a/lib/routes/ycwb/maintainer.ts b/lib/routes/ycwb/maintainer.ts deleted file mode 100644 index b75fe2dd7..000000000 --- a/lib/routes/ycwb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:node': ['TimWu007'], -}; diff --git a/lib/routes/ycwb/namespace.ts b/lib/routes/ycwb/namespace.ts new file mode 100644 index 000000000..71be8e8bb --- /dev/null +++ b/lib/routes/ycwb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '羊城晚报金羊网', + url: 'xwlb.com.cn', +}; diff --git a/lib/routes/ycwb/radar.ts b/lib/routes/ycwb/radar.ts deleted file mode 100644 index eb19b81de..000000000 --- a/lib/routes/ycwb/radar.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default { - 'xwlb.com.cn': { - _name: '羊城晚报金羊网', - '.': [ - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#yang-cheng-wan-bao-jin-yang-wang', - source: ['/'], - }, - ], - }, -}; diff --git a/lib/routes/ycwb/router.ts b/lib/routes/ycwb/router.ts deleted file mode 100644 index 783379f3e..000000000 --- a/lib/routes/ycwb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:node', './index'); -}; diff --git a/lib/routes/yicai/author.ts b/lib/routes/yicai/author.ts index 3d6c970a7..5dca9a763 100644 --- a/lib/routes/yicai/author.ts +++ b/lib/routes/yicai/author.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/author/:id?', + categories: ['traditional-media'], + example: '/yicai/author/100005663', + parameters: { id: '作者 id,可在对应作者页中找到,默认为第一财经研究院' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/author/:id', 'yicai.com/author'], + target: '/author/:id', + }, + name: '一财号', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '100005663'; const currentUrl = `${rootUrl}/author/${id}.html`; @@ -19,9 +42,9 @@ export default async (ctx) => { const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: `第一财经一财号 - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/brief.ts b/lib/routes/yicai/brief.ts index c5d9adda4..a3de5abba 100644 --- a/lib/routes/yicai/brief.ts +++ b/lib/routes/yicai/brief.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/brief', + categories: ['traditional-media'], + example: '/yicai/brief', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/brief'], + }, + name: '正在', + maintainers: ['sanmmm', 'nczitzk'], + handler, + url: 'yicai.com/brief', +}; + +async function handler(ctx) { const currentUrl = `${rootUrl}/brief`; const apiUrl = `${rootUrl}/api/ajax/getbrieflist?type=0&page=1&pagesize=${ctx.req.query('limit') ?? 50}`; @@ -20,9 +43,9 @@ export default async (ctx) => { pubDate: timezone(parseDate(`${item.datekey} ${item.hm}`, 'YYYY.MM.DD HH:mm'), +8), })); - ctx.set('data', { + return { title: '第一财经 - 正在', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/dt.ts b/lib/routes/yicai/dt.ts index c740dbd7a..c7ab9c143 100644 --- a/lib/routes/yicai/dt.ts +++ b/lib/routes/yicai/dt.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -14,7 +15,66 @@ const columns = { visualization: 4, }; -export default async (ctx) => { +export const route: Route = { + path: '/dt/:column?/:category?', + categories: ['traditional-media'], + example: '/yicai/dt/article', + parameters: { column: '栏目,见下表,默认为文章', category: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'DT 财经', + maintainers: ['nczitzk'], + handler, + description: `#### [文章](https://dt.yicai.com/article) + + | 分类 | ID | + | -------- | ---------- | + | 全部 | article/0 | + | 新流行 | article/31 | + | 新趋势 | article/32 | + | 商业黑马 | article/33 | + | 新品 | article/34 | + | 营销 | article/35 | + | 大公司 | article/36 | + | 城市生活 | article/38 | + + #### [报告](https://dt.yicai.com/report) + + | 分类 | ID | + | ---------- | --------- | + | 全部 | report/0 | + | 人群观念 | report/9 | + | 人群行为 | report/22 | + | 美妆个护 | report/23 | + | 3C 数码 | report/24 | + | 营销趋势 | report/25 | + | 服饰鞋包 | report/27 | + | 互联网 | report/28 | + | 城市与居住 | report/29 | + | 消费趋势 | report/30 | + | 生活趋势 | report/37 | + + #### [可视化](https://dt.yicai.com/visualization) + + | 分类 | ID | + | -------- | ---------------- | + | 全部 | visualization/0 | + | 新流行 | visualization/39 | + | 新趋势 | visualization/40 | + | 商业黑马 | visualization/41 | + | 新品 | visualization/42 | + | 营销 | visualization/43 | + | 大公司 | visualization/44 | + | 城市生活 | visualization/45 |`, +}; + +async function handler(ctx) { const { column = 'article', category = '0' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; @@ -98,7 +158,7 @@ export default async (ctx) => { const image = $('div.logo a img').prop('src'); const icon = new URL($('link[rel="shortcut icon"]').prop('href'), rootUrl).href; - ctx.set('data', { + return { item: items, title: `${$(`a[data-cid="${category}"]`).text()}${title}`, link: currentUrl, @@ -110,5 +170,5 @@ export default async (ctx) => { subtitle: $('meta[name="description"]').prop('content'), author: title.split(/_/).pop(), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/yicai/feed.ts b/lib/routes/yicai/feed.ts index 44fc27c36..212fc5c5e 100644 --- a/lib/routes/yicai/feed.ts +++ b/lib/routes/yicai/feed.ts @@ -1,10 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/feed/:id?', + categories: ['traditional-media'], + example: '/yicai/feed/669', + parameters: { id: '主题 id,可在对应主题页中找到,默认为一财早报' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/feed/:id', 'yicai.com/feed'], + target: '/feed/:id', + }, + name: '关注', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 全部主题词见 [此处](https://www.yicai.com/feed/alltheme) + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '669'; const currentUrl = `${rootUrl}/feed/${id}`; @@ -19,9 +45,9 @@ export default async (ctx) => { const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: `第一财经主题 - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/headline.ts b/lib/routes/yicai/headline.ts index 06da83410..05f35c203 100644 --- a/lib/routes/yicai/headline.ts +++ b/lib/routes/yicai/headline.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/headline', + categories: ['traditional-media'], + example: '/yicai/headline', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/'], + }, + name: '头条', + maintainers: ['nczitzk'], + handler, + url: 'yicai.com/', +}; + +async function handler(ctx) { const apiUrl = `${rootUrl}/api/ajax/getlistbycid?cid=48&type=1&page=1&pagesize=${ctx.req.query('limit') ?? 30}`; const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: '第一财经 - 头条', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/latest.ts b/lib/routes/yicai/latest.ts index 9ccbc9694..88430ef8e 100644 --- a/lib/routes/yicai/latest.ts +++ b/lib/routes/yicai/latest.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/latest', + categories: ['traditional-media'], + example: '/yicai/latest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/'], + }, + name: '最新', + maintainers: ['nczitzk'], + handler, + url: 'yicai.com/', +}; + +async function handler(ctx) { const apiUrl = `${rootUrl}/api/ajax/getlatest?page=1&pagesize=${ctx.req.query('limit') ?? 30}`; const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: '第一财经 - 最新', link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/maintainer.ts b/lib/routes/yicai/maintainer.ts deleted file mode 100644 index 0d12d07fe..000000000 --- a/lib/routes/yicai/maintainer.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - '/author/:id?': ['nczitzk'], - '/brief': ['sanmmm', 'nczitzk'], - '/dt/:column?/:category?': ['nczitzk'], - '/feed/:id?': ['nczitzk'], - '/headline': ['nczitzk'], - '/latest': ['nczitzk'], - '/news/:id?': ['nczitzk'], - '/video/:id?': ['nczitzk'], - '/vip/:id?': ['nczitzk'], -}; diff --git a/lib/routes/yicai/namespace.ts b/lib/routes/yicai/namespace.ts new file mode 100644 index 000000000..8a4a78e1d --- /dev/null +++ b/lib/routes/yicai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '第一财经', + url: 'yicai.com', +}; diff --git a/lib/routes/yicai/news.ts b/lib/routes/yicai/news.ts index 327ce3487..38b3bfef8 100644 --- a/lib/routes/yicai/news.ts +++ b/lib/routes/yicai/news.ts @@ -1,9 +1,59 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:id?', + categories: ['traditional-media'], + example: '/yicai/news', + parameters: { id: '分类 id,见下表,可在对应分类页中找到,默认为新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/news/:id', 'yicai.com/news'], + target: '/news/:id', + }, + name: '新闻', + maintainers: ['nczitzk'], + handler, + description: `| Id | 名称 | + | ------------------------ | ---------- | + | gushi | A 股 | + | kechuangban | 科创板 | + | hongguan | 大政 | + | jinrong | 金融 | + | quanqiushichang | 海外市场 | + | gongsi | 产经 | + | shijie | 全球 | + | kechuang | 科技 | + | quyu | 区域 | + | comment | 评论 | + | dafengwenhua | 商业人文 | + | books | 阅读周刊 | + | loushi | 地产 | + | automobile | 汽车 | + | china\_financial\_herald | 对话陆家嘴 | + | fashion | 时尚 | + | ad | 商业资讯 | + | info | 资讯 | + | jzfxb | 价值风向标 | + | shuducaijing | 数读财经 | + | shujujiepan | 数据解盘 | + | shudushenghuo | 数读生活 | + | cbndata | CBNData | + | dtcj | DT 财经 | + | xfsz | 消费数知 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; let channel; @@ -32,9 +82,9 @@ export default async (ctx) => { const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: `第一财经 - ${channel?.name ?? '新闻'}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/radar.ts b/lib/routes/yicai/radar.ts deleted file mode 100644 index 9eb560e50..000000000 --- a/lib/routes/yicai/radar.ts +++ /dev/null @@ -1,219 +0,0 @@ -export default { - 'yicai.com': { - _name: '第一财经', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-zui-xin', - source: ['/'], - target: '/yicai/latest', - }, - { - title: '头条', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-tou-tiao', - source: ['/'], - target: '/yicai/headline', - }, - { - title: 'VIP 频道', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-vip-pin-dao', - source: ['/vip/product/:id', '/'], - target: '/yicai/vip/:id', - }, - { - title: '新闻', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-xin-wen', - source: ['/news/:id', '/news'], - target: '/yicai/news/:id', - }, - { - title: '关注', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-guan-zhu', - source: ['/feed/:id', '/feed'], - target: '/yicai/feed/:id', - }, - { - title: '视听', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-shi-ting', - source: ['/video/:id', '/video'], - target: '/yicai/video/:id', - }, - { - title: '正在', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-zheng-zai', - source: ['/brief'], - target: '/yicai/brief', - }, - { - title: '一财号', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-yi-cai-hao', - source: ['/author/:id', '/author'], - target: '/yicai/author/:id', - }, - ], - dt: [ - { - title: 'DT 财经 - 可视化 - 全部', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/0', - }, - { - title: 'DT 财经 - 可视化 - 新流行', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/39', - }, - { - title: 'DT 财经 - 可视化 - 新趋势', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/40', - }, - { - title: 'DT 财经 - 可视化 - 商业黑马', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/41', - }, - { - title: 'DT 财经 - 可视化 - 新品', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/42', - }, - { - title: 'DT 财经 - 可视化 - 营销', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/43', - }, - { - title: 'DT 财经 - 可视化 - 大公司', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/44', - }, - { - title: 'DT 财经 - 可视化 - 城市生活', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/visualization'], - target: '/yicai/dt/visualization/45', - }, - { - title: 'DT 财经 - 文章 - 全部', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/0', - }, - { - title: 'DT 财经 - 文章 - 新流行', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/31', - }, - { - title: 'DT 财经 - 文章 - 新趋势', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/32', - }, - { - title: 'DT 财经 - 文章 - 商业黑马', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/33', - }, - { - title: 'DT 财经 - 文章 - 新品', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/34', - }, - { - title: 'DT 财经 - 文章 - 营销', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/35', - }, - { - title: 'DT 财经 - 文章 - 大公司', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/36', - }, - { - title: 'DT 财经 - 文章 - 城市生活', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/article'], - target: '/yicai/dt/article/38', - }, - { - title: 'DT 财经 - 报告 - 全部', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/0', - }, - { - title: 'DT 财经 - 报告 - 人群观念', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/9', - }, - { - title: 'DT 财经 - 报告 - 人群行为', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/22', - }, - { - title: 'DT 财经 - 报告 - 美妆个护', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/23', - }, - { - title: 'DT 财经 - 报告 - 3C数码', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/24', - }, - { - title: 'DT 财经 - 报告 - 营销趋势', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/25', - }, - { - title: 'DT 财经 - 报告 - 服饰鞋包', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/27', - }, - { - title: 'DT 财经 - 报告 - 互联网', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/28', - }, - { - title: 'DT 财经 - 报告 - 城市与居住', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/29', - }, - { - title: 'DT 财经 - 报告 - 消费趋势', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/30', - }, - { - title: 'DT 财经 - 报告 - 生活趋势', - docs: 'https://docs.rsshub.app/routes/traditional-media#di-yi-cai-jing-dt-cai-jing', - source: ['/report'], - target: '/yicai/dt/report/37', - }, - ], - }, -}; diff --git a/lib/routes/yicai/router.ts b/lib/routes/yicai/router.ts deleted file mode 100644 index 14fffd19d..000000000 --- a/lib/routes/yicai/router.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default (router) => { - router.get('/author/:id?', './author'); - router.get('/brief', './brief'); - router.get('/dt/:column?/:category?', './dt'); - router.get('/feed/:id?', './feed'); - router.get('/headline', './headline'); - router.get('/latest', './latest'); - router.get('/news/:id?', './news'); - router.get('/video/:id?', './video'); - router.get('/vip/:id?', './vip'); -}; diff --git a/lib/routes/yicai/video.ts b/lib/routes/yicai/video.ts index 17039d5b6..48ed7928c 100644 --- a/lib/routes/yicai/video.ts +++ b/lib/routes/yicai/video.ts @@ -1,9 +1,69 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/video/:id?', + categories: ['traditional-media'], + example: '/yicai/video', + parameters: { id: '分类 id,见下表,可在对应分类页中找到,默认为视听' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/video/:id', 'yicai.com/video'], + target: '/video/:id', + }, + name: '视听', + maintainers: ['nczitzk'], + handler, + description: `| Id | 名称 | + | -------------------- | ---------------------------- | + | youliao | 有料 | + | appshipin | 此刻 | + | yicaisudi | 速递 | + | caishang | 财商 | + | shiji | 史记 | + | jinrigushi | 今日股市 | + | tangulunjin | 谈股论金 | + | gongsiyuhangye | 公司与行业 | + | cjyxx | 财经夜行线 | + | 6thtradingday | 第六交易日 | + | cjfw | 财经风味 | + | chuangshidai | 创时代 | + | weilaiyaoqinghan | 未来邀请函 | + | tounaofengbao | 头脑风暴 | + | zhongguojingyingzhe | 中国经营者 | + | shichanglingjuli | 市场零距离 | + | huanqiucaijing | 环球财经视界 | + | zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 | + | jiemacaishang | 解码财商 | + | sxpl | 首席评论 | + | zhongguojingjiluntan | 中国经济论坛 | + | opinionleader | 意见领袖 | + | xinjinrong | 解码新金融 | + | diyidichan | 第一地产 | + | zhichedaren | 智车达人 | + | chuangtoufengyun | 创投风云 | + | chunxiangrensheng | 醇享人生 | + | diyishengyin | 第一声音 | + | sanliangboqianjin | 财智双全 | + | weilaiyaoqinghan | 未来邀请函 | + | zjdy | 主角 ▪ 大医 | + | leye | 乐业之城 | + | sanrenxing | 价值三人行 | + | yuandongli | 中国源动力 | + | pioneerzone | 直击引领区 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; let channel; @@ -32,9 +92,9 @@ export default async (ctx) => { const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: `第一财经 - ${channel?.name ?? '视听'}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yicai/vip.ts b/lib/routes/yicai/vip.ts index 3eb77133c..f0f398c2d 100644 --- a/lib/routes/yicai/vip.ts +++ b/lib/routes/yicai/vip.ts @@ -1,10 +1,33 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl, ProcessItems } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/vip/:id?', + categories: ['traditional-media'], + example: '/yicai/vip/428', + parameters: { id: '频道 id,可在对应频道页中找到,默认为一元点金' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yicai.com/vip/product/:id', 'yicai.com/'], + target: '/vip/:id', + }, + name: 'VIP 频道', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? '428'; const currentUrl = `${rootUrl}/vip/product/${id}`; @@ -19,9 +42,9 @@ export default async (ctx) => { const items = await ProcessItems(apiUrl, cache.tryGet); - ctx.set('data', { + return { title: `第一财经VIP频道 - ${$('title').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/ymgal/article.ts b/lib/routes/ymgal/article.ts index dc7abfbfe..0a8435d70 100644 --- a/lib/routes/ymgal/article.ts +++ b/lib/routes/ymgal/article.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,28 @@ const types = { column: '?type=COLUMN&page=1', }; -export default async (ctx) => { +export const route: Route = { + path: '/article/:type?', + categories: ['anime'], + example: '/ymgal/article', + parameters: { type: '文章类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['SunBK201'], + handler, + description: `| 全部文章 | 资讯 | 专栏 | + | -------- | ---- | ------ | + | all | news | column |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') || 'all'; const link = `${host}/co/topic/list` + types[type]; @@ -53,10 +75,10 @@ export default async (ctx) => { info = '专栏'; } - ctx.set('data', { + return { title: `月幕 Galgame - ${info}`, link: `${host}/co/article`, description: `月幕 Galgame - ${info}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/ymgal/game.ts b/lib/routes/ymgal/game.ts index 7ab097e6b..e6e91b310 100644 --- a/lib/routes/ymgal/game.ts +++ b/lib/routes/ymgal/game.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +13,29 @@ const date = new Date(); const year = date.getFullYear(); const month = date.getMonth() + 1; -export default async (ctx) => { +export const route: Route = { + path: '/game/release', + categories: ['anime'], + example: '/ymgal/game/release', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['ymgal.games/'], + }, + name: '本月新作', + maintainers: ['SunBK201'], + handler, + url: 'ymgal.games/', +}; + +async function handler() { const response = await got({ method: 'get', url: `${host}/release-list/${year}/${month}`, @@ -35,10 +58,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `月幕 Galgame - 本月新作`, link: `${host}/release-list/${year}/${month}`, description: '月幕 Galgame - 本月新作', item: items, - }); -}; + }; +} diff --git a/lib/routes/ymgal/maintainer.ts b/lib/routes/ymgal/maintainer.ts deleted file mode 100644 index 2a3a157fb..000000000 --- a/lib/routes/ymgal/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/article/:type?': ['SunBK201'], - '/game/release': ['SunBK201'], -}; diff --git a/lib/routes/ymgal/namespace.ts b/lib/routes/ymgal/namespace.ts new file mode 100644 index 000000000..f595187df --- /dev/null +++ b/lib/routes/ymgal/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '月幕 Galgame', + url: 'ymgal.games', +}; diff --git a/lib/routes/ymgal/radar.ts b/lib/routes/ymgal/radar.ts deleted file mode 100644 index 56560a5e9..000000000 --- a/lib/routes/ymgal/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'ymgal.games': { - _name: '月幕 Galgame', - '.': [ - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/anime#yue-mu-galgame', - source: ['/co/article'], - target: '/ymgal/article/all', - }, - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/anime#yue-mu-galgame', - source: ['/co/article'], - target: '/ymgal/article/news', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/anime#yue-mu-galgame', - source: ['/co/article'], - target: '/ymgal/article/column', - }, - { - title: '本月新作', - docs: 'https://docs.rsshub.app/routes/anime#yue-mu-galgame', - source: ['/'], - target: '/ymgal/game/release', - }, - ], - }, -}; diff --git a/lib/routes/ymgal/router.ts b/lib/routes/ymgal/router.ts deleted file mode 100644 index 054388b77..000000000 --- a/lib/routes/ymgal/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/article/:type?', './article'); - router.get('/game/release', './game'); -}; diff --git a/lib/routes/yoasobi-music/info.ts b/lib/routes/yoasobi-music/info.ts index 85da01039..43e8fef11 100644 --- a/lib/routes/yoasobi-music/info.ts +++ b/lib/routes/yoasobi-music/info.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,30 @@ import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/info/:category?', + categories: ['live'], + example: '/yoasobi-music/info/news', + parameters: { category: '`news`, `biography`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.yoasobi-music.jp/', 'www.yoasobi-music.jp/:category'], + target: '/info/:category', + }, + name: 'News & Biography', + maintainers: [], + handler, + url: 'www.yoasobi-music.jp/', +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const ARTIST = 'YOASOBI', @@ -42,7 +66,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { // the source title title, // the source url @@ -67,5 +91,5 @@ export default async (ctx) => { link: i.id ? `${officialUrl}/${i.id}` : officialUrl, category: i.category, })), - }); -}; + }; +} diff --git a/lib/routes/yoasobi-music/live.ts b/lib/routes/yoasobi-music/live.ts index 2028e10f6..13f7957a6 100644 --- a/lib/routes/yoasobi-music/live.ts +++ b/lib/routes/yoasobi-music/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/live', + categories: ['live'], + example: '/yoasobi-music/live', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.yoasobi-music.jp/', 'www.yoasobi-music.jp/live'], + }, + name: 'Live', + maintainers: ['Kiotlin'], + handler, + url: 'www.yoasobi-music.jp/', +}; + +async function handler() { const ARTIST = 'YOASOBI', SONYJPURL = 'https://www.sonymusic.co.jp', BASEURL = 'https://www.sonymusic.co.jp/json/v2/artist', @@ -30,7 +53,7 @@ export default async (ctx) => { sessions: item.liveItem, })); - ctx.set('data', { + return { // the source title title, // the source url @@ -51,5 +74,5 @@ export default async (ctx) => { // the article link link: item.link, })), - }); -}; + }; +} diff --git a/lib/routes/yoasobi-music/maintainer.ts b/lib/routes/yoasobi-music/maintainer.ts deleted file mode 100644 index 748a5c884..000000000 --- a/lib/routes/yoasobi-music/maintainer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - '/info/:category': ['Kiotlin'], - '/live': ['Kiotlin'], - '/media': ['Kiotlin'], -}; diff --git a/lib/routes/yoasobi-music/media.ts b/lib/routes/yoasobi-music/media.ts index 192ad59bf..5150d8ead 100644 --- a/lib/routes/yoasobi-music/media.ts +++ b/lib/routes/yoasobi-music/media.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,29 @@ import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/media', + categories: ['live'], + example: '/yoasobi-music/media', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.yoasobi-music.jp/', 'www.yoasobi-music.jp/media'], + }, + name: 'Media', + maintainers: ['Kiotlin'], + handler, + url: 'www.yoasobi-music.jp/', +}; + +async function handler() { const ARTIST = 'YOASOBI', BASEURL = 'https://www.sonymusic.co.jp/json/v2/artist', POSTFIX = 'start/0/count/-1'; @@ -33,7 +56,7 @@ export default async (ctx) => { description: item.note, })); - ctx.set('data', { + return { // the source title title, // the source url @@ -58,5 +81,5 @@ export default async (ctx) => { // the article link link: officialUrl, })), - }); -}; + }; +} diff --git a/lib/routes/yoasobi-music/namespace.ts b/lib/routes/yoasobi-music/namespace.ts new file mode 100644 index 000000000..0bb58dbbb --- /dev/null +++ b/lib/routes/yoasobi-music/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Yoasobi Official', + url: 'www.yoasobi-music.jp', +}; diff --git a/lib/routes/yoasobi-music/radar.ts b/lib/routes/yoasobi-music/radar.ts deleted file mode 100644 index d46132ade..000000000 --- a/lib/routes/yoasobi-music/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'yoasobi-music.jp': { - _name: 'Yoasobi Official', - www: [ - { - title: 'News', - docs: 'https://docs.rsshub.app/routes/live#yoasobi', - source: ['/', '/:category'], - target: '/yoasobi-music/info/:category', - }, - { - title: 'Biography', - docs: 'https://docs.rsshub.app/routes/live#yoasobi', - source: ['/', '/:category'], - target: '/yoasobi-music/info/:category', - }, - { - title: 'Live', - docs: 'https://docs.rsshub.app/routes/live#yoasobi', - source: ['/', '/live'], - target: '/yoasobi-music/live', - }, - { - title: 'Media', - docs: 'https://docs.rsshub.app/routes/live#yoasobi', - source: ['/', '/media'], - target: '/yoasobi-music/media', - }, - ], - }, -}; diff --git a/lib/routes/yoasobi-music/router.ts b/lib/routes/yoasobi-music/router.ts deleted file mode 100644 index 09629a1df..000000000 --- a/lib/routes/yoasobi-music/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/info/:category?', './info'); // news, biography - router.get('/live', './live'); - router.get('/media', './media'); -}; diff --git a/lib/routes/yomiuri/maintainer.ts b/lib/routes/yomiuri/maintainer.ts deleted file mode 100644 index f1f89d05d..000000000 --- a/lib/routes/yomiuri/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['Arracc'], -}; diff --git a/lib/routes/yomiuri/namespace.ts b/lib/routes/yomiuri/namespace.ts new file mode 100644 index 000000000..ab8d90bfe --- /dev/null +++ b/lib/routes/yomiuri/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Yomiuri Shimbun 読売新聞', + url: 'www.yomiuri.co.jp', +}; diff --git a/lib/routes/yomiuri/news.ts b/lib/routes/yomiuri/news.ts index d3ab637cd..362fba932 100644 --- a/lib/routes/yomiuri/news.ts +++ b/lib/routes/yomiuri/news.ts @@ -1,10 +1,52 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/yomiuri/news', + parameters: { category: 'Category, `news` by default' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.yomiuri.co.jp/:category?'], + }, + name: 'News', + maintainers: ['Arracc'], + handler, + description: `Free articles only. + + | Category | Parameter | + | -------------- | --------- | + | 新着・速報 | news | + | 社会 | national | + | 政治 | politics | + | 経済 | economy | + | スポーツ | sports | + | 国際 | world | + | 地域 | local | + | 科学・IT | science | + | エンタメ・文化 | culture | + | ライフ | life | + | 医療・健康 | medical | + | 教育・就活 | kyoiku | + | 選挙・世論調査 | election | + | 囲碁・将棋 | igoshougi | + | 社説 | editorial | + | 皇室 | koushitsu |`, +}; + +async function handler(ctx) { const { category = 'news' } = ctx.req.param(); const url = `https://www.yomiuri.co.jp/${category}`; @@ -71,10 +113,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), link: url, image: 'https://www.yomiuri.co.jp/apple-touch-icon.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/yomiuri/radar.ts b/lib/routes/yomiuri/radar.ts deleted file mode 100644 index c177eb9ba..000000000 --- a/lib/routes/yomiuri/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'yomiuri.co.jp': { - _name: '読売新聞', - www: [ - { - title: '新聞', - docs: 'https://docs.rsshub.app/routes/traditional-media#du-mai-xin-wen', - source: ['/:category?'], - target: '/yomiuri/:category?', - }, - ], - }, -}; diff --git a/lib/routes/yomiuri/router.ts b/lib/routes/yomiuri/router.ts deleted file mode 100644 index 009a87867..000000000 --- a/lib/routes/yomiuri/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './news'); -}; diff --git a/lib/routes/yomujp/level.ts b/lib/routes/yomujp/level.ts index b6c16de43..b413198b4 100644 --- a/lib/routes/yomujp/level.ts +++ b/lib/routes/yomujp/level.ts @@ -1,9 +1,33 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; import got from '@/utils/got'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/:level?', + categories: ['reading'], + example: '/yomujp/n1', + parameters: { level: '等级,n1~n6,为空默认全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yomujp.com/', 'yomujp.com/:level'], + target: '/:level', + }, + name: '等级', + maintainers: ['eternasuno'], + handler, + url: 'yomujp.com/', +}; + +async function handler(ctx) { const level = formatLevel(ctx.req.param('level')); const url = new URL('https://yomujp.com/wp-json/wp/v2/posts'); url.searchParams.append('categories', getLevel(level)); @@ -42,7 +66,7 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: level ? `${level.toUpperCase()} | 日本語多読道場` : '日本語多読道場', link: `https://yomujp.com/${level}`, description: 'みなさん、こんにちは。 「 日本語多読道場(にほんごたどくどうじょう) Yomujp」は日本語を勉強する人のための読みものサイト(website)です。 日本の地理、食べもの、動物、植物、文化や歴史などを紹介します。', @@ -50,8 +74,8 @@ export default async (ctx) => { itunes_author: 'Yomujp', image: 'https://yomujp.com/wp-content/uploads/2023/08/top1-2-300x99-1.png', item, - }); -}; + }; +} const formatLevel = (level) => { const lowerCaseLevel = level?.toLowerCase(); diff --git a/lib/routes/yomujp/maintainer.ts b/lib/routes/yomujp/maintainer.ts deleted file mode 100644 index 5bd5eaf94..000000000 --- a/lib/routes/yomujp/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:level?': ['eternasuno'], -}; diff --git a/lib/routes/yomujp/namespace.ts b/lib/routes/yomujp/namespace.ts new file mode 100644 index 000000000..b173c7d6c --- /dev/null +++ b/lib/routes/yomujp/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '日本語多読道場', + url: 'yomujp.com', +}; diff --git a/lib/routes/yomujp/radar.ts b/lib/routes/yomujp/radar.ts deleted file mode 100644 index c12dd6f44..000000000 --- a/lib/routes/yomujp/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'yomujp.com': { - _name: '日本語多読道場', - '.': [ - { - title: '等级', - docs: 'https://docs.rsshub.app/zh/routes/reading#ri-ben-yu-duo-du-dao-chang-deng-ji', - source: ['/', '/:level'], - target: '/yomujp/:level', - }, - ], - }, -}; diff --git a/lib/routes/yomujp/router.ts b/lib/routes/yomujp/router.ts deleted file mode 100644 index abe5e167a..000000000 --- a/lib/routes/yomujp/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:level?', './level'); -}; diff --git a/lib/routes/youku/channel.ts b/lib/routes/youku/channel.ts index cb05b08c5..18d313dfb 100644 --- a/lib/routes/youku/channel.ts +++ b/lib/routes/youku/channel.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -7,7 +8,29 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:channelId/:embed?', + categories: ['multimedia'], + example: '/youku/channel/UNTg3MTM3OTcy', + parameters: { channelId: '频道 id', embed: '默认为开启内嵌视频, 任意值为关闭' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['i.youku.com/i/:id'], + target: '/channel/:id', + }, + name: '频道', + maintainers: ['xyqfer', 'Fatpandac'], + handler, +}; + +async function handler(ctx) { const channelId = ctx.req.param('channelId'); const embed = !ctx.req.param('embed'); @@ -24,7 +47,7 @@ export default async (ctx) => { const $ = load(data); const list = $('div.videoitem_pack'); - ctx.set('data', { + return { title: $('.username').text(), link: `https://i.youku.com/i/${channelId}`, description: $('.desc').text(), @@ -55,5 +78,5 @@ export default async (ctx) => { }) .get() .filter(Boolean), - }); -}; + }; +} diff --git a/lib/routes/youku/maintainer.ts b/lib/routes/youku/maintainer.ts deleted file mode 100644 index 695d87aa2..000000000 --- a/lib/routes/youku/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/channel/:channelId/:embed?': ['xyqfer', 'Fatpandac'], -}; diff --git a/lib/routes/youku/namespace.ts b/lib/routes/youku/namespace.ts new file mode 100644 index 000000000..92ff5cdaa --- /dev/null +++ b/lib/routes/youku/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '优酷', + url: 'i.youku.com', +}; diff --git a/lib/routes/youku/radar.ts b/lib/routes/youku/radar.ts deleted file mode 100644 index c78eb37f7..000000000 --- a/lib/routes/youku/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'youku.com': { - _name: '优酷', - i: [ - { - title: '订阅作者', - docs: 'https://docs.rsshub.app/routes/multimedia#you-ku', - source: ['/i/:id'], - target: '/youku/channel/:id', - }, - ], - }, -}; diff --git a/lib/routes/youku/router.ts b/lib/routes/youku/router.ts deleted file mode 100644 index a9848bcad..000000000 --- a/lib/routes/youku/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/channel/:channelId/:embed?', './channel'); -}; diff --git a/lib/routes/youtube/channel.ts b/lib/routes/youtube/channel.ts index 44dbadb78..0b7b67499 100644 --- a/lib/routes/youtube/channel.ts +++ b/lib/routes/youtube/channel.ts @@ -1,9 +1,35 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/channel/:id/:embed?', + categories: ['social-media'], + example: '/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ', + parameters: { id: 'YouTube channel id', embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.youtube.com/channel/:id'], + target: '/channel/:id', + }, + name: 'Channel', + maintainers: ['DIYgod'], + handler, + description: `:::tip +YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel\_id=UCDwDMPOZfxVV0x\_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ). +:::`, +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -18,7 +44,7 @@ export default async (ctx) => { const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; - ctx.set('data', { + return { title: `${data[0].snippet.channelTitle} - YouTube`, link: `https://www.youtube.com/channel/${id}`, description: `YouTube channel ${data[0].snippet.channelTitle}`, @@ -36,5 +62,5 @@ export default async (ctx) => { author: snippet.videoOwnerChannelTitle, }; }), - }); -}; + }; +} diff --git a/lib/routes/youtube/charts.ts b/lib/routes/youtube/charts.ts index 505e2006c..d09c143c2 100644 --- a/lib/routes/youtube/charts.ts +++ b/lib/routes/youtube/charts.ts @@ -1,9 +1,71 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { renderDescription } from './utils'; import { config } from '@/config'; -export default async (ctx) => { +export const route: Route = { + path: '/charts/:category?/:country?/:embed?', + categories: ['social-media'], + example: '/youtube/charts', + parameters: { category: 'Chart, see table below, default to `TopVideos`', country: 'Country Code, see table below, default to global', embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Music Charts', + maintainers: ['TonyRL'], + handler, + description: `Chart + + | Top artists | Top songs | Top music videos | Trending | + | ----------- | --------- | ---------------- | -------------- | + | TopArtists | TopSongs | TopVideos | TrendingVideos | + + Country Code + + | Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada | + | --------- | --------- | ------- | ------- | ------- | ------ | ------ | + | ar | au | at | be | bo | br | ca | + + | Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador | + | ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- | + | cl | co | cr | cz | dk | do | ec | + + | Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala | + | ----- | ----------- | ------- | ------- | ------ | ------- | --------- | + | eg | sv | ee | fi | fr | de | gt | + + | Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | + | -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- | + | hn | hu | is | in | id | ie | il | it | + + | Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua | + | ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- | + | jp | ke | lu | mx | nl | nz | ni | + + | Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania | + | ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- | + | ng | no | pa | py | pe | pl | pt | ro | + + | Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland | + | ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- | + | ru | sa | rs | za | kr | es | se | ch | + + | Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States | + | -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- | + | tz | tr | ug | ua | ae | gb | us | + + | Uruguay | Zimbabwe | + | ------- | -------- | + | uy | zw |`, +}; + +async function handler(ctx) { const contentMap = { TopArtists: { contentKey: 'artists', @@ -88,9 +150,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `YouTube Music Charts - ${contentMap[category].title}`, link: `https://charts.youtube.com/charts/${category}/${country ?? 'global'}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/youtube/community.ts b/lib/routes/youtube/community.ts index 58dffdf1c..be035f2b1 100644 --- a/lib/routes/youtube/community.ts +++ b/lib/routes/youtube/community.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,25 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { isYouTubeChannelId } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/community/:handle', + categories: ['social-media'], + example: '/youtube/community/@JFlaMusic', + parameters: { handle: 'YouTube handles or channel id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Community', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const handle = ctx.req.param('handle'); let urlPath = handle; @@ -50,10 +69,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${username} - Community - YouTube`, link: channelMetadata.channelUrl, description: channelMetadata.description, item: items, - }); -}; + }; +} diff --git a/lib/routes/youtube/custom.ts b/lib/routes/youtube/custom.ts index 54add5ecb..b2b8ab338 100644 --- a/lib/routes/youtube/custom.ts +++ b/lib/routes/youtube/custom.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; @@ -5,7 +6,18 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/c/:username/:embed?', + radar: { + source: ['www.youtube.com/c/:id'], + target: '/c/:id', + }, + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -24,7 +36,7 @@ export default async (ctx) => { const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; - ctx.set('data', { + return { title: `${username} - YouTube`, link: `https://www.youtube.com/c/${username}`, description: ytInitialData.metadata.channelMetadataRenderer.description, @@ -42,5 +54,5 @@ export default async (ctx) => { author: snippet.videoOwnerChannelTitle, }; }), - }); -}; + }; +} diff --git a/lib/routes/youtube/live.ts b/lib/routes/youtube/live.ts index 845a99993..e9d1e3ef4 100644 --- a/lib/routes/youtube/live.ts +++ b/lib/routes/youtube/live.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; @@ -5,7 +6,25 @@ import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/live/:username/:embed?', + categories: ['live'], + example: '/youtube/live/@GawrGura', + parameters: { username: 'YouTuber id', embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Live', + maintainers: ['sussurr127'], + handler, +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -29,7 +48,7 @@ export default async (ctx) => { const data = (await utils.getLive(channelId, cache)).data.items; - ctx.set('data', { + return { title: `${channelName || username}'s Live Status`, link: `https://www.youtube.com/channel/${channelId}`, description: `$${channelName || username}'s live streaming status`, @@ -46,5 +65,5 @@ export default async (ctx) => { }; }), allowEmpty: true, - }); -}; + }; +} diff --git a/lib/routes/youtube/maintainer.ts b/lib/routes/youtube/maintainer.ts deleted file mode 100644 index f3ae8b8db..000000000 --- a/lib/routes/youtube/maintainer.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - '/c/:id/:embed?': ['TonyRL'], - '/channel/:id/:embed?': ['DIYgod'], - '/charts/:category?/:country?/:embed?': ['TonyRL'], - '/community/:handle': ['TonyRL'], - '/live/:username/:embed?': ['sussurr127'], - '/playlist/:id/:embed?': ['HenryQW'], - '/subscriptions/:embed?': ['TonyRL'], - '/user/:username/:embed?': ['DIYgod'], -}; diff --git a/lib/routes/youtube/namespace.ts b/lib/routes/youtube/namespace.ts new file mode 100644 index 000000000..83dd26a0b --- /dev/null +++ b/lib/routes/youtube/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'YouTube Live', + url: 'charts.youtube.com', +}; diff --git a/lib/routes/youtube/playlist.ts b/lib/routes/youtube/playlist.ts index 808e05df8..e46f886c8 100644 --- a/lib/routes/youtube/playlist.ts +++ b/lib/routes/youtube/playlist.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/playlist/:id/:embed?', + categories: ['social-media'], + example: '/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z', + parameters: { id: 'YouTube playlist id', embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Playlist', + maintainers: ['HenryQW'], + handler, +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -14,7 +33,7 @@ export default async (ctx) => { const data = (await utils.getPlaylistItems(id, 'snippet', cache)).data.items.filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video'); - ctx.set('data', { + return { title: `${playlistTitle} by ${data[0].snippet.channelTitle} - YouTube`, link: `https://www.youtube.com/playlist?list=${id}`, description: `YouTube playlist ${playlistTitle} by ${data[0].snippet.channelTitle}`, @@ -30,5 +49,5 @@ export default async (ctx) => { author: snippet.videoOwnerChannelTitle, }; }), - }); -}; + }; +} diff --git a/lib/routes/youtube/radar.ts b/lib/routes/youtube/radar.ts deleted file mode 100644 index 00c7840e1..000000000 --- a/lib/routes/youtube/radar.ts +++ /dev/null @@ -1,63 +0,0 @@ -export default { - 'youtube.com': { - _name: 'YouTube', - charts: [ - { - title: '音乐排行榜', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: ['/charts/:category/:country/*', '/charts/:category/:country', '/charts/:category'], - target: (params) => `/youtube/charts/${params.category}${params.country ?? ''}`, - }, - ], - www: [ - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: '/user/:username', - target: '/youtube/user/:username', - }, - { - title: '用户', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: '/:handle', - target: (params) => (params.handle.startsWith('@') ? `/youtube/user/${params.handle}` : ''), - }, - { - title: '频道', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: '/channel/:id', - target: '/youtube/channel/:id', - }, - { - title: '自定义网址', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: '/c/:id', - target: '/youtube/c/:id', - }, - { - title: '社群', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: ['/channel/:handle/community', '/channel/:handle', '/:handle/community', '/:handle/featured', '/:handle'], - target: (params) => (params.handle.startsWith('@') || params.handle.startsWith('UC') ? `/youtube/community/${params.handle}` : ''), - }, - { - title: '播放列表', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: '/playlist', - target: (params, url) => `/youtube/playlist/${new URL(url).searchParams.get('list')}`, - }, - { - title: '订阅列表', - docs: 'https://docs.rsshub.app/routes/social-media#youtube', - source: ['/feed/subscriptions', '/feed/channels'], - target: '/youtube/subscriptions', - }, - { - title: 'Live', - docs: 'https://docs.rsshub.app/routes/live#youtube-live', - source: '/:handle', - target: (params) => (params.handle.startsWith('@') ? `/youtube/live/${params.handle}` : ''), - }, - ], - }, -}; diff --git a/lib/routes/youtube/router.ts b/lib/routes/youtube/router.ts deleted file mode 100644 index d30321658..000000000 --- a/lib/routes/youtube/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default (router) => { - router.get('/c/:username/:embed?', './custom'); - router.get('/channel/:id/:embed?', './channel'); - router.get('/charts/:category?/:country?/:embed?', './charts'); - router.get('/community/:handle', './community'); - router.get('/live/:username/:embed?', './live'); - router.get('/playlist/:id/:embed?', './playlist'); - router.get('/subscriptions/:embed?', './subscriptions'); - router.get('/user/:username/:embed?', './user'); -}; diff --git a/lib/routes/youtube/subscriptions.ts b/lib/routes/youtube/subscriptions.ts index 992c4d194..2f5632198 100644 --- a/lib/routes/youtube/subscriptions.ts +++ b/lib/routes/youtube/subscriptions.ts @@ -1,10 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { config } from '@/config'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; import asyncPool from 'tiny-async-pool'; -export default async (ctx) => { +export const route: Route = { + path: '/subscriptions/:embed?', + categories: ['social-media'], + example: '/youtube/subscriptions', + parameters: { embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.youtube.com/feed/subscriptions', 'www.youtube.com/feed/channels'], + target: '/subscriptions', + }, + name: 'Subscriptions', + maintainers: ['TonyRL'], + handler, + url: 'www.youtube.com/feed/subscriptions', +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key || !config.youtube.clientId || !config.youtube.clientSecret || !config.youtube.refreshToken) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -41,11 +65,11 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: 'Subscriptions - YouTube', description: 'YouTube Subscriptions', item: items, - }); + }; ctx.set('json', { title: 'Subscriptions - YouTube', @@ -54,4 +78,4 @@ export default async (ctx) => { playlistIds, item: items, }); -}; +} diff --git a/lib/routes/youtube/user.ts b/lib/routes/youtube/user.ts index 830a60e53..9d1cf2d83 100644 --- a/lib/routes/youtube/user.ts +++ b/lib/routes/youtube/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:username/:embed?', + categories: ['social-media'], + example: '/youtube/user/JFlaMusic', + parameters: { username: 'YouTuber id', embed: 'Default to embed the video, set to any value to disable embedding' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.youtube.com/user/:username'], + target: '/user/:username', + }, + name: 'User', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { if (!config.youtube || !config.youtube.key) { throw new Error('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>'); } @@ -26,7 +49,7 @@ export default async (ctx) => { const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; - ctx.set('data', { + return { title: `${channelName || username} - YouTube`, link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`, description: `YouTube user ${username}`, @@ -44,5 +67,5 @@ export default async (ctx) => { author: snippet.videoOwnerChannelTitle, }; }), - }); -}; + }; +} diff --git a/lib/routes/youzhiyouxing/maintainer.ts b/lib/routes/youzhiyouxing/maintainer.ts deleted file mode 100644 index 611b2e1b5..000000000 --- a/lib/routes/youzhiyouxing/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/materials/:id?': ['broven', 'Fatpandac', 'nczitzk'], -}; diff --git a/lib/routes/youzhiyouxing/materials.ts b/lib/routes/youzhiyouxing/materials.ts index d7aa18427..a7d12a5c8 100644 --- a/lib/routes/youzhiyouxing/materials.ts +++ b/lib/routes/youzhiyouxing/materials.ts @@ -1,9 +1,36 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/materials/:id?', + categories: ['finance'], + example: '/youzhiyouxing/materials', + parameters: { id: '分类,见下表,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['youzhiyouxing.cn/materials'], + target: '/materials', + }, + name: '有知文章', + maintainers: ['broven', 'Fatpandac', 'nczitzk'], + handler, + url: 'youzhiyouxing.cn/materials', + description: `| 全部 | 知行小酒馆 | 知行黑板报 | 无人知晓 | 孟岩专栏 | 知行读书会 | 你好,同路人 | + | :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: | + | 0 | 4 | 2 | 10 | 1 | 3 | 11 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? ''; const rootUrl = 'https://youzhiyouxing.cn'; @@ -49,9 +76,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `有知有行 - ${$(`a[phx-value-column_id="${id === '' ? 0 : id}"]`).text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/youzhiyouxing/namespace.ts b/lib/routes/youzhiyouxing/namespace.ts new file mode 100644 index 000000000..2f957a47e --- /dev/null +++ b/lib/routes/youzhiyouxing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '有知有行', + url: 'youzhiyouxing.cn', +}; diff --git a/lib/routes/youzhiyouxing/radar.ts b/lib/routes/youzhiyouxing/radar.ts deleted file mode 100644 index 3fb85fc75..000000000 --- a/lib/routes/youzhiyouxing/radar.ts +++ /dev/null @@ -1,73 +0,0 @@ -export default { - 'youzhiyouxing.cn': { - _name: '有知有行', - '.': [ - { - title: '有知 - 全部', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: '/youzhiyouxing/materials', - }, - { - title: '有知 - 知行小酒馆', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '4') { - return '/youzhiyouxing/materials/4'; - } - }, - }, - { - title: '有知 - 知行黑板报', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '2') { - return '/youzhiyouxing/materials/2'; - } - }, - }, - { - title: '有知 - 无人知晓', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '10') { - return '/youzhiyouxing/materials/10'; - } - }, - }, - { - title: '有知 - 孟岩专栏', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '1') { - return '/youzhiyouxing/materials/1'; - } - }, - }, - { - title: '有知 - 知行读书会', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '3') { - return '/youzhiyouxing/materials/3'; - } - }, - }, - { - title: '有知 - 你好,同路人', - docs: 'https://docs.rsshub.app/routes/finance#you-you-wei-zhi-zhi-you-you-wei-xing-hang-xing-hang-heng-you-you-wei-zhi-zhi-wen-zhang-zhang', - source: ['/materials'], - target: (_params, url) => { - if (new URL(url).searchParams.get('column_id') === '11') { - return '/youzhiyouxing/materials/11'; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/youzhiyouxing/router.ts b/lib/routes/youzhiyouxing/router.ts deleted file mode 100644 index bf8cc03fb..000000000 --- a/lib/routes/youzhiyouxing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/materials/:id?', './materials'); -}; diff --git a/lib/routes/yuque/book.ts b/lib/routes/yuque/book.ts index 2407f8f1e..918cbbb52 100644 --- a/lib/routes/yuque/book.ts +++ b/lib/routes/yuque/book.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +9,31 @@ import { CookieJar } from 'tough-cookie'; const APP_DATA_REGEX = /window\.appData = JSON\.parse\(decodeURIComponent\("(.+?)"\)\);/; const baseUrl = 'https://www.yuque.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:name/:book', + categories: ['study'], + example: '/yuque/ruanyf/weekly', + parameters: { name: '用戶名', book: '知识库 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yuque.com/:name/:book'], + }, + name: '知识库', + maintainers: ['aha2mao', 'ltaoo'], + handler, + description: `| Node.js 专栏 | 阮一峰每周分享 | 语雀使用手册 | + | -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | + | [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) |`, +}; + +async function handler(ctx) { const cookieJar = new CookieJar(); const { name, book } = ctx.req.param(); const bookUrl = `${baseUrl}/${name}/${book}`; @@ -89,11 +114,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: appData.book.name, description: appData.book.description, image: appData.group.avatar, link: bookUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yuque/maintainer.ts b/lib/routes/yuque/maintainer.ts deleted file mode 100644 index c4e52989d..000000000 --- a/lib/routes/yuque/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:name/:book': ['aha2mao', 'ltaoo'], -}; diff --git a/lib/routes/yuque/namespace.ts b/lib/routes/yuque/namespace.ts new file mode 100644 index 000000000..ae395404b --- /dev/null +++ b/lib/routes/yuque/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '语雀', + url: 'yuque.com', +}; diff --git a/lib/routes/yuque/radar.ts b/lib/routes/yuque/radar.ts deleted file mode 100644 index 0cf1958e0..000000000 --- a/lib/routes/yuque/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'yuque.com': { - _name: '语雀', - '.': [ - { - title: '知识库', - docs: 'https://docs.rsshub.app/routes/study#yu-que', - source: [':name/:book'], - target: '/yuque/:name/:book', - }, - ], - }, -}; diff --git a/lib/routes/yuque/router.ts b/lib/routes/yuque/router.ts deleted file mode 100644 index b91e721c3..000000000 --- a/lib/routes/yuque/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:name/:book', './book'); -}; diff --git a/lib/routes/yxdown/maintainer.ts b/lib/routes/yxdown/maintainer.ts deleted file mode 100644 index e5462ee94..000000000 --- a/lib/routes/yxdown/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/news/:category?': ['nczitzk'], - '/recommend': ['nczitzk'], -}; diff --git a/lib/routes/yxdown/namespace.ts b/lib/routes/yxdown/namespace.ts new file mode 100644 index 000000000..4dec1c81b --- /dev/null +++ b/lib/routes/yxdown/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游讯网', + url: 'yxdown.com', +}; diff --git a/lib/routes/yxdown/news.ts b/lib/routes/yxdown/news.ts index 39e3dae43..20f34bee0 100644 --- a/lib/routes/yxdown/news.ts +++ b/lib/routes/yxdown/news.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,28 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl, getCookie } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/news/:category?', + categories: ['game'], + example: '/yxdown/news', + parameters: { category: '分类,见下表,默认为资讯首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '资讯', + maintainers: ['nczitzk'], + handler, + description: `| 资讯首页 | 业界动态 | 视频预告 | 新作发布 | 游戏资讯 | 游戏评测 | 网络游戏 | 手机游戏 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ? `${ctx.req.param('category')}/` : ''; const currentUrl = `${rootUrl}/news/${category}`; @@ -50,9 +72,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('.now').text()} - 游讯网`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yxdown/radar.ts b/lib/routes/yxdown/radar.ts deleted file mode 100644 index b23c93986..000000000 --- a/lib/routes/yxdown/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'yxdown.com': { - _name: '游讯网', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/game#you-xun-wang', - source: ['/news/:category', '/news'], - target: (params) => `/yxdown/news${params.category ? `/${params.category}` : ''}`, - }, - { - title: '精彩推荐', - docs: 'https://docs.rsshub.app/routes/game#you-xun-wang', - source: ['/'], - target: '/yxdown/recommend', - }, - ], - }, -}; diff --git a/lib/routes/yxdown/recommend.ts b/lib/routes/yxdown/recommend.ts index f8a1906d7..d13ad401a 100644 --- a/lib/routes/yxdown/recommend.ts +++ b/lib/routes/yxdown/recommend.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { rootUrl, getCookie } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/recommend', + categories: ['game'], + example: '/yxdown/recommend', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yxdown.com/'], + }, + name: '精彩推荐', + maintainers: ['nczitzk'], + handler, + url: 'yxdown.com/', +}; + +async function handler() { const currentUrl = `${rootUrl}/news/`; const cookie = await getCookie(); const response = await got(currentUrl, { @@ -47,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '精彩推荐 - 游讯网', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/yxdown/router.ts b/lib/routes/yxdown/router.ts deleted file mode 100644 index 506a52daa..000000000 --- a/lib/routes/yxdown/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/news/:category?', './news'); - router.get('/recommend', './recommend'); -}; diff --git a/lib/routes/yxdzqb/index.ts b/lib/routes/yxdzqb/index.ts index e86fceb24..bf6fb7c13 100644 --- a/lib/routes/yxdzqb/index.ts +++ b/lib/routes/yxdzqb/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,7 +17,32 @@ const map = { low_chinese: 'index_low_cn.html', }; -export default async (ctx) => { +export const route: Route = { + path: '/:type', + categories: ['game'], + example: '/yxdzqb/popular_cn', + parameters: { type: '折扣类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yxdzqb.com/'], + }, + name: '游戏折扣', + maintainers: ['LogicJake', 'nczitzk'], + handler, + url: 'yxdzqb.com/', + description: `| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 | + | -------------- | ------------------ | ---------------------- | -------------- | ---------------------- | + | discount | popular | popular\_cn | low | low\_cn |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const link = `${host}/${Object.hasOwn(map, type) ? map[type] : `index_${type}.html`}`; @@ -48,9 +74,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: `${title}-游戏打折情报`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/yxdzqb/maintainer.ts b/lib/routes/yxdzqb/maintainer.ts deleted file mode 100644 index 89e370bd9..000000000 --- a/lib/routes/yxdzqb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type': ['LogicJake', 'nczitzk'], -}; diff --git a/lib/routes/yxdzqb/namespace.ts b/lib/routes/yxdzqb/namespace.ts new file mode 100644 index 000000000..ec539b1f2 --- /dev/null +++ b/lib/routes/yxdzqb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游戏打折情报', + url: 'yxdzqb.com', +}; diff --git a/lib/routes/yxdzqb/radar.ts b/lib/routes/yxdzqb/radar.ts deleted file mode 100644 index f4f87b17a..000000000 --- a/lib/routes/yxdzqb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'yxdzqb.com': { - _name: '游戏打折情报', - '.': [ - { - title: '游戏折扣', - docs: 'https://docs.rsshub.app/routes/game#you-xi-da-zhe-qing-bao-you-xi-zhe-kou', - source: '/', - target: '/yxdzqb/:type', - }, - ], - }, -}; diff --git a/lib/routes/yxdzqb/router.ts b/lib/routes/yxdzqb/router.ts deleted file mode 100644 index e5d24c7d9..000000000 --- a/lib/routes/yxdzqb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type', './index'); -}; diff --git a/lib/routes/yxrb/home.ts b/lib/routes/yxrb/home.ts index 4f714f297..5d5552b89 100644 --- a/lib/routes/yxrb/home.ts +++ b/lib/routes/yxrb/home.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,32 @@ import timezone from '@/utils/timezone'; const baseUrl = 'http://news.yxrb.net'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['game'], + example: '/yxrb/info', + parameters: { category: '分类,见下表,预设为 `info`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.yxrb.net/:category', 'news.yxrb.net/'], + target: '/:category', + }, + name: '分类', + maintainers: ['TonyRL'], + handler, + description: `| 资讯 | 访谈 | 服务 | 游理游据 | + | ---- | ------- | ------- | -------- | + | info | talking | service | comments |`, +}; + +async function handler(ctx) { const { category = 'info' } = ctx.req.param(); const link = `${baseUrl}/${category}/`; const response = await got(link); @@ -52,11 +78,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('head title').text(), description: $('head meta[name=description]').attr('content'), link, image: $('.channel-img img').attr('src'), item: items, - }); -}; + }; +} diff --git a/lib/routes/yxrb/maintainer.ts b/lib/routes/yxrb/maintainer.ts deleted file mode 100644 index ec1775d78..000000000 --- a/lib/routes/yxrb/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category?': ['TonyRL'], -}; diff --git a/lib/routes/yxrb/namespace.ts b/lib/routes/yxrb/namespace.ts new file mode 100644 index 000000000..144793e97 --- /dev/null +++ b/lib/routes/yxrb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游戏日报', + url: 'news.yxrb.net', +}; diff --git a/lib/routes/yxrb/radar.ts b/lib/routes/yxrb/radar.ts deleted file mode 100644 index 480fe17cb..000000000 --- a/lib/routes/yxrb/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'yxrb.net': { - _name: '游戏日报', - news: [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/game#you-xi-ri-bao', - source: ['/:category', '/'], - target: '/yxrb/:category', - }, - ], - }, -}; diff --git a/lib/routes/yxrb/router.ts b/lib/routes/yxrb/router.ts deleted file mode 100644 index 4f0c310e0..000000000 --- a/lib/routes/yxrb/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category?', './home'); -}; diff --git a/lib/routes/yyets/article.ts b/lib/routes/yyets/article.ts index 563ba9ee9..aa23e9e01 100644 --- a/lib/routes/yyets/article.ts +++ b/lib/routes/yyets/article.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +7,28 @@ import timezone from '@/utils/timezone'; const baseURL = 'https://yysub.net'; -export default async (ctx) => { +export const route: Route = { + path: '/article/:type?', + categories: ['multimedia'], + example: '/yyets/article', + parameters: { type: '[' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '影视资讯', + maintainers: ['wb121017405'], + handler, + description: `| 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 | + | ---- | -------- | -------- | --------- | --------- | ----------- | -------- | + | | news | report | m\_review | t\_review | new\_review | recom |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? ''; const url = `${baseURL}/article${type ? '?type=' + type : ''}`; @@ -37,10 +59,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${$('title').text()} - 人人影视`, description: $('meta[name="description"]').attr('content'), link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/yyets/maintainer.ts b/lib/routes/yyets/maintainer.ts deleted file mode 100644 index c0cb02b6b..000000000 --- a/lib/routes/yyets/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/article/:type?': ['wb121017405'], - '/today': ['bao1991213'], -}; diff --git a/lib/routes/yyets/namespace.ts b/lib/routes/yyets/namespace.ts new file mode 100644 index 000000000..854e9fade --- /dev/null +++ b/lib/routes/yyets/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '人人影视', + url: 'yysub.net', +}; diff --git a/lib/routes/yyets/radar.ts b/lib/routes/yyets/radar.ts deleted file mode 100644 index e19193256..000000000 --- a/lib/routes/yyets/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'yysub.net': { - _name: '人人影视', - '.': [ - { - title: '影视资讯', - docs: 'https://docs.rsshub.app/routes/multimedia#ren-ren-ying-shi', - source: '/article', - target: (_params, url) => `/yyets/article${new URL(url).searchParams.has('type') ? '/' + new URL(url).searchParams.get('type') : ''}`, - }, - { - title: '今日播出', - docs: 'https://docs.rsshub.app/routes/multimedia#ren-ren-ying-shi', - source: ['/tv/schedule', '/'], - target: '/yyets/today', - }, - ], - }, -}; diff --git a/lib/routes/yyets/router.ts b/lib/routes/yyets/router.ts deleted file mode 100644 index 545ffb72f..000000000 --- a/lib/routes/yyets/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/article/:type?', './article'); - router.get('/today', './today'); -}; diff --git a/lib/routes/yyets/today.ts b/lib/routes/yyets/today.ts index b9806042f..73f57e3f3 100644 --- a/lib/routes/yyets/today.ts +++ b/lib/routes/yyets/today.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/today', + categories: ['multimedia'], + example: '/yyets/today', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yysub.net/tv/schedule', 'yysub.net/'], + }, + name: '今日播出', + maintainers: ['bao1991213'], + handler, + url: 'yysub.net/tv/schedule', +}; + +async function handler() { // 发起 HTTP GET 请求 const response = await got({ method: 'get', @@ -18,7 +41,7 @@ export default async (ctx) => { // 注:cheerio 选择器与 jquery 选择器几乎相同 // 参考 cheerio 文档:https://cheerio.js.org/ - ctx.set('data', { + return { title: '人人影视-今日播出', link: 'https://yysub.net', item: @@ -33,5 +56,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/yystv/category.ts b/lib/routes/yystv/category.ts index 13383b97e..0bfafa045 100644 --- a/lib/routes/yystv/category.ts +++ b/lib/routes/yystv/category.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/category/:category', + categories: ['game'], + example: '/yystv/category/recommend', + parameters: { category: '专栏类型' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '游研社 - 分类文章', + maintainers: ['LightStrawberry'], + handler, + description: `| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | + | --------- | ------- | ------ | ------- | ---- | -------- | + | recommend | history | big | culture | news | retro |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const url = `https://www.yystv.cn/b/${category}`; const response = await got({ @@ -56,11 +78,9 @@ export default async (ctx) => { }) ); } - await getDescription(items).then(() => { - ctx.set('data', { - title: '游研社-' + $('title').text(), - link: `https://www.yystv.cn/b/${category}`, - item: items, - }); - }); -}; + await getDescription(items).then(() => ({ + title: '游研社-' + $('title').text(), + link: `https://www.yystv.cn/b/${category}`, + item: items, + })); +} diff --git a/lib/routes/yystv/docs.ts b/lib/routes/yystv/docs.ts index 8d424d11c..e8d346fee 100644 --- a/lib/routes/yystv/docs.ts +++ b/lib/routes/yystv/docs.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/docs', + categories: ['game'], + example: '/yystv/docs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['yystv.cn/docs'], + }, + name: '游研社 - 全部文章', + maintainers: ['HaitianLiu'], + handler, + url: 'yystv.cn/docs', +}; + +async function handler() { const url = `https://www.yystv.cn/docs`; const response = await got({ method: 'get', @@ -26,9 +49,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '游研社-' + $('title').text(), link: `https://www.yystv.cn/docs`, item: items, - }); -}; + }; +} diff --git a/lib/routes/yystv/maintainer.ts b/lib/routes/yystv/maintainer.ts deleted file mode 100644 index 9097bbf68..000000000 --- a/lib/routes/yystv/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/category/:category': ['LightStrawberry'], - '/docs': ['HaitianLiu'], -}; diff --git a/lib/routes/yystv/namespace.ts b/lib/routes/yystv/namespace.ts new file mode 100644 index 000000000..d9dd87dee --- /dev/null +++ b/lib/routes/yystv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游研社', + url: 'yystv.cn', +}; diff --git a/lib/routes/yystv/radar.ts b/lib/routes/yystv/radar.ts deleted file mode 100644 index 6e2e73484..000000000 --- a/lib/routes/yystv/radar.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default { - 'yystv.cn': { - _name: '游研社', - '.': [ - { - title: '推游', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/recommend', - target: '/yystv/category/recommend', - }, - { - title: '游戏史', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/history', - target: '/yystv/category/history', - }, - { - title: '大事件', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/big', - target: '/yystv/category/big', - }, - { - title: '文化', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/culture', - target: '/yystv/category/culture', - }, - { - title: '趣闻', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/news', - target: '/yystv/category/news', - }, - { - title: '经典回顾', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/b/retro', - target: '/yystv/category/retro', - }, - { - title: '全部文章', - docs: 'https://docs.rsshub.app/routes/game#you-yan-she', - source: '/docs', - target: '/yystv/docs', - }, - ], - }, -}; diff --git a/lib/routes/yystv/router.ts b/lib/routes/yystv/router.ts deleted file mode 100644 index 51e6bf079..000000000 --- a/lib/routes/yystv/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/category/:category', './category'); - router.get('/docs', './docs'); -}; diff --git a/lib/routes/zagg/maintainer.ts b/lib/routes/zagg/maintainer.ts deleted file mode 100644 index 574021944..000000000 --- a/lib/routes/zagg/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/new-arrivals/:query?': ['EthanWng97'], -}; diff --git a/lib/routes/zagg/namespace.ts b/lib/routes/zagg/namespace.ts new file mode 100644 index 000000000..e1cd7691d --- /dev/null +++ b/lib/routes/zagg/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Zagg', + url: 'zagg.com', +}; diff --git a/lib/routes/zagg/new-arrivals.ts b/lib/routes/zagg/new-arrivals.ts index cf0df7822..946a88172 100644 --- a/lib/routes/zagg/new-arrivals.ts +++ b/lib/routes/zagg/new-arrivals.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,26 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import { load } from 'cheerio'; const host = 'https://www.zagg.com/en_us'; -export default async (ctx) => { +export const route: Route = { + path: '/new-arrivals/:query?', + categories: ['shopping'], + example: '/zagg/new-arrivals/brand=164&cat=3038,3041', + parameters: { query: 'query, search page querystring' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'New Arrivals', + maintainers: ['EthanWng97'], + handler, + description: `For instance, in \`https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3041\`, the query is \`brand=164&cat=3038%2C3041\``, +}; + +async function handler(ctx) { const query = ctx.req.param('query'); const params = new URLSearchParams(query); const brands = params.get('brand'); @@ -42,7 +62,7 @@ export default async (ctx) => { return data; }) .get(); - ctx.set('data', { + return { title: 'Zagg - New Arrivals', link: response.url, description: 'Zagg - New Arrivals', @@ -51,5 +71,5 @@ export default async (ctx) => { description: item.description, link: item.link, })), - }); -}; + }; +} diff --git a/lib/routes/zagg/radar.ts b/lib/routes/zagg/radar.ts deleted file mode 100644 index d29b31d11..000000000 --- a/lib/routes/zagg/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'zagg.com': { - _name: 'New Arrivals', - '.': [ - { - title: 'Zagg - New Arrivals', - docs: 'https://docs.rsshub.app/routes/shopping#zagg', - source: ['/en_us/new-arrivals'], - target: (_, url) => { - const queryString = url.split('?')[1]; - return `/zagg/new-arrivals/${queryString}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/zagg/router.ts b/lib/routes/zagg/router.ts deleted file mode 100644 index 85f4d41f3..000000000 --- a/lib/routes/zagg/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/new-arrivals/:query?', './new-arrivals'); -}; diff --git a/lib/routes/zaker/index.ts b/lib/routes/zaker/index.ts index 8c8502b2a..8c4078b6c 100644 --- a/lib/routes/zaker/index.ts +++ b/lib/routes/zaker/index.ts @@ -1,10 +1,22 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/:type/:id?', + radar: { + source: ['myzaker.com/:type/:id'], + target: '/:type/:id', + }, + name: 'Unknown', + maintainers: ['LogicJake', 'kt286', 'AlexdanerZe', 'TonyRL'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'channel'; const id = ctx.req.param('id') ?? 1; const rootUrl = 'http://www.myzaker.com'; @@ -58,9 +70,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: type === 'focusread' ? 'ZAKER 精读新闻' : feedTitle, link, item: items.filter((t) => t.description !== '原文已被删除'), - }); -}; + }; +} diff --git a/lib/routes/zaker/maintainer.ts b/lib/routes/zaker/maintainer.ts deleted file mode 100644 index c4af286a5..000000000 --- a/lib/routes/zaker/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type/:id?': ['LogicJake', 'kt286', 'AlexdanerZe', 'TonyRL'], -}; diff --git a/lib/routes/zaker/namespace.ts b/lib/routes/zaker/namespace.ts new file mode 100644 index 000000000..1039159e7 --- /dev/null +++ b/lib/routes/zaker/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ZAKER', + url: 'myzaker.com', +}; diff --git a/lib/routes/zaker/radar.ts b/lib/routes/zaker/radar.ts deleted file mode 100644 index 54f5ad8a5..000000000 --- a/lib/routes/zaker/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'myzaker.com': { - _name: 'ZAKER', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#zaker', - source: ['/:type/:id'], - target: '/zaker/:type/:id', - }, - { - title: '精读', - docs: 'https://docs.rsshub.app/routes/new-media#zaker', - source: ['/'], - target: '/zaker/focusread', - }, - ], - }, -}; diff --git a/lib/routes/zaker/router.ts b/lib/routes/zaker/router.ts deleted file mode 100644 index f1f031a95..000000000 --- a/lib/routes/zaker/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type/:id?', './index'); -}; diff --git a/lib/routes/zaobao/index.ts b/lib/routes/zaobao/index.ts index 859cbf0f1..e7a7bc6d6 100644 --- a/lib/routes/zaobao/index.ts +++ b/lib/routes/zaobao/index.ts @@ -1,17 +1,37 @@ +import { Route } from '@/types'; import { parseList } from './util'; const baseUrl = 'https://www.zaobao.com'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?/:section?', + categories: ['traditional-media'], + example: '/zaobao/lifestyle/health', + parameters: { type: 'https://www.zaobao.com/**lifestyle**/health 中的 **lifestyle**', section: 'https://www.zaobao.com/lifestyle/**health** 中的 **health**' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '其他栏目', + maintainers: ['shunf4'], + handler, + description: `除了上面两个兼容规则之外,联合早报网站里所有页面形如 [https://www.zaobao.com/lifestyle/health](https://www.zaobao.com/lifestyle/health) 这样的栏目都能被这个规则解析到,早报的大部分栏目都是这个样式的。你可以测试之后再订阅。`, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'realtime'; const section = ctx.req.param('section') ?? 'china'; const sectionLink = `/${type}/${section}`; const { title, resultList } = await parseList(ctx, sectionLink); - ctx.set('data', { + return { title: `《联合早报》${title}`, link: baseUrl + sectionLink, description: '新加坡、中国、亚洲和国际的即时、评论、商业、体育、生活、科技与多媒体新闻,尽在联合早报。', item: resultList, - }); -}; + }; +} diff --git a/lib/routes/zaobao/interactive.ts b/lib/routes/zaobao/interactive.ts index 0511764ff..2cc01cd62 100644 --- a/lib/routes/zaobao/interactive.ts +++ b/lib/routes/zaobao/interactive.ts @@ -1,15 +1,34 @@ +import { Route } from '@/types'; import { parseList } from './util'; const baseUrl = 'https://www.zaobao.com'; -export default async (ctx) => { +export const route: Route = { + path: '/interactive-graphics', + categories: ['traditional-media'], + example: '/zaobao/interactive-graphics', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '互动新闻', + maintainers: ['shunf4'], + handler, +}; + +async function handler(ctx) { const sectionLink = `/interactive-graphics`; const { resultList } = await parseList(ctx, sectionLink); - ctx.set('data', { + return { title: `《联合早报》互动新闻`, link: baseUrl + sectionLink, description: '新加坡、中国、亚洲和国际的即时、评论、商业、体育、生活、科技与多媒体新闻,尽在联合早报。', item: resultList, - }); -}; + }; +} diff --git a/lib/routes/zaobao/maintainer.ts b/lib/routes/zaobao/maintainer.ts deleted file mode 100644 index f3761a30a..000000000 --- a/lib/routes/zaobao/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/interactive-graphics': ['shunf4'], - '/realtime/:section?': ['shunf4'], - '/znews/:section?': ['shunf4'], - '/:type?/:section?': ['shunf4'], -}; diff --git a/lib/routes/zaobao/namespace.ts b/lib/routes/zaobao/namespace.ts new file mode 100644 index 000000000..15e9a0e18 --- /dev/null +++ b/lib/routes/zaobao/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '联合早报', + url: 'www.zaobao.com', + description: `:::warning +由于 [RSSHub#10309](https://github.com/DIYgod/RSSHub/issues/10309) 中的问题,使用靠近香港的服务器部署将从 hk 版联合早报爬取内容,造成输出的新闻段落顺序错乱。如有订阅此源的需求,建议寻求部署在远离香港的服务器上的 RSSHub,或者在自建时选择远离香港的服务器。 +:::`, +}; diff --git a/lib/routes/zaobao/radar.ts b/lib/routes/zaobao/radar.ts deleted file mode 100644 index 595292175..000000000 --- a/lib/routes/zaobao/radar.ts +++ /dev/null @@ -1,28 +0,0 @@ -const radarConfig = { - _name: '联合早报', - www: [ - { - title: '新闻-新加坡', - docs: 'https://docs.rsshub.app/routes/traditional-media#lian-he-zao-bao-xin-wen', - source: ['/', '/news', '/news/singapore'], - target: '/zaobao/znews/singapore', - }, - { - title: '新闻-中国', - docs: 'https://docs.rsshub.app/routes/traditional-media#lian-he-zao-bao-xin-wen', - source: ['/', '/news', '/news/china'], - target: '/zaobao/znews/china', - }, - { - title: '新闻-国际', - docs: 'https://docs.rsshub.app/routes/traditional-media#lian-he-zao-bao-xin-wen', - source: ['/', '/news', '/news/world'], - target: '/zaobao/znews/world', - }, - ], -}; - -export default { - 'zaobao.com': radarConfig, - 'zaobao.com.sg': radarConfig, -}; diff --git a/lib/routes/zaobao/realtime.ts b/lib/routes/zaobao/realtime.ts index 072d62154..2402f4087 100644 --- a/lib/routes/zaobao/realtime.ts +++ b/lib/routes/zaobao/realtime.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import { parseList } from './util'; const baseUrl = 'https://www.zaobao.com'; -export default async (ctx) => { +export const route: Route = { + path: '/realtime/:section?', + categories: ['traditional-media'], + example: '/zaobao/realtime/china', + parameters: { section: '分类,缺省为 china' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '即时新闻', + maintainers: ['shunf4'], + handler, + description: `| 中国 | 新加坡 | 国际 | 财经 | + | ----- | --------- | ----- | -------- | + | china | singapore | world | zfinance |`, +}; + +async function handler(ctx) { const section = ctx.req.param('section') ?? 'china'; let name; @@ -36,10 +58,10 @@ export default async (ctx) => { const { resultList } = await parseList(ctx, sectionLink); - ctx.set('data', { + return { title: `《联合早报》-${name}-即时`, link: baseUrl + sectionLink, description: '新加坡、中国、亚洲和国际的即时、评论、商业、体育、生活、科技与多媒体新闻,尽在联合早报。', item: resultList, - }); -}; + }; +} diff --git a/lib/routes/zaobao/router.ts b/lib/routes/zaobao/router.ts deleted file mode 100644 index 1a80c3dfe..000000000 --- a/lib/routes/zaobao/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/interactive-graphics', './interactive'); - router.get('/realtime/:section?', './realtime'); - router.get('/znews/:section?', './znews'); - router.get('/:type?/:section?', './index'); -}; diff --git a/lib/routes/zaobao/znews.ts b/lib/routes/zaobao/znews.ts index ef05c4726..71492e4a7 100644 --- a/lib/routes/zaobao/znews.ts +++ b/lib/routes/zaobao/znews.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import { parseList } from './util'; const baseUrl = 'https://www.zaobao.com'; -export default async (ctx) => { +export const route: Route = { + path: '/znews/:section?', + categories: ['traditional-media'], + example: '/zaobao/znews/china', + parameters: { section: '分类,缺省为 china' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新闻', + maintainers: ['shunf4'], + handler, + description: `| 中国 | 新加坡 | 东南亚 | 国际 | 体育 | + | ----- | --------- | ------ | ----- | ------ | + | china | singapore | sea | world | sports |`, +}; + +async function handler(ctx) { const section = ctx.req.param('section'); let info; @@ -40,10 +62,10 @@ export default async (ctx) => { const { resultList } = await parseList(ctx, sectionLink); - ctx.set('data', { + return { title: `《联合早报》-${info}-新闻`, link: baseUrl + sectionLink, description: '新加坡、中国、亚洲和国际的即时、评论、商业、体育、生活、科技与多媒体新闻,尽在联合早报。', item: resultList, - }); -}; + }; +} diff --git a/lib/routes/zaozao/article.ts b/lib/routes/zaozao/article.ts index 880a5e561..ea29e867c 100644 --- a/lib/routes/zaozao/article.ts +++ b/lib/routes/zaozao/article.ts @@ -1,7 +1,33 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/article/:type?', + categories: ['programming'], + example: '/zaozao/article/quality', + parameters: { type: '文章分类' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zaozao.run/article/:type'], + target: '/article/:type', + }, + name: '文章', + maintainers: ['shaomingbo'], + handler, + description: `| 精品推荐 | 技术干货 | 职场成长 | 社区动态 | 组件物料 | 行业动态 | + | --------- | -------- | -------- | --------- | -------- | -------- | + | recommend | quality | growth | community | material | industry |`, +}; + +async function handler(ctx) { const { type = 'recommend' } = ctx.req.param(); const response = await got({ method: 'put', @@ -22,7 +48,7 @@ export default async (ctx) => { const { data } = response.data; - ctx.set('data', { + return { title: `前端早早聊 - 文章`, link: `https://www.zaozao.run/article/${type}`, description: `前端早早聊 - 文章`, @@ -32,5 +58,5 @@ export default async (ctx) => { author: item.recommenderName, pubDate: parseDate(item.updateAt), })), - }); -}; + }; +} diff --git a/lib/routes/zaozao/maintainer.ts b/lib/routes/zaozao/maintainer.ts deleted file mode 100644 index 27dee26aa..000000000 --- a/lib/routes/zaozao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/article/:type?': ['shaomingbo'], -}; diff --git a/lib/routes/zaozao/namespace.ts b/lib/routes/zaozao/namespace.ts new file mode 100644 index 000000000..e48ed3bbc --- /dev/null +++ b/lib/routes/zaozao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '前端早早聊', + url: 'www.zaozao.run', +}; diff --git a/lib/routes/zaozao/radar.ts b/lib/routes/zaozao/radar.ts deleted file mode 100644 index bfd81af4a..000000000 --- a/lib/routes/zaozao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zaozao.run': { - _name: '前端早早聊', - www: [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/programming#qian-duan-zao-zao-liao', - source: ['/article/:type'], - target: '/zaozao/article/:type', - }, - ], - }, -}; diff --git a/lib/routes/zaozao/router.ts b/lib/routes/zaozao/router.ts deleted file mode 100644 index e83c0c1c5..000000000 --- a/lib/routes/zaozao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/article/:type?', './article'); -}; diff --git a/lib/routes/zcmu/jwc/index.ts b/lib/routes/zcmu/jwc/index.ts index bd1620e4e..160b28d35 100644 --- a/lib/routes/zcmu/jwc/index.ts +++ b/lib/routes/zcmu/jwc/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -13,7 +14,28 @@ const map = new Map([ [5, { title: '教务处 -- 排课管理', id: 'jwgl/pkgl' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/jwc/:type?', + categories: ['university'], + example: '/zcmu/jwc/1', + parameters: { type: '通知模块id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['CCraftY'], + handler, + description: `| 教务管理 | 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 0 | 1 | 2 | 3 | 4 | 5 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const id = map.get(type).id; const res = await got({ @@ -33,9 +55,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: map.get(type).title, link: `${host}${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zcmu/maintainer.ts b/lib/routes/zcmu/maintainer.ts deleted file mode 100644 index 412decbd9..000000000 --- a/lib/routes/zcmu/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/jwc/:type?': ['CCraftY'], - '/yxy/:type?': ['CCraftY'], -}; diff --git a/lib/routes/zcmu/namespace.ts b/lib/routes/zcmu/namespace.ts new file mode 100644 index 000000000..c6227eb73 --- /dev/null +++ b/lib/routes/zcmu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浙江中医药大学', + url: 'jwc.zcmu.edu.cn', +}; diff --git a/lib/routes/zcmu/radar.ts b/lib/routes/zcmu/radar.ts deleted file mode 100644 index 80e7fc0e0..000000000 --- a/lib/routes/zcmu/radar.ts +++ /dev/null @@ -1,87 +0,0 @@ -export default { - 'zcmu.edu.cn': { - _name: '浙江中医药大学', - jwc: [ - { - title: '教务处 - 教务管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl', - target: '/zcmu/jwc/0', - }, - { - title: '教务处 - 成绩管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl/cjgl', - target: '/zcmu/jwc/1', - }, - { - title: '教务处 - 学籍管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl/xjgl', - target: '/zcmu/jwc/2', - }, - { - title: '教务处 - 考试管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl/ksgl', - target: '/zcmu/jwc/3', - }, - { - title: '教务处 - 选课管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl/xkgl', - target: '/zcmu/jwc/4', - }, - { - title: '教务处 - 排课管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: '/jwgl/pkgl', - target: '/zcmu/jwc/5', - }, - ], - yxy: [ - { - title: '药学院 - 通知公告', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'index/tzgg', - target: '/zcmu/yxy/0', - }, - { - title: '药学院 - 评优评奖', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/pypj', - target: '/zcmu/yxy/1', - }, - { - title: '药学院 - 文明规范', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/wmgf', - target: '/zcmu/yxy/2', - }, - { - title: '药学院 - 创新创业', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/cxcy', - target: '/zcmu/yxy/3', - }, - { - title: '药学院 - 校园文化', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/xywh', - target: '/zcmu/yxy/4', - }, - { - title: '药学院 - 心理驿站', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/xlyz', - target: '/zcmu/yxy/5', - }, - { - title: '药学院 - 日常通知', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-zhong-yi-yao-da-xue', - source: 'xsgz/rctz', - target: '/zcmu/yxy/6', - }, - ], - }, -}; diff --git a/lib/routes/zcmu/router.ts b/lib/routes/zcmu/router.ts deleted file mode 100644 index 4265a3d5d..000000000 --- a/lib/routes/zcmu/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/jwc/:type?', './jwc'); - router.get('/yxy/:type?', './yxy'); -}; diff --git a/lib/routes/zcmu/yxy/index.ts b/lib/routes/zcmu/yxy/index.ts index beeb11bb6..dee075d84 100644 --- a/lib/routes/zcmu/yxy/index.ts +++ b/lib/routes/zcmu/yxy/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -14,7 +15,28 @@ const map = new Map([ [6, { title: '药学院 -- 日常通知', id: 'xsgz/rctz' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/yxy/:type?', + categories: ['university'], + example: '/zcmu/yxy/0', + parameters: { type: '模块id' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '药学院', + maintainers: ['CCraftY'], + handler, + description: `| 通知公告 | 评优评奖 | 文明规范 | 创新创业 | 校园文化 | 心理驿站 | 日常通知 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 0 | 1 | 2 | 3 | 4 | 5 | 6 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const id = map.get(type).id; const res = await got({ @@ -34,9 +56,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: map.get(type).title, link: `${host}${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zcool/discover.ts b/lib/routes/zcool/discover.ts index 7f87c49e5..f8b983563 100644 --- a/lib/routes/zcool/discover.ts +++ b/lib/routes/zcool/discover.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,148 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import locations from './locations'; -export default async (ctx) => { +export const route: Route = { + path: '/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?', + categories: ['design'], + example: '/zcool/discover', + parameters: { + query: '查询参数或分类,若填写分类见下表,默认为空 或 `0` 即精选', + subCate: '子分类,见下表,默认为 `0` 即该父分类下全部', + hasVideo: '是否含视频,默认为 `0` 即全部,亦可选 `1` 即含视频', + city: '地区代码,填入发现页中 `选择城市` 中的各级地名,如 `亚洲`、`中国`、`北京`、`纽约`、`巴黎`等', + college: '学校,默认为 `0` 即全部', + recommendLevel: '推荐等级,见下表,默认为 `2` 即编辑精选', + sort: '排序方式,可选 `0` 即最新发布 或 `9` 即默认排序,默认为 `9`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '发现', + maintainers: ['nczitzk'], + handler, + description: `查看 **精选** 分类下的全部内容,其他参数选择默认,可直接使用路由 [\`/zcool/discover/0\`](https://rsshub.app/zcool/discover/0) + + 查看 **精选** 分类下的 **运营设计** 子分类全部内容,其他参数选择默认,可直接使用路由 [\`/zcool/discover/0/617\`](https://rsshub.app/zcool/discover/0/617) + + 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,可直接使用路由 [\`/zcool/discover/0/617/1\`](https://rsshub.app/zcool/discover/0/617/1) + + 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,且城市选择 **北京**,可直接使用路由 [\`/zcool/discover/0/617/1/北京\`](https://rsshub.app/zcool/discover/0/617/1/北京) + + :::tip + 下方仅提供 **分类及其子分类** 参数的代码。**学校** 参数的代码可以在 [站酷发现页](https://www.zcool.com.cn/discover) 中选择跳转后,从浏览器地址栏中找到。 + ::: + + 分类 cate + + | 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 | + | ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- | + | 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 | + + 子分类 subCate + + 精选 0 + + | 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 | + | -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ | + | 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 | + + 平面 8 + + | 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 | + | ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- | + | 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 | + + 插画 1 + + | 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 | + | -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- | + | 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 | + + UI 17 + + | APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 | + | -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- | + | 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 | + + 网页 607 + + | 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 | + | ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- | + | 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 | + + 摄影 33 + + | 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 | + | -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- | + | 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 | + + 三维 24 + + | 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 | + | ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- | + | 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 | + + 影视 610 + + | 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 | + | ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- | + | 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 | + + 空间 609 + + | 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 | + | -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- | + | 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 | + + 工业 / 产品 499 + + | 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 | + | -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- | + | 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 | + + 动漫 608 + + | 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 | + | ----------- | ------------- | -------- | -------- | ------ | -------- | ---- | + | 628 | 629 | 632 | 627 | 633 | 635 | 820 | + + 纯艺术 612 + + | 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 | + | ---- | ---- | ---- | -------- | ---- | + | 659 | 662 | 668 | 657 | 821 | + + 手工艺 611 + + | 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 | + | ---------- | ----------- | -------- | ---------- | ---- | + | 654 | 656 | 756 | 658 | 816 | + + 服装 613 + + | 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 | + | --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- | + | 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 | + + 其他 44 + + | 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 | + | ----------- | ------- | -------- | ---- | ---- | + | 417 | 798 | 683 | 45 | 824 | + + 推荐等级 recommendLevel + + | 全部 | 编辑精选 | 首页推荐 | 全部推荐 | + | ---- | -------- | -------- | -------- | + | 0 | 2 | 3 | 1 |`, +}; + +async function handler(ctx) { const categories = { 0: '精选', 8: '平面', @@ -151,9 +293,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `站酷 - ${categories[queries.cate]}${queries.subCate === '0' ? '' : ` - ${subCategories[queries.cate][queries.subCate]}`}`, link: `${rootUrl}/discover?${query}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zcool/maintainer.ts b/lib/routes/zcool/maintainer.ts deleted file mode 100644 index d513bb06e..000000000 --- a/lib/routes/zcool/maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default { - '/discover/:type?': ['junbaor', 'nczitzk'], - '/discover/:query?': ['nczitzk'], - '/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?': ['nczitzk'], - '/top/:type': ['yuuow'], - '/user/:uid': ['junbaor'], -}; diff --git a/lib/routes/zcool/namespace.ts b/lib/routes/zcool/namespace.ts new file mode 100644 index 000000000..8a9dc3316 --- /dev/null +++ b/lib/routes/zcool/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '站酷', + url: 'www.zcool.com.cn', +}; diff --git a/lib/routes/zcool/radar.ts b/lib/routes/zcool/radar.ts deleted file mode 100644 index 27a676752..000000000 --- a/lib/routes/zcool/radar.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default { - 'zcool.com.cn': { - _name: '站酷', - www: [ - { - title: '发现', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: ['/discover', '/'], - target: (params, url) => `/zcool/discover/${new URL(url).toString().split('?').pop()}`, - }, - { - title: '发现 - 精选 - 全部推荐', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/discover/all', - }, - { - title: '发现 - 精选 - 首页推荐', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/discover/home', - }, - { - title: '发现 - 精选 - 编辑精选', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/discover/home', - }, - { - title: '发现 - 精选 - 文章 - 编辑精选', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/discover/article', - }, - { - title: '作品榜单', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/top/design', - }, - { - title: '文章榜单', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: '/', - target: '/zcool/top/article', - }, - { - title: '用户作品', - docs: 'https://docs.rsshub.app/routes/design#zhan-ku', - source: ['/u/:id'], - target: `/zcool/user/:id`, - }, - ], - }, -}; diff --git a/lib/routes/zcool/router.ts b/lib/routes/zcool/router.ts deleted file mode 100644 index 118c83931..000000000 --- a/lib/routes/zcool/router.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (router) => { - router.get('/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?', './discover'); - router.get('/top/:type', './top'); - router.get('/user/:uid', './user'); -}; diff --git a/lib/routes/zcool/top.ts b/lib/routes/zcool/top.ts index fedcadec3..7e619e690 100644 --- a/lib/routes/zcool/top.ts +++ b/lib/routes/zcool/top.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,30 @@ import { parseDate } from '@/utils/parse-date'; import { extractArticle, extractWork } from './utils'; const baseUrl = 'https://www.zcool.com.cn'; -export default async (ctx) => { +export const route: Route = { + path: '/top/:type', + categories: ['design'], + example: '/zcool/top/design', + parameters: { type: '推荐类型,详见下面的表格' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '作品总榜单', + maintainers: ['yuuow'], + handler, + description: `榜单类型 + + | design | article | + | -------- | -------- | + | 作品榜单 | 文章榜单 |`, +}; + +async function handler(ctx) { const type = ctx.req.param('type'); const url = `${baseUrl}/top/${type === 'design' ? 'index.do' : 'article.do?rankType=8'}`; @@ -43,10 +67,10 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: data.props.pageProps.seo.title, description: data.props.pageProps.seo.description, link: url, item: items, - }); -}; + }; +} diff --git a/lib/routes/zcool/user.ts b/lib/routes/zcool/user.ts index bfe2b8141..bcd0ea97d 100644 --- a/lib/routes/zcool/user.ts +++ b/lib/routes/zcool/user.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; import { extractArticle, extractWork } from './utils'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/user/:uid', + categories: ['design'], + example: '/zcool/user/baiyong', + parameters: { uid: '个性域名前缀或者用户ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zcool.com.cn/u/:id'], + target: '/user/:id', + }, + name: 'Unknown', + maintainers: ['junbaor'], + handler, +}; + +async function handler(ctx) { const uid = ctx.req.param('uid'); let pageUrl = `https://www.zcool.com.cn/u/${uid}`; if (isNaN(uid)) { @@ -43,11 +66,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: data.props.pageProps.seo.title, description: data.props.pageProps.seo.description, image: data.props.pageProps.userInfo.avatar.includes('?x-oss-process') ? data.props.pageProps.userInfo.avatar.split('?')[0] : data.props.pageProps.userInfo.avatar, link: pageUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhangyoubao/index.ts b/lib/routes/zhangyoubao/index.ts index 477a3c377..35da9baee 100644 --- a/lib/routes/zhangyoubao/index.ts +++ b/lib/routes/zhangyoubao/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -6,7 +7,31 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '/:category', + categories: ['game'], + example: '/zhangyoubao/lol', + parameters: { category: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['mobile.zhangyoubao.com/:category/'], + }, + name: '推荐', + maintainers: ['ztmzzz'], + handler, + description: `| 英雄联盟 | 炉石传说 | DNF | 守望先锋 | 王者荣耀 | 单机综合 | 手游综合 | 云顶之弈 | 部落冲突 | 皇室战争 | DNF 手游 | 荒野乱斗 | + | -------- | -------- | --- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | + | lol | lscs | dnf | swxf | yxzj | steam | mobile | lolchess | blzz | hszz | dnfm | brawlstars |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const map = new Map([ ['lol', { title: '英雄联盟', id: 1 }], @@ -36,10 +61,10 @@ export default async (ctx) => { pubDate: parseDate(item.article.publish_time, 'X'), })); - ctx.set('data', { + return { title: '掌游宝' + map.get(category).title + '分区', link: 'https://mobile.zhangyoubao.com/' + category, description: '掌游宝' + map.get(category).title + '分区', item: items, - }); -}; + }; +} diff --git a/lib/routes/zhangyoubao/maintainer.ts b/lib/routes/zhangyoubao/maintainer.ts deleted file mode 100644 index ac07a51cd..000000000 --- a/lib/routes/zhangyoubao/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:category': ['ztmzzz'], -}; diff --git a/lib/routes/zhangyoubao/namespace.ts b/lib/routes/zhangyoubao/namespace.ts new file mode 100644 index 000000000..22191c9d4 --- /dev/null +++ b/lib/routes/zhangyoubao/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '掌游宝', + url: 'mobile.zhangyoubao.com', +}; diff --git a/lib/routes/zhangyoubao/radar.ts b/lib/routes/zhangyoubao/radar.ts deleted file mode 100644 index 1a19d4997..000000000 --- a/lib/routes/zhangyoubao/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zhangyoubao.com': { - _name: '掌游宝', - mobile: [ - { - title: '推荐', - docs: 'https://docs.rsshub.app/routes/game#zhang-you-bao-tui-jian', - source: ['/:category/'], - target: '/zhangyoubao/:category', - }, - ], - }, -}; diff --git a/lib/routes/zhangyoubao/router.ts b/lib/routes/zhangyoubao/router.ts deleted file mode 100644 index f3e255626..000000000 --- a/lib/routes/zhangyoubao/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:category', './index'); -}; diff --git a/lib/routes/zhibo8/forum.ts b/lib/routes/zhibo8/forum.ts index 9e9665b07..35517ea28 100644 --- a/lib/routes/zhibo8/forum.ts +++ b/lib/routes/zhibo8/forum.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:id', + categories: ['bbs'], + example: '/zhibo8/forum/8', + parameters: { id: '子论坛 id,可在子论坛 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '子论坛', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://bbs.zhibo8.cc/forum/list/?fid=${id}`; @@ -39,9 +58,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${title}—直播吧`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/zhibo8/luxiang.ts b/lib/routes/zhibo8/luxiang.ts index 84bede122..25f9e313f 100644 --- a/lib/routes/zhibo8/luxiang.ts +++ b/lib/routes/zhibo8/luxiang.ts @@ -1,9 +1,21 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/luxiang/:category?', + radar: { + source: ['zhibo8.cc/:category/luxiang.htm'], + target: '/luxiang/:category', + }, + name: 'Unknown', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const rootUrl = 'https://www.zhibo8.cc'; const { category = 'nba' } = ctx.req.param(); const link = `${rootUrl}/${category}/luxiang.htm`; @@ -29,10 +41,10 @@ export default async (ctx) => { }); }); - ctx.set('data', { + return { title: $('head title').text(), link, image: 'https://www.zhibo8.cc/favicon.ico', item: list, - }); -}; + }; +} diff --git a/lib/routes/zhibo8/maintainer.ts b/lib/routes/zhibo8/maintainer.ts deleted file mode 100644 index 16ea38eeb..000000000 --- a/lib/routes/zhibo8/maintainer.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default { - '/forum/:id': ['LogicJake'], - '/luxiang/:category?': ['TonyRL'], - '/more/:category?': ['nczitzk'], - '/post/:id': ['LogicJake'], -}; diff --git a/lib/routes/zhibo8/more.ts b/lib/routes/zhibo8/more.ts index 206b39e90..82bc2d285 100644 --- a/lib/routes/zhibo8/more.ts +++ b/lib/routes/zhibo8/more.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,7 +12,29 @@ const categories = { other: '综合', }; -export default async (ctx) => { +export const route: Route = { + path: '/more/:category?', + categories: ['bbs'], + example: '/zhibo8/more/nba', + parameters: { category: '分类,见下表,默认为 NBA' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['news.zhibo8.cc/:category'], + target: '/more/:category', + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'nba'; const rootUrl = 'https://news.zhibo8.cc'; @@ -67,9 +90,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${categories[category]} - 直播吧`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhibo8/namespace.ts b/lib/routes/zhibo8/namespace.ts new file mode 100644 index 000000000..b7e6b3566 --- /dev/null +++ b/lib/routes/zhibo8/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '直播吧', + url: 'zhibo8.cc', +}; diff --git a/lib/routes/zhibo8/post.ts b/lib/routes/zhibo8/post.ts index 4f159c2ab..936d8f1ce 100644 --- a/lib/routes/zhibo8/post.ts +++ b/lib/routes/zhibo8/post.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/post/:id', + categories: ['bbs'], + example: '/zhibo8/post/3050708', + parameters: { id: '帖子 id,可在帖子 URL 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '回帖', + maintainers: ['LogicJake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const link = `https://bbs.zhibo8.cc/forum/topic?tid=${id}`; @@ -41,9 +60,9 @@ export default async (ctx) => { return single; }); - ctx.set('data', { + return { title: `“${title}”的新回复—直播吧`, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/zhibo8/radar.ts b/lib/routes/zhibo8/radar.ts deleted file mode 100644 index 7327c0732..000000000 --- a/lib/routes/zhibo8/radar.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { - 'zhibo8.cc': { - _name: '直播吧', - '.': [ - { - title: '录像', - docs: 'https://docs.rsshub.app/routes/multimedia#zhi-bo-ba', - source: ['/:category/luxiang.htm'], - target: '/zhibo8/luxiang/:category', - }, - ], - bbs: [ - { - title: '子论坛', - docs: 'https://docs.rsshub.app/routes/bbs#zhi-bo-ba', - source: ['/'], - target: (_params, url) => `/zhibo8/forum/${new URL(url).searchParams.get('fid')}`, - }, - { - title: '回帖', - docs: 'https://docs.rsshub.app/routes/bbs#zhi-bo-ba', - source: ['/'], - target: (_params, url) => `/zhibo8/post/${new URL(url).searchParams.get('tid')}`, - }, - ], - news: [ - { - title: '滚动新闻', - docs: 'https://docs.rsshub.app/routes/bbs#zhi-bo-ba', - source: ['/:category'], - target: '/zhibo8/more/:category', - }, - ], - }, -}; diff --git a/lib/routes/zhibo8/router.ts b/lib/routes/zhibo8/router.ts deleted file mode 100644 index b299d0992..000000000 --- a/lib/routes/zhibo8/router.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (router) => { - router.get('/forum/:id', './forum'); - router.get('/luxiang/:category?', './luxiang'); - router.get('/more/:category?', './more'); - router.get('/post/:id', './post'); -}; diff --git a/lib/routes/zhihu/activities.ts b/lib/routes/zhihu/activities.ts index 3d2b6a617..8f1fbca4d 100644 --- a/lib/routes/zhihu/activities.ts +++ b/lib/routes/zhihu/activities.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -5,7 +6,28 @@ import { parseDate } from '@/utils/parse-date'; import g_encrypt from './execlib/x-zse-96-v3'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/people/activities/:id', + categories: ['social-media'], + example: '/zhihu/people/activities/diygod', + parameters: { id: '作者 id,可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/people/:id'], + }, + name: '用户动态', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); // Because the API of zhihu.com has changed, we must use the value of `d_c0` (extracted from cookies) to calculate @@ -50,7 +72,7 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: `${data[0].actor.name}的知乎动态`, link: `https://www.zhihu.com/people/${id}/activities`, image: data[0].actor.avatar_url, @@ -154,5 +176,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/answers.ts b/lib/routes/zhihu/answers.ts index 2e517c3e5..cc43d4e48 100644 --- a/lib/routes/zhihu/answers.ts +++ b/lib/routes/zhihu/answers.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/people/answers/:id', + categories: ['social-media'], + example: '/zhihu/people/answers/diygod', + parameters: { id: '作者 id,可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/people/:id/answers'], + }, + name: '用户回答', + maintainers: ['DIYgod', 'prnake'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const headers = { 'User-Agent': 'ZhihuHybrid com.zhihu.android/Futureve/6.59.0 Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36', @@ -60,9 +82,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${name}的知乎回答`, link: `https://www.zhihu.com/people/${id}/answers`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhihu/bookstore/newest.ts b/lib/routes/zhihu/bookstore/newest.ts index cbf435bc2..0a50d4111 100644 --- a/lib/routes/zhihu/bookstore/newest.ts +++ b/lib/routes/zhihu/bookstore/newest.ts @@ -1,6 +1,25 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/bookstore/newest', + categories: ['social-media'], + example: '/zhihu/bookstore/newest', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '知乎书店 - 新书', + maintainers: ['xyqfer'], + handler, +}; + +async function handler() { const response = await got({ method: 'get', url: 'https://api.zhihu.com/books/features/new', @@ -8,7 +27,7 @@ export default async (ctx) => { const data = response.data.data; - ctx.set('data', { + return { title: '知乎书店-新书抢鲜', link: 'https://www.zhihu.com/pub/features/new', item: data.map((item) => { @@ -26,5 +45,5 @@ export default async (ctx) => { `, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/collection.ts b/lib/routes/zhihu/collection.ts index e4cb2dbd5..528bbfeb1 100644 --- a/lib/routes/zhihu/collection.ts +++ b/lib/routes/zhihu/collection.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -5,7 +6,29 @@ import utils from './utils'; import { generateData } from './pin/utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/collection/:id/:getAll?', + categories: ['social-media'], + example: '/zhihu/collection/26444956', + parameters: { id: '收藏夹 id,可在收藏夹页面 URL 中找到', getAll: '获取全部收藏内容,任意值为打开' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/collection/:id'], + target: '/collection/:id', + }, + name: '收藏夹', + maintainers: ['huruji', 'Colin-XKL', 'Fatpandac'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const getAll = ctx.req.param('getAll'); @@ -58,7 +81,7 @@ export default async (ctx) => { const collection_description = $('.CollectionDetailPageHeader-description').text(); const generateDataPin = (item) => generateData([item.content])[0]; - ctx.set('data', { + return { title: collection_title, link: `https://www.zhihu.com/collection/${id}`, description: collection_description, @@ -74,5 +97,5 @@ export default async (ctx) => { pubDate: parseDate((item.content.type === 'article' ? item.content.updated : item.content.updated_time) * 1000), } ), - }); -}; + }; +} diff --git a/lib/routes/zhihu/daily-section.ts b/lib/routes/zhihu/daily-section.ts index b0515808f..365e23cfc 100644 --- a/lib/routes/zhihu/daily-section.ts +++ b/lib/routes/zhihu/daily-section.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -6,7 +7,30 @@ import { parseDate } from '@/utils/parse-date'; // 参考:https://github.com/izzyleung/ZhihuDailyPurify/wiki/%E7%9F%A5%E4%B9%8E%E6%97%A5%E6%8A%A5-API-%E5%88%86%E6%9E%90 // 文章给出了v7版 api的信息,包含全文api -export default async (ctx) => { +export const route: Route = { + path: '/daily/section/:sectionId', + categories: ['social-media'], + example: '/zhihu/daily/section/2', + parameters: { sectionId: '合集 id,可在 https://news-at.zhihu.com/api/7/sections 找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['daily.zhihu.com/*'], + target: '/daily', + }, + name: '知乎日报 - 合集', + maintainers: ['ccbikai'], + handler, + url: 'daily.zhihu.com/*', +}; + +async function handler(ctx) { const sectionId = ctx.req.param('sectionId'); const listRes = await got({ method: 'get', @@ -42,11 +66,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `${listRes.data.name} - 知乎日报`, link: 'https://daily.zhihu.com', description: '每天3次,每次7分钟', image: 'http://static.daily.zhihu.com/img/new_home_v3/mobile_top_logo.png', item: resultItem, - }); -}; + }; +} diff --git a/lib/routes/zhihu/daily.ts b/lib/routes/zhihu/daily.ts index e31b95c1e..d961d59b9 100644 --- a/lib/routes/zhihu/daily.ts +++ b/lib/routes/zhihu/daily.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -20,7 +21,29 @@ async function dohResolve(name) { return response.data.Answer.map((item) => item.data); } -export default async (ctx) => { +export const route: Route = { + path: '/daily', + categories: ['social-media'], + example: '/zhihu/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['daily.zhihu.com/*'], + }, + name: '知乎日报', + maintainers: ['DHPO'], + handler, + url: 'daily.zhihu.com/*', +}; + +async function handler() { const api = 'https://news-at.zhihu.com/api/4/news'; const HOST = 'news-at.zhihu.com'; let address = HOST; @@ -71,11 +94,11 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '知乎日报', link: 'https://daily.zhihu.com', description: '每天3次,每次7分钟', image: 'http://static.daily.zhihu.com/img/new_home_v3/mobile_top_logo.png', item: items, - }); -}; + }; +} diff --git a/lib/routes/zhihu/hot.ts b/lib/routes/zhihu/hot.ts index 3fd88dfb3..aad6e96b3 100644 --- a/lib/routes/zhihu/hot.ts +++ b/lib/routes/zhihu/hot.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -15,7 +16,28 @@ const titles = { film: '影视', }; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:category?', + categories: ['social-media'], + example: '/zhihu/hot', + parameters: { category: '分类,见下表,默认为全站' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '知乎分类热榜', + maintainers: ['nczitzk'], + handler, + description: `| 全站 | 国际 | 科学 | 汽车 | 视频 | 时尚 | 时事 | 数码 | 体育 | 校园 | 影视 | + | ----- | ----- | ------- | ---- | ------ | ------- | ----- | ------- | ----- | ------ | ---- | + | total | focus | science | car | zvideo | fashion | depth | digital | sport | school | film |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category') ?? 'total'; const response = await got({ @@ -30,9 +52,9 @@ export default async (ctx) => { description: item.target.excerpt ? `<p>${item.target.excerpt}</p>` : '', })); - ctx.set('data', { + return { title: `知乎热榜 - ${titles[category]}`, link: `https://www.zhihu.com/hot?list=${category}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhihu/hotlist.ts b/lib/routes/zhihu/hotlist.ts index a68ab0244..2910594d6 100644 --- a/lib/routes/zhihu/hotlist.ts +++ b/lib/routes/zhihu/hotlist.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +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({ @@ -10,7 +33,7 @@ export default async (ctx) => { url: 'https://www.zhihu.com/api/v3/explore/guest/feeds?limit=40', }); - ctx.set('data', { + return { title: '知乎热榜', link: 'https://www.zhihu.com/billboard', description: '知乎热榜', @@ -43,5 +66,5 @@ export default async (ctx) => { }; } }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/maintainer.ts b/lib/routes/zhihu/maintainer.ts deleted file mode 100644 index 1c8777467..000000000 --- a/lib/routes/zhihu/maintainer.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default { - '/bookstore/newest': ['xyqfer'], - '/collection/:id/:getAll?': ['huruji', 'Colin-XKL', 'Fatpandac'], - '/daily': ['DHPO'], - '/daily/section/:sectionId': ['ccbikai'], - '/hot/:category?': ['nczitzk'], - '/hotlist': ['DIYgod'], - '/people/activities/:id': ['DIYgod'], - '/people/answers/:id': ['DIYgod', 'prnake'], - '/people/pins/:id': ['xyqfer'], - '/pin/daily': ['xyqfer'], - '/pin/hotlist': ['xyqfer'], - '/posts/:usertype/:id': ['whtsky', 'Colin-XKL'], - '/question/:questionId': ['xyqfer', 'hacklu'], - '/timeline': ['SeanChao'], - '/topic/:topicId/:isTop?': ['xyqfer'], - '/weekly': ['LogicJake'], - '/xhu/collection/:id': ['JimenezLi'], - '/xhu/people/activities/:hexId': ['JimenezLi'], - '/xhu/people/answers/:hexId': ['JimenezLi'], - '/xhu/people/posts/:hexId': ['JimenezLi'], - '/xhu/question/:questionId/:sortBy?': ['JimenezLi'], - '/xhu/topic/:topicId': ['JimenezLi'], - '/xhu/zhuanlan/:id': ['JimenezLi'], - '/zhuanlan/:id': ['DIYgod'], -}; diff --git a/lib/routes/zhihu/namespace.ts b/lib/routes/zhihu/namespace.ts new file mode 100644 index 000000000..e06bffd81 --- /dev/null +++ b/lib/routes/zhihu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '知乎', + url: 'www.zhihu.com', +}; diff --git a/lib/routes/zhihu/pin/daily.ts b/lib/routes/zhihu/pin/daily.ts index e6ee798cb..f247c958b 100644 --- a/lib/routes/zhihu/pin/daily.ts +++ b/lib/routes/zhihu/pin/daily.ts @@ -1,7 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/pin/daily', + categories: ['social-media'], + example: '/zhihu/pin/daily', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['daily.zhihu.com/*'], + target: '/daily', + }, + name: '知乎想法 - 24 小时新闻汇总', + maintainers: ['xyqfer'], + handler, + url: 'daily.zhihu.com/*', +}; + +async function handler() { const { data: { data }, } = await got({ @@ -9,10 +33,10 @@ export default async (ctx) => { url: 'https://api.zhihu.com/pins/special/972884951192113152/moments?order_by=newest&reverse_order=0&limit=20', }); - ctx.set('data', { + return { title: '知乎想法-24小时新闻汇总', link: 'https://www.zhihu.com/pin/special/972884951192113152', description: '汇集每天的社会大事、行业资讯,让你用最简单的方式获得想法里的新闻', item: generateData(data), - }); -}; + }; +} diff --git a/lib/routes/zhihu/pin/hotlist.ts b/lib/routes/zhihu/pin/hotlist.ts index 99f98bedd..e26d5b7b0 100644 --- a/lib/routes/zhihu/pin/hotlist.ts +++ b/lib/routes/zhihu/pin/hotlist.ts @@ -1,7 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/pin/hotlist', + categories: ['social-media'], + example: '/zhihu/pin/hotlist', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/zhihu/bookstore/newest'], + }, + name: '知乎想法热榜', + maintainers: ['xyqfer'], + handler, + url: 'www.zhihu.com/zhihu/bookstore/newest', +}; + +async function handler() { const { data: { data }, } = await got({ @@ -9,10 +32,10 @@ export default async (ctx) => { url: 'https://api.zhihu.com/pins/hot_list?reverse_order=0', }); - ctx.set('data', { + return { title: '知乎想法热榜', link: 'https://www.zhihu.com/', description: '整点更新', item: generateData(data), - }); -}; + }; +} diff --git a/lib/routes/zhihu/pin/people.ts b/lib/routes/zhihu/pin/people.ts index 3b5f91eea..c115c813c 100644 --- a/lib/routes/zhihu/pin/people.ts +++ b/lib/routes/zhihu/pin/people.ts @@ -1,7 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { generateData } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/people/pins/:id', + categories: ['social-media'], + example: '/zhihu/people/pins/kan-dan-45', + parameters: { id: '作者 id,可在用户主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/people/:id/pins'], + }, + name: '用户想法', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const { @@ -11,9 +33,9 @@ export default async (ctx) => { url: `https://api.zhihu.com/pins/${id}/moments?limit=10&offset=0`, }); - ctx.set('data', { + return { title: `${data[0].target.author.name}的知乎想法`, link: `https://www.zhihu.com/people/${id}/pins`, item: generateData(data), - }); -}; + }; +} diff --git a/lib/routes/zhihu/posts.ts b/lib/routes/zhihu/posts.ts index 761a6b397..25e30b1e6 100644 --- a/lib/routes/zhihu/posts.ts +++ b/lib/routes/zhihu/posts.ts @@ -1,9 +1,34 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:usertype/:id', + categories: ['social-media'], + example: '/zhihu/posts/people/frederchen', + parameters: { usertype: '作者 id,可在用户主页 URL 中找到', id: '用户类型usertype,参考用户主页的URL。目前有两种,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/:usertype/:id/posts'], + }, + name: '用户文章', + maintainers: ['whtsky', 'Colin-XKL'], + handler, + description: `| 普通用户 | 机构用户 | +| -------- | -------- | +| people | org |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const usertype = ctx.req.param('usertype'); @@ -44,10 +69,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `${authorname} 的知乎文章`, link: `https://www.zhihu.com/${usertype}/${id}/posts`, description: authordescription, item: list, - }); -}; + }; +} diff --git a/lib/routes/zhihu/question.ts b/lib/routes/zhihu/question.ts index 654b9f378..bd6c58205 100644 --- a/lib/routes/zhihu/question.ts +++ b/lib/routes/zhihu/question.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -5,7 +6,29 @@ import md5 from '@/utils/md5'; import g_encrypt from './execlib/x-zse-96-v3'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/question/:questionId/:sortBy?', + categories: ['social-media'], + example: '/zhihu/question/59895982', + parameters: { questionId: '问题 id', sortBy: '排序方式:`default`, `created`, `updated`。默认为 `default`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/question/:questionId'], + target: '/question/:questionId', + }, + name: '问题', + maintainers: [], + handler, +}; + +async function handler(ctx) { const { questionId, sortBy = 'default', // default,created,updated @@ -61,7 +84,7 @@ export default async (ctx) => { const listRes = response.data.data; - ctx.set('data', { + return { title: `知乎-${listRes[0].question.title}`, link: `https://www.zhihu.com/question/${questionId}`, item: listRes.map((item) => { @@ -77,5 +100,5 @@ export default async (ctx) => { link: `https://www.zhihu.com/question/${questionId}/answer/${item.id}`, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/radar.ts b/lib/routes/zhihu/radar.ts deleted file mode 100644 index 07c4959d6..000000000 --- a/lib/routes/zhihu/radar.ts +++ /dev/null @@ -1,158 +0,0 @@ -export default { - 'zhihu.com': { - _name: '知乎', - www: [ - { - title: '收藏夹', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/collection/:id', - target: '/zhihu/collection/:id', - }, - { - title: '用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/people/:id', - target: '/zhihu/people/activities/:id', - }, - { - title: '用户回答', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/people/:id/answers', - target: '/zhihu/people/answers/:id', - }, - { - title: '用户想法', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/people/:id/pins', - target: '/zhihu/people/pins/:id', - }, - { - title: '用户文章', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/:usertype/:id/posts', - target: '/zhihu/posts/:usertype/:id', - }, - - { - title: '热榜', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/hot', - target: '/zhihu/hotlist', - }, - { - title: '想法热榜', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - target: '/zhihu/pin/hotlist', - }, - { - title: '问题', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/question/:questionId', - target: '/zhihu/question/:questionId', - }, - { - title: '话题', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/topic/:topicId/:type', - target: '/zhihu/topic/:topicId', - }, - { - title: '新书', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/zhihu/bookstore/newest', - target: '/zhihu/pin/hotlist', - }, - { - title: '想法-24 小时新闻汇总', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/pin/special/972884951192113152', - target: '/zhihu/pin/daily', - }, - { - title: '书店-周刊', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/pub/weekly', - target: '/zhihu/weekly', - }, - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/column/:id', - target: '/zhihu/zhuanlan/:id', - }, - { - title: 'xhu - 用户动态', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: ['/people/:id', '/org/:id'], - target: (params, url, document) => { - const hexId = /"id":"([\da-f]*?)","urlToken"/.exec(document.querySelector('#js-initialData').innerHTML)[1]; - return `/zhihu/xhu/people/activities/${hexId}`; - }, - }, - { - title: 'xhu - 用户回答', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: ['/people/:id/answers', '/org/:id/answers'], - target: (params, url, document) => { - const hexId = /"id":"([\da-f]*?)","urlToken"/.exec(document.querySelector('#js-initialData').innerHTML)[1]; - return `/zhihu/xhu/people/answers/${hexId}`; - }, - }, - { - title: 'xhu - 用户文章', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: ['/people/:id/posts', '/org/:id/posts'], - target: (params, url, document) => { - const hexId = /"id":"([\da-f]*?)","urlToken"/.exec(document.querySelector('#js-initialData').innerHTML)[1]; - return `/zhihu/xhu/people/posts/${hexId}`; - }, - }, - { - title: 'xhu - 收藏夹', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/collection/:id', - target: '/zhihu/xhu/collection/:id', - }, - { - title: 'xhu - 问题', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/question/:questionId', - target: '/zhihu/xhu/question/:questionId', - }, - { - title: 'xhu - 话题', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/topic/:topicId/:type', - target: '/zhihu/xhu/topic/:topicId', - }, - { - title: 'xhu - 专栏', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/column/:id', - target: '/zhihu/xhu/zhuanlan/:id', - }, - ], - zhuanlan: [ - { - title: '专栏', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/:id', - target: '/zhihu/zhuanlan/:id', - }, - ], - daily: [ - { - title: '日报', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/', - target: '/zhihu/daily', - }, - { - title: '日报', - docs: 'https://docs.rsshub.app/routes/social-media#zhi-hu', - source: '/*', - target: '/zhihu/daily', - }, - ], - }, -}; diff --git a/lib/routes/zhihu/router.ts b/lib/routes/zhihu/router.ts deleted file mode 100644 index ef69b5813..000000000 --- a/lib/routes/zhihu/router.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default (router) => { - router.get('/bookstore/newest', './bookstore/newest'); - router.get('/collection/:id/:getAll?', './collection'); - router.get('/daily', './daily'); - router.get('/daily/section/:sectionId', './daily-section'); - router.get('/hot/:category?', './hot'); - router.get('/hotlist', './hotlist'); - router.get('/people/activities/:id', './activities'); - router.get('/people/answers/:id', './answers'); - router.get('/people/pins/:id', './pin/people'); - router.get('/pin/daily', './pin/daily'); - router.get('/pin/hotlist', './pin/hotlist'); - router.get('/posts/:usertype/:id', './posts'); - router.get('/question/:questionId/:sortBy?', './question'); - router.get('/timeline', './timeline'); - router.get('/topic/:topicId/:isTop?', './topic'); - router.get('/weekly', './weekly'); - router.get('/xhu/collection/:id', './xhu/collection'); - router.get('/xhu/people/activities/:hexId', './xhu/activities'); - router.get('/xhu/people/answers/:hexId', './xhu/answers'); - router.get('/xhu/people/posts/:hexId', './xhu/posts'); - router.get('/xhu/question/:questionId/:sortBy?', './xhu/question'); - router.get('/xhu/topic/:topicId', './xhu/topic'); - router.get('/xhu/zhuanlan/:id', './xhu/zhuanlan'); - router.get('/zhuanlan/:id', './zhuanlan'); -}; diff --git a/lib/routes/zhihu/timeline.ts b/lib/routes/zhihu/timeline.ts index 98eca5869..568ad6e5c 100644 --- a/lib/routes/zhihu/timeline.ts +++ b/lib/routes/zhihu/timeline.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/timeline', + categories: ['social-media'], + example: '/zhihu/timeline', + parameters: {}, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '用户关注时间线', + maintainers: ['SeanChao'], + handler, + description: `:::warning + 用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + :::`, +}; + +async function handler() { const cookie = config.zhihu.cookies; if (cookie === undefined) { throw new Error('缺少知乎用户登录后的 Cookie 值'); @@ -107,9 +129,9 @@ export default async (ctx) => { return buildItem(e); }); - ctx.set('data', { + return { title: `知乎关注动态`, link: `https://www.zhihu.com/follow`, item: out, - }); -}; + }; +} diff --git a/lib/routes/zhihu/topic.ts b/lib/routes/zhihu/topic.ts index bdc416221..d77d82627 100644 --- a/lib/routes/zhihu/topic.ts +++ b/lib/routes/zhihu/topic.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import utils from './utils'; @@ -5,7 +6,29 @@ import { parseDate } from '@/utils/parse-date'; import g_encrypt from './execlib/x-zse-96-v3'; import md5 from '@/utils/md5'; -export default async (ctx) => { +export const route: Route = { + path: '/topic/:topicId/:isTop?', + categories: ['social-media'], + example: '/zhihu/topic/19828946', + parameters: { topicId: '话题 id', isTop: '仅精华,默认为否,其他值为是' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/topic/:topicId/:type'], + target: '/topic/:topicId', + }, + name: '话题', + maintainers: ['xyqfer'], + handler, +}; + +async function handler(ctx) { const { topicId, isTop = false } = ctx.req.param(); const link = `https://www.zhihu.com/topic/${topicId}/${isTop ? 'top-answers' : 'newest'}`; @@ -103,10 +126,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `知乎话题-${topicId}-${isTop ? '精华' : '讨论'}`, description: topicMeta.content.introduction, link, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhihu/weekly.ts b/lib/routes/zhihu/weekly.ts index a044eb58c..b3ec2f256 100644 --- a/lib/routes/zhihu/weekly.ts +++ b/lib/routes/zhihu/weekly.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const host = 'https://www.zhihu.com'; -export default async (ctx) => { +export const route: Route = { + path: '/weekly', + categories: ['social-media'], + example: '/zhihu/weekly', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/pub/weekly'], + }, + name: '知乎书店 - 知乎周刊', + maintainers: ['LogicJake'], + handler, + url: 'www.zhihu.com/pub/weekly', +}; + +async function handler() { const link = 'https://www.zhihu.com/pub/weekly'; const response = await got(link); const $ = load(response.data); @@ -22,10 +45,10 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '知乎周刊', link, description, item: out, - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/activities.ts b/lib/routes/zhihu/xhu/activities.ts index b6dfc0910..72b755cdc 100644 --- a/lib/routes/zhihu/xhu/activities.ts +++ b/lib/routes/zhihu/xhu/activities.ts @@ -1,9 +1,40 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import utils from '../utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/people/activities/:hexId', + categories: ['social-media'], + example: '/zhihu/xhu/people/activities/246e6cf44e94cefbf4b959cb5042bc91', + parameters: { hexId: '用户的 16 进制 id,获取方式见下方说明' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/people/:id'], + target: '/people/activities/:id', + }, + name: 'xhu - 用户动态', + maintainers: ['JimenezLi'], + handler, + description: `[xhu](https://github.com/REToys/xhu) + + :::tip + 用户的 16 进制 id 获取方式: + + 1. 可以通过 RSSHub Radar 扩展获取; + 2. 或者在用户主页打开 F12 控制台,执行以下代码:\`console.log(/"id":"([0-9a-f]*?)","urlToken"/.exec(document.getElementById('js-initialData').innerHTML)[1]);\` 即可获取用户的 16 进制 id。 + :::`, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const hexId = ctx.req.param('hexId'); const link = `https://www.zhihu.com/people/${hexId}`; @@ -19,7 +50,7 @@ export default async (ctx) => { }); const data = response.data.data; - ctx.set('data', { + return { title: `${data[0].actor.name}的知乎动态`, link, image: data[0].actor.avatar_url, @@ -123,5 +154,5 @@ export default async (ctx) => { link: url, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/answers.ts b/lib/routes/zhihu/xhu/answers.ts index 409b043cd..1cc9d2b40 100644 --- a/lib/routes/zhihu/xhu/answers.ts +++ b/lib/routes/zhihu/xhu/answers.ts @@ -1,8 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/people/answers/:hexId', + categories: ['social-media'], + example: '/zhihu/xhu/people/answers/246e6cf44e94cefbf4b959cb5042bc91', + parameters: { hexId: '用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/people/:id/answers'], + target: '/people/answers/:id', + }, + name: 'xhu - 用户回答', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const hexId = ctx.req.param('hexId'); const link = `https://www.zhihu.com/people/${hexId}/answers`; @@ -18,7 +41,7 @@ export default async (ctx) => { }); const data = response.data.data; - ctx.set('data', { + return { title: `${data[0].author.name}的知乎回答`, link, item: data.map((item) => ({ @@ -27,5 +50,5 @@ export default async (ctx) => { pubDate: parseDate(item.created_time * 1000), link: `https://www.zhihu.com/question/${item.question.id}/answer/${item.id}`, })), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/collection.ts b/lib/routes/zhihu/xhu/collection.ts index b42b30656..713f3a579 100644 --- a/lib/routes/zhihu/xhu/collection.ts +++ b/lib/routes/zhihu/xhu/collection.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import { generateData } from '../pin/utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/collection/:id', + categories: ['social-media'], + example: '/zhihu/xhu/collection/26444956', + parameters: { id: '收藏夹 id, 可在收藏夹页面 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/collection/:id'], + }, + name: 'xhu - 收藏夹', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const id = ctx.req.param('id'); const link = `https://www.zhihu.com/collection/${id}`; @@ -27,7 +49,7 @@ export default async (ctx) => { }); const listRes = contentResponse.data.data; - ctx.set('data', { + return { title: `知乎收藏夹-${titleResponse.data.title}`, description: titleResponse.data.description, link, @@ -72,5 +94,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/posts.ts b/lib/routes/zhihu/xhu/posts.ts index 31cd4cd3f..b36cc767c 100644 --- a/lib/routes/zhihu/xhu/posts.ts +++ b/lib/routes/zhihu/xhu/posts.ts @@ -1,8 +1,27 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/people/posts/:hexId', + categories: ['social-media'], + example: '/zhihu/xhu/people/posts/246e6cf44e94cefbf4b959cb5042bc91', + parameters: { hexId: '用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'xhu - 用户文章', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const hexId = ctx.req.param('hexId'); const link = `https://www.zhihu.com/people/${hexId}/posts`; @@ -18,7 +37,7 @@ export default async (ctx) => { }); const data = response.data.data; - ctx.set('data', { + return { title: `${data[0].author.name} 的知乎文章`, link, image: data[0].author.avatar_url, @@ -30,5 +49,5 @@ export default async (ctx) => { link: `https://zhuanlan.zhihu.com/p/${item.id}`, author: item.author.name, })), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/question.ts b/lib/routes/zhihu/xhu/question.ts index 8ad42056a..51627f130 100644 --- a/lib/routes/zhihu/xhu/question.ts +++ b/lib/routes/zhihu/xhu/question.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import utils from '../utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/question/:questionId/:sortBy?', + categories: ['social-media'], + example: '/zhihu/xhu/question/264051433', + parameters: { questionId: '问题 id', sortBy: '排序方式:`default`, `created`, `updated`。默认为 `default`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/question/:questionId'], + target: '/xhu/question/:questionId', + }, + name: 'xhu - 问题', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const { questionId, @@ -22,7 +45,7 @@ export default async (ctx) => { }); const listRes = response.data.data; - ctx.set('data', { + return { title: `知乎-${listRes[0].question.title}`, link, item: listRes.map((item) => { @@ -40,5 +63,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/topic.ts b/lib/routes/zhihu/xhu/topic.ts index f2201d9de..bd15c03c3 100644 --- a/lib/routes/zhihu/xhu/topic.ts +++ b/lib/routes/zhihu/xhu/topic.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import utils from '../utils'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/topic/:topicId', + categories: ['social-media'], + example: '/zhihu/xhu/topic/19566035', + parameters: { topicId: '话题ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['www.zhihu.com/topic/:topicId/:type'], + }, + name: 'Unknown', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const topicId = ctx.req.param('topicId'); const link = `https://www.zhihu.com/topic/${topicId}/newest`; @@ -19,7 +41,7 @@ export default async (ctx) => { }); const listRes = response.data.data; - ctx.set('data', { + return { title: `知乎话题-${topicId}`, link, item: listRes.map(({ target: item }) => { @@ -66,5 +88,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/xhu/zhuanlan.ts b/lib/routes/zhihu/xhu/zhuanlan.ts index da3b1fa76..1c12d5026 100644 --- a/lib/routes/zhihu/xhu/zhuanlan.ts +++ b/lib/routes/zhihu/xhu/zhuanlan.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import auth from './auth'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/xhu/zhuanlan/:id', + categories: ['social-media'], + example: '/zhihu/xhu/zhuanlan/githubdaily', + parameters: { id: '专栏 id, 可在专栏主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhuanlan.zhihu.com/:id'], + target: '/zhuanlan/:id', + }, + name: 'xhu- 专栏', + maintainers: ['JimenezLi'], + handler, +}; + +async function handler(ctx) { const xhuCookie = await auth.getCookie(ctx); const id = ctx.req.param('id'); const link = `https://www.zhihu.com/column/${id}`; @@ -28,7 +51,7 @@ export default async (ctx) => { const listRes = contentResponse.data.data; - ctx.set('data', { + return { title: `知乎专栏-${titleResponse.data.title}`, description: titleResponse.data.description, link, @@ -87,5 +110,5 @@ export default async (ctx) => { link, }; }), - }); -}; + }; +} diff --git a/lib/routes/zhihu/zhuanlan.ts b/lib/routes/zhihu/zhuanlan.ts index 3d7c00859..15e282b52 100644 --- a/lib/routes/zhihu/zhuanlan.ts +++ b/lib/routes/zhihu/zhuanlan.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import utils from './utils'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/zhuanlan/:id', + categories: ['social-media'], + example: '/zhihu/zhuanlan/googledevelopers', + parameters: { id: '专栏 id,可在专栏主页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhuanlan.zhihu.com/:id'], + }, + name: '专栏', + maintainers: ['DIYgod'], + handler, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const listRes = await got({ @@ -91,10 +113,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { description, item, title: `知乎专栏-${title}`, link: url, - }); -}; + }; +} diff --git a/lib/routes/zhitongcaijing/index.ts b/lib/routes/zhitongcaijing/index.ts index d8509c57b..257c3bf14 100644 --- a/lib/routes/zhitongcaijing/index.ts +++ b/lib/routes/zhitongcaijing/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -67,7 +68,41 @@ const ids = { }, }; -export default async (ctx) => { +export const route: Route = { + path: '/:id?/:category?', + categories: ['finance'], + example: '/zhitongcaijing', + parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,默认为 recommend,即推荐', category: '分类 id,可在对应栏目子分类页 URL 中找到,默认为全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '推荐', + maintainers: ['nczitzk'], + handler, + description: `| id | 栏目 | + | ------------ | ---- | + | recommend | 推荐 | + | hkstock | 港股 | + | meigu | 美股 | + | agu | 沪深 | + | ct | 创投 | + | esg | ESG | + | aqs | 券商 | + | ajj | 基金 | + | focus | 要闻 | + | announcement | 公告 | + | research | 研究 | + | shares | 新股 | + | bazaar | 市场 | + | company | 公司 |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'recommend'; const category = ctx.req.param('category') ?? ''; @@ -114,9 +149,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `智通财经 - ${ids[id].title}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhitongcaijing/maintainer.ts b/lib/routes/zhitongcaijing/maintainer.ts deleted file mode 100644 index d18b2bde3..000000000 --- a/lib/routes/zhitongcaijing/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:id?/:category?': ['nczitzk'], -}; diff --git a/lib/routes/zhitongcaijing/namespace.ts b/lib/routes/zhitongcaijing/namespace.ts new file mode 100644 index 000000000..12f2eb5cc --- /dev/null +++ b/lib/routes/zhitongcaijing/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '智通财经网', + url: 'zhitongcaijing.com', +}; diff --git a/lib/routes/zhitongcaijing/radar.ts b/lib/routes/zhitongcaijing/radar.ts deleted file mode 100644 index 3d7aaa2f0..000000000 --- a/lib/routes/zhitongcaijing/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'zhitongcaijing.com': { - _name: '智通财经', - '.': [ - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/finance#zhi-tong-cai-jing-zi-xun', - source: ['/:category', '/'], - target: (params, url) => { - const id = new URL(url).toString().match(/\/(\w+)\.html/)[1]; - const category = new URL(url).searchParams.get('category_key'); - return `/zhitongcaijing/${id}${category ? `/${category}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/zhitongcaijing/router.ts b/lib/routes/zhitongcaijing/router.ts deleted file mode 100644 index 4456ee470..000000000 --- a/lib/routes/zhitongcaijing/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:id?/:category?', './index'); -}; diff --git a/lib/routes/zhiy/letter.ts b/lib/routes/zhiy/letter.ts index 8b4ec43b7..021df59b6 100644 --- a/lib/routes/zhiy/letter.ts +++ b/lib/routes/zhiy/letter.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, fetchUserDate } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/letters/:author', + categories: ['new-media'], + example: '/zhiy/letters/messy', + parameters: { author: '作者 ID,可在URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhiy.cc/:author'], + }, + name: 'Newsletter', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const author = ctx.req.param('author'); const userData = await fetchUserDate(author); @@ -24,11 +46,11 @@ export default async (ctx) => { link: `${baseUrl}/letter/${item.id}`, })); - ctx.set('data', { + return { title: authorName, link: `${baseUrl}/${author}`, description: authorSignature, image: authorAvatarUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhiy/maintainer.ts b/lib/routes/zhiy/maintainer.ts deleted file mode 100644 index 567ec4680..000000000 --- a/lib/routes/zhiy/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/letters/:author': ['TonyRL'], - '/posts/:author': ['TonyRL'], -}; diff --git a/lib/routes/zhiy/namespace.ts b/lib/routes/zhiy/namespace.ts new file mode 100644 index 000000000..3eadab441 --- /dev/null +++ b/lib/routes/zhiy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '知园', + url: 'zhiy.cc', +}; diff --git a/lib/routes/zhiy/post.ts b/lib/routes/zhiy/post.ts index c158ff55b..e0c32b63d 100644 --- a/lib/routes/zhiy/post.ts +++ b/lib/routes/zhiy/post.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +10,28 @@ import { art } from '@/utils/render'; import * as path from 'node:path'; import dayjs from 'dayjs'; -export default async (ctx) => { +export const route: Route = { + path: '/posts/:author', + categories: ['new-media'], + example: '/zhiy/posts/long', + parameters: { author: '作者 ID,可在URL中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhiy.cc/:author'], + }, + name: '笔记', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { art.defaults.imports = { dayjs, ...art.defaults.imports, @@ -63,11 +85,11 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: authorName, link: `${baseUrl}/${author}`, description: authorSignature, image: authorAvatarUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zhiy/radar.ts b/lib/routes/zhiy/radar.ts deleted file mode 100644 index 2a887e092..000000000 --- a/lib/routes/zhiy/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'zhiy.cc': { - _name: '知园', - '.': [ - { - title: 'Newsletter', - docs: 'https://docs.rsshub.app/routes/new-media#zhi-yuan', - source: ['/:author'], - target: '/zhiy/letters/:author', - }, - { - title: '笔记', - docs: 'https://docs.rsshub.app/routes/new-media#zhi-yuan', - source: ['/:author'], - target: '/zhiy/posts/:author', - }, - ], - }, -}; diff --git a/lib/routes/zhiy/router.ts b/lib/routes/zhiy/router.ts deleted file mode 100644 index 06763d9f4..000000000 --- a/lib/routes/zhiy/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/letters/:author', './letter'); - router.get('/posts/:author', './post'); -}; diff --git a/lib/routes/zhubai/index.ts b/lib/routes/zhubai/index.ts index 9771b197a..64df930d3 100644 --- a/lib/routes/zhubai/index.ts +++ b/lib/routes/zhubai/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { isValidHost } from '@/utils/valid-host'; -export default async (ctx) => { +export const route: Route = { + path: '/:id', + categories: ['blog'], + example: '/zhubai/via', + parameters: { id: '`id` 为竹白主页 url 中的三级域名,如 via.zhubai.love 的 `id` 为 `via`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['naixy28'], + handler, + description: `:::tip + 在路由末尾处加上 \`?limit=限制获取数目\` 来限制获取条目数量,默认值为\`20\` + :::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; if (!isValidHost(id)) { @@ -19,7 +41,7 @@ export default async (ctx) => { const data = response.data.data; const { name, description } = data[0].publication; - ctx.set('data', { + return { title: name, link: `https://${id}.zhubai.love/`, description, @@ -29,5 +51,5 @@ export default async (ctx) => { link: `https://${id}.zhubai.love/posts/${item.id}`, author: name, })), - }); -}; + }; +} diff --git a/lib/routes/zhubai/maintainer.ts b/lib/routes/zhubai/maintainer.ts deleted file mode 100644 index 97cb9b814..000000000 --- a/lib/routes/zhubai/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/top20': ['nczitzk'], - '/:id': ['naixy28'], -}; diff --git a/lib/routes/zhubai/namespace.ts b/lib/routes/zhubai/namespace.ts new file mode 100644 index 000000000..0a03a0fac --- /dev/null +++ b/lib/routes/zhubai/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '竹白', + url: 'zhubai.love', +}; diff --git a/lib/routes/zhubai/radar.ts b/lib/routes/zhubai/radar.ts deleted file mode 100644 index 56a1338ef..000000000 --- a/lib/routes/zhubai/radar.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - 'zhubai.love': { - _name: '竹白', - '.': [ - { - title: '文章', - docs: 'https://docs.rsshub.app/routes/blog#zhu-bai', - source: ['/'], - }, - ], - analy: [ - { - title: '上周热门 TOP 20', - docs: 'https://docs.rsshub.app/routes/blog#zhu-bai', - source: ['/'], - target: '/zhubai/top20', - }, - ], - }, -}; diff --git a/lib/routes/zhubai/router.ts b/lib/routes/zhubai/router.ts deleted file mode 100644 index 404a7a0a3..000000000 --- a/lib/routes/zhubai/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/top20', './top20'); - router.get('/:id', './index'); -}; diff --git a/lib/routes/zhubai/top20.ts b/lib/routes/zhubai/top20.ts index 369d24a73..1b793f67d 100644 --- a/lib/routes/zhubai/top20.ts +++ b/lib/routes/zhubai/top20.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +16,29 @@ const parseContent = (content) => art.defaults.imports.parseContent = parseContent; -export default async (ctx) => { +export const route: Route = { + path: '/top20', + categories: ['blog'], + example: '/zhubai/top20', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['analy.zhubai.love/'], + }, + name: 'Unknown', + maintainers: ['nczitzk'], + handler, + url: 'analy.zhubai.love/', +}; + +async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; const rootUrl = 'http://analy.zhubai.wiki'; @@ -55,7 +78,7 @@ export default async (ctx) => { const icon = $('link[rel="apple-touch-icon"]').prop('href'); - ctx.set('data', { + return { item: items, title: `${$('meta[property="og:title"]').prop('content')} - TOP20`, link: rootUrl, @@ -66,5 +89,5 @@ export default async (ctx) => { logo: icon, subtitle: $('meta[property="og:description"]').prop('content'), author: $('meta[name="twitter:site"]').prop('content'), - }); -}; + }; +} diff --git a/lib/routes/zhujiceping/maintainer.ts b/lib/routes/zhujiceping/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/zhujiceping/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/zhujiceping/namespace.ts b/lib/routes/zhujiceping/namespace.ts new file mode 100644 index 000000000..cf6c4c110 --- /dev/null +++ b/lib/routes/zhujiceping/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国外主机测评', + url: 'zhujiceping.com', +}; diff --git a/lib/routes/zhujiceping/radar.ts b/lib/routes/zhujiceping/radar.ts deleted file mode 100644 index 281c1b04a..000000000 --- a/lib/routes/zhujiceping/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zhujiceping.com': { - _name: '国外主机测评', - '.': [ - { - title: '最新发布', - docs: 'https://docs.rsshub.app/routes/blog#guo-wai-zhu-ji-ce-ping', - source: ['/'], - target: '/zhujiceping', - }, - ], - }, -}; diff --git a/lib/routes/zhujiceping/router.ts b/lib/routes/zhujiceping/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/zhujiceping/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/zhujiceping/rss.ts b/lib/routes/zhujiceping/rss.ts index 7c7530499..314e244c9 100644 --- a/lib/routes/zhujiceping/rss.ts +++ b/lib/routes/zhujiceping/rss.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['zhujiceping.com/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'zhujiceping.com/', +}; + +async function handler() { const url = 'https://www.zhujiceping.com/'; const response = await got({ method: 'get', url }); const $ = load(response.data); @@ -24,9 +37,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '国外主机测评', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/zhuwang/index.ts b/lib/routes/zhuwang/index.ts index dbf79a10e..719afee49 100644 --- a/lib/routes/zhuwang/index.ts +++ b/lib/routes/zhuwang/index.ts @@ -1,6 +1,29 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/zhujia', + categories: ['shopping'], + example: '/zhuwang/zhujia', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zhujia.zhuwang.cc/'], + }, + name: 'Unknown', + maintainers: [], + handler, + url: 'zhujia.zhuwang.cc/', +}; + +async function handler() { const baseUrl = 'https://zhujia.zhuwang.cc/'; const now = new Date(); const date = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`; @@ -37,10 +60,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `全国今日生猪价格`, desription: '中国养猪网猪价频道是中国猪价权威平台,提供每日猪评,猪价和行情分析,并且预测猪价和分析每天的猪价排行。', link: baseUrl, item: priceItems, - }); -}; + }; +} diff --git a/lib/routes/zhuwang/maintainer.ts b/lib/routes/zhuwang/maintainer.ts deleted file mode 100644 index 3dda4d2e6..000000000 --- a/lib/routes/zhuwang/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/zhuwang/zhujia': ['importcjj'], -}; diff --git a/lib/routes/zhuwang/namespace.ts b/lib/routes/zhuwang/namespace.ts new file mode 100644 index 000000000..d068e11f4 --- /dev/null +++ b/lib/routes/zhuwang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国养猪网', + url: 'zhujia.zhuwang.cc', +}; diff --git a/lib/routes/zhuwang/radar.ts b/lib/routes/zhuwang/radar.ts deleted file mode 100644 index 35337ab2c..000000000 --- a/lib/routes/zhuwang/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zhuwang.cc': { - _name: '中国养猪网', - zhujia: [ - { - title: '每日生猪价格更新', - docs: 'https://docs.rsshub.app/routes/shopping#zhong-guo-yang-zhu-wang', - source: '/', - target: '/zhuwang/zhujia', - }, - ], - }, -}; diff --git a/lib/routes/zhuwang/router.ts b/lib/routes/zhuwang/router.ts deleted file mode 100644 index b6b6a782c..000000000 --- a/lib/routes/zhuwang/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/zhujia', './'); -}; diff --git a/lib/routes/zimuxia/index.ts b/lib/routes/zimuxia/index.ts index 6a1640d32..66e0908ad 100644 --- a/lib/routes/zimuxia/index.ts +++ b/lib/routes/zimuxia/index.ts @@ -1,8 +1,30 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/:category?', + categories: ['multimedia'], + example: '/zimuxia', + parameters: { category: '分类,见下表,默认为 ALL' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '分类', + maintainers: ['nczitzk'], + handler, + description: `| ALL | FIX 德语社 | 欧美剧集 | 欧美电影 | 综艺 & 纪录 | FIX 日语社 | FIX 韩语社 | FIX 法语社 | + | --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- | + | | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 |`, +}; + +async function handler(ctx) { const category = ctx.req.param('category'); const rootUrl = 'https://www.zimuxia.cn'; @@ -57,9 +79,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${category || 'ALL'} - FIX字幕侠`, link: response.url, item: items, - }); -}; + }; +} diff --git a/lib/routes/zimuxia/maintainer.ts b/lib/routes/zimuxia/maintainer.ts deleted file mode 100644 index db4fe411a..000000000 --- a/lib/routes/zimuxia/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/portfolio/:id': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/routes/zimuxia/namespace.ts b/lib/routes/zimuxia/namespace.ts new file mode 100644 index 000000000..f8cd43782 --- /dev/null +++ b/lib/routes/zimuxia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FIX 字幕侠', + url: 'zimuxia.cn', +}; diff --git a/lib/routes/zimuxia/portfolio.ts b/lib/routes/zimuxia/portfolio.ts index f55167e0d..6bcb7e356 100644 --- a/lib/routes/zimuxia/portfolio.ts +++ b/lib/routes/zimuxia/portfolio.ts @@ -1,8 +1,33 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; const allowlinktypes = new Set(['all', 'magnet', 'ed2k', 'baidu', 'subhd', 'quark', '115']); -export default async (ctx) => { +export const route: Route = { + path: '/portfolio/:id', + categories: ['multimedia'], + example: '/zimuxia/portfolio/我们这一天', + parameters: { id: '剧集名,可在剧集页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zimuxia.cn/portfolio/:id'], + }, + name: '剧集', + maintainers: ['nczitzk'], + handler, + description: `:::tip +本路由以 \`magnet\` 为默认 linktype,可以通过在路由后方加上 \`?linktype=链接类型\` 指定导出的链接类型。比如路由为 [\`/zimuxia/portfolio/我们这一天?linktype=baidu\`](https://rsshub.app/zimuxia/portfolio/我们这一天?linktype=baidu) 来导出百度盘链接。目前,你可以选择的 \`链接类型\` 包括: \`magnet\`(默认), \`all\`(所有), \`ed2k\`(电驴), \`baidu\`(百度盘), \`quark\`(夸克盘), \`115\`(115 盘), \`subhd\`(字幕). +:::`, +}; + +async function handler(ctx) { const id = ctx.req.param('id'); let linktype = ctx.req.query('linktype') ?? 'magnet'; linktype = allowlinktypes.has(linktype) ? linktype : 'magnet'; @@ -44,9 +69,9 @@ export default async (ctx) => { }) .reverse(); - ctx.set('data', { + return { title: `${$('.content-page-title').text()} - FIX字幕侠`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zimuxia/radar.ts b/lib/routes/zimuxia/radar.ts deleted file mode 100644 index c459ecabd..000000000 --- a/lib/routes/zimuxia/radar.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default { - 'zimuxia.cn': { - _name: 'FIX 字幕侠', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/multimedia#fix-zi-mu-xia', - source: ['/我们的作品'], - target: (params, url) => `/zimuxia/${new URL(url).searchParams.get('cat')}`, - }, - { - title: '剧集', - docs: 'https://docs.rsshub.app/routes/multimedia#fix-zi-mu-xia', - source: ['/portfolio/:id'], - target: '/zimuxia/portfolio/:id', - }, - ], - }, -}; diff --git a/lib/routes/zimuxia/router.ts b/lib/routes/zimuxia/router.ts deleted file mode 100644 index 8f6fdd42b..000000000 --- a/lib/routes/zimuxia/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/portfolio/:id', './portfolio'); - router.get('/:category?', './index'); -}; diff --git a/lib/routes/zjgtjy/index.ts b/lib/routes/zjgtjy/index.ts index 2cd45023a..54f6495ec 100644 --- a/lib/routes/zjgtjy/index.ts +++ b/lib/routes/zjgtjy/index.ts @@ -1,7 +1,15 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/:type?', + name: 'Unknown', + maintainers: ['Fatpandac'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') === 'all' ? '' : ctx.req.param('type').toUpperCase(); const host = `https://td.zjgtjy.cn:8553/devops/noticeInfo/queryNoticeInfoList?pageSize=10&pageNumber=1¬iceType=${type}&sort=DESC`; @@ -36,9 +44,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: '浙江土地使用权挂牌公告', link: host, item: items, - }); -}; + }; +} diff --git a/lib/routes/zjgtjy/maintainer.ts b/lib/routes/zjgtjy/maintainer.ts deleted file mode 100644 index e763c2f26..000000000 --- a/lib/routes/zjgtjy/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:type?': ['Fatpandac'], -}; diff --git a/lib/routes/zjgtjy/namespace.ts b/lib/routes/zjgtjy/namespace.ts new file mode 100644 index 000000000..36caf6f7f --- /dev/null +++ b/lib/routes/zjgtjy/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浙江省土地使用权网上交易系统', + url: 'zjgtjy.cn', +}; diff --git a/lib/routes/zjgtjy/radar.ts b/lib/routes/zjgtjy/radar.ts deleted file mode 100644 index d8e672d93..000000000 --- a/lib/routes/zjgtjy/radar.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default { - 'zjgtjy.cn': { - _name: '浙江省土地使用权网上交易系统', - '.': [ - { - title: '全部更新', - docs: 'https://docs.rsshub.app/routes/government', - source: '/', - target: '/zjgtjy/all', - }, - { - title: '挂牌公告', - docs: 'https://docs.rsshub.app/routes/government', - source: '/', - target: '/zjgtjy/gpgg', - }, - { - title: '拍卖公告', - docs: 'https://docs.rsshub.app/routes/government', - source: '/', - target: '/zjgtjy/pmgg', - }, - { - title: '补充公告', - docs: 'https://docs.rsshub.app/routes/government', - source: '/', - target: '/zjgtjy/bcgg', - }, - ], - }, -}; diff --git a/lib/routes/zjgtjy/router.ts b/lib/routes/zjgtjy/router.ts deleted file mode 100644 index 6fd05f06e..000000000 --- a/lib/routes/zjgtjy/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/:type?', './index'); -}; diff --git a/lib/routes/zjol/maintainer.ts b/lib/routes/zjol/maintainer.ts deleted file mode 100644 index c7c2b8b33..000000000 --- a/lib/routes/zjol/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/paper/:id?': ['nczitzk'], -}; diff --git a/lib/routes/zjol/namespace.ts b/lib/routes/zjol/namespace.ts new file mode 100644 index 000000000..a9276423a --- /dev/null +++ b/lib/routes/zjol/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浙江在线', + url: 'zjol.com.cn', +}; diff --git a/lib/routes/zjol/paper.ts b/lib/routes/zjol/paper.ts index cba5eecb1..11b3b0eac 100644 --- a/lib/routes/zjol/paper.ts +++ b/lib/routes/zjol/paper.ts @@ -1,9 +1,31 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/paper/:id?', + categories: ['traditional-media'], + example: '/zjol/paper/zjrb', + parameters: { id: '报纸 id,见下表,默认为 `zjrb`,即浙江日报' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '浙报集团系列报刊', + maintainers: ['nczitzk'], + handler, + description: `| 浙江日报 | 钱江晚报 | 美术报 | 浙江老年报 | 浙江法制报 | 江南游报 | + | -------- | -------- | ------ | ---------- | ---------- | -------- | + | zjrb | qjwb | msb | zjlnb | zjfzb | jnyb |`, +}; + +async function handler(ctx) { const id = ctx.req.param('id') ?? 'zjrb'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; @@ -86,9 +108,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: $('title').text(), link: rootUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zjol/radar.ts b/lib/routes/zjol/radar.ts deleted file mode 100644 index 78df64261..000000000 --- a/lib/routes/zjol/radar.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default { - 'zjol.com.cn': { - _name: '浙江在线', - '.': [ - { - title: '浙报集团系列报刊', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: (params, url) => `/zjol/paper/${new URL(url).toString().match(/\/\/(.*?)\.zjol/)[1]}`, - }, - ], - zjrb: [ - { - title: '浙江日报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/zjrb', - }, - ], - qjwb: [ - { - title: '钱江晚报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/qjwb', - }, - ], - msb: [ - { - title: '美术报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/msb', - }, - ], - zjlnb: [ - { - title: '浙江老年报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/zjlnb', - }, - ], - zjfzb: [ - { - title: '浙江法制报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/zjfzb', - }, - ], - jnyb: [ - { - title: '江南游报', - docs: 'https://docs.rsshub.app/routes/traditional-media#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan', - source: ['/'], - target: '/zjol/paper/jnyb', - }, - ], - }, -}; diff --git a/lib/routes/zjol/router.ts b/lib/routes/zjol/router.ts deleted file mode 100644 index 98a5ec9fb..000000000 --- a/lib/routes/zjol/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/paper/:id?', './paper'); -}; diff --git a/lib/routes/zju/career/index.ts b/lib/routes/zju/career/index.ts index 70a4cd0e5..f934986a7 100644 --- a/lib/routes/zju/career/index.ts +++ b/lib/routes/zju/career/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -12,7 +13,28 @@ const map = new Map([ [4, { title: '浙大就业服务平台 -- 告示通告', id: 'lmjdid=739BEBB72A252B25E0538713470A6C41&sjlmid=undefined&lmtype=2&lx=2' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/career/:type', + categories: ['university'], + example: '/zju/career/1', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '就业服务平台', + maintainers: ['Caicailiushui'], + handler, + description: `| 新闻动态 | 活动通知 | 学院通知 | 告示通知 | + | -------- | -------- | -------- | -------- | + | 1 | 2 | 3 | 4 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const id = map.get(type).id; const res = await got(`${host}${id}`); @@ -35,9 +57,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: map.get(type).title, link: `${host}${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zju/cst/custom.ts b/lib/routes/zju/cst/custom.ts index e5c071724..26c0bc5ec 100644 --- a/lib/routes/zju/cst/custom.ts +++ b/lib/routes/zju/cst/custom.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -30,7 +31,30 @@ async function getPage(id) { ); } -export default async (ctx) => { +export const route: Route = { + path: '/cst/custom/:id', + categories: ['university'], + example: '/zju/cst/custom/36194+36241+36246', + parameters: { id: '提取出通知页面中的 `ID`,如 `http://www.cst.zju.edu.cn/36246/list.htm` 中的 `36246`,可将你想获取通知的多个页面,通过 `+` 符号来聚合。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '软件学院', + maintainers: ['zwithz'], + handler, + description: `| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | + | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | + +#### 自定义聚合通知 {#zhe-jiang-da-xue-ruan-jian-xue-yuan-zi-ding-yi-ju-he-tong-zhi}`, +}; + +async function handler(ctx) { const id = ctx.req.param('id').split('+'); const tasks = id.map((id) => getPage(id)); const results = await Promise.all(tasks); @@ -39,9 +63,9 @@ export default async (ctx) => { items = [...items, ...result]; } - ctx.set('data', { + return { title: '浙江大学软件学院通知', link: 'http://www.cst.zju.edu.cn/', item: items, - }); -}; + }; +} diff --git a/lib/routes/zju/cst/index.ts b/lib/routes/zju/cst/index.ts index b9b622733..34bdb57da 100644 --- a/lib/routes/zju/cst/index.ts +++ b/lib/routes/zju/cst/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -43,7 +44,25 @@ async function getPage(id) { ); } -export default async (ctx) => { +export const route: Route = { + path: '/cst/:type', + categories: ['university'], + example: '/zju/cst/0', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Unknown', + maintainers: ['yonvenne', 'zwithz'], + handler, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const link = host + map.get(type).id; let items = []; @@ -77,9 +96,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: map.get(type).title, link, item: out, - }); -}; + }; +} diff --git a/lib/routes/zju/grs/index.ts b/lib/routes/zju/grs/index.ts index 78726cdfa..afe65543b 100644 --- a/lib/routes/zju/grs/index.ts +++ b/lib/routes/zju/grs/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -13,7 +14,28 @@ const map = new Map([ [5, { title: '浙大研究生院 -- 海外交流', tag: 'hwjl' }], ]); -export default async (ctx) => { +export const route: Route = { + path: '/grs/:type', + categories: ['university'], + example: '/zju/grs/1', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生院', + maintainers: ['Caicailiushui'], + handler, + description: `| 全部公告 | 教学管理 | 各类资助 | 学科建设 | 海外交流 | + | -------- | -------- | -------- | -------- | -------- | + | 1 | 2 | 3 | 4 | 5 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const tag = map.get(type).tag; const url = `${host}${tag}/list.htm`; @@ -36,9 +58,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: map.get(type).title, link: `${host}${tag}/list.htm`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zju/list.ts b/lib/routes/zju/list.ts index 0643b1ccc..d341f6d14 100644 --- a/lib/routes/zju/list.ts +++ b/lib/routes/zju/list.ts @@ -1,9 +1,28 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const host = 'https://www.zju.edu.cn/'; -export default async (ctx) => { +export const route: Route = { + path: '/list/:type', + categories: ['university'], + example: '/zju/list/xs', + parameters: { type: '`xs`为学术,`xw`为新闻,`5461`是图片新闻,`578`是浙大报道,具体参数参考左侧的菜单' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '普通栏目 如学术 / 图片 / 新闻等', + maintainers: ['Jeason0228'], + handler, +}; + +async function handler(ctx) { const type = ctx.req.param('type') ?? 'xs'; const link = host + type + `/list.htm`; const response = await got({ @@ -55,9 +74,9 @@ export default async (ctx) => { }); }) ); - ctx.set('data', { + return { title: `浙江大学` + $('ul.submenu .selected').text(), link, item: out, - }); -}; + }; +} diff --git a/lib/routes/zju/maintainer.ts b/lib/routes/zju/maintainer.ts deleted file mode 100644 index 6a41db76e..000000000 --- a/lib/routes/zju/maintainer.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - '/career/:type': ['Caicailiushui'], - '/cst/custom/:id': ['zwithz'], - '/cst/:type': ['yonvenne', 'zwithz'], - '/grs/:type': ['Caicailiushui'], - '/list/:type': ['Jeason0228'], - '/physics/:type': ['Caicailiushui'], -}; diff --git a/lib/routes/zju/namespace.ts b/lib/routes/zju/namespace.ts new file mode 100644 index 000000000..f73eb4aab --- /dev/null +++ b/lib/routes/zju/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浙江大学', + url: 'physics.zju.edu.cn', +}; diff --git a/lib/routes/zju/physics/index.ts b/lib/routes/zju/physics/index.ts index bf83b7ac6..88110e006 100644 --- a/lib/routes/zju/physics/index.ts +++ b/lib/routes/zju/physics/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -22,7 +23,28 @@ const map = new Map([ [11, { title: '浙大物理学院 -- 学术报告', id: '3735' }],*/ ]); -export default async (ctx) => { +export const route: Route = { + path: '/physics/:type', + categories: ['university'], + example: '/zju/physics/1', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '物理学院', + maintainers: ['Caicailiushui'], + handler, + description: `| 本院动态 | 科研进展 | 研究生教育最新消息 | + | -------- | -------- | ------------------ | + | 1 | 2 | 3 |`, +}; + +async function handler(ctx) { const type = Number.parseInt(ctx.req.param('type')); const id = map.get(type).id; const res = await got({ @@ -44,9 +66,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: map.get(type).title, link: `${host}${id}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zju/radar.ts b/lib/routes/zju/radar.ts deleted file mode 100644 index b93504133..000000000 --- a/lib/routes/zju/radar.ts +++ /dev/null @@ -1,139 +0,0 @@ -export default { - 'zju.edu.cn': { - _name: '浙江大学', - physics: [ - { - title: '物理学院', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: ['/*path'], - target: (params) => { - let type; - switch (params.path) { - case '39060/list.htm': - type = '1'; - break; - case '39070/list.htm': - type = '2'; - break; - case '39079/list.htm': - type = '3'; - break; - default: - type = '1'; - break; - } - return `/zju/physics/${type}`; - }, - }, - ], - www: [ - { - title: '普通栏目', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: ['/*path'], - target: (params) => `/zju/list/${params.path.replace('/list.htm', '')}`, - }, - ], - 'www.career': [ - { - title: '就业服务平台', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: ['/'], - target: '/zju/career/1', - }, - ], - 'www.cst': [ - { - title: '软件学院 - 全部通知', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: ['/*'], - target: '/zju/cst/0', - }, - { - title: '软件学院 - 招生信息', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/32178/list.htm', - target: '/zju/cst/1', - }, - { - title: '软件学院 - 教务管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36216/list.htm', - target: '/zju/cst/2', - }, - { - title: '软件学院 - 论文管理', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36217/list.htm', - target: '/zju/cst/3', - }, - { - title: '软件学院 - 思政工作', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36192/list.htm', - target: '/zju/cst/4', - }, - { - title: '软件学院 - 评奖评优', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36228/list.htm', - target: '/zju/cst/5', - }, - { - title: '软件学院 - 实习就业', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36193/list.htm', - target: '/zju/cst/6', - }, - { - title: '软件学院 - 国际实习', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36235/list.htm', - target: '/zju/cst/7', - }, - { - title: '软件学院 - 国内合作科研', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36194/list.htm', - target: '/zju/cst/8', - }, - { - title: '软件学院 - 国际合作科研', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: '/36246/list.htm', - target: '/zju/cst/9', - }, - ], - 'www.grs': [ - { - title: '研究生院', - docs: 'https://docs.rsshub.app/routes/university#zhe-jiang-da-xue', - source: ['/*path', '/'], - target: (params) => { - let type; - switch (params.path) { - case 'qbgg/list.htm': - type = 1; - break; - case 'jxgl/list.htm': - type = 2; - break; - case 'glzz/list.htm': - type = 3; - break; - case 'xkjs/list.htm': - type = 4; - break; - case 'hwjl/list.htm': - type = 5; - break; - default: - type = 1; - break; - } - return `/zju/grs/${type}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/zju/router.ts b/lib/routes/zju/router.ts deleted file mode 100644 index 35b917cf4..000000000 --- a/lib/routes/zju/router.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (router) => { - router.get('/career/:type', './career'); - router.get('/cst/custom/:id', './cst/custom'); - router.get('/cst/:type', './cst'); - router.get('/grs/:type', './grs'); - router.get('/list/:type', './list'); - router.get('/physics/:type', './physics'); -}; diff --git a/lib/routes/zjuvag/blog.ts b/lib/routes/zjuvag/blog.ts index 03ca97ca4..b583bbe4c 100644 --- a/lib/routes/zjuvag/blog.ts +++ b/lib/routes/zjuvag/blog.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; // 导入必要的模组 import got from '@/utils/got'; // 自订的 got import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析器 import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -export default async (ctx) => { +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/zjuvag/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '博客', + maintainers: ['KaiyoungYu'], + handler, +}; + +async function handler() { const baseUrl = 'https://zjuvag.org/blog/'; const { data: response } = await got(baseUrl); const $ = load(response); @@ -24,10 +43,10 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { // 在此处输出您的 RSS title: '浙江大学可视分析小组博客', link: 'https://zjuvag.org/blog/', item: items, - }); -}; + }; +} diff --git a/lib/routes/zjuvag/maintainer.ts b/lib/routes/zjuvag/maintainer.ts deleted file mode 100644 index 64a2470a2..000000000 --- a/lib/routes/zjuvag/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/blog': ['KaiyoungYu'], -}; diff --git a/lib/routes/zjuvag/namespace.ts b/lib/routes/zjuvag/namespace.ts new file mode 100644 index 000000000..911d9abb1 --- /dev/null +++ b/lib/routes/zjuvag/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '浙江大学可视分析小组', + url: 'zjuvag.org', +}; diff --git a/lib/routes/zjuvag/radar.ts b/lib/routes/zjuvag/radar.ts deleted file mode 100644 index 5a2a11e2b..000000000 --- a/lib/routes/zjuvag/radar.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - 'zjuvag.org': { - _name: '浙江大学可视分析小组', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu', - }, - ], - }, -}; diff --git a/lib/routes/zjuvag/router.ts b/lib/routes/zjuvag/router.ts deleted file mode 100644 index da5910733..000000000 --- a/lib/routes/zjuvag/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/blog', './blog'); -}; diff --git a/lib/routes/zodgame/forum.ts b/lib/routes/zodgame/forum.ts index fc6839ee3..df133380a 100644 --- a/lib/routes/zodgame/forum.ts +++ b/lib/routes/zodgame/forum.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,7 +11,25 @@ import * as path from 'node:path'; const rootUrl = 'https://zodgame.xyz'; -export default async (ctx) => { +export const route: Route = { + path: '/forum/:fid?', + categories: ['bbs'], + example: '/zodgame/forum/13', + parameters: { fid: 'forum id, can be found in URL' }, + features: { + requireConfig: true, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'forum', + maintainers: ['FeCCC'], + handler, +}; + +async function handler(ctx) { const fid = ctx.req.param('fid'); const subUrl = `${rootUrl}/api/mobile/index.php?version=4&module=forumdisplay&fid=${fid}`; const cookie = config.zodgame.cookie; @@ -88,9 +107,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `${info.forum.name} - ZodGame论坛`, link: `${rootUrl}/forum.php?mod=forumdisplay&fid=${fid}`, item: items, - }); -}; + }; +} diff --git a/lib/routes/zodgame/maintainer.ts b/lib/routes/zodgame/maintainer.ts deleted file mode 100644 index 3a7191369..000000000 --- a/lib/routes/zodgame/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/forum/:fid?': ['FeCCC'], -}; diff --git a/lib/routes/zodgame/namespace.ts b/lib/routes/zodgame/namespace.ts new file mode 100644 index 000000000..a9c4ce7bb --- /dev/null +++ b/lib/routes/zodgame/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ZodGame', + url: 'zodgame.xyz', +}; diff --git a/lib/routes/zodgame/radar.ts b/lib/routes/zodgame/radar.ts deleted file mode 100644 index 89353ab9e..000000000 --- a/lib/routes/zodgame/radar.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default { - 'zodgame.xyz': { - _name: 'zodgame', - '.': [ - { - title: '论坛版块', - docs: 'https://docs.rsshub.app/routes/bbs#zodgame', - source: '/forum.php', - target: (params, url) => { - const fid = new URL(url).searchParams.get('fid'); - if (fid) { - return `/zodgame/forum/${fid}`; - } - }, - }, - ], - }, -}; diff --git a/lib/routes/zodgame/router.ts b/lib/routes/zodgame/router.ts deleted file mode 100644 index 4b9bc76fa..000000000 --- a/lib/routes/zodgame/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/forum/:fid?', './forum'); -}; diff --git a/lib/routes/zotero/maintainer.ts b/lib/routes/zotero/maintainer.ts deleted file mode 100644 index 44a7fd51d..000000000 --- a/lib/routes/zotero/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/versions': ['jasongzy'], -}; diff --git a/lib/routes/zotero/namespace.ts b/lib/routes/zotero/namespace.ts new file mode 100644 index 000000000..ad2b5b6dd --- /dev/null +++ b/lib/routes/zotero/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Zotero', + url: 'zotero.org', +}; diff --git a/lib/routes/zotero/radar.ts b/lib/routes/zotero/radar.ts deleted file mode 100644 index 5aeeb1222..000000000 --- a/lib/routes/zotero/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zotero.org': { - _name: 'Zotero', - '.': [ - { - title: 'Version History', - docs: 'https://docs.rsshub.app/routes/program-update#zotero', - source: ['/', '/support/changelog'], - target: '/zotero/versions', - }, - ], - }, -}; diff --git a/lib/routes/zotero/router.ts b/lib/routes/zotero/router.ts deleted file mode 100644 index dc368bb5a..000000000 --- a/lib/routes/zotero/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/versions', './versions'); -}; diff --git a/lib/routes/zotero/versions.ts b/lib/routes/zotero/versions.ts index 4fdf7e7a8..167bb79db 100644 --- a/lib/routes/zotero/versions.ts +++ b/lib/routes/zotero/versions.ts @@ -1,14 +1,37 @@ +import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/versions', + categories: ['program-update'], + example: '/zotero/versions', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['zotero.org/', 'zotero.org/support/changelog'], + }, + name: 'Version History', + maintainers: ['jasongzy'], + handler, + url: 'zotero.org/', +}; + +async function handler() { const url = 'https://www.zotero.org/support/changelog'; const response = await got(url); const data = response.data; const $ = load(data); const list = $('h2'); - ctx.set('data', { + return { title: 'Zotero - Version History', link: url, item: @@ -28,5 +51,5 @@ export default async (ctx) => { }; }) .get(), - }); -}; + }; +} diff --git a/lib/routes/zrblog/maintainer.ts b/lib/routes/zrblog/maintainer.ts deleted file mode 100644 index 76d62c6b1..000000000 --- a/lib/routes/zrblog/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/': ['cnkmmk'], -}; diff --git a/lib/routes/zrblog/namespace.ts b/lib/routes/zrblog/namespace.ts new file mode 100644 index 000000000..6d9be6adb --- /dev/null +++ b/lib/routes/zrblog/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '赵容部落', + url: 'zrblog.net', +}; diff --git a/lib/routes/zrblog/radar.ts b/lib/routes/zrblog/radar.ts deleted file mode 100644 index 949d7c9db..000000000 --- a/lib/routes/zrblog/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zrblog.net': { - _name: '赵容部落', - '.': [ - { - title: '博客', - docs: 'https://docs.rsshub.app/routes/blog#zhao-rong-bu-luo', - source: ['/'], - target: '/zrblog', - }, - ], - }, -}; diff --git a/lib/routes/zrblog/router.ts b/lib/routes/zrblog/router.ts deleted file mode 100644 index 09c585b57..000000000 --- a/lib/routes/zrblog/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/', './rss'); -}; diff --git a/lib/routes/zrblog/rss.ts b/lib/routes/zrblog/rss.ts index 3a0704c3b..676752380 100644 --- a/lib/routes/zrblog/rss.ts +++ b/lib/routes/zrblog/rss.ts @@ -1,8 +1,21 @@ +import { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; -export default async (ctx) => { +export const route: Route = { + path: '/', + radar: { + source: ['zrblog.net/'], + target: '', + }, + name: 'Unknown', + maintainers: ['cnkmmk'], + handler, + url: 'zrblog.net/', +}; + +async function handler() { const url = 'https://www.zrblog.net/'; const response = await got({ method: 'get', url }); const $ = load(response.data); @@ -24,9 +37,9 @@ export default async (ctx) => { }) .get(); - ctx.set('data', { + return { title: '赵容部落', link: url, item: list, - }); -}; + }; +} diff --git a/lib/routes/zuel/maintainer.ts b/lib/routes/zuel/maintainer.ts deleted file mode 100644 index e7c040f22..000000000 --- a/lib/routes/zuel/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/notice': ['nczitzk'], -}; diff --git a/lib/routes/zuel/namespace.ts b/lib/routes/zuel/namespace.ts new file mode 100644 index 000000000..91d26273c --- /dev/null +++ b/lib/routes/zuel/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中南财经政法大学', + url: 'wap.zuel.edu.cn', +}; diff --git a/lib/routes/zuel/notice.ts b/lib/routes/zuel/notice.ts index 2f7e77e1b..037a8bf66 100644 --- a/lib/routes/zuel/notice.ts +++ b/lib/routes/zuel/notice.ts @@ -1,9 +1,32 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export default async (ctx) => { +export const route: Route = { + path: '/notice', + categories: ['university'], + example: '/zuel/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: { + source: ['wap.zuel.edu.cn/', 'wap.zuel.edu.cn/notice/list.htm'], + }, + name: '通知公告', + maintainers: ['nczitzk'], + handler, + url: 'wap.zuel.edu.cn/', +}; + +async function handler() { const rootUrl = 'http://wap.zuel.edu.cn'; const currentUrl = `${rootUrl}/notice/list.htm`; @@ -45,9 +68,9 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: '中南财经大学 - 通知公告', link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zuel/radar.ts b/lib/routes/zuel/radar.ts deleted file mode 100644 index 5b0c97617..000000000 --- a/lib/routes/zuel/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zuel.edu.cn': { - _name: '中南财经政法大学', - wap: [ - { - title: '通知公告', - docs: 'https://docs.rsshub.app/routes/univeristy#zhong-nan-cai-jing-zheng-fa-da-xue-tong-zhi-gong-gao', - source: ['/', '/notice/list.htm'], - target: '/zuel/notice', - }, - ], - }, -}; diff --git a/lib/routes/zuel/router.ts b/lib/routes/zuel/router.ts deleted file mode 100644 index 542a85d08..000000000 --- a/lib/routes/zuel/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/notice', './notice'); -}; diff --git a/lib/routes/zuvio/boards.ts b/lib/routes/zuvio/boards.ts index 6748f4af3..f34611841 100644 --- a/lib/routes/zuvio/boards.ts +++ b/lib/routes/zuvio/boards.ts @@ -1,15 +1,34 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import { getBoards, rootUrl } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/student5/boards', + categories: ['bbs'], + example: '/zuvio/student5/boards', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '看板列表', + maintainers: ['TonyRL'], + handler, +}; + +async function handler() { const items = await getBoards(cache.tryGet); - ctx.set('data', { + return { title: 'Zuvio 校園話題列表 - 大學生論壇', description: 'Zuvio 校園話題,Zuvio 校園話題千種動物頭像交流心得。最萌的匿名論壇,上千種逗趣動物頭像隨你變換,點頭像立即私訊功能,讓你找到共同話題的小夥伴!多人分享配對心得、聊天交友心情在此,快加入17分享!', image: 'https://s3.hicloud.net.tw/zuvio.public/public/system/images/irs_v4/chicken/shared/webshare.png', link: `${rootUrl}/articles`, item: items, language: 'zh-Hant', - }); -}; + }; +} diff --git a/lib/routes/zuvio/maintainer.ts b/lib/routes/zuvio/maintainer.ts deleted file mode 100644 index 0df1831e1..000000000 --- a/lib/routes/zuvio/maintainer.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - '/student5/boards': ['TonyRL'], - '/student5/:board?': ['TonyRL'], -}; diff --git a/lib/routes/zuvio/namespace.ts b/lib/routes/zuvio/namespace.ts new file mode 100644 index 000000000..a61932d47 --- /dev/null +++ b/lib/routes/zuvio/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Zuvio', + url: 'irs.zuvio.com.tw', +}; diff --git a/lib/routes/zuvio/radar.ts b/lib/routes/zuvio/radar.ts deleted file mode 100644 index 4f6c115f0..000000000 --- a/lib/routes/zuvio/radar.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - 'zuvio.com.tw': { - _name: 'Zuvio', - irs: [ - { - title: '校園話題', - docs: 'https://docs.rsshub.app/routes/bbs#zuvio', - source: ['/student5/chickenM/articles/:board', '/student5/chickenM/articles'], - target: (params) => `/zuvio/student5${params.board ? `/${params.board}` : ''}`, - }, - ], - }, -}; diff --git a/lib/routes/zuvio/router.ts b/lib/routes/zuvio/router.ts deleted file mode 100644 index 7564a9606..000000000 --- a/lib/routes/zuvio/router.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default (router) => { - router.get('/student5/boards', './boards'); - router.get('/student5/:board?', './student5'); -}; diff --git a/lib/routes/zuvio/student5.ts b/lib/routes/zuvio/student5.ts index 60dc6184c..03801d45d 100644 --- a/lib/routes/zuvio/student5.ts +++ b/lib/routes/zuvio/student5.ts @@ -1,10 +1,29 @@ +import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { token, apiUrl, rootUrl, renderDesc, getBoards } from './utils'; -export default async (ctx) => { +export const route: Route = { + path: '/student5/:board?', + categories: ['bbs'], + example: '/zuvio/student5/34', + parameters: { board: '看板 ID,空为全站文章,可在看板 URL 或下方路由找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '校園話題', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { const { board = '' } = ctx.req.param(); const title = board ? (await getBoards(cache.tryGet)).find((i) => i.boardId === board).title : '全部'; @@ -48,12 +67,12 @@ export default async (ctx) => { ) ); - ctx.set('data', { + return { title: `Zuvio 校園${title}話題 - 大學生論壇`, description: 'Zuvio 校園話題千種動物頭像交流心得。最萌的匿名論壇,上千種逗趣動物頭像隨你變換,點頭像立即私訊功能,讓你找到共同話題的小夥伴!多人分享配對心得、聊天交友心情在此,快加入17分享!', image: 'https://s3.hicloud.net.tw/zuvio.public/public/system/images/irs_v4/chicken/shared/webshare.png', link: `${rootUrl}/articles`, item: items, language: 'zh-Hant', - }); -}; + }; +} diff --git a/lib/routes/zyshow/index.ts b/lib/routes/zyshow/index.ts index cb9ea80f6..c2082f766 100644 --- a/lib/routes/zyshow/index.ts +++ b/lib/routes/zyshow/index.ts @@ -1,3 +1,4 @@ +import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -8,7 +9,14 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; -export default async (ctx) => { +export const route: Route = { + path: '*', + name: 'Unknown', + maintainers: [], + handler, +}; + +async function handler(ctx) { const rootUrl = 'http://www.zyshow.net'; const currentUrl = `${rootUrl}${getSubPath(ctx).replace(/\/$/, '')}/`; @@ -42,9 +50,9 @@ export default async (ctx) => { }; }); - ctx.set('data', { + return { title: `综艺秀 - ${$('h2').text()}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zyshow/maintainer.ts b/lib/routes/zyshow/maintainer.ts deleted file mode 100644 index 2591a489e..000000000 --- a/lib/routes/zyshow/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/:region?/:id': ['nczitzk'], -}; diff --git a/lib/routes/zyshow/namespace.ts b/lib/routes/zyshow/namespace.ts new file mode 100644 index 000000000..cc8275ae6 --- /dev/null +++ b/lib/routes/zyshow/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '综艺秀', + url: 'zyshow.net', +}; diff --git a/lib/routes/zyshow/radar.ts b/lib/routes/zyshow/radar.ts deleted file mode 100644 index fc3f3073f..000000000 --- a/lib/routes/zyshow/radar.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'zyshow.net': { - _name: '综艺秀', - '.': [ - { - title: '综艺', - docs: 'https://docs.rsshub.app/routes/multimedia#zong-yi-xiu-zong-yi', - source: ['/:region/:id', '/:id', '/'], - target: (params, url) => - `/zyshow/${new URL(url) - .toString() - .split(/zyshow\.net/) - .pop()}`, - }, - ], - }, -}; diff --git a/lib/routes/zyshow/router.ts b/lib/routes/zyshow/router.ts deleted file mode 100644 index 6f45ba54b..000000000 --- a/lib/routes/zyshow/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('*', './index'); -}; diff --git a/lib/routes/zyw/hot.ts b/lib/routes/zyw/hot.ts index 0fc948b86..6e5c2e6a0 100644 --- a/lib/routes/zyw/hot.ts +++ b/lib/routes/zyw/hot.ts @@ -1,6 +1,31 @@ +import { Route } from '@/types'; import got from '@/utils/got'; -export default async (ctx) => { +export const route: Route = { + path: '/hot/:site?', + categories: ['new-media'], + example: '/zyw/hot', + parameters: { site: '站点,见下表,默认为空,即全部' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '今日热榜', + maintainers: ['nczitzk'], + handler, + description: `:::tip + 全部站点请见 [此处](https://hot.zyw.asia/#/list) + ::: + + | 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 | + | -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- |`, +}; + +async function handler(ctx) { const site = ctx.req.param('site') ?? ''; const rootUrl = 'https://hot.zyw.asia'; @@ -55,9 +80,9 @@ export default async (ctx) => { }) ); - ctx.set('data', { + return { title: `今日热榜${site ? ` - ${sites[0].label}` : ''}`, link: currentUrl, item: items, - }); -}; + }; +} diff --git a/lib/routes/zyw/maintainer.ts b/lib/routes/zyw/maintainer.ts deleted file mode 100644 index b48ea3c73..000000000 --- a/lib/routes/zyw/maintainer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - '/hot/:site?': ['nczitzk'], -}; diff --git a/lib/routes/zyw/namespace.ts b/lib/routes/zyw/namespace.ts new file mode 100644 index 000000000..eb270d22d --- /dev/null +++ b/lib/routes/zyw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'zyw', + url: 'hot.zyw.asia', +}; diff --git a/lib/routes/zyw/radar.ts b/lib/routes/zyw/radar.ts deleted file mode 100644 index 17ed5642e..000000000 --- a/lib/routes/zyw/radar.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'zyw.asia': { - _name: 'zyw', - hot: [ - { - title: '今日热榜', - docs: 'https://docs.rsshub.app/routes/new-media#zyw-jin-ri-re-bang', - source: ['/'], - target: (params, url) => { - const matches = new URL(url).href.match(/type=(\w+)/); - return `/zyw/hot${matches ? `/${matches[1]}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/routes/zyw/router.ts b/lib/routes/zyw/router.ts deleted file mode 100644 index 3ae929b35..000000000 --- a/lib/routes/zyw/router.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (router) => { - router.get('/hot/:site?', './hot'); -}; diff --git a/lib/types.ts b/lib/types.ts index bc708f727..d59aefaa8 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,3 +1,5 @@ +import type { Context } from 'hono'; + export type DataItem = { title: string; description?: string; @@ -43,3 +45,52 @@ export type Data = { feedLink?: string; lastBuildDate?: string; }; + +interface NamespaceItem { + name: string; + url?: string; + categories?: string[]; + description?: string; +} + +interface Namespace extends NamespaceItem { + ja?: NamespaceItem; + zh?: NamespaceItem; + 'zh-TW'?: NamespaceItem; +} + +export type { Namespace }; + +interface RouteItem { + path: string | string[]; + name: string; + url?: string; + maintainers: string[]; + handler: (ctx: Context) => Promise<Data> | Data; + example: string; + parameters?: Record<string, string>; + description?: string; + categories?: string[]; + + features: { + requireConfig?: string[] | false; + requirePuppeteer?: boolean; + antiCrawler?: boolean; + supportRadar?: boolean; + supportBT?: boolean; + supportPodcast?: boolean; + supportScihub?: boolean; + }; + radar?: { + source: string[]; + target?: string; + }; +} + +interface Route extends RouteItem { + ja?: NamespaceItem; + zh?: NamespaceItem; + 'zh-TW'?: NamespaceItem; +} + +export type { Route }; diff --git a/package.json b/package.json index 50f3b4cbd..9c208fc3b 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,7 @@ "lib" ], "scripts": { - "build:all": "npm run build:radar && npm run build:maintainer", - "build:maintainer": "tsx scripts/workflow/build-maintainer.ts", - "build:radar": "tsx scripts/workflow/build-radar.ts", + "build": "tsx scripts/workflow/build-routes.ts", "dev": "cross-env NODE_ENV=dev tsx watch --no-cache lib/index.ts", "format": "eslint --cache --fix \"**/*.{ts,js,yml}\" && node website/docs/.format/format.mjs && prettier \"**/*.{ts,js,json}\" --write", "format:check": "eslint --cache \"**/*.{ts,js,yml}\" && prettier \"**/*.{ts,js,json}\" --check", @@ -33,7 +31,7 @@ "lint": "eslint --cache .", "prepare": "husky || true", "profiling": "NODE_ENV=production tsx --prof lib/index.ts", - "start": "tsx lib/index.ts", + "start": "cross-env NODE_ENV=production tsx lib/index.ts", "test": "npm run format:check && npm run vitest:coverage" }, "lint-staged": { @@ -175,6 +173,7 @@ "staged-git-files": "1.3.0", "string-width": "7.1.0", "supertest": "6.3.4", + "tldts": "6.1.13", "to-vfile": "8.0.0", "tosource": "2.0.0-alpha.3", "typescript": "5.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79af31e8b..4a9e1b429 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,6 +379,9 @@ devDependencies: supertest: specifier: 6.3.4 version: 6.3.4 + tldts: + specifier: 6.1.13 + version: 6.1.13 to-vfile: specifier: 8.0.0 version: 8.0.0 @@ -9437,6 +9440,17 @@ packages: hasBin: true dev: false + /tldts-core@6.1.13: + resolution: {integrity: sha512-M1XP4D13YtXARKroULnLsKKuI1NCRAbJmUGGoXqWinajIDOhTeJf/trYUyBoLVx1/Nx1KBKxCrlW57ZW9cMHAA==} + dev: true + + /tldts@6.1.13: + resolution: {integrity: sha512-+GxHFKVHvUTg2ieNPTx3b/NpZbgJSTZEDdI4cJzTjVYDuxijeHi1tt7CHHsMjLqyc+T50VVgWs3LIb2LrXOzxw==} + hasBin: true + dependencies: + tldts-core: 6.1.13 + dev: true + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} diff --git a/scripts/workflow/build-maintainer.ts b/scripts/workflow/build-maintainer.ts deleted file mode 100644 index 108763ec9..000000000 --- a/scripts/workflow/build-maintainer.ts +++ /dev/null @@ -1,75 +0,0 @@ -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { directoryImport } from 'directory-import'; - -const target = path.join(__dirname, '../../assets/build/maintainer.json'); -const dirname = path.join(__dirname + '../../../lib/routes'); - -// Presence Check -for (const dir of fs.readdirSync(dirname)) { - const dirPath = path.join(dirname, dir); - if (fs.existsSync(path.join(dirPath, 'router.ts')) && !fs.existsSync(path.join(dirPath, 'maintainer.ts'))) { - throw new Error(`No maintainer.ts in "${dirPath}".`); - } -} - -// 遍历整个 routes 文件夹,收集模块 maintainer.ts -// const maintainerPath = require('require-all')({ -// dirname, -// filter: /maintainer\.ts$/, -// }); -const imports = directoryImport({ - targetDirectoryPath: dirname, - importPattern: /maintainer\.ts$/, -}); - -const maintainers = {}; - -// 将收集到的自定义模块进行合并 -for (const dir in imports) { - const routes = imports[dir].default; // Do not merge other file - - // typo check e.g., ✘ module.export, ✔ module.exports - if (!Object.keys(routes).length) { - throw new Error(`No maintainer in "${dir}".`); - } - for (const author of Object.values(routes)) { - if (!Array.isArray(author)) { - throw new TypeError(`Maintainers' name should be an array in "${dir}".`); - } - // check for [], [''] or ['Someone', ''] - if (author.length < 1 || author.includes('')) { - throw new Error(`Empty maintainer in "${dir}".`); - } - } - - for (const key in routes) { - maintainers[dir.replace('/maintainer.ts', '') + (key.endsWith('/') ? key.substring(0, key.length - 1) : key)] = routes[key]; - } -} - -// 兼容旧版路由 -// const router = require('../../lib/router.js'); -// for (const e of router.stack) { -// if (!maintainers[e.path]) { -// maintainers[e.path] = []; -// } -// } - -const maintainer = Object.keys(maintainers) - .sort() - .reduce((obj, path) => { - obj[path] = maintainers[path]; - return obj; - }, {}); - -const count = Object.keys(maintainer).length; -const uniqueMaintainer = new Set(); -for (const e of Object.values(maintainer).flat()) { - uniqueMaintainer.add(e); -} - -// eslint-disable-next-line no-console -console.log(`We have ${count} routes and maintained by ${uniqueMaintainer.size} contributors!`); - -fs.writeFileSync(target, JSON.stringify(maintainer, null, 4)); diff --git a/scripts/workflow/build-radar.ts b/scripts/workflow/build-radar.ts deleted file mode 100644 index 36325907c..000000000 --- a/scripts/workflow/build-radar.ts +++ /dev/null @@ -1,108 +0,0 @@ -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { directoryImport } from 'directory-import'; -import toSource from 'tosource'; - -const targetJs = path.join(__dirname, '../../assets/build/radar-rules.js'); -const targetJson = path.join(__dirname, '../../assets/build/radar-rules.json'); -const dirname = path.join(__dirname + '../../../lib/routes'); - -// Namespaces that do not require radar.ts -const allowNamespace = new Set(['discourse', 'discuz', 'ehentai', 'lemmy', 'mail', 'test', 'index.tsx', 'robots.txt.ts']); -// Check if a radar.ts file is exist under each folder of dirname -for (const dir of fs.readdirSync(dirname)) { - const dirPath = path.join(dirname, dir); - if (!fs.existsSync(path.join(dirPath, 'radar.ts')) && !allowNamespace.has(dir)) { - throw new Error(`No radar.ts in "${dirPath}".`); - } -} - -const validateRadarRules = (rule, dir) => { - const allowDomains = new Set(['www.gov.cn']); - const blockWords = ['/', 'http', 'www']; - const domain = Object.keys(rule); - if (!domain.length && !allowNamespace.has(dir)) { - // typo check e.g., ✘ module.export, ✔ module.exports - throw new Error(`No Radar rule in "${dir}".`); - } - for (const [d, r] of Object.entries(rule)) { - if (blockWords.some((word) => d.startsWith(word)) && !allowDomains.has(d)) { - throw new Error(`Domain name "${d}" should not contain any of ${blockWords.join(', ')}.`); - } - if (!Object.hasOwn(r, '_name')) { - throw new Error(`No _name in "${dir}".`); - } - // property check - for (const [host, items] of Object.entries(r)) { - if (host !== '_name') { - if (!Array.isArray(items)) { - throw new TypeError(`Radar rules for domain "${host}" in "${dir}" should be placed in an array.`); - } - for (const item of items) { - if (!Object.hasOwn(item, 'title') || !Object.hasOwn(item, 'docs')) { - throw new Error(`Radar rules for "${host}" in "${dir}" should have at least "title" and "docs".`); - } - if (!item.title || !item.docs) { - throw new Error(`Radar rules for "${host}" in "${dir}" should not be empty.`); - } - if (!item.docs.startsWith('https://docs.rsshub.app/')) { - throw new Error(`Radar rules for "${host}" in "${dir}" should start with 'https://docs.rsshub.app/'.`); - } - if (Array.isArray(item.source)) { - if (!item.source.length) { - // check for [] - throw new Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`); - } - if (item.source.some((s) => s.includes('#') || s.includes('='))) { - // Some will try to match '/some/path?a=1' which is not supported - throw new Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" cannot match URL hash or URL search parameters.`); - } - if (item.source.some((s) => !s.length)) { - // check for ['/some/thing', ''] and [''] - throw new Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`); - } - } - if (typeof item.source === 'string') { - if (!item.source.length) { - // check for '' - throw new Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`); - } - if (item.source.includes('#') || item.source.includes('=')) { - throw new Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" cannot match URL hash or URL search parameters.`); - } - } - for (const key in item) { - if (key !== 'title' && key !== 'docs' && key !== 'source' && key !== 'target') { - throw new Error(`Radar rules for "${host}" in "${dir}" should not have property "${key}".`); - } - } - } - } - } - } -}; - -// const radarRules = require('require-all')({ -// dirname, -// filter: /radar\.ts$/, -// }); -const imports = directoryImport({ - targetDirectoryPath: dirname, - importPattern: /radar\.ts$/, -}); - -let rules = {}; - -for (const dir in imports) { - const rule = imports[dir].default; // Do not merge other file - - validateRadarRules(rule, dir.replace('/radar.ts', '').replace(/^\//, '')); - - rules = { ...rules, ...rule }; -} - -const oldRules = require('./radar-rules.js'); // Match old rules -rules = { ...rules, ...oldRules }; - -fs.writeFileSync(targetJs, `(${toSource(rules)})`); -fs.writeFileSync(targetJson, JSON.stringify(rules, undefined, 2)); diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts new file mode 100644 index 000000000..192ee335d --- /dev/null +++ b/scripts/workflow/build-routes.ts @@ -0,0 +1,130 @@ +import { namespaces } from '../../lib/registry'; +import { parse } from 'tldts'; +import fs from 'node:fs'; +import * as path from 'node:path'; + +const maintainers: Record<string, string[]> = {}; +const radar: { + [domain: string]: { + _name: string; + [subdomain: string]: + | { + title: string; + docs: string; + source: string[]; + target: string | ((params: any, url: string) => string); + }[] + | string; + }; +} = {}; +const docs = {}; + +for (const namespace in namespaces) { + for (const path in namespaces[namespace].routes) { + const realPath = `/${namespace}${path}`; + const data = namespaces[namespace].routes[path]; + if (data.maintainers) { + maintainers[realPath] = data.maintainers; + } + if (data.radar && data.radar.source) { + const parsedDomain = parse(new URL('https://' + data.radar.source[0]).hostname); + const subdomain = parsedDomain.subdomain || '.'; + const domain = parsedDomain.domain; + if (domain) { + if (!radar[domain]) { + radar[domain] = { + _name: namespaces[namespace].name, + }; + } + if (!radar[domain][subdomain]) { + radar[domain][subdomain] = []; + } + radar[domain][subdomain].push({ + title: data.name, + docs: `https://docs.rsshub.app/routes/${data.categories?.[0] || 'other'}`, + source: data.radar.source.map((source) => { + const sourceURL = new URL('https://' + source); + return sourceURL.pathname + sourceURL.search + sourceURL.hash; + }), + target: data.radar.target || realPath, + }); + } + } + const categories = data.categories || namespaces[namespace].categories || ['other']; + for (const category of categories) { + if (!docs[category]) { + docs[category] = {}; + } + if (!docs[category][namespace]) { + docs[category][namespace] = { + routes: {}, + }; + } + docs[category][namespace].name = namespaces[namespace].name; + docs[category][namespace].description = namespaces[namespace].description; + docs[category][namespace].routes[realPath] = data; + } + } +} + +fs.writeFileSync(path.join(__dirname, '../../assets/build/radar-rules.json'), JSON.stringify(radar, null, 2)); +fs.writeFileSync(path.join(__dirname, '../../assets/build/maintainers.json'), JSON.stringify(maintainers, null, 2)); +fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.json'), JSON.stringify(namespaces, null, 2)); + +const pinyinCompare = new Intl.Collator('zh-Hans-CN-u-co-pinyin').compare; +const isASCII = (str) => /^[\u0000-\u007F]*$/.test(str); + +const md = {}; +for (const category in docs) { + md[category] = `# ${category}\n\n`; + + const namespaces = Object.keys(docs[category]).sort((a, b) => { + const aname = docs[category][a].name[0]; + const bname = docs[category][b].name[0]; + const ia = isASCII(aname); + const ib = isASCII(bname); + if (ia && ib) { + return aname.toLowerCase() < bname.toLowerCase() ? -1 : 1; + } else if (ia || ib) { + return ia > ib ? -1 : 1; + } else { + return pinyinCompare(aname, bname); + } + }); + for (const namespace of namespaces) { + md[category] += `## ${docs[category][namespace].name}\n\n`; + if (docs[category][namespace].description) { + md[category] += `${docs[category][namespace].description}\n\n`; + } + + const realPaths = Object.keys(docs[category][namespace].routes).sort((a, b) => { + const aname = docs[category][namespace].routes[a].name[0]; + const bname = docs[category][namespace].routes[b].name[0]; + const ia = isASCII(aname); + const ib = isASCII(bname); + if (ia && ib) { + return aname.toLowerCase() < bname.toLowerCase() ? -1 : 1; + } else if (ia || ib) { + return ia > ib ? -1 : 1; + } else { + return pinyinCompare(aname, bname); + } + }); + + for (const realPath of realPaths) { + const data = docs[category][namespace].routes[realPath]; + md[category] += `### ${data.name}\n\n`; + md[category] += `<Route namespace="${namespace}" data={${JSON.stringify(data)}} />\n\n`; + if (data.description) { + md[category] += `${data.description}\n\n`; + } + } + } +} + +fs.writeFileSync(path.join(__dirname, '../../assets/build/docs.json'), JSON.stringify(docs, null, 2)); +if (fs.existsSync(path.join(__dirname, '../../website'))) { + for (const category in md) { + fs.writeFileSync(path.join(__dirname, `../../website/docs/routes/${category}.mdx`), md[category]); + } +} diff --git a/website/docs/joinus/advanced/script-standard.md b/website/docs/joinus/advanced/script-standard.md index 2729b86d7..b4c66ae0a 100644 --- a/website/docs/joinus/advanced/script-standard.md +++ b/website/docs/joinus/advanced/script-standard.md @@ -109,7 +109,7 @@ The `maintainer.ts` file should export an object that provides maintainer inform - Key: Corresponding route path - Value: Array of string, including all maintainers' GitHub ID. -To generate a list of maintainers, use the following command: `pnpm run build:maintainer`, which will create the list under `assets/build/`. +To generate a list of maintainers, use the following command: `pnpm run build`, which will create the list under `assets/build/`. :::danger @@ -121,7 +121,7 @@ The path should be the same as the `path` in the corresponding documentation bef All routes are required to include the `radar.ts` file, which includes the corresponding domain name. The minimum requirement for a successful match is for the rule to show up on the corresponding site which requires filling in the `title` and `docs` fields. -To generate a complete `radar-rules.ts` file, use the following command: `yarn build:radar`, which will create the file under `assets/build/`. +To generate a complete `radar-rules.ts` file, use the following command: `yarn build`, which will create the file under `assets/build/`. :::tip diff --git a/website/docs/routes/.gitkeep b/website/docs/routes/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/website/docs/routes/anime.mdx b/website/docs/routes/anime.mdx index f9599ca6d..82d0ba50c 100644 --- a/website/docs/routes/anime.mdx +++ b/website/docs/routes/anime.mdx @@ -1,530 +1,295 @@ -# 🎨️ ACG - -## 005.tv {#005-tv} - -### 二次元资讯 {#005-tv-er-ci-yuan-zi-xun} - -<Route author="junfengP" example="/005tv/zx/latest" path="/005tv/zx/latest" /> - -## 78 动漫 {#78-dong-man} - -### 新品速递 {#78-dong-man-xin-pin-su-di} - -<Route author="nczitzk" example="/78dm/news" path="/78dm/news/:path+" paramsDesc={['参数,见说明,默认为空']}> - :::tip - 若订阅 [新品速递](https://www.78dm.net/news),网址为 `https://www.78dm.net/news`。截取 `https://www.78dm.net` 到末尾的部分 `/news` 作为参数,此时路由为 [`/78dm/news`](https://rsshub.app/78dm/news)。 - - 若订阅子分类 [新品速递 - 综合](https://www.78dm.net/news/0/9/0/0/0/0/0/1.html),网址为 `https://www.78dm.net/news/0/9/0/0/0/0/0/1.html`。截取 `https://www.78dm.net` 到末尾 `.html` 的部分 `/news/0/9/0/0/0/0/0/1` 作为参数,路由为 [`/78dm/news/0/9/0/0/0/0/0/1`](https://rsshub.app/78dm/news/0/9/0/0/0/0/0/1)。 - ::: -</Route> - -### 精彩评测 {#78-dong-man-jing-cai-ping-ce} - -<Route author="nczitzk" example="/78dm/eval_list" path="/78dm/eval_list/:path+" paramsDesc={['参数,见说明,默认为空']}> - :::tip - 若订阅 [精彩评测](https://www.78dm.net/eval_list),网址为 `https://www.78dm.net/eval_list`。截取 `https://www.78dm.net` 到末尾的部分 `/eval_list` 作为参数,此时路由为 [`/78dm/eval_list`](https://rsshub.app/78dm/eval_list)。 - - 若订阅子分类 [精彩评测 - 综合](https://www.78dm.net/eval_list/120/0/0/1.html),网址为 `https://www.78dm.net/eval_list/120/0/0/1.html`。截取 `https://www.78dm.net` 到末尾 `.html` 的部分 `/eval_list/120/0/0/1` 作为参数,路由为 [`/78dm/eval_list/120/0/0/1`](https://rsshub.app/78dm/eval_list/120/0/0/1)。 - ::: -</Route> - -### 好帖推荐 {#78-dong-man-hao-tie-tui-jian} - -<Route author="nczitzk" example="/78dm/ht_list" path="/78dm/ht_list/:path+" paramsDesc={['参数,见说明,默认为空']}> - :::tip - 若订阅 [好帖推荐](https://www.78dm.net/ht_list),网址为 `https://www.78dm.net/ht_list`。截取 `https://www.78dm.net` 到末尾的部分 `/ht_list` 作为参数,此时路由为 [`/78dm/ht_list`](https://rsshub.app/78dm/ht_list)。 - - 若订阅子分类 [好帖推荐 - 综合](https://www.78dm.net/ht_list/107/0/0/1.html),网址为 `https://www.78dm.net/ht_list/107/0/0/1.html`。截取 `https://www.78dm.net` 到末尾 `.html` 的部分 `/ht_list/107/0/0/1` 作为参数,路由为 [`/78dm/ht_list/107/0/0/1`](https://rsshub.app/78dm/ht_list/107/0/0/1)。 - ::: -</Route> +# anime ## AcFun {#acfun} ### 番剧 {#acfun-fan-ju} -<Route author="xyqfer" example="/acfun/bangumi/5022158" path="/acfun/bangumi/:id" paramsDesc={['番剧 id']} radar="1" /> +<Route namespace="acfun" data={{"path":"/bangumi/:id","categories":["anime"],"example":"/acfun/bangumi/5022158","parameters":{"id":"番剧 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"番剧","maintainers":["xyqfer"],"description":":::tip\n番剧 id 不包含开头的 aa。\n例如:`https://www.acfun.cn/bangumi/aa5022158` 的番剧 id 是 5022158,不包括开头的 aa。\n:::","location":"bangumi.ts"}} /> :::tip 番剧 id 不包含开头的 aa。 例如:`https://www.acfun.cn/bangumi/aa5022158` 的番剧 id 是 5022158,不包括开头的 aa。 ::: -### 用户投稿 {#acfun-yong-hu-tou-gao} - -<Route author="wdssmq" example="/acfun/user/video/14450522" path="/acfun/user/video/:id" paramsDesc={['用户 UID']} radar="1" /> - ### 文章 {#acfun-wen-zhang} -<Route author="TonyRL" example="/acfun/article/110" path="/acfun/article/:categoryId/:sortType?/:timeRange?" paramsDesc={['分区 ID,见下表', '排序,见下表,默认为 `createTime`', '时间范围,见下表,仅在排序是 `hotScore` 有效,默认为 `all`']} radar="1"> - | 二次元画师 | 综合 | 生活情感 | 游戏 | 动漫文化 | 漫画文学 | - | ---------- | ---- | -------- | ---- | -------- | -------- | - | 184 | 110 | 73 | 164 | 74 | 75 | +<Route namespace="acfun" data={{"path":"/article/:categoryId/:sortType?/:timeRange?","categories":["anime"],"example":"/acfun/article/110","parameters":{"categoryId":"分区 ID,见下表","sortType":"排序,见下表,默认为 `createTime`","timeRange":"时间范围,见下表,仅在排序是 `hotScore` 有效,默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["TonyRL"],"description":"| 二次元画师 | 综合 | 生活情感 | 游戏 | 动漫文化 | 漫画文学 |\n | ---------- | ---- | -------- | ---- | -------- | -------- |\n | 184 | 110 | 73 | 164 | 74 | 75 |\n\n | 最新发表 | 最新动态 | 最热文章 |\n | ---------- | --------------- | -------- |\n | createTime | lastCommentTime | hotScore |\n\n | 时间不限 | 24 小时 | 三天 | 一周 | 一个月 |\n | -------- | ------- | -------- | ------- | -------- |\n | all | oneDay | threeDay | oneWeek | oneMonth |","location":"article.ts"}} /> - | 最新发表 | 最新动态 | 最热文章 | - | ---------- | --------------- | -------- | - | createTime | lastCommentTime | hotScore | +| 二次元画师 | 综合 | 生活情感 | 游戏 | 动漫文化 | 漫画文学 | +| ---------- | ---- | -------- | ---- | -------- | -------- | +| 184 | 110 | 73 | 164 | 74 | 75 | - | 时间不限 | 24 小时 | 三天 | 一周 | 一个月 | - | -------- | ------- | -------- | ------- | -------- | - | all | oneDay | threeDay | oneWeek | oneMonth | -</Route> +| 最新发表 | 最新动态 | 最热文章 | +| ---------- | --------------- | -------- | +| createTime | lastCommentTime | hotScore | + +| 时间不限 | 24 小时 | 三天 | 一周 | 一个月 | +| -------- | ------- | -------- | ------- | -------- | +| all | oneDay | threeDay | oneWeek | oneMonth | ## ACG17 {#acg17} ### 全部文章 {#acg17-quan-bu-wen-zhang} -<Route author="SunBK201" example="/acg17/post/all" path="/acg17/post/all" radar="1" /> +<Route namespace="acg17" data={{"path":"/post/all","categories":["anime"],"example":"/acg17/post/all","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["acg17.com/post"]},"name":"全部文章","maintainers":["SunBK201"],"url":"acg17.com/post","location":"post.ts"}} /> ## AGE 动漫 {#age-dong-man} -### 最近更新 {#age-dong-man-zui-jin-geng-xin} - -<Route author="nczitzk" example="/agefans/update" path="/agefans/update" /> - ### 番剧详情 {#age-dong-man-fan-ju-xiang-qing} -<Route author="s2marine" example="/agefans/detail/20200035" path="/agefans/detail/:id" paramsDesc={['番剧 id,对应详情 URL 中找到']} /> +<Route namespace="agefans" data={{"path":"/detail/:id","categories":["anime"],"example":"/agefans/detail/20200035","parameters":{"id":"番剧 id,对应详情 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agemys.org/detail/:id"]},"name":"番剧详情","maintainers":["s2marine"],"location":"detail.ts"}} /> -## Anime1 {#anime1} +### 最近更新 {#age-dong-man-zui-jin-geng-xin} -### 動畫 {#anime1-dong-hua} - -<Route author="maple3142" example="/anime1/anime/2018年秋季/哥布林殺手" path="/anime1/anime/:time/:name" paramsDesc={['时间', '动画名称']} radar="1"> - 时间和动画名称请自己从网址取得: `https://anime1.me/category/2018年秋季/刀劍神域-alicization` -</Route> - -### 搜尋 {#anime1-sou-xun} - -<Route author="maple3142" example="/anime1/search/兔女郎學姊" path="/anime1/search/:keyword" paramsDesc={['关键字']} radar="1" /> - -## Anitama {#anitama} - -### Anitama Channel {#anitama-anitama-channel} - -<Route author="ranpox" path="/anitama/:channel?" example="/anitama" paramsDesc={['频道id,从频道的地址栏中查看']} notOperational="1" /> - -## Bangumi Moe 萌番组 {#bangumi-moe-meng-fan-zu} - -### Latest {#bangumi-moe-meng-fan-zu-latest} - -<Route author="nczitzk" example="/bangumi/moe" path="/bangumi/moe" /> - -### Tags {#bangumi-moe-meng-fan-zu-tags} - -<Route author="nczitzk" example="/bangumi/moe/chs/1080p" path="/bangumi/moe/:tags?" paramsDesc={['Tags, empty by default, multiple tags separated by `/`']}> - For more tags, please go to [Search torrent](https://bangumi.moe/search/index) -</Route> - -## Bangumi 番组计划 {#bangumi-fan-zu-ji-hua} - -### 放送列表 {#bangumi-fan-zu-ji-hua-fang-song-lie-biao} - -<Route author="magic-akari" example="/bangumi/tv/calendar/today" path="/bangumi/tv/calendar/today" radar="1" /> - -### 条目的通用路由格式 {#bangumi-fan-zu-ji-hua-tiao-mu-di-tong-yong-lu-you-ge-shi} - -<Route author="JimenezLi" example="/bangumi/tv/subject/328609/ep/true" path="/bangumi/tv/subject/:id/:type?/:showOriginalName?" paramsDesc={['条目 id, 在条目页面的地址栏查看', '条目类型,可选值为 `ep`, `comments`, `blogs`, `topics`,默认为 `ep`', '显示番剧标题原名,可选值 0/1/false/true,默认为 false']}> - :::warning - 此通用路由仅用于对路由参数的描述,具体信息请查看下方与条目相关的路由 - ::: -</Route> - -### 条目的章节 {#bangumi-fan-zu-ji-hua-tiao-mu-di-zhang-jie} - -<Route author="SettingDust" example="/bangumi/tv/subject/240038" path="/bangumi/tv/subject/:id" paramsDesc={['条目 id, 在条目页面的地址栏查看']} radar="1" /> - -### 条目的吐槽箱 {#bangumi-fan-zu-ji-hua-tiao-mu-di-tu-cao-xiang} - -<Route author="ylc395" example="/bangumi/tv/subject/214265/comments?minLength=100" path="/bangumi/tv/subject/:id/comments" paramsDesc={['条目 id, 在条目页面的地址栏查看. minLength: 以查询字符串(query string)的形式指定. 用于过滤掉内容长度小于指定值的吐槽']} radar="1" /> - -### 条目的评论 {#bangumi-fan-zu-ji-hua-tiao-mu-di-ping-lun} - -<Route author="ylc395" example="/bangumi/tv/subject/214265/blogs" path="/bangumi/tv/subject/:id/blogs" paramsDesc={['条目 id, 在条目页面的地址栏查看']} radar="1" /> - -### 条目的讨论 {#bangumi-fan-zu-ji-hua-tiao-mu-di-tao-lun} - -<Route author="ylc395" example="/bangumi/tv/subject/214265/topics" path="/bangumi/tv/subject/:id/topics" paramsDesc={['条目 id, 在条目页面的地址栏查看']} radar="1" /> - -### 现实人物的新作品 {#bangumi-fan-zu-ji-hua-xian-shi-ren-wu-de-xin-zuo-pin} - -<Route author="ylc395" example="/bangumi/tv/person/32943" path="/bangumi/tv/person/:id" paramsDesc={['人物 id, 在人物页面的地址栏查看']} radar="1" /> - -### 小组话题的新回复 {#bangumi-fan-zu-ji-hua-xiao-zu-hua-ti-de-xin-hui-fu} - -<Route author="ylc395" example="/bangumi/tv/topic/367032" path="/bangumi/tv/topic/:id" paramsDesc={['话题 id, 在话题页面地址栏查看']} radar="1" /> - -### 小组话题 {#bangumi-fan-zu-ji-hua-xiao-zu-hua-ti} - -<Route author="SettingDust" example="/bangumi/tv/group/boring" path="/bangumi/tv/group/:id" paramsDesc={['小组 id, 在小组页面地址栏查看']} radar="1" /> - -### 用户日志 {#bangumi-fan-zu-ji-hua-yong-hu-ri-zhi} - -<Route author="nczitzk" example="/bangumi/tv/user/blog/sai" path="/bangumi/tv/user/blog/:id" paramsDesc={['用户 id, 在用户页面地址栏查看']} radar="1" /> - -### 用户想看 {#bangumi-fan-zu-ji-hua-yong-hu-xiang-kan} - -<Route author="honue" example="/bangumi/tv/user/wish/sai" path="/bangumi/tv/user/wish/:id" paramsDesc={['用户 id, 在用户页面地址栏查看']} radar="1" /> - -### 成员关注动画榜 {#bangumi-fan-zu-ji-hua-cheng-yuan-guan-zhu-dong-hua-bang} - -<Route author="honue" example="/bangumi/tv/followrank" path="/bangumi/tv/followrank" radar="1" /> +<Route namespace="agefans" data={{"path":"/update","categories":["anime"],"example":"/agefans/update","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agemys.org/update","agemys.org/"]},"name":"最近更新","maintainers":["nczitzk"],"url":"agemys.org/update","location":"update.ts"}} /> ## CCC 創作集 {#ccc-chuang-zuo-ji} ### 漫畫 {#ccc-chuang-zuo-ji-man-hua} -<Route author="TonyRL" example="/creative-comic/book/117" path="/creative-comic/book/:id/:coverOnly?/:quality?" paramsDesc={['漫畫 ID,可在 URL 中找到', '僅獲取封面,非 `true` 時將獲取**全部**頁面,預設 `true`', '閱讀品質,標準畫質 `1`,高畫質 `2`,預設 `1`']} radar="1" /> +<Route namespace="creative-comic" data={{"path":"/book/:id/:coverOnly?/:quality?","categories":["anime"],"example":"/creative-comic/book/117","parameters":{"id":"漫畫 ID,可在 URL 中找到","coverOnly":"僅獲取封面,非 `true` 時將獲取**全部**頁面,預設 `true`","quality":"閱讀品質,標準畫質 `1`,高畫質 `2`,預設 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["creative-comic.tw/book/:id/*"],"target":"/:id"},"name":"漫畫","maintainers":["TonyRL"],"location":"book.ts"}} /> ## CnGal {#cngal} ### 每周速报 {#cngal-mei-zhou-su-bao} -<Route author="chengyuhui" example="/cngal/weekly" path="/cngal/weekly" radar="1" /> +<Route namespace="cngal" data={{"path":"/weekly","categories":["anime"],"example":"/cngal/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cngal.org/","www.cngal.org/weeklynews"]},"name":"每周速报","maintainers":["chengyuhui"],"url":"www.cngal.org/","location":"weekly.ts"}} /> ### 制作者 / 游戏新闻 {#cngal-zhi-zuo-zhe-you-xi-xin-wen} -<Route author="chengyuhui" example="/cngal/entry/2693" path="/cngal/entry/:id" paramsDesc={['词条ID,游戏或制作者页面URL的最后一串数字']} radar="1" /> +<Route namespace="cngal" data={{"path":"/entry/:id","categories":["anime"],"example":"/cngal/entry/2693","parameters":{"id":"词条ID,游戏或制作者页面URL的最后一串数字"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cngal.org/entries/index/:id"]},"name":"制作者 / 游戏新闻","maintainers":["chengyuhui"],"location":"entry.ts"}} /> ## Comicat {#comicat} ### 搜索关键词 {#comicat-sou-suo-guan-jian-ci} -<Route author="Cyang39" example="/comicat/search/喵萌奶茶屋+跃动青春+720P+简日" path="/comicat/search/:keyword" paramsDesc={['关键词,请用`+`号连接']} supportBT="1" /> +<Route namespace="comicat" data={{"path":"/search/:keyword","categories":["anime"],"example":"/comicat/search/喵萌奶茶屋+跃动青春+720P+简日","parameters":{"keyword":"关键词,请用`+`号连接"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"搜索关键词","maintainers":["Cyang39"],"location":"search.ts"}} /> ## Comics Kingdom {#comics-kingdom} ### Archive {#comics-kingdom-archive} -<Route author="stjohnjohnson" example="/comicskingdom/pardon-my-planet" path="/comicskingdom/:name" paramsDesc={['URL path of the strip on comicskingdom.com']} /> +<Route namespace="comicskingdom" data={{"path":"/:name","categories":["anime"],"example":"/comicskingdom/pardon-my-planet","parameters":{"name":"URL path of the strip on comicskingdom.com"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["comicskingdom.com/:name/*","comicskingdom.com/:name"]},"name":"Archive","maintainers":["stjohnjohnson"],"location":"index.ts"}} /> ## DLsite {#dlsite} -### General {#dlsite-general} - -<Route author="nczitzk" example="/dlsite/home/new" path="/dlsite/:path+" paramsDesc={['Path, `/home/new` by default, as Release Calendar']}> - :::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) - ::: -</Route> - ### Current Release {#dlsite-current-release} -<Route author="cssxsh" example="/dlsite/new/home" path="/dlsite/new/:type" paramsDesc={['Type, see table below']}> - | Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL | - | ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- | - | home | comic | soft | maniax | books | pro | girls | bl | -</Route> +<Route namespace="dlsite" data={{"path":"/new/:type","categories":["anime"],"example":"/dlsite/new/home","parameters":{"type":"Type, see table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Current Release","maintainers":["cssxsh"],"description":"| Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL |\n | ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- |\n | home | comic | soft | maniax | books | pro | girls | bl |","location":"new.ts"}} /> -### Discounted Works {#dlsite-discounted-works} - -<Route author="cssxsh" example="/dlsite/campaign/home" path="/dlsite/campaign/:type/:free?" paramsDesc={['Type, see table above', 'Free only, empty means false, other value means true']} /> +| Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL | +| ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- | +| home | comic | soft | maniax | books | pro | girls | bl | ### Ci-en Creators' Article {#dlsite-ci-en-creators-article} -<Route author="nczitzk" example="/dlsite/ci-en/7400/article" path="/dlsite/ci-en/:id/article" paramsDesc={['Creator id, can be found in URL']} /> +<Route namespace="dlsite" data={{"path":"/ci-en/:id/article","categories":["anime"],"example":"/dlsite/ci-en/7400/article","parameters":{"id":"Creator id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ci-en.dlsite.com/creator/:id/article/843558","ci-en.dlsite.com/"]},"name":"Ci-en Creators' Article","maintainers":["nczitzk"],"location":"ci-en/article.ts"}} /> -## ebb.io {#ebb-io} +### Discounted Works {#dlsite-discounted-works} -### ebb {#ebb-io-ebb} - -<Route author="Tsuki" example="/ebb" path="/ebb" /> +<Route namespace="dlsite" data={{"path":"/campaign/:type/:free?","categories":["anime"],"example":"/dlsite/campaign/home","parameters":{"type":"Type, see table above","free":"Free only, empty means false, other value means true"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Discounted Works","maintainers":["cssxsh"],"location":"campaign.ts"}} /> ## Eventernote {#eventernote} ### 声优活动及演唱会 {#eventernote-sheng-you-huo-dong-ji-yan-chang-hui} -<Route author="KTachibanaM" path="/eventernote/actors/:name/:id" example="/eventernote/actors/三森すずこ/2634" paramsDesc={['声优姓名', '声优 ID']} radar="1" /> +<Route namespace="eventernote" data={{"path":"/actors/:name/:id","categories":["anime"],"example":"/eventernote/actors/三森すずこ/2634","parameters":{"name":"声优姓名","id":"声优 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.eventernote.com/actors/:name/:id/events"]},"name":"声优活动及演唱会","maintainers":["KTachibanaM"],"location":"actors.ts"}} /> ## Gogoanimehd {#gogoanimehd} ### Recent Releases {#gogoanimehd-recent-releases} -<Route author="user4302" example="/gogoanimehd/recent-releases" path="/gogoanimehd/recent-releases" /> - -## Hanime.tv {#hanime-tv} - -### Recently updated {#hanime-tv-recently-updated} - -<Route author="EsuRt" example="/hanime/video" path="/hanime/video" /> +<Route namespace="gogoanimehd" data={{"path":"/recent-releases","categories":["anime"],"example":"/gogoanimehd/recent-releases","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["developer.anitaku.to/"]},"name":"Recent Releases","maintainers":["user4302"],"url":"developer.anitaku.to/","location":"recent-releases.ts"}} /> ## Hpoi 手办维基 {#hpoi-shou-ban-wei-ji} -### 情报 {#hpoi-shou-ban-wei-ji-qing-bao} - -<Route author="sanmmm" path="/hpoi/info/:type?" example="/hpoi/info/all" paramsDesc={['分类, 见下表, 默认为`all`']}> - 分类 - - | 全部 | 手办 | 模型 | - | ---- | ----- | ----- | - | all | hobby | model | -</Route> - -### 所有周边 {#hpoi-shou-ban-wei-ji-suo-you-zhou-bian} - -<Route author="DIYgod" path="/hpoi/items/all/:order?" example="/hpoi/items/all" paramsDesc={['排序, 见下表,默认为 add']}> - | 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | - | ------- | ---- | ------ | -------- | -------- | ------ | - | release | add | hits | hits7Day | hitsDay | rating | -</Route> - ### 角色周边 {#hpoi-shou-ban-wei-ji-jue-se-zhou-bian} -<Route author="DIYgod" path="/hpoi/items/character/:id/:order?" example="/hpoi/items/character/1035374" paramsDesc={['角色 ID', '排序, 见下表,默认为 add']}> - | 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | - | ------- | ---- | ------ | -------- | -------- | ------ | - | release | add | hits | hits7Day | hitsDay | rating | -</Route> +<Route namespace="hpoi" data={{"path":"/items/character/:id/:order?","categories":["anime"],"example":"/hpoi/items/character/1035374","parameters":{"id":"角色 ID","order":"排序, 见下表,默认为 add"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"角色周边","maintainers":["DIYgod"],"description":"| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 |\n | ------- | ---- | ------ | -------- | -------- | ------ |\n | release | add | hits | hits7Day | hitsDay | rating |","location":"character.ts"}} /> -### 作品周边 {#hpoi-shou-ban-wei-ji-zuo-pin-zhou-bian} +| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | +| ------- | ---- | ------ | -------- | -------- | ------ | +| release | add | hits | hits7Day | hitsDay | rating | -<Route author="DIYgod" path="/hpoi/items/work/:id/:order?" example="/hpoi/items/work/4117491" paramsDesc={['作品 ID', '排序, 见下表,默认为 add']}> - | 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | - | ------- | ---- | ------ | -------- | -------- | ------ | - | release | add | hits | hits7Day | hitsDay | rating | -</Route> +### 情报 {#hpoi-shou-ban-wei-ji-qing-bao} -### 用户动态 {#hpoi-shou-ban-wei-ji-yong-hu-dong-tai} +<Route namespace="hpoi" data={{"path":"/info/:type?","categories":["anime"],"example":"/hpoi/info/all","parameters":{"type":"分类, 见下表, 默认为`all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"情报","maintainers":["sanmmm DIYgod"],"description":"分类\n\n | 全部 | 手办 | 模型 |\n | ---- | ----- | ----- |\n | all | hobby | model |","location":"info.ts"}} /> -<Route author="DIYgod luyuhuang" path="/hpoi/user/:user_id/:caty" example="/hpoi/user/116297/buy" paramsDesc={['用户ID', '类别, 见下表']}> - | 想买 | 预定 | 已入 | 关注 | 有过 | - | ---- | -------- | ---- | ---- | ------ | - | want | preorder | buy | care | resell | -</Route> +分类 + +| 全部 | 手办 | 模型 | +| ---- | ----- | ----- | +| all | hobby | model | ### 热门推荐 {#hpoi-shou-ban-wei-ji-re-men-tui-jian} -<Route author="DIYgod" path="/hpoi/bannerItem" example="/hpoi/bannerItem" /> +<Route namespace="hpoi" data={{"path":"/bannerItem","categories":["anime"],"example":"/hpoi/bannerItem","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.hpoi.net/bannerItem/list"]},"name":"热门推荐","maintainers":["DIYgod"],"url":"www.hpoi.net/bannerItem/list","location":"banner-item.ts"}} /> + +### 所有周边 {#hpoi-shou-ban-wei-ji-suo-you-zhou-bian} + +<Route namespace="hpoi" data={{"path":"/items/all/:order?","categories":["anime"],"example":"/hpoi/items/all","parameters":{"order":"排序, 见下表,默认为 add"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.hpoi.net/hobby/all"],"target":"/items/all"},"name":"所有周边","maintainers":["DIYgod"],"url":"www.hpoi.net/hobby/all","description":"| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 |\n | ------- | ---- | ------ | -------- | -------- | ------ |\n | release | add | hits | hits7Day | hitsDay | rating |","location":"all.ts"}} /> + +| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | +| ------- | ---- | ------ | -------- | -------- | ------ | +| release | add | hits | hits7Day | hitsDay | rating | + +### 用户动态 {#hpoi-shou-ban-wei-ji-yong-hu-dong-tai} + +<Route namespace="hpoi" data={{"path":"/user/:user_id/:caty","categories":["anime"],"example":"/hpoi/user/116297/buy","parameters":{"user_id":"用户ID","caty":"类别, 见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户动态","maintainers":["DIYgod","luyuhuang"],"description":"| 想买 | 预定 | 已入 | 关注 | 有过 |\n | ---- | -------- | ---- | ---- | ------ |\n | want | preorder | buy | care | resell |","location":"user.ts"}} /> + +| 想买 | 预定 | 已入 | 关注 | 有过 | +| ---- | -------- | ---- | ---- | ------ | +| want | preorder | buy | care | resell | + +### 作品周边 {#hpoi-shou-ban-wei-ji-zuo-pin-zhou-bian} + +<Route namespace="hpoi" data={{"path":"/items/work/:id/:order?","categories":["anime"],"example":"/hpoi/items/work/4117491","parameters":{"id":"作品 ID","order":"排序, 见下表,默认为 add"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作品周边","maintainers":["DIYgod"],"description":"| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 |\n | ------- | ---- | ------ | -------- | -------- | ------ |\n | release | add | hits | hits7Day | hitsDay | rating |","location":"work.ts"}} /> + +| 发售 | 入库 | 总热度 | 一周热度 | 一天热度 | 评价 | +| ------- | ---- | ------ | -------- | -------- | ------ | +| release | add | hits | hits7Day | hitsDay | rating | ## IDOLY PRIDE 偶像荣耀 {#idoly-pride-ou-xiang-rong-yao} ### News {#idoly-pride-ou-xiang-rong-yao-news} -<Route author="Mingxia1" example="/idolypride/news" path="/idolypride/news" radar="1" /> +<Route namespace="idolypride" data={{"path":"/news","categories":["anime"],"example":"/idolypride/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["idolypride.jp/news"]},"name":"News","maintainers":["Mingxia1"],"url":"idolypride.jp/news","location":"news.ts"}} /> ## iwara {#iwara} -### User {#iwara-user} - -<Route author="Fatpandac" example="/iwara/users/kelpie/video" path="/iwara/users/:username/:type?" paramsDesc={['username, can find in userpage', 'video by default']} radar="1"> - | type | video | image | - | :--: | :---: | :---: | - | | video | image | -</Route> - ### User Subscriptions {#iwara-user-subscriptions} -<Route author="FeCCC" example="/iwara/subscriptions" path="/iwara/subscriptions" radar="1" configRequired="1"> - :::warning - This route requires username and password, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. - ::: -</Route> +<Route namespace="iwara" data={{"path":"/subscriptions","categories":["anime"],"example":"/iwara/subscriptions","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ecchi.iwara.tv/"]},"name":"User Subscriptions","maintainers":["FeCCC"],"url":"ecchi.iwara.tv/","description":":::warning\n This route requires username and password, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations.\n :::","location":"subscriptions.ts"}} /> + +:::warning +This route requires username and password, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. +::: ## Kemono {#kemono} ### Posts {#kemono-posts} -<Route author="nczitzk" example="/kemono" path="/kemono/:source?/:id?" paramsDesc={['Source, see below, Posts by default', 'User id, can be found in URL']}> - Sources +<Route namespace="kemono" data={{"path":"/:source?/:id?","categories":["anime"],"example":"/kemono","parameters":{"source":"Source, see below, Posts by default","id":"User id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kemono.su/:source/user/:id","kemono.su/"]},"name":"Posts","maintainers":["nczitzk"],"description":"Sources\n\n | Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia |\n | ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ |\n | posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia |\n\n :::tip\n When `posts` is selected as the value of the parameter **source**, the parameter **id** does not take effect.\n :::","location":"index.ts"}} /> - | Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia | - | ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ | - | posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia | +Sources - :::tip - When `posts` is selected as the value of the parameter **source**, the parameter **id** does not take effect. - ::: -</Route> +| Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia | +| ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ | +| posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia | + +:::tip +When `posts` is selected as the value of the parameter **source**, the parameter **id** does not take effect. +::: ## lovelive-anime {#lovelive-anime} ### Love Live! Official Website Latest NEWS {#lovelive-anime-love-live-official-website-latest-news} -<Route author="axojhf" example="/lovelive-anime/news" path="/lovelive-anime/news/:option?" paramsDesc={['Crawl full text when `option` is `detail`.']} radar="1" /> +<Route namespace="lovelive-anime" data={{"path":"/news/:option?","categories":["anime"],"example":"/lovelive-anime/news","parameters":{"option":"Crawl full text when `option` is `detail`."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.lovelive-anime.jp/","www.lovelive-anime.jp/news"],"target":"/news"},"name":"Love Live! Official Website Latest NEWS","maintainers":["axojhf"],"url":"www.lovelive-anime.jp/","location":"news.ts"}} /> ### Love Live Official Website Categories Topics {#lovelive-anime-love-live-official-website-categories-topics} -<Route author="axojhf" example="/lovelive-anime/topics/otonokizaka" path="/lovelive-anime/topics/:abbr/:category?/:option?" paramsDesc={['The path to the Love Live series of sub-projects on the official website is detailed in the table below', 'The official website lists the Topics category, `category` is `detail` when crawling the full text, other categories see the following table for details', 'Crawl full text when `option` is `detail`.']} radar="1"> - | Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | - | -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- | - | `abbr`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical | +<Route namespace="lovelive-anime" data={{"path":"/topics/:abbr/:category?/:option?","categories":["anime"],"example":"/lovelive-anime/topics/otonokizaka","parameters":{"abbr":"The path to the Love Live series of sub-projects on the official website is detailed in the table below","category":"The official website lists the Topics category, `category` is `detail` when crawling the full text, other categories see the following table for details","option":"Crawl full text when `option` is `detail`."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Love Live Official Website Categories Topics","maintainers":["axojhf"],"description":"| Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル |\n | -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- |\n | `abbr`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical |\n\n | Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン |\n | ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ |\n | `category`parameter | <u>*No parameter*</u> | music | anime_movie | cast_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign |","location":"topics.ts"}} /> - | Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン | - | ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | - | `category`parameter | <u>*No parameter*</u> | music | anime\_movie | cast\_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign | -</Route> +| Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | +| -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- | +| `abbr`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical | -### Love Live Official Website Schedule {#lovelive-anime-love-live-official-website-schedule} - -<Route author="axojhf" example="/lovelive-anime/schedules" path="/schedules/:serie?/:category?" paramsDesc={['Love Live! Series sub-projects abbreviation, see the following table', 'The official website lists the categories, see the following table for details']} radar="1"> - :::tip[Please note!] - The schedule and other information obtained by this route is subject to the official website announcement! - The RSS routing has not been rigorously tested and the information provided cannot be guaranteed accurate! - ::: - - | Sub-project Name (not full name) | 全シリーズ | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | ラブライブ!スクールアイドルミュージカル | - | -------------------------------- | ---------------------------- | ---------- | -------------------- | ------------------------------------------ | --------------------- | ---------------------------------------- | - | `serie`parameter | <u>*No parameter*</u>or`all` | `lovelive` | `sunshine` | `nijigasaki` | `superstar` | `musical` | - - | Category Name | 全て | ライブ | イベント | 生配信 | - | ------------------- | ---------------------------- | ------ | -------- | --------- | - | `category`parameter | <u>*No parameter*</u>or`all` | `live` | `event` | `haishin` | -</Route> - -## MangaDex {#mangadex} - -### Manga Update {#mangadex-manga-update} - -<Route author="vzz64" example="/mangadex/58be6aa6-06cb-4ca5-bd20-f1392ce451fb/en" path="/:id/:lang?" paramsDesc={['manga ID', 'language code']} radar="1" /> +| Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン | +| ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | +| `category`parameter | <u>*No parameter*</u> | music | anime\_movie | cast\_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign | ## Mox.moe {#mox-moe} ### 首頁 {#mox-moe-shou-ye} -<Route author="nczitzk" example="/mox" path="/mox/:category?" paramsDesc={['分类,可在对应分类页 URL 中找到']} notOperational="1"> - :::tip - 在首页将分类参数选择确定后跳转到的分类页面 URL 中,`/l/` 后的字段即为分类参数。 +<Route namespace="mox" data={{"path":"/:category?","categories":["anime"],"example":"/mox","parameters":{"category":"分类,可在对应分类页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mox.moe/l/:category","mox.moe/"]},"name":"首頁","maintainers":["nczitzk"],"description":":::tip\n 在首页将分类参数选择确定后跳转到的分类页面 URL 中,`/l/` 后的字段即为分类参数。\n\n 如 [科幻 + 日語 + 日本 + 長篇 + 完結 + 最近更新](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) 的 URL 为 [https://mox.moe/l/CAT%2A 科幻,日本,完結,lastupdate,jpn,l,BL](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL),此时 `/l/` 后的字段为 `CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`。最终获得路由为 [`/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`](https://rsshub.app/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL)\n :::","location":"index.ts"}} /> - 如 [科幻 + 日語 + 日本 + 長篇 + 完結 + 最近更新](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) 的 URL 为 [https://mox.moe/l/CAT%2A 科幻,日本,完結,lastupdate,jpn,l,BL](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL),此时 `/l/` 后的字段为 `CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`。最终获得路由为 [`/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`](https://rsshub.app/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) - ::: -</Route> +:::tip +在首页将分类参数选择确定后跳转到的分类页面 URL 中,`/l/` 后的字段即为分类参数。 + +如 [科幻 + 日語 + 日本 + 長篇 + 完結 + 最近更新](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) 的 URL 为 [https://mox.moe/l/CAT%2A 科幻,日本,完結,lastupdate,jpn,l,BL](https://mox.moe/l/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL),此时 `/l/` 后的字段为 `CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`。最终获得路由为 [`/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL`](https://rsshub.app/mox/CAT%2A科幻,日本,完結,lastupdate,jpn,l,BL) +::: ## nhentai {#nhentai} -### Filter {#nhentai-filter} - -<Route author="MegrezZhu hoilc" example="/nhentai/language/chinese" path="/nhentai/:key/:keyword/:mode?" paramsDesc={['Filter term, can be: `parody`, `character`, `tag`, `artist`, `group`, `language` or `category`','Filter value', 'mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`']} anticrawler="1" supportBT="1" radar="1" /> - ### Advanced Search {#nhentai-advanced-search} -<Route author="MegrezZhu hoilc" example="/nhentai/search/language%3Ajapanese+-scat+-yaoi+-guro+-"mosaic+censorship"" path="/nhentai/search/:keyword/:mode?" paramsDesc={['Keywords for search. You can copy the content after `q=` after searching on the original website, or you can enter it directly. See the [official website](https://nhentai.net/info/) for details', 'mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`']} anticrawler="1" supportBT="1" radar="1" /> +<Route namespace="nhentai" data={{"path":"/search/:keyword/:mode?","categories":["anime"],"example":"/nhentai/search/language%3Ajapanese+-scat+-yaoi+-guro+-\"mosaic+censorship\"","parameters":{"keyword":"Keywords for search. You can copy the content after `q=` after searching on the original website, or you can enter it directly. See the [official website](https://nhentai.net/info/) for details","mode":"mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nhentai.net/:key/:keyword"],"target":"/:key/:keyword"},"name":"Advanced Search","maintainers":["MegrezZhu","hoilc"],"location":"search.ts"}} /> + +### Filter {#nhentai-filter} + +<Route namespace="nhentai" data={{"path":"/:key/:keyword/:mode?","categories":["anime"],"example":"/nhentai/language/chinese","parameters":{"key":"Filter term, can be: `parody`, `character`, `tag`, `artist`, `group`, `language` or `category`","keyword":"Filter value","mode":"mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](/install/#configuration-route-specific-configurations), default to `simple`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nhentai.net/:key/:keyword"],"target":"/:key/:keyword"},"name":"Filter","maintainers":["MegrezZhu","hoilc"],"location":"other.ts"}} /> ## QooApp {#qooapp} +### Game Store - Cards {#qooapp-game-store-cards} + +<Route namespace="qoo-app" data={{"path":"/apps/:lang?/card/:id","categories":["anime"],"example":"/qoo-app/apps/en/card/7675","parameters":{"lang":"Language, see the table above, empty means `中文`","id":"Game ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Game Store - Cards","maintainers":["TonyRL"],"location":"apps/card.ts"}} /> + ### Game Store - Review {#qooapp-game-store-review} -<Route author="TonyRL" example="/qoo-app/apps/en/comment/7675" path="/qoo-app/apps/:lang?/comment/:id" paramsDesc={['Language, see the table below, empty means `中文`', 'Game ID, can be found in URL']} radar="1"> - | 中文 | English | 한국어 | Español | 日本語 | ไทย | Tiếng Việt | - | ---- | ------- | ------ | ------- | ------ | --- | ---------- | - | | en | ko | es | ja | th | vi | -</Route> +<Route namespace="qoo-app" data={{"path":"/apps/:lang?/comment/:id","categories":["anime"],"example":"/qoo-app/apps/en/comment/7675","parameters":{"lang":"Language, see the table below, empty means `中文`","id":"Game ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Game Store - Review","maintainers":["TonyRL"],"description":"| 中文 | English | 한국어 | Español | 日本語 | ไทย | Tiếng Việt |\n | ---- | ------- | ------ | ------- | ------ | --- | ---------- |\n | | en | ko | es | ja | th | vi |","location":"apps/comment.ts"}} /> -### Game Store - Article {#qooapp-game-store-article} - -<Route author="TonyRL" example="/qoo-app/apps/en/post/7675" path="/qoo-app/apps/:lang?/post/:id" paramsDesc={['Language, see the table above, empty means `中文`', 'Game ID, can be found in URL']} radar="1" /> +| 中文 | English | 한국어 | Español | 日本語 | ไทย | Tiếng Việt | +| ---- | ------- | ------ | ------- | ------ | --- | ---------- | +| | en | ko | es | ja | th | vi | ### Game Store - Notes {#qooapp-game-store-notes} -<Route author="TonyRL" example="/qoo-app/apps/en/note/7675" path="/qoo-app/apps/:lang?/note/:id" paramsDesc={['Language, see the table above, empty means `中文`', 'Game ID, can be found in URL']} radar="1" /> +<Route namespace="qoo-app" data={{"path":"/apps/:lang?/note/:id","categories":["anime"],"example":"/qoo-app/apps/en/note/7675","parameters":{"lang":"Language, see the table above, empty means `中文`","id":"Game ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Game Store - Notes","maintainers":["TonyRL"],"location":"apps/note.ts"}} /> -### Game Store - Cards {#qooapp-game-store-cards} +### Game Store - Article {#qooapp-game-store-article} -<Route author="TonyRL" example="/qoo-app/apps/en/card/7675" path="/qoo-app/apps/:lang?/card/:id" paramsDesc={['Language, see the table above, empty means `中文`', 'Game ID, can be found in URL']} radar="1" /> +<Route namespace="qoo-app" data={{"path":"/apps/:lang?/post/:id","categories":["anime"],"example":"/qoo-app/apps/en/post/7675","parameters":{"lang":"Language, see the table above, empty means `中文`","id":"Game ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Game Store - Article","maintainers":["TonyRL"],"location":"apps/post.ts"}} /> ### News {#qooapp-news} -<Route author="TonyRL" example="/qoo-app/news/en" path="/qoo-app/news/:lang?" paramsDesc={['Language, see the table below, empty means `中文`']} radar="1"> - | 中文 | English | - | ---- | ------- | - | | en | -</Route> +<Route namespace="qoo-app" data={{"path":"/news/:lang?","categories":["anime"],"example":"/qoo-app/news/en","parameters":{"lang":"Language, see the table below, empty means `中文`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["TonyRL"],"description":"| 中文 | English |\n | ---- | ------- |\n | | en |","location":"news.ts"}} /> + +| 中文 | English | +| ---- | ------- | +| | en | ### Note Comments {#qooapp-note-comments} -<Route author="TonyRL" example="/qoo-app/notes/en/note/2329113" path="/qoo-app/notes/:lang?/note/:id" paramsDesc={['Language, see the table above, empty means `中文`', 'Note ID, can be found in URL']} radar="1" notOperational="1" /> - -### Hot Hashtags {#qooapp-hot-hashtags} - -<Route author="TonyRL" example="/qoo-app/notes/en/topic/QooAppGacha" path="/qoo-app/notes/:lang?/topic/:id" paramsDesc={['Language, see the table above, empty means `中文`', 'Hashtag name without `#`']} radar="1" notOperational="1" /> - -### User Game Comments {#qooapp-user-game-comments} - -<Route author="TonyRL" example="/qoo-app/user/en/appComment/35399143" path="/qoo-app/user/:lang?/appComment/:uid" paramsDesc={['Language, see the table above, empty means `中文`', 'User ID, can be found in URL']} radar="1" notOperational="1" /> +<Route namespace="qoo-app" data={{"path":"/notes/:lang?/note/:id","categories":["anime"],"example":"/qoo-app/notes/en/note/2329113","parameters":{"lang":"Language, see the table above, empty means `中文`","id":"Note ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Note Comments","maintainers":["TonyRL"],"location":"notes/note.ts"}} /> ### User Notes {#qooapp-user-notes} -<Route author="TonyRL" example="/qoo-app/notes/en/user/35399143" path="/qoo-app/notes/:lang?/user/:uid" paramsDesc={['Language, see the table above, empty means `中文`', 'User ID, can be found in URL']} radar="1" notOperational="1" /> +<Route namespace="qoo-app" data={{"path":"/notes/:lang?/user/:uid","categories":["anime"],"example":"/qoo-app/notes/en/user/35399143","parameters":{"lang":"Language, see the table above, empty means `中文`","uid":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Notes","maintainers":["TonyRL"],"location":"notes/user.ts"}} /> + +### User Game Comments {#qooapp-user-game-comments} + +<Route namespace="qoo-app" data={{"path":"/user/:lang?/appComment/:uid","categories":["anime"],"example":"/qoo-app/user/en/appComment/35399143","parameters":{"lang":"Language, see the table above, empty means `中文`","uid":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Game Comments","maintainers":["TonyRL"],"location":"user/app-comment.ts"}} /> ## Rawkuma {#rawkuma} ### Manga {#rawkuma-manga} -<Route author="nczitzk" example="/rawkuma/manga/tensei-shitara-dai-nana-ouji-dattanode-kimamani-majutsu-o-kiwamemasu" path="/rawkuma/manga/:id" paramsDesc={['Manga ID, can be found in URL']} radar="1" /> +<Route namespace="rawkuma" data={{"path":"/manga/:id","categories":["anime"],"example":"/rawkuma/manga/tensei-shitara-dai-nana-ouji-dattanode-kimamani-majutsu-o-kiwamemasu","parameters":{"id":"Manga ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rawkuma.com/manga/:id","rawkuma.com/"]},"name":"Manga","maintainers":["nczitzk"],"location":"manga.ts"}} /> ## THBWiki {#thbwiki} ### Calendar {#thbwiki-calendar} -<Route author="aether17" path="/thwiki/calendar/:before?/:after?" example="/thwiki/calendar" paramsDesc={['From how many days ago (default 30)', 'To how many days after (default 30)']} radar="1" /> - -## Touhougarakuta 东方我乐多丛志 {#touhougarakuta-dong-fang-wo-le-duo-cong-zhi} - -### Articles {#touhougarakuta-dong-fang-wo-le-duo-cong-zhi-articles} - -<Route author="ttyfly" path="/touhougarakuta/:language/:type" example="/touhougarakuta/ja/news" paramsDesc={['language', 'article type']}> - Languages: - - | Chinese | Japanese | Korean | - | ------- | -------- | ------ | - | cn | ja | ko | - - Article types: - - | Index | Series | Interviews | Novels | Comics | News | - | ----- | ------ | ---------- | ------ | ------ | ---- | - | index | series | interviews | novels | comics | news | - - | Music review | Game review | Book review | Where are you | - | ------------- | ------------ | ------------ | --------------- | - | music\_review | game\_review | book\_review | where\_are\_you | - - **Note:** The index type includes all types of articles. Think twice before using it. -</Route> +<Route namespace="thwiki" data={{"path":"/calendar/:before?/:after?","categories":["anime"],"example":"/thwiki/calendar","parameters":{"before":"From how many days ago (default 30)","after":"To how many days after (default 30)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["thwiki.cc/","thwiki.cc/日程表"],"target":"/calendar"},"name":"Calendar","maintainers":["aether17"],"url":"thwiki.cc/","location":"index.ts"}} /> ## VCB-Studio {#vcb-studio} -### 最新文章 {#vcb-studio-zui-xin-wen-zhang} - -<Route author="cxfksword" example="/vcb-s" path="/vcb-s" radar="1" /> - ### 分类文章 {#vcb-studio-fen-lei-wen-zhang} -<Route author="cxfksword" example="/vcb-s/category/works" path="/vcb-s/category/:cate" paramsDesc={['分类']} radar="1"> - | 作品项目 | 科普系列 | 计划与日志 | - | -------- | -------- | ---------- | - | works | kb | planlog | -</Route> +<Route namespace="vcb-s" data={{"path":"/category/:cate","categories":["anime"],"example":"/vcb-s/category/works","parameters":{"cate":"分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vcb-s.com/archives/category/:cate"]},"name":"分类文章","maintainers":["cxfksword"],"url":"vcb-s.com/","description":"| 作品项目 | 科普系列 | 计划与日志 |\n | -------- | -------- | ---------- |\n | works | kb | planlog |","location":"category.ts"}} /> -## Vol.moe {#vol-moe} - -### vol {#vol-moe-vol} - -<Route author="CoderTonyChan" example="/vol/finish" path="/vol/:mode?" paramsDesc={['mode type']}> - | Comics are serialized | Comics is finshed | - | --------------------- | ----------------- | - | serial | finish | -</Route> - -## Webtoons {#webtoons} - -### Comic updates {#webtoons-comic-updates} - -<Route author="machsix" path="/webtoons/:lang/:category/:name/:id" example="/webtoons/zh-hant/drama/gongzhuweimian/894" paramsDesc={['Language','Category','Name','ID']} /> - -For example: `https://www.webtoons.com/zh-hant/drama/gongzhuweimian/list?title_no=894`, `lang=zh-hant`,`category=drama`,`name=gongzhucheyeweimian`,`id=894`. - -### Naver {#webtoons-naver} - -<Route author="zfanta" example="/webtoons/naver/651673" path="/webtoons/naver/:titleId" paramsDesc={['titleId of naver webtoon']} notOperational="1" /> +| 作品项目 | 科普系列 | 计划与日志 | +| -------- | -------- | ---------- | +| works | kb | planlog | ## X 漫画 {#x-man-hua} ### 最新动态 {#x-man-hua-zui-xin-dong-tai} -<Route author="Ye11" example="/xmanhua/73xm" path="/xmanhua/:uid" paramsDesc={['漫画 id,在浏览器中可见,例如鬼灭之刃对应的 id 为 `73xm`']} /> +<Route namespace="xmanhua" data={{"path":"/:uid","categories":["anime"],"example":"/xmanhua/73xm","parameters":{"uid":"漫画 id,在浏览器中可见,例如鬼灭之刃对应的 id 为 `73xm`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xmanhua.com/:uid"]},"name":"最新动态","maintainers":["Ye11"],"location":"index.ts"}} /> ## 俺の 3D エロ動画 (oreno3d) {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d} @@ -532,95 +297,105 @@ For example: `https://www.webtoons.com/zh-hant/drama/gongzhuweimian/list?title_n You can use some RSS parsing libraries (like `feedpraser` in `Python`) to receive the video update messages and download them automatically ::: -### Keyword Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-keyword-search} +### Author Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-author-search} -<Route author="xueli-sherryli" example="/oreno3d/search/bronya/latest/1" path="/oreno3d/search/:keyword/:sort/:pagelimit?" paramsDesc={['Search keyword', 'Sort method, see the table below', 'The maximum number of pages to be crawled, the default is 1']} radar="1"> - | favorites | hot | latest | popularity | - | --------- | --- | ------ | ---------- | - | favorites | hot | latest | popularity | -</Route> +<Route namespace="oreno3d" data={{"path":["/authors/:authorid/:sort/:pagelimit?","/characters/:characterid/:sort/:pagelimit?","/origins/:originid/:sort/:pagelimit?","/search/:keyword/:sort/:pagelimit?","/tags/:tagid/:sort/:pagelimit?"],"categories":["anime"],"example":"/oreno3d/authors/3189/latest/1","parameters":{"authorid":"Author id, can be found in URL","sort":"Sort method, see the table above","pagelimit":"The maximum number of pages to be crawled, the default is 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Search","maintainers":["xueli_sherryli"],"description":"| favorites | hot | latest | popularity |\n | --------- | --- | ------ | ---------- |\n | favorites | hot | latest | popularity |","location":"main.ts"}} /> -### Character Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-character-search} - -<Route author="xueli-sherryli" example="/oreno3d/characters/283/latest/1" path="/oreno3d/characters/:characterid/:sort/:pagelimit?" paramsDesc={['Character id, can be found in URL' , 'Sort method, see the table above', 'The maximum number of pages to be crawled, the default is 1']} radar="1" /> +| favorites | hot | latest | popularity | +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity | ### Author Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-author-search} -<Route author="xueli-sherryli" example="/oreno3d/authors/3189/latest/1" path="/oreno3d/authors/:authorid/:sort/:pagelimit?" paramsDesc={['Author id, can be found in URL' , 'Sort method, see the table above', 'The maximum number of pages to be crawled, the default is 1']} radar="1" /> +<Route namespace="oreno3d" data={{"path":["/authors/:authorid/:sort/:pagelimit?","/characters/:characterid/:sort/:pagelimit?","/origins/:originid/:sort/:pagelimit?","/search/:keyword/:sort/:pagelimit?","/tags/:tagid/:sort/:pagelimit?"],"categories":["anime"],"example":"/oreno3d/authors/3189/latest/1","parameters":{"authorid":"Author id, can be found in URL","sort":"Sort method, see the table above","pagelimit":"The maximum number of pages to be crawled, the default is 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Search","maintainers":["xueli_sherryli"],"description":"| favorites | hot | latest | popularity |\n | --------- | --- | ------ | ---------- |\n | favorites | hot | latest | popularity |","location":"main.ts"}} /> -### Tags Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-tags-search} +| favorites | hot | latest | popularity | +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity | -<Route author="xueli-sherryli" example="/oreno3d/tags/177/latest/1" path="/oreno3d/tags/:tagid/:sort/:pagelimit?" paramsDesc={['Tag id, can be found in URL', 'Sort method, see the table above', 'The maximum number of pages to be crawled, the default is 1']} radar="1" /> +### Author Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-author-search} -### Origins Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-origins-search} +<Route namespace="oreno3d" data={{"path":["/authors/:authorid/:sort/:pagelimit?","/characters/:characterid/:sort/:pagelimit?","/origins/:originid/:sort/:pagelimit?","/search/:keyword/:sort/:pagelimit?","/tags/:tagid/:sort/:pagelimit?"],"categories":["anime"],"example":"/oreno3d/authors/3189/latest/1","parameters":{"authorid":"Author id, can be found in URL","sort":"Sort method, see the table above","pagelimit":"The maximum number of pages to be crawled, the default is 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Search","maintainers":["xueli_sherryli"],"description":"| favorites | hot | latest | popularity |\n | --------- | --- | ------ | ---------- |\n | favorites | hot | latest | popularity |","location":"main.ts"}} /> -<Route author="xueli-sherryli" example="/oreno3d/origins/3/latest/1" path="/oreno3d/origins/:originid/:sort/:pagelimit?" paramsDesc={['Origin id, can be found in URL' , 'Sort method, see the table above', 'The maximum number of pages to be crawled, the default is 1']} radar="1" /> +| favorites | hot | latest | popularity | +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity | + +### Author Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-author-search} + +<Route namespace="oreno3d" data={{"path":["/authors/:authorid/:sort/:pagelimit?","/characters/:characterid/:sort/:pagelimit?","/origins/:originid/:sort/:pagelimit?","/search/:keyword/:sort/:pagelimit?","/tags/:tagid/:sort/:pagelimit?"],"categories":["anime"],"example":"/oreno3d/authors/3189/latest/1","parameters":{"authorid":"Author id, can be found in URL","sort":"Sort method, see the table above","pagelimit":"The maximum number of pages to be crawled, the default is 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Search","maintainers":["xueli_sherryli"],"description":"| favorites | hot | latest | popularity |\n | --------- | --- | ------ | ---------- |\n | favorites | hot | latest | popularity |","location":"main.ts"}} /> + +| favorites | hot | latest | popularity | +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity | + +### Author Search {#an-%E3%81%AE-3d-%E3%82%A8%E3%83%AD-dong-hua-oreno3d-author-search} + +<Route namespace="oreno3d" data={{"path":["/authors/:authorid/:sort/:pagelimit?","/characters/:characterid/:sort/:pagelimit?","/origins/:originid/:sort/:pagelimit?","/search/:keyword/:sort/:pagelimit?","/tags/:tagid/:sort/:pagelimit?"],"categories":["anime"],"example":"/oreno3d/authors/3189/latest/1","parameters":{"authorid":"Author id, can be found in URL","sort":"Sort method, see the table above","pagelimit":"The maximum number of pages to be crawled, the default is 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Search","maintainers":["xueli_sherryli"],"description":"| favorites | hot | latest | popularity |\n | --------- | --- | ------ | ---------- |\n | favorites | hot | latest | popularity |","location":"main.ts"}} /> + +| favorites | hot | latest | popularity | +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity | ## 巴哈姆特電玩資訊站 {#ba-ha-mu-te-dian-wan-zi-xun-zhan} ### GNN 新聞 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-gnn-xin-wen} -<Route author="Arracc" example="/gamer/gnn/1" path="/gamer/gnn/:category?" paramsDesc={['版块']} notOperational="1"> - | 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 | - | ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- | - | 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 | +<Route namespace="gamer" data={{"path":"/gnn/:category?","categories":["anime"],"example":"/gamer/gnn/1","parameters":{"category":"版块"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"GNN 新聞","maintainers":["Arracc"],"description":"| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 |\n | ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- |\n | 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 |\n\n | Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 |\n | ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- |\n | ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime |","location":"gnn-index.ts"}} /> - | Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 | - | ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- | - | ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime | -</Route> +| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 | +| ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- | +| 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 | -### 熱門推薦 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-re-men-tui-jian} - -<Route author="nczitzk" example="/gamer/hot/47157" path="/gamer/hot/:bsn" paramsDesc={['板块 id,在 URL 可以找到']} /> - -### 動畫瘋 - 最後更新 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-dong-hua-feng-zui-hou-geng-xin} - -<Route author="maple3142" example="/gamer/ani/new_anime" path="/gamer/ani/new_anime" /> +| Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 | +| ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- | +| ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime | ### 動畫瘋 - 動畫 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-dong-hua-feng-dong-hua} -<Route author="maple3142" example="/gamer/ani/anime/36868" path="/gamer/ani/anime/:sn" paramsDesc={['動畫 sn,在 URL 可以找到']} radar="1" /> +<Route namespace="gamer" data={{"path":"/ani/anime/:sn","categories":["anime"],"example":"/gamer/ani/anime/36868","parameters":{"sn":"動畫 sn,在 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"動畫瘋 - 動畫","maintainers":[],"location":"ani/anime.ts"}} /> + +### 動畫瘋 - 最後更新 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-dong-hua-feng-zui-hou-geng-xin} + +<Route namespace="gamer" data={{"path":"/ani/new_anime","categories":["anime"],"example":"/gamer/ani/new_anime","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ani.gamer.com.tw/"],"target":"/new_anime"},"name":"動畫瘋 - 最後更新","maintainers":[],"url":"ani.gamer.com.tw/","location":"ani/new-anime.ts"}} /> + +### 熱門推薦 {#ba-ha-mu-te-dian-wan-zi-xun-zhan-re-men-tui-jian} + +<Route namespace="gamer" data={{"path":"/hot/:bsn","categories":["anime"],"example":"/gamer/hot/47157","parameters":{"bsn":"板块 id,在 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"熱門推薦","maintainers":["nczitzk","TonyRL"],"location":"hot.ts"}} /> ## 包子漫画 {#bao-zi-man-hua} ### 订阅漫画 {#bao-zi-man-hua-ding-yue-man-hua} -<Route author="Fatpandac" example="/baozimh/comic/guowangpaiming-shiricaofu" path="/baozimh/comic/:name" paramsDesc={['漫画名称,在漫画链接可以得到(`comic/` 后的那段)']} /> - -## 咚漫 {#dong-man} - -### 漫画更新 {#dong-man-man-hua-geng-xin} - -<Route author="machsix" path="/dongmanmanhua/:category/:name/:id" example="/dongmanmanhua/COMEDY/xin-xinlingdeshengyin/381" paramsDesc={['类别','名称','ID']} /> +<Route namespace="baozimh" data={{"path":"/comic/:name","categories":["anime"],"example":"/baozimh/comic/guowangpaiming-shiricaofu","parameters":{"name":"漫画名称,在漫画链接可以得到(`comic/` 后的那段)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.baozimh.com/comic/:name"]},"name":"订阅漫画","maintainers":["Fatpandac"],"location":"index.ts"}} /> ## 动漫之家 {#dong-man-zhi-jia} ### 新闻站 {#dong-man-zhi-jia-xin-wen-zhan} -<Route author="vzz64" path="/dmzj/news/:category?" example="/dmzj/news/donghuaqingbao" paramsDesc={['类别']} radar="1"> - | 漫画情报 | 轻小说情报 | 动漫周边 | 声优情报 | 音乐资讯 | 游戏资讯 | 美图欣赏 | 漫展情报 | 大杂烩 | - | ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- | - | manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui | -</Route> +<Route namespace="dmzj" data={{"path":"/news/:category?","categories":["anime"],"example":"/dmzj/news/donghuaqingbao","parameters":{"category":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.dmzj.com/"],"target":"/news"},"name":"新闻站","maintainers":["vzz64"],"url":"news.dmzj.com/","description":"| 漫画情报 | 轻小说情报 | 动漫周边 | 声优情报 | 音乐资讯 | 游戏资讯 | 美图欣赏 | 漫展情报 | 大杂烩 |\n | ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- |\n | manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui |","location":"news.ts"}} /> + +| 漫画情报 | 轻小说情报 | 动漫周边 | 声优情报 | 音乐资讯 | 游戏资讯 | 美图欣赏 | 漫展情报 | 大杂烩 | +| ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- | +| manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui | ## 動漫狂 {#dong-man-kuang} ### 漫画更新 {#dong-man-kuang-man-hua-geng-xin} -<Route author="KellyHwong" path="/cartoonmad/comic/:id" example="/cartoonmad/comic/5827" paramsDesc={['漫画ID']} radar="1" /> +<Route namespace="cartoonmad" data={{"path":"/comic/:id","categories":["anime"],"example":"/cartoonmad/comic/5827","parameters":{"id":"漫画ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cartoonmad.com/comic/:id"]},"name":"漫画更新","maintainers":["KellyHwong"],"location":"comic.ts"}} /> ## 番组放送 {#fan-zu-fang-song} ### 开播提醒 {#fan-zu-fang-song-kai-bo-ti-xing} -<Route author="x2cf" example="/bgmlist/onair/zh-Hans" path="/bgmlist/onair/:lang?" paramsDesc={['语言']} radar="1" /> +<Route namespace="bgmlist" data={{"path":"/onair/:lang?","categories":["anime"],"example":"/bgmlist/onair/zh-Hans","parameters":{"lang":"语言"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"开播提醒","maintainers":["x2cf"],"location":"onair.ts"}} /> ## 风之动漫 {#feng-zhi-dong-man} ### 在线漫画 {#feng-zhi-dong-man-zai-xian-man-hua} -<Route author="geeeeoff zytomorrow" path="/fffdm/manhua/:id/:cdn?" example="/fffdm/manhua/93" paramsDesc={['漫画ID。默认获取全部,建议使用通用参数limit获取指定数量', 'cdn加速器。默认5,当前可选1-5']} radar="1" /> +<Route namespace="fffdm" data={{"path":"/manhua/:id/:cdn?","categories":["anime"],"example":"/fffdm/manhua/93","parameters":{"id":"漫画ID。默认获取全部,建议使用通用参数limit获取指定数量","cdn":"cdn加速器。默认5,当前可选1-5"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.fffdm.com/manhua/:id","www.fffdm.com/:id"],"target":"/manhua/:id"},"name":"在线漫画","maintainers":["zytomorrow"],"location":"manhua/manhua.ts"}} /> ## 禁漫天堂 {#jin-man-tian-tang} @@ -630,158 +405,154 @@ You can use some RSS parsing libraries (like `feedpraser` in `Python`) to receiv ### 成人 A 漫 {#jin-man-tian-tang-cheng-ren-a-man} -<Route author="nczitzk" example="/18comic" path="/18comic/:category?/:time?/:order?/:keyword?" paramsDesc={['分类,见下表,默认为 `all` 即全部', '时间范围,见下表,默认为 `a` 即全部', '排列顺序,见下表,默认为 `mr` 即最新', '关键字,见下表,默认为空']} anticrawler="1"> - 分类 +<Route namespace="18comic" data={{"path":"/:category?/:time?/:order?/:keyword?","categories":["anime"],"example":"/18comic","parameters":{"category":"分类,见下表,默认为 `all` 即全部","time":"时间范围,见下表,默认为 `a` 即全部","order":"排列顺序,见下表,默认为 `mr` 即最新","keyword":"关键字,见下表,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jmcomic.group/"]},"name":"成人 A 漫","maintainers":["nczitzk"],"url":"jmcomic.group/","description":"分类\n\n | 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 |\n | ---- | -------- | ------ | ------ | ------ | ----- | ------ |\n | all | another | doujin | hanman | meiman | short | single |\n\n 时间范围\n\n | 全部 | 今天 | 这周 | 本月 |\n | ---- | ---- | ---- | ---- |\n | a | t | w | m |\n\n 排列顺序\n\n | 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 |\n | ---- | ---------- | -------- | -------- | -------- | -------- |\n | mr | mv | mp | tr | md | tf |\n\n 关键字(供参考)\n\n | YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 |\n | ---- | ------ | --- | ---- | -- | ---- |","location":"index.ts"}} /> - | 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | - | ---- | -------- | ------ | ------ | ------ | ----- | ------ | - | all | another | doujin | hanman | meiman | short | single | +分类 - 时间范围 +| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | +| ---- | -------- | ------ | ------ | ------ | ----- | ------ | +| all | another | doujin | hanman | meiman | short | single | - | 全部 | 今天 | 这周 | 本月 | - | ---- | ---- | ---- | ---- | - | a | t | w | m | +时间范围 - 排列顺序 +| 全部 | 今天 | 这周 | 本月 | +| ---- | ---- | ---- | ---- | +| a | t | w | m | - | 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 | - | ---- | ---------- | -------- | -------- | -------- | -------- | - | mr | mv | mp | tr | md | tf | +排列顺序 - 关键字(供参考) +| 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 | +| ---- | ---------- | -------- | -------- | -------- | -------- | +| mr | mv | mp | tr | md | tf | - | YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 | - | ---- | ------ | --- | ---- | -- | ---- | -</Route> +关键字(供参考) + +| YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 | +| ---- | ------ | --- | ---- | -- | ---- | ### 搜索 {#jin-man-tian-tang-sou-suo} -<Route author="nczitzk" example="/18comic/search/photos/all/NTR" path="/18comic/search/:option?/:category?/:keyword?/:time?/:order?" paramsDesc={['选项,可选 `video` 和 `photos`,默认为 `photos`', '分类,同上表,默认为 `all` 即全部', '关键字,同上表,默认为空', '时间范围,同上表,默认为 `a` 即全部', '排列顺序,同上表,默认为 `mr` 即最新']} anticrawler="1"> - :::tip - 关键字必须超过两个字,这是来自网站的限制。 - ::: -</Route> +<Route namespace="18comic" data={{"path":"/search/:option?/:category?/:keyword?/:time?/:order?","categories":["anime"],"example":"/18comic/search/photos/all/NTR","parameters":{"option":"选项,可选 `video` 和 `photos`,默认为 `photos`","category":"分类,同上表,默认为 `all` 即全部","keyword":"关键字,同上表,默认为空","time":"时间范围,同上表,默认为 `a` 即全部","order":"排列顺序,同上表,默认为 `mr` 即最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jmcomic.group/"],"target":"/:category?/:time?/:order?/:keyword?"},"name":"搜索","maintainers":[],"url":"jmcomic.group/","description":":::tip\n 关键字必须超过两个字,这是来自网站的限制。\n :::","location":"search.ts"}} /> -### 专辑 {#jin-man-tian-tang-zhuan-ji} - -<Route author="nczitzk" example="/18comic/album/292282" path="/18comic/album/:id" paramsDesc={['专辑 id,可在专辑页 URL 中找到']} anticrawler="1"> - :::tip - 专辑 id 不包括 URL 中标题的部分。 - ::: -</Route> +:::tip +关键字必须超过两个字,这是来自网站的限制。 +::: ### 文庫 {#jin-man-tian-tang-wen-ku} -<Route author="nczitzk" example="/18comic/blogs" path="/18comic/blogs/:category?" paramsDesc={['分类,见下表,默认为空即全部']} anticrawler="1"> - 分类 +<Route namespace="18comic" data={{"path":"/blogs/:category?","categories":["anime"],"example":"/18comic/blogs","parameters":{"category":"分类,见下表,默认为空即全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jmcomic.group/"]},"name":"文庫","maintainers":["nczitzk"],"url":"jmcomic.group/","description":"分类\n\n | 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 |\n | ---- | -------- | -------- | -------- | -------- |\n | | dinner | raiders | jg | figure |","location":"blogs.ts"}} /> - | 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 | - | ---- | -------- | -------- | -------- | -------- | - | | dinner | raiders | jg | figure | -</Route> +分类 + +| 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 | +| ---- | -------- | -------- | -------- | -------- | +| | dinner | raiders | jg | figure | + +### 专辑 {#jin-man-tian-tang-zhuan-ji} + +<Route namespace="18comic" data={{"path":"/album/:id","categories":["anime"],"example":"/18comic/album/292282","parameters":{"id":"专辑 id,可在专辑页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jmcomic.group/"]},"name":"专辑","maintainers":["nczitzk"],"url":"jmcomic.group/","description":":::tip\n 专辑 id 不包括 URL 中标题的部分。\n :::","location":"album.ts"}} /> + +:::tip +专辑 id 不包括 URL 中标题的部分。 +::: ## 看漫画 {#kan-man-hua} ### 漫画更新 {#kan-man-hua-man-hua-geng-xin} -<Route author="MegrezZhu" path="/manhuagui/comic/:id/:chapterCnt?" example="/manhuagui/comic/22942/5" paramsDesc={['漫画ID','返回章节的数量,默认为0,返回所有章节']} radar="1" anticrawler="1" /> +<Route namespace="manhuagui" data={{"path":["/comic/:id/:chapterCnt?","/:domain?/comic/:id/:chapterCnt?"],"categories":["anime"],"example":"/manhuagui/comic/22942/5","parameters":{"id":"漫画ID","chapterCnt":"返回章节的数量,默认为0,返回所有章节"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mhgui.com/comic/:id/"],"target":"/comic/:id"},"name":"漫画更新","maintainers":["MegrezZhu"],"location":"comic.ts"}} /> + +### 漫画更新 {#kan-man-hua-man-hua-geng-xin} + +<Route namespace="manhuagui" data={{"path":["/comic/:id/:chapterCnt?","/:domain?/comic/:id/:chapterCnt?"],"categories":["anime"],"example":"/manhuagui/comic/22942/5","parameters":{"id":"漫画ID","chapterCnt":"返回章节的数量,默认为0,返回所有章节"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mhgui.com/comic/:id/"],"target":"/comic/:id"},"name":"漫画更新","maintainers":["MegrezZhu"],"location":"comic.ts"}} /> ### 漫画个人订阅 {#kan-man-hua-man-hua-ge-ren-ding-yue} -<Route author="shininome" path="/manhuagui/subscribe" example="/manhuagui/subscribe" radar="1" configRequired="1"> - :::tip - 个人订阅需要自建 - 环境变量需要添加 MHGUI\_COOKIE - ::: -</Route> +<Route namespace="manhuagui" data={{"path":"/subscribe","categories":["anime"],"example":"/manhuagui/subscribe","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mhgui.com/user/book/shelf"]},"name":"漫画个人订阅","maintainers":["shininome"],"url":"www.mhgui.com/user/book/shelf","description":":::tip\n 个人订阅需要自建\n 环境变量需要添加 MHGUI_COOKIE\n :::","location":"subscribe.ts"}} /> -### 镜像站 - 漫画更新 {#kan-man-hua-jing-xiang-zhan-man-hua-geng-xin} - -<Route author="btdwv" path="/manhuagui/mhgui/comic/:id/:chapterCnt?" example="/manhuagui/mhgui/comic/13317/5" paramsDesc={['漫画ID','返回章节的数量,默认为0,返回所有章节']} radar="1" anticrawler="1" /> - -### 台湾站 - 漫画更新 {#kan-man-hua-tai-wan-zhan-man-hua-geng-xin} - -<Route author="btdwv" path="/manhuagui/twmanhuagui/comic/:id/:chapterCnt?" example="/manhuagui/twmanhuagui/comic/13317/5" paramsDesc={['漫画ID','返回章节的数量,默认为0,返回所有章节']} radar="1" anticrawler="1" /> +:::tip +个人订阅需要自建 +环境变量需要添加 MHGUI\_COOKIE +::: ## 拷贝漫画 {#kao-bei-man-hua} ### 漫画更新 {#kao-bei-man-hua-man-hua-geng-xin} -<Route author="btdwv marvolo666 yan12125" path="/copymanga/comic/:id/:chapterCnt?" example="/copymanga/comic/dianjuren/5" paramsDesc={['漫画ID', '返回章节的数量,默认为 `10`']} radar="1" /> +<Route namespace="copymanga" data={{"path":"/comic/:id/:chapterCnt?","categories":["anime"],"example":"/copymanga/comic/dianjuren/5","parameters":{"id":"漫画ID","chapterCnt":"返回章节的数量,默认为 `10`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"漫画更新","maintainers":["btdwv","marvolo666","yan12125"],"location":"comic.ts"}} /> ## 来漫画 {#lai-man-hua} ### 漫画列表 {#lai-man-hua-man-hua-lie-biao} -<Route author="TonyRL" example="/laimanhua/tiandikangzhanjiVERSUS" path="/laimanhua/:id" paramsDesc={['漫画 ID,可在 URL 中找到']} radar="1" /> +<Route namespace="laimanhua" data={{"path":"/:id","categories":["anime"],"example":"/laimanhua/tiandikangzhanjiVERSUS","parameters":{"id":"漫画 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.laimanhua8.com/kanmanhua/:id"]},"name":"漫画列表","maintainers":["TonyRL"],"location":"index.ts"}} /> -## 漫画 DB {#man-hua-db} +## 腾讯新闻较真查证平台 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai} -### 漫画 DB {#man-hua-db-man-hua-db} +### 排行榜 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai-pai-hang-bang} -<Route author="junfengP" path="/manhuadb/:id" example="/manhuadb/comics/1711" paramsDesc={['漫画ID']} /> +<Route namespace="qq" data={{"path":"/ac/rank/:type?/:time?","categories":["anime"],"example":"/qq/ac/rank","parameters":{"type":"分类,见下表,默认为月票榜","time":"时间,`cur` 为当周、`prev` 为上周"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ac.qq.com/Rank/comicRank/type/:type","ac.qq.com/"]},"name":"排行榜","maintainers":["nczitzk"],"description":"| 月票榜 | 飙升榜 | 新作榜 | 畅销榜 | TOP100 | 男生榜 | 女生榜 |\n | ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n | mt | rise | new | pay | top | male | female |\n\n :::tip\n `time` 参数仅在 `type` 参数选为 **月票榜** 的时候生效。\n :::","location":"ac/rank.ts"}} /> -## 漫小肆 {#man-xiao-si} +| 月票榜 | 飙升榜 | 新作榜 | 畅销榜 | TOP100 | 男生榜 | 女生榜 | +| ------ | ------ | ------ | ------ | ------ | ------ | ------ | +| mt | rise | new | pay | top | male | female | -### 漫画更新 {#man-xiao-si-man-hua-geng-xin} - -<Route author="junfengP" path="/manxiaosi/book/:id" example="/manxiaosi/book/90" paramsDesc={['漫画id,漫画主页的地址栏中']} radar="1" /> - -## 轻之国度 {#qing-zhi-guo-du} - -### 文章更新阅读 {#qing-zhi-guo-du-wen-zhang-geng-xin-yue-du} - -<Route author="nightmare-mio" path="/lightnovel/:keywords/:security_key" example="/lightnovel/歡迎來到實力至上主義的教室/3cfc2dc63f3575ee42e12823188ad1b5:1709125:0" paramsDesc={['关键字,可以模糊匹配,但最好精确匹配。默认为文章类型','cookie,由于文章有防爬,所以必须携带cookie请求。route中的cookie优先级高于环境变量cookie,取token中的security_key值']} radar="1" /> - -## 紳士漫畫 {#shen-shi-man-hua} - -### 最新 {#shen-shi-man-hua-zui-xin} - -<Route author="KenMizz" example="/wnacg" path="/wnacg" radar="1" /> - -### 分类更新 {#shen-shi-man-hua-fen-lei-geng-xin} - -<Route author="Gandum2077" example="/wnacg/category/6" path="/wnacg/category/:cid" paramsDesc={['分类的 id,即对应 URL 中的数字']} radar="1" /> - -### 標籤更新 {#shen-shi-man-hua-biao-qian-geng-xin} - -<Route author="Gandum2077" example="/wnacg/tag/漢化" path="/wnacg/tag/:tag" paramsDesc={['標籤,即 URL 中的 `tag-`後的文字']} radar="1" /> - -## 腾讯动漫 {#teng-xun-dong-man} - -### 排行榜 {#teng-xun-dong-man-pai-hang-bang} - -<Route author="nczitzk" example="/qq/ac/rank" path="/qq/ac/rank/:type?/:time?" paramsDesc={['分类,见下表,默认为月票榜', '时间,`cur` 为当周、`prev` 为上周']} radar="1"> - | 月票榜 | 飙升榜 | 新作榜 | 畅销榜 | TOP100 | 男生榜 | 女生榜 | - | ------ | ------ | ------ | ------ | ------ | ------ | ------ | - | mt | rise | new | pay | top | male | female | - - :::tip - `time` 参数仅在 `type` 参数选为 **月票榜** 的时候生效。 - ::: -</Route> - -### 漫画 {#teng-xun-dong-man-man-hua} - -<Route author="nczitzk" example="/qq/ac/comic/531490" path="/qq/ac/comic/:id" paramsDesc={['编号,可在对应页 URL 中找到']} radar="1" /> +:::tip +`time` 参数仅在 `type` 参数选为 **月票榜** 的时候生效。 +::: ## 月幕 Galgame {#yue-mu-galgame} -### 文章 {#yue-mu-galgame-wen-zhang} - -<Route author="SunBK201" example="/ymgal/article" path="/ymgal/article/:type?" paramsDesc={['文章类型']} radar="1"> - | 全部文章 | 资讯 | 专栏 | - | -------- | ---- | ------ | - | all | news | column | -</Route> - ### 本月新作 {#yue-mu-galgame-ben-yue-xin-zuo} -<Route author="SunBK201" example="/ymgal/game/release" path="/ymgal/game/release" radar="1" /> +<Route namespace="ymgal" data={{"path":"/game/release","categories":["anime"],"example":"/ymgal/game/release","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ymgal.games/"]},"name":"本月新作","maintainers":["SunBK201"],"url":"ymgal.games/","location":"game.ts"}} /> + +### 文章 {#yue-mu-galgame-wen-zhang} + +<Route namespace="ymgal" data={{"path":"/article/:type?","categories":["anime"],"example":"/ymgal/article","parameters":{"type":"文章类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["SunBK201"],"description":"| 全部文章 | 资讯 | 专栏 |\n | -------- | ---- | ------ |\n | all | news | column |","location":"article.ts"}} /> + +| 全部文章 | 资讯 | 专栏 | +| -------- | ---- | ------ | +| all | news | column | ## アニメ新番組 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu} -### 當季新番 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-dang-ji-xin-fan} +### Unknown {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-unknown} -<Route author="devinmugen" example="/bangumi/online" path="/bangumi/online" anticrawler="1" /> +<Route namespace="bangumi" data={{"path":"/online","categories":["anime"],"example":"/bangumi/online","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bangumi.online/"]},"name":"Unknown","maintainers":["devinmugen"],"url":"bangumi.online/","location":"online/online.ts"}} /> + +### 成员关注动画榜 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-cheng-yuan-guan-zhu-dong-hua-bang} + +<Route namespace="bangumi" data={{"path":"/tv/followrank","categories":["anime"],"example":"/bangumi/tv/followrank","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/anime"]},"name":"成员关注动画榜","maintainers":["honue"],"url":"bgm.tv/anime","location":"tv/other/followrank.ts"}} /> + +### 放送列表 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-fang-song-lie-biao} + +<Route namespace="bangumi" data={{"path":"/tv/calendar/today","categories":["anime"],"example":"/bangumi/tv/calendar/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/calendar"]},"name":"放送列表","maintainers":["magic-akari"],"url":"bgm.tv/calendar","location":"tv/calendar/today.ts"}} /> + +### 条目的通用路由格式 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-tiao-mu-di-tong-yong-lu-you-ge-shi} + +<Route namespace="bangumi" data={{"path":"/tv/subject/:id/:type?/:showOriginalName?","categories":["anime"],"example":"/bangumi/tv/subject/328609/ep/true","parameters":{"id":"条目 id, 在条目页面的地址栏查看","type":"条目类型,可选值为 `ep`, `comments`, `blogs`, `topics`,默认为 `ep`","showOriginalName":"显示番剧标题原名,可选值 0/1/false/true,默认为 false"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/subject/:id"],"target":"/tv/subject/:id"},"name":"条目的通用路由格式","maintainers":["JimenezLi"],"description":":::warning\n 此通用路由仅用于对路由参数的描述,具体信息请查看下方与条目相关的路由\n :::","location":"tv/subject/index.ts"}} /> + +:::warning +此通用路由仅用于对路由参数的描述,具体信息请查看下方与条目相关的路由 +::: + +### 现实人物的新作品 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-xian-shi-ren-wu-de-xin-zuo-pin} + +<Route namespace="bangumi" data={{"path":"/tv/person/:id","categories":["anime"],"example":"/bangumi/tv/person/32943","parameters":{"id":"人物 id, 在人物页面的地址栏查看"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/person/:id"]},"name":"现实人物的新作品","maintainers":["ylc395"],"location":"tv/person/index.ts"}} /> + +### 小组话题的新回复 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-xiao-zu-hua-ti-de-xin-hui-fu} + +<Route namespace="bangumi" data={{"path":"/tv/topic/:id","categories":["anime"],"example":"/bangumi/tv/topic/367032","parameters":{"id":"话题 id, 在话题页面地址栏查看"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/group/topic/:id"]},"name":"小组话题的新回复","maintainers":["ylc395"],"location":"tv/group/reply.ts"}} /> + +### 小组话题 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-xiao-zu-hua-ti} + +<Route namespace="bangumi" data={{"path":"/tv/group/:id","categories":["anime"],"example":"/bangumi/tv/group/boring","parameters":{"id":"小组 id, 在小组页面地址栏查看"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/group/:id"]},"name":"小组话题","maintainers":["SettingDust"],"location":"tv/group/topic.ts"}} /> + +### 用户日志 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-yong-hu-ri-zhi} + +<Route namespace="bangumi" data={{"path":"/tv/user/blog/:id","categories":["anime"],"example":"/bangumi/tv/user/blog/sai","parameters":{"id":"用户 id, 在用户页面地址栏查看"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/user/:id"]},"name":"用户日志","maintainers":["nczitzk"],"location":"tv/user/blog.ts"}} /> + +### 用户想看 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-yong-hu-xiang-kan} + +<Route namespace="bangumi" data={{"path":"/tv/user/wish/:id","categories":["anime"],"example":"/bangumi/tv/user/wish/sai","parameters":{"id":"用户 id, 在用户页面地址栏查看"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bgm.tv/anime/list/:id/wish"]},"name":"用户想看","maintainers":["honue"],"location":"tv/user/wish.ts"}} /> diff --git a/website/docs/routes/bbs.mdx b/website/docs/routes/bbs.mdx index 22632efcb..d2a636e19 100644 --- a/website/docs/routes/bbs.mdx +++ b/website/docs/routes/bbs.mdx @@ -1,128 +1,90 @@ -# 💬️ BBS +# bbs ## 19 楼 {#19-lou} ### 头条 {#19-lou-tou-tiao} -<Route author="nczitzk" example="/19lou/jiaxing" path="/19lou/:city?" paramsDesc={['分类,见下表,默认为 www,即杭州']}> - | 杭州 | 台州 | 嘉兴 | 宁波 | 湖州 | - | ---- | ------- | ------- | ------ | ------ | - | www | taizhou | jiaxing | ningbo | huzhou | +<Route namespace="19lou" data={{"path":"/:city?","categories":["bbs"],"example":"/19lou/jiaxing","parameters":{"city":"分类,见下表,默认为 www,即杭州"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"头条","maintainers":["nczitzk"],"description":"| 杭州 | 台州 | 嘉兴 | 宁波 | 湖州 |\n | ---- | ------- | ------- | ------ | ------ |\n | www | taizhou | jiaxing | ningbo | huzhou |\n\n | 绍兴 | 湖州 | 温州 | 金华 | 舟山 |\n | -------- | ------ | ------- | ------ | -------- |\n | shaoxing | huzhou | wenzhou | jinhua | zhoushan |\n\n | 衢州 | 丽水 | 义乌 | 萧山 | 余杭 |\n | ------ | ------ | ---- | -------- | ------ |\n | quzhou | lishui | yiwu | xiaoshan | yuhang |\n\n | 临安 | 富阳 | 桐庐 | 建德 | 淳安 |\n | ----- | ------ | ------ | ------ | ------ |\n | linan | fuyang | tonglu | jiande | chunan |","location":"index.ts"}} /> - | 绍兴 | 湖州 | 温州 | 金华 | 舟山 | - | -------- | ------ | ------- | ------ | -------- | - | shaoxing | huzhou | wenzhou | jinhua | zhoushan | +| 杭州 | 台州 | 嘉兴 | 宁波 | 湖州 | +| ---- | ------- | ------- | ------ | ------ | +| www | taizhou | jiaxing | ningbo | huzhou | - | 衢州 | 丽水 | 义乌 | 萧山 | 余杭 | - | ------ | ------ | ---- | -------- | ------ | - | quzhou | lishui | yiwu | xiaoshan | yuhang | +| 绍兴 | 湖州 | 温州 | 金华 | 舟山 | +| -------- | ------ | ------- | ------ | -------- | +| shaoxing | huzhou | wenzhou | jinhua | zhoushan | - | 临安 | 富阳 | 桐庐 | 建德 | 淳安 | - | ----- | ------ | ------ | ------ | ------ | - | linan | fuyang | tonglu | jiande | chunan | -</Route> +| 衢州 | 丽水 | 义乌 | 萧山 | 余杭 | +| ------ | ------ | ---- | -------- | ------ | +| quzhou | lishui | yiwu | xiaoshan | yuhang | -## 423Down {#423down} - -### 分类 {#423down-fen-lei} - -<Route author="Fatpandac" example="/423down/index/all" path="/423down/:category/:type" paramsDesc={['类型', '分类']} radar="1"> - | category | 全部 | - | :------: | :--: | - | index | all | - - | category | 安卓软件 | - | :------: | :------: | - | android | apk | - - | category | 原创软件 | 媒体播放 | 网页浏览 | 图形图像 | 聊天软件 | 办公软件 | 上传下载 | 系统辅助 | 系统必备 | 安全软件 | 补丁相关 | 硬件相关 | - | :------: | :----------: | :--------: | :------: | :------: | :------: | :------: | :------: | :--------: | :--------: | :------: | :------: | :------: | - | computer | originalsoft | multimedia | browser | image | im | work | down | systemsoft | systemplus | security | patch | hardware | - - | category | windows 11 | windows 10 | windows 7 | windows xp | windows pe | - | :------: | :--------: | :--------: | :-------: | :--------: | :--------: | - | os | win11 | win10 | win7 | winxp | winpe | -</Route> +| 临安 | 富阳 | 桐庐 | 建德 | 淳安 | +| ----- | ------ | ------ | ------ | ------ | +| linan | fuyang | tonglu | jiande | chunan | ## 8264 {#8264} ### 列表 {#8264-lie-biao} -<Route author="nczitzk" example="/8264/list/751" path="/8264/list/:id?" paramsDesc={['列表 id,见下表,默认为 751,即热门推荐']} radar="1"> - | 热门推荐 | 户外知识 | 户外装备 | - | -------- | -------- | -------- | - | 751 | 238 | 204 | +<Route namespace="8264" data={{"path":"/list/:id?","categories":["bbs"],"example":"/8264/list/751","parameters":{"id":"列表 id,见下表,默认为 751,即热门推荐"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"列表","maintainers":["nczitzk"],"description":"| 热门推荐 | 户外知识 | 户外装备 |\n | -------- | -------- | -------- |\n | 751 | 238 | 204 |\n\n <details>\n <summary>更多列表</summary>\n\n #### 热门推荐\n\n | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | 489 | 733 | 746 | 902 | 914 | 934 | 935 |\n\n #### 户外知识\n\n | 徒步 | 露营 | 安全急救 | 领队 | 登雪山 |\n | ---- | ---- | -------- | ---- | ------ |\n | 242 | 950 | 931 | 920 | 915 |\n\n | 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 |\n | ---- | ---- | ---- | ---- | -------- |\n | 916 | 917 | 918 | 919 | 921 |\n\n | 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 |\n | ---- | ---- | ---- | ---- | ---- |\n | 951 | 952 | 953 | 966 | 967 |\n\n | 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 |\n | -------- | ------ | ---- | -------- | ------ |\n | 968 | 969 | 970 | 973 | 971 |\n\n | 游泳 | 溯溪 | 健身 | 瑜伽 |\n | ---- | ---- | ---- | ---- |\n | 974 | 975 | 976 | 977 |\n\n #### 户外装备\n\n | 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 |\n | ---- | ------ | ------ | ------ | ------ |\n | 209 | 923 | 924 | 925 | 926 |\n\n | 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 |\n | ------ | ---- | ------ | ------ | ------ |\n | 927 | 929 | 211 | 928 | 930 |\n\n | 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 |\n | -------- | ------ | ------ | ---- | ---- |\n | 933 | 932 | 220 | 208 | 212 |\n\n | 炉具 | 灯具 | 水具 | 面料 | 背包 |\n | ---- | ---- | ---- | ---- | ---- |\n | 792 | 218 | 219 | 222 | 207 |\n\n | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 |\n | ------ | -------- | -------- | -------- |\n | 214 | 216 | 215 | 223 |\n </details>","location":"list.ts"}} /> - <details> - <summary>更多列表</summary> +| 热门推荐 | 户外知识 | 户外装备 | +| -------- | -------- | -------- | +| 751 | 238 | 204 | - #### 热门推荐 +<details> + <summary>更多列表</summary> - | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 489 | 733 | 746 | 902 | 914 | 934 | 935 | + #### 热门推荐 - #### 户外知识 + | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 489 | 733 | 746 | 902 | 914 | 934 | 935 | - | 徒步 | 露营 | 安全急救 | 领队 | 登雪山 | - | ---- | ---- | -------- | ---- | ------ | - | 242 | 950 | 931 | 920 | 915 | + #### 户外知识 - | 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 | - | ---- | ---- | ---- | ---- | -------- | - | 916 | 917 | 918 | 919 | 921 | + | 徒步 | 露营 | 安全急救 | 领队 | 登雪山 | + | ---- | ---- | -------- | ---- | ------ | + | 242 | 950 | 931 | 920 | 915 | - | 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 | - | ---- | ---- | ---- | ---- | ---- | - | 951 | 952 | 953 | 966 | 967 | + | 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 | + | ---- | ---- | ---- | ---- | -------- | + | 916 | 917 | 918 | 919 | 921 | - | 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 | - | -------- | ------ | ---- | -------- | ------ | - | 968 | 969 | 970 | 973 | 971 | + | 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 | + | ---- | ---- | ---- | ---- | ---- | + | 951 | 952 | 953 | 966 | 967 | - | 游泳 | 溯溪 | 健身 | 瑜伽 | - | ---- | ---- | ---- | ---- | - | 974 | 975 | 976 | 977 | + | 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 | + | -------- | ------ | ---- | -------- | ------ | + | 968 | 969 | 970 | 973 | 971 | - #### 户外装备 + | 游泳 | 溯溪 | 健身 | 瑜伽 | + | ---- | ---- | ---- | ---- | + | 974 | 975 | 976 | 977 | - | 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 | - | ---- | ------ | ------ | ------ | ------ | - | 209 | 923 | 924 | 925 | 926 | + #### 户外装备 - | 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 | - | ------ | ---- | ------ | ------ | ------ | - | 927 | 929 | 211 | 928 | 930 | + | 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 | + | ---- | ------ | ------ | ------ | ------ | + | 209 | 923 | 924 | 925 | 926 | - | 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 | - | -------- | ------ | ------ | ---- | ---- | - | 933 | 932 | 220 | 208 | 212 | + | 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 | + | ------ | ---- | ------ | ------ | ------ | + | 927 | 929 | 211 | 928 | 930 | - | 炉具 | 灯具 | 水具 | 面料 | 背包 | - | ---- | ---- | ---- | ---- | ---- | - | 792 | 218 | 219 | 222 | 207 | + | 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 | + | -------- | ------ | ------ | ---- | ---- | + | 933 | 932 | 220 | 208 | 212 | - | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | - | ------ | -------- | -------- | -------- | - | 214 | 216 | 215 | 223 | - </details> -</Route> + | 炉具 | 灯具 | 水具 | 面料 | 背包 | + | ---- | ---- | ---- | ---- | ---- | + | 792 | 218 | 219 | 222 | 207 | -## Chiphell {#chiphell} - -### 子版块 {#chiphell-zi-ban-kuai} - -<Route author="tylinux" example="/chiphell/forum/80" path="/chiphell/forum/:forumId" paramsDesc={['子版块 id,可在子版块 URL 找到']} /> - -## Citavi 中文网站论坛 {#citavi-zhong-wen-wang-zhan-lun-tan} - -### 分类 {#citavi-zhong-wen-wang-zhan-lun-tan-fen-lei} - -<Route author="nczitzk" example="/citavi" path="/citavi/:caty" paramsDesc={['分类名,可在对应分类页 URL 中找到,默认为全部']}> - | 全部 | 下载安装 | 许可证 | 入门指南 | 升级更新 | 教程 | 新闻资讯 | 技巧分享 | 账户插件 | 其他 | | - | ---- | ---------- | ------- | -------------- | -------- | -------------- | -------- | -------- | ------------- | ------ | ------ | - | | Installing | License | GettingStarted | Update | CitaviinDetail | News | Share | CitaviAccount | Addons | Others | -</Route> + | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | + | ------ | -------- | -------- | -------- | + | 214 | 216 | 215 | 223 | +</details> ## Dcard {#dcard} @@ -130,13 +92,9 @@ 僅能透過台灣 IP 抓取。 ::: -### 首頁帖子 {#dcard-shou-ye-tie-zi} - -<Route author="DIYgod" example="/dcard/posts/popular" path="/dcard/posts/:type?" paramsDesc={['排序,popular 熱門;latest 最新,默認為 latest']} radar="1" anticrawler="1" puppeteer="1" /> - ### 板塊帖子 {#dcard-ban-kuai-tie-zi} -<Route author="HenryQW" example="/dcard/funny/popular" path="/dcard/:section/:type?" paramsDesc={['板塊名稱,URL 中獲得', '排序,popular 熱門;latest 最新,默認為 latest']} radar="1" anticrawler="1" puppeteer="1" /> +<Route namespace="dcard" data={{"path":"/:section/:type?","categories":["bbs"],"example":"/dcard/funny/popular","parameters":{"section":"板塊名稱,URL 中獲得","type":"排序,popular 熱門;latest 最新,默認為 latest"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"板塊帖子","maintainers":["HenryQW"],"location":"section.ts"}} /> ## Discourse {#discourse} @@ -146,563 +104,349 @@ You need to set the environment variable `DISCOURSE_CONFIG_{id}` before using it ### Latest posts {#discourse-latest-posts} -<Route author="dzx-dzx" example="/discourse/0/posts" path="/discourse/:configId/posts" paramsDesc={['Environment variable configuration id, see above']} configRequired="1" /> +<Route namespace="discourse" data={{"path":"/:configId/posts","categories":["bbs"],"example":"/discourse/0/posts","parameters":{"configId":"Environment variable configuration id, see above"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Latest posts","maintainers":["dzx-dzx"],"location":"posts.ts"}} /> ### Notifications {#discourse-notifications} -<Route author="dzx-dzx" example="/discourse/0/notifications" path="/discourse/:configId/notifications/:fulltext?" paramsDesc={['Environment variable configuration id, see above','Fetch the content if the notification points to a post. This is disabled by default, set it to `1` to enable it.']} configRequired="1" /> +<Route namespace="discourse" data={{"path":"/:configId/notifications/:fulltext?","categories":["bbs"],"example":"/discourse/0/notifications","parameters":{"configId":"Environment variable configuration id, see above","fulltext":"Fetch the content if the notification points to a post. This is disabled by default, set it to `1` to enable it."},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Notifications","maintainers":[],"description":":::warning\nIf you opt to enable `fulltext` feature, consider adding `limit` parameter to your query to avoid sending too many request.\n:::","location":"notifications.ts"}} /> :::warning If you opt to enable `fulltext` feature, consider adding `limit` parameter to your query to avoid sending too many request. ::: -## Discuz {#discuz} - -### General Subforum - Auto detection {#discuz-general-subforum-auto-detection} - -<Route author="junfengP" example="/discuz/http%3a%2f%2fwww.u-share.cn%2fforum.php%3fmod%3dforumdisplay%26fid%3d56" path="/discuz/:link" paramsDesc={['link of subforum, require url encoded ']} anticrawler="1" /> - -### General Subforum - Manual version {#discuz-general-subforum-manual-version} - -<Route author="junfengP" example="/discuz/x/https%3a%2f%2fwww.52pojie.cn%2fforum-16-1.html" path="/discuz/:ver/:link" paramsDesc={['discuz version,see below table','link of subforum, require url encoded']}> - | Discuz X Series | Discuz 7.x Series | - | --------------- | ----------------- | - | x | 7 | -</Route> - -### General Subforum - Support cookie {#discuz-general-subforum-support-cookie} - -<Route author="junfengP" example="/discuz/x/00/https%3a%2f%2fbbs.zdfx.net%2fforum-2-1.html" path="/discuz/:ver/:cid/:link" paramsDesc={['discuz version,see below table', 'Cookie id,require self hosted and set environment parameters, see Deploy - Configuration pages for detail','link of subforum, require url encoded']} configRequired="1"> - | Discuz X Series | Discuz 7.x Series | - | --------------- | ----------------- | - | x | 7 | -</Route> - ## Elastic 中文社区 {#elastic-zhong-wen-she-qu} ### 发现 {#elastic-zhong-wen-she-qu-fa-xian} -<Route author="nczitzk" example="/elasticsearch-cn" path="/elasticsearch-cn/:params?" paramsDesc={['分类,可在对应分类页 URL 中找到']}> - 如 [Elasticsearch 最新](https://elasticsearch.cn/category-2) 的 URL 为 `https://elasticsearch.cn/category-2`,则分类参数处填写 `category-2`,最后得到路由地址 [`/elasticsearch-cn/category-2`](https://rsshub.app/elasticsearch-cn/category-2)。 +<Route namespace="elasticsearch-cn" data={{"path":"/:params?","categories":["bbs"],"example":"/elasticsearch-cn","parameters":{"params":"分类,可在对应分类页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["elasticsearch.cn/:params","elasticsearch.cn/"],"target":"/:params"},"name":"发现","maintainers":["nczitzk"],"description":"如 [Elasticsearch 最新](https://elasticsearch.cn/category-2) 的 URL 为 `https://elasticsearch.cn/category-2`,则分类参数处填写 `category-2`,最后得到路由地址 [`/elasticsearch-cn/category-2`](https://rsshub.app/elasticsearch-cn/category-2)。\n\n 又如 [求职招聘 30 天热门](https://elasticsearch.cn/sort_type-hot____category-12__day-30) 的 URL 为 `https://elasticsearch.cn/sort_type-hot____category-12__day-30`,则分类参数处填写 `sort_type-hot____category-12__day-30`,最后得到路由地址 [`/elasticsearch-cn/sort_type-hot____category-12__day-30`](https://rsshub.app/elasticsearch-cn/sort_type-hot____category-12__day-30)。","location":"index.ts"}} /> - 又如 [求职招聘 30 天热门](https://elasticsearch.cn/sort_type-hot____category-12__day-30) 的 URL 为 `https://elasticsearch.cn/sort_type-hot____category-12__day-30`,则分类参数处填写 `sort_type-hot____category-12__day-30`,最后得到路由地址 [`/elasticsearch-cn/sort_type-hot____category-12__day-30`](https://rsshub.app/elasticsearch-cn/sort_type-hot____category-12__day-30)。 -</Route> +如 [Elasticsearch 最新](https://elasticsearch.cn/category-2) 的 URL 为 `https://elasticsearch.cn/category-2`,则分类参数处填写 `category-2`,最后得到路由地址 [`/elasticsearch-cn/category-2`](https://rsshub.app/elasticsearch-cn/category-2)。 -## eTOLAND {#etoland} - -### 主题贴 {#etoland-zhu-ti-tie} - -<Route author="mengx8" example="/etoland/star01" path="/etoland/:boardId" paramsDesc={['板块 id,可在板块 URL 找到']} radar="1" /> - -## HACKER TALK 黑客说 {#hacker-talk-hei-ke-shuo} - -### 最新帖子 {#hacker-talk-hei-ke-shuo-zui-xin-tie-zi} - -<Route author="hyoban" example="/hackertalk" path="/hackertalk" radar="1" /> +又如 [求职招聘 30 天热门](https://elasticsearch.cn/sort_type-hot____category-12__day-30) 的 URL 为 `https://elasticsearch.cn/sort_type-hot____category-12__day-30`,则分类参数处填写 `sort_type-hot____category-12__day-30`,最后得到路由地址 [`/elasticsearch-cn/sort_type-hot____category-12__day-30`](https://rsshub.app/elasticsearch-cn/sort_type-hot____category-12__day-30)。 ## LearnKu {#learnku} ### 社区 {#learnku-she-qu} -<Route author="haokaiyang" example="/learnku/laravel/qa" path="/learnku/:community/:category?" paramsDesc={['社区 标识,可在 <https://learnku.com/communities> 找到', '分类,如果不传 `category` 则获取全部分类']} /> +<Route namespace="learnku" data={{"path":"/:community/:category?","categories":["bbs"],"example":"/learnku/laravel/qa","parameters":{"community":"社区 标识,可在 <https://learnku.com/communities> 找到","category":"分类,如果不传 `category` 则获取全部分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["learnku.com/:community"],"target":"/:community"},"name":"社区","maintainers":["kayw-geek"],"description":"| 招聘 | 翻译 | 问答 | 链接 |\n| ---- | ------------ | ---- | ----- |\n| jobs | translations | qa | links |","location":"topic.ts"}} /> | 招聘 | 翻译 | 问答 | 链接 | | ---- | ------------ | ---- | ----- | | jobs | translations | qa | links | -## MCBBS {#mcbbs} - -### 版块 {#mcbbs-ban-kuai} - -<Route author="cssxsh" example="/mcbbs/forum/news" path="/mcbbs/forum/:type" paramsDesc={['版块名称或者版块号']} /> - -### 帖子 {#mcbbs-tie-zi} - -<Route author="cssxsh" example="/mcbbs/post/915861/3038" path="/mcbbs/post/:tid/:authorid?" paramsDesc={['贴子id,可在帖子 URL 找到', '用户id,此参数不为空时,只看此作者']} /> - ## Meteor {#meteor} -### 看板 {#meteor-kan-ban} - -<Route author="TonyRL" example="/meteor/all" path="/meteor/:board?" paramsDesc={['看板 ID 或簡稱,可在 URL 或下方路由找到,預設為 `all`']} radar="1" /> - ### 看板列表 {#meteor-kan-ban-lie-biao} -<Route author="TonyRL" example="/meteor/boards" path="/meteor/boards" radar="1" /> +<Route namespace="meteor" data={{"path":"/boards","categories":["bbs"],"example":"/meteor/boards","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["meteor.today/"]},"name":"看板列表","maintainers":["TonyRL"],"url":"meteor.today/","location":"boards.ts"}} /> + +### 看板 {#meteor-kan-ban} + +<Route namespace="meteor" data={{"path":"/:board?","categories":["bbs"],"example":"/meteor/all","parameters":{"board":"看板 ID 或簡稱,可在 URL 或下方路由找到,預設為 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"看板","maintainers":["TonyRL"],"location":"index.ts"}} /> ## NGA {#nga} ### 分区帖子 {#nga-fen-qu-tie-zi} -<Route author="xyqfer" example="/nga/forum/489" path="/nga/forum/:fid/:recommend?" paramsDesc={['分区 id, 可在分区主页 URL 找到, 没有 fid 时 stid 同样适用','是否只显示精华主题, 留空为否, 任意值为是']} radar="1" /> +<Route namespace="nga" data={{"path":"/forum/:fid/:recommend?","categories":["bbs"],"example":"/nga/forum/489","parameters":{"fid":"分区 id, 可在分区主页 URL 找到, 没有 fid 时 stid 同样适用","recommend":"是否只显示精华主题, 留空为否, 任意值为是"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分区帖子","maintainers":["xyqfer"],"location":"forum.ts"}} /> ### 帖子 {#nga-tie-zi} -<Route author="xyqfer syrinka" example="/nga/post/18449558" path="/nga/post/:tid/:authorId?" paramsDesc={['帖子 id, 可在帖子 URL 找到', '作者 id']} radar="1" /> +<Route namespace="nga" data={{"path":"/post/:tid/:authorId?","categories":["bbs"],"example":"/nga/post/18449558","parameters":{"tid":"帖子 id, 可在帖子 URL 找到","authorId":"作者 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"帖子","maintainers":["xyqfer","syrinka"],"location":"post.ts"}} /> ## Pikabu {#pikabu} -### Community {#pikabu-community} - -<Route author="TonyRL" example="/pikabu/community/real_true_story" path="/pikabu/community/:name" paramsDesc={['Community name']} radar="1" notOperational="1" /> - -### Tag {#pikabu-tag} - -<Route author="TonyRL" example="/pikabu/tag/Metallica" path="/pikabu/tag/:name" paramsDesc={['Tag name']} radar="1" /> - ### User {#pikabu-user} -<Route author="TonyRL" example="/pikabu/user/@bula.dragon" path="/pikabu/user/:name" paramsDesc={['User name']} radar="1" /> +<Route namespace="pikabu" data={{"path":"/user/:name","categories":["bbs"],"example":"/pikabu/user/@bula.dragon","parameters":{"name":"User name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pikabu.ru/:name"]},"name":"User","maintainers":["TonyRL"],"location":"user.ts"}} /> ## PKMer {#pkmer} ### 最近更新 {#pkmer-zui-jin-geng-xin} -<Route author="Gnoyong" example="/pkmer/recent" path="/pkmer/recent" radar="1" /> +<Route namespace="pkmer" data={{"path":"/recent","categories":["bbs"],"example":"/pkmer/recent","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pkmer.cn/page/*"]},"name":"最近更新","maintainers":["Gnoyong"],"url":"pkmer.cn/page/*","location":"recent.ts"}} /> ## PLAYNO.1 玩樂達人 {#playno-1-wan-le-da-ren} ### AV {#playno-1-wan-le-da-ren-av} +<Route namespace="playno1" data={{"path":"/av/:catid?","categories":["bbs"],"example":"/playno1/av","parameters":{"catid":"分类,见下表,默认为全部文章"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"AV","maintainers":["TonyRL"],"description":":::warning\n目前观测到该博客可能禁止日本 IP 访问。建议部署在日本区以外的服务器上。\n:::\n\n | 全部文章 | AV 新聞 | AV 導覽 |\n | -------- | ------- | ------- |\n | 78 | 3 | 5 |","location":"av.ts"}} /> + :::warning 目前观测到该博客可能禁止日本 IP 访问。建议部署在日本区以外的服务器上。 ::: -<Route author="TonyRL" example="/playno1/av" path="/playno1/av/:catid?" paramsDesc={['分类,见下表,默认为全部文章']} radar="1"> - | 全部文章 | AV 新聞 | AV 導覽 | - | -------- | ------- | ------- | - | 78 | 3 | 5 | -</Route> +| 全部文章 | AV 新聞 | AV 導覽 | +| -------- | ------- | ------- | +| 78 | 3 | 5 | ### 情趣 {#playno-1-wan-le-da-ren-qing-qu} -<Route author="TonyRL" example="/playno1/st" path="/playno1/st/:catid?" paramsDesc={['分类,见下表,默认为全部文章']} radar="1"> - | 全部文章 | 情趣體驗報告 | 情趣新聞 | 情趣研究所 | - | -------- | ------------ | -------- | ---------- | - | all | experience | news | graduate | -</Route> +<Route namespace="playno1" data={{"path":"/st/:catid?","categories":["bbs"],"example":"/playno1/st","parameters":{"catid":"分类,见下表,默认为全部文章"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["stno1.playno1.com/stno1/:catid/"],"target":"/st/:catid"},"name":"情趣","maintainers":["TonyRL"],"description":"| 全部文章 | 情趣體驗報告 | 情趣新聞 | 情趣研究所 |\n | -------- | ------------ | -------- | ---------- |\n | all | experience | news | graduate |","location":"st.ts"}} /> -## RF 技术社区 {#rf-ji-shu-she-qu} - -### 文章 {#rf-ji-shu-she-qu-wen-zhang} - -<Route author="nczitzk" example="/rf/article" path="/rf/article" /> - -## Ruby China {#ruby-china} - -> 未登录状态下抓取页面非实时更新 - -### 主题 {#ruby-china-zhu-ti} - -<Route author="ahonn" example="/ruby-china/topics" path="/ruby-china/topics/:type" paramsDesc={['主题类型,在 URL 可以找到']} /> - -| 主题类型 | type | -| -------- | ----------- | -| 精华贴 | excellent | -| 优质帖子 | popular | -| 无人问津 | no\_reply | -| 最新回复 | last\_reply | -| 最新发布 | last | - -### 招聘 {#ruby-china-zhao-pin} - -<Route author="ahonn" example="/ruby-china/jobs" path="/ruby-china/jobs" /> +| 全部文章 | 情趣體驗報告 | 情趣新聞 | 情趣研究所 | +| -------- | ------------ | -------- | ---------- | +| all | experience | news | graduate | ## Saraba1st {#saraba1st} -### 帖子 {#saraba1st-tie-zi} - -<Route author="zengxs" example="/saraba1st/thread/1842868" path="/saraba1st/thread/:tid" paramsDesc={['帖子 id']} radar="1" notOperational="1"> - 帖子网址如果为 `https://bbs.saraba1st.com/2b/thread-1842868-1-1.html` 那么帖子 id 就是 `1789863`。 -</Route> - ### 论坛摘要 {#saraba1st-lun-tan-zhai-yao} -<Route author="shinemoon" example="/saraba1st/digest/forum-75-1" path="/saraba1st/digest/:tid" paramsDesc={['论坛 id']} radar="1"> - 版面网址如果为 `https://bbs.saraba1st.com/2b/forum-75-1.html` 那么论坛 id 就是 `forum-75-1`。 -</Route> +<Route namespace="saraba1st" data={{"path":"/digest/:tid","categories":["bbs"],"example":"/saraba1st/digest/forum-75-1","parameters":{"tid":"论坛 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"论坛摘要","maintainers":["shinemoon"],"description":"版面网址如果为 `https://bbs.saraba1st.com/2b/forum-75-1.html` 那么论坛 id 就是 `forum-75-1`。","location":"digest.ts"}} /> -## SCBOY forum {#scboy-forum} +版面网址如果为 `https://bbs.saraba1st.com/2b/forum-75-1.html` 那么论坛 id 就是 `forum-75-1`。 -### Thread {#scboy-forum-thread} +### 帖子 {#saraba1st-tie-zi} -<Route author="totorowechat" example="/scboy/thread/188673" path="/scboy/thread/:tid" paramsDesc={['thread tid']} radar="1" configRequired="1"> - If the url of the thread is `https://www.scboy.com/?thread-188673.htm` then tid would be `1789863`. +<Route namespace="saraba1st" data={{"path":"/thread/:tid","categories":["bbs"],"example":"/saraba1st/thread/1842868","parameters":{"tid":"帖子 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"帖子","maintainers":["zengxs"],"description":"帖子网址如果为 `https://bbs.saraba1st.com/2b/thread-1842868-1-1.html` 那么帖子 id 就是 `1789863`。","location":"thread.ts"}} /> - When accessing Joeyray's Bar, `SCBOY_BBS_TOKEN` needs to be filled in `environment`. See [/install](/install) for details. `SCBOY_BBS_TOKEN` is included in cookies with `bbs_token`. -</Route> - -## SecIN 信息安全技术社区 {#secin-xin-xi-an-quan-ji-shu-she-qu} - -### 最新文章 {#secin-xin-xi-an-quan-ji-shu-she-qu-zui-xin-wen-zhang} - -<Route author="p7e4" example="/sec-in" path="/sec-in" /> +帖子网址如果为 `https://bbs.saraba1st.com/2b/thread-1842868-1-1.html` 那么帖子 id 就是 `1789863`。 ## The Ring of Wonder {#the-ring-of-wonder} ### 首页更新 {#the-ring-of-wonder-shou-ye-geng-xin} -<Route author="shiningdracon" example="/trow/portal" path="/trow/portal" /> +<Route namespace="trow" data={{"path":"/portal","categories":["bbs"],"example":"/trow/portal","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["trow.cc/"]},"name":"首页更新","maintainers":["shiningdracon"],"url":"trow.cc/","location":"portal.ts"}} /> ## V2EX {#v2ex} -### 最热 / 最新主题 {#v2ex-zui-re-zui-xin-zhu-ti} +### 标签 {#v2ex-biao-qian} -<Route author="WhiteWorld" example="/v2ex/topics/latest" path="/v2ex/topics/:type" paramsDesc={['hot 或 latest']} /> +<Route namespace="v2ex" data={{"path":"/tab/:tabid","categories":["bbs"],"example":"/v2ex/tab/hot","parameters":{"tabid":"tab标签ID,在 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"标签","maintainers":["liyefox"],"location":"tab.ts"}} /> ### 帖子 {#v2ex-tie-zi} -<Route author="kt286" example="/v2ex/post/584403" path="/v2ex/post/:postid" paramsDesc={['帖子ID,在 URL 可以找到']} /> +<Route namespace="v2ex" data={{"path":"/post/:postid","categories":["bbs"],"example":"/v2ex/post/584403","parameters":{"postid":"帖子ID,在 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["v2ex.com/t/:postid"]},"name":"帖子","maintainers":["kt286"],"location":"post.ts"}} /> -### 标签 {#v2ex-biao-qian} +### 最热 / 最新主题 {#v2ex-zui-re-zui-xin-zhu-ti} -<Route author="liyefox" example="/v2ex/tab/hot" path="/v2ex/tab/:tabid" paramsDesc={['tab标签ID,在 URL 可以找到']} /> +<Route namespace="v2ex" data={{"path":"/topics/:type","categories":["bbs"],"example":"/v2ex/topics/latest","parameters":{"type":"hot 或 latest"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最热 / 最新主题","maintainers":["WhiteWorld"],"location":"topics.ts"}} /> ## ZodGame {#zodgame} ### forum {#zodgame-forum} -<Route author="FeCCC" example="/zodgame/forum/13" path="/zodgame/forum/:fid?" paramsDesc={['forum id, can be found in URL']} radar="1" configRequired="1" /> +<Route namespace="zodgame" data={{"path":"/forum/:fid?","categories":["bbs"],"example":"/zodgame/forum/13","parameters":{"fid":"forum id, can be found in URL"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"forum","maintainers":["FeCCC"],"location":"forum.ts"}} /> ## Zuvio {#zuvio} -### 校園話題 {#zuvio-xiao-yuan-hua-ti} - -<Route author="TonyRL" example="/zuvio/student5/34" path="/zuvio/student5/:board?" paramsDesc={['看板 ID,空为全站文章,可在看板 URL 或下方路由找到']} radar="1" /> - ### 看板列表 {#zuvio-kan-ban-lie-biao} -<Route author="TonyRL" example="/zuvio/student5/boards" path="/zuvio/student5/boards" /> +<Route namespace="zuvio" data={{"path":"/student5/boards","categories":["bbs"],"example":"/zuvio/student5/boards","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"看板列表","maintainers":["TonyRL"],"location":"boards.ts"}} /> -## 百度贴吧 {#bai-du-tie-ba} +### 校園話題 {#zuvio-xiao-yuan-hua-ti} -### 帖子列表 {#bai-du-tie-ba-tie-zi-lie-biao} +<Route namespace="zuvio" data={{"path":"/student5/:board?","categories":["bbs"],"example":"/zuvio/student5/34","parameters":{"board":"看板 ID,空为全站文章,可在看板 URL 或下方路由找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"校園話題","maintainers":["TonyRL"],"location":"student5.ts"}} /> -<Route author="u3u" example="/baidu/tieba/forum/女图" path="/baidu/tieba/forum/:kw/:sortBy?" paramsDesc={['吧名', '排序方式:`created`, `replied`。默认为 `created`']} radar="1" /> +## 百度 {#bai-du} -### 精品帖子 {#bai-du-tie-ba-jing-pin-tie-zi} +### 精品帖子 {#bai-du-jing-pin-tie-zi} -<Route author="u3u" example="/baidu/tieba/forum/good/女图" path="/baidu/tieba/forum/good/:kw/:cid?/:sortBy?" paramsDesc={['吧名', '精品分类,默认为 `0`(全部分类),如果不传 `cid` 则获取全部分类', '排序方式:`created`, `replied`。默认为 `created`']} radar="1" /> +<Route namespace="baidu" data={{"path":["/tieba/forum/good/:kw/:cid?/:sortBy?","/tieba/forum/:kw/:sortBy?"],"categories":["bbs"],"example":"/baidu/tieba/forum/good/女图","parameters":{"kw":"吧名","cid":"精品分类,默认为 `0`(全部分类),如果不传 `cid` 则获取全部分类","sortBy":"排序方式:`created`, `replied`。默认为 `created`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"精品帖子","maintainers":["u3u"],"location":"tieba/forum.ts"}} /> -### 帖子动态 {#bai-du-tie-ba-tie-zi-dong-tai} +### 精品帖子 {#bai-du-jing-pin-tie-zi} -<Route author="u3u" example="/baidu/tieba/post/686961453" path="/baidu/tieba/post/:id" paramsDesc={['帖子 ID']} radar="1" /> +<Route namespace="baidu" data={{"path":["/tieba/forum/good/:kw/:cid?/:sortBy?","/tieba/forum/:kw/:sortBy?"],"categories":["bbs"],"example":"/baidu/tieba/forum/good/女图","parameters":{"kw":"吧名","cid":"精品分类,默认为 `0`(全部分类),如果不传 `cid` 则获取全部分类","sortBy":"排序方式:`created`, `replied`。默认为 `created`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"精品帖子","maintainers":["u3u"],"location":"tieba/forum.ts"}} /> -### 楼主动态 {#bai-du-tie-ba-lou-zhu-dong-tai} +### 帖子动态 {#bai-du-tie-zi-dong-tai} -<Route author="u3u" example="/baidu/tieba/post/lz/529691897" path="/baidu/tieba/post/lz/:id" paramsDesc={['帖子 ID']} radar="1" /> +<Route namespace="baidu" data={{"path":["/tieba/post/:id","/tieba/post/lz/:id"],"categories":["bbs"],"example":"/baidu/tieba/post/686961453","parameters":{"id":"帖子 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tieba.baidu.com/p/:id"]},"name":"帖子动态","maintainers":["u3u"],"location":"tieba/post.ts"}} /> -### 用户帖子 {#bai-du-tie-ba-yong-hu-tie-zi} +### 帖子动态 {#bai-du-tie-zi-dong-tai} -<Route author="igxlin nczitzk" example="/baidu/tieba/user/斗鱼游戏君" path="/baidu/tieba/user/:uid" paramsDesc={['用户 ID']} radar="1"> - 用户 ID 可以通过打开用户的主页后查看地址栏的 `un` 字段来获取。 -</Route> +<Route namespace="baidu" data={{"path":["/tieba/post/:id","/tieba/post/lz/:id"],"categories":["bbs"],"example":"/baidu/tieba/post/686961453","parameters":{"id":"帖子 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tieba.baidu.com/p/:id"]},"name":"帖子动态","maintainers":["u3u"],"location":"tieba/post.ts"}} /> -### 贴吧搜索 {#bai-du-tie-ba-tie-ba-sou-suo} +### 贴吧搜索 {#bai-du-tie-ba-sou-suo} -<Route author="JimenezLi" example="/baidu/tieba/search/neuro" path="/baidu/tieba/search/:qw/:routeParams?" paramsDesc={['搜索关键词', '额外参数;请参阅以下说明和表格']} radar="1"> - | 键 | 含义 | 接受的值 | 默认值 | - | ------------ | ---------------------------------------------------------- | ------------- | ------ | - | kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 | - | only\_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 | - | rn | 返回条目的数量 | 1-20 | 20 | - | sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 | +<Route namespace="baidu" data={{"path":"/tieba/search/:qw/:routeParams?","categories":["bbs"],"example":"/baidu/tieba/search/neuro","parameters":{"qw":"搜索关键词","routeParams":"额外参数;请参阅以下说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"贴吧搜索","maintainers":["JimenezLi"],"description":"| 键 | 含义 | 接受的值 | 默认值 |\n | ------------ | ---------------------------------------------------------- | ------------- | ------ |\n | kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 |\n | only_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 |\n | rn | 返回条目的数量 | 1-20 | 20 |\n | sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 |\n\n 用例:`/baidu/tieba/search/neuro/kw=neurosama&only_thread=1&sm=2`","location":"tieba/search.ts"}} /> - 用例:`/baidu/tieba/search/neuro/kw=neurosama&only_thread=1&sm=2` -</Route> +| 键 | 含义 | 接受的值 | 默认值 | +| ------------ | ---------------------------------------------------------- | ------------- | ------ | +| kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 | +| only\_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 | +| rn | 返回条目的数量 | 1-20 | 20 | +| sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 | -## 超理论坛 {#chao-li-lun-tan} +用例:`/baidu/tieba/search/neuro/kw=neurosama&only_thread=1&sm=2` -### 板块 {#chao-li-lun-tan-ban-kuai} +### 用户帖子 {#bai-du-yong-hu-tie-zi} -<Route author="nczitzk" example="/chaoli" path="/chaoli/:channel?" paramsDesc={['板块,见下表,默认为全部']}> - | 数学 | 物理 | 化学 | 生物 | 天文 | 技术 | 管理 | 公告 | - | ---- | ------- | ---- | ------- | ----- | ---- | ----- | ------ | - | math | physics | chem | biology | astro | tech | admin | announ | +<Route namespace="baidu" data={{"path":"/tieba/user/:uid","categories":["bbs"],"example":"/baidu/tieba/user/斗鱼游戏君","parameters":{"uid":"用户 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户帖子","maintainers":["igxlin","nczitzk"],"description":"用户 ID 可以通过打开用户的主页后查看地址栏的 `un` 字段来获取。","location":"tieba/user.ts"}} /> - | 其他 | 语言 | 社科 | 科幻 | 辑录 | - | ------ | ---- | ------ | ------ | ----------- | - | others | lang | socsci | sci-fi | collections | -</Route> +用户 ID 可以通过打开用户的主页后查看地址栏的 `un` 字段来获取。 ## 第一会所 {#di-yi-hui-suo} ### 子版块 {#di-yi-hui-suo-zi-ban-kuai} -<Route author="TonyRL" example="/sis001/forum/322" path="/sis001/forum/:id?" paramsDesc={['子版块 ID,可在子论坛 URL 找到,默认为 `Funny Jokes | 短篇笑话区`']} radar="1" /> +<Route namespace="sis001" data={{"path":"/forum/:id?","categories":["bbs"],"example":"/sis001/forum/322","parameters":{"id":"子版块 ID,可在子论坛 URL 找到,默认为 `Funny Jokes | 短篇笑话区`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"子版块","maintainers":[],"location":"forum.ts"}} /> ## 电鸭社区 {#dian-ya-she-qu} -### 工作机会 {#dian-ya-she-qu-gong-zuo-ji-hui} - -<Route author="sfyumi" example="/eleduck/jobs" path="/eleduck/jobs" radar="1" /> - ### 分类文章 {#dian-ya-she-qu-fen-lei-wen-zhang} -<Route author="running-grass" example="/eleduck/posts/4" path="/eleduck/posts/:id?" paramsDesc={['分类id,可以论坛的URL找到,默认为全部']} radar="1"> - | id | 分类 | - | -- | -------- | - | 0 | 全部 | - | 1 | 讨论 | - | 2 | 分享 | - | 3 | 露个脸 | - | 4 | 访谈故事 | - | 5 | 招聘 | - | 10 | 海外移民 | - | 12 | 英语 | - | 14 | 电鸭官方 | - | 15 | 独立产品 | - | 17 | 闲话开源 | - | 19 | Web3 | - | 21 | 设计 | - | 22 | 人才库 | - | 23 | Upwork | - | 24 | 经验课 | -</Route> +<Route namespace="eleduck" data={{"path":"/posts/:id?","categories":["bbs"],"example":"/eleduck/posts/4","parameters":{"id":"分类id,可以论坛的URL找到,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类文章","maintainers":["running-grass"],"description":"| id | 分类 |\n | -- | -------- |\n | 0 | 全部 |\n | 1 | 讨论 |\n | 2 | 分享 |\n | 3 | 露个脸 |\n | 4 | 访谈故事 |\n | 5 | 招聘 |\n | 10 | 海外移民 |\n | 12 | 英语 |\n | 14 | 电鸭官方 |\n | 15 | 独立产品 |\n | 17 | 闲话开源 |\n | 19 | Web3 |\n | 21 | 设计 |\n | 22 | 人才库 |\n | 23 | Upwork |\n | 24 | 经验课 |","location":"posts.ts"}} /> + +| id | 分类 | +| -- | -------- | +| 0 | 全部 | +| 1 | 讨论 | +| 2 | 分享 | +| 3 | 露个脸 | +| 4 | 访谈故事 | +| 5 | 招聘 | +| 10 | 海外移民 | +| 12 | 英语 | +| 14 | 电鸭官方 | +| 15 | 独立产品 | +| 17 | 闲话开源 | +| 19 | Web3 | +| 21 | 设计 | +| 22 | 人才库 | +| 23 | Upwork | +| 24 | 经验课 | + +### 工作机会 {#dian-ya-she-qu-gong-zuo-ji-hui} + +<Route namespace="eleduck" data={{"path":"/jobs","categories":["bbs"],"example":"/eleduck/jobs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["eleduck.com/categories/5","eleduck.com/"]},"name":"工作机会","maintainers":["sfyumi"],"url":"eleduck.com/categories/5","location":"jobs.ts"}} /> ## 丁香园 {#ding-xiang-yuan} -### 专题 {#ding-xiang-yuan-zhuan-ti} - -<Route author="TonyRL" example="/dxy/bbs/special/72" path="/dxy/bbs/special/:specialId" paramsDesc={['专题 ID,可在对应专题页 URL 中找到']} radar="1" /> - ### 个人帖子 {#ding-xiang-yuan-ge-ren-tie-zi} -<Route author="TonyRL" example="/dxy/bbs/profile/thread/8335054" path="/dxy/bbs/profile/thread/:userId" paramsDesc={['个人 ID,可在 URL 中找到']} radar="1" /> +<Route namespace="dxy" data={{"path":"/bbs/profile/thread/:userId","categories":["bbs"],"example":"/dxy/bbs/profile/thread/8335054","parameters":{"userId":"个人 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dxy.cn/bbs/newweb/pc/profile/:userId/threads","dxy.cn/bbs/newweb/pc/profile/:userId"]},"name":"个人帖子","maintainers":["TonyRL"],"location":"profile/thread.ts"}} /> -## 斗鱼 {#dou-yu} +### 专题 {#ding-xiang-yuan-zhuan-ti} -### 鱼吧帖子 {#dou-yu-yu-ba-tie-zi} +<Route namespace="dxy" data={{"path":"/bbs/special/:specialId","categories":["bbs"],"example":"/dxy/bbs/special/72","parameters":{"specialId":"专题 ID,可在对应专题页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专题","maintainers":["TonyRL"],"location":"special.ts"}} /> -<Route author="nczitzk" example="/douyu/group/1011" path="/douyu/group/:id/:sort?" paramsDesc={['鱼吧 id,可在鱼吧页 URL 中找到', '排序方式,见下表,默认为发布时间排序']}> - | 回复时间排序 | 发布时间排序 | - | ------------ | ------------ | - | 1 | 2 | -</Route> +## 斗鱼直播 {#dou-yu-zhi-bo} -### 鱼吧跟帖 {#dou-yu-yu-ba-gen-tie} +### 鱼吧帖子 {#dou-yu-zhi-bo-yu-ba-tie-zi} -<Route author="nczitzk" example="/douyu/post/631737151576473201" path="/douyu/post/:id" paramsDesc={['帖子 id,可在帖子页 URL 中找到']} /> +<Route namespace="douyu" data={{"path":"/group/:id/:sort?","categories":["bbs"],"example":"/douyu/group/1011","parameters":{"id":"鱼吧 id,可在鱼吧页 URL 中找到","sort":"排序方式,见下表,默认为发布时间排序"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yuba.douyu.com/group/:id","yuba.douyu.com/group/newself/:id","yuba.douyu.com/group/newall/:id","yuba.douyu.com/"],"target":"/group/:id"},"name":"鱼吧帖子","maintainers":["nczitzk"],"description":"| 回复时间排序 | 发布时间排序 |\n | ------------ | ------------ |\n | 1 | 2 |","location":"group.ts"}} /> + +| 回复时间排序 | 发布时间排序 | +| ------------ | ------------ | +| 1 | 2 | + +### 鱼吧跟帖 {#dou-yu-zhi-bo-yu-ba-gen-tie} + +<Route namespace="douyu" data={{"path":"/post/:id","categories":["bbs"],"example":"/douyu/post/631737151576473201","parameters":{"id":"帖子 id,可在帖子页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yuba.douyu.com/p/:id","yuba.douyu.com/"]},"name":"鱼吧跟帖","maintainers":["nczitzk"],"location":"post.ts"}} /> ## 恩山无线论坛 {#en-shan-wu-xian-lun-tan} ### 板块 {#en-shan-wu-xian-lun-tan-ban-kuai} -<Route author="nczitzk" example="/right/forum/31" path="/right/forum/:id?" paramsDesc={['板块 id,可在板块页 URL 中找到,默认为新手入门及其它(硬件)']} /> - -## 二次元虫洞 {#er-ci-yuan-chong-dong} - -### 板块 {#er-ci-yuan-chong-dong-ban-kuai} - -<Route author="shelken" example="/2cycd/43/dateline" path="/2cycd/:fid?/:sort?" paramsDesc={['板块', '排序']} radar="1"> - 板块(更多板块请自行 [查看](http://www.2cycd.com)) - - | 音乐下载(默认) | 动漫下载 | 游戏下载 | - | ---------------- | -------- | -------- | - | 43 | 53 | 42 | - - 排序 - - | 发布时间排序(默认) | 回复/查看 | 查看 | - | -------------------- | ---------- | ----- | - | dateline | replies | views | -</Route> - -## 光谷社区 {#guang-gu-she-qu} - -### 子论坛 {#guang-gu-she-qu-zi-lun-tan} - -<Route author="nczitzk" example="/guanggoo/index" path="/guanggoo/:category?" paramsDesc={['子论坛,默认为首页']}> - | 首页 | 你问我答 | 同城活动 | IT 技术 | 金融财经 | 创业创客 | 城市建设 | - | ---- | -------- | -------- | ------- | -------- | -------- | -------- | - | | qna | lowshine | it | finance | startup | city | -</Route> +<Route namespace="right" data={{"path":"/forum/:id?","categories":["bbs"],"example":"/right/forum/31","parameters":{"id":"板块 id,可在板块页 URL 中找到,默认为新手入门及其它(硬件)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"板块","maintainers":["nczitzk"],"location":"forum.ts"}} /> ## 虎扑 {#hu-pu} -### 首页 {#hu-pu-shou-ye} +### 热帖 {#hu-pu-re-tie} -<Route author="nczitzk" example="/hupu/nba" path="/hupu/:category?" paramsDesc={['分类,见下表']}> - | NBA | CBA | 足球 | - | --- | --- | ------ | - | nba | cba | soccer | +<Route namespace="hupu" data={{"path":"/all/:id?","categories":["bbs"],"example":"/hupu/all/topic-daily","parameters":{"id":"编号,可在对应热帖版面 URL 中找到,默认为步行街每日话题"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.hupu.com/:category","m.hupu.com/"],"target":"/:category"},"name":"热帖","maintainers":["nczitzk"],"description":":::tip\n 更多热帖版面参见 [论坛](https://bbs.hupu.com)\n :::","location":"all.ts"}} /> - :::tip - 电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [`/hupu/all/all-gg`](https://rsshub.app/hupu/all/all-gg)。 - ::: -</Route> +:::tip +更多热帖版面参见 [论坛](https://bbs.hupu.com) +::: ### 社区 {#hu-pu-she-qu} -<Route author="LogicJake nczitzk" example="/hupu/bbs/topic-daily" path="/hupu/bbs/:id?/:order?" paramsDesc={['编号,可在对应社区 URL 中找到,默认为#步行街主干道', '排序方式,可选 `0` 即 最新回复 或 `1` 即 最新发布,默认为最新回复']}> - :::tip - 更多社区参见 [社区](https://bbs.hupu.com) - ::: -</Route> +<Route namespace="hupu" data={{"path":["/bbs/:id?/:order?","/bxj/:id?/:order?"],"categories":["bbs"],"example":"/hupu/bbs/topic-daily","parameters":{"id":"编号,可在对应社区 URL 中找到,默认为#步行街主干道","order":"排序方式,可选 `0` 即 最新回复 或 `1` 即 最新发布,默认为最新回复"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.hupu.com/:category","m.hupu.com/"],"target":"/:category"},"name":"社区","maintainers":["LogicJake","nczitzk"],"description":":::tip\n 更多社区参见 [社区](https://bbs.hupu.com)\n :::","location":"bbs.ts"}} /> -### 热帖 {#hu-pu-re-tie} +:::tip +更多社区参见 [社区](https://bbs.hupu.com) +::: -<Route author="nczitzk" example="/hupu/all/topic-daily" path="/hupu/all/:id?" paramsDesc={['编号,可在对应热帖版面 URL 中找到,默认为步行街每日话题']}> - :::tip - 更多热帖版面参见 [论坛](https://bbs.hupu.com) - ::: -</Route> +### 社区 {#hu-pu-she-qu} + +<Route namespace="hupu" data={{"path":["/bbs/:id?/:order?","/bxj/:id?/:order?"],"categories":["bbs"],"example":"/hupu/bbs/topic-daily","parameters":{"id":"编号,可在对应社区 URL 中找到,默认为#步行街主干道","order":"排序方式,可选 `0` 即 最新回复 或 `1` 即 最新发布,默认为最新回复"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.hupu.com/:category","m.hupu.com/"],"target":"/:category"},"name":"社区","maintainers":["LogicJake","nczitzk"],"description":":::tip\n 更多社区参见 [社区](https://bbs.hupu.com)\n :::","location":"bbs.ts"}} /> + +:::tip +更多社区参见 [社区](https://bbs.hupu.com) +::: ## 火线 {#huo-xian} ### Zone {#huo-xian-zone} -<Route author="p7e4" example="/huoxian/zone" path="/huoxian/zone" /> +<Route namespace="huoxian" data={{"path":"/zone","categories":["bbs"],"example":"/huoxian/zone","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Zone","maintainers":["p7e4"],"location":"zone.ts"}} /> ## 集思录 {#ji-si-lu} ### 广场 {#ji-si-lu-guang-chang} -<Route author="nczitzk" example="/jisilu" path="/jisilu/:category?/:sort?/:day?" paramsDesc={['分类,见下表,默认为全部,可在 URL 中找到', '排序,见下表,默认为最新,可在 URL 中找到', '几天内,见下表,默认为30天,本参数仅在排序参数设定为 `热门` 后才可生效']}> - 分类 +<Route namespace="jisilu" data={{"path":"/:category?/:sort?/:day?","categories":["bbs"],"example":"/jisilu","parameters":{"category":"分类,见下表,默认为全部,可在 URL 中找到","sort":"排序,见下表,默认为最新,可在 URL 中找到","day":"几天内,见下表,默认为30天,本参数仅在排序参数设定为 `热门` 后才可生效"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jisilu.cn/home/explore","jisilu.cn/explore","jisilu.cn/"]},"name":"广场","maintainers":["nczitzk"],"url":"jisilu.cn/home/explore","description":"分类\n\n | 全部 | 债券 / 可转债 | 基金 | 套利 | 新股 |\n | ---- | ------------- | ---- | ---- | ---- |\n | | 4 | 7 | 5 | 3 |\n\n 排序\n\n | 最新 | 热门 | 按发表时间 |\n | ---- | ---- | ---------- |\n | | hot | add_time |\n\n 几天内\n\n | 30 天 | 7 天 | 当天 |\n | ----- | ---- | ---- |\n | 30 | 7 | 1 |","location":"index.ts"}} /> - | 全部 | 债券 / 可转债 | 基金 | 套利 | 新股 | - | ---- | ------------- | ---- | ---- | ---- | - | | 4 | 7 | 5 | 3 | +分类 - 排序 +| 全部 | 债券 / 可转债 | 基金 | 套利 | 新股 | +| ---- | ------------- | ---- | ---- | ---- | +| | 4 | 7 | 5 | 3 | - | 最新 | 热门 | 按发表时间 | - | ---- | ---- | ---------- | - | | hot | add\_time | +排序 - 几天内 +| 最新 | 热门 | 按发表时间 | +| ---- | ---- | ---------- | +| | hot | add\_time | - | 30 天 | 7 天 | 当天 | - | ----- | ---- | ---- | - | 30 | 7 | 1 | -</Route> +几天内 -### 用户回复 {#ji-si-lu-yong-hu-hui-fu} - -<Route author="nczitzk" example="/jisilu/reply/BKL" path="/jisilu/reply/:user" paramsDesc={['用户名,可在用户页 URL 中找到']} /> - -### 用户主题 {#ji-si-lu-yong-hu-zhu-ti} - -<Route author="nczitzk" example="/jisilu/topic/BKL" path="/jisilu/topic/:user" paramsDesc={['用户名,可在用户页 URL 中找到']} /> - -## 看雪 {#kan-xue} - -### 论坛 {#kan-xue-lun-tan} - -<Route author="renzhexigua" example="/pediy/topic/android/digest" path="/pediy/topic/:category?/:type?" paramsDesc={['版块, 缺省为`all`', '类型, 缺省为`latest`']} notOperational="1" /> - -| 版块 | category | -| ------------ | ---------- | -| 智能设备 | iot | -| 区块链安全 | blockchain | -| Android 安全 | android | -| iOS 安全 | ios | -| 软件逆向 | re | -| 编程技术 | coding | -| 加壳脱壳 | unpack | -| 密码算法 | crypto | -| 二进制漏洞 | vuln | -| CrackMe | crackme | -| Pwn | pwn | -| WEB 安全 | web | -| 外文翻译 | translate | -| 全站 | all | - -| 类型 | type | -| -------- | ------ | -| 最新主题 | latest | -| 精华主题 | digest | - -## 梨园 {#li-yuan} - -### 主题帖(全站) {#li-yuan-zhu-ti-tie-quan-zhan} - -<Route author="WooMai" example="/liyuan-forums/threads" path="/liyuan-forums/threads" /> - -### 主题帖(板块) {#li-yuan-zhu-ti-tie-ban-kuai} - -<Route author="WooMai" example="/liyuan-forums/threads/forum/1" path="/liyuan-forums/threads/forum/:forum_id" paramsDesc={['板块 ID, 支持多个, 使用英文逗号分隔']} /> - -### 主题帖(专题) {#li-yuan-zhu-ti-tie-zhuan-ti} - -<Route author="WooMai" example="/liyuan-forums/threads/topic/1" path="/liyuan-forums/threads/topic/:topic_id" paramsDesc={['专题 ID, 支持多个, 使用英文逗号分隔']} /> - -### 主题帖(用户) {#li-yuan-zhu-ti-tie-yong-hu} - -<Route author="WooMai" example="/liyuan-forums/threads/user/1" path="/liyuan-forums/threads/user/:user_id" paramsDesc={['用户 ID (仅支持数字 ID), 支持多个, 使用英文逗号分隔']} /> - -## 龙空 {#long-kong} - -### 分区 {#long-kong-fen-qu} - -<Route author="ma6254 nczitzk" example="/lkong/forum/60" path="/lkong/forum/:id/:digest?" paramsDesc={['分区 id, 可在分区的URL里找到','默认获取全部主题,任意值则只获取精华主题']} notOperational="1" /> - -### 帖子 {#long-kong-tie-zi} - -<Route author="ma6254 nczitzk" example="/lkong/thread/3100275" path="/lkong/thread/:id?" paramsDesc={['帖子 id, 可在帖子的URL里找到']} /> - -## 龙腾网 {#long-teng-wang} - -### 网帖翻译 {#long-teng-wang-wang-tie-fan-yi} - -<Route author="sgqy nczitzk" example="/ltaaa" path="/ltaaa/:category?" paramsDesc={['分类,见下表,默认为最新']}> - | 最新 | 科技 | 娱乐 | 文化 | 社会 | 体育 | 历史 | 趣闻 | 图说世界 | - | ------ | ---------- | ----- | ------- | --------- | ----- | ------- | ----------- | -------- | - | latest | technology | funny | culture | community | sport | history | curiosities | picture | -</Route> +| 30 天 | 7 天 | 当天 | +| ----- | ---- | ---- | +| 30 | 7 | 1 | ## 牛客网 {#niu-ke-wang} ### 面经 {#niu-ke-wang-mian-jing} -<Route author="huyyi" example="/nowcoder/experience/639?order=3&companyId=665&phaseId=0" path="/nowcoder/experience/:tagId" paramsDesc={['职位id [🔗查询链接](https://www.nowcoder.com/profile/all-jobs)复制打开']}> - 可选参数: +<Route namespace="nowcoder" data={{"path":"/experience/:tagId","categories":["bbs"],"example":"/nowcoder/experience/639?order=3&companyId=665&phaseId=0","parameters":{"tagId":"职位id [🔗查询链接](https://www.nowcoder.com/profile/all-jobs)复制打开"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nowcoder.com/"],"target":"/experience"},"name":"面经","maintainers":["huyyi"],"url":"nowcoder.com/","description":"可选参数:\n\n - companyId:公司 id,[🔗查询链接](https://www.nowcoder.com/discuss/tag/exp), 复制打开\n - order:3 - 最新;1 - 最热\n - phaseId:0 - 所有;1 - 校招;2 - 实习;3 - 社招","location":"experience.ts"}} /> - - companyId:公司 id,[🔗查询链接](https://www.nowcoder.com/discuss/tag/exp), 复制打开 - - order:3 - 最新;1 - 最热 - - phaseId:0 - 所有;1 - 校招;2 - 实习;3 - 社招 -</Route> +可选参数: -### 讨论区 {#niu-ke-wang-tao-lun-qu} - -<Route author="LogicJake" example="/nowcoder/discuss/2/4" path="/nowcoder/discuss/:type/:order" paramsDesc={['讨论区分区id 在 URL 中可以找到', '排序方式']} notOperational="1"> - | 最新回复 | 最新发表 | 最新 | 精华 | - | -------- | -------- | ---- | ---- | - | 0 | 3 | 1 | 4 | -</Route> - -### 校招日程 {#niu-ke-wang-xiao-zhao-ri-cheng} - -<Route author="junfengP" example="/nowcoder/schedule" path="/nowcoder/schedule/:propertyId?/:typeId?" paramsDesc={['行业, 在控制台中抓取接口,可获得行业id,默认0', '类别,同上']} /> +- companyId:公司 id,[🔗查询链接](https://www.nowcoder.com/discuss/tag/exp), 复制打开 +- order:3 - 最新;1 - 最热 +- phaseId:0 - 所有;1 - 校招;2 - 实习;3 - 社招 ### 求职推荐 {#niu-ke-wang-qiu-zhi-tui-jian} -<Route author="junfengP" example="/nowcoder/recommend" path="/nowcoder/recommend" /> +<Route namespace="nowcoder" data={{"path":"/recommend","categories":["bbs"],"example":"/nowcoder/recommend","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nowcoder.com/"]},"name":"求职推荐","maintainers":["junfengP"],"url":"nowcoder.com/","location":"recommend.ts"}} /> ### 实习广场 & 社招广场 {#niu-ke-wang-shi-xi-guang-chang-she-zhao-guang-chang} -<Route author="nczitzk" example="/nowcoder/jobcenter/1/北京/1/1/true" path="/nowcoder/jobcenter/:recruitType?/:city?/:type?/:order?/:latest?" paramsDesc={['招聘分类,`1` 指 实习广场,`2` 指 社招广场,默认为 `1`', '所在城市,可选城市见下表,若空则为 `全国`', '职位类型,可选职位代码见下表,若空则为 `全部`', '排序参数,可选排序参数代码见下表,若空则为 `默认`', '是否仅查看最近一周,可选 `true` 和 `false`,默认为 `false`']}> - 可选城市有:北京、上海、广州、深圳、杭州、南京、成都、厦门、武汉、西安、长沙、哈尔滨、合肥、其他 +<Route namespace="nowcoder" data={{"path":"/jobcenter/:recruitType?/:city?/:type?/:order?/:latest?","categories":["bbs"],"example":"/nowcoder/jobcenter/1/北京/1/1/true","parameters":{"recruitType":"招聘分类,`1` 指 实习广场,`2` 指 社招广场,默认为 `1`","city":"所在城市,可选城市见下表,若空则为 `全国`","type":"职位类型,可选职位代码见下表,若空则为 `全部`","order":"排序参数,可选排序参数代码见下表,若空则为 `默认`","latest":"是否仅查看最近一周,可选 `true` 和 `false`,默认为 `false`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nowcoder.com/"],"target":"/jobcenter"},"name":"实习广场 & 社招广场","maintainers":["nczitzk"],"url":"nowcoder.com/","description":"可选城市有:北京、上海、广州、深圳、杭州、南京、成都、厦门、武汉、西安、长沙、哈尔滨、合肥、其他\n\n 职位类型代码见下表:\n\n | 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 |\n\n 排序参数见下表:\n\n | 最新发布 | 最快处理 | 处理率最高 |\n | -------- | -------- | ---------- |\n | 1 | 2 | 3 |","location":"jobcenter.ts"}} /> - 职位类型代码见下表: +可选城市有:北京、上海、广州、深圳、杭州、南京、成都、厦门、武汉、西安、长沙、哈尔滨、合肥、其他 - | 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | +职位类型代码见下表: - 排序参数见下表: +| 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | - | 最新发布 | 最快处理 | 处理率最高 | - | -------- | -------- | ---------- | - | 1 | 2 | 3 | -</Route> +排序参数见下表: + +| 最新发布 | 最快处理 | 处理率最高 | +| -------- | -------- | ---------- | +| 1 | 2 | 3 | + +### 讨论区 {#niu-ke-wang-tao-lun-qu} + +<Route namespace="nowcoder" data={{"path":"/discuss/:type/:order","categories":["bbs"],"example":"/nowcoder/discuss/2/4","parameters":{"type":"讨论区分区id 在 URL 中可以找到","order":"排序方式"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"讨论区","maintainers":["LogicJake"],"description":"| 最新回复 | 最新发表 | 最新 | 精华 |\n | -------- | -------- | ---- | ---- |\n | 0 | 3 | 1 | 4 |","location":"discuss.ts"}} /> + +| 最新回复 | 最新发表 | 最新 | 精华 | +| -------- | -------- | ---- | ---- | +| 0 | 3 | 1 | 4 | + +### 校招日程 {#niu-ke-wang-xiao-zhao-ri-cheng} + +<Route namespace="nowcoder" data={{"path":"/schedule/:propertyId?/:typeId?","categories":["bbs"],"example":"/nowcoder/schedule","parameters":{"propertyId":"行业, 在控制台中抓取接口,可获得行业id,默认0","typeId":"类别,同上"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nowcoder.com/"],"target":"/schedule"},"name":"校招日程","maintainers":["junfengP"],"url":"nowcoder.com/","location":"schedule.ts"}} /> ## 品葱 {#pin-cong} ### 发现 {#pin-cong-fa-xian} -<Route author="zphw" example="/pincong/category/1/new" path="/pincong/category/:category?/:sort?" paramsDesc={['分类,与官网分类 URL `category-` 后的数字对应,默认为全部', '排序方式,参数可见下表,默认为推荐']} anticrawler="1" puppeteer="1" /> +<Route namespace="pincong" data={{"path":"/category/:category?/:sort?","categories":["bbs"],"example":"/pincong/category/1/new","parameters":{"category":"分类,与官网分类 URL `category-` 后的数字对应,默认为全部","sort":"排序方式,参数可见下表,默认为推荐"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"发现","maintainers":["zphw"],"description":"| 最新 | 推荐 | 热门 |\n| ---- | --------- | ---- |\n| new | recommend | hot |","location":"index.ts"}} /> | 最新 | 推荐 | 热门 | | ---- | --------- | ---- | @@ -710,306 +454,138 @@ If you opt to enable `fulltext` feature, consider adding `limit` parameter to yo ### 精选 {#pin-cong-jing-xuan} -<Route author="zphw" example="/pincong/hot" path="/pincong/hot/:category?" paramsDesc={['分类,与官网分类 URL `category-` 后的数字对应,默认为全部']} anticrawler="1" puppeteer="1" /> - -### 话题 {#pin-cong-hua-ti} - -<Route author="zphw" example="/pincong/topic/美国" path="/pincong/topic/:topic?" paramsDesc={['话题,可在官网获取']} anticrawler="1" puppeteer="1" /> - -## 三星盖乐世社区 {#san-xing-gai-le-shi-she-qu} - -### 最新帖子 {#san-xing-gai-le-shi-she-qu-zui-xin-tie-zi} - -<Route author="nczitzk" example="/samsungmembers/latest" path="/samsungmembers/latest" /> +<Route namespace="pincong" data={{"path":"/hot/:category?","categories":["bbs"],"example":"/pincong/hot","parameters":{"category":"分类,与官网分类 URL `category-` 后的数字对应,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"精选","maintainers":["zphw"],"location":"hot.ts"}} /> ## 司机社 {#si-ji-she} -### 排行榜 {#si-ji-she-pai-hang-bang} - -<Route author="akynazh" example="/xsijishe/rank/weekly" path="/xsijishe/rank/:type" paramsDesc={['排行榜类型: weekly | monthly']} radar="1" /> - ### 论坛 {#si-ji-she-lun-tan} -<Route author="akynazh" example="/xsijishe/forum/51" path="/xsijishe/forum/:fid" paramsDesc={['子论坛 id']} radar="1"> - :::tip[关于子论坛 id 的获取方法] - `/xsijishe/forum/51` 对应于论坛 `https://xsijishe.com/forum-51-1.html`,这个论坛的 fid 为 51,也就是 `forum-{fid}-1` 中的 fid。 - ::: -</Route> +<Route namespace="xsijishe" data={{"path":"/forum/:fid","categories":["bbs"],"example":"/xsijishe/forum/51","parameters":{"fid":"子论坛 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"论坛","maintainers":["akynazh"],"description":":::tip[关于子论坛 id 的获取方法]\n `/xsijishe/forum/51` 对应于论坛 `https://xsijishe.com/forum-51-1.html`,这个论坛的 fid 为 51,也就是 `forum-{fid}-1` 中的 fid。\n :::","location":"forum.ts"}} /> + +:::tip[关于子论坛 id 的获取方法] +`/xsijishe/forum/51` 对应于论坛 `https://xsijishe.com/forum-51-1.html`,这个论坛的 fid 为 51,也就是 `forum-{fid}-1` 中的 fid。 +::: + +### 排行榜 {#si-ji-she-pai-hang-bang} + +<Route namespace="xsijishe" data={{"path":"/rank/:type","categories":["bbs"],"example":"/xsijishe/rank/weekly","parameters":{"type":"排行榜类型: weekly | monthly"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"排行榜","maintainers":["akynazh"],"location":"rank.ts"}} /> ## 通信人家园 {#tong-xin-ren-jia-yuan} ### 论坛 频道 {#tong-xin-ren-jia-yuan-lun-tan-pin-dao} -<Route author="Fatpandac" example="/txrjy/fornumtopic" path="/txrjy/fornumtopic/:channel?" paramsDesc={['频道的 id,见下表,默认为最新500个主题帖']}> - | 最新 500 个主题帖 | 最新 500 个回复帖 | 最新精华帖 | 最新精华帖 | 一周热帖 | 本月热帖 | - | :---------------: | :---------------: | :--------: | :--------: | :------: | :------: | - | 1 | 2 | 3 | 4 | 5 | 6 | -</Route> +<Route namespace="txrjy" data={{"path":"/fornumtopic/:channel?","categories":["bbs"],"example":"/txrjy/fornumtopic","parameters":{"channel":"频道的 id,见下表,默认为最新500个主题帖"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"论坛 频道","maintainers":["Fatpandac"],"description":"| 最新 500 个主题帖 | 最新 500 个回复帖 | 最新精华帖 | 最新精华帖 | 一周热帖 | 本月热帖 |\n | :---------------: | :---------------: | :--------: | :--------: | :------: | :------: |\n | 1 | 2 | 3 | 4 | 5 | 6 |","location":"fornumtopic.ts"}} /> -## 万维读者 {#wan-wei-du-zhe} - -### 焦点新闻 {#wan-wei-du-zhe-jiao-dian-xin-wen} - -<Route author="nczitzk" example="/creaders/headline" path="/creaders/headline" /> +| 最新 500 个主题帖 | 最新 500 个回复帖 | 最新精华帖 | 最新精华帖 | 一周热帖 | 本月热帖 | +| :---------------: | :---------------: | :--------: | :--------: | :------: | :------: | +| 1 | 2 | 3 | 4 | 5 | 6 | ## 威锋 {#wei-feng} ### 社区 {#wei-feng-she-qu} -<Route author="TonyRL" example="/feng/forum/1" path="/feng/forum/:id/:type?" paramsDesc={['版块 ID,可在版块 URL 找到', '排序,见下表,默认为 `all`']} radar="1"> - | 最新回复 | 最新发布 | 热门 | 精华 | - | -------- | -------- | ---- | ------- | - | newest | all | hot | essence | -</Route> +<Route namespace="feng" data={{"path":"/forum/:id/:type?","categories":["bbs"],"example":"/feng/forum/1","parameters":{"id":"版块 ID,可在版块 URL 找到","type":"排序,见下表,默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["feng.com/forum/photo/:id","feng.com/forum/:id"],"target":"/forum/:id"},"name":"社区","maintainers":["TonyRL"],"description":"| 最新回复 | 最新发布 | 热门 | 精华 |\n | -------- | -------- | ---- | ------- |\n | newest | all | hot | essence |","location":"forum.ts"}} /> -## 文学城 {#wen-xue-cheng} - -### 博客 {#wen-xue-cheng-bo-ke} - -<Route author="changlan" example="/wenxuecity/blog/43626" path="/wenxuecity/blog/:id" paramsDesc={['博客 ID, 可在 URL 中找到']} radar="1" /> - -### 最热主题 {#wen-xue-cheng-zui-re-zhu-ti} - -<Route author="changlan" example="/wenxuecity/hot/9" path="/wenxuecity/hot/:cid" paramsDesc={['版面 ID, 可在 URL 中找到']} radar="1" /> - -### 最新主题 {#wen-xue-cheng-zui-xin-zhu-ti} - -<Route author="changlan" example="/wenxuecity/bbs/tzlc" path="/wenxuecity/bbs/:cat/:elite?" paramsDesc={['版面名, 可在 URL 中找到', '是否精华区, 1 为精华区']} radar="1" /> - -### 焦点新闻 {#wen-xue-cheng-jiao-dian-xin-wen} - -<Route author="nczitzk" example="/wenxuecity/news" path="/wenxuecity/news" /> - -## 小木虫论坛 {#xiao-mu-chong-lun-tan} - -### 期刊点评 {#xiao-mu-chong-lun-tan-qi-kan-dian-ping} - -<Route author="nczitzk" example="/muchong/journal" path="/muchong/journal/:type?" paramsDesc={['类型,见下表']} /> - -| SCI 期刊 | 中文期刊 | -| -------- | -------- | -| | cn | - -### 分类 {#xiao-mu-chong-lun-tan-fen-lei} - -<Route author="nczitzk" example="/muchong/290" path="/muchong/:id/:type?/:sort?" paramsDesc={['板块 id,可在板块页 URL 中找到', '子类别 id,可在板块页导航栏中找到,默认为 `all` 即 全部', '排序,可选 `order-tid` 即 发表排序,默认为 回帖排序']}> - :::tip - 尚不支持需要登录访问的版块 - ::: - - 网络生活区 - - | 休闲灌水 | 虫友互识 | 文学芳草园 | 育儿交流 | 竞技体育 | 有奖起名 | 有奖问答 | 健康生活 | - | -------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | - | 6 | 133 | 166 | 359 | 377 | 408 | 69 | 179 | - - 科研生活区 - - | 硕博家园 | 教师之家 | 博后之家 | English Cafe | 职场人生 | 专业外语 | 外语学习 | 导师招生 | 找工作 | 招聘信息布告栏 | 考研 | 考博 | 公务员考试 | - | -------- | -------- | -------- | ------------ | -------- | -------- | -------- | -------- | ------ | -------------- | ---- | ---- | ---------- | - | 198 | 199 | 342 | 328 | 405 | 432 | 126 | 430 | 185 | 346 | 127 | 197 | 280 | - - 学术交流区 - - | 论文投稿 | SCI 期刊点评 | 中文期刊点评 | 论文道贺祈福 | 论文翻译 | 基金申请 | 学术会议 | 会议与征稿布告栏 | - | -------- | ------------ | ------------ | ------------ | -------- | -------- | -------- | ---------------- | - | 125 | 见期刊路由 | 见期刊路由 | 307 | 278 | 234 | 299 | 345 | - - 出国留学区 - - | 留学生活 | 公派出国 | 访问学者 | 海外博后 | 留学 DIY | 签证指南 | 出国考试 | 海外院所点评 | 海外校友录 | 海归之家 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ---------- | -------- | - | 336 | 131 | 386 | 385 | 334 | 335 | 337 | 399 | 见院校路由 | 428 | - - 化学化工区 - - | 有机交流 | 有机资源 | 高分子 | 无机 / 物化 | 分析 | 催化 | 工艺技术 | 化工设备 | 石油化工 | 精细化工 | 电化学 | 环境 | SciFinder/Reaxys | - | -------- | -------- | ------ | ----------- | ---- | ---- | -------- | -------- | -------- | -------- | ------ | ---- | ---------------- | - | 189 | 325 | 236 | 170 | 238 | 190 | 373 | 374 | 212 | 227 | 263 | 230 | 343 | - - 材料区 - - | 材料综合 | 材料工程 | 微米和纳米 | 晶体 | 金属 | 无机非金属 | 生物材料 | 功能材料 | 复合材料 | - | -------- | -------- | ---------- | ---- | ---- | ---------- | -------- | -------- | -------- | - | 378 | 379 | 233 | 262 | 301 | 213 | 286 | 364 | 365 | - - 计算模拟区 - - | 第一性原理 | 量子化学 | 计算模拟 | 分子模拟 | 仿真模拟 | 程序语言 | - | ---------- | -------- | -------- | -------- | -------- | -------- | - | 291 | 290 | 279 | 322 | 292 | 312 | - - 生物医药区 - - | 新药研发 | 药学 | 药品生产 | 分子生物 | 微生物 | 动植物 | 生物科学 | 医学 | - | -------- | ---- | -------- | -------- | ------ | ------ | -------- | ---- | - | 192 | 148 | 429 | 366 | 367 | 368 | 144 | 142 | - - 人文经济区 - - | 金融投资 | 人文社科 | 管理学 | 经济学 | - | -------- | -------- | ------ | ------ | - | 272 | 453 | 447 | 446 | - - 专业学科区 - - | 数理科学综合 | 机械 | 物理 | 数学 | 农林 | 食品 | 地学 | 能源 | 信息科学 | 土木建筑 | 航空航天 | 转基因 | - | ------------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | -------- | -------- | ------ | - | 452 | 370 | 228 | 323 | 371 | 207 | 261 | 372 | 145 | 147 | 434 | 438 | - - 注册执考区 - - | 化环类执考 | 医药类考试 | 土建类考试 | 经管类考试 | 其他类执考 | - | ---------- | ---------- | ---------- | ---------- | ---------- | - | 414 | 417 | 418 | 415 | 419 | - - 文献求助区 - - | 文献求助 | 外文书籍求助 | 标准与专利 | 检索知识 | 代理 Proxy 资源 | - | -------- | ------------ | ---------- | -------- | --------------- | - | 158 | 219 | 226 | 130 | 203 | - - 资源共享区 - - | 电脑软件 | 手机资源 | 科研工具 | 科研资料 | 课件资源 | 试题资源 | 资源求助 | 电脑使用 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 55 | 410 | 188 | 300 | 112 | 380 | 401 | 347 | - - 科研市场区 - - | 课堂列表 | 综合广告 | 试剂耗材抗体 | 仪器设备 | 测试定制合成 | 技术服务 | 留学服务 | 教育培训 | 个人求购专版 | 个人转让专版 | QQ 群 / 公众号专版 | 手机红包 | 金币购物 | - | -------- | -------- | ------------ | -------- | ------------ | -------- | -------- | -------- | ------------ | ------------ | ------------------ | -------- | -------- | - | 454 | 284 | 390 | 389 | 392 | 396 | 350 | 394 | 316 | 436 | 362 | 302 | 460 | - - 论坛事务区 - - | 木虫讲堂 | 论坛更新日志 | 论坛公告发布 | 我来提意见 | 版主交流 | 规章制度 | 论坛使用帮助 (只读) | 我与小木虫的故事 | - | -------- | ------------ | ------------ | ---------- | -------- | -------- | ------------------- | ---------------- | - | 468 | 437 | 5 | 321 | 134 | 317 | 215 | 376 | - - 版块孵化区 - - | 版块工场 | - | -------- | - | myf | -</Route> +| 最新回复 | 最新发布 | 热门 | 精华 | +| -------- | -------- | ---- | ------- | +| newest | all | hot | essence | ## 小特社区 {#xiao-te-she-qu} ### 首页帖子 {#xiao-te-she-qu-shou-ye-tie-zi} -<Route author="wxsimon" example="/xiaote/news" path="/xiaote/news" /> +<Route namespace="xiaote" data={{"path":"/news","categories":["bbs"],"example":"/xiaote/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaote.com/"]},"name":"首页帖子","maintainers":["wxsimon"],"url":"xiaote.com/","location":"index.ts"}} /> ## 一亩三分地 {#yi-mu-san-fen-di} -### 帖子 {#yi-mu-san-fen-di-tie-zi} - -<Route author="EthanWng97 DIYgod nczitzk" example="/1point3acres/thread/hot" path="/1point3acres/thread/:type?/:order?" paramsDesc={['帖子分类, 见下表,默认为 hot,即热门帖子', '排序方式,见下表,默认为空,即最新回复']}> - 分类 - - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | - - 排序方式 - - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post | -</Route> - -### 分区 {#yi-mu-san-fen-di-fen-qu} - -<Route author="nczitzk" example="/1point3acres/section/345" path="/1point3acres/section/:id?/:type?/:order?" paramsDesc={['分区 id,见下表,默认为全部', '帖子分类, 见下表,默认为 hot,即热门帖子', '排序方式,见下表,默认为空,即最新回复']}> - 分区 - - | 分区 | id | - | -------- | --- | - | 留学申请 | 257 | - | 世界公民 | 379 | - | 投资理财 | 400 | - | 生活干货 | 31 | - | 职场达人 | 345 | - | 人际关系 | 391 | - | 海外求职 | 38 | - | 签证移民 | 265 | - - 分类 - - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | - - 排序方式 - - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post | -</Route> - ### 标签 {#yi-mu-san-fen-di-biao-qian} -<Route author="nczitzk" example="/1point3acres/category/h1b" path="/1point3acres/category/:id?/:type?/:order?" paramsDesc={['标签 id,默认为全部', '帖子分类, 见下表,默认为 hot,即热门帖子', '排序方式,见下表,默认为空,即最新回复']}> - :::tip - 更多标签可以在 [标签列表](https://instant.1point3acres.com/tags) 中找到。 - ::: +<Route namespace="1point3acres" data={{"path":"/category/:id?/:type?/:order?","categories":["bbs"],"example":"/1point3acres/category/h1b","parameters":{"id":"标签 id,默认为全部","type":"帖子分类, 见下表,默认为 hot,即热门帖子","order":"排序方式,见下表,默认为空,即最新回复"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["instant.1point3acres.com/section/:id","instant.1point3acres.com/"]},"name":"标签","maintainers":["nczitzk"],"description":":::tip\n 更多标签可以在 [标签列表](https://instant.1point3acres.com/tags) 中找到。\n :::\n\n 分类\n\n | 热门帖子 | 最新帖子 |\n | -------- | -------- |\n | hot | new |\n\n 排序方式\n\n | 最新回复 | 最新发布 |\n | -------- | -------- |\n | | post |","location":"category.ts"}} /> - 分类 +:::tip +更多标签可以在 [标签列表](https://instant.1point3acres.com/tags) 中找到。 +::: - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | +分类 - 排序方式 +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post | -</Route> +排序方式 -### 用户主题帖 {#yi-mu-san-fen-di-yong-hu-zhu-ti-tie} - -<Route author="Maecenas" example="/1point3acres/user/1/threads" path="/1point3acres/user/:id/threads" paramsDesc={['用户 id,可在 Instant 版网站的个人主页 URL 找到']} notOperational="1" /> - -### 用户回帖 {#yi-mu-san-fen-di-yong-hu-hui-tie} - -<Route author="Maecenas" example="/1point3acres/user/1/posts" path="/1point3acres/user/:id/posts" paramsDesc={['用户 id,可在 Instant 版网站的个人主页 URL 找到']} notOperational="1" /> - -### 录取结果 {#yi-mu-san-fen-di-lu-qu-jie-guo} - -<Route author="EthanWng97" example="/1point3acres/offer/12/null/CMU" path="/1point3acres/offer/:year?/:major?/:school?" paramsDesc={['录取年份 id,空为null', '录取专业 id,空为null', '录取学校 id,空为null']}> - :::tip[三个 id 获取方式] - 1. 打开 [https://offer.1point3acres.com](https://offer.1point3acres.com) - 2. 打开控制台 - 3. 切换到 Network 面板 - 4. 点击 搜索 按钮 - 5. 点击 results?ps=15\&pg=1 POST 请求 - 6. 找到 Request Payload 请求参数,例如 `filters: {planyr: "13", planmajor: "1", outname_w: "ACADIAU"}` ,则三个 id 分别为: 13,1,ACADIAU - ::: -</Route> +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post | ### 博客 {#yi-mu-san-fen-di-bo-ke} -<Route author="nczitzk" example="/1point3acres/blog" path="/1point3acres/blog/:category?" paramsDesc={['分类,见下表,可在对应分类页 URL 中找到']} radar="1"> - | 留学申请 | 找工求职 | 生活攻略 | 投资理财 | 签证移民 | 时政要闻 | - | ---------- | -------- | --------- | -------- | -------- | -------- | - | studyinusa | career | lifestyle | invest | visa | news | -</Route> +<Route namespace="1point3acres" data={{"path":"/blog/:category?","categories":["bbs"],"example":"/1point3acres/blog","parameters":{"category":"分类,见下表,可在对应分类页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["blog.1point3acres.com/:category"]},"name":"博客","maintainers":["nczitzk"],"description":"| 留学申请 | 找工求职 | 生活攻略 | 投资理财 | 签证移民 | 时政要闻 |\n | ---------- | -------- | --------- | -------- | -------- | -------- |\n | studyinusa | career | lifestyle | invest | visa | news |","location":"blog.ts"}} /> + +| 留学申请 | 找工求职 | 生活攻略 | 投资理财 | 签证移民 | 时政要闻 | +| ---------- | -------- | --------- | -------- | -------- | -------- | +| studyinusa | career | lifestyle | invest | visa | news | + +### 分区 {#yi-mu-san-fen-di-fen-qu} + +<Route namespace="1point3acres" data={{"path":"/section/:id?/:type?/:order?","categories":["bbs"],"example":"/1point3acres/section/345","parameters":{"id":"分区 id,见下表,默认为全部","type":"帖子分类, 见下表,默认为 hot,即热门帖子","order":"排序方式,见下表,默认为空,即最新回复"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["instant.1point3acres.com/section/:id","instant.1point3acres.com/"]},"name":"分区","maintainers":["nczitzk"],"description":"分区\n\n | 分区 | id |\n | -------- | --- |\n | 留学申请 | 257 |\n | 世界公民 | 379 |\n | 投资理财 | 400 |\n | 生活干货 | 31 |\n | 职场达人 | 345 |\n | 人际关系 | 391 |\n | 海外求职 | 38 |\n | 签证移民 | 265 |\n\n 分类\n\n | 热门帖子 | 最新帖子 |\n | -------- | -------- |\n | hot | new |\n\n 排序方式\n\n | 最新回复 | 最新发布 |\n | -------- | -------- |\n | | post |","location":"section.ts"}} /> + +分区 + +| 分区 | id | +| -------- | --- | +| 留学申请 | 257 | +| 世界公民 | 379 | +| 投资理财 | 400 | +| 生活干货 | 31 | +| 职场达人 | 345 | +| 人际关系 | 391 | +| 海外求职 | 38 | +| 签证移民 | 265 | + +分类 + +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | + +排序方式 + +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post | + +### 录取结果 {#yi-mu-san-fen-di-lu-qu-jie-guo} + +<Route namespace="1point3acres" data={{"path":"/offer/:year?/:major?/:school?","categories":["bbs"],"example":"/1point3acres/offer/12/null/CMU","parameters":{"year":"录取年份 id,空为null","major":"录取专业 id,空为null","school":"录取学校 id,空为null"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["offer.1point3acres.com/"],"target":"/offer"},"name":"录取结果","maintainers":["EthanWng97"],"url":"offer.1point3acres.com/","description":":::tip[三个 id 获取方式]\n 1. 打开 [https://offer.1point3acres.com](https://offer.1point3acres.com)\n 2. 打开控制台\n 3. 切换到 Network 面板\n 4. 点击 搜索 按钮\n 5. 点击 results?ps=15&pg=1 POST 请求\n 6. 找到 Request Payload 请求参数,例如 `filters: {planyr: \"13\", planmajor: \"1\", outname_w: \"ACADIAU\"}` ,则三个 id 分别为: 13,1,ACADIAU\n :::","location":"offer.ts"}} /> + +:::tip[三个 id 获取方式] +1. 打开 [https://offer.1point3acres.com](https://offer.1point3acres.com) +2. 打开控制台 +3. 切换到 Network 面板 +4. 点击 搜索 按钮 +5. 点击 results?ps=15\&pg=1 POST 请求 +6. 找到 Request Payload 请求参数,例如 `filters: {planyr: "13", planmajor: "1", outname_w: "ACADIAU"}` ,则三个 id 分别为: 13,1,ACADIAU +::: + +### 用户回帖 {#yi-mu-san-fen-di-yong-hu-hui-tie} + +<Route namespace="1point3acres" data={{"path":"/user/:id/posts","categories":["bbs"],"example":"/1point3acres/user/1/posts","parameters":{"id":"用户 id,可在 Instant 版网站的个人主页 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["instant.1point3acres.com/profile/:id","instant.1point3acres.com/"]},"name":"用户回帖","maintainers":["Maecenas"],"location":"user/post.ts"}} /> + +### 用户主题帖 {#yi-mu-san-fen-di-yong-hu-zhu-ti-tie} + +<Route namespace="1point3acres" data={{"path":"/user/:id/threads","categories":["bbs"],"example":"/1point3acres/user/1/threads","parameters":{"id":"用户 id,可在 Instant 版网站的个人主页 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["instant.1point3acres.com/profile/:id","instant.1point3acres.com/"]},"name":"用户主题帖","maintainers":["Maecenas"],"location":"user/thread.ts"}} /> ## 直播吧 {#zhi-bo-ba} -### 子论坛 {#zhi-bo-ba-zi-lun-tan} +### Unknown {#zhi-bo-ba-unknown} -<Route author="LogicJake" example="/zhibo8/forum/8" path="/zhibo8/forum/:id" paramsDesc={['子论坛 id,可在子论坛 URL 找到']} radar="1" /> +<Route namespace="zhibo8" data={{"path":"/more/:category?","categories":["bbs"],"example":"/zhibo8/more/nba","parameters":{"category":"分类,见下表,默认为 NBA"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.zhibo8.cc/:category"],"target":"/more/:category"},"name":"Unknown","maintainers":["nczitzk"],"location":"more.ts"}} /> ### 回帖 {#zhi-bo-ba-hui-tie} -<Route author="LogicJake" example="/zhibo8/post/3050708" path="/zhibo8/post/:id" paramsDesc={['帖子 id,可在帖子 URL 找到']} radar="1" /> +<Route namespace="zhibo8" data={{"path":"/post/:id","categories":["bbs"],"example":"/zhibo8/post/3050708","parameters":{"id":"帖子 id,可在帖子 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"回帖","maintainers":["LogicJake"],"location":"post.ts"}} /> -### 滚动新闻 {#zhi-bo-ba-gun-dong-xin-wen} +### 子论坛 {#zhi-bo-ba-zi-lun-tan} -<Route author="nczitzk" example="/zhibo8/more/nba" path="/zhibo8/more/:category?" paramsDesc={['分类,见下表,默认为 NBA']} radar="1"> - | NBA | 足球 | 电竞 | 综合 | - | --- | ----- | -------- | ------ | - | nba | zuqiu | dianjing | zonghe | -</Route> +<Route namespace="zhibo8" data={{"path":"/forum/:id","categories":["bbs"],"example":"/zhibo8/forum/8","parameters":{"id":"子论坛 id,可在子论坛 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"子论坛","maintainers":["LogicJake"],"location":"forum.ts"}} /> diff --git a/website/docs/routes/blog.mdx b/website/docs/routes/blog.mdx index 0ea8cd45e..01449848e 100644 --- a/website/docs/routes/blog.mdx +++ b/website/docs/routes/blog.mdx @@ -1,499 +1,273 @@ -# 🖊️️ Blog - -## Amazon {#amazon} - -### AWS Blogs {#amazon-aws-blogs} - -<Route author="HankChow" example="/amazon/awsblogs" path="/awsblogs/:locale?" paramsDesc={['Blog postes in a specified language, only the following options are supported. Default `zh_CN`']}> - | 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 | Spainish | Russian | Indonesian | Turkish | -</Route> +# blog ## Apache {#apache} ### APISIX 博客 {#apache-apisix-bo-ke} -<Route author="aneasystone" example="/apache/apisix/blog" path="/apache/apisix/blog" /> - -## archdaily {#archdaily} - -### Home {#archdaily-home} - -<Route author="kt286" example="/archdaily" path="/archdaily" /> +<Route namespace="apache" data={{"path":"/apisix/blog","categories":["blog"],"example":"/apache/apisix/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"APISIX 博客","maintainers":["aneasystone"],"location":"apisix/blog.ts"}} /> ## Backlinko {#backlinko} ### Blog {#backlinko-blog} -<Route author="TonyRL" example="/backlinko/blog" path="/backlinko/blog" radar="1" /> - -## Benedict Evans {#benedict-evans} - -### Essays {#benedict-evans-essays} - -<Route author="emdoe" example="/benedictevans" path="/benedictevans" /> +<Route namespace="backlinko" data={{"path":"/blog","categories":["blog"],"example":"/backlinko/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["backlinko.com/blog","backlinko.com/"]},"name":"Blog","maintainers":["TonyRL"],"url":"backlinko.com/blog","location":"blog.ts"}} /> ## cmpxchg8b {#cmpxchg8b} ### Articles {#cmpxchg8b-articles} -<Route author="yuguorui" example="/cmpxchg8b/articles" path="/cmpxchg8b/articles" /> +<Route namespace="cmpxchg8b" data={{"path":"/articles","categories":["blog"],"example":"/cmpxchg8b/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lock.cmpxchg8b.com/articles"]},"name":"Articles","maintainers":["yuguorui"],"url":"lock.cmpxchg8b.com/articles","location":"articles.ts"}} /> ## CSDN {#csdn} ### User Feed {#csdn-user-feed} -<Route author="Jkker" example="/csdn/blog/csdngeeknews" path="/csdn/blog/:user" radar="1" paramsDesc={['`user` is the username of a CSDN blog which can be found in the url of the home page']} /> +<Route namespace="csdn" data={{"path":"/blog/:user","categories":["blog"],"example":"/csdn/blog/csdngeeknews","parameters":{"user":"`user` is the username of a CSDN blog which can be found in the url of the home page"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["blog.csdn.net/:user"]},"name":"User Feed","maintainers":[],"location":"blog.ts"}} /> ## Delta Lake {#delta-lake} ### Blogs {#delta-lake-blogs} -<Route author="RengarLee" example="/deltaio/blog" path="/deltaio/blog" radar="1" /> +<Route namespace="deltaio" data={{"path":"/blog","categories":["blog"],"example":"/deltaio/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["delta.io/blog"]},"name":"Blogs","maintainers":["RengarLee"],"url":"delta.io/blog","location":"blog.ts"}} /> ## DevolverDigital {#devolverdigital} ### Official Blogs {#devolverdigital-official-blogs} -<Route author="XXY233" example="/devolverdigital/blog" path="/devolverdigital/blog" radar="1" /> +<Route namespace="devolverdigital" data={{"path":"/blog","categories":["blog"],"example":"/devolverdigital/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["devolverdigital.com/blog"]},"name":"Official Blogs","maintainers":["XXY233"],"url":"devolverdigital.com/blog","location":"blog.ts"}} /> ## FreeBuf {#freebuf} ### 文章 {#freebuf-wen-zhang} -<Route author="trganda" example="/freebuf/articles/web" path="/freebuf/articles/:type" paramsDesc={['文章类别', '文章id号,可选']}> - :::tip - Freebuf 的文章页面带有反爬虫机制,所以目前无法获取文章的完整内容。 - ::: -</Route> +<Route namespace="freebuf" data={{"path":"/articles/:type","categories":["blog"],"example":"/freebuf/articles/web","parameters":{"type":"文章类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["freebuf.com/articles/:type/*.html","freebuf.com/articles/:type"]},"name":"文章","maintainers":["trganda"],"description":":::tip\n Freebuf 的文章页面带有反爬虫机制,所以目前无法获取文章的完整内容。\n :::","location":"index.ts"}} /> + +:::tip +Freebuf 的文章页面带有反爬虫机制,所以目前无法获取文章的完整内容。 +::: ## Geocaching {#geocaching} ### Official Blogs {#geocaching-official-blogs} -<Route author="HankChow" example="/geocaching/blogs" path="/geocaching/blogs" radar="1" /> - -## Gwern Branwen {#gwern-branwen} - -### 博客 {#gwern-branwen-bo-ke} - -<Route author="cerebrater" example="/gwern/newest" path="/gwern/:category" paramsDesc={['網誌主頁的分類訊息']} /> +<Route namespace="geocaching" data={{"path":"/blogs","categories":["blog"],"example":"/geocaching/blogs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["geocaching.com/blog/","geocaching.com/"]},"name":"Official Blogs","maintainers":["HankChow"],"url":"geocaching.com/blog/","location":"blogs.ts"}} /> ## hashnode {#hashnode} ### 用户博客 {#hashnode-yong-hu-bo-ke} -<Route author="hnrainll" example="/hashnode/blog/inklings" path="/hashnode/blog/:username" paramsDesc={['博主名称,用户头像 URL 中找到']}> - :::tip - username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog 地址。 - ::: -</Route> +<Route namespace="hashnode" data={{"path":"/blog/:username","categories":["blog"],"example":"/hashnode/blog/inklings","parameters":{"username":"博主名称,用户头像 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hashnode.dev/"]},"name":"用户博客","maintainers":["hnrainll"],"url":"hashnode.dev/","description":":::tip\n username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog 地址。\n :::","location":"blog.ts"}} /> -## Hedwig.pub {#hedwig-pub} - -### 博客 {#hedwig-pub-bo-ke} - -<Route author="zwithz" example="/blogs/hedwig/zmd" path="/blogs/hedwig/:type" paramsDesc={['分类, 见下表']} /> - -| 呆唯的 Newsletter | 0neSe7en 的技术周刊 | 地心引力 | 宪学宪卖 | Comeet 每周精选 | 无鸡之谈 | 我有一片芝麻地 | -| ----------------- | ------------------- | -------- | -------- | --------------- | -------- | -------------- | -| hirasawayui | se7en | walnut | themez | comeet | sunskyxh | zmd | - -> 原则上只要是 `type`.hedwig.pub 都可以匹配。 - -## Hexo {#hexo} - -### Blog using Next theme {#hexo-blog-using-next-theme} - -<Route author="fengkx" path="/hexo/next/:url" example="/hexo/next/archive.diygod.me" paramsDesc={['the blog URL without the protocol (http:// and https://)']} configRequired="1" /> - -### Blog using Yilia theme {#hexo-blog-using-yilia-theme} - -<Route author="aha2mao" path="/hexo/yilia/:url" example="/hexo/yilia/cloudstone.xin" paramsDesc={['the blog URL without the protocol (http:// and https://)']} configRequired="1" /> - -### Blog using Fluid theme {#hexo-blog-using-fluid-theme} - -<Route author="gkkeys" path="/hexo/fluid/:url" example="/hexo/fluid/blog.tonyzhao.xyz" paramsDesc={['the blog URL without the protocol (http:// and https://)']} configRequired="1" /> - -## HiFeng'Blog {#hifeng-blog} - -### 博客 {#hifeng-blog-bo-ke} - -<Route author="aneasystone" example="/hicairo" path="/hicairo" /> +:::tip +username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog 地址。 +::: ## Ian Spriggss {#ian-spriggss} ### Category {#ian-spriggss-category} -<Route author="nczitzk" example="/ianspriggs/portraits" path="/ianspriggs/:category?" paramsDesc={['Category, see below, 3D PORTRAITS by default']} radar="1"> - | 3D PORTRAITS | CHARACTERS | - | ------------ | ---------- | - | portraits | characters | -</Route> +<Route namespace="ianspriggs" data={{"path":"/:category?","categories":["blog"],"example":"/ianspriggs/portraits","parameters":{"category":"Category, see below, 3D PORTRAITS by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"description":"| 3D PORTRAITS | CHARACTERS |\n | ------------ | ---------- |\n | portraits | characters |","location":"index.ts"}} /> + +| 3D PORTRAITS | CHARACTERS | +| ------------ | ---------- | +| portraits | characters | ## Kun Cheng {#kun-cheng} ### Essay {#kun-cheng-essay} -<Route author="nczitzk" example="/kunchengblog/essay" path="/kunchengblog/essay" radar="1" /> - -## LaTeX 开源小屋 {#latex-kai-yuan-xiao-wu} - -### 首页 {#latex-kai-yuan-xiao-wu-shou-ye} - -<Route author="kt286 nczitzk" example="/latexstudio/home" path="/latexstudio/home" /> - -## LeeMeng {#leemeng} - -### blog {#leemeng-blog} - -<Route author="xyqfer" example="/leemeng" path="/leemeng" /> +<Route namespace="kunchengblog" data={{"path":"/essay","categories":["blog"],"example":"/kunchengblog/essay","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kunchengblog.com/essay"]},"name":"Essay","maintainers":["nczitzk"],"url":"kunchengblog.com/essay","location":"essay.ts"}} /> ## MacMenuBar {#macmenubar} ### Recently {#macmenubar-recently} -<Route author="5upernova-heng" example="/macmenubar/recently/developer-apps,system-tools" path="/macmenubar/recently/:category?" paramsDesc={['Category path name, seperate by comma, default is all categories. Category path name can be found in url']} radar="1" /> +<Route namespace="macmenubar" data={{"path":"/recently/:category?","categories":["blog"],"example":"/macmenubar/recently/developer-apps,system-tools","parameters":{"category":"Category path name, seperate by comma, default is all categories. Category path name can be found in url"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Recently","maintainers":["5upernova-heng"],"location":"recently.ts"}} /> ## Medium {#medium} ### List {#medium-list} -<Route author="ImSingee" example="/medium/list/imsingee/f2d8d48096a9" path="/medium/list/:user/:catalogId" paramsDesc={['Username', 'List ID']}> - The List ID is the last part of the URL after `-`, for example, the username in [https://medium.com/@imsingee/list/collection-7e67004f23f9](https://medium.com/@imsingee/list/collection-7e67004f23f9) is `imsingee`, and the ID is `7e67004f23f9`. +<Route namespace="medium" data={{"path":"/list/:user/:catalogId","categories":["blog"],"example":"/medium/list/imsingee/f2d8d48096a9","parameters":{"user":"Username","catalogId":"List ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"List","maintainers":["ImSingee"],"description":"The List ID is the last part of the URL after `-`, for example, the username in [https://medium.com/@imsingee/list/collection-7e67004f23f9](https://medium.com/@imsingee/list/collection-7e67004f23f9) is `imsingee`, and the ID is `7e67004f23f9`.\n\n :::warning\n To access private lists, only self-hosting is supported.\n :::","location":"list.ts"}} /> - :::warning - To access private lists, only self-hosting is supported. - ::: -</Route> +The List ID is the last part of the URL after `-`, for example, the username in [https://medium.com/@imsingee/list/collection-7e67004f23f9](https://medium.com/@imsingee/list/collection-7e67004f23f9) is `imsingee`, and the ID is `7e67004f23f9`. -### Personalized Recommendations - For You {#medium-personalized-recommendations-for-you} - -<Route author="ImSingee" example="/medium/for-you/imsingee" path="/medium/for-you/:user" paramsDesc={['Username']} configRequired="1"> - :::warning - Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. - ::: -</Route> +:::warning +To access private lists, only self-hosting is supported. +::: ### Personalized Recommendations - Following {#medium-personalized-recommendations-following} -<Route author="ImSingee" example="/medium/following/imsingee" path="/medium/following/:user" paramsDesc={['Username']} configRequired="1"> - :::warning - Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. - ::: -</Route> +<Route namespace="medium" data={{"path":"/following/:user","categories":["blog"],"example":"/medium/following/imsingee","parameters":{"user":"Username"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Personalized Recommendations - Following","maintainers":["ImSingee"],"description":":::warning\n Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details.\n :::","location":"following.ts"}} /> + +:::warning +Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. +::: + +### Personalized Recommendations - For You {#medium-personalized-recommendations-for-you} + +<Route namespace="medium" data={{"path":"/for-you/:user","categories":["blog"],"example":"/medium/for-you/imsingee","parameters":{"user":"Username"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Personalized Recommendations - For You","maintainers":["ImSingee"],"description":":::warning\n Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details.\n :::","location":"for-you.ts"}} /> + +:::warning +Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. +::: ### Personalized Recommendations - Tag {#medium-personalized-recommendations-tag} -<Route author="ImSingee" example="/medium/tag/imsingee/cybersecurity" path="/medium/tag/:user/:tag" paramsDesc={['Username', 'Subscribed Tag']} configRequired="1"> - There are many tags, which can be obtained by clicking on a tag from the homepage and looking at the URL. For example, if the URL is `https://medium.com/?tag=web3`, then the tag is `web3`. +<Route namespace="medium" data={{"path":"/tag/:user/:tag","categories":["blog"],"example":"/medium/tag/imsingee/cybersecurity","parameters":{"user":"Username","tag":"Subscribed Tag"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Personalized Recommendations - Tag","maintainers":["ImSingee"],"description":"There are many tags, which can be obtained by clicking on a tag from the homepage and looking at the URL. For example, if the URL is `https://medium.com/?tag=web3`, then the tag is `web3`.\n\n :::warning\n Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details.\n :::","location":"tag.ts"}} /> - :::warning - Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. - ::: -</Route> +There are many tags, which can be obtained by clicking on a tag from the homepage and looking at the URL. For example, if the URL is `https://medium.com/?tag=web3`, then the tag is `web3`. + +:::warning +Personalized recommendations require the cookie value after logging in, so only self-hosting is supported. See the configuration module on the deployment page for details. +::: ## Paul Graham {#paul-graham} ### Essays {#paul-graham-essays} -<Route author="Maecenas nczitzk" example="/paulgraham/articles" path="/paulgraham/articles" radar="1" /> +<Route namespace="paulgraham" data={{"path":["/articles","/essays","/"],"categories":["blog"],"example":"/paulgraham/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["paulgraham.com/articles.html"]},"name":"Essays","maintainers":["Maecenas","nczitzk"],"url":"paulgraham.com/articles.html","location":"article.ts"}} /> -## Phrack Magazine {#phrack-magazine} +### Essays {#paul-graham-essays} -### Article {#phrack-magazine-article} +<Route namespace="paulgraham" data={{"path":["/articles","/essays","/"],"categories":["blog"],"example":"/paulgraham/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["paulgraham.com/articles.html"]},"name":"Essays","maintainers":["Maecenas","nczitzk"],"url":"paulgraham.com/articles.html","location":"article.ts"}} /> -<Route author="CitrusIce" example="/phrack" path="/phrack" /> +### Essays {#paul-graham-essays} -## Stratechery by Ben Thompson {#stratechery-by-ben-thompson} - -### Blog {#stratechery-by-ben-thompson-blog} - -<Route author="chazeon" example="/stratechery" path="/stratechery" /> - -## Surfshark {#surfshark} - -### Blog {#surfshark-blog} - -<Route author="nczitzk" example="/surfshark/blog" path="/surfshark/blog/:category?" paramsDesc={['Category, can be found in URL ,see below, All by default']} radar="1"> - | Home | Cybersecurity | All things VPN | Internet censorship | Entertainment | News | - | ---- | ------------- | -------------- | ------------------- | ------------- | ---- | - | | cybersecurity | all-things-vpn | internet-censorship | entertainment | news | - - #### Cybersecurity - - | Internet Security | Mobile Security | Identity Protection | Phishing | - | ------------------------------- | ----------------------------- | --------------------------------- | ---------------------- | - | cybersecurity/internet-security | cybersecurity/mobile-security | cybersecurity/identity-protection | cybersecurity/phishing | - - #### All things VPN - - | Must-knows | Technology | Tips & Advice | - | -------------- | -------------- | ------------------- | - | vpn/must-knows | vpn/technology | vpn/tips-and-advice | -</Route> +<Route namespace="paulgraham" data={{"path":["/articles","/essays","/"],"categories":["blog"],"example":"/paulgraham/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["paulgraham.com/articles.html"]},"name":"Essays","maintainers":["Maecenas","nczitzk"],"url":"paulgraham.com/articles.html","location":"article.ts"}} /> ## Uber 优步 {#uber-you-bu} ### Engineering {#uber-you-bu-engineering} -<Route author="hulb" example="/uber/blog" path="/uber/blog/:maxPage?" paramsDesc={['max number of pages to retrieve, default to 1 page at most']} /> - -## v1tx {#v1tx} - -### 最新文章 {#v1tx-zui-xin-wen-zhang} - -<Route author="TonyRL" example="/v1tx" path="/v1tx" radar="1" /> - -## WordPress {#wordpress} - -### Blog {#wordpress-blog} - -<Route author="Lonor" example="/blogs/wordpress/lawrence.code.blog" path="/blogs/wordpress/:domain/:https?" paramsDesc={['WordPress blog domain', 'use https by default. options: `http` or `https`']} /> - -## yuzu emulator {#yuzu-emulator} - -### Entry {#yuzu-emulator-entry} - -<Route author="nczitzk" example="/yuzu-emu/entry" path="/yuzu-emu/entry" /> +<Route namespace="uber" data={{"path":"/blog/:maxPage?","categories":["blog"],"example":"/uber/blog","parameters":{"maxPage":"max number of pages to retrieve, default to 1 page at most"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.uber.com/blog/pittsburgh/engineering"],"target":"/blog"},"name":"Engineering","maintainers":["hulb"],"url":"www.uber.com/blog/pittsburgh/engineering","location":"blog.ts"}} /> ## 博客园 {#bo-ke-yuan} ### 10 天推荐排行榜 {#bo-ke-yuan-10-tian-tui-jian-pai-hang-bang} -<Route author="hujingnb" example="/cnblogs/aggsite/topdiggs" path="/cnblogs/aggsite/topdiggs" radar="1" /> +<Route namespace="cnblogs" data={{"path":["/aggsite/topdiggs","/aggsite/topviews","/aggsite/headline","/cate/:type","/pick"],"categories":["blog"],"example":"/cnblogs/aggsite/topdiggs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnblogs.com/aggsite/topdiggs"]},"name":"10 天推荐排行榜","maintainers":["hujingnb"],"url":"www.cnblogs.com/aggsite/topdiggs","description":"在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)","location":"common.ts"}} /> -### 48 小时阅读排行 {#bo-ke-yuan-48-xiao-shi-yue-du-pai-hang} +在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) -<Route author="hujingnb" example="/cnblogs/aggsite/topviews" path="/cnblogs/aggsite/topviews" radar="1" /> +### 10 天推荐排行榜 {#bo-ke-yuan-10-tian-tui-jian-pai-hang-bang} -### 编辑推荐 {#bo-ke-yuan-bian-ji-tui-jian} +<Route namespace="cnblogs" data={{"path":["/aggsite/topdiggs","/aggsite/topviews","/aggsite/headline","/cate/:type","/pick"],"categories":["blog"],"example":"/cnblogs/aggsite/topdiggs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnblogs.com/aggsite/topdiggs"]},"name":"10 天推荐排行榜","maintainers":["hujingnb"],"url":"www.cnblogs.com/aggsite/topdiggs","description":"在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)","location":"common.ts"}} /> -<Route author="hujingnb" example="/cnblogs/aggsite/headline" path="/cnblogs/aggsite/headline" radar="1" /> +在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) -### 分类 {#bo-ke-yuan-fen-lei} +### 10 天推荐排行榜 {#bo-ke-yuan-10-tian-tui-jian-pai-hang-bang} -<Route author="hujingnb" example="/cnblogs/cate/go" path="/cnblogs/cate/:type" paramsDesc={['类型']} radar="1"> - 在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) -</Route> +<Route namespace="cnblogs" data={{"path":["/aggsite/topdiggs","/aggsite/topviews","/aggsite/headline","/cate/:type","/pick"],"categories":["blog"],"example":"/cnblogs/aggsite/topdiggs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnblogs.com/aggsite/topdiggs"]},"name":"10 天推荐排行榜","maintainers":["hujingnb"],"url":"www.cnblogs.com/aggsite/topdiggs","description":"在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)","location":"common.ts"}} /> -### 精华区 {#bo-ke-yuan-jing-hua-qu} +在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) -<Route author="hujingnb" example="/cnblogs/pick" path="/cnblogs/pick" radar="1" /> +### 10 天推荐排行榜 {#bo-ke-yuan-10-tian-tui-jian-pai-hang-bang} -## 不良林 {#bu-liang-lin} +<Route namespace="cnblogs" data={{"path":["/aggsite/topdiggs","/aggsite/topviews","/aggsite/headline","/cate/:type","/pick"],"categories":["blog"],"example":"/cnblogs/aggsite/topdiggs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnblogs.com/aggsite/topdiggs"]},"name":"10 天推荐排行榜","maintainers":["hujingnb"],"url":"www.cnblogs.com/aggsite/topdiggs","description":"在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)","location":"common.ts"}} /> -### 博客 {#bu-liang-lin-bo-ke} +在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) -<Route author="cnkmmk" example="/bulianglin" path="/bulianglin" radar="1" /> +### 10 天推荐排行榜 {#bo-ke-yuan-10-tian-tui-jian-pai-hang-bang} + +<Route namespace="cnblogs" data={{"path":["/aggsite/topdiggs","/aggsite/topviews","/aggsite/headline","/cate/:type","/pick"],"categories":["blog"],"example":"/cnblogs/aggsite/topdiggs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnblogs.com/aggsite/topdiggs"]},"name":"10 天推荐排行榜","maintainers":["hujingnb"],"url":"www.cnblogs.com/aggsite/topdiggs","description":"在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)","location":"common.ts"}} /> + +在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go) ## 财新博客 {#cai-xin-bo-ke} +> 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。 + ### 用户博客 {#cai-xin-bo-ke-yong-hu-bo-ke} -<Route author="Maecenas" example="/caixin/blog/zhangwuchang" path="/caixin/blog/:column?" paramsDesc={['博客名称,可在博客主页的 URL 找到']}> - 通过提取文章全文,以提供比官方源更佳的阅读体验. -</Route> +<Route namespace="caixin" data={{"path":"/blog/:column?","categories":["blog"],"example":"/caixin/blog/zhangwuchang","parameters":{"column":"博客名称,可在博客主页的 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户博客","maintainers":[],"description":"通过提取文章全文,以提供比官方源更佳的阅读体验.","location":"blog.ts"}} /> + +通过提取文章全文,以提供比官方源更佳的阅读体验. ## 川流 {#chuan-liu} ### 严选 {#chuan-liu-yan-xuan} -<Route author="nczitzk" example="/chuanliu/nice" path="/chuanliu/nice" radar="1" /> - -## 大侠阿木 {#da-xia-a-mu} - -### 首页 {#da-xia-a-mu-shou-ye} - -<Route author="kt286" example="/daxiaamu/home" path="/daxiaamu/home" /> +<Route namespace="chuanliu" data={{"path":"/nice","categories":["blog"],"example":"/chuanliu/nice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chuanliu.org/nice"]},"name":"严选","maintainers":["nczitzk"],"url":"chuanliu.org/nice","location":"nice.ts"}} /> ## 大眼仔旭 {#da-yan-zai-xu} ### 分类 {#da-yan-zai-xu-fen-lei} -<Route author="nitezs" example="/dayanzai/windows" path="/dayanzai/:category/:fulltext?" paramsDesc={['分类','是否获取全文,需要获取则传入参数`y`']} radar="1"> - | 微软应用 | 安卓应用 | 教程资源 | 其他资源 | - | -------- | -------- | -------- | -------- | - | windows | android | tutorial | other | -</Route> +<Route namespace="dayanzai" data={{"path":"/:category/:fulltext?","categories":["blog"],"example":"/dayanzai/windows","parameters":{"category":"分类","fulltext":"是否获取全文,需要获取则传入参数`y`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dayanzai.me/:category","dayanzai.me/:category/*"],"target":"/:category"},"name":"分类","maintainers":[],"description":"| 微软应用 | 安卓应用 | 教程资源 | 其他资源 |\n | -------- | -------- | -------- | -------- |\n | windows | android | tutorial | other |","location":"index.ts"}} /> -## 电脑玩物 {#dian-nao-wan-wu} - -### 博客 {#dian-nao-wan-wu-bo-ke} - -<Route author="cnkmmk" example="/playpcesor" path="/playpcesor" radar="1" /> +| 微软应用 | 安卓应用 | 教程资源 | 其他资源 | +| -------- | -------- | -------- | -------- | +| windows | android | tutorial | other | ## 纷享销客 CRM {#fen-xiang-xiao-ke-crm} ### 文章 {#fen-xiang-xiao-ke-crm-wen-zhang} -<Route author="akynazh" example="/fxiaoke/crm/news" path="/fxiaoke/crm/:type" paramsDesc={['文章类型, 见下表']}> - | 全部文章 | 文章干货 | CRM 知识 | 纷享动态 | 签约喜报 | - | -------- | -------- | -------- | --------------- | --------- | - | news | blog | articles | about-influence | customers | -</Route> +<Route namespace="fxiaoke" data={{"path":"/crm/:type","categories":["blog"],"example":"/fxiaoke/crm/news","parameters":{"type":"文章类型, 见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["akynazh"],"description":"| 全部文章 | 文章干货 | CRM 知识 | 纷享动态 | 签约喜报 |\n | -------- | -------- | -------- | --------------- | --------- |\n | news | blog | articles | about-influence | customers |","location":"crm.ts"}} /> -## 国外主机测评 {#guo-wai-zhu-ji-ce-ping} - -### 最新发布 {#guo-wai-zhu-ji-ce-ping-zui-xin-fa-bu} - -<Route author="cnkmmk" example="/zhujiceping" path="/zhujiceping" /> +| 全部文章 | 文章干货 | CRM 知识 | 纷享动态 | 签约喜报 | +| -------- | -------- | -------- | --------------- | --------- | +| news | blog | articles | about-influence | customers | ## 虎皮椒 {#hu-pi-jiao} ### 文章 {#hu-pi-jiao-wen-zhang} -<Route author="wxluckly" example="/xunhupay/blog" path="/xunhupay/blog" radar="1" /> - -## 荒岛 {#huang-dao} - -### 博客 {#huang-dao-bo-ke} - -<Route author="cnkmmk" example="/lala" path="/lala" /> - -## 劍心.回憶 {#jian-xin-hui-yi} - -### 分类 {#jian-xin-hui-yi-fen-lei} - -<Route author="nczitzk" example="/kenshin" path="/kenshin/:category?/:type?" paramsDesc={['分类,见下表,默认为首页', '子分类,见下表,默认为首页']}> - :::tip - 如 `藝能新聞` 的 `日劇新聞` 分类,路由为 `/jnews/news_drama` - ::: - - 藝能新聞 jnews - - | 日劇新聞 | 日影新聞 | 日樂新聞 | 日藝新聞 | - | ----------- | ----------- | ----------- | ------------------- | - | news\_drama | news\_movie | news\_music | news\_entertainment | - - | 動漫新聞 | 藝人美照 | 清涼寫真 | 日本廣告 | 其他日聞 | - | --------- | ------------ | ---------- | -------- | ------------ | - | news\_acg | artist-photo | photoalbum | jpcm | news\_others | - - 旅遊情報 jpnews - - | 日本美食情報 | 日本甜點情報 | 日本零食情報 | 日本飲品情報 | 日本景點情報 | - | ------------ | ------------- | ------------- | ------------- | ------------------ | - | jpnews-food | jpnews-sweets | jpnews-okashi | jpnews-drinks | jpnews-attractions | - - | 日本玩樂情報 | 日本住宿情報 | 日本活動情報 | 日本購物情報 | 日本社會情報 | - | ------------ | ------------ | ------------- | --------------- | -------------- | - | jpnews-play | jpnews-hotel | jpnews-events | jpnews-shopping | jpnews-society | - - | 日本交通情報 | 日本天氣情報 | - | -------------- | -------------- | - | jpnews-traffic | jpnews-weather | - - 日劇世界 jdrama - - | 每周劇評 | 日劇總評 | 資料情報 | - | --------------------- | -------------------- | ----------- | - | drama\_review\_weekly | drama\_review\_final | drama\_data | - - | 深度日劇 | 收視報告 | 日劇專欄 | 劇迷互動 | - | ----------- | ------------- | ------------- | ------------------ | - | drama\_deep | drama\_rating | drama\_column | drama\_interactive | -</Route> - -## 交流岛资源网 {#jiao-liu-dao-zi-yuan-wang} - -### 最新文章 {#jiao-liu-dao-zi-yuan-wang-zui-xin-wen-zhang} - -<Route author="TonyRL" example="/jiaoliudao" path="/jiaoliudao" radar="1" /> - -## 敬维博客 {#jing-wei-bo-ke} - -### 文章 {#jing-wei-bo-ke-wen-zhang} - -<Route author="a180285" example="/blogs/jingwei.link" path="/blogs/jingwei.link" /> - -## 每日安全 {#mei-ri-an-quan} - -### 推送 {#mei-ri-an-quan-tui-song} - -<Route author="LogicJake" example="/security/pulses" path="/security/pulses" anticrawler="1" /> - -## 免費資源網路社群 {#mian-fei-zi-yuan-wang-lu-she-qun} - -### 博客 {#mian-fei-zi-yuan-wang-lu-she-qun-bo-ke} - -<Route author="cnkmmk" example="/free" path="/free" /> +<Route namespace="xunhupay" data={{"path":"/blog","categories":["blog"],"example":"/xunhupay/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.xunhupay.com/blog"]},"name":"文章","maintainers":["Joey"],"url":"www.xunhupay.com/blog","location":"index.ts"}} /> ## 十年之约 {#shi-nian-zhi-yue} ### 专题展示 - 文章 {#shi-nian-zhi-yue-zhuan-ti-zhan-shi-wen-zhang} -<Route author="7Wate a180285" example="/foreverblog/feeds" path="/foreverblog/feeds" radar="1" /> +<Route namespace="foreverblog" data={{"path":"/feeds","categories":["blog"],"example":"/foreverblog/feeds","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.foreverblog.cn/feeds.html"]},"name":"专题展示 - 文章","maintainers":["7Wate","a180285"],"url":"www.foreverblog.cn/feeds.html","location":"feeds.ts"}} /> ## 土猛的员外 {#tu-meng-de-yuan-wai} ### 文章 {#tu-meng-de-yuan-wai-wen-zhang} -<Route author="Levix" example="/luxiangdong/archive" path="/luxiangdong/archive" /> - -## 王五四文集 {#wang-wu-si-wen-ji} - -### 文章 {#wang-wu-si-wen-ji-wen-zhang} - -<Route author="prnake" example="/blogs/wang54" path="/blogs/wang54/:id?" paramsDesc={['RSS抓取地址:https://wangwusiwj.blogspot.com/:id?,默认为2020']} /> - -## 王垠博客 {#wang-yin-bo-ke} - -### 文章 {#wang-yin-bo-ke-wen-zhang} - -<Route author="junbaor SkiTiSu" example="/blogs/wangyin" path="/blogs/wangyin" /> +<Route namespace="luxiangdong" data={{"path":"/archive","categories":["blog"],"example":"/luxiangdong/archive","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["luxiangdong.com/"]},"name":"文章","maintainers":["Levix"],"url":"luxiangdong.com/","location":"archive.ts"}} /> ## 新语丝 {#xin-yu-si} ### 新到资料 {#xin-yu-si-xin-dao-zi-liao} -<Route author="wenzhenl" example="/xys/new" path="/xys/new" radar="1" /> +<Route namespace="xys" data={{"path":"/new","categories":["blog"],"example":"/xys/new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xys.org/","xys.org/new.html"]},"name":"新到资料","maintainers":["wenzhenl"],"url":"xys.org/","location":"new.ts"}} /> ## 雨苁博客 {#yu-cong-bo-ke} -### 首页 {#yu-cong-bo-ke-shou-ye} - -<Route author="XinRoom" example="/ddosi" path="/ddosi" anticrawler="1" /> - ### 分类 {#yu-cong-bo-ke-fen-lei} -<Route author="XinRoom" example="/ddosi/category/黑客工具" path="/ddosi/category/:category?" /> +<Route namespace="ddosi" data={{"path":"/category/:category?","categories":["blog"],"example":"/ddosi/category/黑客工具","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ddosi.org/category/:category/"],"target":"/category/:category"},"name":"分类","maintainers":[],"url":"ddosi.org/","location":"category.ts"}} /> ## 云原生社区 {#yun-yuan-sheng-she-qu} ### 博客 {#yun-yuan-sheng-she-qu-bo-ke} -<Route author="aneasystone" example="/cloudnative/blog" path="/cloudnative/blog" /> - -## 赵容部落 {#zhao-rong-bu-luo} - -### 博客 {#zhao-rong-bu-luo-bo-ke} - -<Route author="cnkmmk" example="/zrblog" path="/zrblog" /> +<Route namespace="cloudnative" data={{"path":"/blog","categories":["blog"],"example":"/cloudnative/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"博客","maintainers":["aneasystone"],"location":"blog.ts"}} /> ## 浙江大学可视分析小组 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu} ### 博客 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu-bo-ke} -<Route author="KaiyoungYu" example="/zjuvag/blog" path="/zjuvag/blog" radar="1" /> +<Route namespace="zjuvag" data={{"path":"/blog","categories":["blog"],"example":"/zjuvag/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"博客","maintainers":["KaiyoungYu"],"location":"blog.ts"}} /> ## 支流科技 {#zhi-liu-ke-ji} ### 博客 {#zhi-liu-ke-ji-bo-ke} -<Route author="aneasystone" example="/apiseven/blog" path="/apiseven/blog" /> +<Route namespace="apiseven" data={{"path":"/blog","categories":["blog"],"example":"/apiseven/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"博客","maintainers":["aneasystone"],"location":"blog.ts"}} /> ## 竹白 {#zhu-bai} +### Unknown {#zhu-bai-unknown} + +<Route namespace="zhubai" data={{"path":"/top20","categories":["blog"],"example":"/zhubai/top20","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["analy.zhubai.love/"]},"name":"Unknown","maintainers":["nczitzk"],"url":"analy.zhubai.love/","location":"top20.ts"}} /> + ### 文章 {#zhu-bai-wen-zhang} -<Route author="naixy28" example="/zhubai/via" path="/zhubai/:id" paramsDesc={['`id` 为竹白主页 url 中的三级域名,如 via.zhubai.love 的 `id` 为 `via`']}> - :::tip - 在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`20` - ::: -</Route> +<Route namespace="zhubai" data={{"path":"/:id","categories":["blog"],"example":"/zhubai/via","parameters":{"id":"`id` 为竹白主页 url 中的三级域名,如 via.zhubai.love 的 `id` 为 `via`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["naixy28"],"description":":::tip\n 在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`20`\n :::","location":"index.ts"}} /> -### 上周热门 TOP 20 {#zhu-bai-shang-zhou-re-men-top-20} - -<Route author="nczitzk" example="/zhubai/top20" path="/zhubai/top20" radar="1" /> +:::tip +在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`20` +::: diff --git a/website/docs/routes/design.mdx b/website/docs/routes/design.mdx index 04d42ecfc..65e971b3b 100644 --- a/website/docs/routes/design.mdx +++ b/website/docs/routes/design.mdx @@ -1,355 +1,223 @@ -# 🎨️ Design - -## Axis Studios {#axis-studios} - -### Work type {#axis-studios-work-type} - -<Route author="MisteryMonster" example="/axis-studios/work/full-service-cg-production" path="/axis-studios/:type/:tag?" paramsDesc={['`work`, `blog`', 'Work type URL: `compositing`, `full-service-cg-production`, `vfx-supervision`, `realtime`, `art-direction`, `animation`']}> - Work type URL in articles. Such as: [https://axisstudiosgroup.com/work/full-service-cg-production](https://axisstudiosgroup.com/work/full-service-cg-production) the tag will be `full-service-cg-production`. - - Some tags are rarely used: `Script`, `direction`, `production`, `design-concept` etc。 -</Route> +# design ## Behance {#behance} ### User Works {#behance-user-works} -<Route author="MisteryMonster" example="/behance/mishapetrick" path="/behance/:user/:type?" paramsDesc={['username', 'type, `projects` or `appreciated`, `projects` by default']} radar="1"> - Behance user's profile URL, like [https://www.behance.net/mishapetrick](https://www.behance.net/mishapetrick) the username will be `mishapetrick`。 -</Route> +<Route namespace="behance" data={{"path":"/:user/:type?","categories":["design"],"example":"/behance/mishapetrick","parameters":{"user":"username","type":"type, `projects` or `appreciated`, `projects` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Works","maintainers":["MisteryMonster"],"description":"Behance user's profile URL, like [https://www.behance.net/mishapetrick](https://www.behance.net/mishapetrick) the username will be `mishapetrick`。","location":"user.ts"}} /> -## Blow Studio {#blow-studio} - -### Home {#blow-studio-home} - -<Route author="MisteryMonster" example="/blow-studio" path="/blow-studio" /> - -## Blur Studio {#blur-studio} - -### Works {#blur-studio-works} - -<Route author="MisteryMonster" example="/blur-studio" path="/blur-studio" /> +Behance user's profile URL, like [https://www.behance.net/mishapetrick](https://www.behance.net/mishapetrick) the username will be `mishapetrick`。 ## Boss 设计 {#boss-she-ji} ### 分类 {#boss-she-ji-fen-lei} -<Route author="TonyRL" example="/bossdesign" path="/bossdesign/:category?" paramsDesc={['分类,可在对应分类页 URL 中找到,留空为全部']} radar="1"> - | Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 | - | --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- | - | note | computer-skills | design-resources | design-software | design-tutorial | design\_information | -</Route> +<Route namespace="bossdesign" data={{"path":"/:category?","categories":["design"],"example":"/bossdesign","parameters":{"category":"分类,可在对应分类页 URL 中找到,留空为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["TonyRL"],"description":"| Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 |\n | --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- |\n | note | computer-skills | design-resources | design-software | design-tutorial | design_information |","location":"index.ts"}} /> + +| Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 | +| --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- | +| note | computer-skills | design-resources | design-software | design-tutorial | design\_information | ## Dribbble {#dribbble} +### Keyword {#dribbble-keyword} + +<Route namespace="dribbble" data={{"path":"/keyword/:keyword","categories":["design"],"example":"/dribbble/keyword/player","parameters":{"keyword":"desired keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keyword","maintainers":["DIYgod","loganrockmore"],"location":"keyword.ts"}} /> + ### Popular {#dribbble-popular} -<Route path="/dribbble/popular/:timeframe?" example="/dribbble/popular" paramsDesc={['support the following values: week, month, year and ever']} /> +<Route namespace="dribbble" data={{"path":"/popular/:timeframe?","categories":["design"],"example":"/dribbble/popular","parameters":{"timeframe":"support the following values: week, month, year and ever"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dribbble.com/"],"target":"/popular"},"name":"Popular","maintainers":["DIYgod","loganrockmore"],"url":"dribbble.com/","location":"popular.ts"}} /> ### User (or team) {#dribbble-user-or-team} -<Route path="/dribbble/user/:name" example="/dribbble/user/google" paramsDesc={['username, available in user\'s homepage URL']} /> - -### Keyword {#dribbble-keyword} - -<Route path="/dribbble/keyword/:keyword" example="/dribbble/keyword/player" paramsDesc={['desired keyword']} /> +<Route namespace="dribbble" data={{"path":"/user/:name","categories":["design"],"example":"/dribbble/user/google","parameters":{"name":"username, available in user's homepage URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dribbble.com/:name"]},"name":"User (or team)","maintainers":["DIYgod","loganrockmore"],"location":"user.ts"}} /> ## Eagle {#eagle} ### Blog {#eagle-blog} -<Route author="Fatpandac" example="/eagle/blog/en" path="/eagle/blog/:cate?/:language?" paramsDesc={['Category, get by URL, `all` by default', 'Language, `cn`, `tw`, `en`, `en` by default']} radar="1" rsshub="1" /> +<Route namespace="eagle" data={{"path":"/blog/:cate?/:language?","categories":["design"],"example":"/eagle/blog/en","parameters":{"cate":"Category, get by URL, `all` by default","language":"Language, `cn`, `tw`, `en`, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cn.eagle.cool/blog"],"target":"/blog"},"name":"Blog","maintainers":["Fatpandac"],"url":"cn.eagle.cool/blog","location":"blog.ts"}} /> ## Google {#google} ### Google Fonts {#google-google-fonts} -<Route author="Fatpandac" example="/google/fonts/date" path="/google/fonts/:sort?" paramsDesc={['Sorting type, see below, default to `date`']} configRequired="1"> - | Newest | Trending | Most popular | Name | Number of styles | - | :----: | :------: | :----------: | :---: | :--------------: | - | date | trending | popularity | alpha | style | +<Route namespace="google" data={{"path":"/fonts/:sort?","categories":["design"],"example":"/google/fonts/date","parameters":{"sort":"Sorting type, see below, default to `date`"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Google Fonts","maintainers":["Fatpandac"],"description":"| Newest | Trending | Most popular | Name | Number of styles |\n | :----: | :------: | :----------: | :---: | :--------------: |\n | date | trending | popularity | alpha | style |\n\n :::warning\n This route requires API key, therefore it's only available when self-hosting, refer to the [Deploy Guide](https://docs.rsshub.app/install/#configuration-route-specific-configurations) for route-specific configurations.\n :::","location":"fonts.ts"}} /> - :::warning - This route requires API key, therefore it's only available when self-hosting, refer to the [Deploy Guide](https://docs.rsshub.app/install/#configuration-route-specific-configurations) for route-specific configurations. - ::: -</Route> +| Newest | Trending | Most popular | Name | Number of styles | +| :----: | :------: | :----------: | :---: | :--------------: | +| date | trending | popularity | alpha | style | -## Inside Design {#inside-design} - -### Recent Stories {#inside-design-recent-stories} - -<Route author="miaoyafeng" example="/invisionapp/inside-design" path="/invisionapp/inside-design" /> - -## LogoNews 标志情报局 {#logonews-biao-zhi-qing-bao-ju} - -### 首页 {#logonews-biao-zhi-qing-bao-ju-shou-ye} - -<Route author="nczitzk" example="/logonews" path="/logonews" /> - -### 文章分类 {#logonews-biao-zhi-qing-bao-ju-wen-zhang-fen-lei} - -<Route author="nczitzk" example="/logonews/category/news/newsletter" path="/logonews/category/:category/:type" paramsDesc={['分类,可在对应分类页 URL 中找到', '类型,可在对应分类页 URL 中找到']}> - 如 [简讯 - 标志情报局](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)。 -</Route> - -### 文章标签 {#logonews-biao-zhi-qing-bao-ju-wen-zhang-biao-qian} - -<Route author="nczitzk" example="/logonews/tag/china" path="/logonews/tag/:tag" paramsDesc={['标签,可在对应标签页 URL 中找到']}> - 如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。 -</Route> - -### 作品 {#logonews-biao-zhi-qing-bao-ju-zuo-pin} - -<Route author="nczitzk" example="/logonews/work" path="/logonews/work" /> - -### 作品分类 {#logonews-biao-zhi-qing-bao-ju-zuo-pin-fen-lei} - -<Route author="nczitzk" example="/logonews/work/categorys/hotel-catering" path="/logonews/work/categorys/:category" paramsDesc={['分类,可在对应分类页 URL 中找到']}> - 如 [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)。 -</Route> - -### 作品标签 {#logonews-biao-zhi-qing-bao-ju-zuo-pin-biao-qian} - -<Route author="nczitzk" example="/logonews/work/tags/旅游" path="/logonews/work/tags/:tag?" paramsDesc={['标签,可在对应标签页 URL 中找到']}> - 如 [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/旅游)。 -</Route> - -## Method Studios {#method-studios} - -### Menus {#method-studios-menus} - -<Route author="MisteryMonster" path="/method-studios/:menu?" example="/method-studios/games" paramsDesc={['URL behind /en: `features`, `advertising`, `episodic`, `games`, `methodmade`']}> - Not support `main`, `news`. - - Default is under [https://www.methodstudios.com/en/features](https://www.methodstudios.com/en/features). -</Route> - -## Monotype {#monotype} - -### Featured Article {#monotype-featured-article} - -<Route author="nczitzk" example="/monotype/article" path="/monotype/article" /> +:::warning +This route requires API key, therefore it's only available when self-hosting, refer to the [Deploy Guide](https://docs.rsshub.app/install/#configuration-route-specific-configurations) for route-specific configurations. +::: ## Notefolio {#notefolio} ### Works {#notefolio-works} -<Route author="BianTan" example="/notefolio/search/1/pick/all/life" path="/notefolio/search/:category?/:order?/:time?/:query?" paramsDesc={['Category, see below, `all` by default', 'Order, `pick` as Notefolio Pick, `published` as Newest, `like` as like, `pick` by default', 'Time, `all` as All the time, `one-day` as Latest 24 hours, `week` as Latest week, `month` as Latest month, `three-month` as Latest 3 months, `all` by default', 'Keyword, empty by default']}> - | Category | Name in Korean | Name in English | - | -------- | ------------------ | ----------------------- | - | all | 전체 | All | - | 1 | 영상/모션그래픽 | Video / Motion Graphics | - | 2 | 그래픽 디자인 | Graphic Design | - | 3 | 브랜딩/편집 | Branding / Editing | - | 4 | UI/UX | UI/UX | - | 5 | 일러스트레이션 | Illustration | - | 6 | 디지털 아트 | Digital Art | - | 7 | 캐릭터 디자인 | Character Design | - | 8 | 제품/패키지 디자인 | Product Package Design | - | 9 | 포토그래피 | Photography | - | 10 | 타이포그래피 | Typography | - | 11 | 공예 | Crafts | - | 12 | 파인아트 | Fine Art | -</Route> +<Route namespace="notefolio" data={{"path":"/search/:category?/:order?/:time?/:query?","categories":["design"],"example":"/notefolio/search/1/pick/all/life","parameters":{"category":"Category, see below, `all` by default","order":"Order, `pick` as Notefolio Pick, `published` as Newest, `like` as like, `pick` by default","time":"Time, `all` as All the time, `one-day` as Latest 24 hours, `week` as Latest week, `month` as Latest month, `three-month` as Latest 3 months, `all` by default","query":"Keyword, empty by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["notefolio.net/search"]},"name":"Works","maintainers":["BianTan"],"url":"notefolio.net/search","description":"| Category | Name in Korean | Name in English |\n | -------- | ------------------ | ----------------------- |\n | all | 전체 | All |\n | 1 | 영상/모션그래픽 | Video / Motion Graphics |\n | 2 | 그래픽 디자인 | Graphic Design |\n | 3 | 브랜딩/편집 | Branding / Editing |\n | 4 | UI/UX | UI/UX |\n | 5 | 일러스트레이션 | Illustration |\n | 6 | 디지털 아트 | Digital Art |\n | 7 | 캐릭터 디자인 | Character Design |\n | 8 | 제품/패키지 디자인 | Product Package Design |\n | 9 | 포토그래피 | Photography |\n | 10 | 타이포그래피 | Typography |\n | 11 | 공예 | Crafts |\n | 12 | 파인아트 | Fine Art |","location":"search.ts"}} /> + +| Category | Name in Korean | Name in English | +| -------- | ------------------ | ----------------------- | +| all | 전체 | All | +| 1 | 영상/모션그래픽 | Video / Motion Graphics | +| 2 | 그래픽 디자인 | Graphic Design | +| 3 | 브랜딩/편집 | Branding / Editing | +| 4 | UI/UX | UI/UX | +| 5 | 일러스트레이션 | Illustration | +| 6 | 디지털 아트 | Digital Art | +| 7 | 캐릭터 디자인 | Character Design | +| 8 | 제품/패키지 디자인 | Product Package Design | +| 9 | 포토그래피 | Photography | +| 10 | 타이포그래피 | Typography | +| 11 | 공예 | Crafts | +| 12 | 파인아트 | Fine Art | ## Shopping Design {#shopping-design} ### 文章列表 {#shopping-design-wen-zhang-lie-biao} -<Route author="miles170" example="/shoppingdesign/posts" path="/shoppingdesign/posts" notOperational="1" /> - -## UI 中国 {#ui-zhong-guo} - -### 推荐文章 {#ui-zhong-guo-tui-jian-wen-zhang} - -<Route author="WenryXu" example="/ui-cn/article" path="/ui-cn/article" /> - -### 个人作品 {#ui-zhong-guo-ge-ren-zuo-pin} - -<Route author="WenryXu" example="/ui-cn/user/85974" path="/ui-cn/user/:id" paramsDesc={['用户id']} /> - -## Unit Image {#unit-image} - -### Films {#unit-image-films} - -<Route author="MisteryMonster" example="/unit-image/films/vfx" path="/unit-image/films/:type?" paramsDesc={['Films type,`vfx`, `game-trailer`, `animation`, `commercials`, `making-of`']} /> +<Route namespace="shoppingdesign" data={{"path":"/posts","categories":["design"],"example":"/shoppingdesign/posts","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.shoppingdesign.com.tw/post"]},"name":"文章列表","maintainers":["miles170"],"url":"www.shoppingdesign.com.tw/post","location":"posts.ts"}} /> ## 爱果果 {#ai-guo-guo} ### 最新 H5 {#ai-guo-guo-zui-xin-h5} -<Route author="yuxinliu-alex" example="/iguoguo/html5" path="/iguoguo/html5" /> - -## 优设网 {#you-she-wang} - -### 行业新闻 {#you-she-wang-hang-ye-xin-wen} - -<Route author="nczitzk" example="/uisdc/hangye" path="/uisdc/hangye/:caty?" paramsDesc={['分类,见下表,默认为全部新闻']} anticrawler="1"> - | 全部新闻 | 活动赛事 | 品牌资讯 | 新品推荐 | - | -------- | --------------- | ---------- | ------------ | - | | events-activity | brand-news | new-products | -</Route> +<Route namespace="iguoguo" data={{"path":"/html5","categories":["design"],"example":"/iguoguo/html5","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新 H5","maintainers":["yuxinliu-alex"],"location":"index.ts"}} /> ## 站酷 {#zhan-ku} -### 发现(+ 推荐预设) {#zhan-ku-fa-xian-tui-jian-yu-she} +### Unknown {#zhan-ku-unknown} -<Route author="junbaor nczitzk" example="/zcool/discover/all" path="/zcool/discover/:type?" paramsDesc={['预设参数,见下表']} radar="1" notOperational="1"> - 推荐类型 - - | all | home | editor | article | - | -------- | -------- | -------- | -------- | - | 全部推荐 | 首页推荐 | 编辑精选 | 文章推荐 | -</Route> - -### 发现(+ 查询参数) {#zhan-ku-fa-xian-cha-xun-can-shu} - -<Route author="nczitzk" example="/zcool/discover/cate=0&subCate=0" path="/zcool/discover/:query?" paramsDesc={['查询参数']} radar="1" notOperational="1"> - 在 [站酷发现页](https://www.zcool.com.cn/discover) 中选择好所有可选的查询参数后会跳转到对应搜索结果页面。此时地址栏 `https://www.zcool.com.cn/discover/` 后的字段即为查询参数。 - - 如:选择 **精选** 分类下的 **运营设计** 子分类后,选择 **编辑精选**,默认 **视频** 取消勾选,默认 **城市** 和 **学校** 留空即全部,就会跳转到链接: - - `https://www.zcool.com.cn/discover?cate=0&subCate=617&hasVideo=0&city=0&college=0&recommendLevel=2&sort=9` - - 此时其查询参数为 `cate=0&subCate=617&hasVideo=0&city=0&college=0&recommendLevel=2&sort=9`。其对应的路由即 [`/zcool/discover/cate=0&subCate=617&hasVideo=0&city=0&college=0&recommendLevel=2&sort=9`](https://rsshub.app/zcool/discover/cate=0\&subCate=617\&hasVideo=0\&city=0\&college=0\&recommendLevel=2\&sort=9) -</Route> +<Route namespace="zcool" data={{"path":"/user/:uid","categories":["design"],"example":"/zcool/user/baiyong","parameters":{"uid":"个性域名前缀或者用户ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zcool.com.cn/u/:id"],"target":"/user/:id"},"name":"Unknown","maintainers":["junbaor"],"location":"user.ts"}} /> ### 发现 {#zhan-ku-fa-xian} -<Route author="nczitzk" example="/zcool/discover" path="/zcool/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?" paramsDesc={['查询参数或分类,若填写分类见下表,默认为空 或 `0` 即精选', '子分类,见下表,默认为 `0` 即该父分类下全部', '是否含视频,默认为 `0` 即全部,亦可选 `1` 即含视频', '地区代码,填入发现页中 `选择城市` 中的各级地名,如 `亚洲`、`中国`、`北京`、`纽约`、`巴黎`等', '学校,默认为 `0` 即全部', '推荐等级,见下表,默认为 `2` 即编辑精选', '排序方式,可选 `0` 即最新发布 或 `9` 即默认排序,默认为 `9`']} radar="1" notOperational="1"> - 查看 **精选** 分类下的全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0`](https://rsshub.app/zcool/discover/0) +<Route namespace="zcool" data={{"path":"/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?","categories":["design"],"example":"/zcool/discover","parameters":{"query":"查询参数或分类,若填写分类见下表,默认为空 或 `0` 即精选","subCate":"子分类,见下表,默认为 `0` 即该父分类下全部","hasVideo":"是否含视频,默认为 `0` 即全部,亦可选 `1` 即含视频","city":"地区代码,填入发现页中 `选择城市` 中的各级地名,如 `亚洲`、`中国`、`北京`、`纽约`、`巴黎`等","college":"学校,默认为 `0` 即全部","recommendLevel":"推荐等级,见下表,默认为 `2` 即编辑精选","sort":"排序方式,可选 `0` 即最新发布 或 `9` 即默认排序,默认为 `9`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"发现","maintainers":["nczitzk"],"description":"查看 **精选** 分类下的全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0`](https://rsshub.app/zcool/discover/0)\n\n 查看 **精选** 分类下的 **运营设计** 子分类全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0/617`](https://rsshub.app/zcool/discover/0/617)\n\n 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,可直接使用路由 [`/zcool/discover/0/617/1`](https://rsshub.app/zcool/discover/0/617/1)\n\n 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,且城市选择 **北京**,可直接使用路由 [`/zcool/discover/0/617/1/北京`](https://rsshub.app/zcool/discover/0/617/1/北京)\n\n :::tip\n 下方仅提供 **分类及其子分类** 参数的代码。**学校** 参数的代码可以在 [站酷发现页](https://www.zcool.com.cn/discover) 中选择跳转后,从浏览器地址栏中找到。\n :::\n\n 分类 cate\n\n | 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 |\n | ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- |\n | 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 |\n\n 子分类 subCate\n\n 精选 0\n\n | 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 |\n | -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ |\n | 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 |\n\n 平面 8\n\n | 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 |\n | ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- |\n | 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 |\n\n 插画 1\n\n | 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 |\n | -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- |\n | 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 |\n\n UI 17\n\n | APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 |\n | -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- |\n | 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 |\n\n 网页 607\n\n | 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 |\n | ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- |\n | 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 |\n\n 摄影 33\n\n | 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 |\n | -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- |\n | 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 |\n\n 三维 24\n\n | 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 |\n | ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- |\n | 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 |\n\n 影视 610\n\n | 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 |\n | ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- |\n | 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 |\n\n 空间 609\n\n | 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 |\n | -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- |\n | 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 |\n\n 工业 / 产品 499\n\n | 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 |\n | -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- |\n | 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 |\n\n 动漫 608\n\n | 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 |\n | ----------- | ------------- | -------- | -------- | ------ | -------- | ---- |\n | 628 | 629 | 632 | 627 | 633 | 635 | 820 |\n\n 纯艺术 612\n\n | 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 |\n | ---- | ---- | ---- | -------- | ---- |\n | 659 | 662 | 668 | 657 | 821 |\n\n 手工艺 611\n\n | 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 |\n | ---------- | ----------- | -------- | ---------- | ---- |\n | 654 | 656 | 756 | 658 | 816 |\n\n 服装 613\n\n | 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 |\n | --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- |\n | 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 |\n\n 其他 44\n\n | 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 |\n | ----------- | ------- | -------- | ---- | ---- |\n | 417 | 798 | 683 | 45 | 824 |\n\n 推荐等级 recommendLevel\n\n | 全部 | 编辑精选 | 首页推荐 | 全部推荐 |\n | ---- | -------- | -------- | -------- |\n | 0 | 2 | 3 | 1 |","location":"discover.ts"}} /> - 查看 **精选** 分类下的 **运营设计** 子分类全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0/617`](https://rsshub.app/zcool/discover/0/617) +查看 **精选** 分类下的全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0`](https://rsshub.app/zcool/discover/0) - 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,可直接使用路由 [`/zcool/discover/0/617/1`](https://rsshub.app/zcool/discover/0/617/1) +查看 **精选** 分类下的 **运营设计** 子分类全部内容,其他参数选择默认,可直接使用路由 [`/zcool/discover/0/617`](https://rsshub.app/zcool/discover/0/617) - 在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,且城市选择 **北京**,可直接使用路由 [`/zcool/discover/0/617/1/北京`](https://rsshub.app/zcool/discover/0/617/1/北京) +在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,可直接使用路由 [`/zcool/discover/0/617/1`](https://rsshub.app/zcool/discover/0/617/1) - :::tip - 下方仅提供 **分类及其子分类** 参数的代码。**学校** 参数的代码可以在 [站酷发现页](https://www.zcool.com.cn/discover) 中选择跳转后,从浏览器地址栏中找到。 - ::: +在 **精选** 分类下的 **运营设计** 子分类全部内容基础上,筛选出有 **视频**,且城市选择 **北京**,可直接使用路由 [`/zcool/discover/0/617/1/北京`](https://rsshub.app/zcool/discover/0/617/1/北京) - 分类 cate +:::tip +下方仅提供 **分类及其子分类** 参数的代码。**学校** 参数的代码可以在 [站酷发现页](https://www.zcool.com.cn/discover) 中选择跳转后,从浏览器地址栏中找到。 +::: - | 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 | - | ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- | - | 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 | +分类 cate - 子分类 subCate +| 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 | +| ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- | +| 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 | - 精选 0 +子分类 subCate - | 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 | - | -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ | - | 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 | +精选 0 - 平面 8 +| 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 | +| -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ | +| 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 | - | 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 | - | ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- | - | 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 | +平面 8 - 插画 1 +| 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 | +| ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- | +| 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 | - | 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 | - | -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- | - | 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 | +插画 1 - UI 17 +| 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 | +| -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- | +| 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 | - | APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 | - | -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- | - | 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 | +UI 17 - 网页 607 +| APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 | +| -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- | +| 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 | - | 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 | - | ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- | - | 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 | +网页 607 - 摄影 33 +| 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 | +| ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- | +| 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 | - | 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 | - | -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- | - | 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 | +摄影 33 - 三维 24 +| 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 | +| -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- | +| 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 | - | 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 | - | ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- | - | 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 | +三维 24 - 影视 610 +| 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 | +| ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- | +| 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 | - | 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 | - | ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- | - | 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 | +影视 610 - 空间 609 +| 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 | +| ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- | +| 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 | - | 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 | - | -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- | - | 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 | +空间 609 - 工业 / 产品 499 +| 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 | +| -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- | +| 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 | - | 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 | - | -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- | - | 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 | +工业 / 产品 499 - 动漫 608 +| 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 | +| -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- | +| 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 | - | 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 | - | ----------- | ------------- | -------- | -------- | ------ | -------- | ---- | - | 628 | 629 | 632 | 627 | 633 | 635 | 820 | +动漫 608 - 纯艺术 612 +| 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 | +| ----------- | ------------- | -------- | -------- | ------ | -------- | ---- | +| 628 | 629 | 632 | 627 | 633 | 635 | 820 | - | 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 | - | ---- | ---- | ---- | -------- | ---- | - | 659 | 662 | 668 | 657 | 821 | +纯艺术 612 - 手工艺 611 +| 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 | +| ---- | ---- | ---- | -------- | ---- | +| 659 | 662 | 668 | 657 | 821 | - | 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 | - | ---------- | ----------- | -------- | ---------- | ---- | - | 654 | 656 | 756 | 658 | 816 | +手工艺 611 - 服装 613 +| 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 | +| ---------- | ----------- | -------- | ---------- | ---- | +| 654 | 656 | 756 | 658 | 816 | - | 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 | - | --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- | - | 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 | +服装 613 - 其他 44 +| 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 | +| --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- | +| 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 | - | 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 | - | ----------- | ------- | -------- | ---- | ---- | - | 417 | 798 | 683 | 45 | 824 | +其他 44 - 推荐等级 recommendLevel +| 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 | +| ----------- | ------- | -------- | ---- | ---- | +| 417 | 798 | 683 | 45 | 824 | - | 全部 | 编辑精选 | 首页推荐 | 全部推荐 | - | ---- | -------- | -------- | -------- | - | 0 | 2 | 3 | 1 | -</Route> +推荐等级 recommendLevel + +| 全部 | 编辑精选 | 首页推荐 | 全部推荐 | +| ---- | -------- | -------- | -------- | +| 0 | 2 | 3 | 1 | ### 作品总榜单 {#zhan-ku-zuo-pin-zong-bang-dan} -<Route author="yuuow" example="/zcool/top/design" path="/zcool/top/:type" paramsDesc={['推荐类型,详见下面的表格']} radar="1" notOperational="1"> - 榜单类型 +<Route namespace="zcool" data={{"path":"/top/:type","categories":["design"],"example":"/zcool/top/design","parameters":{"type":"推荐类型,详见下面的表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作品总榜单","maintainers":["yuuow"],"description":"榜单类型\n\n | design | article |\n | -------- | -------- |\n | 作品榜单 | 文章榜单 |","location":"top.ts"}} /> - | design | article | - | -------- | -------- | - | 作品榜单 | 文章榜单 | -</Route> +榜单类型 -### 用户作品 {#zhan-ku-yong-hu-zuo-pin} - -<Route author="junbaor" example="/zcool/user/baiyong" path="/zcool/user/:uid" paramsDesc={['个性域名前缀或者用户ID']} radar="1" notOperational="1"> - 例如: - - 站酷的个人主页 `https://baiyong.zcool.com.cn` 对应 rss 路径 `/zcool/user/baiyong` - - 站酷的个人主页 `https://www.zcool.com.cn/u/568339` 对应 rss 路径 `/zcool/user/568339` -</Route> +| design | article | +| -------- | -------- | +| 作品榜单 | 文章榜单 | diff --git a/website/docs/routes/finance.mdx b/website/docs/routes/finance.mdx index 5554f7a04..dfd060988 100644 --- a/website/docs/routes/finance.mdx +++ b/website/docs/routes/finance.mdx @@ -1,277 +1,182 @@ -# 💰 Finance - -## AI 财经社 {#ai-cai-jing-she} - -### 最新文章 {#ai-cai-jing-she-zui-xin-wen-zhang} - -<Route author="nczitzk" example="/aicaijing/latest" path="/aicaijing/latest" /> - -### 封面文章 {#ai-cai-jing-she-feng-mian-wen-zhang} - -<Route author="nczitzk" example="/aicaijing/cover" path="/aicaijing/cover" /> - -### 推荐资讯 {#ai-cai-jing-she-tui-jian-zi-xun} - -<Route author="nczitzk" example="/aicaijing/recommend" path="/aicaijing/recommend" /> - -### 热点 & 深度 {#ai-cai-jing-she-re-dian-shen-du} - -<Route author="nczitzk" example="/aicaijing/information/14" path="/aicaijing/information/:id?" paramsDesc={['栏目 id,可在对应栏目页 URL 中找到,默认为 14,即热点最新']}> - | 栏目 id | 栏目 | - | ------- | ----------- | - | 14 | 热点 - 最新 | - | 5 | 热点 - 科技 | - | 9 | 热点 - 消费 | - | 7 | 热点 - 出行 | - | 13 | 热点 - 文娱 | - | 10 | 热点 - 教育 | - | 25 | 热点 - 地产 | - | 11 | 热点 - 更多 | - | 28 | 深度 - 出行 | - | 29 | 深度 - 科技 | - | 31 | 深度 - 消费 | - | 33 | 深度 - 教育 | - | 34 | 深度 - 更多 | - | 8 | 深度 - 地产 | - | 6 | 深度 - 文娱 | -</Route> +# finance ## AInvest {#ainvest} ### Latest Article {#ainvest-latest-article} -<Route author="TonyRL" example="/ainvest/article" path="/ainvest/article" radar="1" /> +<Route namespace="ainvest" data={{"path":"/article","categories":["finance"],"example":"/ainvest/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ainvest.com/news"]},"name":"Latest Article","maintainers":["TonyRL"],"url":"ainvest.com/news","location":"article.ts"}} /> ### Latest News {#ainvest-latest-news} -<Route author="TonyRL" example="/ainvest/news" path="/ainvest/news" radar="1" /> +<Route namespace="ainvest" data={{"path":"/news","categories":["finance"],"example":"/ainvest/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ainvest.com/news"]},"name":"Latest News","maintainers":["TonyRL"],"url":"ainvest.com/news","location":"news.ts"}} /> ## BigQuant {#bigquant} ### 专题报告 {#bigquant-zhuan-ti-bao-gao} -<Route author="nczitzk" example="/bigquant/collections" path="/bigquant/collections" /> +<Route namespace="bigquant" data={{"path":"/collections","categories":["finance"],"example":"/bigquant/collections","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bigquant.com/"]},"name":"专题报告","maintainers":["nczitzk"],"url":"bigquant.com/","location":"collections.ts"}} /> ## Bloomberg {#bloomberg} -### News {#bloomberg-news} - -<Route author="bigfei" example="/bloomberg" path="/bloomberg/:site?" paramsDesc={['Site, see below, News by default']} anticrawler="1"> - | Site | Name | - | ------------ | ------------ | - | / | News | - | bpol | Politics | - | bbiz | Business | - | markets | Markets | - | technology | Technology | - | green | Green | - | wealth | Wealth | - | pursuits | Pursuits | - | bview | Opinion | - | equality | Equality | - | businessweek | Businessweek | - | citylab | CityLab | -</Route> - ### Authors {#bloomberg-authors} -<Route author="josh" example="/bloomberg/authors/ARbTQlRLRjE/matthew-s-levine" path="/bloomberg/authors/:id/:slug/:source?" paramsDesc={['Author ID, can be found in URL', 'Author Slug, can be found in URL', 'Data source, either `api` or `rss`,`api` by default']} anticrawler="1" radar="1" /> - -## DL NEWS {#dl-news} - -### All Articles {#dl-news-all-articles} - -<Route author="Rjnishant530" example="/dlnews" path="/dlnews" radar="1" /> - -### Topic {#dl-news-topic} - -<Route author="Rjnishant530" example="/dlnews/fintech" path="/dlnews/:category" paramsDesc={['Find in Table. Defaults to All articles']} radar="1" notOperational="1"> - | Topic | Link | - | ---------------- | -------------- | - | DeFi | defi | - | Fintech/VC/Deals | fintech | - | Llama U | llama-u | - | Markets | markets | - | People & Culture | people-culture | - | Regulation | regulation | - | Snapshot | snapshot | - | Web3 | web3 | -</Route> +<Route namespace="bloomberg" data={{"path":"/authors/:id/:slug/:source?","categories":["finance"],"example":"/bloomberg/authors/ARbTQlRLRjE/matthew-s-levine","parameters":{"id":"Author ID, can be found in URL","slug":"Author Slug, can be found in URL","source":"Data source, either `api` or `rss`,`api` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.bloomberg.com/*/authors/:id/:slug","www.bloomberg.com/authors/:id/:slug"],"target":"/authors/:id/:slug"},"name":"Authors","maintainers":["josh"],"location":"authors.ts"}} /> ## DT 财经 {#dt-cai-jing} -### 数据洞察 {#dt-cai-jing-shu-ju-dong-cha} - -<Route author="nczitzk" example="/dtcj/datainsight" path="/dtcj/datainsight/:id?" paramsDesc={['分类,见下表,默认为全部']}> - | 城数 | NEXT 情报局 | 专业精选 | - | ---- | ----------- | -------- | - | 3 | 1 | 4 | -</Route> - ### 数据侠专栏 {#dt-cai-jing-shu-ju-xia-zhuan-lan} -<Route author="nczitzk" example="/dtcj/datahero" path="/dtcj/datahero/:category?" paramsDesc={['分类,见下表,默认为全部']}> - | 侠创 | 纽约数据科学学院 | RS 实验所 | 阿里云天池 | - | ---- | ---------------- | --------- | ---------- | - | 5 | 6 | 9 | 10 | -</Route> +<Route namespace="dtcj" data={{"path":"/datahero/:category?","categories":["finance"],"example":"/dtcj/datahero","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"数据侠专栏","maintainers":["nczitzk"],"description":"| 侠创 | 纽约数据科学学院 | RS 实验所 | 阿里云天池 |\n | ---- | ---------------- | --------- | ---------- |\n | 5 | 6 | 9 | 10 |","location":"datahero.ts"}} /> + +| 侠创 | 纽约数据科学学院 | RS 实验所 | 阿里云天池 | +| ---- | ---------------- | --------- | ---------- | +| 5 | 6 | 9 | 10 | + +### 数据洞察 {#dt-cai-jing-shu-ju-dong-cha} + +<Route namespace="dtcj" data={{"path":"/datainsight/:id?","categories":["finance"],"example":"/dtcj/datainsight","parameters":{"id":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dtcj.com/insighttopic/:id"],"target":"/datainsight/:id"},"name":"数据洞察","maintainers":["nczitzk"],"url":"dtcj.com/dtcj/datainsight","description":"| 城数 | NEXT 情报局 | 专业精选 |\n | ---- | ----------- | -------- |\n | 3 | 1 | 4 |","location":"datainsight.ts"}} /> + +| 城数 | NEXT 情报局 | 专业精选 | +| ---- | ----------- | -------- | +| 3 | 1 | 4 | ## Finology Insider {#finology-insider} ### Bullets {#finology-insider-bullets} -<Route author="Rjnishant530" example="/finology/bullets" path="/finology/bullets" radar="1" /> +<Route namespace="finology" data={{"path":"/bullets","categories":["finance"],"example":"/finology/bullets","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["insider.finology.in/bullets"]},"name":"Bullets","maintainers":["Rjnishant530"],"url":"insider.finology.in/bullets","location":"bullets.ts"}} /> ### Category {#finology-insider-category} -<Route author="Rjnishant530" example="/finology/success-stories" path="/finology/:category" paramDesc={['Refer Table below or find in URL']} radar="1"> - :::note[Category] - | Category | Link | - | --------------------- | ------------------ | - | **Business** | business | - | Big Shots | entrepreneurship | - | Startups | startups-india | - | Brand Games | success-stories | - | Juicy Scams | juicy-scams | - | **Finance** | finance | - | Macro Moves | economy | - | News Platter | market-news | - | Tax Club | tax | - | Your Money | your-money | - | **Invest** | investing | - | Stock Market | stock-market | - | Financial Ratios | stock-ratios | - | Investor's Psychology | behavioral-finance | - | Mutual Funds | mutual-fund | - ::: -</Route> +<Route namespace="finology" data={{"path":["/:category","/tag/:topic"],"categories":["finance"],"example":"/finology/success-stories","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["insider.finology.in/:category"]},"name":"Category","maintainers":["Rjnishant530"],"description":":::note[Category]\n | Category | Link |\n | --------------------- | ------------------ |\n | **Business** | business |\n | Big Shots | entrepreneurship |\n | Startups | startups-india |\n | Brand Games | success-stories |\n | Juicy Scams | juicy-scams |\n | **Finance** | finance |\n | Macro Moves | economy |\n | News Platter | market-news |\n | Tax Club | tax |\n | Your Money | your-money |\n | **Invest** | investing |\n | Stock Market | stock-market |\n | Financial Ratios | stock-ratios |\n | Investor's Psychology | behavioral-finance |\n | Mutual Funds | mutual-fund |\n :::","location":"tag.ts"}} /> + +:::note[Category] +| Category | Link | +| --------------------- | ------------------ | +| **Business** | business | +| Big Shots | entrepreneurship | +| Startups | startups-india | +| Brand Games | success-stories | +| Juicy Scams | juicy-scams | +| **Finance** | finance | +| Macro Moves | economy | +| News Platter | market-news | +| Tax Club | tax | +| Your Money | your-money | +| **Invest** | investing | +| Stock Market | stock-market | +| Financial Ratios | stock-ratios | +| Investor's Psychology | behavioral-finance | +| Mutual Funds | mutual-fund | +::: + +### Category {#finology-insider-category} + +<Route namespace="finology" data={{"path":["/:category","/tag/:topic"],"categories":["finance"],"example":"/finology/success-stories","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["insider.finology.in/:category"]},"name":"Category","maintainers":["Rjnishant530"],"description":":::note[Category]\n | Category | Link |\n | --------------------- | ------------------ |\n | **Business** | business |\n | Big Shots | entrepreneurship |\n | Startups | startups-india |\n | Brand Games | success-stories |\n | Juicy Scams | juicy-scams |\n | **Finance** | finance |\n | Macro Moves | economy |\n | News Platter | market-news |\n | Tax Club | tax |\n | Your Money | your-money |\n | **Invest** | investing |\n | Stock Market | stock-market |\n | Financial Ratios | stock-ratios |\n | Investor's Psychology | behavioral-finance |\n | Mutual Funds | mutual-fund |\n :::","location":"tag.ts"}} /> + +:::note[Category] +| Category | Link | +| --------------------- | ------------------ | +| **Business** | business | +| Big Shots | entrepreneurship | +| Startups | startups-india | +| Brand Games | success-stories | +| Juicy Scams | juicy-scams | +| **Finance** | finance | +| Macro Moves | economy | +| News Platter | market-news | +| Tax Club | tax | +| Your Money | your-money | +| **Invest** | investing | +| Stock Market | stock-market | +| Financial Ratios | stock-ratios | +| Investor's Psychology | behavioral-finance | +| Mutual Funds | mutual-fund | +::: ### Most Viewed {#finology-insider-most-viewed} -<Route author="Rjnishant530" example="/finology/most-viewed/monthly" path="/finology/most-viewed/:time" paramDesc={['Accepts : `alltime` or `monthly` only']} radar="1" /> - -### Trending Topic {#finology-insider-trending-topic} - -<Route author="Rjnishant530" example="/finology/tag/startups" path="/tag/:topic" paramDesc={['Refer Table below or find in URL']} radar="1"> - Topic - - | Topic | Link | - | ------------------------ | ------------------------ | - | Investment Decisions | investment-decisions | - | Investing 101 | investing-101 | - | Stock Markets | stock-markets | - | business news india | business-news-india | - | Company Analysis | company-analysis | - | Business and brand tales | business-and-brand-tales | - | Featured | featured | - | Fundamental Analysis | fundamental-analysis | - | Business Story | business-story | - | All Biz | all-biz | - | Stock Analysis | stock-analysis | - | Automobile Industry | automobile-industry | - | Indian Economy | indian-economy | - | Govt's Words | govt%27s-words | - | Behavioral Finance | behavioral-finance | - | Global Economy | global-economy | - | Startups | startups | - | GST | gst | - | Product Review | product-review | - | My Pocket | my-pocket | - | Business Games | business-games | - | Business Models | business-models | - | Indian Indices | indian-indices | - | Banking System | banking-system | - | Debt | debt | - | World News | world-news | - | Technology | technology | - | Regulatory Bodies | regulatory-bodies | -</Route> +<Route namespace="finology" data={{"path":"/most-viewed/:time","categories":["finance"],"example":"/finology/most-viewed/monthly","parameters":{"time":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["insider.finology.in/:category"],"target":"/:category"},"name":"Most Viewed","maintainers":["Rjnishant530"],"location":"most-viewed.ts"}} /> ## finviz {#finviz} ### News {#finviz-news} -<Route author="nczitzk" example="/finviz" path="/finviz/:category?" paramsDesc={['Category, see below, News by default']} notOperational="1"> - | News | Blog | - | ---- | ---- | - | news | blog | -</Route> +<Route namespace="finviz" data={{"path":"/:category?","categories":["finance"],"example":"/finviz","parameters":{"category":"Category, see below, News by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["finviz.com/news.ashx","finviz.com/"]},"name":"News","maintainers":["nczitzk"],"url":"finviz.com/news.ashx","description":"| News | Blog |\n | ---- | ---- |\n | news | blog |","location":"news.ts"}} /> + +| News | Blog | +| ---- | ---- | +| news | blog | ### US Stock News {#finviz-us-stock-news} -<Route author="HenryQW" example="/finviz/news/AAPL" path="/finviz/news/:ticker" paramsDesc={['The stock ticker']} /> +<Route namespace="finviz" data={{"path":"/news/:ticker","categories":["finance"],"example":"/finviz/news/AAPL","parameters":{"ticker":"The stock ticker"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"US Stock News","maintainers":["HenryQW"],"location":"quote.ts"}} /> ## Followin {#followin} ### Home {#followin-home} -<Route author="TonyRL" example="/followin" path="/followin/:categoryId?/:lang?" paramsDesc={['Category ID, see table below, `1` by default', 'Language, see table below, `en` by default']} radar="1"> - Category ID +<Route namespace="followin" data={{"path":"/:categoryId?/:lang?","categories":["finance"],"example":"/followin","parameters":{"categoryId":"Category ID, see table below, `1` by default","lang":"Language, see table below, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Home","maintainers":["TonyRL"],"description":"Category ID\n\n | For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos |\n | ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ |\n | 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 |\n\n Language\n\n | English | 简体中文 | 繁體中文 | Tiếng Việt |\n | ------- | -------- | -------- | ---------- |\n | en | zh-Hans | zh-Hant | vi |","location":"index.ts"}} /> - | For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos | - | ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ | - | 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 | +Category ID - Language +| For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos | +| ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ | +| 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 | - | English | 简体中文 | 繁體中文 | Tiếng Việt | - | ------- | -------- | -------- | ---------- | - | en | zh-Hans | zh-Hant | vi | -</Route> +Language -### News {#followin-news} - -<Route author="TonyRL" example="/followin/news" path="/followin/news/:lang?" paramsDesc={['Language, see table above, `en` by default']} radar="1" /> +| English | 简体中文 | 繁體中文 | Tiếng Việt | +| ------- | -------- | -------- | ---------- | +| en | zh-Hans | zh-Hant | vi | ### KOL {#followin-kol} -<Route author="TonyRL" example="/followin/kol/4075592991" path="/followin/kol/:kolId/:lang?" paramsDesc={['KOL ID, can be found in URL', 'Language, see table above, `en` by default']} radar="1" /> +<Route namespace="followin" data={{"path":"/kol/:kolId/:lang?","categories":["finance"],"example":"/followin/kol/4075592991","parameters":{"kolId":"KOL ID, can be found in URL","lang":"Language, see table above, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["followin.io/:lang/kol/:kolId","followin.io/kol/:kolId"]},"name":"KOL","maintainers":["TonyRL"],"location":"kol.ts"}} /> -### Topic {#followin-topic} +### News {#followin-news} -<Route author="TonyRL" example="/followin/topic/40" path="/followin/topic/:topicId/:lang?" paramsDesc={['Topic ID, can be found in URL', 'Language, see table above, `en` by default']} radar="1" /> +<Route namespace="followin" data={{"path":"/news/:lang?","categories":["finance"],"example":"/followin/news","parameters":{"lang":"Language, see table above, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["followin.io/:lang?/news","followin.io/news"]},"name":"News","maintainers":["TonyRL"],"location":"news.ts"}} /> ### Tag {#followin-tag} -<Route author="TonyRL" example="/followin/tag/177008" path="/followin/tag/:tagId/:lang?" paramsDesc={['Tag ID, can be found in URL', 'Language, see table above, `en` by default']} radar="1" notOperational="1" /> +<Route namespace="followin" data={{"path":"/tag/:tagId/:lang?","categories":["finance"],"example":"/followin/tag/177008","parameters":{"tagId":"Tag ID, can be found in URL","lang":"Language, see table above, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["followin.io/:lang/tag/:tagId","followin.io/tag/:tagId"]},"name":"Tag","maintainers":["TonyRL"],"location":"tag.ts"}} /> -## Futubull 富途牛牛 {#futubull-fu-tu-niu-niu} +### Topic {#followin-topic} -### Headlines {#futubull-fu-tu-niu-niu-headlines} - -<Route author="Wsine nczitzk" example="/futunn/main" path="/futunn/main" /> +<Route namespace="followin" data={{"path":"/topic/:topicId/:lang?","categories":["finance"],"example":"/followin/topic/40","parameters":{"topicId":"Topic ID, can be found in URL","lang":"Language, see table above, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["followin.io/:lang/topic/:topicId","followin.io/topic/:topicId"]},"name":"Topic","maintainers":["TonyRL"],"location":"topic.ts"}} /> ## FX Markets {#fx-markets} ### Channel {#fx-markets-channel} -<Route author="mikkkee" example="/fx-markets/trading" path="/fx-markets/:channel" paramsDesc={['channel, can be found in the navi bar links at the home page']}> - | Trading | Infrastructure | Tech and Data | Regulation | - | ------- | -------------- | ------------- | ---------- | - | trading | infrastructure | tech-and-data | regulation | -</Route> +<Route namespace="fx-markets" data={{"path":"/:channel","categories":["finance"],"example":"/fx-markets/trading","parameters":{"channel":"channel, can be found in the navi bar links at the home page"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Channel","maintainers":[],"description":"| Trading | Infrastructure | Tech and Data | Regulation |\n | ------- | -------------- | ------------- | ---------- |\n | trading | infrastructure | tech-and-data | regulation |","location":"channel.ts"}} /> + +| Trading | Infrastructure | Tech and Data | Regulation | +| ------- | -------------- | ------------- | ---------- | +| trading | infrastructure | tech-and-data | regulation | ## Paradigm {#paradigm} ### Writing {#paradigm-writing} -<Route author="Fatpandac" example="/paradigm/writing" path="/paradigm/writing" /> +<Route namespace="paradigm" data={{"path":"/writing","categories":["finance"],"example":"/paradigm/writing","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["paradigm.xyz/writing"]},"name":"Writing","maintainers":["Fatpandac"],"url":"paradigm.xyz/writing","location":"writing.ts"}} /> ## Seeking Alpha {#seeking-alpha} ### Summary {#seeking-alpha-summary} -<Route author="TonyRL" example="/seekingalpha/TSM/transcripts" path="/seekingalpha/:symbol/:category?" paramsDesc={['Stock symbol', 'Category, see below, `news` by default']} radar="1" notOperational="1"> - | Analysis | News | Transcripts | Press Releases | Related Analysis | - | -------- | ---- | ----------- | -------------- | ---------------- | - | analysis | news | transcripts | press-releases | related-analysis | -</Route> +<Route namespace="seekingalpha" data={{"path":"/:symbol/:category?","categories":["finance"],"example":"/seekingalpha/TSM/transcripts","parameters":{"symbol":"Stock symbol","category":"Category, see below, `news` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["seekingalpha.com/symbol/:symbol/:category","seekingalpha.com/symbol/:symbol/earnings/:category"],"target":"/:symbol/:category"},"name":"Summary","maintainers":["TonyRL"],"description":"| Analysis | News | Transcripts | Press Releases | Related Analysis |\n | -------- | ---- | ----------- | -------------- | ---------------- |\n | analysis | news | transcripts | press-releases | related-analysis |","location":"index.ts"}} /> + +| Analysis | News | Transcripts | Press Releases | Related Analysis | +| -------- | ---- | ----------- | -------------- | ---------------- | +| analysis | news | transcripts | press-releases | related-analysis | ## Stock Edge {#stock-edge} ### Daily Updates News {#stock-edge-daily-updates-news} -<Route author="Rjnishant530" example="/stockedge/daily-updates/news" path="/stockedge/daily-updates/news" radar="1" /> +<Route namespace="stockedge" data={{"path":"/daily-updates/news","categories":["finance"],"example":"/stockedge/daily-updates/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["web.stockedge.com/daily-updates/news"]},"name":"Daily Updates News","maintainers":["Rjnishant530"],"url":"web.stockedge.com/daily-updates/news","location":"daily-news.ts"}} /> ## TokenInsight {#tokeninsight} @@ -281,732 +186,646 @@ TokenInsight also provides official RSS, you can take a look at [https://api.tok ### Blogs {#tokeninsight-blogs} -<Route author="fuergaosi233" example="/tokeninsight/blog/en" path="/tokeninsight/blog/:lang?" paramsDesc={['Language, see below, Chinese by default']} /> +<Route namespace="tokeninsight" data={{"path":"/blog/:lang?","categories":["finance"],"example":"/tokeninsight/blog/en","parameters":{"lang":"Language, see below, Chinese by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tokeninsight.com/:lang/blogs"],"target":"/blog/:lang"},"name":"Blogs","maintainers":["fuergaosi233"],"location":"blog.ts"}} /> ### Latest {#tokeninsight-latest} -<Route author="fuergaosi233" example="/tokeninsight/bulletin/en" path="/tokeninsight/bulletin/:lang?" paramsDesc={['Language, see below, Chinese by default']} /> +<Route namespace="tokeninsight" data={{"path":"/bulletin/:lang?","categories":["finance"],"example":"/tokeninsight/bulletin/en","parameters":{"lang":"Language, see below, Chinese by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tokeninsight.com/:lang/latest"],"target":"/bulletin/:lang"},"name":"Latest","maintainers":[],"location":"bulletin.ts"}} /> ### Research {#tokeninsight-research} -<Route author="fuergaosi233" example="/tokeninsight/report/en" path="/tokeninsight/report/:lang?" paramsDesc={['Language, see below, Chinese by default']}> - Language: +<Route namespace="tokeninsight" data={{"path":"/report/:lang?","categories":["finance"],"example":"/tokeninsight/report/en","parameters":{"lang":"Language, see below, Chinese by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tokeninsight.com/:lang/report"],"target":"/report/:lang"},"name":"Research","maintainers":[],"description":"Language:\n\n | Chinese | English |\n | ------- | ------- |\n | zh | en |","location":"report.ts"}} /> - | Chinese | English | - | ------- | ------- | - | zh | en | -</Route> +Language: + +| Chinese | English | +| ------- | ------- | +| zh | en | ## Unusual Whales {#unusual-whales} ### News Flow {#unusual-whales-news-flow} -<Route author="TonyRL" example="/unusualwhales/news" path="/unusualwhales/news" radar="1" /> - -## WEEX 华尔街见闻旗下全球投资线上品牌 {#weex-hua-er-jie-jian-wen-qi-xia-quan-qiu-tou-zi-xian-shang-pin-pai} - -### 资讯 {#weex-hua-er-jie-jian-wen-qi-xia-quan-qiu-tou-zi-xian-shang-pin-pai-zi-xun} - -<Route author="SChen1024" example="/weexcn/news/1" path="/weexcn/news/:typeid" paramsDesc={['栏目代码, 按照表列出']} /> - -| 最新文章 | 市场要闻 | 交易策略 | 机构观点 | 投资学堂 | 行业观察 | 基金理财 | 分析师投稿 | -| -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | +<Route namespace="unusualwhales" data={{"path":"/news","categories":["finance"],"example":"/unusualwhales/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["unusualwhales.com/news","unusualwhales.com/"]},"name":"News Flow","maintainers":["TonyRL"],"url":"unusualwhales.com/news","location":"news.ts"}} /> ## 巴伦周刊中文版 {#ba-lun-zhou-kan-zhong-wen-ban} ### 栏目 {#ba-lun-zhou-kan-zhong-wen-ban-lan-mu} -<Route author="nczitzk" example="/barronschina" path="/barronschina/:id?" paramsDesc={['栏目 id,默认为快讯']}> - :::tip - 栏目 id 留空则返回快讯,在对应页地址栏 `columnId=` 后可以看到。 - ::: -</Route> +<Route namespace="barronschina" data={{"path":"/:id?","categories":["finance"],"example":"/barronschina","parameters":{"id":"栏目 id,默认为快讯"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["barronschina.com.cn/"],"target":"/:category?"},"name":"栏目","maintainers":["nczitzk"],"url":"barronschina.com.cn/","description":":::tip\n 栏目 id 留空则返回快讯,在对应页地址栏 `columnId=` 后可以看到。\n :::","location":"index.ts"}} /> -## 百度股市通 {#bai-du-gu-shi-tong} +:::tip +栏目 id 留空则返回快讯,在对应页地址栏 `columnId=` 后可以看到。 +::: -### 首页指数 {#bai-du-gu-shi-tong-shou-ye-zhi-shu} +## 百度 {#bai-du} -<Route author="CaoMeiYouRen" example="/baidu/gushitong/index" path="/baidu/gushitong/index" /> +### 首页指数 {#bai-du-shou-ye-zhi-shu} + +<Route namespace="baidu" data={{"path":"/gushitong/index","categories":["finance"],"example":"/baidu/gushitong/index","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gushitong.baidu.com/"]},"name":"首页指数","maintainers":["CaoMeiYouRen"],"url":"gushitong.baidu.com/","location":"gushitong/index.ts"}} /> ## 北京证券交易所 {#bei-jing-zheng-quan-jiao-yi-suo} ### 栏目 {#bei-jing-zheng-quan-jiao-yi-suo-lan-mu} -<Route author="nczitzk" example="/bse" path="/bse/:category?/:keyword?" paramsDesc={['分类,见下表,默认为本所要闻', '关键字,默认为空']}> - | 本所要闻 | 人才招聘 | 采购信息 | 业务通知 | - | --------------- | -------- | -------- | ---------- | - | important\_news | recruit | purchase | news\_list | +<Route namespace="bse" data={{"path":"/:category?/:keyword?","categories":["finance"],"example":"/bse","parameters":{"category":"分类,见下表,默认为本所要闻","keyword":"关键字,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bse.cn/"]},"name":"栏目","maintainers":["nczitzk"],"url":"bse.cn/","description":"| 本所要闻 | 人才招聘 | 采购信息 | 业务通知 |\n | --------------- | -------- | -------- | ---------- |\n | important_news | recruit | purchase | news_list |\n\n | 法律法规 | 公开征求意见 | 部门规章 | 发行融资 |\n | --------- | --------------- | ---------------- | ---------- |\n | law_list | public_opinion | regulation_list | fxrz_list |\n\n | 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 |\n | ---------- | ---------- | ---------- | --------------- |\n | cxjg_list | jygl_list | scgl_list | meeting_notice |\n\n | 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 |\n | ------------------ | ------------------ | ------------------ |\n | meeting_result | meeting_change | bgcz_notice |\n\n | 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 |\n | ---------------------- | ---------------------- | ------------------ | ------------- |\n | bgcz_result | bgcz_change | termination_audit | audit_result |","location":"index.ts"}} /> - | 法律法规 | 公开征求意见 | 部门规章 | 发行融资 | - | --------- | --------------- | ---------------- | ---------- | - | law\_list | public\_opinion | regulation\_list | fxrz\_list | +| 本所要闻 | 人才招聘 | 采购信息 | 业务通知 | +| --------------- | -------- | -------- | ---------- | +| important\_news | recruit | purchase | news\_list | - | 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 | - | ---------- | ---------- | ---------- | --------------- | - | cxjg\_list | jygl\_list | scgl\_list | meeting\_notice | +| 法律法规 | 公开征求意见 | 部门规章 | 发行融资 | +| --------- | --------------- | ---------------- | ---------- | +| law\_list | public\_opinion | regulation\_list | fxrz\_list | - | 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 | - | ------------------ | ------------------ | ------------------ | - | meeting\_result | meeting\_change | bgcz\_notice | +| 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 | +| ---------- | ---------- | ---------- | --------------- | +| cxjg\_list | jygl\_list | scgl\_list | meeting\_notice | - | 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 | - | ---------------------- | ---------------------- | ------------------ | ------------- | - | bgcz\_result | bgcz\_change | termination\_audit | audit\_result | -</Route> +| 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 | +| ------------------ | ------------------ | ------------------ | +| meeting\_result | meeting\_change | bgcz\_notice | + +| 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 | +| ---------------------- | ---------------------- | ------------------ | ------------- | +| bgcz\_result | bgcz\_change | termination\_audit | audit\_result | ## 财经网 {#cai-jing-wang} ### 滚动新闻 {#cai-jing-wang-gun-dong-xin-wen} -<Route author="TonyRL" example="/caijing/roll" path="/caijing/roll" rardr="1" /> +<Route namespace="caijing" data={{"path":"/roll","categories":["finance"],"example":"/caijing/roll","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["roll.caijing.com.cn/index1.html","roll.caijing.com.cn/"]},"name":"滚动新闻","maintainers":["TonyRL"],"url":"roll.caijing.com.cn/index1.html","location":"roll.ts"}} /> ## 财联社 {#cai-lian-she} ### 电报 {#cai-lian-she-dian-bao} -<Route author="nczitzk" example="/cls/telegraph" path="/cls/telegraph/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1"> - | 看盘 | 公司 | 解读 | 加红 | 推送 | 提醒 | 基金 | 港股 | - | ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- | - | watch | announcement | explain | red | jpush | remind | fund | hk | -</Route> +<Route namespace="cls" data={{"path":"/telegraph/:category?","categories":["finance"],"example":"/cls/telegraph","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cls.cn/telegraph","cls.cn/"],"target":"/telegraph"},"name":"电报","maintainers":["nczitzk"],"url":"cls.cn/telegraph","description":"| 看盘 | 公司 | 解读 | 加红 | 推送 | 提醒 | 基金 | 港股 |\n | ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- |\n | watch | announcement | explain | red | jpush | remind | fund | hk |","location":"telegraph.ts"}} /> -### 深度 {#cai-lian-she-shen-du} - -<Route author="nczitzk" example="/cls/depth/1000" path="/cls/depth/:category?" paramsDesc={['分类代码,可在首页导航栏的目标网址 URL 中找到']} radar="1"> - | 头条 | 股市 | 港股 | 环球 | 公司 | 券商 | 基金 | 地产 | 金融 | 汽车 | 科创 | 创业版 | 品见 | 期货 | 投教 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | - | 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 | -</Route> +| 看盘 | 公司 | 解读 | 加红 | 推送 | 提醒 | 基金 | 港股 | +| ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- | +| watch | announcement | explain | red | jpush | remind | fund | hk | ### 热门文章排行榜 {#cai-lian-she-re-men-wen-zhang-pai-hang-bang} -<Route author="5upernova-heng nczitzk" example="/cls/hot" path="/cls/hot" radar="1" anticrawler="1" /> +<Route namespace="cls" data={{"path":"/hot","categories":["finance"],"example":"/cls/hot","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cls.cn/"]},"name":"热门文章排行榜","maintainers":["5upernova-heng","nczitzk"],"url":"cls.cn/","location":"hot.ts"}} /> -## 第一财经杂志 {#di-yi-cai-jing-za-zhi} +### 深度 {#cai-lian-she-shen-du} -### 首页 {#di-yi-cai-jing-za-zhi-shou-ye} +<Route namespace="cls" data={{"path":"/depth/:category?","categories":["finance"],"example":"/cls/depth/1000","parameters":{"category":"分类代码,可在首页导航栏的目标网址 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"深度","maintainers":["nczitzk"],"description":"| 头条 | 股市 | 港股 | 环球 | 公司 | 券商 | 基金 | 地产 | 金融 | 汽车 | 科创 | 创业版 | 品见 | 期货 | 投教 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- |\n | 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 |","location":"depth.ts"}} /> -<Route author="nczitzk" example="/cbnweek" path="/cbnweek" /> +| 头条 | 股市 | 港股 | 环球 | 公司 | 券商 | 基金 | 地产 | 金融 | 汽车 | 科创 | 创业版 | 品见 | 期货 | 投教 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | +| 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 | ## 东方财富 {#dong-fang-cai-fu} -### 天天基金用户动态 {#dong-fang-cai-fu-tian-tian-ji-jin-yong-hu-dong-tai} - -<Route author="zidekuls" example="/eastmoney/ttjj/user/6551094298949188" path="/eastmoney/ttjj/user/:uid" paramsDesc={['用户id, 可以通过天天基金App分享用户主页到浏览器,在相应的URL中找到']} /> - ### 搜索 {#dong-fang-cai-fu-sou-suo} -<Route author="drgnchan" example="/eastmoney/search/web3" path="/eastmoney/search/:keyword" paramsDesc={['关键词,可以设置为自己需要检索的关键词']} radar="1" /> +<Route namespace="eastmoney" data={{"path":"/search/:keyword","categories":["finance"],"example":"/eastmoney/search/web3","parameters":{"keyword":"关键词,可以设置为自己需要检索的关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"搜索","maintainers":["drgnchan"],"location":"search/index.ts"}} /> + +### 天天基金用户动态 {#dong-fang-cai-fu-tian-tian-ji-jin-yong-hu-dong-tai} + +<Route namespace="eastmoney" data={{"path":"/ttjj/user/:uid","categories":["finance"],"example":"/eastmoney/ttjj/user/6551094298949188","parameters":{"uid":"用户id, 可以通过天天基金App分享用户主页到浏览器,在相应的URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"天天基金用户动态","maintainers":["zidekuls"],"location":"ttjj/user.ts"}} /> ### 研究报告 {#dong-fang-cai-fu-yan-jiu-bao-gao} -<Route author="syzq" example="/eastmoney/report/strategyreport" path="/eastmoney/report/:category" paramsDesc={['研报类型']}> - | 策略报告 | 宏观研究 | 券商晨报 | 行业研究 | - | -------------- | ----------- | ------------ | -------- | - | strategyreport | macresearch | brokerreport | industry | -</Route> +<Route namespace="eastmoney" data={{"path":"/report/:category","categories":["finance"],"example":"/eastmoney/report/strategyreport","parameters":{"category":"研报类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["data.eastmoney.com/report/:category"]},"name":"研究报告","maintainers":["syzq"],"description":"| 策略报告 | 宏观研究 | 券商晨报 | 行业研究 |\n | -------------- | ----------- | ------------ | -------- |\n | strategyreport | macresearch | brokerreport | industry |","location":"report/index.ts"}} /> + +| 策略报告 | 宏观研究 | 券商晨报 | 行业研究 | +| -------------- | ----------- | ------------ | -------- | +| strategyreport | macresearch | brokerreport | industry | ## 法布财经 {#fa-bu-cai-jing} -### 新闻 {#fa-bu-cai-jing-xin-wen} - -<Route author="nczitzk" example="/fastbull/news" path="/fastbull/news" /> - ### 快讯 {#fa-bu-cai-jing-kuai-xun} -<Route author="nczitzk" example="/fastbull/express-news" path="/fastbull/express-news" /> +<Route namespace="fastbull" data={{"path":"/express-news","categories":["finance"],"example":"/fastbull/express-news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fastbull.cn/express-news","fastbull.cn/"]},"name":"快讯","maintainers":["nczitzk"],"url":"fastbull.cn/express-news","location":"express-news.ts"}} /> + +### 新闻 {#fa-bu-cai-jing-xin-wen} + +<Route namespace="fastbull" data={{"path":["/news","/"],"categories":["finance"],"example":"/fastbull/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fastbull.cn/news","fastbull.cn/"]},"name":"新闻","maintainers":["nczitzk"],"url":"fastbull.cn/news","location":"news.ts"}} /> + +### 新闻 {#fa-bu-cai-jing-xin-wen} + +<Route namespace="fastbull" data={{"path":["/news","/"],"categories":["finance"],"example":"/fastbull/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fastbull.cn/news","fastbull.cn/"]},"name":"新闻","maintainers":["nczitzk"],"url":"fastbull.cn/news","location":"news.ts"}} /> ## 格隆汇 {#ge-long-hui} +### 实时快讯 {#ge-long-hui-shi-shi-kuai-xun} + +<Route namespace="gelonghui" data={{"path":"/live","categories":["finance"],"example":"/gelonghui/live","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gelonghui.com/live","gelonghui.com/"]},"name":"实时快讯","maintainers":[],"url":"gelonghui.com/live","location":"live.ts"}} /> + ### 首页 {#ge-long-hui-shou-ye} -<Route author="TonyRL" example="/gelonghui/home" path="/gelonghui/home/:tag?" paramsDesc={['分类标签,见下表,默认为 `web_home_page`']} radar="1"> - | 推荐 | 股票 | 基金 | 新股 | 研报 | - | --------------- | ----- | ---- | ---------- | -------- | - | web\_home\_page | stock | fund | new\_stock | research | -</Route> +<Route namespace="gelonghui" data={{"path":"/home/:tag?","categories":["finance"],"example":"/gelonghui/home","parameters":{"tag":"分类标签,见下表,默认为 `web_home_page`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["TonyRL"],"description":"| 推荐 | 股票 | 基金 | 新股 | 研报 |\n | --------------- | ----- | ---- | ---------- | -------- |\n | web_home_page | stock | fund | new_stock | research |","location":"home.ts"}} /> -### 用户文章 {#ge-long-hui-yong-hu-wen-zhang} - -<Route author="nczitzk" example="/gelonghui/user/5273" path="/gelonghui/user/:id" paramsDesc={['用户编号,可在用户页 URL 中找到']} radar="1" /> - -### 主题文章 {#ge-long-hui-zhu-ti-wen-zhang} - -<Route author="nczitzk" example="/gelonghui/subject/4" path="/gelonghui/subject/:id" paramsDesc={['主题编号,可在主题页 URL 中找到']} radar="1" /> +| 推荐 | 股票 | 基金 | 新股 | 研报 | +| --------------- | ----- | ---- | ---------- | -------- | +| web\_home\_page | stock | fund | new\_stock | research | ### 搜索关键字 {#ge-long-hui-sou-suo-guan-jian-zi} -<Route author="nczitzk" example="/gelonghui/keyword/早报" path="/gelonghui/keyword/:keyword" paramsDesc={['搜索关键字']} radar="1" /> +<Route namespace="gelonghui" data={{"path":"/keyword/:keyword","categories":["finance"],"example":"/gelonghui/keyword/早报","parameters":{"keyword":"搜索关键字"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"搜索关键字","maintainers":["nczitzk"],"location":"keyword.ts"}} /> + +### 用户文章 {#ge-long-hui-yong-hu-wen-zhang} + +<Route namespace="gelonghui" data={{"path":"/user/:id","categories":["finance"],"example":"/gelonghui/user/5273","parameters":{"id":"用户编号,可在用户页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gelonghui.com/user/:id"]},"name":"用户文章","maintainers":["nczitzk"],"location":"user.ts"}} /> + +### 主题文章 {#ge-long-hui-zhu-ti-wen-zhang} + +<Route namespace="gelonghui" data={{"path":"/subject/:id","categories":["finance"],"example":"/gelonghui/subject/4","parameters":{"id":"主题编号,可在主题页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gelonghui.com/subject/:id"]},"name":"主题文章","maintainers":["nczitzk"],"location":"subject.ts"}} /> ### 最热文章 {#ge-long-hui-zui-re-wen-zhang} -<Route author="TonyRL" example="/gelonghui/hot-article" path="/gelonghui/hot-article/:type?" paramsDesc={['`day` 为日排行,`week` 为周排行,默认为 `day`']} radar="1" /> - -### 实时快讯 {#ge-long-hui-shi-shi-kuai-xun} - -<Route author="TonyRL" example="/gelonghui/live" path="/gelonghui/live" radar="1" /> +<Route namespace="gelonghui" data={{"path":"/hot-article/:type?","categories":["finance"],"example":"/gelonghui/hot-article","parameters":{"type":"`day` 为日排行,`week` 为周排行,默认为 `day`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gelonghui.com/"],"target":"/hot-article"},"name":"最热文章","maintainers":[],"url":"gelonghui.com/","location":"hot-article.ts"}} /> ## 国家金融与发展实验室 {#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi} ### 研究 {#guo-jia-jin-rong-yu-fa-zhan-shi-yan-shi-yan-jiu} -<Route author="Fatpandac" example="/nifd/research/3333d2af-91d6-429b-be83-28b92f31b6d7" path="/nifd/research/:categoryGuid?" paramsDesc={['资讯类型,默认为周报']}> - 资讯类型可以从网址中获取,如: +<Route namespace="nifd" data={{"path":"/research/:categoryGuid?","categories":["finance"],"example":"/nifd/research/3333d2af-91d6-429b-be83-28b92f31b6d7","parameters":{"categoryGuid":"资讯类型,默认为周报"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究","maintainers":["Fatpandac"],"description":"资讯类型可以从网址中获取,如:\n\n `http://www.nifd.cn/Research?categoryGuid=7a6a826d-b525-42aa-b550-4236e524227f` 对应 `/nifd/research/7a6a826d-b525-42aa-b550-4236e524227f`","location":"research.ts"}} /> - `http://www.nifd.cn/Research?categoryGuid=7a6a826d-b525-42aa-b550-4236e524227f` 对应 `/nifd/research/7a6a826d-b525-42aa-b550-4236e524227f` -</Route> +资讯类型可以从网址中获取,如: + +`http://www.nifd.cn/Research?categoryGuid=7a6a826d-b525-42aa-b550-4236e524227f` 对应 `/nifd/research/7a6a826d-b525-42aa-b550-4236e524227f` ## 华储网 {#hua-chu-wang} ### 通知 {#hua-chu-wang-tong-zhi} -<Route author="TonyRL" example="/mrm" path="/mrm/:category?" paramDesc={['分类,见下表,默认为 `zonghezixun3`']} radar="1"> - | 交易通知 | 政策规定 | 业务通知 | - | ------------ | -------------------- | ----------------- | - | zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list | -</Route> +<Route namespace="mrm" data={{"path":"/:category?","categories":["finance"],"example":"/mrm","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通知","maintainers":["TonyRL"],"description":"| 交易通知 | 政策规定 | 业务通知 |\n | ------------ | -------------------- | ----------------- |\n | zonghezixun3 | zhengceguiding_list | yewutongzhi_list |","location":"index.ts"}} /> + +| 交易通知 | 政策规定 | 业务通知 | +| ------------ | -------------------- | ----------------- | +| zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list | ## 汇通网 {#hui-tong-wang} ### 7x24 小时快讯 {#hui-tong-wang-7x24-xiao-shi-kuai-xun} -<Route author="occupy5 dousha" example="/fx678/kx" path="/fx678/kx" radar="1" /> +<Route namespace="fx678" data={{"path":"/kx","categories":["finance"],"example":"/fx678/kx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fx678.com/kx"]},"name":"7x24 小时快讯","maintainers":["occupy5","dousha"],"url":"fx678.com/kx","location":"kx.ts"}} /> ## 金色财经 {#jin-se-cai-jing} -### 首页 {#jin-se-cai-jing-shou-ye} +### 分类 {#jin-se-cai-jing-fen-lei} -<Route author="nczitzk" example="/jinse/timeline" path="/jinse/timeline/:category?" paramsDesc={['分类,见下表,默认为头条']} radar="1"> - | 头条 | 独家 | 铭文 | 产业 | 项目 | - | ------ | ---- | ------- | ---------- | ---- | - | 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi | - | Layer2 | NFT | DAO | 百科 | | -</Route> +<Route namespace="jinse" data={{"path":"/:category?","categories":["finance"],"example":"/jinse/zhengce","parameters":{"category":"分类,见下表,默认为政策"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 政策 | 行情 | DeFi | 矿业 | 以太坊 2.0 |\n | ------- | ------------ | ---- | ----- | ---------- |\n | zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 |\n\n | 产业 | IPFS | 技术 | 百科 | 研报 |\n | -------- | ---- | ---- | ----- | ------------- |\n | industry | IPFS | tech | baike | capitalmarket |","location":"catalogue.ts"}} /> + +| 政策 | 行情 | DeFi | 矿业 | 以太坊 2.0 | +| ------- | ------------ | ---- | ----- | ---------- | +| zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 | + +| 产业 | IPFS | 技术 | 百科 | 研报 | +| -------- | ---- | ---- | ----- | ------------- | +| industry | IPFS | tech | baike | capitalmarket | ### 快讯 {#jin-se-cai-jing-kuai-xun} -<Route author="nczitzk" example="/jinse/lives" path="/jinse/lives/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1"> - | 全部 | 精选 | 政策 | 数据 | NFT | 项目 | - | ---- | ---- | ---- | ---- | --- | ---- | - | 0 | 1 | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="jinse" data={{"path":"/lives/:category?","categories":["finance"],"example":"/jinse/lives","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"快讯","maintainers":["nczitzk"],"description":"| 全部 | 精选 | 政策 | 数据 | NFT | 项目 |\n | ---- | ---- | ---- | ---- | --- | ---- |\n | 0 | 1 | 2 | 3 | 4 | 5 |","location":"lives.ts"}} /> -### 分类 {#jin-se-cai-jing-fen-lei} +| 全部 | 精选 | 政策 | 数据 | NFT | 项目 | +| ---- | ---- | ---- | ---- | --- | ---- | +| 0 | 1 | 2 | 3 | 4 | 5 | -<Route author="nczitzk" example="/jinse/zhengce" path="/jinse/:category?" paramsDesc={['分类,见下表,默认为政策']}> - | 政策 | 行情 | DeFi | 矿业 | 以太坊 2.0 | - | ------- | ------------ | ---- | ----- | ---------- | - | zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 | +### 首页 {#jin-se-cai-jing-shou-ye} - | 产业 | IPFS | 技术 | 百科 | 研报 | - | -------- | ---- | ---- | ----- | ------------- | - | industry | IPFS | tech | baike | capitalmarket | -</Route> +<Route namespace="jinse" data={{"path":"/timeline/:category?","categories":["finance"],"example":"/jinse/timeline","parameters":{"category":"分类,见下表,默认为头条"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["nczitzk"],"description":"| 头条 | 独家 | 铭文 | 产业 | 项目 |\n | ------ | ---- | ------- | ---------- | ---- |\n | 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi |\n | Layer2 | NFT | DAO | 百科 | |","location":"timeline.ts"}} /> + +| 头条 | 独家 | 铭文 | 产业 | 项目 | +| ------ | ---- | ------- | ---------- | ---- | +| 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi | +| Layer2 | NFT | DAO | 百科 | | ## 金十数据 {#jin-shi-shu-ju} ### 市场快讯 {#jin-shi-shu-ju-shi-chang-kuai-xun} -<Route author="laampui" example="/jin10" path="/jin10/:important?" paramsDesc={['只看重要,任意值开启,留空关闭']} radar="1" /> +<Route namespace="jin10" data={{"path":"/:important?","categories":["finance"],"example":"/jin10","parameters":{"important":"只看重要,任意值开启,留空关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jin10.com/"],"target":""},"name":"市场快讯","maintainers":["laampui"],"url":"jin10.com/","location":"index.ts"}} /> ### 主题文章 {#jin-shi-shu-ju-zhu-ti-wen-zhang} -<Route author="miles170" example="/jin10/topic/396" path="/jin10/topic/:id" radar="1" /> +<Route namespace="jin10" data={{"path":"/topic/:id","categories":["finance"],"example":"/jin10/topic/396","parameters":{"id":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xnews.jin10.com/topic/:id"]},"name":"主题文章","maintainers":["miles170"],"url":"jin10.com/","location":"topic.ts"}} /> ## 老虎社区 {#lao-hu-she-qu} ### 个人主页 {#lao-hu-she-qu-ge-ren-zhu-ye} -<Route author="Fatpandac" example="/laohu8/personal/3527667596890271" path="/laohu8/personal/:id" paramsDesc={['用户 ID,见网址链接']} radar="1" /> +<Route namespace="laohu8" data={{"path":"/personal/:id","categories":["finance"],"example":"/laohu8/personal/3527667596890271","parameters":{"id":"用户 ID,见网址链接"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["laohu8.com/personal/:id"]},"name":"个人主页","maintainers":["Fatpandac"],"location":"personal.ts"}} /> ## 律动 {#lv-dong} ### 新闻快讯 {#lv-dong-xin-wen-kuai-xun} -<Route author="Fatpandac jameshih" example="/theblockbeats/newsflash" path="/theblockbeats/:channel?" paramsDesc={['类型,见下表,默认为快讯']}> - | 快讯 | 文章 | - | :-------: | :-----: | - | newsflash | article | -</Route> +<Route namespace="theblockbeats" data={{"path":"/:channel?","categories":["finance"],"example":"/theblockbeats/newsflash","parameters":{"channel":"类型,见下表,默认为快讯"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻快讯","maintainers":["Fatpandac","jameshih"],"description":"| 快讯 | 文章 |\n | :-------: | :-----: |\n | newsflash | article |","location":"index.ts"}} /> + +| 快讯 | 文章 | +| :-------: | :-----: | +| newsflash | article | ## 麦肯锡 {#mai-ken-xi} ### 洞见 {#mai-ken-xi-dong-jian} -<Route author="laampui" example="/mckinsey/cn" path="/mckinsey/cn/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1"> - | 分类 | 分类名 | - | ---- | ------------------ | - | 25 | 全部洞见 | - | 2 | 汽车 | - | 3 | 金融服务 | - | 4 | 消费者 | - | 5 | 医药 | - | 7 | 数字化 | - | 8 | 制造业 | - | 9 | 私募 | - | 10 | 技术,媒体与通信 | - | 12 | 城市化与可持续发展 | - | 13 | 创新 | - | 16 | 人才与领导力 | - | 18 | 宏观经济 | - | 19 | 麦肯锡全球研究院 | - | 37 | 麦肯锡季刊 | - | 41 | 资本项目和基础设施 | - | 42 | 旅游、运输和物流 | - | 45 | 全球基础材料 | -</Route> +<Route namespace="mckinsey" data={{"path":"/cn/:category?","categories":["finance"],"example":"/mckinsey/cn","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"洞见","maintainers":["laampui"],"description":"| 分类 | 分类名 |\n | ---- | ------------------ |\n | 25 | 全部洞见 |\n | 2 | 汽车 |\n | 3 | 金融服务 |\n | 4 | 消费者 |\n | 5 | 医药 |\n | 7 | 数字化 |\n | 8 | 制造业 |\n | 9 | 私募 |\n | 10 | 技术,媒体与通信 |\n | 12 | 城市化与可持续发展 |\n | 13 | 创新 |\n | 16 | 人才与领导力 |\n | 18 | 宏观经济 |\n | 19 | 麦肯锡全球研究院 |\n | 37 | 麦肯锡季刊 |\n | 41 | 资本项目和基础设施 |\n | 42 | 旅游、运输和物流 |\n | 45 | 全球基础材料 |","location":"cn/index.ts"}} /> + +| 分类 | 分类名 | +| ---- | ------------------ | +| 25 | 全部洞见 | +| 2 | 汽车 | +| 3 | 金融服务 | +| 4 | 消费者 | +| 5 | 医药 | +| 7 | 数字化 | +| 8 | 制造业 | +| 9 | 私募 | +| 10 | 技术,媒体与通信 | +| 12 | 城市化与可持续发展 | +| 13 | 创新 | +| 16 | 人才与领导力 | +| 18 | 宏观经济 | +| 19 | 麦肯锡全球研究院 | +| 37 | 麦肯锡季刊 | +| 41 | 资本项目和基础设施 | +| 42 | 旅游、运输和物流 | +| 45 | 全球基础材料 | ## 每经网 {#mei-jing-wang} ### 分类 {#mei-jing-wang-fen-lei} -<Route author="nczitzk" example="/nbd" path="/nbd/:id?" paramsDesc={['分类 id,见下表,默认为要闻']}> - | 头条 | 要闻 | 图片新闻 | 推荐 | - | ---- | ---- | -------- | ---- | - | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="nbd" data={{"path":"/:id?","categories":["finance"],"example":"/nbd","parameters":{"id":"分类 id,见下表,默认为要闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nbd.com.cn/","nbd.com.cn/columns/:id?"]},"name":"分类","maintainers":["nczitzk"],"url":"nbd.com.cn/","description":"| 头条 | 要闻 | 图片新闻 | 推荐 |\n | ---- | ---- | -------- | ---- |\n | 2 | 3 | 4 | 5 |","location":"index.ts"}} /> + +| 头条 | 要闻 | 图片新闻 | 推荐 | +| ---- | ---- | -------- | ---- | +| 2 | 3 | 4 | 5 | ### 重磅原创 {#mei-jing-wang-zhong-bang-yuan-chuang} -<Route author="yuuow" example="/nbd/daily" path="/nbd/daily" /> +<Route namespace="nbd" data={{"path":"/daily","categories":["finance"],"example":"/nbd/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nbd.com.cn/","nbd.com.cn/columns/332"]},"name":"重磅原创","maintainers":["yuuow"],"url":"nbd.com.cn/","location":"daily.ts"}} /> ## 前瞻网 {#qian-zhan-wang} -### 文章列表 {#qian-zhan-wang-wen-zhang-lie-biao} - -<Route author="moke8" example="/qianzhan/analyst/column/all" path="/qianzhan/analyst/column/:type?" paramsDesc={['分类,见下表']}> - | 全部 | 研究员专栏 | 规划师专栏 | 观察家专栏 | - | ---- | ---------- | ---------- | ---------- | - | all | 220 | 627 | 329 | -</Route> - ### 排行榜 {#qian-zhan-wang-pai-hang-bang} -<Route author="moke8" example="/qianzhan/analyst/rank/week" path="/qianzhan/analyst/rank/:type?" paramsDesc={['分类,见下表']}> - | 周排行 | 月排行 | - | ------ | ------ | - | week | month | -</Route> +<Route namespace="qianzhan" data={{"path":"/analyst/rank/:type?","categories":["finance"],"example":"/qianzhan/analyst/rank/week","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qianzhan.com/analyst","qianzhan.com/"],"target":"/analyst/rank"},"name":"排行榜","maintainers":["moke8"],"url":"qianzhan.com/analyst","description":"| 周排行 | 月排行 |\n | ------ | ------ |\n | week | month |","location":"rank.ts"}} /> + +| 周排行 | 月排行 | +| ------ | ------ | +| week | month | + +### 文章列表 {#qian-zhan-wang-wen-zhang-lie-biao} + +<Route namespace="qianzhan" data={{"path":"/analyst/column/:type?","categories":["finance"],"example":"/qianzhan/analyst/column/all","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章列表","maintainers":["moke8"],"description":"| 全部 | 研究员专栏 | 规划师专栏 | 观察家专栏 |\n | ---- | ---------- | ---------- | ---------- |\n | all | 220 | 627 | 329 |","location":"column.ts"}} /> + +| 全部 | 研究员专栏 | 规划师专栏 | 观察家专栏 | +| ---- | ---------- | ---------- | ---------- | +| all | 220 | 627 | 329 | ## 上海证券交易所 {#shang-hai-zheng-quan-jiao-yi-suo} ### 本所业务指南与流程 {#shang-hai-zheng-quan-jiao-yi-suo-ben-suo-ye-wu-zhi-nan-yu-liu-cheng} -<Route author="nczitzk" example="/sse/lawandrules" path="/sse/lawandrules/:slug?" paramsDesc={['见下文,默认为 `latest`']} radar="1" notOperational="1"> - 将目标栏目的网址拆解为 `https://www.sse.com.cn/lawandrules/guide/` 和后面的字段,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug +<Route namespace="sse" data={{"path":"/lawandrules/:slug?","categories":["finance"],"example":"/sse/lawandrules","parameters":{"slug":"见下文,默认为 `latest`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"本所业务指南与流程","maintainers":["nczitzk"],"description":"将目标栏目的网址拆解为 `https://www.sse.com.cn/lawandrules/guide/` 和后面的字段,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug\n\n 如:(最新指南与流程)`https://www.sse.com.cn/lawandrules/guide/latest` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `latest`,则对应的 slug 为 `latest`,对应的路由即为 `/sse/lawandrules/latest`\n\n 又如:(主板业务指南与流程 - 发行承销业务指南)`https://www.sse.com.cn/lawandrules/guide/zbywznylc/fxcxywzn` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `zbywznylc/fxcxywzn`,则对应的 slug 为 `zbywznylc-fxcxywzn`,对应的路由即为 `/sse/lawandrules/zbywznylc-fxcxywzn`","location":"lawandrules.ts"}} /> - 如:(最新指南与流程)`https://www.sse.com.cn/lawandrules/guide/latest` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `latest`,则对应的 slug 为 `latest`,对应的路由即为 `/sse/lawandrules/latest` +将目标栏目的网址拆解为 `https://www.sse.com.cn/lawandrules/guide/` 和后面的字段,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug - 又如:(主板业务指南与流程 - 发行承销业务指南)`https://www.sse.com.cn/lawandrules/guide/zbywznylc/fxcxywzn` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `zbywznylc/fxcxywzn`,则对应的 slug 为 `zbywznylc-fxcxywzn`,对应的路由即为 `/sse/lawandrules/zbywznylc-fxcxywzn` -</Route> +如:(最新指南与流程)`https://www.sse.com.cn/lawandrules/guide/latest` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `latest`,则对应的 slug 为 `latest`,对应的路由即为 `/sse/lawandrules/latest` -### 上市公司信息最新公告披露 {#shang-hai-zheng-quan-jiao-yi-suo-shang-shi-gong-si-xin-xi-zui-xin-gong-gao-pi-lu} - -<Route author="harveyqiu" example="/sse/disclosure/beginDate=2018-08-18&endDate=2020-08-25&productId=600696" path="/sse/disclosure/:query?" paramsDesc={['筛选条件,见示例']} radar="1" /> - -### 可转换公司债券公告 {#shang-hai-zheng-quan-jiao-yi-suo-ke-zhuan-huan-gong-si-zhai-quan-gong-gao} - -<Route author="kt286" example="/sse/convert/beginDate=2018-08-18&endDate=2019-08-18&companyCode=603283&title=股份" path="/sse/convert/:query?" paramsDesc={['筛选条件,见示例']} radar="1" /> - -### 科创板项目动态 {#shang-hai-zheng-quan-jiao-yi-suo-ke-chuang-ban-xiang-mu-dong-tai} - -<Route author="Jeason0228" example="/sse/renewal" path="/sse/renewal" radar="1" /> +又如:(主板业务指南与流程 - 发行承销业务指南)`https://www.sse.com.cn/lawandrules/guide/zbywznylc/fxcxywzn` 的网址在 `https://www.sse.com.cn/lawandrules/guide/` 后的字段是 `zbywznylc/fxcxywzn`,则对应的 slug 为 `zbywznylc-fxcxywzn`,对应的路由即为 `/sse/lawandrules/zbywznylc-fxcxywzn` ### 监管问询 {#shang-hai-zheng-quan-jiao-yi-suo-jian-guan-wen-xun} -<Route author="Jeason0228" example="/sse/inquire" path="/sse/inquire" radar="1" /> +<Route namespace="sse" data={{"path":"/inquire","categories":["finance"],"example":"/sse/inquire","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.sse.com.cn/disclosure/credibility/supervision/inquiries","www.sse.com.cn/"]},"name":"监管问询","maintainers":["Jeason0228"],"url":"www.sse.com.cn/disclosure/credibility/supervision/inquiries","location":"inquire.ts"}} /> + +### 科创板项目动态 {#shang-hai-zheng-quan-jiao-yi-suo-ke-chuang-ban-xiang-mu-dong-tai} + +<Route namespace="sse" data={{"path":"/renewal","categories":["finance"],"example":"/sse/renewal","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kcb.sse.com.cn/home","kcb.sse.com.cn/"]},"name":"科创板项目动态","maintainers":["Jeason0228"],"url":"kcb.sse.com.cn/home","location":"renewal.ts"}} /> + +### 可转换公司债券公告 {#shang-hai-zheng-quan-jiao-yi-suo-ke-zhuan-huan-gong-si-zhai-quan-gong-gao} + +<Route namespace="sse" data={{"path":"/convert/:query?","categories":["finance"],"example":"/sse/convert/beginDate=2018-08-18&endDate=2019-08-18&companyCode=603283&title=股份","parameters":{"query":"筛选条件,见示例"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"可转换公司债券公告","maintainers":["kt286"],"location":"convert.ts"}} /> + +### 上市公司信息最新公告披露 {#shang-hai-zheng-quan-jiao-yi-suo-shang-shi-gong-si-xin-xi-zui-xin-gong-gao-pi-lu} + +<Route namespace="sse" data={{"path":"/disclosure/:query?","categories":["finance"],"example":"/sse/disclosure/beginDate=2018-08-18&endDate=2020-08-25&productId=600696","parameters":{"query":"筛选条件,见示例"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"上市公司信息最新公告披露","maintainers":["harveyqiu"],"location":"disclosure.ts"}} /> ## 深潮 TechFlow {#shen-chao-techflow} -### 首页 {#shen-chao-techflow-shou-ye} +### 快讯 {#shen-chao-techflow-kuai-xun} -<Route author="nczitzk" example="/techflowpost" path="/techflowpost" radar="1" /> +<Route namespace="techflowpost" data={{"path":["/express","/newsflash"],"categories":["finance"],"example":"/techflowpost/express","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["techflowpost.com/newsletter/index.html"]},"name":"快讯","maintainers":["nczitzk"],"url":"techflowpost.com/newsletter/index.html","location":"express.ts"}} /> ### 快讯 {#shen-chao-techflow-kuai-xun} -<Route author="nczitzk" example="/techflowpost/express" path="/techflowpost/express" radar="1" /> +<Route namespace="techflowpost" data={{"path":["/express","/newsflash"],"categories":["finance"],"example":"/techflowpost/express","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["techflowpost.com/newsletter/index.html"]},"name":"快讯","maintainers":["nczitzk"],"url":"techflowpost.com/newsletter/index.html","location":"express.ts"}} /> ## 深圳证券交易所 {#shen-zhen-zheng-quan-jiao-yi-suo} +### 创业板项目动态 {#shen-zhen-zheng-quan-jiao-yi-suo-chuang-ye-ban-xiang-mu-dong-tai} + +<Route namespace="szse" data={{"path":"/projectdynamic/:type?/:stage?/:status?","categories":["finance"],"example":"/szse/projectdynamic","parameters":{"type":"类型,见下表,默认为IPO","stage":"阶段,见下表,默认为全部","status":"状态,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["listing.szse.cn/projectdynamic/1/index.html","listing.szse.cn/projectdynamic/2/index.html","listing.szse.cn/projectdynamic/3/index.html","listing.szse.cn/"]},"name":"创业板项目动态","maintainers":["nczitzk"],"url":"listing.szse.cn/projectdynamic/1/index.html","description":"类型\n\n | IPO | 再融资 | 重大资产重组 |\n | --- | ------ | ------------ |\n | 1 | 2 | 3 |\n\n 阶段\n\n | 全部 | 受理 | 问询 | 上市委会议 |\n | ---- | ---- | ---- | ---------- |\n | 0 | 10 | 20 | 30 |\n\n | 提交注册 | 注册结果 | 中止 | 终止 |\n | -------- | -------- | ---- | ---- |\n | 35 | 40 | 50 | 60 |\n\n 状态\n\n | 全部 | 新受理 | 已问询 | 通过 | 未通过 |\n | ---- | ------ | ------ | ---- | ------ |\n | 0 | 20 | 30 | 45 | 44 |\n\n | 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 |\n | -------- | -------- | ---------- | -------- |\n | 46 | 56 | 54 | 60 |\n\n | 注册生效 | 不予注册 | 补充审核 | 终止注册 |\n | -------- | -------- | -------- | -------- |\n | 70 | 74 | 78 | 76 |\n\n | 中止 | 审核不通过 | 撤回 |\n | ---- | ---------- | ---- |\n | 80 | 90 | 95 |","location":"projectdynamic.ts"}} /> + +类型 + +| IPO | 再融资 | 重大资产重组 | +| --- | ------ | ------------ | +| 1 | 2 | 3 | + +阶段 + +| 全部 | 受理 | 问询 | 上市委会议 | +| ---- | ---- | ---- | ---------- | +| 0 | 10 | 20 | 30 | + +| 提交注册 | 注册结果 | 中止 | 终止 | +| -------- | -------- | ---- | ---- | +| 35 | 40 | 50 | 60 | + +状态 + +| 全部 | 新受理 | 已问询 | 通过 | 未通过 | +| ---- | ------ | ------ | ---- | ------ | +| 0 | 20 | 30 | 45 | 44 | + +| 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 | +| -------- | -------- | ---------- | -------- | +| 46 | 56 | 54 | 60 | + +| 注册生效 | 不予注册 | 补充审核 | 终止注册 | +| -------- | -------- | -------- | -------- | +| 70 | 74 | 78 | 76 | + +| 中止 | 审核不通过 | 撤回 | +| ---- | ---------- | ---- | +| 80 | 90 | 95 | + ### 上市公告 - 可转换债券 {#shen-zhen-zheng-quan-jiao-yi-suo-shang-shi-gong-gao-ke-zhuan-huan-zhai-quan} -<Route author="Jeason0228 nczitzk" example="/szse/notice" path="/szse/notice" /> +<Route namespace="szse" data={{"path":"/notice","categories":["finance"],"example":"/szse/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["szse.cn/disclosure/notice/company/index.html","szse.cn/"]},"name":"上市公告 - 可转换债券","maintainers":["Jeason0228","nczitzk"],"url":"szse.cn/disclosure/notice/company/index.html","location":"notice.ts"}} /> ### 问询函件 {#shen-zhen-zheng-quan-jiao-yi-suo-wen-xun-han-jian} -<Route author="Jeason0228 nczitzk" example="/szse/inquire" path="/szse/inquire/:category?/:select?/:keyword?" paramsDesc={['类型,见下表,默认为 `0` 即 主板', '函件类别, 见下表,默认为全部函件类别', '公司代码或简称,默认为空']}> - 类型 +<Route namespace="szse" data={{"path":"/inquire/:category?/:select?/:keyword?","categories":["finance"],"example":"/szse/inquire","parameters":{"category":"类型,见下表,默认为 `0` 即 主板","select":"函件类别, 见下表,默认为全部函件类别","keyword":"公司代码或简称,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["szse.cn/disclosure/supervision/inquire/index.html","szse.cn/"],"target":"/inquire"},"name":"问询函件","maintainers":["Jeason0228","nczitzk"],"url":"szse.cn/disclosure/supervision/inquire/index.html","description":"类型\n\n | 主板 | 创业板 |\n | ---- | ------ |\n | 0 | 1 |\n\n 函件类别\n\n | 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 |\n | ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ |","location":"inquire.ts"}} /> - | 主板 | 创业板 | - | ---- | ------ | - | 0 | 1 | +类型 - 函件类别 +| 主板 | 创业板 | +| ---- | ------ | +| 0 | 1 | - | 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 | - | ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ | -</Route> +函件类别 + +| 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 | +| ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ | ### 最新规则 {#shen-zhen-zheng-quan-jiao-yi-suo-zui-xin-gui-ze} -<Route author="nczitzk" example="/szse/rule" path="/szse/rule" /> - -### 创业板项目动态 {#shen-zhen-zheng-quan-jiao-yi-suo-chuang-ye-ban-xiang-mu-dong-tai} - -<Route author="nczitzk" example="/szse/projectdynamic" path="/szse/projectdynamic/:type?/:stage?/:status?" paramsDesc={['类型,见下表,默认为IPO', '阶段,见下表,默认为全部', '状态,见下表,默认为全部']}> - 类型 - - | IPO | 再融资 | 重大资产重组 | - | --- | ------ | ------------ | - | 1 | 2 | 3 | - - 阶段 - - | 全部 | 受理 | 问询 | 上市委会议 | - | ---- | ---- | ---- | ---------- | - | 0 | 10 | 20 | 30 | - - | 提交注册 | 注册结果 | 中止 | 终止 | - | -------- | -------- | ---- | ---- | - | 35 | 40 | 50 | 60 | - - 状态 - - | 全部 | 新受理 | 已问询 | 通过 | 未通过 | - | ---- | ------ | ------ | ---- | ------ | - | 0 | 20 | 30 | 45 | 44 | - - | 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 | - | -------- | -------- | ---------- | -------- | - | 46 | 56 | 54 | 60 | - - | 注册生效 | 不予注册 | 补充审核 | 终止注册 | - | -------- | -------- | -------- | -------- | - | 70 | 74 | 78 | 76 | - - | 中止 | 审核不通过 | 撤回 | - | ---- | ---------- | ---- | - | 80 | 90 | 95 | -</Route> +<Route namespace="szse" data={{"path":"/rule","categories":["finance"],"example":"/szse/rule","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["szse.cn/lawrules/rule/new","szse.cn/"]},"name":"最新规则","maintainers":["nczitzk"],"url":"szse.cn/lawrules/rule/new","location":"rule.ts"}} /> ## 淘股吧 {#tao-gu-ba} -### 淘股论坛 {#tao-gu-ba-tao-gu-lun-tan} +### 用户博客 {#tao-gu-ba-yong-hu-bo-ke} -<Route author="emdoe nczitzk" example="/taoguba" path="/taoguba/:category?" paramsDesc={['分类,见下表,默认为社区总版']} notOperational="1"> - | 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 | - | -------- | -------- | -------- | -------- | - | bbs | zongban | jinghua | dianzan | -</Route> +<Route namespace="taoguba" data={{"path":["/blog/:id","/user/:id"],"categories":["finance"],"example":"/taoguba/blog/252069","parameters":{"id":"博客 id,可在对应博客页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taoguba.com.cn/blog/:id","taoguba.com.cn/"]},"name":"用户博客","maintainers":["nczitzk"],"location":"blog.ts"}} /> ### 用户博客 {#tao-gu-ba-yong-hu-bo-ke} -<Route author="emdoe nczitzk" example="/taoguba/blog/252069" path="/taoguba/blog/:id" paramsDesc={['博客 id,可在对应博客页中找到']} /> +<Route namespace="taoguba" data={{"path":["/blog/:id","/user/:id"],"categories":["finance"],"example":"/taoguba/blog/252069","parameters":{"id":"博客 id,可在对应博客页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taoguba.com.cn/blog/:id","taoguba.com.cn/"]},"name":"用户博客","maintainers":["nczitzk"],"location":"blog.ts"}} /> ## 乌拉邦 {#wu-la-bang} -### 最新研报 {#wu-la-bang-zui-xin-yan-bao} - -<Route author="Fatpandac" example="/ulapia/research/latest" path="/ulapia/research/latest" /> - ### 频道 {#wu-la-bang-pin-dao} -<Route author="Fatpandac" example="/ulapia/reports/stock_research" path="/ulapia/reports/:category?" paramsDesc={['频道类型,默认为券商晨报(今日晨报)']}> - | 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) | - | :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: | - | stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news | -</Route> +<Route namespace="ulapia" data={{"path":"/reports/:category?","categories":["finance"],"example":"/ulapia/reports/stock_research","parameters":{"category":"频道类型,默认为券商晨报(今日晨报)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道","maintainers":["Fatpandac"],"description":"| 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) |\n | :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: |\n | stock_research | industry_research | strategy_research | macro_research | ipo_research | brokerage_news |","location":"index.ts"}} /> + +| 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) | +| :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: | +| stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news | + +### 最新研报 {#wu-la-bang-zui-xin-yan-bao} + +<Route namespace="ulapia" data={{"path":"/research/latest","categories":["finance"],"example":"/ulapia/research/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ulapia.com/"]},"name":"最新研报","maintainers":[],"url":"www.ulapia.com/","location":"research.ts"}} /> ## 雪球 {#xue-qiu} -### 今日话题 {#xue-qiu-jin-ri-hua-ti} - -<Route author="nczitzk" example="/xueqiu/today" path="/xueqiu/today" /> - -### 用户动态 {#xue-qiu-yong-hu-dong-tai} - -<Route author="imlonghao" example="/xueqiu/user/8152922548" path="/xueqiu/user/:id/:type?" paramsDesc={['用户 id, 可在用户主页 URL 中找到', '动态的类型, 不填则默认全部']}> - | 原发布 | 长文 | 问答 | 热门 | 交易 | - | ------ | ---- | ---- | ---- | ---- | - | 0 | 2 | 4 | 9 | 11 | -</Route> - -### 用户收藏动态 {#xue-qiu-yong-hu-shou-cang-dong-tai} - -<Route author="imlonghao" example="/xueqiu/favorite/8152922548" path="/xueqiu/favorite/:id" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} /> - -### 用户自选动态 {#xue-qiu-yong-hu-zi-xuan-dong-tai} - -<Route author="hillerliao" example="/xueqiu/user_stock/1247347556" path="/xueqiu/user_stock/:id" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} /> - -### 用户专栏 {#xue-qiu-yong-hu-zhuan-lan} - -<Route author="TonyRL" example="/xueqiu/column/9962554712" path="/xueqiu/column/:id" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} radar="1" /> - ### 蛋卷基金净值更新 {#xue-qiu-dan-juan-ji-jin-jing-zhi-geng-xin} -<Route author="HenryQW NathanDai" example="/xueqiu/fund/040008" path="/xueqiu/fund/:id" paramsDesc={['基金代码, 可在基金主页 URL 中找到. 此路由的数据为场外基金 (`F`开头)']} /> - -### 组合最新调仓信息 {#xue-qiu-zu-he-zui-xin-tiao-cang-xin-xi} - -<Route author="ZhishanZhang" example="/xueqiu/snb/ZH1288184" path="/xueqiu/snb/:id" paramsDesc={['组合代码, 可在组合主页 URL 中找到.']} /> - -### 股票信息 {#xue-qiu-gu-piao-xin-xi} - -<Route author="YuYang" example="/xueqiu/stock_info/SZ000002" path="/xueqiu/stock_info/:id/:type?" paramsDesc={['股票代码(需要带上交易所)', '动态的类型, 不填则为股票公告']}> - | 公告 | 新闻 | 研报 | - | ------------ | ---- | -------- | - | announcement | news | research | -</Route> +<Route namespace="xueqiu" data={{"path":"/fund/:id","categories":["finance"],"example":"/xueqiu/fund/040008","parameters":{"id":"基金代码, 可在基金主页 URL 中找到. 此路由的数据为场外基金 (`F`开头)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"蛋卷基金净值更新","maintainers":["HenryQW","NathanDai"],"location":"fund.ts"}} /> ### 股票评论 {#xue-qiu-gu-piao-ping-lun} -<Route author="zytomorrow" example="/xueqiu/stock_comments/SZ002626" path="/xueqiu/stock_comments/:id" paramsDesc={['股票代码(需要带上交易所)']} /> +<Route namespace="xueqiu" data={{"path":"/stock_comments/:id","categories":["finance"],"example":"/xueqiu/stock_comments/SZ002626","parameters":{"id":"股票代码(需要带上交易所)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/S/:id"]},"name":"股票评论","maintainers":[],"location":"stock-comments.ts"}} /> + +### 股票信息 {#xue-qiu-gu-piao-xin-xi} + +<Route namespace="xueqiu" data={{"path":"/stock_info/:id/:type?","categories":["finance"],"example":"/xueqiu/stock_info/SZ000002","parameters":{"id":"股票代码(需要带上交易所)","type":"动态的类型, 不填则为股票公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/S/:id","xueqiu.com/s/:id"],"target":"/stock_info/:id"},"name":"股票信息","maintainers":["YuYang"],"description":"| 公告 | 新闻 | 研报 |\n | ------------ | ---- | -------- |\n | announcement | news | research |","location":"stock-info.ts"}} /> + +| 公告 | 新闻 | 研报 | +| ------------ | ---- | -------- | +| announcement | news | research | + +### 今日话题 {#xue-qiu-jin-ri-hua-ti} + +<Route namespace="xueqiu" data={{"path":"/today","categories":["finance"],"example":"/xueqiu/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/today"]},"name":"今日话题","maintainers":["nczitzk"],"url":"xueqiu.com/today","location":"today.ts"}} /> ### 热帖 {#xue-qiu-re-tie} -<Route author="hillerliao" example="/xueqiu/hots" path="/xueqiu/hots" /> +<Route namespace="xueqiu" data={{"path":"/hots","categories":["finance"],"example":"/xueqiu/hots","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/"]},"name":"热帖","maintainers":["hillerliao"],"url":"xueqiu.com/","location":"hots.ts"}} /> + +### 用户专栏 {#xue-qiu-yong-hu-zhuan-lan} + +<Route namespace="xueqiu" data={{"path":"/column/:id","categories":["finance"],"example":"/xueqiu/column/9962554712","parameters":{"id":"用户 id, 可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/:id/column"]},"name":"用户专栏","maintainers":["TonyRL"],"location":"column.ts"}} /> + +### 用户收藏动态 {#xue-qiu-yong-hu-shou-cang-dong-tai} + +<Route namespace="xueqiu" data={{"path":"/favorite/:id","categories":["finance"],"example":"/xueqiu/favorite/8152922548","parameters":{"id":"用户 id, 可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/u/:id"]},"name":"用户收藏动态","maintainers":["imlonghao"],"location":"favorite.ts"}} /> + +### 用户自选动态 {#xue-qiu-yong-hu-zi-xuan-dong-tai} + +<Route namespace="xueqiu" data={{"path":"/user_stock/:id","categories":["finance"],"example":"/xueqiu/user_stock/1247347556","parameters":{"id":"用户 id, 可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/u/:id"]},"name":"用户自选动态","maintainers":["hillerliao"],"location":"user-stock.ts"}} /> + +### 用户动态 {#xue-qiu-yong-hu-dong-tai} + +<Route namespace="xueqiu" data={{"path":"/user/:id/:type?","categories":["finance"],"example":"/xueqiu/user/8152922548","parameters":{"id":"用户 id, 可在用户主页 URL 中找到","type":"动态的类型, 不填则默认全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/u/:id"],"target":"/user/:id"},"name":"用户动态","maintainers":["imlonghao"],"description":"| 原发布 | 长文 | 问答 | 热门 | 交易 |\n | ------ | ---- | ---- | ---- | ---- |\n | 0 | 2 | 4 | 9 | 11 |","location":"user.ts"}} /> + +| 原发布 | 长文 | 问答 | 热门 | 交易 | +| ------ | ---- | ---- | ---- | ---- | +| 0 | 2 | 4 | 9 | 11 | + +### 组合最新调仓信息 {#xue-qiu-zu-he-zui-xin-tiao-cang-xin-xi} + +<Route namespace="xueqiu" data={{"path":"/snb/:id","categories":["finance"],"example":"/xueqiu/snb/ZH1288184","parameters":{"id":"组合代码, 可在组合主页 URL 中找到."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xueqiu.com/P/:id","xueqiu.com/p/:id"]},"name":"组合最新调仓信息","maintainers":["ZhishanZhang"],"location":"snb.ts"}} /> ## 有知有行 {#you-zhi-you-xing} ### 有知文章 {#you-zhi-you-xing-you-zhi-wen-zhang} -<Route author="broven Fatpandac nczitzk" example="/youzhiyouxing/materials" path="/youzhiyouxing/materials/:id?" paramsDesc={['分类,见下表,默认为全部']}> - | 全部 | 知行小酒馆 | 知行黑板报 | 无人知晓 | 孟岩专栏 | 知行读书会 | 你好,同路人 | - | :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: | - | 0 | 4 | 2 | 10 | 1 | 3 | 11 | -</Route> +<Route namespace="youzhiyouxing" data={{"path":"/materials/:id?","categories":["finance"],"example":"/youzhiyouxing/materials","parameters":{"id":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["youzhiyouxing.cn/materials"],"target":"/materials"},"name":"有知文章","maintainers":["broven","Fatpandac","nczitzk"],"url":"youzhiyouxing.cn/materials","description":"| 全部 | 知行小酒馆 | 知行黑板报 | 无人知晓 | 孟岩专栏 | 知行读书会 | 你好,同路人 |\n | :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: |\n | 0 | 4 | 2 | 10 | 1 | 3 | 11 |","location":"materials.ts"}} /> + +| 全部 | 知行小酒馆 | 知行黑板报 | 无人知晓 | 孟岩专栏 | 知行读书会 | 你好,同路人 | +| :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: | +| 0 | 4 | 2 | 10 | 1 | 3 | 11 | ## 证券时报网 {#zheng-quan-shi-bao-wang} ### 栏目 {#zheng-quan-shi-bao-wang-lan-mu} -<Route author="nczitzk" example="/stcn/yw" path="/stcn/:id?" paramsDesc={['栏目 id,见下表,默认为要闻']}> - | 快讯 | 要闻 | 股市 | 公司 | 数据 | - | ---- | ---- | ---- | ------- | ---- | - | kx | yw | gs | company | data | +<Route namespace="stcn" data={{"path":"/:id?","categories":["finance"],"example":"/stcn/yw","parameters":{"id":"栏目 id,见下表,默认为要闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["nczitzk"],"description":"| 快讯 | 要闻 | 股市 | 公司 | 数据 |\n | ---- | ---- | ---- | ------- | ---- |\n | kx | yw | gs | company | data |\n\n | 基金 | 金融 | 评论 | 产经 | 创投 |\n | ---- | ------- | ------- | ---- | ---- |\n | fund | finance | comment | cj | ct |\n\n | 科创板 | 新三板 | 投教 | ESG | 滚动 |\n | ------ | ------ | ---- | --- | ---- |\n | kcb | xsb | tj | zk | gd |\n\n | 股市一览 | 独家解读 |\n | -------- | -------- |\n | gsyl | djjd |\n\n | 公司新闻 | 公司动态 |\n | -------- | -------- |\n | gsxw | gsdt |\n\n | 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 |\n | -------- | -------- | -------- | ------- | -------- |\n | djsj | kd | zj | sj_kcb | hq |\n\n | 专栏 | 作者 |\n | ---- | ------ |\n | zl | author |\n\n | 行业 | 汽车 |\n | ---- | ---- |\n | cjhy | cjqc |\n\n | 投教课堂 | 政策知识 | 投教动态 | 专题活动 |\n | -------- | -------- | -------- | -------- |\n | tjkt | zczs | tjdt | zthd |","location":"index.ts"}} /> - | 基金 | 金融 | 评论 | 产经 | 创投 | - | ---- | ------- | ------- | ---- | ---- | - | fund | finance | comment | cj | ct | +| 快讯 | 要闻 | 股市 | 公司 | 数据 | +| ---- | ---- | ---- | ------- | ---- | +| kx | yw | gs | company | data | - | 科创板 | 新三板 | 投教 | ESG | 滚动 | - | ------ | ------ | ---- | --- | ---- | - | kcb | xsb | tj | zk | gd | +| 基金 | 金融 | 评论 | 产经 | 创投 | +| ---- | ------- | ------- | ---- | ---- | +| fund | finance | comment | cj | ct | - | 股市一览 | 独家解读 | - | -------- | -------- | - | gsyl | djjd | +| 科创板 | 新三板 | 投教 | ESG | 滚动 | +| ------ | ------ | ---- | --- | ---- | +| kcb | xsb | tj | zk | gd | - | 公司新闻 | 公司动态 | - | -------- | -------- | - | gsxw | gsdt | +| 股市一览 | 独家解读 | +| -------- | -------- | +| gsyl | djjd | - | 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 | - | -------- | -------- | -------- | ------- | -------- | - | djsj | kd | zj | sj\_kcb | hq | +| 公司新闻 | 公司动态 | +| -------- | -------- | +| gsxw | gsdt | - | 专栏 | 作者 | - | ---- | ------ | - | zl | author | +| 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 | +| -------- | -------- | -------- | ------- | -------- | +| djsj | kd | zj | sj\_kcb | hq | - | 行业 | 汽车 | - | ---- | ---- | - | cjhy | cjqc | +| 专栏 | 作者 | +| ---- | ------ | +| zl | author | - | 投教课堂 | 政策知识 | 投教动态 | 专题活动 | - | -------- | -------- | -------- | -------- | - | tjkt | zczs | tjdt | zthd | -</Route> +| 行业 | 汽车 | +| ---- | ---- | +| cjhy | cjqc | + +| 投教课堂 | 政策知识 | 投教动态 | 专题活动 | +| -------- | -------- | -------- | -------- | +| tjkt | zczs | tjdt | zthd | ## 智通财经网 {#zhi-tong-cai-jing-wang} ### 推荐 {#zhi-tong-cai-jing-wang-tui-jian} -<Route author="nczitzk" example="/zhitongcaijing" path="/zhitongcaijing/:id?/:category?" paramsDesc={['栏目 id,可在对应栏目页 URL 中找到,默认为 recommend,即推荐', '分类 id,可在对应栏目子分类页 URL 中找到,默认为全部']}> - | id | 栏目 | - | ------------ | ---- | - | recommend | 推荐 | - | hkstock | 港股 | - | meigu | 美股 | - | agu | 沪深 | - | ct | 创投 | - | esg | ESG | - | aqs | 券商 | - | ajj | 基金 | - | focus | 要闻 | - | announcement | 公告 | - | research | 研究 | - | shares | 新股 | - | bazaar | 市场 | - | company | 公司 | -</Route> +<Route namespace="zhitongcaijing" data={{"path":"/:id?/:category?","categories":["finance"],"example":"/zhitongcaijing","parameters":{"id":"栏目 id,可在对应栏目页 URL 中找到,默认为 recommend,即推荐","category":"分类 id,可在对应栏目子分类页 URL 中找到,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"推荐","maintainers":["nczitzk"],"description":"| id | 栏目 |\n | ------------ | ---- |\n | recommend | 推荐 |\n | hkstock | 港股 |\n | meigu | 美股 |\n | agu | 沪深 |\n | ct | 创投 |\n | esg | ESG |\n | aqs | 券商 |\n | ajj | 基金 |\n | focus | 要闻 |\n | announcement | 公告 |\n | research | 研究 |\n | shares | 新股 |\n | bazaar | 市场 |\n | company | 公司 |","location":"index.ts"}} /> + +| id | 栏目 | +| ------------ | ---- | +| recommend | 推荐 | +| hkstock | 港股 | +| meigu | 美股 | +| agu | 沪深 | +| ct | 创投 | +| esg | ESG | +| aqs | 券商 | +| ajj | 基金 | +| focus | 要闻 | +| announcement | 公告 | +| research | 研究 | +| shares | 新股 | +| bazaar | 市场 | +| company | 公司 | ## 中国货币网 {#zhong-guo-huo-bi-wang} ### 公告 {#zhong-guo-huo-bi-wang-gong-gao} -<Route author="TonyRL" example="/chinamoney" path="/chinamoney/:channelId?" paramsDesc={['分类,见下表,默认为 `2834`']}> - <details> - <summary>市场公告</summary> +<Route namespace="chinamoney" data={{"path":"/:channelId?","categories":["finance"],"example":"/chinamoney","parameters":{"channelId":"分类,见下表,默认为 `2834`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公告","maintainers":["TonyRL"],"description":"<details>\n <summary>市场公告</summary>\n\n 外汇市场公告\n\n | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 |\n | ---- | ------------ | ------------ | ------------ |\n | 2834 | 2835 | 2836 | 2837 |\n\n 本币市场公告\n\n | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 |\n | -------------- | ------------ | ------------ | ------------ |\n | 2839,2840,2841 | 2839 | 2840 | 2841 |\n\n 央行业务公告\n\n | 最新 | 公开市场操作 | 中央国库现金管理 |\n | --------- | ------------ | ---------------- |\n | 2845,2846 | 2845 | 2846 |\n </details>\n\n <details>\n <summary>本币市场</summary>\n\n 贷款市场报价利率\n\n | LPR 市场公告 |\n | ------------ |\n | 3686 |\n </details>","location":"notice.ts"}} /> - 外汇市场公告 +<details> + <summary>市场公告</summary> - | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | - | ---- | ------------ | ------------ | ------------ | - | 2834 | 2835 | 2836 | 2837 | + 外汇市场公告 - 本币市场公告 + | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | + | ---- | ------------ | ------------ | ------------ | + | 2834 | 2835 | 2836 | 2837 | - | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | - | -------------- | ------------ | ------------ | ------------ | - | 2839,2840,2841 | 2839 | 2840 | 2841 | + 本币市场公告 - 央行业务公告 + | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | + | -------------- | ------------ | ------------ | ------------ | + | 2839,2840,2841 | 2839 | 2840 | 2841 | - | 最新 | 公开市场操作 | 中央国库现金管理 | - | --------- | ------------ | ---------------- | - | 2845,2846 | 2845 | 2846 | - </details> + 央行业务公告 - <details> - <summary>本币市场</summary> + | 最新 | 公开市场操作 | 中央国库现金管理 | + | --------- | ------------ | ---------------- | + | 2845,2846 | 2845 | 2846 | +</details> - 贷款市场报价利率 +<details> + <summary>本币市场</summary> - | LPR 市场公告 | - | ------------ | - | 3686 | - </details> -</Route> + 贷款市场报价利率 -## 中国期货市场监控中心 {#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin} - -### 栏目 {#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin-lan-mu} - -<Route author="nczitzk" example="/cfmmc/main/noticeannouncement/cfmmcnotice" path="/cfmmc/:id?" paramsDesc={['栏目 id,见下表,默认为中国期货监控公告']} radar="1"> - #### 党的建设 - - | 栏目 | 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 | -</Route> + | LPR 市场公告 | + | ------------ | + | 3686 | +</details> ## 中国人民银行 {#zhong-guo-ren-min-yin-hang} -### 沟通交流 {#zhong-guo-ren-min-yin-hang-gou-tong-jiao-liu} +<details> + <summary>*业务咨询* 和 *投诉建议* 可用的站点参数</summary> -<Route author="nczitzk" example="/gov/pbc/goutongjiaoliu" path="/gov/pbc/goutongjiaoliu" puppeteer="1" notOperational="1" /> + | 上海市 | 北京市 | 天津市 | 河北省 | + | -------- | ------- | ------- | ------ | + | shanghai | beijing | tianjin | hebei | -### 货币政策司公开市场交易公告 {#zhong-guo-ren-min-yin-hang-huo-bi-zheng-ce-si-gong-kai-shi-chang-jiao-yi-gong-gao} + | 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | + | ------ | ------------ | -------- | ------ | + | shanxi | neimenggu | liaoning | jilin | -<Route author="nczitzk" example="/gov/pbc/tradeAnnouncement" path="/gov/pbc/tradeAnnouncement" puppeteer="1" notOperational="1" /> + | 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | + | ------------ | ------- | -------- | ------ | + | heilongjiang | jiangsu | zhejiang | anhui | -### 政策研究 {#zhong-guo-ren-min-yin-hang-zheng-ce-yan-jiu} + | 福建省 | 江西省 | 山东省 | 河南省 | + | ------ | ------- | -------- | ------ | + | fujian | jiangxi | shandong | henan | -<Route author="Fatpandac" example="/gov/pbc/zcjl" path="/gov/pbc/zcjl" notOperational="1" /> + | 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | + | ------ | ------ | --------- | -------------- | + | hubei | hunan | guangdong | guangxi | + + | 海南省 | 重庆市 | 四川省 | 贵州省 | + | ------ | --------- | ------- | ------- | + | hainan | chongqing | sichuan | guizhou | + + | 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | + | ------ | ---------- | ------- | ------ | + | yunnan | xizang | shaanxi | gansu | + + | 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | + | ------- | -------------- | ---------------- | ------ | + | qinghai | ningxia | xinjiang | dalian | + + | 宁波市 | 厦门市 | 青岛市 | 深圳市 | + | ------ | ------ | ------- | -------- | + | ningbo | xiamen | qingdao | shenzhen | +</details> ### 工作论文 {#zhong-guo-ren-min-yin-hang-gong-zuo-lun-wen} -<Route author="Fatpandac" example="/gov/pbc/gzlw" path="/gov/pbc/gzlw" /> +<Route namespace="gov" data={{"path":"/pbc/gzlw","categories":["finance"],"example":"/gov/pbc/gzlw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pbc.gov.cn/redianzhuanti/118742/4122386/4122692/index.html"]},"name":"工作论文","maintainers":["Fatpandac"],"url":"pbc.gov.cn/redianzhuanti/118742/4122386/4122692/index.html","location":"pbc/gzlw.ts"}} /> + +### 沟通交流 {#zhong-guo-ren-min-yin-hang-gou-tong-jiao-liu} + +<Route namespace="gov" data={{"path":"/pbc/goutongjiaoliu","categories":["finance"],"example":"/gov/pbc/goutongjiaoliu","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pbc.gov.cn/goutongjiaoliu/113456/113469/index.html"]},"name":"沟通交流","maintainers":["nczitzk"],"url":"pbc.gov.cn/goutongjiaoliu/113456/113469/index.html","location":"pbc/goutongjiaoliu.ts"}} /> + +### 货币政策司公开市场交易公告 {#zhong-guo-ren-min-yin-hang-huo-bi-zheng-ce-si-gong-kai-shi-chang-jiao-yi-gong-gao} + +<Route namespace="gov" data={{"path":"/pbc/tradeAnnouncement","categories":["finance"],"example":"/gov/pbc/tradeAnnouncement","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"货币政策司公开市场交易公告","maintainers":["nczitzk"],"location":"pbc/trade-announcement.ts"}} /> ## 中证网 {#zhong-zheng-wang} -### 栏目 {#zhong-zheng-wang-lan-mu} +### Unknown {#zhong-zheng-wang-unknown} -<Route author="nczitzk" example="/cs" path="/cs/:category?" paramsDesc={['分类,见下表,默认为首页']} radar="1"> - | 要闻 | 公司 | 市场 | 基金 | - | ---- | ---- | ---- | ---- | - | xwzx | ssgs | gppd | tzjj | - - | 科创 | 产经 | 期货 | 海外 | - | ---- | ------ | -------- | ------ | - | 5g | cj2020 | zzqh2020 | hw2020 | - - <details> - <summary>更多栏目</summary> - - #### 要闻 - - | 财经要闻 | 观点评论 | 民生消费 | - | -------- | -------- | --------- | - | xwzx/hg | xwzx/jr | xwzx/msxf | - - #### 公司 - - | 公司要闻 | 公司深度 | 公司巡礼 | - | --------- | --------- | --------- | - | ssgs/gsxw | ssgs/gssd | ssgs/gsxl | - - #### 市场 - - | A 股市场 | 港股资讯 | 债市研究 | 海外报道 | 期货报道 | - | --------- | --------- | --------- | --------- | --------- | - | gppd/gsyj | gppd/ggzx | gppd/zqxw | gppd/hwbd | gppd/qhbd | - - #### 基金 - - | 基金动态 | 基金视点 | 基金持仓 | 私募基金 | 基民学苑 | - | --------- | --------- | --------- | --------- | --------- | - | tzjj/jjdt | tzjj/jjks | tzjj/jjcs | tzjj/smjj | tzjj/tjdh | - - #### 机构 - - | 券商 | 银行 | 保险 | - | ---- | ---- | ---- | - | qs | yh | bx | - - #### 其他 - - | 中证快讯 7x24 | IPO 鉴真 | 公司能见度 | - | ------------- | -------- | ---------- | - | sylm/jsbd | yc/ipojz | yc/gsnjd | - </details> -</Route> - -### 中证视频 {#zhong-zheng-wang-zhong-zheng-shi-pin} - -<Route author="nczitzk" example="/cs/video/今日聚焦" path="/cs/video/:category?" paramsDesc={['分类,见下表,默认为今日聚焦']} radar="1"> - | 今日聚焦 | 传闻求证 | 高端访谈 | 投教课堂 | 直播汇 | - | -------- | -------- | -------- | -------- | ------ | -</Route> +<Route namespace="cs" data={{"path":"/video/:category?","categories":["finance"],"example":"/cs/video/今日聚焦","parameters":{"category":"分类,见下表,默认为今日聚焦"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["nczitzk"],"location":"video.ts"}} /> diff --git a/website/docs/routes/forecast.mdx b/website/docs/routes/forecast.mdx index b3bd703fd..b7db53d68 100644 --- a/website/docs/routes/forecast.mdx +++ b/website/docs/routes/forecast.mdx @@ -1,321 +1,225 @@ -# ❗️ Forecast and alerts +# forecast ## BADAN METEOROLOGI, KLIMATOLOGI, DAN GEOFISIKA(Indonesian) {#badan-meteorologi-klimatologi-dan-geofisika-indonesian} -### Recent Earthquakes {#badan-meteorologi-klimatologi-dan-geofisika-indonesian-recent-earthquakes} - -<Route author="Shinanory" example="/bmkg/earthquake" path="/bmkg/earthquake" /> - ### News {#badan-meteorologi-klimatologi-dan-geofisika-indonesian-news} -<Route author="Shinanory" example="/bmkg/news" path="/bmkg/news" /> +<Route namespace="bmkg" data={{"path":"/news","categories":["forecast"],"example":"/bmkg/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bmkg.go.id/","bmkg.go.id/berita"]},"name":"News","maintainers":["Shinanory"],"url":"bmkg.go.id/","location":"news.ts"}} /> + +### Recent Earthquakes {#badan-meteorologi-klimatologi-dan-geofisika-indonesian-recent-earthquakes} + +<Route namespace="bmkg" data={{"path":"/earthquake","categories":["forecast"],"example":"/bmkg/earthquake","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bmkg.go.id/","bmkg.go.id/gempabumi-terkini.html"]},"name":"Recent Earthquakes","maintainers":["Shinanory"],"url":"bmkg.go.id/","location":"earthquake.ts"}} /> ## Outage.Report {#outage-report} ### Report {#outage-report-report} -<Route author="cxumol nczitzk" example="/outagereport/ubisoft/5" path="/outagereport/:name/:count?" paramsDesc={['Service name, spelling format must be consistent with URL', 'Counting threshold, will only be written in RSS if the number of people who report to stop serving is not less than this number']} notOperational="1"> - Please skip the local service area code for `name`, for example `https://outage.report/us/verizon-wireless` to `verizon-wireless`. -</Route> +<Route namespace="outagereport" data={{"path":"/:name/:count?","categories":["forecast"],"example":"/outagereport/ubisoft/5","parameters":{"name":"Service name, spelling format must be consistent with URL","count":"Counting threshold, will only be written in RSS if the number of people who report to stop serving is not less than this number"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Report","maintainers":["cxumol","nczitzk"],"description":"Please skip the local service area code for `name`, for example `https://outage.report/us/verizon-wireless` to `verizon-wireless`.","location":"index.ts"}} /> + +Please skip the local service area code for `name`, for example `https://outage.report/us/verizon-wireless` to `verizon-wireless`. ## Uptime Robot {#uptime-robot} ### RSS {#uptime-robot-rss} -<Route author="Rongronggg9" example="/uptimerobot/rss/u358785-e4323652448755805d668f1a66506f2f" path="/uptimerobot/rss/:id/:routeParams?" paramsDesc={['the last part of your RSS URL (e.g. `u358785-e4323652448755805d668f1a66506f2f` for `https://rss.uptimerobot.com/u358785-e4323652448755805d668f1a66506f2f`)', 'extra parameters, see the table below']}> - | Key | Description | Accepts | Defaults to | - | ------ | ------------------------------------------------------------------------ | -------------- | ----------- | - | showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true | -</Route> +<Route namespace="uptimerobot" data={{"path":"/rss/:id/:routeParams?","categories":["forecast"],"example":"/uptimerobot/rss/u358785-e4323652448755805d668f1a66506f2f","parameters":{"id":"the last part of your RSS URL (e.g. `u358785-e4323652448755805d668f1a66506f2f` for `https://rss.uptimerobot.com/u358785-e4323652448755805d668f1a66506f2f`)","routeParams":"extra parameters, see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rss.uptimerobot.com/:id"],"target":"/rss/:id"},"name":"RSS","maintainers":["Rongronggg9"],"description":"| Key | Description | Accepts | Defaults to |\n | ------ | ------------------------------------------------------------------------ | -------------- | ----------- |\n | showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true |","location":"rss.ts"}} /> + +| Key | Description | Accepts | Defaults to | +| ------ | ------------------------------------------------------------------------ | -------------- | ----------- | +| showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true | ## 重庆燃气 {#chong-qing-ran-qi} ### 停气检修通知 {#chong-qing-ran-qi-ting-qi-jian-xiu-tong-zhi} -<Route author="Mai19930513" example="/cqgas/tqtz" path="/cqgas/tqtz" radar="1" /> +<Route namespace="cqgas" data={{"path":"/tqtz","categories":["forecast"],"example":"/cqgas/tqtz","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cqgas.cn/"]},"name":"停气检修通知","maintainers":["Mai19930513"],"url":"cqgas.cn/","location":"tqtz.ts"}} /> ## 地震速报 {#di-zhen-su-bao} -### 中国地震局 {#di-zhen-su-bao-zhong-guo-di-zhen-ju} - -<Route author="LogicJake" example="/earthquake" path="/earthquake/:region?" paramsDesc={['区域,0全部,1国内(默认),2国外']} anticrawler="1"> - 可通过全局过滤参数订阅您感兴趣的地区. -</Route> - ### 中国地震台 {#di-zhen-su-bao-zhong-guo-di-zhen-tai} -<Route author="SettingDust" example="/earthquake/ceic/1" path="/earthquake/ceic/:type?" paramsDesc={['类型,见下表']}> - | 参数 | 类型 | - | ---- | --------------------------- | - | 1 | 最近 24 小时地震信息 | - | 2 | 最近 48 小时地震信息 | - | 5 | 最近一年 3.0 级以上地震信息 | - | 7 | 最近一年 3.0 级以下地震 | - | 8 | 最近一年 4.0 级以上地震信息 | - | 9 | 最近一年 5.0 级以上地震信息 | - | 0 | 最近一年 6.0 级以上地震信息 | +<Route namespace="earthquake" data={{"path":"/ceic/:type?","categories":["forecast"],"example":"/earthquake/ceic/1","parameters":{"type":"类型,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cea.gov.cn/cea/xwzx/zqsd/index.html","www.cea.gov.cn/"],"target":""},"name":"中国地震台","maintainers":["SettingDust"],"url":"www.cea.gov.cn/cea/xwzx/zqsd/index.html","description":"| 参数 | 类型 |\n | ---- | --------------------------- |\n | 1 | 最近 24 小时地震信息 |\n | 2 | 最近 48 小时地震信息 |\n | 5 | 最近一年 3.0 级以上地震信息 |\n | 7 | 最近一年 3.0 级以下地震 |\n | 8 | 最近一年 4.0 级以上地震信息 |\n | 9 | 最近一年 5.0 级以上地震信息 |\n | 0 | 最近一年 6.0 级以上地震信息 |\n\n 可通过全局过滤参数订阅您感兴趣的地区.","location":"ceic.ts"}} /> - 可通过全局过滤参数订阅您感兴趣的地区. -</Route> +| 参数 | 类型 | +| ---- | --------------------------- | +| 1 | 最近 24 小时地震信息 | +| 2 | 最近 48 小时地震信息 | +| 5 | 最近一年 3.0 级以上地震信息 | +| 7 | 最近一年 3.0 级以下地震 | +| 8 | 最近一年 4.0 级以上地震信息 | +| 9 | 最近一年 5.0 级以上地震信息 | +| 0 | 最近一年 6.0 级以上地震信息 | -## 广州天气 {#guang-zhou-tian-qi} +可通过全局过滤参数订阅您感兴趣的地区. -### 突发性天气提示 {#guang-zhou-tian-qi-tu-fa-xing-tian-qi-ti-shi} +### 中国地震局 {#di-zhen-su-bao-zhong-guo-di-zhen-ju} -<Route author="Fatpandac" example="/gov/guangdong/tqyb/tfxtq" path="/gov/guangdong/tqyb/tfxtq" /> +<Route namespace="earthquake" data={{"path":"/:region?","categories":["forecast"],"example":"/earthquake","parameters":{"region":"区域,0全部,1国内(默认),2国外"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cea.gov.cn/cea/xwzx/zqsd/index.html","www.cea.gov.cn/"],"target":""},"name":"中国地震局","maintainers":["LogicJake"],"url":"www.cea.gov.cn/cea/xwzx/zqsd/index.html","description":"可通过全局过滤参数订阅您感兴趣的地区.","location":"index.ts"}} /> -### 广东省内城市预警信号 {#guang-zhou-tian-qi-guang-dong-sheng-nei-cheng-shi-yu-jing-xin-hao} - -<Route author="Fatpandac" example="/gov/guangdong/tqyb/sncsyjxh" path="/gov/guangdong/tqyb/sncsyjxh" /> - -## 国家气候中心 {#guo-jia-qi-hou-zhong-xin} - -### 最新监测 {#guo-jia-qi-hou-zhong-xin-zui-xin-jian-ce} - -<Route author="nczitzk" example="/ncc-cma/cmdp/image" path="/ncc-cma/cmdp/image" paramsDesc={['分类 id,见下表,默认为全部']} radar="1" supportBT="1"> - :::tip - 若订阅全部最新监测信息,此时路由为 [`/ncc-cma/cmdp/image`](https://rsshub.app/ncc-cma/cmdp/image)。 - - 若订阅中国气温 **日平均气温距平** 的最新监测信息,此时路由为 [`/ncc-cma/cmdp/image/RPJQWQYZ`](https://rsshub.app/ncc-cma/cmdp/image/RPJQWQYZ)。 - - 若订阅全球降水 **降水量(最近 10 天)** / **降水量(最近 10 天)** / **降水量(最近 10 天)** 的最新监测信息,此时路由为 [`/ncc-cma/cmdp/image/glbrain10_/glbrain20_/glbrain30_`](https://rsshub.app/ncc-cma/cmdp/image/glbrain10_/glbrain20_/glbrain30_)。 - ::: - - #### [中国气温](http://cmdp.ncc-cma.net/cn/index.htm) - - | 分类 | ID | - | -------------------- | ---------- | - | 日平均气温距平 | RPJQWQYZ | - | 近 5 天平均气温距平 | ZJ5TPJQWJP | - | 近 10 天平均气温距平 | ZJ10TQWJP | - | 近 20 天平均气温距平 | ZJ20TQWJP | - | 近 30 天平均气温距平 | ZJ30TQWJP | - | 本月以来气温距平 | BYYLQWJP | - | 本季以来气温距平 | BJYLQWJP | - | 本年以来气温距平 | BNYLQWJP | - - #### [中国降水](http://cmdp.ncc-cma.net/cn/index.htm) - - | 分类 | ID | - | ------------------------ | -------------- | - | 日降水量分布 | QGRJSLFBT0808S | - | 近 5 天降水量 | ZJ5TJSLFBT | - | 近 10 天降水量 | ZJ10TJSL | - | 近 20 天降水量 | ZJ20TJSL | - | 近 30 天降水量 | ZJ30TJSL | - | 本月以来降水量 | BYYLJSL | - | 本季以来降水量 | BJYLJSL | - | 近 10 天降水量距平百分率 | ZJ10TJSLJP | - | 近 20 天降水量距平百分率 | ZJ20TJSLJP | - | 近 30 天降水量距平百分率 | ZJ30TJSLJP | - | 本月以来降水量距平百分率 | BYYLJSLJPZYQHZ | - | 本季以来降水量距平百分率 | BJYLJSLJPZJQHZ | - | 本年以来降水量距平百分率 | BNYLJSLJP | - - #### [全球气温](http://cmdp.ncc-cma.net/cn/index.htm) - - | 分类 | ID | - | -------------------------- | ------------- | - | 气温距平(最近 10 天) | glbtmeana10\_ | - | 气温距平(最近 20 天) | glbtmeana20\_ | - | 气温距平(最近 30 天) | glbtmeana30\_ | - | 气温距平(最近 90 天) | glbtmeana90\_ | - | 最低气温距平(最近 30 天) | glbtmina30\_ | - | 最低气温距平(最近 90 天) | glbtmina90\_ | - | 最高气温距平(最近 30 天) | glbtmaxa30\_ | - | 最高气温距平(最近 90 天) | glbtmaxa90\_ | - - #### [全球降水](http://cmdp.ncc-cma.net/cn/index.htm) - - | 分类 | ID | - | ---------------------------- | ------------ | - | 降水量(最近 10 天) | glbrain10\_ | - | 降水量(最近 20 天) | glbrain20\_ | - | 降水量(最近 30 天) | glbrain30\_ | - | 降水量(最近 90 天) | glbrain90\_ | - | 降水距平百分率(最近 10 天) | glbraina10\_ | - | 降水距平百分率(最近 20 天) | glbraina20\_ | - | 降水距平百分率(最近 30 天) | glbraina30\_ | - | 降水距平百分率(最近 90 天) | glbraina90\_ | -</Route> - -## 国家突发事件预警信息发布网 {#guo-jia-tu-fa-shi-jian-yu-jing-xin-xi-fa-bu-wang} - -### 当前生效预警 {#guo-jia-tu-fa-shi-jian-yu-jing-xin-xi-fa-bu-wang-dang-qian-sheng-xiao-yu-jing} - -<Route author="nczitzk" example="/12379" path="/12379/index" /> +可通过全局过滤参数订阅您感兴趣的地区. ## 和风天气 {#he-feng-tian-qi} ### 近三天天气 {#he-feng-tian-qi-jin-san-tian-tian-qi} -<Route author="Rein-Ou" example="/qweather/3days/广州" path="/qweather/3days/:location" configRequired="1"> - 需自行注册获取 api 的 key,并在环境变量 HEFENG\_KEY 中进行配置,获取订阅近三天天气预报 -</Route> +<Route namespace="qweather" data={{"path":"/3days/:location","categories":["forecast"],"example":"/qweather/3days/广州","parameters":{"location":"N"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"近三天天气","maintainers":["Rein-Ou","la3rence"],"description":"需自行注册获取 api 的 key,并在环境变量 HEFENG_KEY 中进行配置,获取订阅近三天天气预报","location":"3days.ts"}} /> + +需自行注册获取 api 的 key,并在环境变量 HEFENG\_KEY 中进行配置,获取订阅近三天天气预报 ### 实时天气 {#he-feng-tian-qi-shi-shi-tian-qi} -<Route author="Rein-Ou" example="/qweather/广州" path="/qweather/now/:location" configRequired="1"> - 需自行注册获取 api 的 key,每小时更新一次数据 -</Route> +<Route namespace="qweather" data={{"path":"/now/:location","categories":["forecast"],"example":"/qweather/广州","parameters":{"location":"N"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"实时天气","maintainers":["Rein-Ou"],"description":"需自行注册获取 api 的 key,每小时更新一次数据","location":"now.ts"}} /> -## 上海市生态环境局 {#shang-hai-shi-sheng-tai-huan-jing-ju} - -### 空气质量 {#shang-hai-shi-sheng-tai-huan-jing-ju-kong-qi-zhi-liang} - -<Route author="nczitzk" example="/gov/shanghai/sthj" path="/gov/shanghai/sthj" /> - -## 停电通知 {#ting-dian-tong-zhi} - -### 95598 停电查询网 {#ting-dian-tong-zhi-95598-ting-dian-cha-xun-wang} - -<Route author="mjysci" example="/tingdiantz/95598/hb1/wh/wc/" path="/tingdiantz/95598/:province/:city/:district?" paramsDesc={['省,2~3位拼音缩写,详情见http://www.sttcq.com/td/', '市,同上', '区,同上']} /> - -### 南京市 {#ting-dian-tong-zhi-nan-jing-shi} - -<Route author="ocleo1" example="/tingdiantz/nanjing" path="/tingdiantz/nanjing" /> +需自行注册获取 api 的 key,每小时更新一次数据 ## 停水通知 {#ting-shui-tong-zhi} 配合 [IFTTT](https://ifttt.com/) Applets [邮件通知](https://ifttt.com/applets/SEvmDVKY-) 使用实现自动通知效果. -### 杭州市 {#ting-shui-tong-zhi-hang-zhou-shi} - -<Route author="znhocn" example="/tingshuitz/hangzhou" path="/tingshuitz/hangzhou" notOperational="1" /> - -### 萧山区 {#ting-shui-tong-zhi-xiao-shan-qu} - -<Route author="znhocn" example="/tingshuitz/xiaoshan" path="/tingshuitz/xiaoshan" /> - ### 大连市 {#ting-shui-tong-zhi-da-lian-shi} -<Route author="DIYgod" example="/tingshuitz/dalian" path="/tingshuitz/dalian" /> - -### 广州市 {#ting-shui-tong-zhi-guang-zhou-shi} - -<Route author="xyqfer" example="/tingshuitz/guangzhou" path="/tingshuitz/guangzhou" /> +<Route namespace="tingshuitz" data={{"path":"/dalian","categories":["forecast"],"example":"/tingshuitz/dalian","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swj.dl.gov.cn/col/col4296/index.html","swj.dl.gov.cn/"]},"name":"大连市","maintainers":["DIYgod"],"url":"swj.dl.gov.cn/col/col4296/index.html","location":"dalian.ts"}} /> ### 东莞市 {#ting-shui-tong-zhi-dong-guan-shi} -<Route author="victoriqueko" example="/tingshuitz/dongguan" path="/tingshuitz/dongguan" notOperational="1" /> +<Route namespace="tingshuitz" data={{"path":"/dongguan","categories":["forecast"],"example":"/tingshuitz/dongguan","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"东莞市","maintainers":["victoriqueko"],"location":"dongguan.ts"}} /> -### 西安市 {#ting-shui-tong-zhi-xi-an-shi} +### 广州市 {#ting-shui-tong-zhi-guang-zhou-shi} -<Route author="ciaranchen" example="/tingshuitz/xian" path="/tingshuitz/xian" notOperational="1" /> +<Route namespace="tingshuitz" data={{"path":"/guangzhou","categories":["forecast"],"example":"/tingshuitz/guangzhou","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"广州市","maintainers":["xyqfer"],"location":"guangzhou.ts"}} /> -### 阳江市 {#ting-shui-tong-zhi-yang-jiang-shi} +### 杭州市 {#ting-shui-tong-zhi-hang-zhou-shi} -<Route author="ciaranchen" example="/tingshuitz/yangjiang" path="/tingshuitz/yangjiang" notOperational="1" /> +<Route namespace="tingshuitz" data={{"path":"/hangzhou","categories":["forecast"],"example":"/tingshuitz/hangzhou","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.hzwgc.com/public/stop_the_water","www.hzwgc.com/"]},"name":"杭州市","maintainers":["znhocn"],"url":"www.hzwgc.com/public/stop_the_water","location":"hangzhou.ts"}} /> ### 南京市 {#ting-shui-tong-zhi-nan-jing-shi} -<Route author="ocleo1" example="/tingshuitz/nanjing" path="/tingshuitz/nanjing" /> - -### 武汉市 {#ting-shui-tong-zhi-wu-han-shi} - -<Route author="MoonBegonia" example="/tingshuitz/wuhan" path="/tingshuitz/wuhan/:channelId" notOperational="1"> - | channelId | 分类 | - | --------- | ---------- | - | 68 | 计划性停水 | - | 69 | 突发性停水 | -</Route> - -### 长沙市 {#ting-shui-tong-zhi-chang-sha-shi} - -<Route author="shansing" example="/tingshuitz/changsha/78" path="/tingshuitz/changsha/:channelId?" notOperational="1"> - 可能仅限于中国大陆服务器访问,以实际情况为准。 - - | channelId | 分类 | - | --------- | -------- | - | 78 | 计划停水 | - | 157 | 抢修停水 | -</Route> +<Route namespace="tingshuitz" data={{"path":"/nanjing","categories":["forecast"],"example":"/tingshuitz/nanjing","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jlwater.com/portal/10000013","jlwater.com/"]},"name":"南京市","maintainers":["ocleo1"],"url":"jlwater.com/portal/10000013","location":"nanjing.ts"}} /> ### 深圳市 {#ting-shui-tong-zhi-shen-zhen-shi} -<Route author="lilPiper" example="/tingshuitz/shenzhen" path="/tingshuitz/shenzhen" notOperational="1"> - 可能仅限中国大陆服务器访问,以实际情况为准。 -</Route> +<Route namespace="tingshuitz" data={{"path":"/shenzhen","categories":["forecast"],"example":"/tingshuitz/shenzhen","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sz-water.com.cn/*"]},"name":"深圳市","maintainers":["lilPiper"],"url":"sz-water.com.cn/*","description":"可能仅限中国大陆服务器访问,以实际情况为准。","location":"shenzhen.ts"}} /> -## 香港天文台 {#xiang-gang-tian-wen-tai} +可能仅限中国大陆服务器访问,以实际情况为准。 -### Current Weather Report {#xiang-gang-tian-wen-tai-current-weather-report} +### 西安市 {#ting-shui-tong-zhi-xi-an-shi} -<Route author="calpa" example="/hko/weather" path="/hko/weather" /> +<Route namespace="tingshuitz" data={{"path":"/xian","categories":["forecast"],"example":"/tingshuitz/xian","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"西安市","maintainers":["ciaranchen"],"location":"xian.ts"}} /> + +### 萧山区 {#ting-shui-tong-zhi-xiao-shan-qu} + +<Route namespace="tingshuitz" data={{"path":"/xiaoshan","categories":["forecast"],"example":"/tingshuitz/xiaoshan","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.xswater.com/gongshui/channels/227.html","www.xswater.com/"]},"name":"萧山区","maintainers":["znhocn"],"url":"www.xswater.com/gongshui/channels/227.html","location":"xiaoshan.ts"}} /> + +### 阳江市 {#ting-shui-tong-zhi-yang-jiang-shi} + +<Route namespace="tingshuitz" data={{"path":"/yangjiang","categories":["forecast"],"example":"/tingshuitz/yangjiang","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yjsswjt.com/zxdt_list.jsp","yjsswjt.com/"]},"name":"阳江市","maintainers":["ciaranchen"],"url":"yjsswjt.com/zxdt_list.jsp","location":"yangjiang.ts"}} /> + +### 长沙市 {#ting-shui-tong-zhi-chang-sha-shi} + +<Route namespace="tingshuitz" data={{"path":"/changsha/:channelId?","categories":["forecast"],"example":"/tingshuitz/changsha/78","parameters":{"channelId":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"长沙市","maintainers":["shansing"],"description":"可能仅限于中国大陆服务器访问,以实际情况为准。\n\n | channelId | 分类 |\n | --------- | -------- |\n | 78 | 计划停水 |\n | 157 | 抢修停水 |","location":"changsha.ts"}} /> + +可能仅限于中国大陆服务器访问,以实际情况为准。 + +| channelId | 分类 | +| --------- | -------- | +| 78 | 计划停水 | +| 157 | 抢修停水 | ## 中国国家应急广播 {#zhong-guo-guo-jia-ying-ji-guang-bo} -### 预警信息 {#zhong-guo-guo-jia-ying-ji-guang-bo-yu-jing-xin-xi} - -<Route author="muzea nczitzk" example="/cneb/yjxx" path="/cneb/yjxx/:level?/:province?/:city?" paramsDesc={['灾害级别,见下表,默认为全部', '省份,默认为空,即全国', '城市,默认为空,即全省']}> - 灾害级别 - - | 全部 | 红色 | 橙色 | 黄色 | 蓝色 | - | ---- | ---- | ---- | ---- | ---- | - | | 红色 | 橙色 | 黄色 | 蓝色 | - - :::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/广东省/广州市/黄色)。 - ::: -</Route> - ### 应急新闻 {#zhong-guo-guo-jia-ying-ji-guang-bo-ying-ji-xin-wen} -<Route author="nczitzk" example="/cneb/yjxw" path="/cneb/yjxw/:category?" paramsDesc={['分类,见下表,默认为全部']}> - | 全部 | 国内新闻 | 国际新闻 | - | ---- | -------- | -------- | - | | gnxw | gjxw | -</Route> +<Route namespace="cneb" data={{"path":"/yjxw/:category?","categories":["forecast"],"example":"/cneb/yjxw","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cneb.gov.cn/yjxw/:category?","cneb.gov.cn/"]},"name":"应急新闻","maintainers":["nczitzk"],"description":"| 全部 | 国内新闻 | 国际新闻 |\n | ---- | -------- | -------- |\n | | gnxw | gjxw |","location":"yjxw.ts"}} /> + +| 全部 | 国内新闻 | 国际新闻 | +| ---- | -------- | -------- | +| | gnxw | gjxw | ## 中国气象局 {#zhong-guo-qi-xiang-ju} ### 天气预报频道 {#zhong-guo-qi-xiang-ju-tian-qi-yu-bao-pin-dao} -<Route author="nczitzk" example="/cma/channel/380" path="/cma/channel/:id?" paramsDesc={['分类,见下表,可在对应频道页 URL 中找到,默认为 380,即每日天气提示']} radar="1"> - #### 天气实况 +<Route namespace="cma" data={{"path":"/channel/:id?","categories":["forecast"],"example":"/cma/channel/380","parameters":{"id":"分类,见下表,可在对应频道页 URL 中找到,默认为 380,即每日天气提示"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"天气预报频道","maintainers":["nczitzk"],"description":"#### 天气实况\n\n | 频道名称 | 频道 id |\n | -------- | -------------------------------- |\n | 卫星云图 | d3236549863e453aab0ccc4027105bad |\n | 单站雷达 | 103 |\n | 降水量 | 18 |\n | 气温 | 32 |\n | 土壤水分 | 45 |\n\n #### 气象公报\n\n | 频道名称 | 频道 id |\n | -------------- | -------------------------------- |\n | 每日天气提示 | 380 |\n | 重要天气提示 | da5d55817ad5430fb9796a0780178533 |\n | 天气公报 | 3780 |\n | 强对流天气预报 | 383 |\n | 交通气象预报 | 423 |\n | 森林火险预报 | 424 |\n | 海洋天气公报 | 452 |\n | 环境气象公报 | 467 |\n\n :::tip\n 订阅更多细分频道,请前往对应上级频道页,使用下拉菜单选择项目后跳转到目标频道页,查看其 URL 找到对应频道 id\n :::","location":"channel.ts"}} /> - | 频道名称 | 频道 id | - | -------- | -------------------------------- | - | 卫星云图 | d3236549863e453aab0ccc4027105bad | - | 单站雷达 | 103 | - | 降水量 | 18 | - | 气温 | 32 | - | 土壤水分 | 45 | +#### 天气实况 {#zhong-guo-qi-xiang-ju-tian-qi-yu-bao-pin-dao-tian-qi-shi-kuang} - #### 气象公报 +| 频道名称 | 频道 id | +| -------- | -------------------------------- | +| 卫星云图 | d3236549863e453aab0ccc4027105bad | +| 单站雷达 | 103 | +| 降水量 | 18 | +| 气温 | 32 | +| 土壤水分 | 45 | - | 频道名称 | 频道 id | - | -------------- | -------------------------------- | - | 每日天气提示 | 380 | - | 重要天气提示 | da5d55817ad5430fb9796a0780178533 | - | 天气公报 | 3780 | - | 强对流天气预报 | 383 | - | 交通气象预报 | 423 | - | 森林火险预报 | 424 | - | 海洋天气公报 | 452 | - | 环境气象公报 | 467 | +#### 气象公报 {#zhong-guo-qi-xiang-ju-tian-qi-yu-bao-pin-dao-qi-xiang-gong-bao} - :::tip - 订阅更多细分频道,请前往对应上级频道页,使用下拉菜单选择项目后跳转到目标频道页,查看其 URL 找到对应频道 id - ::: -</Route> +| 频道名称 | 频道 id | +| -------------- | -------------------------------- | +| 每日天气提示 | 380 | +| 重要天气提示 | da5d55817ad5430fb9796a0780178533 | +| 天气公报 | 3780 | +| 强对流天气预报 | 383 | +| 交通气象预报 | 423 | +| 森林火险预报 | 424 | +| 海洋天气公报 | 452 | +| 环境气象公报 | 467 | + +:::tip +订阅更多细分频道,请前往对应上级频道页,使用下拉菜单选择项目后跳转到目标频道页,查看其 URL 找到对应频道 id +::: + +## 中国人民银行 {#zhong-guo-ren-min-yin-hang} + +<details> + <summary>*业务咨询* 和 *投诉建议* 可用的站点参数</summary> + + | 上海市 | 北京市 | 天津市 | 河北省 | + | -------- | ------- | ------- | ------ | + | shanghai | beijing | tianjin | hebei | + + | 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | + | ------ | ------------ | -------- | ------ | + | shanxi | neimenggu | liaoning | jilin | + + | 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | + | ------------ | ------- | -------- | ------ | + | heilongjiang | jiangsu | zhejiang | anhui | + + | 福建省 | 江西省 | 山东省 | 河南省 | + | ------ | ------- | -------- | ------ | + | fujian | jiangxi | shandong | henan | + + | 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | + | ------ | ------ | --------- | -------------- | + | hubei | hunan | guangdong | guangxi | + + | 海南省 | 重庆市 | 四川省 | 贵州省 | + | ------ | --------- | ------- | ------- | + | hainan | chongqing | sichuan | guizhou | + + | 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | + | ------ | ---------- | ------- | ------ | + | yunnan | xizang | shaanxi | gansu | + + | 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | + | ------- | -------------- | ---------------- | ------ | + | qinghai | ningxia | xinjiang | dalian | + + | 宁波市 | 厦门市 | 青岛市 | 深圳市 | + | ------ | ------ | ------- | -------- | + | ningbo | xiamen | qingdao | shenzhen | +</details> + +### 广东省内城市预警信号 {#zhong-guo-ren-min-yin-hang-guang-dong-sheng-nei-cheng-shi-yu-jing-xin-hao} + +<Route namespace="gov" data={{"path":"/guangdong/tqyb/sncsyjxh","categories":["forecast"],"example":"/gov/guangdong/tqyb/sncsyjxh","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.tqyb.com.cn/gz/weatherAlarm/otherCity/"]},"name":"广东省内城市预警信号","maintainers":["Fatpandac"],"url":"www.tqyb.com.cn/gz/weatherAlarm/otherCity/","location":"guangdong/tqyb/sncsyjxh.ts"}} /> + +### 突发性天气提示 {#zhong-guo-ren-min-yin-hang-tu-fa-xing-tian-qi-ti-shi} + +<Route namespace="gov" data={{"path":"/guangdong/tqyb/tfxtq","categories":["forecast"],"example":"/gov/guangdong/tqyb/tfxtq","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.tqyb.com.cn/gz/weatherAlarm/suddenWeather/"]},"name":"突发性天气提示","maintainers":["Fatpandac"],"url":"www.tqyb.com.cn/gz/weatherAlarm/suddenWeather/","location":"guangdong/tqyb/tfxtq.ts"}} /> ## 中央气象台 {#zhong-yang-qi-xiang-tai} -### 全国气象预警 {#zhong-yang-qi-xiang-tai-quan-guo-qi-xiang-yu-jing} +### Unknown {#zhong-yang-qi-xiang-tai-unknown} -<Route author="ylc395" example="/nmc/weatheralarm/广东省" path="/nmc/weatheralarm/:province?" paramsDesc={['省份']}> - 可通过全局过滤参数订阅您感兴趣的地区. -</Route> +<Route namespace="nmc" data={{"path":"/weatheralarm/:province?","categories":["forecast"],"example":"/nmc/weatheralarm/广东省","parameters":{"province":"省份"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nmc.cn/publish/alarm.html","nmc.cn/"],"target":"/weatheralarm"},"name":"Unknown","maintainers":["ylc395"],"url":"nmc.cn/publish/alarm.html","location":"weatheralarm.ts"}} /> diff --git a/website/docs/routes/game.mdx b/website/docs/routes/game.mdx index 0f10463ae..c955cfea8 100644 --- a/website/docs/routes/game.mdx +++ b/website/docs/routes/game.mdx @@ -1,407 +1,316 @@ -# 🎮 Gaming +# game ## 3DMGame {#3dmgame} ### 新闻中心 {#3dmgame-xin-wen-zhong-xin} -<Route author="zhboner" example="/3dmgame/news" path="/3dmgame/news/:category?" paramsDesc={['分类名或 ID,见下表,默认为新闻推荐,ID 可从分类 URL 中找到,如 Steam 为 `22221`']} radar="1"> - | 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 | - | -------- | -------- | -------- | -------- | ----------- | - | | game | acg | next | news\_36\_1 | -</Route> +<Route namespace="3dmgame" data={{"path":"/news/:category?","categories":["game"],"example":"/3dmgame/news","parameters":{"category":"分类名或 ID,见下表,默认为新闻推荐,ID 可从分类 URL 中找到,如 Steam 为 `22221`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["3dmgame.com/news/:category?","3dmgame.com/news"]},"name":"新闻中心","maintainers":["zhboner"],"description":"| 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 |\n | -------- | -------- | -------- | -------- | ----------- |\n | | game | acg | next | news_36_1 |","location":"news-center.ts"}} /> -### 游戏资讯 {#3dmgame-you-xi-zi-xun} - -<Route author="sinchang jacky2001114 HenryQW" example="/3dmgame/detroitbecomehuman/news" path="/3dm/:name/:type?" paramsDesc={['游戏名字,可以在专题页的 url 中找到', '资讯类型,见下表,默认为 `news`']} radar="1"> - | 新闻 | 攻略 | 资源 | - | ---- | ---- | -------- | - | news | gl | resource | -</Route> +| 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 | +| -------- | -------- | -------- | -------- | ----------- | +| | game | acg | next | news\_36\_1 | ## 4Gamers {#4gamers} -### 最新消息 {#4gamers-zui-xin-xiao-xi} - -<Route author="TonyRL" example="/4gamers" path="/4gamers" radar="1" /> - -### 分类 {#4gamers-fen-lei} - -<Route author="hoilc" example="/4gamers/category/352" path="/4gamers/category/:category" paramsDesc={['分类 ID,可从分类 URL 中找到']} radar="1" /> - ### 标签 {#4gamers-biao-qian} -<Route author="hoilc" example="/4gamers/tag/限時免費" path="/4gamers/tag/:tag" paramsDesc={['标签名,可在标签 URL 中找到']} radar="1" /> +<Route namespace="4gamers" data={{"path":"/tag/:tag","categories":["game"],"example":"/4gamers/tag/限時免費","parameters":{"tag":"标签名,可在标签 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.4gamers.com.tw/news/tag/:tag"]},"name":"标签","maintainers":["hoilc"],"url":"www.4gamers.com.tw/news","location":"tag.ts"}} /> ### 主題 {#4gamers-zhu-ti} -<Route author="bestpika" example="/4gamers/topic/gentlemen-topic" path="/4gamers/topic/:topic" paramsDesc={['主题,可在首页上方页面内找到']} radar="1" /> +<Route namespace="4gamers" data={{"path":"/topic/:topic","categories":["game"],"example":"/4gamers/topic/gentlemen-topic","parameters":{"topic":"主题,可在首页上方页面内找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.4gamers.com.tw/news/option-cfg/:topic"]},"name":"主題","maintainers":["bestpika"],"url":"www.4gamers.com.tw/news","location":"topic.ts"}} /> ## 5EPLAY {#5eplay} ### 新闻列表 {#5eplay-xin-wen-lie-biao} -<Route author="Dlouxgit" example="/5eplay/article" path="/5eplay/article" notOperational="1" /> - -## A9VG 电玩部落 {#a9vg-dian-wan-bu-luo} - -### 游戏新闻 {#a9vg-dian-wan-bu-luo-you-xi-xin-wen} - -<Route author="monnerHenster" example="/a9vg" path="/a9vg" radar="1" /> +<Route namespace="5eplay" data={{"path":"/article","categories":["game"],"example":"/5eplay/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["csgo.5eplay.com/","csgo.5eplay.com/article"]},"name":"新闻列表","maintainers":["Dlouxgit"],"url":"csgo.5eplay.com/","location":"index.ts"}} /> ## Blizzard {#blizzard} ### News {#blizzard-news} -<Route author="nczitzk" example="/blizzard/news" path="/blizzard/news/:language?/:category?" paramsDesc={['Language code, see below, en-US by default', 'Category, see below, All News by default']}> - Categories +<Route namespace="blizzard" data={{"path":"/news/:language?/:category?","categories":["game"],"example":"/blizzard/news","parameters":{"language":"Language code, see below, en-US by default","category":"Category, see below, All News by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["nczitzk"],"description":"Categories\n\n | Category | Slug |\n | ---------------------- | ------------------- |\n | All News | |\n | Diablo II: Resurrected | diablo2 |\n | Diablo III | diablo3 |\n | Diablo IV | diablo4 |\n | Diablo: Immortal | diablo-immortal |\n | Hearthstone | hearthstone |\n | Heroes of the Storm | heroes-of-the-storm |\n | Overwatch 2 | overwatch |\n | StarCraft: Remastered | starcraft |\n | StarCraft II | starcraft2 |\n | World of Warcraft | world-of-warcraft |\n | Warcraft III: Reforged | warcraft3 |\n | Battle.net | battlenet |\n | BlizzCon | blizzcon |\n | Inside Blizzard | blizzard |\n\n Language codes\n\n | Language | Code |\n | ------------------ | ----- |\n | Deutsch | de-de |\n | English (US) | en-us |\n | English (EU) | en-gb |\n | Español (EU) | es-es |\n | Español (Latino) | es-mx |\n | Français | fr-fr |\n | Italiano | it-it |\n | Português (Brasil) | pt-br |\n | Polski | pl-pl |\n | Русский | ru-ru |\n | 한국어 | ko-kr |\n | ภาษาไทย | th-th |\n | 日本語 | ja-jp |\n | 繁體中文 | zh-tw |","location":"news.ts"}} /> - | Category | Slug | - | ---------------------- | ------------------- | - | All News | | - | Diablo II: Resurrected | diablo2 | - | Diablo III | diablo3 | - | Diablo IV | diablo4 | - | Diablo: Immortal | diablo-immortal | - | Hearthstone | hearthstone | - | Heroes of the Storm | heroes-of-the-storm | - | Overwatch 2 | overwatch | - | StarCraft: Remastered | starcraft | - | StarCraft II | starcraft2 | - | World of Warcraft | world-of-warcraft | - | Warcraft III: Reforged | warcraft3 | - | Battle.net | battlenet | - | BlizzCon | blizzcon | - | Inside Blizzard | blizzard | +Categories - Language codes +| Category | Slug | +| ---------------------- | ------------------- | +| All News | | +| Diablo II: Resurrected | diablo2 | +| Diablo III | diablo3 | +| Diablo IV | diablo4 | +| Diablo: Immortal | diablo-immortal | +| Hearthstone | hearthstone | +| Heroes of the Storm | heroes-of-the-storm | +| Overwatch 2 | overwatch | +| StarCraft: Remastered | starcraft | +| StarCraft II | starcraft2 | +| World of Warcraft | world-of-warcraft | +| Warcraft III: Reforged | warcraft3 | +| Battle.net | battlenet | +| BlizzCon | blizzcon | +| Inside Blizzard | blizzard | - | Language | Code | - | ------------------ | ----- | - | Deutsch | de-de | - | English (US) | en-us | - | English (EU) | en-gb | - | Español (EU) | es-es | - | Español (Latino) | es-mx | - | Français | fr-fr | - | Italiano | it-it | - | Português (Brasil) | pt-br | - | Polski | pl-pl | - | Русский | ru-ru | - | 한국어 | ko-kr | - | ภาษาไทย | th-th | - | 日本語 | ja-jp | - | 繁體中文 | zh-tw | -</Route> +Language codes -## dekudeals {#dekudeals} - -### Category {#dekudeals-category} - -<Route author="LogicJake" example="/dekudeals/most-wanted" path="/dekudeals/:type" paramsDesc={['Category name']} /> +| Language | Code | +| ------------------ | ----- | +| Deutsch | de-de | +| English (US) | en-us | +| English (EU) | en-gb | +| Español (EU) | es-es | +| Español (Latino) | es-mx | +| Français | fr-fr | +| Italiano | it-it | +| Português (Brasil) | pt-br | +| Polski | pl-pl | +| Русский | ru-ru | +| 한국어 | ko-kr | +| ภาษาไทย | th-th | +| 日本語 | ja-jp | +| 繁體中文 | zh-tw | ## Dorohedoro {#dorohedoro} ### News {#dorohedoro-news} -<Route author="nczitzk" example="/dorohedoro/news" path="/dorohedoro/news" /> +<Route namespace="dorohedoro" data={{"path":"/news","categories":["game"],"example":"/dorohedoro/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dorohedoro.net/news","dorohedoro.net/"]},"name":"News","maintainers":["nczitzk"],"url":"dorohedoro.net/news","location":"news.ts"}} /> ## Epic Games Store {#epic-games-store} ### Free games {#epic-games-store-free-games} -<Route author="Zyx-A nczitzk KotaHv" example="/epicgames/freegames" path="/epicgames/freegames/:locale?/:country?" paramsDesc={['Locale, en_US by default', 'Country, US by default']} /> - -## Fate Grand Order {#fate-grand-order} - -### News {#fate-grand-order-news} - -<Route author="nczitzk" example="/fgo/news" path="/fgo/news" /> +<Route namespace="epicgames" data={{"path":"/freegames/:locale?/:country?","categories":["game"],"example":"/epicgames/freegames","parameters":{"locale":"Locale, en_US by default","country":"Country, US by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["store.epicgames.com/:locale/free-games"],"target":"/freegames/:locale"},"name":"Free games","maintainers":["DIYgod","NeverBehave","Zyx-A","junfengP","nczitzk","KotaHv"],"location":"index.ts"}} /> ## FINAL FANTASY XIV 最终幻想 14 {#final-fantasy-xiv-zui-zhong-huan-xiang-14} -### 最终幻想 14 国服 {#final-fantasy-xiv-zui-zhong-huan-xiang-14-zui-zhong-huan-xiang-14-guo-fu} +### FINAL FANTASY XIV (The Lodestone) {#final-fantasy-xiv-zui-zhong-huan-xiang-14-final-fantasy-xiv-the-lodestone} -<Route author="Kiotlin" example="/ff14/zh/news" path="/ff14/zh/:type?" paramsDesc={['分类名,预设为 `all`']}> - | 新闻 | 公告 | 活动 | 广告 | 所有 | - | ---- | -------- | ------ | --------- | ---- | - | news | announce | events | advertise | all | -</Route> +<Route namespace="ff14" data={{"path":["/global/:lang/:type?","/ff14_global/:lang/:type?"],"categories":["game"],"example":"/ff14/global/na/all","parameters":{"lang":"Region","type":"Category, `all` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"FINAL FANTASY XIV (The Lodestone)","maintainers":["chengyuhui"],"description":"Region\n\n | North Ameria | Europe | France | Germany | Japan |\n | ------------ | ------ | ------ | ------- | ----- |\n | na | eu | fr | de | jp |\n\n Category\n\n | all | topics | notices | maintenance | updates | status | developers |\n | --- | ------ | ------- | ----------- | ------- | ------ | ---------- |","location":"ff14-global.ts"}} /> + +Region + +| North Ameria | Europe | France | Germany | Japan | +| ------------ | ------ | ------ | ------- | ----- | +| na | eu | fr | de | jp | + +Category + +| all | topics | notices | maintenance | updates | status | developers | +| --- | ------ | ------- | ----------- | ------- | ------ | ---------- | ### FINAL FANTASY XIV (The Lodestone) {#final-fantasy-xiv-zui-zhong-huan-xiang-14-final-fantasy-xiv-the-lodestone} -<Route author="chengyuhui" example="/ff14/global/na/all" path="/ff14/global/:lang/:type?" paramsDesc={['Region', 'Category, `all` by default']}> - Region +<Route namespace="ff14" data={{"path":["/global/:lang/:type?","/ff14_global/:lang/:type?"],"categories":["game"],"example":"/ff14/global/na/all","parameters":{"lang":"Region","type":"Category, `all` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"FINAL FANTASY XIV (The Lodestone)","maintainers":["chengyuhui"],"description":"Region\n\n | North Ameria | Europe | France | Germany | Japan |\n | ------------ | ------ | ------ | ------- | ----- |\n | na | eu | fr | de | jp |\n\n Category\n\n | all | topics | notices | maintenance | updates | status | developers |\n | --- | ------ | ------- | ----------- | ------- | ------ | ---------- |","location":"ff14-global.ts"}} /> - | North Ameria | Europe | France | Germany | Japan | - | ------------ | ------ | ------ | ------- | ----- | - | na | eu | fr | de | jp | +Region - Category +| North Ameria | Europe | France | Germany | Japan | +| ------------ | ------ | ------ | ------- | ----- | +| na | eu | fr | de | jp | - | all | topics | notices | maintenance | updates | status | developers | - | --- | ------ | ------- | ----------- | ------- | ------ | ---------- | -</Route> +Category + +| all | topics | notices | maintenance | updates | status | developers | +| --- | ------ | ------- | ----------- | ------- | ------ | ---------- | + +### 最终幻想 14 国服 {#final-fantasy-xiv-zui-zhong-huan-xiang-14-zui-zhong-huan-xiang-14-guo-fu} + +<Route namespace="ff14" data={{"path":["/zh/:type?","/ff14_zh/:type?"],"categories":["game"],"example":"/ff14/zh/news","parameters":{"type":"分类名,预设为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ff.web.sdo.com/web8/index.html"],"target":"/zh"},"name":"最终幻想 14 国服","maintainers":["Kiotlin","ZeroClad","15x15G"],"url":"ff.web.sdo.com/web8/index.html","description":"| 新闻 | 公告 | 活动 | 广告 | 所有 |\n | ---- | -------- | ------ | --------- | ---- |\n | news | announce | events | advertise | all |","location":"ff14-zh.ts"}} /> + +| 新闻 | 公告 | 活动 | 广告 | 所有 | +| ---- | -------- | ------ | --------- | ---- | +| news | announce | events | advertise | all | + +### 最终幻想 14 国服 {#final-fantasy-xiv-zui-zhong-huan-xiang-14-zui-zhong-huan-xiang-14-guo-fu} + +<Route namespace="ff14" data={{"path":["/zh/:type?","/ff14_zh/:type?"],"categories":["game"],"example":"/ff14/zh/news","parameters":{"type":"分类名,预设为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ff.web.sdo.com/web8/index.html"],"target":"/zh"},"name":"最终幻想 14 国服","maintainers":["Kiotlin","ZeroClad","15x15G"],"url":"ff.web.sdo.com/web8/index.html","description":"| 新闻 | 公告 | 活动 | 广告 | 所有 |\n | ---- | -------- | ------ | --------- | ---- |\n | news | announce | events | advertise | all |","location":"ff14-zh.ts"}} /> + +| 新闻 | 公告 | 活动 | 广告 | 所有 | +| ---- | -------- | ------ | --------- | ---- | +| news | announce | events | advertise | all | ## Fortnite {#fortnite} ### News {#fortnite-news} -<Route author="lyqluis" example="/fortnite/news" path="/fortnite/news/:options?" paramsDesc={['Params']} radar="1" puppeteer="1"> - - `options.lang`, optional, language, eg. `/fortnite/news/lang=en-US`, common languages are listed below, more languages are available one the [official website](https://www.fortnite.com/news) +<Route namespace="fortnite" data={{"path":"/news/:options?","categories":["game"],"example":"/fortnite/news","parameters":{"options":"Params"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["lyqluis"],"description":"- `options.lang`, optional, language, eg. `/fortnite/news/lang=en-US`, common languages are listed below, more languages are available one the [official website](https://www.fortnite.com/news)\n\n | English (default) | Spanish | Japanese | French | Korean | Polish |\n | ----------------- | ------- | -------- | ------ | ------ | ------ |\n | en-US | es-ES | ja | fr | ko | pl |","location":"news.ts"}} /> - | English (default) | Spanish | Japanese | French | Korean | Polish | - | ----------------- | ------- | -------- | ------ | ------ | ------ | - | en-US | es-ES | ja | fr | ko | pl | -</Route> +- `options.lang`, optional, language, eg. `/fortnite/news/lang=en-US`, common languages are listed below, more languages are available one the [official website](https://www.fortnite.com/news) -## GameApps.hk 香港手机游戏网 {#gameapps-hk-xiang-gang-shou-ji-you-xi-wang} - -### 最新消息 {#gameapps-hk-xiang-gang-shou-ji-you-xi-wang-zui-xin-xiao-xi} - -<Route author="TonyRL" example="/gameapps" path="/gameapps" /> +| English (default) | Spanish | Japanese | French | Korean | Polish | +| ----------------- | ------- | -------- | ------ | ------ | ------ | +| en-US | es-ES | ja | fr | ko | pl | ## Gamer Secret {#gamer-secret} -### Latest News {#gamer-secret-latest-news} - -<Route author="nczitzk" example="/gamersecret" path="/gamersecret" notOperational="1" /> - ### Category {#gamer-secret-category} -<Route author="nczitzk" example="/gamersecret" path="/gamersecret/:type?/:category?" paramsDesc={['Type, see below, Latest News by default', 'Category, see below']} notOperational="1"> - | Latest News | PC | Playstation | Nintendo | Xbox | Moblie | - | ----------- | -- | ----------- | -------- | ---- | ------ | - | latest-news | pc | playstation | nintendo | xbox | moblie | +<Route namespace="gamersecret" data={{"path":"/:type?/:category?","categories":["game"],"example":"/gamersecret","parameters":{"type":"Type, see below, Latest News by default","category":"Category, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gamersecret.com/:type","gamersecret.com/:type/:category","gamersecret.com/"]},"name":"Category","maintainers":["nczitzk"],"description":"| Latest News | PC | Playstation | Nintendo | Xbox | Moblie |\n | ----------- | -- | ----------- | -------- | ---- | ------ |\n | latest-news | pc | playstation | nintendo | xbox | moblie |\n\n Or\n\n | GENERAL | GENERAL EN | MOBILE | MOBILE EN |\n | ---------------- | ------------------ | --------------- | ----------------- |\n | category/general | category/generalen | category/mobile | category/mobileen |\n\n | NINTENDO | NINTENDO EN | PC | PC EN |\n | ----------------- | ------------------- | ----------- | ------------- |\n | category/nintendo | category/nintendoen | category/pc | category/pcen |\n\n | PLAYSTATION | PLAYSTATION EN | REVIEWS |\n | -------------------- | ---------------------- | ---------------- |\n | category/playstation | category/playstationen | category/reviews |\n\n | XBOX | XBOX EN |\n | ------------- | --------------- |\n | category/xbox | category/xboxen |","location":"index.ts"}} /> - Or +| Latest News | PC | Playstation | Nintendo | Xbox | Moblie | +| ----------- | -- | ----------- | -------- | ---- | ------ | +| latest-news | pc | playstation | nintendo | xbox | moblie | - | GENERAL | GENERAL EN | MOBILE | MOBILE EN | - | ---------------- | ------------------ | --------------- | ----------------- | - | category/general | category/generalen | category/mobile | category/mobileen | +Or - | NINTENDO | NINTENDO EN | PC | PC EN | - | ----------------- | ------------------- | ----------- | ------------- | - | category/nintendo | category/nintendoen | category/pc | category/pcen | +| GENERAL | GENERAL EN | MOBILE | MOBILE EN | +| ---------------- | ------------------ | --------------- | ----------------- | +| category/general | category/generalen | category/mobile | category/mobileen | - | PLAYSTATION | PLAYSTATION EN | REVIEWS | - | -------------------- | ---------------------- | ---------------- | - | category/playstation | category/playstationen | category/reviews | +| NINTENDO | NINTENDO EN | PC | PC EN | +| ----------------- | ------------------- | ----------- | ------------- | +| category/nintendo | category/nintendoen | category/pc | category/pcen | - | XBOX | XBOX EN | - | ------------- | --------------- | - | category/xbox | category/xboxen | -</Route> +| PLAYSTATION | PLAYSTATION EN | REVIEWS | +| -------------------- | ---------------------- | ---------------- | +| category/playstation | category/playstationen | category/reviews | -## GameRes 游资网 {#gameres-you-zi-wang} - -### 热点推荐 {#gameres-you-zi-wang-re-dian-tui-jian} - -<Route author="nczitzk" example="/gameres/hot" path="/gameres/hot" /> - -### 列表 {#gameres-you-zi-wang-lie-biao} - -<Route author="nczitzk" example="/gameres/list/26" path="/gameres/list/:id" paramsDesc={['列表 id']}> - 产业 - - | 厂商・专访 | 观察・投资 | 产品 | 政策 | 电子竞技 | 直播 | 区块链 | - | ---------- | ---------- | ---- | ---- | -------- | ---- | ------ | - | 1 | 11 | 6 | 45 | 14 | 42 | 41 | - - 平台 - - | 手游 | 页游・H5 | 端游・PC | 主机 | 虚拟・VR・AR | 云游戏 | - | ---- | -------- | -------- | ---- | ------------ | ------ | - | 5 | 17 | 18 | 21 | 16 | 48 | - - 研发 - - | 拆解分析 | 策划 | 程序・引擎 | 美术 | 音乐 | 测试 | - | -------- | ---- | ---------- | ---- | ---- | ---- | - | 24 | 25 | 26 | 27 | 28 | 29 | - - 市场 - - | 职场・创业 | 运营・渠道 | 海外 | 数据・报告 | App Store | Steam | - | ---------- | ---------- | ---- | ---------- | --------- | ----- | - | 38 | 34 | 47 | 33 | 46 | 40 | - - 其他 - - | 原创 | 硬件・周边 | 八卦 | 活动 | 综合 | - | ---- | ---------- | ---- | ---- | ---- | - | 43 | 44 | 15 | 22 | 39 | -</Route> - -## GNN.tw 游戏新闻 {#gnn-tw-you-xi-xin-wen} - -### GNN.tw 游戏新闻 {#gnn-tw-you-xi-xin-wen-gnn-tw-you-xi-xin-wen} - -<Route author="monnerHenster" example="/gnn/gnn" path="/gnn/gnn" /> +| XBOX | XBOX EN | +| ------------- | --------------- | +| category/xbox | category/xboxen | ## HoYoLAB {#hoyolab} ### Official Announcement {#hoyolab-official-announcement} -<Route author="ZenoTian" example="/hoyolab/news/zh-cn/2/2" path="/hoyolab/news/:language/:gids/:type" paramsDesc={['Language', 'Game ID', 'Announcement type']} radar="1"> - | Language | Code | - | ---------------- | ----- | - | 简体中文 | zh-cn | - | 繁體中文 | zh-tw | - | 日本語 | ja-jp | - | 한국어 | ko-kr | - | English (US) | en-us | - | Español (EU) | es-es | - | Français | fr-fr | - | Deutsch | de-de | - | Русский | ru-ru | - | Português | pt-pt | - | Español (Latino) | es-mx | - | Indonesia | id-id | - | Tiếng Việt | vi-vn | - | ภาษาไทย | th-th | +<Route namespace="hoyolab" data={{"path":"/news/:language/:gids/:type","categories":["game"],"example":"/hoyolab/news/zh-cn/2/2","parameters":{"language":"Language","gids":"Game ID","type":"Announcement type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Official Announcement","maintainers":["ZenoTian"],"description":"| Language | Code |\n | ---------------- | ----- |\n | 简体中文 | zh-cn |\n | 繁體中文 | zh-tw |\n | 日本語 | ja-jp |\n | 한국어 | ko-kr |\n | English (US) | en-us |\n | Español (EU) | es-es |\n | Français | fr-fr |\n | Deutsch | de-de |\n | Русский | ru-ru |\n | Português | pt-pt |\n | Español (Latino) | es-mx |\n | Indonesia | id-id |\n | Tiếng Việt | vi-vn |\n | ภาษาไทย | th-th |\n\n | Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero |\n | ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- |\n | 1 | 2 | 4 | 5 | 6 | 8 |\n\n | Notices | Events | Info |\n | ------- | ------ | ---- |\n | 1 | 2 | 3 |","location":"news.ts"}} /> - | Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero | - | ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- | - | 1 | 2 | 4 | 5 | 6 | 8 | +| Language | Code | +| ---------------- | ----- | +| 简体中文 | zh-cn | +| 繁體中文 | zh-tw | +| 日本語 | ja-jp | +| 한국어 | ko-kr | +| English (US) | en-us | +| Español (EU) | es-es | +| Français | fr-fr | +| Deutsch | de-de | +| Русский | ru-ru | +| Português | pt-pt | +| Español (Latino) | es-mx | +| Indonesia | id-id | +| Tiếng Việt | vi-vn | +| ภาษาไทย | th-th | - | Notices | Events | Info | - | ------- | ------ | ---- | - | 1 | 2 | 3 | -</Route> +| Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero | +| ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- | +| 1 | 2 | 4 | 5 | 6 | 8 | + +| Notices | Events | Info | +| ------- | ------ | ---- | +| 1 | 2 | 3 | ## indienova 独立游戏 {#indienova-du-li-you-xi} -### 文章 {#indienova-du-li-you-xi-wen-zhang} +### Unknown {#indienova-du-li-you-xi-unknown} -<Route author="GensouSakuya kt286" example="/indienova/article" path="indienova/:type" paramsDesc={['类型: `article` 文章,`development` 开发']} radar="1" /> - -### 专题 {#indienova-du-li-you-xi-zhuan-ti} - -<Route author="TonyRL" example="/indienova/column/52" path="/indienova/column/:columnId" paramsDesc={['专题 ID,可在 URL中找到']} radar="1"> - <details> - <summary>专题 ID</summary> - - 游戏推荐 - - | itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 | - | --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- | - | 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 | - - 游戏评论 - - | 游必有方 Podcast | 独立游戏潮(RED) | - | ---------------- | ----------------- | - | 6 | 3 | - - 游戏开发 - - | 游戏设计模式 | Roguelike 开发 | GMS 中文教程 | - | ------------ | -------------- | ------------ | - | 15 | 14 | 7 | - - 游戏设计 - - | 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 | - | ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- | - | 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 | - - 游戏文化 - - | NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING | - | --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- | - | 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 | - - Game Jam - - | Ludum Dare | Global Game Jam | - | ---------- | --------------- | - | 31 | 13 | - </details> -</Route> - -### GameDB 游戏库 {#indienova-du-li-you-xi-gamedb-you-xi-ku} - -<Route author="TonyRL" example="/indienova/gamedb/recent" path="/indienova/gamedb/recent/:platform?" paramsDesc={['平台,见下表,留空为 `all`']} radar="1"> - | 全部 | PS4 | XBOX One | Nintendo Switch | - | ---- | --- | -------- | --------------- | - | all | ps4 | xboxone | nintendo-switch | -</Route> +<Route namespace="indienova" data={{"path":"/:type","categories":["game"],"example":"/indienova/article","parameters":{"type":"类型: `article` 文章,`development` 开发"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["GensouSakuya","kt286"],"location":"article.ts"}} /> ### 会员开发游戏库 {#indienova-du-li-you-xi-hui-yuan-kai-fa-you-xi-ku} -<Route author="TonyRL" example="/indienova/usergames" path="/indienova/usergames" radar="1" /> +<Route namespace="indienova" data={{"path":"/usergames","categories":["game"],"example":"/indienova/usergames","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["indienova.com/usergames","indienova.com/"]},"name":"会员开发游戏库","maintainers":["TonyRL"],"url":"indienova.com/usergames","location":"usergames.ts"}} /> + +### 专题 {#indienova-du-li-you-xi-zhuan-ti} + +<Route namespace="indienova" data={{"path":"/column/:columnId","categories":["game"],"example":"/indienova/column/52","parameters":{"columnId":"专题 ID,可在 URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["indienova.com/column/:columnId"]},"name":"专题","maintainers":["TonyRL"],"description":"<details>\n <summary>专题 ID</summary>\n\n 游戏推荐\n\n | itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 |\n | --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- |\n | 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 |\n\n 游戏评论\n\n | 游必有方 Podcast | 独立游戏潮(RED) |\n | ---------------- | ----------------- |\n | 6 | 3 |\n\n 游戏开发\n\n | 游戏设计模式 | Roguelike 开发 | GMS 中文教程 |\n | ------------ | -------------- | ------------ |\n | 15 | 14 | 7 |\n\n 游戏设计\n\n | 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 |\n | ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- |\n | 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 |\n\n 游戏文化\n\n | NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING |\n | --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- |\n | 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 |\n\n Game Jam\n\n | Ludum Dare | Global Game Jam |\n | ---------- | --------------- |\n | 31 | 13 |\n </details>","location":"column.ts"}} /> + +<details> + <summary>专题 ID</summary> + + 游戏推荐 + + | itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 | + | --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- | + | 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 | + + 游戏评论 + + | 游必有方 Podcast | 独立游戏潮(RED) | + | ---------------- | ----------------- | + | 6 | 3 | + + 游戏开发 + + | 游戏设计模式 | Roguelike 开发 | GMS 中文教程 | + | ------------ | -------------- | ------------ | + | 15 | 14 | 7 | + + 游戏设计 + + | 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 | + | ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- | + | 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 | + + 游戏文化 + + | NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING | + | --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- | + | 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 | + + Game Jam + + | Ludum Dare | Global Game Jam | + | ---------- | --------------- | + | 31 | 13 | +</details> ## itch.io {#itch-io} -### Browse {#itch-io-browse} - -<Route author="nczitzk" example="/itch/games/new-and-popular/featured" path="/itch/:params?" paramsDesc={['Params']}> - `params` 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 at [here](https://itch.io/tags). - ::: -</Route> - ### Developer Logs {#itch-io-developer-logs} -<Route author="nczitzk" example="/itch/devlog/teamterrible/the-baby-in-yellow" path="/itch/devlog/:user/:id" paramsDesc={['User id, can be found in URL', 'Item id, can be found in URL']}> - `User id` is the field before `.itch.io` in the URL of the corresponding page, e.g. the URL of [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field before `.itch.io` is `teamterrible`. +<Route namespace="itch" data={{"path":"/devlog/:user/:id","categories":["game"],"example":"/itch/devlog/teamterrible/the-baby-in-yellow","parameters":{"user":"User id, can be found in URL","id":"Item id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Developer Logs","maintainers":["nczitzk"],"description":"`User id` is the field before `.itch.io` in the URL of the corresponding page, e.g. the URL of [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field before `.itch.io` is `teamterrible`.\n\n `Item id` is the field between `itch.io` and `/devlog` in the URL of the corresponding page, e.g. the URL for [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field between `itch.io` and `/devlog` is `the-baby-in-yellow`.\n\n So the route is [`/itch/devlogs/teamterrible/the-baby-in-yellow`](https://rsshub.app/itch/devlogs/teamterrible/the-baby-in-yellow).","location":"devlog.ts"}} /> - `Item id` is the field between `itch.io` and `/devlog` in the URL of the corresponding page, e.g. the URL for [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field between `itch.io` and `/devlog` is `the-baby-in-yellow`. +`User id` is the field before `.itch.io` in the URL of the corresponding page, e.g. the URL of [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field before `.itch.io` is `teamterrible`. - So the route is [`/itch/devlogs/teamterrible/the-baby-in-yellow`](https://rsshub.app/itch/devlogs/teamterrible/the-baby-in-yellow). -</Route> +`Item id` is the field between `itch.io` and `/devlog` in the URL of the corresponding page, e.g. the URL for [The Baby In Yellow Devlog](https://teamterrible.itch.io/the-baby-in-yellow/devlog) is `https://teamterrible.itch.io/the-baby-in-yellow/devlog`, where the field between `itch.io` and `/devlog` is `the-baby-in-yellow`. + +So the route is [`/itch/devlogs/teamterrible/the-baby-in-yellow`](https://rsshub.app/itch/devlogs/teamterrible/the-baby-in-yellow). ### Posts {#itch-io-posts} -<Route author="nczitzk" example="/itch/posts/9539/introduce-yourself" path="/itch/posts/:topic/:id" paramsDesc={['Topic id, can be found in URL', 'Topic name, can be found in URL']} /> +<Route namespace="itch" data={{"path":"/posts/:topic/:id","categories":["game"],"example":"/itch/posts/9539/introduce-yourself","parameters":{"topic":"Topic id, can be found in URL","id":"Topic name, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["itch.io/t/:topic/:id"]},"name":"Posts","maintainers":["nczitzk"],"location":"posts.ts"}} /> ## JUMP {#jump} ### 游戏折扣 {#jump-you-xi-zhe-kou} -<Route author="zytomorrow" path="/jump/discount/:platform/:filter?/:countries?" example="/jump/discount/ps5/all" paramsDesc={['平台:switch,ps4,ps5,xbox,steam,epic', '过滤参数,all-全部,jx-精选,sd-史低,dl-独立,vip-会员', '地区,具体支持较多,可自信查看地区简写']}> - | switch | ps4 | ps5 | xbox | steam | epic | - | ------ | ---- | ---- | ------ | ----- | ------ | - | 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 | +<Route namespace="jump" data={{"path":"/discount/:platform/:filter?/:countries?","categories":["game"],"example":"/jump/discount/ps5/all","parameters":{"platform":"平台:switch,ps4,ps5,xbox,steam,epic","filter":"过滤参数,all-全部,jx-精选,sd-史低,dl-独立,vip-会员","countries":"地区,具体支持较多,可自信查看地区简写"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"游戏折扣","maintainers":["zytomorrow"],"description":"| switch | ps4 | ps5 | xbox | steam | epic |\n | ------ | ---- | ---- | ------ | ----- | ------ |\n | 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 |\n\n | filter | switch | ps4 | ps5 | steam |\n | ------ | ------ | --- | --- | ----- |\n | all | ✔ | ✔ | ✔ | ✔ |\n | jx | ✔ | ✔ | ❌ | ✔ |\n | sd | ✔ | ✔ | ✔ | ✔ |\n | dl | ❌ | ✔ | ❌ | ✔ |\n | vip | ❌ | ❌ | ✔ | ❌ |\n\n | 北美 | 欧洲(英语) | 法国 | 德国 | 日本 |\n | ---- | ------------ | ---- | ---- | ---- |\n | na | eu | fr | de | jp |","location":"discount.ts"}} /> - | filter | switch | ps4 | ps5 | steam | - | ------ | ------ | --- | --- | ----- | - | all | ✔ | ✔ | ✔ | ✔ | - | jx | ✔ | ✔ | ❌ | ✔ | - | sd | ✔ | ✔ | ✔ | ✔ | - | dl | ❌ | ✔ | ❌ | ✔ | - | vip | ❌ | ❌ | ✔ | ❌ | +| switch | ps4 | ps5 | xbox | steam | epic | +| ------ | ---- | ---- | ------ | ----- | ------ | +| 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 | - | 北美 | 欧洲(英语) | 法国 | 德国 | 日本 | - | ---- | ------------ | ---- | ---- | ---- | - | na | eu | fr | de | jp | -</Route> +| filter | switch | ps4 | ps5 | steam | +| ------ | ------ | --- | --- | ----- | +| all | ✔ | ✔ | ✔ | ✔ | +| jx | ✔ | ✔ | ❌ | ✔ | +| sd | ✔ | ✔ | ✔ | ✔ | +| dl | ❌ | ✔ | ❌ | ✔ | +| vip | ❌ | ❌ | ✔ | ❌ | + +| 北美 | 欧洲(英语) | 法国 | 德国 | 日本 | +| ---- | ------------ | ---- | ---- | ---- | +| na | eu | fr | de | jp | ## Liquipedia {#liquipedia} ### Dota2 战队最近比赛结果 {#liquipedia-dota2-zhan-dui-zui-jin-bi-sai-jie-guo} -<Route author="wzekin" example="/liquipedia/dota2/matches/Team_Aster" path="/liquipedia/dota2/matches/:id" paramsDesc={['战队名称,可在url中找到。例如:https://liquipedia.net/dota2/Team_Aster']} /> - -### Counter Strike Match Results {#liquipedia-counter-strike-match-results} - -<Route author="CookiePieWw" example="/liquipedia/counterstrike/matches/G2_Esports" path="/liquipedia/counterstrike/matches/:id" paramsDesc={['战队名称,可在url中找到。例如:https://liquipedia.net/counterstrike/G2_Esports']} /> +<Route namespace="liquipedia" data={{"path":"/dota2/matches/:id","categories":["game"],"example":"/liquipedia/dota2/matches/Team_Aster","parameters":{"id":"战队名称,可在url中找到。例如:https://liquipedia.net/dota2/Team_Aster"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["liquipedia.net/dota2/:id"]},"name":"Dota2 战队最近比赛结果","maintainers":["wzekin"],"location":"dota2-matches.ts"}} /> ## Minecraft {#minecraft} ### Java Game Update {#minecraft-java-game-update} -<Route author="TheresaQWQ" example="/minecraft/version" path="/minecraft/version" /> +<Route namespace="minecraft" data={{"path":"/version","categories":["game"],"example":"/minecraft/version","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["minecraft.net/"]},"name":"Java Game Update","maintainers":["TheresaQWQ"],"url":"minecraft.net/","location":"version.ts"}} /> ## Modrinth {#modrinth} ### Project versions {#modrinth-project-versions} -<Route author="SettingDust" example="/modrinth/project/sodium/versions" path="/modrinth/project/:id/versions/:routeParams?" paramsDesc={['Id or slug of the Modrinth project','Extra route params. See the table below for options']} radar="1" /> +<Route namespace="modrinth" data={{"path":"/models","categories":["game"],"example":"/modrinth/project/sodium/versions","parameters":{"id":"Id or slug of the Modrinth project","routeParams":"Extra route params. See the table below for options"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["modrinth.com/mod/:id/*","modrinth.com/plugin/:id/*","modrinth.com/datapack/:id/*","modrinth.com/shader/:id/*","modrinth.com/resourcepack/:id/*","modrinth.com/modpack/:id/*","modrinth.com/mod/:id","modrinth.com/plugin/:id","modrinth.com/datapack/:id","modrinth.com/shader/:id","modrinth.com/resourcepack/:id","modrinth.com/modpack/:id"],"target":"/project/:id/versions"},"description":"| Name | Example |\n| -------------- | -------------------------------------------- |\n| loaders | loaders=fabric&loaders=quilt&loaders=forge |\n| game_versions | game_versions=1.20.1&game_versions=1.20.2 |\n| featured | featured=true |","name":"Project versions","maintainers":["SettingDust"],"location":"versions.ts"}} /> | Name | Example | | -------------- | -------------------------------------------- | @@ -411,679 +320,389 @@ ## Nintendo {#nintendo} -### eShop New Game Releases {#nintendo-eshop-new-game-releases} +### Nintendo Direct {#nintendo-nintendo-direct} -<Route author="HFO4" example="/nintendo/eshop/hk" path="/nintendo/eshop/:region" paramsDesc={['Region, currently supports `hk`(Hong Kong), `jp`(Japan) and `us`(USA)']} notOperational="1" /> +<Route namespace="nintendo" data={{"path":"/direct","categories":["game"],"example":"/nintendo/direct","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nintendo.com/nintendo-direct/archive","nintendo.com/"]},"name":"Nintendo Direct","maintainers":["HFO4"],"url":"nintendo.com/nintendo-direct/archive","location":"direct.ts"}} /> ### News(Hong Kong only) {#nintendo-news-hong-kong-only} -<Route author="HFO4" example="/nintendo/news" path="/nintendo/news" notOperational="1" /> - -### 首页资讯(中国) {#nintendo-shou-ye-zi-xun-zhong-guo} - -<Route author="NeverBehave" example="/nintendo/news/china" path="/nintendo/news/china" /> - -### Nintendo Direct {#nintendo-nintendo-direct} - -<Route author="HFO4" example="/nintendo/direct" path="/nintendo/direct" /> +<Route namespace="nintendo" data={{"path":"/news","categories":["game"],"example":"/nintendo/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nintendo.com.hk/topics","nintendo.com.hk/"]},"name":"News(Hong Kong only)","maintainers":["HFO4"],"url":"nintendo.com.hk/topics","location":"news.ts"}} /> ### Switch System Update(Japan) {#nintendo-switch-system-update-japan} -<Route author="hoilc" example="/nintendo/system-update" path="/nintendo/system-update" /> +<Route namespace="nintendo" data={{"path":"/system-update","categories":["game"],"example":"/nintendo/system-update","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nintendo.co.jp/support/switch/system_update/index.html","nintendo.co.jp/"]},"name":"Switch System Update(Japan)","maintainers":["hoilc"],"url":"nintendo.co.jp/support/switch/system_update/index.html","location":"system-update.ts"}} /> + +### 首页资讯(中国) {#nintendo-shou-ye-zi-xun-zhong-guo} + +<Route namespace="nintendo" data={{"path":"/news/china","categories":["game"],"example":"/nintendo/news/china","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nintendoswitch.com.cn/"]},"name":"首页资讯(中国)","maintainers":["NeverBehave"],"url":"nintendoswitch.com.cn/","location":"news-china.ts"}} /> ## osu! {#osu} ### Beatmap Packs {#osu-beatmap-packs} -<Route author="JimenezLi" example="/osu/packs" path="/osu/packs/:type?" paramsDesc={['pack type, default to `standard`, can choose from `featured`, `tournament`, `loved`, `chart`, `theme` and `artist`']} radar="1" /> +<Route namespace="osu" data={{"path":"/packs/:type?","categories":["game"],"example":"/osu/packs","parameters":{"type":"pack type, default to `standard`, can choose from `featured`, `tournament`, `loved`, `chart`, `theme` and `artist`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Beatmap Packs","maintainers":["JimenezLi"],"location":"beatmaps/packs.ts"}} /> ## PlayStation Store {#playstation-store} -### PlayStation Network user trophy {#playstation-store-playstation-network-user-trophy} - -<Route author="DIYgod" example="/ps/trophy/DIYgod_" path="/ps/trophy/:id" paramsDesc={['User ID']} radar="1" anticrawler="1" /> - ### PlayStation Monthly Games {#playstation-store-playstation-monthly-games} -<Route author="justjustCC" example="/ps/monthly-games" path="/ps/monthly-games" /> +<Route namespace="ps" data={{"path":"/monthly-games","categories":["game"],"example":"/ps/monthly-games","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.playstation.com/en-sg/ps-plus/whats-new"]},"name":"PlayStation Monthly Games","maintainers":["justjustCC"],"url":"www.playstation.com/en-sg/ps-plus/whats-new","location":"monthly-games.ts"}} /> + +### PlayStation Network user trophy {#playstation-store-playstation-network-user-trophy} + +<Route namespace="ps" data={{"path":"/trophy/:id","categories":["game"],"example":"/ps/trophy/DIYgod_","parameters":{"id":"User ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"PlayStation Network user trophy","maintainers":["DIYgod"],"location":"trophy.ts"}} /> ## PRINCESS CONNECT! Re Dive プリンセスコネクト!Re Dive {#princess-connect-re-dive-%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BB%E3%82%B9%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%88%EF%BC%81re-dive} ### 日服公告 {#princess-connect-re-dive-%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BB%E3%82%B9%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%88%EF%BC%81re-dive-ri-fu-gong-gao} -<Route author="SayaSS" example="/priconne-redive/news" path="/priconne-redive/news" radar="1" /> - -### 台服公告 {#princess-connect-re-dive-%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BB%E3%82%B9%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%88%EF%BC%81re-dive-tai-fu-gong-gao} - -<Route author="hoilc" example="/pcr/news-tw" path="/pcr/news-tw" /> - -### 国服公告 {#princess-connect-re-dive-%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BB%E3%82%B9%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%88%EF%BC%81re-dive-guo-fu-gong-gao} - -<Route author="KotoriK" example="/pcr/news-cn" path="/pcr/news-cn" /> - -## PSN 中文站 {#psn-zhong-wen-zhan} - -### 首页 - 白金攻略 / 游戏开箱 {#psn-zhong-wen-zhan-shou-ye-bai-jin-gong-lve-you-xi-kai-xiang} - -<Route author="LightStrawberry" example="/psnine/index" path="/psnine/index" /> - -### 节点 {#psn-zhong-wen-zhan-jie-dian} - -<Route author="nczitzk" example="/psnine/node/news" path="/psnine/node/:id?/:order?" paramsDesc={['节点 id,见下表,默认为 news', '排序,可选 `date` 即最新,默认为 `obdate` 即综合排序']}> - | 站务 | 活动 | 旅记 | 折扣 | 会免 | - | ---- | ----- | ------ | ---- | ---- | - | p9 | event | travel | off | plus | - - | 新闻 | 攻略 | 测评 | 心得 | 开箱 | - | ---- | ----- | ------ | ---- | ------- | - | news | guide | review | exp | openbox | - - | 游列 | 游计 | Ps4 | Ps5 | - | -------- | -------- | --- | --- | - | gamelist | planlist | ps4 | ps5 | - - | 发米通 | Ign | Ucg | - | ------- | --- | --- | - | famitsu | ign | ucg | -</Route> - -### 数折 - 折扣信息推送 {#psn-zhong-wen-zhan-shu-zhe-zhe-kou-xin-xi-tui-song} - -<Route author="LightStrawberry" example="/psnine/shuzhe" path="/psnine/shuzhe" /> - -### 闲游 - 二手盘信息 {#psn-zhong-wen-zhan-xian-you-er-shou-pan-xin-xi} - -<Route author="LightStrawberry" example="/psnine/trade" path="/psnine/trade" /> - -### 游戏 - 新游戏奖杯信息 {#psn-zhong-wen-zhan-you-xi-xin-you-xi-jiang-bei-xin-xi} - -<Route author="LightStrawberry" example="/psnine/game" path="/psnine/game" /> - -## Rockstar Games Social Club {#rockstar-games-social-club} - -### 在线活动 {#rockstar-games-social-club-zai-xian-huo-dong} - -<Route author="kookxiang" example="/socialclub/events/GTAV" path="/socialclub/events/:game?" paramsDesc={['游戏代码(默认所有)']}> - | 游戏代码 | 游戏名称 | - | -------- | ------------ | - | GTAV | 侠盗猎车手 5 | - | RDR2 | 荒野大镖客 2 | -</Route> +<Route namespace="priconne-redive" data={{"path":"/news","categories":["game"],"example":"/priconne-redive/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["priconne-redive.jp/news"]},"name":"日服公告","maintainers":["SayaSS"],"url":"priconne-redive.jp/news","location":"news.ts"}} /> ## SEGA {#sega} ### 世界计划 多彩舞台 | ProjectSekai | プロセカ {#sega-shi-jie-ji-hua-duo-cai-wu-tai-projectsekai-%E3%83%97%E3%83%AD%E3%82%BB%E3%82%AB} -<Route author="15x15G" example="/sega/pjsekai/news" path="/sega/pjsekai/news" /> - -## Steam {#steam} - -### Steam search {#steam-steam-search} - -<Route author="maple3142" example="/steam/search/specials=1" path="/steam/search/:params" paramsDesc={['search parameters']} radar="1"> - Get serach parameters from the URL. - - For instance, in `https://store.steampowered.com/search/?specials=1&term=atelier`, the parameters are `specials=1&term=atelier`. -</Route> - -## SteamGifts {#steamgifts} - -### Discussions {#steamgifts-discussions} - -<Route author="whtsky" example="/steamgifts/discussions" path="/steamgifts/discussions/:category?" paramsDesc={['category name, default to All']} /> - -## TapTap International {#taptap-international} - -:::warning -Due to the regional restrictions, an RSSHub deployment in China Mainland may not work on accessing the TapTap International Website. -::: - -### Game's Changelog {#taptap-international-game-s-changelog} - -<Route author="hoilc ETiV" example="/taptap/intl/changelog/191001/zh_TW" path="/taptap/intl/changelog/:id/:lang?" paramsDesc={['Game\'s App ID, you may find it from the URL of the Game', 'Language, checkout the table below for possible values, default is `en_US`']} notOperational="1"> - Language Code - - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP | -</Route> - -### Ratings & Reviews {#taptap-international-ratings-reviews} - -<Route author="hoilc TonyRL ETiV" example="/taptap/intl/review/82354/new/zh_TW" path="/taptap/intl/review/:id/:order?/:lang?" paramsDesc={['Game\'s App ID, you may find it from the URL of the Game', 'Sort Method, you may use `new` as the **Most Recent**, use `default` or leave it empty for the **Most Relevant**', 'Language, checkout the table below for possible values, default is `en_US`']}> - Sort Method - - | Most Relevant | Most Recent | - | ------------- | ----------- | - | default | new | - - Language Code - - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP | -</Route> +<Route namespace="sega" data={{"path":"/pjsekai/news","categories":["game"],"example":"/sega/pjsekai/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pjsekai.sega.jp/news/index.html"]},"name":"世界计划 多彩舞台 | ProjectSekai | プロセカ","maintainers":["15x15G"],"url":"pjsekai.sega.jp/news/index.html","location":"pjsekai.ts"}} /> ## TapTap 中国 {#taptap-zhong-guo} :::warning -由于区域限制,需要在有国内 IP 的机器上自建才能正常获取 RSS。\ -而对于《TapTap 国际版》则需要部署在具有海外出口的 IP 上才可正常获取 RSS。 +由于区域限制,需要在有国内 IP 的机器上自建才能正常获取 RSS。而对于《TapTap 国际版》则需要部署在具有海外出口的 IP 上才可正常获取 RSS。 ::: -### 游戏论坛 {#taptap-zhong-guo-you-xi-lun-tan} - -<Route author="hoilc TonyRL" example="/taptap/topic/142793/official" path="/taptap/topic/:id/:type?/:sort?/:lang?" paramsDesc={['游戏 ID,游戏主页 URL 中获取', '论坛版块,默认显示所有帖子,论坛版块 URL 中 `type` 参数,见下表,默认为 `feed`', '排序,见下表,默认为 `created`', '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`']} notOperational="1"> - | 全部 | 精华 | 官方 | 影片 | - | ---- | ----- | -------- | ----- | - | feed | elite | official | video | - - | 发布时间 | 回复时间 | - | -------- | --------- | - | created | commented | -</Route> - ### 游戏更新 {#taptap-zhong-guo-you-xi-geng-xin} -<Route author="hoilc ETiV" example="/taptap/changelog/60809/en_US" path="/taptap/changelog/:id/:lang?" paramsDesc={['游戏 ID,游戏主页 URL 中获取', '语言,默认使用 `zh_CN`,亦可使用 `en_US`']} notOperational="1" /> +<Route namespace="taptap" data={{"path":["/changelog/:id/:lang?","/intl/changelog/:id/:lang?"],"categories":["game"],"example":"/taptap/changelog/60809/en_US","parameters":{"id":"游戏 ID,游戏主页 URL 中获取","lang":"语言,默认使用 `zh_CN`,亦可使用 `en_US`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taptap.com/app/:id"],"target":"/changelog/:id"},"name":"游戏更新","maintainers":["hoilc","ETiV"],"description":"#### 语言代码\n\n | English (US) | 繁體中文 | 한국어 | 日本語 |\n | ------------ | -------- | ------ | ------ |\n | en_US | zh_TW | ko_KR | ja_JP |","location":"changelog.ts"}} /> -### 游戏更新 - 国际版 {#taptap-zhong-guo-you-xi-geng-xin-guo-ji-ban} +#### 语言代码 {#taptap-zhong-guo-you-xi-geng-xin-yu-yan-dai-ma} -<Route author="hoilc ETiV" example="/taptap/intl/changelog/191001/zh_TW" path="/taptap/intl/changelog/:id/:lang?" paramsDesc={['游戏 ID,游戏主页 URL 中获取', '语言代码,默认使用 `en_US`,可选项目见下表']} notOperational="1"> - #### 语言代码 +| English (US) | 繁體中文 | 한국어 | 日本語 | +| ------------ | -------- | ------ | ------ | +| en\_US | zh\_TW | ko\_KR | ja\_JP | - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP | -</Route> +### 游戏更新 {#taptap-zhong-guo-you-xi-geng-xin} + +<Route namespace="taptap" data={{"path":["/changelog/:id/:lang?","/intl/changelog/:id/:lang?"],"categories":["game"],"example":"/taptap/changelog/60809/en_US","parameters":{"id":"游戏 ID,游戏主页 URL 中获取","lang":"语言,默认使用 `zh_CN`,亦可使用 `en_US`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taptap.com/app/:id"],"target":"/changelog/:id"},"name":"游戏更新","maintainers":["hoilc","ETiV"],"description":"#### 语言代码\n\n | English (US) | 繁體中文 | 한국어 | 日本語 |\n | ------------ | -------- | ------ | ------ |\n | en_US | zh_TW | ko_KR | ja_JP |","location":"changelog.ts"}} /> + +#### 语言代码 {#taptap-zhong-guo-you-xi-geng-xin-yu-yan-dai-ma} + +| English (US) | 繁體中文 | 한국어 | 日本語 | +| ------------ | -------- | ------ | ------ | +| en\_US | zh\_TW | ko\_KR | ja\_JP | ### 游戏评价 {#taptap-zhong-guo-you-xi-ping-jia} -<Route author="hoilc TonyRL" example="/taptap/review/142793/hot" path="/taptap/review/:id/:order?/:lang?" paramsDesc={['游戏 ID,游戏主页 URL 中获取', '排序方式,空为默认排序,可选如下', '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`']} notOperational="1"> - | 最新 | 最热 | 游戏时长 | 默认排序 | - | ------ | ---- | -------- | -------- | - | update | hot | spent | default | -</Route> +<Route namespace="taptap" data={{"path":["/review/:id/:order?/:lang?","/intl/review/:id/:order?/:lang?"],"categories":["game"],"example":"/taptap/review/142793/hot","parameters":{"id":"游戏 ID,游戏主页 URL 中获取","order":"排序方式,空为默认排序,可选如下","lang":"语言,`zh-CN`或`zh-TW`,默认为`zh-CN`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taptap.com/app/:id/review","taptap.com/app/:id"],"target":"/review/:id"},"name":"游戏评价","maintainers":["hoilc","TonyRL"],"description":"| 最新 | 最热 | 游戏时长 | 默认排序 |\n | ------ | ---- | -------- | -------- |\n | update | hot | spent | default |","location":"review.ts"}} /> -### 游戏评价 - 国际版 {#taptap-zhong-guo-you-xi-ping-jia-guo-ji-ban} +| 最新 | 最热 | 游戏时长 | 默认排序 | +| ------ | ---- | -------- | -------- | +| update | hot | spent | default | -<Route author="hoilc TonyRL ETiV" example="/taptap/intl/review/82354/new" path="/taptap/intl/review/:id/:order?/:lang?" paramsDesc={['游戏 ID,游戏主页 URL 中获取', '排序方式,空为默认排序,可选如下', '语言代码,默认使用 `en_US`,可选项目见下表']}> - #### 排序方式 +### 游戏评价 {#taptap-zhong-guo-you-xi-ping-jia} - | 最相关 | 最新 | - | ------- | ---- | - | default | new | +<Route namespace="taptap" data={{"path":["/review/:id/:order?/:lang?","/intl/review/:id/:order?/:lang?"],"categories":["game"],"example":"/taptap/review/142793/hot","parameters":{"id":"游戏 ID,游戏主页 URL 中获取","order":"排序方式,空为默认排序,可选如下","lang":"语言,`zh-CN`或`zh-TW`,默认为`zh-CN`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taptap.com/app/:id/review","taptap.com/app/:id"],"target":"/review/:id"},"name":"游戏评价","maintainers":["hoilc","TonyRL"],"description":"| 最新 | 最热 | 游戏时长 | 默认排序 |\n | ------ | ---- | -------- | -------- |\n | update | hot | spent | default |","location":"review.ts"}} /> - #### 语言代码 +| 最新 | 最热 | 游戏时长 | 默认排序 | +| ------ | ---- | -------- | -------- | +| update | hot | spent | default | - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP | -</Route> +### 游戏论坛 {#taptap-zhong-guo-you-xi-lun-tan} + +<Route namespace="taptap" data={{"path":"/topic/:id/:type?/:sort?/:lang?","categories":["game"],"example":"/taptap/topic/142793/official","parameters":{"id":"游戏 ID,游戏主页 URL 中获取","type":"论坛版块,默认显示所有帖子,论坛版块 URL 中 `type` 参数,见下表,默认为 `feed`","sort":"排序,见下表,默认为 `created`","lang":"语言,`zh-CN`或`zh-TW`,默认为`zh-CN`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taptap.com/app/:id/topic","taptap.com/app/:id"],"target":"/topic/:id"},"name":"游戏论坛","maintainers":["hoilc","TonyRL"],"description":"| 全部 | 精华 | 官方 | 影片 |\n | ---- | ----- | -------- | ----- |\n | feed | elite | official | video |\n\n | 发布时间 | 回复时间 |\n | -------- | --------- |\n | created | commented |","location":"topic.ts"}} /> + +| 全部 | 精华 | 官方 | 影片 | +| ---- | ----- | -------- | ----- | +| feed | elite | official | video | + +| 发布时间 | 回复时间 | +| -------- | --------- | +| created | commented | ## War Thunder {#war-thunder} ### News {#war-thunder-news} -<Route author="axojhf" example="/warthunder/news" path="/warthunder/news"> - News data from [https://warthunder.com/en/news/](https://warthunder.com/en/news/) - The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!! -</Route> +<Route namespace="warthunder" data={{"path":"/news","categories":["game"],"example":"/warthunder/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["warthunder.com/en/news","warthunder.com/"]},"name":"News","maintainers":["axojhf"],"url":"warthunder.com/en/news","description":"News data from [https://warthunder.com/en/news/](https://warthunder.com/en/news/)\n The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!!","location":"news.ts"}} /> -## 触乐 {#chu-le} - -### 栏目 {#chu-le-lan-mu} - -<Route author="laampui" example="/chuapp/index/daily" path="/chuapp/index/:category?" paramsDesc={['默认为 night']}> - | 每日聚焦 | 最好玩 | 触乐夜话 | 动态资讯 | - | -------- | ------ | -------- | -------- | - | daily | pcz | night | news | -</Route> +News data from [https://warthunder.com/en/news/](https://warthunder.com/en/news/) +The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!! ## 二柄 APP {#er-bing-app} ### 新闻 {#er-bing-app-xin-wen} -<Route author="wushijishan" example="/diershoubing/news" path="/diershoubing/news" /> - -## 怪物猎人世界 {#guai-wu-lie-ren-shi-jie} - -### 更新情报 {#guai-wu-lie-ren-shi-jie-geng-xin-qing-bao} - -<Route author="DIYgod" example="/mhw/update" path="/mhw/update" radar="1" /> - -### 最新消息 {#guai-wu-lie-ren-shi-jie-zui-xin-xiao-xi} - -<Route author="DIYgod" example="/mhw/news" path="/mhw/news" radar="1" /> +<Route namespace="diershoubing" data={{"path":"/news","categories":["game"],"example":"/diershoubing/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["diershoubing.com/"]},"name":"新闻","maintainers":["wushijishan"],"url":"diershoubing.com/","location":"news.ts"}} /> ## 盒心光环 {#he-xin-guang-huan} ### 资讯 {#he-xin-guang-huan-zi-xun} -<Route author="XXY233" example="/xboxfan/news" path="/xboxfan/news" radar="1" /> - -## 剑网 3 {#jian-wang-3} - -### 新闻资讯 {#jian-wang-3-xin-wen-zi-xun} - -<Route author="nczitzk" example="/jx3" path="/jx3/:caty?" paramsDesc={['分类,见下表,默认为最新']}> - | 最新 | 新闻 | 活动 | 公告 | - | ------- | ----- | ---- | -------- | - | allnews | press | hd | announce | -</Route> +<Route namespace="xboxfan" data={{"path":"/news","categories":["game"],"example":"/xboxfan/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xboxfan.com/"]},"name":"资讯","maintainers":["XXY233"],"url":"xboxfan.com/","location":"news.ts"}} /> ## 旅法师营地 {#lv-fa-shi-ying-di} ### 首页 {#lv-fa-shi-ying-di-shou-ye} -<Route author="auto-bot-ty" example="/lfsyd/home" path="/lfsyd/home" radar="1" /> +<Route namespace="lfsyd" data={{"path":"/home","categories":["game"],"example":"/lfsyd/home","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.iyingdi.com/"]},"name":"首页","maintainers":["auto-bot-ty"],"url":"www.iyingdi.com/","location":"home.ts"}} /> ### 首页(旧版) {#lv-fa-shi-ying-di-shou-ye-jiu-ban} -<Route author="auto-bot-ty" example="/lfsyd/old_home" path="/lfsyd/old_home" radar="1" /> - -### 分区 {#lv-fa-shi-ying-di-fen-qu} - -<Route author="auto-bot-ty" example="/lfsyd/tag/17" path="/lfsyd/tag/:tagId" paramsDesc={['订阅分区类型']} radar="1"> - | 炉石传说 | 万智牌 | 游戏王 | 昆特牌 | 影之诗 | 符文之地传奇 | 阴阳师百闻牌 | - | :------: | :----: | :----: | :----: | :----: | :----------: | :----------: | - | 17 | 18 | 16 | 19 | 20 | 329 | 221 | - - | 英雄联盟 | 电子游戏 | 桌面游戏 | 卡牌游戏 | 玩家杂谈 | 二次元 | - | :------: | :------: | :------: | :------: | :------: | :----: | - | 112 | 389 | 24 | 102 | 23 | 117 | -</Route> - -### 用户的帖子 {#lv-fa-shi-ying-di-yong-hu-de-tie-zi} - -<Route author="auto-bot-ty" example="/lfsyd/user/55547" path="/lfsyd/user/:id" paramsDesc={['用户 id']} radar="1" /> - -可以在用户主页的 URL 中找到 - -Example:`https://www.iyingdi.com/tz/people/55547` ,id 是 `55547` +<Route namespace="lfsyd" data={{"path":"/old_home","categories":["game"],"example":"/lfsyd/old_home","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.iyingdi.com/"]},"name":"首页(旧版)","maintainers":["auto-bot-ty"],"url":"www.iyingdi.com/","location":"old-home.ts"}} /> ## 米哈游 {#mi-ha-you} -### 崩坏 2 - 游戏公告 {#mi-ha-you-beng-huai-2-you-xi-gong-gao} - -<Route author="deepred5" example="/mihoyo/bh2/gach" path="/mihoyo/bh2/:type" paramsDesc={['公告种类']} notOperational="1"> - | 最新公告 | 版本信息 | 祈愿信息 | 活动介绍 | - | -------- | -------- | -------- | -------- | - | new | version | gach | event | -</Route> - -### 崩坏 3 - 游戏公告 {#mi-ha-you-beng-huai-3-you-xi-gong-gao} - -<Route author="deepred5 nczitzk" example="/mihoyo/bh3/latest" path="/mihoyo/bh3/:type" paramsDesc={['公告种类']}> - | 最新 | 动态 | 公告 | 活动 | 补给 | - | ------ | ---- | ------ | -------- | -------- | - | latest | news | notice | activity | strategy | -</Route> - -### 米游社 - 同人榜 {#mi-ha-you-mi-you-she-tong-ren-bang} - -<Route author="CaoMeiYouRen" example="/mihoyo/bbs/img-ranking/ys/forumType=tongren&cateType=illustration&rankingType=daily" path="/mihoyo/bbs/img-ranking/:game/:routeParams?" paramsDesc={['游戏缩写','额外参数;请参阅以下说明和表格']} radar="1"> - | 键 | 含义 | 接受的值 | 默认值 | - | ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ | - | forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren | - | cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration | - | rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily | - | lastId | 当前页 id(用于分页) | 数字 | 1 | - - 游戏缩写(目前绝区零还没有同人榜 - - | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 | - | ------ | ---- | ------ | ---------- | -------- | ------ | - | bh3 | ys | bh2 | wd | sr | dby | - - 主榜类型 - - | 同人榜 | COS 榜 | - | ------- | ------ | - | tongren | cos | - - 子榜类型 - - 崩坏三 子榜 - - | 插画 | 漫画 | COS | - | ------------ | ----- | --- | - | illustration | comic | cos | - - 原神 子榜 - - | 插画 | 漫画 | Q 版 | 手工 | - | ------------ | ----- | ---- | ------ | - | illustration | comic | qute | manual | - - 排行榜类型 - - | 日榜 | 周榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly | -</Route> - -### 米游社 - 官方公告 {#mi-ha-you-mi-you-she-guan-fang-gong-gao} - -<Route author="CaoMeiYouRen" example="/mihoyo/bbs/official/2/3/20/" path="/mihoyo/bbs/official/:gids/:type?/:page_size?/:last_id?" paramsDesc={['游戏id','公告类型,默认为 2(即 活动)','分页大小,默认为 20 ','跳过的公告数,例如指定为 40 就是从第 40 条公告开始,可用于分页']} radar="1"> - 游戏 id - - | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 | - | ------ | ---- | ------ | ---------- | -------- | ------ | - | 1 | 2 | 3 | 4 | 6 | 8 | - - 公告类型 - - | 公告 | 活动 | 资讯 | - | ---- | ---- | ---- | - | 1 | 2 | 3 | -</Route> - -### 米游社 - 用户关注 {#mi-ha-you-mi-you-she-yong-hu-guan-zhu} - -<Route author="CaoMeiYouRen" example="/mihoyo/bbs/follow-list/77005350" path="/mihoyo/bbs/follow-list/:uid" paramsDesc={['用户uid']} radar="1" /> - -### 米游社 - 用户帖子 {#mi-ha-you-mi-you-she-yong-hu-tie-zi} - -<Route author="CaoMeiYouRen" example="/mihoyo/bbs/user-post/77005350" path="/mihoyo/bbs/user-post/:uid" paramsDesc={['用户uid']} radar="1" /> - -### 米游社 - 用户关注动态 {#mi-ha-you-mi-you-she-yong-hu-guan-zhu-dong-tai} - -<Route author="CaoMeiYouRen" example="/mihoyo/bbs/timeline" path="/mihoyo/bbs/timeline" radar="1" configRequired="1"> - :::warning - 用户关注动态需要米游社登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> - -### 原神 {#mi-ha-you-yuan-shen} - -#### 新闻 {#mi-ha-you-yuan-shen-xin-wen} - -<Route author="nczitzk" example="/mihoyo/ys" path="/mihoyo/ys/:location?/:category?" paramsDesc={['区域,可选 `main`(简中)或 `zh-tw`(繁中)', '分类,见下表,默认为最新']}> - | 最新 | 新闻 | 公告 | 活动 | - | ------ | ---- | ------ | -------- | - | latest | news | notice | activity | -</Route> - ### 崩坏:星穹铁道 {#mi-ha-you-beng-huai-xing-qiong-tie-dao} +<Route namespace="mihoyo" data={{"path":"/sr/:location?/:category?","categories":["game"],"example":"/mihoyo/sr","parameters":{"location":"区域,可选 `zh-cn`(国服,简中)或 `zh-tw`(国际服,繁中)","category":"分类,见下表,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sr.mihoyo.com/news"],"target":"/sr"},"name":"崩坏:星穹铁道","maintainers":["shinanory"],"url":"sr.mihoyo.com/news","description":"#### 新闻 {#mi-ha-you-beng-huai-xing-qiong-tie-dao-xin-wen}\n\n | 最新 | 新闻 | 公告 | 活动 |\n | -------- | ---- | ------ | -------- |\n | news-all | news | notice | activity |","location":"sr/news.ts"}} /> + #### 新闻 {#mi-ha-you-beng-huai-xing-qiong-tie-dao-xin-wen} -<Route author="shinanory" example="/mihoyo/sr" path="/mihoyo/sr/:location?/:category?" paramsDesc={['区域,可选 `zh-cn`(国服,简中)或 `zh-tw`(国际服,繁中)','分类,见下表,默认为最新']}> - | 最新 | 新闻 | 公告 | 活动 | - | -------- | ---- | ------ | -------- | - | news-all | news | notice | activity | -</Route> +| 最新 | 新闻 | 公告 | 活动 | +| -------- | ---- | ------ | -------- | +| news-all | news | notice | activity | + +### 米游社 - 用户关注 {#mi-ha-you-mi-you-she-yong-hu-guan-zhu} + +<Route namespace="mihoyo" data={{"path":"/bbs/follow-list/:uid","categories":["game"],"example":"/mihoyo/bbs/follow-list/77005350","parameters":{"uid":"用户uid"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"米游社 - 用户关注","maintainers":["CaoMeiYouRen"],"location":"bbs/follow-list.ts"}} /> + +### 米游社 - 同人榜 {#mi-ha-you-mi-you-she-tong-ren-bang} + +<Route namespace="mihoyo" data={{"path":"/bbs/img-ranking/:game/:routeParams?","categories":["game"],"example":"/mihoyo/bbs/img-ranking/ys/forumType=tongren&cateType=illustration&rankingType=daily","parameters":{"game":"游戏缩写","routeParams":"额外参数;请参阅以下说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["miyoushe.com/:game/imgRanking/:forum_id/:ranking_id/:cate_id"],"target":"/bbs/img-ranking/:game"},"name":"米游社 - 同人榜","maintainers":["CaoMeiYouRen"],"description":"| 键 | 含义 | 接受的值 | 默认值 |\n | ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ |\n | forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren |\n | cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration |\n | rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily |\n | lastId | 当前页 id(用于分页) | 数字 | 1 |\n\n 游戏缩写(目前绝区零还没有同人榜\n\n | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 |\n | ------ | ---- | ------ | ---------- | -------- | ------ |\n | bh3 | ys | bh2 | wd | sr | dby |\n\n 主榜类型\n\n | 同人榜 | COS 榜 |\n | ------- | ------ |\n | tongren | cos |\n\n 子榜类型\n\n 崩坏三 子榜\n\n | 插画 | 漫画 | COS |\n | ------------ | ----- | --- |\n | illustration | comic | cos |\n\n 原神 子榜\n\n | 插画 | 漫画 | Q 版 | 手工 |\n | ------------ | ----- | ---- | ------ |\n | illustration | comic | qute | manual |\n\n 排行榜类型\n\n | 日榜 | 周榜 | 月榜 |\n | ----- | ------ | ------- |\n | daily | weekly | monthly |","location":"bbs/img-ranking.ts"}} /> + +| 键 | 含义 | 接受的值 | 默认值 | +| ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ | +| forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren | +| cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration | +| rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily | +| lastId | 当前页 id(用于分页) | 数字 | 1 | + +游戏缩写(目前绝区零还没有同人榜 + +| 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 | +| ------ | ---- | ------ | ---------- | -------- | ------ | +| bh3 | ys | bh2 | wd | sr | dby | + +主榜类型 + +| 同人榜 | COS 榜 | +| ------- | ------ | +| tongren | cos | + +子榜类型 + +崩坏三 子榜 + +| 插画 | 漫画 | COS | +| ------------ | ----- | --- | +| illustration | comic | cos | + +原神 子榜 + +| 插画 | 漫画 | Q 版 | 手工 | +| ------------ | ----- | ---- | ------ | +| illustration | comic | qute | manual | + +排行榜类型 + +| 日榜 | 周榜 | 月榜 | +| ----- | ------ | ------- | +| daily | weekly | monthly | + +### 米游社 - 官方公告 {#mi-ha-you-mi-you-she-guan-fang-gong-gao} + +<Route namespace="mihoyo" data={{"path":"/bbs/official/:gids/:type?/:page_size?/:last_id?","categories":["game"],"example":"/mihoyo/bbs/official/2/3/20/","parameters":{"gids":"游戏id","type":"公告类型,默认为 2(即 活动)","page_size":"分页大小,默认为 20 ","last_id":"跳过的公告数,例如指定为 40 就是从第 40 条公告开始,可用于分页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"米游社 - 官方公告","maintainers":["CaoMeiYouRen"],"description":"游戏 id\n\n | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 |\n | ------ | ---- | ------ | ---------- | -------- | ------ |\n | 1 | 2 | 3 | 4 | 6 | 8 |\n\n 公告类型\n\n | 公告 | 活动 | 资讯 |\n | ---- | ---- | ---- |\n | 1 | 2 | 3 |","location":"bbs/official.ts"}} /> + +游戏 id + +| 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 | +| ------ | ---- | ------ | ---------- | -------- | ------ | +| 1 | 2 | 3 | 4 | 6 | 8 | + +公告类型 + +| 公告 | 活动 | 资讯 | +| ---- | ---- | ---- | +| 1 | 2 | 3 | + +### 米游社 - 用户关注动态 {#mi-ha-you-mi-you-she-yong-hu-guan-zhu-dong-tai} + +<Route namespace="mihoyo" data={{"path":"/bbs/timeline","categories":["game"],"example":"/mihoyo/bbs/timeline","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["miyoushe.com/:game/timeline"]},"name":"米游社 - 用户关注动态","maintainers":["CaoMeiYouRen"],"description":":::warning\n 用户关注动态需要米游社登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"bbs/timeline.ts"}} /> + +:::warning +用户关注动态需要米游社登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: + +### 米游社 - 用户帖子 {#mi-ha-you-mi-you-she-yong-hu-tie-zi} + +<Route namespace="mihoyo" data={{"path":"/bbs/user-post/:uid","categories":["game"],"example":"/mihoyo/bbs/user-post/77005350","parameters":{"uid":"用户uid"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"米游社 - 用户帖子","maintainers":["CaoMeiYouRen"],"location":"bbs/user-post.ts"}} /> + +### 原神 {#mi-ha-you-yuan-shen} + +<Route namespace="mihoyo" data={{"path":"/ys/:location?/:category?","categories":["game"],"example":"/mihoyo/ys","parameters":{"location":"区域,可选 `main`(简中)或 `zh-tw`(繁中)","category":"分类,见下表,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["genshin.hoyoverse.com/:location/news"],"target":"/ys/:location"},"name":"原神","maintainers":["nczitzk"],"description":"#### 新闻 {#mi-ha-you-yuan-shen-xin-wen}\n\n | 最新 | 新闻 | 公告 | 活动 |\n | ------ | ---- | ------ | -------- |\n | latest | news | notice | activity |","location":"ys/news.ts"}} /> + +#### 新闻 {#mi-ha-you-yuan-shen-xin-wen} + +| 最新 | 新闻 | 公告 | 活动 | +| ------ | ---- | ------ | -------- | +| latest | news | notice | activity | ## 明日方舟 {#ming-ri-fang-zhou} -### 游戏公告与新闻 {#ming-ri-fang-zhou-you-xi-gong-gao-yu-xin-wen} - -<Route author="Astrian" example="/arknights/news" path="/arknights/news" /> - ### 游戏内公告 {#ming-ri-fang-zhou-you-xi-nei-gong-gao} -<Route author="swwind" example="/arknights/announce" path="/arknights/announce/:platform?/:group?" paramsDesc={['平台,默认为 Android','分组,默认为 ALL']}> - 平台 +<Route namespace="arknights" data={{"path":"/announce/:platform?/:group?","categories":["game"],"example":"/arknights/announce","parameters":{"platform":"平台,默认为 Android","group":"分组,默认为 ALL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"游戏内公告","maintainers":["swwind"],"description":"平台\n\n | 安卓服 | iOS 服 | B 服 |\n | :-----: | :----: | :------: |\n | Android | IOS | Bilibili |\n\n 分组\n\n | 全部 | 系统公告 | 活动公告 |\n | :--: | :------: | :------: |\n | ALL | SYSTEM | ACTIVITY |","location":"announce.ts"}} /> - | 安卓服 | iOS 服 | B 服 | - | :-----: | :----: | :------: | - | Android | IOS | Bilibili | +平台 - 分组 +| 安卓服 | iOS 服 | B 服 | +| :-----: | :----: | :------: | +| Android | IOS | Bilibili | - | 全部 | 系统公告 | 活动公告 | - | :--: | :------: | :------: | - | ALL | SYSTEM | ACTIVITY | -</Route> +分组 + +| 全部 | 系统公告 | 活动公告 | +| :--: | :------: | :------: | +| ALL | SYSTEM | ACTIVITY | + +### 游戏公告与新闻 {#ming-ri-fang-zhou-you-xi-gong-gao-yu-xin-wen} + +<Route namespace="arknights" data={{"path":"/news","categories":["game"],"example":"/arknights/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ak-conf.hypergryph.com/*"]},"name":"游戏公告与新闻","maintainers":["Astrian"],"url":"ak-conf.hypergryph.com/*","location":"news.ts"}} /> ### アークナイツ (日服新闻) {#ming-ri-fang-zhou-%E3%82%A2%E3%83%BC%E3%82%AF%E3%83%8A%E3%82%A4%E3%83%84-ri-fu-xin-wen} -<Route author="ofyark" example="/arknights/japan" path="/arknights/japan" /> - -### 塞壬唱片 {#ming-ri-fang-zhou-sai-ren-chang-pian} - -<Route author="rikkablue" example="/siren/news" path="/siren/news" /> - -## 奶牛关 {#nai-niu-guan} - -### 元素文章 {#nai-niu-guan-yuan-su-wen-zhang} - -<Route author="hoilc" example="/cowlevel/element/1370" path="/cowlevel/element/:id" paramsDesc={['元素 ID, 可在 URL 中找到']} radar="1" /> - -## 其乐 {#qi-le} - -### 论坛 {#qi-le-lun-tan} - -<Route author="nczitzk" example="/keylol" path="/keylol/:path+" paramsDesc={['路径,默认为热点聚焦']} notOperational="1"> - :::tip - 若订阅 [热点聚焦](https://keylol.com/f161-1),网址为 `https://keylol.com/f161-1`。截取 `https://keylol.com/` 到末尾的部分 `f161-1` 作为参数,此时路由为 [`/keylol/f161-1`](https://rsshub.app/keylol/f161-1)。 - - 若订阅子分类 [试玩免费 - 热点聚焦](https://keylol.com/forum.php?mod=forumdisplay\&fid=161\&filter=typeid\&typeid=459),网址为 `https://keylol.com/forum.php?mod=forumdisplay&fid=161&filter=typeid&typeid=459`。截取 `https://keylol.com/forum.php?mod=forumdisplay&` 到末尾的部分 `fid=161&filter=typeid&typeid=459` 作为参数,此时路由为 [`/keylol/fid=161&filter=typeid&typeid=459`](https://rsshub.app/keylol/fid=161\&filter=typeid\&typeid=459)。 - ::: -</Route> +<Route namespace="arknights" data={{"path":"/japan","categories":["game"],"example":"/arknights/japan","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ak.arknights.jp/news","ak.arknights.jp/"]},"name":"アークナイツ (日服新闻)","maintainers":["ofyark"],"url":"ak.arknights.jp/news","location":"japan.ts"}} /> ## 少女前线 {#shao-nv-qian-xian} ### 情报局 {#shao-nv-qian-xian-qing-bao-ju} -<Route author="nczitzk" example="/gf-cn/news" path="/gf-cn/news/:category?" paramsDesc={['分类,见下表,默认为新闻']}> - | 新闻 | 公告 | - | ---- | ---- | - | 1 | 3 | -</Route> +<Route namespace="gf-cn" data={{"path":"/news/:category?","categories":["game"],"example":"/gf-cn/news","parameters":{"category":"分类,见下表,默认为新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sunborngame.com/:category","sunborngame.com/"]},"name":"情报局","maintainers":["nczitzk"],"description":"| 新闻 | 公告 |\n | ---- | ---- |\n | 1 | 3 |","location":"news.ts"}} /> + +| 新闻 | 公告 | +| ---- | ---- | +| 1 | 3 | ## 完美世界电竞 {#wan-mei-shi-jie-dian-jing} ### 资讯列表 {#wan-mei-shi-jie-dian-jing-zi-xun-lie-biao} -<Route author="tssujt" example="/wmpvp/news/1" path="/wmpvp/news/:type" paramsDesc={['资讯分类,见下表']}> - | DOTA2 | CS2 | - | ----- | --- | - | 1 | 2 | -</Route> +<Route namespace="wmpvp" data={{"path":"/news/:type","categories":["game"],"example":"/wmpvp/news/1","parameters":{"type":"资讯分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"资讯列表","maintainers":["tssujt"],"description":"| DOTA2 | CS2 |\n | ----- | --- |\n | 1 | 2 |","location":"index.ts"}} /> + +| DOTA2 | CS2 | +| ----- | --- | +| 1 | 2 | ## 王者荣耀 {#wang-zhe-rong-yao} ### 新闻中心 {#wang-zhe-rong-yao-xin-wen-zhong-xin} -<Route author="Jeason0228 HenryQW" example="/tencent/pvp/newsindex/all" path="/tencent/pvp/newsindex/:type" paramsDesc={['栏目分类,见下表']}> - | 全部 | 热门 | 新闻 | 公告 | 活动 | 赛事 | 优化 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | all | rm | xw | gg | hd | ss | yh | -</Route> +<Route namespace="tencent" data={{"path":"/pvp/newsindex/:type","categories":["game"],"example":"/tencent/pvp/newsindex/all","parameters":{"type":"栏目分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻中心","maintainers":["Jeason0228","HenryQW"],"description":"| 全部 | 热门 | 新闻 | 公告 | 活动 | 赛事 | 优化 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | all | rm | xw | gg | hd | ss | yh |","location":"pvp/newsindex.ts"}} /> -## 网易大神 {#wang-yi-da-shen} +| 全部 | 热门 | 新闻 | 公告 | 活动 | 赛事 | 优化 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| all | rm | xw | gg | hd | ss | yh | -### 用户发帖 {#wang-yi-da-shen-yong-hu-fa-tie} +## 网易公开课 {#wang-yi-gong-kai-ke} -<Route author="luyuhuang" example="/163/ds/63dfbaf4117741daaf73404601165843" path="/163/ds/:id" paramsDesc={['用户ID']} /> +:::tip +部分歌单及听歌排行信息为登陆后可见,自建时将环境变量`NCM_COOKIES`设为登陆后的 Cookie 值,即可正常获取。 +::: -## 小黑盒 {#xiao-hei-he} +### 用户发帖 {#wang-yi-gong-kai-ke-yong-hu-fa-tie} -### 用户动态 {#xiao-hei-he-yong-hu-dong-tai} - -<Route author="auto-bot-ty" example="/xiaoheihe/user/7775687" path="xiaoheihe/user/:id" paramsDesc={['用户 id']} /> - -### 游戏新闻 {#xiao-hei-he-you-xi-xin-wen} - -<Route author="MyFaith" example="/xiaoheihe/news" path="xiaoheihe/news" notOperational="1" /> - -### 游戏折扣信息 {#xiao-hei-he-you-xi-zhe-kou-xin-xi} - -<Route author="MyFaith" example="/xiaoheihe/discount/pc" path="xiaoheihe/discount/:platform?" paramsDesc={['平台,默认为 Steam']}> - | Steam | PlatStation4 | Switch | - | ----- | ------------ | ------ | - | pc | ps4 | switch | -</Route> +<Route namespace="163" data={{"path":"/ds/:id","categories":["game"],"example":"/163/ds/63dfbaf4117741daaf73404601165843","parameters":{"id":"用户ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ds.163.com/user/:id"]},"name":"用户发帖","maintainers":["luyuhuang"],"location":"ds.ts"}} /> ## 英雄联盟 {#ying-xiong-lian-meng} -### 国服新闻 {#ying-xiong-lian-meng-guo-fu-xin-wen} - -<Route author="Jeason0228" example="/lol/newsindex/all" path="/lol/newsindex/:type" paramsDesc={['栏目分类,见下表']}> - | 全部 | 综合 | 公告 | 赛事 | 攻略 | 社区 | - | ---- | ---- | ---- | ---- | ---- | ---- | - | all | zh | gg | ss | gl | sq | -</Route> - ### 台服新闻 {#ying-xiong-lian-meng-tai-fu-xin-wen} -<Route author="hoilc" example="/loltw/news" path="/loltw/news/:category?" paramsDesc={['新闻分类,置空为全部新闻']} radar="1" notOperational="1"> - | 活动 | 资讯 | 系统 | 电竞 | 版本资讯 | 战棋资讯 | - | ----- | ---- | ------ | ------ | -------- | -------- | - | event | info | system | esport | patch | TFTpatch | -</Route> +<Route namespace="loltw" data={{"path":"/news/:category?","categories":["game"],"example":"/loltw/news","parameters":{"category":"新闻分类,置空为全部新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"台服新闻","maintainers":["hoilc"],"description":"| 活动 | 资讯 | 系统 | 电竞 | 版本资讯 | 战棋资讯 |\n | ----- | ---- | ------ | ------ | -------- | -------- |\n | event | info | system | esport | patch | TFTpatch |","location":"news.ts"}} /> -## 游民星空 {#you-min-xing-kong} - -### 游民星空今日推荐 {#you-min-xing-kong-you-min-xing-kong-jin-ri-tui-jian} - -<Route author="LightStrawberry" example="/gamersky/news" path="/gamersky/news" /> - -### 游民娱乐 {#you-min-xing-kong-you-min-yu-le} - -<Route author="LogicJake" example="/gamersky/ent/ymfl" path="/gamersky/ent/:category" paramsDesc={['分类类型']}> - | 趣囧时间 | 游民影院 | 游观天下 | 壁纸图库 | 游民盘点 | 游民福利 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | qysj | ymyy | ygtx | bztk | ympd | ymfl | -</Route> +| 活动 | 资讯 | 系统 | 电竞 | 版本资讯 | 战棋资讯 | +| ----- | ---- | ------ | ------ | -------- | -------- | +| event | info | system | esport | patch | TFTpatch | ## 游戏打折情报 {#you-xi-da-zhe-qing-bao} ### 游戏折扣 {#you-xi-da-zhe-qing-bao-you-xi-zhe-kou} -<Route author="LogicJake nczitzk" example="/yxdzqb/popular_cn" path="/yxdzqb/:type" paramsDesc={['折扣类型']}> - | Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 | - | -------------- | ------------------ | ---------------------- | -------------- | ---------------------- | - | discount | popular | popular\_cn | low | low\_cn | -</Route> +<Route namespace="yxdzqb" data={{"path":"/:type","categories":["game"],"example":"/yxdzqb/popular_cn","parameters":{"type":"折扣类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yxdzqb.com/"]},"name":"游戏折扣","maintainers":["LogicJake","nczitzk"],"url":"yxdzqb.com/","description":"| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 |\n | -------------- | ------------------ | ---------------------- | -------------- | ---------------------- |\n | discount | popular | popular_cn | low | low_cn |","location":"index.ts"}} /> -## 游戏动力 {#you-xi-dong-li} - -### 游戏资讯 {#you-xi-dong-li-you-xi-zi-xun} - -<Route author="wy916787036" example="/vgn" path="/vgn/:platform?" paramsDesc={['平台,见下表,默认为全部']}> - | Switch | PS4 | PC | Xbox | - | ------ | --- | -- | ---- | - | 1 | 2 | 3 | 4 | -</Route> +| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 | +| -------------- | ------------------ | ---------------------- | -------------- | ---------------------- | +| discount | popular | popular\_cn | low | low\_cn | ## 游戏基因 {#you-xi-ji-yin} ### 资讯 {#you-xi-ji-yin-zi-xun} -<Route author="lone1y-51" example="/gamegene/news" path="/gamegene/news" /> - -## 游戏年轮 {#you-xi-nian-lun} - -### 分类 {#you-xi-nian-lun-fen-lei} - -<Route author="nczitzk" example="/bibgame/sgame" path="/bibgame/:category?/:type?" paramsDesc={['分类,见下表,默认为 PC 游戏', '类型,可在各分类页中导航栏中找到']}> - | PC 游戏 | PS4 游戏 | Switch 游戏 | NS 其他板块 | galgame | VR 游戏 | 3DS 游戏 | psv 游戏 | xbox360 游戏 | ps3 游戏 | 其他掌机 | - | ------- | -------- | ----------- | ----------- | ------- | ------- | -------- | -------- | ------------ | -------- | -------- | - | pcgame | ps4 | sgame | nsaita | ps | bt | 3ds | psv | jiaocheng | ps3yx | zhangji | -</Route> +<Route namespace="gamegene" data={{"path":"/news","categories":["game"],"example":"/gamegene/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.gamegene.cn/news"]},"name":"资讯","maintainers":["lone1y-51"],"url":"news.gamegene.cn/news","location":"news.ts"}} /> ## 游戏日报 {#you-xi-ri-bao} ### 分类 {#you-xi-ri-bao-fen-lei} -<Route author="TonyRL" example="/yxrb/info" path="/yxrb/:category?" paramsDesc={['分类,见下表,预设为 `info`']} radar="1"> - | 资讯 | 访谈 | 服务 | 游理游据 | - | ---- | ------- | ------- | -------- | - | info | talking | service | comments | -</Route> +<Route namespace="yxrb" data={{"path":"/:category?","categories":["game"],"example":"/yxrb/info","parameters":{"category":"分类,见下表,预设为 `info`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.yxrb.net/:category","news.yxrb.net/"],"target":"/:category"},"name":"分类","maintainers":["TonyRL"],"description":"| 资讯 | 访谈 | 服务 | 游理游据 |\n | ---- | ------- | ------- | -------- |\n | info | talking | service | comments |","location":"home.ts"}} /> -## 游戏时光 {#you-xi-shi-guang} - -### 游戏时光新闻 {#you-xi-shi-guang-you-xi-shi-guang-xin-wen} - -<Route author="MyFaith" example="/vgtime/news" path="/vgtime/news" radar="1" /> - -### 游戏时光游戏发售表 {#you-xi-shi-guang-you-xi-shi-guang-you-xi-fa-shou-biao} - -<Route author="MyFaith" example="/vgtime/release" path="/vgtime/release" radar="1" /> - -### 关键词资讯 {#you-xi-shi-guang-guan-jian-ci-zi-xun} - -<Route author="DIYgod" example="/vgtime/keyword/怪物猎人" path="/vgtime/keyword/:keyword" radar="1" /> +| 资讯 | 访谈 | 服务 | 游理游据 | +| ---- | ------- | ------- | -------- | +| info | talking | service | comments | ## 游讯网 {#you-xun-wang} -### 资讯 {#you-xun-wang-zi-xun} - -<Route author="nczitzk" example="/yxdown/news" path="/yxdown/news/:category?" paramsDesc={['分类,见下表,默认为资讯首页']}> - | 资讯首页 | 业界动态 | 视频预告 | 新作发布 | 游戏资讯 | 游戏评测 | 网络游戏 | 手机游戏 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou | -</Route> - ### 精彩推荐 {#you-xun-wang-jing-cai-tui-jian} -<Route author="nczitzk" example="/yxdown/recommend" path="/yxdown/recommend" /> +<Route namespace="yxdown" data={{"path":"/recommend","categories":["game"],"example":"/yxdown/recommend","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yxdown.com/"]},"name":"精彩推荐","maintainers":["nczitzk"],"url":"yxdown.com/","location":"recommend.ts"}} /> + +### 资讯 {#you-xun-wang-zi-xun} + +<Route namespace="yxdown" data={{"path":"/news/:category?","categories":["game"],"example":"/yxdown/news","parameters":{"category":"分类,见下表,默认为资讯首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"资讯","maintainers":["nczitzk"],"description":"| 资讯首页 | 业界动态 | 视频预告 | 新作发布 | 游戏资讯 | 游戏评测 | 网络游戏 | 手机游戏 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou |","location":"news.ts"}} /> + +| 资讯首页 | 业界动态 | 视频预告 | 新作发布 | 游戏资讯 | 游戏评测 | 网络游戏 | 手机游戏 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou | ## 游研社 {#you-yan-she} ### 游研社 - 分类文章 {#you-yan-she-you-yan-she-fen-lei-wen-zhang} -<Route author="LightStrawberry" example="/yystv/category/recommend" path="/yystv/category/:category" paramsDesc={['专栏类型']}> - | 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | - | --------- | ------- | ------ | ------- | ---- | -------- | - | recommend | history | big | culture | news | retro | -</Route> +<Route namespace="yystv" data={{"path":"/category/:category","categories":["game"],"example":"/yystv/category/recommend","parameters":{"category":"专栏类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"游研社 - 分类文章","maintainers":["LightStrawberry"],"description":"| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 |\n | --------- | ------- | ------ | ------- | ---- | -------- |\n | recommend | history | big | culture | news | retro |","location":"category.ts"}} /> + +| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | +| --------- | ------- | ------ | ------- | ---- | -------- | +| recommend | history | big | culture | news | retro | ### 游研社 - 全部文章 {#you-yan-she-you-yan-she-quan-bu-wen-zhang} -<Route author="HaitianLiu" example="/yystv/docs" path="/yystv/docs" /> +<Route namespace="yystv" data={{"path":"/docs","categories":["game"],"example":"/yystv/docs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yystv.cn/docs"]},"name":"游研社 - 全部文章","maintainers":["HaitianLiu"],"url":"yystv.cn/docs","location":"docs.ts"}} /> ## 遊戲基地 Gamebase {#you-xi-ji-di-gamebase} ### 新聞 {#you-xi-ji-di-gamebase-xin-wen} -<Route author="nczitzk" example="/gamebase/news" path="/gamebase/news/:type?/:category?" paramsDesc={['类型,见下表,默认为 newslist', '分类,可在对应分类页 URL 中找到,默认为 `all` 即全部']}> - 类型 +<Route namespace="gamebase" data={{"path":"/news/:type?/:category?","categories":["game"],"example":"/gamebase/news","parameters":{"type":"类型,见下表,默认为 newslist","category":"分类,可在对应分类页 URL 中找到,默认为 `all` 即全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新聞","maintainers":["nczitzk"],"description":"类型\n\n | newslist | r18list |\n | -------- | ------- |","location":"news.ts"}} /> - | newslist | r18list | - | -------- | ------- | -</Route> +类型 -## 掌上英雄联盟 {#zhang-shang-ying-xiong-lian-meng} - -### 推荐 {#zhang-shang-ying-xiong-lian-meng-tui-jian} - -<Route author="alizeegod" example="/lolapp/recommend" path="/lolapp/recommend" notOperational="1" /> - -### 用户文章 {#zhang-shang-ying-xiong-lian-meng-yong-hu-wen-zhang} - -<Route author="ztmzzz" example="/lolapp/article/ee97e19c-4a64-4637-b916-b9ee23744d1f" path="/lolapp/article/:uuid" paramsDesc={['用户UUID,可在文章html中获取']} /> +| newslist | r18list | +| -------- | ------- | ## 掌游宝 {#zhang-you-bao} ### 推荐 {#zhang-you-bao-tui-jian} -<Route author="ztmzzz" example="/zhangyoubao/lol" path="/zhangyoubao/:category" paramsDesc={['分类,见下表']} notOperational="1"> - | 英雄联盟 | 炉石传说 | DNF | 守望先锋 | 王者荣耀 | 单机综合 | 手游综合 | 云顶之弈 | 部落冲突 | 皇室战争 | DNF 手游 | 荒野乱斗 | - | -------- | -------- | --- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | - | lol | lscs | dnf | swxf | yxzj | steam | mobile | lolchess | blzz | hszz | dnfm | brawlstars | -</Route> +<Route namespace="zhangyoubao" data={{"path":"/:category","categories":["game"],"example":"/zhangyoubao/lol","parameters":{"category":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mobile.zhangyoubao.com/:category/"]},"name":"推荐","maintainers":["ztmzzz"],"description":"| 英雄联盟 | 炉石传说 | DNF | 守望先锋 | 王者荣耀 | 单机综合 | 手游综合 | 云顶之弈 | 部落冲突 | 皇室战争 | DNF 手游 | 荒野乱斗 |\n | -------- | -------- | --- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- |\n | lol | lscs | dnf | swxf | yxzj | steam | mobile | lolchess | blzz | hszz | dnfm | brawlstars |","location":"index.ts"}} /> + +| 英雄联盟 | 炉石传说 | DNF | 守望先锋 | 王者荣耀 | 单机综合 | 手游综合 | 云顶之弈 | 部落冲突 | 皇室战争 | DNF 手游 | 荒野乱斗 | +| -------- | -------- | --- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | +| lol | lscs | dnf | swxf | yxzj | steam | mobile | lolchess | blzz | hszz | dnfm | brawlstars | ## ファミ通 {#%E3%83%95%E3%82%A1%E3%83%9F-tong} ### Category {#%E3%83%95%E3%82%A1%E3%83%9F-tong-category} -<Route author="TonyRL" example="/famitsu/category/new-article" path="/famitsu/category/:category?" paramsDesc={['Category, see table below, `new-article` by default']} radar="1"> - | 新着 | PS5 | Switch | PS4 | ニュース | ゲームニュース | PR TIMES | 動画 | 特集・企画記事 | インタビュー | 取材・リポート | レビュー | インディーゲーム | - | ----------- | --- | ------ | --- | -------- | -------------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- | - | new-article | ps5 | switch | ps4 | news | news-game | prtimes | videos | special-article | interview | event-report | review | indie-game | -</Route> +<Route namespace="famitsu" data={{"path":"/category/:category?","categories":["game"],"example":"/famitsu/category/new-article","parameters":{"category":"Category, see table below, `new-article` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["TonyRL"],"description":"| 新着 | PS5 | Switch | PS4 | ニュース | ゲームニュース | PR TIMES | 動画 | 特集・企画記事 | インタビュー | 取材・リポート | レビュー | インディーゲーム |\n | ----------- | --- | ------ | --- | -------- | -------------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- |\n | new-article | ps5 | switch | ps4 | news | news-game | prtimes | videos | special-article | interview | event-report | review | indie-game |","location":"category.ts"}} /> -## マギアレコード(Magia Record, 魔法纪录) {#%E3%83%9E%E3%82%AE%E3%82%A2%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89-magia-record-mo-fa-ji-lu} - -### 游戏公告 {#%E3%83%9E%E3%82%AE%E3%82%A2%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89-magia-record-mo-fa-ji-lu-you-xi-gong-gao} - -<Route author="y2361547758" example="/magireco/announcements" path="/magireco/announcements" /> - -### 游戏横幅 {#%E3%83%9E%E3%82%AE%E3%82%A2%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89-magia-record-mo-fa-ji-lu-you-xi-heng-fu} - -<Route author="y2361547758" example="/magireco/event_banner" path="/magireco/event_banner" /> +| 新着 | PS5 | Switch | PS4 | ニュース | ゲームニュース | PR TIMES | 動画 | 特集・企画記事 | インタビュー | 取材・リポート | レビュー | インディーゲーム | +| ----------- | --- | ------ | --- | -------- | -------------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- | +| new-article | ps5 | switch | ps4 | news | news-game | prtimes | videos | special-article | interview | event-report | review | indie-game | diff --git a/website/docs/routes/government.mdx b/website/docs/routes/government.mdx index 161ce0fc7..c81a91d1c 100644 --- a/website/docs/routes/government.mdx +++ b/website/docs/routes/government.mdx @@ -1,654 +1,242 @@ -# 📢 Government - -## Australia Department of Home Affairs {#australia-department-of-home-affairs} - -### Immigration and Citizenship - News {#australia-department-of-home-affairs-immigration-and-citizenship-news} - -<Route author="liu233w" example="/gov/immiau/news" path="/gov/immiau/news" /> - -## Central Intelligence Agency CIA {#central-intelligence-agency-cia} - -### Annual FOIA Reports {#central-intelligence-agency-cia-annual-foia-reports} - -<Route author="nczitzk" example="/cia/foia-annual-report" path="/cia/foia-annual-report" notOperational="1" /> +# government ## Constitutional Court of Baden-Württemberg (Germany) {#constitutional-court-of-baden-w%C3%BCrttemberg-germany} ### Press releases {#constitutional-court-of-baden-w%C3%BCrttemberg-germany-press-releases} -<Route author="quinn-dev" example="/verfghbw/press" path="/verfghbw/press/:keyword?" paramsDesc={['Keyword']} notOperational="1" /> - -## Hong Kong Centre for Health Protection {#hong-kong-centre-for-health-protection} - -### Category {#hong-kong-centre-for-health-protection-category} - -<Route author="nczitzk" example="/chp" path="/chp/:category?/:language?" paramsDesc={['Category, see below, Important Topics by default', 'Language, see below, zh_tw by default']} notOperational="1"> - 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 | -</Route> +<Route namespace="verfghbw" data={{"path":"/press/:keyword?","categories":["government"],"example":"/verfghbw/press","parameters":{"keyword":"Keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["verfgh.baden-wuerttemberg.de/de/presse-und-service/pressemitteilungen/"],"target":"/press"},"name":"Press releases","maintainers":["quinn-dev"],"url":"verfgh.baden-wuerttemberg.de/de/presse-und-service/pressemitteilungen/","location":"press.ts"}} /> ## Hong Kong Department of Health 香港卫生署 {#hong-kong-department-of-health-xiang-gang-wei-sheng-shu} ### Press Release {#hong-kong-department-of-health-xiang-gang-wei-sheng-shu-press-release} -<Route author="nczitzk" example="/hongkong/dh" path="/hongkong/dh/:language?" paramsDesc={['Language, see below, tc_chi by default']}> - Language +<Route namespace="hongkong" data={{"path":"/dh/:language?","categories":["government"],"example":"/hongkong/dh","parameters":{"language":"Language, see below, tc_chi by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dh.gov.hk/"]},"name":"Press Release","maintainers":["nczitzk"],"url":"dh.gov.hk/","description":"Language\n\n | English | 中文简体 | 中文繁體 |\n | ------- | -------- | -------- |\n | english | chs | tc_chi |","location":"dh.ts"}} /> - | English | 中文简体 | 中文繁體 | - | ------- | -------- | -------- | - | english | chs | tc\_chi | -</Route> +Language + +| English | 中文简体 | 中文繁體 | +| ------- | -------- | -------- | +| english | chs | tc\_chi | ## Hong Kong Independent Commission Against Corruption 香港廉政公署 {#hong-kong-independent-commission-against-corruption-xiang-gang-lian-zheng-gong-shu} ### Press Releases {#hong-kong-independent-commission-against-corruption-xiang-gang-lian-zheng-gong-shu-press-releases} -<Route author="linbuxiao" example="/icac/news/sc" path="/icac/news/:lang?" paramsDesc={['Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese) and `tc`(Traditional Chinese)']} /> +<Route namespace="icac" data={{"path":"/news/:lang?","categories":["government"],"example":"/icac/news/sc","parameters":{"lang":"Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese) and `tc`(Traditional Chinese)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["icac.org.hk/:lang/press/index.html"],"target":"/news/:lang"},"name":"Press Releases","maintainers":["linbuxiao, TonyRL"],"location":"news.ts"}} /> ## Macau Independent Commission Against Corruption 澳门廉政公署 {#macau-independent-commission-against-corruption-ao-men-lian-zheng-gong-shu} ### Latest News {#macau-independent-commission-against-corruption-ao-men-lian-zheng-gong-shu-latest-news} -<Route author="linbuxiao" example="/ccac/news/all" path="/ccac/news/:type/:lang?" paramsDesc={['Category', 'Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese), `tc`(Traditional Chinese) and `pt`(Portuguese)']} puppeteer="1"> - Category +<Route namespace="ccac" data={{"path":"/news/:type/:lang?","categories":["government"],"example":"/ccac/news/all","parameters":{"type":"Category","lang":"Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese), `tc`(Traditional Chinese) and `pt`(Portuguese)"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Latest News","maintainers":["linbuxiao"],"description":"Category\n\n | All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates |\n | --- | -------------- | ---------------------------------------- | -------------- | -------------- |\n | all | case | Persuasion | AnnualReport | PCANews |","location":"news.ts"}} /> - | All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates | - | --- | -------------- | ---------------------------------------- | -------------- | -------------- | - | all | case | Persuasion | AnnualReport | PCANews | -</Route> +Category -## Ministry of Foreign Affairs of Japan 日本国外務省 {#ministry-of-foreign-affairs-of-japan-ri-ben-guo-wai-wu-sheng} - -### Press conference {#ministry-of-foreign-affairs-of-japan-ri-ben-guo-wai-wu-sheng-press-conference} - -<Route author="sgqy" example="/go.jp/mofa" path="/go.jp/mofa" /> - -## Supreme Court of the United States {#supreme-court-of-the-united-states} - -### Arguments Audios {#supreme-court-of-the-united-states-arguments-audios} - -<Route author="nczitzk" example="/us/supremecourt/argument_audio" path="/us/supremecourt/argument_audio/:year?" paramsDesc={['Year, current year by default']} notOperational="1" /> +| All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates | +| --- | -------------- | ---------------------------------------- | -------------- | -------------- | +| all | case | Persuasion | AnnualReport | PCANews | ## Thailand Department of Lands {#thailand-department-of-lands} ### e-LandsAnnouncement {#thailand-department-of-lands-e-landsannouncement} -<Route author="itpcc" example="/dol/announce" path="/dol/announce/:owner?/:province?/:office?" paramsDesc={['Requester/former land owner', 'Province which the land is belongs to', 'DOL office name which the land is belongs to (สำนักงานที่ดิน(กรุงเทพมหานคร|จังหวัด*) [สาขา*])']} /> +<Route namespace="dol" data={{"path":"/announce/:owner?/:province?/:office?","categories":["government"],"example":"/dol/announce","parameters":{"owner":"Requester/former land owner","province":"Province which the land is belongs to","office":"DOL office name which the land is belongs to (สำนักงานที่ดิน(กรุงเทพมหานคร|จังหวัด*) [สาขา*])"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"e-LandsAnnouncement","maintainers":["itpcc"],"location":"announce.ts"}} /> ## Thailand Parliament {#thailand-parliament} ### Thailand Parliament Draft of Law's public hearing system {#thailand-parliament-thailand-parliament-draft-of-law-s-public-hearing-system} -<Route author="itpcc" example="/parliament/section77" path="/parliament/section77/:type?" paramsDesc={['Type of hearing status, see below']} radar="1"> - | Presented by MP \* | Presented by People \* | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected | - | ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- | - | presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm | - | เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง | +<Route namespace="parliament" data={{"path":"/section77/:type?","categories":["government"],"example":"/parliament/section77","parameters":{"type":"Type of hearing status, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Thailand Parliament Draft of Law's public hearing system","maintainers":["itpcc"],"description":"| Presented by MP * | Presented by People * | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected |\n | ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- |\n | presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm |\n | เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง |\n\n *Note:* For `presentbymp` and `presentbyperson`, it can also add:\n\n - `-m` for the draft which Speaker of Parliament considered as a monetary draft (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า เป็นร่างการเงิน), or\n - `-nm` for non-monetary one (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า ไม่เป็นร่างการเงิน).","location":"section77.ts"}} /> - *Note:* For `presentbymp` and `presentbyperson`, it can also add: +| Presented by MP \* | Presented by People \* | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected | +| ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- | +| presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm | +| เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง | - - `-m` for the draft which Speaker of Parliament considered as a monetary draft (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า เป็นร่างการเงิน), or - - `-nm` for non-monetary one (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า ไม่เป็นร่างการเงิน). -</Route> +*Note:* For `presentbymp` and `presentbyperson`, it can also add: -## The United States Trade Representative {#the-united-states-trade-representative} - -### Press Releases {#the-united-states-trade-representative-press-releases} - -<Route author="nczitzk" example="/ustr/press-releases" path="/ustr/press-releases/:year?/:month?" paramsDesc={['Year, current year by default', 'Month, empty by default, show contents in all year']}> - :::tip - Fill in the English expression for the month in the Month field, eg `December` for the 12th Month。 - ::: -</Route> +- `-m` for the draft which Speaker of Parliament considered as a monetary draft (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า เป็นร่างการเงิน), or +- `-nm` for non-monetary one (ประธานสภาผู้แทนราษฎรวินิจฉัยว่า ไม่เป็นร่างการเงิน). ## The White House {#the-white-house} ### Briefing Room {#the-white-house-briefing-room} -<Route author="nczitzk" example="/whitehouse/briefing-room" path="/whitehouse/briefing-room/:category?" paramsDesc={['Category, see below, all by default']}> - | All | Blog | Legislation | Presidential Actions | Press Briefings | Speeches and Remarks | Statements and Releases | - | --- | ---- | ----------- | -------------------- | --------------- | -------------------- | ----------------------- | - | | blog | legislation | presidential-actions | press-briefings | speeches-remarks | statements-releases | -</Route> +<Route namespace="whitehouse" data={{"path":"/briefing-room/:category?","categories":["government"],"example":"/whitehouse/briefing-room","parameters":{"category":"Category, see below, all by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["whitehouse.gov/briefing-room/:category","whitehouse.gov/"],"target":"/briefing-room/:category"},"name":"Briefing Room","maintainers":["nczitzk"],"description":"| All | Blog | Legislation | Presidential Actions | Press Briefings | Speeches and Remarks | Statements and Releases |\n | --- | ---- | ----------- | -------------------- | --------------- | -------------------- | ----------------------- |\n | | blog | legislation | presidential-actions | press-briefings | speeches-remarks | statements-releases |","location":"briefing-room.ts"}} /> + +| All | Blog | Legislation | Presidential Actions | Press Briefings | Speeches and Remarks | Statements and Releases | +| --- | ---- | ----------- | -------------------- | --------------- | -------------------- | ----------------------- | +| | blog | legislation | presidential-actions | press-briefings | speeches-remarks | statements-releases | ### Office of Science and Technology Policy {#the-white-house-office-of-science-and-technology-policy} -<Route author="LyleLee" example="/whitehouse/ostp" path="/whitehouse/ostp" /> - -## U.S. Department of the Treasury {#u-s-department-of-the-treasury} - -### Press Releases {#u-s-department-of-the-treasury-press-releases} - -<Route author="nczitzk" example="/treasury/press-releases" path="/treasury/press-releases/:category?/:title?" paramsDesc={['Category, see below, all by default', 'Title keywords, empty by default']}> - Category - - | Press Releases | Statements & Remarks | Readouts | Testimonies | - | -------------- | -------------------- | -------- | ----------- | - | all | statements-remarks | readouts | testimonies | -</Route> - -## U.S. Food and Drug Administration {#u-s-food-and-drug-administration} - -### CDRHNew {#u-s-food-and-drug-administration-cdrhnew} - -<Route author="nczitzk" example="/fda/cdrh" path="/fda/cdrh" /> - -## United Nations {#united-nations} - -### Security Council Vetoed a Resolution {#united-nations-security-council-vetoed-a-resolution} - -<Route author="HenryQW" example="/un/scveto" path="/un/scveto" /> +<Route namespace="whitehouse" data={{"path":"/ostp","categories":["government"],"example":"/whitehouse/ostp","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["whitehouse.gov/ostp","whitehouse.gov/"]},"name":"Office of Science and Technology Policy","maintainers":["LyleLee"],"url":"whitehouse.gov/ostp","location":"ostp.ts"}} /> ## World Health Organization | WHO {#world-health-organization-who} -### News {#world-health-organization-who-news} - -<Route author="nczitzk" example="/who/news" path="/who/news/:language?" paramsDesc={['Language, see below, English by default']}> - Language - - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt | -</Route> - ### Newsroom {#world-health-organization-who-newsroom} -<Route author="LogicJake nczitzk" example="/who/news-room/feature-stories" path="/who/news-room/:category?/:language?" paramsDesc={['Category, see below, Feature stories by default', 'Language, see below, English by default']}> - Category +<Route namespace="who" data={{"path":"/news-room/:category?/:language?","categories":["government"],"example":"/who/news-room/feature-stories","parameters":{"category":"Category, see below, Feature stories by default","language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["who.int/news-room/:type"],"target":"/news-room/:type"},"name":"Newsroom","maintainers":["LogicJake","nczitzk"],"url":"who.int/news","description":"Category\n\n | Feature stories | Commentaries |\n | --------------- | ------------ |\n | feature-stories | commentaries |\n\n Language\n\n | English | العربية | 中文 | Français | Русский | Español | Português |\n | ------- | ------- | ---- | -------- | ------- | ------- | --------- |\n | en | ar | zh | fr | ru | es | pt |","location":"news-room.ts"}} /> - | Feature stories | Commentaries | - | --------------- | ------------ | - | feature-stories | commentaries | +Category - Language +| Feature stories | Commentaries | +| --------------- | ------------ | +| feature-stories | commentaries | - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt | -</Route> +Language + +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt | + +### News {#world-health-organization-who-news} + +<Route namespace="who" data={{"path":"/news/:language?","categories":["government"],"example":"/who/news","parameters":{"language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["who.int/news"],"target":"/news"},"name":"News","maintainers":["nczitzk"],"url":"who.int/news","description":"Language\n\n | English | العربية | 中文 | Français | Русский | Español | Português |\n | ------- | ------- | ---- | -------- | ------- | ------- | --------- |\n | en | ar | zh | fr | ru | es | pt |","location":"news.ts"}} /> + +Language + +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt | ### Speeches {#world-health-organization-who-speeches} -<Route author="nczitzk" example="/who/speeches" path="/who/speeches/:language?" paramsDesc={['Language, see below, English by default']}> - Language +<Route namespace="who" data={{"path":"/speeches/:language?","categories":["government"],"example":"/who/speeches","parameters":{"language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["who.int/director-general/speeches"],"target":"/speeches"},"name":"Speeches","maintainers":["nczitzk"],"url":"who.int/director-general/speeches","description":"Language\n\n | English | العربية | 中文 | Français | Русский | Español | Português |\n | ------- | ------- | ---- | -------- | ------- | ------- | --------- |\n | en | ar | zh | fr | ru | es | pt |","location":"speeches.ts"}} /> - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt | -</Route> +Language -## World Trade Organization {#world-trade-organization} - -### Dispute settlement news {#world-trade-organization-dispute-settlement-news} - -<Route author="nczitzk" example="/wto/dispute-settlement" path="/wto/dispute-settlement/:year?" paramsDesc={['Year, current year by default']} /> - -## 安徽省科技厅 {#an-hui-sheng-ke-ji-ting} - -### 科技资讯 & 科技资源 {#an-hui-sheng-ke-ji-ting-ke-ji-zi-xun-ke-ji-zi-yuan} - -<Route author="nczitzk" example="/gov/anhui/kjt/kjzx/tzgg" path="/gov/anhui/kjt/:path?" paramsDesc={['路径,默认为通知公告']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中 `http://kjt.ah.gov.cn/` 和 `/index.html` 之间的字段。下面是一个例子。 - - 若订阅 [通知公告](http://kjt.ah.gov.cn/kjzx/tzgg/index.html) 则将对应页面 URL `http://kjt.ah.gov.cn/kjzx/tzgg/index.html` 中 `http://kjt.ah.gov.cn/` 和 `/index.html` 之间的字段 `kjzx/tzgg` 作为路径填入。此时路由为 [`/gov/anhui/kjt/kjzx/tzgg`](https://rsshub.app/gov/anhui/kjt/kjzx/tzgg) - ::: -</Route> +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt | ## 澳门卫生局 {#ao-men-wei-sheng-ju} ### 最新消息 {#ao-men-wei-sheng-ju-zui-xin-xiao-xi} -<Route author="Fatpandac" example="/ssm/news" path="/ssm/news" notOperational="1" /> +<Route namespace="ssm" data={{"path":"/news","categories":["government"],"example":"/ssm/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ssm.gov.mo/","www.ssm.gov.mo/portal"]},"name":"最新消息","maintainers":["Fatpandac"],"url":"www.ssm.gov.mo/","location":"news.ts"}} /> ## 北京社科网 {#bei-jing-she-ke-wang} -### 通用 {#bei-jing-she-ke-wang-tong-yong} - -<Route author="TonyRL" example="/bjsk/newslist-1394-1474-0" path="/bjsk/:path?" paramsDesc={['路径,默认为 `newslist-1486-0-0`']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段。下面是一个例子。 - - 若订阅 [社科资讯 > 社科要闻](https://www.bjsk.org.cn/newslist-1394-1474-0.html) 则将对应页面 URL `https://www.bjsk.org.cn/newslist-1394-1474-0.html` 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段 `newslist-1394-1474-0` 作为路径填入。此时路由为 [`/bjsk/newslist-1394-1474-0`](https://rsshub.app/bjsk/newslist-1394-1474-0) - ::: -</Route> - ### 基金项目管理平台 {#bei-jing-she-ke-wang-ji-jin-xiang-mu-guan-li-ping-tai} -<Route author="nczitzk" example="/bjsk/keti" path="/bjsk/keti/:id?" paramsDesc={['分类 id,见下表,默认为通知公告']}> - | 通知公告 | 资料下载 | - | -------------------------------- | -------------------------------- | - | 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 | -</Route> +<Route namespace="bjsk" data={{"path":"/keti/:id?","categories":["government"],"example":"/bjsk/keti","parameters":{"id":"分类 id,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["keti.bjsk.org.cn/indexAction!to_index.action","keti.bjsk.org.cn/"],"target":"/keti/:id"},"name":"基金项目管理平台","maintainers":["nczitzk"],"url":"keti.bjsk.org.cn/indexAction!to_index.action","description":"| 通知公告 | 资料下载 |\n | -------------------------------- | -------------------------------- |\n | 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 |","location":"keti.ts"}} /> -## 北京市保障房中心有限公司 {#bei-jing-shi-bao-zhang-fang-zhong-xin-you-xian-gong-si} +| 通知公告 | 资料下载 | +| -------------------------------- | -------------------------------- | +| 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 | -### 北京市共有产权住房租赁服务平台 {#bei-jing-shi-bao-zhang-fang-zhong-xin-you-xian-gong-si-bei-jing-shi-gong-you-chan-quan-zhu-fang-zu-lin-fu-wu-ping-tai} +### 通用 {#bei-jing-she-ke-wang-tong-yong} -<Route author="bigfei" example="/gov/beijing/bphc/announcement" path="/gov/beijing/bphc/:cat" paramsDesc={['类别']} notOperational="1"> - | 通知公告 | 项目介绍 | - | :----------: | :------: | - | announcement | project | -</Route> +<Route namespace="bjsk" data={{"path":"/:path?","categories":["government"],"example":"/bjsk/newslist-1394-1474-0","parameters":{"path":"路径,默认为 `newslist-1486-0-0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通用","maintainers":["TonyRL"],"description":":::tip\n 路径处填写对应页面 URL 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段。下面是一个例子。\n\n 若订阅 [社科资讯 > 社科要闻](https://www.bjsk.org.cn/newslist-1394-1474-0.html) 则将对应页面 URL `https://www.bjsk.org.cn/newslist-1394-1474-0.html` 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段 `newslist-1394-1474-0` 作为路径填入。此时路由为 [`/bjsk/newslist-1394-1474-0`](https://rsshub.app/bjsk/newslist-1394-1474-0)\n :::","location":"index.ts"}} /> -## 北京市教育科学规划网 {#bei-jing-shi-jiao-yu-ke-xue-gui-hua-wang} +:::tip +路径处填写对应页面 URL 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段。下面是一个例子。 -### 通用 {#bei-jing-shi-jiao-yu-ke-xue-gui-hua-wang-tong-yong} - -<Route author="TonyRL" example="/gov/beijing/bjedu/gh" path="/gov/beijing/bjedu/gh/:urlPath?" paramsDesc={['路径,默认为 `zxtzgg`']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段。下面是一个例子。 - - 若订阅 [通知公告](https://gh.bjedu.cn/ghsite/zxtzgg/index.html) 则将对应页面 URL `https://gh.bjedu.cn/ghsite/zxtzgg/index.html` 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段 `zxtzgg` 作为路径填入。此时路由为 [`/gov/beijing/bjedu/gh/zxtzgg`](https://rsshub.app/gov/beijing/bjedu/gh/zxtzgg) - ::: -</Route> - -## 北京市教育委员会 {#bei-jing-shi-jiao-yu-wei-yuan-hui} - -### 通知公告 {#bei-jing-shi-jiao-yu-wei-yuan-hui-tong-zhi-gong-gao} - -<Route author="nczitzk" example="/gov/beijing/jw/tzgg" path="/gov/beijing/jw/tzgg" /> - -## 北京市科学技术委员会、中关村科技园区管理委员会 {#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui} - -### 频道 {#bei-jing-shi-ke-xue-ji-shu-wei-yuan-hui-zhong-guan-cun-ke-ji-yuan-qu-guan-li-wei-yuan-hui-pin-dao} - -<Route author="Fatpandac" example="/kwbeijing/col736" path="/kwbeijing/:channel" paramsDesc={['频道']} notOperational="1"> - 频道参数可在官网获取,如: - - `http://kw.beijing.gov.cn/col/col736/index.html` 对应 `/kwbeijing/col736` -</Route> - -## 北京市人民政府 {#bei-jing-shi-ren-min-zheng-fu} - -### 北京教育考试院 {#bei-jing-shi-ren-min-zheng-fu-bei-jing-jiao-yu-kao-shi-yuan} - -<Route author="gavin-k" example="/gov/beijing/bjeea/bjeeagg" path="/gov/beijing/bjeea/:type" paramsDesc={['分类名']}> - | 通知公告 | 招考政策 | 自考快递 | - | :------: | :------: | :------: | - | bjeeagg | zkzc | zkkd | -</Route> - -## 北京市卫生健康委员会 {#bei-jing-shi-wei-sheng-jian-kang-wei-yuan-hui} - -### 新闻中心 {#bei-jing-shi-wei-sheng-jian-kang-wei-yuan-hui-xin-wen-zhong-xin} - -<Route author="luyuhuang" example="/gov/beijing/mhc/wnxw" path="/gov/beijing/mhc/:caty" paramsDesc={['类别']}> - | 委内新闻 | 基层动态 | 媒体聚焦 | 热点新闻 | - | :------: | :------: | :------: | :------: | - | wnxw | jcdt | mtjj | rdxws | -</Route> +若订阅 [社科资讯 > 社科要闻](https://www.bjsk.org.cn/newslist-1394-1474-0.html) 则将对应页面 URL `https://www.bjsk.org.cn/newslist-1394-1474-0.html` 中 `https://www.bjsk.org.cn/` 和 `.html` 之间的字段 `newslist-1394-1474-0` 作为路径填入。此时路由为 [`/bjsk/newslist-1394-1474-0`](https://rsshub.app/bjsk/newslist-1394-1474-0) +::: ## 北京无线电协会 {#bei-jing-wu-xian-dian-xie-hui} ### 最新资讯 {#bei-jing-wu-xian-dian-xie-hui-zui-xin-zi-xun} -<Route author="Misaka13514" example="/bjwxdxh/114" path="/bjwxdxh/:type?" paramsDesc={['类型,见下表,默认为全部']} radar="1"> - | 协会活动 | 公告通知 | 会议情况 | 简报 | 政策法规 | 学习园地 | 业余无线电服务中心 | 经验交流 | 新技术推介 | 活动通知 | 爱好者园地 | 结果查询 | 资料下载 | 会员之家 | 会员简介 | 会员风采 | 活动报道 | - | -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 | -</Route> +<Route namespace="bjwxdxh" data={{"path":"/:type?","categories":["government"],"example":"/bjwxdxh/114","parameters":{"type":"类型,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新资讯","maintainers":["Misaka13514"],"description":"| 协会活动 | 公告通知 | 会议情况 | 简报 | 政策法规 | 学习园地 | 业余无线电服务中心 | 经验交流 | 新技术推介 | 活动通知 | 爱好者园地 | 结果查询 | 资料下载 | 会员之家 | 会员简介 | 会员风采 | 活动报道 |\n | -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 |","location":"index.ts"}} /> -## 重庆市人民政府 {#chong-qing-shi-ren-min-zheng-fu} +| 协会活动 | 公告通知 | 会议情况 | 简报 | 政策法规 | 学习园地 | 业余无线电服务中心 | 经验交流 | 新技术推介 | 活动通知 | 爱好者园地 | 结果查询 | 资料下载 | 会员之家 | 会员简介 | 会员风采 | 活动报道 | +| -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 | -### 国有资产监督管理委员会 {#chong-qing-shi-ren-min-zheng-fu-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui} +## 国家药品审评网站 {#guo-jia-yao-pin-shen-ping-wang-zhan} -<Route author="nczitzk" example="/gov/chongqing/gzw" path="/gov/chongqing/gzw/:category?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 国企资讯 | 国企简介 | 国企招聘 | - | --------- | -------- | -------- | -------- | - | tzgg\_191 | gqdj | gqjj | gqzp | -</Route> +### 首页 {#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye} -### 两江新区信息公开网 {#chong-qing-shi-ren-min-zheng-fu-liang-jiang-xin-qu-xin-xi-gong-kai-wang} +<Route namespace="cde" data={{"path":"/:channel/:category","categories":["government"],"example":"/cde/news/gzdt","parameters":{"channel":"频道","category":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["Fatpandac"],"description":"- 频道\n\n | 新闻中心 | 政策法规 |\n | :------: | :------: |\n | news | policy |\n\n - 类别\n\n | 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 |\n | :------: | :------: | :------: | :------: | :------: |\n | | zwxw | ywdd | tpxw | gzdt |\n\n | 政策法规 | 法律法规 | 中心规章 |\n | :------: | :------: | :------: |\n | | flfg | zxgz |","location":"index.ts"}} /> -#### 党务公开 {#chong-qing-shi-ren-min-zheng-fu-liang-jiang-xin-qu-xin-xi-gong-kai-wang-dang-wu-gong-kai} +- 频道 -<Route author="nczitzk" example="/gov/chongqing/ljxq/dwgk" path="/gov/chongqing/ljxq/dwgk" /> +| 新闻中心 | 政策法规 | +| :------: | :------: | +| news | policy | -#### 政务公开 {#chong-qing-shi-ren-min-zheng-fu-liang-jiang-xin-qu-xin-xi-gong-kai-wang-zheng-wu-gong-kai} +- 类别 -<Route author="nczitzk" example="/gov/chongqing/ljxq/zwgk/lzyj" path="/gov/chongqing/ljxq/zwgk/:caty" paramsDesc={['分类名']} notOperational="1"> - | 履职依据 | 公示公告 | - | -------- | -------- | - | lzyj | gsgg | -</Route> +| 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 | +| :------: | :------: | :------: | :------: | :------: | +| | zwxw | ywdd | tpxw | gzdt | -### 人力社保局 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju} +| 政策法规 | 法律法规 | 中心规章 | +| :------: | :------: | :------: | +| | flfg | zxgz | -#### 人事考试通知 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-ren-shi-kao-shi-tong-zhi} +### 信息公开 {#guo-jia-yao-pin-shen-ping-wang-zhan-xin-xi-gong-kai} -<Route author="Mai19930513" example="/gov/chongqing/rsks" path="/gov/chongqing/rsks" radar="1" /> +<Route namespace="cde" data={{"path":"/xxgk/:category","categories":["government"],"example":"/cde/xxgk/priorityApproval","parameters":{"category":"类别,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"信息公开","maintainers":["TonyRL"],"description":"| 优先审评公示 | 突破性治疗公示 | 临床试验默示许可 |\n | :--------------: | :--------------: | :--------------: |\n | priorityApproval | breakthroughCure | cliniCal |","location":"xxgk.ts"}} /> -#### 事业单位公开招聘 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-shi-ye-dan-wei-gong-kai-zhao-pin} +| 优先审评公示 | 突破性治疗公示 | 临床试验默示许可 | +| :--------------: | :--------------: | :--------------: | +| priorityApproval | breakthroughCure | cliniCal | -<Route author="MajexH" example="/gov/chongqing/sydwgkzp" path="/gov/chongqing/sydwgkzp" radar="1" /> +### 指导原则专栏 {#guo-jia-yao-pin-shen-ping-wang-zhan-zhi-dao-yuan-ze-zhuan-lan} -## 德阳市人民政府 {#de-yang-shi-ren-min-zheng-fu} +<Route namespace="cde" data={{"path":"/zdyz/:category","categories":["government"],"example":"/cde/zdyz/domesticGuide","parameters":{"category":"类别,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"指导原则专栏","maintainers":["TonyRL"],"description":"| 发布通告 | 征求意见 |\n | :-----------: | :---------: |\n | domesticGuide | opinionList |","location":"zdyz.ts"}} /> -### 政府公开信息 {#de-yang-shi-ren-min-zheng-fu-zheng-fu-gong-kai-xin-xi} +| 发布通告 | 征求意见 | +| :-----------: | :---------: | +| domesticGuide | opinionList | -<Route author="zytomorrow" example="/gov/sichuan/deyang/govpublicinfo/绵竹市" path="/gov/sichuan/deyang/govpublicinfo/:countyName/:infoType?" paramsDesc={['区县名(**其他区县整改中,暂时只支持`绵竹市`**)。德阳市、绵竹市、广汉市、什邡市、中江县、罗江区、旌阳区、高新区', '信息类型。默认值:fdzdnr-“法定主动内容”']}> - | 法定主动内容 | 公示公告 | - | :----------: | :------: | - | fdzdnr | gsgg | -</Route> +## 南京鼓楼医院 {#nan-jing-gu-lou-yi-yuan} -### 今日绵竹 {#de-yang-shi-ren-min-zheng-fu-jin-ri-mian-zhu} +### 员工版教育培训 {#nan-jing-gu-lou-yi-yuan-yuan-gong-ban-jiao-yu-pei-xun} -<Route author="zytomorrow" example="/gov/sichuan/deyang/mztoday/zx" path="/gov/sichuan/deyang/mztoday/:infoType?" paramsDesc={['信息栏目名称。默认最新(zx)']} notOperational="1"> - | 最新 | 推荐 | 时政 | 教育 | 民生 | 文旅 | 经济 | 文明创建 | 部门 | 镇(街道) | 健康绵竹 | 南轩讲堂 | 视频 | 文明实践 | 领航中国 | 绵竹年画 | 绵竹历史 | 绵竹旅游 | 外媒看绵竹 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- | - | zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz | -</Route> +<Route namespace="njglyy" data={{"path":"/ygbjypx","categories":["government"],"example":"/njglyy/ygbjypx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["njglyy.com/ygb/jypx/jypx.aspx","njglyy.com/"]},"name":"员工版教育培训","maintainers":["real-jiakai"],"url":"njglyy.com/ygb/jypx/jypx.aspx","location":"ygbjypx.ts"}} /> -## 广东省人民政府 {#guang-dong-sheng-ren-min-zheng-fu} +## 台湾行政院消费者保护会 {#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui} -### 省教育厅 {#guang-dong-sheng-ren-min-zheng-fu-sheng-jiao-yu-ting} +### 消费资讯 {#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui-xiao-fei-zi-xun} -<Route author="nczitzk" example="/gov/guangdong/edu/tzgg" path="/gov/guangdong/edu/:caty" paramsDesc={['资讯类别']} notOperational="1"> - | 通知公告 | 本厅信息 | 新闻发布 | 媒体聚焦 | 广东教育 | 教育动态 | 图片新闻 | 政声传递 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | - | tzgg | btxx | xwfb | mtjj | gdjy | jydt | tpxw | zscd | -</Route> +<Route namespace="cpcey" data={{"path":"/:type?","categories":["government"],"example":"/cpcey/xwg","parameters":{"type":"默认为 `xwg`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"消费资讯","maintainers":["Fatpandac"],"description":"| 新闻稿 | 消费资讯 |\n | :----: | :------: |\n | xwg | xfzx |","location":"index.ts"}} /> -### 省教育考试院 {#guang-dong-sheng-ren-min-zheng-fu-sheng-jiao-yu-kao-shi-yuan} +| 新闻稿 | 消费资讯 | +| :----: | :------: | +| xwg | xfzx | -<Route author="icealtria" example="/gov/guangdong/eea/kszs" path="/gov/guangdong/eea/:caty" paramsDesc={['资讯类别']}> - | 考试招生 | 社会考试 | 招考公示 | 报考指南 | 要闻动态 | 公开专栏 | 政策文件 | 政策解读 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | - | kszs | shks | zkgs | bkzn | news | gkzl | zcwj | zcjd | -</Route> +## 台灣衛生福利部 {#tai-wan-wei-sheng-fu-li-bu} -### 深圳市人民政府 {#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-ren-min-zheng-fu} +### 即時新聞澄清 {#tai-wan-wei-sheng-fu-li-bu-ji-shi-xin-wen-cheng-qing} -<Route author="laoxua" example="/gov/shenzhen/xxgk/zfxxgj/tzgg" path="/gov/shenzhen/xxgk/zfxxgj/:caty" paramsDesc={['信息类别']}> - | 通知公告 | 政府采购 | 资金信息 | 重大项目 | - | :------: | :------: | :------: | :------: | - | tzgg | zfcg | zjxx | zdxm | -</Route> +<Route namespace="mohw" data={{"path":"/clarification","categories":["government"],"example":"/mohw/clarification","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mohw.gov.tw/"]},"name":"即時新聞澄清","maintainers":["nczitzk"],"url":"mohw.gov.tw/","location":"clarification.ts"}} /> -### 深圳市委组织部 {#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-wei-zu-zhi-bu} +## 中国科学技术协会 {#zhong-guo-ke-xue-ji-shu-xie-hui} -<Route author="zlasd" example="/gov/shenzhen/zzb/tzgg" path="/gov/shenzhen/zzb/:caty/:page?" paramsDesc={['信息类别', '页码']}> - | 通知公告 | 任前公示 | 政策法规 | 工作动态 | 部门预算决算公开 | 业务表格下载 | - | :------: | :------: | :------: | :------: | :--------------: | :----------: | - | tzgg | rqgs | zcfg | gzdt | xcbd | bgxz | -</Route> +### 通用 {#zhong-guo-ke-xue-ji-shu-xie-hui-tong-yong} -### 深圳市考试院 {#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-kao-shi-yuan} +<Route namespace="cast" data={{"path":"/:column/:subColumn/:category?","categories":["government"],"example":"/cast/xw/tzgg/ZH","parameters":{"column":"栏目编号,见下表","subColumn":"二级栏目编号","category":"分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通用","maintainers":["KarasuShin","TonyRL"],"description":":::tip\n 在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`10`\n :::\n\n | 分类 | 编码 |\n | -------- | ---- |\n | 全景科协 | qjkx |\n | 智库 | zk |\n | 学术 | xs |\n | 科普 | kp |\n | 党建 | dj |\n | 数据 | sj |\n | 新闻 | xw |","location":"index.ts"}} /> -<Route author="zlasd" example="/gov/shenzhen/hrss/szksy/bmxx/2" path="/gov/shenzhen/hrss/szksy/:caty/:page?" paramsDesc={['信息类别', '页码']}> - | 通知公告 | 报名信息 | 成绩信息 | 合格标准 | 合格人员公示 | 证书发放信息 | - | :------: | :------: | :------: | :------: | :----------: | :----------: | - | tzgg | bmxx | cjxx | hgbz | hgrygs | zsff | -</Route> +:::tip +在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`10` +::: -### 深圳市住房和建设局 {#guang-dong-sheng-ren-min-zheng-fu-shen-zhen-shi-zhu-fang-he-jian-she-ju} +| 分类 | 编码 | +| -------- | ---- | +| 全景科协 | qjkx | +| 智库 | zk | +| 学术 | xs | +| 科普 | kp | +| 党建 | dj | +| 数据 | sj | +| 新闻 | xw | -<Route author="lonn" example="/gov/shenzhen/zjj/xxgk/tzgg" path="/gov/shenzhen/zjj/xxgk/:caty" paramsDesc={['信息类别']}> - | 通知公告 | - | :------: | - | tzgg | -</Route> +## 中国科学学与科技政策研究会 {#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui} -### 惠州市人民政府 {#guang-dong-sheng-ren-min-zheng-fu-hui-zhou-shi-ren-min-zheng-fu} +### 研究会动态 {#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai} -#### 政务公开 {#guang-dong-sheng-ren-min-zheng-fu-hui-zhou-shi-ren-min-zheng-fu-zheng-wu-gong-kai} +<Route namespace="casssp" data={{"path":"/news/:category?","categories":["government"],"example":"/casssp/news/3","parameters":{"category":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究会动态","maintainers":["nczitzk"],"description":"| 通知公告 | 新闻动态 | 信息公开 | 时政要闻 |\n | -------- | -------- | -------- | -------- |\n | 3 | 2 | 92 | 93 |","location":"news.ts"}} /> -<Route author="Fatpandac" example="/gov/huizhou/zwgk/jgdt" path="/gov/huizhou/zwgk/:category?" paramsDesc={['资讯类别,可以从网址中得到,默认为政务要闻']} notOperational="1" /> +| 通知公告 | 新闻动态 | 信息公开 | 时政要闻 | +| -------- | -------- | -------- | -------- | +| 3 | 2 | 92 | 93 | -## 广州市人民政府 {#guang-zhou-shi-ren-min-zheng-fu} - -### 新闻 {#guang-zhou-shi-ren-min-zheng-fu-xin-wen} - -<Route author="drgnchan" example="/gov/gz/xw/gzyw" path="/gov/gz/xw/:category" paramsDesc={['新闻分类']}> - | 广州要闻 | 今日头条 | 通知公告 | - | -------- | -------- | -------- | - | gzyw | jrtt | tzgg | -</Route> - -### 政务公开 {#guang-zhou-shi-ren-min-zheng-fu-zheng-wu-gong-kai} - -<Route author="drgnchan" example="/gov/gz/zwgk/zcjd" path="/gov/gz/zwgk/:category" paramsDesc={['政务话你知']}> - | 文字解读 | - | -------- | - | zcjd | -</Route> - -## 国家广播电视总局 {#guo-jia-guang-bo-dian-shi-zong-ju} - -### 分类 {#guo-jia-guang-bo-dian-shi-zong-ju-fen-lei} - -<Route author="yuxinliu-alex" example="/gov/nrta/news" path="/gov/nrta/news/:category?" paramsDesc={['资讯类别,可从地址中获取,默认为总局要闻']} anticrawler="1"> - | 总局要闻 | 公告公示 | 工作动态 | 其他 | - | -------- | -------- | -------- | ---- | - | 112 | 113 | 114 | | -</Route> - -### 电视剧政务平台 {#guo-jia-guang-bo-dian-shi-zong-ju-dian-shi-ju-zheng-wu-ping-tai} - -<Route author="nczitzk" example="/gov/nrta/dsj" path="/gov/nrta/dsj/:category?" paramsDesc={['分类,见下表,默认为备案公示']} anticrawler="1"> - | 备案公示 | 发行许可通告 | 重大题材立项 | 重大题材摄制 | 变更通报 | - | -------- | ------------ | ---------------- | --------------- | -------- | - | note | announce | importantLixiang | importantShezhi | changing | -</Route> - -## 国家矿山安全监察局 {#guo-jia-kuang-shan-an-quan-jian-cha-ju} - -### 新闻 {#guo-jia-kuang-shan-an-quan-jian-cha-ju-xin-wen} - -<Route author="nczitzk" example="/gov/chinamine-safety/xw" path="/gov/chinamine-safety/xw/:category?" paramsDesc={['分类,见下表,默认为应急管理部要闻']} radar="1"> - | 分类 | id | - | ------------------ | -------- | - | 应急管理部要闻 | yjglbyw | - | 国家矿山安监局要闻 | mkaqjcxw | - | 地方信息 | dfdt | - | 党建专栏 | djzl | - | 经验交流 | jyjl | - | 新闻发布会 | xwfbh | -</Route> - -### 政府信息公开 {#guo-jia-kuang-shan-an-quan-jian-cha-ju-zheng-fu-xin-xi-gong-kai} - -<Route author="nczitzk" example="/gov/chinamine-safety/zfxxgk" path="/gov/chinamine-safety/zfxxgk/:category?" paramsDesc={['分类,见下表,默认为法定主动公开内容 > 通知公告']} radar="1"> - | 政府信息公开指南 | 政府信息公开制度 | - | ---------------- | ---------------- | - | zfxxgkzn | zfxxgkzd | - - <details> - <summary>更多分类</summary> - - #### 法定主动公开内容 - - | 分类 | id | - | ------------ | --------------------- | - | 通知公告 | fdzdgknr/tzgg | - | 征求意见 | fdzdgknr/zqyj\_01 | - | 政策法规 | fdzdgknr/zcfg | - | 规划计划 | fdzdgknr/ghjh | - | 政策解读 | fdzdgknr/zcjd | - | 安全许可 | fdzdgknr/anqxk | - | 事故查处 | fdzdgknr/sgcc | - | 人事信息 | fdzdgknr/rsxx | - | 财务信息 | fdzdgknr/cwxx | - | 建议提案办理 | fdzdgknr/jytabl\_4823 | - - #### 法定主动公开内容 > 政策法规 - - | 分类 | id | - | ---------------- | ---------------------------- | - | 法律 | fdzdgknr/zcfg/fl\_01 | - | 行政法规 | fdzdgknr/zcfg/xzfg | - | 部门规章 | fdzdgknr/zcfg/bmgz\_01 | - | 部门规章煤矿安监 | fdzdgknr/zcfg/bmgz\_01/mkanj | - | 部门规章非煤矿山 | fdzdgknr/zcfg/bmgz\_01/fmks | - | 行业标准 | fdzdgknr/zcfg/hybz\_01 | - | 行业标准煤矿安监 | fdzdgknr/zcfg/hybz\_01/mkanj | - | 行业标准非煤矿山 | fdzdgknr/zcfg/hybz\_01/fmks | - - #### 法定主动公开内容 > 事故查处 - - | 分类 | id | - | -------------- | -------------------- | - | 事故通报 | fdzdgknr/sgcc/sgtb | - | 事故督办 | fdzdgknr/sgcc/sgdb | - | 事故调查报告 | fdzdgknr/sgcc/sgbg | - | 事故案例 | fdzdgknr/sgcc/sgalks | - | 事故警示教育片 | fdzdgknr/sgcc/sgjsjy | - </details> -</Route> - -## 国家林业和草原局 {#guo-jia-lin-ye-he-cao-yuan-ju} - -### 国家林草科技大讲堂 {#guo-jia-lin-ye-he-cao-yuan-ju-guo-jia-lin-cao-ke-ji-da-jiang-tang} - -<Route author="nczitzk" example="/gov/forestry/gjlckjdjt" path="/gov/forestry/gjlckjdjt/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1" anticrawler="1"> - | 分类 | id | - | -------- | ---- | - | 经济林 | jjl | - | 林木良种 | lmlz | - | 林下经济 | lxjj | - | 生态修复 | stxf | - | 用材林 | ycl | - | 其他 | qt | -</Route> - -## 国家能源局 {#guo-jia-neng-yuan-ju} - -### 发展规划司 {#guo-jia-neng-yuan-ju-fa-zhan-gui-hua-si} - -<Route author="nczitzk" example="/gov/nea/sjzz/ghs" path="/gov/nea/sjzz/ghs" radar="1" /> - -## 国家市场监督管理总局 {#guo-jia-shi-chang-jian-du-guan-li-zong-ju} - -### 留言咨询 {#guo-jia-shi-chang-jian-du-guan-li-zong-ju-liu-yan-zi-xun} - -<Route author="nczitzk" example="/gov/samr/xgzlyhd" path="/gov/samr/xgzlyhd/:category?/:department?" paramsDesc={['留言类型,见下表,默认为全部', '回复部门,见下表,默认为全部']} radar="1"> - #### 留言类型 - - | 类型 | 类型 id | - | ------------------------------------------ | -------------------------------- | - | 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf | - | 规划统计 | b807cf9cdf434635ae908d48757e0f39 | - | 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 | - | 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 | - | 走私贩私 | 84c728530e1e478e94fe3f0030171c53 | - | 登记注册 | 07fff64612dc41aca871c06587abf71d | - | 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 | - | 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 | - | 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 | - | 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 | - | 商业贿赂 | b494e6535af149c5a51fd4197993f061 | - | 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 | - | 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 | - | 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa | - | 动产抵押登记 | 3856de5835444229943b18cac7781e9f | - | 广告监管 | d0e38171042048c2bf31b05c5e57aa68 | - | 三包 | c4dbd85692604a428b1ea7613e67beb8 | - | 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c | - | 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b | - | 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 | - | 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa | - | 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 | - | 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a | - | 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 | - | 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c | - | 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 | - | 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 | - | 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d | - | 计量器具 | 90b25e22861446d5822e07c7c1f5169a | - | 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad | - | 国家标准 | 299b9672e1c246e69485a5b695f42c5b | - | 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 | - | 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 | - | 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb | - | 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 | - | 科技财务 | 47367b9704964355ba52899a4c5abbb0 | - | 干部人事 | 6b978e3c127c489ea8e2d693b768887e | - | 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a | - | 党群工作 | aa71052978af4304937eb382f24f9902 | - | 退休干部 | 44505fc58c81428eb5cef15706007b5e | - | 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd | - | 滥用行政权力 | 1215206156dc48029b98da825f26fcbc | - | 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 | - | 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 | - | 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 | - | 并购行为 | 90e315647acd415ca68f97fc1b42053d | - | 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb | - | 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 | - | 综合执法 | cfbb1b5dade446299670ca38844b265e | - | 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb | - | 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 | - | 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 | - | 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 | - - #### 回复部门 - - | 部门 | 部门 id | - | ---------------------------- | -------------------------------- | - | 办公厅 | 6ed539b270634667afc4d466b67a53f7 | - | 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 | - | 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 | - | 登记注册局 | e4553350549f45f38da5602147cf8639 | - | 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 | - | 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 | - | 综合规划司 | 958e1619159c45a7b76663a59d9052ea | - | 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c | - | 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 | - | 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab | - | 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b | - | 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 | - | 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 | - | 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 | - | 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 | - | 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a | - | 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 | - | 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 | - | 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 | - | 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a | - | 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 | - | 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 | - | 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 | - | 认证监督管理司 | ca4987393d514debb4d1e2126f576987 | - | 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 | - | 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda | - | 科技和财务司 | 117355eea94c426199e2e519fd98ce07 | - | 人事司 | a341e8b7929e44769b9424b7cf69d32a | - | 国际司 | f784499ef24541f5b20de4c24cfc61e7 | - | 机关党委 | a49119c6f40045dd994f3910500cedfa | - | 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b | -</Route> - -## 国家税务总局 {#guo-jia-shui-wu-zong-ju} - -### 最新文件 {#guo-jia-shui-wu-zong-ju-zui-xin-wen-jian} - -<Route author="nczitzk" example="/gov/chinatax/latest" path="/gov/chinatax/latest" notOperational="1" /> - -## 国家统计局 {#guo-jia-tong-ji-ju} - -### 通用 {#guo-jia-tong-ji-ju-tong-yong} - -<Route author="bigfei nczitzk" example="/gov/stats/sj/zxfb" path="/gov/stats/:path+" paramsDesc={['路径,默认为数据最新发布']}> - :::tip - 路径处填写对应页面 URL 中 `http://www.stats.gov.cn/` 后的字段。下面是一个例子。 - - 若订阅 [数据 > 数据解读](http://www.stats.gov.cn/sj/sjjd/) 则将对应页面 URL `http://www.stats.gov.cn/sj/sjjd/` 中 `http://www.stats.gov.cn/` 后的字段 `sj/sjjd` 作为路径填入。此时路由为 [`/gov/stats/sj/sjjd`](https://rsshub.app/gov/stats/sj/sjjd) - - 若订阅 [新闻 > 时政要闻 > 中央精神](http://www.stats.gov.cn/xw/szyw/zyjs/) 则将对应页面 URL `http://www.stats.gov.cn/xw/szyw/zyjs/` 中 `http://www.stats.gov.cn/` 后的字段 `xw/szyw/zyjs` 作为路径填入。此时路由为 [`/gov/stats/xw/szyw/zyjs`](https://rsshub.app/gov/stats/xw/szyw/zyjs) - ::: -</Route> - -## 国家外汇管理局 {#guo-jia-wai-hui-guan-li-ju} +## 中国人民银行 {#zhong-guo-ren-min-yin-hang} <details> <summary>*业务咨询* 和 *投诉建议* 可用的站点参数</summary> @@ -690,1491 +278,531 @@ | ningbo | xiamen | qingdao | shenzhen | </details> -### 业务咨询 {#guo-jia-wai-hui-guan-li-ju-ye-wu-zi-xun} +### Immigration and Citizenship - News {#zhong-guo-ren-min-yin-hang-immigration-and-citizenship-news} -<Route author="nczitzk" example="/gov/safe/business/beijing" path="/gov/safe/business/:site?" paramsDesc={['站点,见上表,默认为 beijing']} radar="1" /> +<Route namespace="gov" data={{"path":"/immiau/news","categories":["government"],"example":"/gov/immiau/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Immigration and Citizenship - News","maintainers":["liu233w"],"location":"immiau/news.ts"}} /> -### 投诉建议 {#guo-jia-wai-hui-guan-li-ju-tou-su-jian-yi} +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} -<Route author="nczitzk" example="/gov/safe/complaint/beijing" path="/gov/safe/complaint/:site?" paramsDesc={['站点,见上表,默认为 beijing']} radar="1" /> +<Route namespace="gov" data={{"path":"/chongqing/rsks","categories":["government"],"example":"/gov/chongqing/rsks","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rlsbj.cq.gov.cn/"]},"name":"Unknown","maintainers":["Mai19930513"],"url":"rlsbj.cq.gov.cn/","location":"chongqing/rsks.ts"}} /> -## 国家新闻出版广电总局(弃用) {#guo-jia-xin-wen-chu-ban-guang-dian-zong-ju-qi-yong} +### 财政厅 {#zhong-guo-ren-min-yin-hang-cai-zheng-ting} -### 游戏审批结果 {#guo-jia-xin-wen-chu-ban-guang-dian-zong-ju-qi-yong-you-xi-shen-pi-jie-guo} +<Route namespace="gov" data={{"path":"/hebei/czt/xwdt/:category?","categories":["government"],"example":"/gov/hebei/czt/xwdt","parameters":{"category":"分类,见下表,默认为财政动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"财政厅","maintainers":["nczitzk"],"description":"| 财政动态 | 综合新闻 | 通知公告 |\n | -------- | -------- | -------- |\n | gzdt | zhxw | tzgg |","location":"hebei/czt.ts"}} /> -<Route author="y2361547758" example="/gov/sapprft/approval/domesticnetgame/2020年1月" path="/gov/sapprft/approval/:channel/:detail?" paramsDesc={['栏目名', '标题关键字']}> - | 栏目 | channel | - | :------------------: | :---------------: | - | 进口网络游戏审批信息 | importednetgame | - | 进口电子游戏审批信息 | importedvideogame | - | 国产网络游戏审批信息 | domesticnetgame | - | 游戏审批变更信息 | gamechange | +| 财政动态 | 综合新闻 | 通知公告 | +| -------- | -------- | -------- | +| gzdt | zhxw | tzgg | - | 描述 | detail | - | :------------------------------------: | :--------------: | - | 留空,返回栏目所有文章 | | - | new,返回栏目第一篇文章内容 | new | - | 某个文章标题的一部分,返回这篇文章内容 | 例:2020 年 1 月 | -</Route> +### 电视剧政务平台 {#zhong-guo-ren-min-yin-hang-dian-shi-ju-zheng-wu-ping-tai} -## 国家新闻出版署 {#guo-jia-xin-wen-chu-ban-shu} +<Route namespace="gov" data={{"path":"/nrta/dsj/:category?","categories":["government"],"example":"/gov/nrta/dsj","parameters":{"category":"分类,见下表,默认为备案公示"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"电视剧政务平台","maintainers":["nczitzk"],"description":"| 备案公示 | 发行许可通告 | 重大题材立项 | 重大题材摄制 | 变更通报 |\n | -------- | ------------ | ---------------- | --------------- | -------- |\n | note | announce | importantLixiang | importantShezhi | changing |","location":"nrta/dsj.ts"}} /> -### 列表 {#guo-jia-xin-wen-chu-ban-shu-lie-biao} +| 备案公示 | 发行许可通告 | 重大题材立项 | 重大题材摄制 | 变更通报 | +| -------- | ------------ | ---------------- | --------------- | -------- | +| note | announce | importantLixiang | importantShezhi | changing | -<Route author="y2361547758" example="/gov/nppa/317" path="/gov/nppa/:channel" paramsDesc={['栏目名 id']} radar="1" notOperational="1" /> +### 发展规划司 {#zhong-guo-ren-min-yin-hang-fa-zhan-gui-hua-si} -### 详情 {#guo-jia-xin-wen-chu-ban-shu-xiang-qing} +<Route namespace="gov" data={{"path":"/nea/sjzz/ghs","categories":["government"],"example":"/gov/nea/sjzz/ghs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nea.gov.cn/sjzz/ghs/"]},"name":"发展规划司","maintainers":["nczitzk"],"url":"nea.gov.cn/sjzz/ghs/","location":"nea/ghs.ts"}} /> -<Route author="y2361547758" example="/gov/nppa/318/45948" path="/gov/nppa/:channel/:content" paramsDesc={['栏目名 id', '文章 id']} radar="1" notOperational="1" /> +### 飞行任务 {#zhong-guo-ren-min-yin-hang-fei-xing-ren-wu} -## 国家药品监督管理局 {#guo-jia-yao-pin-jian-du-guan-li-ju} +<Route namespace="gov" data={{"path":"/cmse/fxrw","categories":["government"],"example":"/gov/cmse/fxrw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cmse.gov.cn/fxrw"]},"name":"飞行任务","maintainers":["nczitzk"],"url":"www.cmse.gov.cn/fxrw","location":"cmse/fxrw.ts"}} /> -### 通用 {#guo-jia-yao-pin-jian-du-guan-li-ju-tong-yong} +### 分类 {#zhong-guo-ren-min-yin-hang-fen-lei} -<Route author="TonyRL" example="/gov/nmpa/xxgk/ggtg" path="/gov/nmpa/:path+" paramsDesc={['路径,默认为公告通告']} radar="1" notOperational="1"> - :::tip - 路径处填写对应页面 URL 中 `https://www.nmpa.gov.cn/` 与 `/index.html` 之间的字段,下面是一个例子。 +<Route namespace="gov" data={{"path":"/nrta/news/:category?","categories":["government"],"example":"/gov/nrta/news","parameters":{"category":"资讯类别,可从地址中获取,默认为总局要闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["yuxinliu-alex"],"description":"| 总局要闻 | 公告公示 | 工作动态 | 其他 |\n | -------- | -------- | -------- | ---- |\n | 112 | 113 | 114 | |","location":"nrta/news.ts"}} /> - 若订阅 [公告通告](https://www.nmpa.gov.cn/xxgk/ggtg/index.html) 则将对应页面 URL `https://www.nmpa.gov.cn/xxgk/ggtg/index.html` 中 `https://www.nmpa.gov.cn/` 和 `/index.html` 之间的字段 `xxgk/ggtg` 作为路径填入。此时路由为 [`/gov/nmpa/xxgk/ggtg`](https://rsshub.app/gov/nmpa/xxgk/ggtg) - ::: -</Route> +| 总局要闻 | 公告公示 | 工作动态 | 其他 | +| -------- | -------- | -------- | ---- | +| 112 | 113 | 114 | | -## 国家药品监督管理局医疗器械标准管理中心 {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-biao-zhun-guan-li-zhong-xin} +### 公众留言 {#zhong-guo-ren-min-yin-hang-gong-zhong-liu-yan} -### 通用 {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-biao-zhun-guan-li-zhong-xin-tong-yong} +<Route namespace="gov" data={{"path":"/caac/cjwt/:category?","categories":["government"],"example":"/gov/caac/cjwt","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caac.gov.cn/HDJL/"],"target":"/caac/cjwt"},"name":"公众留言","maintainers":["nczitzk"],"url":"caac.gov.cn/HDJL/","description":"| 机票 | 托运 | 无人机 | 体检 | 行政审批 | 投诉 |\n | ---- | ---- | ------ | ---- | -------- | ---- |","location":"caac/cjwt.ts"}} /> -<Route author="nczitzk" example="/gov/nifdc/bshff/ylqxbzhgl/qxggtzh" path="/gov/nifdc/:path?" paramsDesc={['路径,默认为公告通告']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `https://www.nifdc.gov.cn/nifdc/` 与 `/index.html` 之间的字段,下面是一个例子。 +| 机票 | 托运 | 无人机 | 体检 | 行政审批 | 投诉 | +| ---- | ---- | ------ | ---- | -------- | ---- | - 若订阅 [公告通告](https://www.nifdc.org.cn/nifdc/bshff/ylqxbzhgl/qxggtzh/index.html) 则将对应页面 URL `https://www.nifdc.org.cn/nifdc/bshff/ylqxbzhgl/qxggtzh/index.html` 中 `https://www.nifdc.org.cn/nifdc/` 和 `/index.html` 之间的字段 `bshff/ylqxbzhgl/qxggtzh` 作为路径填入。此时路由为 [`/gov/nifdc/bshff/ylqxbzhgl/qxggtzh`](https://rsshub.app/gov/nifdc/bshff/ylqxbzhgl/qxggtzh) - ::: -</Route> +### 国家林草科技大讲堂 {#zhong-guo-ren-min-yin-hang-guo-jia-lin-cao-ke-ji-da-jiang-tang} -## 国家药品监督管理局医疗器械技术审评中心 {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-ji-shu-shen-ping-zhong-xin} +<Route namespace="gov" data={{"path":"/forestry/gjlckjdjt/:category?","categories":["government"],"example":"/gov/forestry/gjlckjdjt","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"国家林草科技大讲堂","maintainers":["nczitzk"],"description":"| 分类 | id |\n | -------- | ---- |\n | 经济林 | jjl |\n | 林木良种 | lmlz |\n | 林下经济 | lxjj |\n | 生态修复 | stxf |\n | 用材林 | ycl |\n | 其他 | qt |","location":"forestry/gjlckjdjt.ts"}} /> -### 通用 {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-ji-shu-shen-ping-zhong-xin-tong-yong} +| 分类 | id | +| -------- | ---- | +| 经济林 | jjl | +| 林木良种 | lmlz | +| 林下经济 | lxjj | +| 生态修复 | stxf | +| 用材林 | ycl | +| 其他 | qt | -<Route author="run-ze" example="/cmde/xwdt/zxyw" path="/cmde/:cate*" paramsDesc={['路径,默认为最新要闻']} radar="1" puppeteer="1"> - :::tip - 路径处填写对应页面 URL 中 `https://www.cmde.org.cn/` 与 `/index.html` 之间的字段,下面是一个例子。 +### 国务院政策文件库 {#zhong-guo-ren-min-yin-hang-guo-wu-yuan-zheng-ce-wen-jian-ku} - 若订阅 [最新要闻](https://www.cmde.org.cn/xwdt/zxyw/index.html) 则将对应页面 URL `https://www.cmde.org.cn/xwdt/zxyw/index.html` 中 `https://www.cmde.org.cn/` 和 `/index.html` 之间的字段 `xwdt/zxyw` 作为路径填入。此时路由为 [`/cmde/xwdt/zxyw`](https://rsshub.app//cmde/xwdt/zxyw) - ::: -</Route> +<Route namespace="gov" data={{"path":"/zhengce/zhengceku/:department","categories":["government"],"example":"/gov/zhengce/zhengceku/bmwj","parameters":{"department":"库名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"国务院政策文件库","maintainers":["zxx-457"],"location":"zhengce/zhengceku.ts"}} /> -## 国家药品审评网站 {#guo-jia-yao-pin-shen-ping-wang-zhan} +### 惠州市人民政府 {#zhong-guo-ren-min-yin-hang-hui-zhou-shi-ren-min-zheng-fu} -### 首页 {#guo-jia-yao-pin-shen-ping-wang-zhan-shou-ye} +<Route namespace="gov" data={{"path":"/huizhou/zwgk/:category?","categories":["government"],"example":"/gov/huizhou/zwgk/jgdt","parameters":{"category":"资讯类别,可以从网址中得到,默认为政务要闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"惠州市人民政府","maintainers":["Fatpandac"],"description":"#### 政务公开 {#guang-dong-sheng-ren-min-zheng-fu-hui-zhou-shi-ren-min-zheng-fu-zheng-wu-gong-kai}","location":"huizhou/zwgk/index.ts"}} /> -<Route author="Fatpandac" example="/cde/news/gzdt" path="/cde/:channel/:category" paramsDesc={['频道', '类别']} notOperational="1"> - - 频道 +#### 政务公开 {#zhong-guo-ren-min-yin-hang-hui-zhou-shi-ren-min-zheng-fu-zheng-wu-gong-kai} - | 新闻中心 | 政策法规 | - | :------: | :------: | - | news | policy | +### 获取国家医师资格考试通知 {#zhong-guo-ren-min-yin-hang-huo-qu-guo-jia-yi-shi-zi-ge-kao-shi-tong-zhi} - - 类别 +<Route namespace="gov" data={{"path":"/jinan/healthcommission/medical_exam_notice","categories":["government"],"example":"/gov/jinan/healthcommission/medical_exam_notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jnmhc.jinan.gov.cn/*"]},"name":"获取国家医师资格考试通知","maintainers":["tzjyxb"],"url":"jnmhc.jinan.gov.cn/*","location":"jinan/healthcommission/medical-exam-notice.ts"}} /> - | 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 | - | :------: | :------: | :------: | :------: | :------: | - | | zwxw | ywdd | tpxw | gzdt | +### 价格监测中心 {#zhong-guo-ren-min-yin-hang-jia-ge-jian-ce-zhong-xin} - | 政策法规 | 法律法规 | 中心规章 | - | :------: | :------: | :------: | - | | flfg | zxgz | -</Route> +<Route namespace="gov" data={{"path":"/jgjcndrc/:id?","categories":["government"],"example":"/gov/jgjcndrc","parameters":{"id":"栏目 id,见下表,默认为 692,即通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"价格监测中心","maintainers":["nczitzk"],"description":"| 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 |\n | -------- | ------------ | ------------ | -------- | -------- | -------- |\n | 692 | 693 | 694 | 695 | 696 | 697 |\n\n | 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 |\n | -------- | ------------ | ---------------- | -------- | -------- |\n | 698 | 699 | 700 | 701 | 753 |\n\n #### 监测信息\n\n | 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 |\n | -------------------------- | ------------------ | ------------------------ | ------------------------- |\n | 749 | 703 | 704 | 705 |\n\n | 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 |\n | -------------------- | ---------------- | -------------- | -------------------- |\n | 821 | 706 | 707 | 708 |","location":"jgjcndrc/index.ts"}} /> -### 信息公开 {#guo-jia-yao-pin-shen-ping-wang-zhan-xin-xi-gong-kai} +| 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 | +| -------- | ------------ | ------------ | -------- | -------- | -------- | +| 692 | 693 | 694 | 695 | 696 | 697 | -<Route author="TonyRL" example="/cde/xxgk/priorityApproval" path="/cde/xxgk/:category" paramsDesc={['类别,见下表']} radar="1" notOperational="1"> - | 优先审评公示 | 突破性治疗公示 | 临床试验默示许可 | - | :--------------: | :--------------: | :--------------: | - | priorityApproval | breakthroughCure | cliniCal | -</Route> +| 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 | +| -------- | ------------ | ---------------- | -------- | -------- | +| 698 | 699 | 700 | 701 | 753 | -### 指导原则专栏 {#guo-jia-yao-pin-shen-ping-wang-zhan-zhi-dao-yuan-ze-zhuan-lan} +#### 监测信息 {#zhong-guo-ren-min-yin-hang-jia-ge-jian-ce-zhong-xin-jian-ce-xin-xi} -<Route author="TonyRL" example="/cde/zdyz/domesticGuide" path="/cde/zdyz/:category" paramsDesc={['类别,见下表']} radar="1" notOperational="1"> - | 发布通告 | 征求意见 | - | :-----------: | :---------: | - | domesticGuide | opinionList | -</Route> +| 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 | +| -------------------------- | ------------------ | ------------------------ | ------------------------- | +| 749 | 703 | 704 | 705 | + +| 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 | +| -------------------- | ---------------- | -------------- | -------------------- | +| 821 | 706 | 707 | 708 | + +### 今日绵竹 {#zhong-guo-ren-min-yin-hang-jin-ri-mian-zhu} + +<Route namespace="gov" data={{"path":"/sichuan/deyang/mztoday/:infoType?","categories":["government"],"example":"/gov/sichuan/deyang/mztoday/zx","parameters":{"infoType":"信息栏目名称。默认最新(zx)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mztoday.gov.cn/*"],"target":"/sichuan/deyang/mztoday"},"name":"今日绵竹","maintainers":["zytomorrow"],"url":"www.mztoday.gov.cn/*","description":"| 最新 | 推荐 | 时政 | 教育 | 民生 | 文旅 | 经济 | 文明创建 | 部门 | 镇(街道) | 健康绵竹 | 南轩讲堂 | 视频 | 文明实践 | 领航中国 | 绵竹年画 | 绵竹历史 | 绵竹旅游 | 外媒看绵竹 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- |\n | zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz |","location":"sichuan/deyang/mztoday.ts"}} /> + +| 最新 | 推荐 | 时政 | 教育 | 民生 | 文旅 | 经济 | 文明创建 | 部门 | 镇(街道) | 健康绵竹 | 南轩讲堂 | 视频 | 文明实践 | 领航中国 | 绵竹年画 | 绵竹历史 | 绵竹旅游 | 外媒看绵竹 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- | +| zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz | + +### 立法意见征集 {#zhong-guo-ren-min-yin-hang-li-fa-yi-jian-zheng-ji} + +<Route namespace="gov" data={{"path":"/moj/lfyjzj","categories":["government"],"example":"/gov/moj/lfyjzj","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.moj.gov.cn/lfyjzj/lflfyjzj/*","www.moj.gov.cn/pub/sfbgw/lfyjzj/lflfyjzj/*"]},"name":"立法意见征集","maintainers":["la3rence"],"url":"www.moj.gov.cn/lfyjzj/lflfyjzj/*","location":"moj/lfyjzj.ts"}} /> + +### 留言咨询 {#zhong-guo-ren-min-yin-hang-liu-yan-zi-xun} + +<Route namespace="gov" data={{"path":"/samr/xgzlyhd/:category?/:department?","categories":["government"],"example":"/gov/samr/xgzlyhd","parameters":{"category":"留言类型,见下表,默认为全部","department":"回复部门,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xgzlyhd.samr.gov.cn/gjjly/index"]},"name":"留言咨询","maintainers":["nczitzk"],"url":"xgzlyhd.samr.gov.cn/gjjly/index","description":"#### 留言类型\n\n | 类型 | 类型 id |\n | ------------------------------------------ | -------------------------------- |\n | 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf |\n | 规划统计 | b807cf9cdf434635ae908d48757e0f39 |\n | 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 |\n | 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 |\n | 走私贩私 | 84c728530e1e478e94fe3f0030171c53 |\n | 登记注册 | 07fff64612dc41aca871c06587abf71d |\n | 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 |\n | 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 |\n | 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 |\n | 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 |\n | 商业贿赂 | b494e6535af149c5a51fd4197993f061 |\n | 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 |\n | 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 |\n | 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa |\n | 动产抵押登记 | 3856de5835444229943b18cac7781e9f |\n | 广告监管 | d0e38171042048c2bf31b05c5e57aa68 |\n | 三包 | c4dbd85692604a428b1ea7613e67beb8 |\n | 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c |\n | 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b |\n | 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 |\n | 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa |\n | 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 |\n | 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a |\n | 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 |\n | 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c |\n | 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 |\n | 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 |\n | 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d |\n | 计量器具 | 90b25e22861446d5822e07c7c1f5169a |\n | 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad |\n | 国家标准 | 299b9672e1c246e69485a5b695f42c5b |\n | 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 |\n | 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 |\n | 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb |\n | 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 |\n | 科技财务 | 47367b9704964355ba52899a4c5abbb0 |\n | 干部人事 | 6b978e3c127c489ea8e2d693b768887e |\n | 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a |\n | 党群工作 | aa71052978af4304937eb382f24f9902 |\n | 退休干部 | 44505fc58c81428eb5cef15706007b5e |\n | 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd |\n | 滥用行政权力 | 1215206156dc48029b98da825f26fcbc |\n | 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 |\n | 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 |\n | 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 |\n | 并购行为 | 90e315647acd415ca68f97fc1b42053d |\n | 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb |\n | 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 |\n | 综合执法 | cfbb1b5dade446299670ca38844b265e |\n | 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb |\n | 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 |\n | 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 |\n | 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 |\n\n #### 回复部门\n\n | 部门 | 部门 id |\n | ---------------------------- | -------------------------------- |\n | 办公厅 | 6ed539b270634667afc4d466b67a53f7 |\n | 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 |\n | 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 |\n | 登记注册局 | e4553350549f45f38da5602147cf8639 |\n | 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 |\n | 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 |\n | 综合规划司 | 958e1619159c45a7b76663a59d9052ea |\n | 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c |\n | 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 |\n | 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab |\n | 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b |\n | 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 |\n | 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 |\n | 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 |\n | 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 |\n | 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a |\n | 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 |\n | 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 |\n | 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 |\n | 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a |\n | 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 |\n | 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 |\n | 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 |\n | 认证监督管理司 | ca4987393d514debb4d1e2126f576987 |\n | 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 |\n | 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda |\n | 科技和财务司 | 117355eea94c426199e2e519fd98ce07 |\n | 人事司 | a341e8b7929e44769b9424b7cf69d32a |\n | 国际司 | f784499ef24541f5b20de4c24cfc61e7 |\n | 机关党委 | a49119c6f40045dd994f3910500cedfa |\n | 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b |","location":"samr/xgzlyhd.ts"}} /> + +#### 留言类型 {#zhong-guo-ren-min-yin-hang-liu-yan-zi-xun-liu-yan-lei-xing} + +| 类型 | 类型 id | +| ------------------------------------------ | -------------------------------- | +| 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf | +| 规划统计 | b807cf9cdf434635ae908d48757e0f39 | +| 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 | +| 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 | +| 走私贩私 | 84c728530e1e478e94fe3f0030171c53 | +| 登记注册 | 07fff64612dc41aca871c06587abf71d | +| 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 | +| 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 | +| 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 | +| 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 | +| 商业贿赂 | b494e6535af149c5a51fd4197993f061 | +| 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 | +| 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 | +| 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa | +| 动产抵押登记 | 3856de5835444229943b18cac7781e9f | +| 广告监管 | d0e38171042048c2bf31b05c5e57aa68 | +| 三包 | c4dbd85692604a428b1ea7613e67beb8 | +| 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c | +| 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b | +| 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 | +| 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa | +| 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 | +| 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a | +| 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 | +| 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c | +| 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 | +| 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 | +| 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d | +| 计量器具 | 90b25e22861446d5822e07c7c1f5169a | +| 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad | +| 国家标准 | 299b9672e1c246e69485a5b695f42c5b | +| 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 | +| 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 | +| 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb | +| 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 | +| 科技财务 | 47367b9704964355ba52899a4c5abbb0 | +| 干部人事 | 6b978e3c127c489ea8e2d693b768887e | +| 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a | +| 党群工作 | aa71052978af4304937eb382f24f9902 | +| 退休干部 | 44505fc58c81428eb5cef15706007b5e | +| 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd | +| 滥用行政权力 | 1215206156dc48029b98da825f26fcbc | +| 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 | +| 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 | +| 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 | +| 并购行为 | 90e315647acd415ca68f97fc1b42053d | +| 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb | +| 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 | +| 综合执法 | cfbb1b5dade446299670ca38844b265e | +| 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb | +| 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 | +| 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 | +| 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 | + +#### 回复部门 {#zhong-guo-ren-min-yin-hang-liu-yan-zi-xun-hui-fu-bu-men} + +| 部门 | 部门 id | +| ---------------------------- | -------------------------------- | +| 办公厅 | 6ed539b270634667afc4d466b67a53f7 | +| 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 | +| 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 | +| 登记注册局 | e4553350549f45f38da5602147cf8639 | +| 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 | +| 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 | +| 综合规划司 | 958e1619159c45a7b76663a59d9052ea | +| 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c | +| 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 | +| 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab | +| 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b | +| 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 | +| 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 | +| 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 | +| 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 | +| 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a | +| 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 | +| 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 | +| 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 | +| 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a | +| 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 | +| 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 | +| 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 | +| 认证监督管理司 | ca4987393d514debb4d1e2126f576987 | +| 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 | +| 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda | +| 科技和财务司 | 117355eea94c426199e2e519fd98ce07 | +| 人事司 | a341e8b7929e44769b9424b7cf69d32a | +| 国际司 | f784499ef24541f5b20de4c24cfc61e7 | +| 机关党委 | a49119c6f40045dd994f3910500cedfa | +| 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b | + +### 茂名市茂南区人民政府 {#zhong-guo-ren-min-yin-hang-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu} + +<Route namespace="gov" data={{"path":"/maonan/:category","categories":["government"],"example":"/gov/maonan/zwgk","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"茂名市茂南区人民政府","maintainers":["ShuiHuo"],"description":"| 政务公开 | 政务新闻 | 茂南动态 | 重大会议 | 公告公示 | 招录信息 | 政策解读 |\n | :------: | :------: | :------: | :------: | :------: | :------: | :------: |\n | zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd |","location":"maonan/maonan.ts"}} /> + +| 政务公开 | 政务新闻 | 茂南动态 | 重大会议 | 公告公示 | 招录信息 | 政策解读 | +| :------: | :------: | :------: | :------: | :------: | :------: | :------: | +| zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd | + +### 拍卖信息 / 海关法规 {#zhong-guo-ren-min-yin-hang-pai-mai-xin-xi-hai-guan-fa-gui} + +<Route namespace="gov" data={{"path":"/customs/list/:gchannel?","categories":["government"],"example":"/gov/customs/list/paimai","parameters":{"gchannel":"支持 `paimai` 及 `fagui` 2个频道,默认为 `paimai`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.customs.gov.cn/"],"target":"/customs/list"},"name":"拍卖信息 / 海关法规","maintainers":["Jeason0228","TonyRL","he1q"],"url":"www.customs.gov.cn/","description":":::warning\n 由于区域限制,建议在国内 IP 的机器上自建\n :::","location":"customs/list.ts"}} /> + +:::warning +由于区域限制,建议在国内 IP 的机器上自建 +::: -## 国家自然科学基金委员会 {#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui} +### 人力社保局 {#zhong-guo-ren-min-yin-hang-ren-li-she-bao-ju} -### 通用 {#guo-jia-zi-ran-ke-xue-ji-jin-wei-yuan-hui-tong-yong} +<Route namespace="gov" data={{"path":"/chongqing/sydwgkzp","categories":["government"],"example":"/gov/chongqing/sydwgkzp","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rlsbj.cq.gov.cn/"]},"name":"人力社保局","maintainers":["MajexH"],"url":"rlsbj.cq.gov.cn/","description":"#### 人事考试通知 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-ren-shi-kao-shi-tong-zhi}\n\n\n#### 事业单位公开招聘 {#chong-qing-shi-ren-min-zheng-fu-ren-li-she-bao-ju-shi-ye-dan-wei-gong-kai-zhao-pin}","location":"chongqing/sydwgkzp.ts"}} /> -<Route author="Derekmini nczitzk" example="/gov/nsfc" path="/gov/nsfc/path+" paramsDesc={['路径,默认为基金要闻']} radar="1" anticrawler="1"> - :::tip - 若订阅 [基金要闻 - 通知公告](https://www.nsfc.gov.cn/publish/portal0/tab442),网址为 `https://www.nsfc.gov.cn/publish/portal0/tab442`。截取 `https://www.nsfc.gov.cn` 到末尾的部分 `/publish/portal0/tab442` 作为参数,此时路由为 [`/gov/nsfc/publish/portal0/tab442`](https://rsshub.app/gov/nsfc/publish/portal0/tab442)。 +#### 人事考试通知 {#zhong-guo-ren-min-yin-hang-ren-li-she-bao-ju-ren-shi-kao-shi-tong-zhi} - 当然,也可以填入路径在下表中对应的快捷方式。其中 [基金要闻 - 通知公告](https://www.nsfc.gov.cn/publish/portal0/tab442) 的快捷方式为 `tzgg`,此时路由为 [`/gov/nsfc/tzgg`](https://rsshub.app/gov/nsfc/tzgg)。 +#### 事业单位公开招聘 {#zhong-guo-ren-min-yin-hang-ren-li-she-bao-ju-shi-ye-dan-wei-gong-kai-zhao-pin} - 若订阅 [管理科学部 - 通知公告](https://www.nsfc.gov.cn/publish/portal0/tab1212),网址为 `https://www.nsfc.gov.cn/publish/portal0/tab1212`。截取 `https://www.nsfc.gov.cn` 到末尾的部分 `/publish/portal0/tab1212` 作为参数,此时路由为 [`/gov/nsfc/publish/portal0/tab1212`](https://rsshub.app/gov/nsfc/publish/portal0/tab1212)。 +### 上海市职业能力考试院 考试项目 {#zhong-guo-ren-min-yin-hang-shang-hai-shi-zhi-ye-neng-li-kao-shi-yuan-kao-shi-xiang-mu} - 同理,也可以填入路径在下表中对应的快捷方式。其中 [管理科学部 - 通知公告](https://www.nsfc.gov.cn/publish/portal0/tab1212) 的快捷方式为 `glkxb-tzgg`,此时路由为 [`/gov/nsfc/glkxb-tzgg`](https://rsshub.app/gov/nsfc/glkxb-tzgg)。 - ::: +<Route namespace="gov" data={{"path":"/shanghai/rsj/ksxm","categories":["government"],"example":"/gov/shanghai/rsj/ksxm","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rsj.sh.gov.cn/"]},"name":"上海市职业能力考试院 考试项目","maintainers":["Fatpandac"],"url":"rsj.sh.gov.cn/","location":"shanghai/rsj/ksxm.ts"}} /> - 基金要闻 +### 上海市文旅局审批公告 {#zhong-guo-ren-min-yin-hang-shang-hai-shi-wen-lv-ju-shen-pi-gong-gao} - | 基金要闻 | 通知公告 | 部门动态 | 科普快讯 | 资助成果 | - | -------- | -------- | -------- | -------- | -------- | - | jjyw | tzgg | bmdt | kpkx | zzcg | +<Route namespace="gov" data={{"path":"/shanghai/wgj/:page?","categories":["government"],"example":"/gov/shanghai/wgj","parameters":{"page":"页数,默认第 1 页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wsbs.wgj.sh.gov.cn/"],"target":"/shanghai/wgj"},"name":"上海市文旅局审批公告","maintainers":["gideonsenku"],"url":"wsbs.wgj.sh.gov.cn/","location":"shanghai/wgj/wgj.ts"}} /> - 政策法规 +### 上海卫健委 疫情通报 {#zhong-guo-ren-min-yin-hang-shang-hai-wei-jian-wei-yi-qing-tong-bao} - | 国家自然科学基金条例 | 国家自然科学基金发展规划 | 国家自然科学基金规章制度 | 国家科学技术相关法律法规 | - | -------------------- | ------------------------ | ------------------------ | ------------------------ | - | zcfg-jjtl | zcfg-fzgh | zcfg-gzzd | zcfg-flfg | +<Route namespace="gov" data={{"path":"/shanghai/wsjkw/yqtb","categories":["government"],"example":"/gov/shanghai/wsjkw/yqtb","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wsjkw.sh.gov.cn/"]},"name":"上海卫健委 疫情通报","maintainers":["zcf0508"],"url":"wsjkw.sh.gov.cn/","location":"shanghai/wsjkw/yqtb/index.ts"}} /> - 管理科学部 +### 申请事项进度 {#zhong-guo-ren-min-yin-hang-shen-qing-shi-xiang-jin-du} - | 工作动态 | 通知公告 | 资助成果 | - | ---------- | ---------- | ---------- | - | glkxb-gzdt | glkxb-tzgg | glkxb-zzcg | +<Route namespace="gov" data={{"path":"/csrc/auditstatus/:apply_id","categories":["government"],"example":"/gov/csrc/auditstatus/9ce91cf2d750ee62de27fbbcb05fa483","parameters":{"apply_id":"事项类别id,`https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"申请事项进度","maintainers":["hillerliao"],"location":"csrc/auditstatus.ts"}} /> - 国际合作局 +### 深圳市考试院 {#zhong-guo-ren-min-yin-hang-shen-zhen-shi-kao-shi-yuan} - | 项目指南 | 初审结果 | 批准通知 | 进程简表 | 信息公开 | - | ---------- | ---------- | ---------- | ---------- | ---------- | - | gjhzj-xmzn | gjhzj-csjg | gjhzj-pztz | gjhzj-jcjb | gjhzj-xxgk | -</Route> +<Route namespace="gov" data={{"path":"/shenzhen/hrss/szksy/:caty/:page?","categories":["government"],"example":"/gov/shenzhen/hrss/szksy/bmxx/2","parameters":{"caty":"信息类别","page":"页码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xxgk.sz.gov.cn/cn/xxgk/zfxxgj/:caty"]},"name":"深圳市考试院","maintainers":["zlasd"],"url":"hrss.sz.gov.cn/*","description":"| 通知公告 | 报名信息 | 成绩信息 | 合格标准 | 合格人员公示 | 证书发放信息 |\n | :------: | :------: | :------: | :------: | :----------: | :----------: |\n | tzgg | bmxx | cjxx | hgbz | hgrygs | zsff |","location":"shenzhen/hrss/szksy/index.ts"}} /> -## 国务院国有资产监督管理委员会 {#guo-wu-yuan-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui} +| 通知公告 | 报名信息 | 成绩信息 | 合格标准 | 合格人员公示 | 证书发放信息 | +| :------: | :------: | :------: | :------: | :----------: | :----------: | +| tzgg | bmxx | cjxx | hgbz | hgrygs | zsff | -### 通用 {#guo-wu-yuan-guo-you-zi-chan-jian-du-guan-li-wei-yuan-hui-tong-yong} +### 深圳市人民政府 {#zhong-guo-ren-min-yin-hang-shen-zhen-shi-ren-min-zheng-fu} -<Route author="TonyRL" example="/gov/sasac/n2588030/n16436141" path="/gov/sasac/:path+" paramsDesc={['路径,可在 URL 找到']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `http://www.sasac.gov.cn/` 与 `/index.html` 之间的字段,下面是一个例子。 +<Route namespace="gov" data={{"path":"/shenzhen/xxgk/zfxxgj/:caty","categories":["government"],"example":"/gov/shenzhen/xxgk/zfxxgj/tzgg","parameters":{"caty":"信息类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"深圳市人民政府","maintainers":["laoxua"],"description":"| 通知公告 | 政府采购 | 资金信息 | 重大项目 |\n | :------: | :------: | :------: | :------: |\n | tzgg | zfcg | zjxx | zdxm |","location":"shenzhen/xxgk/zfxxgj.ts"}} /> - 若订阅 [其他](http://www.sasac.gov.cn/n2588030/n16436141/index.html) 则将对应页面 URL `http://www.sasac.gov.cn/n2588030/n16436141/index.html` 中 `http://www.sasac.gov.cn/` 和 `/index.html` 之间的字段 `n2588030/n16436141` 作为路径填入。此时路由为 [`/gov/sasac/n2588030/n16436141`](https://rsshub.app/gov/nmpa/n2588030/n16436141) - ::: -</Route> +| 通知公告 | 政府采购 | 资金信息 | 重大项目 | +| :------: | :------: | :------: | :------: | +| tzgg | zfcg | zjxx | zdxm | -## 哈尔滨市科技局 {#ha-er-bin-shi-ke-ji-ju} +### 深圳市住房和建设局 {#zhong-guo-ren-min-yin-hang-shen-zhen-shi-zhu-fang-he-jian-she-ju} -### 政务公开 {#ha-er-bin-shi-ke-ji-ju-zheng-wu-gong-kai} +<Route namespace="gov" data={{"path":"/shenzhen/zjj/xxgk/:caty","categories":["government"],"example":"/gov/shenzhen/zjj/xxgk/tzgg","parameters":{"caty":"信息类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zjj.sz.gov.cn/xxgk/:caty"]},"name":"深圳市住房和建设局","maintainers":["lonn"],"description":"| 通知公告 |\n | :------: |\n | tzgg |","location":"shenzhen/zjj/index.ts"}} /> -<Route author="XYenon" example="/gov/harbin/kjj" path="/gov/harbin/kjj" notOperational="1" /> +| 通知公告 | +| :------: | +| tzgg | -## 河北省人民政府 {#he-bei-sheng-ren-min-zheng-fu} +### 深圳市委组织部 {#zhong-guo-ren-min-yin-hang-shen-zhen-shi-wei-zu-zhi-bu} -### 财政厅 {#he-bei-sheng-ren-min-zheng-fu-cai-zheng-ting} +<Route namespace="gov" data={{"path":"/shenzhen/zzb/:caty/:page?","categories":["government"],"example":"/gov/shenzhen/zzb/tzgg","parameters":{"caty":"信息类别","page":"页码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zzb.sz.gov.cn/*"]},"name":"深圳市委组织部","maintainers":["zlasd"],"url":"zzb.sz.gov.cn/*","description":"| 通知公告 | 任前公示 | 政策法规 | 工作动态 | 部门预算决算公开 | 业务表格下载 |\n | :------: | :------: | :------: | :------: | :--------------: | :----------: |\n | tzgg | rqgs | zcfg | gzdt | xcbd | bgxz |","location":"shenzhen/zzb/index.ts"}} /> -<Route author="nczitzk" example="/gov/hebei/czt/xwdt" path="/gov/hebei/czt/xwdt/:category?" paramsDesc={['分类,见下表,默认为财政动态']} notOperational="1"> - | 财政动态 | 综合新闻 | 通知公告 | - | -------- | -------- | -------- | - | gzdt | zhxw | tzgg | -</Route> +| 通知公告 | 任前公示 | 政策法规 | 工作动态 | 部门预算决算公开 | 业务表格下载 | +| :------: | :------: | :------: | :------: | :--------------: | :----------: | +| tzgg | rqgs | zcfg | gzdt | xcbd | bgxz | -### 退役军人事务厅 {#he-bei-sheng-ren-min-zheng-fu-tui-yi-jun-ren-shi-wu-ting} +### 省科学技术厅 {#zhong-guo-ren-min-yin-hang-sheng-ke-xue-ji-shu-ting} -<Route author="SunShinenny" example="/gov/veterans/hebei/sxxx" path="/gov/veterans/hebei/:type" paramsDesc={['分类名']}> - | 省内信息 | 厅内信息 | 市县信息 | - | :------: | :------: | :------: | - | ywgz | tnxx | sxxx | -</Route> +<Route namespace="gov" data={{"path":"/shaanxi/kjt/:id?","categories":["government"],"example":"/gov/shaanxi/kjt","parameters":{"id":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"省科学技术厅","maintainers":["nczitzk"],"description":"| 科技头条 | 工作动态 | 基层科技 | 科技博览 | 媒体聚焦 | 通知公告 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 1061 | 24 | 27 | 25 | 28 | 221 |","location":"shaanxi/kjt.ts"}} /> -### 软件行业协会 - 新闻中心 {#he-bei-sheng-ren-min-zheng-fu-ruan-jian-hang-ye-xie-hui-xin-wen-zhong-xin} +| 科技头条 | 工作动态 | 基层科技 | 科技博览 | 媒体聚焦 | 通知公告 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 1061 | 24 | 27 | 25 | 28 | 221 | -<Route author="tudou027" example="/gov/hubei/hbsia/zxzx" path="/gov/hubei/hbsia/:caty" paramsDesc={['类别']} notOperational="1"> - | 具体栏目 | 参数 | - | :------: | :--: | - | 最新资讯 | zxzx | - | 活动通知 | hdtz | - | 活动报道 | hdbd | - | 公示公告 | gsgg | -</Route> +### 事故及灾害查处 {#zhong-guo-ren-min-yin-hang-shi-gu-ji-zai-hai-cha-chu} -## 湖南省人民政府 {#hu-nan-sheng-ren-min-zheng-fu} +<Route namespace="gov" data={{"path":"/mem/gk/sgcc/:category?","categories":["government"],"example":"/gov/mem/gk/sgcc/tbzdsgdcbg","parameters":{"category":"分类,见下表,默认为挂牌督办"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mem.gov.cn/gk/sgcc/:category"],"target":"/mem/gk/sgcc/:category"},"name":"事故及灾害查处","maintainers":["nczitzk"],"description":"| 挂牌督办 | 调查报告 |\n | -------- | ---------- |\n | sggpdbqk | tbzdsgdcbg |","location":"mem/sgcc.ts"}} /> -### 长沙市人民政府 {#hu-nan-sheng-ren-min-zheng-fu-chang-sha-shi-ren-min-zheng-fu} +| 挂牌督办 | 调查报告 | +| -------- | ---------- | +| sggpdbqk | tbzdsgdcbg | -#### 市长信箱 {#hu-nan-sheng-ren-min-zheng-fu-chang-sha-shi-ren-min-zheng-fu-shi-zhang-xin-xiang} +### 司局通知 {#zhong-guo-ren-min-yin-hang-si-ju-tong-zhi} -<Route author="shansing" example="/gov/hunan/changsha/major-email" path="/gov/hunan/changsha/major-email" notOperational="1" /> +<Route namespace="gov" data={{"path":"/moe/s78/:column","categories":["government"],"example":"/gov/moe/s78/A13","parameters":{"column":"司局 ID,可在 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["moe.gov.cn/s78/:column/tongzhi","moe.gov.cn/s78/:column"]},"name":"司局通知","maintainers":["TonyRL"],"location":"moe/s78.ts"}} /> -可能仅限中国大陆服务器访问,以实际情况为准。 +### 太原市人力资源和社会保障局政府公开信息 {#zhong-guo-ren-min-yin-hang-tai-yuan-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju-zheng-fu-gong-kai-xin-xi} -## 湖南省政府采购网 {#hu-nan-sheng-zheng-fu-cai-gou-wang} +<Route namespace="gov" data={{"path":"/taiyuan/rsj/:caty/:page?","categories":["government"],"example":"/gov/taiyuan/rsj/gggs","parameters":{"caty":"信息类别","page":"页码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rsj.taiyuan.gov.cn/*"]},"name":"太原市人力资源和社会保障局政府公开信息","maintainers":["2PoL"],"url":"rsj.taiyuan.gov.cn/*","description":"| 工作动态 | 太原新闻 | 通知公告 | 县区动态 | 国内动态 | 图片新闻 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | gzdt | tyxw | gggs | xqdt | gndt | tpxw |","location":"taiyuan/rsj.ts"}} /> -### 公告 {#hu-nan-sheng-zheng-fu-cai-gou-wang-gong-gao} +| 工作动态 | 太原新闻 | 通知公告 | 县区动态 | 国内动态 | 图片新闻 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| gzdt | tyxw | gggs | xqdt | gndt | tpxw | -<Route author="Jeason0228" example="/gov/hunan/notice/all" path="/gov/hunan/notice/:type" paramsDesc={['all=全部,cg=采购公告,zb=中标公告,fb=废标公告,ht=合同公告,gz=更正公告,zz=终止公告,qt=其他公告']} /> +### 通用 {#zhong-guo-ren-min-yin-hang-tong-yong} -## 济南市卫生健康委员会 {#ji-nan-shi-wei-sheng-jian-kang-wei-yuan-hui} +<Route namespace="gov" data={{"path":"/beijing/bjedu/gh/:urlPath?","categories":["government"],"example":"/gov/beijing/bjedu/gh","parameters":{"urlPath":"路径,默认为 `zxtzgg`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gh.bjedu.gov.cn/ghsite/:urlPath/index.html","gh.bjedu.gov.cn/ghsite/:urlPath"],"target":"/beijing/bjedu/gh/:urlPath"},"name":"通用","maintainers":["TonyRL"],"description":":::tip\n 路径处填写对应页面 URL 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段。下面是一个例子。\n\n 若订阅 [通知公告](https://gh.bjedu.cn/ghsite/zxtzgg/index.html) 则将对应页面 URL `https://gh.bjedu.cn/ghsite/zxtzgg/index.html` 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段 `zxtzgg` 作为路径填入。此时路由为 [`/gov/beijing/bjedu/gh/zxtzgg`](https://rsshub.app/gov/beijing/bjedu/gh/zxtzgg)\n :::","location":"beijing/bjedu/gh.ts"}} /> -### 获取国家医师资格考试通知 {#ji-nan-shi-wei-sheng-jian-kang-wei-yuan-hui-huo-qu-guo-jia-yi-shi-zi-ge-kao-shi-tong-zhi} +:::tip +路径处填写对应页面 URL 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段。下面是一个例子。 -<Route author="tzjyxb" example="/gov/jinan/healthcommission/medical_exam_notice" path="/gov/jinan/healthcommission/medical_exam_notice" radar="1" /> +若订阅 [通知公告](https://gh.bjedu.cn/ghsite/zxtzgg/index.html) 则将对应页面 URL `https://gh.bjedu.cn/ghsite/zxtzgg/index.html` 中 `https://gh.bjedu.cn/ghsite/` 和 `/index.html` 之间的字段 `zxtzgg` 作为路径填入。此时路由为 [`/gov/beijing/bjedu/gh/zxtzgg`](https://rsshub.app/gov/beijing/bjedu/gh/zxtzgg) +::: -## 江苏省人民政府 {#jiang-su-sheng-ren-min-zheng-fu} +### 通知公告 {#zhong-guo-ren-min-yin-hang-tong-zhi-gong-gao} -### 动态 {#jiang-su-sheng-ren-min-zheng-fu-dong-tai} +<Route namespace="gov" data={{"path":"/beijing/jw/tzgg","categories":["government"],"example":"/gov/beijing/jw/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jw.beijing.gov.cn/tzgg"]},"name":"通知公告","maintainers":["nczitzk"],"url":"jw.beijing.gov.cn/tzgg","location":"beijing/jw/tzgg.ts"}} /> -<Route author="ocleo1" example="/gov/province/jiangsu/important-news" path="/gov/province/jiangsu/:category" paramsDesc={['分类名']}> - | 省政府常务会议 | 要闻关注 | 部门资讯 | 市县动态 | 政策解读 | - | :---------------: | :------------: | :--------: | :---------: | :-------------------: | - | executive-meeting | important-news | department | city-county | policy-interpretation | +### 通用 {#zhong-guo-ren-min-yin-hang-tong-yong} - | 政府信息公开年度报告 | 政府信息公开制度 | 省政府及办公厅文件 | 规范性文件 | - | :------------------: | :-------------------: | :----------------: | :----------------: | - | annual-report | information-publicity | documentation | normative-document | +<Route namespace="gov" data={{"path":"/npc/:caty","categories":["government"],"example":"/gov/npc/c183","parameters":{"caty":"分类名,支持形如 `http://www.npc.gov.cn/npc/c2/*/` 的网站,传入 npc 之后的参数"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["npc.gov.cn/npc/c2/:caty"]},"name":"通用","maintainers":["233yeee"],"description":"| 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 |\n | ---- | ---- | ---- | ---- | -------- | -------- |\n | c183 | c184 | c185 | c189 | c12435 | c10134 |","location":"npc/index.ts"}} /> - | 立法意见征集 | 意见征集 | - | :----------------------------: | :----------------: | - | legislative-opinion-collection | opinion-collection | -</Route> +| 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 | +| ---- | ---- | ---- | ---- | -------- | -------- | +| c183 | c184 | c185 | c189 | c12435 | c10134 | -### 省教育考试院 - 新闻中心 {#jiang-su-sheng-ren-min-zheng-fu-sheng-jiao-yu-kao-shi-yuan-xin-wen-zhong-xin} +### 通知 {#zhong-guo-ren-min-yin-hang-tong-zhi} -<Route author="schen1024" example="/jseea/news/zkyw" path="/gov/jiangsu/eea/:type?" paramsDesc={['分类,默认为 `zkyw`,具体参数见下表']} radar="1"> - | 招考要闻 | 教育动态 | 招考信息 | 政策文件 | 院校动态 | - | :------: | :------: | :------: | :------: | :------: | - | zkyw | jydt | zkxx | zcwj | yxdt | -</Route> +<Route namespace="gov" data={{"path":"/zhejiang/gwy/:category?/:column?","categories":["government"],"example":"/gov/zhejiang/gwy/1","parameters":{"category":"分类,见下表,默认为全部","column":"地市专栏,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zjks.gov.cn/zjgwy/website/init.htm","zjks.gov.cn/zjgwy/website/queryDetail.htm","zjks.gov.cn/zjgwy/website/queryMore.htm"],"target":"/zhejiang/gwy"},"name":"通知","maintainers":["nczitzk"],"url":"zjks.gov.cn/zjgwy/website/init.htm","description":"| 分类 | id |\n | ------------ | -- |\n | 重要通知 | 1 |\n | 招考公告 | 2 |\n | 招考政策 | 3 |\n | 面试体检考察 | 4 |\n | 录用公示专栏 | 5 |\n\n | 地市 | id |\n | ------------ | ----- |\n | 浙江省 | 133 |\n | 浙江省杭州市 | 13301 |\n | 浙江省宁波市 | 13302 |\n | 浙江省温州市 | 13303 |\n | 浙江省嘉兴市 | 13304 |\n | 浙江省湖州市 | 13305 |\n | 浙江省绍兴市 | 13306 |\n | 浙江省金华市 | 13307 |\n | 浙江省衢州市 | 13308 |\n | 浙江省舟山市 | 13309 |\n | 浙江省台州市 | 13310 |\n | 浙江省丽水市 | 13311 |\n | 省级单位 | 13317 |","location":"zhejiang/gwy.ts"}} /> -## 茂名市人民政府 {#mao-ming-shi-ren-min-zheng-fu} +| 分类 | id | +| ------------ | -- | +| 重要通知 | 1 | +| 招考公告 | 2 | +| 招考政策 | 3 | +| 面试体检考察 | 4 | +| 录用公示专栏 | 5 | -### 茂名市人民政府门户网站 {#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-ren-min-zheng-fu-men-hu-wang-zhan} +| 地市 | id | +| ------------ | ----- | +| 浙江省 | 133 | +| 浙江省杭州市 | 13301 | +| 浙江省宁波市 | 13302 | +| 浙江省温州市 | 13303 | +| 浙江省嘉兴市 | 13304 | +| 浙江省湖州市 | 13305 | +| 浙江省绍兴市 | 13306 | +| 浙江省金华市 | 13307 | +| 浙江省衢州市 | 13308 | +| 浙江省舟山市 | 13309 | +| 浙江省台州市 | 13310 | +| 浙江省丽水市 | 13311 | +| 省级单位 | 13317 | -<Route author="ShuiHuo" example="/gov/maoming/www/zwgk/zcjd/jd" path="/gov/maoming/:path+" paramsDesc={['路径']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中茂名有关政府网站的域名最前面的部分和域名后的字段。下面是一个例子。 +### 投诉建议 {#zhong-guo-ren-min-yin-hang-tou-su-jian-yi} - 若订阅 [茂名市人民政府门户网站 > 政务公开 > 政策解读](http://www.maoming.gov.cn/zwgk/zcjd/jd/) 则将对应页面 URL `http://www.maoming.gov.cn/zwgk/zcjd/jd/` 中 `http://www.maoming.gov.cn/` 的字段 `www` 和 `/zwgk/zcjd/jd/` 作为路径填入。此时路由为 [`/gov/maoming/www/zwgk/zcjd/jd/`](https://rsshub.app/gov/maoming/www/zwgk/zcjd/jd/) +<Route namespace="gov" data={{"path":"/safe/complaint/:site?","categories":["government"],"example":"/gov/safe/complaint/beijing","parameters":{"site":"站点,见上表,默认为 beijing"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"投诉建议","maintainers":["nczitzk"],"location":"safe/complaint.ts"}} /> - 若订阅 [茂名市农业农村局网站 > 政务区 > 政务公开 > 通知公告](http://mmny.maoming.gov.cn/zwq/zwgk/tzgg/) 则将对应页面 URL `http://mmny.maoming.gov.cn/zwq/zwgk/tzgg/` 中 `http://mmny.maoming.gov.cn/` 的字段 `mmny` 和 `/zwq/zwgk/tzgg/` 作为路径填入。此时路由为 [`/gov/maoming/mmny/zwq/zwgk/tzgg/`](https://rsshub.app/gov/maoming/mmny/zwq/zwgk/tzgg/) - ::: -</Route> +### 文件发布 {#zhong-guo-ren-min-yin-hang-wen-jian-fa-bu} -### 茂名市茂南区人民政府 {#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-mao-nan-qu-ren-min-zheng-fu} +<Route namespace="gov" data={{"path":"/miit/wjfb/:ministry","categories":["government"],"example":"/gov/miit/wjfb/ghs","parameters":{"ministry":"部门缩写,可以在对应 URL 中获取"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["miit.gov.cn/jgsj/:ministry/wjfb/index.html"]},"name":"文件发布","maintainers":["Fatpandac"],"location":"miit/wjfb.ts"}} /> -<Route author="ShuiHuo" example="/gov/maonan/zwgk" path="/gov/maonan/:category" paramsDesc={['分类名']} notOperational="1"> - | 政务公开 | 政务新闻 | 茂南动态 | 重大会议 | 公告公示 | 招录信息 | 政策解读 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | - | zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd | -</Route> +### 文件公示 {#zhong-guo-ren-min-yin-hang-wen-jian-gong-shi} -### 茂名市电白区人民政府 {#mao-ming-shi-ren-min-zheng-fu-mao-ming-shi-dian-bai-qu-ren-min-zheng-fu} +<Route namespace="gov" data={{"path":"/miit/wjgs","categories":["government"],"example":"/gov/miit/wjgs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文件公示","maintainers":["Yoge-Code"],"location":"miit/wjgs.ts"}} /> -<Route author="ShuiHuo" example="/gov/dianbai/www/zwgk/zcjd" path="/gov/dianbai/:path+" paramsDesc={['路径,只填写 `www` 默认为 政务公开 > 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 +### 武汉要闻 {#zhong-guo-ren-min-yin-hang-wu-han-yao-wen} - 若订阅 [政务公开 > 政策解读](http://www.dianbai.gov.cn/zwgk/zcjd/) 则将对应页面 URL `http://www.dianbai.gov.cn/zwgk/zcjd/` 中 `http://www.dianbai.gov.cn/` 的字段`www` 和 `zwgk/zcjd/` 作为路径填入。此时路由为 [`/gov/dianbai/www/zwgk/zcjd/`](https://rsshub.app/gov/dianbai/www/zwgk/zcjd/) - ::: -</Route> +<Route namespace="gov" data={{"path":"/wuhan/sy/whyw","categories":["government"],"example":"/gov/wuhan/sy/whyw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wuhan.gov.cn/sy/whyw/","wuhan.gov.cn/whyw","wuhan.gov.cn/"]},"name":"武汉要闻","maintainers":["nczitzk"],"url":"wuhan.gov.cn/sy/whyw/","location":"wuhan/whyw.ts"}} /> -### 信宜市人民政府 {#mao-ming-shi-ren-min-zheng-fu-xin-yi-shi-ren-min-zheng-fu} +### 新闻 {#zhong-guo-ren-min-yin-hang-xin-wen} -<Route author="ShuiHuo" example="/gov/xinyi/www/zwgk/zcjd" path="/gov/xinyi/:path+" paramsDesc={['路径,只填写 `www` 默认为 政务公开 > 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 +<Route namespace="gov" data={{"path":"/moe/:type","categories":["government"],"example":"/gov/moe/policy_anal","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["Crawler995"],"description":"| 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 |\n | :----------: | :----------: | :------: | :-----------------: | :--------------: |\n | policy_anal | newest_file | notice | edu_ministry_news | edu_focus_news |","location":"moe/moe.ts"}} /> - 若订阅 [政务公开 > 政策解读](http://www.xinyi.gov.cn/zwgk/zcjd/) 则将对应页面 URL `http://www.xinyi.gov.cn/zwgk/zcjd/` 中 `http://www.xinyi.gov.cn/` 的字段 `www` 和 `zwgk/zcjd/` 作为路径填入。此时路由为 [`/gov/xinyi/www/zwgk/zcjd/`](https://rsshub.app/gov/xinyi/www/zwgk/zcjd/) - ::: -</Route> +| 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 | +| :----------: | :----------: | :------: | :-----------------: | :--------------: | +| policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news | -### 高州市人民政府 {#mao-ming-shi-ren-min-zheng-fu-gao-zhou-shi-ren-min-zheng-fu} +### 信息稿件 {#zhong-guo-ren-min-yin-hang-xin-xi-gao-jian} -<Route author="ShuiHuo" example="/gov/gaozhou/www/zwgk/zcjd" path="/gov/gaozhou/:path+" paramsDesc={['路径,只填写 `www` 默认为 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 +<Route namespace="gov" data={{"path":"/zhengce/govall/:advance?","categories":["government"],"example":"/gov/zhengce/govall/orpro=555¬pro=2&search_field=title","parameters":{"advance":"高级搜索选项,将作为请求参数直接添加到url后。目前已知的选项及其意义如下。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.gov.cn/"],"target":"/zhengce/govall"},"name":"信息稿件","maintainers":["ciaranchen"],"url":"www.gov.cn/","description":"| 选项 | 意义 | 备注 |\n | :-----------------------------: | :----------------------------------------------: | :----------------------------: |\n | orpro | 包含以下任意一个关键词。 | 用空格分隔。 |\n | allpro | 包含以下全部关键词 | |\n | notpro | 不包含以下关键词 | |\n | inpro | 完整不拆分的关键词 | |\n | searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 |\n | pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 |\n | pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 |\n | colid | 栏目 | 比较复杂,不建议使用 |","location":"zhengce/govall.ts"}} /> - 若订阅 [政策解读](http://www.gaozhou.gov.cn/zcjd/) 则将对应页面 URL `http://www.gaozhou.gov.cn/zcjd/` 中 `http://www.gaozhou.gov.cn/` 的字段 `www` 和 `zcjd/` 作为路径填入。此时路由为 [`/gov/gaozhou/www/zcjd/`](https://rsshub.app/gov/gaozhou/www/zcjd/) - ::: -</Route> +| 选项 | 意义 | 备注 | +| :-----------------------------: | :----------------------------------------------: | :----------------------------: | +| orpro | 包含以下任意一个关键词。 | 用空格分隔。 | +| allpro | 包含以下全部关键词 | | +| notpro | 不包含以下关键词 | | +| inpro | 完整不拆分的关键词 | | +| searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 | +| pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 | +| pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 | +| colid | 栏目 | 比较复杂,不建议使用 | -### 化州市人民政府 {#mao-ming-shi-ren-min-zheng-fu-hua-zhou-shi-ren-min-zheng-fu} +### 徐州市人力资源和社会保障局 {#zhong-guo-ren-min-yin-hang-xu-zhou-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju} -<Route author="ShuiHuo" example="/gov/huazhou/www/zwgk/zcjd" path="/gov/huazhou/:path+" paramsDesc={['路径,只填写 `www` 默认为 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 +<Route namespace="gov" data={{"path":"/xuzhou/hrss/:category?","categories":["government"],"example":"/gov/xuzhou/hrss","parameters":{"category":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"徐州市人力资源和社会保障局","maintainers":["nczitzk"],"description":"| 通知公告 | 要闻动态 | 县区动态 | 事业招聘 | 企业招聘 | 政声传递 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | | 001001 | 001002 | 001004 | 001005 | 001006 |","location":"xuzhou/hrss.ts"}} /> - 若订阅 [政策解读](http://www.huazhou.gov.cn/syzl/zcjd/) 则将对应页面 URL `http://www.huazhou.gov.cn/syzl/zcjd/` 中 `http://www.huazhou.gov.cn/` 的字段 `www` `syzl/zcjd/` 作为路径填入。此时路由为 [`/gov/huazhou/www/syzl/zcjd/`](https://rsshub.app/gov/huazhou/www/syzl/zcjd/) - ::: -</Route> +| 通知公告 | 要闻动态 | 县区动态 | 事业招聘 | 企业招聘 | 政声传递 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| | 001001 | 001002 | 001004 | 001005 | 001006 | -### 广东茂名滨海新区政务网 {#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-bin-hai-xin-qu-zheng-wu-wang} +### 要闻动态 {#zhong-guo-ren-min-yin-hang-yao-wen-dong-tai} -<Route author="ShuiHuo" example="/gov/mgs/www/zwgk/zcjd" path="/gov/mgs/:path+" paramsDesc={['路径,只填写 `www` 默认为 政务公开 > 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 - - 若订阅 [政务公开 > 政策解读](http://www.mgs.gov.cn/zwgk/zcjd/) 则将对应页面 URL `http://www.mgs.gov.cn/zwgk/zcjd/` 中 `http://www.mgs.gov.cn/` 的字段 `www` 和 `zwgk/zcjd/` 作为路径填入。此时路由为 [`/gov/mgs/www/zwgk/zcjd/`](https://rsshub.app/gov/mgs/www/zwgk/zcjd/) - ::: -</Route> - -### 广东茂名高新技术产业开发区 {#mao-ming-shi-ren-min-zheng-fu-guang-dong-mao-ming-gao-xin-ji-shu-chan-ye-kai-fa-qu} - -<Route author="ShuiHuo" example="/gov/mmht/www/xwzx/zcjd" path="/gov/mmht/:path+" paramsDesc={['路径,只填写 `www` 默认为 政务公开 > 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 - - 若订阅 [政务公开 > 政策解读](http://www.mmht.gov.cn/xwzx/zcjd/) 则将对应页面 URL `http://www.mmht.gov.cn/xwzx/zcjd/` 中 `http://www.mmht.gov.cn/` 的字段 `www` 和 `xwzx/zcjd/` 作为路径填入。此时路由为 [`/gov/mmht/www/xwzx/zcjd/`](https://rsshub.app/gov/mmht/www/xwzx/zcjd/) - ::: -</Route> - -### 广东省茂名水东湾新城建设管理委员会 {#mao-ming-shi-ren-min-zheng-fu-guang-dong-sheng-mao-ming-shui-dong-wan-xin-cheng-jian-she-guan-li-wei-yuan-hui} - -<Route author="ShuiHuo" example="/gov/sdb/www/zwgk/zcjd" path="/gov/sdb/:path+" paramsDesc={['路径,只填写 `www` 默认为 政务公开 > 政策解读']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中最前面的部分和域名后的字段。下面是一个例子。 - - 若订阅 [政务公开 > 政策解读](http://www.sdb.gov.cn/zwgk/zcjd/) 则将对应页面 URL `http://www.sdb.gov.cn/zwgk/zcjd/` 中 `http://www.sdb.gov.cn/` 的字段 `www` 和 `zwgk/zcjd/` 作为路径填入。此时路由为 [`/gov/sdb/www/zwgk/zcjd/`](https://rsshub.app/gov/sdb/www/zwgk/zcjd/) - ::: -</Route> - -## 南京鼓楼医院 {#nan-jing-gu-lou-yi-yuan} - -### 员工版教育培训 {#nan-jing-gu-lou-yi-yuan-yuan-gong-ban-jiao-yu-pei-xun} - -<Route author="real-jiakai" example="/njglyy/ygbjypx" path="/njglyy/ygbjypx" radar="1" /> - -## 南京市人民政府 {#nan-jing-shi-ren-min-zheng-fu} - -### 信息公开 {#nan-jing-shi-ren-min-zheng-fu-xin-xi-gong-kai} - -<Route author="ocleo1" example="/gov/city/nanjing/news" path="/gov/city/nanjing/:category" paramsDesc={['分类名']}> - | 南京信息 | 部门动态 | 各区动态 | 民生信息 | - | :------: | :--------: | :------: | :--------: | - | news | department | district | livelihood | -</Route> - -## 全国哲学社会科学工作办公室 {#quan-guo-zhe-xue-she-hui-ke-xue-gong-zuo-ban-gong-shi} - -### 通用 {#quan-guo-zhe-xue-she-hui-ke-xue-gong-zuo-ban-gong-shi-tong-yong} - -<Route author="nczitzk" example="/gov/nopss/GB/219469" path="/gov/nopss/:path+" paramsDesc={['路径,默认为通知公告']}> - :::tip - 路径处填写对应页面 URL 中 `http://www.nopss.gov.cn/` 后的字段。下面是一个例子。 - - 若订阅 [年度项目、青年项目和西部项目](http://www.nopss.gov.cn/GB/219469/431027) 则将对应页面 URL `http://www.nopss.gov.cn/GB/219469/431027` 中 `http://www.nopss.gov.cn/` 后的字段 `GB/219469/431027` 作为路径填入。此时路由为 [`/gov/nopss/GB/219469/431027`](https://rsshub.app/gov/nopss/GB/219469/431027) - ::: -</Route> - -## 泉州市跨境电子商务协会 {#quan-zhou-shi-kua-jing-dian-zi-shang-wu-xie-hui} - -### 新闻动态 {#quan-zhou-shi-kua-jing-dian-zi-shang-wu-xie-hui-xin-wen-dong-tai} - -<Route author="nczitzk" example="/qzcea" path="/qzcea/:caty?" paramsDesc={['分类 id,默认为 `1`']}> - | 新闻动态 | 协会动态 | 通知公告 | 会员风采 | 政策法规 | 电商资讯 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 5 | 14 | 18 | -</Route> - -## 山西省人民政府 {#shan-xi-sheng-ren-min-zheng-fu} - -### 人社厅 {#shan-xi-sheng-ren-min-zheng-fu-ren-she-ting} - -<Route author="wolfyu1991" example="/gov/shanxi/rst/rsks-tzgg" path="/gov/shanxi/rst/:category" paramsDesc={['分类名']} notOperational="1"> - | 通知公告 | 公务员考试 | 事业单位考试 | 专业技术人员资格考试 | 其他考试 | - | :-------: | :--------: | :----------: | :------------------: | :-------: | - | rsks-tzgg | rsks-gwyks | rsks-sydwks | rsks-zyjsryzgks | rsks-qtks | -</Route> - -## 陕西省省人民政府 {#shan-xi-sheng-sheng-ren-min-zheng-fu} - -### 省科学技术厅 {#shan-xi-sheng-sheng-ren-min-zheng-fu-sheng-ke-xue-ji-shu-ting} - -<Route author="nczitzk" example="/gov/shaanxi/kjt" path="/gov/shaanxi/kjt/:id?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 科技头条 | 工作动态 | 基层科技 | 科技博览 | 媒体聚焦 | 通知公告 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 1061 | 24 | 27 | 25 | 28 | 221 | -</Route> - -## 上海市人民政府 {#shang-hai-shi-ren-min-zheng-fu} - -### 上海市职业能力考试院 考试项目 {#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-zhi-ye-neng-li-kao-shi-yuan-kao-shi-xiang-mu} - -<Route author="Fatpandac" example="/gov/shanghai/rsj/ksxm" path="/gov/shanghai/rsj/ksxm" /> - -### 上海卫健委 疫情通报 {#shang-hai-shi-ren-min-zheng-fu-shang-hai-wei-jian-wei-yi-qing-tong-bao} - -<Route author="zcf0508" example="/gov/shanghai/wsjkw/yqtb" path="/gov/shanghai/wsjkw/yqtb" notOperational="1" /> - -### 上海市药品监督管理局 {#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-yao-pin-jian-du-guan-li-ju} - -<Route author="nczitzk" example="/gov/shanghai/yjj/zh" path="/gov/shanghai/yjj/:path+" paramsDesc={['路径参数']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `https://yjj.sh.gov.cn/` 与 `/index.html` 之间的字段,下面是一个例子。 - - 若订阅 [最新信息公开 > 综合](https://yjj.sh.gov.cn/zh/index.html) 则将对应页面 URL `https://yjj.sh.gov.cn/zh/index.html` 中 `https://yjj.sh.gov.cn/` 和 `/index.html` 之间的字段 `zh` 作为路径填入。此时路由为 [`/gov/shanghai/yjj/zh`](https://rsshub.app/gov/shanghai/yjj/zh) - ::: -</Route> - -### 上海市文旅局审批公告 {#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-wen-lv-ju-shen-pi-gong-gao} - -<Route author="gideonsenku" example="/gov/shanghai/wgj" path="/gov/shanghai/wgj/:page?" paramsDesc={['页数,默认第 1 页']} radar="1" /> - -## 苏州市人民政府 {#su-zhou-shi-ren-min-zheng-fu} - -### 政府新闻 {#su-zhou-shi-ren-min-zheng-fu-zheng-fu-xin-wen} - -<Route author="EsuRt luyuhuang" example="/gov/suzhou/news/news" path="/gov/suzhou/news/:uid" paramsDesc={['栏目名']} radar="1"> - | 新闻栏目名 | :uid | - | :--------: | :--------------: | - | 苏州要闻 | news 或 szyw | - | 区县快讯 | district 或 qxkx | - | 部门动态 | bmdt | - | 新闻视频 | xwsp | - | 政务公告 | zwgg | - | 便民公告 | mszx | - | 民生资讯 | bmzx | - - | 热点专题栏目名 | :uid | - | :------------: | :----: | - | 热点专题 | rdzt | - | 市本级专题 | sbjzt | - | 最新热点专题 | zxrdzt | - | 往期专题 | wqzt | - | 区县专题 | qxzt | - - :::tip - **热点专题**栏目包含**市本级专题**和**区县专题** - - **市本级专题**栏目包含**最新热点专题**和**往期专题** - - 如需订阅完整的热点专题,仅需订阅 **热点专题**`rdzt` 一项即可。 - ::: -</Route> - -### 政府信息公开文件 {#su-zhou-shi-ren-min-zheng-fu-zheng-fu-xin-xi-gong-kai-wen-jian} - -<Route author="EsuRt" example="/gov/suzhou/doc" path="/gov/suzhou/doc" radar="1" /> - -### 苏州市发展和改革委员会 {#su-zhou-shi-ren-min-zheng-fu-su-zhou-shi-fa-zhan-he-gai-ge-wei-yuan-hui} - -<Route author="nczitzk" example="/gov/suzhou/fg/szfgw/ggl/nav_list" path="/gov/suzhou/fg/:category?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 发改要闻 | - | ------------------- | -------------------- | - | szfgw/ggl/nav\_list | szfgw/gzdt/nav\_list | -</Route> - -## 台湾行政院消费者保护会 {#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui} - -### 消费资讯 {#tai-wan-xing-zheng-yuan-xiao-fei-zhe-bao-hu-hui-xiao-fei-zi-xun} - -<Route author="Fatpandac" example="/cpcey/xwg" path="/cpcey/:type?" paramsDesc={['默认为 `xwg`']}> - | 新闻稿 | 消费资讯 | - | :----: | :------: | - | xwg | xfzx | -</Route> - -## 台灣法務部廉政署 {#tai-wan-fa-wu-bu-lian-zheng-shu} - -### 最新消息 {#tai-wan-fa-wu-bu-lian-zheng-shu-zui-xin-xiao-xi} - -<Route author="TonyRL" example="/gov/moj/aac/news" path="/gov/moj/aac/news/:type?" paramsDesc={['資料大類,留空為全部']}> - | 全部 | 其他 | 採購公告 | 新聞稿 | 肅貪 | 預防 | 綜合 | 防疫專區 | - | ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- | - | | 02 | 01 | 06 | 05 | 04 | 03 | 99 | -</Route> - -## 台灣衛生福利部 {#tai-wan-wei-sheng-fu-li-bu} - -### 即時新聞澄清 {#tai-wan-wei-sheng-fu-li-bu-ji-shi-xin-wen-cheng-qing} - -<Route author="nczitzk" example="/mohw/clarification" path="/mohw/clarification" /> - -## 太原市人民政府 {#tai-yuan-shi-ren-min-zheng-fu} - -### 太原市人力资源和社会保障局政府公开信息 {#tai-yuan-shi-ren-min-zheng-fu-tai-yuan-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju-zheng-fu-gong-kai-xin-xi} - -<Route author="2PoL" example="/gov/taiyuan/rsj/gggs" path="/gov/taiyuan/rsj/:caty/:page?" paramsDesc={['信息类别', '页码']} notOperational="1"> - | 工作动态 | 太原新闻 | 通知公告 | 县区动态 | 国内动态 | 图片新闻 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | gzdt | tyxw | gggs | xqdt | gndt | tpxw | -</Route> - -## 武汉东湖新技术开发区 {#wu-han-dong-hu-xin-ji-shu-kai-fa-qu} - -### 新闻中心 {#wu-han-dong-hu-xin-ji-shu-kai-fa-qu-xin-wen-zhong-xin} - -<Route author="tudou027" example="/gov/wuhan/wehdz/tz" path="/gov/wuhan/wehdz/:caty" paramsDesc={['类别']} notOperational="1"> - | 通知 | 公告 | - | :--: | :--: | - | tz | gg | -</Route> - -## 武汉市科学技术局 {#wu-han-shi-ke-xue-ji-shu-ju} - -### 新闻中心 {#wu-han-shi-ke-xue-ji-shu-ju-xin-wen-zhong-xin} - -<Route author="tudou027" example="/gov/wuhan/kjj/tzgg" path="/gov/wuhan/kjj/:caty" paramsDesc={['类别']}> - | 通知公告 | 公示信息 | - | :------: | :------: | - | tzgg | gsxx | -</Route> - -## 武汉市人民政府 {#wu-han-shi-ren-min-zheng-fu} - -### 武汉要闻 {#wu-han-shi-ren-min-zheng-fu-wu-han-yao-wen} - -<Route author="nczitzk" example="/gov/wuhan/sy/whyw" path="/gov/wuhan/sy/whyw" radar="1" /> - -## 香港卫生防护中心 {#xiang-gang-wei-sheng-fang-hu-zhong-xin} - -### 分类 {#xiang-gang-wei-sheng-fang-hu-zhong-xin-fen-lei} - -<Route author="nczitzk" example="/chp" path="/chp/:category?/:language?" paramsDesc={['分类,见下表,默认为重要资讯', '语言,见下表,默认为 `zh_tw`']} notOperational="1"> - 分类 - - | 重要资讯 | 新闻稿 | 应变级别 | 期刊及刊物 | 健康通告 | - | ------------- | ------------------ | ------------- | ----------- | ----------- | - | important\_ft | press\_data\_index | ResponseLevel | publication | HealthAlert | - - 语言 - - | English | 中文简体 | 中文繁體 | - | ------- | -------- | -------- | - | en | zh\_cn | zh\_tw | -</Route> - -## 徐州市人民政府 {#xu-zhou-shi-ren-min-zheng-fu} - -### 徐州市人力资源和社会保障局 {#xu-zhou-shi-ren-min-zheng-fu-xu-zhou-shi-ren-li-zi-yuan-he-she-hui-bao-zhang-ju} - -<Route author="nczitzk" example="/gov/xuzhou/hrss" path="/gov/xuzhou/hrss/:category?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 通知公告 | 要闻动态 | 县区动态 | 事业招聘 | 企业招聘 | 政声传递 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | | 001001 | 001002 | 001004 | 001005 | 001006 | -</Route> - -## 浙江省公务员考试录用网 {#zhe-jiang-sheng-gong-wu-yuan-kao-shi-lu-yong-wang} - -### 通知 {#zhe-jiang-sheng-gong-wu-yuan-kao-shi-lu-yong-wang-tong-zhi} - -<Route author="nczitzk" example="/gov/zhejiang/gwy/1" path="/gov/zhejiang/gwy/:category?/:column?" paramsDesc={['分类,见下表,默认为全部', '地市专栏,见下表,默认为全部']} notOperational="1"> - | 分类 | id | - | ------------ | -- | - | 重要通知 | 1 | - | 招考公告 | 2 | - | 招考政策 | 3 | - | 面试体检考察 | 4 | - | 录用公示专栏 | 5 | - - | 地市 | id | - | ------------ | ----- | - | 浙江省 | 133 | - | 浙江省杭州市 | 13301 | - | 浙江省宁波市 | 13302 | - | 浙江省温州市 | 13303 | - | 浙江省嘉兴市 | 13304 | - | 浙江省湖州市 | 13305 | - | 浙江省绍兴市 | 13306 | - | 浙江省金华市 | 13307 | - | 浙江省衢州市 | 13308 | - | 浙江省舟山市 | 13309 | - | 浙江省台州市 | 13310 | - | 浙江省丽水市 | 13311 | - | 省级单位 | 13317 | -</Route> - -## 浙江省土地使用权网上交易系统 {#zhe-jiang-sheng-tu-di-shi-yong-quan-wang-shang-jiao-yi-xi-tong} - -### 公告信息 {#zhe-jiang-sheng-tu-di-shi-yong-quan-wang-shang-jiao-yi-xi-tong-gong-gao-xin-xi} - -<Route author="Fatpandac" example="/zjgtjy/all" path="/zjgtjy/:type" paramsDesc={['分类名']} notOperational="1"> - | 全部公告 | 挂牌公告 | 拍卖公告 | 补充公告 | - | :------: | :------: | :------: | :------: | - | all | gpgg | pmgg | bcgg | -</Route> - -## 中国工业和信息化部 {#zhong-guo-gong-ye-he-xin-xi-hua-bu} - -### 政策解读 {#zhong-guo-gong-ye-he-xin-xi-hua-bu-zheng-ce-jie-du} - -<Route author="Yoge-Code" example="/gov/miit/zcjd" path="/gov/miit/zcjd" /> - -### 文件发布 {#zhong-guo-gong-ye-he-xin-xi-hua-bu-wen-jian-fa-bu} - -<Route author="Fatpandac" example="/gov/miit/wjfb/ghs" path="/gov/miit/wjfb/:ministry" paramsDesc={['部门缩写,可以在对应 URL 中获取']} /> - -### 意见征集 {#zhong-guo-gong-ye-he-xin-xi-hua-bu-yi-jian-zheng-ji} - -<Route author="Fatpandac" example="/gov/miit/yjzj" path="/gov/miit/yjzj" /> - -### 文件公示 {#zhong-guo-gong-ye-he-xin-xi-hua-bu-wen-jian-gong-shi} - -<Route author="Yoge-Code" example="/gov/miit/wjgs" path="/gov/miit/wjgs" /> - -### 政策文件 {#zhong-guo-gong-ye-he-xin-xi-hua-bu-zheng-ce-wen-jian} - -<Route author="Yoge-Code" example="/gov/miit/zcwj" path="/gov/miit/zcwj" notOperational="1" /> - -## 中国国家认证认可监管管理员会 {#zhong-guo-guo-jia-ren-zheng-ren-ke-jian-guan-guan-li-yuan-hui} - -### 监管动态 {#zhong-guo-guo-jia-ren-zheng-ren-ke-jian-guan-guan-li-yuan-hui-jian-guan-dong-tai} - -<Route author="Yoge-Code" example="/gov/cnca/jgdt" path="/gov/cnca/jgdt" notOperational="1" /> - -### 行业动态 {#zhong-guo-guo-jia-ren-zheng-ren-ke-jian-guan-guan-li-yuan-hui-hang-ye-dong-tai} - -<Route author="Yoge-Code" example="/gov/cnca/hydt" path="/gov/cnca/hydt" notOperational="1" /> - -### 最新通知 {#zhong-guo-guo-jia-ren-zheng-ren-ke-jian-guan-guan-li-yuan-hui-zui-xin-tong-zhi} - -<Route author="Yoge-Code" example="/gov/cnca/zxtz" path="/gov/cnca/zxtz" notOperational="1" /> - -## 中国互联网络信息中心 {#zhong-guo-hu-lian-wang-luo-xin-xi-zhong-xin} - -### 新闻中心 {#zhong-guo-hu-lian-wang-luo-xin-xi-zhong-xin-xin-wen-zhong-xin} - -<Route author="nczitzk" example="/gov/cnnic/gywm/xwzx/xwzxtzgg/" path="/gov/cnnic/:path+" paramsDesc={['路径,默认为热点信息']} notOperational="1"> - :::tip - 路径处填写对应页面 URL 中 `http://www.cnnic.net.cn/` 后的字段。下面是一个例子。 - - 若订阅 [热点信息](http://www.cnnic.net.cn/gywm/xwzx/rdxw) 则将对应页面 URL `http://www.cnnic.net.cn/gywm/xwzx/rdxw` 中 `http://www.cnnic.net.cn/` 后的字段 `gywm/xwzx/rdxw` 作为路径填入。此时路由为 [`/gov/cnnic/gywm/xwzx/rdxw`](https://rsshub.app/gov/cnnic/gywm/xwzx/rdxw) - ::: -</Route> - -## 中国军网 {#zhong-guo-jun-wang} - -### 军队人才网 {#zhong-guo-jun-wang-jun-dui-ren-cai-wang} - -<Route author="nczitzk" example="/81/81rc" path="/81/81rc/:path+" paramsDesc={['路径,默认为工作动态']}> - :::tip - 若订阅 [文职人员 - 工作动态](https://81rc.81.cn/wzry/gzdt),网址为 `https://81rc.81.cn/wzry/gzdt`。截取 `https://81rc.81.cn` 到末尾的部分 `/wzry/gzdt` 作为参数,此时路由为 [`/81/81rc/wzry/gzdt`](https://rsshub.app/81/81rc/wzry/gzdt)。 - - 若订阅子分类 [文职人员 - 各部门各单位招考动态](https://81rc.81.cn/wzry/jwjgbmhddwzkdt),网址为 `https://81rc.81.cn/wzry/jwjgbmhddwzkdt`。截取 `https://81rc.81.cn` 到末尾的部分 `/wzry/jwjgbmhddwzkdt` 作为参数,此时路由为 [`/81/81rc/wzry/jwjgbmhddwzkdt`](https://rsshub.app/81/81rc/wzry/jwjgbmhddwzkdt)。 - ::: -</Route> - -## 中国科学技术协会 {#zhong-guo-ke-xue-ji-shu-xie-hui} - -### 通用 {#zhong-guo-ke-xue-ji-shu-xie-hui-tong-yong} - -<Route author="KarasuShin TonyRL" example="/cast/xw/tzgg/ZH" path="/cast/:column/:subColumn/:category?" paramsDesc={['栏目编号,见下表', '二级栏目编号','分类']} radar="1" notOperational="1"> - :::tip - 在路由末尾处加上 `?limit=限制获取数目` 来限制获取条目数量,默认值为`10` - ::: - - | 分类 | 编码 | - | -------- | ---- | - | 全景科协 | qjkx | - | 智库 | zk | - | 学术 | xs | - | 科普 | kp | - | 党建 | dj | - | 数据 | sj | - | 新闻 | xw | -</Route> - -## 中国科学学与科技政策研究会 {#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui} - -### 研究会动态 {#zhong-guo-ke-xue-xue-yu-ke-ji-zheng-ce-yan-jiu-hui-yan-jiu-hui-dong-tai} - -<Route author="nczitzk" example="/casssp/news/3" path="/casssp/news/:category?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 新闻动态 | 信息公开 | 时政要闻 | - | -------- | -------- | -------- | -------- | - | 3 | 2 | 92 | 93 | -</Route> - -## 中国民用航空局 {#zhong-guo-min-yong-hang-kong-ju} - -### 公众留言 {#zhong-guo-min-yong-hang-kong-ju-gong-zhong-liu-yan} - -<Route author="nczitzk" example="/gov/caac/cjwt" path="/gov/caac/cjwt/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1"> - | 机票 | 托运 | 无人机 | 体检 | 行政审批 | 投诉 | - | ---- | ---- | ------ | ---- | -------- | ---- | -</Route> - -## 中国农工民主党 {#zhong-guo-nong-gong-min-zhu-dang} - -### 新闻中心 {#zhong-guo-nong-gong-min-zhu-dang-xin-wen-zhong-xin} - -<Route author="nczitzk" example="/ngd" path="/ngd/:slug?" paramsDesc={['见下文']} notOperational="1"> - 将目标栏目的网址拆解为 `http://www.ngd.org.cn/` 和后面的字段,去掉 `.htm` 后,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug - - 如:(要闻动态)`http://www.ngd.org.cn/xwzx/ywdt/index.htm` 的网址在 `http://www.ngd.org.cn/` 后的字段是 `xwzx/ywdt/index.htm`,则对应的 slug 为 `xwzx-ywdt-index`,对应的路由即为 `/ngd/xwzx-ywdt-index` -</Route> - -## 中国人大网 {#zhong-guo-ren-da-wang} - -### 通用 {#zhong-guo-ren-da-wang-tong-yong} - -<Route author="233yeee" example="/gov/npc/c183" path="/gov/npc/:caty" paramsDesc={['分类名,支持形如 `http://www.npc.gov.cn/npc/c2/*/` 的网站,传入 npc 之后的参数']}> - | 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 | - | ---- | ---- | ---- | ---- | -------- | -------- | - | c183 | c184 | c185 | c189 | c12435 | c10134 | -</Route> - -## 中国庭审公开网 {#zhong-guo-ting-shen-gong-kai-wang} - -### 开庭信息 {#zhong-guo-ting-shen-gong-kai-wang-kai-ting-xin-xi} - -<Route author="Fatpandac" example="/tingshen" path="/tingshen" /> - -## 中国无线电协会业余无线电分会 {#zhong-guo-wu-xian-dian-xie-hui-ye-yu-wu-xian-dian-fen-hui} - -### 最新资讯 {#zhong-guo-wu-xian-dian-xie-hui-ye-yu-wu-xian-dian-fen-hui-zui-xin-zi-xun} - -<Route author="Misaka13514" example="/crac/2" path="/crac/:type?" paramsDesc={['类型,见下表,默认为全部']} radar="1"> - | 新闻动态 | 通知公告 | 政策法规 | 常见问题 | 资料下载 | English | 业余中继台 | 科普专栏 | - | -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- | - | 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | -</Route> - -## 中国信息通信研究院 {#zhong-guo-xin-xi-tong-xin-yan-jiu-yuan} - -### 白皮书 {#zhong-guo-xin-xi-tong-xin-yan-jiu-yuan-bai-pi-shu} - -<Route author="nczitzk" example="/gov/caict/bps" path="/gov/caict/bps" /> - -### 权威数据 {#zhong-guo-xin-xi-tong-xin-yan-jiu-yuan-quan-wei-shu-ju} - -<Route author="nczitzk" example="/gov/caict/qwsj" path="/gov/caict/qwsj" /> - -### CAICT 观点 {#zhong-guo-xin-xi-tong-xin-yan-jiu-yuan-caict-guan-dian} - -<Route author="nczitzk" example="/gov/caict/caictgd" path="/gov/caict/caictgd" /> - -## 中国银行保险监督管理委员会 {#zhong-guo-yin-hang-bao-xian-jian-du-guan-li-wei-yuan-hui} - -### 分类 {#zhong-guo-yin-hang-bao-xian-jian-du-guan-li-wei-yuan-hui-fen-lei} - -<Route author="JkCheung" example="/cbirc/" path="/cbirc/:category" paramsDesc={['类目']}> - | 监管动态 | 公告通知 | 政策法规 | 政策解读 | 征求意见 | 行政许可 | 行政处罚 | 行政监管措施 | 工作论文 | 金融监管研究 | 统计信息 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :----------: | :------: | :----------: | :------: | - | jgdt | ggtz | zcfg | zcjd | zqyj | xzxk | xzcf | xzjgcs | gzlw | jrjgyj | tjxx | -</Route> - -## 中国载人航天 {#zhong-guo-zai-ren-hang-tian} - -### 综合新闻 {#zhong-guo-zai-ren-hang-tian-zong-he-xin-wen} - -<Route author="nczitzk" example="/gov/cmse/xwzx/zhxw" path="/gov/cmse/xwzx/zhxw" /> - -### 研制进展 {#zhong-guo-zai-ren-hang-tian-yan-zhi-jin-zhan} - -<Route author="nczitzk" example="/gov/cmse/xwzx/yzjz" path="/gov/cmse/xwzx/yzjz" /> - -### 官方公告 {#zhong-guo-zai-ren-hang-tian-guan-fang-gong-gao} - -<Route author="nczitzk" example="/gov/cmse/gfgg" path="/gov/cmse/gfgg" /> - -### 飞行任务 {#zhong-guo-zai-ren-hang-tian-fei-xing-ren-wu} - -<Route author="nczitzk" example="/gov/cmse/fxrw" path="/gov/cmse/fxrw" /> - -### 任务动态 {#zhong-guo-zai-ren-hang-tian-ren-wu-dong-tai} - -<Route author="nczitzk" example="/gov/cmse/fxrw/wtfx/rwdt" path="/gov/cmse/fxrw/:id/:category" paramsDesc={['任务 id,可在对应任务页 URL 中找到', '分类 id,见下表,可在对应任务页 URL 中找到']}> - :::tip - 下表分类可能并不完整。请查看各飞行任务详情页获得完整分类。 - ::: - - | 任务动态 | 综合新闻 | 视频 | 图片新闻 | 媒体聚焦 | - | -------- | -------- | ---- | -------- | -------- | - | rwdt | zhxw | sp | tpxw | mtjj | -</Route> - -### 空间科学 {#zhong-guo-zai-ren-hang-tian-kong-jian-ke-xue} - -<Route author="nczitzk" example="/gov/cmse/kjkx/kjkxyjyyy" path="/gov/cmse/kjkx/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']}> - | 空间科学研究与应用 | 航天技术试验 | 航天医学实验 | - | ------------------ | ------------ | ------------ | - | kjkxyjyyy | htjssy | htyxsy | -</Route> - -### 国际合作 {#zhong-guo-zai-ren-hang-tian-guo-ji-he-zuo} - -<Route author="nczitzk" example="/gov/cmse/gjhz" path="/gov/cmse/gjhz" /> - -### 环球视野 {#zhong-guo-zai-ren-hang-tian-huan-qiu-shi-ye} - -<Route author="nczitzk" example="/gov/cmse/hqsy/zxdta" path="/gov/cmse/hqsy/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']}> - | 最新动态 | 美国 | 俄罗斯 | 欧洲 | 日本 | 印度 | 领域动态 | - | -------- | ---- | ------ | ---- | ---- | ---- | -------- | - | zxdta | mg | els | oz | rb | yd | lydt | -</Route> - -### 专题报道 {#zhong-guo-zai-ren-hang-tian-zhuan-ti-bao-dao} - -<Route author="nczitzk" example="/gov/cmse/ztbd/xwfbh" path="/gov/cmse/ztbd/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']}> - | 新闻发布会 | 学术大会 | 标准 | 新闻专题 | - | ---------- | -------- | ---- | -------- | - | xwfdh | xsdh | bz | xwzt | -</Route> - -### 科普教育 {#zhong-guo-zai-ren-hang-tian-ke-pu-jiao-yu} - -<Route author="nczitzk" example="/gov/cmse/kpjy/kphd" path="/gov/cmse/kpjy/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']}> - | 科普活动 | 太空课堂 | 航天知识 | - | -------- | -------- | -------- | - | kphd | tkkt | ttzs | -</Route> - -## 中国证券监督管理委员会 {#zhong-guo-zheng-quan-jian-du-guan-li-wei-yuan-hui} - -### 通用 {#zhong-guo-zheng-quan-jian-du-guan-li-wei-yuan-hui-tong-yong} - -<Route author="chinobing LogicJake" example="/gov/csrc/news/c101975/zfxxgk_zdgk.shtml" path="/gov/csrc/news/:suffix*" paramsDesc={['路径,预设为 `c100028/common_xq_list.shtml`']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `http://www.csrc.gov.cn/csrc/` 后的字段。下面是一个例子。 - - 若订阅 [证监会要闻](http://www.csrc.gov.cn/csrc/c100028/common_xq_list.shtml) 则将对应页面 URL `http://www.csrc.gov.cn/csrc/c100028/common_xq_list.shtml` 中 `http://www.csrc.gov.cn/csrc/` 后的字段 `c100028/common_xq_list.shtml` 作为路径填入。此时路由为 [`/gov/csrc/news/c100028/common_xq_list.shtml`](https://rsshub.app/gov/csrc/news/c100028/common_xq_list.shtml) - ::: -</Route> - -### 申请事项进度 {#zhong-guo-zheng-quan-jian-du-guan-li-wei-yuan-hui-shen-qing-shi-xiang-jin-du} - -<Route author="hillerliao" example="/gov/csrc/auditstatus/9ce91cf2d750ee62de27fbbcb05fa483" path="/gov/csrc/auditstatus/:apply_id" paramsDesc={['事项类别id,`https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数']} radar="1" notOperational="1" /> - -## 中国政府网 {#zhong-guo-zheng-fu-wang} - -### 数据 {#zhong-guo-zheng-fu-wang-shu-ju} - -<Route author="nczitzk" example="/gov/shuju/shengzhu/baitiaorou" path="/gov/shuju/:caty/:item" paramsDesc={['分类,“生猪”对应`shengzhu`,“价格”对应`jiage`', '项目,见表']} notOperational="1"> - 生猪分类可选项目: - - | 白条猪价格 | 生猪屠宰与活体交易 | 仔猪价格 | 生猪出场价与玉米价 | 生猪存栏信息和生猪疫情 | - | ---------- | ------------------ | -------- | -------------------- | ---------------------- | - | baitiaorou | huotijiaoyi | zizhu | chuchangjia\_yumijia | cunlan\_yiqing | - - 价格分类可选项目: - - | 商品价格 | 农产品价格 | 油价 | - | -------- | ----------- | ------ | - | shangpin | nongchanpin | youjia | -</Route> - -### 图解 {#zhong-guo-zheng-fu-wang-tu-jie} - -<Route author="nczitzk" example="/gov/xinwen/tujie/zhengce" path="/gov/xinwen/tujie/:caty" paramsDesc={['图解分类,见下表']} notOperational="1"> - | 总理活动图解 | 每周一画 | 其他漫画 | 图解政策 | 其他图解 | - | ------------ | -------- | -------- | -------- | -------- | - | zlhd | mzyh | qtmh | zhengce | qttj | - - 全部分类参见 [图解图表](http://www.gov.cn/xinwen/tujie/index.htm) -</Route> - -### 政策 {#zhong-guo-zheng-fu-wang-zheng-ce} - -<Route author="nczitzk" example="/gov/zhengce" path="/gov/zhengce/:category?" paramsDesc={['分类,见下表,默认为最新']} radar="1"> - | 最新政策 | 政策解读 | 图解政策 | - | -------- | -------- | ----------- | - | zuixin | jiedu | jiedu/tujie | -</Route> - -### 最新政策 {#zhong-guo-zheng-fu-wang-zui-xin-zheng-ce} - -<Route author="SettingDust nczitzk" example="/gov/zhengce/zuixin" path="/gov/zhengce/zuixin" radar="1" /> - -### 最新文件 {#zhong-guo-zheng-fu-wang-zui-xin-wen-jian} - -<Route author="ciaranchen" example="/gov/zhengce/wenjian" path="/gov/zhengce/wenjian/:pcodeJiguan?" paramsDesc={['文种分类。国令、国发、国函、国发明电、国办发、国办函、国办发明电、其他']} notOperational="1" /> - -### 信息稿件 {#zhong-guo-zheng-fu-wang-xin-xi-gao-jian} - -<Route author="ciaranchen" example="/gov/zhengce/govall/orpro=555¬pro=2&search_field=title" path="/gov/zhengce/govall/:advance?" paramsDesc={['高级搜索选项,将作为请求参数直接添加到url后。目前已知的选项及其意义如下。' ]} notOperational="1"> - | 选项 | 意义 | 备注 | - | :-----------------------------: | :----------------------------------------------: | :----------------------------: | - | orpro | 包含以下任意一个关键词。 | 用空格分隔。 | - | allpro | 包含以下全部关键词 | | - | notpro | 不包含以下关键词 | | - | inpro | 完整不拆分的关键词 | | - | searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 | - | pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 | - | pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 | - | colid | 栏目 | 比较复杂,不建议使用 | -</Route> - -### 国务院政策文件库 {#zhong-guo-zheng-fu-wang-guo-wu-yuan-zheng-ce-wen-jian-ku} - -<Route author="zxx-457" example="/gov/zhengce/zhengceku/bmwj" path="/gov/zhengce/zhengceku/:department" paramsDesc={['库名']} /> - -### 政府新闻 {#zhong-guo-zheng-fu-wang-zheng-fu-xin-wen} - -<Route author="EsuRt" example="/gov/news/bm" path="/gov/news/:uid" paramsDesc={['分类名']}> - | 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 政策文件 | - | :------: | :------: | :------: | :--------: | :------: | - | bm | gd | yw | gwy | zhengce | -</Route> - -### 吹风会 {#zhong-guo-zheng-fu-wang-chui-feng-hui} - -<Route author="EsuRt" example="/gov/statecouncil/briefing" path="/gov/statecouncil/briefing" /> - -## 中国政协网 {#zhong-guo-zheng-xie-wang} - -### 栏目 {#zhong-guo-zheng-xie-wang-lan-mu} - -<Route author="nczitzk" example="/cppcc" path="/cppcc/:slug?" paramsDesc={['见下文']} notOperational="1"> - 将目标栏目的网址拆解为 `http://www.cppcc.gov.cn/` 和后面的字段,去掉 `.shtml` 后,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug - - 如:(委员建言)`http://www.cppcc.gov.cn/zxww/newcppcc/wyjy/index.shtml` 的网址在 `http://www.cppcc.gov.cn/` 后的字段是 `zxww/newcppcc/wyjy/index.shtml`,则对应的 slug 为 `zxww-newcppcc-wyjy-index`,对应的路由即为 `/cppcc/zxww-newcppcc-wyjy-index` -</Route> - -## 中国驻外使领馆 {#zhong-guo-zhu-wai-shi-ling-guan} - -支持国家列表 - -加拿大 `CA` - -- 大使馆: `/embassy/ca` - -- 领事馆城市列表: - -| 城市 | 路由 | -| -------- | ---------------------- | -| 蒙特利尔 | `/embassy/ca/montreal` | - -* * * - -德国 `DE` - -- 大使馆: `/embassy/de` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ------ | -------------------- | -| 慕尼黑 | `/embassy/de/munich` | - -* * * - -法国 `FR` - -- 大使馆: `/embassy/fr` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ---------- | ------------------------ | -| 马赛 | `/embassy/fr/marseille` | -| 斯特拉斯堡 | `/embassy/fr/strasbourg` | -| 里昂 | `/embassy/fr/lyon` | - -* * * - -日本 `JP` - -- 大使馆: `/embassy/jp` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ------ | ---------------------- | -| 长崎 | `/embassy/jp/nagasaki` | -| 大阪 | `/embassy/jp/osaka` | -| 福冈 | `/embassy/jp/fukuoka` | -| 名古屋 | `/embassy/jp/nagoya` | -| 札幌 | `/embassy/jp/sapporo` | -| 新潟 | `/embassy/jp/niigata` | - -* * * - -韩国 `KR` - -- 大使馆: `/embassy/kr` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ---- | --------------------- | -| 釜山 | `/embassy/kr/busan` | -| 济州 | `/embassy/kr/jeju` | -| 光州 | `/embassy/kr/gwangju` | - -* * * - -马来西亚 `MY` - -- 大使馆: `/embassy/my` - -* * * - -新加坡 `SG` - -- 大使馆: `/embassy/sg` - -* * * - -美国 `US` - -- 大使馆: `/embassy/us` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ------ | -------------------------- | -| 纽约 | `/embassy/us/newyork` | -| 芝加哥 | `/embassy/us/chicago` | -| 旧金山 | `/embassy/us/sanfrancisco` | - -* * * - -英国 `UK` - -- 大使馆: `/embassy/uk` - -- 领事馆城市列表: - -| 城市 | 路由 | -| ---------- | ------------------------ | -| 爱丁堡 | `/embassy/uk/edinburgh` | -| 贝尔法斯特 | `/embassy/uk/belfast` | -| 曼彻斯特 | `/embassy/uk/manchester` | - -### 大使馆重要通知 {#zhong-guo-zhu-wai-shi-ling-guan-da-shi-guan-zhong-yao-tong-zhi} - -<Route author="HenryQW" example="/embassy/us" path="/embassy/:country" paramsDesc={['国家短代码, 见支持国家列表', '城市, 对应国家列表下的`领事馆城市列表`']} /> - -### 领事馆重要通知 {#zhong-guo-zhu-wai-shi-ling-guan-ling-shi-guan-zhong-yao-tong-zhi} - -<Route author="HenryQW" example="/embassy/us/chicago" path="/embassy/:country/:city" paramsDesc={['国家短代码, 见支持国家列表', '城市, 对应国家列表下的`领事馆城市列表`']} /> - -## 中华人民共和国财政部 {#zhong-hua-ren-min-gong-he-guo-cai-zheng-bu} - -### 专题 {#zhong-hua-ren-min-gong-he-guo-cai-zheng-bu-zhuan-ti} - -<Route author="la3rence" example="/gov/mof/bond" path="/gov/mof/bond/:category?" paramsDesc={['专题,见下表,默认为国债管理工作动态']} radar="1"> - #### 政府债券管理 - - | 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 | - | ---------------- | ---------------------------- | ------------ | --------------------- | - | gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan | -</Route> - -## 中华人民共和国国家发展和改革委员会 {#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui} - -### 新闻动态 {#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-xin-wen-dong-tai} - -<Route author="nczitzk" example="/gov/ndrc/xwdt" path="/gov/ndrc/xwdt/:category?"> - | 新闻发布 | 通知通告 | 委领导动态 | 司局动态 | 地方动态 | - | -------- | -------- | ---------- | -------- | -------- | - | xwfb | tzgg | wlddt | sjdt | dfdt | -</Route> - -### 发展改革工作 {#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-fa-zhan-gai-ge-gong-zuo} - -<Route author="nczitzk" example="/gov/ndrc/fggz" path="/gov/ndrc/fggz/:category?" paramsDesc={['分类,见下表,默认为全部']}> - <details> - <summary>全部分类</summary> - - #### 机关办公 - - | 业务工作 | 学思践悟 | - | --------- | --------- | - | jgbg/ywgz | jgbg/xsjw | - - #### 发改政研 - - | 经济数据概览 | 社会关切回应 | 新媒体解读 | - | ------------ | ------------ | ---------- | - | fgzy/jjsjgl | fgzy/shgqhy | fgzy/xmtjd | - - #### 发展战略和规划 - - | 国家发展战略和规划 | 国家级专项规划 | 地方发展规划 | 发展规划工作 | - | ------------------ | -------------- | ------------- | ------------- | - | fzzlgh/gjfzgh | fzzlgh/gjjzxgh | fzzlgh/dffzgh | fzzlgh/fzgggz | - - #### 发改综合 - - | 国内经济监测 | 工业经济 | 投资运行 | 市场消费 | - | ------------ | ---------------- | ---------------- | ---------------- | - | fgzh/gnjjjc | fgzh/gnjjjc/gyjj | fgzh/gnjjjc/tzyx | fgzh/gnjjjc/scxf | - - | 价格情况 | 财政收支 | 货币金融 | 就业情况 | - | ---------------- | ---------------- | ---------------- | ---------------- | - | fgzh/gnjjjc/jgqk | fgzh/gnjjjc/czsz | fgzh/gnjjjc/hbjr | fgzh/gnjjjc/jyqk | - - | 地区经济 | 国际经济监测 | 先行指数 | 大宗商品市场情况 | - | ---------------- | ------------ | ---------------- | -------------------- | - | fgzh/gnjjjc/dqjj | fgzh/gjjjjc | fgzh/gjjjjc/xxzs | fgzh/gjjjjc/dzspscqk | - - | 国别分析 | 国际组织预测和研究动态 | 国际组织预测 | 国际组织研究动态 | - | ---------------- | ---------------------- | ----------------------- | ------------------------- | - | fgzh/gjjjjc/gbfx | fgzh/gjzzychyjdt | fgzh/gjzzychyjdt/gjzzyc | fgzh/gjzzychyjdt/gjzzyjdt | - - #### 经济运行与调节 - - | 宏观经济运行 | 地方经济运行 | 煤电油气运 | 现代物流 | - | ------------- | ------------- | ------------ | ----------- | - | jjyxtj/hgjjyx | jjyxtj/dfjjyx | jjyxtj/mdyqy | jjyxtj/xdwl | - - #### 体制改革 - - | 改革快讯 | 半月改革动态 | 地方改革经验 | - | --------- | ------------ | ------------ | - | tzgg/ggkx | tzgg/byggdt | tzgg/dfggjx | - - #### 固定资产投资 - - | 投资法规与政策动态 | - | ------------------ | - | gdzctz/tzfg | - - #### 利用外资和境外投资 - - | 境外投资 | 外商投资 | 外债管理 | 政策法规 | - | ----------- | ----------- | ----------- | ----------- | - | lywzjw/jwtz | lywzjw/wstz | lywzjw/wzgl | lywzjw/zcfg | - - #### 地区经济 - - | 重大战略 | 四大板块 | 国土海洋流域新区 | - | --------- | --------- | ---------------- | - | dqjj/zdzl | dqjj/sdbk | dqjj/qt | - - #### 地区振兴 - - | 巩固拓展脱贫攻坚成果和欠发达地区振兴发展 | 对口支援与合作 | 革命老区振兴发展 | 生态退化地区治理 | - | ---------------------------------------- | -------------- | ---------------- | ---------------- | - | dqzx/tpgjypkfq | dqzx/dkzyyhz | dqzx/gglqzxfz | dqzx/stthdqzl | - - #### 区域开放 - - | 信息集萃 | - | --------- | - | qykf/xxjc | - - #### 农业农村经济 - - | 重点建设 | 投资指南 | 乡村振兴 | 农经信息 | - | ----------- | ----------- | ----------- | ----------- | - | nyncjj/zdjs | nyncjj/tzzn | nyncjj/xczx | nyncjj/njxx | - - #### 基础设施发展 - - | 政策规划 | 城轨监管 | 重大工程 | 问题研究 | - | ----------- | ----------- | ----------- | ----------- | - | zcssfz/zcgh | zcssfz/cgjg | zcssfz/zdgc | zcssfz/wtyj | - - #### 产业发展 - - | 制造业发展 | 服务业发展 | - | ---------- | ---------- | - | cyfz/zcyfz | cyfz/fwyfz | - - #### 创新和高技术发展 - - | 地方进展 | - | ------------- | - | cxhgjsfz/dfjz | - - #### 环境与资源 - - | 碳达峰碳中和 | 生态文明建设 | 节能和能效 | 资源利用和循环经济 | - | ------------ | ------------ | ----------- | ------------------ | - | hjyzy/tdftzh | hjyzy/stwmjs | hjyzy/jnhnx | hjyzy/zyzhlyhxhjj | - - #### 就业与收入 - - | 就业收入社保消费 | 地方经验 | - | ---------------- | ---------- | - | jyysr/jysrsbxf | jyysr/dfjx | - - #### 经济贸易 - - | 重要商品情况 | 对外经贸及政策分析 | 流通业发展 | - | ------------ | ------------------ | ---------- | - | jjmy/zyspqk | jjmy/dwjmjzcfx | jjmy/ltyfz | - - #### 财金信用 - - | 工作动态 | - | ----------- | - | cjxy/gzdt03 | - - #### 价格管理 - - | 地方工作 | - | --------- | - | jggl/dfgz | - - #### 发改法规 - - | 地方信息 | - | --------- | - | fgfg/dfxx | - - #### 国际合作 - - | 世经动态 | - | --------- | - | gjhz/zywj | - - #### 干部之家 - - | 系统风采 | 人才招聘 | 委属工作 | 学习园地 | - | --------- | --------- | --------- | --------- | - | gbzj/xtfc | gbzj/rczp | gbzj/wsgz | gbzj/xxyd | - - #### 评估督导 - - | 评督动态 | 评督经验 | - | --------- | --------- | - | pgdd/pddt | pgdd/pdjy | - - #### 发改党建 - - | 中央精神 | 机关党建 | 委属党建 | 系统党建 | - | --------- | --------- | --------- | --------- | - | fgdj/zydj | fgdj/jgdj | fgdj/wsdj | fgdj/xtdj | - - #### 发改金辉 - - | 党建之窗 | 系统交流 | 学习园地 | 金色夕阳 | - | --------- | --------- | --------- | --------- | - | fgjh/djzc | fgjh/zthd | fgjh/yxyd | fgjh/jsxy | - </details> -</Route> - -### 价格监测中心 {#zhong-hua-ren-min-gong-he-guo-guo-jia-fa-zhan-he-gai-ge-wei-yuan-hui-jia-ge-jian-ce-zhong-xin} - -<Route author="nczitzk" example="/gov/jgjcndrc" path="/gov/jgjcndrc/:id?" paramsDesc={['栏目 id,见下表,默认为 692,即通知公告']} radar="1"> - | 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 | - | -------- | ------------ | ------------ | -------- | -------- | -------- | - | 692 | 693 | 694 | 695 | 696 | 697 | - - | 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 | - | -------- | ------------ | ---------------- | -------- | -------- | - | 698 | 699 | 700 | 701 | 753 | - - #### 监测信息 - - | 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 | - | -------------------------- | ------------------ | ------------------------ | ------------------------- | - | 749 | 703 | 704 | 705 | - - | 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 | - | -------------------- | ---------------- | -------------- | -------------------- | - | 821 | 706 | 707 | 708 | -</Route> - -## 中华人民共和国海关总署 {#zhong-hua-ren-min-gong-he-guo-hai-guan-zong-shu} - -### 拍卖信息 / 海关法规 {#zhong-hua-ren-min-gong-he-guo-hai-guan-zong-shu-pai-mai-xin-xi-hai-guan-fa-gui} - -<Route author="Jeason0228 TonyRL" example="/gov/customs/list/paimai" path="/gov/customs/list/:gchannel?" paramsDesc={['支持 `paimai` 及 `fagui` 2个频道,默认为 `paimai`']} anticrawler="1" puppeteer="1" radar="1"> - :::warning - 由于区域限制,建议在国内 IP 的机器上自建 - ::: -</Route> - -## 中华人民共和国交通运输部 {#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu} - -### 栏目 {#zhong-hua-ren-min-gong-he-guo-jiao-tong-yun-shu-bu-lan-mu} - -<Route author="nczitzk" example="/gov/mot/jiaotongyaowen" path="/gov/mot/:category?" paramsDesc={['分类 id,见下表,默认为交通要闻']} radar="1"> - #### 新闻 - - | 分类名 | 分类 id | - | -------- | -------------- | - | 时政要闻 | shizhengyaowen | - | 交通要闻 | jiaotongyaowen | - | 重要会议 | zhongyaohuiyi | - - #### 数据 - - | 分类名 | 分类 id | - | -------- | ------------ | - | 数据开放 | sjkf | - | 统计数据 | tongjishuju | - | 分析公报 | fenxigongbao | - | 运价指数 | yunjiazhishu | - - #### 统计数据 - - | 分类名 | 分类 id | - | -------------------- | --------------------------------- | - | 公路 | tongjishuju/gonglu | - | 水运 | tongjishuju/shuiyun | - | 铁路 | tongjishuju/tielu | - | 民航 | tongjishuju/minhang | - | 邮政 | tongjishuju/youzheng | - | 城市客运 | tongjishuju/chengshikeyun | - | 港口货物旅客吞吐量 | tongjishuju/gangkouhuowulvkettl | - | 固定资产投资完成情况 | tongjishuju/gudingzichantouziwcqk | - - #### 分析公报 - - | 分类名 | 分类 id | - | -------- | -------------------------- | - | 行业公报 | fenxigongbao/hangyegongbao | - | 经济分析 | fenxigongbao/jingjifenxi | - | 科技统计 | fenxigongbao/kejitongji | - | 运力分析 | fenxigongbao/yunlifenxi | - - #### 运价指数 - - | 分类名 | 分类 id | - | -------------------- | ------------------------------------ | - | 沿海散货运价指数 | yunjiazhishu/yanhaisanhuoyjzs | - | 出口集装箱运价指数 | yunjiazhishu/chukoujizhuangxiangyjzs | - | 长江航运指数分析 | yunjiazhishu/changjianghangyunzsfx | - | 珠江水运经济运行分析 | yunjiazhishu/zhujiangshuiyunjjyxfx | -</Route> - -## 中华人民共和国教育部 {#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu} - -### 新闻 {#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu-xin-wen} - -<Route author="Crawler995" example="/gov/moe/policy_anal" path="/gov/moe/:type" paramsDesc={['分类名']}> - | 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 | - | :----------: | :----------: | :------: | :-----------------: | :--------------: | - | policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news | -</Route> - -### 司局通知 {#zhong-hua-ren-min-gong-he-guo-jiao-yu-bu-si-ju-tong-zhi} - -<Route author="TonyRL" example="/gov/moe/s78/A13" path="/gov/moe/s78/:column" paramsDesc={['司局 ID,可在 URL 找到']} radar="1" /> - -## 中华人民共和国农业农村部 {#zhong-hua-ren-min-gong-he-guo-nong-ye-nong-cun-bu} - -### 新闻 {#zhong-hua-ren-min-gong-he-guo-nong-ye-nong-cun-bu-xin-wen} - -<Route author="Origami404" example="/gov/moa/xw/zwdt" path="/gov/moa/:suburl" paramsDesc={['分类目录的子 url']} notOperational="1"> - 更多例子: - - - `农业农村部动态`的网页链接是`http://www.moa.gov.cn/xw/zwdt/`, 对应的`suburl`是`xw/zwdt` - - `财务公开`的网页链接是`http://www.moa.gov.cn/gk/cwgk_1/`, 对应的`suburl`是`gk/cwgk_1` - - 像[政策法规](http://www.moa.gov.cn/gk/zcfg/)这种页面 (`http://www.moa.gov.cn/gk/zcfg/`), 它**不是**一个合法的分类目录,它是`法律`, `行政法规`, `部门规章`等一堆栏目的集合,这时候请点开对应栏目的`更多 >>`进入栏目的目录,再根据上面的规则提取`suburl` - - 特别地,`图片新闻`对应的`suburl`为`xw/tpxw/`, `最新公开`对应的`suburl`为`govpublic` -</Route> - -### 数据 {#zhong-hua-ren-min-gong-he-guo-nong-ye-nong-cun-bu-shu-ju} - -<Route author="MisteryMonster nczitzk" example="/gov/moa/zdscxx" path="/gov/moa/zdscxx/:channel?/:source?" paramsDesc={['报告主题,见下表,默认为全部', '报告来源,见下表,默认为全部']} radar="1" anticrawler="1"> - #### 报告主题 - - | 价格指数 | 供需月报 | 日历信息 | 蔬菜生产 | - | -------- | -------- | -------- | -------- | - - #### 报告来源 - - | 农业农村部市场与信息化司 | 农业农村部畜牧兽医局 | 农业农村部种植业管理司 | 农业农村部信息中心 | 农业农村部农业贸易促进中心 | - | ------------------------ | -------------------- | ---------------------- | ------------------ | -------------------------- | - - | 新华网 | 新闻晨报 | 楚天都市报 | 中国兴农网 | 泉州晚报 | - | ------ | -------- | ---------- | ---------- | -------- | - - | 潇湘晨报 | 澎湃新闻 | 环京津网 | 经济日报 | 腾讯网 | - | -------- | -------- | -------- | -------- | ------ | - - | 贵阳晚报 | 山东广播电视台闪电新闻客户端 | 央视网 | 农产品;平衡表;供需分析 | 农民日报 | - | -------- | ---------------------------- | ------ | ------------------------ | -------- | - - | 重庆市黔江区人民政府 | 农业农村部新闻办公室 | 农业农村部市场预警专家委员会 | 农业农村部市场畜牧兽医局 | 其它来源 | - | -------------------- | -------------------- | ---------------------------- | ------------------------ | -------- | - - | 人民网 | 人民日报 | 中央气象台 | 中国证券报 | 中国网 | - | ------ | -------- | ---------- | ---------- | ------ | - - | 中国新闻网 | 南方日报 | 黑龙江省政府新闻办 | - | ---------- | -------- | ------------------ | -</Route> - -## 中华人民共和国人力资源和社会保障部 {#zhong-hua-ren-min-gong-he-guo-ren-li-zi-yuan-he-she-hui-bao-zhang-bu} - -### 社保减免 {#zhong-hua-ren-min-gong-he-guo-ren-li-zi-yuan-he-she-hui-bao-zhang-bu-she-bao-jian-mian} - -<Route author="ncziztk" example="/gov/mohrss/sbjm" path="/gov/mohrss/sbjm/:category?" paramsDesc={['分类,见下表']}> - | 要点新闻 | 政策文件 | 工作动态 | 媒体报道 | 图片新闻 | - | -------- | -------- | -------- | -------- | -------- | - | ydxw | zcwj | gzdt | mtbd | tpxw | -</Route> - -## 中华人民共和国商务部 {#zhong-hua-ren-min-gong-he-guo-shang-wu-bu} - -### 政务公开 {#zhong-hua-ren-min-gong-he-guo-shang-wu-bu-zheng-wu-gong-kai} - -<Route author="LogicJake" example="/gov/mofcom/article/xwfb" path="/gov/mofcom/article/:suffix+" paramsDesc={['支持形如 `http://www.mofcom.gov.cn/article/*` 的网站,传入 article 之后的后缀,支持多级']} radar="1" /> - -## 中华人民共和国生态环境部 {#zhong-hua-ren-min-gong-he-guo-sheng-tai-huan-jing-bu} - -### 要闻动态 {#zhong-hua-ren-min-gong-he-guo-sheng-tai-huan-jing-bu-yao-wen-dong-tai} - -<Route author="liuxsdev" example="/gov/mee/ywdt/hjywnews" path="/gov/mee/ywdt/:category?" paramsDesc={['分类名,预设 `szyw`']} /> +<Route namespace="gov" data={{"path":"/mee/ywdt/:category?","categories":["government"],"example":"/gov/mee/ywdt/hjywnews","parameters":{"category":"分类名,预设 `szyw`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mee.gov.cn/ywdt/:category"],"target":"/mee/ywdt/:category"},"name":"要闻动态","maintainers":["liuxsdev"],"description":"| 时政要闻 | 环境要闻 | 地方快讯 | 新闻发布 | 视频新闻 | 公示公告 |\n| :------: | :------: | :------: | :------: | :------: | :------: |\n| szyw | hjywnews | dfnews | xwfb | spxw | gsgg |","location":"mee/ywdt.ts"}} /> | 时政要闻 | 环境要闻 | 地方快讯 | 新闻发布 | 视频新闻 | 公示公告 | | :------: | :------: | :------: | :------: | :------: | :------: | | szyw | hjywnews | dfnews | xwfb | spxw | gsgg | -## 中华人民共和国司法部 {#zhong-hua-ren-min-gong-he-guo-si-fa-bu} +### 业务咨询 {#zhong-guo-ren-min-yin-hang-ye-wu-zi-xun} -### 立法意见征集 {#zhong-hua-ren-min-gong-he-guo-si-fa-bu-li-fa-yi-jian-zheng-ji} +<Route namespace="gov" data={{"path":"/safe/business/:site?","categories":["government"],"example":"/gov/safe/business/beijing","parameters":{"site":"站点,见上表,默认为 beijing"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"业务咨询","maintainers":["nczitzk"],"location":"safe/business.ts"}} /> -<Route author="la3rence" example="/gov/moj/lfyjzj" path="/gov/moj/lfyjzj" radar="1" /> +### 意见征集 {#zhong-guo-ren-min-yin-hang-yi-jian-zheng-ji} -## 中华人民共和国退役军人事务部 {#zhong-hua-ren-min-gong-he-guo-tui-yi-jun-ren-shi-wu-bu} +<Route namespace="gov" data={{"path":"/miit/yjzj","categories":["government"],"example":"/gov/miit/yjzj","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["miit.gov.cn/gzcy/yjzj/index.html"]},"name":"意见征集","maintainers":["Fatpandac"],"url":"miit.gov.cn/gzcy/yjzj/index.html","location":"miit/yjzj.ts"}} /> -### 中华人民共和国退役军人事务部 {#zhong-hua-ren-min-gong-he-guo-tui-yi-jun-ren-shi-wu-bu-zhong-hua-ren-min-gong-he-guo-tui-yi-jun-ren-shi-wu-bu} +### 长沙市人民政府 {#zhong-guo-ren-min-yin-hang-chang-sha-shi-ren-min-zheng-fu} -<Route author="SunShinenny" example="/gov/veterans/bnxx" path="/gov/veterans/:type" paramsDesc={['分类名']}> - | 部内信息 | 政策解读 | 首页信息 | - | :------: | :------: | :------: | - | bnxx | zcjd | index | -</Route> +<Route namespace="gov" data={{"path":"/hunan/changsha/major-email","categories":["government"],"example":"/gov/hunan/changsha/major-email","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wlwz.changsha.gov.cn/webapp/cs2020/email/*"]},"name":"长沙市人民政府","maintainers":["shansing"],"url":"wlwz.changsha.gov.cn/webapp/cs2020/email/*","description":"#### 市长信箱 {#hu-nan-sheng-ren-min-zheng-fu-chang-sha-shi-ren-min-zheng-fu-shi-zhang-xin-xiang}\n\n\n可能仅限中国大陆服务器访问,以实际情况为准。","location":"hunan/changsha/major-email.ts"}} /> -## 中华人民共和国外交部 {#zhong-hua-ren-min-gong-he-guo-wai-jiao-bu} +#### 市长信箱 {#zhong-guo-ren-min-yin-hang-chang-sha-shi-ren-min-zheng-fu-shi-zhang-xin-xiang} -### 外交动态 {#zhong-hua-ren-min-gong-he-guo-wai-jiao-bu-wai-jiao-dong-tai} +可能仅限中国大陆服务器访问,以实际情况为准。 -<Route author="nczitzk" example="/gov/mfa/wjdt/fyrbt" path="/gov/mfa/wjdt/:category?" paramsDesc={['分类,见下表,默认为领导人活动']}> - | 分类 | category | - | ---------- | -------- | - | 领导人活动 | gjldrhd | - | 外事日程 | wsrc | - | 部领导活动 | wjbxw | - | 业务动态 | sjxw | - | 发言人表态 | fyrbt | - | 吹风会 | cfhsl | - | 大使任免 | dsrm | - | 驻外报道 | zwbd | - | 政策解读 | zcjd | -</Route> +### 政策解读 {#zhong-guo-ren-min-yin-hang-zheng-ce-jie-du} -## 中华人民共和国应急管理部 {#zhong-hua-ren-min-gong-he-guo-ying-ji-guan-li-bu} +<Route namespace="gov" data={{"path":"/miit/zcjd","categories":["government"],"example":"/gov/miit/zcjd","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"政策解读","maintainers":["Yoge-Code"],"location":"miit/zcjd.ts"}} /> -### 事故及灾害查处 {#zhong-hua-ren-min-gong-he-guo-ying-ji-guan-li-bu-shi-gu-ji-zai-hai-cha-chu} +### 政策文件 {#zhong-guo-ren-min-yin-hang-zheng-ce-wen-jian} -<Route author="nczitzk" example="/gov/mem/gk/sgcc/tbzdsgdcbg" path="/gov/mem/gk/sgcc/:category?" paramsDesc={['分类,见下表,默认为挂牌督办']} radar="1"> - | 挂牌督办 | 调查报告 | - | -------- | ---------- | - | sggpdbqk | tbzdsgdcbg | -</Route> +<Route namespace="gov" data={{"path":"/miit/zcwj","categories":["government"],"example":"/gov/miit/zcwj","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"政策文件","maintainers":["Yoge-Code"],"location":"miit/zcwj.ts"}} /> -## 中华人民共和国住房和城乡建设部 {#zhong-hua-ren-min-gong-he-guo-zhu-fang-he-cheng-xiang-jian-she-bu} +### 政府新闻 {#zhong-guo-ren-min-yin-hang-zheng-fu-xin-wen} -### 政策发布 {#zhong-hua-ren-min-gong-he-guo-zhu-fang-he-cheng-xiang-jian-she-bu-zheng-ce-fa-bu} +<Route namespace="gov" data={{"path":"/news/:uid","categories":["government"],"example":"/gov/news/bm","parameters":{"uid":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"政府新闻","maintainers":["EsuRt"],"description":"| 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 政策文件 |\n | :------: | :------: | :------: | :--------: | :------: |\n | bm | gd | yw | gwy | zhengce |","location":"news/index.ts"}} /> -<Route author="nczitzk" example="/gov/mohurd/policy" path="/gov/mohurd/policy" notOperational="1" /> +| 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 政策文件 | +| :------: | :------: | :------: | :--------: | :------: | +| bm | gd | yw | gwy | zhengce | -## 中華民國國防部 {#zhong-hua-min-guo-guo-fang-bu} +### 政府公开信息 {#zhong-guo-ren-min-yin-hang-zheng-fu-gong-kai-xin-xi} -### 即時軍事動態 {#zhong-hua-min-guo-guo-fang-bu-ji-shi-jun-shi-dong-tai} +<Route namespace="gov" data={{"path":"/sichuan/deyang/govpublicinfo/:countyName/:infoType?","categories":["government"],"example":"/gov/sichuan/deyang/govpublicinfo/绵竹市","parameters":{"countyName":"区县名(**其他区县整改中,暂时只支持`绵竹市`**)。德阳市、绵竹市、广汉市、什邡市、中江县、罗江区、旌阳区、高新区","infoType":"信息类型。默认值:fdzdnr-“法定主动内容”"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"政府公开信息","maintainers":["zytomorrow"],"description":"| 法定主动内容 | 公示公告 |\n | :----------: | :------: |\n | fdzdnr | gsgg |","location":"sichuan/deyang/govpublicinfo.ts"}} /> -<Route author="nczitzk" example="/gov/taiwan/mnd" path="/gov/taiwan/mnd" /> +| 法定主动内容 | 公示公告 | +| :----------: | :------: | +| fdzdnr | gsgg | -## 中央纪委国家监委 {#zhong-yang-ji-wei-guo-jia-jian-wei} +### 政府信息公开文件 {#zhong-guo-ren-min-yin-hang-zheng-fu-xin-xi-gong-kai-wen-jian} -### 要闻 {#zhong-yang-ji-wei-guo-jia-jian-wei-yao-wen} +<Route namespace="gov" data={{"path":"/suzhou/doc","categories":["government"],"example":"/gov/suzhou/doc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.suzhou.gov.cn/szxxgk/front/xxgk_right.jsp","www.suzhou.gov.cn/"]},"name":"政府信息公开文件","maintainers":["EsuRt"],"url":"www.suzhou.gov.cn/szxxgk/front/xxgk_right.jsp","location":"suzhou/doc.ts"}} /> -<Route author="bigfei" example="/gov/ccdi/yaowenn" path="/gov/ccdi/:path+" paramsDesc={['路径,默认为 要闻']}> - :::tip - 路径处填写对应页面 URL 中 `http://www.ccdi.gov.cn/` 后的字段。下面是一个例子。 +### 政府新闻 {#zhong-guo-ren-min-yin-hang-zheng-fu-xin-wen} - 若订阅 [审查调查 > 中管干部 > 执纪审查](https://www.ccdi.gov.cn/scdcn/zggb/zjsc/) 则将对应页面 URL `https://www.ccdi.gov.cn/scdcn/zggb/zjsc/` 中 `http://www.ccdi.gov.cn/` 后的字段 `scdcn/zggb/zjsc` 作为路径填入。此时路由为 [`/gov/ccdi/scdcn/zggb/zjsc`](https://rsshub.app/gov/ccdi/scdcn/zggb/zjsc) - ::: -</Route> +<Route namespace="gov" data={{"path":"/suzhou/news/:uid","categories":["government"],"example":"/gov/suzhou/news/news","parameters":{"uid":"栏目名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.suzhou.gov.cn/szsrmzf/:uid/nav_list.shtml"]},"name":"政府新闻","maintainers":["EsuRt","luyuhuang"],"description":"| 新闻栏目名 | :uid |\n | :--------: | :--------------: |\n | 苏州要闻 | news 或 szyw |\n | 区县快讯 | district 或 qxkx |\n | 部门动态 | bmdt |\n | 新闻视频 | xwsp |\n | 政务公告 | zwgg |\n | 便民公告 | mszx |\n | 民生资讯 | bmzx |\n\n | 热点专题栏目名 | :uid |\n | :------------: | :----: |\n | 热点专题 | rdzt |\n | 市本级专题 | sbjzt |\n | 最新热点专题 | zxrdzt |\n | 往期专题 | wqzt |\n | 区县专题 | qxzt |\n\n :::tip\n **热点专题**栏目包含**市本级专题**和**区县专题**\n\n **市本级专题**栏目包含**最新热点专题**和**往期专题**\n\n 如需订阅完整的热点专题,仅需订阅 **热点专题**`rdzt` 一项即可。\n :::","location":"suzhou/news.ts"}} /> -## 中央网信办 {#zhong-yang-wang-xin-ban} +| 新闻栏目名 | :uid | +| :--------: | :--------------: | +| 苏州要闻 | news 或 szyw | +| 区县快讯 | district 或 qxkx | +| 部门动态 | bmdt | +| 新闻视频 | xwsp | +| 政务公告 | zwgg | +| 便民公告 | mszx | +| 民生资讯 | bmzx | -### 分类 {#zhong-yang-wang-xin-ban-fen-lei} +| 热点专题栏目名 | :uid | +| :------------: | :----: | +| 热点专题 | rdzt | +| 市本级专题 | sbjzt | +| 最新热点专题 | zxrdzt | +| 往期专题 | wqzt | +| 区县专题 | qxzt | -<Route author="drgnchan" example="/gov/cac/xxh" path="/gov/cac/:path+" paramsDesc={['路径,比如xxh表示信息化']} radar="1" notOperational="1"> - :::tip - 路径填写对应页面 URL 中间部分。例如: +:::tip +**热点专题**栏目包含**市本级专题**和**区县专题** - 首页 > 权威发布 > 办公室发布: `http://www.cac.gov.cn/qwfb/bgsfb/A090302index_1.htm` - 此时,path 参数为:/qwfb/bgsfb - ::: -</Route> +**市本级专题**栏目包含**最新热点专题**和**往期专题** + +如需订阅完整的热点专题,仅需订阅 **热点专题**`rdzt` 一项即可。 +::: + +### 专题 {#zhong-guo-ren-min-yin-hang-zhuan-ti} + +<Route namespace="gov" data={{"path":"/mof/bond/:category?","categories":["government"],"example":"/gov/mof/bond","parameters":{"category":"专题,见下表,默认为国债管理工作动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专题","maintainers":["la3rence"],"description":"#### 政府债券管理\n\n | 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 |\n | ---------------- | ---------------------------- | ------------ | --------------------- |\n | gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan |","location":"mof/bond.ts"}} /> + +#### 政府债券管理 {#zhong-guo-ren-min-yin-hang-zhuan-ti-zheng-fu-zhai-quan-guan-li} + +| 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 | +| ---------------- | ---------------------------- | ------------ | --------------------- | +| gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan | + +### 最新文件 {#zhong-guo-ren-min-yin-hang-zui-xin-wen-jian} + +<Route namespace="gov" data={{"path":"/chinatax/latest","categories":["government"],"example":"/gov/chinatax/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.chinatax.gov.cn/*"]},"name":"最新文件","maintainers":["nczitzk","fuzy112"],"url":"www.chinatax.gov.cn/*","location":"chinatax/latest.ts"}} /> + +### 最新消息 {#zhong-guo-ren-min-yin-hang-zui-xin-xiao-xi} + +<Route namespace="gov" data={{"path":"/moj/aac/news/:type?","categories":["government"],"example":"/gov/moj/aac/news","parameters":{"type":"資料大類,留空為全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新消息","maintainers":["TonyRL"],"description":"| 全部 | 其他 | 採購公告 | 新聞稿 | 肅貪 | 預防 | 綜合 | 防疫專區 |\n | ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- |\n | | 02 | 01 | 06 | 05 | 04 | 03 | 99 |","location":"moj/aac/news.ts"}} /> + +| 全部 | 其他 | 採購公告 | 新聞稿 | 肅貪 | 預防 | 綜合 | 防疫專區 | +| ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- | +| | 02 | 01 | 06 | 05 | 04 | 03 | 99 | + +### 最新政策 {#zhong-guo-ren-min-yin-hang-zui-xin-zheng-ce} + +<Route namespace="gov" data={{"path":["/zhengce/zuixin","/zhengce/:category{.+}?"],"categories":["government"],"example":"/gov/zhengce/zuixin","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.gov.cn/zhengce/zuixin.htm","www.gov.cn/"]},"name":"最新政策","maintainers":["SettingDust","nczitzk"],"url":"www.gov.cn/zhengce/zuixin.htm","location":"zhengce/index.ts"}} /> + +### 最新政策 {#zhong-guo-ren-min-yin-hang-zui-xin-zheng-ce} + +<Route namespace="gov" data={{"path":["/zhengce/zuixin","/zhengce/:category{.+}?"],"categories":["government"],"example":"/gov/zhengce/zuixin","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.gov.cn/zhengce/zuixin.htm","www.gov.cn/"]},"name":"最新政策","maintainers":["SettingDust","nczitzk"],"url":"www.gov.cn/zhengce/zuixin.htm","location":"zhengce/index.ts"}} /> + +### 最新文件 {#zhong-guo-ren-min-yin-hang-zui-xin-wen-jian} + +<Route namespace="gov" data={{"path":"/zhengce/wenjian/:pcodeJiguan?","categories":["government"],"example":"/gov/zhengce/wenjian","parameters":{"pcodeJiguan":"文种分类。国令、国发、国函、国发明电、国办发、国办函、国办发明电、其他"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.gov.cn/"],"target":"/zhengce/wenjian"},"name":"最新文件","maintainers":["ciaranchen"],"url":"www.gov.cn/","location":"zhengce/wenjian.ts"}} /> + +## 中国无线电协会业余无线电分会 {#zhong-guo-wu-xian-dian-xie-hui-ye-yu-wu-xian-dian-fen-hui} + +### 最新资讯 {#zhong-guo-wu-xian-dian-xie-hui-ye-yu-wu-xian-dian-fen-hui-zui-xin-zi-xun} + +<Route namespace="crac" data={{"path":"/:type?","categories":["government"],"example":"/crac/2","parameters":{"type":"类型,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新资讯","maintainers":["Misaka13514"],"description":"| 新闻动态 | 通知公告 | 政策法规 | 常见问题 | 资料下载 | English | 业余中继台 | 科普专栏 |\n | -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- |\n | 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |","location":"index.ts"}} /> + +| 新闻动态 | 通知公告 | 政策法规 | 常见问题 | 资料下载 | English | 业余中继台 | 科普专栏 | +| -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- | +| 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | diff --git a/website/docs/routes/journal.mdx b/website/docs/routes/journal.mdx index 72d4d1089..af4312315 100644 --- a/website/docs/routes/journal.mdx +++ b/website/docs/routes/journal.mdx @@ -1,253 +1,134 @@ -# 🔬 Scientific Journal - -## Academy of Management {#academy-of-management} - -### Journal {#academy-of-management-journal} - -<Route author="nczitzk" example="/aom/journal/amr" path="/aom/journal/:id" paramsDesc={['journal id, see below']} notOperational="1"> - | Id | Title | - | --------- | ------------------------------------------ | - | annals | Academy of Management Annals | - | amd | Academy of Management Discoveries | - | amgblproc | Academy of Management Global Proceedings | - | amj | Academy of Management Journal | - | amle | Academy of Management Learning & Education | - | amp | Academy of Management Perspectives | - | amproc | Academy of Management Proceedings | - | amr | Academy of Management Review | -</Route> +# journal ## ACM Special Interest Group on Security Audit and Control {#acm-special-interest-group-on-security-audit-and-control} ### The ACM Conference on Computer and Communications Security {#acm-special-interest-group-on-security-audit-and-control-the-acm-conference-on-computer-and-communications-security} -<Route author="ZeddYu" example="/sigsac/ccs" path="/sigsac/ccs" notOperational="1"> - Return results from 2020 -</Route> +<Route namespace="sigsac" data={{"path":"/ccs","categories":["journal"],"example":"/sigsac/ccs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sigsac.org/ccs.html","sigsac.org/"]},"name":"The ACM Conference on Computer and Communications Security","maintainers":[],"url":"sigsac.org/ccs.html","description":"Return results from 2020","location":"ccs.ts"}} /> + +Return results from 2020 ## American Economic Association {#american-economic-association} ### Journal {#american-economic-association-journal} -<Route author="nczitzk" example="/aeaweb/aer" path="/aeaweb/:id" paramsDesc={['Journal id, can be found in URL']} supportScihub="1"> - The URL of the journal [American Economic Review](https://www.aeaweb.org/journals/aer) is `https://www.aeaweb.org/journals/aer`, where `aer` is the id of the journal, so the route for this journal is `/aeaweb/aer`. +<Route namespace="aeaweb" data={{"path":"/:id","categories":["journal"],"example":"/aeaweb/aer","parameters":{"id":"Journal id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["aeaweb.org/journals/:id","aeaweb.org/"]},"name":"Journal","maintainers":["nczitzk"],"description":"The URL of the journal [American Economic Review](https://www.aeaweb.org/journals/aer) is `https://www.aeaweb.org/journals/aer`, where `aer` is the id of the journal, so the route for this journal is `/aeaweb/aer`.\n\n :::tip\n More jounals can be found in [AEA Journals](https://www.aeaweb.org/journals).\n :::","location":"index.ts"}} /> - :::tip - More jounals can be found in [AEA Journals](https://www.aeaweb.org/journals). - ::: -</Route> +The URL of the journal [American Economic Review](https://www.aeaweb.org/journals/aer) is `https://www.aeaweb.org/journals/aer`, where `aer` is the id of the journal, so the route for this journal is `/aeaweb/aer`. + +:::tip +More jounals can be found in [AEA Journals](https://www.aeaweb.org/journals). +::: ## American Institute of Physics {#american-institute-of-physics} ### Journal {#american-institute-of-physics-journal} -<Route author="Derekmini auto-bot-ty" example="/aip/aapt/ajp" path="/aip/:pub/:jrn" paramsDesc={['Publisher id','Journal id']} radar="1" supportScihub="1"> - Refer to the URL format `pubs.aip.org/:pub/:jrn` +<Route namespace="aip" data={{"path":"/:pub/:jrn","categories":["journal"],"example":"/aip/aapt/ajp","parameters":{"pub":"Publisher id","jrn":"Journal id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["pubs.aip.org/:pub/:jrn"]},"name":"Journal","maintainers":["Derekmini","auto-bot-ty"],"description":"Refer to the URL format `pubs.aip.org/:pub/:jrn`\n\n :::tip\n More jounals can be found in [AIP Publications](https://publishing.aip.org/publications/find-the-right-journal).\n :::","location":"journal.ts"}} /> - :::tip - More jounals can be found in [AIP Publications](https://publishing.aip.org/publications/find-the-right-journal). - ::: -</Route> +Refer to the URL format `pubs.aip.org/:pub/:jrn` + +:::tip +More jounals can be found in [AIP Publications](https://publishing.aip.org/publications/find-the-right-journal). +::: ## Annual Reviews {#annual-reviews} ### Journal {#annual-reviews-journal} -<Route author="nczitzk" example="/annualreviews/anchem" path="/annualreviews/:id" paramsDesc={['Journal id, can be found in URL']} supportScihub="1"> - The URL of the journal [Annual Review of Analytical Chemistry](https://www.annualreviews.org/journal/anchem) is `https://www.annualreviews.org/journal/anchem`, where `anchem` is the id of the journal, so the route for this journal is `/annualreviews/anchem`. +<Route namespace="annualreviews" data={{"path":"/:id","categories":["journal"],"example":"/annualreviews/anchem","parameters":{"id":"Journal id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["annualreviews.org/journal/:id","annualreviews.org/"]},"name":"Journal","maintainers":["nczitzk"],"description":"The URL of the journal [Annual Review of Analytical Chemistry](https://www.annualreviews.org/journal/anchem) is `https://www.annualreviews.org/journal/anchem`, where `anchem` is the id of the journal, so the route for this journal is `/annualreviews/anchem`.\n\n :::tip\n More jounals can be found in [Browse Journals](https://www.annualreviews.org/action/showPublications).\n :::","location":"index.ts"}} /> - :::tip - More jounals can be found in [Browse Journals](https://www.annualreviews.org/action/showPublications). - ::: -</Route> +The URL of the journal [Annual Review of Analytical Chemistry](https://www.annualreviews.org/journal/anchem) is `https://www.annualreviews.org/journal/anchem`, where `anchem` is the id of the journal, so the route for this journal is `/annualreviews/anchem`. -## arXiv {#arxiv} - -### Search Keyword {#arxiv-search-keyword} - -<Route author="nczitzk" example="/arxiv/search_query=all:electron&start=0&max_results=10" path="/arxiv/:query" paramsDesc={['query statement']} anticrawler="1"> - See [arXiv API User Manual](https://arxiv.org/help/api/user-manual) to find out all query statements. - - Fill in parameter `query` with content after `http://export.arxiv.org/api/query?`. -</Route> +:::tip +More jounals can be found in [Browse Journals](https://www.annualreviews.org/action/showPublications). +::: ## BioOne {#bioone} ### Featured articles {#bioone-featured-articles} -<Route author="nczitzk" example="/bioone/featured" path="/bioone/featured" /> +<Route namespace="bioone" data={{"path":"/featured","categories":["journal"],"example":"/bioone/featured","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bioone.org/"]},"name":"Featured articles","maintainers":["nczitzk"],"url":"bioone.org/","location":"featured.ts"}} /> ### Journals {#bioone-journals} -<Route author="nczitzk" example="/bioone/journals/acta-chiropterologica" path="/bioone/journals/:journal?" paramsDesc={['Journals, can be found in URL']} /> +<Route namespace="bioone" data={{"path":"/journals/:journal?","categories":["journal"],"example":"/bioone/journals/acta-chiropterologica","parameters":{"journal":"Journals, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bioone.org/journals/:journal","bioone.org/"],"target":"/journals/:journal"},"name":"Journals","maintainers":["nczitzk"],"location":"journal.ts"}} /> ## caa.reviews {#caa-reviews} ### Book Reviews {#caa-reviews-book-reviews} -<Route author="Fatpandac" example="/caareviews/book" path="/caareviews/book" /> - -### Exhibition Reviews {#caa-reviews-exhibition-reviews} - -<Route author="Fatpandac" example="/caareviews/exhibition" path="/caareviews/exhibition" /> +<Route namespace="caareviews" data={{"path":"/book","categories":["journal"],"example":"/caareviews/book","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caareviews.org/reviews/book"]},"name":"Book Reviews","maintainers":["Fatpandac"],"url":"caareviews.org/reviews/book","location":"book.ts"}} /> ### Essays {#caa-reviews-essays} -<Route author="Fatpandac" example="/caareviews/essay" path="/caareviews/essay" /> +<Route namespace="caareviews" data={{"path":"/essay","categories":["journal"],"example":"/caareviews/essay","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caareviews.org/reviews/essay"]},"name":"Essays","maintainers":["Fatpandac"],"url":"caareviews.org/reviews/essay","location":"essay.ts"}} /> -## Cell {#cell} +### Exhibition Reviews {#caa-reviews-exhibition-reviews} -### Current Issue {#cell-current-issue} +<Route namespace="caareviews" data={{"path":"/exhibition","categories":["journal"],"example":"/caareviews/exhibition","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caareviews.org/reviews/exhibition"]},"name":"Exhibition Reviews","maintainers":["Fatpandac"],"url":"caareviews.org/reviews/exhibition","location":"exhibition.ts"}} /> -<Route author="y9c" example="/cell/cell/current" path="/cell/cell/:category" supportScihub="1"> - | `:category` | Query Type | Route | - | :---------: | :---------------------: | ---------------------------------------------------------- | - | current | Current Issue (default) | [/cell/cell/current](https://rsshub.app/cell/cell/current) | - | inpress | Articles in press | [/cell/cell/inpress](https://rsshub.app/cell/cell/inpress) | -</Route> +## Google {#google} -### Cover Story {#cell-cover-story} +### Author Citations {#google-author-citations} -<Route author="y9c" example="/cell/cover" path="/cell/cover" notOperational="1"> - Subscribe to the cover images of the Cell journals, and get the latest publication updates in time. +<Route namespace="google" data={{"path":"/citations/:id","categories":["journal"],"example":"/google/citations/mlmE4JMAAAAJ","parameters":{"id":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Author Citations","maintainers":["KellyHwong","const7"],"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`.\n\n Query parameters are also supported here, for example `https://scholar.google.com/citations?user=mlmE4JMAAAAJ&sortby=pubdate` to `mlmE4JMAAAAJ&sortby=pubdate`. Please make sure that the user id (`mlmE4JMAAAAJ` in this case) should be the first parameter in the query string.","location":"citations.ts"}} /> - Including 'cell', 'cancer-cell', 'cell-chemical-biology', 'cell-host-microbe', 'cell-metabolism', 'cell-reports', 'cell-reports-physical-science', 'cell-stem-cell', 'cell-systems', 'chem', 'current-biology', 'developmental-cell', 'immunity', 'joule', 'matter', 'molecular-cell', 'neuron', 'one-earth' and 'structure'. -</Route> +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`. -## Cool Papers {#cool-papers} +Query parameters are also supported here, for example `https://scholar.google.com/citations?user=mlmE4JMAAAAJ&sortby=pubdate` to `mlmE4JMAAAAJ&sortby=pubdate`. Please make sure that the user id (`mlmE4JMAAAAJ` in this case) should be the first parameter in the query string. -### Category {#cool-papers-category} +### Keywords Monitoring {#google-keywords-monitoring} -<Route author="nczitzk" example="/papers" path="/papers/:category?" paramsDesc={['Category, see below, `arxiv/cs.CL` by default']} radar="1" supportBT="1" supportScihub="1"> - | Category | id | - | ----------------------------------------------------- | ------------- | - | Arxiv Computation and Language (cs.CL) | arxiv/cs.CL | - | Arxiv Machine Learning (cs.LG) | arxiv/cs.LG | - | Arxiv Artificial Intelligence (cs.AI) | arxiv/cs.AI | - | Arxiv Information Retrieval (cs.IR) | arxiv/cs.IR | - | Arxiv Computer Vision and Pattern Recognition (cs.CV) | arxiv/cs.CV | - | Arxiv Machine Learning (stat.ML) | arxiv/stat.ML | -</Route> +<Route namespace="google" data={{"path":"/scholar/:query","categories":["journal"],"example":"/google/scholar/data+visualization","parameters":{"query":"query statement which supports「Basic」and「Advanced」modes"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keywords Monitoring","maintainers":["HenryQW"],"description":":::warning\n Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability.\n :::\n\n 1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).\n\n 2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).","location":"scholar.ts"}} /> -## Deloitte {#deloitte} +:::warning +Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability. +::: -### Articles {#deloitte-articles} +1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization). -<Route author="laampui" example="/deloitte/industries/consumer" path="/deloitte/industries/:category?" paramsDesc={['默认为 energy-resources-industrials']}> - | 消费行业 | 能源、资源及工业行业 | 金融服务行业 | 政府及公共服务 | 生命科学与医疗行业 | 科技、传媒及电信行业 | - | -------- | ---------------------------- | ------------------ | -------------------------- | ------------------------ | ----------------------------------- | - | consumer | energy-resources-industrials | financial-services | government-public-services | life-sciences-healthcare | technology-media-telecommunications | -</Route> - -## ELSEVIER {#elsevier} - -### Journal {#elsevier-journal} - -<Route author="Derekmini sunwolf-swb" example="/elsevier/signal-processing" path="/elsevier/:journal" paramsDesc={['Journal Name, the part of the URL after `/journal/`']} radar="1" /> - -### Special Issue {#elsevier-special-issue} - -<Route author="Derekmini sunwolf-swb" example="/elsevier/signal-processing/192" path="/elsevier/:journal/:issue" paramsDesc={['Journal Name, the part of the URL after `/journal/`','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="1" /> - -## Google Scholar {#google-scholar} - -### Keywords Monitoring {#google-scholar-keywords-monitoring} - -<Route author="HenryQW" path="/google/scholar/:query" example="/google/scholar/data+visualization" paramsDesc={['query statement which supports「Basic」and「Advanced」modes']} anticrawler="1"> - :::warning - Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability. - ::: - - 1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization). - - 2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en\&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5). -</Route> - -### Author Citations {#google-scholar-author-citations} - -<Route author="KellyHwong const7" example="/google/citations/mlmE4JMAAAAJ" path="/google/citations/:id" anticrawler="1"> - 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`. - - Query parameters are also supported here, for example `https://scholar.google.com/citations?user=mlmE4JMAAAAJ&sortby=pubdate` to `mlmE4JMAAAAJ&sortby=pubdate`. Please make sure that the user id (`mlmE4JMAAAAJ` in this case) should be the first parameter in the query string. -</Route> +2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en\&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as\_q=data+visualization\&as\_epq=\&as\_oq=\&as\_eq=\&as\_occt=any\&as\_sauthors=\&as\_publication=\&as\_ylo=2018\&as\_yhi=\&hl=en\&as\_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization\&as_epq=\&as_oq=\&as_eq=\&as_occt=any\&as_sauthors=\&as_publication=\&as_ylo=2018\&as_yhi=\&hl=en\&as_sdt=0%2C5). ## IEEE Computer Society {#ieee-computer-society} ### IEEE Symposium on Security and Privacy {#ieee-computer-society-ieee-symposium-on-security-and-privacy} -<Route author="ZeddYu" example="/ieee-security/security-privacy" path="/ieee-security/security-privacy"> - Return results from 2020 -</Route> +<Route namespace="ieee-security" data={{"path":"/security-privacy","categories":["journal"],"example":"/ieee-security/security-privacy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ieee-security.org/TC/SP-Index.html","ieee-security.org/"]},"name":"IEEE Symposium on Security and Privacy","maintainers":["ZeddYu"],"url":"ieee-security.org/TC/SP-Index.html","description":"Return results from 2020","location":"sp.ts"}} /> + +Return results from 2020 ## IEEE Xplore {#ieee-xplore} -### Author {#ieee-xplore-author} - -<Route author="queensferryme" example="/ieee/author/37283006000/newest/10" path="/ieee/author/:aid/:sortType/:count?" paramsDesc={['作者 ID,可以在 URL 中找到,例如 [https://ieeexplore.ieee.org/author/37283006000](https://ieeexplore.ieee.org/author/37283006000)', '排序方式,详细见下', '数量限制,默认为 10 篇']}> - | 排序方式 | 最新 | 最旧 | 最多论文引用 | 最多专利引用 | 最流行 | 标题升序 | 标题降序 | - | ----------- | -------- | -------- | ----------------- | ------------------ | -------------- | --------------- | ---------------- | - | `:sortType` | `newest` | `oldest` | `paper-citations` | `patent-citations` | `most-popular` | `pub-title-asc` | `pub-title-desc` | -</Route> - -### Journal {#ieee-xplore-journal} - -<Route author="Derekmini auto-bot-ty" example="/ieee/journal/70" path="/ieee/journal/:journal/:sortType?" paramsDesc={['Journal code, the number of the `punumber` in the URL','Sort Type, default: `vol-only-seq`, the part of the URL after `sortType`']} radar="1" /> - -### Journal (Papers within the recent 2 months) {#ieee-xplore-journal-papers-within-the-recent-2-months} - -<Route author="Derekmini auto-bot-ty" example="/ieee/journal/78/recent" path="/ieee/journal/:journal/recent/:sortType?" paramsDesc={['Journal code, the number of the `punumber` in the URL','Sort Type, default: `vol-only-seq`, the part of the URL after `sortType`']} radar="1" /> - ### Early Access Journal {#ieee-xplore-early-access-journal} -<Route author="5upernova-heng" example="/ieee/journal/5306045/earlyaccess" path="/ieee/journal/:journal/earlyaccess/:sortType?" paramsDesc={['Issue code, the number of the `isnumber` in the URL','Sort Type, default: `vol-only-seq`, the part of the URL after `sortType`']} radar="1" notOperational="1" /> +<Route namespace="ieee" data={{"path":"/journal/:journal/earlyaccess/:sortType?","categories":["journal"],"example":"/ieee/journal/5306045/earlyaccess","parameters":{"journal":"Issue code, the number of the `isnumber` in the URL","sortType":"Sort Type, default: `vol-only-seq`, the part of the URL after `sortType`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Early Access Journal","maintainers":["5upernova-heng"],"location":"earlyaccess.ts"}} /> ## INFORMS {#informs} ### Category {#informs-category} -<Route author="Fatpandac" example="/informs/mnsc" path="/informs/:category?" paramsDesc={['Category, can be found in the url of the page, `orsc` by default']} notOperational="1" /> +<Route namespace="informs" data={{"path":"/:category?","categories":["journal"],"example":"/informs/mnsc","parameters":{"category":"Category, can be found in the url of the page, `orsc` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["Fatpandac"],"location":"index.ts"}} /> ## MDPI {#mdpi} ### Journal {#mdpi-journal} -<Route author="Derekmini" example="/mdpi/analytica" path="/mdpi/:journal" paramsDesc={['Journal Name, get it from the journal homepage']} radar="1" /> - -## MIT Technology Review {#mit-technology-review} - -### Index {#mit-technology-review-index} - -<Route author="zphw" example="/technologyreview" path="/technologyreview" notOperational="1" /> - -### Topics {#mit-technology-review-topics} - -<Route author="laampui" example="/technologyreview/humans-and-technology" path="/technologyreview/:category_name" paramsDesc={['see below']} /> - -| `:category_name` | Route | -| ----------------------- | ----------------------------------------- | -| humans-and-technology | /technologyreview/humans-and-technology | -| election-2020 | /technologyreview/election-2020 | -| artificial-intelligence | /technologyreview/artificial-intelligence | -| biotechnology | /technologyreview/biotechnology | -| blockchain | /technologyreview/blockchain | -| climate-change | /technologyreview/climate-change | -| computing | /technologyreview/computing | -| tech-policy | /technologyreview/tech-policy | -| silicon-valley | /technologyreview/silicon-valley | -| smart-cities | /technologyreview/smart-cities | -| space | /technologyreview/space | +<Route namespace="mdpi" data={{"path":"/:journal","categories":["journal"],"example":"/mdpi/analytica","parameters":{"journal":"Journal Name, get it from the journal homepage"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mdpi.com/journal/:journal"]},"name":"Journal","maintainers":["Derekmini"],"location":"journal.ts"}} /> ## National Bureau of Economic Research {#national-bureau-of-economic-research} ### All Papers {#national-bureau-of-economic-research-all-papers} -<Route author="5upernova-heng" example="/nber/papers" path="/nber/papers" radar="1" supportScihub="1" /> +<Route namespace="nber" data={{"path":["/papers","/news"],"categories":["journal"],"example":"/nber/papers","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["nber.org/papers"]},"name":"All Papers","maintainers":[],"url":"nber.org/papers","description":"Papers that are published in this week.","location":"index.ts"}} /> -### New Papers {#national-bureau-of-economic-research-new-papers} +Papers that are published in this week. -<Route author="5upernova-heng" example="/nber/news" path="/nber/news" radar="1" supportScihub="1"> - Papers that are published in this week. -</Route> +### All Papers {#national-bureau-of-economic-research-all-papers} + +<Route namespace="nber" data={{"path":["/papers","/news"],"categories":["journal"],"example":"/nber/papers","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["nber.org/papers"]},"name":"All Papers","maintainers":[],"url":"nber.org/papers","description":"Papers that are published in this week.","location":"index.ts"}} /> + +Papers that are published in this week. ## Nature Journal {#nature-journal} @@ -255,265 +136,209 @@ You can get all short name of a journal from [https://www.nature.com/siteindex](https://www.nature.com/siteindex) or [Journal List](#nature-journal-journal-list). ::: -### Latest Research {#nature-journal-latest-research} - -<Route author="y9c TonyRL" example="/nature/research/ng" path="/nature/research/:journal?" paramsDesc={['short name for a journal, `nature` by default']} supportScihub="1" radar="1"> - | `:journal` | Full Name of the Journal | Route | - | :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | - | nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) | - | nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) | - | neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) | - | ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) | - | ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) | - | nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) | - | nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) | - | nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) | - | natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) | - - - Using router (`/nature/research/` + "short name for a journal") to query latest research paper for a certain journal of Nature Publishing Group. - If the `:journal` parameter is blank, then latest research of Nature will return. - - The journals from NPG are run by different group of people, and the website of may not be consitent for all the journals - - Only abstract is rendered in some researches -</Route> - -### News & Comment {#nature-journal-news-comment} - -<Route author="y9c TonyRL" example="/nature/news-and-comment/ng" path="/nature/news-and-comment/:journal" paramsDesc={['short name for a journal']} supportScihub="1" radar="1"> - | `: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-https://rsshub.app/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 -</Route> - ### Cover Story {#nature-journal-cover-story} -<Route author="y9c" example="/nature/cover" path="/nature/cover"> - Subscribe to the cover images of the Nature journals, and get the latest publication updates in time. -</Route> +<Route namespace="nature" data={{"path":"/cover","categories":["journal"],"example":"/nature/cover","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nature.com/"]},"name":"Cover Story","maintainers":["y9c"],"url":"nature.com/","description":"Subscribe to the cover images of the Nature journals, and get the latest publication updates in time.","location":"cover.ts"}} /> -### Nature News {#nature-journal-nature-news} - -<Route author="y9c TonyRL" example="/nature/news" path="/nature/news" supportScihub="1" radar="1" /> - -### Research Highlight {#nature-journal-research-highlight} - -<Route author="y9c TonyRL" example="/nature/highlight" path="/nature/highlight/:journal?" paramsDesc={['short name for a journal, `nature` by default']} supportScihub="1" radar="1"> - :::warning - Only some journals are supported. - ::: -</Route> +Subscribe to the cover images of the Nature journals, and get the latest publication updates in time. ### Journal List {#nature-journal-journal-list} -<Route author="TonyRL" example="/nature/siteindex" path="/nature/siteindex" /> +<Route namespace="nature" data={{"path":"/siteindex","categories":["journal"],"example":"/nature/siteindex","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Journal List","maintainers":["TonyRL"],"location":"siteindex.ts"}} /> + +### Latest Research {#nature-journal-latest-research} + +<Route namespace="nature" data={{"path":"/research/:journal?","categories":["journal"],"example":"/nature/research/ng","parameters":{"journal":"short name for a journal, `nature` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["nature.com/:journal/research-articles","nature.com/:journal","nature.com/"],"target":"/research/:journal"},"name":"Latest Research","maintainers":["y9c","TonyRL"],"description":"| `:journal` | Full Name of the Journal | Route |\n | :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- |\n | nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) |\n | nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) |\n | neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) |\n | ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) |\n | ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) |\n | nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) |\n | nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) |\n | nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) |\n | natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) |\n\n - Using router (`/nature/research/` + \"short name for a journal\") to query latest research paper for a certain journal of Nature Publishing Group.\n If the `:journal` parameter is blank, then latest research of Nature will return.\n - The journals from NPG are run by different group of people, and the website of may not be consitent for all the journals\n - Only abstract is rendered in some researches","location":"research.ts"}} /> + +| `:journal` | Full Name of the Journal | Route | +| :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | +| nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) | +| nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) | +| neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) | +| ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) | +| ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) | +| nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) | +| nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) | +| nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) | +| natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) | + +- Using router (`/nature/research/` + "short name for a journal") to query latest research paper for a certain journal of Nature Publishing Group. + If the `:journal` parameter is blank, then latest research of Nature will return. +- The journals from NPG are run by different group of people, and the website of may not be consitent for all the journals +- Only abstract is rendered in some researches + +### Nature News {#nature-journal-nature-news} + +<Route namespace="nature" data={{"path":"/news","categories":["journal"],"example":"/nature/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["nature.com/latest-news","nature.com/news","nature.com/"]},"name":"Nature News","maintainers":["y9c","TonyRL"],"url":"nature.com/latest-news","location":"news.ts"}} /> + +### Research Highlight {#nature-journal-research-highlight} + +<Route namespace="nature" data={{"path":"/highlight/:journal?","categories":["journal"],"example":"/nature/highlight","parameters":{"journal":"short name for a journal, `nature` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["nature.com/:journal/articles","nature.com/:journal","nature.com/"],"target":"/highlight/:journal"},"name":"Research Highlight","maintainers":[],"description":":::warning\n Only some journals are supported.\n :::","location":"highlight.ts"}} /> + +:::warning +Only some journals are supported. +::: ## Network and Distributed System Security (NDSS) Symposium {#network-and-distributed-system-security-ndss-symposium} ### Accepted papers {#network-and-distributed-system-security-ndss-symposium-accepted-papers} -<Route author="ZeddYu" example="/ndss-symposium/ndss" path="/ndss-symposium/ndss"> - Return results from 2020 -</Route> +<Route namespace="ndss-symposium" data={{"path":"/ndss","categories":["journal"],"example":"/ndss-symposium/ndss","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ndss-symposium.org/"]},"name":"Accepted papers","maintainers":["ZeddYu"],"url":"ndss-symposium.org/","description":"Return results from 2020","location":"ndss.ts"}} /> + +Return results from 2020 ## Oxford University Press {#oxford-university-press} ### Oxford Academic {#oxford-university-press-oxford-academic} +<Route namespace="oup" data={{"path":"/journals/:name","categories":["journal"],"example":"/oup/journals/adaptation","parameters":{"name":"short name for a journal, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["academic.oup.com/","academic.oup.com/:name/issue"]},"name":"Oxford Academic","maintainers":[],"url":"academic.oup.com/","description":"#### Journal {#oxford-university-press-oxford-academic-journal}","location":"index.ts"}} /> + #### Journal {#oxford-university-press-oxford-academic-journal} -<Route author="Fatpandac" example="/oup/journals/adaptation" path="/oup/journals/:name" paramsDesc={['short name for a journal, can be found in URL']} anticrawler="1" /> - -## Proceedings of The National Academy of Sciences {#proceedings-of-the-national-academy-of-sciences} - -### Journal {#proceedings-of-the-national-academy-of-sciences-journal} - -<Route author="emdoe HenryQW y9c" example="/pnas/latest" path="/pnas/:topicPath*" paramsDesc={['Topic path, support **Featured Topics**, **Articles By Topic** and [**Collected Papers**](https://www.pnas.org/about/collected-papers), `latest` by default']} radar="1" anticrawler="1" puppeteer="1" supportScihub="1"> - :::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) - ::: -</Route> - -## PubMed {#pubmed} - -### Trending articles {#pubmed-trending-articles} - -<Route author="y9c nczitzk" example="/pubmed/trending" path="/pubmed/trending/:filter?" paramsDesc={['Filters, can be found in URL']} supportScihub="1"> - :::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) - ::: -</Route> - -## Routledge {#routledge} - -### Book Series {#routledge-book-series} - -<Route author="TonyRL" example="/routledge/:bookName/book-series/:bookId" path="/routledge/A-Colour-Atlas/book-series/CRCACOLOATLA" paramsDesc={['Book name, can be found in URL', 'Book ID, can be found in URL']} radar="1" /> - ## Royal Society of Chemistry {#royal-society-of-chemistry} ### Journal {#royal-society-of-chemistry-journal} -<Route author="nczitzk" example="/rsc/journal/ta" path="/rsc/journal/:id/:category?" paramsDesc={['Journal id, can be found in URL', 'Category, see below, All Recent Articles by default']} radar="1"> - :::tip - All journals at [Current journals](https://pubs.rsc.org/en/journals) - ::: +<Route namespace="rsc" data={{"path":"/journal/:id/:category?","categories":["journal"],"example":"/rsc/journal/ta","parameters":{"id":"Journal id, can be found in URL","category":"Category, see below, All Recent Articles by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Journal","maintainers":["nczitzk"],"description":":::tip\n All journals at [Current journals](https://pubs.rsc.org/en/journals)\n :::\n\n | All Recent Articles | Advance Articles |\n | ------------------- | ---------------- |\n | allrecentarticles | advancearticles |","location":"journal.ts"}} /> - | All Recent Articles | Advance Articles | - | ------------------- | ---------------- | - | allrecentarticles | advancearticles | -</Route> +:::tip +All journals at [Current journals](https://pubs.rsc.org/en/journals) +::: + +| All Recent Articles | Advance Articles | +| ------------------- | ---------------- | +| allrecentarticles | advancearticles | ## Science Magazine {#science-magazine} -### Current Issue {#science-magazine-current-issue} +### Blogs {#science-magazine-blogs} -<Route author="y9c TonyRL" example="/science/current/science" path="/science/current/:journal?" paramsDesc={['Short name for a journal']} supportScihub="1" anticrawler="1" puppeteer="1" radar="1"> - | Short name | Full name of the journal | Route | - | :---------: | :----------------------------: | ------------------------------------------------------------------------------ | - | science | Science | [/science/current/science](https://rsshub.app/science/current/science) | - | sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) | - | sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) | - | scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) | - | signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) | - | stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) | +<Route namespace="science" data={{"path":"/blogs/:name?","categories":["journal"],"example":"/science/blogs/pipeline","parameters":{"name":"Short name for the blog, get this from the url. Defaults to pipeline"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["science.org/blogs/:name"],"target":"/blogs/:name"},"name":"Blogs","maintainers":["TomHodson"],"description":"To subscribe to [IN THE PIPELINE by Derek Lowe’s](https://science.org/blogs/pipeline) or the [science editor's blog](https://science.org/blogs/editors-blog), use the name parameter `pipeline` or `editors-blog`.","location":"blogs.ts"}} /> - - Using route (`/science/current/` + "short name for a journal") to get current issue of a journal from AAAS. - - Leaving it empty (`/science/current`) to get update from Science. -</Route> +To subscribe to [IN THE PIPELINE by Derek Lowe’s](https://science.org/blogs/pipeline) or the [science editor's blog](https://science.org/blogs/editors-blog), use the name parameter `pipeline` or `editors-blog`. ### Cover Story {#science-magazine-cover-story} -<Route author="y9c TonyRL" example="/science/cover" path="/science/cover" anticrawler="1" radar="1"> - Subscribe to the cover images of Science journals, and get the latest publication updates in time. +<Route namespace="science" data={{"path":"/cover","categories":["journal"],"example":"/science/cover","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["science.org/"]},"name":"Cover Story","maintainers":["y9c","TonyRL"],"url":"science.org/","description":"Subscribe to the cover images of Science journals, and get the latest publication updates in time.\n\n Including 'Science', 'Science Advances', 'Science Immunology', 'Science Robotics', 'Science Signaling' and 'Science Translational Medicine'.","location":"cover.ts"}} /> - Including 'Science', 'Science Advances', 'Science Immunology', 'Science Robotics', 'Science Signaling' and 'Science Translational Medicine'. -</Route> +Subscribe to the cover images of Science journals, and get the latest publication updates in time. + +Including 'Science', 'Science Advances', 'Science Immunology', 'Science Robotics', 'Science Signaling' and 'Science Translational Medicine'. + +### Current Issue {#science-magazine-current-issue} + +<Route namespace="science" data={{"path":"/current/:journal?","categories":["journal"],"example":"/science/current/science","parameters":{"journal":"Short name for a journal"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["science.org/journal/:journal","science.org/toc/:journal/current"],"target":"/current/:journal"},"name":"Current Issue","maintainers":["y9c","TonyRL"],"description":"| Short name | Full name of the journal | Route |\n | :---------: | :----------------------------: | ------------------------------------------------------------------------------ |\n | science | Science | [/science/current/science](https://rsshub.app/science/current/science) |\n | sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) |\n | sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) |\n | scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) |\n | signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) |\n | stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) |\n\n - Using route (`/science/current/` + \"short name for a journal\") to get current issue of a journal from AAAS.\n - Leaving it empty (`/science/current`) to get update from Science.","location":"current.ts"}} /> + +| Short name | Full name of the journal | Route | +| :---------: | :----------------------------: | ------------------------------------------------------------------------------ | +| science | Science | [/science/current/science](https://rsshub.app/science/current/science) | +| sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) | +| sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) | +| scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) | +| signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) | +| stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) | + +- Using route (`/science/current/` + "short name for a journal") to get current issue of a journal from AAAS. +- Leaving it empty (`/science/current`) to get update from Science. ### First Release {#science-magazine-first-release} -<Route author="y9c TonyRL" example="/science/early" path="/science/early/:journal?" paramsDesc={['Short name for a journal']} supportScihub="1" anticrawler="1" puppeteer="1" radar="1"> - *only Science, Science Immunology and Science Translational Medicine have first release* -</Route> +<Route namespace="science" data={{"path":"/early/:journal?","categories":["journal"],"example":"/science/early","parameters":{"journal":"Short name for a journal"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":true},"radar":{"source":["science.org/journal/:journal","science.org/toc/:journal/0/0"],"target":"/early/:journal"},"name":"First Release","maintainers":["y9c","TonyRL"],"description":"*only Science, Science Immunology and Science Translational Medicine have first release*","location":"early.ts"}} /> -### Blogs {#science-magazine-blogs} - -<Route author="TomHodson" example="/science/blogs/pipeline" path="/science/blogs/:name?" paramsDesc={['Short name for the blog, get this from the url. Defaults to pipeline']} anticrawler="1" puppeteer="1" radar="1"> - To subscribe to [IN THE PIPELINE by Derek Lowe’s](https://science.org/blogs/pipeline) or the [science editor's blog](https://science.org/blogs/editors-blog), use the name parameter `pipeline` or `editors-blog`. -</Route> +*only Science, Science Immunology and Science Translational Medicine have first release* ## ScienceDirect {#sciencedirect} ### Journal {#sciencedirect-journal} -<Route author="nczitzk" example="/sciencedirect/journal/research-policy" path="/sciencedirect/journal/:id" paramsDesc={['Journal id, can be found in URL']} notOperational="1" /> +<Route namespace="sciencedirect" data={{"path":"/journal/:id","categories":["journal"],"example":"/sciencedirect/journal/research-policy","parameters":{"id":"Journal id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sciencedirect.com/journal/:id","sciencedirect.com/"]},"name":"Journal","maintainers":["nczitzk"],"location":"journal.ts"}} /> ## Springer {#springer} ### Journal {#springer-journal} -<Route author="Derekmini TonyRL" example="/springer/journal/10450" path="/springer/journal/:journal" paramsDesc={['Journal Code, the number in the URL from the journal homepage']} radar="1" /> +<Route namespace="springer" data={{"path":"/journal/:journal","categories":["journal"],"example":"/springer/journal/10450","parameters":{"journal":"Journal Code, the number in the URL from the journal homepage"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.springer.com/journal/:journal/*"]},"name":"Journal","maintainers":["Derekmini","TonyRL"],"location":"journal.ts"}} /> ## Telecompaper {#telecompaper} ### News {#telecompaper-news} -<Route author="nczitzk" example="/telecompaper/news/mobile/2020/China/News" path="/telecompaper/news/:caty/:year?/:country?/:type?" paramsDesc={['Category, see table below', 'Year. The year in respective category page filter, `all` for unlimited year, empty by default', 'Country or continent, `all` for unlimited country or continent, empty by default', 'Type, can be found in the `Types` filter, `all` for unlimited type, unlimited by default']} notOperational="1"> - Category +<Route namespace="telecompaper" data={{"path":"/news/:caty/:year?/:country?/:type?","categories":["journal"],"example":"/telecompaper/news/mobile/2020/China/News","parameters":{"caty":"Category, see table below","year":"Year. The year in respective category page filter, `all` for unlimited year, empty by default","country":"Country or continent, `all` for unlimited country or continent, empty by default","type":"Type, can be found in the `Types` filter, `all` for unlimited type, unlimited by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["nczitzk"],"description":"Category\n\n | WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES |\n | -------- | --------- | --------- | ------- | -- | ------------------ |\n | mobile | internet | boardcast | general | it | industry-resources |\n\n :::tip\n If `country` or `type` includes empty space, use `-` instead. For example, `United States` needs to be replaced with `United-States`, `White paper` needs to be replaced with `White-paper`\n\n Filters in [INDUSTRY RESOURCES](https://www.telecompaper.com/industry-resources) only provides `Content Type` which corresponds to `type`. `year` and `country` are not supported.\n :::","location":"news.ts"}} /> - | WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES | - | -------- | --------- | --------- | ------- | -- | ------------------ | - | mobile | internet | boardcast | general | it | industry-resources | +Category - :::tip - If `country` or `type` includes empty space, use `-` instead. For example, `United States` needs to be replaced with `United-States`, `White paper` needs to be replaced with `White-paper` +| WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES | +| -------- | --------- | --------- | ------- | -- | ------------------ | +| mobile | internet | boardcast | general | it | industry-resources | - Filters in [INDUSTRY RESOURCES](https://www.telecompaper.com/industry-resources) only provides `Content Type` which corresponds to `type`. `year` and `country` are not supported. - ::: -</Route> +:::tip +If `country` or `type` includes empty space, use `-` instead. For example, `United States` needs to be replaced with `United-States`, `White paper` needs to be replaced with `White-paper` + +Filters in [INDUSTRY RESOURCES](https://www.telecompaper.com/industry-resources) only provides `Content Type` which corresponds to `type`. `year` and `country` are not supported. +::: ### Search {#telecompaper-search} -<Route author="nczitzk" example="/telecompaper/search/Nokia" path="/telecompaper/search/:keyword?/:company?/:sort?/:period?" paramsDesc={['Keyword', 'Company name, empty by default', 'Sorting, see table below, `Date Descending` by default', 'Date selection, Last 12 months by default']} notOperational="1"> - Sorting +<Route namespace="telecompaper" data={{"path":"/search/:keyword?/:company?/:sort?/:period?","categories":["journal"],"example":"/telecompaper/search/Nokia","parameters":{"keyword":"Keyword","company":"Company name, empty by default","sort":"Sorting, see table below, `Date Descending` by default","period":"Date selection, Last 12 months by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["nczitzk"],"description":"Sorting\n\n | Date Ascending | Date Descending |\n | -------------- | --------------- |\n | 1 | 2 |\n\n Date selection\n\n | 1 month | 3 months | 6 months | 12 months | 24 months |\n | ------- | -------- | -------- | --------- | --------- |\n | 1 | 3 | 6 | 12 | 24 |","location":"search.ts"}} /> - | Date Ascending | Date Descending | - | -------------- | --------------- | - | 1 | 2 | +Sorting - Date selection +| Date Ascending | Date Descending | +| -------------- | --------------- | +| 1 | 2 | - | 1 month | 3 months | 6 months | 12 months | 24 months | - | ------- | -------- | -------- | --------- | --------- | - | 1 | 3 | 6 | 12 | 24 | -</Route> +Date selection + +| 1 month | 3 months | 6 months | 12 months | 24 months | +| ------- | -------- | -------- | --------- | --------- | +| 1 | 3 | 6 | 12 | 24 | ## The University of Chicago Press: Journals {#the-university-of-chicago-press-journals} ### Current Issue {#the-university-of-chicago-press-journals-current-issue} -<Route author="TonyRL" example="/uchicago/journals/current/jpe" path="/uchicago/journals/current/:journal" paramsDesc={['Journal id, can be found in URL. [Browse journals by title](https://www.journals.uchicago.edu/action/showPublications)']} radar="1" anticrawler="1" /> +<Route namespace="uchicago" data={{"path":"/journals/current/:journal","categories":["journal"],"example":"/uchicago/journals/current/jpe","parameters":{"journal":"Journal id, can be found in URL. [Browse journals by title](https://www.journals.uchicago.edu/action/showPublications)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["journals.uchicago.edu/toc/:journal/current","journals.uchicago.edu/journal/:journal"]},"name":"Current Issue","maintainers":["TonyRL"],"location":"current.ts"}} /> ## Trending Papers {#trending-papers} ### Trending Papers on arXiv {#trending-papers-trending-papers-on-arxiv} -<Route author="CookiePieWw" example="/trendingpapers/papers" path="/trendingpapers/papers/:category?/:time?/:cited?" paramsDesc={['Category of papers, can be found in URL. `All categories` by default.', 'Time like `24 hours` to specify the duration of ranking, can be found in URL. `Since beginning` by default.', 'Cited or uncited papers, can be found in URL. `Cited and uncited papers` by default.']} /> +<Route namespace="trendingpapers" data={{"path":"/papers/:category?/:time?/:cited?","categories":["journal"],"example":"/trendingpapers/papers","parameters":{"category":"Category of papers, can be found in URL. `All categories` by default.","time":"Time like `24 hours` to specify the duration of ranking, can be found in URL. `Since beginning` by default.","cited":"Cited or uncited papers, can be found in URL. `Cited and uncited papers` by default."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Trending Papers on arXiv","maintainers":["CookiePieWw"],"location":"papers.ts"}} /> ## USENIX {#usenix} ### Security Symposia {#usenix-security-symposia} -<Route author="ZeddYu" example="/usenix/usenix-security-sympoium" path="/usenix/usenix-security-sympoium"> - Return results from 2020 -</Route> +<Route namespace="usenix" data={{"path":"/usenix-security-sympoium","categories":["journal"],"example":"/usenix/usenix-security-sympoium","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["usenix.org/conferences/all","usenix.org/conferences","usenix.org/"]},"name":"Security Symposia","maintainers":["ZeddYu"],"url":"usenix.org/conferences/all","description":"Return results from 2020","location":"usenix.ts"}} /> + +Return results from 2020 ## X-MOL {#x-mol} ### Journal {#x-mol-journal} -<Route author="cssxsh" example="/x-mol/paper/0/9" path="/x-mol/paper/:type/:magazine" paramsDesc={['type','magazine']} anticrawler="1" /> +<Route namespace="x-mol" data={{"path":"/paper/:type/:magazine","categories":["journal"],"example":"/x-mol/paper/0/9","parameters":{"type":"type","magazine":"magazine"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Journal","maintainers":["cssxsh"],"location":"paper.ts"}} /> ## 管理世界 {#guan-li-shi-jie} ### 分类 {#guan-li-shi-jie-fen-lei} -<Route author="nczitzk" example="/mvm" path="/mvm/:category?" paramsDesc={['分类,见下表,默认为本期要目']} notOperational="1"> - | 本期要目 | 网络首发 | 学术活动 | 通知公告 | - | -------- | -------- | -------- | -------- | - | bqym | wlsf | xshd | tzgg | -</Route> +<Route namespace="mvm" data={{"path":"/:category?","categories":["journal"],"example":"/mvm","parameters":{"category":"分类,见下表,默认为本期要目"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mwm.net.cn/web/:category","mwm.net.cn/"]},"name":"分类","maintainers":["nczitzk"],"description":"| 本期要目 | 网络首发 | 学术活动 | 通知公告 |\n | -------- | -------- | -------- | -------- |\n | bqym | wlsf | xshd | tzgg |","location":"index.ts"}} /> -## 环球法律评论 {#huan-qiu-fa-lv-ping-lun} - -### 期刊 {#huan-qiu-fa-lv-ping-lun-qi-kan} - -<Route author="nczitzk" example="/globallawreview" path="/globallawreview" /> +| 本期要目 | 网络首发 | 学术活动 | 通知公告 | +| -------- | -------- | -------- | -------- | +| bqym | wlsf | xshd | tzgg | ## 中国知网 {#zhong-guo-zhi-wang} +### Unknown {#zhong-guo-zhi-wang-unknown} + +<Route namespace="cnki" data={{"path":"/author/:code","categories":["journal"],"example":"/cnki/author/000042423923","parameters":{"code":"作者对应code,可以在网址中得到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["harveyqiu","Derekmini"],"location":"author.ts"}} /> + ### 期刊 {#zhong-guo-zhi-wang-qi-kan} -<Route author="Fatpandac Derekmini" example="/cnki/journals/LKGP" path="/cnki/journals/:name" paramsDesc={['期刊缩写,可以在网址中得到']} notOperational="1" /> +<Route namespace="cnki" data={{"path":"/journals/:name","categories":["journal"],"example":"/cnki/journals/LKGP","parameters":{"name":"期刊缩写,可以在网址中得到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["navi.cnki.net/knavi/journals/:name/detail"]},"name":"期刊","maintainers":["Fatpandac","Derekmini"],"location":"journals.ts"}} /> ### 网络首发 {#zhong-guo-zhi-wang-wang-luo-shou-fa} -<Route author="Fatpandac" example="/cnki/journals/debut/LKGP" path="/cnki/journals/debut/:name" paramsDesc={['期刊缩写,可以在网址中得到']} /> - -### 作者期刊文献 {#zhong-guo-zhi-wang-zuo-zhe-qi-kan-wen-xian} - -:::tip -可能仅限中国大陆服务器访问,以实际情况为准。 -::: - -<Route author="harveyqiu Derekmini" example="/cnki/author/000042423923" path="/cnki/author/:code" paramsDesc={['作者对应code,可以在网址中得到']} notOperational="1" /> +<Route namespace="cnki" data={{"path":"/journals/debut/:name","categories":["journal"],"example":"/cnki/journals/debut/LKGP","parameters":{"name":"期刊缩写,可以在网址中得到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["navi.cnki.net/knavi/journals/:name/detail"]},"name":"网络首发","maintainers":["Fatpandac"],"location":"debut.ts"}} /> diff --git a/website/docs/routes/live.mdx b/website/docs/routes/live.mdx index 85bc81b47..a914d4259 100644 --- a/website/docs/routes/live.mdx +++ b/website/docs/routes/live.mdx @@ -1,91 +1,99 @@ -# 🎥 Live +# live + +## Bilibili {#bilibili} + +### 直播分区 {#bilibili-zhi-bo-fen-qu} + +<Route namespace="bilibili" data={{"path":"/live/area/:areaID/:order","categories":["live"],"example":"/bilibili/live/area/207/online","parameters":{"areaID":"分区 ID 分区增删较多, 可通过 [分区列表](https://api.live.bilibili.com/room/v1/Area/getList) 查询","order":"排序方式, live_time 开播时间, online 人气"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"直播分区","maintainers":["Qixingchen"],"description":":::warning\n 由于接口未提供开播时间,如果直播间未更换标题与分区,将视为一次。如果直播间更换分区与标题,将视为另一项\n :::","location":"live-area.ts"}} /> + +:::warning +由于接口未提供开播时间,如果直播间未更换标题与分区,将视为一次。如果直播间更换分区与标题,将视为另一项 +::: + +### 直播开播 {#bilibili-zhi-bo-kai-bo} + +<Route namespace="bilibili" data={{"path":"/live/room/:roomID","categories":["live"],"example":"/bilibili/live/room/3","parameters":{"roomID":"房间号, 可在直播间 URL 中找到, 长短号均可"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["live.bilibili.com/:roomID"]},"name":"直播开播","maintainers":["Qixingchen"],"location":"live-room.ts"}} /> + +### 直播搜索 {#bilibili-zhi-bo-sou-suo} + +<Route namespace="bilibili" data={{"path":"/live/search/:key/:order","categories":["live"],"example":"/bilibili/live/search/dota/online","parameters":{"key":"搜索关键字","order":"排序方式, live_time 开播时间, online 人气"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"直播搜索","maintainers":["Qixingchen"],"location":"live-search.ts"}} /> ## LiSA {#lisa} -### News {#lisa-news} - -<Route author="Kiotlin" example="/lxixsxa/info" path="/lxixsxa/info" radar="1" /> - ### Latest Discography {#lisa-latest-discography} -<Route author="Kiotlin" example="/lxixsxa/disco" path="/lxixsxa/disco" radar="1" /> +<Route namespace="lxixsxa" data={{"path":"/disco","categories":["live"],"example":"/lxixsxa/disco","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.lxixsxa.com/","www.lxixsxa.com/discography"]},"name":"Latest Discography","maintainers":["Kiotlin"],"url":"www.lxixsxa.com/","location":"discography.ts"}} /> + +### News {#lisa-news} + +<Route namespace="lxixsxa" data={{"path":"/info","categories":["live"],"example":"/lxixsxa/info","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.lxixsxa.com/","www.lxixsxa.com/info"]},"name":"News","maintainers":["Kiotlin"],"url":"www.lxixsxa.com/","location":"information.ts"}} /> ## Twitch {#twitch} -### Live {#twitch-live} - -<Route author="hoilc" path="/twitch/live/:login" example="/twitch/live/riotgames" paramsDesc={['Twitch username']} radar="1" /> - ### Channel Video {#twitch-channel-video} -<Route author="hoilc" path="/twitch/video/:login/:filter?" example="/twitch/video/riotgames/highlights" paramsDesc={['Twitch username', 'Video type, Default to all']} radar="1" /> +<Route namespace="twitch" data={{"path":"/video/:login/:filter?","categories":["live"],"example":"/twitch/video/riotgames/highlights","parameters":{"login":"Twitch username","filter":"Video type, Default to all"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.twitch.tv/:login/videos"],"target":"/video/:login"},"name":"Channel Video","maintainers":["hoilc"],"description":"| archive | highlights | all |\n| ----------------- | ----------------------------- | ---------- |\n| Recent broadcasts | Recent highlights and uploads | All videos |","location":"video.ts"}} /> | archive | highlights | all | | ----------------- | ----------------------------- | ---------- | | Recent broadcasts | Recent highlights and uploads | All videos | +### Live {#twitch-live} + +<Route namespace="twitch" data={{"path":"/live/:login","categories":["live"],"example":"/twitch/live/riotgames","parameters":{"login":"Twitch username"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Live","maintainers":["hoilc"],"location":"live.ts"}} /> + ### Stream Schedule {#twitch-stream-schedule} -<Route author="hoilc" path="/twitch/schedule/:login" example="/twitch/schedule/riotgames" paramsDesc={['Twitch username']} radar="1" /> +<Route namespace="twitch" data={{"path":"/schedule/:login","categories":["live"],"example":"/twitch/schedule/riotgames","parameters":{"login":"Twitch username"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.twitch.tv/:login/schedule"]},"name":"Stream Schedule","maintainers":["hoilc"],"location":"schedule.ts"}} /> ## Yoasobi Official {#yoasobi-official} -### News & Biography {#yoasobi-official-news-biography} - -<Route author="Kiotlin" example="/yoasobi-music/info/news" path="/yoasobi-music/info/:category?" paramsDesc={['`news`, `biography`']} radar="1" /> - ### Live {#yoasobi-official-live} -<Route author="Kiotlin" example="/yoasobi-music/live" path="/yoasobi-music/live" radar="1" /> +<Route namespace="yoasobi-music" data={{"path":"/live","categories":["live"],"example":"/yoasobi-music/live","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.yoasobi-music.jp/","www.yoasobi-music.jp/live"]},"name":"Live","maintainers":["Kiotlin"],"url":"www.yoasobi-music.jp/","location":"live.ts"}} /> ### Media {#yoasobi-official-media} -<Route author="Kiotlin" example="/yoasobi-music/media" path="/yoasobi-music/media" radar="1" /> +<Route namespace="yoasobi-music" data={{"path":"/media","categories":["live"],"example":"/yoasobi-music/media","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.yoasobi-music.jp/","www.yoasobi-music.jp/media"]},"name":"Media","maintainers":["Kiotlin"],"url":"www.yoasobi-music.jp/","location":"media.ts"}} /> + +### News & Biography {#yoasobi-official-news-biography} + +<Route namespace="yoasobi-music" data={{"path":"/info/:category?","categories":["live"],"example":"/yoasobi-music/info/news","parameters":{"category":"`news`, `biography`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.yoasobi-music.jp/","www.yoasobi-music.jp/:category"],"target":"/info/:category"},"name":"News & Biography","maintainers":[],"url":"www.yoasobi-music.jp/","location":"info.ts"}} /> ## YouTube Live {#youtube-live} ### Live {#youtube-live-live} -<Route author="sussurr127" path="/youtube/live/:username/:embed?" example="/youtube/live/@GawrGura" paramsDesc={['YouTuber id', 'Default to embed the video, set to any value to disable embedding']} radar="1" /> - -## 哔哩哔哩直播 {#bi-li-bi-li-zhi-bo} - -### 直播开播 {#bi-li-bi-li-zhi-bo-zhi-bo-kai-bo} - -<Route author="Qixingchen" example="/bilibili/live/room/3" path="/bilibili/live/room/:roomID" paramsDesc={['房间号, 可在直播间 URL 中找到, 长短号均可']} /> - -### 直播搜索 {#bi-li-bi-li-zhi-bo-zhi-bo-sou-suo} - -<Route author="Qixingchen" example="/bilibili/live/search/dota/online" path="/bilibili/live/search/:key/:order" paramsDesc={['搜索关键字', '排序方式, live_time 开播时间, online 人气']} /> - -### 直播分区 {#bi-li-bi-li-zhi-bo-zhi-bo-fen-qu} - -<Route author="Qixingchen" example="/bilibili/live/area/207/online" path="/bilibili/live/area/:areaID/:order" paramsDesc={['分区 ID 分区增删较多, 可通过 [分区列表](https://api.live.bilibili.com/room/v1/Area/getList) 查询', '排序方式, live_time 开播时间, online 人气']}> - :::warning - 由于接口未提供开播时间,如果直播间未更换标题与分区,将视为一次。如果直播间更换分区与标题,将视为另一项 - ::: -</Route> +<Route namespace="youtube" data={{"path":"/live/:username/:embed?","categories":["live"],"example":"/youtube/live/@GawrGura","parameters":{"username":"YouTuber id","embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Live","maintainers":["sussurr127"],"location":"live.ts"}} /> ## 抖音直播 {#dou-yin-zhi-bo} +:::warning +反爬严格,需要启用 puppeteer。抖音的视频 CDN 会验证 Referer,意味着许多阅读器都无法直接播放内嵌视频,以下是一些变通解决方案: + +1. 启用内嵌视频 (`embed=1`), 参考 [通用参数 -> 多媒体处理](/parameter#多媒体处理) 配置 `multimedia_hotlink_template` **或** `wrap_multimedia_in_iframe`。 +2. 关闭内嵌视频 (`embed=0`),手动点击 `视频直链` 超链接,一般情况下均可成功播放视频。若仍然出现 HTTP 403,请复制 URL 以后到浏览器打开。 +3. 点击原文链接打开抖音网页版的视频详情页播放视频。 +::: + +额外参数 + +| 键 | 含义 | 值 | 默认值 | +| ------- | ---------------- | ---------------------- | ------- | +| `embed` | 是否启用内嵌视频 | `0`/`1`/`true`/`false` | `false` | + ### 直播间开播 {#dou-yin-zhi-bo-zhi-bo-jian-kai-bo} -<Route author="TonyRL" example="/douyin/live/685317364746" path="/douyin/live/:rid" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} anticrawler="1" radar="1" puppeteer="1" /> +<Route namespace="douyin" data={{"path":"/live/:rid","categories":["live"],"example":"/douyin/live/685317364746","parameters":{"rid":"直播间 id, 可在主播直播间页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["live.douyin.com/:rid"]},"name":"直播间开播","maintainers":["TonyRL"],"location":"live.ts"}} /> ## 斗鱼直播 {#dou-yu-zhi-bo} ### 直播间开播 {#dou-yu-zhi-bo-zhi-bo-jian-kai-bo} -<Route author="DIYgod" example="/douyu/room/24422" path="/douyu/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} /> - -## 虎牙直播 {#hu-ya-zhi-bo} - -### 直播间开播 {#hu-ya-zhi-bo-zhi-bo-jian-kai-bo} - -<Route author="SettingDust xyqfer" example="/huya/live/edmunddzhang" path="/huya/live/:id" paramsDesc={['直播间id或主播名(有一些id是名字,如上)']} radar="1" /> +<Route namespace="douyu" data={{"path":"/room/:id","categories":["live"],"example":"/douyu/room/24422","parameters":{"id":"直播间 id, 可在主播直播间页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.douyu.com/:id","www.douyu.com/"]},"name":"直播间开播","maintainers":["DIYgod"],"location":"room.ts"}} /> ## 浪 Play 直播 {#lang-play-zhi-bo} -### 直播间开播 {#lang-play-zhi-bo-zhi-bo-jian-kai-bo} +### Unknown {#lang-play-zhi-bo-unknown} -<Route author="MittWillson" example="/lang/live/room/1352360" path="/lang/live/room/:id" paramsDesc={['直播间 id, 可在主播直播间页 URL 中找到']} anticrawler="1" /> +<Route namespace="lang" data={{"path":"/live/room/:id","categories":["live"],"example":"/lang/live/room/1352360","parameters":{"id":"直播间 id, 可在主播直播间页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lang.live/room/:id"]},"name":"Unknown","maintainers":["MittWillson"],"location":"room.ts"}} /> diff --git a/website/docs/routes/multimedia.mdx b/website/docs/routes/multimedia.mdx index bdb4e747b..e9e5f79e1 100644 --- a/website/docs/routes/multimedia.mdx +++ b/website/docs/routes/multimedia.mdx @@ -1,233 +1,96 @@ -# 🔊 Multimedia - -## 141JAV {#141jav} - -:::tip -官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141jav.com/feeds/](https://141jav.com/feeds/) -::: - -### 通用 {#141jav-tong-yong} - -<Route author="cgkings nczitzk" example="/141jav/popular/30" path="/141jav/:type?/:keyword?" paramsDesc={['类型', '关键词']} supportBT="1" radar="1" anticrawler="1"> - **类型** - - | 最新 | 热门 | 随机 | 指定演员 | 指定标签 | - | ---- | ------- | ------ | -------- | -------- | - | new | popular | random | actress | tag | - - **关键词** - - | 空 | 日期范围 | 演员名 | 标签名 | - | -- | ----------- | ------------ | -------------- | - | | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards | - - **示例说明** - - - `/141jav/new` - - 仅当类型为 `new` `popular` 或 `random` 时关键词为 **空** - - - `/141jav/popular/30` - - `popular` `random` 类型的关键词可填写 `7` `30` 或 `60` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内** - - - `/141jav/actress/Yua%20Mikami` - - `actress` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141jav.com/actress) 演员单页链接中获取 - - - `/141jav/tag/Adult%20Awards` - - `tag` 类型的关键词必须填写 **标签名** 且标签中的 `/` 必须替换为 `%2F` ,可在 [此处](https://141jav.com/tag) 标签单页链接中获取 - - - `/141jav/date/2020/07/30` - - `date` 类型的关键词必须填写 **日期** -</Route> - -## 141PPV {#141ppv} - -:::tip -官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141ppv.com/feeds/](https://141ppv.com/feeds/) -::: - -### 通用 {#141ppv-tong-yong} - -<Route author="cgkings nczitzk" example="/141ppv/popular/30" path="/141ppv/:type?/:keyword?" paramsDesc={['类型', '关键词']} supportBT="1" radar="1"> - **类型** - - | 最新 | 热门 | 随机 | 指定演员 | 指定标签 | - | ---- | ------- | ------ | -------- | -------- | - | new | popular | random | actress | tag | - - **关键词** - - | 空 | 日期范围 | 演员名 | 标签名 | - | -- | ----------- | ------------ | -------------- | - | | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards | - - **示例说明** - - - `/141ppv/new` - - 仅当类型为 `new` `popular` 或 `random` 时关键词为 **空** - - - `/141ppv/popular/30` - - `popular` `random` 类型的关键词可填写 `7` `30` 或 `60` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内** - - - `/141ppv/actress/Yua%20Mikami` - - `actress` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141ppv.com/actress) 演员单页链接中获取 - - - `/141ppv/tag/Adult%20Awards` - - `tag` 类型的关键词必须填写 **标签名** 且标签中的 `/` 必须替换为 `%2F` ,可在 [此处](https://141ppv.com/tag) 标签单页链接中获取 - - - `/141ppv/date/2020/07/30` - - `date` 类型的关键词必须填写 **日期** -</Route> +# multimedia ## 2048 核基地 {#2048-he-ji-di} ### 论坛 {#2048-he-ji-di-lun-tan} -<Route author="hoilc nczitzk" example="/2048/2" path="/2048/:id?" paramsDesc={['板块 ID, 见下表,默认为最新合集,即 `3`,亦可在 URL 中找到, 例如, `thread.php?fid-3.html`中, 板块 ID 为`3`']} supportBT="1"> - | 最新合集 | 亞洲無碼 | 日本騎兵 | 歐美新片 | 國內原創 | 中字原創 | 三級寫真 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 3 | 4 | 5 | 13 | 15 | 16 | 18 | +<Route namespace="2048" data={{"path":"/:id?","categories":["multimedia"],"example":"/2048/2","parameters":{"id":"板块 ID, 见下表,默认为最新合集,即 `3`,亦可在 URL 中找到, 例如, `thread.php?fid-3.html`中, 板块 ID 为`3`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"论坛","maintainers":["nczitzk"],"description":"| 最新合集 | 亞洲無碼 | 日本騎兵 | 歐美新片 | 國內原創 | 中字原創 | 三級寫真 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 3 | 4 | 5 | 13 | 15 | 16 | 18 |\n\n | 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area |\n | ------- | ---------- | ---------- | ---------- | ------------------------ |\n | 116 | 114 | 96 | 97 | 119 |\n\n | 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 23 | 24 | 25 | 26 | 27 | 28 | 135 |\n\n | 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 |\n | -------- | -------- | -------- | -------- | ------- | -------- | -------- |\n | 21 | 274 | 276 | 277 | 278 | 29 | |\n\n | 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 213 | 94 | 283 | 111 | 88 | 131 | 180 |\n\n | 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 72 | 272 | 195 | 280 | 79 | 216 | 76 |\n\n | 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 |\n | -------- | -------- | ------ | -------- | -------- | ------------ |\n | 43 | 67 | 66 | 55 | 78 | 279 |\n\n | 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 |\n | -------- | -------- | -------- | -------- | -------- | ------------ |\n | 48 | 103 | 50 | 54 | 100 | 109 |\n\n | 聚友客栈 | 坛友自售 |\n | -------- | -------- |\n | 57 | 136 |","location":"index.ts"}} /> - | 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area | - | ------- | ---------- | ---------- | ---------- | ------------------------ | - | 116 | 114 | 96 | 97 | 119 | +| 最新合集 | 亞洲無碼 | 日本騎兵 | 歐美新片 | 國內原創 | 中字原創 | 三級寫真 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 3 | 4 | 5 | 13 | 15 | 16 | 18 | - | 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 23 | 24 | 25 | 26 | 27 | 28 | 135 | +| 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area | +| ------- | ---------- | ---------- | ---------- | ------------------------ | +| 116 | 114 | 96 | 97 | 119 | - | 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 | - | -------- | -------- | -------- | -------- | ------- | -------- | -------- | - | 21 | 274 | 276 | 277 | 278 | 29 | | +| 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 23 | 24 | 25 | 26 | 27 | 28 | 135 | - | 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 213 | 94 | 283 | 111 | 88 | 131 | 180 | +| 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 | +| -------- | -------- | -------- | -------- | ------- | -------- | -------- | +| 21 | 274 | 276 | 277 | 278 | 29 | | - | 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 72 | 272 | 195 | 280 | 79 | 216 | 76 | +| 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 213 | 94 | 283 | 111 | 88 | 131 | 180 | - | 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 | - | -------- | -------- | ------ | -------- | -------- | ------------ | - | 43 | 67 | 66 | 55 | 78 | 279 | +| 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 72 | 272 | 195 | 280 | 79 | 216 | 76 | - | 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 | - | -------- | -------- | -------- | -------- | -------- | ------------ | - | 48 | 103 | 50 | 54 | 100 | 109 | +| 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 | +| -------- | -------- | ------ | -------- | -------- | ------------ | +| 43 | 67 | 66 | 55 | 78 | 279 | - | 聚友客栈 | 坛友自售 | - | -------- | -------- | - | 57 | 136 | -</Route> +| 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 | +| -------- | -------- | -------- | -------- | -------- | ------------ | +| 48 | 103 | 50 | 54 | 100 | 109 | + +| 聚友客栈 | 坛友自售 | +| -------- | -------- | +| 57 | 136 | ## 4k 世界 {#4k-shi-jie} ### 分类 {#4k-shi-jie-fen-lei} -<Route author="nczitzk" example="/4ksj/forum" path="/4ksj/forum/:id?" paramsDesc={['分类 id,默认为最新4K电影']}> - :::tip - 若订阅 [最新 4K 电影](https://www.4ksj.com/forum-2-1.html),网址为 `https://www.4ksj.com/forum-2-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `2-1` 作为参数,此时路由为 [`/4ksj/forum/2-1`](https://rsshub.app/4ksj/forum/2-1)。 +<Route namespace="4ksj" data={{"path":"/forum/:id?","categories":["multimedia"],"example":"/4ksj/forum","parameters":{"id":"分类 id,默认为最新4K电影"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":":::tip\n 若订阅 [最新 4K 电影](https://www.4ksj.com/forum-2-1.html),网址为 `https://www.4ksj.com/forum-2-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `2-1` 作为参数,此时路由为 [`/4ksj/forum/2-1`](https://rsshub.app/4ksj/forum/2-1)。\n\n 若订阅子分类 [Dolby Vision 纪录片 4K 电影](https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html),网址为 `https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1` 作为参数,此时路由为 [`/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1`](https://rsshub.app/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1)。\n :::","location":"forum.ts"}} /> - 若订阅子分类 [Dolby Vision 纪录片 4K 电影](https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html),网址为 `https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1` 作为参数,此时路由为 [`/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1`](https://rsshub.app/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1)。 - ::: -</Route> +:::tip +若订阅 [最新 4K 电影](https://www.4ksj.com/forum-2-1.html),网址为 `https://www.4ksj.com/forum-2-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `2-1` 作为参数,此时路由为 [`/4ksj/forum/2-1`](https://rsshub.app/4ksj/forum/2-1)。 -## 60-Second Science - Scientific American {#60-second-science-scientific-american} - -### Transcript {#60-second-science-scientific-american-transcript} - -<Route author="emdoe" example="/60s-science" path="/60s-science" /> - -Full transcript support for better user experience. +若订阅子分类 [Dolby Vision 纪录片 4K 电影](https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html),网址为 `https://www.4ksj.com/forum-4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1.html`。截取 `https://www.4ksj.com/forum-` 到末尾 `.html` 的部分 `4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1` 作为参数,此时路由为 [`/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1`](https://rsshub.app/4ksj/forum/4kdianying-s7-dianyingbiaozhun-3-dytypes-9-1)。 +::: ## 6v 电影 {#6v-dian-ying} ### 最新电影 {#6v-dian-ying-zui-xin-dian-ying} -<Route author="tc9011" example="/6v123/latestMovies" path="/6v123/latestMovies" supportBT="1" /> +<Route namespace="6v123" data={{"path":"/latestMovies","categories":["multimedia"],"example":"/6v123/latestMovies","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hao6v.com/","hao6v.com/gvod/zx.html"]},"name":"最新电影","maintainers":["tc9011"],"url":"hao6v.com/","location":"latest-movies.ts"}} /> ### 最新电视剧 {#6v-dian-ying-zui-xin-dian-shi-ju} -<Route author="tc9011" example="/6v123/latestTVSeries" path="/6v123/latestTVSeries" supportBT="1" /> +<Route namespace="6v123" data={{"path":"/latestTVSeries","categories":["multimedia"],"example":"/6v123/latestTVSeries","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hao6v.com/","hao6v.com/gvod/dsj.html"]},"name":"最新电视剧","maintainers":["tc9011"],"url":"hao6v.com/","location":"latest-tvseries.ts"}} /> ## 7mmtv {#7mmtv} ### Category {#7mmtv-category} -<Route author="nczitzk" example="/7mmtv/zh/censored_list/all" path="/7mmtv/:language?/:category?/:type?" paramsDesc={['Language, see below, `en` as English by default', 'Category, see below, `censored_list` as Censored by default', 'Server, see below, all server by default']} anticrawler="1"> - **Language** +<Route namespace="7mmtv" data={{"path":"/:language?/:category?/:type?","categories":["multimedia"],"example":"/7mmtv/zh/censored_list/all","parameters":{"language":"Language, see below, `en` as English by default","category":"Category, see below, `censored_list` as Censored by default","type":"Server, see below, all server by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"description":"**Language**\n\n | English | 日本語 | 한국의 | 中文 |\n | ------- | ------ | ------ | ---- |\n | en | ja | ko | zh |\n\n **Category**\n\n | Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics |\n | -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ |\n | chinese_list | censored_list | amateurjav_list | uncensored_list | amateur_list | hcomic_list |\n\n | Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random |\n | --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- |\n | chinese_random | censored_random | amateurjav_random | uncensored_random | amateur_random | hcomic_random |\n\n **Server**\n\n | All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) |\n | ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ |\n | all | 21 | 30 | 28 | 29 | 17 | 34 | 33 |","location":"index.ts"}} /> - | English | 日本語 | 한국의 | 中文 | - | ------- | ------ | ------ | ---- | - | en | ja | ko | zh | +**Language** - **Category** +| English | 日本語 | 한국의 | 中文 | +| ------- | ------ | ------ | ---- | +| en | ja | ko | zh | - | Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics | - | -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ | - | chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list | +**Category** - | Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random | - | --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- | - | chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random | +| Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics | +| -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ | +| chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list | - **Server** +| Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random | +| --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- | +| chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random | - | All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) | - | ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ | - | all | 21 | 30 | 28 | 29 | 17 | 34 | 33 | -</Route> +**Server** -### Maker {#7mmtv-maker} - -<Route author="nczitzk" example="/7mmtv/zh/amateurjav_makersr/1752" path="/7mmtv/:language?/:category?/:id?" paramsDesc={['Language, see below, `en` as English by default', 'Category, see below', 'Id, see below']} anticrawler="1"> - **Language** - - | English | 日本語 | 한국의 | 中文 | - | ------- | ------ | ------ | ---- | - | en | ja | ko | zh | - - **Category and Id** - - When `amateurjav_makersr` as **Amateur** is chosen as **Category**, the available **ids** are: - - | Maker | Id | - | ------------------------- | ---- | - | シロウト TV (SIRO) | 1752 | - | ラグジュ TV (LUXU) | 1586 | - | ナンパ TV (200GANA) | 1751 | - | PRESTIGE PREMIUM(300MAAN) | 1318 | - | S-CUTE | 1069 | - | ARA | 1585 | - - When `uncensored_makersr` as **Uncensored** is chosen as **Category**, the available **ids** are: - - | Maker | Id | - | ----------------------------------- | --- | - | HEYZO | 17 | - | 東京熱 (Tokyo Hot) | 29 | - | 一本道 (1pondo) | 32 | - | カリビアンコム (Caribbeancom) | 30 | - | カリビアンコム PPV (Caribbeancompr) | 40 | - | 天然むすめ (10musume) | 31 | - | パコパコママ (pacopacomama) | 36 | - | ガチん娘!(Gachinco) | 35 | - | エッチな 4610 | 34 | - | 人妻斬り 0930 | 38 | - | エッチな 0930 | 39 | - | トリプルエックス (XXX-AV) | 126 | - | FC2 | 37 | -</Route> +| All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) | +| ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ | +| all | 21 | 30 | 28 | 29 | 17 | 34 | 33 | ## 91porn {#91porn} @@ -235,167 +98,112 @@ Full transcript support for better user experience. 91porn has multiple backup domains, routes use the permanent domain `https://91porn.com` by default. If the domain is not accessible, you can add `?domain=<domain>` to specify the domain to be used. If you want to specify the backup domain to `https://0122.91p30.com`, you can add `?domain=0122.91p30.com` to the end of all 91porn routes, then the route will become [`/91porn?domain=0122.91p30.com`](https://rsshub.app/91porn?domain=0122.91p30.com) ::: -### Hot Video Today {#91porn-hot-video-today} - -<Route author="TonyRL" example="/91porn" path="/91porn/:lang?" paramsDesc={['Language, see below, `en_US` by default ']} radar="1" anticrawler="1"> - | English | 简体中文 | 繁體中文 | - | ------- | -------- | -------- | - | en\_US | cn\_CN | zh\_ZH | -</Route> - ### Author {#91porn-author} -<Route author="TonyRL" example="/91porn/author/2d6d2iWm4vVCwqujAZbSrKt2QJCbbaObv9HQ21Zo8wGJWudWBg" path="/91porn/author/:uid/:lang?" paramsDesc={['Author ID, can be found in URL', 'Language, see above, `en_US` by default ']} radar="1" anticrawler="1" /> +<Route namespace="91porn" data={{"path":"/author/:uid/:lang?","categories":["multimedia"],"example":"/91porn/author/2d6d2iWm4vVCwqujAZbSrKt2QJCbbaObv9HQ21Zo8wGJWudWBg","parameters":{"uid":"Author ID, can be found in URL","lang":"Language, see above, `en_US` by default "},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["91porn.com/index.php"],"target":""},"name":"Author","maintainers":["TonyRL"],"url":"91porn.com/index.php","location":"author.ts"}} /> -## 99% Invisible {#99%25-invisible} +### Hot Video Today {#91porn-hot-video-today} -### Transcript {#99%25-invisible-transcript} +<Route namespace="91porn" data={{"path":"/:lang?","categories":["multimedia"],"example":"/91porn","parameters":{"lang":"Language, see below, `en_US` by default "},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["91porn.com/index.php"],"target":""},"name":"Hot Video Today","maintainers":["TonyRL"],"url":"91porn.com/index.php","description":"| English | 简体中文 | 繁體中文 |\n | ------- | -------- | -------- |\n | en_US | cn_CN | zh_ZH |","location":"index.ts"}} /> -<Route author="Ji4n1ng" example="/99percentinvisible/transcript" path="/99percentinvisible/transcript" /> - -## A 姐分享 {#a-jie-fen-xiang} - -### 存档列表 {#a-jie-fen-xiang-cun-dang-lie-biao} - -<Route author="zhenhappy" example="/abskoop/nsfw" path="/abskoop/:type?" paramsDesc={['为空, 订阅主站点, `nsfw`订阅nsfw子站点']} radar="1" /> - -## AV01(av01.tv) {#av01-av01-tv} - -### 演员 {#av01-av01-tv-yan-yuan} - -:::tip -当没有给定排序类型时,默认为按上传时间排序及 mr -::: - -<Route author="HXHL" example="/av01/actor/七沢みあ" path="/av01/actor/:name/:type?" paramsDesc={['女优名,必选-仅限日语,可直接在网站上找到','排序顺序,可选-可以是`mr` `rd` `bw` `tr` `lg`']}> - | 按上传时间排序 | 按上市时间排序 | 按观看次数排序 | 按评分排序 | 按时长排序 | - | -------------- | -------------- | -------------- | ---------- | ---------- | - | mr | rd | bw | tr | lg | -</Route> - -### 分类 {#av01-av01-tv-fen-lei} - -<Route author="HXHL" example="/av01/tag/中出し" path="/av01/tag/:name/:type?" paramsDesc={['分类名,必选-仅限日语,可直接在网站上找到','排序顺序,可选-可以是`mr` `rd` `bw` `tr` `lg`']}> - 例如,路由 `/av01/tag/中出し` 应该输出 [https://www.av01.tv/tag/ 中出し](https://www.av01.tv/tag/中出し) 的排行榜单 -</Route> - -## Avgle {#avgle} - -### 视频列表 {#avgle-shi-pin-lie-biao} - -<Route author="I2IMk" example="/avgle/videos" path="/avgle/videos/:order?/:time?/:top?" paramsDesc={['视频次序, `bw` 观看中 / `mr` 最新 / `mv` 最多观看 / `tr` 最高评分 / `tf` 最多收藏 / `lg` 最长, 默认 `mv`', '视频的添加时间, `a` 所有 / `t` 今天 / `d` 本周 / `m` 本月, 默认 `m`', '按次序获取的视频数, 不大于 `250`, 默认 `30`']} /> - -### 视频搜索 {#avgle-shi-pin-sou-suo} - -<Route author="I2IMk" example="/avgle/search/橋本ありな" path="/avgle/search/:keyword/:order?/:time?/:top?" paramsDesc={['搜索的关键词', '视频次序, `bw` 观看中 / `mr` 最新 / `mv` 最多观看 / `tr` 最高评分 / `tf` 最多收藏 / `lg` 最长, 默认 `mr`', '视频的添加时间, `a` 所有 / `t` 今天 / `d` 本周 / `m` 本月, 默认 `a`', '按次序获取的视频数, 不大于 `250`, 默认 `30`']} /> +| English | 简体中文 | 繁體中文 | +| ------- | -------- | -------- | +| en\_US | cn\_CN | zh\_ZH | ## Bandcamp {#bandcamp} -### Weekly {#bandcamp-weekly} - -<Route author="nczitzk" example="/bandcamp/weekly" path="/bandcamp/weekly" /> - ### Tag {#bandcamp-tag} -<Route author="nczitzk" example="/bandcamp/tag/united-kingdom" path="/bandcamp/tag/:tag?" paramsDesc={['Tag, can be found in URL']} /> +<Route namespace="bandcamp" data={{"path":"/tag/:tag?","categories":["multimedia"],"example":"/bandcamp/tag/united-kingdom","parameters":{"tag":"Tag, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bandcamp.com/tag/:tag"],"target":"/tag/:tag"},"name":"Tag","maintainers":["nczitzk"],"location":"tag.ts"}} /> ### Upcoming Live Streams {#bandcamp-upcoming-live-streams} -<Route author="nczitzk" example="/bandcamp/live" path="/bandcamp/live" /> +<Route namespace="bandcamp" data={{"path":"/live","categories":["multimedia"],"example":"/bandcamp/live","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bandcamp.com/live_schedule"]},"name":"Upcoming Live Streams","maintainers":["nczitzk"],"url":"bandcamp.com/live_schedule","location":"live.ts"}} /> -## BT 之家 1LOU 站 {#bt-zhi-jia-1lou-zhan} +### Weekly {#bandcamp-weekly} -### 搜索 {#bt-zhi-jia-1lou-zhan-sou-suo} - -<Route author="falling" example="/1lou/search-繁花.htm" path="/1lou/:path?" paramsDesc={['路径信息在URL里找到,主页为 index']}> - :::tip - 将 1lou.me/ 后的内容作为参数传入到 path 即可 - - [www.1lou.me/search - 繁花.htm](http://www.1lou.me/search-繁花.htm) --> /1lou/search - 繁花.htm - - [www.1lou.me/forum-1.htm](http://www.1lou.me/forum-1.htm) --> /1lou/forum-1.htm - - [www.1lou.me/](http://www.1lou.me/) --> /1lou/ - ::: -</Route> +<Route namespace="bandcamp" data={{"path":"/weekly","categories":["multimedia"],"example":"/bandcamp/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bandcamp.com/"]},"name":"Weekly","maintainers":["nczitzk"],"url":"bandcamp.com/","location":"weekly.ts"}} /> ## BT 之家 {#bt-zhi-jia} ### 分类 {#bt-zhi-jia-fen-lei} -<Route author="nczitzk" example="/btzj" path="/btzj/:category?" paramsDesc={['分类,可在对应分类页 URL 中找到,默认为首页']}> - :::tip - 分类页中域名末尾到 `.htm` 前的字段即为对应分类,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm) `https://www.btbtt20.com/forum-index-fid-951.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-951`,所以路由应为 [`/btzj/forum-index-fid-951`](https://rsshub.app/btzj/forum-index-fid-951) - - 部分分类页,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm)、[剧集](https://www.btbtt20.com/forum-index-fid-950.htm) 等,提供了更复杂的分类筛选。你可以将选项选中后,获得结果分类页 URL 中分类参数,构成路由。如选中分类 [高清电影 - 年份:2021 - 地区:欧美](https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm) `https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`,所以路由应为 [`/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`](https://rsshub.app/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0) - ::: - - 基础分类如下: - - | 交流 | 电影 | 剧集 | 高清电影 | - | ------------------- | ------------------- | ------------------- | -------------------- | - | forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 | - - | 音乐 | 动漫 | 游戏 | 综艺 | - | ------------------- | ------------------- | ------------------- | -------------------- | - | forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 | - - | 图书 | 美图 | 站务 | 科技 | - | -------------------- | ------------------- | ----------------- | ------------------- | - | forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 | - - | 求助 | 音轨字幕 | - | -------------------- | -------------------- | - | forum-index-fid-1187 | forum-index-fid-1191 | - - :::tip - BT 之家的域名会变更,本路由以 `https://www.btbtt20.com` 为默认域名,若该域名无法访问,可以通过在路由后方加上 `?domain=<域名>` 指定路由访问的域名。如指定域名为 `https://www.btbtt15.com`,则在 `/btzj` 后加上 `?domain=btbtt15.com` 即可,此时路由为 [`/btzj?domain=btbtt15.com`](https://rsshub.app/btzj?domain=btbtt15.com) - - 如果加入了分类参数,直接在分类参数后加入 `?domain=<域名>` 即可。如指定分类 [剧集](https://www.btbtt20.com/forum-index-fid-950.htm) `https://www.btbtt20.com/forum-index-fid-950.htm` 并指定域名为 `https://www.btbtt15.com`,即在 `/btzj/forum-index-fid-950` 后加上 `?domain=btbtt15.com`,此时路由为 [`/btzj/forum-index-fid-950?domain=btbtt15.com`](https://rsshub.app/btzj/forum-index-fid-950?domain=btbtt15.com) - - 目前,你可以选择的域名有 `btbtt10-20.com` 共 10 个,或 `88btbbt.com`,该站也提供了专用网址查询工具。详见 [此贴](https://www.btbtt20.com/thread-index-fid-2-tid-4550191.htm) - ::: -</Route> - -### 最新种子 {#bt-zhi-jia-zui-xin-zhong-zi} - -<Route author="zhang-wangz nczitzk" example="/btzj/base" path="/btzj/:type?" anticrawler="1" paramsDesc={['type,见下表']}> - | base | govern | - | -------------------------- | ------------------------ | - | `https://www.88btbtt.com/` | `http://www.2btjia.com/` | -</Route> +<Route namespace="btzj" data={{"path":"/:category?","categories":["multimedia"],"example":"/btzj","parameters":{"category":"分类,可在对应分类页 URL 中找到,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["btbtt20.com/"]},"name":"分类","maintainers":["nczitzk"],"url":"btbtt20.com/","description":":::tip\n 分类页中域名末尾到 `.htm` 前的字段即为对应分类,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm) `https://www.btbtt20.com/forum-index-fid-951.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-951`,所以路由应为 [`/btzj/forum-index-fid-951`](https://rsshub.app/btzj/forum-index-fid-951)\n\n 部分分类页,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm)、[剧集](https://www.btbtt20.com/forum-index-fid-950.htm) 等,提供了更复杂的分类筛选。你可以将选项选中后,获得结果分类页 URL 中分类参数,构成路由。如选中分类 [高清电影 - 年份:2021 - 地区:欧美](https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm) `https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`,所以路由应为 [`/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`](https://rsshub.app/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0)\n :::\n\n 基础分类如下:\n\n | 交流 | 电影 | 剧集 | 高清电影 |\n | ------------------- | ------------------- | ------------------- | -------------------- |\n | forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 |\n\n | 音乐 | 动漫 | 游戏 | 综艺 |\n | ------------------- | ------------------- | ------------------- | -------------------- |\n | forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 |\n\n | 图书 | 美图 | 站务 | 科技 |\n | -------------------- | ------------------- | ----------------- | ------------------- |\n | forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 |\n\n | 求助 | 音轨字幕 |\n | -------------------- | -------------------- |\n | forum-index-fid-1187 | forum-index-fid-1191 |\n\n :::tip\n BT 之家的域名会变更,本路由以 `https://www.btbtt20.com` 为默认域名,若该域名无法访问,可以通过在路由后方加上 `?domain=<域名>` 指定路由访问的域名。如指定域名为 `https://www.btbtt15.com`,则在 `/btzj` 后加上 `?domain=btbtt15.com` 即可,此时路由为 [`/btzj?domain=btbtt15.com`](https://rsshub.app/btzj?domain=btbtt15.com)\n\n 如果加入了分类参数,直接在分类参数后加入 `?domain=<域名>` 即可。如指定分类 [剧集](https://www.btbtt20.com/forum-index-fid-950.htm) `https://www.btbtt20.com/forum-index-fid-950.htm` 并指定域名为 `https://www.btbtt15.com`,即在 `/btzj/forum-index-fid-950` 后加上 `?domain=btbtt15.com`,此时路由为 [`/btzj/forum-index-fid-950?domain=btbtt15.com`](https://rsshub.app/btzj/forum-index-fid-950?domain=btbtt15.com)\n\n 目前,你可以选择的域名有 `btbtt10-20.com` 共 10 个,或 `88btbbt.com`,该站也提供了专用网址查询工具。详见 [此贴](https://www.btbtt20.com/thread-index-fid-2-tid-4550191.htm)\n :::","location":"index.ts"}} /> :::tip -由于 BT 之家域名有多个。此 feed 对应[`https://www.88btbtt.com`](https://www.88btbtt.com)域名和[`http://www.2btjia.com/`](http://www.2btjia.com/)域名. -可空,默认为 base +分类页中域名末尾到 `.htm` 前的字段即为对应分类,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm) `https://www.btbtt20.com/forum-index-fid-951.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-951`,所以路由应为 [`/btzj/forum-index-fid-951`](https://rsshub.app/btzj/forum-index-fid-951) + +部分分类页,如 [电影](https://www.btbtt20.com/forum-index-fid-951.htm)、[剧集](https://www.btbtt20.com/forum-index-fid-950.htm) 等,提供了更复杂的分类筛选。你可以将选项选中后,获得结果分类页 URL 中分类参数,构成路由。如选中分类 [高清电影 - 年份:2021 - 地区:欧美](https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm) `https://www.btbtt20.com/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0.htm` 中域名末尾到 `.htm` 前的字段为 `forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`,所以路由应为 [`/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0`](https://rsshub.app/btzj/forum-index-fid-1183-typeid1-0-typeid2-738-typeid3-10086-typeid4-0) +::: + +基础分类如下: + +| 交流 | 电影 | 剧集 | 高清电影 | +| ------------------- | ------------------- | ------------------- | -------------------- | +| forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 | + +| 音乐 | 动漫 | 游戏 | 综艺 | +| ------------------- | ------------------- | ------------------- | -------------------- | +| forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 | + +| 图书 | 美图 | 站务 | 科技 | +| -------------------- | ------------------- | ----------------- | ------------------- | +| forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 | + +| 求助 | 音轨字幕 | +| -------------------- | -------------------- | +| forum-index-fid-1187 | forum-index-fid-1191 | + +:::tip +BT 之家的域名会变更,本路由以 `https://www.btbtt20.com` 为默认域名,若该域名无法访问,可以通过在路由后方加上 `?domain=<域名>` 指定路由访问的域名。如指定域名为 `https://www.btbtt15.com`,则在 `/btzj` 后加上 `?domain=btbtt15.com` 即可,此时路由为 [`/btzj?domain=btbtt15.com`](https://rsshub.app/btzj?domain=btbtt15.com) + +如果加入了分类参数,直接在分类参数后加入 `?domain=<域名>` 即可。如指定分类 [剧集](https://www.btbtt20.com/forum-index-fid-950.htm) `https://www.btbtt20.com/forum-index-fid-950.htm` 并指定域名为 `https://www.btbtt15.com`,即在 `/btzj/forum-index-fid-950` 后加上 `?domain=btbtt15.com`,此时路由为 [`/btzj/forum-index-fid-950?domain=btbtt15.com`](https://rsshub.app/btzj/forum-index-fid-950?domain=btbtt15.com) + +目前,你可以选择的域名有 `btbtt10-20.com` 共 10 个,或 `88btbbt.com`,该站也提供了专用网址查询工具。详见 [此贴](https://www.btbtt20.com/thread-index-fid-2-tid-4550191.htm) +::: + +## BT 之家 1LOU 站 {#bt-zhi-jia-1lou-zhan} + +### 搜索 {#bt-zhi-jia-1lou-zhan-sou-suo} + +<Route namespace="1lou" data={{"path":"/:path?","categories":["multimedia"],"example":"/1lou/search-繁花.htm","parameters":{"path":"路径信息在URL里找到,主页为 index"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["1lou.me/:path"],"target":"/:path"},"name":"搜索","maintainers":["falling"],"description":":::tip\n 将 1lou.me/ 后的内容作为参数传入到 path 即可\n\n [www.1lou.me/search - 繁花.htm](http://www.1lou.me/search-繁花.htm) --> /1lou/search - 繁花.htm\n\n [www.1lou.me/forum-1.htm](http://www.1lou.me/forum-1.htm) --> /1lou/forum-1.htm\n\n [www.1lou.me/](http://www.1lou.me/) --> /1lou/\n :::","location":"index.ts"}} /> + +:::tip +将 1lou.me/ 后的内容作为参数传入到 path 即可 + +[www.1lou.me/search - 繁花.htm](http://www.1lou.me/search-繁花.htm) --> /1lou/search - 繁花.htm + +[www.1lou.me/forum-1.htm](http://www.1lou.me/forum-1.htm) --> /1lou/forum-1.htm + +[www.1lou.me/](http://www.1lou.me/) --> /1lou/ ::: ## CNTV {#cntv} ### 栏目 {#cntv-lan-mu} +<Route namespace="cntv" data={{"path":"/:column","categories":["multimedia"],"example":"/cntv/TOPC1451528971114112","parameters":{"column":"栏目ID, 可在对应CNTV栏目页面找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["navi.cctv.com/"]},"name":"栏目","maintainers":["WhoIsSure","Fatpandac"],"url":"navi.cctv.com/","description":":::tip\n栏目 ID 查找示例:\n打开栏目具体某一期页面,F12 控制台输入`column_id`得到栏目 ID。\n:::\n\n 栏目\n\n | 新闻联播 | 新闻周刊 | 天下足球 |\n | -------------------- | -------------------- | -------------------- |\n | TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 |","location":"column.ts"}} /> + :::tip 栏目 ID 查找示例: 打开栏目具体某一期页面,F12 控制台输入`column_id`得到栏目 ID。 ::: -<Route author="WhoIsSure Fatpandac" example="/cntv/TOPC1451528971114112" path="/cntv/:column" paramsDesc={['栏目ID, 可在对应CNTV栏目页面找到']}> - 栏目 +栏目 - | 新闻联播 | 新闻周刊 | 天下足球 | - | -------------------- | -------------------- | -------------------- | - | TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 | -</Route> +| 新闻联播 | 新闻周刊 | 天下足球 | +| -------------------- | -------------------- | -------------------- | +| TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 | ## Coomer {#coomer} ### Artist {#coomer-artist} -<Route author="nczitzk" example="/coomer/artist/belledelphine" path="/coomer/artist/:id" paramsDesc={['Artist id, can be found in URL']} /> +<Route namespace="coomer" data={{"path":"/artist/:id","categories":["multimedia"],"example":"/coomer/artist/belledelphine","parameters":{"id":"Artist id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["coomer.party/onlyfans/user/:id","coomer.party/"]},"name":"Artist","maintainers":["nczitzk"],"location":"artist.ts"}} /> ### Recent Posts {#coomer-recent-posts} -<Route author="nczitzk" example="/coomer/posts" path="/coomer/posts" /> +<Route namespace="coomer" data={{"path":"/posts","categories":["multimedia"],"example":"/coomer/posts","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["coomer.party/posts","coomer.party/"]},"name":"Recent Posts","maintainers":["nczitzk"],"url":"coomer.party/posts","location":"posts.ts"}} /> ## DoMP4 影视 {#domp4-ying-shi} @@ -409,13 +217,9 @@ Full transcript support for better user experience. ``` ::: -### 最近更新 {#domp4-ying-shi-zui-jin-geng-xin} - -<Route author="savokiss" example="/domp4/latest/vod" path="/domp4/latest/:type?" paramsDesc={['`vod` 代表电影,`tv` 代表电视剧,默认 vod']} radar="1" /> - ### 剧集订阅 {#domp4-ying-shi-ju-ji-ding-yue} -<Route author="savokiss" example="/domp4/detail/LBTANI22222I" path="/domp4/detail/:id" paramsDesc={['从剧集详情页 URL 处获取,如:`https://www.mp4kan.com/html/LBTANI22222I.html`,取 `.html` 前面部分']} radar="1" supportBT="1" /> +<Route namespace="domp4" data={{"path":"/detail/:id","categories":["multimedia"],"example":"/domp4/detail/LBTANI22222I","parameters":{"id":"从剧集详情页 URL 处获取,如:`https://www.mp4kan.com/html/LBTANI22222I.html`,取 `.html` 前面部分"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["domp4.cc/detail/:id"]},"name":"剧集订阅","maintainers":["savokiss"],"description":":::tip\n由于大部分详情页是 `/html/xxx.html`,还有部分是 `/detail/123.html`,所以此处做了兼容,id 取 `xxx` 或者 `123` 都可以。\n\n新增 `second` 参数,用于选择下载地址二(地址二不可用或者不填都默认地址一),用法: `/domp4/detail/LBTANI22222I?second=1`。\n:::","location":"detail.ts"}} /> :::tip 由于大部分详情页是 `/html/xxx.html`,还有部分是 `/detail/123.html`,所以此处做了兼容,id 取 `xxx` 或者 `123` 都可以。 @@ -423,198 +227,28 @@ Full transcript support for better user experience. 新增 `second` 参数,用于选择下载地址二(地址二不可用或者不填都默认地址一),用法: `/domp4/detail/LBTANI22222I?second=1`。 ::: -## E-Hentai {#e-hentai} +### 最近更新 {#domp4-ying-shi-zui-jin-geng-xin} -### 分类 {#e-hentai-fen-lei} - -<Route author="nczitzk" example="/e-hentai/category/manga" path="/e-hentai/category/:category?/:needTorrents?/:needImages?" paramsDesc={['分类,可在对应分类页中找到,默认为首页', '需要输出种子文件,填写 true/yes 表示需要,默认需要', '需要显示大图,填写 true/yes 表示需要,默认需要']}> - :::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 | -</Route> - -### 标签 {#e-hentai-biao-qian} - -<Route author="nczitzk" example="/e-hentai/tag/language:chinese" path="/e-hentai/tag/:tag?" paramsDesc={['标签,可在对应标签页中找到,默认为首页']}> - :::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) - ::: -</Route> - -### 搜索 {#e-hentai-sou-suo} - -<Route author="nczitzk" example="/e-hentai/search/f_search=haha" path="/e-hentai/search/:keyword?" paramsDesc={['关键字,可以在搜索结果页的 URL 中找到,默认为首页']}> - :::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) - ::: -</Route> - -## EZTV {#eztv} - -:::tip -Official RSS: [https://eztv.io/ezrss.xml](https://eztv.io/ezrss.xml) -::: - -### Lookup Torrents by IMDB ID {#eztv-lookup-torrents-by-imdb-id} - -<Route author="Songkeys" example="/eztv/torrents/6048596" path="/eztv/torrents/:imdb_id" paramsDesc={['The IMDB ID corresponding to the seed of show you want to search can be found on the official website [IMDB](https://www.imdb.com)']} supportBT="1" anticrawler="1" /> +<Route namespace="domp4" data={{"path":"/latest/:type?","categories":["multimedia"],"example":"/domp4/latest/vod","parameters":{"type":"`vod` 代表电影,`tv` 代表电视剧,默认 vod"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["domp4.cc/","domp4.cc/custom/update.html"]},"name":"最近更新","maintainers":["savokiss"],"url":"domp4.cc/","location":"latest.ts"}} /> ## FIX 字幕侠 {#fix-zi-mu-xia} ### 分类 {#fix-zi-mu-xia-fen-lei} -<Route author="nczitzk" example="/zimuxia" path="/zimuxia/:category?" paramsDesc={['分类,见下表,默认为 ALL']}> - | ALL | FIX 德语社 | 欧美剧集 | 欧美电影 | 综艺 & 纪录 | FIX 日语社 | FIX 韩语社 | FIX 法语社 | - | --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- | - | | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 | -</Route> +<Route namespace="zimuxia" data={{"path":"/:category?","categories":["multimedia"],"example":"/zimuxia","parameters":{"category":"分类,见下表,默认为 ALL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| ALL | FIX 德语社 | 欧美剧集 | 欧美电影 | 综艺 & 纪录 | FIX 日语社 | FIX 韩语社 | FIX 法语社 |\n | --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- |\n | | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 |","location":"index.ts"}} /> + +| ALL | FIX 德语社 | 欧美剧集 | 欧美电影 | 综艺 & 纪录 | FIX 日语社 | FIX 韩语社 | FIX 法语社 | +| --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- | +| | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 | ### 剧集 {#fix-zi-mu-xia-ju-ji} -<Route author="nczitzk" example="/zimuxia/portfolio/我们这一天" path="/zimuxia/portfolio/:id" paramsDesc={['剧集名,可在剧集页 URL 中找到']} /> +<Route namespace="zimuxia" data={{"path":"/portfolio/:id","categories":["multimedia"],"example":"/zimuxia/portfolio/我们这一天","parameters":{"id":"剧集名,可在剧集页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zimuxia.cn/portfolio/:id"]},"name":"剧集","maintainers":["nczitzk"],"description":":::tip\n本路由以 `magnet` 为默认 linktype,可以通过在路由后方加上 `?linktype=链接类型` 指定导出的链接类型。比如路由为 [`/zimuxia/portfolio/我们这一天?linktype=baidu`](https://rsshub.app/zimuxia/portfolio/我们这一天?linktype=baidu) 来导出百度盘链接。目前,你可以选择的 `链接类型` 包括: `magnet`(默认), `all`(所有), `ed2k`(电驴), `baidu`(百度盘), `quark`(夸克盘), `115`(115 盘), `subhd`(字幕).\n:::","location":"portfolio.ts"}} /> :::tip 本路由以 `magnet` 为默认 linktype,可以通过在路由后方加上 `?linktype=链接类型` 指定导出的链接类型。比如路由为 [`/zimuxia/portfolio/我们这一天?linktype=baidu`](https://rsshub.app/zimuxia/portfolio/我们这一天?linktype=baidu) 来导出百度盘链接。目前,你可以选择的 `链接类型` 包括: `magnet`(默认), `all`(所有), `ed2k`(电驴), `baidu`(百度盘), `quark`(夸克盘), `115`(115 盘), `subhd`(字幕). ::: -## Hentaimama {#hentaimama} - -### Recent Videos {#hentaimama-recent-videos} - -<Route author="everyonus" example="/hentaimama/videos" path="/hentaimama/videos" /> - -## JavBus {#javbus} - -:::warning -Requests from non-Asia areas will be redirected to login page. -::: - -:::tip[Language] -You can change the language of each route to the languages listed below. - -| English | 日本语 | 한국의 | 中文 | -| ------- | ------ | ------ | ---------------- | -| en | ja | ko | (leave it empty) | -::: - -:::tip -JavBus has multiple backup domains, these routes use default domain `https://javbus.com`. If the domain is unreachable, you can add `?domain=<domain>` to the end of the route to specify the domain to visit. Let say you want to use the backup domain `https://javsee.icu`, you can add `?domain=javsee.icu` to the end of the route, then the route will be [`/javbus/en?domain=javsee.icu`](https://rsshub.app/javbus?domain=javsee.icu) - -**Note**: **Western** has different domain than the main site, the backup domains are also different. The default domain is `https://javbus.org` and you can add `?western_domain=<domain>` to the end of the route to specify the domain to visit. Let say you want to use the backup domain `https://javsee.one`, you can add `?western_domain=javsee.one` to the end of the route, then the route will be [`/javbus/western/en?western_domain=javsee.one`](https://rsshub.app/javbus/western?western_domain=javsee.one) -::: - -### Censored - Home {#javbus-censored-home} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en" path="/javbus/en" anticrawler="1" /> - -### Censored - Genre {#javbus-censored-genre} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/genre/7g" path="/javbus/en/genre/:id" paramsDesc={['Genre id, can be found in URL']} anticrawler="1"> - For more genre, please visit [Censored - Genre](https://www.javbus.com/en/genre) -</Route> - -### Censored - Actresses {#javbus-censored-actresses} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/star/2jv" path="/javbus/en/star/:id" paramsDesc={['Actresses id, can be found in URL']} anticrawler="1"> - For more actresses, please visit [Censored JAV Idols](https://www.javbus.com/en/actresses) -</Route> - -### Censored - Series {#javbus-censored-series} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/series/44q" path="/javbus/en/series/:id" paramsDesc={['Series id, can be found in URL']} anticrawler="1" /> - -### Censored - Studio {#javbus-censored-studio} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/studio/ej" path="/javbus/en/studio/:id" paramsDesc={['Studio id, can be found in URL']} anticrawler="1" /> - -### Censored - Label {#javbus-censored-label} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/label/x8" path="/javbus/en/label/:id" paramsDesc={['Label id, can be found in URL']} anticrawler="1" /> - -### Censored - Director {#javbus-censored-director} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/director/4gv" path="/javbus/en/director/:id" paramsDesc={['Director id, can be found in URL']} anticrawler="1" /> - -### Censored - Search {#javbus-censored-search} - -<Route author="nczitzk" example="/javbus/en/search/REBD" path="/javbus/en/search/:keyword" paramsDesc={['Keyword, empty by default']} anticrawler="1" /> - -### Uncensored - Home {#javbus-uncensored-home} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/uncensored" path="/javbus/en/uncensored" anticrawler="1" /> - -### Uncensored - Genre {#javbus-uncensored-genre} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/uncensored/genre/1bc" path="/javbus/en/uncensored/genre/:id" paramsDesc={['Genre id, can be found in URL']} anticrawler="1"> - For more genre, please visit [Uncensored - Genre](https://www.javbus.com/en/uncensored/genre) -</Route> - -### Uncensored - Actresses {#javbus-uncensored-actresses} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/uncensored/star/b5b" path="/javbus/en/uncensored/star/:id" paramsDesc={['Actresses id, can be found in URL']} anticrawler="1"> - For more actresses, please visit [Uncensored JAV Idols](https://www.javbus.com/en/uncensored/actresses) -</Route> - -### Uncensored - Series {#javbus-uncensored-series} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/uncensored/series/1ft" path="/javbus/en/uncensored/series/:id" paramsDesc={['系列 id, can be found in URL']} anticrawler="1" /> - -### Uncensored - Studio {#javbus-uncensored-studio} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/uncensored/studio/3n" path="/javbus/en/uncensored/studio/:id" paramsDesc={[', can be found in URL']} anticrawler="1" /> - -### Uncensored - Search {#javbus-uncensored-search} - -<Route author="nczitzk" example="/javbus/en/uncensored/search/HEYZO" path="/javbus/en/uncensored/search/:keyword" paramsDesc={['Keyword, empty by default']} anticrawler="1" /> - -### Western - Home {#javbus-western-home} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/western" path="/javbus/en/western" anticrawler="1" /> - -### Western - Genre {#javbus-western-genre} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/western/genre/86" path="/javbus/en/western/genre/:id" paramsDesc={['Genre id, can be found in URL']} anticrawler="1"> - For more genre, please visit [Genre - Video](https://www.javbus.org/en/genre) -</Route> - -### Western - Actresses {#javbus-western-actresses} - -<Route author="MegrezZhu CoderTonyChan nczitzk" example="/javbus/en/western/star/4hv" path="/javbus/en/western/star/:id" paramsDesc={['Actresses id, can be found in URL']} anticrawler="1"> - For more actresses [Western AV Idols](https://www.javbus.org/en/actresses) -</Route> - -### Western - Series {#javbus-western-series} - -<Route author="MegrezZhu CoderTonyChan Felix2yu nczitzk" example="/javbus/en/western/series/20" path="/javbus/en/western/series/:id" paramsDesc={['Series id, can be found in URL']} anticrawler="1" /> - -### Western - Studio {#javbus-western-studio} - -<Route author="nczitzk" example="/javbus/en/western/studio/4" path="/javbus/en/western/studio/:id" paramsDesc={['Studio id, can be found in URLL']} anticrawler="1" /> - -### Western - Search {#javbus-western-search} - -<Route author="nczitzk" example="/javbus/en/western/search/Brazzers" path="/javbus/en/western/search/:keyword" paramsDesc={['Keyword, empty by default']} anticrawler="1" /> - ## JavDB {#javdb} :::tip @@ -631,465 +265,247 @@ JavDB 有多个备用域名,本路由默认使用永久域名 `https://javdb.c 因为该站有反爬检测,所以不应将此值调整过高 ::: -### 主页 {#javdb-zhu-ye} - -<Route author="nczitzk" example="/javdb" path="/javdb/:category?/:sort?/:filter?" paramsDesc={['分类,见下表,默认为 `有碼`', '排序,见下表,默认为 `磁鏈更新排序`', '过滤,见下表,默认为 `可下载`']} anticrawler="1"> - 分类 - - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western | - - 排序 - - | 发布日期排序 | 磁鏈更新排序 | - | ------------ | ------------ | - | 1 | 2 | - - 过滤 - - | 全部 | 可下载 | 含字幕 | 含短評 | - | ---- | ------ | ------ | ------ | - | 0 | 1 | 2 | 3 | -</Route> - ### 分類 {#javdb-fen-lei} -<Route author="nczitzk" example="/javdb/tags/c2=5&c10=1" path="/javdb/tags/:query?/:category?" paramsDesc={['筛选,默认为 `c10=1`', '分类,见下表,默认为 `有碼`']} anticrawler="1"> - :::tip - 在 [分類](https://javdb.com/tags) 中选定分类后,URL 中 `tags?` 后的字段即为筛选参数。 +<Route namespace="javdb" data={{"path":"/tags/:query?/:category?","categories":["multimedia"],"example":"/javdb/tags/c2=5&c10=1","parameters":{"query":"筛选,默认为 `c10=1`","category":"分类,见下表,默认为 `有碼`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"分類","maintainers":["nczitzk"],"url":"javdb.com/","description":":::tip\n 在 [分類](https://javdb.com/tags) 中选定分类后,URL 中 `tags?` 后的字段即为筛选参数。\n\n 如 `https://javdb.com/tags?c2=5&c10=1` 中 `c2=5&c10=1` 为筛选参数。\n :::\n\n 分类\n\n | 有碼 | 無碼 | 歐美 |\n | -------- | ---------- | ------- |\n | censored | uncensored | western |","location":"tags.ts"}} /> - 如 `https://javdb.com/tags?c2=5&c10=1` 中 `c2=5&c10=1` 为筛选参数。 - ::: +:::tip +在 [分類](https://javdb.com/tags) 中选定分类后,URL 中 `tags?` 后的字段即为筛选参数。 - 分类 +如 `https://javdb.com/tags?c2=5&c10=1` 中 `c2=5&c10=1` 为筛选参数。 +::: - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western | -</Route> +分类 + +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | ### 排行榜 {#javdb-pai-hang-bang} -<Route author="nczitzk" example="/javdb/rankings" path="/javdb/rankings/:category?/:time?" paramsDesc={['分类,见下表,默认为 `有碼`', '时间,见下表,默认为 `日榜`']} anticrawler="1"> - 分类 +<Route namespace="javdb" data={{"path":"/rankings/:category?/:time?","categories":["multimedia"],"example":"/javdb/rankings","parameters":{"category":"分类,见下表,默认为 `有碼`","time":"时间,见下表,默认为 `日榜`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"排行榜","maintainers":["nczitzk"],"url":"javdb.com/","description":"分类\n\n | 有碼 | 無碼 | 歐美 |\n | -------- | ---------- | ------- |\n | censored | uncensored | western |\n\n 时间\n\n | 日榜 | 週榜 | 月榜 |\n | ----- | ------ | ------- |\n | daily | weekly | monthly |","location":"rankings.ts"}} /> - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western | +分类 - 时间 +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | - | 日榜 | 週榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly | -</Route> +时间 -### 搜索 {#javdb-sou-suo} - -<Route author="nczitzk" example="/javdb/search/巨乳" path="/javdb/search/:keyword?/:filter?/:sort?" paramsDesc={['关键字,默认为空', '过滤,见下表,默认为 `可播放`', '排序,见下表,默认为 `按相关度排序`']} anticrawler="1"> - 过滤 - - | 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 | - | ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- | - | | none | playable | single | actor | maker | director | series | code | download | cnsub | preview | - - 排序 - - | 按相关度排序 | 按发布时间排序 | - | ------------ | -------------- | - | 0 | 1 | -</Route> - -### 演員 {#javdb-yan-yuan} - -<Route author="nczitzk" example="/javdb/actors/R2Vg" path="/javdb/actors/:id/:filter?" paramsDesc={['编号,可在演员页 URL 中找到', '过滤,见下表,默认为 `全部`']} anticrawler="1"> - | 全部 | 可播放 | 單體作品 | 可下載 | 含字幕 | - | ---- | ------ | -------- | ------ | ------ | - | | p | s | d | c | - - 所有演员编号参见 [演員庫](https://javdb.com/actors) -</Route> - -### 系列 {#javdb-xi-lie} - -<Route author="nczitzk" example="/javdb/series/1NW" path="/javdb/series/:id/:filter?" paramsDesc={['编号,可在系列页 URL 中找到', '过滤,见下表,默认为 `全部`']} anticrawler="1"> - | 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | - | ---- | -------- | -------- | -------- | ----- | ------- | - | | playable | single | download | cnsub | preview | - - 所有系列编号参见 [系列庫](https://javdb.com/series) -</Route> +| 日榜 | 週榜 | 月榜 | +| ----- | ------ | ------- | +| daily | weekly | monthly | ### 片商 {#javdb-pian-shang} -<Route author="nczitzk" example="/javdb/makers/7R" path="/javdb/makers/:id/:filter?" paramsDesc={['编号,可在片商页 URL 中找到', '过滤,见下表,默认为 `全部`']} anticrawler="1"> - | 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | - | ---- | -------- | -------- | -------- | ----- | ------- | - | | playable | single | download | cnsub | preview | +<Route namespace="javdb" data={{"path":"/makers/:id/:filter?","categories":["multimedia"],"example":"/javdb/makers/7R","parameters":{"id":"编号,可在片商页 URL 中找到","filter":"过滤,见下表,默认为 `全部`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"片商","maintainers":["nczitzk"],"url":"javdb.com/","description":"| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 |\n | ---- | -------- | -------- | -------- | ----- | ------- |\n | | playable | single | download | cnsub | preview |\n\n 所有片商编号参见 [片商庫](https://javdb.com/makers)","location":"makers.ts"}} /> - 所有片商编号参见 [片商庫](https://javdb.com/makers) -</Route> +| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | +| ---- | -------- | -------- | -------- | ----- | ------- | +| | playable | single | download | cnsub | preview | -### 清单 {#javdb-qing-dan} +所有片商编号参见 [片商庫](https://javdb.com/makers) -<Route author="dddepg" example="/javdb/lists/2GPgB" path="/lists/:id/:filter?/:sort?" paramsDesc={['编号,可在清单页 URL 中找到', '过滤,见下表,默认为 `全部`,需要占位时可设置为 `none`', '排序,见下表,默认为 `加入时间排序`']} anticrawler="1"> - 过滤 +### 搜索 {#javdb-sou-suo} - | 全部 | 占位 | 可播放 | 單體作品 | 含磁链 | 含字幕 | 預覽圖 | - | ---- | ---- | -------- | -------- | -------- | ------ | ------- | - | | none | playable | single | download | cnsub | preview | +<Route namespace="javdb" data={{"path":"/search/:keyword?/:filter?/:sort?","categories":["multimedia"],"example":"/javdb/search/巨乳","parameters":{"keyword":"关键字,默认为空","filter":"过滤,见下表,默认为 `可播放`","sort":"排序,见下表,默认为 `按相关度排序`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"搜索","maintainers":["nczitzk"],"url":"javdb.com/","description":"过滤\n\n | 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 |\n | ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- |\n | | none | playable | single | actor | maker | director | series | code | download | cnsub | preview |\n\n 排序\n\n | 按相关度排序 | 按发布时间排序 |\n | ------------ | -------------- |\n | 0 | 1 |","location":"search.ts"}} /> - 排序 +过滤 - | 加入时间排序 | 发布时间排序 | - | ------------ | ------------ | - | 0 | 1 | -</Route> +| 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 | +| ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- | +| | none | playable | single | actor | maker | director | series | code | download | cnsub | preview | + +排序 + +| 按相关度排序 | 按发布时间排序 | +| ------------ | -------------- | +| 0 | 1 | + +### 系列 {#javdb-xi-lie} + +<Route namespace="javdb" data={{"path":"/series/:id/:filter?","categories":["multimedia"],"example":"/javdb/series/1NW","parameters":{"id":"编号,可在系列页 URL 中找到","filter":"过滤,见下表,默认为 `全部`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"系列","maintainers":["nczitzk"],"url":"javdb.com/","description":"| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 |\n | ---- | -------- | -------- | -------- | ----- | ------- |\n | | playable | single | download | cnsub | preview |\n\n 所有系列编号参见 [系列庫](https://javdb.com/series)","location":"series.ts"}} /> + +| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | +| ---- | -------- | -------- | -------- | ----- | ------- | +| | playable | single | download | cnsub | preview | + +所有系列编号参见 [系列庫](https://javdb.com/series) + +### 演員 {#javdb-yan-yuan} + +<Route namespace="javdb" data={{"path":"/actors/:id/:filter?","categories":["multimedia"],"example":"/javdb/actors/R2Vg","parameters":{"id":"编号,可在演员页 URL 中找到","filter":"过滤,见下表,默认为 `全部`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["javdb.com/"],"target":""},"name":"演員","maintainers":["nczitzk"],"url":"javdb.com/","description":"| 全部 | 可播放 | 單體作品 | 可下載 | 含字幕 |\n | ---- | ------ | -------- | ------ | ------ |\n | | p | s | d | c |\n\n 所有演员编号参见 [演員庫](https://javdb.com/actors)","location":"actors.ts"}} /> + +| 全部 | 可播放 | 單體作品 | 可下載 | 含字幕 | +| ---- | ------ | -------- | ------ | ------ | +| | p | s | d | c | + +所有演员编号参见 [演員庫](https://javdb.com/actors) ## JAVLibrary {#javlibrary} -### Recently Discussed Videos {#javlibrary-recently-discussed-videos} - -<Route author="nczitzk" example="/javlibrary/update/en" path="/javlibrary/update/:language?" paramsDesc={['Language, see below, Japanese by default, as `ja`']} radar="1" anticrawler="1" /> - -### New Releases {#javlibrary-new-releases} - -<Route author="nczitzk" example="/javlibrary/newrelease/en" path="/javlibrary/newrelease/:language?/:mode?" paramsDesc={['Language, see below, Japanese by default, as `ja`', 'Mode, see below, videos with comments (by date) by default, as `1`']} radar="1" anticrawler="1"> - | videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | -</Route> - -### Recently Inserted Videos {#javlibrary-recently-inserted-videos} - -<Route author="nczitzk" example="/javlibrary/newentries/en" path="/javlibrary/newentries/:language?" paramsDesc={['Language, see below, Japanese by default, as `ja`']} radar="1" anticrawler="1" /> - -### Most Wanted Videos {#javlibrary-most-wanted-videos} - -<Route author="nczitzk" example="/javlibrary/mostwanted/en" path="/javlibrary/mostwanted/:language?/:mode?" paramsDesc={['Language, see below, Japanese by default, as `ja`', 'Mode, see below, Last Month by default, as `1`']} radar="1" anticrawler="1"> - | Last Month | All Time | - | ---------- | -------- | - | 1 | 2 | -</Route> - -### Best Rated Videos {#javlibrary-best-rated-videos} - -<Route author="nczitzk" example="/javlibrary/bestrated/en" path="/javlibrary/bestrated/:language?/:mode?" paramsDesc={['Language, see below, Japanese by default, as `ja`', 'Mode, see below, Last Month by default, as `1`']} radar="1" anticrawler="1"> - | Last Month | All Time | - | ---------- | -------- | - | 1 | 2 | -</Route> - ### Best Reviews {#javlibrary-best-reviews} -<Route author="DCJaous nczitzk" example="/javlibrary/bestreviews/en" path="/javlibrary/bestreviews/:language?/:mode?" paramsDesc={['Language, see below, Japanese by default, as `ja`', 'Mode, see below, Last Month by default, as `1`']} radar="1" anticrawler="1"> - | Last Month | All Time | - | ---------- | -------- | - | 1 | 2 | -</Route> +<Route namespace="javlibrary" data={{"path":"/bestreviews/:language?/:mode?","categories":["multimedia"],"example":"/javlibrary/bestreviews/en","parameters":{"language":"Language, see below, Japanese by default, as `ja`","mode":"Mode, see below, Last Month by default, as `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Best Reviews","maintainers":["nczitzk"],"description":"| Last Month | All Time |\n | ---------- | -------- |\n | 1 | 2 |","location":"bestreviews.ts"}} /> -### Videos by categories {#javlibrary-videos-by-categories} - -<Route author="nczitzk" example="/javlibrary/genre/amjq/en" path="/javlibrary/genre/:genre?/:language?/:mode?" paramsDesc={['Category, Acme · Orgasm by default, as `amjq`', 'Language, see below, Japanese by default, as `ja`', 'Mode, see below, videos with comments (by date) by default, as `1`']} radar="1" anticrawler="1"> - | videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | - - :::tip - See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories. - ::: -</Route> +| Last Month | All Time | +| ---------- | -------- | +| 1 | 2 | ### Videos by makers {#javlibrary-videos-by-makers} -<Route author="Huzhixin00" example="/javlibrary/videos/maker/arlq/cn" path="/javlibrary/videos/maker/:maker?/:language?/:mode?" paramsDesc={['Maker, S1 NO.1 STYLE by default, as `arlq`', 'Language, see below, Japanese by default, as `ja`', 'Mode, see below, videos with comments (by date) by default, as `1`']} radar="1" anticrawler="1"> - | videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | -</Route> +<Route namespace="javlibrary" data={{"path":"/videos/maker/:maker?/:language?/:mode?","categories":["multimedia"],"example":"/javlibrary/videos/maker/arlq/cn","parameters":{"maker":"Maker, S1 NO.1 STYLE by default, as `arlq`","language":"Language, see below, Japanese by default, as `ja`","mode":"Mode, see below, videos with comments (by date) by default, as `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Videos by makers","maintainers":[],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |","location":"maker.ts"}} /> + +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | ### Videos by star {#javlibrary-videos-by-star} -<Route author="DIYgod junfengP nczitzk" example="/javlibrary/star/abbds/en" path="/javlibrary/star/:id/:language?/:mode?" paramsDesc={['Star id, can be found in URL', 'Language, see below, Japanese by default, as `ja`', 'Mode, see below, videos with comments (by date) by default, as `1`']} radar="1" anticrawler="1"> - | videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | +<Route namespace="javlibrary" data={{"path":"/star/:id/:language?/:mode?","categories":["multimedia"],"example":"/javlibrary/star/abbds/en","parameters":{"id":"Star id, can be found in URL","language":"Language, see below, Japanese by default, as `ja`","mode":"Mode, see below, videos with comments (by date) by default, as `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Videos by star","maintainers":["nczitzk"],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |\n\n :::tip\n See [Ranking](https://www.javlibrary.com/en/star_mostfav.php) to view stars by ranks.\n\n See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars.\n :::","location":"star.ts"}} /> - :::tip - See [Ranking](https://www.javlibrary.com/en/star_mostfav.php) to view stars by ranks. +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | - See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars. - ::: -</Route> +:::tip +See [Ranking](https://www.javlibrary.com/en/star_mostfav.php) to view stars by ranks. -### Posts published by user {#javlibrary-posts-published-by-user} - -<Route author="Diygod junfengP nczitzk" example="/javlibrary/userposts/mangudai/en" path="/javlibrary/userposts/:id/:language?" paramsDesc={['User id, can be found in URL', 'Language, see below, Japanese by default, as `ja`']} radar="1" anticrawler="1" /> - -### Videos by user {#javlibrary-videos-by-user} - -<Route author="Diygod junfengP nczitzk" example="/javlibrary/userwatched/mangudai/en" path="/javlibrary/:type/:id/:language?" paramsDesc={['Type, see below', 'User id, can be found in URL', 'Language, see below, Japanese by default, as `ja`']} radar="1" anticrawler="1"> - | Wanted | Watched | Owned | - | ---------- | ----------- | --------- | - | userwanted | userwatched | userowned | -</Route> - -## Last.fm {#last-fm} - -### 用户播放记录 {#last-fm-yong-hu-bo-fang-ji-lu} - -<Route author="hoilc" example="/lastfm/recent/yeFoenix" path="/lastfm/recent/:user" paramsDesc={['Last.fm 用户名']} radar="1" /> - -### 用户 Love 记录 {#last-fm-yong-hu-love-ji-lu} - -<Route author="hoilc" example="/lastfm/loved/yeFoenix" path="/lastfm/loved/:user" paramsDesc={['Last.fm 用户名']} radar="1" /> - -### 站内 Top 榜单 {#last-fm-zhan-nei-top-bang-dan} - -<Route author="hoilc" example="/lastfm/top/spain" path="/lastfm/top/:country?" paramsDesc={['国家或地区, 需要符合`ISO 3166-1`的英文全称, 可参考`https://zh.wikipedia.org/wiki/ISO_3166-1二位字母代码#正式分配代码`']} radar="1" /> - -## Melon {#melon} - -### Chart {#melon-chart} - -<Route author="nczitzk" example="/melon/chart" path="/melon/chart/:category?" paramsDesc={['Category, see below, 24H by default']}> - | 24H | 일간 | 주간 | 월간 | - | --- | ---- | ---- | ----- | - | | day | week | month | -</Route> +See [Directory](https://www.javlibrary.com/en/star_list.php) to view all stars. +::: ## MissAV.com {#missav-com} ### 最近更新 {#missav-com-zui-jin-geng-xin} -<Route author="TonyRL" example="/missav/new" path="/missav/new" radar="1" /> +<Route namespace="missav" data={{"path":"/new","categories":["multimedia"],"example":"/missav/new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["missav.com/dm397/new","missav.com/new","missav.com/"]},"name":"最近更新","maintainers":["TonyRL"],"url":"missav.com/dm397/new","location":"new.ts"}} /> ## Mixcloud {#mixcloud} ### User {#mixcloud-user} -<Route author="Misaka13514" example="/mixcloud/dholbach/uploads" path="/mixcloud/:username/:type?" paramsDesc={['Username, can be found in URL', 'Type, see below, uploads by default']} radar="1" supportPodcast="1"> - | Shows | Favorites | History | Stream | - | ------- | --------- | ------- | ------ | - | uploads | favorites | listens | stream | -</Route> +<Route namespace="mixcloud" data={{"path":"/:username/:type?","categories":["multimedia"],"example":"/mixcloud/dholbach/uploads","parameters":{"username":"Username, can be found in URL","type":"Type, see below, uploads by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"User","maintainers":["Misaka13514"],"description":"| Shows | Favorites | History | Stream |\n | ------- | --------- | ------- | ------ |\n | uploads | favorites | listens | stream |","location":"index.ts"}} /> -## Netflav {#netflav} - -### Index {#netflav-index} - -<Route author="TonyRL" example="/netflav" path="/netflav" radar="1" /> +| Shows | Favorites | History | Stream | +| ------- | --------- | ------- | ------ | +| uploads | favorites | listens | stream | ## NEW 字幕组 {#new-zi-mu-zu} -### 分类 {#new-zi-mu-zu-fen-lei} - -<Route author="nczitzk" example="/newzmz" path="/newzmz/:category?/:downLinkType?" paramsDesc={['分类,见下表,默认为最近更新', '下载链接类型,默认为磁力链']}> - :::tip - `downLinkType` 参数指下载链接类型,默认为 **磁力链**。网站提供的下载链接类型包括但不限于 **磁力链**、**百度网盘**、**阿里云盘**、**夸克网盘**、**UC 网盘** 等。若无法找到指定类型的下载链接,将会返回第 1 条下载链接。 - - 与其他路由不同的是,本路由的 `limit` 参数作用于获取剧集数量,所以返回的总条目数根据每次获取的剧集所包含的条目变更而不同。 - ::: - - | 制作中 | 最近更新 | 剧集推荐 | 电影推荐 | 纪录片推荐 | 动画推荐 | 真人秀推荐 | - | ------ | -------- | -------- | -------- | ---------- | -------- | ---------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | -</Route> - ### 指定剧集 {#new-zi-mu-zu-zhi-ding-ju-ji} -<Route author="nczitzk" example="/newzmz/qEzRyY3v" path="/newzmz/:id?/:downLinkType?" paramsDesc={['剧集 id,可在剧集下载页 URL 中找到', '下载链接类型,默认为磁力链']}> - :::tip - [雪国列车 (剧版)](https://nzmz.xyz/details-qEzRyY3v.html) 的下载页 URL 为 `https://v.ys99.xyz/view/qEzRyY3v.html`,即剧集 id 为 `qEzRyY3v` - ::: -</Route> +<Route namespace="newzmz" data={{"path":"/:id?/:downLinkType?","categories":["multimedia"],"example":"/newzmz/qEzRyY3v","parameters":{"id":"剧集 id,可在剧集下载页 URL 中找到","downLinkType":"下载链接类型,默认为磁力链"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["newzmz.com/"],"target":""},"name":"指定剧集","maintainers":["nczitzk"],"url":"newzmz.com/","description":":::tip\n [雪国列车 (剧版)](https://nzmz.xyz/details-qEzRyY3v.html) 的下载页 URL 为 `https://v.ys99.xyz/view/qEzRyY3v.html`,即剧集 id 为 `qEzRyY3v`\n :::","location":"index.ts"}} /> + +:::tip +[雪国列车 (剧版)](https://nzmz.xyz/details-qEzRyY3v.html) 的下载页 URL 为 `https://v.ys99.xyz/view/qEzRyY3v.html`,即剧集 id 为 `qEzRyY3v` +::: ## Nyaa {#nyaa} ### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/search/psycho-pass" path="/nyaa/search/:query?" paramsDesc={['Search keyword']} supportBT="1" radar="1" /> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> -### User {#nyaa-user} +### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/user/silver-khaie" path="/nyaa/user/:username?" paramsDesc={['Username']} supportBT="1" radar="1" /> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> -### Search Result with specify user {#nyaa-search-result-with-specify-user} +### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/user/silver-khaie/search/a" path="/nyaa/user/:username/search/:query?" paramsDesc={['Username', 'Search keyword']} supportBT="1" radar="1" /> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> -### Sukebei Search Result {#nyaa-sukebei-search-result} +### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/sukebei/search/hi" path="/nyaa/sukebei/search/:query?" paramsDesc={['Search keyword']} supportBT="1" radar="1" /> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> -### Sukebei User {#nyaa-sukebei-user} +### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/sukebei/user/Tarakara168" path="/nyaa/sukebei/user/:username?" paramsDesc={['Username']} supportBT="1" radar="1" /> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> -### Sukebei search Result with specify user {#nyaa-sukebei-search-result-with-specify-user} +### Search Result {#nyaa-search-result} -<Route author="Lava-Swimmer noname1776" example="/nyaa/sukebei/user/Tarakara168/search/a" path="/nyaa/sukebei/user/:username/search/:query?" paramsDesc={['Username', 'Search keyword']} supportBT="1" radar="1" /> - -## OneJAV {#onejav} - -:::tip -官方提供的订阅源不支持 BT 下载订阅,地址为 [https://onejav.com/feeds/](https://onejav.com/feeds/) -::: - -### OneJAV BT {#onejav-onejav-bt} - -<Route author="monsterxcn" example="/onejav/popular/30" path="/onejav/:type/:key?" paramsDesc={['类型', '关键词']} supportBT="1" radar="1" anticrawler="1"> - **类型** - - | 最新 | 热门 | 随机 | 指定演员 | 指定标签 | 指定日期 | - | ---- | ------- | ------ | -------- | -------- | -------- | - | new | popular | random | actress | tag | day | - - **关键词** - - | 空 | 日期范围 | 演员名 | 标签名 | 日期 | - | -- | ----------- | ------------ | -------------- | -------- | - | | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards | YYYYMMDD | - - **示例说明** - - - `/onejav/new` - - 仅当类型为 `new` `popular` 或 `random` 时关键词可为 **空** - - - `/onejav/popular/30` - - `popular` `random` 类型的关键词可填写 `7` `30` 或 `60` 三个 **日期范围** 之一 - - - `/onejav/actress/Yua%20Mikami` - - `actress` 类型的关键词必须填写 **演员名** ,可在 [此处](https://onejav.com/actress/) 演员单页链接中获取 - - - `/onejav/tag/Adult%20Awards` - - `tag` 类型的关键词必须填写 **标签名** 且标签中的 `/` 必须替换为 `%2F` ,可在 [此处](https://onejav.com/tag/) 标签单页链接中获取 - - - `/onejav/day/20200730` - - `day` 类型的关键词必须填写 **日期** ,按照示例写成形如 `20200730` 的格式 -</Route> +<Route namespace="nyaa" data={{"path":["/search/:query?","/user/:username?","/user/:username/search/:query?","/sukebei/search/:query?","/sukebei/user/:username?","/sukebei/user/:username/search/:query?"],"categories":["multimedia"],"example":"/nyaa/search/psycho-pass","parameters":{"query":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["Lava-Swimmer","noname1776"],"location":"main.ts"}} /> ## OTOBANANA {#otobanana} -### Timeline タイムライン {#otobanana-timeline-%E3%82%BF%E3%82%A4%E3%83%A0%E3%83%A9%E3%82%A4%E3%83%B3} - -<Route author="TonyRL" example="/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1" path="/otobanana/user/:id" paramsDesc={['User ID, can be found in URL']} radar="1" supportPodcast="1" /> - ### Cast 音声投稿 {#otobanana-cast-yin-sheng-tou-gao} -<Route author="TonyRL" example="/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/cast" path="/otobanana/user/:id/cast" paramsDesc={['User ID, can be found in URL']} radar="1" supportPodcast="1" /> +<Route namespace="otobanana" data={{"path":"/user/:id/cast","categories":["multimedia"],"example":"/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/cast","parameters":{"id":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["otobanana.com/user/:id/cast","otobanana.com/user/:id"]},"name":"Cast 音声投稿","maintainers":["TonyRL"],"location":"cast.ts"}} /> ### Livestream ライブ配信 {#otobanana-livestream-%E3%83%A9%E3%82%A4%E3%83%96-pei-xin} -<Route author="TonyRL" example="/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/livestream" path="/otobanana/user/:id/livestream" paramsDesc={['User ID, can be found in URL']} radar="1" /> +<Route namespace="otobanana" data={{"path":"/user/:id/livestream","categories":["multimedia"],"example":"/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1/livestream","parameters":{"id":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["otobanana.com/user/:id/livestream","otobanana.com/user/:id"]},"name":"Livestream ライブ配信","maintainers":["TonyRL"],"location":"livestream.ts"}} /> + +### Timeline タイムライン {#otobanana-timeline-%E3%82%BF%E3%82%A4%E3%83%A0%E3%83%A9%E3%82%A4%E3%83%B3} + +<Route namespace="otobanana" data={{"path":"/user/:id","categories":["multimedia"],"example":"/otobanana/user/cee16401-96b1-420f-8188-abd4d33093f1","parameters":{"id":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["otobanana.com/user/:id"]},"name":"Timeline タイムライン","maintainers":["TonyRL"],"location":"timeline.ts"}} /> ## PornHub {#pornhub} ### Category {#pornhub-category} -<Route author="nczitzk" example="/pornhub/category/popular-with-women" path="/pornhub/category/:caty" paramsDesc={['category, see [categories](https://www.pornhub.com/webmasters/categories)']} radar="1" /> +<Route namespace="pornhub" data={{"path":"/category/:caty","categories":["multimedia"],"example":"/pornhub/category/popular-with-women","parameters":{"caty":"category, see [categories](https://www.pornhub.com/webmasters/categories)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"location":"category.ts"}} /> ### Keyword Search {#pornhub-keyword-search} -<Route author="nczitzk" example="/pornhub/search/stepsister" path="/pornhub/search/:keyword" paramsDesc={['keyword']} radar="1" /> +<Route namespace="pornhub" data={{"path":"/search/:keyword","categories":["multimedia"],"example":"/pornhub/search/stepsister","parameters":{"keyword":"keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keyword Search","maintainers":["nczitzk"],"location":"search.ts"}} /> ### Users {#pornhub-users} -<Route author="I2IMk queensferryme" example="/pornhub/users/pornhubmodels" path="/pornhub/:language?/users/:username" paramsDesc={['language, see below', 'username, part of the url e.g. `pornhub.com/users/pornhubmodels`']} radar="1" /> - -### Verified amateur / Model {#pornhub-verified-amateur-model} - -<Route author="I2IMk queensferryme" example="/pornhub/model/stacy-starando" path="/pornhub/:language?/model/:username/:sort?" paramsDesc={['language, see below', 'username, part of the url e.g. `pornhub.com/model/stacy-starando`', 'sorting method, see below']} radar="1" anticrawler="1" /> - -### Verified model / Pornstar {#pornhub-verified-model-pornstar} - -<Route author="I2IMk queensferryme" example="/pornhub/pornstar/june-liu" path="/pornhub/:language?/pornstar/:username/:sort?" paramsDesc={['language, see below', 'username, part of the url e.g. `pornhub.com/pornstar/june-liu`', 'sorting method, see below']} radar="1" anticrawler="1"> - **`sort`** - - | Most Recent | Most Viewed | Top Rated | Longest | Best | - | ----------- | ----------- | --------- | ------- | ---- | - | mr | mv | tr | lg | | -</Route> +<Route namespace="pornhub" data={{"path":"/:language?/users/:username","categories":["multimedia"],"example":"/pornhub/users/pornhubmodels","parameters":{"language":"language, see below","username":"username, part of the url e.g. `pornhub.com/users/pornhubmodels`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pornhub.com/users/:username/*"],"target":"/users/:username"},"name":"Users","maintainers":["I2IMk","queensferryme"],"location":"users.ts"}} /> ### Video List {#pornhub-video-list} -<Route author="I2IMk queensferryme" example="/pornhub/category_url/video%3Fc%3D15%26o%3Dmv%26t%3Dw%26cc%3Djp" path="/pornhub/:language?/category_url/:url?" paramsDesc={['language, see below', 'relative path after `pornhub.com/`, need to be URL encoded']} anticrawler="1"> - **`language`** +<Route namespace="pornhub" data={{"path":"/:language?/category_url/:url?","categories":["multimedia"],"example":"/pornhub/category_url/video%3Fc%3D15%26o%3Dmv%26t%3Dw%26cc%3Djp","parameters":{"language":"language, see below","url":"relative path after `pornhub.com/`, need to be URL encoded"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Video List","maintainers":["I2IMk","queensferryme"],"description":"**`language`**\n\n Refer to [Pornhub F.A.Qs](https://help.pornhub.com/hc/en-us/articles/360044327034-How-do-I-change-the-language-), English by default. For example:\n\n - `cn` (Chinese), for Pornhub in China [https://cn.pornhub.com](https://cn.pornhub.com);\n\n - `jp` (Japanese), for Pornhub in Japan [https://jp.pornhub.com](https://jp.pornhub.com) etc.","location":"category-url.ts"}} /> - Refer to [Pornhub F.A.Qs](https://help.pornhub.com/hc/en-us/articles/360044327034-How-do-I-change-the-language-), English by default. For example: +**`language`** - - `cn` (Chinese), for Pornhub in China [https://cn.pornhub.com](https://cn.pornhub.com); +Refer to [Pornhub F.A.Qs](https://help.pornhub.com/hc/en-us/articles/360044327034-How-do-I-change-the-language-), English by default. For example: - - `jp` (Japanese), for Pornhub in Japan [https://jp.pornhub.com](https://jp.pornhub.com) etc. -</Route> +- `cn` (Chinese), for Pornhub in China [https://cn.pornhub.com](https://cn.pornhub.com); -## sexinsex {#sexinsex} +- `jp` (Japanese), for Pornhub in Japan [https://jp.pornhub.com](https://jp.pornhub.com) etc. -### 分区帖子 {#sexinsex-fen-qu-tie-zi} +### Verified amateur / Model {#pornhub-verified-amateur-model} -<Route author="cnzgray" example="/sexinsex/230/634" path="/sexinsex/:id/:type?" paramsDesc={['分区 id, 可在分区页 URL 中找到', '类型 id, 可在分区类型过滤后的 URL 中找到']}> - > 注意:并非所有的分区都有子类型,可以参考亚洲成人有码原创区的 `字幕` 这一子类型。 +<Route namespace="pornhub" data={{"path":"/:language?/model/:username/:sort?","categories":["multimedia"],"example":"/pornhub/model/stacy-starando","parameters":{"language":"language, see below","username":"username, part of the url e.g. `pornhub.com/model/stacy-starando`","sort":"sorting method, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pornhub.com/model/:username/*"],"target":"/model/:username"},"name":"Verified amateur / Model","maintainers":["I2IMk","queensferryme"],"location":"model.ts"}} /> - | 亚洲成人无码原创区 | 亚洲成人有码原创区 | 欧美无码原创区 | 欧美无码区 | 亚洲有码薄码区 | - | ------------------ | ------------------ | -------------- | ---------- | -------------- | - | 143 | 230 | 229 | 77 | 58 | -</Route> +### Verified model / Pornstar {#pornhub-verified-model-pornstar} -## SoundCloud {#soundcloud} +<Route namespace="pornhub" data={{"path":"/:language?/pornstar/:username/:sort?","categories":["multimedia"],"example":"/pornhub/pornstar/june-liu","parameters":{"language":"language, see below","username":"username, part of the url e.g. `pornhub.com/pornstar/june-liu`","sort":"sorting method, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pornhub.com/pornstar/:username/*"],"target":"/pornstar/:username"},"name":"Verified model / Pornstar","maintainers":["I2IMk","queensferryme"],"description":"**`sort`**\n\n | Most Recent | Most Viewed | Top Rated | Longest | Best |\n | ----------- | ----------- | --------- | ------- | ---- |\n | mr | mv | tr | lg | |","location":"pornstar.ts"}} /> -### Tracks {#soundcloud-tracks} +**`sort`** -<Route author="fallenhh" example="/soundcloud/tracks/angeart" path="/soundcloud/tracks/:user" paramsDesc={['User name']} /> +| Most Recent | Most Viewed | Top Rated | Longest | Best | +| ----------- | ----------- | --------- | ------- | ---- | +| mr | mv | tr | lg | | ## Spotify {#spotify} ### Artist Albums {#spotify-artist-albums} -<Route author="outloudvi" example="/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1" path="/spotify/artist/:id" paramsDesc={['Artist ID']} configRequired="1" /> - -### Playlist {#spotify-playlist} - -<Route author="outloudvi" example="/spotify/playlist/4UBVy1LttvodwivPUuwJk2" path="/spotify/playlist/:id" paramsDesc={['Playlist ID']} configRequired="1" /> - -### Personal Saved Tracks {#spotify-personal-saved-tracks} - -<Route author="outloudvi" example="/spotify/saved/50" path="/spotify/saved/:limit?" paramsDesc={['Track count, 50 by default']} configRequired="1" /> - -### Personal Top Tracks {#spotify-personal-top-tracks} - -<Route author="outloudvi" example="/spotify/top/tracks" path="/spotify/top/tracks" configRequired="1" /> +<Route namespace="spotify" data={{"path":"/artist/:id","categories":["multimedia"],"example":"/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1","parameters":{"id":"Artist ID"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/artist/:id"]},"name":"Artist Albums","maintainers":["outloudvi"],"location":"artist.ts"}} /> ### Personal Top Artists {#spotify-personal-top-artists} -<Route author="outloudvi" example="/spotify/top/artists" path="/spotify/top/artists" configRequired="1" /> +<Route namespace="spotify" data={{"path":"/top/artists","categories":["multimedia"],"example":"/spotify/top/artists","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/"]},"name":"Personal Top Artists","maintainers":["outloudvi"],"url":"open.spotify.com/","location":"artists-top.ts"}} /> + +### Playlist {#spotify-playlist} + +<Route namespace="spotify" data={{"path":"/playlist/:id","categories":["multimedia"],"example":"/spotify/playlist/4UBVy1LttvodwivPUuwJk2","parameters":{"id":"Playlist ID"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/playlist/:id"]},"name":"Playlist","maintainers":["outloudvi"],"location":"playlist.ts"}} /> + +### Personal Saved Tracks {#spotify-personal-saved-tracks} + +<Route namespace="spotify" data={{"path":"/saved/:limit?","categories":["multimedia"],"example":"/spotify/saved/50","parameters":{"limit":"Track count, 50 by default"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/collection/tracks"],"target":"/saved"},"name":"Personal Saved Tracks","maintainers":["outloudvi"],"url":"open.spotify.com/collection/tracks","location":"saved.ts"}} /> + +### Personal Top Tracks {#spotify-personal-top-tracks} + +<Route namespace="spotify" data={{"path":"/top/tracks","categories":["multimedia"],"example":"/spotify/top/tracks","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/"]},"name":"Personal Top Tracks","maintainers":["outloudvi"],"url":"open.spotify.com/","location":"tracks-top.ts"}} /> ### Show {#spotify-show} -<Route author="caiohsramos" example="/spotify/show/5CfCWKI5pZ28U0uOzXkDHe" path="/spotify/show/:id" paramsDesc={['Show ID']} configRequired="1" /> - -## Sub HD {#sub-hd} - -### 字幕 {#sub-hd-zi-mu} - -<Route author="laampui nczitzk" example="/subhd/sub/new" path="/subhd/sub/:category?" paramsDesc={['分类,见下表,默认为最新']}> - | 最新字幕 | 热门字幕 | 剧集字幕 | 电影字幕 | - | -------- | -------- | -------- | -------- | - | new | top | tv | movie | -</Route> - -### 字幕组 {#sub-hd-zi-mu-zu} - -<Route author="nczitzk" example="/subhd/zu/14" path="/subhd/zu/:category?" paramsDesc={['字幕组,见下表,默认为 YYeTs字幕组']}> - | 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 | -</Route> +<Route namespace="spotify" data={{"path":"/show/:id","categories":["multimedia"],"example":"/spotify/show/5CfCWKI5pZ28U0uOzXkDHe","parameters":{"id":"Show ID"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["open.spotify.com/show/:id"]},"name":"Show","maintainers":["caiohsramos"],"location":"show.ts"}} /> ## The Movie Database {#the-movie-database} @@ -1099,140 +515,65 @@ Refer to [https://developers.themoviedb.org/3/getting-started/languages](https:/ ### Collection {#the-movie-database-collection} -<Route author="x2cf" example="/themoviedb/collection/131292/en-US" path="/themoviedb/collection/:id/:lang?" paramsDesc={['Collection ID', 'Language']} radar="1" /> - -### Trending {#the-movie-database-trending} - -<Route author="x2cf" example="/themoviedb/trending/tv/day/en-US" path="/themoviedb/trending/:mediaType/:timeWindow/:lang?" paramsDesc={['`movie` or `tv`', '`day` or `week`', 'Language']} radar="1" /> - -### TV Show Seasons {#the-movie-database-tv-show-seasons} - -<Route author="x2cf" example="/themoviedb/tv/70593/seasons/en-US" path="/themoviedb/tv/:id/seasons/:lang?" paramsDesc={['TV show ID', 'Language']} radar="1" /> - -### TV Show Episodes {#the-movie-database-tv-show-episodes} - -<Route author="x2cf" example="/themoviedb/tv/70593/seasons/1/episodes/en-US" path="/themoviedb/tv/:id/seasons/:seasonNumber/episodes/:lang?" paramsDesc={['TV show ID', 'Season number', 'Language']} radar="1" /> +<Route namespace="themoviedb" data={{"path":"/collection/:id/:lang?","categories":["multimedia"],"example":"/themoviedb/collection/131292/en-US","parameters":{"id":"Collection ID","lang":"Language"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Collection","maintainers":["x2cf"],"location":"collection.ts"}} /> ### Sheet {#the-movie-database-sheet} -<Route author="x2cf" example="/themoviedb/tv/top-rated/en-US" path="/themoviedb/:mediaType/:sheet/:lang?" paramsDesc={['`movie` or `tv`', 'Sheet, see below', 'Language']} radar="1"> - When `mediaType` is `tv`, `sheet` should be: +<Route namespace="themoviedb" data={{"path":"/:mediaType/:sheet/:lang?","categories":["multimedia"],"example":"/themoviedb/tv/top-rated/en-US","parameters":{"mediaType":"`movie` or `tv`","sheet":"Sheet, see below","lang":"Language"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Sheet","maintainers":["x2cf"],"description":"When `mediaType` is `tv`, `sheet` should be:\n\n | Airing Today | On TV | Top Rated |\n | ------------ | ---------- | --------- |\n | airing-today | on-the-air | top-rated |\n\n When `mediaType` is `movie`, `sheet` should be:\n\n | Now Playing | Upcoming | Top Rated |\n | ----------- | -------- | --------- |\n | now-playing | upcoming | top-rated |","location":"sheet.ts"}} /> - | Airing Today | On TV | Top Rated | - | ------------ | ---------- | --------- | - | airing-today | on-the-air | top-rated | +When `mediaType` is `tv`, `sheet` should be: - When `mediaType` is `movie`, `sheet` should be: +| Airing Today | On TV | Top Rated | +| ------------ | ---------- | --------- | +| airing-today | on-the-air | top-rated | - | Now Playing | Upcoming | Top Rated | - | ----------- | -------- | --------- | - | now-playing | upcoming | top-rated | -</Route> +When `mediaType` is `movie`, `sheet` should be: -## Trakt.tv {#trakt-tv} +| Now Playing | Upcoming | Top Rated | +| ----------- | -------- | --------- | +| now-playing | upcoming | top-rated | -### User Collection {#trakt-tv-user-collection} +### TV Show Episodes {#the-movie-database-tv-show-episodes} -<Route author="hoilc" example="/trakt/collection/tomyangsh/movies" path="/trakt/collection/:username/:type?" paramsDesc={['Username','Collection type, can be `movies`,`shows`,`episodes`,`all`, default to `all`']} radar="1" /> +<Route namespace="themoviedb" data={{"path":"/tv/:id/seasons/:seasonNumber/episodes/:lang?","categories":["multimedia"],"example":"/themoviedb/tv/70593/seasons/1/episodes/en-US","parameters":{"id":"TV show ID","seasonNumber":"Season number","lang":"Language"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"TV Show Episodes","maintainers":["x2cf"],"location":"episodes.ts"}} /> -## Transcript Forest {#transcript-forest} +### TV Show Seasons {#the-movie-database-tv-show-seasons} -### Channel {#transcript-forest-channel} +<Route namespace="themoviedb" data={{"path":"/tv/:id/seasons/:lang?","categories":["multimedia"],"example":"/themoviedb/tv/70593/seasons/en-US","parameters":{"id":"TV show ID","lang":"Language"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"TV Show Seasons","maintainers":["x2cf"],"location":"seasons.ts"}} /> -<Route author="nczitzk" example="/transcriptforest/all-the-hacks" path="/transcriptforest" paramsDesc={['Channel, see below, all by default']} radar="1" supportPodcast="1"> - | 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) | -</Route> +### Trending {#the-movie-database-trending} -## U3C3 {#u3c3} - -### Keyword Search {#u3c3-keyword-search} - -<Route author="noname1897" example="/u3c3/search/les" path="/u3c3/search/:keyword/:preview?" paramsDesc={['search keyword', 'Show image preview, off by default, non empty value means on']} supportBT="1" radar="1" /> - -### Type {#u3c3-type} - -<Route author="noname1897" example="/u3c3/U3C3" path="/u3c3/:type?/:preview?" paramsDesc={['type, pay attention to case, it should be exactly same as the choices: `U3C3`/`Video`/`Photo`/`Book`/`Game`/`Software`/`Other`, if no type is provided, show the home index','Show image preview, off by default, non empty value means on']} supportBT="1" radar="1" /> +<Route namespace="themoviedb" data={{"path":"/trending/:mediaType/:timeWindow/:lang?","categories":["multimedia"],"example":"/themoviedb/trending/tv/day/en-US","parameters":{"mediaType":"`movie` or `tv`","timeWindow":"`day` or `week`","lang":"Language"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Trending","maintainers":["x2cf"],"location":"trending.ts"}} /> ## U9A9 {#u9a9} -### Home {#u9a9-home} +### Search {#u9a9-search} -<Route author="TonyRL" example="/u9a9" path="/u3c3/:preview?" paramsDesc={['Show image preview, off by default, non empty value means on']} supportBT="1" radar="1" /> +<Route namespace="u3c3" data={{"path":["/search/:keyword/:preview?","/:type?/:preview?"],"categories":["multimedia"],"example":"/u9a9/search/新片速递","parameters":{"keyword":"Search keyword","preview":"Show image preview, off by default, non empty value means on"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["storytellerF"],"location":"index.ts"}} /> ### Search {#u9a9-search} -<Route author="TonyRL" example="/u9a9/search/新片速递" path="/u3c3/search/:keyword/:preview?" paramsDesc={['Search keyword', 'Show image preview, off by default, non empty value means on']} supportBT="1" radar="1" /> +<Route namespace="u3c3" data={{"path":["/search/:keyword/:preview?","/:type?/:preview?"],"categories":["multimedia"],"example":"/u9a9/search/新片速递","parameters":{"keyword":"Search keyword","preview":"Show image preview, off by default, non empty value means on"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["storytellerF"],"location":"index.ts"}} /> ## 阿基米德 FM {#a-ji-mi-de-fm} ### 播客 {#a-ji-mi-de-fm-bo-ke} -<Route author="Fatpandac" example="/ajmide/10603594" path="/ajmide/:id" paramsDesc={['播客 id,可以从播客页面 URL 中找到']} radar="1" /> +<Route namespace="ajmide" data={{"path":"/:id","categories":["multimedia"],"example":"/ajmide/10603594","parameters":{"id":"播客 id,可以从播客页面 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"播客","maintainers":["Fatpandac"],"location":"index.ts"}} /> ## 爱奇艺 {#ai-qi-yi} -### 用户视频 {#ai-qi-yi-yong-hu-shi-pin} - -<Route author="talengu" example="/iqiyi/user/video/2289191062" path="/iqiyi/user/video/:uid" paramsDesc={['用户名']} radar="1" /> - ### 剧集 {#ai-qi-yi-ju-ji} -<Route author="TonyRL" example="/iqiyi/album/神武天尊-2020-1b4lufwxd7h" path="/iqiyi/album/:id" paramsDesc={['剧集 id, 可在该主页 URL 中找到']} radar="1"> - :::tip - 可抓取內容根据服务器所在地区而定 - ::: -</Route> +<Route namespace="iqiyi" data={{"path":"/album/:id","categories":["multimedia"],"example":"/iqiyi/album/神武天尊-2020-1b4lufwxd7h","parameters":{"id":"剧集 id, 可在该主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"剧集","maintainers":["TonyRL"],"description":":::tip\n 可抓取內容根据服务器所在地区而定\n :::","location":"album.ts"}} /> + +:::tip +可抓取內容根据服务器所在地区而定 +::: + +### 用户视频 {#ai-qi-yi-yong-hu-shi-pin} + +<Route namespace="iqiyi" data={{"path":"/user/video/:uid","categories":["multimedia"],"example":"/iqiyi/user/video/2289191062","parameters":{"uid":"用户名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["iqiyi.com/u/:uid/*"]},"name":"用户视频","maintainers":["talengu","JimenezLi"],"location":"video.ts"}} /> ## 哔嘀影视 {#bi-di-ying-shi} @@ -1242,434 +583,276 @@ Refer to [https://developers.themoviedb.org/3/getting-started/languages](https:/ ### 首页 {#bi-di-ying-shi-shou-ye} -<Route author="nczitzk" example="/bdys" path="/bdys/:caty?/:type?/:area?/:year?/:order?" paramsDesc={['影视类型,见下表,默认为 `all` 即不限','资源分类,见下表,默认为 `all` 即不限', '制片地区,见下表,默认为 `all` 即不限','上映时间,此处填写年份不小于2000,默认为 `all` 即不限','影视排序,见下表,默认为更新时间']} anticrawler="1" radar="1"> - #### 资源分类 +<Route namespace="bdys" data={{"path":"/:caty?/:type?/:area?/:year?/:order?","categories":["multimedia"],"example":"/bdys","parameters":{"caty":"影视类型,见下表,默认为 `all` 即不限","type":"资源分类,见下表,默认为 `all` 即不限","area":"制片地区,见下表,默认为 `all` 即不限","year":"上映时间,此处填写年份不小于2000,默认为 `all` 即不限","order":"影视排序,见下表,默认为更新时间"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["nczitzk"],"description":"#### 资源分类\n\n | 不限 | 电影 | 电视剧 |\n | ---- | ---- | ------ |\n | all | 0 | 1 |\n\n #### 影视类型\n\n | 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 |\n | ---- | ------- | ------ | ---- | ------ | ------ |\n | all | dongzuo | aiqing | xiju | kehuan | kongbu |\n\n | 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 |\n | --------- | ----- | ------ | ------ | ------- | -------- |\n | zhanzheng | wuxia | mohuan | juqing | donghua | jingsong |\n\n | 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 |\n | -- | ------ | ------ | ------- | ----- | -------- |\n | 3D | zainan | xuanyi | jingfei | wenyi | qingchun |\n\n | 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 |\n | ------- | ------ | ---- | -------- | ------ | ----- |\n | maoxian | fanzui | jilu | guzhuang | qihuan | guoyu |\n\n | 综艺 | 历史 | 运动 | 原创压制 |\n | ------ | ----- | ------- | ---------- |\n | zongyi | lishi | yundong | yuanchuang |\n\n | 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 |\n | ----- | ----- | ---------- | ---- | ------ | ---- |\n | meiju | hanju | guoju | riju | yingju | deju |\n\n | 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 |\n | ---- | ---- | ----- | ------- | -------- | ----- |\n | eju | baju | jiaju | spanish | yidaliju | taiju |\n\n | 港台剧 | 法剧 | 澳剧 |\n | --------- | ---- | ---- |\n | gangtaiju | faju | aoju |\n\n #### 制片地区\n\n | 大陆 | 中国香港 | 中国台湾 |\n | ---- | -------- | -------- |\n\n | 美国 | 英国 | 日本 | 韩国 | 法国 |\n | ---- | ---- | ---- | ---- | ---- |\n\n | 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 |\n | ---- | ---- | ------ | ------ | -------- |\n\n | 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 |\n | ------ | ---- | ---- | ---- | ------ | ------ |\n\n #### 影视排序\n\n | 更新时间 | 豆瓣评分 |\n | -------- | -------- |\n | 0 | 1 |","location":"index.ts"}} /> - | 不限 | 电影 | 电视剧 | - | ---- | ---- | ------ | - | all | 0 | 1 | +#### 资源分类 {#bi-di-ying-shi-shou-ye-zi-yuan-fen-lei} - #### 影视类型 +| 不限 | 电影 | 电视剧 | +| ---- | ---- | ------ | +| all | 0 | 1 | - | 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 | - | ---- | ------- | ------ | ---- | ------ | ------ | - | all | dongzuo | aiqing | xiju | kehuan | kongbu | +#### 影视类型 {#bi-di-ying-shi-shou-ye-ying-shi-lei-xing} - | 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 | - | --------- | ----- | ------ | ------ | ------- | -------- | - | zhanzheng | wuxia | mohuan | juqing | donghua | jingsong | +| 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 | +| ---- | ------- | ------ | ---- | ------ | ------ | +| all | dongzuo | aiqing | xiju | kehuan | kongbu | - | 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 | - | -- | ------ | ------ | ------- | ----- | -------- | - | 3D | zainan | xuanyi | jingfei | wenyi | qingchun | +| 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 | +| --------- | ----- | ------ | ------ | ------- | -------- | +| zhanzheng | wuxia | mohuan | juqing | donghua | jingsong | - | 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 | - | ------- | ------ | ---- | -------- | ------ | ----- | - | maoxian | fanzui | jilu | guzhuang | qihuan | guoyu | +| 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 | +| -- | ------ | ------ | ------- | ----- | -------- | +| 3D | zainan | xuanyi | jingfei | wenyi | qingchun | - | 综艺 | 历史 | 运动 | 原创压制 | - | ------ | ----- | ------- | ---------- | - | zongyi | lishi | yundong | yuanchuang | +| 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 | +| ------- | ------ | ---- | -------- | ------ | ----- | +| maoxian | fanzui | jilu | guzhuang | qihuan | guoyu | - | 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 | - | ----- | ----- | ---------- | ---- | ------ | ---- | - | meiju | hanju | guoju | riju | yingju | deju | +| 综艺 | 历史 | 运动 | 原创压制 | +| ------ | ----- | ------- | ---------- | +| zongyi | lishi | yundong | yuanchuang | - | 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 | - | ---- | ---- | ----- | ------- | -------- | ----- | - | eju | baju | jiaju | spanish | yidaliju | taiju | +| 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 | +| ----- | ----- | ---------- | ---- | ------ | ---- | +| meiju | hanju | guoju | riju | yingju | deju | - | 港台剧 | 法剧 | 澳剧 | - | --------- | ---- | ---- | - | gangtaiju | faju | aoju | +| 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 | +| ---- | ---- | ----- | ------- | -------- | ----- | +| eju | baju | jiaju | spanish | yidaliju | taiju | - #### 制片地区 +| 港台剧 | 法剧 | 澳剧 | +| --------- | ---- | ---- | +| gangtaiju | faju | aoju | - | 大陆 | 中国香港 | 中国台湾 | - | ---- | -------- | -------- | +#### 制片地区 {#bi-di-ying-shi-shou-ye-zhi-pian-di-qu} - | 美国 | 英国 | 日本 | 韩国 | 法国 | - | ---- | ---- | ---- | ---- | ---- | +| 大陆 | 中国香港 | 中国台湾 | +| ---- | -------- | -------- | - | 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 | - | ---- | ---- | ------ | ------ | -------- | +| 美国 | 英国 | 日本 | 韩国 | 法国 | +| ---- | ---- | ---- | ---- | ---- | - | 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 | - | ------ | ---- | ---- | ---- | ------ | ------ | +| 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 | +| ---- | ---- | ------ | ------ | -------- | - #### 影视排序 +| 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 | +| ------ | ---- | ---- | ---- | ------ | ------ | - | 更新时间 | 豆瓣评分 | - | -------- | -------- | - | 0 | 1 | -</Route> +#### 影视排序 {#bi-di-ying-shi-shou-ye-ying-shi-pai-xu} + +| 更新时间 | 豆瓣评分 | +| -------- | -------- | +| 0 | 1 | ## 草榴社区 {#cao-liu-she-qu} ### 分区帖子 {#cao-liu-she-qu-fen-qu-tie-zi} -<Route author="zhboner" example="/t66y/20/2" path="/t66y/:id/:type?" paramsDesc={['分区 id, 可在分区页 URL 中找到', '类型 id, 可在分区类型过滤后的 URL 中找到']} anticrawler="1"> - > 注意:并非所有的分区都有子类型,可以参考成人文学交流区的 `古典武侠` 这一子类型。 +<Route namespace="t66y" data={{"path":"/:id/:type?","categories":["multimedia"],"example":"/t66y/20/2","parameters":{"id":"分区 id, 可在分区页 URL 中找到","type":"类型 id, 可在分区类型过滤后的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分区帖子","maintainers":["zhboner"],"description":"> 注意:并非所有的分区都有子类型,可以参考成人文学交流区的 `古典武侠` 这一子类型。\n\n | 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 |\n | -------------- | -------------- | ---------- | ---------- | ---------- |\n | 2 | 15 | 4 | 5 | 25 |\n\n | 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 |\n | ---------- | ---------- | ----------- | ---------- |\n | 26 | 27 | 21 | 22 |\n\n | 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 |\n | ---------- | ------------ | ------------ | ------------ |\n | 7 | 8 | 16 | 20 |","location":"index.ts"}} /> - | 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 | - | -------------- | -------------- | ---------- | ---------- | ---------- | - | 2 | 15 | 4 | 5 | 25 | +> 注意:并非所有的分区都有子类型,可以参考成人文学交流区的 `古典武侠` 这一子类型。 - | 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 | - | ---------- | ---------- | ----------- | ---------- | - | 26 | 27 | 21 | 22 | +| 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 | +| -------------- | -------------- | ---------- | ---------- | ---------- | +| 2 | 15 | 4 | 5 | 25 | - | 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 | - | ---------- | ------------ | ------------ | ------------ | - | 7 | 8 | 16 | 20 | -</Route> +| 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 | +| ---------- | ---------- | ----------- | ---------- | +| 26 | 27 | 21 | 22 | + +| 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 | +| ---------- | ------------ | ------------ | ------------ | +| 7 | 8 | 16 | 20 | ### 帖子跟踪 {#cao-liu-she-qu-tie-zi-gen-zong} -<Route author="cnzgray" example="/t66y/post/3286088" path="/t66y/post/:tid" paramsDesc={['帖子 id, 可在帖子 URL 中找到']} anticrawler="1"> - :::tip - 帖子 id 查找办法: +<Route namespace="t66y" data={{"path":"/post/:tid","categories":["multimedia"],"example":"/t66y/post/3286088","parameters":{"tid":"帖子 id, 可在帖子 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"帖子跟踪","maintainers":["cnzgray"],"description":":::tip\n 帖子 id 查找办法:\n\n 打开想跟踪的帖子,比如:`https://t66y.com/htm_data/20/1811/3286088.html` 其中 `3286088` 就是帖子 id。\n :::","location":"post.ts"}} /> - 打开想跟踪的帖子,比如:`https://t66y.com/htm_data/20/1811/3286088.html` 其中 `3286088` 就是帖子 id。 - ::: -</Route> +:::tip +帖子 id 查找办法: -## 低端影视 {#di-duan-ying-shi} - -### 影视剧集更新 {#di-duan-ying-shi-ying-shi-ju-ji-geng-xin} - -<Route author="saintwinkle" example="/ddrk/update/silicon-valley/6" path="/ddrk/update/:name/:season?" paramsDesc={['影视名称,可以在 URL 中找到','季数,可以在 URL 中找到,剧集没有分季时不用填写,或是默认输出第一季的内容']} radar="1" anticrawler="1" /> - -### 首页 {#di-duan-ying-shi-shou-ye} - -<Route author="hoilc" example="/ddrk/index" path="/ddrk/index" radar="1" anticrawler="1" /> - -### 分类 {#di-duan-ying-shi-fen-lei} - -<Route author="hoilc" example="/ddrk/category/jp-drama" path="/ddrk/category/:category" paramsDesc={['分类 ID, 可在 URL 中找到, 注意, 如果有两级分类, 只需要填写第二级即可']} radar="1" anticrawler="1" /> - -### 标签 {#di-duan-ying-shi-biao-qian} - -<Route author="hoilc" example="/ddrk/tag/石原里美" path="/ddrk/tag/:tag" paramsDesc={['标签名, 可在 URL 中找到']} radar="1" anticrawler="1" /> - -## 电影天堂 {#dian-ying-tian-tang} - -### 新片精品 {#dian-ying-tian-tang-xin-pian-jing-pin} - -<Route author="imgss" example="/dytt" path="/dytt" supportBT="1" anticrawler="1" /> - -## 高清电台 {#gao-qing-dian-tai} - -### 最新电影 {#gao-qing-dian-tai-zui-xin-dian-ying} - -<Route author="Songkeys" example="/gaoqing/latest" path="/gaoqing/latest" anticrawler="1" /> +打开想跟踪的帖子,比如:`https://t66y.com/htm_data/20/1811/3286088.html` 其中 `3286088` 就是帖子 id。 +::: ## 故事 FM {#gu-shi-fm} -### 首页 {#gu-shi-fm-shou-ye} - -<Route author="sanmmm" example="/storyfm/index" path="/storyfm/index" notOperational="1" /> - ### 播客 {#gu-shi-fm-bo-ke} -<Route author="nczitzk" example="/storyfm/episodes" path="/storyfm/episodes" supportPodcast="1" /> +<Route namespace="storyfm" data={{"path":"/episodes","categories":["multimedia"],"example":"/storyfm/episodes","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["storyfm.cn/episodes-list","storyfm.cn/"]},"name":"播客","maintainers":["nczitzk"],"url":"storyfm.cn/episodes-list","location":"episodes.ts"}} /> -## 开眼 {#kai-yan} +### 首页 {#gu-shi-fm-shou-ye} -### 每日精选 {#kai-yan-mei-ri-jing-xuan} - -<Route author="SunShinenny" example="/kaiyan/index" path="/kaiyan/index" /> - -## 荔枝 FM {#li-zhi-fm} - -### 电台更新 {#li-zhi-fm-dian-tai-geng-xin} - -<Route author="nczitzk" example="/lizhi/user/27151442948222380" path="/lizhi/user/:id" paramsDesc={['用户 id,可以在电台的 URL 中找到']} /> - -## 猫耳 FM {#mao-er-fm} - -### 广播剧 / 有声漫画 {#mao-er-fm-guang-bo-ju-you-sheng-man-hua} - -<Route author="FlashWingShadow" example="/missevan/drama/28499" path="/missevan/drama/:id" paramsDesc={['剧集 id,在剧集主页 URL 中可以找到']} /> - -### 最新广播剧 {#mao-er-fm-zui-xin-guang-bo-ju} - -<Route author="nczitzk" example="/missevan/drama/latest" path="/missevan/drama/latest" /> - -## 猫眼电影 {#mao-yan-dian-ying} - -### 正在热映 {#mao-yan-dian-ying-zheng-zai-re-ying} - -<Route author="HenryQW" example="/maoyan/hot" path="/maoyan/hot" /> - -### 即将上映 {#mao-yan-dian-ying-ji-jiang-shang-ying} - -<Route author="HenryQW" example="/maoyan/upcoming" path="/maoyan/upcoming" /> - -### 正在热映 - 完整版 {#mao-yan-dian-ying-zheng-zai-re-ying-wan-zheng-ban} - -<Route author="song-zhou" example="/maoyan/hotComplete" path="/maoyan/hotComplete/:orderby?/:ascOrDesc?/:top?" paramsDesc={['排序条件,(score: 评分,pubDate: 发布时间),', '正序或倒序 (asc: 正序, desc: 倒序) 默认倒序', '取前多少条,默认取所有']} /> +<Route namespace="storyfm" data={{"path":"/index","categories":["multimedia"],"example":"/storyfm/index","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["storyfm.cn/"]},"name":"首页","maintainers":["sanmmm"],"url":"storyfm.cn/","location":"index.ts"}} /> ## 片源网 {#pian-yuan-wang} ### 最新资源 {#pian-yuan-wang-zui-xin-zi-yuan} -<Route author="greatcodeeer jerry1119" example="/pianyuan/index" path="/pianyuan/index/:media?" paramsDesc={['类别,见下表,默认为首页']} radar="1" configRequired="1" /> +<Route namespace="pianyuan" data={{"path":"/index/:media?","categories":["multimedia"],"example":"/pianyuan/index","parameters":{"media":"类别,见下表,默认为首页"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pianyuan.org/"],"target":"/index"},"name":"最新资源","maintainers":["greatcodeeer","jerry1119"],"url":"pianyuan.org/","description":"| 电影 | 剧集 |\n| ---- | ---- |\n| mv | tv |","location":"app.ts"}} /> | 电影 | 剧集 | | ---- | ---- | | mv | tv | -### 搜索 {#pian-yuan-wang-sou-suo} - -<Route author="jerry1119" example="/pianyuan/indexers/pianyuan/results/search/api?t=test&q=长津湖" path="/pianyuan/indexers/pianyuan/results/search/" configRequired="1" /> - -搜索路由模仿 jackett 的搜索 api, 以提供给 nastools 使用,填写在 nastools 配置 indexer 中 - ## 蜻蜓 FM {#qing-ting-fm} -### 专辑 {#qing-ting-fm-zhuan-ji} - -<Route author="nczitzk" example="/qingting/channel/293411" path="/qingting/channel/:id" paramsDesc={['专辑id, 可在专辑页 URL 中找到']} /> - ### 播客 {#qing-ting-fm-bo-ke} -<Route author="RookieZoe huyyi" example="/qingting/podcast/293411" path="/qingting/podcast/:id" paramsDesc={['专辑id, 可在专辑页 URL 中找到']} radar="1" supportPodcast="1" notOperational="1"> - 获取的播放 URL 有效期只有 1 天,需要开启播客 APP 的自动下载功能。 -</Route> +<Route namespace="qingting" data={{"path":"/podcast/:id","categories":["multimedia"],"example":"/qingting/podcast/293411","parameters":{"id":"专辑id, 可在专辑页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["qingting.fm/channels/:id"]},"name":"播客","maintainers":["RookieZoe","huyyi"],"description":"获取的播放 URL 有效期只有 1 天,需要开启播客 APP 的自动下载功能。","location":"podcast.ts"}} /> + +获取的播放 URL 有效期只有 1 天,需要开启播客 APP 的自动下载功能。 + +### 专辑 {#qing-ting-fm-zhuan-ji} + +<Route namespace="qingting" data={{"path":"/channel/:id","categories":["multimedia"],"example":"/qingting/channel/293411","parameters":{"id":"专辑id, 可在专辑页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专辑","maintainers":["nczitzk"],"location":"channel.ts"}} /> ## 秋爸日字 {#qiu-ba-ri-zi} ### 分类 {#qiu-ba-ri-zi-fen-lei} -<Route author="nczitzk" example="/qq88" path="/qq88/:category?" paramsDesc={['分类 id,见下表,默认为首页']}> - | 首页 | オトナの土ドラ | 日剧 | 日剧 SP | - | ---- | -------------- | ---- | ------- | - | | 10 | 5 | 11 | -</Route> +<Route namespace="qq88" data={{"path":"/:category?","categories":["multimedia"],"example":"/qq88","parameters":{"category":"分类 id,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 首页 | オトナの土ドラ | 日剧 | 日剧 SP |\n | ---- | -------------- | ---- | ------- |\n | | 10 | 5 | 11 |","location":"index.ts"}} /> + +| 首页 | オトナの土ドラ | 日剧 | 日剧 SP | +| ---- | -------------- | ---- | ------- | +| | 10 | 5 | 11 | ## 人人影视 {#ren-ren-ying-shi} -### 影视资讯 {#ren-ren-ying-shi-ying-shi-zi-xun} - -<Route author="wb121017405" example="/yyets/article" path="/yyets/article/:type?" paramsDesc="['分类,见下表,默认为全部']" radar="1"> - | 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 | - | ---- | -------- | -------- | --------- | --------- | ----------- | -------- | - | | news | report | m\_review | t\_review | new\_review | recom | -</Route> - ### 今日播出 {#ren-ren-ying-shi-jin-ri-bo-chu} -<Route author="bao1991213" example="/yyets/today" path="/yyets/today" radar="1" /> +<Route namespace="yyets" data={{"path":"/today","categories":["multimedia"],"example":"/yyets/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yysub.net/tv/schedule","yysub.net/"]},"name":"今日播出","maintainers":["bao1991213"],"url":"yysub.net/tv/schedule","location":"today.ts"}} /> + +### 影视资讯 {#ren-ren-ying-shi-ying-shi-zi-xun} + +<Route namespace="yyets" data={{"path":"/article/:type?","categories":["multimedia"],"example":"/yyets/article","parameters":{"type":"["},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"影视资讯","maintainers":["wb121017405"],"description":"| 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 |\n | ---- | -------- | -------- | --------- | --------- | ----------- | -------- |\n | | news | report | m_review | t_review | new_review | recom |","location":"article.ts"}} /> + +| 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 | +| ---- | -------- | -------- | --------- | --------- | ----------- | -------- | +| | news | report | m\_review | t\_review | new\_review | recom | ## 色花堂 {#se-hua-tang} -### 分区帖子 {#se-hua-tang-fen-qu-tie-zi} - -<Route author="qiwihui junfengP nczitzk" example="/sehuatang/36/368" path="/sehuatang/:subforumid?/:type?" supportBT="1" paramsDesc={['版块 id 或板块名称(见下表), 为空默认高清中文字幕', '类型 id, 可在分区类型过滤后的 URL 中找到']} anticrawler="1"> - **原创 BT 电影** - - | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | - | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | - | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | - - **色花图片** - - | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | -</Route> - ### 作者文章 {#se-hua-tang-zuo-zhe-wen-zhang} -<Route author="JamYiz" example="/sehuatang/user/411096" path="/sehuatang/user/:uid" paramsDesc={['用户 uid, 可在用户主页 URL 中找到']} configRequired="1" /> +<Route namespace="sehuatang" data={{"path":"/user/:uid","categories":["multimedia"],"example":"/sehuatang/user/411096","parameters":{"uid":"用户 uid, 可在用户主页 URL 中找到"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作者文章","maintainers":["JamYiz"],"location":"user.ts"}} /> ## 听听 FM {#ting-ting-fm} ### 节目 {#ting-ting-fm-jie-mu} -<Route author="TonyRL" example="/tingtingfm/program/M7VJv6Jj4R" path="/tingtingfm/program/:programId" paramsDesc={['节目 ID,可以在 URL 中找到']} radar="1" supportPodcast="1" /> +<Route namespace="tingtingfm" data={{"path":"/program/:programId","categories":["multimedia"],"example":"/tingtingfm/program/M7VJv6Jj4R","parameters":{"programId":"节目 ID,可以在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["mobile.tingtingfm.com/v3/program/:programId"]},"name":"节目","maintainers":["TonyRL"],"location":"program.ts"}} /> -## 网易云音乐 {#wang-yi-yun-yin-yue} +## 网易公开课 {#wang-yi-gong-kai-ke} :::tip 部分歌单及听歌排行信息为登陆后可见,自建时将环境变量`NCM_COOKIES`设为登陆后的 Cookie 值,即可正常获取。 ::: -### 歌单歌曲 {#wang-yi-yun-yin-yue-ge-dan-ge-qu} +### 电台节目 {#wang-yi-gong-kai-ke-dian-tai-jie-mu} -<Route author="DIYgod" example="/163/music/playlist/35798529" path="/163/music/playlist/:id" paramsDesc={['歌单 id, 可在歌单页 URL 中找到']} radar="1" anticrawler="1" /> +<Route namespace="163" data={{"path":"/music/djradio/:id","categories":["multimedia"],"example":"/163/music/djradio/347317067","parameters":{"id":"节目 id, 可在电台节目页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"电台节目","maintainers":["magic-akari"],"location":"music/djradio.ts"}} /> -### 用户歌单 {#wang-yi-yun-yin-yue-yong-hu-ge-dan} +### 歌手歌曲 {#wang-yi-gong-kai-ke-ge-shou-ge-qu} -<Route author="DIYgod" example="/163/music/user/playlist/45441555" path="/163/music/user/playlist/:uid" paramsDesc={['用户 uid, 可在用户主页 URL 中找到']} radar="1" /> +<Route namespace="163" data={{"path":"/music/artist/songs/:id","categories":["multimedia"],"example":"/163/music/artist/songs/2116","parameters":{"id":"歌手 id, 可在歌手详情页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"歌手歌曲","maintainers":["ZhongMingKun"],"location":"music/artist-songs.ts"}} /> -### 用户听歌排行 {#wang-yi-yun-yin-yue-yong-hu-ting-ge-pai-hang} +### 歌手专辑 {#wang-yi-gong-kai-ke-ge-shou-zhuan-ji} -<Route author="alfredcai" example="/163/music/user/playrecords/45441555/1" path="/163/music/user/playrecords/:uid/:type?" paramsDesc={['用户 uid, 可在用户主页 URL 中找到','排行榜类型,0所有时间(默认),1最近一周']} /> +<Route namespace="163" data={{"path":"/music/artist/:id","categories":["multimedia"],"example":"/163/music/artist/2116","parameters":{"id":"歌手 id, 可在歌手详情页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"歌手专辑","maintainers":["metowolf"],"location":"music/artist.ts"}} /> -### 用户动态 {#wang-yi-yun-yin-yue-yong-hu-dong-tai} +### 歌单歌曲 {#wang-yi-gong-kai-ke-ge-dan-ge-qu} -<Route author="Master-Hash" example="/163/music/user/events/585804522" path="/163/music/user/events/:uid" paramsDesc={['用户 uid, 可在用户主页 URL 中找到']} rader="1" /> +<Route namespace="163" data={{"path":"/music/playlist/:id","categories":["multimedia"],"example":"/163/music/playlist/35798529","parameters":{"id":"歌单 id, 可在歌单页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"歌单歌曲","maintainers":["DIYgod"],"location":"music/playlist.ts"}} /> -### 歌手专辑 {#wang-yi-yun-yin-yue-ge-shou-zhuan-ji} +### 用户歌单 {#wang-yi-gong-kai-ke-yong-hu-ge-dan} -<Route author="metowolf" example="/163/music/artist/2116" path="/163/music/artist/:id" paramsDesc={['歌手 id, 可在歌手详情页 URL 中找到']} radar="1" /> +<Route namespace="163" data={{"path":"/music/user/playlist/:uid","categories":["multimedia"],"example":"/163/music/user/playlist/45441555","parameters":{"uid":"用户 uid, 可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户歌单","maintainers":["DIYgod"],"location":"music/userplaylist.ts"}} /> -### 歌手歌曲 {#wang-yi-yun-yin-yue-ge-shou-ge-qu} +### 用户听歌排行 {#wang-yi-gong-kai-ke-yong-hu-ting-ge-pai-hang} -<Route author="ZhongMingKun" example="/163/music/artist/songs/2116" path="/163/music/artist/songs/:id" paramsDesc={['歌手 id, 可在歌手详情页 URL 中找到']} radar="1" /> - -### 电台节目 {#wang-yi-yun-yin-yue-dian-tai-jie-mu} - -<Route author="magic-akari" example="/163/music/djradio/347317067" path="/163/music/djradio/:id" paramsDesc={['节目 id, 可在电台节目页 URL 中找到']} supportPodcast="1" radar="1" /> +<Route namespace="163" data={{"path":"/music/user/playrecords/:uid/:type?","categories":["multimedia"],"example":"/163/music/user/playrecords/45441555/1","parameters":{"uid":"用户 uid, 可在用户主页 URL 中找到","type":"排行榜类型,0所有时间(默认),1最近一周"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户听歌排行","maintainers":["alfredcai"],"location":"music/userplayrecords.ts"}} /> ## 西瓜视频 {#xi-gua-shi-pin} ### 用户视频投稿 {#xi-gua-shi-pin-yong-hu-shi-pin-tou-gao} -<Route author="FlashWingShadow Fatpandac" example="/ixigua/user/video/4234740937" path="/ixigua/user/video/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在用户主页中找到', '默认为开启内嵌视频, 任意值为关闭']} /> +<Route namespace="ixigua" data={{"path":"/user/video/:uid/:disableEmbed?","categories":["multimedia"],"example":"/ixigua/user/video/4234740937","parameters":{"uid":"用户 id, 可在用户主页中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ixigua.com/home/:uid"],"target":"/user/video/:uid"},"name":"用户视频投稿","maintainers":[],"location":"user-video.ts"}} /> ## 喜马拉雅 {#xi-ma-la-ya} ### 专辑(不输出 ShowNote) {#xi-ma-la-ya-zhuan-ji-bu-shu-chu-shownote} -<Route author="lengthmin jjeejj prnake" example="/ximalaya/album/299146" path="/ximalaya/:type/:id/:all?" paramsDesc={['专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到','专辑 id, 可在对应专辑页面的 URL 中找到','是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。']} supportPodcast="1" radar="1" configRequired="1"> - 目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。 +<Route namespace="ximalaya" data={{"path":["/:type/:id/:all?","/:type/:id/:all/:shownote?"],"categories":["multimedia"],"example":"/ximalaya/album/299146","parameters":{"type":"专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到","id":"专辑 id, 可在对应专辑页面的 URL 中找到","all":"是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"专辑(不输出 ShowNote)","maintainers":["lengthmin","jjeejj","prnake"],"description":"目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。\n\n :::warning\n 专辑类型即 url 中的分类拼音,使用通用分类 `album` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了\n\n **付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块**\n :::","location":"album.ts"}} /> - :::warning - 专辑类型即 url 中的分类拼音,使用通用分类 `album` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了 +目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。 - **付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块** - ::: -</Route> +:::warning +专辑类型即 url 中的分类拼音,使用通用分类 `album` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了 -### 专辑(输出 ShowNote) {#xi-ma-la-ya-zhuan-ji-shu-chu-shownote} +**付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块** +::: -<Route author="lengthmin jjeejj prnake" example="/ximalaya/album/39488639/0/shownote" path="/ximalaya/:type/:id/:all/:shownote?" paramsDesc={['专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到','专辑 id, 可在对应专辑页面的 URL 中找到','是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。', '是否需要获取节目的 ShowNote,填入 `1`、`true`,`shownote` 视为获取,填入其他则不获取。']} supportPodcast="1" configRequired="1" /> +### 专辑(不输出 ShowNote) {#xi-ma-la-ya-zhuan-ji-bu-shu-chu-shownote} + +<Route namespace="ximalaya" data={{"path":["/:type/:id/:all?","/:type/:id/:all/:shownote?"],"categories":["multimedia"],"example":"/ximalaya/album/299146","parameters":{"type":"专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到","id":"专辑 id, 可在对应专辑页面的 URL 中找到","all":"是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"专辑(不输出 ShowNote)","maintainers":["lengthmin","jjeejj","prnake"],"description":"目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。\n\n :::warning\n 专辑类型即 url 中的分类拼音,使用通用分类 `album` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了\n\n **付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块**\n :::","location":"album.ts"}} /> + +目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。 + +:::warning +专辑类型即 url 中的分类拼音,使用通用分类 `album` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了 + +**付费内容需要配置好已购买账户的 token 才能收听,详情见部署页面的配置模块** +::: ## 小宇宙 {#xiao-yu-zhou} -### 发现 {#xiao-yu-zhou-fa-xian} - -<Route author="prnake" example="/xiaoyuzhou" path="/xiaoyuzhou" configRequired="1"> - :::warning - 小宇宙的 api 需要验证 `x-jike-device-id`、`x-jike-access-token` 和 `x-jike-refresh-token` 。必要时需要自行配置,具体见部署文档。 - ::: -</Route> - ### 播客 {#xiao-yu-zhou-bo-ke} -<Route author="hondajojo" example="/xiaoyuzhou/podcast/6021f949a789fca4eff4492c" path="/xiaoyuzhou/podcast/:id" paramsDesc={['播客id,可以在小宇宙播客的 URL 中找到']} /> +<Route namespace="xiaoyuzhou" data={{"path":"/podcast/:id","categories":["multimedia"],"example":"/xiaoyuzhou/podcast/6021f949a789fca4eff4492c","parameters":{"id":"播客id,可以在小宇宙播客的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaoyuzhoufm.com/podcast/:id"]},"name":"播客","maintainers":["hondajojo","jtsang4"],"url":"xiaoyuzhoufm.com/","location":"podcast.ts"}} /> ## 优酷 {#you-ku} ### 频道 {#you-ku-pin-dao} -<Route author="xyqfer Fatpandac" example="/youku/channel/UNTg3MTM3OTcy" path="/youku/channel/:channelId/:embed?" paramsDesc={['频道 id', '默认为开启内嵌视频, 任意值为关闭']} anticrawler="1" /> +<Route namespace="youku" data={{"path":"/channel/:channelId/:embed?","categories":["multimedia"],"example":"/youku/channel/UNTg3MTM3OTcy","parameters":{"channelId":"频道 id","embed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["i.youku.com/i/:id"],"target":"/channel/:id"},"name":"频道","maintainers":["xyqfer","Fatpandac"],"location":"channel.ts"}} /> ## 云听 {#yun-ting} -### 专辑 {#yun-ting-zhuan-ji} - -<Route author="nczitzk" example="/radio/album/15682090498666" path="/radio/album/:id" paramsDesc={['专辑 id,可在对应专辑页面的 URL 中找到']} supportPodcast="1"> - 如果订阅 [中国相声榜](https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666`,可以得到 `columnId` 为 `15682090498666` - - 所以对应路由为 [`/radio/album/15682090498666`](https://rsshub.app/radio/album/15682090498666) - - :::tip - 部分专辑不适用该路由,此时可以尝试 [节目](#yun-ting-jie-mu) 路由 - ::: -</Route> - ### 节目 {#yun-ting-jie-mu} -<Route author="kt286 nczitzk" example="/radio/1552135" path="/radio/:id" paramsDesc={['专辑 id,可在对应专辑页面的 URL 中找到']} supportPodcast="1" notOperational="1"> - 如果订阅 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135`,可以得到 `columnId` 为 `1552135` +<Route namespace="radio" data={{"path":"/:id","categories":["multimedia"],"example":"/radio/1552135","parameters":{"id":"专辑 id,可在对应专辑页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"节目","maintainers":["kt286","nczitzk"],"description":"如果订阅 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135`,可以得到 `columnId` 为 `1552135`\n\n 所以对应路由为 [`/radio/1552135`](https://rsshub.app/radio/1552135)\n\n :::tip\n 该路由仅适用于更新时间较早的电台节目,如 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135)\n\n 与适用于 [专辑](#yun-ting-zhuan-ji) 路由的专辑其 `columnId` 长度相比,它们的 `columnId` 长度较短\n :::","location":"index.ts"}} /> - 所以对应路由为 [`/radio/1552135`](https://rsshub.app/radio/1552135) +如果订阅 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135`,可以得到 `columnId` 为 `1552135` - :::tip - 该路由仅适用于更新时间较早的电台节目,如 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135) +所以对应路由为 [`/radio/1552135`](https://rsshub.app/radio/1552135) - 与适用于 [专辑](#yun-ting-zhuan-ji) 路由的专辑其 `columnId` 长度相比,它们的 `columnId` 长度较短 - ::: -</Route> +:::tip +该路由仅适用于更新时间较早的电台节目,如 [共和国追梦人](http://www.radio.cn/pc-portal/sanji/detail.html?columnId=1552135) + +与适用于 [专辑](#yun-ting-zhuan-ji) 路由的专辑其 `columnId` 长度相比,它们的 `columnId` 长度较短 +::: ### 直播 {#yun-ting-zhi-bo} -<Route author="nczitzk" example="/radio/zhibo/1395528" path="/radio/zhibo/:id" paramsDesc={['直播 id,可在对应点播页面的 URL 中找到']} supportPodcast="1"> - 如果订阅 [新闻和报纸摘要](http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528),其 URL 为 `http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528`,可以得到 `name` 为 `1395528` +<Route namespace="radio" data={{"path":"/zhibo/:id","categories":["multimedia"],"example":"/radio/zhibo/1395528","parameters":{"id":"直播 id,可在对应点播页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"直播","maintainers":["nczitzk"],"description":"如果订阅 [新闻和报纸摘要](http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528),其 URL 为 `http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528`,可以得到 `name` 为 `1395528`\n\n 所以对应路由为 [`/radio/zhibo/1395528`](https://rsshub.app/radio/zhibo/1395528)\n\n :::tip\n 查看更多电台直播节目,可前往 [电台直播](http://www.radio.cn/pc-portal/erji/radioStation.html)\n :::","location":"zhibo.ts"}} /> - 所以对应路由为 [`/radio/zhibo/1395528`](https://rsshub.app/radio/zhibo/1395528) +如果订阅 [新闻和报纸摘要](http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528),其 URL 为 `http://www.radio.cn/pc-portal/sanji/zhibo_2.html?name=1395528`,可以得到 `name` 为 `1395528` - :::tip - 查看更多电台直播节目,可前往 [电台直播](http://www.radio.cn/pc-portal/erji/radioStation.html) - ::: -</Route> - -## 直播吧 {#zhi-bo-ba} - -### 录像 {#zhi-bo-ba-lu-xiang} - -<Route author="TonyRL" example="/zhibo8/luxiang/nba" path="/zhibo8/luxiang/:category" paramsDesc={['分类,见下表,默认为 `nba`']} radar="1"> - | NBA | 足球 | - | --- | ----- | - | nba | zuqiu | -</Route> - -## 中文播客榜 {#zhong-wen-bo-ke-bang} +所以对应路由为 [`/radio/zhibo/1395528`](https://rsshub.app/radio/zhibo/1395528) :::tip -可以通过指定 `limit` 参数确定榜单排名下限,默认为 250。 - -若只查看榜单前 50,可在订阅 URL 后加入 `?limit=50`。 - -即,以 [热门节目](https://xyzrank.com/#/) 为例,路由为[`/xyzrank?limit=50`](https://rsshub.app/xyzrank?limit=50)。 +查看更多电台直播节目,可前往 [电台直播](http://www.radio.cn/pc-portal/erji/radioStation.html) ::: -### 热门节目 {#zhong-wen-bo-ke-bang-re-men-jie-mu} +### 专辑 {#yun-ting-zhuan-ji} -<Route author="nczitzk" example="/xyzrank" path="/xyzrank" /> +<Route namespace="radio" data={{"path":"/album/:id","categories":["multimedia"],"example":"/radio/album/15682090498666","parameters":{"id":"专辑 id,可在对应专辑页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"专辑","maintainers":["nczitzk"],"description":"如果订阅 [中国相声榜](https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666`,可以得到 `columnId` 为 `15682090498666`\n\n 所以对应路由为 [`/radio/album/15682090498666`](https://rsshub.app/radio/album/15682090498666)\n\n :::tip\n 部分专辑不适用该路由,此时可以尝试 [节目](#yun-ting-jie-mu) 路由\n :::","location":"album.ts"}} /> -### 热门播客 {#zhong-wen-bo-ke-bang-re-men-bo-ke} +如果订阅 [中国相声榜](https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666),其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666`,可以得到 `columnId` 为 `15682090498666` -<Route author="nczitzk" example="/xyzrank/hot-podcasts" path="/xyzrank/hot-podcasts" /> +所以对应路由为 [`/radio/album/15682090498666`](https://rsshub.app/radio/album/15682090498666) -### 新锐节目 {#zhong-wen-bo-ke-bang-xin-rui-jie-mu} - -<Route author="nczitzk" example="/xyzrank/hot-episodes-new" path="/xyzrank/hot-episodes-new" /> - -### 新锐播客 {#zhong-wen-bo-ke-bang-xin-rui-bo-ke} - -<Route author="nczitzk" example="/xyzrank/new-podcasts" path="/xyzrank/new-podcasts" /> - -## 追新番 {#zhui-xin-fan} - -### 最近更新 {#zhui-xin-fan-zui-jin-geng-xin} - -<Route author="mengx8 nczitzk" example="/fanxinzhui" path="/fanxinzhui" radar="1" /> - -## 字幕库 {#zi-mu-ku} - -### 字幕列表 {#zi-mu-ku-zi-mu-lie-biao} - -<Route author="sanmmm" example="/zimuku/mv" path="/zimuku/:type?" paramsDesc={['类型, 默认为`mv`电影']}> - 类型 - - | 最新电影 | 最新美剧 | - | -------- | -------- | - | mv | tv | -</Route> - -## 综艺秀 {#zong-yi-xiu} - -### 综艺 {#zong-yi-xiu-zong-yi} - -<Route author="pharaoh2012 nczitzk" example="/zyshow/chongchongchong" path="/zyshow/:region?/:id" paramsDesc={['地区,见下表,默认为空,即台湾', '综艺 id,综艺详情对应页 URL 中找到']} radar="1" anticrawler="1"> - 地区 - - | 台湾 | 韩国 | 大陆 | - | ---- | ---- | ---- | - | | kr | dl | -</Route> +:::tip +部分专辑不适用该路由,此时可以尝试 [节目](#yun-ting-jie-mu) 路由 +::: diff --git a/website/docs/routes/new-media.mdx b/website/docs/routes/new-media.mdx index 1f5b8970a..5f7bbea34 100644 --- a/website/docs/routes/new-media.mdx +++ b/website/docs/routes/new-media.mdx @@ -1,2431 +1,1588 @@ -# 📱 New media - -## 199IT {#199it} - -### 首页更新 {#199it-shou-ye-geng-xin} - -<Route author="xfangbao" example="/199it" path="/199it" /> - -### 分类 {#199it-fen-lei} - -<Route author="nczitzk" example="/199it/category/199itdata" path="/199it/category/:caty" paramsDesc={['分类,可在分类页 URL 中找到']}> - 分类为单一路径,如 `http://www.199it.com/archives/category/199itdata` 则路由为 `/199it/category/199itdata`. - - 分类包含多重路径,如 `http://www.199it.com/archives/category/emerging/5g` 则替换 `/` 为 `|`,即路由为 `/199it/category/emerging|5g`. -</Route> - -### 标签 {#199it-biao-qian} - -<Route author="nczitzk" example="/199it/tag/iphone" path="/199it/tag/:tag" paramsDesc={['标签,可在标签页 URL 中找到']} /> +# new-media ## 36kr {#36kr} -### 资讯 {#36kr-zi-xun} - -<Route author="nczitzk" example="/36kr/information/web_news" path="/36kr/information/:category?" paramsDesc={['资讯分类,见下表,默认为最新']}> - | 最新 | 推荐 | 创投 | 财经 | - | --------- | -------------- | ------- | ---- | - | web\_news | web\_recommend | contact | ccs | - - | 汽车 | 科技 | 企服 | 生活 | - | ------ | ---------- | ----------------- | ----------- | - | travel | technology | enterpriseservice | happy\_life | - - | 创新 | 房产 | 职场 | 企业号 | 其他 | - | -------- | ------------ | ------------- | ------- | ----- | - | innovate | real\_estate | web\_zhichang | qiyehao | other | -</Route> - -### 快讯 {#36kr-kuai-xun} - -<Route author="hillerliao nczitzk" example="/36kr/newsflashes" path="/36kr/newsflashes" /> - -### 用户文章 {#36kr-yong-hu-wen-zhang} - -<Route author="nczitzk" example="/36kr/user/747305693" path="/36kr/user/:id" paramsDesc={['用户 id,可在对应用户页面 URL 中找到']} /> - -### 主题文章 {#36kr-zhu-ti-wen-zhang} - -<Route author="nczitzk" example="/36kr/motif/452" path="/36kr/motif/:id" paramsDesc={['主题 id,可在对应主题页面 URL 中找到']} /> - -### 专题文章 {#36kr-zhuan-ti-wen-zhang} - -<Route author="nczitzk" example="/36kr/topics/1818512662032001" path="/36kr/topics/:id" paramsDesc={['专题 id,可在对应专题页面 URL 中找到']} /> - -### 搜索文章 {#36kr-sou-suo-wen-zhang} - -<Route author="xyqfer kt286 nczitzk" example="/36kr/search/articles/ofo" path="/36kr/search/articles/:keyword" paramsDesc={['关键字']} /> - -### 搜索快讯 {#36kr-sou-suo-kuai-xun} - -<Route author="nczitzk" example="/36kr/search/newsflashes/ofo" path="/36kr/search/newsflashes/:keyword" paramsDesc={['关键字']} /> - ### 资讯热榜 {#36kr-zi-xun-re-bang} -<Route author="nczitzk" example="/36kr/hot-list" path="/36kr/hot-list/:category?" paramsDesc={['分类,默认为24小时热榜']}> - | 24 小时热榜 | 资讯人气榜 | 资讯综合榜 | 资讯收藏榜 | - | ----------- | ---------- | ---------- | ---------- | - | 24 | renqi | zonghe | shoucang | -</Route> +<Route namespace="36kr" data={{"path":"/hot-list/:category?","categories":["new-media"],"example":"/36kr/hot-list","parameters":{"category":"分类,默认为24小时热榜"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["36kr.com/hot-list/:category","36kr.com/"],"target":"/hot-list/:category"},"name":"资讯热榜","maintainers":["nczitzk"],"description":"| 24 小时热榜 | 资讯人气榜 | 资讯综合榜 | 资讯收藏榜 |\n | ----------- | ---------- | ---------- | ---------- |\n | 24 | renqi | zonghe | shoucang |","location":"hot-list.ts"}} /> + +| 24 小时热榜 | 资讯人气榜 | 资讯综合榜 | 资讯收藏榜 | +| ----------- | ---------- | ---------- | ---------- | +| 24 | renqi | zonghe | shoucang | ## 52hrtt 华人头条 {#52hrtt-hua-ren-tou-tiao} ### 新闻 {#52hrtt-hua-ren-tou-tiao-xin-wen} -<Route author="nczitzk" example="/52hrtt/global" path="/52hrtt/:area?/:type?" paramsDesc={['地区,默认为全球', '分类,默认为新闻']}> - 地区和分类皆可在浏览器地址栏中找到,下面是一个例子。 +<Route namespace="52hrtt" data={{"path":"/:area?/:type?","categories":["new-media"],"example":"/52hrtt/global","parameters":{"area":"地区,默认为全球","type":"分类,默认为新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["nczitzk"],"description":"地区和分类皆可在浏览器地址栏中找到,下面是一个例子。\n\n 访问华人头条全球站的国际分类,会跳转到 `https://www.52hrtt.com/global/n/w?infoTypeId=A1459145516533`。其中 `global` 即为 **全球** 对应的地区代码,`A1459145516533` 即为 **国际** 对应的分类代码。","location":"index.ts"}} /> - 访问华人头条全球站的国际分类,会跳转到 `https://www.52hrtt.com/global/n/w?infoTypeId=A1459145516533`。其中 `global` 即为 **全球** 对应的地区代码,`A1459145516533` 即为 **国际** 对应的分类代码。 -</Route> +地区和分类皆可在浏览器地址栏中找到,下面是一个例子。 + +访问华人头条全球站的国际分类,会跳转到 `https://www.52hrtt.com/global/n/w?infoTypeId=A1459145516533`。其中 `global` 即为 **全球** 对应的地区代码,`A1459145516533` 即为 **国际** 对应的分类代码。 ### 专题 {#52hrtt-hua-ren-tou-tiao-zhuan-ti} -<Route author="nczitzk" example="/52hrtt/symposium/F1626082387819" path="/52hrtt/symposium/:id?/:classId?" paramsDesc={['专题 id', '子分类 id']}> - 专题 id 和 子分类 id 皆可在浏览器地址栏中找到,下面是一个例子。 +<Route namespace="52hrtt" data={{"path":"/symposium/:id?/:classId?","categories":["new-media"],"example":"/52hrtt/symposium/F1626082387819","parameters":{"id":"专题 id","classId":"子分类 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["52hrtt.com/global/n/w/symposium/:id"],"target":"/symposium/:id"},"name":"专题","maintainers":["nczitzk"],"description":"专题 id 和 子分类 id 皆可在浏览器地址栏中找到,下面是一个例子。\n\n 访问 “邱毅看平潭” 专题,会跳转到 `https://www.52hrtt.com/global/n/w/symposium/F1626082387819`。其中 `F1626082387819` 即为 **专题 id** 对应的地区代码。\n\n :::tip\n 更多的专题可以点击 [这里](https://www.52hrtt.com/global/n/w/symposium)\n :::","location":"symposium.ts"}} /> - 访问 “邱毅看平潭” 专题,会跳转到 `https://www.52hrtt.com/global/n/w/symposium/F1626082387819`。其中 `F1626082387819` 即为 **专题 id** 对应的地区代码。 +专题 id 和 子分类 id 皆可在浏览器地址栏中找到,下面是一个例子。 - :::tip - 更多的专题可以点击 [这里](https://www.52hrtt.com/global/n/w/symposium) - ::: -</Route> +访问 “邱毅看平潭” 专题,会跳转到 `https://www.52hrtt.com/global/n/w/symposium/F1626082387819`。其中 `F1626082387819` 即为 **专题 id** 对应的地区代码。 -## 8 视界 {#8-shi-jie} - -### 分类 {#8-shi-jie-fen-lei} - -<Route author="nczitzk" example="/8world" path="/8world/:category?" paramsDesc={['分类 id,见下表,默认为即时 REALTIME']}> - | 分类 | id | - | ---------------------- | -------------- | - | 即时 REALTIME | realtime | - | 新加坡 SINGAPORE | singapore | - | 东南亚 SOUTH-EAST ASIA | southeast-asia | - | 中港台 GREATER CHINA | greater-china | - | 国际 WORLD | world | - | 财经 FINANCE | finance | - | 体育 SPORTS | sports | - | 社团 COMMUNITY | community | -</Route> - -### 标签 {#8-shi-jie-biao-qian} - -<Route author="nczitzk" example="/8world/topic/xianggang-3" path="/8world/topic/:id" paramsDesc={['标签 id,可在对应标签页中找到']} /> - -## 9To5 {#9to5} - -### 9To5 Sub-site {#9to5-9to5-sub-site} - -<Route author="HenryQW" example="/9to5/mac/aapl" path="/9to5/:subsite/:category?" paramsDesc={['Subsite name', 'Tag name inside the url of the tag page']} radar="1"> - Supported sub-sites: - - | 9To5Mac | 9To5Google | 9To5Toys | - | ------- | ---------- | -------- | - | Mac | Google | Toys | -</Route> +:::tip +更多的专题可以点击 [这里](https://www.52hrtt.com/global/n/w/symposium) +::: ## AEON {#aeon} -### Types {#aeon-types} - -<Route author="emdoe" example="/aeon/essays" path="/aeon/:type" paramsDesc={['Type']}> - Supported types: Essays, Videos, and Audio. - - Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top. - - However, The content generated under `audio` does not contain links to audio files. -</Route> - ### Categories {#aeon-categories} -<Route author="emdoe" example="/aeon/category/philosophy" path="/aeon/category/:category" paramsDesc={['Category']}> - Supported categories: Philosophy, Science, Psychology, Society, and Culture. -</Route> +<Route namespace="aeon" data={{"path":"/category/:category","categories":["new-media"],"example":"/aeon/category/philosophy","parameters":{"category":"Category"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aeon.aeon.co/:category"]},"name":"Categories","maintainers":["emdoe"],"description":"Supported categories: Philosophy, Science, Psychology, Society, and Culture.","location":"category.ts"}} /> + +Supported categories: Philosophy, Science, Psychology, Society, and Culture. + +### Types {#aeon-types} + +<Route namespace="aeon" data={{"path":"/:type","categories":["new-media"],"example":"/aeon/essays","parameters":{"type":"Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aeon.aeon.co/:type"]},"name":"Types","maintainers":["emdoe"],"description":"Supported types: Essays, Videos, and Audio.\n\n Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top.\n\n However, The content generated under `audio` does not contain links to audio files.","location":"type.ts"}} /> + +Supported types: Essays, Videos, and Audio. + +Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top. + +However, The content generated under `audio` does not contain links to audio files. ## AG⓪RA {#ag%E2%93%AAra} -### 零博客 {#ag%E2%93%AAra-ling-bo-ke} - -<Route author="nczitzk" example="/agora0/initium" path="/agora0/:category?" paramsDesc={['分类,见下表,默认为 initium,即端传媒']} radar="1"> - | muitinⒾ | aidemnⒾ | srettaⓂ | qⓅ | sucoⓋ | - | ------- | ------- | -------- | -- | ----- | - | initium | inmedia | matters | pq | vocus | -</Route> - ### 共和報 {#ag%E2%93%AAra-gong-he-bao} -<Route author="TonyRL" example="/agora0/pen0" path="/agora0/pen0" radar="1" /> +<Route namespace="agora0" data={{"path":"/pen0","categories":["new-media"],"example":"/agora0/pen0","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agorahub.github.io/pen0"]},"name":"共和報","maintainers":["TonyRL"],"url":"agorahub.github.io/pen0","location":"pen0.ts"}} /> -## American Federation of Labor and Congress of Industrial Organizations {#american-federation-of-labor-and-congress-of-industrial-organizations} +### 零博客 {#ag%E2%93%AAra-ling-bo-ke} -### Blog {#american-federation-of-labor-and-congress-of-industrial-organizations-blog} +<Route namespace="agora0" data={{"path":"/:category?","categories":["new-media"],"example":"/agora0/initium","parameters":{"category":"分类,见下表,默认为 initium,即端传媒"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agora0.gitlab.io/blog/:category","agora0.gitlab.io/"],"target":"/:category"},"name":"零博客","maintainers":["nczitzk"],"description":"| muitinⒾ | aidemnⒾ | srettaⓂ | qⓅ | sucoⓋ |\n | ------- | ------- | -------- | -- | ----- |\n | initium | inmedia | matters | pq | vocus |","location":"index.ts"}} /> -<Route author="nczitzk" example="/aflcio/blog" path="/aflcio/blog" /> +| muitinⒾ | aidemnⒾ | srettaⓂ | qⓅ | sucoⓋ | +| ------- | ------- | -------- | -- | ----- | +| initium | inmedia | matters | pq | vocus | ## AppleInsider {#appleinsider} ### Category {#appleinsider-category} -<Route author="nczitzk" example="/appleinsider" path="/appleinsider/:category?" paramsDesc={['Category, see below, News by default']}> - | News | Reviews | How-tos | - | ---- | ------- | ------- | - | | reviews | how-to | -</Route> +<Route namespace="appleinsider" data={{"path":"/:category?","categories":["new-media"],"example":"/appleinsider","parameters":{"category":"Category, see below, News by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["appleinsider.com/:category","appleinsider.com/"],"target":"/:category"},"name":"Category","maintainers":["nczitzk"],"description":"| News | Reviews | How-tos |\n | ---- | ------- | ------- |\n | | reviews | how-to |","location":"index.ts"}} /> -## ASML Holding N.V {#asml-holding-n-v} - -### Press releases & announcements {#asml-holding-n-v-press-releases-announcements} - -<Route author="nczitzk" example="/asml/press-releases" path="/asml/press-releases" /> - -## Bad.news {#bad-news} - -### 通用 {#bad-news-tong-yong} - -<Route author="nczitzk" example="/bad" path="/bad/:path+" paramsDesc={['路径,默认为首页热门']} anticrawler="1"> - :::tip - 若订阅 [每日热点 - 最新](https://bad.news/tag/每日热点/sort-new),网址为 [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)。截取 `https://bad.news` 到末尾的部分 `/tag/大陆资讯/sort-hot` 作为参数,路由为 [`/bad/tag/大陆资讯/sort-hot`](https://rsshub.app/bad/tag/大陆资讯/sort-hot)。 - ::: -</Route> - -## biodiscover.com 生物探索 {#biodiscover-com-sheng-wu-tan-suo} - -### Channel {#biodiscover-com-sheng-wu-tan-suo-channel} - -<Route author="aidistan" example="/biodiscover/reaseach" path="/biodiscover/:channel" paramsDesc={['channel, see below']}> - | Research | Interview | Industry | Activity | - | -------- | --------- | -------- | -------- | - | reaseach | interview | industry | activity | -</Route> +| News | Reviews | How-tos | +| ---- | ------- | ------- | +| | reviews | how-to | ## C114 通信网 {#c114-tong-xin-wang} ### 滚动新闻 {#c114-tong-xin-wang-gun-dong-xin-wen} -<Route author="nczitzk" example="/c114/roll" path="/c114/roll" /> - -## CBNData {#cbndata} - -### 看点 {#cbndata-kan-dian} - -<Route author="nczitzk" example="/cbndata/information" path="/cbndata/information/:category?" paramsDesc={['分类,见下表,默认为看点']}> - | 看点 | 餐饮零售 | 美妆个护 | 服饰鞋包 | 家电数码 | 宠物 | 营销 | - | ---- | -------- | -------- | -------- | -------- | ---- | ---- | - | | 2560 | 1 | 2559 | 59 | 2419 | 2484 | -</Route> - -## cfan {#cfan} - -### News {#cfan-news} - -<Route author="kt286" example="/cfan/news" path="/cfan/news" /> - -## CGTN {#cgtn} - -### Opinions {#cgtn-opinions} - -<Route author="nczitzk" example="/cgtn/opinions" path="/cgtn/opinions" /> - -### Most Read & Most Share {#cgtn-most-read-most-share} - -<Route author="nczitzk" example="/cgtn/most/read/day" path="/cgtn/most/:type?/:time?" paramsDesc={['Type, `read` as most read, `share` as most share, `read` by default', 'Time range, `all` as all the time, `day` as today, `week` as this week, `month` as this month, `year` as this year, `all` by default']} /> - -## China Labour Bulletin 中国劳工通讯 {#china-labour-bulletin-zhong-guo-lao-gong-tong-xun} - -### Commentary and Analysis {#china-labour-bulletin-zhong-guo-lao-gong-tong-xun-commentary-and-analysis} - -<Route author="nczitzk" example="/clb/commentary" path="/clb/commentary/:lang?" paramsDesc={['Language, Simplified Chinese by default, or `en` as English']} /> +<Route namespace="c114" data={{"path":"/roll","categories":["new-media"],"example":"/c114/roll","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["c114.com.cn/news/roll.asp","c114.com.cn/"]},"name":"滚动新闻","maintainers":["nczitzk"],"url":"c114.com.cn/news/roll.asp","location":"roll.ts"}} /> ## China.com 中华网 {#china-com-zhong-hua-wang} +### Finance News 财经 - 财经新闻 {#china-com-zhong-hua-wang-finance-news-cai-jing-cai-jing-xin-wen} + +<Route namespace="china" data={{"path":"/finance/:category?","categories":["new-media"],"example":"/china/finance","parameters":{"category":"Category of news. See the form below for details, default is suggest news."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["finance.china.com/:category"]},"name":"Finance News 财经 - 财经新闻","maintainers":["KingJem"],"description":"| 推荐 | TMT | 金融 | 地产 | 消费 | 医药 | 酒业 | IPO 观察 |\n | ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- |\n | tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO |\n\n > Note: The default news num is `30`.\n\n > 注意:默认新闻条数是 `30`。","location":"finance/finance.ts"}} /> + +| 推荐 | TMT | 金融 | 地产 | 消费 | 医药 | 酒业 | IPO 观察 | +| ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- | +| tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO | + +> Note: The default news num is `30`. + +> 注意:默认新闻条数是 `30`。 + ### Military - Military News 军事 - 军事新闻 {#china-com-zhong-hua-wang-military-military-news-jun-shi-jun-shi-xin-wen} -<Route author="jiaaoMario" example="/china/news/military" path="/china/news/military" /> +<Route namespace="china" data={{"path":"/news/military","categories":["new-media"],"example":"/china/news/military","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["military.china.com/news"]},"name":"Military - Military News 军事 - 军事新闻","maintainers":["jiaaoMario"],"url":"military.china.com/news","location":"news/military/news.ts"}} /> ### News and current affairs 时事新闻 {#china-com-zhong-hua-wang-news-and-current-affairs-shi-shi-xin-wen} -<Route author="jiaaoMario" example="/china/news" path="/china/news/:category?" paramsDesc={['Category of news. See the form below for details, default is china news.']}> - Category of news +<Route namespace="china" data={{"path":"/news/:category?","categories":["new-media"],"example":"/china/news","parameters":{"category":"Category of news. See the form below for details, default is china news."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.china.com/:category"]},"name":"News and current affairs 时事新闻","maintainers":["jiaaoMario"],"description":"Category of news\n\n | China News | International News | Social News | Breaking News |\n | ---------- | ------------------ | ----------- | ------------- |\n | domestic | international | social | news100 |","location":"news/highlights/news.ts"}} /> - | China News | International News | Social News | Breaking News | - | ---------- | ------------------ | ----------- | ------------- | - | domestic | international | social | news100 | -</Route> +Category of news -### Finance News 财经 - 财经新闻 {#china-com-zhong-hua-wang-finance-news-cai-jing-cai-jing-xin-wen} - -<Route author="KingJem" example="/china/finance" path="/china/finance/:category?" paramsDesc={['Category of news. See the form below for details, default is suggest news.']} radar="1"> - | 推荐 | TMT | 金融 | 地产 | 消费 | 医药 | 酒业 | IPO 观察 | - | ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- | - | tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO | - - > Note: The default news num is `30`. - - > 注意:默认新闻条数是 `30`。 -</Route> - -## cnBeta.COM {#cnbeta-com} - -### 头条资讯 {#cnbeta-com-tou-tiao-zi-xun} - -<Route author="kt286 HaitianLiu nczitzk" example="/cnbeta" path="/cnbeta" /> - -### 分类 {#cnbeta-com-fen-lei} - -<Route author="nczitzk" example="/cnbeta/category/movie" path="/cnbeta/category/:id" paramsDesc={['分类 id,可在对应分类页的 URL 中找到']}> - | 影视 | 音乐 | 游戏 | 动漫 | 趣闻 | 科学 | 软件 | - | ----- | ----- | ---- | ----- | ----- | ------- | ---- | - | movie | music | game | comic | funny | science | soft | -</Route> - -### 主题 {#cnbeta-com-zhu-ti} - -<Route author="cczhong11 nczitzk" example="/cnbeta/topics/453" path="/cnbeta/topics/:id" paramsDesc={['主题 id,可在对应主题页的 URL 中找到']}> - :::tip - 完整的主题列表参见 [主题列表](https://www.cnbeta.com.tw/topics.htm) - ::: -</Route> +| China News | International News | Social News | Breaking News | +| ---------- | ------------------ | ----------- | ------------- | +| domestic | international | social | news100 | ## CoinDesk Consensus Magazine {#coindesk-consensus-magazine} ### 新闻周刊 {#coindesk-consensus-magazine-xin-wen-zhou-kan} -<Route author="jameshih" example="/coindesk/consensus-magazine" path="/coindesk/consensus-magazine" /> +<Route namespace="coindesk" data={{"path":"/consensus-magazine","categories":["new-media"],"example":"/coindesk/consensus-magazine","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["coindesk.com/"]},"name":"新闻周刊","maintainers":["jameshih"],"url":"coindesk.com/","location":"index.ts"}} /> ## DCFever {#dcfever} -### 新聞中心 {#dcfever-xin-wen-zhong-xin} - -<Route author="TonyRL" example="/dcfever/news" path="/dcfever/news/:type?" paramsDesc={['分類,預設為所有新聞']} radar="1"> - | 所有新聞 | 攝影器材 | 手機通訊 | 汽車熱話 | 攝影文化 | 影片攝錄 | 測試報告 | 生活科技 | 攝影技巧 | - | -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- | - | | camera | mobile | auto | photography | videography | reviews | gadget | technique | -</Route> - ### 測試報告 {#dcfever-ce-shi-bao-gao} -<Route author="TonyRL" example="/dcfever/reviews/cameras" path="/dcfever/reviews/:type?" paramsDesc={['分類,預設為 `cameras`']} radar="1"> - | 相機及鏡頭 | 手機平板 | 試車報告 | - | ---------- | -------- | -------- | - | cameras | phones | cars | -</Route> +<Route namespace="dcfever" data={{"path":"/reviews/:type?","categories":["new-media"],"example":"/dcfever/reviews/cameras","parameters":{"type":"分類,預設為 `cameras`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dcfever.com/:type/reviews.php"],"target":"/reviews/:type"},"name":"測試報告","maintainers":["TonyRL"],"description":"| 相機及鏡頭 | 手機平板 | 試車報告 |\n | ---------- | -------- | -------- |\n | cameras | phones | cars |","location":"reviews.ts"}} /> -### 二手市集 {#dcfever-er-shou-shi-ji} - -<Route author="TonyRL" example="/dcfever/trading/1" path="/dcfever/trading/:id" paramsDesc={['分類 ID,見下表']} radar="1"> - [所有物品分類](https://www.dcfever.com/trading/index.php#all_cats) - - | 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 | - | -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- | - | 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 | -</Route> +| 相機及鏡頭 | 手機平板 | 試車報告 | +| ---------- | -------- | -------- | +| cameras | phones | cars | ### 二手市集 - 物品搜尋 {#dcfever-er-shou-shi-ji-wu-pin-sou-xun} -<Route author="TonyRL" example="/dcfever/trading/search/Sony" path="/dcfever/trading/search/:keyword/:mainCat?" paramsDesc={['關鍵字', '主要分類 ID,見上表']} radar="1" /> +<Route namespace="dcfever" data={{"path":"/trading/search/:keyword/:mainCat?","categories":["new-media"],"example":"/dcfever/trading/search/Sony","parameters":{"keyword":"關鍵字","mainCat":"主要分類 ID,見上表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"二手市集 - 物品搜尋","maintainers":["TonyRL"],"location":"trading-search.ts"}} /> -## Deadline {#deadline} +### 二手市集 {#dcfever-er-shou-shi-ji} -### Latest Article {#deadline-latest-article} +<Route namespace="dcfever" data={{"path":"/trading/:id","categories":["new-media"],"example":"/dcfever/trading/1","parameters":{"id":"分類 ID,見下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"二手市集","maintainers":["TonyRL"],"description":"[所有物品分類](https://www.dcfever.com/trading/index.php#all_cats)\n\n | 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 |\n | -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- |\n | 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 |","location":"trading.ts"}} /> -<Route author="TonyRL" example="/deadline" path="/deadline" radar="1" /> +[所有物品分類](https://www.dcfever.com/trading/index.php#all_cats) -## DeepL {#deepl} +| 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 | +| -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- | +| 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 | -### Blog {#deepl-blog} +### 新聞中心 {#dcfever-xin-wen-zhong-xin} -<Route author="nczitzk" example="/deepl/blog" path="/deepl/blog/:lang?" paramsDesc={['语言,可选 `en` 指 英语 和 `zh` 指 汉语,默认为 en']} /> +<Route namespace="dcfever" data={{"path":"/news/:type?","categories":["new-media"],"example":"/dcfever/news","parameters":{"type":"分類,預設為所有新聞"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新聞中心","maintainers":["TonyRL"],"description":"| 所有新聞 | 攝影器材 | 手機通訊 | 汽車熱話 | 攝影文化 | 影片攝錄 | 測試報告 | 生活科技 | 攝影技巧 |\n | -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- |\n | | camera | mobile | auto | photography | videography | reviews | gadget | technique |","location":"news.ts"}} /> + +| 所有新聞 | 攝影器材 | 手機通訊 | 汽車熱話 | 攝影文化 | 影片攝錄 | 測試報告 | 生活科技 | 攝影技巧 | +| -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- | +| | camera | mobile | auto | photography | videography | reviews | gadget | technique | ## DeepMind {#deepmind} ### Blog {#deepmind-blog} -<Route author="nczitzk" example="/deepmind/blog" path="/deepmind/blog" radar="1" /> +<Route namespace="deepmind" data={{"path":"/blog","categories":["new-media"],"example":"/deepmind/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["deepmind.com/blog","deepmind.com/"]},"name":"Blog","maintainers":["nczitzk","TonyRL"],"url":"deepmind.com/blog","location":"blog.ts"}} /> ## DN.com {#dn-com} ### News {#dn-com-news} -<Route author="nczitzk" example="/dn/en-us/news" path="/dn/:language/news/:category?" paramsDesc={['Language, see below', 'Category, see below, The Latest by default']} radar="1"> - #### Language +<Route namespace="dn" data={{"path":"/:language/news/:category?","categories":["new-media"],"example":"/dn/en-us/news","parameters":{"language":"Language, see below","category":"Category, see below, The Latest by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["nczitzk"],"description":"#### Language\n\n | English | 中文 |\n | ------- | ----- |\n | en-us | zh-cn |\n\n #### Category\n\n | English Category | 中文分类 | Category id |\n | -------------------- | -------- | ----------- |\n | The Latest | 最新 | |\n | Industry Information | 行业资讯 | category-1 |\n | Knowledge | 域名知识 | category-2 |\n | Investment | 域名投资 | category-3 |","location":"news.ts"}} /> - | English | 中文 | - | ------- | ----- | - | en-us | zh-cn | +#### Language {#dn-com-news-language} - #### Category +| English | 中文 | +| ------- | ----- | +| en-us | zh-cn | - | English Category | 中文分类 | Category id | - | -------------------- | -------- | ----------- | - | The Latest | 最新 | | - | Industry Information | 行业资讯 | category-1 | - | Knowledge | 域名知识 | category-2 | - | Investment | 域名投资 | category-3 | -</Route> +#### Category {#dn-com-news-category} + +| English Category | 中文分类 | Category id | +| -------------------- | -------- | ----------- | +| The Latest | 最新 | | +| Industry Information | 行业资讯 | category-1 | +| Knowledge | 域名知识 | category-2 | +| Investment | 域名投资 | category-3 | ## e 公司 {#e-gong-si} ### 快讯 {#e-gong-si-kuai-xun} -<Route author="hillerliao" example="/egsea/flash" path="/egsea/flash" /> - -## Engadget 瘾科技 {#engadget-yin-ke-ji} - -### Multi-language {#engadget-yin-ke-ji-multi-language} - -<Route author="JamesWDGu KeiLongW" example="/engadget/chinese" path="/engadget/:lang" paramsDesc={['Language']}> - | Traditional Chinese | Simplified Chinese | US | Japanese | - | ------------------- | ------------------ | -- | -------- | - | chinese | cn | us | japanese | -</Route> +<Route namespace="egsea" data={{"path":"/flash","categories":["new-media"],"example":"/egsea/flash","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["egsea.com/news/flash"]},"name":"快讯","maintainers":["hillerliao"],"url":"egsea.com/news/flash","location":"flash.ts"}} /> ## ePrice {#eprice} ### 最新消息 {#eprice-zui-xin-xiao-xi} -<Route author="TonyRL" example="/eprice/tw" path="/eprice/:region?" paramsDesc={['地区,预设为 tw']}> - 地区: +<Route namespace="eprice" data={{"path":"/:region?","categories":["new-media"],"example":"/eprice/tw","parameters":{"region":"地区,预设为 tw"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新消息","maintainers":["TonyRL"],"description":"地区:\n\n | hk | tw |\n | ---- | ---- |\n | 香港 | 台湾 |","location":"rss.ts"}} /> - | hk | tw | - | ---- | ---- | - | 香港 | 台湾 | -</Route> +地区: + +| hk | tw | +| ---- | ---- | +| 香港 | 台湾 | ## EU Disinfo Lab {#eu-disinfo-lab} ### Publications {#eu-disinfo-lab-publications} -<Route author="nczitzk" example="/disinfo/publications" path="/disinfo/publications" /> - -## Europa Press {#europa-press} - -### Category {#europa-press-category} - -<Route author="nczitzk" example="/europapress" path="/europapress/:category?" paramsDesc={['Category, see below, Home by default']}> - Categories - - | España | Internacional | Economía | Deportes | - | -------- | ------------- | -------- | -------- | - | nacional | internacional | economía | deportes | - - | Cultura | Sociedad | Ciencia | Salud | - | ------- | -------- | ------- | ----- | - | cultura | sociedad | ciencia | salud | - - | Tecnología | Comunicados | Estar donde estés | - | ---------- | ----------- | ----------------- | - | tecnología | comunicados | estar-donde-estes | - - | Andalucía | Aragón | Cantabria | Castilla-La Mancha | - | --------- | ------ | --------- | ------------------ | - | andalucia | aragon | cantabria | castilla-lamancha | - - | Castilla y León | Cataluña | Extremadura | Galicia | - | --------------- | --------- | ----------- | ------- | - | castilla-y-leon | catalunya | extremadura | galicia | - - | Islas Canarias | Islas Baleares | Madrid | País Vasco | - | -------------- | -------------- | ------ | ---------- | - | islas-canarias | illes-balears | madrid | euskadi | - - | La Rioja | C. Valenciana | Navarra | Asturias | - | -------- | -------------------- | ------- | -------- | - | la-rioja | comunitat-valenciana | navarra | asturias | - - | Murcia | Ceuta y Melilla | - | ------ | --------------- | - | murcia | ceuta-y-melilla | -</Route> +<Route namespace="disinfo" data={{"path":"/publications","categories":["new-media"],"example":"/disinfo/publications","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["disinfo.eu/"]},"name":"Publications","maintainers":["nczitzk"],"url":"disinfo.eu/","location":"publications.ts"}} /> ## Farmatters {#farmatters} -### Viewpoint {#farmatters-viewpoint} +### Exclusive {#farmatters-exclusive} -<Route author="nczitzk" example="/farmatters/news" path="/farmatters/news/:locale?" paramsDesc={['Locale, `zh-CN` or `en-US`, `zh-CN` by default']} radar="1" /> +<Route namespace="farmatters" data={{"path":["/exclusive/:locale?","/news/:locale?","/:locale?","/:type/:id/:locale?"],"categories":["new-media"],"example":"/farmatters/exclusive","parameters":{"locale":"Locale, `zh-CN` or `en-US`, `zh-CN` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["farmatters.com/exclusive"],"target":"/exclusive"},"name":"Exclusive","maintainers":["nczitzk"],"url":"farmatters.com/exclusive","location":"index.ts"}} /> ### Exclusive {#farmatters-exclusive} -<Route author="nczitzk" example="/farmatters/exclusive" path="/farmatters/exclusive/:locale?" paramsDesc={['Locale, `zh-CN` or `en-US`, `zh-CN` by default']} radar="1" /> +<Route namespace="farmatters" data={{"path":["/exclusive/:locale?","/news/:locale?","/:locale?","/:type/:id/:locale?"],"categories":["new-media"],"example":"/farmatters/exclusive","parameters":{"locale":"Locale, `zh-CN` or `en-US`, `zh-CN` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["farmatters.com/exclusive"],"target":"/exclusive"},"name":"Exclusive","maintainers":["nczitzk"],"url":"farmatters.com/exclusive","location":"index.ts"}} /> -### Tag {#farmatters-tag} +### Exclusive {#farmatters-exclusive} -<Route author="nczitzk" example="/farmatters/tag/1" path="/farmatters/tag/:id/:locale?" paramsDesc={['Tag id, see below', 'Locale, `zh-CN` or `en-US`, `zh-CN` by default']} radar="1"> - | id | Tag | 标签 | - | -- | -------------------- | -------- | - | 1 | company | 上市公司 | - | 2 | original | 原创 | - | 3 | business investment | 商业投资 | - | 4 | comments | 评论 | - | 5 | agtech | 农业科技 | - | 12 | cellular agriculture | 细胞农业 | - | 17 | vertical farming | 垂直农业 | - | 19 | urban agriculture | 城市农业 | - | 20 | mechinery | 农机 | - | 23 | agfood | 农产食材 | - | 25 | alternative protein | 替代蛋白 | - | 29 | food waste | 食物浪费 | - | 31 | CEA | 设施农业 | - | 36 | agronomy | 农艺 | - | 41 | synthetic biology | 合成生物 | -</Route> +<Route namespace="farmatters" data={{"path":["/exclusive/:locale?","/news/:locale?","/:locale?","/:type/:id/:locale?"],"categories":["new-media"],"example":"/farmatters/exclusive","parameters":{"locale":"Locale, `zh-CN` or `en-US`, `zh-CN` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["farmatters.com/exclusive"],"target":"/exclusive"},"name":"Exclusive","maintainers":["nczitzk"],"url":"farmatters.com/exclusive","location":"index.ts"}} /> -### Wiki {#farmatters-wiki} +### Exclusive {#farmatters-exclusive} -<Route author="nczitzk" example="/farmatters/wiki/1" path="/farmatters/wiki/:id/:locale?" paramsDesc={['Category id, see below', 'Locale, `zh-CN` or `en-US`, `zh-CN` by default']} radar="1"> - | id | Category | 分类 | - | -- | ----------- | -------- | - | 1 | Agriculture | 农业知识 | - | 2 | Others | 其他 | - | 3 | Food | 食物贴士 | -</Route> - -## Fashion Network {#fashion-network} - -### Headline {#fashion-network-headline} - -<Route author="nczitzk" example="/fashionnetwork/headline" path="/fashionnetwork/headline/:country?" paramsDesc={['Country, see below, `ww` by default']} /> - -### News {#fashion-network-news} - -<Route author="nczitzk" example="/fashionnetwork/news/5,6/15,112" path="/fashionnetwork/news/:sectors?/:categories?/:country?" paramsDesc={['Sectors, see below, `all` by default', 'Categories, see below, `all` by default', 'Country, see below, `ww` as Worldwide by default']}> - Sectoies - - Fashion 1 - - | Ready-to-wear | Accessories | Footwear | Sports | Denim | Lingerie | Swimwear | Eyewear | Bridal wear | Textile | Miscellaneous | - | ------------- | ----------- | -------- | ------ | ----- | -------- | -------- | ------- | ----------- | ------- | ------------- | - | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 31 | - - Luxury 2 - - | Ready-to-wear | Accessories | Footwear | Watches | Jewellery | Miscellaneous | - | ------------- | ----------- | -------- | ------- | --------- | ------------- | - | 15 | 16 | 17 | 18 | 19 | 32 | - - Beauty 3 - - | Perfume | Cosmetics | Aesthetics | Wellness | Hair | Miscellaneous | - | ------- | --------- | ---------- | -------- | ---- | ------------- | - | 21 | 22 | 23 | 24 | 33 | | - - Lifestyle 4 - - | Home decor | Tableware | Hospitality | Fine foods | Tourism | Miscellaneous | - | ---------- | --------- | ----------- | ---------- | ------- | ------------- | - | 25 | 26 | 27 | 28 | 29 | 34 | - - Others 30 - - Category - - | Retail | Business | Industry | Trade shows | - | ------ | -------- | -------- | ----------- | - | 15 | 112 | 5 | 12 | - - | Innovations | Collection | Catwalks | Design | - | ----------- | ---------- | -------- | ------ | - | 113 | 114 | 60 | 70 | - - | Media | Campaigns | People | Events | Appointments | - | ----- | --------- | ------ | ------ | ------------ | - | 50 | 115 | 80 | 90 | 95 | - - Country - - | Latin America | Brazil | China | France | - | ------------- | ------ | ----- | ------ | - | pe | br | cn | fr | - - | Germany | India | Italy | Japan | - | ------- | ----- | ----- | ----- | - | de | in | it | jp | - - | Mexico | Portugal | Russia | Spain | - | ------ | -------- | ------ | ----- | - | mx | pt | ru | es | - - | Turkey | United Kingdom | USA | Worldwide | - | ------ | -------------- | --- | --------- | - | tr | uk | us | ww | -</Route> - -## Fermilab {#fermilab} - -### News {#fermilab-news} - -<Route author="nczitzk" example="/fnal/news" path="/fnal/news/:category?" paramsDesc={['Category, see below, All News by default']}> - | All News | Fermilab features | Press releases | Symmetry features | - | -------- | ----------------- | -------------- | ----------------- | - | allnews | 269 | 55 | 12580 | -</Route> +<Route namespace="farmatters" data={{"path":["/exclusive/:locale?","/news/:locale?","/:locale?","/:type/:id/:locale?"],"categories":["new-media"],"example":"/farmatters/exclusive","parameters":{"locale":"Locale, `zh-CN` or `en-US`, `zh-CN` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["farmatters.com/exclusive"],"target":"/exclusive"},"name":"Exclusive","maintainers":["nczitzk"],"url":"farmatters.com/exclusive","location":"index.ts"}} /> ## Focus Taiwan {#focus-taiwan} ### Category {#focus-taiwan-category} -<Route author="nczitzk" example="/focustaiwan" path="/focustaiwan/:category?" paramsDesc={['分类,见下表,默认为 news']}> - | Latest | Editor's Picks | Photos of the Day | - | ------ | -------------- | ----------------- | - | news | editorspicks | photos | +<Route namespace="focustaiwan" data={{"path":"/:category?","categories":["new-media"],"example":"/focustaiwan","parameters":{"category":"分类,见下表,默认为 news"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"description":"| Latest | Editor's Picks | Photos of the Day |\n | ------ | -------------- | ----------------- |\n | news | editorspicks | photos |\n\n | Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports |\n | -------- | ------------ | -------- | ------- | -------------- | ------- | ------ |\n | politics | cross-strait | business | society | science & tech | culture | sports |","location":"index.ts"}} /> - | Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports | - | -------- | ------------ | -------- | ------- | -------------- | ------- | ------ | - | politics | cross-strait | business | society | science & tech | culture | sports | -</Route> +| Latest | Editor's Picks | Photos of the Day | +| ------ | -------------- | ----------------- | +| news | editorspicks | photos | + +| Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports | +| -------- | ------------ | -------- | ------- | -------------- | ------- | ------ | +| politics | cross-strait | business | society | science & tech | culture | sports | ## Foresight News {#foresight-news} -### 首页 {#foresight-news-shou-ye} +### 快讯 {#foresight-news-kuai-xun} -<Route author="nczitzk" example="/foresightnews" path="/foresightnews" /> +<Route namespace="foresightnews" data={{"path":"/news","categories":["new-media"],"example":"/foresightnews/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["foresightnews.pro/news","foresightnews.pro/"]},"name":"快讯","maintainers":["nczitzk"],"url":"foresightnews.pro/news","location":"news.ts"}} /> ### 文章 {#foresight-news-wen-zhang} -<Route author="nczitzk" example="/foresightnews/article" path="/foresightnews/article" /> - -### 快讯 {#foresight-news-kuai-xun} - -<Route author="nczitzk" example="/foresightnews/news" path="/foresightnews/news" /> +<Route namespace="foresightnews" data={{"path":"/article","categories":["new-media"],"example":"/foresightnews/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["foresightnews.pro/"]},"name":"文章","maintainers":["nczitzk"],"url":"foresightnews.pro/","location":"article.ts"}} /> ### 专栏 {#foresight-news-zhuan-lan} -<Route author="nczitzk" example="/foresightnews/column/1" path="/foresightnews/column/:id" paramsDesc={['专栏 id, 可在对应专栏页 URL 中找到']} /> +<Route namespace="foresightnews" data={{"path":"/column/:id","categories":["new-media"],"example":"/foresightnews/column/1","parameters":{"id":"专栏 id, 可在对应专栏页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["foresightnews.pro/column/detail/:id","foresightnews.pro/"]},"name":"专栏","maintainers":["nczitzk"],"url":"foresightnews.pro/","location":"column.ts"}} /> -## Google News {#google-news} +## Google {#google} -### News {#google-news-news} +### News {#google-news} -<Route author="zoenglinghou" example="/google/news/Top stories/hl=en-US&gl=US&ceid=US:en" path="/google/news/:category/:locale" paramsDesc={['Category Title', 'locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters']} /> +<Route namespace="google" data={{"path":"/news/:category/:locale","categories":["new-media"],"example":"/google/news/Top stories/hl=en-US&gl=US&ceid=US:en","parameters":{"category":"Category Title","locale":"locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["zoenglinghou"],"location":"news.ts"}} /> ## Grist {#grist} -### Articles {#grist-articles} - -<Route author="Rjnishant530" example="/grist" path="/grist" radar="1" /> - ### Featured {#grist-featured} -<Route author="Rjnishant530" example="/grist/featured" path="/grist/featured" radar="1" /> +<Route namespace="grist" data={{"path":"/featured","categories":["new-media"],"example":"/grist/featured","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grist.org/"]},"name":"Featured","maintainers":["Rjnishant530"],"url":"grist.org/","location":"featured.ts"}} /> ### Series {#grist-series} -<Route author="Rjnishant530" example="/grist/series/best-of-grist" path="/grist/series/:series" paramsDesc={['Find in the URL which has /series/']} radar="1" /> +<Route namespace="grist" data={{"path":"/series/:series","categories":["new-media"],"example":"/grist/series/best-of-grist","parameters":{"series":"Find in the URL which has /series/"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grist.org/series/:series"]},"name":"Series","maintainers":["Rjnishant530"],"url":"grist.org/articles/","location":"series.ts"}} /> ### Topic {#grist-topic} -<Route author="Rjnishant530" example="/grist/topic/extreme-heat" path="/grist/topic/:topic" paramsDesc={['Any Topic from Table below']} radar="1"> - Topics +<Route namespace="grist" data={{"path":"/topic/:topic","categories":["new-media"],"example":"/grist/topic/extreme-heat","parameters":{"topic":"Any Topic from Table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grist.org/:topic"]},"name":"Topic","maintainers":["Rjnishant530"],"url":"grist.org/articles/","description":"Topics\n\n | Topic Name | Topic Link |\n | ------------------------ | ------------------ |\n | Accountability | accountability |\n | Agriculture | agriculture |\n | Ask Umbra | ask-umbra-series |\n | Buildings | buildings |\n | Cities | cities |\n | Climate & Energy | climate-energy |\n | Climate Fiction | climate-fiction |\n | Climate of Courage | climate-of-courage |\n | COP26 | cop26 |\n | COP27 | cop27 |\n | Culture | culture |\n | Economics | economics |\n | Energy | energy |\n | Equity | equity |\n | Extreme Weather | extreme-weather |\n | Fix | fix |\n | Food | food |\n | Grist | grist |\n | Grist News | grist-news |\n | Health | health |\n | Housing | housing |\n | Indigenous Affairs | indigenous |\n | International | international |\n | Labor | labor |\n | Language | language |\n | Migration | migration |\n | Opinion | opinion |\n | Politics | politics |\n | Protest | protest |\n | Race | race |\n | Regulation | regulation |\n | Science | science |\n | Shift Happens Newsletter | shift-happens |\n | Solutions | solutions |\n | Spanish | spanish |\n | Sponsored | sponsored |\n | Technology | technology |\n | Temperature Check | temperature-check |\n | Uncategorized | article |\n | Updates | updates |\n | Video | video |","location":"topic.ts"}} /> - | Topic Name | Topic Link | - | ------------------------ | ------------------ | - | Accountability | accountability | - | Agriculture | agriculture | - | Ask Umbra | ask-umbra-series | - | Buildings | buildings | - | Cities | cities | - | Climate & Energy | climate-energy | - | Climate Fiction | climate-fiction | - | Climate of Courage | climate-of-courage | - | COP26 | cop26 | - | COP27 | cop27 | - | Culture | culture | - | Economics | economics | - | Energy | energy | - | Equity | equity | - | Extreme Weather | extreme-weather | - | Fix | fix | - | Food | food | - | Grist | grist | - | Grist News | grist-news | - | Health | health | - | Housing | housing | - | Indigenous Affairs | indigenous | - | International | international | - | Labor | labor | - | Language | language | - | Migration | migration | - | Opinion | opinion | - | Politics | politics | - | Protest | protest | - | Race | race | - | Regulation | regulation | - | Science | science | - | Shift Happens Newsletter | shift-happens | - | Solutions | solutions | - | Spanish | spanish | - | Sponsored | sponsored | - | Technology | technology | - | Temperature Check | temperature-check | - | Uncategorized | article | - | Updates | updates | - | Video | video | -</Route> +Topics -## Grub Street {#grub-street} - -### Posts {#grub-street-posts} - -<Route author="loganrockmore" example="/grubstreet" path="/grubstreet" /> +| Topic Name | Topic Link | +| ------------------------ | ------------------ | +| Accountability | accountability | +| Agriculture | agriculture | +| Ask Umbra | ask-umbra-series | +| Buildings | buildings | +| Cities | cities | +| Climate & Energy | climate-energy | +| Climate Fiction | climate-fiction | +| Climate of Courage | climate-of-courage | +| COP26 | cop26 | +| COP27 | cop27 | +| Culture | culture | +| Economics | economics | +| Energy | energy | +| Equity | equity | +| Extreme Weather | extreme-weather | +| Fix | fix | +| Food | food | +| Grist | grist | +| Grist News | grist-news | +| Health | health | +| Housing | housing | +| Indigenous Affairs | indigenous | +| International | international | +| Labor | labor | +| Language | language | +| Migration | migration | +| Opinion | opinion | +| Politics | politics | +| Protest | protest | +| Race | race | +| Regulation | regulation | +| Science | science | +| Shift Happens Newsletter | shift-happens | +| Solutions | solutions | +| Spanish | spanish | +| Sponsored | sponsored | +| Technology | technology | +| Temperature Check | temperature-check | +| Uncategorized | article | +| Updates | updates | +| Video | video | ## Harvard Business Review {#harvard-business-review} ### Topic {#harvard-business-review-topic} -<Route author="nczitzk" example="/hbr/topic/leadership" path="/hbr/topic/:topic?/:type?" paramsDesc={['Topic, can be found in URL, Leadership by default', 'Type, see below, Latest by default']}> - | LATEST | POPULAR | FROM THE STORE | FOR YOU | - | ------ | ------- | -------------- | ------- | - | Latest | Popular | From the Store | For You | +<Route namespace="hbr" data={{"path":"/topic/:topic?/:type?","categories":["new-media"],"example":"/hbr/topic/leadership","parameters":{"topic":"Topic, can be found in URL, Leadership by default","type":"Type, see below, Latest by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hbr.org/topic/:topic?","hbr.org/"]},"name":"Topic","maintainers":["nczitzk"],"description":"| LATEST | POPULAR | FROM THE STORE | FOR YOU |\n | ------ | ------- | -------------- | ------- |\n | Latest | Popular | From the Store | For You |\n\n :::tip\n Click here to view [All Topics](https://hbr.org/topics)\n :::","location":"topic.ts"}} /> - :::tip - Click here to view [All Topics](https://hbr.org/topics) - ::: -</Route> +| LATEST | POPULAR | FROM THE STORE | FOR YOU | +| ------ | ------- | -------------- | ------- | +| Latest | Popular | From the Store | For You | + +:::tip +Click here to view [All Topics](https://hbr.org/topics) +::: ## Harvard Health Publishing {#harvard-health-publishing} ### Health Blog {#harvard-health-publishing-health-blog} -<Route author="nczitzk" example="/harvard/health/blog" path="/harvard/health/blog" /> +<Route namespace="harvard" data={{"path":"/health/blog","categories":["new-media"],"example":"/harvard/health/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.health.harvard.edu/blog"]},"name":"Health Blog","maintainers":["nczitzk"],"url":"www.health.harvard.edu/blog","location":"health/blog.ts"}} /> ## HKEPC {#hkepc} ### HKEPC 电脑领域 {#hkepc-hkepc-dian-nao-ling-yu} -<Route author="TonyRL" example="/hkepc/news" path="/hkepc/:category?" paramsDesc={['分类,见下表,默认为最新消息']} anticrawler="1"> - | 专题报导 | 新闻中心 | 新品快递 | 超频领域 | 流动数码 | 生活娱乐 | 会员消息 | 脑场新闻 | 业界资讯 | 最新消息 | - | ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- | - | coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest | -</Route> +<Route namespace="hkepc" data={{"path":"/:category?","categories":["new-media"],"example":"/hkepc/news","parameters":{"category":"分类,见下表,默认为最新消息"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hkepc.com/"],"target":""},"name":"HKEPC 电脑领域","maintainers":["TonyRL"],"url":"hkepc.com/","description":"| 专题报导 | 新闻中心 | 新品快递 | 超频领域 | 流动数码 | 生活娱乐 | 会员消息 | 脑场新闻 | 业界资讯 | 最新消息 |\n | ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- |\n | coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest |","location":"index.ts"}} /> -## HKJunkCall 資訊中心 {#hkjunkcall-zi-xun-zhong-xin} - -### 近期資訊 {#hkjunkcall-zi-xun-zhong-xin-jin-qi-zi-xun} - -<Route author="nczitzk" example="/hkjunkcall" path="/hkjunkcall" anticrawler="1" /> - -## iDaily {#idaily} - -### 每日环球视野 {#idaily-mei-ri-huan-qiu-shi-ye} - -<Route author="zphw nczitzk" example="/idaily" path="/idaily/:language?" paramsDesc={['语言,见下表,默认为简体中文']} radar="1"> - | 简体中文 | 繁体中文 | - | -------- | -------- | - | zh-hans | zh-hant | -</Route> - -## iDownloadBlog {#idownloadblog} - -### blog {#idownloadblog-blog} - -<Route author="HenryQW" example="/iDownloadBlog" path="/iDownloadBlog/index"> - Provides a better reading experience (full text articles) over the official one. -</Route> +| 专题报导 | 新闻中心 | 新品快递 | 超频领域 | 流动数码 | 生活娱乐 | 会员消息 | 脑场新闻 | 业界资讯 | 最新消息 | +| ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- | +| coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest | ## Indians in Kuwait {#indians-in-kuwait} ### News {#indians-in-kuwait-news} -<Route author="TonyRL" example="/indiansinkuwait/latest" path="/indiansinkuwait/latest" radar="1" /> +<Route namespace="indiansinkuwait" data={{"path":"/latest","categories":["new-media"],"example":"/indiansinkuwait/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["indiansinkuwait.com/latest-news","indiansinkuwait.com/"]},"name":"News","maintainers":["TonyRL"],"url":"indiansinkuwait.com/latest-news","location":"latest.ts"}} /> ## InfoQ 中文 {#infoq-zhong-wen} -### 推荐 {#infoq-zhong-wen-tui-jian} - -<Route author="brilon" example="/infoq/recommend" path="/infoq/recommend" /> - ### 话题 {#infoq-zhong-wen-hua-ti} -<Route author="brilon" example="/infoq/topic/1" path="/infoq/topic/:id" paramsDesc={['话题id,可在 [InfoQ全部话题](https://www.infoq.cn/topics) 页面找到URL里的话题id']} /> +<Route namespace="infoq" data={{"path":"/topic/:id","categories":["new-media"],"example":"/infoq/topic/1","parameters":{"id":"话题id,可在 [InfoQ全部话题](https://www.infoq.cn/topics) 页面找到URL里的话题id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["infoq.cn/topic/:id"]},"name":"话题","maintainers":["brilon"],"location":"topic.ts"}} /> -## International Mathematical Union {#international-mathematical-union} +### 推荐 {#infoq-zhong-wen-tui-jian} -### Fields Medal {#international-mathematical-union-fields-medal} - -<Route author="nczitzk" example="/mathunion/fields-medal" path="/mathunion/fields-medal" /> - -## IT 之家 {#it-zhi-jia} - -### 分类资讯 {#it-zhi-jia-fen-lei-zi-xun} - -<Route author="luyuhuang" example="/ithome/it" path="/ithome/:caty" paramsDesc={['类别']} radar="1"> - | it | soft | win10 | win11 | iphone | ipad | android | digi | next | - | ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- | - | IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 | -</Route> - -### 热榜 {#it-zhi-jia-re-bang} - -<Route author="immmortal luyuhuang" example="/ithome/ranking/24h" path="/ithome/ranking/:type" paramsDesc={['类别']} radar="1"> - | 24h | 7days | monthly | - | ------------- | -------- | ------- | - | 24 小时阅读榜 | 7 天最热 | 月榜 | -</Route> - -### 专题 {#it-zhi-jia-zhuan-ti} - -<Route author="nczitzk" example="/ithome/zt/xijiayi" path="/ithome/zt/:id" paramsDesc={['专题 id']} radar="1"> - 所有专题请见[此处](https://www.ithome.com/zt) -</Route> - -### 标签 {#it-zhi-jia-biao-qian} - -<Route author="Fatpandac" example="/ithome/tag/win11" path="/ithome/tag/:name" paramsDesc={['标签名称,可从网址链接中获取']} radar="1" /> +<Route namespace="infoq" data={{"path":"/recommend","categories":["new-media"],"example":"/infoq/recommend","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["infoq.cn/"]},"name":"推荐","maintainers":["brilon"],"url":"infoq.cn/","location":"recommend.ts"}} /> ## iThome 台灣 {#ithome-tai-wan} ### Feeds {#ithome-tai-wan-feeds} -<Route author="miles170" example="/ithome/tw/feeds/news" path="/ithome/tw/feeds/:category" paramsDesc={['類別']} radar="1"> - | 新聞 | AI | Cloud | DevOps | 資安 | - | ---- | -------- | ----- | ------ | -------- | - | news | big-data | cloud | devops | security | -</Route> +<Route namespace="ithome" data={{"path":"/tw/feeds/:category","categories":["new-media"],"example":"/ithome/tw/feeds/news","parameters":{"category":"類別"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ithome.com.tw/:category","www.ithome.com.tw/:category/feeds"]},"name":"Feeds","maintainers":["miles170"],"description":"| 新聞 | AI | Cloud | DevOps | 資安 |\n | ---- | -------- | ----- | ------ | -------- |\n | news | big-data | cloud | devops | security |","location":"tw/feeds.ts"}} /> -## Kantar Worldpanel {#kantar-worldpanel} +| 新聞 | AI | Cloud | DevOps | 資安 | +| ---- | -------- | ----- | ------ | -------- | +| news | big-data | cloud | devops | security | -### News Centre {#kantar-worldpanel-news-centre} +### 标签 {#ithome-tai-wan-biao-qian} -<Route author="nczitzk" example="/kantarworldpanel/cn-en/news" path="/kantarworldpanel/:region/:category?" paramsDesc={['Region id, see below, Chinese Mainland English by default', 'Category, can be found in URL, News by default']} radar="1"> - | Region | id | - | ----------- | ----- | - | China Eng | cn-en | - | China 中文 | cn | - | Indonesia | id | - | Korea | kr | - | Malaysia | my | - | Philippines | ph | - | Taiwan | tw | - | Thailand | th | - | Vietnam | vn | +<Route namespace="ithome" data={{"path":"/tag/:name","categories":["new-media"],"example":"/ithome/tag/win11","parameters":{"name":"标签名称,可从网址链接中获取"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ithome.com/tag/:name"]},"name":"标签","maintainers":["Fatpandac"],"location":"tag.ts"}} /> - <details> - <summary>More categories</summary> +### 分类资讯 {#ithome-tai-wan-fen-lei-zi-xun} - #### China Eng +<Route namespace="ithome" data={{"path":"/:caty","categories":["new-media"],"example":"/ithome/it","parameters":{"caty":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类资讯","maintainers":["luyuhuang"],"description":"| it | soft | win10 | win11 | iphone | ipad | android | digi | next |\n | ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- |\n | IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 |","location":"index.ts"}} /> - | News | Retail Snapshot | Publications | In the media | - | ---- | --------------- | -------------------- | ------------ | - | news | publications | publications/Reports | In-the-media | +| it | soft | win10 | win11 | iphone | ipad | android | digi | next | +| ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- | +| IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 | - #### China 中文 +### 热榜 {#ithome-tai-wan-re-bang} - | 新闻发布 | 零售市场快报 | 市场报告 | 媒体报道 | - | -------- | ------------ | --------------------------- | -------------- | - | news | publications | publications/China-Insights | press-releases | +<Route namespace="ithome" data={{"path":"/ranking/:type","categories":["new-media"],"example":"/ithome/ranking/24h","parameters":{"type":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热榜","maintainers":["immmortal","luyuhuang"],"description":"| 24h | 7days | monthly |\n | ------------- | -------- | ------- |\n | 24 小时阅读榜 | 7 天最热 | 月榜 |","location":"ranking.ts"}} /> - #### Indonesia +| 24h | 7days | monthly | +| ------------- | -------- | ------- | +| 24 小时阅读榜 | 7 天最热 | 月榜 | - | 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 | +### 专题 {#ithome-tai-wan-zhuan-ti} - #### Korea +<Route namespace="ithome" data={{"path":"/zt/:id","categories":["new-media"],"example":"/ithome/zt/xijiayi","parameters":{"id":"专题 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ithome.com/zt/:id"]},"name":"专题","maintainers":["nczitzk"],"description":"所有专题请见[此处](https://www.ithome.com/zt)","location":"zt.ts"}} /> - | 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 | - </details> -</Route> +所有专题请见[此处](https://www.ithome.com/zt) ## KBS {#kbs} ### News {#kbs-news} -<Route author="nczitzk" example="/kbs/news" path="/kbs/news/:category?/:language?" paramsDesc={['Category, can be found in Url as `id`, all by default', 'Language, see below, e as English by default']}> - | 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | - | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | - | k | a | c | e | f | g | i | j | r | s | v | -</Route> +<Route namespace="kbs" data={{"path":"/news/:category?/:language?","categories":["new-media"],"example":"/kbs/news","parameters":{"category":"Category, can be found in Url as `id`, all by default","language":"Language, see below, e as English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["world.kbs.co.kr/"],"target":"/news"},"name":"News","maintainers":["nczitzk"],"url":"world.kbs.co.kr/","description":"| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt |\n | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- |\n | k | a | c | e | f | g | i | j | r | s | v |","location":"news.ts"}} /> + +| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | +| ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | +| k | a | c | e | f | g | i | j | r | s | v | ### Today {#kbs-today} -<Route author="nczitzk" example="/kbs/today" path="/kbs/today/:language?" paramsDesc={['Language, see below, e as English by default']}> - | 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | - | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | - | k | a | c | e | f | g | i | j | r | s | v | -</Route> +<Route namespace="kbs" data={{"path":"/today/:language?","categories":["new-media"],"example":"/kbs/today","parameters":{"language":"Language, see below, e as English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["world.kbs.co.kr/"],"target":"/today"},"name":"Today","maintainers":["nczitzk"],"url":"world.kbs.co.kr/","description":"| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt |\n | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- |\n | k | a | c | e | f | g | i | j | r | s | v |","location":"today.ts"}} /> -## Kotaku {#kotaku} - -### Story {#kotaku-story} - -<Route author="CYTMWIA" example="/kotaku/story/news" path="/kotaku/story/:type" paramsDesc={['Story类型']}> - 可在 url 中找到,例如`https://kotaku.com/c/news`和`https://kotaku.com/c/kotaku-east`中的`news`和`kotaku-east` - - 注意,无论是`news`还是`kotaku-east`之前都有`/c/` - - 所以,如果您把`https://kotaku.com/latest`中的`latest`填入,该路由并不会正常工作 -</Route> +| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | +| ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | +| k | a | c | e | f | g | i | j | r | s | v | ## Kuwait Local {#kuwait-local} -### Latest News {#kuwait-local-latest-news} - -<Route author="TonyRL" example="/kuwaitlocal" path="/kuwaitlocal" radar="1" /> - ### Categorised News {#kuwait-local-categorised-news} -<Route author="TonyRL" example="/kuwaitlocal/article" path="/kuwaitlocal/:category?" paramsDesc={['Category name, can be found in URL, `latest` by default']} radar="1" /> - -## Letterboxd {#letterboxd} - -### User diary {#letterboxd-user-diary} - -<Route author="loganrockmore" example="/letterboxd/user/diary/demiadejuyigbe" path="/letterboxd/user/diary/:username" paramsDesc={['username']} /> - -### Following diary {#letterboxd-following-diary} - -<Route author="loganrockmore" example="/letterboxd/user/followingdiary/demiadejuyigbe" path="/letterboxd/user/followingdiary/:username" paramsDesc={['username']} /> +<Route namespace="kuwaitlocal" data={{"path":"/:category?","categories":["new-media"],"example":"/kuwaitlocal/article","parameters":{"category":"Category name, can be found in URL, `latest` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kuwaitlocal.com/news/categories/:category"],"target":"/:category"},"name":"Categorised News","maintainers":["TonyRL"],"url":"kuwaitlocal.com/news/latest","location":"index.ts"}} /> ## LINE {#line} -### TODAY {#line-today} - -<Route author="nczitzk" example="/line/today" path="/line/today/:edition?/:tab?" paramsDesc={['Edition, see below, Taiwan by default', 'Tag, can be found in URL, `top` by default']}> - Edition - - | Taiwan | Thailand | Hong Kong | - | ------ | -------- | --------- | - | tw | th | hk | -</Route> - ### TODAY - Channel {#line-today-channel} -<Route author="TonyRL" example="/line/today/th/publisher/101048" path="/line/today/:edition/publisher/:id" paramsDesc={['Edition, see table above', 'Channel ID, can be found in URL']} radar="1" /> +<Route namespace="line" data={{"path":"/today/:edition/publisher/:id","categories":["new-media"],"example":"/line/today/th/publisher/101048","parameters":{"edition":"Edition, see table above","id":"Channel ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["today.line.me/:edition/v2/publisher/:id"]},"name":"TODAY - Channel","maintainers":["TonyRL"],"location":"publisher.ts"}} /> + +### TODAY {#line-today} + +<Route namespace="line" data={{"path":"/today/:edition?/:tab?","categories":["new-media"],"example":"/line/today","parameters":{"edition":"Edition, see below, Taiwan by default","tab":"Tag, can be found in URL, `top` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["today.line.me/"]},"name":"TODAY","maintainers":["nczitzk"],"url":"today.line.me/","description":"Edition\n\n | Taiwan | Thailand | Hong Kong |\n | ------ | -------- | --------- |\n | tw | th | hk |","location":"today.ts"}} /> + +Edition + +| Taiwan | Thailand | Hong Kong | +| ------ | -------- | --------- | +| tw | th | hk | ## Live Universal Awareness Map {#live-universal-awareness-map} ### 实时消息 {#live-universal-awareness-map-shi-shi-xiao-xi} -<Route author="CoderSherlock" example="/liveuamap" path="/liveuamap/:region?" paramsDesc={['region 热点地区,默认为`ukraine`,其他选项见liveuamap.com的三级域名']} anticrawler="1" /> +<Route namespace="liveuamap" data={{"path":"/:region?","categories":["new-media"],"example":"/liveuamap","parameters":{"region":"region 热点地区,默认为`ukraine`,其他选项见liveuamap.com的三级域名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["liveuamap.com/:region*"],"target":"/:region"},"name":"实时消息","maintainers":["CoderSherlock"],"location":"index.ts"}} /> ## LVV2 {#lvv2} -### 频道 {#lvv2-pin-dao} - -<Route author="Fatpandac" example="/lvv2/news/sort-score" path="/lvv2/news/:channel/:sort?" paramsDesc={['频道,见下表', '排序方式,仅得分和24小时榜可选填该参数,见下表']} anticrawler="1"> - | 热门 | 最新 | 得分 | 24 小时榜 | - | :------: | :------: | :--------: | :-----------: | - | sort-hot | sort-new | sort-score | sort-realtime | - - | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | - | :------: | :------: | :----: | :------: | :------: | - | | t-hour | t-day | t-week | t-month | -</Route> - ### 24 小时点击排行 Top 10 {#lvv2-24-xiao-shi-dian-ji-pai-hang-top-10} -<Route author="Fatpandac" example="/lvv2/top/sort-score" path="/lvv2/top/:channel/:sort?" paramsDesc={['频道,见下表', '排序方式,仅得分和24小时榜可选填该参数,见下表']} anticrawler="1"> - | 热门 | 最新 | 得分 | 24 小时榜 | - | :------: | :------: | :--------: | :-----------: | - | sort-hot | sort-new | sort-score | sort-realtime | +<Route namespace="lvv2" data={{"path":"/top/:channel/:sort?","categories":["new-media"],"example":"/lvv2/top/sort-score","parameters":{"channel":"频道,见下表","sort":"排序方式,仅得分和24小时榜可选填该参数,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"24 小时点击排行 Top 10","maintainers":["Fatpandac"],"description":"| 热门 | 最新 | 得分 | 24 小时榜 |\n | :------: | :------: | :--------: | :-----------: |\n | sort-hot | sort-new | sort-score | sort-realtime |\n\n | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 |\n | :------: | :------: | :----: | :------: | :------: |\n | | t-hour | t-day | t-week | t-month |","location":"top.ts"}} /> - | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | - | :------: | :------: | :----: | :------: | :------: | - | | t-hour | t-day | t-week | t-month | -</Route> +| 热门 | 最新 | 得分 | 24 小时榜 | +| :------: | :------: | :--------: | :-----------: | +| sort-hot | sort-new | sort-score | sort-realtime | + +| 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | +| :------: | :------: | :----: | :------: | :------: | +| | t-hour | t-day | t-week | t-month | + +### 频道 {#lvv2-pin-dao} + +<Route namespace="lvv2" data={{"path":"/news/:channel/:sort?","categories":["new-media"],"example":"/lvv2/news/sort-score","parameters":{"channel":"频道,见下表","sort":"排序方式,仅得分和24小时榜可选填该参数,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道","maintainers":["Fatpandac"],"description":"| 热门 | 最新 | 得分 | 24 小时榜 |\n | :------: | :------: | :--------: | :-----------: |\n | sort-hot | sort-new | sort-score | sort-realtime |\n\n | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 |\n | :------: | :------: | :----: | :------: | :------: |\n | | t-hour | t-day | t-week | t-month |","location":"news.ts"}} /> + +| 热门 | 最新 | 得分 | 24 小时榜 | +| :------: | :------: | :--------: | :-----------: | +| sort-hot | sort-new | sort-score | sort-realtime | + +| 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | +| :------: | :------: | :----: | :------: | :------: | +| | t-hour | t-day | t-week | t-month | ## Macfilos {#macfilos} ### Blog {#macfilos-blog} -<Route author="nczitzk" example="/macfilos/blog" path="/macfilos/blog" /> - -## Matters {#matters} - -### Latest, heat, essence {#matters-latest-heat-essence} - -<Route author="xyqfer Cerebrater xosdy" example="/matters/latest/heat" path="/matters/latest/:type?" paramsDesc={['Defaults to latest, see table below']} radar="1"> - | 最新 | 热门 | 精华 | - | ------ | ---- | ------- | - | latest | heat | essence | -</Route> - -### Tags {#matters-tags} - -<Route author="Cerebrater" example="/matters/tags/VGFnOjk3Mg" path="/matters/tags/:tid" paramsDesc={['Tag id, can be found in the url of the tag page']} radar="1" /> - -### Author {#matters-author} - -<Route author="Cerebrater xosdy" example="/matters/author/az" path="/matters/author/:uid" paramsDesc={['Author id, can be found at author\'s homepage url']} radar="1" notOperational="1" /> - -## Metacritic {#metacritic} - -### Games {#metacritic-games} - -<Route author="HenryQW nczitzk" example="/metacritic/game" path="/metacritic/game/:sort?/:filter?" paramsDesc={['Sort, see below, `new` for Newest Releases by default', 'Filter']} radar="1"> - | 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) - ::: -</Route> - -### Movies {#metacritic-movies} - -<Route author="nczitzk" example="/metacritic/movie" path="/metacritic/movie/:sort?/:filter?" paramsDesc={['Sort, see below, `new` for Newest Releases by default', 'Filter']} radar="1"> - | 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) - ::: -</Route> - -### TV Shows {#metacritic-tv-shows} - -<Route author="nczitzk" example="/metacritic/tv" path="/metacritic/tv/:sort?/:filter?" paramsDesc={['Sort, see below, `new` for Newest Releases by default', 'Filter']} radar="1"> - | 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) - ::: -</Route> +<Route namespace="macfilos" data={{"path":"/blog","categories":["new-media"],"example":"/macfilos/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["macfilos.com/blog","macfilos.com/"]},"name":"Blog","maintainers":["nczitzk"],"url":"macfilos.com/blog","location":"blog.ts"}} /> ## Mirror {#mirror} ### User {#mirror-user} -<Route author="fifteen42 rde9 nczitzk" example="/mirror/tingfei.eth" path="/mirror/:id" paramsDesc={['user id']} /> +<Route namespace="mirror" data={{"path":"/:id","categories":["new-media"],"example":"/mirror/tingfei.eth","parameters":{"id":"user id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User","maintainers":["fifteen42","rde9","nczitzk"],"location":"index.ts"}} /> ## MyGoPen {#mygopen} ### 分類 {#mygopen-fen-lei} -<Route author="nczitzk" example="/mygopen" path="/mygopen/:label?" paramsDesc={['分類,见下表,默认为首页']}> - | 謠言 | 詐騙 | 真實資訊 | 教學 | - | ---- | ---- | -------- | ---- | -</Route> +<Route namespace="mygopen" data={{"path":"/:label?","categories":["new-media"],"example":"/mygopen","parameters":{"label":"分類,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mygopen.com/search/label/:label","mygopen.com/"]},"name":"分類","maintainers":["nczitzk"],"description":"| 謠言 | 詐騙 | 真實資訊 | 教學 |\n | ---- | ---- | -------- | ---- |","location":"index.ts"}} /> -## National Association of Colleges and Employers {#national-association-of-colleges-and-employers} - -### Blog {#national-association-of-colleges-and-employers-blog} - -<Route author="nczitzk" example="/nace/blog" path="/nace/blog/:sort?" paramsDesc={['Sort, see below, Most Recent by default']}> - | Most Recent | Top Rated | Most Read | - | ----------- | --------- | ------------- | - | | top-blogs | mostreadblogs | -</Route> +| 謠言 | 詐騙 | 真實資訊 | 教學 | +| ---- | ---- | -------- | ---- | ## Nautilus {#nautilus} ### Topics {#nautilus-topics} -<Route author="emdoe" example="/nautil/topic/arts" path="/nautil/topic/:tid" paramsDesc={['topic']}> - This route provides a flexible plan with full text content to subscribe specific topic(s) on the Nautilus. Please visit [nautil.us](https://nautil.us) and click `Topics` to acquire whole topic list. -</Route> +<Route namespace="nautil" data={{"path":"/topic/:tid","categories":["new-media"],"example":"/nautil/topic/arts","parameters":{"tid":"topic"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nautil.us/topics/:tid"]},"name":"Topics","maintainers":["emdoe"],"description":"This route provides a flexible plan with full text content to subscribe specific topic(s) on the Nautilus. Please visit [nautil.us](https://nautil.us) and click `Topics` to acquire whole topic list.","location":"topics.ts"}} /> -## Netflix {#netflix} - -### Newsroom {#netflix-newsroom} - -<Route author="nczitzk" example="/netflix/newsroom" path="/netflix/newsroom/:category?/:region?" paramsDesc={['分类,见下表,默认为 0 即 全部', '地区,可在地区页 URL 中找到,默认为 en 即 英语地区']} anticrawler="1"> - 分类 - - | 全部报道 | 业务 | 创新 | 娱乐 | 巴西制作 | 社会影响 | - | -------- | -------- | ------------- | ---------- | -------- | -------- | - | all | business | entertainment | innovation | brazil | impact | -</Route> +This route provides a flexible plan with full text content to subscribe specific topic(s) on the Nautilus. Please visit [nautil.us](https://nautil.us) and click `Topics` to acquire whole topic list. ## NGOCN {#ngocn} ### 首页 {#ngocn-shou-ye} -<Route author="nczitzk" example="/ngocn2" path="/ngocn2/:category?" paramsDesc={['分类,见下表,默认为所有文章']} radar="1"> - | 所有文章 | 早报 | 热点 | - | -------- | ----------- | -------- | - | article | daily-brief | trending | -</Route> +<Route namespace="ngocn2" data={{"path":"/:category?","categories":["new-media"],"example":"/ngocn2","parameters":{"category":"分类,见下表,默认为所有文章"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ngocn2.org/"]},"name":"首页","maintainers":["nczitzk"],"url":"ngocn2.org/","description":"| 所有文章 | 早报 | 热点 |\n | -------- | ----------- | -------- |\n | article | daily-brief | trending |","location":"index.ts"}} /> + +| 所有文章 | 早报 | 热点 | +| -------- | ----------- | -------- | +| article | daily-brief | trending | ## NL Times {#nl-times} ### News {#nl-times-news} -<Route author="Hivol" example="/nltimes/news/top-stories" path="/nltimes/news/:category?" paramsDesc={['category']}> - | Top Stories (default) | Health | Crime | Politics | Business | Tech | Culture | Sports | Weird | 1-1-2 | - | --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- | - | top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 | -</Route> +<Route namespace="nltimes" data={{"path":"/news/:category?","categories":["new-media"],"example":"/nltimes/news/top-stories","parameters":{"category":"category"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nltimes.nl/categories/:category"],"target":"/news/:category"},"name":"News","maintainers":["Hivol"],"description":"| Top Stories (default) | Health | Crime | Politics | Business | Tech | Culture | Sports | Weird | 1-1-2 |\n | --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- |\n | top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 |","location":"news.ts"}} /> -## Oak Ridge National Laboratory {#oak-ridge-national-laboratory} - -### News {#oak-ridge-national-laboratory-news} - -<Route author="nczitzk" example="/ornl/news" path="/ornl/news" /> +| Top Stories (default) | Health | Crime | Politics | Business | Tech | Culture | Sports | Weird | 1-1-2 | +| --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- | +| top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 | ## Odaily 星球日报 {#odaily-xing-qiu-ri-bao} +### 活动 {#odaily-xing-qiu-ri-bao-huo-dong} + +<Route namespace="odaily" data={{"path":"/activity","categories":["new-media"],"example":"/odaily/activity","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["0daily.com/activityPage","0daily.com/"]},"name":"活动","maintainers":["nczitzk"],"url":"0daily.com/activityPage","location":"activity.ts"}} /> + ### 快讯 {#odaily-xing-qiu-ri-bao-kuai-xun} -<Route author="ncziztk" example="/odaily/newsflash" path="/odaily/newsflash" /> +<Route namespace="odaily" data={{"path":"/newsflash","categories":["new-media"],"example":"/odaily/newsflash","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["0daily.com/newsflash","0daily.com/"]},"name":"快讯","maintainers":["nczitzk"],"url":"0daily.com/newsflash","location":"newsflash.ts"}} /> ### 搜索快讯 {#odaily-xing-qiu-ri-bao-sou-suo-kuai-xun} -<Route author="snowraincloud" example="/odaily/search/news/RSS3" path="/odaily/search/news/:keyword" paramsDesc={['搜索关键字']} /> +<Route namespace="odaily" data={{"path":"/search/news/:keyword","categories":["new-media"],"example":"/odaily/search/news/RSS3","parameters":{"keyword":"搜索关键字"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["0daily.com/search/:keyword"]},"name":"搜索快讯","maintainers":["snowraincloud"],"location":"search-news.ts"}} /> ### 文章 {#odaily-xing-qiu-ri-bao-wen-zhang} -<Route author="ncziztk" example="/odaily" path="/odaily/:id?" paramsDesc={['id,见下表,默认为最新']}> - | 最新 | 新品 | DeFi | NFT | 存储 | 波卡 | 行情 | 活动 | - | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | - | 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 | -</Route> +<Route namespace="odaily" data={{"path":"/:id?","categories":["new-media"],"example":"/odaily","parameters":{"id":"id,见下表,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["0daily.com/"]},"name":"文章","maintainers":["nczitzk"],"url":"0daily.com/","description":"| 最新 | 新品 | DeFi | NFT | 存储 | 波卡 | 行情 | 活动 |\n | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- |\n | 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 |","location":"post.ts"}} /> + +| 最新 | 新品 | DeFi | NFT | 存储 | 波卡 | 行情 | 活动 | +| ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | +| 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 | ### 用户文章 {#odaily-xing-qiu-ri-bao-yong-hu-wen-zhang} -<Route author="ncziztk" example="/odaily/user/2147486902" path="/odaily/user/:id" paramsDesc={['用户 id,可在用户页地址栏中找到']} /> - -### 活动 {#odaily-xing-qiu-ri-bao-huo-dong} - -<Route author="ncziztk" example="/odaily/activity" path="/odaily/activity" /> +<Route namespace="odaily" data={{"path":"/user/:id","categories":["new-media"],"example":"/odaily/user/2147486902","parameters":{"id":"用户 id,可在用户页地址栏中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["0daily.com/user/:id","0daily.com/"]},"name":"用户文章","maintainers":["nczitzk"],"location":"user.ts"}} /> ## Onet {#onet} ### News {#onet-news} -<Route author="Vegann" example="/onet/news" path="/onet/news" radar="1"> - This route provides a better reading experience (full text articles) over the official one for `https://wiadomosci.onet.pl`. -</Route> +<Route namespace="onet" data={{"path":"/news","categories":["new-media"],"example":"/onet/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wiadomosci.onet.pl/"]},"name":"News","maintainers":["Vegann"],"url":"wiadomosci.onet.pl/","description":"This route provides a better reading experience (full text articles) over the official one for `https://wiadomosci.onet.pl`.","location":"news.ts"}} /> + +This route provides a better reading experience (full text articles) over the official one for `https://wiadomosci.onet.pl`. ## OpenAI {#openai} ### Blog {#openai-blog} -<Route author="ncziztk StevenRCE0" example="/openai/blog" path="/openai/blog/:tag?" paramsDesc={['Tag, see below, All by default']}> - | All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research | - | --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | - | | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research | -</Route> +<Route namespace="openai" data={{"path":"/blog/:tag?","categories":["new-media"],"example":"/openai/blog","parameters":{"tag":"Tag, see below, All by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Blog","maintainers":["StevenRCE0","nczitzk"],"description":"| All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research |\n | --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- |\n | | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research |","location":"blog.ts"}} /> + +| All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research | +| --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | +| | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research | ### ChatGPT - Release Notes {#openai-chatgpt-release-notes} -<Route author="ETiV" example="/openai/chatgpt/release-notes" path="/openai/chatgpt/release-notes" /> +<Route namespace="openai" data={{"path":"/chatgpt/release-notes","categories":["new-media"],"example":"/openai/chatgpt/release-notes","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"ChatGPT - Release Notes","maintainers":[],"location":"chatgpt.ts"}} /> ### Research {#openai-research} -<Route author="yuguorui" example="/openai/research" path="/openai/research" /> +<Route namespace="openai" data={{"path":"/research","categories":["new-media"],"example":"/openai/research","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Research","maintainers":["yuguorui"],"location":"research.ts"}} /> ## PANews {#panews} -### 深度 {#panews-shen-du} +### 快讯 {#panews-kuai-xun} -<Route author="nczitzk" example="/panewslab" path="/panewslab/:category?" paramsDesc={['分类,见下表,默认为精选']}> - | 精选 | 链游 | 元宇宙 | NFT | DeFi | 监管 | 央行数字货币 | 波卡 | Layer 2 | DAO | 融资 | 活动 | - | ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- | -</Route> +<Route namespace="panewslab" data={{"path":["/news","/newsflash"],"categories":["new-media"],"example":"/panewslab/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"快讯","maintainers":["nczitzk"],"url":"panewslab.com/","location":"news.ts"}} /> ### 快讯 {#panews-kuai-xun} -<Route author="nczitzk" example="/panewslab/news" path="/panewslab/news" /> +<Route namespace="panewslab" data={{"path":["/news","/newsflash"],"categories":["new-media"],"example":"/panewslab/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"快讯","maintainers":["nczitzk"],"url":"panewslab.com/","location":"news.ts"}} /> + +### 深度 {#panews-shen-du} + +<Route namespace="panewslab" data={{"path":"/:category?","categories":["new-media"],"example":"/panewslab","parameters":{"category":"分类,见下表,默认为精选"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"深度","maintainers":["nczitzk"],"url":"panewslab.com/","description":"| 精选 | 链游 | 元宇宙 | NFT | DeFi | 监管 | 央行数字货币 | 波卡 | Layer 2 | DAO | 融资 | 活动 |\n | ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- |","location":"index.ts"}} /> + +| 精选 | 链游 | 元宇宙 | NFT | DeFi | 监管 | 央行数字货币 | 波卡 | Layer 2 | DAO | 融资 | 活动 | +| ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- | ### 专栏 {#panews-zhuan-lan} -<Route author="nczitzk" example="/panewslab/author/166" path="/panewslab/author/:id" paramsDesc={['专栏 id,可在地址栏 URL 中找到']} /> +<Route namespace="panewslab" data={{"path":["/author/:id","/column/:id"],"categories":["new-media"],"example":"/panewslab/author/166","parameters":{"id":"专栏 id,可在地址栏 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"专栏","maintainers":["nczitzk"],"url":"panewslab.com/","location":"author.ts"}} /> + +### 专栏 {#panews-zhuan-lan} + +<Route namespace="panewslab" data={{"path":["/author/:id","/column/:id"],"categories":["new-media"],"example":"/panewslab/author/166","parameters":{"id":"专栏 id,可在地址栏 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"专栏","maintainers":["nczitzk"],"url":"panewslab.com/","location":"author.ts"}} /> ### 专题 {#panews-zhuan-ti} -<Route author="nczitzk" example="/panewslab/topic/1629365774078402" path="/panewslab/topic/:id" paramsDesc={['专题 id,可在地址栏 URL 中找到']} /> +<Route namespace="panewslab" data={{"path":"/topic/:id","categories":["new-media"],"example":"/panewslab/topic/1629365774078402","parameters":{"id":"专题 id,可在地址栏 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["panewslab.com/"]},"name":"专题","maintainers":["nczitzk"],"url":"panewslab.com/","location":"topic.ts"}} /> ## PeoPo 公民新聞 {#peopo-gong-min-xin-wen} ### 新聞分類 {#peopo-gong-min-xin-wen-xin-wen-fen-lei} -<Route author="TonyRL" example="/peopo/topic/159" path="/peopo/topic/:topicId?" paramsDesc={['分類 ID,見下表,默認為社會關懷']} radar="1"> - | 分類 | ID | - | -------- | --- | - | 社會關懷 | 159 | - | 生態環保 | 113 | - | 文化古蹟 | 143 | - | 社區改造 | 160 | - | 教育學習 | 161 | - | 農業 | 163 | - | 生活休閒 | 162 | - | 媒體觀察 | 164 | - | 運動科技 | 165 | - | 政治經濟 | 166 | - | 北台灣 | 223 | - | 中台灣 | 224 | - | 南台灣 | 225 | - | 東台灣 | 226 | - | 校園中心 | 167 | - | 原住民族 | 227 | - | 天然災害 | 168 | -</Route> +<Route namespace="peopo" data={{"path":"/topic/:topicId?","categories":["new-media"],"example":"/peopo/topic/159","parameters":{"topicId":"分類 ID,見下表,默認為社會關懷"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["peopo.org/topic/:topicId"],"target":"/topic/:topicId"},"name":"新聞分類","maintainers":[],"description":"| 分類 | ID |\n | -------- | --- |\n | 社會關懷 | 159 |\n | 生態環保 | 113 |\n | 文化古蹟 | 143 |\n | 社區改造 | 160 |\n | 教育學習 | 161 |\n | 農業 | 163 |\n | 生活休閒 | 162 |\n | 媒體觀察 | 164 |\n | 運動科技 | 165 |\n | 政治經濟 | 166 |\n | 北台灣 | 223 |\n | 中台灣 | 224 |\n | 南台灣 | 225 |\n | 東台灣 | 226 |\n | 校園中心 | 167 |\n | 原住民族 | 227 |\n | 天然災害 | 168 |","location":"topic.ts"}} /> + +| 分類 | ID | +| -------- | --- | +| 社會關懷 | 159 | +| 生態環保 | 113 | +| 文化古蹟 | 143 | +| 社區改造 | 160 | +| 教育學習 | 161 | +| 農業 | 163 | +| 生活休閒 | 162 | +| 媒體觀察 | 164 | +| 運動科技 | 165 | +| 政治經濟 | 166 | +| 北台灣 | 223 | +| 中台灣 | 224 | +| 南台灣 | 225 | +| 東台灣 | 226 | +| 校園中心 | 167 | +| 原住民族 | 227 | +| 天然災害 | 168 | ## Phoronix {#phoronix} ### News & Reviews {#phoronix-news-reviews} -<Route author="oppliate Rongronggg9" example="/phoronix/linux/KDE" path="/phoronix/:category?/:topic?" paramsDesc={['Category', 'Topic. You may find available parameters from their navigator links. E.g. to subscribe to `https://www.phoronix.com/reviews/Operating+Systems`, fill in the path `/phoronix/reviews/Operating+Systems`']} radar="1" /> - -## PMCAFF {#pmcaff} - -### 今日推荐 / 精选 {#pmcaff-jin-ri-tui-jian-jing-xuan} - -<Route author="Jeason0228" example="/pmcaff/list/2" path="/pmcaff/list/:typeid" paramsDesc={['分类 id,1=今天推荐,2=精选']} /> - -### 社区 {#pmcaff-she-qu} - -<Route author="WenryXu" example="/pmcaff/feed/1" path="/pmcaff/feed/:typeid" paramsDesc={['分类 id']} /> - -| 发现 | 待回答 | 最热 | 问答专场 | 投稿 | 深度 | 专栏 | -| ---- | ------ | ---- | -------- | ---- | ---- | ---- | -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | - -## Quanta Magazine {#quanta-magazine} - -### Archive {#quanta-magazine-archive} - -<Route author="emdoe" example="/quantamagazine/archive" path="/quantamagazine/archive"> - Compared to the official one, this feed: - - 1. supports LaTeX formulas, and - 2. displays all pictures in the article (except those print-hidden multimedia materials). -</Route> +<Route namespace="phoronix" data={{"path":"/:category?/:topic?","categories":["new-media"],"example":"/phoronix/linux/KDE","parameters":{"category":"Category","topic":"Topic. You may find available parameters from their navigator links. E.g. to subscribe to `https://www.phoronix.com/reviews/Operating+Systems`, fill in the path `/phoronix/reviews/Operating+Systems`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["phoronix.com/:category?/:topic?"]},"name":"News & Reviews","maintainers":["oppliate","Rongronggg9"],"location":"index.ts"}} /> ## QuestMobile {#questmobile} ### 行业研究报告 {#questmobile-hang-ye-yan-jiu-bao-gao} -<Route author="nczitzk" example="/questmobile/report" path="/questmobile/report/:industry?/:label?" paramsDesc={['行业,见下表,默认为 `-1`,即全部行业', '标签,见下表,默认为 `-1`,即全部标签']} radar="1"> - :::tip - 若订阅行业 [互联网行业](https://www.questmobile.com.cn/research/reports/1/-1),网址为 `https://www.questmobile.com.cn/research/reports/1/-1` - 参数 industry 为 `互联网行业` 或 `1`,此时路由为 [`/questmobile/report/互联网行业`](https://rsshub.app/questmobile/report/互联网行业) 或 [`/questmobile/report/1/-1`](https://rsshub.app/questmobile/report/1/-1)。 +<Route namespace="questmobile" data={{"path":"/report/:industry?/:label?","categories":["new-media"],"example":"/questmobile/report","parameters":{"industry":"行业,见下表,默认为 `-1`,即全部行业","label":"标签,见下表,默认为 `-1`,即全部标签"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"行业研究报告","maintainers":["nczitzk"],"description":":::tip\n 若订阅行业 [互联网行业](https://www.questmobile.com.cn/research/reports/1/-1),网址为 `https://www.questmobile.com.cn/research/reports/1/-1`\n 参数 industry 为 `互联网行业` 或 `1`,此时路由为 [`/questmobile/report/互联网行业`](https://rsshub.app/questmobile/report/互联网行业) 或 [`/questmobile/report/1/-1`](https://rsshub.app/questmobile/report/1/-1)。\n\n 若订阅标签 [榜单](https://www.questmobile.com.cn/research/reports/-1/11),网址为 `https://www.questmobile.com.cn/research/reports/-1/11`\n 参数 label 为 `榜单` 或 `11`,此时路由为 [`/questmobile/report/榜单`](https://rsshub.app/questmobile/report/榜单) 或 [`/questmobile/report/-1/11`](https://rsshub.app/questmobile/report/-1/11)。\n\n 若订阅行业和标签 [品牌领域 - 互联网经济](https://www.questmobile.com.cn/research/reports/2/1),网址为 `https://www.questmobile.com.cn/research/reports/2/1`\n 参数 industry 为 `品牌领域` 或 `2`,参数 label 为 `互联网经济` 或 `1`,此时路由为 [`/questmobile/report/品牌领域/互联网经济`](https://rsshub.app/questmobile/report/品牌领域/互联网经济) 或 [`/questmobile/report/2/1`](https://rsshub.app/questmobile/report/2/1),甚至 [`/questmobile/report/品牌领域/1`](https://rsshub.app/questmobile/report/品牌领域/1)。\n :::\n\n <details>\n <summary>全部行业和标签</summary>\n\n #### 行业\n\n | 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 |\n | ---------- | -------- | -------- | -------- | -------- |\n | 1 | 1001 | 1002 | 1003 | 1004 |\n\n | 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1005 | 1006 | 1007 | 1008 | 1009 |\n\n | 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1010 | 1011 | 1012 | 1013 | 1014 |\n\n | 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1015 | 1016 | 1017 | 1018 | 1020 |\n\n | 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1022 | 1023 | 1024 | 2 | 2001 |\n\n | 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 |\n | -------- | -------- | ------------ | -------- | ------------ |\n | 2002 | 2003 | 2004 | 2005 | 2006 |\n\n #### 标签\n\n | 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 |\n | ---------- | -------- | -------- | -------- | -------- |\n | 1 | 1001 | 1002 | 1004 | 1005 |\n\n | 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 |\n | -------- | ------ | ------ | ---------- | ------------ |\n | 1007 | 1009 | 1010 | 1011 | 1012 |\n\n | 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1013 | 1014 | 1015 | 1016 | 1017 |\n\n | 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 |\n | -------- | -------- | ------------------- | -------- | ----- |\n | 1018 | 1020 | 1622842051677753346 | 2 | 2002 |\n\n | Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 |\n | ------ | ------ | -------- | -------- | -------- |\n | 2003 | 2004 | 2005 | 2007 | 2008 |\n\n | 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 |\n | -------- | -------- | -------- | ------ | ------ |\n | 2009 | 2010 | 2012 | 2013 | 2014 |\n\n | 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 |\n | ------------ | ------ | ---------- | -------- | -------- |\n | 2018 | 2022 | 3 | 3001 | 3002 |\n\n | 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 |\n | -------- | -------- | ---------- | -------- | -------- |\n | 3003 | 3004 | 3005 | 3006 | 3008 |\n\n | 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 |\n | -------- | ---------- | ------------------- | -------- | -------------- |\n | 3009 | 3010 | 1630464311158738945 | 4 | 4001 |\n\n | 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 |\n | ------------ | -------- | ------------ | ------------ | -------- |\n | 4002 | 4003 | 4004 | 4007 | 5 |\n\n | 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 |\n | -------- | -------- | -------- | -------- | -------- |\n | 5001 | 5002 | 5003 | 5004 | 5007 |\n\n | 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 |\n | ------------------- | -------- | -------- | -------- | ---------- |\n | 1622841828310093825 | 6 | 6001 | 6002 | 6003 |\n\n | 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 |\n | -------- | -------- | -------- | -------- | ---------- |\n | 6004 | 6005 | 6007 | 7 | 7001 |\n\n | 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC |\n | -------- | ------ | ---- | ---------- | ------------------- |\n | 7002 | 7003 | 7004 | 7005 | 1645677998450511873 |\n\n | OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 |\n | ------------------- | ------------------- | -------- | -------- | ---------- |\n | 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 |\n\n | 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 |\n | ------------ | -------------- | ------------------- | ------------------- | -------- |\n | 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 |\n\n | 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 |\n | -------- | -------- | ------- | ---- | -------- |\n | 9001 | 9002 | 9003 | 10 | 10001 |\n </details>","location":"report.ts"}} /> - 若订阅标签 [榜单](https://www.questmobile.com.cn/research/reports/-1/11),网址为 `https://www.questmobile.com.cn/research/reports/-1/11` - 参数 label 为 `榜单` 或 `11`,此时路由为 [`/questmobile/report/榜单`](https://rsshub.app/questmobile/report/榜单) 或 [`/questmobile/report/-1/11`](https://rsshub.app/questmobile/report/-1/11)。 +:::tip +若订阅行业 [互联网行业](https://www.questmobile.com.cn/research/reports/1/-1),网址为 `https://www.questmobile.com.cn/research/reports/1/-1` +参数 industry 为 `互联网行业` 或 `1`,此时路由为 [`/questmobile/report/互联网行业`](https://rsshub.app/questmobile/report/互联网行业) 或 [`/questmobile/report/1/-1`](https://rsshub.app/questmobile/report/1/-1)。 - 若订阅行业和标签 [品牌领域 - 互联网经济](https://www.questmobile.com.cn/research/reports/2/1),网址为 `https://www.questmobile.com.cn/research/reports/2/1` - 参数 industry 为 `品牌领域` 或 `2`,参数 label 为 `互联网经济` 或 `1`,此时路由为 [`/questmobile/report/品牌领域/互联网经济`](https://rsshub.app/questmobile/report/品牌领域/互联网经济) 或 [`/questmobile/report/2/1`](https://rsshub.app/questmobile/report/2/1),甚至 [`/questmobile/report/品牌领域/1`](https://rsshub.app/questmobile/report/品牌领域/1)。 - ::: +若订阅标签 [榜单](https://www.questmobile.com.cn/research/reports/-1/11),网址为 `https://www.questmobile.com.cn/research/reports/-1/11` +参数 label 为 `榜单` 或 `11`,此时路由为 [`/questmobile/report/榜单`](https://rsshub.app/questmobile/report/榜单) 或 [`/questmobile/report/-1/11`](https://rsshub.app/questmobile/report/-1/11)。 - <details> - <summary>全部行业和标签</summary> +若订阅行业和标签 [品牌领域 - 互联网经济](https://www.questmobile.com.cn/research/reports/2/1),网址为 `https://www.questmobile.com.cn/research/reports/2/1` +参数 industry 为 `品牌领域` 或 `2`,参数 label 为 `互联网经济` 或 `1`,此时路由为 [`/questmobile/report/品牌领域/互联网经济`](https://rsshub.app/questmobile/report/品牌领域/互联网经济) 或 [`/questmobile/report/2/1`](https://rsshub.app/questmobile/report/2/1),甚至 [`/questmobile/report/品牌领域/1`](https://rsshub.app/questmobile/report/品牌领域/1)。 +::: - #### 行业 +<details> + <summary>全部行业和标签</summary> - | 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 | - | ---------- | -------- | -------- | -------- | -------- | - | 1 | 1001 | 1002 | 1003 | 1004 | + #### 行业 - | 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 | - | -------- | -------- | -------- | -------- | -------- | - | 1005 | 1006 | 1007 | 1008 | 1009 | + | 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 | + | ---------- | -------- | -------- | -------- | -------- | + | 1 | 1001 | 1002 | 1003 | 1004 | - | 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 | - | -------- | -------- | -------- | -------- | -------- | - | 1010 | 1011 | 1012 | 1013 | 1014 | + | 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 | + | -------- | -------- | -------- | -------- | -------- | + | 1005 | 1006 | 1007 | 1008 | 1009 | - | 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 | - | -------- | -------- | -------- | -------- | -------- | - | 1015 | 1016 | 1017 | 1018 | 1020 | + | 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 | + | -------- | -------- | -------- | -------- | -------- | + | 1010 | 1011 | 1012 | 1013 | 1014 | - | 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 | - | -------- | -------- | -------- | -------- | -------- | - | 1022 | 1023 | 1024 | 2 | 2001 | + | 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 | + | -------- | -------- | -------- | -------- | -------- | + | 1015 | 1016 | 1017 | 1018 | 1020 | - | 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 | - | -------- | -------- | ------------ | -------- | ------------ | - | 2002 | 2003 | 2004 | 2005 | 2006 | + | 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 | + | -------- | -------- | -------- | -------- | -------- | + | 1022 | 1023 | 1024 | 2 | 2001 | - #### 标签 + | 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 | + | -------- | -------- | ------------ | -------- | ------------ | + | 2002 | 2003 | 2004 | 2005 | 2006 | - | 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 | - | ---------- | -------- | -------- | -------- | -------- | - | 1 | 1001 | 1002 | 1004 | 1005 | + #### 标签 - | 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 | - | -------- | ------ | ------ | ---------- | ------------ | - | 1007 | 1009 | 1010 | 1011 | 1012 | + | 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 | + | ---------- | -------- | -------- | -------- | -------- | + | 1 | 1001 | 1002 | 1004 | 1005 | - | 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 | - | -------- | -------- | -------- | -------- | -------- | - | 1013 | 1014 | 1015 | 1016 | 1017 | + | 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 | + | -------- | ------ | ------ | ---------- | ------------ | + | 1007 | 1009 | 1010 | 1011 | 1012 | - | 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 | - | -------- | -------- | ------------------- | -------- | ----- | - | 1018 | 1020 | 1622842051677753346 | 2 | 2002 | + | 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 | + | -------- | -------- | -------- | -------- | -------- | + | 1013 | 1014 | 1015 | 1016 | 1017 | - | Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 | - | ------ | ------ | -------- | -------- | -------- | - | 2003 | 2004 | 2005 | 2007 | 2008 | + | 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 | + | -------- | -------- | ------------------- | -------- | ----- | + | 1018 | 1020 | 1622842051677753346 | 2 | 2002 | - | 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 | - | -------- | -------- | -------- | ------ | ------ | - | 2009 | 2010 | 2012 | 2013 | 2014 | + | Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 | + | ------ | ------ | -------- | -------- | -------- | + | 2003 | 2004 | 2005 | 2007 | 2008 | - | 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 | - | ------------ | ------ | ---------- | -------- | -------- | - | 2018 | 2022 | 3 | 3001 | 3002 | + | 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 | + | -------- | -------- | -------- | ------ | ------ | + | 2009 | 2010 | 2012 | 2013 | 2014 | - | 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 | - | -------- | -------- | ---------- | -------- | -------- | - | 3003 | 3004 | 3005 | 3006 | 3008 | + | 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 | + | ------------ | ------ | ---------- | -------- | -------- | + | 2018 | 2022 | 3 | 3001 | 3002 | - | 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 | - | -------- | ---------- | ------------------- | -------- | -------------- | - | 3009 | 3010 | 1630464311158738945 | 4 | 4001 | + | 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 | + | -------- | -------- | ---------- | -------- | -------- | + | 3003 | 3004 | 3005 | 3006 | 3008 | - | 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 | - | ------------ | -------- | ------------ | ------------ | -------- | - | 4002 | 4003 | 4004 | 4007 | 5 | + | 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 | + | -------- | ---------- | ------------------- | -------- | -------------- | + | 3009 | 3010 | 1630464311158738945 | 4 | 4001 | - | 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 | - | -------- | -------- | -------- | -------- | -------- | - | 5001 | 5002 | 5003 | 5004 | 5007 | + | 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 | + | ------------ | -------- | ------------ | ------------ | -------- | + | 4002 | 4003 | 4004 | 4007 | 5 | - | 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 | - | ------------------- | -------- | -------- | -------- | ---------- | - | 1622841828310093825 | 6 | 6001 | 6002 | 6003 | + | 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 | + | -------- | -------- | -------- | -------- | -------- | + | 5001 | 5002 | 5003 | 5004 | 5007 | - | 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 | - | -------- | -------- | -------- | -------- | ---------- | - | 6004 | 6005 | 6007 | 7 | 7001 | + | 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 | + | ------------------- | -------- | -------- | -------- | ---------- | + | 1622841828310093825 | 6 | 6001 | 6002 | 6003 | - | 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC | - | -------- | ------ | ---- | ---------- | ------------------- | - | 7002 | 7003 | 7004 | 7005 | 1645677998450511873 | + | 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 | + | -------- | -------- | -------- | -------- | ---------- | + | 6004 | 6005 | 6007 | 7 | 7001 | - | OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 | - | ------------------- | ------------------- | -------- | -------- | ---------- | - | 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 | + | 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC | + | -------- | ------ | ---- | ---------- | ------------------- | + | 7002 | 7003 | 7004 | 7005 | 1645677998450511873 | - | 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 | - | ------------ | -------------- | ------------------- | ------------------- | -------- | - | 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 | + | OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 | + | ------------------- | ------------------- | -------- | -------- | ---------- | + | 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 | - | 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 | - | -------- | -------- | ------- | ---- | -------- | - | 9001 | 9002 | 9003 | 10 | 10001 | - </details> -</Route> + | 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 | + | ------------ | -------------- | ------------------- | ------------------- | -------- | + | 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 | + + | 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 | + | -------- | -------- | ------- | ---- | -------- | + | 9001 | 9002 | 9003 | 10 | 10001 | +</details> ## Radio-Canada.ca {#radio-canada-ca} ### Latest News {#radio-canada-ca-latest-news} -<Route author="nczitzk" example="/radio-canada/latest" path="/radio-canada/latest/:language?" paramsDesc={['Language, see below, English by default']}> - | Français | English | Español | 简体中文 | 繁體中文 | العربية | ਪੰਜਾਬੀ | Tagalog | - | -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- | - | fr | en | es | zh-hans | zh-hant | ar | pa | tl | -</Route> +<Route namespace="radio-canada" data={{"path":"/latest/:language?","categories":["new-media"],"example":"/radio-canada/latest","parameters":{"language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ici.radio-canada.ca/rci/:lang","ici.radio-canada.ca/"]},"name":"Latest News","maintainers":["nczitzk"],"description":"| Français | English | Español | 简体中文 | 繁體中文 | العربية | ਪੰਜਾਬੀ | Tagalog |\n | -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- |\n | fr | en | es | zh-hans | zh-hant | ar | pa | tl |","location":"latest.ts"}} /> + +| Français | English | Español | 简体中文 | 繁體中文 | العربية | ਪੰਜਾਬੀ | Tagalog | +| -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- | +| fr | en | es | zh-hans | zh-hant | ar | pa | tl | ## Readhub {#readhub} ### 分类 {#readhub-fen-lei} -<Route author="WhiteWorld nczitzk Fatpandac" example="/readhub" path="/readhub/:category?" paramsDesc={['分类,见下表,默认为热门话题']} radar="1"> - | 热门话题 | 科技动态 | 医疗产业 | 财经快讯 | - | -------- | -------- | -------- | ------------------ | - | | news | medical | financial\_express | -</Route> +<Route namespace="readhub" data={{"path":"/:category?","categories":["new-media"],"example":"/readhub","parameters":{"category":"分类,见下表,默认为热门话题"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["WhiteWorld","nczitzk","Fatpandac"],"description":"| 热门话题 | 科技动态 | 医疗产业 | 财经快讯 |\n | -------- | -------- | -------- | ------------------ |\n | | news | medical | financial_express |","location":"index.ts"}} /> + +| 热门话题 | 科技动态 | 医疗产业 | 财经快讯 | +| -------- | -------- | -------- | ------------------ | +| | news | medical | financial\_express | ### 每日早报 {#readhub-mei-ri-zao-bao} -<Route author="nczitzk" example="/readhub/daily" path="/readhub/daily" radar="1" /> +<Route namespace="readhub" data={{"path":"/daily","categories":["new-media"],"example":"/readhub/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["readhub.cn/daily"]},"name":"每日早报","maintainers":["nczitzk"],"url":"readhub.cn/daily","location":"daily.ts"}} /> ## Sakamichi Series 坂道系列官网资讯 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun} -### Nogizaka46 News 乃木坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-nogizaka46-news-nai-mu-ban-46-xin-wen} +### Hinatazaka46 Blog 日向坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-hinatazaka46-blog-ri-xiang-ban-46-bo-ke} -<Route author="crispgm Fatpandac" example="/nogizaka46/news" path="/nogizaka46/news" /> +<Route namespace="hinatazaka46" data={{"path":"/blog/:id?/:page?","categories":["new-media"],"example":"/hinatazaka46/blog","parameters":{"id":"Member ID, see below, `all` by default","page":"Page, `0` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Hinatazaka46 Blog 日向坂 46 博客","maintainers":[],"description":"Member ID\n\n | Member ID | Name |\n | --------- | ------------ |\n | 2000 | 四期生リレー |\n | 36 | 渡辺 莉奈 |\n | 35 | 山下 葉留花 |\n | 34 | 宮地 すみれ |\n | 33 | 藤嶌 果歩 |\n | 32 | 平岡 海月 |\n | 31 | 平尾 帆夏 |\n | 30 | 竹内 希来里 |\n | 29 | 正源司 陽子 |\n | 28 | 清水 理央 |\n | 27 | 小西 夏菜実 |\n | 26 | 岸 帆夏 |\n | 25 | 石塚 瑶季 |\n | 24 | 山口 陽世 |\n | 23 | 森本 茉莉 |\n | 22 | 髙橋 未来虹 |\n | 21 | 上村 ひなの |\n | 18 | 松田 好花 |\n | 17 | 濱岸 ひより |\n | 16 | 丹生 明里 |\n | 15 | 富田 鈴花 |\n | 14 | 小坂 菜緒 |\n | 13 | 河田 陽菜 |\n | 12 | 金村 美玖 |\n | 11 | 東村 芽依 |\n | 10 | 高本 彩花 |\n | 9 | 高瀬 愛奈 |\n | 8 | 佐々木 美玲 |\n | 7 | 佐々木 久美 |\n | 6 | 齊藤 京子 |\n | 5 | 加藤 史帆 |\n | 4 | 影山 優佳 |\n | 2 | 潮 紗理菜 |","location":"blog.ts"}} /> -### Nogizaka46 Blog 乃木坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-nogizaka46-blog-nai-mu-ban-46-bo-ke} +Member ID -<Route author="Kasper4649 akashigakki" example="/nogizaka46/blog" path="/nogizaka46/blog/:id?" paramsDesc={['Member ID, see below, `all` by default']}> - Member ID - - | Member ID | Name | - | --------- | --------------------- | - | 55401 | 岡本 姫奈 | - | 55400 | 川﨑 桜 | - | 55397 | 池田 瑛紗 | - | 55396 | 五百城 茉央 | - | 55395 | 中西 アルノ | - | 55394 | 奥田 いろは | - | 55393 | 冨里 奈央 | - | 55392 | 小川 彩 | - | 55391 | 菅原 咲月 | - | 55390 | 一ノ瀬 美空 | - | 55389 | 井上 和 | - | 55387 | 弓木 奈於 | - | 55386 | 松尾 美佑 | - | 55385 | 林 瑠奈 | - | 55384 | 佐藤 璃果 | - | 55383 | 黒見 明香 | - | 48014 | 清宮 レイ | - | 48012 | 北川 悠理 | - | 48010 | 金川 紗耶 | - | 48019 | 矢久保 美緒 | - | 48018 | 早川 聖来 | - | 48009 | 掛橋 沙耶香 | - | 48008 | 賀喜 遥香 | - | 48017 | 筒井 あやめ | - | 48015 | 田村 真佑 | - | 48013 | 柴田 柚菜 | - | 48006 | 遠藤 さくら | - | 36760 | 与田 祐希 | - | 36759 | 吉田 綾乃クリスティー | - | 36758 | 山下 美月 | - | 36757 | 向井 葉月 | - | 36756 | 中村 麗乃 | - | 36755 | 佐藤 楓 | - | 36754 | 阪口 珠美 | - | 36753 | 久保 史緒里 | - | 36752 | 大園 桃子 | - | 36751 | 梅澤 美波 | - | 36750 | 岩本 蓮加 | - | 36749 | 伊藤 理々杏 | - | 264 | 齋藤 飛鳥 | -</Route> - -### Keyakizaka46 News 欅坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-keyakizaka46-news-ju-ban-46-xin-wen} - -<Route author="crispgm" example="/keyakizaka46/news" path="/keyakizaka46/news" /> - -### Keyakizaka46 Blog 欅坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-keyakizaka46-blog-ju-ban-46-bo-ke} - -<Route author="nwindz" example="/keyakizaka46/blog" path="/keyakizaka46/blog" /> - -### Sakurazaka46 News 櫻坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-sakurazaka46-news-ying-ban-46-xin-wen} - -<Route author="nczitzk" example="/sakurazaka46/news" path="/sakurazaka46/news" /> - -### Sakurazaka46 Blog 櫻坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-sakurazaka46-blog-ying-ban-46-bo-ke} - -<Route author="victor21813 nczitzk akashigakki" example="/sakurazaka46/blog" path="/sakurazaka46/blog/:id?/:page?" paramsDesc={['Member ID, see below, `all` by default', 'Page, `0` by default']}> - Member ID - - | Member ID | Name | - | --------- | ------------ | - | 2000 | 三期生リレー | - | 69 | 山下 瞳月 | - | 68 | 村山 美羽 | - | 67 | 村井 優 | - | 66 | 向井 純葉 | - | 65 | 的野 美青 | - | 64 | 中嶋 優月 | - | 63 | 谷口 愛季 | - | 62 | 小島 凪紗 | - | 61 | 小田倉 麗奈 | - | 60 | 遠藤 理子 | - | 59 | 石森 璃花 | - | 58 | 守屋 麗奈 | - | 57 | 増本 綺良 | - | 56 | 幸阪 茉里乃 | - | 55 | 大沼 晶保 | - | 54 | 大園 玲 | - | 53 | 遠藤 光莉 | - | 51 | 山﨑 天 | - | 50 | 森田 ひかる | - | 48 | 松田 里奈 | - | 47 | 藤吉 夏鈴 | - | 46 | 田村 保乃 | - | 45 | 武元 唯衣 | - | 44 | 関 有美子 | - | 43 | 井上 梨名 | - | 15 | 原田 葵 | - | 14 | 土生 瑞穂 | - | 11 | 菅井 友香 | - | 08 | 齋藤 冬優花 | - | 07 | 小林 由依 | - | 06 | 小池 美波 | - | 04 | 尾関 梨香 | - | 03 | 上村 莉菜 | -</Route> +| Member ID | Name | +| --------- | ------------ | +| 2000 | 四期生リレー | +| 36 | 渡辺 莉奈 | +| 35 | 山下 葉留花 | +| 34 | 宮地 すみれ | +| 33 | 藤嶌 果歩 | +| 32 | 平岡 海月 | +| 31 | 平尾 帆夏 | +| 30 | 竹内 希来里 | +| 29 | 正源司 陽子 | +| 28 | 清水 理央 | +| 27 | 小西 夏菜実 | +| 26 | 岸 帆夏 | +| 25 | 石塚 瑶季 | +| 24 | 山口 陽世 | +| 23 | 森本 茉莉 | +| 22 | 髙橋 未来虹 | +| 21 | 上村 ひなの | +| 18 | 松田 好花 | +| 17 | 濱岸 ひより | +| 16 | 丹生 明里 | +| 15 | 富田 鈴花 | +| 14 | 小坂 菜緒 | +| 13 | 河田 陽菜 | +| 12 | 金村 美玖 | +| 11 | 東村 芽依 | +| 10 | 高本 彩花 | +| 9 | 高瀬 愛奈 | +| 8 | 佐々木 美玲 | +| 7 | 佐々木 久美 | +| 6 | 齊藤 京子 | +| 5 | 加藤 史帆 | +| 4 | 影山 優佳 | +| 2 | 潮 紗理菜 | ### Hinatazaka46 News 日向坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-hinatazaka46-news-ri-xiang-ban-46-xin-wen} -<Route author="crispgm akashigakki" example="/hinatazaka46/news" path="/hinatazaka46/news" /> +<Route namespace="hinatazaka46" data={{"path":"/news","categories":["new-media"],"example":"/hinatazaka46/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hinatazaka46.com/s/official/news/list","hinatazaka46.com/"]},"name":"Hinatazaka46 News 日向坂 46 新闻","maintainers":["crispgm","akashigakki"],"url":"hinatazaka46.com/s/official/news/list","location":"news.ts"}} /> -### Hinatazaka46 Blog 日向坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-hinatazaka46-blog-ri-xiang-ban-46-bo-ke} +## Sakamichi Series 坂道系列官网资讯 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun} -<Route author="nwindz akashigakki" example="/hinatazaka46/blog" path="/hinatazaka46/blog/:id?/:page?" paramsDesc={['Member ID, see below, `all` by default', 'Page, `0` by default']}> - Member ID +### Nogizaka46 Blog 乃木坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-nogizaka46-blog-nai-mu-ban-46-bo-ke} - | Member ID | Name | - | --------- | ------------ | - | 2000 | 四期生リレー | - | 36 | 渡辺 莉奈 | - | 35 | 山下 葉留花 | - | 34 | 宮地 すみれ | - | 33 | 藤嶌 果歩 | - | 32 | 平岡 海月 | - | 31 | 平尾 帆夏 | - | 30 | 竹内 希来里 | - | 29 | 正源司 陽子 | - | 28 | 清水 理央 | - | 27 | 小西 夏菜実 | - | 26 | 岸 帆夏 | - | 25 | 石塚 瑶季 | - | 24 | 山口 陽世 | - | 23 | 森本 茉莉 | - | 22 | 髙橋 未来虹 | - | 21 | 上村 ひなの | - | 18 | 松田 好花 | - | 17 | 濱岸 ひより | - | 16 | 丹生 明里 | - | 15 | 富田 鈴花 | - | 14 | 小坂 菜緒 | - | 13 | 河田 陽菜 | - | 12 | 金村 美玖 | - | 11 | 東村 芽依 | - | 10 | 高本 彩花 | - | 9 | 高瀬 愛奈 | - | 8 | 佐々木 美玲 | - | 7 | 佐々木 久美 | - | 6 | 齊藤 京子 | - | 5 | 加藤 史帆 | - | 4 | 影山 優佳 | - | 2 | 潮 紗理菜 | -</Route> +<Route namespace="nogizaka46" data={{"path":"/blog/:id?","categories":["new-media"],"example":"/nogizaka46/blog","parameters":{"id":"Member ID, see below, `all` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["blog.nogizaka46.com/s/n46/diary/MEMBER"],"target":"/blog"},"name":"Nogizaka46 Blog 乃木坂 46 博客","maintainers":["Kasper4649","akashigakki"],"url":"blog.nogizaka46.com/s/n46/diary/MEMBER","description":"Member ID\n\n | Member ID | Name |\n | --------- | --------------------- |\n | 55401 | 岡本 姫奈 |\n | 55400 | 川﨑 桜 |\n | 55397 | 池田 瑛紗 |\n | 55396 | 五百城 茉央 |\n | 55395 | 中西 アルノ |\n | 55394 | 奥田 いろは |\n | 55393 | 冨里 奈央 |\n | 55392 | 小川 彩 |\n | 55391 | 菅原 咲月 |\n | 55390 | 一ノ瀬 美空 |\n | 55389 | 井上 和 |\n | 55387 | 弓木 奈於 |\n | 55386 | 松尾 美佑 |\n | 55385 | 林 瑠奈 |\n | 55384 | 佐藤 璃果 |\n | 55383 | 黒見 明香 |\n | 48014 | 清宮 レイ |\n | 48012 | 北川 悠理 |\n | 48010 | 金川 紗耶 |\n | 48019 | 矢久保 美緒 |\n | 48018 | 早川 聖来 |\n | 48009 | 掛橋 沙耶香 |\n | 48008 | 賀喜 遥香 |\n | 48017 | 筒井 あやめ |\n | 48015 | 田村 真佑 |\n | 48013 | 柴田 柚菜 |\n | 48006 | 遠藤 さくら |\n | 36760 | 与田 祐希 |\n | 36759 | 吉田 綾乃クリスティー |\n | 36758 | 山下 美月 |\n | 36757 | 向井 葉月 |\n | 36756 | 中村 麗乃 |\n | 36755 | 佐藤 楓 |\n | 36754 | 阪口 珠美 |\n | 36753 | 久保 史緒里 |\n | 36752 | 大園 桃子 |\n | 36751 | 梅澤 美波 |\n | 36750 | 岩本 蓮加 |\n | 36749 | 伊藤 理々杏 |\n | 264 | 齋藤 飛鳥 |","location":"blog.ts"}} /> + +Member ID + +| Member ID | Name | +| --------- | --------------------- | +| 55401 | 岡本 姫奈 | +| 55400 | 川﨑 桜 | +| 55397 | 池田 瑛紗 | +| 55396 | 五百城 茉央 | +| 55395 | 中西 アルノ | +| 55394 | 奥田 いろは | +| 55393 | 冨里 奈央 | +| 55392 | 小川 彩 | +| 55391 | 菅原 咲月 | +| 55390 | 一ノ瀬 美空 | +| 55389 | 井上 和 | +| 55387 | 弓木 奈於 | +| 55386 | 松尾 美佑 | +| 55385 | 林 瑠奈 | +| 55384 | 佐藤 璃果 | +| 55383 | 黒見 明香 | +| 48014 | 清宮 レイ | +| 48012 | 北川 悠理 | +| 48010 | 金川 紗耶 | +| 48019 | 矢久保 美緒 | +| 48018 | 早川 聖来 | +| 48009 | 掛橋 沙耶香 | +| 48008 | 賀喜 遥香 | +| 48017 | 筒井 あやめ | +| 48015 | 田村 真佑 | +| 48013 | 柴田 柚菜 | +| 48006 | 遠藤 さくら | +| 36760 | 与田 祐希 | +| 36759 | 吉田 綾乃クリスティー | +| 36758 | 山下 美月 | +| 36757 | 向井 葉月 | +| 36756 | 中村 麗乃 | +| 36755 | 佐藤 楓 | +| 36754 | 阪口 珠美 | +| 36753 | 久保 史緒里 | +| 36752 | 大園 桃子 | +| 36751 | 梅澤 美波 | +| 36750 | 岩本 蓮加 | +| 36749 | 伊藤 理々杏 | +| 264 | 齋藤 飛鳥 | + +### Nogizaka46 News 乃木坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-nogizaka46-news-nai-mu-ban-46-xin-wen} + +<Route namespace="nogizaka46" data={{"path":"/news","categories":["new-media"],"example":"/nogizaka46/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.nogizaka46.com/s/n46/news/list"]},"name":"Nogizaka46 News 乃木坂 46 新闻","maintainers":["crispgm","Fatpandac"],"url":"news.nogizaka46.com/s/n46/news/list","location":"news.ts"}} /> + +## Sakamichi Series 坂道系列官网资讯 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun} + +### Sakurazaka46 Blog 櫻坂 46 博客 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-sakurazaka46-blog-ying-ban-46-bo-ke} + +<Route namespace="sakurazaka46" data={{"path":"/blog/:id?/:page?","categories":["new-media"],"example":"/sakurazaka46/blog","parameters":{"id":"Member ID, see below, `all` by default","page":"Page, `0` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Sakurazaka46 Blog 櫻坂 46 博客","maintainers":["victor21813","nczitzk","akashigakki"],"description":"Member ID\n\n | Member ID | Name |\n | --------- | ------------ |\n | 2000 | 三期生リレー |\n | 69 | 山下 瞳月 |\n | 68 | 村山 美羽 |\n | 67 | 村井 優 |\n | 66 | 向井 純葉 |\n | 65 | 的野 美青 |\n | 64 | 中嶋 優月 |\n | 63 | 谷口 愛季 |\n | 62 | 小島 凪紗 |\n | 61 | 小田倉 麗奈 |\n | 60 | 遠藤 理子 |\n | 59 | 石森 璃花 |\n | 58 | 守屋 麗奈 |\n | 57 | 増本 綺良 |\n | 56 | 幸阪 茉里乃 |\n | 55 | 大沼 晶保 |\n | 54 | 大園 玲 |\n | 53 | 遠藤 光莉 |\n | 51 | 山﨑 天 |\n | 50 | 森田 ひかる |\n | 48 | 松田 里奈 |\n | 47 | 藤吉 夏鈴 |\n | 46 | 田村 保乃 |\n | 45 | 武元 唯衣 |\n | 44 | 関 有美子 |\n | 43 | 井上 梨名 |\n | 15 | 原田 葵 |\n | 14 | 土生 瑞穂 |\n | 11 | 菅井 友香 |\n | 08 | 齋藤 冬優花 |\n | 07 | 小林 由依 |\n | 06 | 小池 美波 |\n | 04 | 尾関 梨香 |\n | 03 | 上村 莉菜 |","location":"blog.ts"}} /> + +Member ID + +| Member ID | Name | +| --------- | ------------ | +| 2000 | 三期生リレー | +| 69 | 山下 瞳月 | +| 68 | 村山 美羽 | +| 67 | 村井 優 | +| 66 | 向井 純葉 | +| 65 | 的野 美青 | +| 64 | 中嶋 優月 | +| 63 | 谷口 愛季 | +| 62 | 小島 凪紗 | +| 61 | 小田倉 麗奈 | +| 60 | 遠藤 理子 | +| 59 | 石森 璃花 | +| 58 | 守屋 麗奈 | +| 57 | 増本 綺良 | +| 56 | 幸阪 茉里乃 | +| 55 | 大沼 晶保 | +| 54 | 大園 玲 | +| 53 | 遠藤 光莉 | +| 51 | 山﨑 天 | +| 50 | 森田 ひかる | +| 48 | 松田 里奈 | +| 47 | 藤吉 夏鈴 | +| 46 | 田村 保乃 | +| 45 | 武元 唯衣 | +| 44 | 関 有美子 | +| 43 | 井上 梨名 | +| 15 | 原田 葵 | +| 14 | 土生 瑞穂 | +| 11 | 菅井 友香 | +| 08 | 齋藤 冬優花 | +| 07 | 小林 由依 | +| 06 | 小池 美波 | +| 04 | 尾関 梨香 | +| 03 | 上村 莉菜 | + +### Sakurazaka46 News 櫻坂 46 新闻 {#sakamichi-series-ban-dao-xi-lie-guan-wang-zi-xun-sakurazaka46-news-ying-ban-46-xin-wen} + +<Route namespace="sakurazaka46" data={{"path":"/news","categories":["new-media"],"example":"/sakurazaka46/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sakurazaka46.com/s/s46/news/list","sakurazaka46.com/"]},"name":"Sakurazaka46 News 櫻坂 46 新闻","maintainers":["nczitzk"],"url":"sakurazaka46.com/s/s46/news/list","location":"news.ts"}} /> ## Samsung {#samsung} ### Research Blog {#samsung-research-blog} -<Route author="nczitzk" example="/samsung/research/blog" path="/samsung/research/blog" /> - -## Semiconductor Industry Association {#semiconductor-industry-association} - -### Latest News {#semiconductor-industry-association-latest-news} - -<Route author="nczitzk" example="/semiconductors/latest-news" path="/semiconductors/latest-news" /> +<Route namespace="samsung" data={{"path":"/research/blog","categories":["new-media"],"example":"/samsung/research/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["research.samsung.com/blog","research.samsung.com/"]},"name":"Research Blog","maintainers":["nczitzk"],"url":"research.samsung.com/blog","location":"research/blog.ts"}} /> ## Sensor Tower {#sensor-tower} ### Blog {#sensor-tower-blog} -<Route author="nczitzk" example="/sensortower/blog" path="/sensortower/blog/:language?" paramsDesc={['Language, see below, English by default']}> - | English | Chinese | Japanese | Korean | - | ------- | ------- | -------- | ------ | - | | zh-CN | ja | ko | -</Route> +<Route namespace="sensortower" data={{"path":"/blog/:language?","categories":["new-media"],"example":"/sensortower/blog","parameters":{"language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sensortower.com/blog","sensortower.com/zh-CN/blog","sensortower.com/ja/blog","sensortower.com/ko/blog","sensortower.com/"],"target":"/blog"},"name":"Blog","maintainers":["nczitzk"],"url":"sensortower.com/blog","description":"| English | Chinese | Japanese | Korean |\n | ------- | ------- | -------- | ------ |\n | | zh-CN | ja | ko |","location":"blog.ts"}} /> -## Simons Foundation {#simons-foundation} - -### Articles {#simons-foundation-articles} - -<Route author="emdoe" example="/simonsfoundation/articles" path="/simonsfoundation/articles" /> - -### What We’re Reading {#simons-foundation-what-we-re-reading} - -<Route author="emdoe" example="/simonsfoundation/recommend" path="/simonsfoundation/recommend" /> +| English | Chinese | Japanese | Korean | +| ------- | ------- | -------- | ------ | +| | zh-CN | ja | ko | ## Sky Sports {#sky-sports} ### News {#sky-sports-news} -<Route author="nczitzk" example="/skysports/news/ac-milan" path="/skysports/news/:team" paramsDesc={['Team id, can be found in URL to the team page']} /> - -## SocialBeta {#socialbeta} - -### 首页 {#socialbeta-shou-ye} - -<Route author="nczitzk" example="/socialbeta/home" path="/socialbeta/home" /> +<Route namespace="skysports" data={{"path":"/news/:team","categories":["new-media"],"example":"/skysports/news/ac-milan","parameters":{"team":"Team id, can be found in URL to the team page"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["nczitzk"],"location":"news.ts"}} /> ## SupChina {#supchina} -### Feed {#supchina-feed} - -<Route author="nczitzk" example="/supchina" path="/supchina" /> - ### Podcasts {#supchina-podcasts} -<Route author="nczitzk" example="/supchina/podcasts" path="/supchina/podcasts" /> +<Route namespace="supchina" data={{"path":"/podcasts","categories":["new-media"],"example":"/supchina/podcasts","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["supchina.com/podcasts","supchina.com/"]},"name":"Podcasts","maintainers":["nczitzk"],"url":"supchina.com/podcasts","location":"podcasts.ts"}} /> ## swissinfo {#swissinfo} ### Category {#swissinfo-category} -<Route author="nczitzk" example="/swissinfo/eng/latest-news" path="/swissinfo/:language?/:category?" paramsDesc={['Language, eng by default', 'Category, Latest News by default']} /> - -## TANC 艺术新闻 {#tanc-yi-shu-xin-wen} - -### 分类 {#tanc-yi-shu-xin-wen-fen-lei} - -<Route author="nczitzk" example="/tanchinese" path="/tanchinese/:category?" paramsDesc={['分类,见下表,默认为 INDEX 首页']}> - | INDEX 首页 | ENGLISH 英文版 | NEWS 新闻 | MUSEUM 博物馆 | EXHIBITIONS 展览 | - | ---------- | -------------- | --------- | ------------- | ---------------- | - | | english | news | museum | exhibitions | - - | COMMENTS 评论 | FEATURE 特写 | INTERVIEW 专访 | VIDEO 影像之选 | ART MARKET 艺术市场 | - | ------------- | ------------ | -------------- | -------------- | ------------------- | - | comments | feature | interview | video | art-market | -</Route> +<Route namespace="swissinfo" data={{"path":"/:language?/:category?","categories":["new-media"],"example":"/swissinfo/eng/latest-news","parameters":{"language":"Language, eng by default","category":"Category, Latest News by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swissinfo.ch/:language/:category","swissinfo.ch/"]},"name":"Category","maintainers":["nczitzk"],"location":"index.ts"}} /> ## TechCrunch {#techcrunch} ### News {#techcrunch-news} -<Route author="EthanWng97" example="/techcrunch/news" path="/techcrunch/news" /> +<Route namespace="techcrunch" data={{"path":"/news","categories":["new-media"],"example":"/techcrunch/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["techcrunch.com/"]},"name":"News","maintainers":["EthanWng97"],"url":"techcrunch.com/","location":"news.ts"}} /> ## TechPowerUp {#techpowerup} -### Latest Content {#techpowerup-latest-content} - -<Route author="TonyRL" example="/techpowerup" path="/techpowerup" radar="1" /> - ### Reviews {#techpowerup-reviews} -<Route author="TonyRL" example="/techpowerup/review/4090" path="/techpowerup/review/:keyword?" paramsDesc={['Search Keyword']} radar="1" /> - -## The Brain {#the-brain} - -### Blog {#the-brain-blog} - -<Route author="nczitzk" example="/thebrain/blog" path="/thebrain/blog/:category?" paramsDesc={['Category, see below, Blog by default']}> - | Blog | Recorded Events | Big Thinkers | - | ---- | --------------- | ------------ | - | blog | recorded-events | big-thinkers | -</Route> - -## The News Lens 關鍵評論 {#the-news-lens-guan-jian-ping-lun} - -### 最新 {#the-news-lens-guan-jian-ping-lun-zui-xin} - -<Route author="nczitzk" example="/thenewslens/latest-article" path="/thenewslens/latest-article/:sort?" paramsDesc={['排序方式,见下表,可在对应排序页 URL 中找到']}> - | 最新文章 | 最多觀看 | 最多分享 | 本日 | 本週 | 本月 | 今年 | 去年 | 有史以來 | - | -------- | -------- | -------- | --------- | -------- | --------- | -------- | ------------ | ----------- | - | | hot | social | hot/today | hot/week | hot/month | hot/year | hot/lastYear | hot/history | -</Route> - -### 新闻 {#the-news-lens-guan-jian-ping-lun-xin-wen} - -<Route author="nczitzk" example="/thenewslens/news" path="/thenewslens/news/:sort?" paramsDesc={['排序方式,见下表,可在对应排序页 URL 中找到']}> - | 最新文章 | 最多觀看 | 最多分享 | - | -------- | -------- | -------- | - | | hot | social | -</Route> - -### 作者 {#the-news-lens-guan-jian-ping-lun-zuo-zhe} - -<Route author="nczitzk" example="/thenewslens/author/BBC" path="/thenewslens/author/:id/:sort?" paramsDesc={['作者 id,可在对应作者页 URL 中找到', '排序方式,同上表,可在对应排序页 URL 中找到']} /> - -### 分类 {#the-news-lens-guan-jian-ping-lun-fen-lei} - -<Route author="nczitzk" example="/thenewslens/category/politics" path="/thenewslens/category/:id/:sort?" paramsDesc={['分类 id,可在对应分类页 URL 中找到', '排序方式,同上表,可在对应排序页 URL 中找到']} /> - -### 标签 {#the-news-lens-guan-jian-ping-lun-biao-qian} - -<Route author="nczitzk" example="/thenewslens/tag/中國" path="/thenewslens/tag/:id/:sort?" paramsDesc={['标签 id,可在对应标签页 URL 中找到', '排序方式,同上表,可在对应排序页 URL 中找到']} /> - -### 频道 {#the-news-lens-guan-jian-ping-lun-pin-dao} - -<Route author="nczitzk" example="/thenewslens/channel/hk" path="/thenewslens/channel/:id/:sort?" paramsDesc={['标签 id,可在对应标签页 URL 中找到', '排序方式,同上表,可在对应排序页 URL 中找到']} /> - -### 评论 {#the-news-lens-guan-jian-ping-lun-ping-lun} - -<Route author="nczitzk" example="/thenewslens/review" path="/thenewslens/review/:sort?" paramsDesc={['排序方式,同上表,可在对应排序页 URL 中找到']} /> +<Route namespace="techpowerup" data={{"path":"/review/:keyword?","categories":["new-media"],"example":"/techpowerup/review/4090","parameters":{"keyword":"Search Keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["techpowerup.com/"],"target":""},"name":"Reviews","maintainers":["TonyRL"],"url":"techpowerup.com/","location":"review.ts"}} /> ## The Verge {#the-verge} ### The Verge {#the-verge-the-verge} -<Route author="HenryQW vbali" example="/theverge" path="/theverge/:hub?" paramsDesc={['Hub, see below, All Posts by default']}> - | Hub | Hub name | - | ----------- | ------------------- | - | | All Posts | - | android | Android | - | apple | Apple | - | apps | Apps & Software | - | blackberry | BlackBerry | - | culture | Culture | - | gaming | Gaming | - | hd | HD & Home | - | microsoft | Microsoft | - | photography | Photography & Video | - | policy | Policy & Law | - | web | Web & Social | +<Route namespace="theverge" data={{"path":"/:hub?","categories":["new-media"],"example":"/theverge","parameters":{"hub":"Hub, see below, All Posts by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["theverge.com/:hub","theverge.com/"]},"name":"The Verge","maintainers":["HenryQW","vbali"],"description":"| Hub | Hub name |\n | ----------- | ------------------- |\n | | All Posts |\n | android | Android |\n | apple | Apple |\n | apps | Apps & Software |\n | blackberry | BlackBerry |\n | culture | Culture |\n | gaming | Gaming |\n | hd | HD & Home |\n | microsoft | Microsoft |\n | photography | Photography & Video |\n | policy | Policy & Law |\n | web | Web & Social |\n\n Provides a better reading experience (full text articles) over the official one.","location":"index.ts"}} /> - Provides a better reading experience (full text articles) over the official one. -</Route> +| Hub | Hub name | +| ----------- | ------------------- | +| | All Posts | +| android | Android | +| apple | Apple | +| apps | Apps & Software | +| blackberry | BlackBerry | +| culture | Culture | +| gaming | Gaming | +| hd | HD & Home | +| microsoft | Microsoft | +| photography | Photography & Video | +| policy | Policy & Law | +| web | Web & Social | + +Provides a better reading experience (full text articles) over the official one. ## ThoughtCo {#thoughtco} ### Category {#thoughtco-category} -<Route author="nczitzk" example="/thoughtco" path="/thoughtco/:category?" paramsDesc={['Category id, see below']} radar="1"> - #### Science, Tech, Math +<Route namespace="thoughtco" data={{"path":"/:category?","categories":["new-media"],"example":"/thoughtco","parameters":{"category":"Category id, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"description":"#### Science, Tech, Math\n\n | category | id |\n | ---------------- | -------------------------- |\n | Science | science-4132464 |\n | Math | math-4133545 |\n | Social Sciences | social-sciences-4133522 |\n | Computer Science | computer-science-4133486 |\n | Animals & Nature | animals-and-nature-4133421 |\n\n #### Humanities\n\n | category | id |\n | ----------------- | --------------------------- |\n | History & Culture | history-and-culture-4133356 |\n | Visual Arts | visual-arts-4132957 |\n | Literature | literature-4133251 |\n | English | english-4688281 |\n | Geography | geography-4133035 |\n | Philosophy | philosophy-4133025 |\n | Issues | issues-4133022 |\n\n #### Languages\n\n | category | id |\n | ---------------------------- | ---------------- |\n | English as a Second Language | esl-4133095 |\n | Spanish | spanish-4133085 |\n | French | french-4133079 |\n | German | german-4133073 |\n | Italian | italian-4133069 |\n | Japanese | japanese-4133062 |\n | Mandarin | mandarin-4133057 |\n | Russian | russian-4175265 |\n\n #### Resources\n\n | category | id |\n | ---------------------- | ---------------------------- |\n | For Students & Parents | for-students-parents-4132588 |\n | For Educators | for-educators-4132509 |\n | For Adult Learners | for-adult-learners-4132469 |\n\n <details>\n <summary>More categories</summary>\n\n #### Science\n\n | category | id |\n | ----------------- | --------------------------- |\n | Chemistry | chemistry-4133594 |\n | Biology | biology-4133580 |\n | Physics | physics-4133571 |\n | Geology | geology-4133564 |\n | Astronomy | astronomy-4133558 |\n | Weather & Climate | weather-and-climate-4133550 |\n\n #### Math\n\n | category | id |\n | --------------------- | ------------------------------- |\n | Math Tutorials | math-tutorials-4133543 |\n | Geometry | geometry-4133540 |\n | Arithmetic | arithmetic-4133542 |\n | Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 |\n | Statistics | statistics-4133539 |\n | Exponential Decay | exponential-decay-4133528 |\n | Worksheets By Grade | worksheets-by-grade-4133526 |\n | Resources | math-resources-4133523 |\n\n #### Social Sciences\n\n | category | id |\n | ----------- | ------------------- |\n | Psychology | psychology-4160512 |\n | Sociology | sociology-4133515 |\n | Archaeology | archaeology-4133504 |\n | Economics | economics-4133521 |\n | Ergonomics | ergonomics-4133492 |\n\n #### Computer Science\n\n | category | id |\n | ---------------------- | -------------------------------- |\n | PHP Programming | php-4133485 |\n | Perl | perl-4133481 |\n | Python | python-4133477 |\n | Java Programming | java-programming-4133478 |\n | Javascript Programming | javascript-programming-4133476 |\n | Delphi Programming | delphi-programming-4133475 |\n | C & C++ Programming | c-and-c-plus-programming-4133470 |\n | Ruby Programming | ruby-programming-4133469 |\n | Visual Basic | visual-basic-4133468 |\n\n #### Animals and Nature\n\n | category | id |\n | ---------------- | ------------------------ |\n | Amphibians | amphibians-4133418 |\n | Birds | birds-4133416 |\n | Habitat Profiles | habitat-profiles-4133412 |\n | Mammals | mammals-4133411 |\n | Reptiles | reptiles-4133408 |\n | Insects | insects-4133406 |\n | Marine Life | marine-life-4133393 |\n | Forestry | forestry-4133386 |\n | Dinosaurs | dinosaurs-4133376 |\n | Evolution | evolution-4133366 |\n\n #### History and Culture\n\n | category | id |\n | ------------------------------ | ---------------------------------------- |\n | American History | american-history-4133354 |\n | African American History | african-american-history-4133344 |\n | African History | african-history-4133338 |\n | Ancient History and Culture | ancient-history-4133336 |\n | Asian History | asian-history-4133325 |\n | European History | european-history-4133316 |\n | Genealogy | genealogy-4133308 |\n | Inventions | inventions-4133303 |\n | Latin American History | latin-american-history-4133296 |\n | Medieval & Renaissance History | medieval-and-renaissance-history-4133289 |\n | Military History | military-history-4133285 |\n | The 20th Century | 20th-century-4133273 |\n | Women's History | womens-history-4133260 |\n\n #### Visual Arts\n\n | category | id |\n | ------------- | -------------------- |\n | Art & Artists | art-4132956 |\n | Architecture | architecture-4132953 |\n\n #### Literature\n\n | category | id |\n | ------------------ | -------------------------- |\n | Best Sellers | best-sellers-4133250 |\n | Classic Literature | classic-literature-4133245 |\n | Plays & Drama | plays-and-drama-4133239 |\n | Poetry | poetry-4133232 |\n | Quotations | quotations-4133229 |\n | Shakespeare | shakespeare-4133223 |\n | Short Stories | short-stories-4133217 |\n | Children's Books | childrens-books-4133216 |\n\n #### English\n\n | category | id |\n | --------------- | ----------------------- |\n | English Grammar | english-grammar-4133049 |\n | Writing | writing-4133048 |\n\n #### Geography\n\n | category | id |\n | ------------------------ | ---------------------------------- |\n | Basics | geography-basics-4133034 |\n | Physical Geography | physical-geography-4133032 |\n | Political Geography | political-geography-4133033 |\n | Population | population-4133031 |\n | Country Information | country-information-4133030 |\n | Key Figures & Milestones | key-figures-and-milestones-4133029 |\n | Maps | maps-4133027 |\n | Urban Geography | urban-geography-4133026 |\n\n #### Philosophy\n\n | category | id |\n | ------------------------------ | ---------------------------------------- |\n | Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 |\n | Major Philosophers | major-philosophers-4133023 |\n\n #### Issues\n\n | category | id |\n | --------------------------------- | -------------------------------- |\n | The U. S. Government | us-government-4133021 |\n | U.S. Foreign Policy | us-foreign-policy-4133010 |\n | U.S. Liberal Politics | us-liberal-politics-4133009 |\n | U.S. Conservative Politics | us-conservative-politics-4133006 |\n | Women's Issues | womens-issues-4133002 |\n | Civil Liberties | civil-liberties-4132996 |\n | The Middle East | middle-east-4132989 |\n | Race Relations | race-relations-4132982 |\n | Immigration | immigration-4132977 |\n | Crime & Punishment | crime-and-punishment-4132972 |\n | Canadian Government | canadian-government-4132959 |\n | Understanding Types of Government | types-of-government-5179107 |\n\n #### English as a Second Language\n\n | category | id |\n | ---------------------------- | ------------------------------------------ |\n | Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 |\n | Vocabulary | esl-vocabulary-4133092 |\n | Writing Skills | esl-writing-skills-4133091 |\n | Reading Comprehension | esl-reading-comprehension-4133090 |\n | Grammar | esl-grammar-4133089 |\n | Business English | esl-business-english-4133088 |\n | Resources for Teachers | resources-for-esl-teachers-4133087 |\n\n #### Spanish\n\n | category | id |\n | ----------------- | ----------------------------------- |\n | History & Culture | spanish-history-and-culture-4133084 |\n | Pronunciation | spanish-pronunciation-4133083 |\n | Vocabulary | spanish-vocabulary-4133082 |\n | Writing Skills | spanish-writing-skills-4133081 |\n | Grammar | spanish-grammar-4133080 |\n\n #### French\n\n | category | id |\n | ---------------------------- | -------------------------------------------- |\n | Pronunciation & Conversation | french-pronunciation-4133075 |\n | Vocabulary | french-vocabulary-4133076 |\n | Grammar | french-grammar-4133074 |\n | Resources For Teachers | french-resources-for-french-teachers-4133077 |\n\n #### German\n\n | category | id |\n | ---------------------------- | ---------------------------------- |\n | History & Culture | german-history-and-culture-4133071 |\n | Pronunciation & Conversation | german-pronunciation-4133070 |\n | Vocabulary | german-vocabulary-4133068 |\n | Grammar | german-grammar-4133067 |\n\n #### Italian\n\n | category | id |\n | ----------------- | ----------------------------------- |\n | History & Culture | italian-history-and-culture-4133065 |\n | Vocabulary | italian-vocabulary-4133061 |\n | Grammar | italian-grammar-4133063 |\n\n #### Japanese\n\n | category | id |\n | ----------------------------- | ------------------------------------ |\n | History & Culture | japanese-history-and-culture-4133058 |\n | Essential Japanese Vocabulary | japanese-vocabulary-4133060 |\n | Japanese Grammar | japanese-grammar-4133056 |\n\n #### Mandarin\n\n | category | id |\n | -------------------------------- | ---------------------------------------- |\n | Mandarin History and Culture | mandarin-history-and-culture-4133054 |\n | Pronunciation | mandarin-pronunciation-4133053 |\n | Vocabulary | mandarin-vocabulary-4133052 |\n | Understanding Chinese Characters | understanding-chinese-characters-4133051 |\n\n #### Russian\n\n | category | id |\n | -------- | --------------- |\n | Russian | russian-4175265 |\n\n #### For Students & Parents\n\n | category | id |\n | ------------------ | -------------------------- |\n | Homework Help | homework-help-4132587 |\n | Private School | private-school-4132514 |\n | Test Prep | test-prep-4132578 |\n | College Admissions | college-admissions-4132565 |\n | College Life | college-life-4132553 |\n | Graduate School | graduate-school-4132543 |\n | Business School | business-school-4132536 |\n | Law School | law-school-4132527 |\n | Distance Learning | distance-learning-4132521 |\n\n #### For Educators\n\n | category | id |\n | -------------------- | ----------------------------- |\n | Becoming A Teacher | becoming-a-teacher-4132510 |\n | Assessments & Tests | assessments-and-tests-4132508 |\n | Elementary Education | elementary-education-4132507 |\n | Secondary Education | secondary-education-4132504 |\n | Special Education | special-education-4132499 |\n | Teaching | teaching-4132488 |\n | Homeschooling | homeschooling-4132480 |\n\n #### For Adult Learners\n\n | category | id |\n | ----------------------- | ------------------------------- |\n | Tips For Adult Students | tips-for-adult-students-4132468 |\n | Getting Your Ged | getting-your-ged-4132466 |\n </details>","location":"index.ts"}} /> - | category | id | - | ---------------- | -------------------------- | - | Science | science-4132464 | - | Math | math-4133545 | - | Social Sciences | social-sciences-4133522 | - | Computer Science | computer-science-4133486 | - | Animals & Nature | animals-and-nature-4133421 | +#### Science, Tech, Math {#thoughtco-category-science-tech-math} - #### Humanities +| category | id | +| ---------------- | -------------------------- | +| Science | science-4132464 | +| Math | math-4133545 | +| Social Sciences | social-sciences-4133522 | +| Computer Science | computer-science-4133486 | +| Animals & Nature | animals-and-nature-4133421 | + +#### Humanities {#thoughtco-category-humanities} + +| category | id | +| ----------------- | --------------------------- | +| History & Culture | history-and-culture-4133356 | +| Visual Arts | visual-arts-4132957 | +| Literature | literature-4133251 | +| English | english-4688281 | +| Geography | geography-4133035 | +| Philosophy | philosophy-4133025 | +| Issues | issues-4133022 | + +#### Languages {#thoughtco-category-languages} + +| category | id | +| ---------------------------- | ---------------- | +| English as a Second Language | esl-4133095 | +| Spanish | spanish-4133085 | +| French | french-4133079 | +| German | german-4133073 | +| Italian | italian-4133069 | +| Japanese | japanese-4133062 | +| Mandarin | mandarin-4133057 | +| Russian | russian-4175265 | + +#### Resources {#thoughtco-category-resources} + +| category | id | +| ---------------------- | ---------------------------- | +| For Students & Parents | for-students-parents-4132588 | +| For Educators | for-educators-4132509 | +| For Adult Learners | for-adult-learners-4132469 | + +<details> + <summary>More categories</summary> + + #### Science | category | id | | ----------------- | --------------------------- | - | History & Culture | history-and-culture-4133356 | - | Visual Arts | visual-arts-4132957 | - | Literature | literature-4133251 | - | English | english-4688281 | - | Geography | geography-4133035 | - | Philosophy | philosophy-4133025 | - | Issues | issues-4133022 | + | Chemistry | chemistry-4133594 | + | Biology | biology-4133580 | + | Physics | physics-4133571 | + | Geology | geology-4133564 | + | Astronomy | astronomy-4133558 | + | Weather & Climate | weather-and-climate-4133550 | - #### Languages + #### Math - | category | id | - | ---------------------------- | ---------------- | - | English as a Second Language | esl-4133095 | - | Spanish | spanish-4133085 | - | French | french-4133079 | - | German | german-4133073 | - | Italian | italian-4133069 | - | Japanese | japanese-4133062 | - | Mandarin | mandarin-4133057 | - | Russian | russian-4175265 | + | category | id | + | --------------------- | ------------------------------- | + | Math Tutorials | math-tutorials-4133543 | + | Geometry | geometry-4133540 | + | Arithmetic | arithmetic-4133542 | + | Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 | + | Statistics | statistics-4133539 | + | Exponential Decay | exponential-decay-4133528 | + | Worksheets By Grade | worksheets-by-grade-4133526 | + | Resources | math-resources-4133523 | - #### Resources + #### Social Sciences - | category | id | - | ---------------------- | ---------------------------- | - | For Students & Parents | for-students-parents-4132588 | - | For Educators | for-educators-4132509 | - | For Adult Learners | for-adult-learners-4132469 | + | category | id | + | ----------- | ------------------- | + | Psychology | psychology-4160512 | + | Sociology | sociology-4133515 | + | Archaeology | archaeology-4133504 | + | Economics | economics-4133521 | + | Ergonomics | ergonomics-4133492 | - <details> - <summary>More categories</summary> + #### Computer Science - #### Science + | category | id | + | ---------------------- | -------------------------------- | + | PHP Programming | php-4133485 | + | Perl | perl-4133481 | + | Python | python-4133477 | + | Java Programming | java-programming-4133478 | + | Javascript Programming | javascript-programming-4133476 | + | Delphi Programming | delphi-programming-4133475 | + | C & C++ Programming | c-and-c-plus-programming-4133470 | + | Ruby Programming | ruby-programming-4133469 | + | Visual Basic | visual-basic-4133468 | - | category | id | - | ----------------- | --------------------------- | - | Chemistry | chemistry-4133594 | - | Biology | biology-4133580 | - | Physics | physics-4133571 | - | Geology | geology-4133564 | - | Astronomy | astronomy-4133558 | - | Weather & Climate | weather-and-climate-4133550 | + #### Animals and Nature - #### Math + | category | id | + | ---------------- | ------------------------ | + | Amphibians | amphibians-4133418 | + | Birds | birds-4133416 | + | Habitat Profiles | habitat-profiles-4133412 | + | Mammals | mammals-4133411 | + | Reptiles | reptiles-4133408 | + | Insects | insects-4133406 | + | Marine Life | marine-life-4133393 | + | Forestry | forestry-4133386 | + | Dinosaurs | dinosaurs-4133376 | + | Evolution | evolution-4133366 | - | category | id | - | --------------------- | ------------------------------- | - | Math Tutorials | math-tutorials-4133543 | - | Geometry | geometry-4133540 | - | Arithmetic | arithmetic-4133542 | - | Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 | - | Statistics | statistics-4133539 | - | Exponential Decay | exponential-decay-4133528 | - | Worksheets By Grade | worksheets-by-grade-4133526 | - | Resources | math-resources-4133523 | + #### History and Culture - #### Social Sciences + | category | id | + | ------------------------------ | ---------------------------------------- | + | American History | american-history-4133354 | + | African American History | african-american-history-4133344 | + | African History | african-history-4133338 | + | Ancient History and Culture | ancient-history-4133336 | + | Asian History | asian-history-4133325 | + | European History | european-history-4133316 | + | Genealogy | genealogy-4133308 | + | Inventions | inventions-4133303 | + | Latin American History | latin-american-history-4133296 | + | Medieval & Renaissance History | medieval-and-renaissance-history-4133289 | + | Military History | military-history-4133285 | + | The 20th Century | 20th-century-4133273 | + | Women's History | womens-history-4133260 | - | category | id | - | ----------- | ------------------- | - | Psychology | psychology-4160512 | - | Sociology | sociology-4133515 | - | Archaeology | archaeology-4133504 | - | Economics | economics-4133521 | - | Ergonomics | ergonomics-4133492 | + #### Visual Arts - #### Computer Science + | category | id | + | ------------- | -------------------- | + | Art & Artists | art-4132956 | + | Architecture | architecture-4132953 | - | category | id | - | ---------------------- | -------------------------------- | - | PHP Programming | php-4133485 | - | Perl | perl-4133481 | - | Python | python-4133477 | - | Java Programming | java-programming-4133478 | - | Javascript Programming | javascript-programming-4133476 | - | Delphi Programming | delphi-programming-4133475 | - | C & C++ Programming | c-and-c-plus-programming-4133470 | - | Ruby Programming | ruby-programming-4133469 | - | Visual Basic | visual-basic-4133468 | + #### Literature - #### Animals and Nature + | category | id | + | ------------------ | -------------------------- | + | Best Sellers | best-sellers-4133250 | + | Classic Literature | classic-literature-4133245 | + | Plays & Drama | plays-and-drama-4133239 | + | Poetry | poetry-4133232 | + | Quotations | quotations-4133229 | + | Shakespeare | shakespeare-4133223 | + | Short Stories | short-stories-4133217 | + | Children's Books | childrens-books-4133216 | - | category | id | - | ---------------- | ------------------------ | - | Amphibians | amphibians-4133418 | - | Birds | birds-4133416 | - | Habitat Profiles | habitat-profiles-4133412 | - | Mammals | mammals-4133411 | - | Reptiles | reptiles-4133408 | - | Insects | insects-4133406 | - | Marine Life | marine-life-4133393 | - | Forestry | forestry-4133386 | - | Dinosaurs | dinosaurs-4133376 | - | Evolution | evolution-4133366 | + #### English - #### History and Culture + | category | id | + | --------------- | ----------------------- | + | English Grammar | english-grammar-4133049 | + | Writing | writing-4133048 | - | category | id | - | ------------------------------ | ---------------------------------------- | - | American History | american-history-4133354 | - | African American History | african-american-history-4133344 | - | African History | african-history-4133338 | - | Ancient History and Culture | ancient-history-4133336 | - | Asian History | asian-history-4133325 | - | European History | european-history-4133316 | - | Genealogy | genealogy-4133308 | - | Inventions | inventions-4133303 | - | Latin American History | latin-american-history-4133296 | - | Medieval & Renaissance History | medieval-and-renaissance-history-4133289 | - | Military History | military-history-4133285 | - | The 20th Century | 20th-century-4133273 | - | Women's History | womens-history-4133260 | + #### Geography - #### Visual Arts + | category | id | + | ------------------------ | ---------------------------------- | + | Basics | geography-basics-4133034 | + | Physical Geography | physical-geography-4133032 | + | Political Geography | political-geography-4133033 | + | Population | population-4133031 | + | Country Information | country-information-4133030 | + | Key Figures & Milestones | key-figures-and-milestones-4133029 | + | Maps | maps-4133027 | + | Urban Geography | urban-geography-4133026 | - | category | id | - | ------------- | -------------------- | - | Art & Artists | art-4132956 | - | Architecture | architecture-4132953 | + #### Philosophy - #### Literature + | category | id | + | ------------------------------ | ---------------------------------------- | + | Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 | + | Major Philosophers | major-philosophers-4133023 | - | category | id | - | ------------------ | -------------------------- | - | Best Sellers | best-sellers-4133250 | - | Classic Literature | classic-literature-4133245 | - | Plays & Drama | plays-and-drama-4133239 | - | Poetry | poetry-4133232 | - | Quotations | quotations-4133229 | - | Shakespeare | shakespeare-4133223 | - | Short Stories | short-stories-4133217 | - | Children's Books | childrens-books-4133216 | + #### Issues - #### English + | category | id | + | --------------------------------- | -------------------------------- | + | The U. S. Government | us-government-4133021 | + | U.S. Foreign Policy | us-foreign-policy-4133010 | + | U.S. Liberal Politics | us-liberal-politics-4133009 | + | U.S. Conservative Politics | us-conservative-politics-4133006 | + | Women's Issues | womens-issues-4133002 | + | Civil Liberties | civil-liberties-4132996 | + | The Middle East | middle-east-4132989 | + | Race Relations | race-relations-4132982 | + | Immigration | immigration-4132977 | + | Crime & Punishment | crime-and-punishment-4132972 | + | Canadian Government | canadian-government-4132959 | + | Understanding Types of Government | types-of-government-5179107 | - | category | id | - | --------------- | ----------------------- | - | English Grammar | english-grammar-4133049 | - | Writing | writing-4133048 | + #### English as a Second Language - #### Geography + | category | id | + | ---------------------------- | ------------------------------------------ | + | Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 | + | Vocabulary | esl-vocabulary-4133092 | + | Writing Skills | esl-writing-skills-4133091 | + | Reading Comprehension | esl-reading-comprehension-4133090 | + | Grammar | esl-grammar-4133089 | + | Business English | esl-business-english-4133088 | + | Resources for Teachers | resources-for-esl-teachers-4133087 | - | category | id | - | ------------------------ | ---------------------------------- | - | Basics | geography-basics-4133034 | - | Physical Geography | physical-geography-4133032 | - | Political Geography | political-geography-4133033 | - | Population | population-4133031 | - | Country Information | country-information-4133030 | - | Key Figures & Milestones | key-figures-and-milestones-4133029 | - | Maps | maps-4133027 | - | Urban Geography | urban-geography-4133026 | + #### Spanish - #### Philosophy + | category | id | + | ----------------- | ----------------------------------- | + | History & Culture | spanish-history-and-culture-4133084 | + | Pronunciation | spanish-pronunciation-4133083 | + | Vocabulary | spanish-vocabulary-4133082 | + | Writing Skills | spanish-writing-skills-4133081 | + | Grammar | spanish-grammar-4133080 | - | category | id | - | ------------------------------ | ---------------------------------------- | - | Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 | - | Major Philosophers | major-philosophers-4133023 | + #### French - #### Issues + | category | id | + | ---------------------------- | -------------------------------------------- | + | Pronunciation & Conversation | french-pronunciation-4133075 | + | Vocabulary | french-vocabulary-4133076 | + | Grammar | french-grammar-4133074 | + | Resources For Teachers | french-resources-for-french-teachers-4133077 | - | category | id | - | --------------------------------- | -------------------------------- | - | The U. S. Government | us-government-4133021 | - | U.S. Foreign Policy | us-foreign-policy-4133010 | - | U.S. Liberal Politics | us-liberal-politics-4133009 | - | U.S. Conservative Politics | us-conservative-politics-4133006 | - | Women's Issues | womens-issues-4133002 | - | Civil Liberties | civil-liberties-4132996 | - | The Middle East | middle-east-4132989 | - | Race Relations | race-relations-4132982 | - | Immigration | immigration-4132977 | - | Crime & Punishment | crime-and-punishment-4132972 | - | Canadian Government | canadian-government-4132959 | - | Understanding Types of Government | types-of-government-5179107 | + #### German - #### English as a Second Language + | category | id | + | ---------------------------- | ---------------------------------- | + | History & Culture | german-history-and-culture-4133071 | + | Pronunciation & Conversation | german-pronunciation-4133070 | + | Vocabulary | german-vocabulary-4133068 | + | Grammar | german-grammar-4133067 | - | category | id | - | ---------------------------- | ------------------------------------------ | - | Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 | - | Vocabulary | esl-vocabulary-4133092 | - | Writing Skills | esl-writing-skills-4133091 | - | Reading Comprehension | esl-reading-comprehension-4133090 | - | Grammar | esl-grammar-4133089 | - | Business English | esl-business-english-4133088 | - | Resources for Teachers | resources-for-esl-teachers-4133087 | + #### Italian - #### Spanish + | category | id | + | ----------------- | ----------------------------------- | + | History & Culture | italian-history-and-culture-4133065 | + | Vocabulary | italian-vocabulary-4133061 | + | Grammar | italian-grammar-4133063 | - | category | id | - | ----------------- | ----------------------------------- | - | History & Culture | spanish-history-and-culture-4133084 | - | Pronunciation | spanish-pronunciation-4133083 | - | Vocabulary | spanish-vocabulary-4133082 | - | Writing Skills | spanish-writing-skills-4133081 | - | Grammar | spanish-grammar-4133080 | + #### Japanese - #### French + | category | id | + | ----------------------------- | ------------------------------------ | + | History & Culture | japanese-history-and-culture-4133058 | + | Essential Japanese Vocabulary | japanese-vocabulary-4133060 | + | Japanese Grammar | japanese-grammar-4133056 | - | category | id | - | ---------------------------- | -------------------------------------------- | - | Pronunciation & Conversation | french-pronunciation-4133075 | - | Vocabulary | french-vocabulary-4133076 | - | Grammar | french-grammar-4133074 | - | Resources For Teachers | french-resources-for-french-teachers-4133077 | + #### Mandarin - #### German + | category | id | + | -------------------------------- | ---------------------------------------- | + | Mandarin History and Culture | mandarin-history-and-culture-4133054 | + | Pronunciation | mandarin-pronunciation-4133053 | + | Vocabulary | mandarin-vocabulary-4133052 | + | Understanding Chinese Characters | understanding-chinese-characters-4133051 | - | category | id | - | ---------------------------- | ---------------------------------- | - | History & Culture | german-history-and-culture-4133071 | - | Pronunciation & Conversation | german-pronunciation-4133070 | - | Vocabulary | german-vocabulary-4133068 | - | Grammar | german-grammar-4133067 | + #### Russian - #### Italian + | category | id | + | -------- | --------------- | + | Russian | russian-4175265 | - | category | id | - | ----------------- | ----------------------------------- | - | History & Culture | italian-history-and-culture-4133065 | - | Vocabulary | italian-vocabulary-4133061 | - | Grammar | italian-grammar-4133063 | + #### For Students & Parents - #### Japanese + | category | id | + | ------------------ | -------------------------- | + | Homework Help | homework-help-4132587 | + | Private School | private-school-4132514 | + | Test Prep | test-prep-4132578 | + | College Admissions | college-admissions-4132565 | + | College Life | college-life-4132553 | + | Graduate School | graduate-school-4132543 | + | Business School | business-school-4132536 | + | Law School | law-school-4132527 | + | Distance Learning | distance-learning-4132521 | - | category | id | - | ----------------------------- | ------------------------------------ | - | History & Culture | japanese-history-and-culture-4133058 | - | Essential Japanese Vocabulary | japanese-vocabulary-4133060 | - | Japanese Grammar | japanese-grammar-4133056 | + #### For Educators - #### Mandarin + | category | id | + | -------------------- | ----------------------------- | + | Becoming A Teacher | becoming-a-teacher-4132510 | + | Assessments & Tests | assessments-and-tests-4132508 | + | Elementary Education | elementary-education-4132507 | + | Secondary Education | secondary-education-4132504 | + | Special Education | special-education-4132499 | + | Teaching | teaching-4132488 | + | Homeschooling | homeschooling-4132480 | - | category | id | - | -------------------------------- | ---------------------------------------- | - | Mandarin History and Culture | mandarin-history-and-culture-4133054 | - | Pronunciation | mandarin-pronunciation-4133053 | - | Vocabulary | mandarin-vocabulary-4133052 | - | Understanding Chinese Characters | understanding-chinese-characters-4133051 | + #### For Adult Learners - #### Russian - - | category | id | - | -------- | --------------- | - | Russian | russian-4175265 | - - #### For Students & Parents - - | category | id | - | ------------------ | -------------------------- | - | Homework Help | homework-help-4132587 | - | Private School | private-school-4132514 | - | Test Prep | test-prep-4132578 | - | College Admissions | college-admissions-4132565 | - | College Life | college-life-4132553 | - | Graduate School | graduate-school-4132543 | - | Business School | business-school-4132536 | - | Law School | law-school-4132527 | - | Distance Learning | distance-learning-4132521 | - - #### For Educators - - | category | id | - | -------------------- | ----------------------------- | - | Becoming A Teacher | becoming-a-teacher-4132510 | - | Assessments & Tests | assessments-and-tests-4132508 | - | Elementary Education | elementary-education-4132507 | - | Secondary Education | secondary-education-4132504 | - | Special Education | special-education-4132499 | - | Teaching | teaching-4132488 | - | Homeschooling | homeschooling-4132480 | - - #### For Adult Learners - - | category | id | - | ----------------------- | ------------------------------- | - | Tips For Adult Students | tips-for-adult-students-4132468 | - | Getting Your Ged | getting-your-ged-4132466 | - </details> -</Route> - -## Topbook {#topbook} - -### Overview {#topbook-overview} - -<Route author="nczitzk" example="/topbook/overview/24" path="/topbook/overview/:id?" paramsDesc={['id,可在对应页面 URL 中找到,默认为今天看什么']} /> - -### 今天看什么 {#topbook-jin-tian-kan-shen-me} - -<Route author="nczitzk" example="/topbook/today" path="/topbook/today" /> + | category | id | + | ----------------------- | ------------------------------- | + | Tips For Adult Students | tips-for-adult-students-4132468 | + | Getting Your Ged | getting-your-ged-4132466 | +</details> ## TOPYS {#topys} ### 关键字 {#topys-guan-jian-zi} -<Route author="nczitzk" example="/topys" path="/topys/:keyword?" paramsDesc={['关键字,可在对应结果页的 URL 中找到']}> - | 创意 | 设计 | 商业 | 艺术 | 文化 | 科技 | - | ---- | ---- | ---- | ---- | ---- | ---- | -</Route> +<Route namespace="topys" data={{"path":"/:keyword?","categories":["new-media"],"example":"/topys","parameters":{"keyword":"关键字,可在对应结果页的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["topys.cn/search/:keyword","topys.cn/"]},"name":"关键字","maintainers":["nczitzk"],"description":"| 创意 | 设计 | 商业 | 艺术 | 文化 | 科技 |\n | ---- | ---- | ---- | ---- | ---- | ---- |","location":"index.ts"}} /> -## Tribal Football {#tribal-football} - -### Latest News {#tribal-football-latest-news} - -<Route author="Rongronggg9" example="/tribalfootball" path="/tribalfootball" /> +| 创意 | 设计 | 商业 | 艺术 | 文化 | 科技 | +| ---- | ---- | ---- | ---- | ---- | ---- | ## UNTAG {#untag} -### 时间线 {#untag-shi-jian-xian} - -<Route author="nczitzk" example="/utgd/timeline" path="/utgd/timeline" /> - ### 分类 {#untag-fen-lei} -<Route author="nczitzk" example="/utgd/method" path="/utgd/:category?" paramsDesc={['分类,可在对应分类页的 URL 中找到,默认为方法']}> - | 方法 | 观点 | - | ------ | ------- | - | method | opinion | -</Route> +<Route namespace="utgd" data={{"path":"/:category?","categories":["new-media"],"example":"/utgd/method","parameters":{"category":"分类,可在对应分类页的 URL 中找到,默认为方法"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["utgd.net/category/s/:category","utgd.net/"],"target":"/:category"},"name":"分类","maintainers":["nczitzk"],"description":"| 方法 | 观点 |\n | ------ | ------- |\n | method | opinion |","location":"category.ts"}} /> + +| 方法 | 观点 | +| ------ | ------- | +| method | opinion | + +### 时间线 {#untag-shi-jian-xian} + +<Route namespace="utgd" data={{"path":"/timeline","categories":["new-media"],"example":"/utgd/timeline","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["utgd.net/"]},"name":"时间线","maintainers":["nczitzk"],"url":"utgd.net/","location":"timeline.ts"}} /> ### 专题 {#untag-zhuan-ti} -<Route author="nczitzk" example="/utgd/topic/在线阅读专栏" path="/utgd/topic/:topic?" paramsDesc={['专题,默认为在线阅读专栏']}> - | 在线阅读专栏 | 卡片笔记专题 | - | ------------ | ------------ | +<Route namespace="utgd" data={{"path":"/topic/:topic?","categories":["new-media"],"example":"/utgd/topic/在线阅读专栏","parameters":{"topic":"专题,默认为在线阅读专栏"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["utgd.net/topic","utgd.net/"],"target":"/topic/:topic"},"name":"专题","maintainers":["nczitzk"],"url":"utgd.net/topic","description":"| 在线阅读专栏 | 卡片笔记专题 |\n | ------------ | ------------ |\n\n 更多专栏请见 [专题广场](https://utgd.net/topic)","location":"topic.ts"}} /> - 更多专栏请见 [专题广场](https://utgd.net/topic) -</Route> +| 在线阅读专栏 | 卡片笔记专题 | +| ------------ | ------------ | -## Uwants {#uwants} - -### 版塊 {#uwants-ban-kuai} - -<Route author="nczitzk" example="/uwants/1520" path="/uwants/:fid" paramsDesc={['fid,可在对应板块页的 URL 中找到']} anticrawler="1" /> - -## Vulture {#vulture} - -### Sub-site {#vulture-sub-site} - -<Route author="loganrockmore" example="/vulture/movies" path="/vulture/:type/:excludetags?" paramsDesc={['The sub-site name', 'Comma-delimited list of tags. If an article includes one of these tags, it will be excluded from the RSS feed.']}> - Supported sub-sites: - - | TV | Movies | Comedy | Music | TV Recaps | Books | Theater | Art | Awards | Video | - | -- | ------ | ------ | ----- | --------- | ----- | ------- | --- | ------ | ----- | - | tv | movies | comedy | music | tvrecaps | books | theater | art | awards | video | -</Route> - -## Web3Caff {#web3caff} - -### 发现 {#web3caff-fa-xian} - -<Route author="nczitzk" example="/web3caff" path="/web3caff/:path?" paramsDesc={['路径,默认为首页']}> - :::tip - 路径处填写对应页面 URL 中 `https://web3caff.com/` 后的字段。下面是一个例子。 - - 若订阅 [叙事 - Web3Caff](https://web3caff.com/zh/archives/category/news_zh) 则将对应页面 URL `https://web3caff.com/zh/archives/category/news_zh` 中 `https://web3caff.com/` 后的字段 `zh/archives/category/news_zh` 作为路径填入。此时路由为 [`/web3caff/zh/archives/category/news_zh`](https://rsshub.app/web3caff/zh/archives/category/news_zh) - ::: -</Route> - -## World Happiness {#world-happiness} - -### Blog {#world-happiness-blog} - -<Route author="nczitzk" example="/worldhappiness/blog" path="/worldhappiness/blog" /> - -### Archive {#world-happiness-archive} - -<Route author="nczitzk" example="/worldhappiness/archive" path="/worldhappiness/archive" /> +更多专栏请见 [专题广场](https://utgd.net/topic) ## Yahoo {#yahoo} ### News {#yahoo-news} -<Route author="KeiLongW" example="/yahoo/news/hk/world" path="/yahoo/news/:region/:category?" paramsDesc={['Region, see the table below','Category, see the table below']}> - `Region` +<Route namespace="yahoo" data={{"path":"/news/:region/:category?","categories":["new-media"],"example":"/yahoo/news/hk/world","parameters":{"region":"Region, see the table below","category":"Category, see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yahoo.com/"]},"name":"News","maintainers":["KeiLongW"],"url":"yahoo.com/","description":"`Region`\n\n | Hong Kong | Taiwan | US |\n | --------- | ------ | -- |\n | hk | tw | en |\n\n <details>\n <summary>`Category` (Hong Kong)</summary>\n\n | 全部 | 港聞 | 兩岸國際 | 財經 | 娛樂 | 體育 | 健康 | 親子 | 副刊 |\n | -------- | --------- | -------- | -------- | ------------- | ------ | ------ | --------- | ---------- |\n | (留空) | hong-kong | world | business | entertainment | sports | health | parenting | supplement |\n </details>\n\n <details>\n <summary>`Category` (Taiwan)</summary>\n\n | 全部 | 政治 | 財經 | 娛樂 | 運動 | 社會地方 | 國際 | 生活 | 健康 | 科技 | 品味 |\n | -------- | -------- | ------- | ------------- | ------ | -------- | ----- | --------- | ------ | ---------- | ----- |\n | (留空) | politics | finance | entertainment | sports | society | world | lifestyle | health | technology | style |\n </details>\n\n <details>\n <summary>`Category` (US)</summary>\n\n | All | World | Business | Entertainment | Sports | Health |\n | ------- | ----- | -------- | ------------- | ------ | ------ |\n | (Empty) | world | business | entertainment | sports | health |\n </details>","location":"news/tw/index.ts"}} /> - | Hong Kong | Taiwan | US | - | --------- | ------ | -- | - | hk | tw | en | +`Region` - <details> - <summary>`Category` (Hong Kong)</summary> +| Hong Kong | Taiwan | US | +| --------- | ------ | -- | +| hk | tw | en | - | 全部 | 港聞 | 兩岸國際 | 財經 | 娛樂 | 體育 | 健康 | 親子 | 副刊 | - | -------- | --------- | -------- | -------- | ------------- | ------ | ------ | --------- | ---------- | - | (留空) | hong-kong | world | business | entertainment | sports | health | parenting | supplement | - </details> +<details> + <summary>`Category` (Hong Kong)</summary> - <details> - <summary>`Category` (Taiwan)</summary> + | 全部 | 港聞 | 兩岸國際 | 財經 | 娛樂 | 體育 | 健康 | 親子 | 副刊 | + | -------- | --------- | -------- | -------- | ------------- | ------ | ------ | --------- | ---------- | + | (留空) | hong-kong | world | business | entertainment | sports | health | parenting | supplement | +</details> - | 全部 | 政治 | 財經 | 娛樂 | 運動 | 社會地方 | 國際 | 生活 | 健康 | 科技 | 品味 | - | -------- | -------- | ------- | ------------- | ------ | -------- | ----- | --------- | ------ | ---------- | ----- | - | (留空) | politics | finance | entertainment | sports | society | world | lifestyle | health | technology | style | - </details> +<details> + <summary>`Category` (Taiwan)</summary> - <details> - <summary>`Category` (US)</summary> + | 全部 | 政治 | 財經 | 娛樂 | 運動 | 社會地方 | 國際 | 生活 | 健康 | 科技 | 品味 | + | -------- | -------- | ------- | ------------- | ------ | -------- | ----- | --------- | ------ | ---------- | ----- | + | (留空) | politics | finance | entertainment | sports | society | world | lifestyle | health | technology | style | +</details> - | All | World | Business | Entertainment | Sports | Health | - | ------- | ----- | -------- | ------------- | ------ | ------ | - | (Empty) | world | business | entertainment | sports | health | - </details> -</Route> +<details> + <summary>`Category` (US)</summary> -### 新聞來源 {#yahoo-xin-wen-lai-yuan} - -<Route author="TonyRL" example="/yahoo/news/provider/tw/udn.com" path="/yahoo/news/provider/:region/:providerId" paramsDesc={['地區,見下表', '新聞來源 ID,可透過下方新聞來源列表獲得']} radar="1"> - | 香港 | 台灣 | - | ---- | ---- | - | hk | tw | -</Route> + | All | World | Business | Entertainment | Sports | Health | + | ------- | ----- | -------- | ------------- | ------ | ------ | + | (Empty) | world | business | entertainment | sports | health | +</details> ### 新聞來源列表 {#yahoo-xin-wen-lai-yuan-lie-biao} -<Route author="TonyRL" example="/yahoo/news/providers/tw" path="/yahoo/news/providers/:region" paramsDesc={['地區,見上表']} /> +<Route namespace="yahoo" data={{"path":"/news/providers/:region","categories":["new-media"],"example":"/yahoo/news/providers/tw","parameters":{"region":"地區,見上表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新聞來源列表","maintainers":["TonyRL"],"location":"news/tw/provider-helper.ts"}} /> -## ZAKER {#zaker} +### 新聞來源 {#yahoo-xin-wen-lai-yuan} -### 分类 {#zaker-fen-lei} +<Route namespace="yahoo" data={{"path":"/news/provider/:region/:providerId","categories":["new-media"],"example":"/yahoo/news/provider/tw/udn.com","parameters":{"region":"地區,見下表","providerId":"新聞來源 ID,可透過下方新聞來源列表獲得"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新聞來源","maintainers":["TonyRL"],"description":"| 香港 | 台灣 |\n | ---- | ---- |\n | hk | tw |","location":"news/tw/provider.ts"}} /> -<Route author="LogicJake kt286 TonyRL" example="/zaker/channel/13" path="/zaker/channel/:id?" paramsDesc={['channel id,可在 URL 中找到,默认为 1']} /> - -### 精读 {#zaker-jing-du} - -<Route author="AlexdanerZe TonyRL" example="/zaker/focusread" path="/zaker/focusread" /> +| 香港 | 台灣 | +| ---- | ---- | +| hk | tw | ## zyw {#zyw} ### 今日热榜 {#zyw-jin-ri-re-bang} -<Route author="nczitzk" example="/zyw/hot" path="/zyw/hot/:site?" paramsDesc={['站点,见下表,默认为空,即全部']}> - :::tip - 全部站点请见 [此处](https://hot.zyw.asia/#/list) - ::: +<Route namespace="zyw" data={{"path":"/hot/:site?","categories":["new-media"],"example":"/zyw/hot","parameters":{"site":"站点,见下表,默认为空,即全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"今日热榜","maintainers":["nczitzk"],"description":":::tip\n 全部站点请见 [此处](https://hot.zyw.asia/#/list)\n :::\n\n | 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 |\n | -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- |","location":"hot.ts"}} /> - | 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 | - | -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- | -</Route> +:::tip +全部站点请见 [此处](https://hot.zyw.asia/#/list) +::: + +| 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 | +| -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- | ## 阿里研究院 {#a-li-yan-jiu-yuan} ### 资讯 {#a-li-yan-jiu-yuan-zi-xun} -<Route author="nczitzk" example="/aliresearch/information" path="/aliresearch/information/:type?" paramsDesc={['类型,见下表,默认为新闻']}> - | 新闻 | 观点 | 案例 | - | ---- | ---- | ---- | -</Route> +<Route namespace="aliresearch" data={{"path":"/information/:type?","categories":["new-media"],"example":"/aliresearch/information","parameters":{"type":"类型,见下表,默认为新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aliresearch.com/cn/information","aliresearch.com/"],"target":"/information"},"name":"资讯","maintainers":["nczitzk"],"url":"aliresearch.com/cn/information","description":"| 新闻 | 观点 | 案例 |\n | ---- | ---- | ---- |","location":"information.ts"}} /> + +| 新闻 | 观点 | 案例 | +| ---- | ---- | ---- | ## 艾莱资讯 {#ai-lai-zi-xun} ### 世界轨道交通资讯网 {#ai-lai-zi-xun-shi-jie-gui-dao-jiao-tong-zi-xun-wang} -<Route author="Rongronggg9" example="/ally/rail/hyzix/chengguijiaotong/" path="/ally/rail/:category?/:topic?" paramsDesc={['分类,可在 URL 中找到;略去则抓取首页', '话题,可在 URL 中找到;并非所有页面均有此字段']} radar="1"> - :::tip - 默认抓取前 20 条,可通过 `?limit=` 改变。 - ::: -</Route> +<Route namespace="ally" data={{"path":"/rail/:category?/:topic?","categories":["new-media"],"example":"/ally/rail/hyzix/chengguijiaotong/","parameters":{"category":"分类,可在 URL 中找到;略去则抓取首页","topic":"话题,可在 URL 中找到;并非所有页面均有此字段"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rail.ally.net.cn/","rail.ally.net.cn/html/:category?/:topic?"]},"name":"世界轨道交通资讯网","maintainers":["Rongronggg9"],"url":"rail.ally.net.cn/","description":":::tip\n 默认抓取前 20 条,可通过 `?limit=` 改变。\n :::","location":"rail.ts"}} /> -## 爱范儿 ifanr {#ai-fan-er-ifanr} - -### 爱范儿频道 {#ai-fan-er-ifanr-ai-fan-er-pin-dao} - -<Route author="HenryQW" example="/ifanr/app" path="/ifanr/:channel?" paramsDesc={['默认 app,部分频道如下']}> - - 频道为单一路径,如 `https://www.ifanr.com/coolbuy` 则为 `/ifanr/coolbuy`. - - 频道包含多重路径,如 `https://www.ifanr.com/category/intelligentcar` 则替换 `/` 为 `-` `/ifanr/category-intelligentcar`. - - | AppSolution | 玩物志 | 董车会 | - | ----------- | ------- | ----------------------- | - | app | coolbuy | category-intelligentcar | -</Route> +:::tip +默认抓取前 20 条,可通过 `?limit=` 改变。 +::: ## 白话区块链 {#bai-hua-qu-kuai-lian} -### 首页 {#bai-hua-qu-kuai-lian-shou-ye} +### 科普 {#bai-hua-qu-kuai-lian-ke-pu} -<Route author="Fatpandac" example="/hellobtc/information/latest" path="/hellobtc/information/:channel?" paramsDesc={['类型,可填 `latest` 和 `application` 及最新和应用,默认为最新']} /> +<Route namespace="hellobtc" data={{"path":"/kepu/:channel?","categories":["new-media"],"example":"/hellobtc/kepu/latest","parameters":{"channel":"类型,见下表,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"科普","maintainers":["Fatpandac"],"description":"| latest | bitcoin | ethereum | defi | inter_blockchain | mining | safety | satoshi_nakomoto | public_blockchain |\n | ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ |\n | 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 |","location":"kepu.ts"}} /> + +| latest | bitcoin | ethereum | defi | inter\_blockchain | mining | safety | satoshi\_nakomoto | public\_blockchain | +| ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ | +| 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 | ### 快讯 {#bai-hua-qu-kuai-lian-kuai-xun} -<Route author="Fatpandac" example="/hellobtc/news" path="/hellobtc/news" /> +<Route namespace="hellobtc" data={{"path":"/news","categories":["new-media"],"example":"/hellobtc/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hellobtc.com/news"]},"name":"快讯","maintainers":["Fatpandac"],"url":"hellobtc.com/news","location":"news.ts"}} /> -### 科普 {#bai-hua-qu-kuai-lian-ke-pu} +### 首页 {#bai-hua-qu-kuai-lian-shou-ye} -<Route author="Fatpandac" example="/hellobtc/kepu/latest" path="/hellobtc/kepu/:channel?" paramsDesc={['类型,见下表,默认为最新']}> - | latest | bitcoin | ethereum | defi | inter\_blockchain | mining | safety | satoshi\_nakomoto | public\_blockchain | - | ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ | - | 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 | -</Route> - -## 半月谈 {#ban-yue-tan} - -### 时事大事库 {#ban-yue-tan-shi-shi-da-shi-ku} - -<Route author="nczitzk" example="/banyuetan/byt" path="/banyuetan/byt/:time?" paramsDesc={['时间,见下表,默认为每周']}> - | 每周 | 每月 | - | ------------- | ----- | - | shishidashiku | yiyue | -</Route> +<Route namespace="hellobtc" data={{"path":"/information/:channel?","categories":["new-media"],"example":"/hellobtc/information/latest","parameters":{"channel":"类型,可填 `latest` 和 `application` 及最新和应用,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["Fatpandac"],"location":"information.ts"}} /> ## 報導者 {#bao-dao-zhe} ### 最新 {#bao-dao-zhe-zui-xin} -<Route author="emdoe" example="/twreporter/newest" path="/twreporter/newest" /> - -## 北京市科学技术协会 {#bei-jing-shi-ke-xue-ji-shu-xie-hui} - -### 通用 {#bei-jing-shi-ke-xue-ji-shu-xie-hui-tong-yong} - -<Route author="nczitzk" example="/bast/col/col31266" path="/bast/:path+" paramsDesc={['路径,默认为通知公告']} anticrawler="1"> - :::tip - 路径处填写对应页面 URL 中 `https://www.bast.net.cn/` 后的字段。下面是两个例子。 - - 若订阅 [通知公告](https://www.bast.net.cn/col/col31266) 则将对应页面 URL `https://www.bast.net.cn/col/col31266` 中 `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` 中 `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) - ::: -</Route> +<Route namespace="twreporter" data={{"path":"/newest","categories":["new-media"],"example":"/twreporter/newest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["twreporter.org/"]},"name":"最新","maintainers":["emdoe"],"url":"twreporter.org/","location":"newest.ts"}} /> ## 本地宝 {#ben-di-bao} ### 焦点资讯 {#ben-di-bao-jiao-dian-zi-xun} -<Route author="nczitzk" example="/bendibao/news/bj" path="/bendibao/news/:city" paramsDesc={['城市缩写,可在该城市页面的 URL 中找到']}> - | 城市名 | 缩写 | - | ------ | ---- | - | 北京 | bj | - | 上海 | sh | - | 广州 | gz | - | 深圳 | sz | +<Route namespace="bendibao" data={{"path":"/news/:city","categories":["new-media"],"example":"/bendibao/news/bj","parameters":{"city":"城市缩写,可在该城市页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bendibao.com/"]},"name":"焦点资讯","maintainers":["nczitzk"],"url":"bendibao.com/","description":"| 城市名 | 缩写 |\n | ------ | ---- |\n | 北京 | bj |\n | 上海 | sh |\n | 广州 | gz |\n | 深圳 | sz |\n\n 更多城市请参见 [这里](http://www.bendibao.com/city.htm)\n\n > **香港特别行政区** 和 **澳门特别行政区** 的本地宝城市页面不更新资讯。","location":"news.ts"}} /> - 更多城市请参见 [这里](http://www.bendibao.com/city.htm) +| 城市名 | 缩写 | +| ------ | ---- | +| 北京 | bj | +| 上海 | sh | +| 广州 | gz | +| 深圳 | sz | - > **香港特别行政区** 和 **澳门特别行政区** 的本地宝城市页面不更新资讯。 -</Route> +更多城市请参见 [这里](http://www.bendibao.com/city.htm) + +> **香港特别行政区** 和 **澳门特别行政区** 的本地宝城市页面不更新资讯。 ## 财富中文网 {#cai-fu-zhong-wen-wang} ### 分类 {#cai-fu-zhong-wen-wang-fen-lei} -<Route author="nczitzk" example="/fortunechina" path="/fortunechina/:category?" paramsDesc={['分类,见下表,默认为首页']}> - | 商业 | 领导力 | 科技 | 研究 | - | ------- | --------- | ---- | ------ | - | shangye | lindgaoli | keji | report | -</Route> +<Route namespace="fortunechina" data={{"path":"/:category?","categories":["new-media"],"example":"/fortunechina","parameters":{"category":"分类,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fortunechina.com/:category","fortunechina.com/"]},"name":"分类","maintainers":["nczitzk"],"description":"| 商业 | 领导力 | 科技 | 研究 |\n | ------- | --------- | ---- | ------ |\n | shangye | lindgaoli | keji | report |","location":"index.ts"}} /> + +| 商业 | 领导力 | 科技 | 研究 | +| ------- | --------- | ---- | ------ | +| shangye | lindgaoli | keji | report | ## 差评 {#cha-ping} +### 快讯 {#cha-ping-kuai-xun} + +<Route namespace="chaping" data={{"path":"/newsflash","categories":["new-media"],"example":"/chaping/newsflash","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chaping.cn/newsflash"]},"name":"快讯","maintainers":["Fatpandac"],"url":"chaping.cn/newsflash","location":"newsflash.ts"}} /> + ### 图片墙 {#cha-ping-tu-pian-qiang} -<Route author="nczitzk" example="/chaping/banner" path="/chaping/banner" /> +<Route namespace="chaping" data={{"path":"/banner","categories":["new-media"],"example":"/chaping/banner","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chaping.cn/"]},"name":"图片墙","maintainers":["nczitzk"],"url":"chaping.cn/","location":"banner.ts"}} /> ### 资讯 {#cha-ping-zi-xun} -<Route author="nczitzk" example="/chaping/news/15" path="/chaping/news/:caty?" paramsDesc={['分类,默认为全部资讯']}> - | 编号 | 分类 | - | ---- | ---------- | - | 15 | 直播 | - | 3 | 科技新鲜事 | - | 7 | 互联网槽点 | - | 5 | 趣味科技 | - | 6 | DEBUG TIME | - | 1 | 游戏 | - | 8 | 视频 | - | 9 | 公里每小时 | -</Route> +<Route namespace="chaping" data={{"path":"/news/:caty?","categories":["new-media"],"example":"/chaping/news/15","parameters":{"caty":"分类,默认为全部资讯"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"资讯","maintainers":["nczitzk"],"description":"| 编号 | 分类 |\n | ---- | ---------- |\n | 15 | 直播 |\n | 3 | 科技新鲜事 |\n | 7 | 互联网槽点 |\n | 5 | 趣味科技 |\n | 6 | DEBUG TIME |\n | 1 | 游戏 |\n | 8 | 视频 |\n | 9 | 公里每小时 |","location":"news.ts"}} /> -### 快讯 {#cha-ping-kuai-xun} - -<Route author="Fatpandac" example="/chaping/newsflash" path="/chaping/newsflash" /> - -## 抽屉新热榜 {#chou-ti-xin-re-bang} - -### 最新 {#chou-ti-xin-re-bang-zui-xin} - -<Route author="xyqfer" example="/chouti/hot" path="/chouti/:subject?" paramsDesc={['主题名称']}> - | 热榜 | 42 区 | 段子 | 图片 | 挨踢 1024 | 你问我答 | - | ---- | ----- | ----- | ---- | --------- | -------- | - | hot | news | scoff | pic | tec | ask | -</Route> - -### 最热榜 TOP10 {#chou-ti-xin-re-bang-zui-re-bang-top10} - -<Route author="DIYgod" example="/chouti/top/24" path="/chouti/top/:hour?" paramsDesc={['排行榜周期,可选 24 72 168 三种,默认 24']} /> +| 编号 | 分类 | +| ---- | ---------- | +| 15 | 直播 | +| 3 | 科技新鲜事 | +| 7 | 互联网槽点 | +| 5 | 趣味科技 | +| 6 | DEBUG TIME | +| 1 | 游戏 | +| 8 | 视频 | +| 9 | 公里每小时 | ## 创业邦 {#chuang-ye-bang} -### 资讯 {#chuang-ye-bang-zi-xun} +### 标签 {#chuang-ye-bang-biao-qian} -<Route author="nczitzk" example="/cyzone" path="/cyzone/:id?" paramsDesc={['频道 id,可在对应频道页 URL 中找到,默认为 news,即最新资讯']}> - | 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | - | ---- | ------ | ---- | ------ | ---- | - | news | 5 | 14 | 13 | 8 | - - | 海外 | 消费 | 科技 | 医疗 | 文娱 | - | ---- | ---- | ---- | ---- | ---- | - | 10 | 9 | 7 | 27 | 11 | - - | 城市 | 政策 | 特写 | 干货 | 科技股 | - | ---- | ---- | ---- | ---- | ------ | - | 16 | 15 | 6 | 12 | 33 | -</Route> +<Route namespace="cyzone" data={{"path":"/label/:name","categories":["new-media"],"example":"/cyzone/label/创业邦周报","parameters":{"name":"标签名称,可在对应标签页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cyzone.cn/label/:name","cyzone.cn/"]},"name":"标签","maintainers":["nczitzk"],"location":"label.ts"}} /> ### 作者 {#chuang-ye-bang-zuo-zhe} -<Route author="xyqfer nczitzk" example="/cyzone/author/1225562" path="/cyzone/author/:id" paramsDesc={['作者 id,可在对应作者页 URL 中找到']} /> - -### 标签 {#chuang-ye-bang-biao-qian} - -<Route author="LogicJake nczitzk" example="/cyzone/label/创业邦周报" path="/cyzone/label/:name" paramsDesc={['标签名称,可在对应标签页 URL 中找到']} /> +<Route namespace="cyzone" data={{"path":"/author/:id","categories":["new-media"],"example":"/cyzone/author/1225562","parameters":{"id":"作者 id,可在对应作者页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cyzone.cn/author/:id","cyzone.cn/"]},"name":"作者","maintainers":["nczitzk"],"location":"author.ts"}} /> ## 創新拿鐵 {#chuang-xin-na-tie} ### 分类 {#chuang-xin-na-tie-fen-lei} -<Route author="nczitzk" example="/startuplatte" path="/startuplatte/:category?" paramsDesc={['分类,见下表,默认为首頁']}> - | 首頁 | 大師智慧 | 深度分析 | 新知介紹 | - | ---- | -------- | -------- | -------- | - | | quote | analysis | trend | -</Route> +<Route namespace="startuplatte" data={{"path":"/:category?","categories":["new-media"],"example":"/startuplatte","parameters":{"category":"分类,见下表,默认为首頁"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["startuplatte.com/category/:category","startuplatte.com/"]},"name":"分类","maintainers":["nczitzk"],"description":"| 首頁 | 大師智慧 | 深度分析 | 新知介紹 |\n | ---- | -------- | -------- | -------- |\n | | quote | analysis | trend |","location":"index.ts"}} /> + +| 首頁 | 大師智慧 | 深度分析 | 新知介紹 | +| ---- | -------- | -------- | -------- | +| | quote | analysis | trend | ## 大河财立方 {#da-he-cai-li-fang} ### 新闻 {#da-he-cai-li-fang-xin-wen} -<Route author="linbuxiao" example="/dahecube" path="/dahecube/:type?" paramsDesc={['板块,见下表,默认为推荐']}> - | 推荐 | 党史 | 豫股 | 财经 | 投教 | 金融 | 科创 | 投融 | 专栏 | - | --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ | - | recommend | history | stock | business | education | finance | science | invest | column | -</Route> +<Route namespace="dahecube" data={{"path":"/:type?","categories":["new-media"],"example":"/dahecube","parameters":{"type":"板块,见下表,默认为推荐"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["linbuxiao"],"description":"| 推荐 | 党史 | 豫股 | 财经 | 投教 | 金融 | 科创 | 投融 | 专栏 |\n | --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ |\n | recommend | history | stock | business | education | finance | science | invest | column |","location":"index.ts"}} /> + +| 推荐 | 党史 | 豫股 | 财经 | 投教 | 金融 | 科创 | 投融 | 专栏 | +| --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ | +| recommend | history | stock | business | education | finance | science | invest | column | ## 得到 {#de-dao} ### 首页 {#de-dao-shou-ye} -<Route author="nczitzk" example="/dedao/list/年度日更" path="/dedao/list/:category?" paramsDesc={['分类名,默认为年度日更']} /> - -### 新闻 {#de-dao-xin-wen} - -<Route author="nczitzk" example="/dedao/news" path="/dedao/news" /> - -### 人物故事 {#de-dao-ren-wu-gu-shi} - -<Route author="nczitzk" example="/dedao/figure" path="/dedao/figure" /> - -### 视频 {#de-dao-shi-pin} - -<Route author="nczitzk" example="/dedao/video" path="/dedao/video" /> - -### 知识城邦 {#de-dao-zhi-shi-cheng-bang} - -<Route author="nczitzk" example="/dedao/knowledge" path="/dedao/knowledge/:topic?/:type?" paramsDesc={['话题 id,可在对应话题页 URL 中找到', '分享类型,`true` 指精选,`false` 指最新,默认为精选']} /> +<Route namespace="dedao" data={{"path":"/list/:category?","categories":["new-media"],"example":"/dedao/list/年度日更","parameters":{"category":"分类名,默认为年度日更"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["igetget.com/"]},"name":"首页","maintainers":["nczitzk"],"url":"igetget.com/","location":"list.ts"}} /> ### 用户主页 {#de-dao-yong-hu-zhu-ye} -<Route author="nczitzk" example="/dedao/user/VkA5OqLX4RyGxmZRNBMlwBrDaJQ9og" path="/dedao/user/:id/:type?" paramsDesc={['用户 id,可在对应用户主页 URL 中找到', '类型,见下表,默认为`0`,即动态']}> - | 动态 | 书评 | 视频 | - | ---- | ---- | ---- | - | 0 | 7 | 12 | -</Route> +<Route namespace="dedao" data={{"path":"/user/:id/:type?","categories":["new-media"],"example":"/dedao/user/VkA5OqLX4RyGxmZRNBMlwBrDaJQ9og","parameters":{"id":"用户 id,可在对应用户主页 URL 中找到","type":"类型,见下表,默认为`0`,即动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户主页","maintainers":["nczitzk"],"description":"| 动态 | 书评 | 视频 |\n | ---- | ---- | ---- |\n | 0 | 7 | 12 |","location":"user.ts"}} /> + +| 动态 | 书评 | 视频 | +| ---- | ---- | ---- | +| 0 | 7 | 12 | + +### 知识城邦 {#de-dao-zhi-shi-cheng-bang} + +<Route namespace="dedao" data={{"path":"/knowledge/:topic?/:type?","categories":["new-media"],"example":"/dedao/knowledge","parameters":{"topic":"话题 id,可在对应话题页 URL 中找到","type":"分享类型,`true` 指精选,`false` 指最新,默认为精选"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dedao.cn/knowledge/topic/:topic","dedao.cn/knowledge","dedao.cn/"]},"name":"知识城邦","maintainers":["nczitzk"],"location":"knowledge.ts"}} /> ## 电动邦 {#dian-dong-bang} ### 资讯 {#dian-dong-bang-zi-xun} -<Route author="Fatpandac" example="/diandong/news" path="/diandong/news/:cate?" paramsDesc={['分类,见下表,默认为推荐']}> - 分类 +<Route namespace="diandong" data={{"path":"/news/:cate?","categories":["new-media"],"example":"/diandong/news","parameters":{"cate":"分类,见下表,默认为推荐"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["diandong.com/news"],"target":"/news/:cate"},"name":"资讯","maintainers":["Fatpandac"],"url":"diandong.com/news","description":"分类\n\n | 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 |","location":"news.ts"}} /> - | 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 | -</Route> +分类 + +| 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 | ## 电獭少女 {#dian-ta-shao-nv} +### 当前精选主题列表 {#dian-ta-shao-nv-dang-qian-jing-xuan-zhu-ti-lie-biao} + +<Route namespace="agirls" data={{"path":"/topic_list","categories":["new-media"],"example":"/agirls/topic_list","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agirls.aotter.net/","agirls.aotter.net/topic"]},"name":"当前精选主题列表","maintainers":["TonyRL"],"url":"agirls.aotter.net/","location":"topic-list.ts"}} /> + ### 分类 {#dian-ta-shao-nv-fen-lei} -<Route author="TonyRL" example="/agirls/app" path="/agirls/:category?" paramsDesc={['分类,默认为最新文章,可在对应主题页的 URL 中找到,下表仅列出部分']} radar="1"> - | App 评测 | 手机开箱 | 笔电开箱 | 3C 周边 | 教学小技巧 | 科技情报 | - | -------- | -------- | -------- | ----------- | ---------- | -------- | - | app | phone | computer | accessories | tutorial | techlife | -</Route> +<Route namespace="agirls" data={{"path":"/:category?","categories":["new-media"],"example":"/agirls/app","parameters":{"category":"分类,默认为最新文章,可在对应主题页的 URL 中找到,下表仅列出部分"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agirls.aotter.net/posts/:category"],"target":"/:category"},"name":"分类","maintainers":["TonyRL"],"description":"| App 评测 | 手机开箱 | 笔电开箱 | 3C 周边 | 教学小技巧 | 科技情报 |\n | -------- | -------- | -------- | ----------- | ---------- | -------- |\n | app | phone | computer | accessories | tutorial | techlife |","location":"index.ts"}} /> + +| App 评测 | 手机开箱 | 笔电开箱 | 3C 周边 | 教学小技巧 | 科技情报 | +| -------- | -------- | -------- | ----------- | ---------- | -------- | +| app | phone | computer | accessories | tutorial | techlife | ### 精选主题 {#dian-ta-shao-nv-jing-xuan-zhu-ti} -<Route author="TonyRL" example="/agirls/topic/AppleWatch" path="/agirls/topic/:topic" paramsDesc={['精选主题,可通过下方精选主题列表获得']} radar="1" /> - -### 当前精选主题列表 {#dian-ta-shao-nv-dang-qian-jing-xuan-zhu-ti-lie-biao} - -<Route author="TonyRL" example="/agirls/topic_list" path="/agirls/topic_list" radar="1" /> +<Route namespace="agirls" data={{"path":"/topic/:topic","categories":["new-media"],"example":"/agirls/topic/AppleWatch","parameters":{"topic":"精选主题,可通过下方精选主题列表获得"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["agirls.aotter.net/topic/:topic"]},"name":"精选主题","maintainers":["TonyRL"],"location":"topic.ts"}} /> ## 东西智库 {#dong-xi-zhi-ku} ### 分类 {#dong-xi-zhi-ku-fen-lei} -<Route author="nczitzk" example="/dx2025" path="/dx2025/:type?/:category?" paramsDesc={['内容类别,见下表,默认为空', '行业分类,见下表,默认为空']}> - 内容类别 +<Route namespace="dx2025" data={{"path":"/:type?/:category?","categories":["new-media"],"example":"/dx2025","parameters":{"type":"内容类别,见下表,默认为空","category":"行业分类,见下表,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"内容类别\n\n | 产业观察 | 行业报告 | 政策 | 数据 |\n | -------------------- | ---------------- | ------ | ---- |\n | industry-observation | industry-reports | policy | data |\n\n 行业分类\n\n | 行业 | 行业名称 |\n | -------------------- | ----------------------------------------------------------------- |\n | 新一代信息技术 | next-generation-information-technology-industry-reports |\n | 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports |\n | 航空航天装备 | aerospace-equipment-industry-reports |\n | 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports |\n | 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports |\n | 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports |\n | 电力装备 | electric-equipment-industry-reports |\n | 农机装备 | agricultural-machinery-equipment-industry-reports |\n | 新材料 | new-material-industry-reports |\n | 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports |\n | 现代服务业 | modern-service-industry-industry-reports |\n | 制造业人才 | manufacturing-talent-industry-reports |","location":"index.ts"}} /> - | 产业观察 | 行业报告 | 政策 | 数据 | - | -------------------- | ---------------- | ------ | ---- | - | industry-observation | industry-reports | policy | data | +内容类别 - 行业分类 +| 产业观察 | 行业报告 | 政策 | 数据 | +| -------------------- | ---------------- | ------ | ---- | +| industry-observation | industry-reports | policy | data | - | 行业 | 行业名称 | - | -------------------- | ----------------------------------------------------------------- | - | 新一代信息技术 | next-generation-information-technology-industry-reports | - | 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports | - | 航空航天装备 | aerospace-equipment-industry-reports | - | 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports | - | 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports | - | 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports | - | 电力装备 | electric-equipment-industry-reports | - | 农机装备 | agricultural-machinery-equipment-industry-reports | - | 新材料 | new-material-industry-reports | - | 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports | - | 现代服务业 | modern-service-industry-industry-reports | - | 制造业人才 | manufacturing-talent-industry-reports | -</Route> +行业分类 + +| 行业 | 行业名称 | +| -------------------- | ----------------------------------------------------------------- | +| 新一代信息技术 | next-generation-information-technology-industry-reports | +| 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports | +| 航空航天装备 | aerospace-equipment-industry-reports | +| 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports | +| 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports | +| 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports | +| 电力装备 | electric-equipment-industry-reports | +| 农机装备 | agricultural-machinery-equipment-industry-reports | +| 新材料 | new-material-industry-reports | +| 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports | +| 现代服务业 | modern-service-industry-industry-reports | +| 制造业人才 | manufacturing-talent-industry-reports | ## 懂球帝 {#dong-qiu-di} @@ -2433,430 +1590,316 @@ - 可以通过头条新闻 + 参数过滤的形式获得早报、专题等内容。 ::: +### 球员新闻 {#dong-qiu-di-qiu-yuan-xin-wen} + +<Route namespace="dongqiudi" data={{"path":"/player_news/:id","categories":["new-media"],"example":"/dongqiudi/player_news/50000339","parameters":{"id":"球员 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中通过其队伍找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"球员新闻","maintainers":["HenryQW"],"location":"player-news.ts"}} /> + +### 球队新闻 {#dong-qiu-di-qiu-dui-xin-wen} + +<Route namespace="dongqiudi" data={{"path":"/team_news/:team","categories":["new-media"],"example":"/dongqiudi/team_news/50001755","parameters":{"team":"球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"球队新闻","maintainers":["HenryQW"],"location":"team-news.ts"}} /> + ### 新闻 {#dong-qiu-di-xin-wen} -<Route author="HendricksZheng" example="/dongqiudi/top_news/1" path="/dongqiudi/top_news/:id?" paramsDesc={['类别 id,不填默认头条新闻']} anticrawler="1"> - | 头条 | 深度 | 闲情 | D 站 | 中超 | 国际 | 英超 | 西甲 | 意甲 | 德甲 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 | -</Route> +<Route namespace="dongqiudi" data={{"path":"/top_news/:id?","categories":["new-media"],"example":"/dongqiudi/top_news/1","parameters":{"id":"类别 id,不填默认头条新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.dongqiudi.com/home/:id"],"target":"/top_news/:id"},"name":"新闻","maintainers":["HendricksZheng"],"description":"| 头条 | 深度 | 闲情 | D 站 | 中超 | 国际 | 英超 | 西甲 | 意甲 | 德甲 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 |","location":"top-news.ts"}} /> -### 专题 {#dong-qiu-di-zhuan-ti} - -<Route author="dxmpalb" example="/dongqiudi/special/41" path="/dongqiudi/special/:id" paramsDesc={['专题 id, 可自行通过 https://www.dongqiudi.com/special/+数字匹配']} anticrawler="1"> - | 新闻大爆炸 | 懂球帝十佳球 | 懂球帝本周 MVP | - | ---------- | ------------ | -------------- | - | 41 | 52 | 53 | -</Route> +| 头条 | 深度 | 闲情 | D 站 | 中超 | 国际 | 英超 | 西甲 | 意甲 | 德甲 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 | ### 早报 {#dong-qiu-di-zao-bao} -<Route author="HenryQW" example="/dongqiudi/daily" path="/dongqiudi/daily" anticrawler="1" /> +<Route namespace="dongqiudi" data={{"path":"/daily","categories":["new-media"],"example":"/dongqiudi/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.dongqiudi.com/special/48"]},"name":"早报","maintainers":["HenryQW"],"url":"www.dongqiudi.com/special/48","description":":::tip\n部分球队和球员可能会有两个 id, 正确 id 应该由 `5000` 开头.\n:::","location":"daily.ts"}} /> :::tip 部分球队和球员可能会有两个 id, 正确 id 应该由 `5000` 开头. ::: +### 专题 {#dong-qiu-di-zhuan-ti} + +<Route namespace="dongqiudi" data={{"path":"/special/:id","categories":["new-media"],"example":"/dongqiudi/special/41","parameters":{"id":"专题 id, 可自行通过 https://www.dongqiudi.com/special/+数字匹配"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.dongqiudi.com/special/:id"]},"name":"专题","maintainers":["dxmpalb"],"description":"| 新闻大爆炸 | 懂球帝十佳球 | 懂球帝本周 MVP |\n | ---------- | ------------ | -------------- |\n | 41 | 52 | 53 |","location":"special.ts"}} /> + +| 新闻大爆炸 | 懂球帝十佳球 | 懂球帝本周 MVP | +| ---------- | ------------ | -------------- | +| 41 | 52 | 53 | + ### 足球赛果 {#dong-qiu-di-zu-qiu-sai-guo} -<Route author="HenryQW" example="/dongqiudi/result/50001755" path="/dongqiudi/result/:team" paramsDesc={['球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到']} anticrawler="1" /> - -### 球队新闻 {#dong-qiu-di-qiu-dui-xin-wen} - -<Route author="HenryQW" example="/dongqiudi/team_news/50001755" path="/dongqiudi/team_news/:team" paramsDesc={['球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到']} anticrawler="1" /> - -### 球员新闻 {#dong-qiu-di-qiu-yuan-xin-wen} - -<Route author="HenryQW" example="/dongqiudi/player_news/50000339" path="/dongqiudi/player_news/:id" paramsDesc={['球员 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中通过其队伍找到']} anticrawler="1" /> - -## 端传媒 {#duan-chuan-mei} - -通过提取文章全文,以提供比官方源更佳的阅读体验。 - -:::warning -付费内容全文可能需要登陆获取,详情见部署页面的配置模块。 -::: - -### 专题・栏目 {#duan-chuan-mei-zhuan-ti-lan-mu} - -<Route author="prnake" example="/theinitium/channel/latest/zh-hans" path="/theinitium/channel/:type?/:language?" paramsDesc={['栏目,缺省为最新', '语言,简体`zh-hans`,繁体`zh-hant`,缺省为简体']}> - Type 栏目: - - | 最新 | 深度 | What’s New | 广场 | 科技 | 风物 | 特约 | ... | - | ------ | ------- | ---------- | ----------------- | ---------- | ------- | -------- | --- | - | latest | feature | news-brief | notes-and-letters | technology | culture | pick\_up | ... | - - 更多栏目名称可通过 [https://theinitium.com/section/special/](https://theinitium.com/section/special/) 及 [https://theinitium.com/section/hot\_channel/](https://theinitium.com/section/hot_channel/) 获取。 -</Route> - -### 话题・标签 {#duan-chuan-mei-hua-ti-biao-qian} - -<Route author="AgFlore" example="/theinitium/tags/2019_10/zh-hans" path="/theinitium/tags/:type/:language?" paramsDesc={['话题 ID,可从话题页 URL 中获取,如 `https://theinitium.com/tags/2019_10/`', '语言,简体`zh-hans`,繁体`zh-hant`,缺省为简体']} /> - -### 作者 {#duan-chuan-mei-zuo-zhe} - -<Route author="AgFlore" example="/theinitium/author/ninghuilulu/zh-hans" path="/theinitium/author/:type/:language?" paramsDesc={['作者 ID,可从作者主页 URL 中获取,如`https://theinitium.com/author/ninghuilulu/`','语言,简体`zh-hans`,繁体`zh-hant`,缺省为简体']} /> - -### 个人订阅追踪动态 {#duan-chuan-mei-ge-ren-ding-yue-zhui-zong-dong-tai} - -<Route author="AgFlore" example="/theinitium/follow/articles/zh-hans" path="/theinitium/follow/articles/:language?" paramsDesc={['语言,简体`zh-hans`,繁体`zh-hant`,缺省为简体']} configRequired="1"> - :::warning - 需要自建,详情见部署页面的配置模块。 - ::: -</Route> - -## 多知网 {#duo-zhi-wang} - -### 首页 {#duo-zhi-wang-shou-ye} - -<Route author="WenryXu" example="/duozhi" path="/duozhi" /> +<Route namespace="dongqiudi" data={{"path":"/result/:team","categories":["new-media"],"example":"/dongqiudi/result/50001755","parameters":{"team":"球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"足球赛果","maintainers":["HenryQW"],"location":"result.ts"}} /> ## 樊登读书 {#fan-deng-du-shu} ### 樊登福州运营中心 {#fan-deng-du-shu-fan-deng-fu-zhou-yun-ying-zhong-xin} -<Route author="Fatpandac" example="/dushu/fuzhou" path="/dushu/fuzhou" /> +<Route namespace="dushu" data={{"path":"/fuzhou","categories":["new-media"],"example":"/dushu/fuzhou","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.dushu365.com*"]},"name":"樊登福州运营中心","maintainers":["Fatpandac"],"url":"www.dushu365.com*","location":"fuzhou/index.ts"}} /> ## 仮面ライダ {#fan-mian-%E3%83%A9%E3%82%A4%E3%83%80} ### 最新情報 {#fan-mian-%E3%83%A9%E3%82%A4%E3%83%80-zui-xin-qing-bao} -<Route author="nczitzk" example="/kamen-rider-official/news" path="/kamen-rider-official/news/:category?" paramsDesc={['Category, see below, すべて by default']} radar="1"> - | Category | - | -------------------------------------- | - | すべて | - | テレビ | - | 映画・V シネマ等 | - | Blu-ray・DVD、配信等 | - | 20 作記念グッズ・東映 EC 商品 | - | 石ノ森章太郎生誕 80 周年記念商品 | - | 玩具・カード | - | 食品・飲料・菓子 | - | 子供生活雑貨 | - | アパレル・大人向け雑貨 | - | フィギュア・ホビー・一番くじ・プライズ | - | ゲーム・デジタル | - | 雑誌・書籍・漫画 | - | 音楽 | - | 映像 | - | イベント | - | ホテル・レストラン等 | - | キャンペーン・タイアップ等 | - | その他 | - | KAMEN RIDER STORE | - | THE 鎧武祭り | - | 鎧武外伝 | - | 仮面ライダーリバイス | - | ファイナルステージ | - | THE50 周年展 | - | 風都探偵 | - | 仮面ライダーギーツ | - | 仮面ライダーアウトサイダーズ | - | 仮面ライダーガッチャード | - | 仮面ライダー BLACK SUN | -</Route> +<Route namespace="kamen-rider-official" data={{"path":"/news/:category?","categories":["new-media"],"example":"/kamen-rider-official/news","parameters":{"category":"Category, see below, すべて by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新情報","maintainers":["nczitzk"],"description":"| Category |\n | -------------------------------------- |\n | すべて |\n | テレビ |\n | 映画・V シネマ等 |\n | Blu-ray・DVD、配信等 |\n | 20 作記念グッズ・東映 EC 商品 |\n | 石ノ森章太郎生誕 80 周年記念商品 |\n | 玩具・カード |\n | 食品・飲料・菓子 |\n | 子供生活雑貨 |\n | アパレル・大人向け雑貨 |\n | フィギュア・ホビー・一番くじ・プライズ |\n | ゲーム・デジタル |\n | 雑誌・書籍・漫画 |\n | 音楽 |\n | 映像 |\n | イベント |\n | ホテル・レストラン等 |\n | キャンペーン・タイアップ等 |\n | その他 |\n | KAMEN RIDER STORE |\n | THE 鎧武祭り |\n | 鎧武外伝 |\n | 仮面ライダーリバイス |\n | ファイナルステージ |\n | THE50 周年展 |\n | 風都探偵 |\n | 仮面ライダーギーツ |\n | 仮面ライダーアウトサイダーズ |\n | 仮面ライダーガッチャード |\n | 仮面ライダー BLACK SUN |","location":"news.ts"}} /> + +| Category | +| -------------------------------------- | +| すべて | +| テレビ | +| 映画・V シネマ等 | +| Blu-ray・DVD、配信等 | +| 20 作記念グッズ・東映 EC 商品 | +| 石ノ森章太郎生誕 80 周年記念商品 | +| 玩具・カード | +| 食品・飲料・菓子 | +| 子供生活雑貨 | +| アパレル・大人向け雑貨 | +| フィギュア・ホビー・一番くじ・プライズ | +| ゲーム・デジタル | +| 雑誌・書籍・漫画 | +| 音楽 | +| 映像 | +| イベント | +| ホテル・レストラン等 | +| キャンペーン・タイアップ等 | +| その他 | +| KAMEN RIDER STORE | +| THE 鎧武祭り | +| 鎧武外伝 | +| 仮面ライダーリバイス | +| ファイナルステージ | +| THE50 周年展 | +| 風都探偵 | +| 仮面ライダーギーツ | +| 仮面ライダーアウトサイダーズ | +| 仮面ライダーガッチャード | +| 仮面ライダー BLACK SUN | ## 封面新闻 {#feng-mian-xin-wen} ### 频道 {#feng-mian-xin-wen-pin-dao} -<Route author="yuxinliu-alex" example="/thecover/channel/3560" path="/thecover/channel/:id?" paramsDesc={['对应id,可在频道链接中获取,默认为3892']}> - | 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 | - | ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ | - | 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 | -</Route> +<Route namespace="thecover" data={{"path":"/channel/:id?","categories":["new-media"],"example":"/thecover/channel/3560","parameters":{"id":"对应id,可在频道链接中获取,默认为3892"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道","maintainers":["yuxinliu-alex"],"description":"| 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 |\n | ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ |\n | 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 |","location":"channel.ts"}} /> + +| 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 | +| ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ | +| 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 | ## 風傳媒 {#feng-chuan-mei} ### 分类 {#feng-chuan-mei-fen-lei} -<Route author="nczitzk" example="/storm" path="/storm/:category?/:id?" paramsDesc={['分类,见下表,默认为新聞總覽', '子分类 ID,可在 URL 中找到']}> - | 新聞總覽 | 地方新聞 | 歷史頻道 | 評論總覽 | - | -------- | ------------- | -------- | ----------- | - | articles | localarticles | history | all-comment | +<Route namespace="storm" data={{"path":"/:category?/:id?","categories":["new-media"],"example":"/storm","parameters":{"category":"分类,见下表,默认为新聞總覽","id":"子分类 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["storm.mg/:category/:id"]},"name":"分类","maintainers":["nczitzk"],"description":"| 新聞總覽 | 地方新聞 | 歷史頻道 | 評論總覽 |\n | -------- | ------------- | -------- | ----------- |\n | articles | localarticles | history | all-comment |\n\n :::tip\n 支持形如 `https://www.storm.mg/category/118` 的路由,即 [`/storm/category/118`](https://rsshub.app/storm/category/118)\n\n 支持形如 `https://www.storm.mg/localarticle-category/s149845` 的路由,即 [`/storm/localarticle-category/s149845`](https://rsshub.app/storm/localarticle-category/s149845)\n :::","location":"index.ts"}} /> - :::tip - 支持形如 `https://www.storm.mg/category/118` 的路由,即 [`/storm/category/118`](https://rsshub.app/storm/category/118) +| 新聞總覽 | 地方新聞 | 歷史頻道 | 評論總覽 | +| -------- | ------------- | -------- | ----------- | +| articles | localarticles | history | all-comment | - 支持形如 `https://www.storm.mg/localarticle-category/s149845` 的路由,即 [`/storm/localarticle-category/s149845`](https://rsshub.app/storm/localarticle-category/s149845) - ::: -</Route> +:::tip +支持形如 `https://www.storm.mg/category/118` 的路由,即 [`/storm/category/118`](https://rsshub.app/storm/category/118) + +支持形如 `https://www.storm.mg/localarticle-category/s149845` 的路由,即 [`/storm/localarticle-category/s149845`](https://rsshub.app/storm/localarticle-category/s149845) +::: ## 凤凰网 {#feng-huang-wang} -### 资讯 {#feng-huang-wang-zi-xun} - -<Route author="nczitzk" example="/ifeng/news" path="/ifeng/news/:path?" paramsDesc={['路径,对应分类资讯页 URL 路径,默认为空']}> - :::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-) - ::: -</Route> - ### 大风号 {#feng-huang-wang-da-feng-hao} -<Route author="Jamch" example="/ifeng/feng/2583/doc" path="/ifeng/feng/:id/:type" paramsDesc={['对应 id,可在 大风号作者页面 找到','类型,见下表']}> - | 文章 | 视频 | - | ---- | ----- | - | doc | video | -</Route> +<Route namespace="ifeng" data={{"path":"/feng/:id/:type","categories":["new-media"],"example":"/ifeng/feng/2583/doc","parameters":{"id":"对应 id,可在 大风号作者页面 找到","type":"类型,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"大风号","maintainers":["Jamch"],"description":"| 文章 | 视频 |\n | ---- | ----- |\n | doc | video |","location":"feng.ts"}} /> + +| 文章 | 视频 | +| ---- | ----- | +| doc | video | ## 福利吧 {#fu-li-ba} ### 最新 {#fu-li-ba-zui-xin} -<Route author="shinemoon" example="/fuliba/latest" path="/fuliba/latest" /> - -## 高科技行业门户 {#gao-ke-ji-hang-ye-men-hu} - -### 新闻 {#gao-ke-ji-hang-ye-men-hu-xin-wen} - -<Route author="luyuhuang" example="/ofweek/news" path="/ofweek/news" /> +<Route namespace="fuliba" data={{"path":"/latest","categories":["new-media"],"example":"/fuliba/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fuliba2023.net/"]},"name":"最新","maintainers":["shinemoon"],"url":"fuliba2023.net/","location":"latest.ts"}} /> ## 观察者网 {#guan-cha-zhe-wang} -### 头条 {#guan-cha-zhe-wang-tou-tiao} +### 个人主页文章 {#guan-cha-zhe-wang-ge-ren-zhu-ye-wen-zhang} -<Route author="nczitzk" example="/guancha/headline" path="/guancha/headline" /> - -### 首页 {#guan-cha-zhe-wang-shou-ye} - -<Route author="nczitzk Jeason0228" example="/guancha" path="/guancha/:category?" paramsDesc={['分类,见下表,默认为全部']}> - | 全部 | 评论 & 研究 | 要闻 | 风闻 | 热点新闻 | 滚动新闻 | - | ---- | ----------- | ----- | ------- | -------- | -------- | - | all | review | story | fengwen | redian | gundong | - - home = 评论 & 研究 + 要闻 + 风闻 - - others = 热点新闻 + 滚动新闻 - - :::tip - 观察者网首页左中右的三个 column 分别对应 **评论 & 研究**、**要闻**、**风闻** 三个部分。 - ::: -</Route> +<Route namespace="guancha" data={{"path":"/personalpage/:uid","categories":["new-media"],"example":"/guancha/personalpage/243983","parameters":{"uid":"用户id, 可在URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"个人主页文章","maintainers":["Jeason0228"],"location":"personalpage.ts"}} /> ### 观学院 {#guan-cha-zhe-wang-guan-xue-yuan} -<Route author="nczitzk" example="/guancha/member/recommend" path="/guancha/member/:category?" paramsDesc={['分类,见下表']}> - | 精选 | 观书堂 | 在线课 | 观学院 | - | --------- | ------ | ------- | -------- | - | recommend | books | courses | huodongs | -</Route> +<Route namespace="guancha" data={{"path":"/member/:category?","categories":["new-media"],"example":"/guancha/member/recommend","parameters":{"category":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guancha.cn/"],"target":"/:category?"},"name":"观学院","maintainers":["nczitzk"],"url":"guancha.cn/","description":"| 精选 | 观书堂 | 在线课 | 观学院 |\n | --------- | ------ | ------- | -------- |\n | recommend | books | courses | huodongs |","location":"member.ts"}} /> -### 风闻话题 {#guan-cha-zhe-wang-feng-wen-hua-ti} +| 精选 | 观书堂 | 在线课 | 观学院 | +| --------- | ------ | ------- | -------- | +| recommend | books | courses | huodongs | -<Route author="occupy5 nczitzk" example="/guancha/topic/110/1" path="/guancha/topic/:id?/:order?" paramsDesc={['话题 id,可在URL中找到,默认为全部,即为 `0`', '排序参数,见下表']}> - | 最新回复 | 最新发布 | 24 小时最热 | 3 天最热 | 7 天最热 | 3 个月最热 | 专栏文章 | - | -------- | -------- | ----------- | -------- | -------- | ---------- | -------- | - | 1 | 2 | 3 | 6 | 7 | 8 | 5 | +### 首页 {#guan-cha-zhe-wang-shou-ye} - :::tip - 仅在话题 id 为 0,即选择 全部 时,**3 个月最热**、**24 小时最热**、**3 天最热**、**7 天最热** 和 **专栏文章** 参数生效。 - ::: -</Route> +<Route namespace="guancha" data={{"path":"/:category?","categories":["new-media"],"example":"/guancha","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guancha.cn/"]},"name":"首页","maintainers":["nczitzk","Jeason0228"],"url":"guancha.cn/","description":"| 全部 | 评论 & 研究 | 要闻 | 风闻 | 热点新闻 | 滚动新闻 |\n | ---- | ----------- | ----- | ------- | -------- | -------- |\n | all | review | story | fengwen | redian | gundong |\n\n home = 评论 & 研究 + 要闻 + 风闻\n\n others = 热点新闻 + 滚动新闻\n\n :::tip\n 观察者网首页左中右的三个 column 分别对应 **评论 & 研究**、**要闻**、**风闻** 三个部分。\n :::","location":"index.ts"}} /> -### 个人主页文章 {#guan-cha-zhe-wang-ge-ren-zhu-ye-wen-zhang} +| 全部 | 评论 & 研究 | 要闻 | 风闻 | 热点新闻 | 滚动新闻 | +| ---- | ----------- | ----- | ------- | -------- | -------- | +| all | review | story | fengwen | redian | gundong | -<Route author="Jeason0228" example="/guancha/personalpage/243983" path="/guancha/personalpage/:uid" paramsDesc={['用户id, 可在URL中找到']} /> +home = 评论 & 研究 + 要闻 + 风闻 -## 观海新闻 {#guan-hai-xin-wen} +others = 热点新闻 + 滚动新闻 -### 首页 {#guan-hai-xin-wen-shou-ye} +:::tip +观察者网首页左中右的三个 column 分别对应 **评论 & 研究**、**要闻**、**风闻** 三个部分。 +::: -<Route author="TonyRL" example="/guanhai" path="/guanhai" radar="1" /> +### 头条 {#guan-cha-zhe-wang-tou-tiao} -## 广告门 {#guang-gao-men} - -### 板块 {#guang-gao-men-ban-kuai} - -<Route author="nczitzk" example="/adquan/info" path="/adquan/:type?" paramsDesc={['分类, 置空为首页']}> - | 行业观察 | 案例库 | - | -------- | -------- | - | info | creative | -</Route> +<Route namespace="guancha" data={{"path":"/headline","categories":["new-media"],"example":"/guancha/headline","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guancha.cn/GuanChaZheTouTiao","guancha.cn/"]},"name":"头条","maintainers":["nczitzk"],"url":"guancha.cn/GuanChaZheTouTiao","location":"headline.ts"}} /> ## 国家高端智库 / 综合开发研究院 {#guo-jia-gao-duan-zhi-ku-zong-he-kai-fa-yan-jiu-yuan} ### 栏目 {#guo-jia-gao-duan-zhi-ku-zong-he-kai-fa-yan-jiu-yuan-lan-mu} -<Route author="nczitzk" example="/cdi" path="/cdi/:id?" paramsDesc={['分类,见下表,默认为综研国策']}> - | 樊纲观点 | 综研国策 | 综研观察 | 综研专访 | 综研视点 | 银湖新能源 | - | -------- | -------- | -------- | -------- | -------- | ---------- | - | 102 | 152 | 150 | 153 | 154 | 151 | -</Route> +<Route namespace="cdi" data={{"path":"/:id?","categories":["new-media"],"example":"/cdi","parameters":{"id":"分类,见下表,默认为综研国策"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["nczitzk"],"description":"| 樊纲观点 | 综研国策 | 综研观察 | 综研专访 | 综研视点 | 银湖新能源 |\n | -------- | -------- | -------- | -------- | -------- | ---------- |\n | 102 | 152 | 150 | 153 | 154 | 151 |","location":"index.ts"}} /> + +| 樊纲观点 | 综研国策 | 综研观察 | 综研专访 | 综研视点 | 银湖新能源 | +| -------- | -------- | -------- | -------- | -------- | ---------- | +| 102 | 152 | 150 | 153 | 154 | 151 | ## 果壳网 {#guo-ke-wang} -### 科学人 {#guo-ke-wang-ke-xue-ren} - -<Route author="alphardex nczitzk" example="/guokr/scientific" path="/guokr/scientific" /> - ### 果壳网专栏 {#guo-ke-wang-guo-ke-wang-zhuan-lan} -<Route author="DHPO hoilc" example="/guokr/calendar" path="/guokr/:channel" paramsDesc={['专栏类别']}> - | 物种日历 | 吃货研究所 | 美丽也是技术活 | - | -------- | ---------- | -------------- | - | calendar | institute | beauty | -</Route> +<Route namespace="guokr" data={{"path":"/:channel","categories":["new-media"],"example":"/guokr/calendar","parameters":{"channel":"专栏类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guokr.com/"]},"name":"果壳网专栏","maintainers":["DHPO","hoilc"],"url":"guokr.com/","description":"| 物种日历 | 吃货研究所 | 美丽也是技术活 |\n | -------- | ---------- | -------------- |\n | calendar | institute | beauty |","location":"channel.ts"}} /> + +| 物种日历 | 吃货研究所 | 美丽也是技术活 | +| -------- | ---------- | -------------- | +| calendar | institute | beauty | + +### 科学人 {#guo-ke-wang-ke-xue-ren} + +<Route namespace="guokr" data={{"path":"/scientific","categories":["new-media"],"example":"/guokr/scientific","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guokr.com/scientific","guokr.com/"]},"name":"科学人","maintainers":["alphardex","nczitzk"],"url":"guokr.com/scientific","location":"scientific.ts"}} /> ## 后续 {#hou-xu} -### 热点 {#hou-xu-re-dian} +### Live {#hou-xu-live} -<Route author="nczitzk" example="/houxu" path="/houxu" /> +<Route namespace="houxu" data={{"path":"/lives/:id","categories":["new-media"],"example":"/houxu/lives/33899","parameters":{"id":"编号,可在对应 Live 页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["houxu.app/lives/:id","houxu.app/"]},"name":"Live","maintainers":["nczitzk"],"url":"houxu.app/","location":"lives.ts"}} /> ### 跟踪 {#hou-xu-gen-zong} -<Route author="nczitzk" example="/houxu/memory" path="/houxu/memory" /> +<Route namespace="houxu" data={{"path":"/memory","categories":["new-media"],"example":"/houxu/memory","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["houxu.app/memory","houxu.app/"]},"name":"跟踪","maintainers":["nczitzk"],"url":"houxu.app/memory","location":"memory.ts"}} /> ### 专栏 {#hou-xu-zhuan-lan} -<Route author="ciaranchen nczitzk" example="/houxu/events" path="/houxu/events" /> - -### Live {#hou-xu-live} - -<Route author="ciaranchen sanmmm nczitzk" example="/houxu/lives/33899" path="/houxu/lives/:id" paramsDesc={['编号,可在对应 Live 页面的 URL 中找到']} /> +<Route namespace="houxu" data={{"path":"/events","categories":["new-media"],"example":"/houxu/events","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["houxu.app/events","houxu.app/"]},"name":"专栏","maintainers":["nczitzk"],"url":"houxu.app/events","location":"events.ts"}} /> ## 虎嗅 {#hu-xiu} -### 资讯 {#hu-xiu-zi-xun} - -<Route author="HenryQW nczitzk" example="/huxiu/article" path="/huxiu/article" radar="1" supportBT="1" supportPodcast="1" /> - -### 频道 {#hu-xiu-pin-dao} - -<Route author="nczitzk" example="/huxiu/channel/10" path="/huxiu/channel/:id?" paramsDesc={['频道 id,可在对应频道页 URL 中找到,见下表,默认为最新']} radar="1" supportBT="1" supportPodcast="1"> - | 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 | - | ---- | -------- | -------- | ---------- | -------- | - | 10 | 21 | 106 | 103 | 105 | - - | 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | - | ---- | -------- | -------- | -------- | ---- | - | 115 | 22 | 111 | 113 | 114 | - - | 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 102 | 110 | 2 | 112 | 107 | 4 | -</Route> - ### 24 小时 {#hu-xiu-24-xiao-shi} -<Route author="nczitzk" example="/huxiu/moment" path="/huxiu/moment" radar="1" supportBT="1" supportPodcast="1" /> - -### 源流 {#hu-xiu-yuan-liu} - -<Route author="nczitzk" example="/huxiu/club/1000" path="/huxiu/club/:id?" paramsDesc={['源流 id,可在对应源流页 URL 中找到']} radar="1" supportBT="1" supportPodcast="1"> - 更多源流请参见 [源流广场](https://www.huxiu.com/club) -</Route> +<Route namespace="huxiu" data={{"path":"/moment","categories":["new-media"],"example":"/huxiu/moment","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"radar":{"source":["huxiu.com/moment"]},"name":"24 小时","maintainers":["nczitzk"],"url":"huxiu.com/moment","location":"moment.ts"}} /> ### 标签 {#hu-xiu-biao-qian} -<Route author="xyqfer HenryQW nczitzk" example="/huxiu/tag/291" path="/huxiu/tag/:id" paramsDesc={['标签 id,可在对应标签页 URL 中找到']} radar="1" supportBT="1" supportPodcast="1"> - 更多标签请参见 [标签](https://www.huxiu.com/tags) -</Route> +<Route namespace="huxiu" data={{"path":"/tag/:id","categories":["new-media"],"example":"/huxiu/tag/291","parameters":{"id":"标签 id,可在对应标签页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"name":"标签","maintainers":["xyqfer","HenryQW","nczitzk"],"description":"更多标签请参见 [标签](https://www.huxiu.com/tags)","location":"tag.ts"}} /> -### 搜索 {#hu-xiu-sou-suo} - -<Route author="xyqfer HenryQW nczitzk" example="/huxiu/search/生活" path="/huxiu/search/:keyword" paramsDesc={['关键字']} radar="1" supportBT="1" supportPodcast="1" /> - -### 作者 {#hu-xiu-zuo-zhe} - -<Route author="HenryQW nczitzk" example="/huxiu/member/29318" path="/huxiu/member/:id/:type?" paramsDesc={['用户 id,可在对应用户页 URL 中找到', '类型,可在对应用户页 URL 中找到']} radar="1" supportBT="1" supportPodcast="1"> - | TA 的文章 | TA 的 24 小时 | - | --------- | ------------- | - | article | moment | -</Route> - -### 文集 {#hu-xiu-wen-ji} - -<Route author="AlexdanerZe nczitzk" example="/huxiu/collection/212" path="/huxiu/collection/:id" paramsDesc={['文集 id,可在对应文集页 URL 中找到']} radar="1" supportBT="1" supportPodcast="1"> - 更多文集请参见 [文集](https://www.huxiu.com/collection) -</Route> +更多标签请参见 [标签](https://www.huxiu.com/tags) ### 简报 {#hu-xiu-jian-bao} -<Route author="Fatpandac nczitzk" example="/huxiu/briefcolumn/1" path="/huxiu/briefcolumn/:id" paramsDesc={['简报 id,可在对应简报页 URL 中找到']} radar="1" supportBT="1" supportPodcast="1" /> +<Route namespace="huxiu" data={{"path":"/briefcolumn/:id","categories":["new-media"],"example":"/huxiu/briefcolumn/1","parameters":{"id":"简报 id,可在对应简报页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"name":"简报","maintainers":["Fatpandac","nczitzk"],"location":"brief-column.ts"}} /> -## 互动吧 {#hu-dong-ba} +### 搜索 {#hu-xiu-sou-suo} -### 活动 {#hu-dong-ba-huo-dong} +<Route namespace="huxiu" data={{"path":"/search/:keyword","categories":["new-media"],"example":"/huxiu/search/生活","parameters":{"keyword":"关键字"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"radar":{"source":["huxiu.com/"]},"name":"搜索","maintainers":["xyqfer","HenryQW","nczitzk"],"url":"huxiu.com/","location":"search.ts"}} /> -<Route author="nczitzk" example="/hudongba/beijing/98-0-2-0-1-1" path="/hudongba/:city/:id" paramsDesc={['城市,可在选定所在城市后的页面 URL 中找到', '编号,可在选定筛选条件后的页面 URL 中找到']}> - 如例子 `/hudongba/beijing/98-0-2-0-1-1` 对应的网址 `https://www.hudongba.com/beijing/98-0-2-0-0-1` 中,`beijing` 即所在城市为北京;`98-0-2-0-0-1` 则是所选择的分类编号,指分类不限、时间不限、综合排序的所有亲子活动。 -</Route> +### 文集 {#hu-xiu-wen-ji} + +<Route namespace="huxiu" data={{"path":"/collection/:id","categories":["new-media"],"example":"/huxiu/collection/212","parameters":{"id":"文集 id,可在对应文集页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"name":"文集","maintainers":["AlexdanerZe","nczitzk"],"description":"更多文集请参见 [文集](https://www.huxiu.com/collection)","location":"collection.ts"}} /> + +更多文集请参见 [文集](https://www.huxiu.com/collection) + +### 资讯 {#hu-xiu-zi-xun} + +<Route namespace="huxiu" data={{"path":["/article","/channel/:id?"],"categories":["new-media"],"example":"/huxiu/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"radar":{"source":["huxiu.com/article"]},"name":"资讯","maintainers":["HenryQW","nczitzk"],"description":"| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 |\n | ---- | -------- | -------- | ---------- | -------- |\n | 10 | 21 | 106 | 103 | 105 |\n\n | 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 |\n | ---- | -------- | -------- | -------- | ---- |\n | 115 | 22 | 111 | 113 | 114 |\n\n | 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 102 | 110 | 2 | 112 | 107 | 4 |","url":"huxiu.com/article","location":"channel.ts"}} /> + +| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 | +| ---- | -------- | -------- | ---------- | -------- | +| 10 | 21 | 106 | 103 | 105 | + +| 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | +| ---- | -------- | -------- | -------- | ---- | +| 115 | 22 | 111 | 113 | 114 | + +| 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 102 | 110 | 2 | 112 | 107 | 4 | + +### 资讯 {#hu-xiu-zi-xun} + +<Route namespace="huxiu" data={{"path":["/article","/channel/:id?"],"categories":["new-media"],"example":"/huxiu/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"radar":{"source":["huxiu.com/article"]},"name":"资讯","maintainers":["HenryQW","nczitzk"],"description":"| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 |\n | ---- | -------- | -------- | ---------- | -------- |\n | 10 | 21 | 106 | 103 | 105 |\n\n | 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 |\n | ---- | -------- | -------- | -------- | ---- |\n | 115 | 22 | 111 | 113 | 114 |\n\n | 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 102 | 110 | 2 | 112 | 107 | 4 |","url":"huxiu.com/article","location":"channel.ts"}} /> + +| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 | +| ---- | -------- | -------- | ---------- | -------- | +| 10 | 21 | 106 | 103 | 105 | + +| 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | +| ---- | -------- | -------- | -------- | ---- | +| 115 | 22 | 111 | 113 | 114 | + +| 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 102 | 110 | 2 | 112 | 107 | 4 | ## 机核网 {#ji-he-wang} -### 分类 {#ji-he-wang-fen-lei} - -<Route author="MoguCloud" example="/gcores/category/news" path="/gcores/category/:category" paramsDesc={['分类名']} radar="1"> - | 资讯 | 视频 | 电台 | 文章 | - | ---- | ------ | ------ | -------- | - | news | videos | radios | articles | -</Route> - ### 标签 {#ji-he-wang-biao-qian} -<Route author="StevenRCE0" example="/gcores/tag/42/articles" path="/gcores/tag/:tag/:category?" paramsDesc={['标签名,可在选定标签分类页面的 URL 中找到,如视觉动物——42', '分类名']} radar="1"> - 分类名同上。 -</Route> +<Route namespace="gcores" data={{"path":"/tag/:tag/:category?","categories":["new-media"],"example":"/gcores/tag/42/articles","parameters":{"tag":"标签名,可在选定标签分类页面的 URL 中找到,如视觉动物——42","category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gcores.com/categories/:tag","gcores.com/"],"target":"/tag/:tag"},"name":"标签","maintainers":["StevenRCE0"],"description":"分类名同上。","location":"tag.ts"}} /> -### 专题文章 {#ji-he-wang-zhuan-ti-wen-zhang} - -<Route author="kudryavka1013" example="/gcores/collections/64" path="/gcores/collections/:collection" paramsDesc={['专题id,可在专题页面的 URL 中找到,如 游戏开发设计心得分享 -- 64']} radar="1" anticrawler="1" /> +分类名同上。 ### 播客 {#ji-he-wang-bo-ke} -<Route author="eternasuno" example="/gcores/radios/45" path="/gcores/radios/:category?" paramsDesc={['分类名,默认为全部,可在分类页面的 URL 中找到,如 Gadio News -- 45']} radar="1" supportPodcast="1" /> +<Route namespace="gcores" data={{"path":"/radios/:category?","categories":["new-media"],"example":"/gcores/radios/45","parameters":{"category":"分类名,默认为全部,可在分类页面的 URL 中找到,如 Gadio News -- 45"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["gcores.com/categories/:category"],"target":"/radios/:category"},"name":"播客","maintainers":["eternasuno"],"url":"gcores.com/radios","location":"radio.ts"}} /> -## 纪妖 {#ji-yao} +### 分类 {#ji-he-wang-fen-lei} -### 通用 {#ji-yao-tong-yong} +<Route namespace="gcores" data={{"path":"/category/:category","categories":["new-media"],"example":"/gcores/category/news","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gcores.com/:category"]},"name":"分类","maintainers":["MoguCloud","StevenRCE0"],"description":"| 资讯 | 视频 | 电台 | 文章 |\n | ---- | ------ | ------ | -------- |\n | news | videos | radios | articles |","location":"category.ts"}} /> -<Route author="nczitzk" example="/cbaigui" path="/cbaigui/:path+" paramsDesc={['路径,默认为首页']}> - :::tip - 若订阅 [标签:妖](https://www.cbaigui.com/post-tag/妖),网址为 [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/妖)。 +| 资讯 | 视频 | 电台 | 文章 | +| ---- | ------ | ------ | -------- | +| news | videos | radios | articles | - 若订阅 [分类:埃及](https://www.cbaigui.com/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/世界/非洲/埃及)。 +### 专题文章 {#ji-he-wang-zhuan-ti-wen-zhang} - 若订阅 [词条:白泽图](https://www.cbaigui.com/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/词条/白泽图)。 - ::: -</Route> +<Route namespace="gcores" data={{"path":"/collections/:collection","categories":["new-media"],"example":"/gcores/collections/64","parameters":{"collection":"专题id,可在专题页面的 URL 中找到,如 游戏开发设计心得分享 -- 64"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gcores.com/collections/:collection"]},"name":"专题文章","maintainers":["kudryavka1013"],"location":"collection.ts"}} /> ## 加美财经 {#jia-mei-cai-jing} ### 分类 {#jia-mei-cai-jing-fen-lei} -<Route author="nczitzk" example="/caus" path="/caus/:category?" paramsDesc={['分类,见下表,默认为全部']} radar="1"> - | 全部 | 要闻 | 商业 | 快讯 | 财富 | 生活 | - | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 1 | 2 | 3 | 8 | 6 | -</Route> +<Route namespace="caus" data={{"path":"/:category?","categories":["new-media"],"example":"/caus","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 全部 | 要闻 | 商业 | 快讯 | 财富 | 生活 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n | 0 | 1 | 2 | 3 | 8 | 6 |","location":"index.ts"}} /> + +| 全部 | 要闻 | 商业 | 快讯 | 财富 | 生活 | +| ---- | ---- | ---- | ---- | ---- | ---- | +| 0 | 1 | 2 | 3 | 8 | 6 | ## 簡訊設計 {#jian-xun-she-ji} ### 志祺七七 {#jian-xun-she-ji-zhi-qi-qi-qi} -<Route author="haukeng" example="/simpleinfo" path="/simpleinfo/:category?" radar="1" paramsDesc={['分类名']}> - | 夥伴聊聊 | 專案設計 | - | -------- | -------- | - | work | talk | +<Route namespace="simpleinfo" data={{"path":"/:category?","categories":["new-media"],"example":"/simpleinfo","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["blog.simpleinfo.cc/blog/:category"],"target":"/:category"},"name":"志祺七七","maintainers":["haukeng"],"description":"| 夥伴聊聊 | 專案設計 |\n | -------- | -------- |\n | work | talk |\n\n | 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 |\n | ---------- | ---------- | ---------- | --------------------- |\n | news | politics | society | psychology-philosophy |\n\n | 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 |\n | ---------- | ------------------ | ---------- | ------------ | ------------ |\n | science | environment-health | acg | book-sharing | other-topics |","location":"index.ts"}} /> - | 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 | - | ---------- | ---------- | ---------- | --------------------- | - | news | politics | society | psychology-philosophy | +| 夥伴聊聊 | 專案設計 | +| -------- | -------- | +| work | talk | - | 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 | - | ---------- | ------------------ | ---------- | ------------ | ------------ | - | science | environment-health | acg | book-sharing | other-topics | -</Route> +| 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 | +| ---------- | ---------- | ---------- | --------------------- | +| news | politics | society | psychology-philosophy | + +| 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 | +| ---------- | ------------------ | ---------- | ------------ | ------------ | +| science | environment-health | acg | book-sharing | other-topics | ## 健康界 {#jian-kang-jie} ### 首页 {#jian-kang-jie-shou-ye} -<Route author="qnloft" example="/cn-healthcare/index" path="/cn-healthcare/index" /> +<Route namespace="cn-healthcare" data={{"path":"/index","categories":["new-media"],"example":"/cn-healthcare/index","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cn-healthcare.com/"]},"name":"首页","maintainers":["qnloft"],"url":"cn-healthcare.com/","location":"index.ts"}} /> ## 今日热榜 {#jin-ri-re-bang} @@ -2866,2453 +1909,1092 @@ ### 榜单 {#jin-ri-re-bang-bang-dan} -<Route author="LogicJake" example="/tophub/Om4ejxvxEN" path="/tophub/:id" paramsDesc={['榜单id,可在 URL 中找到']} configRequired="1" /> +<Route namespace="tophub" data={{"path":"/:id","categories":["new-media"],"example":"/tophub/Om4ejxvxEN","parameters":{"id":"榜单id,可在 URL 中找到"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tophub.today/n/:id"]},"name":"榜单","maintainers":["LogicJake"],"location":"index.ts"}} /> ### 榜单列表 {#jin-ri-re-bang-bang-dan-lie-biao} -<Route author="akynazh" example="/tophub/list/Om4ejxvxEN" path="/tophub/list/:id" paramsDesc={['榜单id,可在 URL 中找到']} configRequired="1" /> +<Route namespace="tophub" data={{"path":"/list/:id","categories":["new-media"],"example":"/tophub/list/Om4ejxvxEN","parameters":{"id":"榜单id,可在 URL 中找到"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tophub.today/n/:id"]},"name":"榜单列表","maintainers":["akynazh"],"description":":::tip\n将榜单条目集合到一个列表中,可避免推送大量条目,更符合阅读习惯且有热度排序,推荐使用。\n:::","location":"list.ts"}} /> :::tip 将榜单条目集合到一个列表中,可避免推送大量条目,更符合阅读习惯且有热度排序,推荐使用。 ::: -## 巨潮资讯 {#ju-chao-zi-xun} - -### 公告 {#ju-chao-zi-xun-gong-gao} - -<Route author="LogicJake hillerliao laampui nczitzk" example="/cninfo/announcement/szse/000002/gssz0000002/category_ndbg_szsh" path="/cninfo/announcement/:column/:code/:orgId/:category?/:search?" paramsDesc={['szse 深圳证券交易所; sse 上海证券交易所; third 新三板; hke 港股; fund 基金', '股票或基金代码', 'orgId 组织 id', '公告分类,A 股及新三板,见下表,默认为全部', '标题关键字,默认为空']}> - column 为 szse 或 sse 时可选的 category: - - | 全部 | 年报 | 半年报 | 一季报 | 三季报 | 业绩预告 | 权益分派 | 董事会 | 监事会 | 股东大会 | 日常经营 | 公司治理 | 中介报告 | 首发 | 增发 | 股权激励 | 配股 | 解禁 | 公司债 | 可转债 | 其他融资 | 股权变动 | 补充更正 | 澄清致歉 | 风险提示 | 特别处理和退市 | 退市整理期 | - | ---- | -------------------- | --------------------- | --------------------- | --------------------- | ----------------------- | ------------------------ | --------------------- | --------------------- | -------------------- | -------------------- | -------------------- | ------------------ | ------------------ | ------------------ | -------------------- | ------------------ | ------------------ | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | ---------------------- | --------------------- | - | all | category\_ndbg\_szsh | category\_bndbg\_szsh | category\_yjdbg\_szsh | category\_sjdbg\_szsh | category\_yjygjxz\_szsh | category\_qyfpxzcs\_szsh | category\_dshgg\_szsh | category\_jshgg\_szsh | category\_gddh\_szsh | category\_rcjy\_szsh | category\_gszl\_szsh | category\_zj\_szsh | category\_sf\_szsh | category\_zf\_szsh | category\_gqjl\_szsh | category\_pg\_szsh | category\_jj\_szsh | category\_gszq\_szsh | category\_kzzq\_szsh | category\_qtrz\_szsh | category\_gqbd\_szsh | category\_bcgz\_szsh | category\_cqdq\_szsh | category\_fxts\_szsh | category\_tbclts\_szsh | category\_tszlq\_szsh | - - column 为 third 时可选的 category: - - | 全部 | 临时公告 | 定期公告 | 中介机构公告 | 持续信息披露 | 首次信息披露 | - | ---- | -------------- | -------------- | -------------- | -------------- | -------------- | - | all | category\_lsgg | category\_dqgg | category\_zjjg | category\_cxpl | category\_scpl | - - :::tip - 需要筛选多个 category 时,应使用 `;` 将多个字段连接起来。 - - 如 “年报 + 半年报” 即 `category_ndbg_szsh;category_bndbg_szsh` - ::: -</Route> - -## 卡卡洛普 {#ka-ka-luo-pu} - -### 宅宅新聞 - 分類 {#ka-ka-luo-pu-zhai-zhai-xin-wen-fen-lei} - -<Route author="TonyRL" example="/gamme/news" path="/gamme/news/:category?" paramsDesc={['分類名,可在 URL 找到,預設為 `all`']} radar="1" /> - -### 宅宅新聞 - 標籤 {#ka-ka-luo-pu-zhai-zhai-xin-wen-biao-qian} - -<Route author="TonyRL" example="/gamme/news/tag/歐派" path="/gamme/news/tag/:tag" paramsDesc={['標籤,可在 URL 找到']} radar="1" /> - -### 西斯新聞 - 分類 {#ka-ka-luo-pu-xi-si-xin-wen-fen-lei} - -<Route author="TonyRL" example="/gamme/sexynews" path="/gamme/sexynews/:category?" paramsDesc={['分類名,可在 URL 找到,預設為 `all`']} radar="1" /> - -### 西斯新聞 - 標籤 {#ka-ka-luo-pu-xi-si-xin-wen-biao-qian} - -<Route author="TonyRL" example="/gamme/sexynews/tag/歐派" path="/gamme/sexynews/tag/:tag" paramsDesc={['標籤,可在 URL 找到']} radar="1" /> - -## 科技島讀 {#ke-ji-dao-du} - -### 分類 {#ke-ji-dao-du-fen-lei} - -<Route author="nczitzk" example="/daodu" path="/daodu/:caty?" paramsDesc={['分類,默認為全部']}> - | 全部 | 文章 | Podcast | - | ---- | ------- | ------- | - | all | article | podcast | -</Route> - ## 科学网 {#ke-xue-wang} ### 精选博客 {#ke-xue-wang-jing-xuan-bo-ke} -<Route author="nczitzk" example="/sciencenet/blog" path="/sciencenet/blog/:type?/:time?/:sort?" paramsDesc={['类型,见下表,默认为推荐', '时间,见下表,默认为所有时间', '排序,见下表,默认为按发表时间排序']}> - 类型 +<Route namespace="sciencenet" data={{"path":"/blog/:type?/:time?/:sort?","categories":["new-media"],"example":"/sciencenet/blog","parameters":{"type":"类型,见下表,默认为推荐","time":"时间,见下表,默认为所有时间","sort":"排序,见下表,默认为按发表时间排序"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"精选博客","maintainers":["nczitzk"],"description":"类型\n\n | 精选 | 最新 | 热门 |\n | --------- | ---- | ---- |\n | recommend | new | hot |\n\n 时间\n\n | 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 |\n | ----------------- | -------------- | -------------- | -------------- | ---------------- |\n | 1 | 2 | 3 | 4 | 5 |\n\n 排序\n\n | 按发表时间排序 | 按评论数排序 | 按点击数排序 |\n | -------------- | ------------ | ------------ |\n | 1 | 2 | 3 |","location":"blog.ts"}} /> - | 精选 | 最新 | 热门 | - | --------- | ---- | ---- | - | recommend | new | hot | +类型 - 时间 +| 精选 | 最新 | 热门 | +| --------- | ---- | ---- | +| recommend | new | hot | - | 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 | - | ----------------- | -------------- | -------------- | -------------- | ---------------- | - | 1 | 2 | 3 | 4 | 5 | +时间 - 排序 +| 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 | +| ----------------- | -------------- | -------------- | -------------- | ---------------- | +| 1 | 2 | 3 | 4 | 5 | - | 按发表时间排序 | 按评论数排序 | 按点击数排序 | - | -------------- | ------------ | ------------ | - | 1 | 2 | 3 | -</Route> +排序 + +| 按发表时间排序 | 按评论数排序 | 按点击数排序 | +| -------------- | ------------ | ------------ | +| 1 | 2 | 3 | ### 用户博客 {#ke-xue-wang-yong-hu-bo-ke} -<Route author="nczitzk" example="/sciencenet/user/tony8310" path="/sciencenet/user/:id" paramsDesc={['用户 id,可在对用户博客页 URL 中找到']} /> +<Route namespace="sciencenet" data={{"path":"/user/:id","categories":["new-media"],"example":"/sciencenet/user/tony8310","parameters":{"id":"用户 id,可在对用户博客页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["blog.sciencenet.cn/u/:id","blog.sciencenet.cn/"]},"name":"用户博客","maintainers":["nczitzk"],"location":"user.ts"}} /> ## 快科技 {#kuai-ke-ji} -### 最新 {#kuai-ke-ji-zui-xin} - -<Route author="kt286 nczitzk" example="/mydrivers/new" path="/mydrivers/new" radar="1" /> - -### 热门 {#kuai-ke-ji-re-men} - -<Route author="nczitzk" example="/mydrivers/hot" path="/mydrivers/hot" radar="1" /> - -### 发布会 {#kuai-ke-ji-fa-bu-hui} - -<Route author="nczitzk" example="/mydrivers/zhibo" path="/mydrivers/zhibo" radar="1" /> - ### 排行 {#kuai-ke-ji-pai-hang} -<Route author="nczitzk" example="/mydrivers/rank" path="/mydrivers/rank/:range?" paramsDesc={['时间范围,见下表,默认为24小时最热']} radar="1"> - | 24 小时最热 | 本周最热 | 本月最热 | - | ----------- | -------- | -------- | - | 0 | 1 | 2 | -</Route> +<Route namespace="mydrivers" data={{"path":"/rank/:range?","categories":["new-media"],"example":"/mydrivers/rank","parameters":{"range":"时间范围,见下表,默认为24小时最热"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.mydrivers.com/newsclass.aspx"],"target":"/rank"},"name":"排行","maintainers":["nczitzk"],"url":"m.mydrivers.com/newsclass.aspx","description":"| 24 小时最热 | 本周最热 | 本月最热 |\n | ----------- | -------- | -------- |\n | 0 | 1 | 2 |","location":"rank.ts"}} /> -### 分类 {#kuai-ke-ji-fen-lei} - -<Route author="nczitzk" example="/mydrivers/bcid/801" path="/mydrivers/:category?" paramsDesc={['分类,见下表,默认为最新']} radar="1"> - #### 板块 - - | 电脑 | 手机 | 汽车 | 业界 | 游戏 | - | -------- | -------- | -------- | -------- | -------- | - | bcid/801 | bcid/802 | bcid/807 | bcid/803 | bcid/806 | - - #### 话题 - - | 科学 | 排行 | 评测 | 一图 | - | -------- | -------- | -------- | -------- | - | tid/1000 | tid/1001 | tid/1002 | tid/1003 | - - #### 品牌 - - | 安卓 | 阿里 | 微软 | 百度 | PS5 | Xbox | 华为 | - | -------- | -------- | ------- | ------- | --------- | -------- | -------- | - | icid/121 | icid/270 | icid/90 | icid/67 | icid/6950 | icid/194 | icid/136 | - - | 小米 | VIVO | 三星 | 魅族 | 一加 | 比亚迪 | 小鹏 | - | --------- | -------- | -------- | -------- | -------- | -------- | --------- | - | icid/9355 | icid/288 | icid/154 | icid/140 | icid/385 | icid/770 | icid/7259 | - - | 蔚来 | 理想 | 奔驰 | 宝马 | 大众 | - | --------- | ---------- | -------- | -------- | -------- | - | icid/7318 | icid/12947 | icid/429 | icid/461 | icid/481 | - - <details> - <summary>更多分类</summary> - - | 电脑配件 | 手机之家 | 家用电器 | 网络设备 | 办公外设 | 游戏之家 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/2 | cid/3 | cid/4 | cid/5 | cid/6 | cid/7 | - - | 电脑软件 | 业内动向 | 品牌整机 | 其它资讯 | 显卡 | CPU | - | -------- | -------- | -------- | -------- | ------ | ------ | - | cid/8 | cid/9 | cid/10 | cid/11 | cid/12 | cid/13 | - - | 主板 | 内存 | 硬盘 | 机箱 | 电源 | 散热器 | - | ------ | ------ | ------ | ------ | ------ | ------ | - | cid/14 | cid/15 | cid/16 | cid/17 | cid/18 | cid/19 | - - | 光驱 | 声卡 | 键鼠 | 音箱 | 手机厂商 | 手机配件 | - | ------ | ------ | ------ | ------ | -------- | -------- | - | cid/20 | cid/21 | cid/22 | cid/23 | cid/24 | cid/25 | - - | PDA | MP3/MP4 | 摄像机 | 数码相机 | 摄像头 | 数码配件 | - | ------ | ------- | ------ | -------- | ------ | -------- | - | cid/26 | cid/27 | cid/29 | cid/30 | cid/31 | cid/32 | - - | 电子书 | 导航产品 | 录音笔 | 交换机 | 路由器 | 防火墙 | - | ------ | -------- | ------ | ------ | ------ | ------ | - | cid/33 | cid/34 | cid/35 | cid/37 | cid/38 | cid/40 | - - | 网卡 | 网络存储 | UPS | 打印机 | 复印机 | 复合机 | - | ------ | -------- | ------ | ------ | ------ | ------ | - | cid/41 | cid/43 | cid/44 | cid/45 | cid/46 | cid/47 | - - | 投影仪 | 扫描仪 | 传真机 | 电脑游戏 | 主机游戏 | 游戏主机 | - | ------ | ------ | ------ | -------- | -------- | -------- | - | cid/48 | cid/49 | cid/51 | cid/52 | cid/53 | cid/54 | - - | 掌机游戏 | 电脑驱动 | 桌面系统 | 视点人物 | 数据报告 | 科技前沿 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/55 | cid/57 | cid/58 | cid/62 | cid/63 | cid/65 | - - | 笔记本 | 台式机 | 服务器 | 一体机 | 其他 | PC 硬件 | - | ------ | ------ | ------ | ------ | ------ | ------- | - | cid/66 | cid/67 | cid/68 | cid/69 | cid/73 | cid/74 | - - | 时尚数码 | 软件驱动 | 显示器 | 音箱耳机 | 投影机 | 便携机 | - | -------- | -------- | ------ | -------- | ------- | ------- | - | cid/78 | cid/79 | cid/80 | cid/92 | cid/100 | cid/108 | - - | 手机 | MP3 | MP4 | 闪存盘 | DV 摄像机 | U 盘 | - | ------- | ------- | ------- | ------- | --------- | ------- | - | cid/109 | cid/112 | cid/113 | cid/114 | cid/115 | cid/116 | - - | GPS | 移动硬盘 | 操作系统 | 驱动 | 软件 | 软件更新 | - | ------- | -------- | -------- | ------- | ------- | -------- | - | cid/117 | cid/119 | cid/120 | cid/121 | cid/122 | cid/123 | - - | 新软推荐 | 业界动态 | 软件评测 | 软件技巧 | 游戏相关 | 驱动研究 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/124 | cid/125 | cid/126 | cid/127 | cid/128 | cid/130 | - - | 游戏试玩 | 硬件学堂 | 实用技巧 | 新软体验 | 资讯教程 | 软件横评 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/131 | cid/132 | cid/133 | cid/134 | cid/135 | cid/136 | - - | Windows | Mac | Linux | 其它 | 使用技巧 | 深入研究 | - | ------- | ------- | ------- | ------- | -------- | -------- | - | cid/137 | cid/138 | cid/139 | cid/140 | cid/141 | cid/142 | - - | 游戏机 | 显示 | 存储 | 音频 | 外设 | 数码 | - | ------- | ------- | ------- | ------- | ------- | ------- | - | cid/144 | cid/145 | cid/146 | cid/147 | cid/148 | cid/151 | - - | 网络 | 办公 | 维修 | 安全 | 聊天 | 影音 | - | ------- | ------- | ------- | ------- | ------- | ------- | - | cid/152 | cid/154 | cid/155 | cid/156 | cid/157 | cid/158 | - - | 国内 | 国外 | 办公应用 | 设计创意 | 基础知识 | 程序 | - | ------- | ------- | -------- | -------- | -------- | ------- | - | cid/159 | cid/160 | cid/161 | cid/162 | cid/163 | cid/164 | - - | 其他硬件 | 电视卡 / 盒 | 游戏体验 | 平板电视 | 企业动态 | 天文航天 | - | -------- | ----------- | -------- | -------- | -------- | -------- | - | cid/166 | cid/170 | cid/172 | cid/173 | cid/174 | cid/175 | - - | MID 设备 | 数码相框 | 耳机 | 通讯运营商 | 电视盒 | 线材线缆 | - | -------- | -------- | ------- | ---------- | ------- | -------- | - | cid/176 | cid/177 | cid/179 | cid/180 | cid/182 | cid/183 | - - | 小家电 | 网络游戏 | 行情信息 | 科学动态 | 生物世界 | 历史考古 | - | ------- | -------- | -------- | -------- | -------- | -------- | - | cid/184 | cid/186 | cid/188 | cid/192 | cid/193 | cid/194 | - - | 生科医学 | 地理自然 | 工程建筑 | 苹果手机 | 谷歌 Android | 塞班手机 | - | -------- | -------- | -------- | -------- | ------------ | -------- | - | cid/195 | cid/196 | cid/197 | cid/201 | cid/202 | cid/203 | - - | 黑莓手机 | 微软手机 | 移动处理器 | 山寨机 | 手机游戏 | 安卓应用 | - | -------- | -------- | ---------- | ------- | -------- | -------- | - | cid/204 | cid/205 | cid/206 | cid/208 | cid/209 | cid/210 | - - | 娱乐生活 | 明星全接触 | 电影影讯 | 电视节目 | 音乐戏曲 | 国际风云 | - | -------- | ---------- | -------- | -------- | -------- | -------- | - | cid/212 | cid/213 | cid/214 | cid/215 | cid/216 | cid/217 | - - | 国内传真 | 社会民生 | 生活百态 | 医药健康 | 家居尚品 | 星座旅游 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/218 | cid/219 | cid/220 | cid/221 | cid/222 | cid/223 | - - | 评论分析 | 体育竞技 | IT 八卦 | 科技动态 | 游戏动态 | 手机系统 | - | -------- | -------- | ------- | -------- | -------- | -------- | - | cid/224 | cid/225 | cid/226 | cid/227 | cid/228 | cid/232 | - - | 智能设备 | 生活电器 | 汽车相关 | 飞机航空 | 手机周边 | 网络运营商 | - | -------- | -------- | -------- | -------- | -------- | ---------- | - | cid/233 | cid/234 | cid/235 | cid/236 | cid/237 | cid/238 | - - | 平板电脑 | 苹果 iPad | 安卓平板 | Windows 平板 | 创业路上 | 网友热议 | - | -------- | --------- | -------- | ------------ | -------- | -------- | - | cid/239 | cid/240 | cid/241 | cid/242 | cid/243 | cid/244 | - - | IT 圈 | 数码周边 | 智能手环 | 智能眼镜 | 智能手表 | iOS 应用 | - | ------- | -------- | -------- | -------- | -------- | -------- | - | cid/246 | cid/247 | cid/248 | cid/249 | cid/250 | cid/251 | - - | 壁纸主题 | 游戏厂商 | 数理化学 | 科普知识 | 奇趣探险 | 汽车世界 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/252 | cid/253 | cid/254 | cid/255 | cid/256 | cid/257 | - - | 传统汽车 | 电动汽车 | 新能源汽车 | 无人驾驶汽车 | 车载系统 | 车载配件 | - | -------- | -------- | ---------- | ------------ | -------- | -------- | - | cid/258 | cid/259 | cid/260 | cid/261 | cid/262 | cid/263 | - - | 汽车厂商 | 影音动漫 | 精彩影视 | 电影动画 | 艺术设计 | 摄影达人 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/264 | cid/265 | cid/266 | cid/267 | cid/269 | cid/270 | - - | 固件 | 样张赏析 | 创意摄影 | WP 应用 | 教育未来 | 安卓手机 | - | ------- | -------- | -------- | ------- | -------- | -------- | - | cid/272 | cid/273 | cid/274 | cid/284 | cid/285 | cid/288 | - - | 智能穿戴 | 移动应用 | 电子竞技 | 游戏八卦 | 游戏评测 | 生活百科 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/290 | cid/292 | cid/297 | cid/298 | cid/299 | cid/301 | - - | 智能家居 | 智能插座 | 智能摄像头 | 智能路由器 | 智能体重秤 | 智能血压计 | - | -------- | -------- | ---------- | ---------- | ---------- | ---------- | - | cid/302 | cid/303 | cid/304 | cid/305 | cid/306 | cid/307 | - - | 空气净化器 | 智能净水器 | 电动两轮车 | 公司财报 | 智能行车记录仪 | 网络影视 | - | ---------- | ---------- | ---------- | -------- | -------------- | -------- | - | cid/308 | cid/309 | cid/310 | cid/311 | cid/312 | cid/313 | - - | 多轴无人机 | 摩托车 | 自行车 | 共享经济 | 生活周边 | 网络安全 | - | ---------- | ------- | ------- | -------- | -------- | -------- | - | cid/314 | cid/316 | cid/317 | cid/320 | cid/321 | cid/322 | - - | 考勤机 | 网络红人 | 火车高铁 | 机器人 | 其他网络 | 快递物流 | - | ------- | -------- | -------- | ------- | -------- | -------- | - | cid/323 | cid/324 | cid/325 | cid/326 | cid/327 | cid/328 | - - | 科技资讯 | 好货推荐 | 日常用品 | 餐饮零食 | 化妆品 | 运动健康 | - | -------- | -------- | -------- | -------- | ------- | -------- | - | cid/329 | cid/334 | cid/335 | cid/336 | cid/339 | cid/340 | - - | 酒水饮料 | 个人洗护 | 电子产品 | 服装鞋帽 | 会员卡 | 用户投稿 | - | -------- | -------- | -------- | -------- | ------- | -------- | - | cid/341 | cid/342 | cid/343 | cid/345 | cid/346 | cid/351 | - - | APP 投稿 | PC 投稿 | 视频快讯 | 新品开箱 | 技巧教程 | 科技快讯 | - | -------- | ------- | -------- | -------- | -------- | -------- | - | cid/352 | cid/353 | cid/354 | cid/355 | cid/356 | cid/357 | - - | 产品评测 | 人物专访 | 会议活动 | 数码影音 | 数码影像 | 游戏周边 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | cid/358 | cid/359 | cid/360 | cid/361 | cid/362 | cid/368 | - - | 汽车周边 | 个人交通 | 其他交通 | - | -------- | -------- | -------- | - | cid/369 | cid/370 | cid/371 | - </details> -</Route> - -## 快媒体 {#kuai-mei-ti} - -### 首页更新 {#kuai-mei-ti-shou-ye-geng-xin} - -<Route author="xfangbao" example="/kuai" path="/kuai" /> - -### 具体栏目更新 {#kuai-mei-ti-ju-ti-lan-mu-geng-xin} - -<Route author="xfangbao" example="/kuai/38" path="/kuai/:id" notOperational="1" /> - -具体栏目编号,去网站上看标签 - -| 网址 | 对应路由 | -| --------------------------------------------------------------------------------------------------- | -------- | -| kuai.media | /kuai | -| [www.kuai.media/portal.php?mod=list\&catid=38](http://www.kuai.media/portal.php?mod=list\&catid=38) | /kuai/38 | - -## 老司机 {#lao-si-ji} - -### 首页 {#lao-si-ji-shou-ye} - -<Route author="xyqfer" example="/laosiji/feed" path="/laosiji/feed" /> - -### 24 小时热门 {#lao-si-ji-24-xiao-shi-re-men} - -<Route author="xyqfer" example="/laosiji/hot" path="/laosiji/hot" /> - -### 节目 {#lao-si-ji-jie-mu} - -<Route author="xyqfer" example="/laosiji/hotshow/128" path="/laosiji/hotshow/:id" paramsDesc={['节目 id']} /> +| 24 小时最热 | 本周最热 | 本月最热 | +| ----------- | -------- | -------- | +| 0 | 1 | 2 | ## 雷峰网 {#lei-feng-wang} -### 最新文章 {#lei-feng-wang-zui-xin-wen-zhang} - -<Route author="vlcheng" example="/leiphone" path="/leiphone" /> - ### 业界资讯 {#lei-feng-wang-ye-jie-zi-xun} -<Route author="vlcheng" example="/leiphone/newsflash" path="/leiphone/newsflash" /> - -### 栏目 {#lei-feng-wang-lan-mu} - -<Route author="vlcheng" example="/leiphone/category/industrynews" path="/leiphone/category/:catname" paramsDesc={['网站顶部分类栏目']}> - - 主栏目 - - | 业界 | 人工智能 | 智能驾驶 | 数智化 | 金融科技 | 医疗科技 | 芯片 | 政企安全 | 智慧城市 | 行业云 | 工业互联网 | 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 | -</Route> - -## 理想生活实验室 {#li-xiang-sheng-huo-shi-yan-shi} - -### 滚动 {#li-xiang-sheng-huo-shi-yan-shi-gun-dong} - -<Route author="nczitzk" example="/toodaylab/posts" path="/toodaylab/posts" radar="1" /> - -### 最热 {#li-xiang-sheng-huo-shi-yan-shi-zui-re} - -<Route author="nczitzk" example="/toodaylab/hot" path="/toodaylab/hot" radar="1" /> - -### 专栏 {#li-xiang-sheng-huo-shi-yan-shi-zhuan-lan} - -<Route author="nczitzk" example="/toodaylab/column/299" path="/toodaylab/column/:id" paramsDesc={['专栏 id,见下表,可在对应专栏页 URL 中找到']} radar="1"> - | 专题 | 攻略 | - | ---- | ---- | - | 299 | 300 | -</Route> - -### 领域 {#li-xiang-sheng-huo-shi-yan-shi-ling-yu} - -<Route author="nczitzk" example="/toodaylab/field/308" path="/toodaylab/field/:id" paramsDesc={['领域 id,见下表,可在对应领域页 URL 中找到']} radar="1"> - | 快消 | 时尚 | 智能 | 娱乐 | 运动 | 生活 | 设计 | 出行 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 308 | 307 | 306 | 305 | 304 | 303 | 302 | 301 | -</Route> - -### 话题 {#li-xiang-sheng-huo-shi-yan-shi-hua-ti} - -<Route author="nczitzk" example="/toodaylab/topic/309" path="/toodaylab/topic/:id" paramsDesc={['话题 id,见下表,可在对应话题页 URL 中找到']} radar="1" anticrawler="1"> - | 今日消费资讯 | 实验室带你过周末 | 实验室带你过假期 | 每日一图 | 每周一书 | 实验室数字 | 新鲜社会人 | 实验室 TV | - | ------------ | ---------------- | ---------------- | -------- | -------- | ---------- | ---------- | --------- | - | 309 | 37 | 40 | 32 | 33 | 310 | 316 | 476 | -</Route> +<Route namespace="leiphone" data={{"path":"/newsflash","categories":["new-media"],"example":"/leiphone/newsflash","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["leiphone.com/"]},"name":"业界资讯","maintainers":[],"url":"leiphone.com/","location":"newsflash.ts"}} /> ## 链捕手 ChainCatcher {#lian-bu-shou-chaincatcher} -### 首页 {#lian-bu-shou-chaincatcher-shou-ye} - -<Route author="TonyRL" example="/chaincatcher" path="/chaincatcher" notOperational="1" radar="1" /> - ### 快讯 {#lian-bu-shou-chaincatcher-kuai-xun} -<Route author="TonyRL" example="/chaincatcher/news" path="/chaincatcher/news" notOperational="1" radar="1" /> +<Route namespace="chaincatcher" data={{"path":"/news","categories":["new-media"],"example":"/chaincatcher/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chaincatcher.com/news","chaincatcher.com/"]},"name":"快讯","maintainers":["TonyRL"],"url":"chaincatcher.com/news","location":"news.ts"}} /> ## 链新闻 ABMedia {#lian-xin-wen-abmedia} -### 首页最新新闻 {#lian-xin-wen-abmedia-shou-ye-zui-xin-xin-wen} - -<Route author="Fatpandac" example="/abmedia/index" path="/abmedia/index" /> - ### 类别 {#lian-xin-wen-abmedia-lei-bie} -<Route author="Fatpandac" example="/abmedia/technology-development" path="/abmedia/:category?" paramsDesc={['类别,默认为产品技术']}> - 参数可以从链接中拿到,如: +<Route namespace="abmedia" data={{"path":"/:category?","categories":["new-media"],"example":"/abmedia/technology-development","parameters":{"category":"类别,默认为产品技术"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.abmedia.io/category/:catehory"],"target":"/:category"},"name":"类别","maintainers":[],"description":"参数可以从链接中拿到,如:\n\n `https://www.abmedia.io/category/technology-development` 对应 `/abmedia/technology-development`","location":"category.ts"}} /> - `https://www.abmedia.io/category/technology-development` 对应 `/abmedia/technology-development` -</Route> +参数可以从链接中拿到,如: + +`https://www.abmedia.io/category/technology-development` 对应 `/abmedia/technology-development` + +### 首页最新新闻 {#lian-xin-wen-abmedia-shou-ye-zui-xin-xin-wen} + +<Route namespace="abmedia" data={{"path":"/index","categories":["new-media"],"example":"/abmedia/index","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.abmedia.io/"]},"name":"首页最新新闻","maintainers":[],"url":"www.abmedia.io/","location":"index.ts"}} /> ## 量子位 {#liang-zi-wei} +### 标签 {#liang-zi-wei-biao-qian} + +<Route namespace="qbitai" data={{"path":"/tag/:tag","categories":["new-media"],"example":"/qbitai/tag/大语言模型","parameters":{"tag":"标签名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qbitai.com/tag/:tag"]},"name":"标签","maintainers":["FuryMartin"],"location":"tag.ts"}} /> + ### 分类 {#liang-zi-wei-fen-lei} -<Route author="FuryMartin" example="/qbitai/category/资讯" path="/qbitai/category/:category" paramsDesc={['分类名,见下表']} /> +<Route namespace="qbitai" data={{"path":"/category/:category","categories":["new-media"],"example":"/qbitai/category/资讯","parameters":{"category":"分类名,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qbitai.com/category/:category"]},"name":"分类","maintainers":["FuryMartin"],"description":"| 资讯 | 数码 | 智能车 | 智库 | 活动 |\n| ---- | -------- | ------ | ----- | ------- |\n| 资讯 | ebandeng | auto | zhiku | huodong |","location":"category.ts"}} /> | 资讯 | 数码 | 智能车 | 智库 | 活动 | | ---- | -------- | ------ | ----- | ------- | | 资讯 | ebandeng | auto | zhiku | huodong | -### 标签 {#liang-zi-wei-biao-qian} - -<Route author="FuryMartin" example="/qbitai/tag/大语言模型" path="/qbitai/tag/:tag" paramsDesc={['标签名']} /> - -## 留园网 {#liu-yuan-wang} - -### 分站 {#liu-yuan-wang-fen-zhan} - -<Route author="nczitzk" example="/6park" path="/6park/:id?" paramsDesc={['分站,见下表,默认为史海钩沉']}> - | 婚姻家庭 | 魅力时尚 | 女性频道 | 生活百态 | 美食厨房 | 非常影音 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | life9 | life1 | chan10 | life2 | life6 | fr | - - | 车迷沙龙 | 游戏天地 | 卡通漫画 | 体坛纵横 | 运动健身 | 电脑前线 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | enter7 | enter3 | enter6 | enter5 | sport | know1 | - - | 数码家电 | 旅游风向 | 摄影部落 | 奇珍异宝 | 笑口常开 | 娱乐八卦 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | chan6 | life7 | chan8 | page | enter1 | enter8 | - - | 吃喝玩乐 | 文化长廊 | 军事纵横 | 百家论坛 | 科技频道 | 爱子情怀 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | netstar | life10 | nz | other | chan2 | chan5 | - - | 健康人生 | 博论天下 | 史海钩沉 | 网际谈兵 | 经济观察 | 谈股论金 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | life5 | bolun | chan1 | military | finance | chan4 | - - | 杂论闲侃 | 唯美乐园 | 学习园地 | 命理玄机 | 宠物情缘 | 网络歌坛 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | pk | gz1 | gz2 | gz3 | life8 | chan7 | - - | 音乐殿堂 | 情感世界 | - | -------- | -------- | - | enter4 | life3 | - - :::tip - 酷 18 文档参见 [此处](https://docs.rsshub.app/picture#ku-18) - - 禁忌书屋文档参见 [此处](https://docs.rsshub.app/routes/reading#jin-ji-shu-wu) - ::: -</Route> - -### 精华区 {#liu-yuan-wang-jing-hua-qu} - -<Route author="nczitzk" example="/6park/chan1/gold" path="/6park/:id/gold" paramsDesc={['分站,见上表']} /> - -### 搜索关键字 {#liu-yuan-wang-sou-suo-guan-jian-zi} - -<Route author="nczitzk" example="/6park/chan1/keywords/都市" path="/6park/:id/keywords/:keyword?" paramsDesc={['分站,见上表', '关键字']} /> - -### 新闻栏目 {#liu-yuan-wang-xin-wen-lan-mu} - -<Route author="nczitzk" example="/6park/news" path="/6park/news/:site?/:id?" paramsDesc={['分站,见下表,默认为 newspark', '栏目 id']}> - 分站 - - | newspark | local | - | -------- | ----- | - - :::tip - 若订阅 [时政](https://www.6parknews.com/newspark/index.php?type=1),其网址为 `https://www.6parknews.com/newspark/index.php?type=1`,其中 `newspark` 为分站,`1` 为栏目 id。 - - 若订阅 [美国](https://local.6parknews.com/index.php?type_id=1),其网址为 `https://local.6parknews.com/index.php?type_id=1`,其中 `local` 为分站,`1` 为栏目 id。 - ::: -</Route> - -### 头条精选 {#liu-yuan-wang-tou-tiao-jing-xuan} - -<Route author="nczitzk" example="/6park/news/newspark/gold" path="/6park/news/newspark/gold" /> - -### 新闻搜索 {#liu-yuan-wang-xin-wen-sou-suo} - -<Route author="nczitzk" example="/6park/news/newspark/keywords/搜索" path="/6park/news/newspark/keywords/:keyword?" paramsDesc={['关键字']} /> - ## 隆众资讯 {#long-zhong-zi-xun} ### 资讯 {#long-zhong-zi-xun-zi-xun} -<Route author="nczitzk" example="/oilchem/list/140/18263" path="/oilchem/:type?/:category?/:subCategory?" paramsDesc={['类别 id,可在对应类别页中找到,默认为首页', '分类 id,可在对应分类页中找到', '子分类 id,可在对应分类页中找到']}> - 以下是几个例子: +<Route namespace="oilchem" data={{"path":"/:type?/:category?/:subCategory?","categories":["new-media"],"example":"/oilchem/list/140/18263","parameters":{"type":"类别 id,可在对应类别页中找到,默认为首页","category":"分类 id,可在对应分类页中找到","subCategory":"子分类 id,可在对应分类页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"资讯","maintainers":["nczitzk"],"description":"以下是几个例子:\n\n [**化工**](https://chem.oilchem.net) `https://chem.oilchem.net` 中,类别 id 为 `chem`,分类 id 为空,子分类 id 为空,对应路由即为 [`/oilchem/chem`](https://rsshub.app/oilchem/list/140/18263)\n\n [**甲醇**](https://chem.oilchem.net/chemical/methanol.shtml) 的相关资讯有两个页面入口:其一 `https://chem.oilchem.net/chemical/methanol.shtml` 中,类别 id 为 `chem`,分类 id 为 `chemical`,子分类 id 为 `methanol`,对应路由即为 [`/oilchem/chem/chemical/methanol`](https://rsshub.app/oilchem/chem/chemical/methanol) 或其二 `https://list.oilchem.net/140` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为空,对应路由即为 [`/oilchem/list/140`](https://rsshub.app/oilchem/list/140);\n\n [**甲醇热点聚焦**](https://list.oilchem.net/140/18263) `https://list.oilchem.net/140/18263` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为 `18263`,对应路由即为 [`/oilchem/list/140/18263`](https://rsshub.app/oilchem/list/140/18263)","location":"index.ts"}} /> - [**化工**](https://chem.oilchem.net) `https://chem.oilchem.net` 中,类别 id 为 `chem`,分类 id 为空,子分类 id 为空,对应路由即为 [`/oilchem/chem`](https://rsshub.app/oilchem/list/140/18263) +以下是几个例子: - [**甲醇**](https://chem.oilchem.net/chemical/methanol.shtml) 的相关资讯有两个页面入口:其一 `https://chem.oilchem.net/chemical/methanol.shtml` 中,类别 id 为 `chem`,分类 id 为 `chemical`,子分类 id 为 `methanol`,对应路由即为 [`/oilchem/chem/chemical/methanol`](https://rsshub.app/oilchem/chem/chemical/methanol) 或其二 `https://list.oilchem.net/140` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为空,对应路由即为 [`/oilchem/list/140`](https://rsshub.app/oilchem/list/140); +[**化工**](https://chem.oilchem.net) `https://chem.oilchem.net` 中,类别 id 为 `chem`,分类 id 为空,子分类 id 为空,对应路由即为 [`/oilchem/chem`](https://rsshub.app/oilchem/list/140/18263) - [**甲醇热点聚焦**](https://list.oilchem.net/140/18263) `https://list.oilchem.net/140/18263` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为 `18263`,对应路由即为 [`/oilchem/list/140/18263`](https://rsshub.app/oilchem/list/140/18263) -</Route> +[**甲醇**](https://chem.oilchem.net/chemical/methanol.shtml) 的相关资讯有两个页面入口:其一 `https://chem.oilchem.net/chemical/methanol.shtml` 中,类别 id 为 `chem`,分类 id 为 `chemical`,子分类 id 为 `methanol`,对应路由即为 [`/oilchem/chem/chemical/methanol`](https://rsshub.app/oilchem/chem/chemical/methanol) 或其二 `https://list.oilchem.net/140` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为空,对应路由即为 [`/oilchem/list/140`](https://rsshub.app/oilchem/list/140); + +[**甲醇热点聚焦**](https://list.oilchem.net/140/18263) `https://list.oilchem.net/140/18263` 中,类别 id 为 `list`,分类 id 为 `140`,子分类 id 为 `18263`,对应路由即为 [`/oilchem/list/140/18263`](https://rsshub.app/oilchem/list/140/18263) ## 論盡媒體 AllAboutMacau Media {#lun-jin-mei-ti-allaboutmacau-media} ### 话题 {#lun-jin-mei-ti-allaboutmacau-media-hua-ti} -<Route author="nczitzk" example="/aamacau" path="/aamacau/:category?/:id?" paramsDesc={['分类,见下表,默认为即時報道', 'id,可在对应页面 URL 中找到,默认为空']}> - | 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 | - | ------------ | ----------- | ---------- | -------- | -------- | -------- | - | breakingnews | weeklytopic | culture | press | case | special | +<Route namespace="aamacau" data={{"path":"/:category?/:id?","categories":["new-media"],"example":"/aamacau","parameters":{"category":"分类,见下表,默认为即時報道","id":"id,可在对应页面 URL 中找到,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aamacau.com/"]},"name":"话题","maintainers":[],"url":"aamacau.com/","description":"| 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 |\n | ------------ | ----------- | ---------- | -------- | -------- | -------- |\n | breakingnews | weeklytopic | culture | press | case | special |\n\n :::tip\n 除了直接订阅分类全部文章(如 [每週專題](https://aamacau.com/topics/weeklytopic) 的对应路由为 [/aamacau/weeklytopic](https://rsshub.app/aamacau/weeklytopic)),你也可以订阅特定的专题,如 [【9-12】2021 澳門立法會選舉](https://aamacau.com/topics/【9-12】2021澳門立法會選舉) 的对应路由为 [/【9-12】2021 澳門立法會選舉](https://rsshub.app/aamacau/【9-12】2021澳門立法會選舉)。\n\n 分类中的专题也可以单独订阅,如 [新聞事件](https://aamacau.com/topics/case) 中的 [「武漢肺炎」新聞檔案](https://aamacau.com/topics/case/「武漢肺炎」新聞檔案) 对应路由为 [/case/「武漢肺炎」新聞檔案](https://rsshub.app/aamacau/case/「武漢肺炎」新聞檔案)。\n\n 同理,其他分类同上例子也可以订阅特定的单独专题。\n :::","location":"index.ts"}} /> - :::tip - 除了直接订阅分类全部文章(如 [每週專題](https://aamacau.com/topics/weeklytopic) 的对应路由为 [/aamacau/weeklytopic](https://rsshub.app/aamacau/weeklytopic)),你也可以订阅特定的专题,如 [【9-12】2021 澳門立法會選舉](https://aamacau.com/topics/【9-12】2021澳門立法會選舉) 的对应路由为 [/【9-12】2021 澳門立法會選舉](https://rsshub.app/aamacau/【9-12】2021澳門立法會選舉)。 +| 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 | +| ------------ | ----------- | ---------- | -------- | -------- | -------- | +| breakingnews | weeklytopic | culture | press | case | special | - 分类中的专题也可以单独订阅,如 [新聞事件](https://aamacau.com/topics/case) 中的 [「武漢肺炎」新聞檔案](https://aamacau.com/topics/case/「武漢肺炎」新聞檔案) 对应路由为 [/case/「武漢肺炎」新聞檔案](https://rsshub.app/aamacau/case/「武漢肺炎」新聞檔案)。 +:::tip +除了直接订阅分类全部文章(如 [每週專題](https://aamacau.com/topics/weeklytopic) 的对应路由为 [/aamacau/weeklytopic](https://rsshub.app/aamacau/weeklytopic)),你也可以订阅特定的专题,如 [【9-12】2021 澳門立法會選舉](https://aamacau.com/topics/【9-12】2021澳門立法會選舉) 的对应路由为 [/【9-12】2021 澳門立法會選舉](https://rsshub.app/aamacau/【9-12】2021澳門立法會選舉)。 - 同理,其他分类同上例子也可以订阅特定的单独专题。 - ::: -</Route> +分类中的专题也可以单独订阅,如 [新聞事件](https://aamacau.com/topics/case) 中的 [「武漢肺炎」新聞檔案](https://aamacau.com/topics/case/「武漢肺炎」新聞檔案) 对应路由为 [/case/「武漢肺炎」新聞檔案](https://rsshub.app/aamacau/case/「武漢肺炎」新聞檔案)。 + +同理,其他分类同上例子也可以订阅特定的单独专题。 +::: ## 罗戈网 {#luo-ge-wang} -### 资讯 {#luo-ge-wang-zi-xun} +### 报告 {#luo-ge-wang-bao-gao} -<Route author="nczitzk" example="/logclub/news" path="/logclub/news/:id?" paramsDesc={['资讯 id,见下表,可在对应资讯页 URL 中找到,默认为全部']} radar="1"> - | 供应链 | 快递 | 快运 / 运输 | 仓储 / 地产 | 物流综合 | 国际与跨境物流 | 科技创新 | - | ------ | ---- | ----------- | ----------- | -------- | -------------- | -------- | - | 10-16 | 11 | 30 | 9 | 32 | 114 | 107 | +<Route namespace="logclub" data={{"path":["/lc_report/:id?","/report/:id?"],"categories":["new-media"],"example":"/logclub/lc_report","parameters":{"id":"报告 id,见下表,默认为罗戈研究出品"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"报告","maintainers":["nczitzk"],"description":"| 罗戈研究出品 | 物流报告 | 绿色双碳报告 |\n | ------------ | -------------- | --------------------- |\n | Report | IndustryReport | GreenDualCarbonReport |","location":"report.ts"}} /> - | 绿色供应链 | 低碳物流 | 碳中和碳达峰 | - | ---------- | -------- | ------------ | - | 213 | 214 | 215 | -</Route> - -### 招聘 {#luo-ge-wang-zhao-pin} - -<Route author="nczitzk" example="/logclub/recruit" path="/logclub/recruit" radar="1" /> +| 罗戈研究出品 | 物流报告 | 绿色双碳报告 | +| ------------ | -------------- | --------------------- | +| Report | IndustryReport | GreenDualCarbonReport | ### 报告 {#luo-ge-wang-bao-gao} -<Route author="nczitzk" example="/logclub/lc_report" path="/logclub/lc_report/:id?" paramsDesc={['报告 id,见下表,默认为罗戈研究出品']} radar="1"> - | 罗戈研究出品 | 物流报告 | 绿色双碳报告 | - | ------------ | -------------- | --------------------- | - | Report | IndustryReport | GreenDualCarbonReport | -</Route> +<Route namespace="logclub" data={{"path":["/lc_report/:id?","/report/:id?"],"categories":["new-media"],"example":"/logclub/lc_report","parameters":{"id":"报告 id,见下表,默认为罗戈研究出品"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"报告","maintainers":["nczitzk"],"description":"| 罗戈研究出品 | 物流报告 | 绿色双碳报告 |\n | ------------ | -------------- | --------------------- |\n | Report | IndustryReport | GreenDualCarbonReport |","location":"report.ts"}} /> -### 招投标 {#luo-ge-wang-zhao-tou-biao} - -<Route author="nczitzk" example="/logclub/tender" path="/logclub/tender" radar="1" /> - -### 原创 {#luo-ge-wang-yuan-chuang} - -<Route author="nczitzk" example="/logclub/original" path="/logclub/original" radar="1" /> - -### 大企业 {#luo-ge-wang-da-qi-ye} - -<Route author="nczitzk" example="/logclub/company/14" path="/logclub/company/:id" paramsDesc={['企业 id,见下表,可在对应企业页 URL 中找到']} radar="1" anticrawler="1"> - #### 明星企业 - - | 顺丰 | 菜鸟 | 京东物流 | 德邦快递 / 德邦股份 | - | ---- | ---- | -------- | ------------------- | - | 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) 查看更多企业 -</Route> - -### 专家说 {#luo-ge-wang-zhuan-jia-shuo} - -<Route author="nczitzk" example="/logclub/columnist/articleList/27" path="/logclub/columnist/articleList/:id?" paramsDesc={['专家 id,见下表,可在对应企业页 URL 中找到']} radar="1"> - #### 精选专家 - - | 潘永刚 | 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) 查看更多专家 -</Route> - -## 妈咪帮 {#ma-mi-bang} - -### 文章 {#ma-mi-bang-wen-zhang} - -<Route author="nczitzk" example="/mamibuy" path="/mamibuy/:caty?/:age?/:sort?" paramsDesc={['分类,见下表,默认为全分類', '岁数,见下表,默认为不限', '排序,见下表,默认为最新']}> - 分类 - - | 全分類 | 小兒醫護 | 幼兒教育 | 育兒成長 | 母乳餵哺 | 寶寶飲食 | 用品交流 | 女人聊天 | 居家生活 | 親子旅遊 / 好去處 | 媽咪扮靚 | 生活閒談 | 懷孕交流 | - | ------ | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ----------------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | - - 岁数 - - | 不限 | 懷孕中 | 生產後 | 0\~1 歲 | 1\~3 歲 | 3\~6 歲 | 6 歲以上 | - | ---- | ------ | ------ | ------- | ------- | ------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | - - 排序 - - | 最新 | 推薦 | 熱門 | - | ---- | ---- | ---- | - | 1 | 2 | 3 | -</Route> +| 罗戈研究出品 | 物流报告 | 绿色双碳报告 | +| ------------ | -------------- | --------------------- | +| Report | IndustryReport | GreenDualCarbonReport | ## 麻省理工科技评论 {#ma-sheng-li-gong-ke-ji-ping-lun} ### 首页 {#ma-sheng-li-gong-ke-ji-ping-lun-shou-ye} -<Route author="EsuRt queensferryme" example="/mittrchina/index" path="/mittrchina/:type?" paramsDesc={['类型,见下表,默认为首页资讯']} radar="1"> - | 快讯 | 本周热文 | 首页资讯 | 视频 | - | -------- | -------- | -------- | ----- | - | breaking | hot | index | video | -</Route> +<Route namespace="mittrchina" data={{"path":"/:type?","categories":["new-media"],"example":"/mittrchina/index","parameters":{"type":"类型,见下表,默认为首页资讯"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"首页","maintainers":["EsuRt","queensferryme"],"description":"| 快讯 | 本周热文 | 首页资讯 | 视频 |\n | -------- | -------- | -------- | ----- |\n | breaking | hot | index | video |","location":"index.ts"}} /> + +| 快讯 | 本周热文 | 首页资讯 | 视频 | +| -------- | -------- | -------- | ----- | +| breaking | hot | index | video | ## 慢雾科技 {#man-wu-ke-ji} ### 动态 {#man-wu-ke-ji-dong-tai} -<Route author="AtlasQuan" example="/slowmist/research" path="/slowmist/:type?" paramsDesc={['分类,见下表,默认为公司新闻']}> - | 公司新闻 | 漏洞披露 | 技术研究 | - | -------- | -------- | -------- | - | news | vul | research | -</Route> +<Route namespace="slowmist" data={{"path":"/:type?","categories":["new-media"],"example":"/slowmist/research","parameters":{"type":"分类,见下表,默认为公司新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["slowmist.com/zh/news.html"]},"name":"动态","maintainers":["AtlasQuan"],"url":"slowmist.com/zh/news.html","description":"| 公司新闻 | 漏洞披露 | 技术研究 |\n | -------- | -------- | -------- |\n | news | vul | research |","location":"slowmist.ts"}} /> + +| 公司新闻 | 漏洞披露 | 技术研究 | +| -------- | -------- | -------- | +| news | vul | research | ## 貓奴日常 {#mao-nu-ri-chang} ### 分類 {#mao-nu-ri-chang-fen-lei} -<Route author="TonyRL" example="/thecatcity" path="/thecatcity/:term?" paramsDesc={['見下表,留空為全部文章']} radar="1"> - | 貓物分享 | 貓咪新聞 | 養貓大全 | 貓奴景點 | 新手養貓教學 | - | -------- | -------- | -------- | -------- | ------------ | - | 1 | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="thecatcity" data={{"path":"/:term?","categories":["new-media"],"example":"/thecatcity","parameters":{"term":"見下表,留空為全部文章"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["thecatcity.com/"],"target":""},"name":"分類","maintainers":["TonyRL"],"url":"thecatcity.com/","description":"| 貓物分享 | 貓咪新聞 | 養貓大全 | 貓奴景點 | 新手養貓教學 |\n | -------- | -------- | -------- | -------- | ------------ |\n | 1 | 2 | 3 | 4 | 5 |","location":"index.ts"}} /> -## 梅花网 {#mei-hua-wang} - -### 作品 {#mei-hua-wang-zuo-pin} - -<Route author="nczitzk" example="/meihua/shots/latest" path="/meihua/shots/:caty"> - | 最新 | 热门 | 推荐 | - | ------ | ---- | --------- | - | latest | hot | recommend | -</Route> - -### 文章 {#mei-hua-wang-wen-zhang} - -<Route author="nczitzk" example="/meihua/article/latest" path="/meihua/article/:caty"> - | 最新 | 热门 | - | ------ | ---- | - | latest | hot | -</Route> +| 貓物分享 | 貓咪新聞 | 養貓大全 | 貓奴景點 | 新手養貓教學 | +| -------- | -------- | -------- | -------- | ------------ | +| 1 | 2 | 3 | 4 | 5 | ## 梅斯医学 MedSci {#mei-si-yi-xue-medsci} ### 资讯 {#mei-si-yi-xue-medsci-zi-xun} -<Route author="nczitzk" example="/medsci" path="/medsci/:sid?/:tid?" paramsDesc={['科室,见下表,默认为推荐', '亚专业,可在对应科室页 URL 中找到,默认为该科室的全部']}> - :::tip - 下表为科室对应的 sid,若想获得 tid,可以到对应科室页面 URL 中寻找 `t_id` 字段的值,下面是一个例子: +<Route namespace="medsci" data={{"path":"/:sid?/:tid?","categories":["new-media"],"example":"/medsci","parameters":{"sid":"科室,见下表,默认为推荐","tid":"亚专业,可在对应科室页 URL 中找到,默认为该科室的全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"资讯","maintainers":["nczitzk"],"description":":::tip\n 下表为科室对应的 sid,若想获得 tid,可以到对应科室页面 URL 中寻找 `t_id` 字段的值,下面是一个例子:\n\n 如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5&t_id=277) 的 URL 为 `https://www.medsci.cn/department/details?s_id=5&t_id=277`,可以看到此时 `s_id` 对应 `sid` 的值为 5, `t_id` 对应 `tid` 的值为 277,所以可以得到路由 [`/medsci/5/277`](https://rsshub.app/medsci/5/277)\n :::\n\n | 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 |\n | ------ | ------ | ---- | ---- | ------ |\n | 2 | 6 | 4 | 12 | 17 |\n\n | 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 |\n | ------ | -------- | ------ | -------- | ------ |\n | 9 | 13 | 14 | 15 | 21 |\n\n | 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 |\n | -------- | -------- | -------- | -------- | ---- |\n | 19 | 76 | 92 | 91 | 10 |\n\n | 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 |\n | -------- | -------- | -------- | -------- | ------ |\n | 23 | 24 | 25 | 26 | 27 |\n\n | 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 |\n | ------ | -------- | ------ | -------- | ---- |\n | 28 | 29 | 304 | 95 | 11 |\n\n | 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 |\n | ---- | -------- | ------ | ---- | -------- |\n | 18 | 30 | 31 | 32 | 33 |\n\n | 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 |\n | -------- | -------- | ------ | ------ | ------ |\n | 34 | 35 | 36 | 37 | 38 |\n\n | 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 |\n | -------- | -------- | -------- | -------- | ---- |\n | 39 | 40 | 42 | 69 | 79 |\n\n | 糖尿病 | 冠心病 | 肝病 | 乳腺癌 |\n | ------ | ------ | ---- | ------ |\n | 8 | 43 | 22 | 89 |","location":"index.ts"}} /> - 如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5\&t_id=277) 的 URL 为 `https://www.medsci.cn/department/details?s_id=5&t_id=277`,可以看到此时 `s_id` 对应 `sid` 的值为 5, `t_id` 对应 `tid` 的值为 277,所以可以得到路由 [`/medsci/5/277`](https://rsshub.app/medsci/5/277) - ::: +:::tip +下表为科室对应的 sid,若想获得 tid,可以到对应科室页面 URL 中寻找 `t_id` 字段的值,下面是一个例子: - | 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 | - | ------ | ------ | ---- | ---- | ------ | - | 2 | 6 | 4 | 12 | 17 | +如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5\&t_id=277) 的 URL 为 `https://www.medsci.cn/department/details?s_id=5&t_id=277`,可以看到此时 `s_id` 对应 `sid` 的值为 5, `t_id` 对应 `tid` 的值为 277,所以可以得到路由 [`/medsci/5/277`](https://rsshub.app/medsci/5/277) +::: - | 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 | - | ------ | -------- | ------ | -------- | ------ | - | 9 | 13 | 14 | 15 | 21 | +| 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 | +| ------ | ------ | ---- | ---- | ------ | +| 2 | 6 | 4 | 12 | 17 | - | 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 | - | -------- | -------- | -------- | -------- | ---- | - | 19 | 76 | 92 | 91 | 10 | +| 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 | +| ------ | -------- | ------ | -------- | ------ | +| 9 | 13 | 14 | 15 | 21 | - | 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 | - | -------- | -------- | -------- | -------- | ------ | - | 23 | 24 | 25 | 26 | 27 | +| 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 | +| -------- | -------- | -------- | -------- | ---- | +| 19 | 76 | 92 | 91 | 10 | - | 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 | - | ------ | -------- | ------ | -------- | ---- | - | 28 | 29 | 304 | 95 | 11 | +| 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 | +| -------- | -------- | -------- | -------- | ------ | +| 23 | 24 | 25 | 26 | 27 | - | 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 | - | ---- | -------- | ------ | ---- | -------- | - | 18 | 30 | 31 | 32 | 33 | +| 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 | +| ------ | -------- | ------ | -------- | ---- | +| 28 | 29 | 304 | 95 | 11 | - | 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 | - | -------- | -------- | ------ | ------ | ------ | - | 34 | 35 | 36 | 37 | 38 | +| 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 | +| ---- | -------- | ------ | ---- | -------- | +| 18 | 30 | 31 | 32 | 33 | - | 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 | - | -------- | -------- | -------- | -------- | ---- | - | 39 | 40 | 42 | 69 | 79 | +| 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 | +| -------- | -------- | ------ | ------ | ------ | +| 34 | 35 | 36 | 37 | 38 | - | 糖尿病 | 冠心病 | 肝病 | 乳腺癌 | - | ------ | ------ | ---- | ------ | - | 8 | 43 | 22 | 89 | -</Route> +| 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 | +| -------- | -------- | -------- | -------- | ---- | +| 39 | 40 | 42 | 69 | 79 | -## 镁客网 im2maker {#mei-ke-wang-im2maker} - -### 镁客网频道 {#mei-ke-wang-im2maker-mei-ke-wang-pin-dao} - -<Route author="jin12180000" example="/im2maker/" path="/im2maker/:channel?" paramsDesc={['默认不填为 最新文章 ,频道如下']}> - | 最新文章 | 行业快讯 | 行业观察 | 镁客请讲 | 硬科技 100 人 | 投融界 | 万象 | - | -------- | -------- | -------- | -------- | ------------- | -------- | ---------- | - | 默认空 | fresh | industry | talk | intech | investor | everything | -</Route> +| 糖尿病 | 冠心病 | 肝病 | 乳腺癌 | +| ------ | ------ | ---- | ------ | +| 8 | 43 | 22 | 89 | ## 米课 {#mi-ke} ### 米课圈精华 {#mi-ke-mi-ke-quan-jing-hua} -<Route author="nczitzk" example="/imiker/ask/jinghua" path="/imiker/ask/jinghua" radar="1" /> - -## 摩点 {#mo-dian} - -### 众筹 {#mo-dian-zhong-chou} - -<Route author="nczitzk" example="/modian/zhongchou" path="/modian/zhongchou/:category?/:sort?/:status?" paramsDesc={['分类,见下表,默认为全部', '排序,见下表,默认为最新上线', '状态,见下表,默认为全部']}> - 分类 - - | 全部 | 游戏 | 动漫 | 出版 | 桌游 | - | ---- | ----- | ------ | ---------- | ---------- | - | all | games | comics | publishing | tablegames | - - | 卡牌 | 潮玩模型 | 影视 | 音乐 | 活动 | - | ----- | -------- | ---------- | ----- | ---------- | - | cards | toys | film-video | music | activities | - - | 设计 | 科技 | 食品 | 爱心通道 | 动物救助 | - | ------ | ---------- | ---- | -------- | -------- | - | design | technology | food | charity | animals | - - | 个人愿望 | 其他 | - | -------- | ------ | - | wishes | others | - - 排序 - - | 最新上线 | 金额最高 | 评论最多 | - | --------- | ---------- | ------------ | - | top\_time | top\_money | top\_comment | - - 状态 - - | 全部 | 创意 | 预热 | 众筹中 | 众筹成功 | - | ---- | ---- | ------- | ------ | -------- | - | all | idea | preheat | going | success | -</Route> - -## 摩根大通研究所 {#mo-gen-da-tong-yan-jiu-suo} - -### 新闻 {#mo-gen-da-tong-yan-jiu-suo-xin-wen} - -<Route author="howel52" example="/jpmorganchase" path="/jpmorganchase" /> - -## 木木博客 {#mu-mu-bo-ke} - -### 频道 {#mu-mu-bo-ke-pin-dao} - -<Route author="nczitzk" example="/liulinblog" path="/liulinblog/:channel?" paramsDesc={['频道 id,可在对应频道页 URL 中找到,见下表,默认为最新']} radar="1"> - | 最新 | 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 | -</Route> - -### 标签 {#mu-mu-bo-ke-biao-qian} - -<Route author="nczitzk" example="/liulinblog/tag/qukuailian" path="/liulinblog/tag/:id" paramsDesc={['标签 id,可在对应标签页 URL 中找到,见下表']} radar="1"> - | 区块链 | 小红书 | 小说项目 | 微信公众号 | 微信营销 | - | ---------- | ----------- | -------- | ---------- | -------- | - | 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 | -</Route> - -### 专题 {#mu-mu-bo-ke-zhuan-ti} - -<Route author="nczitzk" example="/liulinblog/series/xunlei" path="/liulinblog/series/:id" paramsDesc={['专题 id,可在对应标签页 URL 中找到,见下表']} radar="1"> - | 【免费速存】迅雷资源合集 | 直播带货教程 | 电商培训课程 | 拼多多运营培训 | 小红书运营 | 抖音运营 | 闲鱼运营 | 短视频运营 | - | ------------------------ | ------------ | --------------- | -------------- | ----------- | ------------- | ------------- | ----------------- | - | xunlei | zhibodaihuo | dianshangpeixun | pinduoduo | xiaohongshu | douyinyunying | xianyuyunying | duanshipinyunying | -</Route> - -### 搜索 {#mu-mu-bo-ke-sou-suo} - -<Route author="nczitzk" example="/liulinblog/search/单机游戏" path="/liulinblog/search/:keyword" paramsDesc={['关键字']} radar="1" /> - -### 60 秒读懂世界 {#mu-mu-bo-ke-60-miao-du-dong-shi-jie} - -<Route author="Fatpandac nczitzk" example="/liulinblog/kuaixun" path="/liulinblog/kuaixun" /> - -### 网络营销 {#mu-mu-bo-ke-wang-luo-ying-xiao} - -<Route author="Fatpandac nczitzk" example="/liulinblog/itnews" path="/liulinblog/itnews/:channel?" paramsDesc={['频道,默认为网络营销']}> - | 网络营销 | 电商运营 | 互联网早报 | 站长圈 | - | -------- | --------- | ---------- | ------ | - | | dianshang | internet | seo | -</Route> +<Route namespace="imiker" data={{"path":"/ask/jinghua","categories":["new-media"],"example":"/imiker/ask/jinghua","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["imiker.com/explore/find"]},"name":"米课圈精华","maintainers":["nczitzk"],"url":"imiker.com/explore/find","location":"jinghua.ts"}} /> ## 鸟哥笔记 {#niao-ge-bi-ji} -### 首页 {#niao-ge-bi-ji-shou-ye} +### 分类目录 {#niao-ge-bi-ji-fen-lei-mu-lu} -<Route author="WenryXu" example="/niaogebiji" path="/niaogebiji" radar="1" /> +<Route namespace="niaogebiji" data={{"path":"/cat/:cat","categories":["new-media"],"example":"/niaogebiji/cat/103","parameters":{"cat":"如 https://www.niaogebiji.com/cat/103,最后的数字就是id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["niaogebiji.com/cat/:cat"]},"name":"分类目录","maintainers":["cKotoriKat"],"url":"niaogebiji.com/","location":"cat.ts"}} /> ### 今日事 {#niao-ge-bi-ji-jin-ri-shi} -<Route author="KotoriK" example="/niaogebiji/today" path="/niaogebiji/today" radar="1" /> - -### 分类目录 {#niao-ge-bi-ji-fen-lei-mu-lu} - -<Route author="KotoriK" example="/niaogebiji/cat/103" path="/niaogebiji/cat/:cat" paramsDesc={['如 https://www.niaogebiji.com/cat/103,最后的数字就是id']} radar="1" /> - -## 跑野大爆炸 {#pao-ye-da-bao-zha} - -### 最新文章 {#pao-ye-da-bao-zha-zui-xin-wen-zhang} - -<Route author="TonyRL" example="/runtrail" path="/runtrail" radar="1" /> +<Route namespace="niaogebiji" data={{"path":"/today","categories":["new-media"],"example":"/niaogebiji/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["niaogebiji.com/","niaogebiji.com/bulletin"],"target":""},"name":"今日事","maintainers":["KotoriK"],"url":"niaogebiji.com/","location":"today.ts"}} /> ## 品玩 {#pin-wan} -### 实时要闻 {#pin-wan-shi-shi-yao-wen} - -<Route author="sanmmm" example="/pingwest/status" path="/pingwest/status" /> - ### 话题动态 {#pin-wan-hua-ti-dong-tai} -<Route author="sanmmm" path="/pingwest/tag/:tag/:type/:option?" example="/pingwest/tag/ChinaJoy/1" paramsDesc={['话题名或话题id, 可从话题页url中得到', '内容类型', '参数, 默认无']}> - 内容类型 +<Route namespace="pingwest" data={{"path":"/tag/:tag/:type/:option?","categories":["new-media"],"example":"/pingwest/tag/ChinaJoy/1","parameters":{"tag":"话题名或话题id, 可从话题页url中得到","type":"内容类型","option":"参数, 默认无"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"话题动态","maintainers":["sanmmm"],"description":"内容类型\n\n | 最新 | 热门 |\n | ---- | ---- |\n | 1 | 2 |\n\n 参数\n\n - `fulltext`,全文输出,例如:`/pingwest/tag/ChinaJoy/1/fulltext`\n\n :::tip\n 该路由一次最多显示 30 条文章\n :::","location":"tag.ts"}} /> - | 最新 | 热门 | - | ---- | ---- | - | 1 | 2 | +内容类型 - 参数 +| 最新 | 热门 | +| ---- | ---- | +| 1 | 2 | - - `fulltext`,全文输出,例如:`/pingwest/tag/ChinaJoy/1/fulltext` +参数 - :::tip - 该路由一次最多显示 30 条文章 - ::: -</Route> +- `fulltext`,全文输出,例如:`/pingwest/tag/ChinaJoy/1/fulltext` + +:::tip +该路由一次最多显示 30 条文章 +::: + +### 实时要闻 {#pin-wan-shi-shi-yao-wen} + +<Route namespace="pingwest" data={{"path":"/status","categories":["new-media"],"example":"/pingwest/status","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pingwest.com/status","pingwest.com/"]},"name":"实时要闻","maintainers":["sanmmm"],"url":"pingwest.com/status","location":"status.ts"}} /> ### 用户 {#pin-wan-yong-hu} -<Route author="sanmmm" path="/pingwest/user/:uid/:type?/:option?" example="/pingwest/user/7781550877/article" paramsDesc={['用户id, 可从用户主页中得到', '内容类型, 默认为`article`', '参数']}> - 内容类型 +<Route namespace="pingwest" data={{"path":"/user/:uid/:type?/:option?","categories":["new-media"],"example":"/pingwest/user/7781550877/article","parameters":{"uid":"用户id, 可从用户主页中得到","type":"内容类型, 默认为`article`","option":"参数"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pingwest.com/user/:uid/:type","pingwest.com/"],"target":"/user/:uid/:type"},"name":"用户","maintainers":["sanmmm"],"description":"内容类型\n\n | 文章 | 动态 |\n | ------- | ----- |\n | article | state |\n\n 参数\n\n - `fulltext`,全文输出,例如:`/pingwest/user/7781550877/article/fulltext`","location":"user.ts"}} /> - | 文章 | 动态 | - | ------- | ----- | - | article | state | +内容类型 - 参数 +| 文章 | 动态 | +| ------- | ----- | +| article | state | - - `fulltext`,全文输出,例如:`/pingwest/user/7781550877/article/fulltext` -</Route> +参数 -## 千篇网 {#qian-pian-wang} - -### 知识库 / 资讯 {#qian-pian-wang-zhi-shi-ku-zi-xun} - -<Route author="TonyRL" example="/qianp/news" path="/qianp/news/:path*" paramsDesc={['路径,可在URL中找到,默认为 `news/recommend`']} radar="1" /> - -## 求是网 {#qiu-shi-wang} - -### 分类 {#qiu-shi-wang-fen-lei} - -<Route author="nczitzk" example="/qstheory" path="/qstheory/:category?" paramsDesc={['分类,见下表']}> - | 网评 | 视频 | 原创 | 经济 | 政治 | 文化 | 社会 | 党建 | 科教 | 生态 | 国防 | 国际 | 图书 | 学习笔记 | - | ---- | ---- | ------ | ------- | -------- | ------- | ------- | ---- | ------- | ------- | ------- | ------------- | ----- | -------- | - | qswp | qssp | qslgxd | economy | politics | culture | society | cpc | science | zoology | defense | international | books | xxbj | -</Route> - -## 趨勢科技防詐達人 {#qu-shi-ke-ji-fang-zha-da-ren} - -### 最新詐騙情報 {#qu-shi-ke-ji-fang-zha-da-ren-zui-xin-zha-pian-qing-bao} - -<Route author="nczitzk" example="/getdr" path="/getdr" /> - -## 趣头条 {#qu-tou-tiao} - -### 分类 {#qu-tou-tiao-fen-lei} - -<Route author="alphardex LogicJake" example="/qutoutiao/category/1" path="/qutoutiao/category/:cid" paramsDesc={['分类 id']}> - | 推荐 | 热点 | 娱乐 | 健康 | 养生 | 励志 | 科技 | ... | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | --- | - | 255 | 1 | 6 | 42 | 5 | 4 | 7 | ... | - - 更多的 cid 可通过访问[官网](http://home.qutoutiao.net)切换分类,观察 url 获得。 -</Route> +- `fulltext`,全文输出,例如:`/pingwest/user/7781550877/article/fulltext` ## 全国港澳研究会 {#quan-guo-gang-ao-yan-jiu-hui} ### 分类 {#quan-guo-gang-ao-yan-jiu-hui-fen-lei} -<Route author="nczitzk" example="/cahkms" path="/cahkms/:category?" paramsDesc={['分类,见下表,默认为重要新闻']}> - | 关于我们 | 港澳新闻 | 重要新闻 | 顾问点评、会员观点 | 专题汇总 | - | -------- | -------- | -------- | ------------------ | -------- | - | 01 | 02 | 03 | 04 | 05 | +<Route namespace="cahkms" data={{"path":"/:category?","categories":["new-media"],"example":"/cahkms","parameters":{"category":"分类,见下表,默认为重要新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cahkms.org/"]},"name":"分类","maintainers":["nczitzk"],"url":"cahkms.org/","description":"| 关于我们 | 港澳新闻 | 重要新闻 | 顾问点评、会员观点 | 专题汇总 |\n | -------- | -------- | -------- | ------------------ | -------- |\n | 01 | 02 | 03 | 04 | 05 |\n\n | 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 06 | 07 | 08 | 09 | 10 | 11 |","location":"index.ts"}} /> - | 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 06 | 07 | 08 | 09 | 10 | 11 | -</Route> +| 关于我们 | 港澳新闻 | 重要新闻 | 顾问点评、会员观点 | 专题汇总 | +| -------- | -------- | -------- | ------------------ | -------- | +| 01 | 02 | 03 | 04 | 05 | + +| 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 06 | 07 | 08 | 09 | 10 | 11 | ## 全民健康网 {#quan-min-jian-kang-wang} ### 新闻 {#quan-min-jian-kang-wang-xin-wen} -<Route author="nczitzk" example="/qm120/news" path="/qm120/news/:category?" paramsDesc={['分类,见下表,默认为健康焦点']}> - | 健康焦点 | 行业动态 | 医学前沿 | 法规动态 | - | -------- | -------- | -------- | -------- | - | jdxw | hydt | yxqy | fgdt | +<Route namespace="qm120" data={{"path":"/news/:category?","categories":["new-media"],"example":"/qm120/news","parameters":{"category":"分类,见下表,默认为健康焦点"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qm120.com/"]},"name":"新闻","maintainers":["nczitzk"],"url":"qm120.com/","description":"| 健康焦点 | 行业动态 | 医学前沿 | 法规动态 |\n | -------- | -------- | -------- | -------- |\n | jdxw | hydt | yxqy | fgdt |\n\n | 食品安全 | 医疗事故 | 医药会展 | 医药信息 |\n | -------- | -------- | -------- | -------- |\n | spaq | ylsg | yyhz | yyxx |\n\n | 新闻专题 | 行业新闻 |\n | -------- | -------- |\n | zhuanti | xyxw |","location":"news.ts"}} /> - | 食品安全 | 医疗事故 | 医药会展 | 医药信息 | - | -------- | -------- | -------- | -------- | - | spaq | ylsg | yyhz | yyxx | +| 健康焦点 | 行业动态 | 医学前沿 | 法规动态 | +| -------- | -------- | -------- | -------- | +| jdxw | hydt | yxqy | fgdt | - | 新闻专题 | 行业新闻 | - | -------- | -------- | - | zhuanti | xyxw | -</Route> +| 食品安全 | 医疗事故 | 医药会展 | 医药信息 | +| -------- | -------- | -------- | -------- | +| spaq | ylsg | yyhz | yyxx | -## 全球化智库 {#quan-qiu-hua-zhi-ku} - -### 分类 {#quan-qiu-hua-zhi-ku-fen-lei} - -<Route author="nczitzk" example="/ccg" path="/ccg/:category?" paramsDesc={['分类,见下表']}> - | 新闻动态 | 媒体报道 | 观点 | - | -------- | -------- | ---- | - | news | mtbd | view | -</Route> - -## 人民论坛网 {#ren-min-lun-tan-wang} - -### 思想理论 {#ren-min-lun-tan-wang-si-xiang-li-lun} - -<Route author="nczitzk" example="/rmlt/idea" path="/rmlt/idea/:category?" paramsDesc={['分类,见下表,默认为首页']}> - | 首页 | 独家连线 | 深度原创 | 中外思潮 | 时事洞察 | - | ---- | ---------- | ---------- | -------- | -------- | - | | connection | yuanchuang | sichao | dongcha | - - | 中国声音 | 全球观察 | 思想名人堂 | 学术人生 | - | -------- | -------- | ----------- | -------- | - | shengyin | guancha | mingrentang | xueshu | - - | 前沿理论 | 比较研究 | - | -------- | -------- | - | lilun | yanjiu | -</Route> +| 新闻专题 | 行业新闻 | +| -------- | -------- | +| zhuanti | xyxw | ## 人人都是产品经理 {#ren-ren-dou-shi-chan-pin-jing-li} ### 热门文章 {#ren-ren-dou-shi-chan-pin-jing-li-re-men-wen-zhang} -<Route author="WenryXu" example="/woshipm/popular" path="/woshipm/popular/:range?" paramsDesc={['时间,见下表,默认为 `daily`']} radar="1"> - | 日榜 | 周榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly | -</Route> +<Route namespace="woshipm" data={{"path":"/popular/:range?","categories":["new-media"],"example":"/woshipm/popular","parameters":{"range":"时间,见下表,默认为 `daily`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["woshipm.com/"],"target":"/popular"},"name":"热门文章","maintainers":["WenryXu"],"url":"woshipm.com/","description":"| 日榜 | 周榜 | 月榜 |\n | ----- | ------ | ------- |\n | daily | weekly | monthly |","location":"popular.ts"}} /> + +| 日榜 | 周榜 | 月榜 | +| ----- | ------ | ------- | +| daily | weekly | monthly | ### 天天问 {#ren-ren-dou-shi-chan-pin-jing-li-tian-tian-wen} -<Route author="WenryXu" example="/woshipm/wen" path="/woshipm/wen" radar="1" /> +<Route namespace="woshipm" data={{"path":"/wen","categories":["new-media"],"example":"/woshipm/wen","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wen.woshipm.com/"]},"name":"天天问","maintainers":["WenryXu"],"url":"wen.woshipm.com/","location":"wen.ts"}} /> ### 用户文章 {#ren-ren-dou-shi-chan-pin-jing-li-yong-hu-wen-zhang} -<Route author="LogicJake" example="/woshipm/user_article/324696" path="/woshipm/user_article/:id" paramsDesc={['用户 id']} radar="1" /> - -## 人人都是自媒体 {#ren-ren-dou-shi-zi-mei-ti} - -### 发现 {#ren-ren-dou-shi-zi-mei-ti-fa-xian} - -<Route author="Joey" example="/iiilab" path="/iiilab" radar="1" /> +<Route namespace="woshipm" data={{"path":"/user_article/:id","categories":["new-media"],"example":"/woshipm/user_article/324696","parameters":{"id":"用户 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["woshipm.com/u/:id"]},"name":"用户文章","maintainers":["LogicJake"],"location":"user-article.ts"}} /> ## 软餐 {#ruan-can} -### 首页 {#ruan-can-shou-ye} - -<Route author="nczitzk" example="/ruancan" path="/ruancan" /> - ### 分类 {#ruan-can-fen-lei} -<Route author="nczitzk" example="/ruancan/category/news" path="/ruancan/category/:category?" paramsDesc={['分类 id,可在对应分类页 URL 中找到,默认为业界']} /> +<Route namespace="ruancan" data={{"path":"/category/:category?","categories":["new-media"],"example":"/ruancan/category/news","parameters":{"category":"分类 id,可在对应分类页 URL 中找到,默认为业界"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ruancan.com/cat/:category","ruancan.com/"],"target":"/category/:category"},"name":"分类","maintainers":[],"url":"ruancan.com/","location":"category.ts"}} /> ### 搜索 {#ruan-can-sou-suo} -<Route author="nczitzk" example="/ruancan/search/Windows" path="/ruancan/search/:keyword?" paramsDesc={['关键字,默认为空']} anticrawler="1" /> - -### 用户文章 {#ruan-can-yong-hu-wen-zhang} - -<Route author="nczitzk" example="/ruancan/user/72" path="/ruancan/user/:id?" paramsDesc={['用户 id,可在对应用户页 URL 中找到']} anticrawler="1" /> +<Route namespace="ruancan" data={{"path":"/search/:keyword?","categories":["new-media"],"example":"/ruancan/search/Windows","parameters":{"keyword":"关键字,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ruancan.com/"],"target":""},"name":"搜索","maintainers":[],"url":"ruancan.com/","location":"search.ts"}} /> ## 上下游 News\&Market {#shang-xia-you-news-market} ### 分類 {#shang-xia-you-news-market-fen-lei} -<Route author="nczitzk" example="/newsmarket" path="/newsmarket/:category?" paramsDesc={['分类,见下表,默认为首页']}> - | 時事。政策 | 食安 | 新知 | 愛地方 | 種好田 | 好吃。好玩 | - | ----------- | ----------- | --------- | ------------ | ------------ | ------------- | - | news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun | +<Route namespace="newsmarket" data={{"path":"/:category?","categories":["new-media"],"example":"/newsmarket","parameters":{"category":"分类,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["newsmarket.com.tw/blog/category/:category","newsmarket.com.tw/"]},"name":"分類","maintainers":["nczitzk"],"description":"| 時事。政策 | 食安 | 新知 | 愛地方 | 種好田 | 好吃。好玩 |\n | ----------- | ----------- | --------- | ------------ | ------------ | ------------- |\n | news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun |\n\n | 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 |\n | -------------- | ------------------ | -------------------- | ------------------- | ------- |\n | food-education | people-and-history | raising-and-breeding | living-green-travel | opinion |","location":"index.ts"}} /> - | 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 | - | -------------- | ------------------ | -------------------- | ------------------- | ------- | - | food-education | people-and-history | raising-and-breeding | living-green-travel | opinion | -</Route> +| 時事。政策 | 食安 | 新知 | 愛地方 | 種好田 | 好吃。好玩 | +| ----------- | ----------- | --------- | ------------ | ------------ | ------------- | +| news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun | + +| 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 | +| -------------- | ------------------ | -------------------- | ------------------- | ------- | +| food-education | people-and-history | raising-and-breeding | living-green-travel | opinion | ## 少数派 sspai {#shao-shu-pai-sspai} -### 首页 {#shao-shu-pai-sspai-shou-ye} +### Matrix {#shao-shu-pai-sspai-matrix} -<Route author="HenryQW" example="/sspai/index" path="/sspai/index" radar="1" /> - -### 最新上架付费专栏 {#shao-shu-pai-sspai-zui-xin-shang-jia-fu-fei-zhuan-lan} - -<Route author="HenryQW" example="/sspai/series" path="/sspai/series" radar="1"> - > 少数派专栏需要付费订阅,RSS 仅做更新提醒,不含付费内容. -</Route> - -### 付费专栏文章更新 {#shao-shu-pai-sspai-fu-fei-zhuan-lan-wen-zhang-geng-xin} - -<Route author="TonyRL" example="/sspai/series/77" path="/sspai/series/:id" paramsDesc={['专栏 id']} radar="1" /> +<Route namespace="sspai" data={{"path":"/matrix","categories":["new-media"],"example":"/sspai/matrix","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/matrix"]},"name":"Matrix","maintainers":["feigaoxyz"],"url":"sspai.com/matrix","location":"matrix.ts"}} /> ### Shortcuts Gallery {#shao-shu-pai-sspai-shortcuts-gallery} -<Route author="Andiedie" example="/sspai/shortcuts" path="/sspai/shortcuts" radar="1" /> - -### Matrix {#shao-shu-pai-sspai-matrix} - -<Route author="feigaoxyz" example="/sspai/matrix" path="/sspai/matrix" radar="1" /> - -### 专栏 {#shao-shu-pai-sspai-zhuan-lan} - -<Route author="LogicJake" example="/sspai/column/262" path="/sspai/column/:id" paramsDesc={['专栏 id']} radar="1" anticrawler="1" /> - -### 作者 {#shao-shu-pai-sspai-zuo-zhe} - -<Route author="SunShinenny hoilc" example="/sspai/author/796518" path="/sspai/author/:id" paramsDesc={['作者 slug 或 id,slug 可在作者主页URL中找到,id 不易查找,仅作兼容']} radar="1" /> - -### 作者动态 {#shao-shu-pai-sspai-zuo-zhe-dong-tai} - -<Route author="umm233" example="/sspai/activity/urfp0d9i" path="/sspai/activity/:slug" paramsDesc={['作者 slug,可在作者主页URL中找到']} radar="1" anticrawler="1" /> - -### 用户收藏 {#shao-shu-pai-sspai-yong-hu-shou-cang} - -<Route author="curly210102" example="/sspai/bookmarks/urfp0d9i" path="/sspai/bookmarks/:slug" paramsDesc={['用户 slug,可在个人主页URL中找到']} radar="1" /> - -### 专题 {#shao-shu-pai-sspai-zhuan-ti} - -<Route author="SunShinenny" example="/sspai/topics" path="/sspai/topics" radar="1"> - 此为专题广场更新提示 => 集合型而非单篇文章。与下方 "专题内文章更新" 存在明显区别! -</Route> - -### 专题内文章更新 {#shao-shu-pai-sspai-zhuan-ti-nei-wen-zhang-geng-xin} - -<Route author="SunShinenny" example="/sspai/topic/250" path="/sspai/topic/:id" paramsDesc={['专题 id,可在专题主页URL中找到']} radar="1" /> +<Route namespace="sspai" data={{"path":"/shortcuts","categories":["new-media"],"example":"/sspai/shortcuts","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["shortcuts.sspai.com/*"]},"name":"Shortcuts Gallery","maintainers":["Andiedie"],"url":"shortcuts.sspai.com/*","location":"shortcuts-gallery.ts"}} /> ### 标签订阅 {#shao-shu-pai-sspai-biao-qian-ding-yue} -<Route author="Jeason0228" example="/sspai/tag/apple" path="/sspai/tag/:keyword" paramsDesc={['关键词']} radar="1" /> +<Route namespace="sspai" data={{"path":"/tag/:keyword","categories":["new-media"],"example":"/sspai/tag/apple","parameters":{"keyword":"关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/tag/:keyword"]},"name":"标签订阅","maintainers":["Jeason0228"],"location":"tag.ts"}} /> -## 深圳新闻网 {#shen-zhen-xin-wen-wang} +### 付费专栏文章更新 {#shao-shu-pai-sspai-fu-fei-zhuan-lan-wen-zhang-geng-xin} -### 深圳市政府新闻发布厅 {#shen-zhen-xin-wen-wang-shen-zhen-shi-zheng-fu-xin-wen-fa-bu-ting} +<Route namespace="sspai" data={{"path":"/series/:id","categories":["new-media"],"example":"/sspai/series/77","parameters":{"id":"专栏 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/series/:id","sspai.com/series/:id/list","sspai.com/series/:id/metadata"]},"name":"付费专栏文章更新","maintainers":["TonyRL"],"url":"sspai.com/series","location":"series-update.ts"}} /> -<Route author="nczitzk" example="/sznews/press" path="/sznews/press" /> +### 首页 {#shao-shu-pai-sspai-shou-ye} -### 排行榜 {#shen-zhen-xin-wen-wang-pai-hang-bang} +<Route namespace="sspai" data={{"path":"/index","categories":["new-media"],"example":"/sspai/index","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/index"]},"name":"首页","maintainers":["HenryQW"],"url":"sspai.com/index","location":"index.ts"}} /> -<Route author="nczitzk" example="/sznews/ranking" path="/sznews/ranking" /> +### 用户收藏 {#shao-shu-pai-sspai-yong-hu-shou-cang} -## 生命时报 {#sheng-ming-shi-bao} +<Route namespace="sspai" data={{"path":"/bookmarks/:slug","categories":["new-media"],"example":"/sspai/bookmarks/urfp0d9i","parameters":{"slug":"用户 slug,可在个人主页URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/u/:slug/bookmark_posts"]},"name":"用户收藏","maintainers":["curly210102"],"location":"bookmarks.ts"}} /> -### 栏目 {#sheng-ming-shi-bao-lan-mu} +### 专栏 {#shao-shu-pai-sspai-zhuan-lan} -<Route author="nczitzk" example="/lifetimes" path="/lifetimes/:category?" paramsDesc={['栏目,见下表,默认为新闻']}> - | 新闻 | 医药 | 养生 | 生活 | 母亲行动 | 长寿 | 视频 | 时评 | 调查 | 产业经济 | - | ---- | -------- | --------------- | ---- | -------- | --------- | ----- | ------------ | ------- | -------- | - | news | medicine | healthpromotion | life | mothers | longevity | video | news-comment | hotspot | industry | -</Route> +<Route namespace="sspai" data={{"path":"/column/:id","categories":["new-media"],"example":"/sspai/column/262","parameters":{"id":"专栏 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/column/:id"]},"name":"专栏","maintainers":["LogicJake"],"location":"column.ts"}} /> + +### 专题内文章更新 {#shao-shu-pai-sspai-zhuan-ti-nei-wen-zhang-geng-xin} + +<Route namespace="sspai" data={{"path":"/topic/:id","categories":["new-media"],"example":"/sspai/topic/250","parameters":{"id":"专题 id,可在专题主页URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/topic/:id"]},"name":"专题内文章更新","maintainers":["SunShinenny"],"location":"topic.ts"}} /> + +### 专题 {#shao-shu-pai-sspai-zhuan-ti} + +<Route namespace="sspai" data={{"path":"/topics","categories":["new-media"],"example":"/sspai/topics","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/topics"]},"name":"专题","maintainers":["SunShinenny"],"url":"sspai.com/topics","description":"此为专题广场更新提示 => 集合型而非单篇文章。与下方 \"专题内文章更新\" 存在明显区别!","location":"topics.ts"}} /> + +此为专题广场更新提示 => 集合型而非单篇文章。与下方 "专题内文章更新" 存在明显区别! + +### 最新上架付费专栏 {#shao-shu-pai-sspai-zui-xin-shang-jia-fu-fei-zhuan-lan} + +<Route namespace="sspai" data={{"path":"/series","categories":["new-media"],"example":"/sspai/series","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/series"]},"name":"最新上架付费专栏","maintainers":["HenryQW"],"url":"sspai.com/series","description":"> 少数派专栏需要付费订阅,RSS 仅做更新提醒,不含付费内容.","location":"series.ts"}} /> + +> 少数派专栏需要付费订阅,RSS 仅做更新提醒,不含付费内容. + +### 作者动态 {#shao-shu-pai-sspai-zuo-zhe-dong-tai} + +<Route namespace="sspai" data={{"path":"/activity/:slug","categories":["new-media"],"example":"/sspai/activity/urfp0d9i","parameters":{"slug":"作者 slug,可在作者主页URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/u/:id/updates"],"target":"/activity/:id"},"name":"作者动态","maintainers":["umm233"],"location":"activity.ts"}} /> + +### 作者 {#shao-shu-pai-sspai-zuo-zhe} + +<Route namespace="sspai" data={{"path":"/author/:id","categories":["new-media"],"example":"/sspai/author/796518","parameters":{"id":"作者 slug 或 id,slug 可在作者主页URL中找到,id 不易查找,仅作兼容"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sspai.com/u/:id/posts"]},"name":"作者","maintainers":["SunShinenny","hoilc"],"location":"author.ts"}} /> ## 时刻新闻 {#shi-ke-xin-wen} ### 新闻 {#shi-ke-xin-wen-xin-wen} -<Route author="linbuxiao" example="/timednews/news" path="/timednews/news/:type?" paramsDesc={['子分类,见下表,默认为全部']}> - 子分类 +<Route namespace="timednews" data={{"path":"/news/:type?","categories":["new-media"],"example":"/timednews/news","parameters":{"type":"子分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["linbuxiao"],"description":"子分类\n\n | 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 |\n | ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- |\n | all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments |","location":"news.ts"}} /> - | 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 | - | ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- | - | all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments | -</Route> +子分类 -## 时事一点通 {#shi-shi-yi-dian-tong} - -### 资讯 {#shi-shi-yi-dian-tong-zi-xun} - -<Route author="nczitzk" example="/ssydt/article" path="/ssydt/article/:id?" paramsDesc={['id,见下表,默认为推荐']}> - | 推荐 | 时事日报 | 时事专题 | 备考技巧 | 招考信息 | 时事月报 | 重要会议 | 领导讲话 | 时事周刊 | 官网公告 | 时事评论 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 3 | 6 | 13 | 12 | 4 | 10 | 11 | 5 | 8 | 7 | -</Route> - -## 世界新聞網 {#shi-jie-xin-wen-wang} - -### 新聞 {#shi-jie-xin-wen-wang-xin-wen} - -<Route author="TonyRL" example="/worldjournal" path="/worldjournal/:path*" paramsDesc={['URL 中 `/wj/` 後的路徑,預設為 `cate/breaking`']} radar="1" /> - -## 数英网 {#shu-ying-wang} - -### 数英网最新文章 {#shu-ying-wang-shu-ying-wang-zui-xin-wen-zhang} - -<Route author="occupy5" example="/digitaling/index" path="/digitaling/index" paramsDesc={['首页最新文章,数英网']} /> - -### 数英网文章专题 {#shu-ying-wang-shu-ying-wang-wen-zhang-zhuan-ti} - -<Route author="occupy5" example="/digitaling/articles/latest" path="/digitaling/articles/:category/:subcate?" paramsDesc={['文章专题分类','hot 分类下的子类']}> - | 最新文章 | 头条 | 热文 | 精选 | - | -------- | -------- | ---- | ------ | - | latest | headline | hot | choice | - - 分类`hot`下的子类 - - | 近期热门文章 | 近期最多收藏 | 近期最多赞 | - | ------------ | ------------ | ---------- | - | views | collects | zan | -</Route> - -### 数英网项目专题 {#shu-ying-wang-shu-ying-wang-xiang-mu-zhuan-ti} - -<Route author="occupy5" example="/digitaling/projects/all" path="/digitaling/projects/:category" paramsDesc={['项目专题分类 ']}> - | 全部 | 每周项目精选 | 每月项目精选 | 海外项目精选 | 近期热门项目 | 近期最多收藏 | - | ---- | ------------ | ------------ | ------------- | ------------ | ------------ | - | all | weekly | monthly | international | hot | favorite | -</Route> - -## 水果派 {#shui-guo-pai} - -### 首页 {#shui-guo-pai-shou-ye} - -<Route author="nczitzk" example="/shuiguopai" path="/shuiguopai" radar="1" /> - -## 四月网 {#si-yue-wang} - -### 要闻 {#si-yue-wang-yao-wen} - -<Route author="nczitzk" example="/m4/news/china" path="/m4/news/:category?" paramsDesc={['分类,见下表,默认为国内新闻']} radar="1"> - | 分类 | 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 | -</Route> - -### 军事 {#si-yue-wang-jun-shi} - -<Route author="nczitzk" example="/m4/mil/china" path="/m4/mil/:category?" paramsDesc={['分类,见下表,默认为中国军情']} radar="1"> - | 分类 | 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 | -</Route> +| 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 | +| ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- | +| all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments | ## 搜狐号 {#sou-hu-hao} ### 更新 {#sou-hu-hao-geng-xin} -<Route author="HenryQW" example="/sohu/mp/119097" path="/sohu/mp/:id" paramsDesc={['搜狐号 ID', '见如下说明']}> - 1. 通过浏览器搜索相关搜狐号 `果壳 site: mp.sohu.com`。 - 2. 通过浏览器控制台执行 `contentData.mkey`,返回的即为搜狐号 ID。 -</Route> +<Route namespace="sohu" data={{"path":"/mp/:id","categories":["new-media"],"example":"/sohu/mp/119097","parameters":{"id":"搜狐号 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"更新","maintainers":["HenryQW"],"description":"1. 通过浏览器搜索相关搜狐号 `果壳 site: mp.sohu.com`。\n 2. 通过浏览器控制台执行 `contentData.mkey`,返回的即为搜狐号 ID。","location":"mp.ts"}} /> + +1. 通过浏览器搜索相关搜狐号 `果壳 site: mp.sohu.com`。 +2. 通过浏览器控制台执行 `contentData.mkey`,返回的即为搜狐号 ID。 ## 唐书房 {#tang-shu-fang} ### 分类 {#tang-shu-fang-fen-lei} -<Route author="nczitzk" example="/tangshufang" path="/tangshufang/:category?" paramsDesc={['分类,见下表,默认为首页']}> - | 首页 | 老唐实盘 | 书房拾遗 | 理念 & 估值 | 经典陪读 | 财务套利 | - | ---- | -------- | -------- | ----------- | -------- | -------- | - | | shipan | wenda | linian | peidu | taoli | +<Route namespace="tangshufang" data={{"path":"/:category?","categories":["new-media"],"example":"/tangshufang","parameters":{"category":"分类,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tangshufang.com/:category","tangshufang.com/"]},"name":"分类","maintainers":["nczitzk"],"description":"| 首页 | 老唐实盘 | 书房拾遗 | 理念 & 估值 | 经典陪读 | 财务套利 |\n | ---- | -------- | -------- | ----------- | -------- | -------- |\n | | shipan | wenda | linian | peidu | taoli |\n\n | 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | qiye | baijiu | tengxun | fenzhong | haikang | qita |\n\n | 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | hexin | tougao | suibi | caibao | youji | bamang |","location":"index.ts"}} /> - | 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | qiye | baijiu | tengxun | fenzhong | haikang | qita | +| 首页 | 老唐实盘 | 书房拾遗 | 理念 & 估值 | 经典陪读 | 财务套利 | +| ---- | -------- | -------- | ----------- | -------- | -------- | +| | shipan | wenda | linian | peidu | taoli | - | 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | hexin | tougao | suibi | caibao | youji | bamang | -</Route> +| 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| qiye | baijiu | tengxun | fenzhong | haikang | qita | -## 腾讯企鹅号 {#teng-xun-qi-e-hao} - -### 更新 {#teng-xun-qi-e-hao-geng-xin} - -<Route author="LogicJake" example="/tencent/news/author/5933889" path="/tencent/news/author/:mid" paramsDesc={['企鹅号 ID']} radar="1" /> +| 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| hexin | tougao | suibi | caibao | youji | bamang | ## 腾讯研究院 {#teng-xun-yan-jiu-yuan} ### 最近更新 {#teng-xun-yan-jiu-yuan-zui-jin-geng-xin} -<Route author="Fatpandac" example="/tisi/latest" path="/tisi/latest" /> +<Route namespace="tisi" data={{"path":"/latest","categories":["new-media"],"example":"/tisi/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最近更新","maintainers":["Fatpandac"],"location":"index.ts"}} /> ## 通識・現代中國 {#tong-shi-xian-dai-zhong-guo} ### 議題熱話 {#tong-shi-xian-dai-zhong-guo-yi-ti-re-hua} -<Route author="nczitzk" example="/chiculture/topic" path="/chiculture/topic/:category?" paramsDesc={['分类,见下表,默认为全部']}> - | 全部 | 現代中國 | 今日香港 | 全球化 | 一周時事通識 | - | ---- | -------- | -------- | ------ | ------------ | - | | 76 | 479 | 480 | 379 | -</Route> +<Route namespace="chiculture" data={{"path":"/topic/:category?","categories":["new-media"],"example":"/chiculture/topic","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"議題熱話","maintainers":["nczitzk"],"description":"| 全部 | 現代中國 | 今日香港 | 全球化 | 一周時事通識 |\n | ---- | -------- | -------- | ------ | ------------ |\n | | 76 | 479 | 480 | 379 |","location":"topic.ts"}} /> + +| 全部 | 現代中國 | 今日香港 | 全球化 | 一周時事通識 | +| ---- | -------- | -------- | ------ | ------------ | +| | 76 | 479 | 480 | 379 | ## 投中网 {#tou-zhong-wang} ### 分类 {#tou-zhong-wang-fen-lei} -<Route author="yunxinliu-alex" example="/chinaventure/news/78" path="/chinaventure/news/:id?" paramsDesc={['分类,见下表,默认为推荐']}> - | 推荐 | 商业深度 | 资本市场 | 5G | 健康 | 教育 | 地产 | 金融 | 硬科技 | 新消费 | - | ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ | - | | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 | -</Route> +<Route namespace="chinaventure" data={{"path":"/news/:id?","categories":["new-media"],"example":"/chinaventure/news/78","parameters":{"id":"分类,见下表,默认为推荐"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chinaventure.com.cn/"],"target":""},"name":"分类","maintainers":["yuxinliu-alex"],"url":"chinaventure.com.cn/","description":"| 推荐 | 商业深度 | 资本市场 | 5G | 健康 | 教育 | 地产 | 金融 | 硬科技 | 新消费 |\n | ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ |\n | | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 |","location":"index.ts"}} /> -## 歪脑 wainao.me {#wai-nao-wainao-me} - -### 所有文章 {#wai-nao-wainao-me-suo-you-wen-zhang} - -<Route author="shuiRong" example="/wainao-reads/all-articles" path="/wainao-reads/all-articles" /> +| 推荐 | 商业深度 | 资本市场 | 5G | 健康 | 教育 | 地产 | 金融 | 硬科技 | 新消费 | +| ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ | +| | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 | ## 湾区日报 {#wan-qu-ri-bao} ### 最新推荐 {#wan-qu-ri-bao-zui-xin-tui-jian} -<Route author="Fatpandac" example="/wanqu/news" path="/wanqu/news" radar="1" /> +<Route namespace="wanqu" data={{"path":"/news","categories":["new-media"],"example":"/wanqu/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wanqu.co/"]},"name":"最新推荐","maintainers":["Fatpandac"],"url":"wanqu.co/","location":"news.ts"}} /> ## 晚点 LatePost {#wan-dian-latepost} ### 报道 {#wan-dian-latepost-bao-dao} -<Route author="HaitianLiu nczitzk" example="/latepost" path="/latepost/:proma?" paramsDesc={['栏目 id,见下表,默认为最新报道']}> - | 最新报道 | 晚点独家 | 人物访谈 | 晚点早知道 | 长报道 | - | -------- | -------- | -------- | ---------- | ------ | - | | 1 | 2 | 3 | 4 | -</Route> +<Route namespace="latepost" data={{"path":"/:proma?","categories":["new-media"],"example":"/latepost","parameters":{"proma":"栏目 id,见下表,默认为最新报道"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"报道","maintainers":["nczitzk"],"description":"| 最新报道 | 晚点独家 | 人物访谈 | 晚点早知道 | 长报道 |\n | -------- | -------- | -------- | ---------- | ------ |\n | | 1 | 2 | 3 | 4 |","location":"index.ts"}} /> -## 万联网 {#wan-lian-wang} +| 最新报道 | 晚点独家 | 人物访谈 | 晚点早知道 | 长报道 | +| -------- | -------- | -------- | ---------- | ------ | +| | 1 | 2 | 3 | 4 | -### 资讯 {#wan-lian-wang-zi-xun} +## 王者荣耀 {#wang-zhe-rong-yao} -<Route author="kt286" example="/10000link/news/My01" path="/10000link/news/:category?" paramsDesc={['栏目代码, 默认为全部']}> - | 全部 | 天下大势 | 企业动态 | 专家观点 | 研究报告 | - | ---- | -------- | -------- | -------- | -------- | - | (空) | My01 | My02 | My03 | My04 | -</Route> +### 更新 {#wang-zhe-rong-yao-geng-xin} -## 网易独家 {#wang-yi-du-jia} +<Route namespace="tencent" data={{"path":"/news/author/:mid","categories":["new-media"],"example":"/tencent/news/author/5933889","parameters":{"mid":"企鹅号 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["new.qq.com/omn/author/:mid"]},"name":"更新","maintainers":["LogicJake","miles170"],"location":"news/author.ts"}} /> -### 栏目 {#wang-yi-du-jia-lan-mu} +## 网易公开课 {#wang-yi-gong-kai-ke} -<Route author="nczitzk" example="/163/exclusive/qsyk" path="/163/exclusive/:id?" paramsDesc={['栏目, 默认为首页']}> - | 分类 | 编号 | - | -------- | ---- | - | 首页 | | - | 轻松一刻 | qsyk | - | 槽值 | cz | - | 人间 | rj | - | 大国小民 | dgxm | - | 三三有梗 | ssyg | - | 数读 | sd | - | 看客 | kk | - | 下划线 | xhx | - | 谈心社 | txs | - | 哒哒 | dd | - | 胖编怪聊 | pbgl | - | 曲一刀 | qyd | - | 今日之声 | jrzs | - | 浪潮 | lc | - | 沸点 | fd | -</Route> +:::tip +部分歌单及听歌排行信息为登陆后可见,自建时将环境变量`NCM_COOKIES`设为登陆后的 Cookie 值,即可正常获取。 +::: -## 网易号 {#wang-yi-hao} +### 更新 {#wang-yi-gong-kai-ke-geng-xin} -### 更新 {#wang-yi-hao-geng-xin} +<Route namespace="163" data={{"path":"/dy/:id","categories":["new-media"],"example":"/163/dy/W4983108759592548559","parameters":{"id":"网易号 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"更新","maintainers":["HendricksZheng"],"description":"1. 在[网易号搜索页面](https://dy.163.com/v2/media/tosearch.html) 搜索想要订阅的网易号。\n 2. 打开网易号的任意文章。\n 3. 查看源代码,搜索 `data-wemediaid`,查看紧随其后的引号内的属性值(类似 `W1966190042455428950`)即为网易号 ID。","location":"dy.ts"}} /> -<Route author="HendricksZheng" example="/163/dy/W4983108759592548559" path="/163/dy/:id" paramsDesc={['网易号 ID', '见如下说明']}> - 1. 在[网易号搜索页面](https://dy.163.com/v2/media/tosearch.html) 搜索想要订阅的网易号。 - 2. 打开网易号的任意文章。 - 3. 查看源代码,搜索 `data-wemediaid`,查看紧随其后的引号内的属性值(类似 `W1966190042455428950`)即为网易号 ID。 -</Route> +1. 在[网易号搜索页面](https://dy.163.com/v2/media/tosearch.html) 搜索想要订阅的网易号。 +2. 打开网易号的任意文章。 +3. 查看源代码,搜索 `data-wemediaid`,查看紧随其后的引号内的属性值(类似 `W1966190042455428950`)即为网易号 ID。 -### 网易号(通用) {#wang-yi-hao-wang-yi-hao-tong-yong} +### 今日关注 {#wang-yi-gong-kai-ke-jin-ri-guan-zhu} -<Route author="mjysci" example="/163/dy2/T1555591616739" path="/163/dy2/:id" paramsDesc={['id,该网易号主页网址最后一项html的文件名']} anticrawler="1" /> +<Route namespace="163" data={{"path":"/today/:need_content?","categories":["new-media"],"example":"/163/today","parameters":{"need_content":"需要获取全文,填写 true/yes 表示需要,默认需要"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wp.m.163.com/163/html/newsapp/todayFocus/index.html","wp.m.163.com/"],"target":"/today"},"name":"今日关注","maintainers":["nczitzk"],"url":"wp.m.163.com/163/html/newsapp/todayFocus/index.html","description":":::tip\n 参数 **需要获取全文** 设置为 `true` `yes` `t` `y` 等值后,RSS 会携带该新闻条目的对应全文。\n :::","location":"today.ts"}} /> + +:::tip +参数 **需要获取全文** 设置为 `true` `yes` `t` `y` 等值后,RSS 会携带该新闻条目的对应全文。 +::: + +### 栏目 {#wang-yi-gong-kai-ke-lan-mu} + +<Route namespace="163" data={{"path":"/exclusive/:id?","categories":["new-media"],"example":"/163/exclusive/qsyk","parameters":{"id":"栏目, 默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["3g.163.com/touch/exclusive/sub/:id"]},"name":"栏目","maintainers":["nczitzk"],"description":"| 分类 | 编号 |\n | -------- | ---- |\n | 首页 | |\n | 轻松一刻 | qsyk |\n | 槽值 | cz |\n | 人间 | rj |\n | 大国小民 | dgxm |\n | 三三有梗 | ssyg |\n | 数读 | sd |\n | 看客 | kk |\n | 下划线 | xhx |\n | 谈心社 | txs |\n | 哒哒 | dd |\n | 胖编怪聊 | pbgl |\n | 曲一刀 | qyd |\n | 今日之声 | jrzs |\n | 浪潮 | lc |\n | 沸点 | fd |","location":"exclusive.ts"}} /> + +| 分类 | 编号 | +| -------- | ---- | +| 首页 | | +| 轻松一刻 | qsyk | +| 槽值 | cz | +| 人间 | rj | +| 大国小民 | dgxm | +| 三三有梗 | ssyg | +| 数读 | sd | +| 看客 | kk | +| 下划线 | xhx | +| 谈心社 | txs | +| 哒哒 | dd | +| 胖编怪聊 | pbgl | +| 曲一刀 | qyd | +| 今日之声 | jrzs | +| 浪潮 | lc | +| 沸点 | fd | + +### 排行榜 {#wang-yi-gong-kai-ke-pai-hang-bang} + +<Route namespace="163" data={{"path":"/news/rank/:category?/:type?/:time?","categories":["new-media"],"example":"/163/news/rank/whole/click/day","parameters":{"category":"新闻分类,参见下表,默认为“全站”","type":"排行榜类型,“点击榜”对应`click`,“跟贴榜”对应`follow`,默认为“点击榜”","time":"统计时间,“1小时”对应`hour`,“24小时”对应`day`,“本周”对应`week`,“本月”对应`month`,默认为“24小时”"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"排行榜","maintainers":["nczitzk"],"description":":::tip\n 全站新闻 **点击榜** 的统计时间仅包含 “24 小时”、“本周”、“本月”,不包含 “1 小时”。即可用的`time`参数为`day`、`week`、`month`。\n\n 其他分类 **点击榜** 的统计时间仅包含 “1 小时”、“24 小时”、“本周”。即可用的`time`参数为`hour`、`day`、`week`。\n\n 而所有分类(包括全站)的 **跟贴榜** 的统计时间皆仅包含 “24 小时”、“本周”、“本月”。即可用的`time`参数为`day`、`week`、`month`。\n :::\n\n 新闻分类:\n\n | 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 |\n | ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- |\n | whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu |","location":"news/rank.ts"}} /> + +:::tip +全站新闻 **点击榜** 的统计时间仅包含 “24 小时”、“本周”、“本月”,不包含 “1 小时”。即可用的`time`参数为`day`、`week`、`month`。 + +其他分类 **点击榜** 的统计时间仅包含 “1 小时”、“24 小时”、“本周”。即可用的`time`参数为`hour`、`day`、`week`。 + +而所有分类(包括全站)的 **跟贴榜** 的统计时间皆仅包含 “24 小时”、“本周”、“本月”。即可用的`time`参数为`day`、`week`、`month`。 +::: + +新闻分类: + +| 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 | +| ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- | +| whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu | + +### 人间 {#wang-yi-gong-kai-ke-ren-jian} + +<Route namespace="163" data={{"path":"/renjian/:category?","categories":["new-media"],"example":"/163/renjian/texie","parameters":{"category":"分类,见下表,默认为特写"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["renjian.163.com/:category","renjian.163.com/"]},"name":"人间","maintainers":["nczitzk"],"description":"| 特写 | 记事 | 大写 | 好读 | 看客 |\n | ----- | ----- | ----- | ----- | ----- |\n | texie | jishi | daxie | haodu | kanke |","location":"renjian.ts"}} /> + +| 特写 | 记事 | 大写 | 好读 | 看客 | +| ----- | ----- | ----- | ----- | ----- | +| texie | jishi | daxie | haodu | kanke | + +### 网易号(通用) {#wang-yi-gong-kai-ke-wang-yi-hao-tong-yong} + +<Route namespace="163" data={{"path":"/dy2/:id","categories":["new-media"],"example":"/163/dy2/T1555591616739","parameters":{"id":"id,该网易号主页网址最后一项html的文件名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"网易号(通用)","maintainers":["mjysci"],"description":"优先使用方法一,若是网易号搜索页面搜不到的小众网易号(文章页面不含`data-wemediaid`)则可使用此法。\n触发反爬会只抓取到标题,建议自建。","location":"dy2.ts"}} /> 优先使用方法一,若是网易号搜索页面搜不到的小众网易号(文章页面不含`data-wemediaid`)则可使用此法。 触发反爬会只抓取到标题,建议自建。 -## 网易新闻 {#wang-yi-xin-wen} +### 专栏 {#wang-yi-gong-kai-ke-zhuan-lan} -:::warning -若视频因防盗链而无法播放,请参考 [通用参数 -> 多媒体处理](/parameter#多媒体处理) 配置 `multimedia_hotlink_template` **或** `wrap_multimedia_in_iframe`。 -::: +<Route namespace="163" data={{"path":"/news/special/:type?","categories":["new-media"],"example":"/163/news/special/1","parameters":{"type":"栏目"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专栏","maintainers":["nczitzk"],"description":"| 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 |\n | -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- |\n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |","location":"news/special.ts"}} /> -### 今日关注 {#wang-yi-xin-wen-jin-ri-guan-zhu} +| 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 | +| -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -<Route author="nczitzk" example="/163/today" path="/163/today/:need_content?" paramsDesc={['需要获取全文,填写 true/yes 表示需要,默认需要']}> - :::tip - 参数 **需要获取全文** 设置为 `true` `yes` `t` `y` 等值后,RSS 会携带该新闻条目的对应全文。 - ::: -</Route> - -### 排行榜 {#wang-yi-xin-wen-pai-hang-bang} - -<Route author="nczitzk" example="/163/news/rank/whole/click/day" path="/163/news/rank/:category?/:type?/:time?" paramsDesc={['新闻分类,参见下表,默认为“全站”','排行榜类型,“点击榜”对应`click`,“跟贴榜”对应`follow`,默认为“点击榜”','统计时间,“1小时”对应`hour`,“24小时”对应`day`,“本周”对应`week`,“本月”对应`month`,默认为“24小时”']}> - :::tip - 全站新闻 **点击榜** 的统计时间仅包含 “24 小时”、“本周”、“本月”,不包含 “1 小时”。即可用的`time`参数为`day`、`week`、`month`。 - - 其他分类 **点击榜** 的统计时间仅包含 “1 小时”、“24 小时”、“本周”。即可用的`time`参数为`hour`、`day`、`week`。 - - 而所有分类(包括全站)的 **跟贴榜** 的统计时间皆仅包含 “24 小时”、“本周”、“本月”。即可用的`time`参数为`day`、`week`、`month`。 - ::: - - 新闻分类: - - | 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 | - | ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- | - | whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu | -</Route> - -### 专栏 {#wang-yi-xin-wen-zhuan-lan} - -<Route author="Solist-X" example="/163/news/special/1" path="/163/news/special/:type?" paramsDesc={['栏目']}> - | 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 | - | -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -</Route> - -### 人间 {#wang-yi-xin-wen-ren-jian} - -<Route author="nczitzk" example="/163/renjian/texie" path="/163/renjian/:category?" paramsDesc={['分类,见下表,默认为特写']}> - | 特写 | 记事 | 大写 | 好读 | 看客 | - | ----- | ----- | ----- | ----- | ----- | - | texie | jishi | daxie | haodu | kanke | -</Route> - -## 微信 {#wei-xin} +## 微信小程序 {#wei-xin-xiao-cheng-xu} :::tip 公众号直接抓取困难,故目前提供几种间接抓取方案,请自行选择 ::: -### 公众号(CareerEngine 来源) {#wei-xin-gong-zhong-hao-careerengine-lai-yuan} +### 公众号(CareerEngine 来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-careerengine-lai-yuan} -<Route author="HenryQW" example="/wechat/ce/595a5b14d7164e53908f1606" path="/wechat/ce/:id" paramsDesc={['公众号 id,在 [CareerEngine](https://search.careerengine.us/) 搜索公众号,通过 URL 中找到对应的公众号 id']} anticrawler="1" /> +<Route namespace="wechat" data={{"path":"/ce/:id","categories":["new-media"],"example":"/wechat/ce/595a5b14d7164e53908f1606","parameters":{"id":"公众号 id,在 [CareerEngine](https://search.careerengine.us/) 搜索公众号,通过 URL 中找到对应的公众号 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cimidata.com/a/:id"]},"name":"公众号(CareerEngine 来源)","maintainers":["HenryQW"],"location":"ce.ts"}} /> -### 公众号(二十次幂来源) {#wei-xin-gong-zhong-hao-er-shi-ci-mi-lai-yuan} +### 公众号(二十次幂来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-er-shi-ci-mi-lai-yuan} -<Route author="sanmmm" example="/wechat/ershicimi/813oxJOl" path="/wechat/ershicimi/:id" paramsDesc={['公众号id,打开公众号页,在 URL 中找到 id']} anticrawler="1" /> +<Route namespace="wechat" data={{"path":"/ershicimi/:id","categories":["new-media"],"example":"/wechat/ershicimi/813oxJOl","parameters":{"id":"公众号id,打开公众号页,在 URL 中找到 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号(二十次幂来源)","maintainers":["sanmmm"],"location":"ershcimi.ts"}} /> -### 公众号(Telegram 频道来源) {#wei-xin-gong-zhong-hao-telegram-pin-dao-lai-yuan} +### 公众号栏目 (非推送 & 历史消息) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-lan-mu-fei-tui-song-li-shi-xiao-xi} -<Route author="LogicJake Rongronggg9" example="/wechat/tgchannel/lifeweek" path="/wechat/tgchannel/:id/:mpName?/:searchQueryType?" paramsDesc={['公众号绑定频道 id', '欲筛选的公众号全名(URL-encoded,精确匹配),在频道订阅了多个公众号时可选用', '搜索查询类型,见下表']}> - | 搜索查询类型 | 将使用的搜索关键字 | 适用于 | - | :----------: | :----------------: | :-------------------------: | - | `0` | (禁用搜索) | 所有情况 (默认) | - | `1` | 公众号全名 | 未启用 efb-patch-middleware | - | `2` | #公众号全名 | 已启用 efb-patch-middleware | +<Route namespace="wechat" data={{"path":"/mp/homepage/:biz/:hid/:cid?","categories":["new-media"],"example":"/wechat/mp/homepage/MzA3MDM3NjE5NQ==/16","parameters":{"biz":"公众号id","hid":"分页id","cid":"页内栏目"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号栏目 (非推送 & 历史消息)","maintainers":["MisteryMonster"],"description":"只适用拥有首页模板 (分享链接带有 homepage) 的公众号。例如从公众号分享出来的链接为 `https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4`,`biz` 为 `MzA3MDM3NjE5NQ==`,`hid` 为 `4`。\n\n 有些页面里会有分栏, `cid` 可以通过元素选择器选中栏目查看`data-index`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4)里的 `京都职人` 栏目的 `cid` 为 `0`,`文艺时光` 栏目的 `cid` 为 `2`。如果不清楚的话最左边的栏目为`0`,其右方栏目依次递增 `1`。","location":"mp.ts"}} /> - :::tip - 启用搜索有助于在订阅了过多公众号的频道里有效筛选,不易因为大量公众号同时推送导致一些公众号消息被遗漏,但必须正确选择搜索查询类型,否则会搜索失败。 - ::: +只适用拥有首页模板 (分享链接带有 homepage) 的公众号。例如从公众号分享出来的链接为 `https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4`,`biz` 为 `MzA3MDM3NjE5NQ==`,`hid` 为 `4`。 - :::warning - 该方法需要通过 efb 进行频道绑定,具体操作见 [https://github.com/DIYgod/RSSHub/issues/2172](https://github.com/DIYgod/RSSHub/issues/2172) - ::: -</Route> +有些页面里会有分栏, `cid` 可以通过元素选择器选中栏目查看`data-index`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==\&hid=4)里的 `京都职人` 栏目的 `cid` 为 `0`,`文艺时光` 栏目的 `cid` 为 `2`。如果不清楚的话最左边的栏目为`0`,其右方栏目依次递增 `1`。 -### 公众号(自由微信来源) {#wei-xin-gong-zhong-hao-zi-you-wei-xin-lai-yuan} +### 公众号文章话题 Tag {#wei-xin-xiao-cheng-xu-gong-zhong-hao-wen-zhang-hua-ti-tag} -见 [#自由微信](#zi-you-wei-xin) +<Route namespace="wechat" data={{"path":"/mp/msgalbum/:biz/:aid","categories":["new-media"],"example":"/wechat/mp/msgalbum/MzA3MDM3NjE5NQ==/1375870284640911361","parameters":{"biz":"公众号id","aid":"Tag id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号文章话题 Tag","maintainers":["MisteryMonster"],"description":"一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA3MDM3NjE5NQ==&action=getalbum&album_id=1375870284640911361`,其中`biz` 为 `MzA3MDM3NjE5NQ==`,`aid` 为 `1375870284640911361`。","location":"msgalbum.ts"}} /> -### 公众号(Wechat2RSS 来源) {#wei-xin-gong-zhong-hao-wechat2rss-lai-yuan} +一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA3MDM3NjE5NQ==&action=getalbum&album_id=1375870284640911361`,其中`biz` 为 `MzA3MDM3NjE5NQ==`,`aid` 为 `1375870284640911361`。 -<Route author="TonyRL" example="/wechat/wechat2rss/5b925323244e9737c39285596c53e3a2f4a30774" path="/wechat/wechat2rss/:id" paramsDesc={['公众号 id,打开 `https://wechat2rss.xlab.app/posts/list/`,在 URL 中找到 id;注意不是公众号页的 id,而是订阅的 id']} radar="1" /> +### 公众号(搜狗来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-sou-gou-lai-yuan} -### 公众号栏目 (非推送 & 历史消息) {#wei-xin-gong-zhong-hao-lan-mu-fei-tui-song-li-shi-xiao-xi} +<Route namespace="wechat" data={{"path":"/sogou/:id","categories":["new-media"],"example":"/wechat/sogou/qimao0908","parameters":{"id":"公众号 id, 打开 weixin.sogou.com 并搜索相应公众号, 在 URL 中找到 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号(搜狗来源)","maintainers":["EthanWng97"],"location":"sogou.ts"}} /> -<Route author="MisteryMonster" example="/wechat/mp/homepage/MzA3MDM3NjE5NQ==/16" path="/wechat/mp/homepage/:biz/:hid/:cid?" paramsDesc={['公众号id', '分页id', '页内栏目']} radar="1" anticrawler="1"> - 只适用拥有首页模板 (分享链接带有 homepage) 的公众号。例如从公众号分享出来的链接为 `https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==&hid=4`,`biz` 为 `MzA3MDM3NjE5NQ==`,`hid` 为 `4`。 +### 公众号(Telegram 频道来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-telegram-pin-dao-lai-yuan} - 有些页面里会有分栏, `cid` 可以通过元素选择器选中栏目查看`data-index`。如[链接](https://mp.weixin.qq.com/mp/homepage?__biz=MzA3MDM3NjE5NQ==\&hid=4)里的 `京都职人` 栏目的 `cid` 为 `0`,`文艺时光` 栏目的 `cid` 为 `2`。如果不清楚的话最左边的栏目为`0`,其右方栏目依次递增 `1`。 -</Route> +<Route namespace="wechat" data={{"path":"/tgchannel/:id/:mpName?/:searchQueryType?","categories":["new-media"],"example":"/wechat/tgchannel/lifeweek","parameters":{"id":"公众号绑定频道 id","mpName":"欲筛选的公众号全名(URL-encoded,精确匹配),在频道订阅了多个公众号时可选用","searchQueryType":"搜索查询类型,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号(Telegram 频道来源)","maintainers":["LogicJake","Rongronggg9"],"description":"| 搜索查询类型 | 将使用的搜索关键字 | 适用于 |\n | :----------: | :----------------: | :-------------------------: |\n | `0` | (禁用搜索) | 所有情况 (默认) |\n | `1` | 公众号全名 | 未启用 efb-patch-middleware |\n | `2` | #公众号全名 | 已启用 efb-patch-middleware |\n\n :::tip\n 启用搜索有助于在订阅了过多公众号的频道里有效筛选,不易因为大量公众号同时推送导致一些公众号消息被遗漏,但必须正确选择搜索查询类型,否则会搜索失败。\n :::\n\n :::warning\n 该方法需要通过 efb 进行频道绑定,具体操作见 [https://github.com/DIYgod/RSSHub/issues/2172](https://github.com/DIYgod/RSSHub/issues/2172)\n :::","location":"tgchannel.ts"}} /> -### 公众号文章话题 Tag {#wei-xin-gong-zhong-hao-wen-zhang-hua-ti-tag} +| 搜索查询类型 | 将使用的搜索关键字 | 适用于 | +| :----------: | :----------------: | :-------------------------: | +| `0` | (禁用搜索) | 所有情况 (默认) | +| `1` | 公众号全名 | 未启用 efb-patch-middleware | +| `2` | #公众号全名 | 已启用 efb-patch-middleware | -<Route author="MisteryMonster" example="/wechat/mp/msgalbum/MzA3MDM3NjE5NQ==/1375870284640911361" path="/wechat/mp/msgalbum/:biz/:aid" paramsDesc={['公众号id', 'Tag id', ]} radar="1" anticrawler="1"> - 一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzA3MDM3NjE5NQ==&action=getalbum&album_id=1375870284640911361`,其中`biz` 为 `MzA3MDM3NjE5NQ==`,`aid` 为 `1375870284640911361`。 -</Route> +:::tip +启用搜索有助于在订阅了过多公众号的频道里有效筛选,不易因为大量公众号同时推送导致一些公众号消息被遗漏,但必须正确选择搜索查询类型,否则会搜索失败。 +::: -### 公众号(优读来源) {#wei-xin-gong-zhong-hao-you-du-lai-yuan} +:::warning +该方法需要通过 efb 进行频道绑定,具体操作见 [https://github.com/DIYgod/RSSHub/issues/2172](https://github.com/DIYgod/RSSHub/issues/2172) +::: -<Route author="kt286" example="/wechat/uread/shensing" path="/wechat/uread/:userid" paramsDesc={['公众号的微信号, 可在 微信-公众号-更多资料 中找到。并不是所有的都支持,能不能用随缘']} notOperational="1" /> +### 公众号(优读来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-you-du-lai-yuan} -### 公众号(微阅读来源) {#wei-xin-gong-zhong-hao-wei-yue-du-lai-yuan} +<Route namespace="wechat" data={{"path":"/uread/:userid","categories":["new-media"],"example":"/wechat/uread/shensing","parameters":{"userid":"公众号的微信号, 可在 微信-公众号-更多资料 中找到。并不是所有的都支持,能不能用随缘"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号(优读来源)","maintainers":["kt286"],"location":"uread.ts"}} /> -<Route author="Rongronggg9" example="/wechat/data258/gh_cbbad4c1d33c" path="/data258/:id?" paramsDesc={['公众号 id 或分类 id,可在公众号页或分类页 URL 中找到;若略去,则抓取首页']} anticrawler="1" radar="1" notOperational="1"> - :::warning - 由于使用了一些针对反爬的缓解措施,本路由响应较慢。默认只抓取前 5 条,可通过 `?limit=` 改变(不推荐,容易被反爬)。\ - 该网站使用 IP 甄别访客,且应用严格的每日阅读量限额(约 15 次),请自建并确保正确配置缓存;如使用内存缓存而非 Redis 缓存,请增大缓存容量。该限额足够订阅至少 3 个公众号 (假设公众号每日仅更新一次);首页 / 分类页更新相当频繁,不推荐订阅。 - ::: -</Route> +### 公众号(Wechat2RSS 来源) {#wei-xin-xiao-cheng-xu-gong-zhong-hao-wechat2rss-lai-yuan} -### 公众号(搜狗来源) {#wei-xin-gong-zhong-hao-sou-gou-lai-yuan} - -<Route author="EthanWng97" example="/wechat/sogou/qimao0908" path="/wechat/sogou/:id" paramsDesc={['公众号 id, 打开 weixin.sogou.com 并搜索相应公众号, 在 URL 中找到 id']} notOperational="1" /> - -## 维基百科 {#wei-ji-bai-ke} - -### 中国大陆新闻动态 {#wei-ji-bai-ke-zhong-guo-da-lu-xin-wen-dong-tai} - -<Route author="HenryQW" example="/wikipedia/mainland" path="/wikipedia/mainland" /> +<Route namespace="wechat" data={{"path":"/wechat2rss/:id","categories":["new-media"],"example":"/wechat/wechat2rss/5b925323244e9737c39285596c53e3a2f4a30774","parameters":{"id":"公众号 id,打开 `https://wechat2rss.xlab.app/posts/list/`,在 URL 中找到 id;注意不是公众号页的 id,而是订阅的 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公众号(Wechat2RSS 来源)","maintainers":["TonyRL"],"location":"wechat2rss.ts"}} /> ## 维基新闻 {#wei-ji-xin-wen} ### 最新新闻 {#wei-ji-xin-wen-zui-xin-xin-wen} -<Route author="KotoriK" example="/wikinews/latest" path="/wikinews/latest"> - 根据维基新闻的[sitemap](https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85)获取新闻全文。目前仅支持中文维基新闻。 -</Route> +<Route namespace="wikinews" data={{"path":"/latest","categories":["new-media"],"example":"/wikinews/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zh.wikinews.org/wiki/Special:新闻订阅"]},"name":"最新新闻","maintainers":["KotoriK"],"description":"根据维基新闻的[sitemap](https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85)获取新闻全文。目前仅支持中文维基新闻。","location":"index.ts"}} /> -## 我不是盐神 {#wo-bu-shi-yan-shen} - -### 首页 {#wo-bu-shi-yan-shen-shou-ye} - -<Route author="ruoshui9527" example="/onehu" path="/onehu" /> +根据维基新闻的[sitemap](https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85)获取新闻全文。目前仅支持中文维基新闻。 ## 乌有之乡 {#wu-you-zhi-xiang} ### 栏目 {#wu-you-zhi-xiang-lan-mu} -<Route author="nczitzk" example="/wyzxwk/article/shushe" path="/wyzxwk/article/:id?" paramsDesc={['栏目 id,可在栏目页 URL 中找到,默认为时代观察']}> - 时政 +<Route namespace="wyzxwk" data={{"path":"/article/:id?","categories":["new-media"],"example":"/wyzxwk/article/shushe","parameters":{"id":"栏目 id,可在栏目页 URL 中找到,默认为时代观察"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wyzxwk.com/Article/:id","wyzxwk.com/"]},"name":"栏目","maintainers":["nczitzk"],"description":"时政\n\n | 时代观察 | 舆论战争 |\n | -------- | -------- |\n | shidai | yulun |\n\n 经济\n\n | 经济视点 | 社会民生 | 三农关注 | 产业研究 |\n | -------- | -------- | -------- | -------- |\n | jingji | shehui | sannong | chanye |\n\n 国际\n\n | 国际纵横 | 国防外交 |\n | -------- | -------- |\n | guoji | guofang |\n\n 思潮\n\n | 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 |\n | -------- | -------- | -------- | -------- |\n | lixiang | sichao | wenyi | shushe |\n\n 历史\n\n | 历史视野 | 中华文化 | 中华医药 | 共产党人 |\n | -------- | -------- | -------- | -------- |\n | lishi | zhonghua | zhongyi | cpers |\n\n 争鸣\n\n | 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 |\n | -------- | -------- | -------- | -------- |\n | qingnian | gongnong | zatan | shiping |\n\n 活动\n\n | 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 |\n | -------- | -------- | --------- | -------- |\n | gonggao | lvyou | jiangtang | shuhua |","location":"article.ts"}} /> - | 时代观察 | 舆论战争 | - | -------- | -------- | - | shidai | yulun | +时政 - 经济 +| 时代观察 | 舆论战争 | +| -------- | -------- | +| shidai | yulun | - | 经济视点 | 社会民生 | 三农关注 | 产业研究 | - | -------- | -------- | -------- | -------- | - | jingji | shehui | sannong | chanye | +经济 - 国际 +| 经济视点 | 社会民生 | 三农关注 | 产业研究 | +| -------- | -------- | -------- | -------- | +| jingji | shehui | sannong | chanye | - | 国际纵横 | 国防外交 | - | -------- | -------- | - | guoji | guofang | +国际 - 思潮 +| 国际纵横 | 国防外交 | +| -------- | -------- | +| guoji | guofang | - | 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 | - | -------- | -------- | -------- | -------- | - | lixiang | sichao | wenyi | shushe | +思潮 - 历史 +| 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 | +| -------- | -------- | -------- | -------- | +| lixiang | sichao | wenyi | shushe | - | 历史视野 | 中华文化 | 中华医药 | 共产党人 | - | -------- | -------- | -------- | -------- | - | lishi | zhonghua | zhongyi | cpers | +历史 - 争鸣 +| 历史视野 | 中华文化 | 中华医药 | 共产党人 | +| -------- | -------- | -------- | -------- | +| lishi | zhonghua | zhongyi | cpers | - | 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 | - | -------- | -------- | -------- | -------- | - | qingnian | gongnong | zatan | shiping | +争鸣 - 活动 +| 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 | +| -------- | -------- | -------- | -------- | +| qingnian | gongnong | zatan | shiping | - | 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 | - | -------- | -------- | --------- | -------- | - | gonggao | lvyou | jiangtang | shuhua | -</Route> +活动 -## 无产者评论 {#wu-chan-zhe-ping-lun} - -### 分类 {#wu-chan-zhe-ping-lun-fen-lei} - -<Route author="nczitzk" example="/proletar" path="/proletar/categories/:id?" paramsDesc={['分类,见下表,默认为全部文章']}> - | 全部文章 | 中流击水 | 革命文艺 | 当代中国 | 理论视野 | 国际观察 | 史海沉钩 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | | 中流击水 | 革命文艺 | 当代中国 | 理论视野 | 国际观察 | 史海沉钩 | -</Route> - -### 标签 {#wu-chan-zhe-ping-lun-biao-qian} - -<Route author="nczitzk" example="/proletar" path="/proletar/tags/:id?" paramsDesc={['标签,默认为全部文章']}> - :::tip - 标签名参见 [所有标签](https://review.proletar.ink/tags) - ::: -</Route> +| 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 | +| -------- | -------- | --------- | -------- | +| gonggao | lvyou | jiangtang | shuhua | ## 香港 01 {#xiang-gang-01} -### 热门 {#xiang-gang-01-re-men} - -<Route author="hoilc Fatpandac nczitzk" example="/hk01/hot" path="/hk01/hot" radar="1" /> - -### 栏目 {#xiang-gang-01-lan-mu} - -<Route author="hoilc Fatpandac nczitzk" example="/hk01/zone/11" path="/hk01/zone/:id" paramsDesc={['栏目 id, 可在 URL 中找到']} radar="1" /> - -### 子栏目 {#xiang-gang-01-zi-lan-mu} - -<Route author="hoilc Fatpandac nczitzk" example="/hk01/channel/391" path="/hk01/channel/:id" paramsDesc={['子栏目 id, 可在 URL 中找到']} radar="1" /> - -### 专题 {#xiang-gang-01-zhuan-ti} - -<Route author="hoilc Fatpandac nczitzk" example="/hk01/issue/649" path="/hk01/issue/:id" paramsDesc={['专题 id, 可在 URL 中找到']} radar="1" /> - -### 标签 {#xiang-gang-01-biao-qian} - -<Route author="hoilc Fatpandac nczitzk" example="/hk01/tag/2787" path="/hk01/tag/:id" paramsDesc={['标签 id, 可在 URL 中找到']} radar="1" /> - ### 即時 {#xiang-gang-01-ji-shi} -<Route author="5upernove-heng" example="/hk01/latest" path="/hk01/latest" radar="1" /> +<Route namespace="hk01" data={{"path":"/latest","categories":["new-media"],"example":"/hk01/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hk01.com/latest","hk01.com/"]},"name":"即時","maintainers":["5upernova-heng"],"url":"hk01.com/latest","location":"latest.ts"}} /> -## 香港討論區 {#xiang-gang-tao-lun-qu} +### 热门 {#xiang-gang-01-re-men} -### 版塊 {#xiang-gang-tao-lun-qu-ban-kuai} - -<Route author="nczitzk" example="/discuss/62" path="/discuss/:fid" paramsDesc={['fid,可在对应板块页的 URL 中找到']} anticrawler="1" /> - -## 香水时代 {#xiang-shui-shi-dai} - -### 首页 {#xiang-shui-shi-dai-shou-ye} - -<Route author="kt286" example="/nosetime/home" path="/nosetime/home" /> - -### 香评 {#xiang-shui-shi-dai-xiang-ping} - -<Route author="kt286" example="/nosetime/59247733/discuss/new" path="/nosetime/:id/:type/:sort?" paramsDesc={['用户id,可在用户主页 URL 中找到', '类型,short 一句话香评 discuss 香评', '排序, new 最新 agree 最有用']} anticrawler="1" /> +<Route namespace="hk01" data={{"path":"/hot","categories":["new-media"],"example":"/hk01/hot","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hk01.com/hot","hk01.com/"]},"name":"热门","maintainers":["hoilc","Fatpandac","nczitzk"],"url":"hk01.com/hot","location":"hot.ts"}} /> ## 消费者委员会 {#xiao-fei-zhe-wei-yuan-hui} ### 文章 {#xiao-fei-zhe-wei-yuan-hui-wen-zhang} -<Route author="nczitzk" example="/consumer" path="/consumer/:category?/:language?/:keyword?" paramsDesc={['分类,见下表,默认为測試及調查', '语言,见下表,默认为繁体中文', '关键字,默认为空']}> - 分类 +<Route namespace="consumer" data={{"path":"/:category?/:language?/:keyword?","categories":["new-media"],"example":"/consumer","parameters":{"category":"分类,见下表,默认为測試及調查","language":"语言,见下表,默认为繁体中文","keyword":"关键字,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["consumer.org.hk/"]},"name":"文章","maintainers":["nczitzk"],"url":"consumer.org.hk/","description":"分类\n\n | 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 |\n | ---------- | -------- | --------- | -------- |\n | test | life | complaint | topic |\n\n 语言\n\n | 简体中文 | 繁体中文 |\n | -------- | -------- |\n | sc | tc |","location":"index.ts"}} /> - | 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 | - | ---------- | -------- | --------- | -------- | - | test | life | complaint | topic | +分类 - 语言 +| 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 | +| ---------- | -------- | --------- | -------- | +| test | life | complaint | topic | - | 简体中文 | 繁体中文 | - | -------- | -------- | - | sc | tc | -</Route> +语言 + +| 简体中文 | 繁体中文 | +| -------- | -------- | +| sc | tc | ### 消費全攻略 {#xiao-fei-zhe-wei-yuan-hui-xiao-fei-quan-gong-lve} -<Route author="TonyRL" example="/consumer/shopping-guide" path="/consumer/shopping-guide/:category?/:language?" paramsDesc={['分类,见下表,默认为 `trivia`', '语言,见上表,默认为 `tc`']} radar="1"> - | 冷知識 | 懶人包 | 特集 | 銀髮一族 | 飲食煮意 | 科技達人 | 健康美容 | 規劃人生 | 消閒娛樂 | 家品家電 | 親子時光 | 綠色生活 | - | ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ | - | trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living | -</Route> +<Route namespace="consumer" data={{"path":"/shopping-guide/:category?/:language?","categories":["new-media"],"example":"/consumer/shopping-guide","parameters":{"category":"分类,见下表,默认为 `trivia`","language":"语言,见上表,默认为 `tc`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"消費全攻略","maintainers":["TonyRL"],"description":"| 冷知識 | 懶人包 | 特集 | 銀髮一族 | 飲食煮意 | 科技達人 | 健康美容 | 規劃人生 | 消閒娛樂 | 家品家電 | 親子時光 | 綠色生活 |\n | ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ |\n | trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living |","location":"shopping-guide.ts"}} /> + +| 冷知識 | 懶人包 | 特集 | 銀髮一族 | 飲食煮意 | 科技達人 | 健康美容 | 規劃人生 | 消閒娛樂 | 家品家電 | 親子時光 | 綠色生活 | +| ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ | +| trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living | ## 小刀娱乐网 {#xiao-dao-yu-le-wang} ### 分类 {#xiao-dao-yu-le-wang-fen-lei} -<Route author="nczitzk" example="/x6d/34" path="/x6d/:id?" paramsDesc={['分类 id,可在对应分类页面的 URL 中找到,默认为首页最近更新']} radar="1"> - | 技巧分享 | QQ 技巧 | 微信技巧 | 其他教程 | 其他分享 | - | -------- | ------- | -------- | -------- | -------- | - | 31 | 55 | 112 | 33 | 88 | +<Route namespace="x6d" data={{"path":"/:id?","categories":["new-media"],"example":"/x6d/34","parameters":{"id":"分类 id,可在对应分类页面的 URL 中找到,默认为首页最近更新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 技巧分享 | QQ 技巧 | 微信技巧 | 其他教程 | 其他分享 |\n | -------- | ------- | -------- | -------- | -------- |\n | 31 | 55 | 112 | 33 | 88 |\n\n | 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- |\n | 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 |\n\n | 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 |\n\n | 值得一看 | 找点乐子 | 热门事件 | 节目推荐 |\n | -------- | -------- | -------- | -------- |\n | 65 | 50 | 77 | 101 |\n\n | 值得一听 | 每日一听 | 歌单推荐 |\n | -------- | -------- | -------- |\n | 71 | 87 | 79 |\n\n | 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 106 | 107 | 108 | 109 | 110 | 111 | 113 |","location":"index.ts"}} /> - | 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- | - | 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 | +| 技巧分享 | QQ 技巧 | 微信技巧 | 其他教程 | 其他分享 | +| -------- | ------- | -------- | -------- | -------- | +| 31 | 55 | 112 | 33 | 88 | - | 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 | +| 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- | +| 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 | - | 值得一看 | 找点乐子 | 热门事件 | 节目推荐 | - | -------- | -------- | -------- | -------- | - | 65 | 50 | 77 | 101 | +| 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 | - | 值得一听 | 每日一听 | 歌单推荐 | - | -------- | -------- | -------- | - | 71 | 87 | 79 | +| 值得一看 | 找点乐子 | 热门事件 | 节目推荐 | +| -------- | -------- | -------- | -------- | +| 65 | 50 | 77 | 101 | - | 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 106 | 107 | 108 | 109 | 110 | 111 | 113 | -</Route> +| 值得一听 | 每日一听 | 歌单推荐 | +| -------- | -------- | -------- | +| 71 | 87 | 79 | + +| 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 106 | 107 | 108 | 109 | 110 | 111 | 113 | + +## 小黑盒 {#xiao-hei-he} + +### 新华社新闻 {#xiao-hei-he-xin-hua-she-xin-wen} + +<Route namespace="news" data={{"path":["/xhsxw","/whxw"],"categories":["new-media"],"example":"/news/xhsxw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.cn/xhsxw.htm"]},"name":"新华社新闻","maintainers":["nczitzk"],"url":"news.cn/xhsxw.htm","location":"xhsxw.ts"}} /> + +### 新华社新闻 {#xiao-hei-he-xin-hua-she-xin-wen} + +<Route namespace="news" data={{"path":["/xhsxw","/whxw"],"categories":["new-media"],"example":"/news/xhsxw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.cn/xhsxw.htm"]},"name":"新华社新闻","maintainers":["nczitzk"],"url":"news.cn/xhsxw.htm","location":"xhsxw.ts"}} /> ## 小专栏 {#xiao-zhuan-lan} ### 专栏 {#xiao-zhuan-lan-zhuan-lan} -<Route author="TonyRL" example="/xiaozhuanlan/column/olddriver-selection" path="/xiaozhuanlan/column/:id" paramsDesc={['专栏 ID,可在专栏页 URL 中找到']} radar="1" /> - -## 新华网 {#xin-hua-wang} - -### 新华社新闻 {#xin-hua-wang-xin-hua-she-xin-wen} - -<Route author="nczitzk" example="/news/xhsxw" path="/news/xhsxw" radar="1" /> +<Route namespace="xiaozhuanlan" data={{"path":"/column/:id","categories":["new-media"],"example":"/xiaozhuanlan/column/olddriver-selection","parameters":{"id":"专栏 ID,可在专栏页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaozhuanlan.com/:id"]},"name":"专栏","maintainers":["TonyRL"],"location":"column.ts"}} /> ## 新浪 {#xin-lang} -### 科技 - 科学探索 {#xin-lang-ke-ji-ke-xue-tan-suo} +### 财经-国內 {#xin-lang-cai-jing-%EF%BC%8D-guo-nei} -<Route author="LogicJake" example="/sina/discovery/zx" path="/sina/discovery/:type" paramsDesc={['订阅分区类型,见下表']} radar="1"> - | 最新 | 天文航空 | 动物植物 | 自然地理 | 历史考古 | 生命医学 | 生活百科 | 科技前沿 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy | -</Route> +<Route namespace="sina" data={{"path":"/finance/china/:lid?","categories":["new-media"],"example":"/sina/finance/china","parameters":{"lid":"分区 id,见下表,默认为 `1686`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["finance.sina.com.cn/china","finance.sina.com.cn/"],"target":"/finance/china"},"name":"财经-国內","maintainers":["yubinbai"],"url":"finance.sina.com.cn/china","description":"| 国内滚动 | 宏观经济 | 金融新闻 | 地方经济 | 部委动态 | 今日财经 TOP10 |\n | -------- | -------- | -------- | -------- | -------- | -------------- |\n | 1686 | 1687 | 1690 | 1688 | 1689 | 3231 |","location":"finance/china.ts"}} /> + +| 国内滚动 | 宏观经济 | 金融新闻 | 地方经济 | 部委动态 | 今日财经 TOP10 | +| -------- | -------- | -------- | -------- | -------- | -------------- | +| 1686 | 1687 | 1690 | 1688 | 1689 | 3231 | ### 滚动新闻 {#xin-lang-gun-dong-xin-wen} -<Route author="xyqfer" example="/sina/rollnews" path="/sina/rollnews/:lid?" paramsDesc={['分区 id,可在 URL 中找到,默认为 `2509`']} radar="1"> - | 全部 | 国内 | 国际 | 社会 | 体育 | 娱乐 | 军事 | 科技 | 财经 | 股市 | 美股 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 | -</Route> +<Route namespace="sina" data={{"path":"/rollnews/:lid?","categories":["new-media"],"example":"/sina/rollnews","parameters":{"lid":"分区 id,可在 URL 中找到,默认为 `2509`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"滚动新闻","maintainers":["xyqfer"],"description":"| 全部 | 国内 | 国际 | 社会 | 体育 | 娱乐 | 军事 | 科技 | 财经 | 股市 | 美股 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 |","location":"rollnews.ts"}} /> -### 体育 - 综合 {#xin-lang-ti-yu-zong-he} +| 全部 | 国内 | 国际 | 社会 | 体育 | 娱乐 | 军事 | 科技 | 财经 | 股市 | 美股 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 | -<Route author="nczitzk" example="/sina/sports/volley" path="/sina/sports/:type" paramsDesc={['运动类型,见下表']} radar="1" anticrawler="1"> - | 排球 | 游泳 | 乒乓球 | 羽毛球 | 台球 | 田径 | 体操 | 冰雪 | 射击 | 马术 | 拳击搏击 | UFC | 其他 | - | ------ | ---- | -------- | ------ | ------- | -------- | ----- | ------ | ---- | ----- | -------- | --- | ------ | - | volley | swim | pingpang | badmin | snooker | tianjing | ticao | winter | sh | horse | kungfu | ufc | others | -</Route> +### 科技 - 科学探索 {#xin-lang-ke-ji-ke-xue-tan-suo} -### 财经-国內 {#xin-lang-cai-jing-%EF%BC%8D-guo-nei} +<Route namespace="sina" data={{"path":"/discovery/:type","categories":["new-media"],"example":"/sina/discovery/zx","parameters":{"type":"订阅分区类型,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"科技 - 科学探索","maintainers":["LogicJake"],"description":"| 最新 | 天文航空 | 动物植物 | 自然地理 | 历史考古 | 生命医学 | 生活百科 | 科技前沿 |\n | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy |","location":"discovery.ts"}} /> -<Route author="yubinbai" example="/sina/finance/china" path="/sina/finance/china/:lid?" paramsDesc={['分区 id,见下表,默认为 `1686`']} radar="1"> - | 国内滚动 | 宏观经济 | 金融新闻 | 地方经济 | 部委动态 | 今日财经 TOP10 | - | -------- | -------- | -------- | -------- | -------- | -------------- | - | 1686 | 1687 | 1690 | 1688 | 1689 | 3231 | -</Route> +| 最新 | 天文航空 | 动物植物 | 自然地理 | 历史考古 | 生命医学 | 生活百科 | 科技前沿 | +| ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy | ### 美股 {#xin-lang-mei-gu} -<Route author="TonyRL" example="/sina/finance/stock/usstock" path="/sina/finance/stock/usstock/:cids?" paramsDesc={['分区 id,见下表,默认为 `57045`']} radar="1"> - | 最新报道 | 中概股 | 国际财经 | 互联网 | - | -------- | ------ | -------- | ------ | - | 57045 | 57046 | 56409 | 40811 | -</Route> +<Route namespace="sina" data={{"path":"/finance/stock/usstock/:cids?","categories":["new-media"],"example":"/sina/finance/stock/usstock","parameters":{"cids":"分区 id,见下表,默认为 `57045`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["finance.sina.com.cn/stock/usstock","finance.sina.com.cn/"],"target":"/finance/stock/usstock"},"name":"美股","maintainers":["TonyRL"],"url":"finance.sina.com.cn/stock/usstock","description":"| 最新报道 | 中概股 | 国际财经 | 互联网 |\n | -------- | ------ | -------- | ------ |\n | 57045 | 57046 | 56409 | 40811 |","location":"finance/stock/usstock.ts"}} /> + +| 最新报道 | 中概股 | 国际财经 | 互联网 | +| -------- | ------ | -------- | ------ | +| 57045 | 57046 | 56409 | 40811 | ### 专栏 - 创事记 {#xin-lang-zhuan-lan-chuang-shi-ji} -<Route author="xapool" example="/sina/csj" path="/sina/csj" radar="1" /> +<Route namespace="sina" data={{"path":"/csj","categories":["new-media"],"example":"/sina/csj","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tech.sina.com.cn/chuangshiji","tech.sina.com.cn/"]},"name":"专栏 - 创事记","maintainers":["xapool"],"url":"tech.sina.com.cn/chuangshiji","location":"chuangshiji.ts"}} /> ## 新片场 {#xin-pian-chang} ### 发现 {#xin-pian-chang-fa-xian} -<Route author="nczitzk" example="/xinpianchang/discover" path="/xinpianchang/discover/:params?" paramsDesc={['参数,可在对应分类页 URL 中找到,默认为 `article-0-0-all-all-0-0-score` ,即全部']} radar="1"> - :::tip - 跳转到欲订阅的分类页,将 URL 的 `/discover` 到末尾的部分填入 `params` 参数。 +<Route namespace="xinpianchang" data={{"path":["/discover/:params?","/:params?"],"categories":["new-media"],"example":"/xinpianchang/discover","parameters":{"params":"参数,可在对应分类页 URL 中找到,默认为 `article-0-0-all-all-0-0-score` ,即全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"发现","maintainers":["nczitzk"],"description":":::tip\n 跳转到欲订阅的分类页,将 URL 的 `/discover` 到末尾的部分填入 `params` 参数。\n\n 如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 `https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score`,其 `/discover` 到末尾的部分为 `article-0-0-all-all-0-0-score`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。\n :::","location":"index.ts"}} /> - 如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 `https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score`,其 `/discover` 到末尾的部分为 `article-0-0-all-all-0-0-score`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。 - ::: -</Route> +:::tip +跳转到欲订阅的分类页,将 URL 的 `/discover` 到末尾的部分填入 `params` 参数。 + +如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 `https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score`,其 `/discover` 到末尾的部分为 `article-0-0-all-all-0-0-score`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。 +::: + +### 发现 {#xin-pian-chang-fa-xian} + +<Route namespace="xinpianchang" data={{"path":["/discover/:params?","/:params?"],"categories":["new-media"],"example":"/xinpianchang/discover","parameters":{"params":"参数,可在对应分类页 URL 中找到,默认为 `article-0-0-all-all-0-0-score` ,即全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"发现","maintainers":["nczitzk"],"description":":::tip\n 跳转到欲订阅的分类页,将 URL 的 `/discover` 到末尾的部分填入 `params` 参数。\n\n 如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 `https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score`,其 `/discover` 到末尾的部分为 `article-0-0-all-all-0-0-score`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。\n :::","location":"index.ts"}} /> + +:::tip +跳转到欲订阅的分类页,将 URL 的 `/discover` 到末尾的部分填入 `params` 参数。 + +如 [全部原创视频作品](https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score) 的 URL 为 `https://www.xinpianchang.com/discover/article-0-0-all-all-0-0-score`,其 `/discover` 到末尾的部分为 `article-0-0-all-all-0-0-score`,所以对应的路由为 [/xinpianchang/discover/article-0-0-all-all-0-0-score](https://rsshub.app/xinpianchang/discover/article-0-0-all-all-0-0-score)。 +::: ### 排行榜 {#xin-pian-chang-pai-hang-bang} -<Route author="nczitzk" example="/xinpianchang/rank" path="/xinpianchang/rank/:category?" paramsDesc={['分类 id,可在对应排行榜页 URL 中找到,见下表,默认为 `all` ,即总榜']} radar="1"> - | 分类 | id | - | -------- | ---------- | - | 总榜 | all | - | 精选榜 | staffPicks | - | 广告 | ad | - | 宣传片 | publicity | - | 创意 | creative | - | 干货教程 | backstage | -</Route> +<Route namespace="xinpianchang" data={{"path":"/rank/:category?","categories":["new-media"],"example":"/xinpianchang/rank","parameters":{"category":"分类 id,可在对应排行榜页 URL 中找到,见下表,默认为 `all` ,即总榜"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"排行榜","maintainers":["nczitzk"],"description":"| 分类 | id |\n | -------- | ---------- |\n | 总榜 | all |\n | 精选榜 | staffPicks |\n | 广告 | ad |\n | 宣传片 | publicity |\n | 创意 | creative |\n | 干货教程 | backstage |","location":"rank.ts"}} /> -## 选股宝 {#xuan-gu-bao} - -### 主题 {#xuan-gu-bao-zhu-ti} - -<Route author="hillerliao" example="/xuangubao/subject/41" path="/xuangubao/subject/:subject_id" paramsDesc={['主题 id,网址 https://xuangubao.cn/subject/41 中最后的数字']} /> - -## 一兜糖 {#yi-dou-tang} - -### 文章 {#yi-dou-tang-wen-zhang} - -<Route author="sanmmm" example="/yidoutang/guide" path="/yidoutang/guide" /> - -### 众测 {#yi-dou-tang-zhong-ce} - -<Route author="sanmmm" example="/yidoutang/mtest" path="/yidoutang/mtest" /> - -### 全屋记 {#yi-dou-tang-quan-wu-ji} - -<Route author="sanmmm" example="/yidoutang/case/hot" path="/yidoutang/:type?" paramsDesc={['类型, 默认为`default`']}> - 类型 - - | 默认 | 最热 | 最新 | - | ------- | ---- | ---- | - | default | hot | new | -</Route> +| 分类 | id | +| -------- | ---------- | +| 总榜 | all | +| 精选榜 | staffPicks | +| 广告 | ad | +| 宣传片 | publicity | +| 创意 | creative | +| 干货教程 | backstage | ## 壹蘋新聞網 {#yi-pin-xin-wen-wang} ### 最新新聞 {#yi-pin-xin-wen-wang-zui-xin-xin-wen} -<Route author="miles170" example="/nextapple/realtime/latest" path="/nextapple/realtime/:category?" paramsDesc={['類別,見下表,默認為首頁']}> - | 首頁 | 焦點 | 熱門 | 娛樂 | 生活 | 女神 | 社會 | - | ------ | --------- | ---- | ------------- | ---- | -------- | ----- | - | latest | recommend | hit | entertainment | life | gorgeous | local | +<Route namespace="nextapple" data={{"path":"/realtime/:category?","categories":["new-media"],"example":"/nextapple/realtime/latest","parameters":{"category":"類別,見下表,默認為首頁"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tw.nextapple.com/","tw.nextapple.com/realtime/:category"]},"name":"最新新聞","maintainers":["miles170"],"url":"tw.nextapple.com/","description":"| 首頁 | 焦點 | 熱門 | 娛樂 | 生活 | 女神 | 社會 |\n | ------ | --------- | ---- | ------------- | ---- | -------- | ----- |\n | latest | recommend | hit | entertainment | life | gorgeous | local |\n\n | 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 |\n | -------- | ------------- | ------- | ------ | --------- | ------- |\n | politics | international | finance | sports | lifestyle | gadget |","location":"realtime.ts"}} /> - | 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 | - | -------- | ------------- | ------- | ------ | --------- | ------- | - | politics | international | finance | sports | lifestyle | gadget | -</Route> +| 首頁 | 焦點 | 熱門 | 娛樂 | 生活 | 女神 | 社會 | +| ------ | --------- | ---- | ------------- | ---- | -------- | ----- | +| latest | recommend | hit | entertainment | life | gorgeous | local | + +| 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 | +| -------- | ------------- | ------- | ------ | --------- | ------- | +| politics | international | finance | sports | lifestyle | gadget | ## 移动支付网 {#yi-dong-zhi-fu-wang} +### Unknown {#yi-dong-zhi-fu-wang-unknown} + +<Route namespace="mpaypass" data={{"path":"/main/:type?","categories":["new-media"],"example":"/mpaypass/main/policy","parameters":{"type":"新闻类型,类型可在URL中找到,类似`policy`,`eye`等,空或其他任意值展示最新新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["zhuan-zhu"],"location":"main.ts"}} /> + ### 新闻 {#yi-dong-zhi-fu-wang-xin-wen} -<Route author="LogicJake genghis-yang" example="/mpaypass/news" path="/mpaypass/news" /> - -### 分类 {#yi-dong-zhi-fu-wang-fen-lei} - -<Route author="zhuan-zhu" example="/mpaypass/main/policy" path="mpaypass/main/:type?" paramsDesc={['新闻类型,类型可在URL中找到,类似`policy`,`eye`等,空或其他任意值展示最新新闻']} /> - -## 异次元软件世界 {#yi-ci-yuan-ruan-jian-shi-jie} - -### 首页 {#yi-ci-yuan-ruan-jian-shi-jie-shou-ye} - -<Route author="kimi360" example="/iplay/home" path="/iplay/home" /> - -## 有趣天文奇观 {#you-qu-tian-wen-qi-guan} - -### 首页 {#you-qu-tian-wen-qi-guan-shou-ye} - -<Route author="nczitzk" example="/interesting-sky" path="/interesting-sky" /> - -### 年度天象(天文年历) {#you-qu-tian-wen-qi-guan-nian-du-tian-xiang-tian-wen-nian-li} - -<Route author="nczitzk" example="/interesting-sky/astronomical_events" path="/interesting-sky/astronomical_events/:year?" paramsDesc={['年份,默认为当前年份']} /> - -### 近期事件专题 {#you-qu-tian-wen-qi-guan-jin-qi-shi-jian-zhuan-ti} - -<Route author="nczitzk" example="/interesting-sky/recent-interesting" path="/interesting-sky/recent-interesting" /> - -## 鱼塘热榜 {#yu-tang-re-bang} - -### 分类 {#yu-tang-re-bang-fen-lei} - -<Route author="TheresaQWQ" example="/mofish/2" path="/mofish/:id" paramsDesc={['分类id,可以在 https://api.tophub.fun/GetAllType 获取']} /> +<Route namespace="mpaypass" data={{"path":"/news","categories":["new-media"],"example":"/mpaypass/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mpaypass.com.cn/"]},"name":"新闻","maintainers":["LogicJake","genghis-yang"],"url":"mpaypass.com.cn/","location":"news.ts"}} /> ## 早报网 {#zao-bao-wang} ### 每日早报 {#zao-bao-wang-mei-ri-zao-bao} -<Route author="nczitzk" example="/qqorw" path="/qqorw/:category?" paramsDesc={['分类,见下表,默认为首页']} radar="1"> - | 首页 | 每日早报 | 国际早报 | 生活冷知识 | - | ---- | -------- | -------- | ---------- | - | | mrzb | zbapp | zbzzd | -</Route> +<Route namespace="qqorw" data={{"path":"/:category?","categories":["new-media"],"example":"/qqorw","parameters":{"category":"分类,见下表,默认为首页"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qqorw.cn/:category","qqorw.cn/"]},"name":"每日早报","maintainers":["nczitzk"],"description":"| 首页 | 每日早报 | 国际早报 | 生活冷知识 |\n | ---- | -------- | -------- | ---------- |\n | | mrzb | zbapp | zbzzd |","location":"index.ts"}} /> + +| 首页 | 每日早报 | 国际早报 | 生活冷知识 | +| ---- | -------- | -------- | ---------- | +| | mrzb | zbapp | zbzzd | ## 知园 {#zhi-yuan} ### Newsletter {#zhi-yuan-newsletter} -<Route author="TonyRL" example="/zhiy/letters/messy" path="/zhiy/letters/:author" paramsDesc={['作者 ID,可在URL中找到']} radar="1" /> +<Route namespace="zhiy" data={{"path":"/letters/:author","categories":["new-media"],"example":"/zhiy/letters/messy","parameters":{"author":"作者 ID,可在URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhiy.cc/:author"]},"name":"Newsletter","maintainers":["TonyRL"],"location":"letter.ts"}} /> ### 笔记 {#zhi-yuan-bi-ji} -<Route author="TonyRL" example="/zhiy/posts/long" path="/zhiy/posts/:author" paramsDesc={['作者 ID,可在URL中找到']} radar="1" /> - -## 中国纺织经济信息网 {#zhong-guo-fang-zhi-jing-ji-xin-xi-wang} - -### 资讯 {#zhong-guo-fang-zhi-jing-ji-xin-xi-wang-zi-xun} - -<Route author="nczitzk" example="/ctei/news/bwzq" path="/ctei/news/:id?" paramsDesc={['分类 id,可在分类页的 URL 中找到,默认为本网专区']}> - | 要闻 | 国内 | 国际 | 企业 | 品牌 | 外贸 | 政策 | 科技 | 流行 | 服装 | 家纺 | - | ------ | -------- | -------- | ------- | ----- | ----- | ------ | ---------- | ------- | ------- | ------- | - | newsyw | domestic | internal | company | brand | trade | policy | Technology | fashion | apparel | hometex | -</Route> +<Route namespace="zhiy" data={{"path":"/posts/:author","categories":["new-media"],"example":"/zhiy/posts/long","parameters":{"author":"作者 ID,可在URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhiy.cc/:author"]},"name":"笔记","maintainers":["TonyRL"],"location":"post.ts"}} /> ## 中国钢铁工业协会 {#zhong-guo-gang-tie-gong-ye-xie-hui} ### 栏目 {#zhong-guo-gang-tie-gong-ye-xie-hui-lan-mu} -<Route author="nczitzk" example="/chinaisa" path="/chinaisa/:id?" paramsDesc={['栏目,见下表,默认为钢协动态']} radar="1"> +<Route namespace="chinaisa" data={{"path":"/:id?","categories":["new-media"],"example":"/chinaisa","parameters":{"id":"栏目,见下表,默认为钢协动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["nczitzk"],"description":"| 栏目 | id |\n | -------- | ---------------------------------------------------------------- |\n | 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd |\n | 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b |\n | 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a |\n | 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b |\n | 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e |\n\n <details>\n <summary>更多栏目</summary>\n\n #### 党建工作\n\n | 栏目 | id |\n | ---------------------------------------------------- | ---------------------------------------------------------------- |\n | 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b |\n | 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 |\n | 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 |\n | 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db |\n | 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 |\n | 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b |\n | 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 |\n | 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 |\n | 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 |\n\n #### 要闻\n\n | 栏目 | id |\n | ------------ | ---------------------------------------------------------------- |\n | 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 |\n | 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c |\n | 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 |\n\n #### 统计发布\n\n | 栏目 | id |\n | -------- | ---------------------------------------------------------------- |\n | 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b |\n | 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e |\n | 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c |\n | 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 |\n\n #### 行业分析\n\n | 栏目 | id |\n | -------- | ---------------------------------------------------------------- |\n | 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 |\n | 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd |\n | 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 |\n | 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 |\n\n #### 钢材价格指数\n\n | 栏目 | id |\n | ------------ | ---------------------------------------------------------------- |\n | 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 |\n | 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e |\n | 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 |\n\n #### 宏观经济信息\n\n | 栏目 | id |\n | ------------ | ---------------------------------------------------------------- |\n | 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 |\n | 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 |\n | 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 |\n\n #### 专题报道\n\n | 栏目 | id |\n | -------------------- | ---------------------------------------------------------------- |\n | 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 |\n | 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 |\n | 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c |\n | 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 |\n | 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 |\n\n #### 成果奖励\n\n | 栏目 | id |\n | ---------------------- | ---------------------------------------------------------------- |\n | 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 |\n | 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 |\n | 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 |\n | 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 |\n | 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 |\n | 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 |\n\n #### 节能减排\n\n | 栏目 | id |\n | ------------------------------------------ | ---------------------------------------------------------------- |\n | 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 |\n | 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f |\n | 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 |\n\n #### 国际交流\n\n | 栏目 | id |\n | -------- | ---------------------------------------------------------------- |\n | 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 |\n | 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 |\n | 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c |\n\n #### 政策法规\n\n | 栏目 | id |\n | -------- | ---------------------------------------------------------------- |\n | 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 |\n | 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 |\n | 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 |\n\n #### 分会园地\n\n | 栏目 | id |\n | ------------ | ---------------------------------------------------------------- |\n | 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 |\n | 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 |\n | 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 |\n | 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c |\n | 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b |\n\n #### 钢铁知识\n\n | 栏目 | id |\n | ------------ | ---------------------------------------------------------------- |\n | 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f |\n | 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac |\n | 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 |\n\n #### 钢协刊物\n\n | 栏目 | id |\n | ---------- | ---------------------------------------------------------------- |\n | 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b |\n | 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f |\n | 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 |\n </details>","location":"index.ts"}} /> + +| 栏目 | id | +| -------- | ---------------------------------------------------------------- | +| 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | +| 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | +| 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | +| 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | +| 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e | + +<details> + <summary>更多栏目</summary> + + #### 党建工作 + + | 栏目 | id | + | ---------------------------------------------------- | ---------------------------------------------------------------- | + | 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b | + | 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 | + | 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 | + | 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db | + | 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 | + | 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b | + | 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 | + | 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 | + | 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 | + + #### 要闻 + + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 | + | 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c | + | 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 | + + #### 统计发布 + | 栏目 | id | | -------- | ---------------------------------------------------------------- | - | 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | - | 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | - | 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | - | 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | - | 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e | + | 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b | + | 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e | + | 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c | + | 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 | - <details> - <summary>更多栏目</summary> + #### 行业分析 - #### 党建工作 + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 | + | 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd | + | 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 | + | 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 | - | 栏目 | id | - | ---------------------------------------------------- | ---------------------------------------------------------------- | - | 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b | - | 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 | - | 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 | - | 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db | - | 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 | - | 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b | - | 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 | - | 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 | - | 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 | + #### 钢材价格指数 - #### 要闻 + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 | + | 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e | + | 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 | - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 | - | 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c | - | 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 | + #### 宏观经济信息 - #### 统计发布 + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 | + | 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 | + | 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 | - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b | - | 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e | - | 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c | - | 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 | + #### 专题报道 - #### 行业分析 + | 栏目 | id | + | -------------------- | ---------------------------------------------------------------- | + | 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 | + | 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 | + | 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c | + | 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 | + | 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 | - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 | - | 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd | - | 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 | - | 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 | + #### 成果奖励 - #### 钢材价格指数 + | 栏目 | id | + | ---------------------- | ---------------------------------------------------------------- | + | 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 | + | 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 | + | 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 | + | 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 | + | 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 | + | 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 | - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 | - | 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e | - | 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 | + #### 节能减排 - #### 宏观经济信息 + | 栏目 | id | + | ------------------------------------------ | ---------------------------------------------------------------- | + | 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 | + | 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f | + | 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 | - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 | - | 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 | - | 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 | + #### 国际交流 - #### 专题报道 + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 | + | 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 | + | 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c | - | 栏目 | id | - | -------------------- | ---------------------------------------------------------------- | - | 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 | - | 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 | - | 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c | - | 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 | - | 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 | + #### 政策法规 - #### 成果奖励 + | 栏目 | id | + | -------- | ---------------------------------------------------------------- | + | 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 | + | 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 | + | 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 | - | 栏目 | id | - | ---------------------- | ---------------------------------------------------------------- | - | 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 | - | 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 | - | 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 | - | 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 | - | 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 | - | 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 | + #### 分会园地 - #### 节能减排 + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 | + | 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 | + | 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 | + | 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c | + | 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b | - | 栏目 | id | - | ------------------------------------------ | ---------------------------------------------------------------- | - | 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 | - | 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f | - | 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 | + #### 钢铁知识 - #### 国际交流 + | 栏目 | id | + | ------------ | ---------------------------------------------------------------- | + | 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f | + | 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac | + | 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 | - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 | - | 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 | - | 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c | + #### 钢协刊物 - #### 政策法规 - - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 | - | 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 | - | 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 | - - #### 分会园地 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 | - | 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 | - | 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 | - | 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c | - | 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b | - - #### 钢铁知识 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f | - | 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac | - | 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 | - - #### 钢协刊物 - - | 栏目 | id | - | ---------- | ---------------------------------------------------------------- | - | 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b | - | 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f | - | 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 | - </details> -</Route> + | 栏目 | id | + | ---------- | ---------------------------------------------------------------- | + | 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b | + | 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f | + | 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 | +</details> ## 中国科普博览 {#zhong-guo-ke-pu-bo-lan} ### 直播回看 {#zhong-guo-ke-pu-bo-lan-zhi-bo-hui-kan} -<Route author="nczitzk" example="/kepu/live" path="/kepu/live" radar="1" supportBT="1" /> +<Route namespace="kepu" data={{"path":"/live","categories":["new-media"],"example":"/kepu/live","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":false,"supportScihub":false},"radar":{"source":["live.kepu.net.cn/replay/index"]},"name":"直播回看","maintainers":["nczitzk"],"url":"live.kepu.net.cn/replay/index","location":"live.ts"}} /> ## 中国收入分配研究院 {#zhong-guo-shou-ru-fen-pei-yan-jiu-yuan} ### 分类 {#zhong-guo-shou-ru-fen-pei-yan-jiu-yuan-fen-lei} -<Route author="nczitzk" example="/ciidbnu" path="/ciidbnu/:id?" paramsDesc={['分类 id,可在分类页地址栏 URL 中找到']}> - | 社会动态 | 院内新闻 | 学术观点 | 文献书籍 | 工作论文 | 专题讨论 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 1 | 5 | 3 | 4 | 6 | 8 | -</Route> +<Route namespace="ciidbnu" data={{"path":"/:id?","categories":["new-media"],"example":"/ciidbnu","parameters":{"id":"分类 id,可在分类页地址栏 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 社会动态 | 院内新闻 | 学术观点 | 文献书籍 | 工作论文 | 专题讨论 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 1 | 5 | 3 | 4 | 6 | 8 |","location":"index.ts"}} /> -## 中国作家网 {#zhong-guo-zuo-jia-wang} - -### 栏目 {#zhong-guo-zuo-jia-wang-lan-mu} - -<Route author="nczitzk" example="/chinawriter" path="/chinawriter/:id?" paramsDesc={['栏目 id,见下表,默认为首页']} radar="1"> - | 服务 | 文学奖项 | - | ------ | -------- | - | 403937 | 403973 | - - | 新闻 | 访谈 | 艺术 | - | ------ | ------ | ------ | - | 403990 | 403997 | 404002 | - - | 理论评论 | 文史 | 科幻 | 书汇 | 新作品 | - | -------- | ------ | ------ | ------ | ------ | - | 404029 | 404057 | 404078 | 404058 | 404015 | - - | 世界文坛 | 民族文艺 | 网络文学 | 儿童文学 | - | -------- | -------- | -------- | -------- | - | 404085 | 404086 | 404022 | 404059 | - - <details> - <summary>更多栏目</summary> - - #### 会员 - - | 新发展会员名单 | 讣告 | - | -------------- | ------------- | - | 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 | - </details> -</Route> +| 社会动态 | 院内新闻 | 学术观点 | 文献书籍 | 工作论文 | 专题讨论 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 1 | 5 | 3 | 4 | 6 | 8 | ## 珠海网 {#zhu-hai-wang} ### 栏目 {#zhu-hai-wang-lan-mu} -<Route author="nczitzk" example="/hizu" path="/hizu/:column?" paramsDesc={['栏目,见下表,默认为热点']}> - | 分类 | 编号 | - | -------- | ------------------------ | - | 热点 | 5dd92265e4b0bf88dd8c1175 | - | 订阅 | 5dd921a7e4b0bf88dd8c116f | - | 学党史 | 604f1cbbe4b0cf5c2234d470 | - | 政经 | 5dd92242e4b0bf88dd8c1174 | - | 合作区 | 61259fd6e4b0d294f7f9786d | - | 名记名播 | 61dfe511e4b0248b60d1c568 | - | 大湾区 | 5dd9222ce4b0bf88dd8c1173 | - | 网评 | 617805e4e4b037abacfd4820 | - | TV 新闻 | 5dd9220de4b0bf88dd8c1172 | - | 音频 | 5e6edd50e4b02ebde0ab061e | - | 澳门 | 600e8ad4e4b02c3a6af6aaa8 | - | 政务 | 600f760fe4b0e33cf6f8e68e | - | 教育 | 5ff7c0fde4b0e2f210d05e20 | - | 深圳 | 5fc88615e4b0e3055e693e0a | - | 中山 | 600e8a93e4b02c3a6af6aa80 | - | 民生 | 5dd921ece4b0bf88dd8c1170 | - | 社区 | 61148184e4b08d3215364396 | - | 专题 | 5dd9215fe4b0bf88dd8c116b | - | 战疫 | 5e2e5107e4b0c14b5d0e3d04 | - | 横琴 | 5f88eaf2e4b0a27cd404e09e | - | 香洲 | 5f86a3f5e4b09d75f99dde7d | - | 金湾 | 5e8c42b4e4b0347c7e5836e0 | - | 斗门 | 5ee70534e4b07b8a779a1ad6 | - | 高新 | 607d37ade4b05c59ac2f3d40 | -</Route> +<Route namespace="hizu" data={{"path":"/:column?","categories":["new-media"],"example":"/hizu","parameters":{"column":"栏目,见下表,默认为热点"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hizh.cn/"]},"name":"栏目","maintainers":["nczitzk"],"url":"hizh.cn/","description":"| 分类 | 编号 |\n | -------- | ------------------------ |\n | 热点 | 5dd92265e4b0bf88dd8c1175 |\n | 订阅 | 5dd921a7e4b0bf88dd8c116f |\n | 学党史 | 604f1cbbe4b0cf5c2234d470 |\n | 政经 | 5dd92242e4b0bf88dd8c1174 |\n | 合作区 | 61259fd6e4b0d294f7f9786d |\n | 名记名播 | 61dfe511e4b0248b60d1c568 |\n | 大湾区 | 5dd9222ce4b0bf88dd8c1173 |\n | 网评 | 617805e4e4b037abacfd4820 |\n | TV 新闻 | 5dd9220de4b0bf88dd8c1172 |\n | 音频 | 5e6edd50e4b02ebde0ab061e |\n | 澳门 | 600e8ad4e4b02c3a6af6aaa8 |\n | 政务 | 600f760fe4b0e33cf6f8e68e |\n | 教育 | 5ff7c0fde4b0e2f210d05e20 |\n | 深圳 | 5fc88615e4b0e3055e693e0a |\n | 中山 | 600e8a93e4b02c3a6af6aa80 |\n | 民生 | 5dd921ece4b0bf88dd8c1170 |\n | 社区 | 61148184e4b08d3215364396 |\n | 专题 | 5dd9215fe4b0bf88dd8c116b |\n | 战疫 | 5e2e5107e4b0c14b5d0e3d04 |\n | 横琴 | 5f88eaf2e4b0a27cd404e09e |\n | 香洲 | 5f86a3f5e4b09d75f99dde7d |\n | 金湾 | 5e8c42b4e4b0347c7e5836e0 |\n | 斗门 | 5ee70534e4b07b8a779a1ad6 |\n | 高新 | 607d37ade4b05c59ac2f3d40 |","location":"index.ts"}} /> + +| 分类 | 编号 | +| -------- | ------------------------ | +| 热点 | 5dd92265e4b0bf88dd8c1175 | +| 订阅 | 5dd921a7e4b0bf88dd8c116f | +| 学党史 | 604f1cbbe4b0cf5c2234d470 | +| 政经 | 5dd92242e4b0bf88dd8c1174 | +| 合作区 | 61259fd6e4b0d294f7f9786d | +| 名记名播 | 61dfe511e4b0248b60d1c568 | +| 大湾区 | 5dd9222ce4b0bf88dd8c1173 | +| 网评 | 617805e4e4b037abacfd4820 | +| TV 新闻 | 5dd9220de4b0bf88dd8c1172 | +| 音频 | 5e6edd50e4b02ebde0ab061e | +| 澳门 | 600e8ad4e4b02c3a6af6aaa8 | +| 政务 | 600f760fe4b0e33cf6f8e68e | +| 教育 | 5ff7c0fde4b0e2f210d05e20 | +| 深圳 | 5fc88615e4b0e3055e693e0a | +| 中山 | 600e8a93e4b02c3a6af6aa80 | +| 民生 | 5dd921ece4b0bf88dd8c1170 | +| 社区 | 61148184e4b08d3215364396 | +| 专题 | 5dd9215fe4b0bf88dd8c116b | +| 战疫 | 5e2e5107e4b0c14b5d0e3d04 | +| 横琴 | 5f88eaf2e4b0a27cd404e09e | +| 香洲 | 5f86a3f5e4b09d75f99dde7d | +| 金湾 | 5e8c42b4e4b0347c7e5836e0 | +| 斗门 | 5ee70534e4b07b8a779a1ad6 | +| 高新 | 607d37ade4b05c59ac2f3d40 | ## 字节点击 {#zi-jie-dian-ji} -### 首页 {#zi-jie-dian-ji-shou-ye} - -<Route author="TonyRL" example="/byteclicks" path="/byteclicks" radar="1" /> - ### 标签 {#zi-jie-dian-ji-biao-qian} -<Route author="TonyRL" example="/byteclicks/tag/人工智能" path="/byteclicks/tag/:tag" radar="1" paramsDesc={['标签,可在URL中找到']} /> +<Route namespace="byteclicks" data={{"path":"/tag/:tag","categories":["new-media"],"example":"/byteclicks/tag/人工智能","parameters":{"tag":"标签,可在URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["byteclicks.com/tag/:tag"]},"name":"标签","maintainers":["TonyRL"],"url":"byteclicks.com/","location":"tag.ts"}} /> ## 自由微信 {#zi-you-wei-xin} -### 公众号 {#zi-you-wei-xin-gong-zhong-hao} +### Unknown {#zi-you-wei-xin-unknown} -<Route author="TonyRL" example="/freewechat/profile/MzI5NTUxNzk3OA==" path="/freewechat/profile/:id" paramsDesc={['公众号 ID,可在URL中找到']} radar="1" anticrawler="1" /> +<Route namespace="freewechat" data={{"path":"/profile/:id","categories":["new-media"],"example":"/freewechat/profile/MzI5NTUxNzk3OA==","parameters":{"id":"公众号 ID,可在URL中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["freewechat.com/profile/:id"]},"name":"Unknown","maintainers":["TonyRL"],"location":"profile.ts"}} /> diff --git a/website/docs/routes/other.mdx b/website/docs/routes/other.mdx index 2dc080e65..28812eb72 100644 --- a/website/docs/routes/other.mdx +++ b/website/docs/routes/other.mdx @@ -1,366 +1,1001 @@ -# 🔍 Uncategorized +# other -## 4399 论坛 {#4399-lun-tan} +## 141JAV {#141jav} -### 4399 论坛 {#4399-lun-tan-4399-lun-tan} +:::tip +官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141jav.com/feeds/](https://141jav.com/feeds/) +::: -<Route author="DIYgod" example="/forum4399/mtag-83932" path="/forum4399/:mtag" paramsDesc={['mtag,必选-论坛网址最后的mtag字段']} configRequired="1"> - :::warning - 需要用户 cookie 值,详情见部署页面的配置模块。 - ::: -</Route> +### Unknown {#141jav-unknown} + +<Route namespace="141jav" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 141PPV {#141ppv} + +:::tip +官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141ppv.com/feeds/](https://141ppv.com/feeds/) +::: + +### Unknown {#141ppv-unknown} + +<Route namespace="141ppv" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 36kr {#36kr} + +### Unknown {#36kr-unknown} + +<Route namespace="36kr" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 3DMGame {#3dmgame} + +### Unknown {#3dmgame-unknown} + +<Route namespace="3dmgame" data={{"path":"/:name/:type?","radar":{"source":["3dmgame.com/games/:name/:type"]},"name":"Unknown","maintainers":["sinchang","jacky2001114","HenryQW"],"location":"game.ts"}} /> + +## 423Down {#423down} + +### Unknown {#423down-unknown} + +<Route namespace="423down" data={{"path":"/:category/:type?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 4Gamers {#4gamers} + +### Unknown {#4gamers-unknown} + +<Route namespace="4gamers" data={{"path":["/","/category/:category"],"radar":{"source":["www.4gamers.com.tw/news","www.4gamers.com.tw/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"www.4gamers.com.tw/news","location":"category.ts"}} /> + +### Unknown {#4gamers-unknown} + +<Route namespace="4gamers" data={{"path":["/","/category/:category"],"radar":{"source":["www.4gamers.com.tw/news","www.4gamers.com.tw/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"www.4gamers.com.tw/news","location":"category.ts"}} /> ## 591 Rental house {#591-rental-house} ### Rental house {#591-rental-house-rental-house} -<Route author="Yukaii" example="/591/tw/rent/order=posttime&orderType=desc" path="/591/:country/rent/:query?" paramsDesc={['Country code. Only tw is supported now', 'Query Parameters']}> - :::tip - Copy the URL of the 591 filter housing page and remove the front part `https://rent.591.com.tw/?`, you will get the query parameters. - ::: -</Route> +<Route namespace="591" data={{"path":"/:country/rent/:query?","categories":["other"],"example":"/591/tw/rent/order=posttime&orderType=desc","parameters":{"country":"Country code. Only tw is supported now","query":"Query Parameters"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Rental house","maintainers":["Yukaii"],"description":":::tip\n Copy the URL of the 591 filter housing page and remove the front part `https://rent.591.com.tw/?`, you will get the query parameters.\n :::","location":"list.ts"}} /> -## acwifi 路由器交流 {#acwifi-lu-you-qi-jiao-liu} +:::tip +Copy the URL of the 591 filter housing page and remove the front part `https://rent.591.com.tw/?`, you will get the query parameters. +::: -### 新闻 {#acwifi-lu-you-qi-jiao-liu-xin-wen} +## 78 动漫 {#78-dong-man} -<Route author="cc798461" example="/acwifi" path="/acwifi" /> +### Unknown {#78-dong-man-unknown} -## Amazfit Watch Faces {#amazfit-watch-faces} +<Route namespace="78dm" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> -手表型号可在网站中选择后到地址栏查看 +## 8 视界 {#8-shi-jie} -| Amazfit Bip | Amazfit Cor | Amazfit GTR | Amazfit GTS | Amazfit Stratos | Amazfit T-Rex | Amazfit Verge | Amazfit Verge Lite | Honor Band 5 | Honor Watch Magic | Huawei Watch GT | Xiaomi Mi Band 4 | -| ----------- | ----------- | ----------- | ----------- | --------------- | ------------- | ------------- | ------------------ | ------------ | ----------------- | --------------- | ---------------- | -| bip | cor | gtr | gts | pace | t-rex | verge | verge-lite | honor-band-5 | honor-watch-magic | huawei-watch-gt | mi-band-4 | +### Unknown {#8-shi-jie-unknown} -### 新品上架 {#amazfit-watch-faces-xin-pin-shang-jia} +<Route namespace="8world" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> -<Route author="nczitzk" example="/amazfitwatchfaces/fresh/bip/Bip/zh" path="/amazfitwatchfaces/fresh/:model/:type?/:lang?" paramsDesc={['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']} /> +## 8KCosplay {#8kcosplay} -### 最近更新 {#amazfit-watch-faces-zui-jin-geng-xin} +### Unknown {#8kcosplay-unknown} -<Route author="nczitzk" example="/amazfitwatchfaces/updated/bip/Bip/zh" path="/amazfitwatchfaces/updated/:model/:type?/:lang?" paramsDesc={['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']} /> +<Route namespace="8kcos" data={{"path":"/cat/:cat{.+}?","radar":{"source":["8kcosplay.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"8kcosplay.com/","location":"cat.ts"}} /> -### 排行榜 {#amazfit-watch-faces-pai-hang-bang} +## 9To5 {#9to5} -<Route author="nczitzk" example="/amazfitwatchfaces/top/bip/Bip/month/views/zh" path="/amazfitwatchfaces/top/:model/:type?/:time?/:sortBy?/:lang?" paramsDesc={['手表型号', '手表款式,款式代码可在目标网站选择后到地址栏查看,`all` 指 全部款式', '统计时间,`week` 指 上周,`month` 指 上月,`alltime` 指 全部时间', '排序参数,`download` 指 下载量,`views` 指 查看量,`fav` 指 收藏数', '表盘语言,语言代码可在目标网站选择后到地址栏查看,如 `zh` 指 中文']} notOperational="1" /> +### Unknown {#9to5-unknown} -### 搜索结果 {#amazfit-watch-faces-sou-suo-jie-guo} +<Route namespace="9to5" data={{"path":"/:subsite/:tag?","name":"Unknown","maintainers":[],"location":"subsite.ts"}} /> -<Route author="nczitzk" example="/amazfitwatchfaces/search/bip/battery" path="/amazfitwatchfaces/search/:model/:keyword?/:sortBy?" paramsDesc={['手表型号', '关键词,多个关键词用半角逗号隔开', '排序参数,`fresh` 指 新品上架,`updated` 指 已更新的,`views` 指 查看量,`download` 指 下载量,`fav` 指 收藏数']} /> +## A List Apart {#a-list-apart} + +### Unknown {#a-list-apart-unknown} + +<Route namespace="alistapart" data={{"path":"/","radar":{"source":["alistapart.com/articles/"],"target":""},"name":"Unknown","maintainers":["Rjnishant530"],"url":"alistapart.com/articles/","location":"index.ts"}} /> + +## A 姐分享 {#a-jie-fen-xiang} + +### Unknown {#a-jie-fen-xiang-unknown} + +<Route namespace="abskoop" data={{"path":"/","radar":{"source":["ahhhhfs.com/"],"target":""},"name":"Unknown","maintainers":["zhenhappy"],"url":"ahhhhfs.com/","location":"index.ts"}} /> + +### Unknown {#a-jie-fen-xiang-unknown} + +<Route namespace="abskoop" data={{"path":"/nsfw","radar":{"source":["ahhhhfs.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"ahhhhfs.com/","location":"nsfw.ts"}} /> + +## A9VG 电玩部落 {#a9vg-dian-wan-bu-luo} + +### Unknown {#a9vg-dian-wan-bu-luo-unknown} + +<Route namespace="a9vg" data={{"path":"/","radar":{"source":["a9vg.com/list/news","a9vg.com/"],"target":""},"name":"Unknown","maintainers":["monnerHenster"],"url":"a9vg.com/list/news","location":"a9vg.ts"}} /> + +## ABC News {#abc-news} + +### Unknown {#abc-news-unknown} + +<Route namespace="abc" data={{"path":"/:category{.+}?","radar":{"source":["abc.net.au/:category*"],"target":"/:category"},"name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## AcFun {#acfun} + +### Unknown {#acfun-unknown} + +<Route namespace="acfun" data={{"path":"/user/video/:uid","radar":{"source":["www.acfun.cn/u/:id"],"target":"/user/video/:id"},"name":"Unknown","maintainers":["wdssmq"],"location":"video.ts"}} /> + +## AI 财经社 {#ai-cai-jing-she} + +### Unknown {#ai-cai-jing-she-unknown} + +<Route namespace="aicaijing" data={{"path":"/:category?/:id?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## Aljazeera 半岛电视台 {#aljazeera-ban-dao-dian-shi-tai} + +### Unknown {#aljazeera-ban-dao-dian-shi-tai-unknown} + +<Route namespace="aljazeera" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## Amazon {#amazon} + +### Unknown {#amazon-unknown} + +<Route namespace="amazon" data={{"path":"/awsblogs/:locale?","name":"Unknown","maintainers":["HankChow"],"location":"awsblogs.ts"}} /> ## Apple {#apple} ### Exchange and Repair Extension Programs {#apple-exchange-and-repair-extension-programs} -<Route author="metowolf HenryQW" example="/apple/exchange_repair" path="/apple/exchange_repair/:country?" paramsDesc={['country code in apple.com URL (exception: for `United States` please use `us`), default to China `cn`']} /> - -### App Store/Mac App Store {#apple-app-store-mac-app-store} - -See [#app-store-mac-app-store](/routes/program-update#app-store-mac-app-store) +<Route namespace="apple" data={{"path":"/exchange_repair/:country?","categories":["other"],"example":"/apple/exchange_repair","parameters":{"country":"country code in apple.com URL (exception: for `United States` please use `us`), default to China `cn`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["support.apple.com/:country/service-programs"],"target":"/exchange_repair/:country"},"name":"Exchange and Repair Extension Programs","maintainers":["metowolf","HenryQW","kt286"],"location":"exchange-repair.ts"}} /> ## Aqara {#aqara} +### Unknown {#aqara-unknown} + +<Route namespace="aqara" data={{"path":"/cn/news","name":"Unknown","maintainers":[],"location":"news.ts"}} /> + +### Unknown {#aqara-unknown} + +<Route namespace="aqara" data={{"path":"*","name":"Unknown","maintainers":[],"location":"post.ts"}} /> + +### Unknown {#aqara-unknown} + +<Route namespace="aqara" data={{"path":"/:region/:type?","name":"Unknown","maintainers":[],"location":"region.ts"}} /> + ### 社区 {#aqara-she-qu} -<Route author="nczitzk" example="/aqara/community" path="/aqara/community/:id?/:keyword?" paramsDesc={['分类 id,可在对应分类页 URL 中找到,默认为全部', '关键字,默认为空']} /> +<Route namespace="aqara" data={{"path":"/community/:id?/:keyword?","categories":["other"],"example":"/aqara/community","parameters":{"id":"分类 id,可在对应分类页 URL 中找到,默认为全部","keyword":"关键字,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"社区","maintainers":["nczitzk"],"location":"community.ts"}} /> -### 新闻 {#aqara-xin-wen} +## Asian to lick {#asian-to-lick} -<Route author="nczitzk" example="/aqara/:region/news" path="/aqara/news" paramsDesc={['地区 id,可在对应新闻页 URL 中找到,默认为 en,即 Global']} notOperational="1"> - | 中国 / 大陆 | 대한민국 | Europe | United States | Russia | Global | - | ----------- | -------- | ------ | ------------- | ------ | ------ | - | cn | kr | eu | us | ru | en | -</Route> +### Unknown {#asian-to-lick-unknown} -### 分类 {#aqara-fen-lei} +<Route namespace="asiantolick" data={{"path":"/:category{.+}?","radar":{"source":["asiantolick.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"asiantolick.com/","location":"index.ts"}} /> -<Route author="nczitzk" example="/aqara/en/category/press-release" path="/aqara/:region/category/:id" paramsDesc={['地区 id,可在对应分类页 URL 中找到,默认为 en,即 Global', '分类 id,可在对应分类页 URL 中找到']} /> +## Bad.news {#bad-news} -### 标签 {#aqara-biao-qian} +### Unknown {#bad-news-unknown} -<Route author="nczitzk" example="/aqara/en/tag/global" path="/aqara/:region/tag/:id" paramsDesc={['地区 id,可在对应标签页 URL 中找到,默认为 en,即 Global', '标签 id,可在对应标签页 URL 中找到']} /> +<Route namespace="bad" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> -## AutoTrader {#autotrader} +## BBC {#bbc} -### Search {#autotrader-search} +### Unknown {#bbc-unknown} -<Route author="HenryQW" example="/autotrader/radius=50&postcode=sw1a1aa&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&price-to=9000&year-from=2012&body-type=Hatchback&transmission=Automatic&exclude-writeoff-categories=on" path="/autotrader/:query" paramsDesc={['the search query']} notOperational="1"> - 1. Conduct a search with desired filters on AutoTrader - 2. Copy everything in the URL after `?`, for example: `https://www.autotrader.co.uk/car-search?radius=50&postcode=sw1a1aa&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&price-to=9000&year-from=2012&body-type=Hatchback&transmission=Automatic&exclude-writeoff-categories=on` will produce `radius=50&postcode=sw1a1aa&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&price-to=9000&year-from=2012&body-type=Hatchback&transmission=Automatic&exclude-writeoff-categories=on` -</Route> +<Route namespace="bbc" data={{"path":"/:site?/:channel?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## Bilibili {#bilibili} + +### Unknown {#bilibili-unknown} + +<Route namespace="bilibili" data={{"path":["/bangumi/:seasonid","/bangumi/media/:mediaid"],"name":"Unknown","maintainers":["DIYgod"],"location":"bangumi.ts"}} /> + +### Unknown {#bilibili-unknown} + +<Route namespace="bilibili" data={{"path":["/bangumi/:seasonid","/bangumi/media/:mediaid"],"name":"Unknown","maintainers":["DIYgod"],"location":"bangumi.ts"}} /> + +### Unknown {#bilibili-unknown} + +<Route namespace="bilibili" data={{"path":"/ranking/:rid?/:day?/:arc_type?/:disableEmbed?","name":"Unknown","maintainers":["DIYgod"],"location":"ranking.ts"}} /> + +### Unknown {#bilibili-unknown} + +<Route namespace="bilibili" data={{"path":"/user/video-all/:uid/:disableEmbed?","name":"Unknown","maintainers":[],"location":"video-all.ts"}} /> ## Bing {#bing} +### Unknown {#bing-unknown} + +<Route namespace="bing" data={{"path":"/","radar":{"source":["cn.bing.com/"],"target":""},"name":"Unknown","maintainers":["FHYunCai"],"url":"cn.bing.com/","location":"daily-wallpaper.ts"}} /> + ### 搜索 {#bing-sou-suo} -<Route author="CaoMeiYouRen" example="/bing/search/rss" path="/bing/search/:keyword" paramsDesc={['搜索关键词']} radar="1" /> +<Route namespace="bing" data={{"path":"/search/:keyword","categories":["other"],"example":"/bing/search/rss","parameters":{"keyword":"搜索关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cn.bing.com/"],"target":""},"name":"搜索","maintainers":["CaoMeiYouRen"],"url":"cn.bing.com/","location":"search.ts"}} /> -## BOOKWALKERTW {#bookwalkertw} +## biodiscover.com 生物探索 {#biodiscover-com-sheng-wu-tan-suo} -### 热门新书 {#bookwalkertw-re-men-xin-shu} +### Unknown {#biodiscover-com-sheng-wu-tan-suo-unknown} -<Route author="wushijishan" example="/bookwalkertw/news" path="/bookwalkertw/news" /> +<Route namespace="biodiscover" data={{"path":"/:channel?","radar":{"source":["www.biodiscover.com/:channel"],"target":"/:channel"},"name":"Unknown","maintainers":["aidistan"],"location":"index.ts"}} /> -## checkee.info {#checkee-info} +## Bloomberg {#bloomberg} -### US Visa check status {#checkee-info-us-visa-check-status} +### Unknown {#bloomberg-unknown} -<Route author="lalxyy" example="/checkee/2019-03" path="/checkee/:month" paramsDesc={['Year-month of visa check,for example 2019-03']} /> +<Route namespace="bloomberg" data={{"path":["/:site","/"],"name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +### Unknown {#bloomberg-unknown} + +<Route namespace="bloomberg" data={{"path":["/:site","/"],"name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## ClickMe {#clickme} ### 文章 {#clickme-wen-zhang} -<Route author="hoilc" example="/clickme/default/category/beauty" path="/clickme/:site/:grouping/:name" paramsDesc={['站点,`default`为普通站,`r18`为成人站,其它值默认为普通站','分组方式,`category`为分类,`tag`为标签,其他值默认为分类','分类名或标签名,分类名为英文,可以在分类 URL 中找到']} radar="1" anticrawler="1" /> +<Route namespace="clickme" data={{"path":"/:site/:grouping/:name","categories":["other"],"example":"/clickme/default/category/beauty","parameters":{"site":"站点,`default`为普通站,`r18`为成人站,其它值默认为普通站","grouping":"分组方式,`category`为分类,`tag`为标签,其他值默认为分类","name":"分类名或标签名,分类名为英文,可以在分类 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["hoilc"],"location":"index.ts"}} /> + +## cnBeta.COM {#cnbeta-com} + +### Unknown {#cnbeta-com-unknown} + +<Route namespace="cnbeta" data={{"path":["/:type/:id","/"],"radar":{"source":["cnbeta.com.tw/"],"target":""},"name":"Unknown","maintainers":[],"url":"cnbeta.com.tw/","location":"type.ts"}} /> + +### Unknown {#cnbeta-com-unknown} + +<Route namespace="cnbeta" data={{"path":["/:type/:id","/"],"radar":{"source":["cnbeta.com.tw/"],"target":""},"name":"Unknown","maintainers":[],"url":"cnbeta.com.tw/","location":"type.ts"}} /> + +## CNCF {#cncf} + +### Unknown {#cncf-unknown} + +<Route namespace="cncf" data={{"path":"/reports","radar":{"source":["cncf.io/reports"]},"name":"Unknown","maintainers":[],"url":"cncf.io/reports","location":"reports.ts"}} /> + +## Cool Papers {#cool-papers} + +### Unknown {#cool-papers-unknown} + +<Route namespace="papers" data={{"path":"/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## Corona Virus Disease 2019 {#corona-virus-disease-2019} ### South China Morning Post - China coronavirus outbreak {#corona-virus-disease-2019-south-china-morning-post-china-coronavirus-outbreak} -<Route author="DIYgod" example="/scmp/coronavirus" path="/scmp/coronavirus" /> +<Route namespace="scmp" data={{"path":"/coronavirus","categories":["other"],"example":"/scmp/coronavirus","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"South China Morning Post - China coronavirus outbreak","maintainers":["DIYgod"],"location":"coronavirus.ts"}} /> -### Macao Pagina Electrónica Especial Contra Epidemias: What’s New {#corona-virus-disease-2019-macao-pagina-electr%C3%B3nica-especial-contra-epidemias-what-s-new} +## CuriousCat {#curiouscat} -Official Website: [https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx](https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx) +### Unknown {#curiouscat-unknown} -<Route author="KeiLongW" example="/coronavirus/mogov-2019ncov/ch" path="/coronavirus/mogov-2019ncov/:lang" paramsDesc={['Language']} /> +<Route namespace="curiouscat" data={{"path":"/user/:id","radar":{"source":["curiouscat.live/:id"]},"name":"Unknown","maintainers":["lucasew"],"location":"user.ts"}} /> -| Chinese | English | Portuguese | -| ------- | ------- | ---------- | -| ch | en | pt | +## Daily.dev {#daily-dev} -### Singapore Ministry of Health - Past Updates on 2019-nCov Local Situation in Singapore {#corona-virus-disease-2019-singapore-ministry-of-health-past-updates-on-2019-ncov-local-situation-in-singapore} +### Unknown {#daily-dev-unknown} -<Route author="Gnnng" example="/coronavirus/sg-moh" path="/coronavirus/sg-moh" notOperational="1" /> - -### Yahoo Japan 新型コロナウイルス感染症まとめ {#corona-virus-disease-2019-yahoo-japan-xin-xing-%E3%82%B3%E3%83%AD%E3%83%8A%E3%82%A6%E3%82%A4%E3%83%AB%E3%82%B9-gan-ran-zheng-%E3%81%BE%E3%81%A8%E3%82%81} - -Official Website: [https://news.yahoo.co.jp/pages/article/20200207](https://news.yahoo.co.jp/pages/article/20200207) - -<Route author="sgqy" example="/coronavirus/yahoo-japan" path="/coronavirus/yahoo-japan/:tdfk?" paramsDesc={['都道府県的拼音,可从地图详情页的链接中获取。例如:京都府 = kyoto']} notOperational="1" /> +<Route namespace="daily" data={{"path":"/","radar":{"source":["daily.dev/popular"],"target":""},"name":"Unknown","maintainers":["Rjnishant530"],"url":"daily.dev/popular","location":"index.ts"}} /> ## Darwin Awards {#darwin-awards} -### Award Winners {#darwin-awards-award-winners} +### Unknown {#darwin-awards-unknown} -<Route author="zoenglinghou nciztzk" example="/darwinawards" path="/darwinawards" /> +<Route namespace="darwinawards" data={{"path":["/all","/"],"radar":{"source":["darwinawards.com/darwin","darwinawards.com/"],"target":""},"name":"Unknown","maintainers":["zoenglinghou","nczitzk"],"url":"darwinawards.com/darwin","location":"index.ts"}} /> -## dcinside {#dcinside} +### Unknown {#darwin-awards-unknown} -### board {#dcinside-board} +<Route namespace="darwinawards" data={{"path":["/all","/"],"radar":{"source":["darwinawards.com/darwin","darwinawards.com/"],"target":""},"name":"Unknown","maintainers":["zoenglinghou","nczitzk"],"url":"darwinawards.com/darwin","location":"index.ts"}} /> -<Route author="zfanta" example="/dcinside/board/programming" path="/dcinside/board/:id" paramsDesc={['board id']} /> +## Deadline {#deadline} + +### Unknown {#deadline-unknown} + +<Route namespace="deadline" data={{"path":"/","radar":{"source":["deadline.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"deadline.com/","location":"posts.ts"}} /> + +## Discuz {#discuz} + +### Unknown {#discuz-unknown} + +<Route namespace="discuz" data={{"path":["/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}","/:ver{[7x]}/:link{.+}","/:link{.+}"],"name":"Unknown","maintainers":[],"location":"discuz.ts"}} /> + +### Unknown {#discuz-unknown} + +<Route namespace="discuz" data={{"path":["/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}","/:ver{[7x]}/:link{.+}","/:link{.+}"],"name":"Unknown","maintainers":[],"location":"discuz.ts"}} /> + +### Unknown {#discuz-unknown} + +<Route namespace="discuz" data={{"path":["/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}","/:ver{[7x]}/:link{.+}","/:link{.+}"],"name":"Unknown","maintainers":[],"location":"discuz.ts"}} /> + +## Distill {#distill} + +### Unknown {#distill-unknown} + +<Route namespace="distill" data={{"path":"/","radar":{"source":["distill.pub/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"distill.pub/","location":"index.ts"}} /> + +## DL NEWS {#dl-news} + +### Unknown {#dl-news-unknown} + +<Route namespace="dlnews" data={{"path":"/:category?","radar":{"source":["dlnews.com/articles/:category"],"target":"/:category"},"name":"Unknown","maintainers":["Rjnishant530"],"url":"dlnews.com/articles/","location":"category.ts"}} /> + +## DLsite {#dlsite} + +### Unknown {#dlsite-unknown} + +<Route namespace="dlsite" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## E-Hentai {#e-hentai} + +### Unknown {#e-hentai-unknown} + +<Route namespace="e-hentai" data={{"path":"/:what?/:id?/:needTorrents?/:needImages?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## ELSEVIER {#elsevier} + +### Unknown {#elsevier-unknown} + +<Route namespace="elsevier" data={{"path":["/:journal/vol/:issue","/:journal/:issue"],"radar":{"source":["www.sciencedirect.com/journal/:journal/*"],"target":"/:journal"},"name":"Unknown","maintainers":[],"location":"issue.ts"}} /> + +### Unknown {#elsevier-unknown} + +<Route namespace="elsevier" data={{"path":["/:journal/vol/:issue","/:journal/:issue"],"radar":{"source":["www.sciencedirect.com/journal/:journal/*"],"target":"/:journal"},"name":"Unknown","maintainers":[],"location":"issue.ts"}} /> + +### Unknown {#elsevier-unknown} + +<Route namespace="elsevier" data={{"path":["/:journal/latest","/:journal"],"radar":{"source":["www.sciencedirect.com/journal/:journal/*"],"target":"/:journal"},"name":"Unknown","maintainers":[],"location":"journal.ts"}} /> + +### Unknown {#elsevier-unknown} + +<Route namespace="elsevier" data={{"path":["/:journal/latest","/:journal"],"radar":{"source":["www.sciencedirect.com/journal/:journal/*"],"target":"/:journal"},"name":"Unknown","maintainers":[],"location":"journal.ts"}} /> ## Email {#email} -### Email list {#email-email-list} +### Unknown {#email-unknown} -> Only support IMAP protocol, email password and other settings refer to [Email setting](/install) +<Route namespace="mail" data={{"path":"/imap/:email/:folder{.+}?","name":"Unknown","maintainers":[],"location":"imap.ts"}} /> -<Route author="kt286" example="/mail/imap/rss@rsshub.app" path="/mail/imap/:email/:folder*" paramsDesc={['Email account', 'Inbox name, `INBOX` by default']} configRequired="1" /> +## fish shell {#fish-shell} -## Emi Nitta official website 新田惠海官方网站 {#emi-nitta-official-website-xin-tian-hui-hai-guan-fang-wang-zhan} +### Unknown {#fish-shell-unknown} -### Recent update {#emi-nitta-official-website-xin-tian-hui-hai-guan-fang-wang-zhan-recent-update} - -<Route author="luyuhuang" example="/emi-nitta/updates" path="/emi-nitta/updates" /> - -### News {#emi-nitta-official-website-xin-tian-hui-hai-guan-fang-wang-zhan-news} - -<Route author="luyuhuang" example="/emi-nitta/news" path="/emi-nitta/news" notOperational="1" /> - -## Etherscan {#etherscan} - -### Etherscan 转账追踪 {#etherscan-etherscan-zhuan-zhang-zhui-zong} - -<Route author="Pretty9" example="/etherscan/transactions/0x283af0b28c62c092c9727f1ee09c02ca627eb7f5" path="/etherscan/transactions/:address" paramsDesc={['地址']} /> +<Route namespace="fishshell" data={{"path":"/","radar":{"source":["fishshell.com/"],"target":""},"name":"Unknown","maintainers":["x2cf"],"url":"fishshell.com/","location":"index.ts"}} /> ## Fisher Spb {#fisher-spb} ### News {#fisher-spb-news} -<Route author="denis-ya" example="/fisher-spb/news" path="/fisher-spb/news" /> +<Route namespace="fisher-spb" data={{"path":"/news","categories":["other"],"example":"/fisher-spb/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fisher.spb.ru/news"]},"name":"News","maintainers":["denis-ya"],"url":"fisher.spb.ru/news","location":"news.ts"}} /> + +## Foresight News {#foresight-news} + +### Unknown {#foresight-news-unknown} + +<Route namespace="foresightnews" data={{"path":"/","radar":{"source":["foresightnews.pro/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"foresightnews.pro/","location":"index.ts"}} /> + +## Free Computer Books {#free-computer-books} + +### Unknown {#free-computer-books-unknown} + +<Route namespace="freecomputerbooks" data={{"path":"/:category?","radar":{"source":["freecomputerbooks.com/","freecomputerbooks.com/index.html"],"target":""},"name":"Unknown","maintainers":[],"url":"freecomputerbooks.com/","location":"index.ts"}} /> + +## Futubull 富途牛牛 {#futubull-fu-tu-niu-niu} + +### Unknown {#futubull-fu-tu-niu-niu-unknown} + +<Route namespace="futunn" data={{"path":["/highlights","/main","/"],"name":"Unknown","maintainers":[],"url":"news.futunn.com/main","location":"main.ts"}} /> + +### Unknown {#futubull-fu-tu-niu-niu-unknown} + +<Route namespace="futunn" data={{"path":["/highlights","/main","/"],"name":"Unknown","maintainers":[],"url":"news.futunn.com/main","location":"main.ts"}} /> + +### Unknown {#futubull-fu-tu-niu-niu-unknown} + +<Route namespace="futunn" data={{"path":["/highlights","/main","/"],"name":"Unknown","maintainers":[],"url":"news.futunn.com/main","location":"main.ts"}} /> + +## GameApps.hk 香港手机游戏网 {#gameapps-hk-xiang-gang-shou-ji-you-xi-wang} + +### Unknown {#gameapps-hk-xiang-gang-shou-ji-you-xi-wang-unknown} + +<Route namespace="gameapps" data={{"path":"/","radar":{"source":["gameapps.hk/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"gameapps.hk/","location":"index.ts"}} /> + +## GitHub {#github} + +:::tip +GitHub provides some official RSS feeds: + +- Repo releases: `https://github.com/:owner/:repo/releases.atom` +- Repo commits: `https://github.com/:owner/:repo/commits.atom` +- User activities: `https://github.com/:user.atom` +- Private feed: `https://github.com/:user.private.atom?token=:secret` (You can find **Subscribe to your news feed** in [dashboard](https://github.com) page after login) +- Wiki history: `https://github.com/:owner/:repo/wiki.atom` +::: + +### Unknown {#github-unknown} + +<Route namespace="github" data={{"path":["/comments/:user/:repo/:type/:number","/comments/:user/:repo/:number?"],"radar":{"source":["github.com/:user/:repo/:type"],"target":"/comments/:user/:repo"},"name":"Unknown","maintainers":[],"location":"comments.ts"}} /> + +### Unknown {#github-unknown} + +<Route namespace="github" data={{"path":["/comments/:user/:repo/:type/:number","/comments/:user/:repo/:number?"],"radar":{"source":["github.com/:user/:repo/:type"],"target":"/comments/:user/:repo"},"name":"Unknown","maintainers":[],"location":"comments.ts"}} /> + +### Unknown {#github-unknown} + +<Route namespace="github" data={{"path":"/file/:user/:repo/:branch/:filepath{.+}","radar":{"source":["github.com/:user/:repo/blob/:branch/*filepath"],"target":"/file/:user/:repo/:branch/:filepath"},"name":"Unknown","maintainers":[],"location":"file.ts"}} /> + +## GoCN {#gocn} + +### Unknown {#gocn-unknown} + +<Route namespace="gocn" data={{"path":["/","/news"],"name":"Unknown","maintainers":["AtlanCI","CcccFz"],"url":"gocn.vip/","location":"news.ts"}} /> + +### Unknown {#gocn-unknown} + +<Route namespace="gocn" data={{"path":["/","/news"],"name":"Unknown","maintainers":["AtlanCI","CcccFz"],"url":"gocn.vip/","location":"news.ts"}} /> ## Google {#google} ### Alerts {#google-alerts} -<Route author="TonyRL" example="/google/alerts/RSSHub" path="/google/alerts/:keyword" paramsDesc={['Keyword']} /> +<Route namespace="google" data={{"path":"/alerts/:keyword","categories":["other"],"example":"/google/alerts/RSSHub","parameters":{"keyword":"Keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Alerts","maintainers":["TonyRL"],"location":"alerts.ts"}} /> ### Search {#google-search} -<Route author="CaoMeiYouRen" example="/google/search/rss/zh-CN,zh" path="/google/search/:keyword/:language?" paramsDesc={['Keyword','Accept-Language. Example: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7']} /> +<Route namespace="google" data={{"path":"/search/:keyword/:language?","categories":["other"],"example":"/google/search/rss/zh-CN,zh","parameters":{"keyword":"Keyword","language":"Accept-Language. Example: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["CaoMeiYouRen"],"location":"search.ts"}} /> -## Grand-Challenge {#grand-challenge} +## Grist {#grist} -### Challenge 列表 {#grand-challenge-challenge-lie-biao} +### Unknown {#grist-unknown} -<Route author="WhoIsSure" example="/grandchallenge/challenges" path="/grandchallenge/challenges" /> +<Route namespace="grist" data={{"path":"/","radar":{"source":["grist.org/articles/"]},"name":"Unknown","maintainers":["Rjnishant530"],"url":"grist.org/articles/","location":"index.ts"}} /> -### 用户参加的 Challenge {#grand-challenge-yong-hu-can-jia-de-challenge} +## Grub Street {#grub-street} -<Route author="WhoIsSure" example="/grandchallenge/user/Isensee" path="/grandchallenge/user/:id" paramsDesc={['用户ID,必选-用户页面网址里面的用户ID']} /> +### Unknown {#grub-street-unknown} -## HackerOne {#hackerone} +<Route namespace="grubstreet" data={{"path":"/","radar":{"source":["grubstreet.com/"],"target":""},"name":"Unknown","maintainers":["loganrockmore"],"url":"grubstreet.com/","location":"index.ts"}} /> -### HackerOne Hacker Activity {#hackerone-hackerone-hacker-activity} +## HACKER TALK 黑客说 {#hacker-talk-hei-ke-shuo} -<Route author="imlonghao" example="/hackerone/hacktivity" path="/hackerone/hacktivity" radar="1" /> +### Unknown {#hacker-talk-hei-ke-shuo-unknown} -### Search {#hackerone-search} +<Route namespace="hackertalk" data={{"path":"/","radar":{"source":["hackertalk.net/"],"target":""},"name":"Unknown","maintainers":["hyoban"],"url":"hackertalk.net/","location":"index.ts"}} /> -<Route author="imlonghao" example="/hackerone/search/rocket_chat" path="/hackerone/search/:search" paramsDesc={['Search string']} radar="1" /> +## HackYourNews {#hackyournews} + +### Unknown {#hackyournews-unknown} + +<Route namespace="hackyournews" data={{"path":"/","radar":{"source":["hackyournews.com/"],"target":""},"name":"Unknown","maintainers":["ftiasch"],"url":"hackyournews.com/","location":"index.ts"}} /> + +## HelloGitHub {#hellogithub} + +### Unknown {#hellogithub-unknown} + +<Route namespace="hellogithub" data={{"path":["/ranking/:type?","/report/:type?"],"name":"Unknown","maintainers":["moke8","nczitzk"],"description":"| 编程语言 | 服务器 | 数据库 |\n | -------- | -------- | ---------- |\n | tiobe | netcraft | db-engines |","location":"report.ts"}} /> + +| 编程语言 | 服务器 | 数据库 | +| -------- | -------- | ---------- | +| tiobe | netcraft | db-engines | + +### Unknown {#hellogithub-unknown} + +<Route namespace="hellogithub" data={{"path":["/ranking/:type?","/report/:type?"],"name":"Unknown","maintainers":["moke8","nczitzk"],"description":"| 编程语言 | 服务器 | 数据库 |\n | -------- | -------- | ---------- |\n | tiobe | netcraft | db-engines |","location":"report.ts"}} /> + +| 编程语言 | 服务器 | 数据库 | +| -------- | -------- | ---------- | +| tiobe | netcraft | db-engines | + +### Unknown {#hellogithub-unknown} + +<Route namespace="hellogithub" data={{"path":["/month","/volume"],"name":"Unknown","maintainers":["moke8","nczitzk"],"location":"volume.ts"}} /> + +### Unknown {#hellogithub-unknown} + +<Route namespace="hellogithub" data={{"path":["/month","/volume"],"name":"Unknown","maintainers":["moke8","nczitzk"],"location":"volume.ts"}} /> + +## HiFeng'Blog {#hifeng-blog} + +### Unknown {#hifeng-blog-unknown} + +<Route namespace="hicairo" data={{"path":"/","radar":{"source":["hicairo.com/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"hicairo.com/","location":"rss.ts"}} /> + +## HKJunkCall 資訊中心 {#hkjunkcall-zi-xun-zhong-xin} + +### Unknown {#hkjunkcall-zi-xun-zhong-xin-unknown} + +<Route namespace="hkjunkcall" data={{"path":"/","radar":{"source":["hkjunkcall.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"hkjunkcall.com/","location":"index.ts"}} /> + +## Hong Kong Department of Health 香港卫生署 {#hong-kong-department-of-health-xiang-gang-wei-sheng-shu} + +### Unknown {#hong-kong-department-of-health-xiang-gang-wei-sheng-shu-unknown} + +<Route namespace="hongkong" data={{"path":"/chp/:category?/:language?","radar":{"source":["dh.gov.hk/"]},"name":"Unknown","maintainers":["nczitzk"],"url":"dh.gov.hk/","location":"chp.ts"}} /> + +## Howtoforge Linux Tutorials {#howtoforge-linux-tutorials} + +### Unknown {#howtoforge-linux-tutorials-unknown} + +<Route namespace="howtoforge" data={{"path":"/","radar":{"source":["howtoforge.com/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"howtoforge.com/","location":"rss.ts"}} /> + +## iDaily {#idaily} + +### Unknown {#idaily-unknown} + +<Route namespace="idaily" data={{"path":["/today/:language?","/:language?"],"name":"Unknown","maintainers":[],"description":"| 简体中文 | 繁体中文 |\n | -------- | -------- |\n | zh-hans | zh-hant |","location":"index.ts"}} /> + +| 简体中文 | 繁体中文 | +| -------- | -------- | +| zh-hans | zh-hant | + +### Unknown {#idaily-unknown} + +<Route namespace="idaily" data={{"path":["/today/:language?","/:language?"],"name":"Unknown","maintainers":[],"description":"| 简体中文 | 繁体中文 |\n | -------- | -------- |\n | zh-hans | zh-hant |","location":"index.ts"}} /> + +| 简体中文 | 繁体中文 | +| -------- | -------- | +| zh-hans | zh-hant | + +## IEEE Xplore {#ieee-xplore} + +### Unknown {#ieee-xplore-unknown} + +<Route namespace="ieee" data={{"path":["/:journal/latest/vol/:sortType?","/journal/:journal/:sortType?"],"name":"Unknown","maintainers":[],"location":"journal.ts"}} /> + +### Unknown {#ieee-xplore-unknown} + +<Route namespace="ieee" data={{"path":["/:journal/latest/vol/:sortType?","/journal/:journal/:sortType?"],"name":"Unknown","maintainers":[],"location":"journal.ts"}} /> + +### Unknown {#ieee-xplore-unknown} + +<Route namespace="ieee" data={{"path":["/:journal/latest/date/:sortType?","/journal/:journal/recent/:sortType?"],"name":"Unknown","maintainers":[],"location":"recent.ts"}} /> + +### Unknown {#ieee-xplore-unknown} + +<Route namespace="ieee" data={{"path":["/:journal/latest/date/:sortType?","/journal/:journal/recent/:sortType?"],"name":"Unknown","maintainers":[],"location":"recent.ts"}} /> + +## IELTS 雅思 {#ielts-ya-si} + +### Unknown {#ielts-ya-si-unknown} + +<Route namespace="ielts" data={{"path":"/","radar":{"source":["ielts.neea.cn/allnews"],"target":""},"name":"Unknown","maintainers":["zenxds"],"url":"ielts.neea.cn/allnews","location":"index.ts"}} /> + +## indienova 独立游戏 {#indienova-du-li-you-xi} + +### Unknown {#indienova-du-li-you-xi-unknown} + +<Route namespace="indienova" data={{"path":"/gamedb/recent","name":"Unknown","maintainers":["TonyRL"],"location":"gamedb.ts"}} /> + +## Inoreader {#inoreader} + +### Unknown {#inoreader-unknown} + +<Route namespace="inoreader" data={{"path":"/html_clip/:user/:tag","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## Instagram {#instagram} + +:::tip +It's highly recommended to deploy with Redis cache enabled. +::: + +### Unknown {#instagram-unknown} + +<Route namespace="picnob" data={{"path":"/user/:id","radar":{"source":["picnob.com/profile/:id/*"]},"name":"Unknown","maintainers":["TonyRL","micheal-death"],"location":"user.ts"}} /> ## Instructables {#instructables} ### Projects {#instructables-projects} -<Route author="wolfg1969" example="/instructables/projects/circuits" path="/instructables/projects/:category?" paramsDesc={['Category, empty by default, can be found in URL or see the table below']} radar="1"> - | All | Circuits | Workshop | Craft | Cooking | Living | Outside | Teachers | - | --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- | - | | circuits | workshop | craft | cooking | living | outside | teachers | -</Route> +<Route namespace="instructables" data={{"path":"/projects/:category?","categories":["other"],"example":"/instructables/projects/circuits","parameters":{"category":"Category, empty by default, can be found in URL or see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["instructables.com/projects"],"target":"/projects"},"name":"Projects","maintainers":["wolfg1969"],"url":"instructables.com/projects","description":"| All | Circuits | Workshop | Craft | Cooking | Living | Outside | Teachers |\n | --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- |\n | | circuits | workshop | craft | cooking | living | outside | teachers |","location":"projects.ts"}} /> + +| All | Circuits | Workshop | Craft | Cooking | Living | Outside | Teachers | +| --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- | +| | circuits | workshop | craft | cooking | living | outside | teachers | + +## itch.io {#itch-io} + +### Unknown {#itch-io-unknown} + +<Route namespace="itch" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## iwara {#iwara} + +### Unknown {#iwara-unknown} + +<Route namespace="iwara" data={{"path":"/users/:username?/:type?","name":"Unknown","maintainers":["Fatpandac"],"location":"index.ts"}} /> ## Japanpost 日本郵便 {#japanpost-ri-ben-you-bian} ### Track & Trace Service 郵便追跡サービス {#japanpost-ri-ben-you-bian-track-trace-service-you-bian-zhui-ji-%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9} -<Route author="tuzi3040" example="/japanpost/track/EJ123456789JP/en" path="/japanpost/track/:reqCode/:locale?" paramsDesc={['Package Number', 'Language, default to japanese `ja`']} radar="1" notOperational="1"> - | Japanese | English | - | -------- | ------- | - | ja | en | -</Route> +<Route namespace="japanpost" data={{"path":"/track/:reqCode/:locale?","categories":["other"],"example":"/japanpost/track/EJ123456789JP/en","parameters":{"reqCode":"Package Number","locale":"Language, default to japanese `ja`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Track & Trace Service 郵便追跡サービス","maintainers":["tuzi3040"],"description":"| Japanese | English |\n | -------- | ------- |\n | ja | en |","location":"track.ts"}} /> + +| Japanese | English | +| -------- | ------- | +| ja | en | + +## JavBus {#javbus} + +:::warning +Requests from non-Asia areas will be redirected to login page. +::: + +:::tip[Language] +You can change the language of each route to the languages listed below. + +| English | 日本语 | 한국의 | 中文 | +| ------- | ------ | ------ | ---------------- | +| en | ja | ko | (leave it empty) | +::: + +:::tip +JavBus has multiple backup domains, these routes use default domain `https://javbus.com`. If the domain is unreachable, you can add `?domain=<domain>` to the end of the route to specify the domain to visit. Let say you want to use the backup domain `https://javsee.icu`, you can add `?domain=javsee.icu` to the end of the route, then the route will be [`/javbus/en?domain=javsee.icu`](https://rsshub.app/javbus?domain=javsee.icu) + +**Note**: **Western** has different domain than the main site, the backup domains are also different. The default domain is `https://javbus.org` and you can add `?western_domain=<domain>` to the end of the route to specify the domain to visit. Let say you want to use the backup domain `https://javsee.one`, you can add `?western_domain=javsee.one` to the end of the route, then the route will be [`/javbus/western/en?western_domain=javsee.one`](https://rsshub.app/javbus/western?western_domain=javsee.one) +::: + +### Unknown {#javbus-unknown} + +<Route namespace="javbus" data={{"path":"*","radar":{"source":["www.seejav.pw/"],"target":""},"name":"Unknown","maintainers":[],"url":"www.seejav.pw/","location":"index.ts"}} /> + +## JavDB {#javdb} + +:::tip +JavDB 有多个备用域名,本路由默认使用永久域名 `https://javdb.com` ,若该域名无法访问,可以通过在路由最后加上 `?domain=<域名>` 指定路由访问的域名。如指定备用域名为 `https://javdb36.com`,则在所有 JavDB 路由最后加上 `?domain=javdb36.com` 即可,此时路由为 [`/javdb?domain=javdb36.com`](https://rsshub.app/javdb?domain=javdb36.com) + +如果加入了 **分類** 参数,直接在分類参数后加入 `?domain=<域名>` 即可。如指定分類 URL 为 `https://javdb.com/tags?c2=5&c10=1` 并指定备用域名为 `https://javdb36.com`,即在 `/javdb/tags/c2=5&c10=1` 最后加上 `?domain=javdb36.com`,此时路由为 [`/javdb/tags/c2=5&c10=1?domain=javdb36.com`](https://rsshub.app/javdb/tags/c2=5\&c10=1?domain=javdb36.com) + +**排行榜**、**搜索**、**演員**、**片商** 参数同适用于 **分類** 参数的上述规则 +::: + +:::tip +你可以通过指定 `limit` 参数来获取特定数量的条目,即可以通过在路由后方加上 `?limit=25`,默认为单次获取 20 个条目,即默认 `?limit=20` + +因为该站有反爬检测,所以不应将此值调整过高 +::: + +### Unknown {#javdb-unknown} + +<Route namespace="javdb" data={{"path":["/home/:category?/:sort?/:filter?","/:category?/:sort?/:filter?"],"radar":{"source":["javdb.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"javdb.com/","description":"分类\n\n | 有碼 | 無碼 | 歐美 |\n | -------- | ---------- | ------- |\n | censored | uncensored | western |\n\n 排序\n\n | 发布日期排序 | 磁鏈更新排序 |\n | ------------ | ------------ |\n | 1 | 2 |\n\n 过滤\n\n | 全部 | 可下载 | 含字幕 | 含短評 |\n | ---- | ------ | ------ | ------ |\n | 0 | 1 | 2 | 3 |","location":"index.ts"}} /> + +分类 + +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | + +排序 + +| 发布日期排序 | 磁鏈更新排序 | +| ------------ | ------------ | +| 1 | 2 | + +过滤 + +| 全部 | 可下载 | 含字幕 | 含短評 | +| ---- | ------ | ------ | ------ | +| 0 | 1 | 2 | 3 | + +### Unknown {#javdb-unknown} + +<Route namespace="javdb" data={{"path":["/home/:category?/:sort?/:filter?","/:category?/:sort?/:filter?"],"radar":{"source":["javdb.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"javdb.com/","description":"分类\n\n | 有碼 | 無碼 | 歐美 |\n | -------- | ---------- | ------- |\n | censored | uncensored | western |\n\n 排序\n\n | 发布日期排序 | 磁鏈更新排序 |\n | ------------ | ------------ |\n | 1 | 2 |\n\n 过滤\n\n | 全部 | 可下载 | 含字幕 | 含短評 |\n | ---- | ------ | ------ | ------ |\n | 0 | 1 | 2 | 3 |","location":"index.ts"}} /> + +分类 + +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | + +排序 + +| 发布日期排序 | 磁鏈更新排序 | +| ------------ | ------------ | +| 1 | 2 | + +过滤 + +| 全部 | 可下载 | 含字幕 | 含短評 | +| ---- | ------ | ------ | ------ | +| 0 | 1 | 2 | 3 | + +### Unknown {#javdb-unknown} + +<Route namespace="javdb" data={{"path":"/lists/:id/:filter?/:sort?","radar":{"source":["javdb.com/"],"target":""},"name":"Unknown","maintainers":["dddepg"],"url":"javdb.com/","location":"lists.ts"}} /> + +## JAVLibrary {#javlibrary} + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/bestrated/:language?/:mode?","/bestrated/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| Last Month | All Time |\n | ---------- | -------- |\n | 1 | 2 |","location":"bestrated.ts"}} /> + +| Last Month | All Time | +| ---------- | -------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/bestrated/:language?/:mode?","/bestrated/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| Last Month | All Time |\n | ---------- | -------- |\n | 1 | 2 |","location":"bestrated.ts"}} /> + +| Last Month | All Time | +| ---------- | -------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/genre/:genre?/:language?/:mode?","/genre/:genre?/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |\n\n :::tip\n See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories.\n :::","location":"genre.ts"}} /> + +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | + +:::tip +See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories. +::: + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/genre/:genre?/:language?/:mode?","/genre/:genre?/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |\n\n :::tip\n See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories.\n :::","location":"genre.ts"}} /> + +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | + +:::tip +See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories. +::: + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/mostwanted/:language?/:mode?","/mostwanted/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| Last Month | All Time |\n | ---------- | -------- |\n | 1 | 2 |","location":"mostwanted.ts"}} /> + +| Last Month | All Time | +| ---------- | -------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/mostwanted/:language?/:mode?","/mostwanted/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| Last Month | All Time |\n | ---------- | -------- |\n | 1 | 2 |","location":"mostwanted.ts"}} /> + +| Last Month | All Time | +| ---------- | -------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/newentries/:language?","/newentries/:language?"],"name":"Unknown","maintainers":[],"location":"newentries.ts"}} /> + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/newentries/:language?","/newentries/:language?"],"name":"Unknown","maintainers":[],"location":"newentries.ts"}} /> + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/newrelease/:language?/:mode?","/newrelease/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |","location":"newrelease.ts"}} /> + +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/newrelease/:language?/:mode?","/newrelease/:language?/:mode?"],"name":"Unknown","maintainers":[],"description":"| videos with comments (by date) | everything (by date) |\n | ------------------------------ | -------------------- |\n | 1 | 2 |","location":"newrelease.ts"}} /> + +| videos with comments (by date) | everything (by date) | +| ------------------------------ | -------------------- | +| 1 | 2 | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/update/:language?","/update/:language?"],"name":"Unknown","maintainers":[],"location":"update.ts"}} /> + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/videos/update/:language?","/update/:language?"],"name":"Unknown","maintainers":[],"location":"update.ts"}} /> + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/users/:id/:type/:language?","/:type/:id/:language?"],"name":"Unknown","maintainers":[],"description":"| Wanted | Watched | Owned |\n | ---------- | ----------- | --------- |\n | userwanted | userwatched | userowned |","location":"user.ts"}} /> + +| Wanted | Watched | Owned | +| ---------- | ----------- | --------- | +| userwanted | userwatched | userowned | + +### Unknown {#javlibrary-unknown} + +<Route namespace="javlibrary" data={{"path":["/users/:id/:type/:language?","/:type/:id/:language?"],"name":"Unknown","maintainers":[],"description":"| Wanted | Watched | Owned |\n | ---------- | ----------- | --------- |\n | userwanted | userwatched | userowned |","location":"user.ts"}} /> + +| Wanted | Watched | Owned | +| ---------- | ----------- | --------- | +| userwanted | userwatched | userowned | + +## Kantar Worldpanel {#kantar-worldpanel} + +### Unknown {#kantar-worldpanel-unknown} + +<Route namespace="kantarworldpanel" data={{"path":"/:region?/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## KeePass {#keepass} + +### Unknown {#keepass-unknown} + +<Route namespace="keepass" data={{"path":"/","name":"Unknown","maintainers":["TonyRL"],"location":"news.ts"}} /> ## Layoffs.fyi {#layoffs-fyi} -### Layoff Data Tracker {#layoffs-fyi-layoff-data-tracker} +### Unknown {#layoffs-fyi-unknown} -<Route author="BrandNewLifeJackie26" example="/layoffs" path="/layoffs" radar="1" anticrawler="1" /> +<Route namespace="layoffs" data={{"path":"/","radar":{"source":["layoffs.fyi/"],"target":""},"name":"Unknown","maintainers":["BrandNewLifeJackie26"],"url":"layoffs.fyi/","location":"index.ts"}} /> -RSS source in the original site is outdated. +## LeetCode {#leetcode} -## LinkedIn {#linkedin} +### Unknown {#leetcode-unknown} -### Jobs {#linkedin-jobs} +<Route namespace="leetcode" data={{"path":"/dailyquestion/cn","radar":{"source":["leetcode.cn/"]},"name":"Unknown","maintainers":[],"url":"leetcode.cn/","location":"dailyquestion-cn.ts"}} /> -<Route author="BrandNewLifeJackie26" example="/linkedin/jobs/C-P/1/software engineer" path="/linkedin/jobs/:job_types/:exp_levels/:keywords?" paramsDesc={['See the following table for details, use \'-\' as delimiter', 'See the following table for details, use \'-\' as delimiter', 'keywords']} radar="1"> - #### `job_types` list +### Unknown {#leetcode-unknown} - | Full Time | Part Time | Contractor | All | - | --------- | --------- | ---------- | --- | - | F | P | C | all | +<Route namespace="leetcode" data={{"path":"/dailyquestion/en","radar":{"source":["leetcode.com/"]},"name":"Unknown","maintainers":[],"url":"leetcode.com/","location":"dailyquestion-en.ts"}} /> - #### `exp_levels` list +### Unknown {#leetcode-unknown} - | Intership | Entry Level | Associate | Mid-Senior Level | Director | All | - | --------- | ----------- | --------- | ---------------- | -------- | --- | - | 1 | 2 | 3 | 4 | 5 | all | +<Route namespace="leetcode" data={{"path":"/dailyquestion/solution/cn","radar":{"source":["leetcode.cn/"]},"name":"Unknown","maintainers":[],"url":"leetcode.cn/","location":"dailyquestion-solution-cn.ts"}} /> - For example: +### Unknown {#leetcode-unknown} - 1. If we want to search software engineer jobs of all levels and all job types, use `/linkedin/jobs/all/all/software engineer` - 2. If we want to search all entry level contractor/part time software engineer jobs, use `/linkedin/jobs/P-C/2/software engineer` +<Route namespace="leetcode" data={{"path":"/dailyquestion/solution/en","radar":{"source":["leetcode.com/"]},"name":"Unknown","maintainers":[],"url":"leetcode.com/","location":"dailyquestion-solution-en.ts"}} /> - **To make it easier, the recommended way is to start a search on [LinkedIn](https://www.linkedin.com/jobs/search) and use [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) to load the specific feed.** -</Route> +## Link Research {#link-research} + +### Unknown {#link-research-unknown} + +<Route namespace="linkresearcher" data={{"path":"/:params","name":"Unknown","maintainers":["yech1990"],"location":"index.ts"}} /> ## LinkedIn 领英中国 {#linkedin-ling-ying-zhong-guo} ### Jobs {#linkedin-ling-ying-zhong-guo-jobs} -<Route author="bigfei" example="/linkedin/cn/jobs/Software" path="/linkedin/cn/jobs/:keywords?" paramsDesc={['搜索关键字']} radar="1" notOperational="1"> - 另外,可以通过添加额外的以下 query 参数来输出满足特定要求的工作职位: +<Route namespace="linkedin" data={{"path":"/jobs/:job_types/:exp_levels/:keywords?","categories":["other"],"example":"/linkedin/jobs/C-P/1/software engineer","parameters":{"job_types":"See the following table for details, use '-' as delimiter","exp_levels":"See the following table for details, use '-' as delimiter","keywords":"keywords"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Jobs","maintainers":[],"description":"#### `job_types` list\n\n | Full Time | Part Time | Contractor | All |\n | --------- | --------- | ---------- | --- |\n | F | P | C | all |\n\n #### `exp_levels` list\n\n | Intership | Entry Level | Associate | Mid-Senior Level | Director | All |\n | --------- | ----------- | --------- | ---------------- | -------- | --- |\n | 1 | 2 | 3 | 4 | 5 | all |\n\n For example:\n\n 1. If we want to search software engineer jobs of all levels and all job types, use `/linkedin/jobs/all/all/software engineer`\n 2. If we want to search all entry level contractor/part time software engineer jobs, use `/linkedin/jobs/P-C/2/software engineer`\n\n **To make it easier, the recommended way is to start a search on [LinkedIn](https://www.linkedin.com/jobs/search) and use [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) to load the specific feed.**","location":"jobs.ts"}} /> - | 参数 | 描述 | 举例 | 默认值 | - | ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- | - | `geo` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 | - | `remote` | 是否只显示远程工作 | `true/false` | `false` | - | `location` | 工作地点 | `china/shanghai/beijing` | 空 | - | `relevant` | 排序方式 (true: 按相关性排序,false: 按日期排序) | `true/false` | `false` | - | `period` | 发布时间 | `1/7/30` | 空 | +#### `job_types` list {#linkedin-ling-ying-zhong-guo-jobs-job-types-list} - 例如: - [`/linkedin/cn/jobs/Software?location=shanghai&period=1`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai\&period=1): 查找所有在上海的今日发布的所有 Software 工作 +| Full Time | Part Time | Contractor | All | +| --------- | --------- | ---------- | --- | +| F | P | C | all | - **为了方便起见,建议您在 [LinkedIn.cn](https://www.linkedin.cn/incareer/jobs/search) 上进行搜索,并使用 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 加载特定的 feed。** -</Route> +#### `exp_levels` list {#linkedin-ling-ying-zhong-guo-jobs-exp-levels-list} -## MiniFlux {#miniflux} +| Intership | Entry Level | Associate | Mid-Senior Level | Director | All | +| --------- | ----------- | --------- | ---------------- | -------- | --- | +| 1 | 2 | 3 | 4 | 5 | all | -因需设置 API Key,故请自行架设 RSSHub。API 密钥则请于 MiniFlux 实例中的 `设置` -> `API密钥` -> `创建一个新的API密钥` 处获取。 +For example: -### 订阅列表 {#miniflux-ding-yue-lie-biao} +1. If we want to search software engineer jobs of all levels and all job types, use `/linkedin/jobs/all/all/software engineer` +2. If we want to search all entry level contractor/part time software engineer jobs, use `/linkedin/jobs/P-C/2/software engineer` -<Route author="emdoe" example="/miniflux/subscription/categories=科技,影音" path="/miniflux/subscription/:parameters?" paramsDesc={['分类名或分类 ID 或/且 订阅源名称或订阅源 ID']} configRequired="1"> - 1. 如无指定参数,默认输出全部订阅源 - 2. 分类 ID 或订阅源 ID 请于`分类`(快捷键 `g` `c`)或`源`(快捷键 `g` `f`)页面获取,每个分类(或订阅源)的网址即显示其 ID 信息。 - 3. 支持分类名称和分类 ID,如需输出多个分类,请重复输入 `category=` 并用 `&` 连接,或者不同的分类名之间直接用**英文**逗号连接。举例来说,可以通过 `/miniflux/subscription/category=科技&category=1` 或者 `/miniflux/subscription/categories=科技,1` 实现订阅。 - 4. 支持指定订阅源名称或订阅源 ID,方法与分类的设定类似。举例来说,可以通过 `/miniflux/subscription/feed=1&feed=Archdaily` 或者 `/miniflux/subscription/feeds=1,Archdaily` 实现订阅。 - 5. 支持同时指定订阅源信息和分类信息,将输出满足分类选项的订阅源信息。考虑一例:通过 `/miniflux/subscription/feeds=1,archdaily&category=art,7`,则如果订阅源 ID 为 1 或者订阅源名称为 ArchDaily 确实在分类 `art` 或者分类 ID 为 7 的分类下,则输出该订阅源信息。 -</Route> +**To make it easier, the recommended way is to start a search on [LinkedIn](https://www.linkedin.com/jobs/search) and use [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) to load the specific feed.** -### 获取订阅源内容 {#miniflux-huo-qu-ding-yue-yuan-nei-rong} +### Jobs {#linkedin-ling-ying-zhong-guo-jobs} -<Route author="emdoe" example="/miniflux/feeds=1&2&3/mark=read&limit=7&status=unread" path="/miniflux/:feeds/:parameters?" paramsDesc={['订阅源 ID 或获取全部', '过滤及设置参数,多个请用 `&` 连接']} configRequired="1"> - 1. 支持获取全部内容:即可通过 `/miniflux/all` 或 `/miniflux/default` 等关键字获取全部订阅源下的内容。 - 2. 支持通过订阅源的 ID 获取指定订阅源的订阅内容,订阅源 ID 请于`源`(快捷键 `g` `f`)所在的页面获取,每个分类(或订阅源)的网址即显示其 ID 信息。而格式上有如下选择: - 1. 支持 `/miniflux/feed=[feed_id]`,请将 `[feed_id]` 替换为实际订阅的订阅源 ID(注意不包含括号,即单纯为一个数字) - 2. 支持 `/miniflux/feed=[feed1_id]&feed=[feed2_id]` 或 `/miniflux/feeds=[feed1_id]&[feed2_id]` 订阅多个订阅源 - 3. 以上还支持简写,即直接使用订阅源 ID:`/miniflux/[feed1_id]&[feed2_id]` - 3. 可进一步根据需要,指定参数: - 1. 支持 MiniFlux 提供的所有参数[选项](https://miniflux.app/docs/api.html#endpoint-get-feed-entries)。同其文档所注相同,多个过滤选项之间请用 `&` 连接。除去 `status` 外,多个相同的过滤选项应只会读取第一个。 - 2. 特别的,本路由将默认指定排序方式为从新到旧排序(`direction=desc`)。 - 3. 此外,本路由另支持额外的选项,包括: - 1. 利用 `feed_name` 参数控制标题格式,`feed_name=1` 即输出的每一篇标题会变为 `文章标题 | 订阅源名称`,默认为 `feed_name=0`,即只输出文章标题。 - 2. 利用 `mark` 参数控制在 RSSHub 获取订阅内容之后的动作,包括维持不变(`unchanged`,默认),标记为已读(`read`),移除(`removed`),以及标记为未读(`unread`)。**注意,请不要将标记为已读简单的理解为是用于实现某种同步服务的**,这个功能更像是在辅助 MiniFlux 的自动清理功能。 - 3. 未来可能会支持利用 `link` 参数控制输出内容的网址(支持这个功能需要 MiniFlux 未来提供相应的接口),设定为通过 MiniFlux 实体的分享功能生成的网址或原始内容的网址。请注意,如果利用 MiniFlux 的分享功能,这些文章内容均不会被自动清理。 - 4. 可以通过 `limit` 参数控制输出内容的数量,默认输出全部符合其它条件的所有内容,但**建议用户设置该参数**。不过众所周知,RSSHub 提供全局参数 `?limit` 控制输出内容的数量,但如果用户存在设置错误,则可能出现一些奇怪的问题:不妨考虑用户的参数设定为 `miniflux/all/limit=5&status=unread&mark=read?limit=3`,那么则有两篇用户未读的文章自动被标记为已读,用户却很可能从未发现。为避免出现这样的情形,本路由对该参数的设定作出如下调整: - 1. 选择输出全部内容时,如果同时设定两个参数,则取设定数值较小的那个,否则按照用户设定控制输出内容的数量。 - 2. 选择输出指定订阅源时,`&limit=` 参数控制**每一个**订阅源的输出数量,`?limit=` 控制**最终**输出内容的数量。不妨假设用户指定聚合两个订阅源,那么 `/miniflux/1&2/mark=read&limit=3` 与 `/miniflux/1&2/mark=read?limit=6` 的效果相同,除非 - 3. 用户设定的 `&limit` 值小于 `?limit`,路由会以 `&limit` 设定为准:即最终输出内容数量 = `&limit` 参数值 \* 订阅源数量,或者如果 - 4. 用户设定的 `&limit` 值大于 `?limit` 参数,又或者 `?limit` 参数并非是订阅源数量的整数倍,则路由将用 `?limit` 参数除去订阅源数量,并向下取整,每个订阅源将输出所得数字篇内容(如果得数为 0,则修改为每个订阅源输出 1 篇文章)。 - 5. 考虑一例:`/miniflux/1&2&3/status=unread&limit=2?limit=5` 或 `/miniflux/1&2&3/status=unread&limit=2?limit=7`,最终的输出结果均为 `/miniflux/1&2&3/status=unread&limit=2`,等效于 `/miniflux/1&2&3/status=unread?limit=6` - 6. 考虑另一例:`/miniflux/1&2&3/status=unread?limit=2`,因为 2 / 3 ≈ 0.667 -> 0 -> 1,所以等效于 `/miniflux/1&2&3/status=unread?limit=3`,亦等效于 `/miniflux/1&2&3/status=unread&limit=1` - 5. 以上选项均与 MiniFlux 的 API 的行为保持一致,如果用户错误重复设定某参数,只读取第一个设定的值。 +<Route namespace="linkedin" data={{"path":"/cn/jobs/:keywords?","categories":["other"],"example":"/linkedin/cn/jobs/Software","parameters":{"keywords":"搜索关键字"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Jobs","maintainers":["bigfei"],"description":"另外,可以通过添加额外的以下 query 参数来输出满足特定要求的工作职位:\n\n | 参数 | 描述 | 举例 | 默认值 |\n | ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- |\n | `geo` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 |\n | `remote` | 是否只显示远程工作 | `true/false` | `false` |\n | `location` | 工作地点 | `china/shanghai/beijing` | 空 |\n | `relevant` | 排序方式 (true: 按相关性排序,false: 按日期排序) | `true/false` | `false` |\n | `period` | 发布时间 | `1/7/30` | 空 |\n\n 例如:\n [`/linkedin/cn/jobs/Software?location=shanghai&period=1`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai&period=1): 查找所有在上海的今日发布的所有 Software 工作\n\n **为了方便起见,建议您在 [LinkedIn.cn](https://www.linkedin.cn/incareer/jobs/search) 上进行搜索,并使用 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 加载特定的 feed。**","location":"cn/index.ts"}} /> - 一例:如果用户希望输出全部订阅源中,最旧的两篇未读的文章,并希望在文章的标题栏显示订阅源的名字,同时希望输出内容在 MiniFlux 中被标为已读,那么路由设置应为:`/miniflux/all/direction=asc&status=unread&feed_name=1&mark=read&limit=2` -</Route> +另外,可以通过添加额外的以下 query 参数来输出满足特定要求的工作职位: + +| 参数 | 描述 | 举例 | 默认值 | +| ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- | +| `geo` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 | +| `remote` | 是否只显示远程工作 | `true/false` | `false` | +| `location` | 工作地点 | `china/shanghai/beijing` | 空 | +| `relevant` | 排序方式 (true: 按相关性排序,false: 按日期排序) | `true/false` | `false` | +| `period` | 发布时间 | `1/7/30` | 空 | + +例如: +[`/linkedin/cn/jobs/Software?location=shanghai&period=1`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai\&period=1): 查找所有在上海的今日发布的所有 Software 工作 + +**为了方便起见,建议您在 [LinkedIn.cn](https://www.linkedin.cn/incareer/jobs/search) 上进行搜索,并使用 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 加载特定的 feed。** + +## Liquipedia {#liquipedia} + +### Unknown {#liquipedia-unknown} + +<Route namespace="liquipedia" data={{"path":"/counterstrike/matches/:team","radar":{"source":["liquipedia.net/counterstrike/:id/Matches","liquipedia.net/dota2/:id"],"target":"/counterstrike/matches/:id"},"name":"Unknown","maintainers":["CookiePieWw"],"location":"cs-matches.ts"}} /> + +## Literotica {#literotica} + +### Unknown {#literotica-unknown} + +<Route namespace="literotica" data={{"path":"/category/:category","radar":{"source":["literotica.com/c/:category","literotica.com/"]},"name":"Unknown","maintainers":["nczitzk"],"location":"category.ts"}} /> + +## LogoNews 标志情报局 {#logonews-biao-zhi-qing-bao-ju} + +### Unknown {#logonews-biao-zhi-qing-bao-ju-unknown} + +<Route namespace="logonews" data={{"path":["/work/tags/:tag","/tag/:tag","*"],"radar":{"source":["logonews.cn/work/tags/:tag"]},"name":"Unknown","maintainers":["nczitzk"],"url":"logonews.cn/work","description":"如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。","location":"index.ts"}} /> + +如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。 + +### Unknown {#logonews-biao-zhi-qing-bao-ju-unknown} + +<Route namespace="logonews" data={{"path":["/work/tags/:tag","/tag/:tag","*"],"radar":{"source":["logonews.cn/work/tags/:tag"]},"name":"Unknown","maintainers":["nczitzk"],"url":"logonews.cn/work","description":"如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。","location":"index.ts"}} /> + +如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。 + +### Unknown {#logonews-biao-zhi-qing-bao-ju-unknown} + +<Route namespace="logonews" data={{"path":["/work/tags/:tag","/tag/:tag","*"],"radar":{"source":["logonews.cn/work/tags/:tag"]},"name":"Unknown","maintainers":["nczitzk"],"url":"logonews.cn/work","description":"如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。","location":"index.ts"}} /> + +如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。 + +## lovelive-anime {#lovelive-anime} + +### Unknown {#lovelive-anime-unknown} + +<Route namespace="lovelive-anime" data={{"path":"/schedules/:serie?/:category?","name":"Unknown","maintainers":[],"location":"schedules.ts"}} /> + +## Mastodon {#mastodon} + +:::tip +Official user RSS: + +- RSS: `https://**:instance**/users/**:username**.rss` ([Example](https://pawoo.net/users/pawoo_support.rss)) +- Atom: ~~`https://**:instance**/users/**:username**.atom`~~ (Only for pawoo.net, [example](https://pawoo.net/users/pawoo_support.atom)) + +These feed do not include boosts (a.k.a. reblogs). RSSHub provides a feed for user timeline based on the Mastodon API, but to use that, you may need to create application on a Mastodon instance, and configure your RSSHub instance. Check the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. +::: + +### Unknown {#mastodon-unknown} + +<Route namespace="mastodon" data={{"path":"/account_id/:site/:account_id/statuses/:only_media?","name":"Unknown","maintainers":["notofoe"],"location":"account-id.ts"}} /> + +## Metacritic {#metacritic} + +### Unknown {#metacritic-unknown} + +<Route namespace="metacritic" data={{"path":"/:type?/:sort?/:filter?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## Ming Pao 明报 {#ming-pao-ming-bao} + +### Unknown {#ming-pao-ming-bao-unknown} + +<Route namespace="mingpao" data={{"path":"/:type?/:category?","name":"Unknown","maintainers":["TonyRL"],"location":"index.ts"}} /> ## Mozilla {#mozilla} ### Firefox Monitor {#mozilla-firefox-monitor} -<Route author="TonyRL" example="/firefox/breaches" path="/firefox/breaches" /> +<Route namespace="firefox" data={{"path":"/breaches","categories":["other"],"example":"/firefox/breaches","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["monitor.firefox.com/","monitor.firefox.com/breaches"]},"name":"Firefox Monitor","maintainers":["TonyRL"],"url":"monitor.firefox.com/","location":"breaches.ts"}} /> -## Nobel Prize {#nobel-prize} +### Unknown {#mozilla-unknown} -### List {#nobel-prize-list} +<Route namespace="firefox" data={{"path":"/release/:platform?","name":"Unknown","maintainers":[],"location":"release.ts"}} /> -<Route author="nczitzk" example="/nobelprize" path="/nobelprize/:caty" paramsDesc={['Category, see below, all by default']}> - | Physics | Chemistry | Physiology or Medicine | Literature | Peace | Economic Science | - | ------- | --------- | ---------------------- | ---------- | ----- | ----------------- | - | physics | chemistry | physiology-or-medicine | literature | peace | economic-sciences | -</Route> +## Nature Journal {#nature-journal} -## NOI 全国青少年信息学奥林匹克竞赛 {#noi-quan-guo-qing-shao-nian-xin-xi-xue-ao-lin-pi-ke-jing-sai} +:::tip +You can get all short name of a journal from [https://www.nature.com/siteindex](https://www.nature.com/siteindex) or [Journal List](#nature-journal-journal-list). +::: -### 新闻 {#noi-quan-guo-qing-shao-nian-xin-xi-xue-ao-lin-pi-ke-jing-sai-xin-wen} +### Unknown {#nature-journal-unknown} -<Route author="WenryXu" example="/noi" path="/noi" /> +<Route namespace="nature" data={{"path":"/news-and-comment/:journal?","radar":{"source":["nature.com/latest-news","nature.com/news","nature.com/"],"target":"/news"},"name":"Unknown","maintainers":["y9c","TonyRL"],"url":"nature.com/latest-news","location":"news-and-comment.ts"}} /> -### 获奖名单 {#noi-quan-guo-qing-shao-nian-xin-xi-xue-ao-lin-pi-ke-jing-sai-huo-jiang-ming-dan} +## NEEA 中国教育考试网 {#neea-zhong-guo-jiao-yu-kao-shi-wang} -<Route author="WenryXu" example="/noi/winners-list" path="/noi/winners-list" /> +### Unknown {#neea-zhong-guo-jiao-yu-kao-shi-wang-unknown} -### 各省新闻 {#noi-quan-guo-qing-shao-nian-xin-xi-xue-ao-lin-pi-ke-jing-sai-ge-sheng-xin-wen} +<Route namespace="neea" data={{"path":"/:type?","name":"Unknown","maintainers":["SunShinenny"],"location":"index.ts"}} /> -<Route author="WenryXu" example="/noi/province-news" path="/noi/province-news" /> +## Netflav {#netflav} -### 报名新闻 {#noi-quan-guo-qing-shao-nian-xin-xi-xue-ao-lin-pi-ke-jing-sai-bao-ming-xin-wen} +### Unknown {#netflav-unknown} -<Route author="WenryXu" example="/noi/rg-news" path="/noi/rg-news" notOperational="1" /> +<Route namespace="netflav" data={{"path":"/","radar":{"source":["netflav.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"netflav.com/","location":"index.ts"}} /> + +## Nintendo {#nintendo} + +### Unknown {#nintendo-unknown} + +<Route namespace="nintendo" data={{"path":"/eshop/cn","radar":{"source":["nintendoswitch.com.cn/software","nintendoswitch.com.cn/"]},"name":"Unknown","maintainers":[],"url":"nintendoswitch.com.cn/software","location":"eshop-cn.ts"}} /> + +### Unknown {#nintendo-unknown} + +<Route namespace="nintendo" data={{"path":"/eshop/hk","radar":{"source":["nintendo.com.hk/software/switch","nintendo.com.hk/"]},"name":"Unknown","maintainers":[],"url":"nintendo.com.hk/software/switch","location":"eshop-hk.ts"}} /> + +### Unknown {#nintendo-unknown} + +<Route namespace="nintendo" data={{"path":"/eshop/jp","radar":{"source":["nintendo.co.jp/software/switch/index.html","nintendo.co.jp/"]},"name":"Unknown","maintainers":[],"url":"nintendo.co.jp/software/switch/index.html","location":"eshop-jp.ts"}} /> + +### Unknown {#nintendo-unknown} + +<Route namespace="nintendo" data={{"path":"/eshop/us","radar":{"source":["nintendo.com/store/games","nintendo.com/"]},"name":"Unknown","maintainers":[],"url":"nintendo.com/store/games","location":"eshop-us.ts"}} /> ## Notion {#notion} @@ -374,47 +1009,53 @@ It is recommended to use with clipping tools such as Notion Web Clipper. ### Database {#notion-database} -<Route author="curly210102" example="/notion/database/a7cc133b68454f138011f1530a13531e" path="/notion/database/:databaseId" paramsDesc={['Database ID']} configRequired="1" radar="1"> - There is an optional query parameter called `properties=` that can be used to customize field mapping. There are three built-in fields: author, pubTime and link, which can be used to add additional information. +<Route namespace="notion" data={{"path":"/database/:databaseId","categories":["other"],"example":"/notion/database/a7cc133b68454f138011f1530a13531e","parameters":{"databaseId":"Database ID"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["notion.so/:id"],"target":"/database/:id"},"name":"Database","maintainers":["curly210102"],"description":"There is an optional query parameter called `properties=` that can be used to customize field mapping. There are three built-in fields: author, pubTime and link, which can be used to add additional information.\n\n For example, if you have set up three properties in your database - \"Publish Time\", \"Author\", and \"Original Article Link\" - then execute the following JavaScript code to get the result for the properties parameter.\n\n ```js\n encodeURIComponent(JSON.stringify({\"pubTime\": \"Publish Time\", \"author\": \"Author\", \"link\": \"Original Article Link\"}))\n ```\n\n There is an optional query parameter called `query=` that can be used to customize the search rules for your database, such as custom sorting and filtering rules.\n\n please refer to the [Notion API documentation](https://developers.notion.com/reference/post-database-query) and execute `encodeURIComponent(JSON.stringify(custom rules))` to provide the query parameter.","location":"database.ts"}} /> - For example, if you have set up three properties in your database - "Publish Time", "Author", and "Original Article Link" - then execute the following JavaScript code to get the result for the properties parameter. +There is an optional query parameter called `properties=` that can be used to customize field mapping. There are three built-in fields: author, pubTime and link, which can be used to add additional information. - ```js - encodeURIComponent(JSON.stringify({"pubTime": "Publish Time", "author": "Author", "link": "Original Article Link"})) - ``` +For example, if you have set up three properties in your database - "Publish Time", "Author", and "Original Article Link" - then execute the following JavaScript code to get the result for the properties parameter. - There is an optional query parameter called `query=` that can be used to customize the search rules for your database, such as custom sorting and filtering rules. +```js +encodeURIComponent(JSON.stringify({"pubTime": "Publish Time", "author": "Author", "link": "Original Article Link"})) +``` - please refer to the [Notion API documentation](https://developers.notion.com/reference/post-database-query) and execute `encodeURIComponent(JSON.stringify(custom rules))` to provide the query parameter. -</Route> +There is an optional query parameter called `query=` that can be used to customize the search rules for your database, such as custom sorting and filtering rules. -## ONE・一个 {#one-yi-ge} +please refer to the [Notion API documentation](https://developers.notion.com/reference/post-database-query) and execute `encodeURIComponent(JSON.stringify(custom rules))` to provide the query parameter. -### 图片文字问答 {#one-yi-ge-tu-pian-wen-zi-wen-da} +## NPM {#npm} -<Route author="fengkx" example="/one" path="/one" /> +### Unknown {#npm-unknown} + +<Route namespace="npm" data={{"path":"package/:name{(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*}","name":"Unknown","maintainers":[],"location":"package.ts"}} /> ## oshwhub 立创开源硬件平台 {#oshwhub-li-chuang-kai-yuan-ying-jian-ping-tai} ### OpenSource Square {#oshwhub-li-chuang-kai-yuan-ying-jian-ping-tai-opensource-square} -<Route author="tylinux" example="/oshwhub" path="/oshwhub/:sortType?" paramsDesc={['sortType']} radar="1" notOperational="1" /> +<Route namespace="oshwhub" data={{"path":"/:sortType?","categories":["other"],"example":"/oshwhub","parameters":{"sortType":"sortType"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"OpenSource Square","maintainers":["tylinux"],"location":"explore.ts"}} /> ## Panda {#panda} ### Feeds {#panda-feeds} -<Route author="lyrl" example="/usepanda/feeds/5718e53e7a84fb1901e059cc" path="/usepanda/feeds/:id" paramsDesc={['Feed ID']}> - | Channel | feedId | - | ------- | ------------------------ | - | Github | 5718e53e7a84fb1901e059cc | -</Route> +<Route namespace="usepanda" data={{"path":"/feeds/:id","categories":["other"],"example":"/usepanda/feeds/5718e53e7a84fb1901e059cc","parameters":{"id":"Feed ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Feeds","maintainers":["lyrl"],"description":"| Channel | feedId |\n | ------- | ------------------------ |\n | Github | 5718e53e7a84fb1901e059cc |","location":"index.ts"}} /> -## Parcel Tracking {#parcel-tracking} +| Channel | feedId | +| ------- | ------------------------ | +| Github | 5718e53e7a84fb1901e059cc | -### Hermes UK {#parcel-tracking-hermes-uk} +## Pikabu {#pikabu} -<Route author="HenryQW" example="/parcel/hermesuk/[tracking number]" path="/parcel/hermesuk/:tracking" paramsDesc={['Tracking number']} /> +### Unknown {#pikabu-unknown} + +<Route namespace="pikabu" data={{"path":"/:type/:name","name":"Unknown","maintainers":[],"location":"community.ts"}} /> + +## Proceedings of The National Academy of Sciences {#proceedings-of-the-national-academy-of-sciences} + +### Unknown {#proceedings-of-the-national-academy-of-sciences-unknown} + +<Route namespace="pnas" data={{"path":"/:topicPath{.+}?","radar":{"source":["pnas.org/*topicPath"],"target":"/:topicPath"},"name":"Unknown","maintainers":[],"url":"pnas.org/*topicPath","location":"index.ts"}} /> ## Product Hunt {#product-hunt} @@ -422,28 +1063,66 @@ It is recommended to use with clipping tools such as Notion Web Clipper. ### Today Popular {#product-hunt-today-popular} -<Route author="miaoyafeng Fatpandac" example="/producthunt/today" path="/producthunt/today" /> +<Route namespace="producthunt" data={{"path":"/today","categories":["other"],"example":"/producthunt/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.producthunt.com/"]},"name":"Today Popular","maintainers":["miaoyafeng","Fatpandac"],"url":"www.producthunt.com/","location":"today.ts"}} /> + +## PubMed {#pubmed} + +### Unknown {#pubmed-unknown} + +<Route namespace="pubmed" data={{"path":"/trending/:filters?","name":"Unknown","maintainers":["nczitzk"],"location":"trending.ts"}} /> ## PwC Strategy& {#pwc-strategy} ### Sustainability {#pwc-strategy-sustainability} -<Route author="mintyfrankie" example="/pwc/strategyand/sustainability" path="/pwc/strategyand/sustainability" puppeteer="1" /> +<Route namespace="pwc" data={{"path":"/strategyand/sustainability","categories":["other"],"example":"/pwc/strategyand/sustainability","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["strategyand.pwc.com/at/en/functions/sustainability-strategy/publications.html","strategyand.pwc.com/"]},"name":"Sustainability","maintainers":["mintyfrankie"],"url":"strategyand.pwc.com/at/en/functions/sustainability-strategy/publications.html","location":"sustainability.ts"}} /> -## Remote.work {#remote-work} +## QooApp {#qooapp} -### Remote.work Job Information {#remote-work-remote-work-job-information} +### Unknown {#qooapp-unknown} -<Route author="luyuhuang" example="/remote-work/all" path="/remote-work/:caty?" paramsDesc={['Job category, default to all']} radar="1"> - | All Jobs | Development | Design | Operation | Product | Other | Marketing | Sales | - | :------: | :---------: | :----: | :-------: | :-----: | :---: | :-------: | :---: | - | all | development | design | operation | product | other | marketing | sales | -</Route> +<Route namespace="qoo-app" data={{"path":"/notes/:lang?/topic/:topic","name":"Unknown","maintainers":["TonyRL"],"location":"notes/topic.ts"}} /> + +## Quicker {#quicker} + +### Unknown {#quicker-unknown} + +<Route namespace="quicker" data={{"path":["/update","/versions"],"name":"Unknown","maintainers":["Cesaryuan","nczitzk"],"url":"getquicker.net/Help/Versions","location":"versions.ts"}} /> + +### Unknown {#quicker-unknown} + +<Route namespace="quicker" data={{"path":["/update","/versions"],"name":"Unknown","maintainers":["Cesaryuan","nczitzk"],"url":"getquicker.net/Help/Versions","location":"versions.ts"}} /> + +## Radio France Internationale 法国国际广播电台 {#radio-france-internationale-fa-guo-guo-ji-guang-bo-dian-tai} + +### Unknown {#radio-france-internationale-fa-guo-guo-ji-guang-bo-dian-tai-unknown} + +<Route namespace="rfi" data={{"path":"/:path{.+}?","radar":{"source":["rfi.fr/*path"],"target":"/:path"},"name":"Unknown","maintainers":[],"url":"rfi.fr/*path","location":"news.ts"}} /> + +## Rare Historical Photos {#rare-historical-photos} + +### Unknown {#rare-historical-photos-unknown} + +<Route namespace="rarehistoricalphotos" data={{"path":"/","radar":{"source":["rarehistoricalphotos.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"rarehistoricalphotos.com/","location":"index.ts"}} /> + +## ResearchGate {#researchgate} + +### Unknown {#researchgate-unknown} + +<Route namespace="researchgate" data={{"path":"/publications/:id","radar":{"source":["researchgate.net/profile/:username"],"target":"/publications/:username"},"name":"Unknown","maintainers":[],"location":"publications.ts"}} /> + +## Routledge {#routledge} + +### Unknown {#routledge-unknown} + +<Route namespace="routledge" data={{"path":"/:bookName/book-series/:bookId","radar":{"source":["routledge.com/:bookName/book-series/:bookId"]},"name":"Unknown","maintainers":["TonyRL"],"location":"book-series.ts"}} /> ## RSSHub {#rsshub} ### Transformation - HTML {#rsshub-transformation-html} +<Route namespace="rsshub" data={{"path":"/transform/html/:url/:routeParams","categories":["other"],"example":"/rsshub/transform/html/https%3A%2F%2Fwechat2rss.xlab.app%2Fposts%2Flist%2F/item=div%5Bclass%3D%27post%2Dcontent%27%5D%20p%20a","parameters":{"url":"`encodeURIComponent`ed URL address","routeParams":"Transformation rules, requires URL encode"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Transformation - HTML","maintainers":["ttttmr"],"description":"Pass URL and transformation rules to convert HTML/JSON into RSS.\n\nSpecify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML.\n\n| Key | Meaning | Accepted Values | Default |\n| ----------------- | -------------------------------------------------------------- | --------------- | ---------------------- |\n| `title` | The title of the RSS | `string` | Extract from `<title>` |\n| `item` | The HTML elements as `item` using CSS selector | `string` | html |\n| `itemTitle` | The HTML elements as `title` in `item` using CSS selector | `string` | `item` element |\n| `itemTitleAttr` | The attributes of `title` element as title | `string` | Element text |\n| `itemLink` | The HTML elements as `link` in `item` using CSS selector | `string` | `item` element |\n| `itemLinkAttr` | The attributes of `link` element as link | `string` | `href` |\n| `itemDesc` | The HTML elements as `descrption` in `item` using CSS selector | `string` | `item` element |\n| `itemDescAttr` | The attributes of `descrption` element as description | `string` | Element html |\n| `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element |\n| `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html |\n\n Parameters parsing in the above example:\n\n | Parameter | Value |\n | ------------- | ----------------------------------------- |\n | `url` | `https://wechat2rss.xlab.app/posts/list/` |\n | `routeParams` | `item=div[class='post-content'] p a` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | --------- | ------------------------------- |\n | `item` | `div[class='post-content'] p a` |","location":"transform/html.ts"}} /> + Pass URL and transformation rules to convert HTML/JSON into RSS. Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from HTML. @@ -461,23 +1140,23 @@ Specify options (in the format of query string) in parameter `routeParams` param | `itemPubDate` | The HTML elements as `pubDate` in `item` using CSS selector | `string` | `item` element | | `itemPubDateAttr` | The attributes of `pubDate` element as pubDate | `string` | Element html | -<Route author="ttttmr" example="/rsshub/transform/html/https%3A%2F%2Fwechat2rss.xlab.app%2Fposts%2Flist%2F/item=div%5Bclass%3D%27post%2Dcontent%27%5D%20p%20a" path="/rsshub/transform/html/:url/:routeParams" paramsDesc={['`encodeURIComponent`ed URL address', 'Transformation rules, requires URL encode']} configRequired="1"> - Parameters parsing in the above example: +Parameters parsing in the above example: - | Parameter | Value | - | ------------- | ----------------------------------------- | - | `url` | `https://wechat2rss.xlab.app/posts/list/` | - | `routeParams` | `item=div[class='post-content'] p a` | +| Parameter | Value | +| ------------- | ----------------------------------------- | +| `url` | `https://wechat2rss.xlab.app/posts/list/` | +| `routeParams` | `item=div[class='post-content'] p a` | - Parsing of `routeParams` parameter: +Parsing of `routeParams` parameter: - | Parameter | Value | - | --------- | ------------------------------- | - | `item` | `div[class='post-content'] p a` | -</Route> +| Parameter | Value | +| --------- | ------------------------------- | +| `item` | `div[class='post-content'] p a` | ### Transformation - JSON {#rsshub-transformation-json} +<Route namespace="rsshub" data={{"path":"/transform/json/:url/:routeParams","categories":["other"],"example":"/rsshub/transform/json/https%3A%2F%2Fapi.github.com%2Frepos%2Fginuerzh%2Fgost%2Freleases/title=Gost%20releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body","parameters":{"url":"`encodeURIComponent`ed URL address","routeParams":"Transformation rules, requires URL encode"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Transformation - JSON","maintainers":["ttttmr"],"description":"Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from JSON.\n\n| Key | Meaning | Accepted Values | Default |\n| ------------- | ---------------------------------------- | --------------- | ------------------------------------------ |\n| `title` | The title of the RSS | `string` | Extracted from home page of current domain |\n| `item` | The JSON Path as `item` element | `string` | Entire JSON response |\n| `itemTitle` | The JSON Path as `title` in `item` | `string` | None |\n| `itemLink` | The JSON Path as `link` in `item` | `string` | None |\n| `itemDesc` | The JSON Path as `description` in `item` | `string` | None |\n| `itemPubDate` | The JSON Path as `pubDate` in `item` | `string` | None |\n\n:::tip\nJSON Path only supports format like `a.b.c`. if you need to access arrays, like `a[0].b`, you can write it as `a.0.b`.\n:::\n\n Parameters parsing in the above example:\n\n | Parameter | Value |\n | ------------- | ------------------------------------------------------------------------ |\n | `url` | `https://api.github.com/repos/ginuerzh/gost/releases` |\n | `routeParams` | `title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body` |\n\n Parsing of `routeParams` parameter:\n\n | Parameter | Value |\n | ----------- | --------------- |\n | `title` | `Gost releases` |\n | `itemTitle` | `tag_name` |\n | `itemLink` | `html_url` |\n | `itemDesc` | `body` |","location":"transform/json.ts"}} /> + Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from JSON. | Key | Meaning | Accepted Values | Default | @@ -493,756 +1172,2034 @@ Specify options (in the format of query string) in parameter `routeParams` param JSON Path only supports format like `a.b.c`. if you need to access arrays, like `a[0].b`, you can write it as `a.0.b`. ::: -<Route author="ttttmr" example="/rsshub/transform/json/https%3A%2F%2Fapi.github.com%2Frepos%2Fginuerzh%2Fgost%2Freleases/title=Gost%20releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body" path="/rsshub/transform/json/:url/:routeParams" paramsDesc={['`encodeURIComponent`ed URL address', 'Transformation rules, requires URL encode']} configRequired="1"> - Parameters parsing in the above example: +Parameters parsing in the above example: - | Parameter | Value | - | ------------- | ------------------------------------------------------------------------ | - | `url` | `https://api.github.com/repos/ginuerzh/gost/releases` | - | `routeParams` | `title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body` | +| Parameter | Value | +| ------------- | ------------------------------------------------------------------------ | +| `url` | `https://api.github.com/repos/ginuerzh/gost/releases` | +| `routeParams` | `title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body` | - Parsing of `routeParams` parameter: +Parsing of `routeParams` parameter: - | Parameter | Value | - | ----------- | --------------- | - | `title` | `Gost releases` | - | `itemTitle` | `tag_name` | - | `itemLink` | `html_url` | - | `itemDesc` | `body` | -</Route> +| Parameter | Value | +| ----------- | --------------- | +| `title` | `Gost releases` | +| `itemTitle` | `tag_name` | +| `itemLink` | `html_url` | +| `itemDesc` | `body` | -### Transformation - Sitemap {#rsshub-transformation-sitemap} +### Unknown {#rsshub-unknown} -Specify options (in the format of query string) in parameter `routeParams` parameter to extract data from Sitemap. (Follows Sitemap Protocol 0.9) +<Route namespace="rsshub" data={{"path":"/transform/sitemap/:url/:routeParams?","name":"Unknown","maintainers":["flrngel"],"location":"transform/sitemap.ts"}} /> -| Key | Meaning | Accepted Values | Default | -| ------- | -------------------- | --------------- | ---------------------- | -| `title` | The title of the RSS | `string` | Extract from `<title>` | +## SecIN 信息安全技术社区 {#secin-xin-xi-an-quan-ji-shu-she-qu} -<Route author="flrngel" example="/rsshub/transform/xml/https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml/" path="/rsshub/transform/html/:url/:routeParams?" paramsDesc={['`encodeURIComponent`ed URL address', 'Transformation rules, requires URL encode']} configRequired="1"> - Parameters parsing in the above example: +### Unknown {#secin-xin-xi-an-quan-ji-shu-she-qu-unknown} - | Parameter | Value | - | ------------- | -------------------------------------- | - | `url` | `https://www.sitemaps.org/sitemap.xml` | - | `routeParams` | `title=Example` | -</Route> +<Route namespace="sec-in" data={{"path":"/","name":"Unknown","maintainers":["p7e4"],"location":"index.ts"}} /> + +## Stratechery by Ben Thompson {#stratechery-by-ben-thompson} + +### Unknown {#stratechery-by-ben-thompson-unknown} + +<Route namespace="stratechery" data={{"path":"/","name":"Unknown","maintainers":["chazeon"],"location":"index.ts"}} /> + +## Sub HD {#sub-hd} + +### Unknown {#sub-hd-unknown} + +<Route namespace="subhd" data={{"path":"/:type?/:category?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## SupChina {#supchina} + +### Unknown {#supchina-unknown} + +<Route namespace="supchina" data={{"path":"/","radar":{"source":["supchina.com/feed","supchina.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"supchina.com/feed","location":"index.ts"}} /> + +## Surfshark {#surfshark} + +### Unknown {#surfshark-unknown} + +<Route namespace="surfshark" data={{"path":"/blog/:category{.+}?","name":"Unknown","maintainers":[],"location":"blog.ts"}} /> + +## TechPowerUp {#techpowerup} + +### Unknown {#techpowerup-unknown} + +<Route namespace="techpowerup" data={{"path":"/","radar":{"source":["techpowerup.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"techpowerup.com/","location":"index.ts"}} /> + +## The News Lens 關鍵評論 {#the-news-lens-guan-jian-ping-lun} + +### Unknown {#the-news-lens-guan-jian-ping-lun-unknown} + +<Route namespace="thenewslens" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## The Nikkei 日本経済新聞 {#the-nikkei-ri-ben-jing-ji-xin-wen} + +### Unknown {#the-nikkei-ri-ben-jing-ji-xin-wen-unknown} + +<Route namespace="nikkei" data={{"path":["/","/index"],"name":"Unknown","maintainers":[],"url":"www.nikkei.com/","location":"index.ts"}} /> + +### Unknown {#the-nikkei-ri-ben-jing-ji-xin-wen-unknown} + +<Route namespace="nikkei" data={{"path":["/","/index"],"name":"Unknown","maintainers":[],"url":"www.nikkei.com/","location":"index.ts"}} /> + +### Unknown {#the-nikkei-ri-ben-jing-ji-xin-wen-unknown} + +<Route namespace="nikkei" data={{"path":"/cn/*","name":"Unknown","maintainers":[],"location":"cn/index.ts"}} /> + +## TradingView {#tradingview} + +### Unknown {#tradingview-unknown} + +<Route namespace="tradingview" data={{"path":"/blog/:category{.+}?","name":"Unknown","maintainers":[],"location":"blog.ts"}} /> + +### Unknown {#tradingview-unknown} + +<Route namespace="tradingview" data={{"path":"/pine/:version?","radar":{"source":["tradingview.com/pine-script-docs/en/:version/Release_notes.html"],"target":"/pine/:version"},"name":"Unknown","maintainers":[],"location":"pine.ts"}} /> + +## Transcript Forest {#transcript-forest} + +### Unknown {#transcript-forest-unknown} + +<Route namespace="transcriptforest" data={{"path":"/:channel?","radar":{"source":["www.transcriptforest.com/en/channel"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"www.transcriptforest.com/en/channel","location":"index.ts"}} /> + +## Tribal Football {#tribal-football} + +### Unknown {#tribal-football-unknown} + +<Route namespace="tribalfootball" data={{"path":"/","radar":{"source":["tribalfootball.com/"],"target":""},"name":"Unknown","maintainers":["Rongronggg9"],"url":"tribalfootball.com/","location":"latest.ts"}} /> ## TV Tropes {#tv-tropes} ### Featured {#tv-tropes-featured} -<Route author="nczitzk" example="/tvtropes/featured/today" path="/tvtropes/featured/:category?" paramsDesc={['Category, see below, Today\'s Featured Trope by default']} radar="1"> - | Today's Featured Trope | Newest Trope | - | ---------------------- | ------------ | - | today | newest | -</Route> +<Route namespace="tvtropes" data={{"path":"/featured/:category?","categories":["other"],"example":"/tvtropes/featured/today","parameters":{"category":"Category, see below, Today's Featured Trope by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Featured","maintainers":["nczitzk"],"description":"| Today's Featured Trope | Newest Trope |\n | ---------------------- | ------------ |\n | today | newest |","location":"featured.ts"}} /> + +| Today's Featured Trope | Newest Trope | +| ---------------------- | ------------ | +| today | newest | + +## U.S. Food and Drug Administration {#u-s-food-and-drug-administration} + +### Unknown {#u-s-food-and-drug-administration-unknown} + +<Route namespace="fda" data={{"path":"/cdrh/:titleOnly?","radar":{"source":["fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates","fda.gov/"],"target":"/cdrh/:titleOnly"},"name":"Unknown","maintainers":[],"url":"fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates","location":"cdrh.ts"}} /> + +## ui.dev {#ui-dev} + +### Unknown {#ui-dev-unknown} + +<Route namespace="bytes" data={{"path":"/","radar":{"source":["bytes.dev/archives","bytes.dev/"],"target":""},"name":"Unknown","maintainers":["meixger"],"url":"bytes.dev/archives","location":"bytes.ts"}} /> + +## ui.dev {#ui-dev} + +### Unknown {#ui-dev-unknown} + +<Route namespace="reactnewsletter" data={{"path":"/","radar":{"source":["bytes.dev/issues","bytes.dev/"],"target":""},"name":"Unknown","maintainers":["meixger"],"url":"bytes.dev/issues","location":"reactnewsletter.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="acs" data={{"path":"/journal/:id","radar":{"source":["pubs.acs.org/journal/:id","pubs.acs.org/"]},"name":"Unknown","maintainers":["nczitzk"],"location":"journal.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="jseea" data={{"path":"/news/:type?","radar":{"source":["jseea.cn/webfile/news/:type"],"target":"/news/:type"},"name":"Unknown","maintainers":["schen1024"],"location":"news.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="mangadex" data={{"path":"/:id/:lang?","radar":{"source":["mangadex.org/title/:id/*","mangadex.org/title/:id"],"target":"/:id"},"name":"Unknown","maintainers":["vzz64"],"location":"index.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="metmuseum" data={{"path":"/exhibitions/:state?","name":"Unknown","maintainers":[],"location":"exhibitions.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="openwrt" data={{"path":"/releases/:brand/:model","radar":{"source":["openwrt.org/toh/:band/:model"],"target":"/releases/:model"},"name":"Unknown","maintainers":[],"location":"releases.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="test" data={{"path":"/:id","name":"Unknown","maintainers":["DIYgod","NeverBehave"],"location":"index.ts"}} /> + +## Unknown {#unknown} + +### Unknown {#unknown-unknown} + +<Route namespace="u9a9" data={{"path":["/:preview?","/search/:keyword/:preview?"],"radar":{"source":["u9a9.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"u9a9.com/","location":"index.ts"}} /> + +### Unknown {#unknown-unknown} + +<Route namespace="u9a9" data={{"path":["/:preview?","/search/:keyword/:preview?"],"radar":{"source":["u9a9.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"u9a9.com/","location":"index.ts"}} /> ## Urban Dictionary {#urban-dictionary} ### Random words {#urban-dictionary-random-words} -<Route author="TonyRL" example="/urbandictionary/random" path="/urbandictionary/random" radar="1" /> +<Route namespace="urbandictionary" data={{"path":"/random","categories":["other"],"example":"/urbandictionary/random","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["urbandictionary.com/random.php","urbandictionary.com/"]},"name":"Random words","maintainers":["TonyRL"],"url":"urbandictionary.com/random.php","location":"random.ts"}} /> + +## v1tx {#v1tx} + +### Unknown {#v1tx-unknown} + +<Route namespace="v1tx" data={{"path":"/","radar":{"source":["v1tx.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"v1tx.com/","location":"index.ts"}} /> ## V2rayShare {#v2rayshare} -### 免费节点 {#v2rayshare-mian-fei-jie-dian} +### Unknown {#v2rayshare-unknown} -<Route author="77taibai" example="/v2rayshare" path="/v2rayshare"> - 获取来自 V2rayShare 的免费节点,可以通过链接复制或下载 -</Route> +<Route namespace="v2rayshare" data={{"path":"/","radar":{"source":["v2rayshare.com/"],"target":""},"name":"Unknown","maintainers":["77taibai"],"url":"v2rayshare.com/","location":"index.ts"}} /> -## WeGene {#wegene} +## VCB-Studio {#vcb-studio} -### 最近更新 {#wegene-zui-jin-geng-xin} +### Unknown {#vcb-studio-unknown} -<Route author="LogicJake" example="/wegene/newest" path="/wegene/newest" radar="1" /> +<Route namespace="vcb-s" data={{"path":"/","radar":{"source":["vcb-s.com/"],"target":""},"name":"Unknown","maintainers":["cxfksword"],"url":"vcb-s.com/","location":"index.ts"}} /> -### 栏目 {#wegene-lan-mu} +## WallpaperHub {#wallpaperhub} -<Route author="LogicJake" example="/wegene/column/all/all" path="/wegene/column/:type/:category" paramsDesc={['栏目类型,all(全部项目) 或 weapp(专业版)','栏目分类']} radar="1"> - :::tip - type 为 all 时,category 参数不支持 cost 和 free - ::: +### Unknown {#wallpaperhub-unknown} - | 全部 | 祖源分析 | 付费 | 遗传性疾病 | 药物指南 | 免费 | 运动基因 | 营养代谢 | 心理特质 | 健康风险 | 皮肤特性 | 遗传特征 | - | ---- | -------- | ---- | ---------- | -------- | ---- | -------- | ---------- | ---------- | -------- | -------- | -------- | - | all | ancestry | cost | disease | drug | free | genefit | metabolism | psychology | risk | skin | traits | -</Route> +<Route namespace="wallpaperhub" data={{"path":"/","radar":{"source":["wallpaperhub.app/wallpaperhub","wallpaperhub.app/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"wallpaperhub.app/wallpaperhub","location":"index.ts"}} /> + +## Web3Caff {#web3caff} + +### Unknown {#web3caff-unknown} + +<Route namespace="web3caff" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## WFDF {#wfdf} ### News {#wfdf-news} -<Route author="HankChow" example="/wfdf/news" path="/wfdf/news" radar="1" /> +<Route namespace="wfdf" data={{"path":"/news","categories":["other"],"example":"/wfdf/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wfdf.sport/news/","wfdf.sport/"]},"name":"News","maintainers":["HankChow"],"url":"wfdf.sport/news/","location":"news.ts"}} /> ## Wise {#wise} ### FX Pair Yesterday {#wise-fx-pair-yesterday} -<Route author="HenryQW" example="/wise/pair/GBP/USD" path="/wise/pair/:source/:target" paramsDesc={['Base currency abbreviation','Quote currency abbreviation']} radar="1"> - Refer to [the list of supported currencies](https://wise.com/tools/exchange-rate-alerts/). -</Route> +<Route namespace="wise" data={{"path":"/pair/:source/:target","categories":["other"],"example":"/wise/pair/GBP/USD","parameters":{"source":"Base currency abbreviation","target":"Quote currency abbreviation"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"FX Pair Yesterday","maintainers":["HenryQW"],"description":"Refer to [the list of supported currencies](https://wise.com/tools/exchange-rate-alerts/).","location":"pair.ts"}} /> + +Refer to [the list of supported currencies](https://wise.com/tools/exchange-rate-alerts/). ## World Meteorological Centre Beijing {#world-meteorological-centre-beijing} -### Publish {#world-meteorological-centre-beijing-publish} +### Unknown {#world-meteorological-centre-beijing-unknown} -<Route author="nczitzk" example="/wmc-bj/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html" path="/wmc-bj/publish/:category?" paramsDesc={['Category, can be found in URL, `CRA-Reanalysis/2m-Temperature/6-hour/index.html` by default']} radar="1"> - :::tip - `category` is the text after `publish/` in the URL. +<Route namespace="wmc-bj" data={{"path":"/publish/:category{.+}?","name":"Unknown","maintainers":[],"location":"publish.ts"}} /> - 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 [http://www.wmc-bj.net/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html](http://www.wmc-bj.net/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html). 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). - ::: -</Route> +## Yahoo {#yahoo} + +### Unknown {#yahoo-unknown} + +<Route namespace="yahoo" data={{"path":"/news/en/:category?","name":"Unknown","maintainers":[],"location":"news/us/index.ts"}} /> + +## YouTube Live {#youtube-live} + +### Unknown {#youtube-live-unknown} + +<Route namespace="youtube" data={{"path":"/c/:username/:embed?","radar":{"source":["www.youtube.com/c/:id"],"target":"/c/:id"},"name":"Unknown","maintainers":[],"location":"custom.ts"}} /> + +## ZAKER {#zaker} + +### Unknown {#zaker-unknown} + +<Route namespace="zaker" data={{"path":"/:type/:id?","radar":{"source":["myzaker.com/:type/:id"],"target":"/:type/:id"},"name":"Unknown","maintainers":["LogicJake","kt286","AlexdanerZe","TonyRL"],"location":"index.ts"}} /> ## 艾瑞 {#ai-rui} ### 产业研究报告 {#ai-rui-chan-ye-yan-jiu-bao-gao} -<Route author="brilon Fatpandac" example="/iresearch/report" path="/iresearch/report" /> +<Route namespace="iresearch" data={{"path":"/report","categories":["other"],"example":"/iresearch/report","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.iresearch.com.cn/report.shtml"]},"name":"产业研究报告","maintainers":["brilon","Fatpandac"],"url":"www.iresearch.com.cn/report.shtml","location":"report.ts"}} /> ### 周度市场观察 {#ai-rui-zhou-du-shi-chang-guan-cha} -<Route author="nczitzk" example="/iresearch/weekly" path="/iresearch/weekly/:category?" paramsDesc={['分类,见下表,默认为全部']}> - | 家电行业 | 服装行业 | 美妆行业 | 食品饮料行业 | - | -------- | -------- | -------- | ------------ | -</Route> +<Route namespace="iresearch" data={{"path":"/weekly/:category?","categories":["other"],"example":"/iresearch/weekly","parameters":{"category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"周度市场观察","maintainers":["nczitzk"],"description":"| 家电行业 | 服装行业 | 美妆行业 | 食品饮料行业 |\n | -------- | -------- | -------- | ------------ |","location":"weekly.ts"}} /> + +| 家电行业 | 服装行业 | 美妆行业 | 食品饮料行业 | +| -------- | -------- | -------- | ------------ | ## 爱 Q 生活网 {#ai-q-sheng-huo-wang} ### 最近更新 {#ai-q-sheng-huo-wang-zui-jin-geng-xin} -<Route author="nczitzk" example="/iqnew/latest" path="/iqnew/latest" radar="1" /> +<Route namespace="iqnew" data={{"path":"/latest","categories":["other"],"example":"/iqnew/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["iqnew.com/post/new_100/","iqnew.com/"]},"name":"最近更新","maintainers":["nczitzk"],"url":"iqnew.com/post/new_100/","location":"latest.ts"}} /> -## 爱发电 {#ai-fa-dian} +## 爱思想 {#ai-si-xiang} -### 发现用户 {#ai-fa-dian-fa-xian-yong-hu} +### Unknown {#ai-si-xiang-unknown} -<Route author="sanmmm" example="/afdian/explore/hot/所有" path="/afdian/explore/:type/:category?" paramsDesc={['分类', '目录类型,默认为 `所有`']}> - 分类 +<Route namespace="aisixiang" data={{"path":["/ranking/:id?/:period?","/toplist/:id?/:period?"],"name":"Unknown","maintainers":["HenryQW","nczitzk"],"description":"| 文章点击排行 | 最近更新文章 | 文章推荐排行 |\n | ------------ | ------------ | ------------ |\n | 1 | 10 | 11 |","location":"toplist.ts"}} /> - | 推荐 | 最热 | - | ---- | ---- | - | rec | hot | +| 文章点击排行 | 最近更新文章 | 文章推荐排行 | +| ------------ | ------------ | ------------ | +| 1 | 10 | 11 | - 目录类型 +### Unknown {#ai-si-xiang-unknown} - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | -</Route> +<Route namespace="aisixiang" data={{"path":["/ranking/:id?/:period?","/toplist/:id?/:period?"],"name":"Unknown","maintainers":["HenryQW","nczitzk"],"description":"| 文章点击排行 | 最近更新文章 | 文章推荐排行 |\n | ------------ | ------------ | ------------ |\n | 1 | 10 | 11 |","location":"toplist.ts"}} /> -### 用户动态 {#ai-fa-dian-yong-hu-dong-tai} - -<Route author="sanmmm" example="/afdian/dynamic/@afdian" path="/afdian/dynamic/:uid?" paramsDesc={['用户id,用户动态页面url里可找到']} /> +| 文章点击排行 | 最近更新文章 | 文章推荐排行 | +| ------------ | ------------ | ------------ | +| 1 | 10 | 11 | ## 百度 {#bai-du} -### 搜索 {#bai-du-sou-suo} - -<Route author="CaoMeiYouRen" example="/baidu/search/rss" path="/baidu/search/:keyword" paramsDesc={['搜索关键词']} radar="1" anticrawler="1" /> - ### 热搜榜单 {#bai-du-re-sou-bang-dan} -<Route author="xyqfer" example="/baidu/top" path="/baidu/top/:board?" paramsDesc={['榜单,默认为 `realtime`']} radar="1"> - | 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 | - | -------- | ------ | ------ | -------- | ------ | ------ | - | realtime | novel | movie | teleplay | car | game | -</Route> +<Route namespace="baidu" data={{"path":"/top/:board?","categories":["other"],"example":"/baidu/top","parameters":{"board":"榜单,默认为 `realtime`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热搜榜单","maintainers":["xyqfer"],"description":"| 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 |\n | -------- | ------ | ------ | -------- | ------ | ------ |\n | realtime | novel | movie | teleplay | car | game |","location":"top.ts"}} /> + +| 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 | +| -------- | ------ | ------ | -------- | ------ | ------ | +| realtime | novel | movie | teleplay | car | game | + +### 搜索 {#bai-du-sou-suo} + +<Route namespace="baidu" data={{"path":"/search/:keyword","categories":["other"],"example":"/baidu/search/rss","parameters":{"keyword":"搜索关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"搜索","maintainers":["CaoMeiYouRen"],"location":"search.ts"}} /> + +## 北京大学 {#bei-jing-da-xue} + +### Unknown {#bei-jing-da-xue-unknown} + +<Route namespace="pku" data={{"path":"/eecs/:type?","name":"Unknown","maintainers":["Ir1d"],"location":"eecs.ts"}} /> + +### Unknown {#bei-jing-da-xue-unknown} + +<Route namespace="pku" data={{"path":"/ss/notice","radar":{"source":["ss.pku.edu.cn/index.php/newscenter/notice","ss.pku.edu.cn/"]},"name":"Unknown","maintainers":["legr4ndk"],"url":"ss.pku.edu.cn/index.php/newscenter/notice","location":"ss/notice.ts"}} /> + +## 北京航空航天大学 {#bei-jing-hang-kong-hang-tian-da-xue} + +### Unknown {#bei-jing-hang-kong-hang-tian-da-xue-unknown} + +<Route namespace="buaa" data={{"path":"/sme/:path{.+}?","name":"Unknown","maintainers":[],"location":"sme.ts"}} /> + +## 北京师范大学 {#bei-jing-shi-fan-da-xue} + +### Unknown {#bei-jing-shi-fan-da-xue-unknown} + +<Route namespace="bnu" data={{"path":"/fdy/:path{.+}?","name":"Unknown","maintainers":[],"location":"fdy.ts"}} /> + +### Unknown {#bei-jing-shi-fan-da-xue-unknown} + +<Route namespace="bnu" data={{"path":"/lib/:category?","radar":{"source":["www.lib.bnu.edu.cn/:category/index.htm"],"target":"/lib/:category"},"name":"Unknown","maintainers":["TonyRL"],"location":"lib.ts"}} /> + +## 北京市科学技术协会 {#bei-jing-shi-ke-xue-ji-shu-xie-hui} + +### Unknown {#bei-jing-shi-ke-xue-ji-shu-xie-hui-unknown} + +<Route namespace="bast" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 北京智源人工智能研究院 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan} + +### Unknown {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-unknown} + +<Route namespace="baai" data={{"path":["/hub/:tagId/:sort?/:range?","/hub/:tagId/:sort?","/hub/:sort?"],"name":"Unknown","maintainers":[],"location":"hub.ts"}} /> + +### Unknown {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-unknown} + +<Route namespace="baai" data={{"path":["/hub/:tagId/:sort?/:range?","/hub/:tagId/:sort?","/hub/:sort?"],"name":"Unknown","maintainers":[],"location":"hub.ts"}} /> + +### Unknown {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-unknown} + +<Route namespace="baai" data={{"path":["/hub/:tagId/:sort?/:range?","/hub/:tagId/:sort?","/hub/:sort?"],"name":"Unknown","maintainers":[],"location":"hub.ts"}} /> ## 贝壳研究院 {#bei-ke-yan-jiu-yuan} ### 研究成果 {#bei-ke-yan-jiu-yuan-yan-jiu-cheng-guo} -<Route author="shaomingbo" example="/ke/researchResults" path="/ke/researchResults" radar="1" /> +<Route namespace="ke" data={{"path":"/researchResults","categories":["other"],"example":"/ke/researchResults","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.research.ke.com/researchResults"]},"name":"研究成果","maintainers":["shaomingbo"],"url":"www.research.ke.com/researchResults","location":"results.ts"}} /> -## 毕马威 {#bi-ma-wei} +## 笔趣阁 {#bi-qu-ge} -### 洞察 {#bi-ma-wei-dong-cha} +:::tip +此处的 **笔趣阁** 指网络上使用和 **笔趣阁** 样式相似模板的小说阅读网站,包括但不限于下方列举的网址。 +::: -<Route author="LogicJake" example="/kpmg/insights" path="/kpmg/insights" /> +| 网址 | 名称 | +| ---------------------------------------------------- | ---------- | +| [https://www.xbiquwx.la](https://www.xbiquwx.la) | 笔尖中文 | +| [http://www.biqu5200.net](http://www.biqu5200.net) | 笔趣阁 | +| [https://www.xbiquge.so](https://www.xbiquge.so) | 笔趣阁 | +| [https://www.biqugeu.net](https://www.biqugeu.net) | 顶点小说网 | +| [http://www.b520.cc](http://www.b520.cc) | 笔趣阁 | +| [https://www.ahfgb.com](https://www.ahfgb.com) | 笔趣鸽 | +| [https://www.ibiquge.la](https://www.ibiquge.la) | 香书小说 | +| [https://www.biquge.tv](https://www.biquge.tv) | 笔趣阁 | +| [https://www.bswtan.com](https://www.bswtan.com) | 笔书网 | +| [https://www.biquge.co](https://www.biquge.co) | 笔趣阁 | +| [https://www.bqzhh.com](https://www.bqzhh.com) | 笔趣阁 | +| [http://www.biqugse.com](http://www.biqugse.com) | 笔趣阁 | +| [https://www.ibiquge.info](https://www.ibiquge.info) | 爱笔楼 | +| [https://www.ishuquge.com](https://www.ishuquge.com) | 书趣阁 | +| [https://www.mayiwxw.com](https://www.mayiwxw.com) | 蚂蚁文学 | + +### Unknown {#bi-qu-ge-unknown} + +<Route namespace="biquge" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 不良林 {#bu-liang-lin} + +### Unknown {#bu-liang-lin-unknown} + +<Route namespace="bulianglin" data={{"path":"/","radar":{"source":["bulianglin.com/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"bulianglin.com/","location":"bulianglin.ts"}} /> ## 成都住建蓉 e 办 {#cheng-du-zhu-jian-rong-e-ban} ### 商品住房购房登记 {#cheng-du-zhu-jian-rong-e-ban-shang-pin-zhu-fang-gou-fang-deng-ji} -<Route author="TonyRL" example="/cdzjryb/zw/projectList" path="/cdzjryb/zw/projectList" radar="1" /> +<Route namespace="cdzjryb" data={{"path":"/zw/projectList","categories":["other"],"example":"/cdzjryb/zw/projectList","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zw.cdzjryb.com/lottery/accept/projectList","zw.cdzjryb.com/"]},"name":"商品住房购房登记","maintainers":["TonyRL"],"url":"zw.cdzjryb.com/lottery/accept/projectList","location":"project-list.ts"}} /> -## 滴答清单 {#di-da-qing-dan} +## 创业邦 {#chuang-ye-bang} -### 习惯打卡 {#di-da-qing-dan-xi-guan-da-ka} +### Unknown {#chuang-ye-bang-unknown} + +<Route namespace="cyzone" data={{"path":["/channel/:id?","/:id?"],"radar":{"source":["cyzone.cn/channel/:id","cyzone.cn/"],"target":"/:id"},"name":"Unknown","maintainers":["nczitzk"],"description":"| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 |\n | ---- | ------ | ---- | ------ | ---- |\n | news | 5 | 14 | 13 | 8 |\n\n | 海外 | 消费 | 科技 | 医疗 | 文娱 |\n | ---- | ---- | ---- | ---- | ---- |\n | 10 | 9 | 7 | 27 | 11 |\n\n | 城市 | 政策 | 特写 | 干货 | 科技股 |\n | ---- | ---- | ---- | ---- | ------ |\n | 16 | 15 | 6 | 12 | 33 |","location":"index.ts"}} /> + +| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | +| ---- | ------ | ---- | ------ | ---- | +| news | 5 | 14 | 13 | 8 | + +| 海外 | 消费 | 科技 | 医疗 | 文娱 | +| ---- | ---- | ---- | ---- | ---- | +| 10 | 9 | 7 | 27 | 11 | + +| 城市 | 政策 | 特写 | 干货 | 科技股 | +| ---- | ---- | ---- | ---- | ------ | +| 16 | 15 | 6 | 12 | 33 | + +### Unknown {#chuang-ye-bang-unknown} + +<Route namespace="cyzone" data={{"path":["/channel/:id?","/:id?"],"radar":{"source":["cyzone.cn/channel/:id","cyzone.cn/"],"target":"/:id"},"name":"Unknown","maintainers":["nczitzk"],"description":"| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 |\n | ---- | ------ | ---- | ------ | ---- |\n | news | 5 | 14 | 13 | 8 |\n\n | 海外 | 消费 | 科技 | 医疗 | 文娱 |\n | ---- | ---- | ---- | ---- | ---- |\n | 10 | 9 | 7 | 27 | 11 |\n\n | 城市 | 政策 | 特写 | 干货 | 科技股 |\n | ---- | ---- | ---- | ---- | ------ |\n | 16 | 15 | 6 | 12 | 33 |","location":"index.ts"}} /> + +| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | +| ---- | ------ | ---- | ------ | ---- | +| news | 5 | 14 | 13 | 8 | + +| 海外 | 消费 | 科技 | 医疗 | 文娱 | +| ---- | ---- | ---- | ---- | ---- | +| 10 | 9 | 7 | 27 | 11 | + +| 城市 | 政策 | 特写 | 干货 | 科技股 | +| ---- | ---- | ---- | ---- | ------ | +| 16 | 15 | 6 | 12 | 33 | + +## 大连理工大学 {#da-lian-li-gong-da-xue} + +### Unknown {#da-lian-li-gong-da-xue-unknown} + +<Route namespace="dut" data={{"path":["/*/*","/:0?"],"name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +### Unknown {#da-lian-li-gong-da-xue-unknown} + +<Route namespace="dut" data={{"path":["/*/*","/:0?"],"name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 得到 {#de-dao} + +### Unknown {#de-dao-unknown} + +<Route namespace="dedao" data={{"path":"/:category?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 第一财经杂志 {#di-yi-cai-jing-za-zhi} + +### Unknown {#di-yi-cai-jing-za-zhi-unknown} + +<Route namespace="cbnweek" data={{"path":"/","radar":{"source":["cbnweek.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"cbnweek.com/","location":"index.ts"}} /> + +## 电脑玩物 {#dian-nao-wan-wu} + +### Unknown {#dian-nao-wan-wu-unknown} + +<Route namespace="playpcesor" data={{"path":"/","radar":{"source":["playpcesor.com/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"playpcesor.com/","location":"rss.ts"}} /> + +## 东北师范大学 {#dong-bei-shi-fan-da-xue} + +### Unknown {#dong-bei-shi-fan-da-xue-unknown} + +<Route namespace="nenu" data={{"path":"/sohac/*","name":"Unknown","maintainers":[],"location":"sohac.ts"}} /> + +### Unknown {#dong-bei-shi-fan-da-xue-unknown} + +<Route namespace="nenu" data={{"path":"/yjsy/*","name":"Unknown","maintainers":[],"location":"yjsy.ts"}} /> + +## 东莞教研网 {#dong-guan-jiao-yan-wang} + +### Unknown {#dong-guan-jiao-yan-wang-unknown} + +<Route namespace="dgjyw" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 豆瓣 {#dou-ban} + +### Unknown {#dou-ban-unknown} + +<Route namespace="douban" data={{"path":"/explore/column/:id","name":"Unknown","maintainers":[],"location":"other/explore-column.ts"}} /> + +### Unknown {#dou-ban-unknown} + +<Route namespace="douban" data={{"path":"/people/:userid/status/:routeParams?","name":"Unknown","maintainers":[],"location":"people/status.ts"}} /> + +## 端传媒 {#duan-chuan-mei} + +通过提取文章全文,以提供比官方源更佳的阅读体验。 :::warning -需要账号密码,详情见部署文档部分 RSS 模块配置 +付费内容全文可能需要登陆获取,详情见部署页面的配置模块。 ::: -<Route author="DIYgod" example="/dida365/habit/checkins" path="/dida365/habit/checkins" configRequired="1" /> +### Unknown {#duan-chuan-mei-unknown} -## 古诗文网 {#gu-shi-wen-wang} +<Route namespace="theinitium" data={{"path":"/:model?/:type?/:language?","name":"Unknown","maintainers":[],"location":"full.ts"}} /> -### 首页推荐 {#gu-shi-wen-wang-shou-ye-tui-jian} +## 二次元虫洞 {#er-ci-yuan-chong-dong} -<Route author="LogicJake" example="/gushiwen/recommend/zhushang" path="/gushiwen/recommend/:annotation?"> - `annotation` 字段为添加哪些附加信息。可从以下表格中选择值后按顺序拼接。例如如果需要注释和赏析,则为`zhushang`。 +### Unknown {#er-ci-yuan-chong-dong-unknown} - | 翻译 | 注释 | 赏析 | - | ---- | ---- | ----- | - | yi | zhu | shang | -</Route> +<Route namespace="2cycd" data={{"path":"/:fid/:sort?","name":"Unknown","maintainers":["shelken"],"location":"index.ts"}} /> + +## 凤凰网 {#feng-huang-wang} + +### Unknown {#feng-huang-wang-unknown} + +<Route namespace="ifeng" data={{"path":"/news/*","name":"Unknown","maintainers":[],"location":"news.ts"}} /> + +## 公視新聞網 {#gong-shi-xin-wen-wang} + +### Unknown {#gong-shi-xin-wen-wang-unknown} + +<Route namespace="pts" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 骨朵数据 {#gu-duo-shu-ju} ### 日榜 {#gu-duo-shu-ju-ri-bang} -<Route author="Gem1ni" example="/guduodata/daily" path="/guduodata/daily" /> +<Route namespace="guduodata" data={{"path":"/daily","categories":["other"],"example":"/guduodata/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["data.guduodata.com/"]},"name":"日榜","maintainers":["Gem1ni"],"url":"data.guduodata.com/","location":"daily.ts"}} /> + +## 观察者网 {#guan-cha-zhe-wang} + +### Unknown {#guan-cha-zhe-wang-unknown} + +<Route namespace="guancha" data={{"path":"/topic/:id/:order?","radar":{"source":["guancha.cn/"],"target":"/:category?"},"name":"Unknown","maintainers":["occupy5","nczitzk"],"url":"guancha.cn/","location":"topic.ts"}} /> + +## 观海新闻 {#guan-hai-xin-wen} + +### Unknown {#guan-hai-xin-wen-unknown} + +<Route namespace="guanhai" data={{"path":"/","radar":{"source":["guanhai.com.cn/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"guanhai.com.cn/","location":"index.ts"}} /> + +## 广东工业大学 {#guang-dong-gong-ye-da-xue} + +### Unknown {#guang-dong-gong-ye-da-xue-unknown} + +<Route namespace="gdut" data={{"path":"/oa_news/:type?","radar":{"source":["oas.gdut.edu.cn/seeyon"],"target":"/oa_news/"},"name":"Unknown","maintainers":["Jim Kirisame"],"url":"oas.gdut.edu.cn/seeyon","location":"oa-news.ts"}} /> ## 广东省食品药品审评认证技术协会 {#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui} ### 栏目 {#guang-dong-sheng-shi-pin-yao-pin-shen-ping-ren-zheng-ji-shu-xie-hui-lan-mu} -<Route author="nczitzk" example="/gdsrx" path="/gdsrx/:id?" paramsDesc={['栏目 id,可在对应栏目页 URL 中找到,见下表,默认为法规文库']} radar="1"> - | 栏目名称 | 栏目 id | - | ----------------- | ------- | - | 法规文库 | 10 | - | 法规资讯 | 12 | - | 专家供稿 | 13 | - | 协会动态 会员动态 | 20 | - | 协会动态 | 37 | - | 协会通知公告 | 38 | - | 会员动态 | 39 | -</Route> +<Route namespace="gdsrx" data={{"path":"/:id?","categories":["other"],"example":"/gdsrx","parameters":{"id":"栏目 id,可在对应栏目页 URL 中找到,见下表,默认为法规文库"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":[],"description":"| 栏目名称 | 栏目 id |\n | ----------------- | ------- |\n | 法规文库 | 10 |\n | 法规资讯 | 12 |\n | 专家供稿 | 13 |\n | 协会动态 会员动态 | 20 |\n | 协会动态 | 37 |\n | 协会通知公告 | 38 |\n | 会员动态 | 39 |","location":"index.ts"}} /> -## 静态模型爱好者 {#jing-tai-mo-xing-ai-hao-zhe} +| 栏目名称 | 栏目 id | +| ----------------- | ------- | +| 法规文库 | 10 | +| 法规资讯 | 12 | +| 专家供稿 | 13 | +| 协会动态 会员动态 | 20 | +| 协会动态 | 37 | +| 协会通知公告 | 38 | +| 会员动态 | 39 | -### 新品信息 {#jing-tai-mo-xing-ai-hao-zhe-xin-pin-xin-xi} +## 国家地理 {#guo-jia-di-li} -<Route author="cc798461" example="/moxingfans" path="/moxingfans" /> +### Unknown {#guo-jia-di-li-unknown} + +<Route namespace="natgeo" data={{"path":"/dailyselection","name":"Unknown","maintainers":["OrangeEd1t"],"location":"dailyselection.ts"}} /> + +## 国家气候中心 {#guo-jia-qi-hou-zhong-xin} + +### Unknown {#guo-jia-qi-hou-zhong-xin-unknown} + +<Route namespace="ncc-cma" data={{"path":"/cmdp/image/:id{.+}?","name":"Unknown","maintainers":[],"location":"cmdp.ts"}} /> + +## 国家药品监督管理局医疗器械技术审评中心 {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-ji-shu-shen-ping-zhong-xin} + +### Unknown {#guo-jia-yao-pin-jian-du-guan-li-ju-yi-liao-qi-xie-ji-shu-shen-ping-zhong-xin-unknown} + +<Route namespace="cmde" data={{"path":"/:cate{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 国外主机测评 {#guo-wai-zhu-ji-ce-ping} + +### Unknown {#guo-wai-zhu-ji-ce-ping-unknown} + +<Route namespace="zhujiceping" data={{"path":"/","radar":{"source":["zhujiceping.com/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"zhujiceping.com/","location":"rss.ts"}} /> + +## 哈尔滨工程大学 {#ha-er-bin-gong-cheng-da-xue} + +### Unknown {#ha-er-bin-gong-cheng-da-xue-unknown} + +<Route namespace="hrbeu" data={{"path":"/gx/card/:column/:id?","name":"Unknown","maintainers":[],"location":"gx/card.ts"}} /> + +### Unknown {#ha-er-bin-gong-cheng-da-xue-unknown} + +<Route namespace="hrbeu" data={{"path":"/gx/list/:column/:id?","name":"Unknown","maintainers":[],"location":"gx/list.ts"}} /> + +## 后续 {#hou-xu} + +### Unknown {#hou-xu-unknown} + +<Route namespace="houxu" data={{"path":["/featured","/index","/"],"radar":{"source":["houxu.app/"],"target":""},"name":"Unknown","maintainers":[],"url":"houxu.app/","location":"index.ts"}} /> + +### Unknown {#hou-xu-unknown} + +<Route namespace="houxu" data={{"path":["/featured","/index","/"],"radar":{"source":["houxu.app/"],"target":""},"name":"Unknown","maintainers":[],"url":"houxu.app/","location":"index.ts"}} /> + +### Unknown {#hou-xu-unknown} + +<Route namespace="houxu" data={{"path":["/featured","/index","/"],"radar":{"source":["houxu.app/"],"target":""},"name":"Unknown","maintainers":[],"url":"houxu.app/","location":"index.ts"}} /> + +## 虎扑 {#hu-pu} + +### Unknown {#hu-pu-unknown} + +<Route namespace="hupu" data={{"path":["/dept/:category?","/:category?"],"radar":{"source":["m.hupu.com/:category","m.hupu.com/"],"target":"/:category"},"name":"Unknown","maintainers":["nczitzk"],"description":"| NBA | CBA | 足球 |\n | --- | --- | ------ |\n | nba | cba | soccer |\n\n :::tip\n 电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [`/hupu/all/all-gg`](https://rsshub.app/hupu/all/all-gg)。\n :::","location":"index.ts"}} /> + +| NBA | CBA | 足球 | +| --- | --- | ------ | +| nba | cba | soccer | + +:::tip +电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [`/hupu/all/all-gg`](https://rsshub.app/hupu/all/all-gg)。 +::: + +### Unknown {#hu-pu-unknown} + +<Route namespace="hupu" data={{"path":["/dept/:category?","/:category?"],"radar":{"source":["m.hupu.com/:category","m.hupu.com/"],"target":"/:category"},"name":"Unknown","maintainers":["nczitzk"],"description":"| NBA | CBA | 足球 |\n | --- | --- | ------ |\n | nba | cba | soccer |\n\n :::tip\n 电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [`/hupu/all/all-gg`](https://rsshub.app/hupu/all/all-gg)。\n :::","location":"index.ts"}} /> + +| NBA | CBA | 足球 | +| --- | --- | ------ | +| nba | cba | soccer | + +:::tip +电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [`/hupu/all/all-gg`](https://rsshub.app/hupu/all/all-gg)。 +::: + +## 虎嗅 {#hu-xiu} + +### Unknown {#hu-xiu-unknown} + +<Route namespace="huxiu" data={{"path":"/club/:id","name":"Unknown","maintainers":["nczitzk"],"location":"club.ts"}} /> + +### Unknown {#hu-xiu-unknown} + +<Route namespace="huxiu" data={{"path":["/author/:id/:type?","/member/:id/:type?"],"name":"Unknown","maintainers":[],"description":"| TA 的文章 | TA 的 24 小时 |\n | --------- | ------------- |\n | article | moment |","location":"member.ts"}} /> + +| TA 的文章 | TA 的 24 小时 | +| --------- | ------------- | +| article | moment | + +### Unknown {#hu-xiu-unknown} + +<Route namespace="huxiu" data={{"path":["/author/:id/:type?","/member/:id/:type?"],"name":"Unknown","maintainers":[],"description":"| TA 的文章 | TA 的 24 小时 |\n | --------- | ------------- |\n | article | moment |","location":"member.ts"}} /> + +| TA 的文章 | TA 的 24 小时 | +| --------- | ------------- | +| article | moment | + +## 华尔街见闻 {#hua-er-jie-jian-wen} + +### Unknown {#hua-er-jie-jian-wen-unknown} + +<Route namespace="wallstreetcn" data={{"path":["/news/:category?","/:category?"],"radar":{"source":["wallstreetcn.com/news/:category","wallstreetcn.com/"]},"name":"Unknown","maintainers":["nczitzk"],"description":"| id | 分类 |\n | ------------ | ---- |\n | global | 最新 |\n | shares | 股市 |\n | bonds | 债市 |\n | commodities | 商品 |\n | forex | 外汇 |\n | enterprise | 公司 |\n | asset-manage | 资管 |\n | tmt | 科技 |\n | estate | 地产 |\n | car | 汽车 |\n | medicine | 医药 |","location":"news.ts"}} /> + +| id | 分类 | +| ------------ | ---- | +| global | 最新 | +| shares | 股市 | +| bonds | 债市 | +| commodities | 商品 | +| forex | 外汇 | +| enterprise | 公司 | +| asset-manage | 资管 | +| tmt | 科技 | +| estate | 地产 | +| car | 汽车 | +| medicine | 医药 | + +### Unknown {#hua-er-jie-jian-wen-unknown} + +<Route namespace="wallstreetcn" data={{"path":["/news/:category?","/:category?"],"radar":{"source":["wallstreetcn.com/news/:category","wallstreetcn.com/"]},"name":"Unknown","maintainers":["nczitzk"],"description":"| id | 分类 |\n | ------------ | ---- |\n | global | 最新 |\n | shares | 股市 |\n | bonds | 债市 |\n | commodities | 商品 |\n | forex | 外汇 |\n | enterprise | 公司 |\n | asset-manage | 资管 |\n | tmt | 科技 |\n | estate | 地产 |\n | car | 汽车 |\n | medicine | 医药 |","location":"news.ts"}} /> + +| id | 分类 | +| ------------ | ---- | +| global | 最新 | +| shares | 股市 | +| bonds | 债市 | +| commodities | 商品 | +| forex | 外汇 | +| enterprise | 公司 | +| asset-manage | 资管 | +| tmt | 科技 | +| estate | 地产 | +| car | 汽车 | +| medicine | 医药 | + +## 环球法律评论 {#huan-qiu-fa-lv-ping-lun} + +### Unknown {#huan-qiu-fa-lv-ping-lun-unknown} + +<Route namespace="globallawreview" data={{"path":"/","radar":{"source":["globallawreview.org/Magazine/GetIssueContentList","globallawreview.org/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"globallawreview.org/Magazine/GetIssueContentList","location":"index.ts"}} /> + +## 荒岛 {#huang-dao} + +### Unknown {#huang-dao-unknown} + +<Route namespace="lala" data={{"path":"/","radar":{"source":["lala.im/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"lala.im/","location":"rss.ts"}} /> + +## 吉首大学 {#ji-shou-da-xue} + +### Unknown {#ji-shou-da-xue-unknown} + +<Route namespace="jsu" data={{"path":"/cxzx/:types?","name":"Unknown","maintainers":["wenjia03"],"location":"cxzx.ts"}} /> + +## 纪妖 {#ji-yao} + +### Unknown {#ji-yao-unknown} + +<Route namespace="cbaigui" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 煎蛋 {#jian-dan} + +### Unknown {#jian-dan-unknown} + +<Route namespace="jandan" data={{"path":"/","name":"Unknown","maintainers":["nczitzk","bigfei"],"location":"index.ts"}} /> + +### Unknown {#jian-dan-unknown} + +<Route namespace="jandan" data={{"path":"/:category","name":"Unknown","maintainers":[],"location":"section.ts"}} /> + +## 交流岛资源网 {#jiao-liu-dao-zi-yuan-wang} + +### Unknown {#jiao-liu-dao-zi-yuan-wang-unknown} + +<Route namespace="jiaoliudao" data={{"path":"/","radar":{"source":["jiaoliudao.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"jiaoliudao.com/","location":"index.ts"}} /> + +## 界面新闻 {#jie-mian-xin-wen} + +### Unknown {#jie-mian-xin-wen-unknown} + +<Route namespace="jiemian" data={{"path":"/list/:id","name":"Unknown","maintainers":[],"location":"list.ts"}} /> + +### Unknown {#jie-mian-xin-wen-unknown} + +<Route namespace="jiemian" data={{"path":"/:category{.+}?","name":"Unknown","maintainers":[],"location":"lists.ts"}} /> + +## 禁忌书屋 {#jin-ji-shu-wu} + +### Unknown {#jin-ji-shu-wu-unknown} + +<Route namespace="cool18" data={{"path":"/:id?/:type?/:keyword?","radar":{"source":["cool18.com/"]},"name":"Unknown","maintainers":["nczitzk"],"url":"cool18.com/","location":"index.ts"}} /> + +## 经济 50 人论坛 {#jing-ji-50-ren-lun-tan} + +### Unknown {#jing-ji-50-ren-lun-tan-unknown} + +<Route namespace="50forum" data={{"path":"/","radar":{"source":["50forum.org.cn/home/article/index/category/zhuanjia.html","50forum.org.cn/"],"target":""},"name":"Unknown","maintainers":["sddiky"],"url":"50forum.org.cn/home/article/index/category/zhuanjia.html","location":"zhuanjia.ts"}} /> ## 巨量算数 - 算数指数 {#ju-liang-suan-shu-suan-shu-zhi-shu} -### 抖音指数波峰 {#ju-liang-suan-shu-suan-shu-zhi-shu-dou-yin-zhi-shu-bo-feng} +### Unknown {#ju-liang-suan-shu-suan-shu-zhi-shu-unknown} -<Route author="Jkker" example="/oceanengine/index/教材" path="/oceanengine/index/:keyword" paramsDesc={['热点关键词']} anticrawler="1" puppeteer="1" /> +<Route namespace="oceanengine" data={{"path":"/index/:keyword/:channel?","name":"Unknown","maintainers":["Jkker"],"location":"arithmetic-index.ts"}} /> -爬取巨量算数近 6 个月的抖音指数,解密后提取指数波峰当日的热门搜索关键词,生成为 RSS。可用于追踪新闻热点事件。 +## 卡卡洛普 {#ka-ka-luo-pu} -### 头条指数波峰 {#ju-liang-suan-shu-suan-shu-zhi-shu-tou-tiao-zhi-shu-bo-feng} +### Unknown {#ka-ka-luo-pu-unknown} -<Route author="Jkker" example="/oceanengine/index/教材/toutiao" path="/oceanengine/index/:keyword/toutiao" paramsDesc={['热点关键词']} anticrawler="1" puppeteer="1" /> +<Route namespace="gamme" data={{"path":"/:domain/:category?","name":"Unknown","maintainers":[],"location":"category.ts"}} /> -爬取巨量算数近 6 个月的头条指数,解密后提取指数波峰当日的热门搜索关键词,生成为 RSS。可用于追踪新闻热点事件。 +### Unknown {#ka-ka-luo-pu-unknown} -## 考研帮 {#kao-yan-bang} - -### 考研帮调剂信息 {#kao-yan-bang-kao-yan-bang-tiao-ji-xin-xi} - -<Route author="shengmaosu" example="/kaoyan" path="/kaoyan" /> - -## 空气质量 {#kong-qi-zhi-liang} - -### 实时 AQI {#kong-qi-zhi-liang-shi-shi-aqi} - -<Route author="xapool" example="/aqicn/beijing/pm25,pm10" path="/aqicn/:city/:pollution?" paramsDesc={['城市拼音或地区 ID,详见[aqicn.org](http://aqicn.org/city/)', '可选择显示更详细的空气污染成分']} /> - -| 参数 | 污染成分 | -| ---- | -------- | -| pm25 | PM2.5 | -| pm10 | PM10 | -| o3 | O3 | -| no2 | NO2 | -| so2 | SO2 | -| co | CO | - -举例: [https://rsshub.app/aqicn/beijing/pm25,pm10](https://rsshub.app/aqicn/beijing/pm25.pm10) - -1. 显示单个污染成分,例如「pm25」, [https://rsshub.app/aqicn/beijing/pm25](https://rsshub.app/aqicn/beijing/pm25) -2. 逗号分隔显示多个污染成分,例如「pm25,pm10」,[https://rsshub.app/aqicn/beijing/pm25,pm10](https://rsshub.app/aqicn/beijing/pm25.pm10) +<Route namespace="gamme" data={{"path":"/:domain/tag/:tag","name":"Unknown","maintainers":[],"location":"tag.ts"}} /> ## 快递 100 {#kuai-di-100} ### 快递订单追踪 {#kuai-di-100-kuai-di-ding-dan-zhui-zong} -<Route author="NeverBehave" example="/kuaidi100/track/shunfeng/SF1007896781640/0383" path="/kuaidi100/track/:number/:id/:phone?" paramsDesc={['快递公司代号', '订单号', '手机号后四位(仅顺丰)']} radar="1"> - 快递公司代号如果不能确定,可通过下方快递列表获得。 +<Route namespace="kuaidi100" data={{"path":"/track/:number/:id/:phone?","categories":["other"],"example":"/kuaidi100/track/shunfeng/SF1007896781640/0383","parameters":{"number":"快递公司代号","id":"订单号","phone":"手机号后四位(仅顺丰)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"快递订单追踪","maintainers":["NeverBehave"],"description":"快递公司代号如果不能确定,可通过下方快递列表获得。\n\n :::warning\n 1. 构造链接前请确认所有参数正确:错误`快递公司 - 订单号`组合将会缓存信息一小段时间防止产生无用查询\n 2. 正常查询的订单在未签收状态下不会被缓存:请控制查询频率\n 3. 订单完成后请尽快取消订阅,避免资源浪费\n :::","location":"index.ts"}} /> - :::warning - 1. 构造链接前请确认所有参数正确:错误`快递公司 - 订单号`组合将会缓存信息一小段时间防止产生无用查询 - 2. 正常查询的订单在未签收状态下不会被缓存:请控制查询频率 - 3. 订单完成后请尽快取消订阅,避免资源浪费 - ::: -</Route> +快递公司代号如果不能确定,可通过下方快递列表获得。 + +:::warning +1. 构造链接前请确认所有参数正确:错误`快递公司 - 订单号`组合将会缓存信息一小段时间防止产生无用查询 +2. 正常查询的订单在未签收状态下不会被缓存:请控制查询频率 +3. 订单完成后请尽快取消订阅,避免资源浪费 +::: ### 支持的快递公司列表 {#kuai-di-100-zhi-chi-de-kuai-di-gong-si-lie-biao} -<Route author="NeverBehave" example="/kuaidi100/company" path="/kuaidi100/company" radar="1" /> +<Route namespace="kuaidi100" data={{"path":"/company","categories":["other"],"example":"/kuaidi100/company","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kuaidi100.com/"]},"name":"支持的快递公司列表","maintainers":["NeverBehave"],"url":"kuaidi100.com/","location":"supported-company.ts"}} /> + +## 快科技 {#kuai-ke-ji} + +### Unknown {#kuai-ke-ji-unknown} + +<Route namespace="mydrivers" data={{"path":["/cid/:id?","/zhibo"],"name":"Unknown","maintainers":[],"url":"m.mydrivers.com/","location":"cid.ts"}} /> + +### Unknown {#kuai-ke-ji-unknown} + +<Route namespace="mydrivers" data={{"path":["/cid/:id?","/zhibo"],"name":"Unknown","maintainers":[],"url":"m.mydrivers.com/","location":"cid.ts"}} /> + +### Unknown {#kuai-ke-ji-unknown} + +<Route namespace="mydrivers" data={{"path":"/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 雷峰网 {#lei-feng-wang} + +### Unknown {#lei-feng-wang-unknown} + +<Route namespace="leiphone" data={{"path":"/:do?/:keyword?","radar":{"source":["leiphone.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"leiphone.com/","location":"index.ts"}} /> + +## 理想生活实验室 {#li-xiang-sheng-huo-shi-yan-shi} + +### Unknown {#li-xiang-sheng-huo-shi-yan-shi-unknown} + +<Route namespace="toodaylab" data={{"path":"/:params{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 裏垢女子まとめ {#li-gou-nv-zi-%E3%81%BE%E3%81%A8%E3%82%81} -### Homepage {#li-gou-nv-zi-%E3%81%BE%E3%81%A8%E3%82%81-homepage} - -<Route author="SettingDust Halcao" example="/uraaka-joshi" path="/uraaka-joshi" radar="1" puppeteer="1" /> - ### User {#li-gou-nv-zi-%E3%81%BE%E3%81%A8%E3%82%81-user} -<Route author="SettingDust Halcao" example="/uraaka-joshi/_rrwq" path="/uraaka-joshi/:id" paramsDesc={['User ID']} radar="1" puppeteer="1" /> +<Route namespace="uraaka-joshi" data={{"path":"/:id","categories":["other"],"example":"/uraaka-joshi/_rrwq","parameters":{"id":"User ID"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["uraaka-joshi.com/:id"]},"name":"User","maintainers":["SettingDust","Halcao"],"url":"uraaka-joshi.com/","location":"uraaka-joshi-user.ts"}} /> -## 律师事务所文章 {#lv-shi-shi-wu-suo-wen-zhang} +### Unknown {#li-gou-nv-zi-%E3%81%BE%E3%81%A8%E3%82%81-unknown} -### 君合 {#lv-shi-shi-wu-suo-wen-zhang-jun-he} +<Route namespace="uraaka-joshi" data={{"path":"/","radar":{"source":["uraaka-joshi.com/"],"target":""},"name":"Unknown","maintainers":["SettingDust","Halcao"],"url":"uraaka-joshi.com/","location":"uraaka-joshi.ts"}} /> -<Route author="snipersteve" example="/law/jh" path="/law/jh" /> +## 链捕手 ChainCatcher {#lian-bu-shou-chaincatcher} -### 通商 {#lv-shi-shi-wu-suo-wen-zhang-tong-shang} +### Unknown {#lian-bu-shou-chaincatcher-unknown} -<Route author="snipersteve" example="/law/ts" path="/law/ts" notOperational="1" /> +<Route namespace="chaincatcher" data={{"path":"/","radar":{"source":["chaincatcher.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"chaincatcher.com/","location":"home.ts"}} /> -### 海问 {#lv-shi-shi-wu-suo-wen-zhang-hai-wen} +## 留园网 {#liu-yuan-wang} -<Route author="snipersteve" example="/law/hw" path="/law/hw" notOperational="1" /> +### Unknown {#liu-yuan-wang-unknown} -### 环球 {#lv-shi-shi-wu-suo-wen-zhang-huan-qiu} +<Route namespace="6park" data={{"path":"/:id?/:type?/:keyword?","radar":{"source":["club.6parkbbs.com/:id/index.php","club.6parkbbs.com/"],"target":"/:id?"},"name":"Unknown","maintainers":[],"location":"index.ts"}} /> -<Route author="snipersteve" example="/law/hq" path="/law/hq" /> +### Unknown {#liu-yuan-wang-unknown} -### 国枫 {#lv-shi-shi-wu-suo-wen-zhang-guo-feng} +<Route namespace="6park" data={{"path":"/news/:site?/:id?/:keyword?","radar":{"source":["club.6parkbbs.com/:id/index.php","club.6parkbbs.com/"],"target":"/:id?"},"name":"Unknown","maintainers":[],"location":"news.ts"}} /> -<Route author="snipersteve" example="/law/gf" path="/law/gf" notOperational="1" /> +## 龙空 {#long-kong} -### 中伦 {#lv-shi-shi-wu-suo-wen-zhang-zhong-lun} +### Unknown {#long-kong-unknown} -<Route author="snipersteve" example="/law/zl" path="/law/zl" /> +<Route namespace="lkong" data={{"path":"/forum/:id?/:digest?","radar":{"source":["lkong.com/forum/:id","lkong.com/"]},"name":"Unknown","maintainers":["nczitzk","ma6254"],"location":"forum.ts"}} /> -### 锦天城 {#lv-shi-shi-wu-suo-wen-zhang-jin-tian-cheng} +### Unknown {#long-kong-unknown} -<Route author="snipersteve" example="/law/jtc" path="/law/jtc" /> +<Route namespace="lkong" data={{"path":"/thread/:id","radar":{"source":["lkong.com/thread/:id","lkong.com/"]},"name":"Unknown","maintainers":["nczitzk","ma6254"],"location":"thread.ts"}} /> -### 德恒 {#lv-shi-shi-wu-suo-wen-zhang-de-heng} +## 旅法师营地 {#lv-fa-shi-ying-di} -<Route author="snipersteve" example="/law/dh" path="/law/dh" /> +### Unknown {#lv-fa-shi-ying-di-unknown} -### 金诚同达 {#lv-shi-shi-wu-suo-wen-zhang-jin-cheng-tong-da} +<Route namespace="lfsyd" data={{"path":"/tag/:tagId?","radar":{"source":["mob.iyingdi.com/fine/:tagId"],"target":"/tag/:tagId"},"name":"Unknown","maintainers":["auto-bot-ty"],"location":"tag.ts"}} /> -<Route author="snipersteve" example="/law/jctd" path="/law/jctd" notOperational="1" /> +### Unknown {#lv-fa-shi-ying-di-unknown} -## 米坛社区 {#mi-tan-she-qu} +<Route namespace="lfsyd" data={{"path":"/user/:id?","radar":{"source":["www.iyingdi.com/tz/people/:id","www.iyingdi.com/tz/people/:id/*"],"target":"/user/:id"},"name":"Unknown","maintainers":["auto-bot-ty"],"location":"user.ts"}} /> -### 表盘更新 {#mi-tan-she-qu-biao-pan-geng-xin} +## 罗戈网 {#luo-ge-wang} -<Route author="hoilc" example="/watchface/mi4/" path="/watchface/:watch_type?/:list_type?" paramsDesc={['手环型号, 默认为`小米手环4`', '列表类型, 默认为`最新上传`']}> - 表盘型号 +### Unknown {#luo-ge-wang-unknown} - | 小米手环 4 | 华米 GTR 47mm | 华米智能手表青春版 | - | ---------- | ------------- | ------------------ | - | mi4 | gtr47 | gvlite | +<Route namespace="logclub" data={{"path":"/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> - 列表类型 +## 免費資源網路社群 {#mian-fei-zi-yuan-wang-lu-she-qun} - | 最新上传 | 最多下载 | 编辑推荐 | - | -------- | -------- | ---------- | - | 0 | 1 | recommends | -</Route> +### Unknown {#mian-fei-zi-yuan-wang-lu-she-qun-unknown} + +<Route namespace="free" data={{"path":"/","radar":{"source":["free.com.tw/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"free.com.tw/","location":"rss.ts"}} /> + +## 木木博客 {#mu-mu-bo-ke} + +### Unknown {#mu-mu-bo-ke-unknown} + +<Route namespace="liulinblog" data={{"path":"/:params{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +### Unknown {#mu-mu-bo-ke-unknown} + +<Route namespace="liulinblog" data={{"path":"/itnews/:channel","name":"Unknown","maintainers":[],"location":"itnews.ts"}} /> + +## 南方都市报 {#nan-fang-dou-shi-bao} + +### Unknown {#nan-fang-dou-shi-bao-unknown} + +<Route namespace="oeeee" data={{"path":"/app/channel/:id","name":"Unknown","maintainers":["TimWu007"],"location":"app/channel.ts"}} /> + +## 南湖清风 {#nan-hu-qing-feng} + +### Unknown {#nan-hu-qing-feng-unknown} + +<Route namespace="cnjxol" data={{"path":"/:category?/:id?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 南京航空航天大学 {#nan-jing-hang-kong-hang-tian-da-xue} + +### Unknown {#nan-jing-hang-kong-hang-tian-da-xue-unknown} + +<Route namespace="nuaa" data={{"path":"/cae/:type/:getDescription?","name":"Unknown","maintainers":["Xm798"],"location":"college/cae.ts"}} /> + +## 南京信息工程大学 {#nan-jing-xin-xi-gong-cheng-da-xue} + +:::tip +路由地址全部按照 **学校官网域名和栏目编号** 设计 + +使用方法: + +以[南信大信息公告栏](https://bulletin.nuist.edu.cn)为例,点开任意一个栏目 + +获得 URL 中的**分域名**和**栏目编号(可选)**:https\://`bulletin`.nuist.edu.cn/`791`/list.htm + +将其替换到 RSS 路由地址中即可: + +[https://rsshub.app/**nuist**/`bulletin`](https://rsshub.app/nuist/bulletin) 或 [https://rsshub.app/**nuist**/`bulletin`/`791`](https://rsshub.app/nuist/bulletin) +::: + +### Unknown {#nan-jing-xin-xi-gong-cheng-da-xue-unknown} + +<Route namespace="nuist" data={{"path":"/yjs/*","name":"Unknown","maintainers":[],"location":"yjs.ts"}} /> + +### Unknown {#nan-jing-xin-xi-gong-cheng-da-xue-unknown} + +<Route namespace="nuist" data={{"path":"/lib","radar":{"source":["lib.nuist.edu.cn/","lib.nuist.edu.cn/index/tzgg.htm"]},"name":"Unknown","maintainers":["gylidian"],"url":"lib.nuist.edu.cn/","location":"library/lib.ts"}} /> + +## 鸟哥笔记 {#niao-ge-bi-ji} + +### Unknown {#niao-ge-bi-ji-unknown} + +<Route namespace="niaogebiji" data={{"path":"/","radar":{"source":["niaogebiji.com/","niaogebiji.com/bulletin"],"target":""},"name":"Unknown","maintainers":["WenryXu"],"url":"niaogebiji.com/","location":"index.ts"}} /> + +## 跑野大爆炸 {#pao-ye-da-bao-zha} + +### Unknown {#pao-ye-da-bao-zha-unknown} + +<Route namespace="runtrail" data={{"path":"/","radar":{"source":["runtrail.cn/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"runtrail.cn/","location":"posts.ts"}} /> + +## 澎湃新闻 {#peng-pai-xin-wen} + +以下所有路由可使用参数`old`以采取旧全文获取方法。该方法会另外获取网页中的图片与视频资源。在原始 url 追加`?old=yes`以启用. + +### Unknown {#peng-pai-xin-wen-unknown} + +<Route namespace="thepaper" data={{"path":"/sidebar/:sec?","radar":{"source":["thepaper.cn/"],"target":"/sidebar"},"name":"Unknown","maintainers":["bigfei"],"url":"thepaper.cn/","location":"sidebar.ts"}} /> + +### Unknown {#peng-pai-xin-wen-unknown} + +<Route namespace="thepaper" data={{"path":"/839studio/:id","radar":{"source":["thepaper.cn/"]},"name":"Unknown","maintainers":["umm233"],"url":"thepaper.cn/","location":"839studio/category.ts"}} /> + +### Unknown {#peng-pai-xin-wen-unknown} + +<Route namespace="thepaper" data={{"path":"/839studio","name":"Unknown","maintainers":["umm233"],"location":"839studio/studio.ts"}} /> + +## 片源网 {#pian-yuan-wang} + +### Unknown {#pian-yuan-wang-unknown} + +<Route namespace="pianyuan" data={{"path":"/indexers/pianyuan/results/search/api","radar":{"source":["pianyuan.org/"],"target":"/index"},"name":"Unknown","maintainers":["jerry1119"],"url":"pianyuan.org/","location":"search.ts"}} /> + +## 品葱 {#pin-cong} + +### Unknown {#pin-cong-unknown} + +<Route namespace="pincong" data={{"path":"/topic/:topic","radar":{"source":["pincong.rocks/topic/:topic"]},"name":"Unknown","maintainers":["zphw"],"location":"topic.ts"}} /> + +## 齐鲁网 {#qi-lu-wang} + +### Unknown {#qi-lu-wang-unknown} + +<Route namespace="iqilu" data={{"path":"/v/:category{.+}?","name":"Unknown","maintainers":[],"location":"program.ts"}} /> + +## 其乐 {#qi-le} + +### Unknown {#qi-le-unknown} + +<Route namespace="keylol" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 汽油价格网 {#qi-you-jia-ge-wang} -### 今日油价查询 {#qi-you-jia-ge-wang-jin-ri-you-jia-cha-xun} +### Unknown {#qi-you-jia-ge-wang-unknown} -<Route author="TonyRL" example="/qiyoujiage/shanghai" path="/qiyoujiage/:path+" paramsDesc={['路径']}> - :::tip - 路径处填写对应页面 URL 中 `http://www.qiyoujiage.com/` 和 `.shtml` 之间的字段。下面是一个例子。 +<Route namespace="qiyoujiage" data={{"path":"/:path{.+}","name":"Unknown","maintainers":[],"location":"price.ts"}} /> - 若订阅 [福建漳州龙海今日油价](http://www.qiyoujiage.com/fujian/zhangzhou/longhai.shtml) 则将对应页面 URL `http://www.qiyoujiage.com/fujian/zhangzhou/longhai.shtml` 中 `http://www.qiyoujiage.com/` 和 `.shtml` 之间的字段 `fujian/zhangzhou/longhai` 作为路径填入。此时路由为 [`/qiyoujiage/fujian/zhangzhou/longhai`](https://rsshub.app/qiyoujiage/fujian/zhangzhou/longhai) - ::: -</Route> +## 千篇网 {#qian-pian-wang} -## 親子王國 {#qin-zi-wang-guo} +### Unknown {#qian-pian-wang-unknown} -### 板块 {#qin-zi-wang-guo-ban-kuai} +<Route namespace="qianp" data={{"path":"/news/:path{.+}?","name":"Unknown","maintainers":[],"location":"news.ts"}} /> -<Route author="LogicJake" example="/babykingdom/19/view" path="/babykingdom/:id/:order?" paramsDesc={['板块id,可在 URL 中找到', '排序方式']} anticrawler="1"> - | 发帖时间 | 回复 / 查看 | 查看 | 最后发表 | 热门 | - | -------- | ----------- | ---- | -------- | ---- | - | dateline | reply | view | lastpost | heat | -</Route> +## 轻小说文库 {#qing-xiao-shuo-wen-ku} + +### Unknown {#qing-xiao-shuo-wen-ku-unknown} + +<Route namespace="wenku8" data={{"path":"/:category?","name":"Unknown","maintainers":["Fatpandac"],"location":"index.ts"}} /> + +## 轻之国度 {#qing-zhi-guo-du} + +### Unknown {#qing-zhi-guo-du-unknown} + +<Route namespace="lightnovel" data={{"path":"/:keywords/:security_key?","radar":{"source":["lightNovel.us/"],"target":"/:keywords/:security_key"},"name":"Unknown","maintainers":["nightmare-mio"],"url":"lightNovel.us/","location":"light-novel.ts"}} /> + +## 趨勢科技防詐達人 {#qu-shi-ke-ji-fang-zha-da-ren} + +### Unknown {#qu-shi-ke-ji-fang-zha-da-ren-unknown} + +<Route namespace="getdr" data={{"path":"/","radar":{"source":["getdr.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"getdr.com/","location":"index.ts"}} /> ## 全球主机监控 {#quan-qiu-zhu-ji-jian-kong} ### CloudFlareYes {#quan-qiu-zhu-ji-jian-kong-cloudflareyes} -<Route author="nczitzk" example="/hostmonit/cloudflareyes" path="/hostmonit/cloudflareyes/:type?" paramsDesc={['类型,见下表,默认为 v4']} radar="1" anticrawler="1"> - | v4 | v6 | - | -- | -- | - | | v6 | -</Route> +<Route namespace="hostmonit" data={{"path":"/cloudflareyes/:type?","categories":["other"],"example":"/hostmonit/cloudflareyes","parameters":{"type":"类型,见下表,默认为 v4"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"CloudFlareYes","maintainers":["nczitzk"],"description":"| v4 | v6 |\n | -- | -- |\n | | v6 |","location":"cloudflareyes.ts"}} /> + +| v4 | v6 | +| -- | -- | +| | v6 | + +### Unknown {#quan-qiu-zhu-ji-jian-kong-unknown} + +<Route namespace="hostmonit" data={{"path":"/cloudflareyesv6","name":"Unknown","maintainers":[],"location":"cloudflareyesv6.ts"}} /> ## 热搜聚合 {#re-sou-ju-he} ### 关键词聚合追踪 {#re-sou-ju-he-guan-jian-ci-ju-he-zhui-zong} +<Route namespace="trending" data={{"path":"/:keywords/:numberOfDays?","categories":["other"],"example":"/trending/唐山,打人/3","parameters":{"keywords":"通过逗号区隔的关键词列表","numberOfDays":"向前追溯的天数,默认为3天"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"关键词聚合追踪","maintainers":["Jkker"],"description":"追踪各大热搜榜上包含特定关键词的条目。\n\n当前收录榜单:*微博热搜*、*今日头条热搜*、*知乎热搜*、*知乎热门视频*、*知乎热门话题*。\n\n数据源: [trending-in-one](https://github.com/huqi-pr/trending-in-one)","location":"all-trending.ts"}} /> + 追踪各大热搜榜上包含特定关键词的条目。 当前收录榜单:*微博热搜*、*今日头条热搜*、*知乎热搜*、*知乎热门视频*、*知乎热门话题*。 数据源: [trending-in-one](https://github.com/huqi-pr/trending-in-one) -<Route author="Jkker" example="/trending/唐山,打人/3" path="/trending/:keywords/:numberOfDays?" radar="1" paramsDesc={['通过逗号区隔的关键词列表', '向前追溯的天数,默认为3天']} /> +## 人民网 {#ren-min-wang} + +### Unknown {#ren-min-wang-unknown} + +<Route namespace="people" data={{"path":"/:site?/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 人人都是自媒体 {#ren-ren-dou-shi-zi-mei-ti} + +### Unknown {#ren-ren-dou-shi-zi-mei-ti-unknown} + +<Route namespace="iiilab" data={{"path":"/","radar":{"source":["www.iiilab.com/"],"target":""},"name":"Unknown","maintainers":["Joey"],"url":"www.iiilab.com/","location":"index.ts"}} /> + +## 软餐 {#ruan-can} + +### Unknown {#ruan-can-unknown} + +<Route namespace="ruancan" data={{"path":"/","radar":{"source":["ruancan.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"ruancan.com/","location":"index.ts"}} /> + +### Unknown {#ruan-can-unknown} + +<Route namespace="ruancan" data={{"path":"/user/:id","radar":{"source":["ruancan.com/i/:id","ruancan.com/"]},"name":"Unknown","maintainers":[],"url":"ruancan.com/","location":"user.ts"}} /> + +## 三联生活周刊 {#san-lian-sheng-huo-zhou-kan} + +### Unknown {#san-lian-sheng-huo-zhou-kan-unknown} + +<Route namespace="lifeweek" data={{"path":"/channel/:id","radar":{"source":["lifeweek.com.cn/column/:channel"],"target":"/channel/:channel"},"name":"Unknown","maintainers":[],"location":"channel.ts"}} /> + +### Unknown {#san-lian-sheng-huo-zhou-kan-unknown} + +<Route namespace="lifeweek" data={{"path":"/tag/:id","radar":{"source":["lifeweek.com.cn/articleList/:tag"],"target":"/tag/:tag"},"name":"Unknown","maintainers":[],"location":"tag.ts"}} /> + +## 色花堂 {#se-hua-tang} + +### Unknown {#se-hua-tang-unknown} + +<Route namespace="sehuatang" data={{"path":["/bt/:subforumid?","/picture/:subforumid","/:subforumid?/:type?","/:subforumid?",""],"name":"Unknown","maintainers":["qiwihui","junfengP","nczitzk"],"description":"**原创 BT 电影**\n\n | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |\n | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- |\n | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |\n\n **色花图片**\n\n | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |","location":"index.ts"}} /> + +**原创 BT 电影** + +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + +**色花图片** + +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | + +### Unknown {#se-hua-tang-unknown} + +<Route namespace="sehuatang" data={{"path":["/bt/:subforumid?","/picture/:subforumid","/:subforumid?/:type?","/:subforumid?",""],"name":"Unknown","maintainers":["qiwihui","junfengP","nczitzk"],"description":"**原创 BT 电影**\n\n | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |\n | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- |\n | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |\n\n **色花图片**\n\n | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |","location":"index.ts"}} /> + +**原创 BT 电影** + +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + +**色花图片** + +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | + +### Unknown {#se-hua-tang-unknown} + +<Route namespace="sehuatang" data={{"path":["/bt/:subforumid?","/picture/:subforumid","/:subforumid?/:type?","/:subforumid?",""],"name":"Unknown","maintainers":["qiwihui","junfengP","nczitzk"],"description":"**原创 BT 电影**\n\n | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |\n | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- |\n | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |\n\n **色花图片**\n\n | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |","location":"index.ts"}} /> + +**原创 BT 电影** + +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + +**色花图片** + +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | + +### Unknown {#se-hua-tang-unknown} + +<Route namespace="sehuatang" data={{"path":["/bt/:subforumid?","/picture/:subforumid","/:subforumid?/:type?","/:subforumid?",""],"name":"Unknown","maintainers":["qiwihui","junfengP","nczitzk"],"description":"**原创 BT 电影**\n\n | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |\n | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- |\n | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |\n\n **色花图片**\n\n | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |","location":"index.ts"}} /> + +**原创 BT 电影** + +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + +**色花图片** + +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | + +### Unknown {#se-hua-tang-unknown} + +<Route namespace="sehuatang" data={{"path":["/bt/:subforumid?","/picture/:subforumid","/:subforumid?/:type?","/:subforumid?",""],"name":"Unknown","maintainers":["qiwihui","junfengP","nczitzk"],"description":"**原创 BT 电影**\n\n | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 |\n | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- |\n | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl |\n\n **色花图片**\n\n | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |","location":"index.ts"}} /> + +**原创 BT 电影** + +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | + +**色花图片** + +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz | + +## 厦门理工大学 {#xia-men-li-gong-da-xue} + +### Unknown {#xia-men-li-gong-da-xue-unknown} + +<Route namespace="xmut" data={{"path":"/jwc/bkjw/:category?","name":"Unknown","maintainers":[],"location":"jwc/bkjw.ts"}} /> + +### Unknown {#xia-men-li-gong-da-xue-unknown} + +<Route namespace="xmut" data={{"path":"/jwc/yjjw/:category?","name":"Unknown","maintainers":[],"location":"jwc/yjs.ts"}} /> + +## 厦门网 {#xia-men-wang} + +### Unknown {#xia-men-wang-unknown} + +<Route namespace="xmnn" data={{"path":"/news/:category{.+}?","name":"Unknown","maintainers":[],"location":"news.ts"}} /> + +## 上海大学 {#shang-hai-da-xue} + +### Unknown {#shang-hai-da-xue-unknown} + +<Route namespace="shu" data={{"path":["/jwc/:type?","/jwb/:type?"],"radar":{"source":["www.shu.edu.cn/:type"],"target":"/:type"},"name":"Unknown","maintainers":[],"description":"| 通知通告 | 新闻 | 政策文件 |\n | -------- | ---- | -------- |\n | notice | news | policy |","location":"jwb.ts"}} /> + +| 通知通告 | 新闻 | 政策文件 | +| -------- | ---- | -------- | +| notice | news | policy | + +### Unknown {#shang-hai-da-xue-unknown} + +<Route namespace="shu" data={{"path":["/jwc/:type?","/jwb/:type?"],"radar":{"source":["www.shu.edu.cn/:type"],"target":"/:type"},"name":"Unknown","maintainers":[],"description":"| 通知通告 | 新闻 | 政策文件 |\n | -------- | ---- | -------- |\n | notice | news | policy |","location":"jwb.ts"}} /> + +| 通知通告 | 新闻 | 政策文件 | +| -------- | ---- | -------- | +| notice | news | policy | + +## 上海第二工业大学 {#shang-hai-di-er-gong-ye-da-xue} + +### Unknown {#shang-hai-di-er-gong-ye-da-xue-unknown} + +<Route namespace="sspu" data={{"path":"/jwc/:listId","radar":{"source":["jwc.sspu.edu.cn/jwc/:listId/list.htm"]},"name":"Unknown","maintainers":["TonyRL"],"location":"jwc.ts"}} /> + +### Unknown {#shang-hai-di-er-gong-ye-da-xue-unknown} + +<Route namespace="sspu" data={{"path":"/pe/:id?","radar":{"source":["pe2016.sspu.edu.cn/:id/list.htm"],"target":"/pe/:id"},"name":"Unknown","maintainers":["nczitzk"],"location":"pe.ts"}} /> + +## 深潮 TechFlow {#shen-chao-techflow} + +### Unknown {#shen-chao-techflow-unknown} + +<Route namespace="techflowpost" data={{"path":"/","radar":{"source":["techflowpost.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"techflowpost.com/","location":"index.ts"}} /> + +## 紳士漫畫 {#shen-shi-man-hua} + +### Unknown {#shen-shi-man-hua-unknown} + +<Route namespace="wnacg" data={{"path":["/","/category/:cid","/tag/:tag"],"radar":{"source":["wnacg.org/albums.html","wnacg.org/"],"target":""},"name":"Unknown","maintainers":["KenMizz"],"url":"wnacg.org/albums.html","location":"index.ts"}} /> + +### Unknown {#shen-shi-man-hua-unknown} + +<Route namespace="wnacg" data={{"path":["/","/category/:cid","/tag/:tag"],"radar":{"source":["wnacg.org/albums.html","wnacg.org/"],"target":""},"name":"Unknown","maintainers":["KenMizz"],"url":"wnacg.org/albums.html","location":"index.ts"}} /> + +### Unknown {#shen-shi-man-hua-unknown} + +<Route namespace="wnacg" data={{"path":["/","/category/:cid","/tag/:tag"],"radar":{"source":["wnacg.org/albums.html","wnacg.org/"],"target":""},"name":"Unknown","maintainers":["KenMizz"],"url":"wnacg.org/albums.html","location":"index.ts"}} /> + +## 世界新聞網 {#shi-jie-xin-wen-wang} + +### Unknown {#shi-jie-xin-wen-wang-unknown} + +<Route namespace="worldjournal" data={{"path":"/:path{.+}?","radar":{"source":["worldjournal.com/wj/*path"],"target":"/:path"},"name":"Unknown","maintainers":[],"url":"worldjournal.com/wj/*path","location":"index.ts"}} /> + +## 水果派 {#shui-guo-pai} + +### Unknown {#shui-guo-pai-unknown} + +<Route namespace="shuiguopai" data={{"path":"/","radar":{"source":["shuiguopai.com/"],"target":""},"name":"Unknown","maintainers":["nczitzk"],"url":"shuiguopai.com/","location":"index.ts"}} /> + +## 四川工商学院 {#si-chuan-gong-shang-xue-yuan} + +### Unknown {#si-chuan-gong-shang-xue-yuan-unknown} + +<Route namespace="stbu" data={{"path":"/xyxw","radar":{"source":["stbu.edu.cn/html/news/xueyuan","stbu.edu.cn/"]},"name":"Unknown","maintainers":["HyperCherry"],"url":"stbu.edu.cn/html/news/xueyuan","location":"xyxw.ts"}} /> + +## 四月网 {#si-yue-wang} + +### Unknown {#si-yue-wang-unknown} + +<Route namespace="m4" data={{"path":"/:id?/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 搜狗 {#sou-gou} -### 特色 LOGO {#sou-gou-te-se-logo} - -<Route author="xyqfer" example="/sogou/doodles" path="/sogou/doodles" /> - ### 搜索 {#sou-gou-sou-suo} -<Route author="CaoMeiYouRen" example="/sogou/search/rss" path="/sogou/search/:keyword" paramsDesc={['搜索关键词']} radar="1" /> +<Route namespace="sogou" data={{"path":"/search/:keyword","categories":["other"],"example":"/sogou/search/rss","parameters":{"keyword":"搜索关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"搜索","maintainers":["CaoMeiYouRen"],"location":"search.ts"}} /> + +### 特色 LOGO {#sou-gou-te-se-logo} + +<Route namespace="sogou" data={{"path":"/doodles","categories":["other"],"example":"/sogou/doodles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"特色 LOGO","maintainers":["xyqfer"],"location":"doodles.ts"}} /> ## 台灣事實查核中心 {#tai-wan-shi-shi-cha-he-zhong-xin} -### 最新相關資訊 / 最新查核報告 {#tai-wan-shi-shi-cha-he-zhong-xin-zui-xin-xiang-guan-zi-xun-zui-xin-cha-he-bao-gao} +### Unknown {#tai-wan-shi-shi-cha-he-zhong-xin-unknown} -<Route author="TonyRL" example="/tfc-taiwan" path="/tfc-taiwan/:type?" paramsDesc={['分類,見下表,預設為 `report`']} radar="1"> - | 最新相關資訊 | 最新查核報告 | - | ------------ | ------------ | - | info | report | -</Route> +<Route namespace="tfc-taiwan" data={{"path":["/","/category/:id{.+}","/info","/report","/topic/:id"],"name":"Unknown","maintainers":["TonyRL"],"url":"tfc-taiwan.org.tw/articles/info","location":"index.ts"}} /> -### 專題 / 重點專區 {#tai-wan-shi-shi-cha-he-zhong-xin-zhuan-ti-zhong-dian-zhuan-qu} +### Unknown {#tai-wan-shi-shi-cha-he-zhong-xin-unknown} -<Route author="TonyRL" example="/tfc-taiwan/category/242" path="/tfc-taiwan/:type/:id+" paramsDesc={['專題 / 重點專區,見下表', '專題 / 重點專區 ID']} radar="1"> - | 專題 | 重點專區 | - | -------- | -------- | - | category | topic | -</Route> +<Route namespace="tfc-taiwan" data={{"path":["/","/category/:id{.+}","/info","/report","/topic/:id"],"name":"Unknown","maintainers":["TonyRL"],"url":"tfc-taiwan.org.tw/articles/info","location":"index.ts"}} /> -## 腾讯吐个槽 {#teng-xun-tu-ge-cao} +### Unknown {#tai-wan-shi-shi-cha-he-zhong-xin-unknown} -### 吐槽新帖 {#teng-xun-tu-ge-cao-tu-cao-xin-tie} +<Route namespace="tfc-taiwan" data={{"path":["/","/category/:id{.+}","/info","/report","/topic/:id"],"name":"Unknown","maintainers":["TonyRL"],"url":"tfc-taiwan.org.tw/articles/info","location":"index.ts"}} /> -<Route author="Qixingchen" example="/tucaoqq/post/28564/CdRI0728" path="/tucaoqq/post/:project/:key" paramsDesc={['产品 ID', '产品密钥']} /> +### Unknown {#tai-wan-shi-shi-cha-he-zhong-xin-unknown} + +<Route namespace="tfc-taiwan" data={{"path":["/","/category/:id{.+}","/info","/report","/topic/:id"],"name":"Unknown","maintainers":["TonyRL"],"url":"tfc-taiwan.org.tw/articles/info","location":"index.ts"}} /> + +### Unknown {#tai-wan-shi-shi-cha-he-zhong-xin-unknown} + +<Route namespace="tfc-taiwan" data={{"path":["/","/category/:id{.+}","/info","/report","/topic/:id"],"name":"Unknown","maintainers":["TonyRL"],"url":"tfc-taiwan.org.tw/articles/info","location":"index.ts"}} /> + +## 太原师范学院 {#tai-yuan-shi-fan-xue-yuan} + +### Unknown {#tai-yuan-shi-fan-xue-yuan-unknown} + +<Route namespace="tynu" data={{"path":"/","radar":{"source":["tynu.edu.cn/index/tzgg.htm","tynu.edu.cn/index.htm","tynu.edu.cn/"],"target":""},"name":"Unknown","maintainers":["2PoL"],"url":"tynu.edu.cn/index/tzgg.htm","location":"tynu.ts"}} /> + +## 淘股吧 {#tao-gu-ba} + +### Unknown {#tao-gu-ba-unknown} + +<Route namespace="taoguba" data={{"path":["/index","/:category?"],"name":"Unknown","maintainers":["nczitzk"],"description":"| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 |\n | -------- | -------- | -------- | -------- |\n | bbs | zongban | jinghua | dianzan |","location":"index.ts"}} /> + +| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 | +| -------- | -------- | -------- | -------- | +| bbs | zongban | jinghua | dianzan | + +### Unknown {#tao-gu-ba-unknown} + +<Route namespace="taoguba" data={{"path":["/index","/:category?"],"name":"Unknown","maintainers":["nczitzk"],"description":"| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 |\n | -------- | -------- | -------- | -------- |\n | bbs | zongban | jinghua | dianzan |","location":"index.ts"}} /> + +| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 | +| -------- | -------- | -------- | -------- | +| bbs | zongban | jinghua | dianzan | ## 腾讯新闻较真查证平台 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai} +### Unknown {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai-unknown} + +<Route namespace="qq" data={{"path":"/ac/comic/:id?","radar":{"source":["ac.qq.com/Comic/ComicInfo/id/:id","ac.qq.com/"],"target":"/ac/comic/:id"},"name":"Unknown","maintainers":[],"location":"ac/comic.ts"}} /> + ### 最新辟谣 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai-zui-xin-pi-yao} -<Route author="hoilc" example="/qq/fact" path="/qq/fact" radar="1" /> +<Route namespace="qq" data={{"path":"/fact","categories":["other"],"example":"/qq/fact","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vp.fact.qq.com/home","vp.fact.qq.com/"]},"name":"最新辟谣","maintainers":["hoilc"],"url":"vp.fact.qq.com/home","location":"fact/index.ts"}} /> -## 天津产权交易中心 {#tian-jin-chan-quan-jiao-yi-zhong-xin} +## 停水通知 {#ting-shui-tong-zhi} -### 产权转让 {#tian-jin-chan-quan-jiao-yi-zhong-xin-chan-quan-zhuan-rang} +配合 [IFTTT](https://ifttt.com/) Applets [邮件通知](https://ifttt.com/applets/SEvmDVKY-) 使用实现自动通知效果. -<Route author="kt286" example="/tprtc/cqzr" path="/tprtc/cqzr" /> +### Unknown {#ting-shui-tong-zhi-unknown} -### 企业资产转让 {#tian-jin-chan-quan-jiao-yi-zhong-xin-qi-ye-zi-chan-zhuan-rang} +<Route namespace="tingshuitz" data={{"path":"/wuhan/:channelId?","radar":{"source":["whwater.com/IWater.shtml","whwater.com/"],"target":"/wuhan"},"name":"Unknown","maintainers":[],"url":"whwater.com/IWater.shtml","location":"wuhan.ts"}} /> -<Route author="kt286" example="/tprtc/qyzc" path="/tprtc/qyzc" anticrawler="1" /> +## 王者荣耀 {#wang-zhe-rong-yao} -### 新闻动态 {#tian-jin-chan-quan-jiao-yi-zhong-xin-xin-wen-dong-tai} +### Unknown {#wang-zhe-rong-yao-unknown} -<Route author="kt286" example="/tprtc/news" path="/tprtc/news" notOperational="1" /> +<Route namespace="tencent" data={{"path":"/news/coronavirus/data/:province?/:city?","name":"Unknown","maintainers":["CaoMeiYouRen"],"location":"news/coronavirus/data.ts"}} /> -## 天眼查 {#tian-yan-cha} +### Unknown {#wang-zhe-rong-yao-unknown} -### 热门搜索 {#tian-yan-cha-re-men-sou-suo} +<Route namespace="tencent" data={{"path":"/news/coronavirus/total","radar":{"source":["new.qq.com/zt2020/page/feiyan.htm"]},"name":"Unknown","maintainers":["CaoMeiYouRen"],"url":"new.qq.com/zt2020/page/feiyan.htm","location":"news/coronavirus/total.ts"}} /> -<Route author="nczitzk" example="/tianyancha/hot" path="/tianyancha/hot" anticrawler="1" /> +## 网易公开课 {#wang-yi-gong-kai-ke} -## 无讼案例 {#wu-song-an-li} +:::tip +部分歌单及听歌排行信息为登陆后可见,自建时将环境变量`NCM_COOKIES`设为登陆后的 Cookie 值,即可正常获取。 +::: -### 案例 {#wu-song-an-li-an-li} +### Unknown {#wang-yi-gong-kai-ke-unknown} -<Route author="alienmao" example="/itslaw/judgements/regulation+1121495748+13+中华人民共和国公司法(2018)第二十一条" path="/itslaw/judgements/:conditions" paramsDesc={['筛选条件,见示例']} /> +<Route namespace="163" data={{"path":"/music/user/events/:id","name":"Unknown","maintainers":["Master-Hash"],"location":"music/userevents.ts"}} /> + +## 微信小程序 {#wei-xin-xiao-cheng-xu} + +:::tip +公众号直接抓取困难,故目前提供几种间接抓取方案,请自行选择 +::: + +### Unknown {#wei-xin-xiao-cheng-xu-unknown} + +<Route namespace="wechat" data={{"path":"/data258/:id?","radar":{"source":["mp.data258.com/","mp.data258.com/article/category/:id"]},"name":"Unknown","maintainers":["Rongronggg9"],"url":"mp.data258.com/","location":"data258.ts"}} /> + +## 温州大学 {#wen-zhou-da-xue} + +### Unknown {#wen-zhou-da-xue-unknown} + +<Route namespace="wzu" data={{"path":"/news/:type?","name":"Unknown","maintainers":["Chandler-Lu"],"location":"news.ts"}} /> + +## 我不是盐神 {#wo-bu-shi-yan-shen} + +### Unknown {#wo-bu-shi-yan-shen-unknown} + +<Route namespace="onehu" data={{"path":"/","name":"Unknown","maintainers":["ruoshui9527"],"location":"common.ts"}} /> + +## 武汉大学 {#wu-han-da-xue} + +### Unknown {#wu-han-da-xue-unknown} + +<Route namespace="whu" data={{"path":"/hyxt/:category{.+}?","name":"Unknown","maintainers":[],"location":"hyxt.ts"}} /> + +### Unknown {#wu-han-da-xue-unknown} + +<Route namespace="whu" data={{"path":"/news/:category{.+}?","name":"Unknown","maintainers":[],"location":"news.ts"}} /> + +## 西安交通大学 {#xi-an-jiao-tong-da-xue} + +### Unknown {#xi-an-jiao-tong-da-xue-unknown} + +<Route namespace="xjtu" data={{"path":"/dean/:subpath{.+}","name":"Unknown","maintainers":[],"location":"dean.ts"}} /> + +### Unknown {#xi-an-jiao-tong-da-xue-unknown} + +<Route namespace="xjtu" data={{"path":"/international/:subpath{.+}","name":"Unknown","maintainers":[],"location":"international.ts"}} /> + +### Unknown {#xi-an-jiao-tong-da-xue-unknown} + +<Route namespace="xjtu" data={{"path":"/dyyy/:path{.+}","name":"Unknown","maintainers":[],"location":"dyyy/index.ts"}} /> + +## 香港 01 {#xiang-gang-01} + +### Unknown {#xiang-gang-01-unknown} + +<Route namespace="hk01" data={{"path":"/channel/:id?","radar":{"source":["hk01.com/channel/:id","hk01.com/"]},"name":"Unknown","maintainers":[],"location":"channel.ts"}} /> + +### Unknown {#xiang-gang-01-unknown} + +<Route namespace="hk01" data={{"path":"/issue/:id?","radar":{"source":["hk01.com/issue/:id","hk01.com/"]},"name":"Unknown","maintainers":[],"location":"issue.ts"}} /> + +### Unknown {#xiang-gang-01-unknown} + +<Route namespace="hk01" data={{"path":"/tag/:id?","radar":{"source":["hk01.com/tag/:id","hk01.com/"]},"name":"Unknown","maintainers":[],"location":"tag.ts"}} /> + +### Unknown {#xiang-gang-01-unknown} + +<Route namespace="hk01" data={{"path":"/zone/:id?","radar":{"source":["hk01.com/zone/:id","hk01.com/"]},"name":"Unknown","maintainers":[],"location":"zone.ts"}} /> + +## 小红书 {#xiao-hong-shu} + +### Unknown {#xiao-hong-shu-unknown} + +<Route namespace="xiaohongshu" data={{"path":"/user/:user_id/notes/fulltext","radar":{"source":["xiaohongshu.com/user/profile/:user_id"],"target":"/user/:user_id/notes"},"name":"Unknown","maintainers":[],"location":"notes.ts"}} /> + +### Unknown {#xiao-hong-shu-unknown} + +<Route namespace="xiaohongshu" data={{"path":"/user/:user_id/:category","name":"Unknown","maintainers":[],"location":"user.ts"}} /> + +## 小宇宙 {#xiao-yu-zhou} + +### Unknown {#xiao-yu-zhou-unknown} + +<Route namespace="xiaoyuzhou" data={{"path":"/","radar":{"source":["xiaoyuzhoufm.com/"],"target":""},"name":"Unknown","maintainers":["prnake","Maecenas"],"url":"xiaoyuzhoufm.com/","location":"pickup.ts"}} /> + +## 新假期周刊 {#xin-jia-qi-zhou-kan} + +### Unknown {#xin-jia-qi-zhou-kan-unknown} + +<Route namespace="weekendhk" data={{"path":"/","radar":{"source":["weekendhk.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"weekendhk.com/","location":"posts.ts"}} /> + +## 新浪 {#xin-lang} + +### Unknown {#xin-lang-unknown} + +<Route namespace="sina" data={{"path":"/sports/:type?","name":"Unknown","maintainers":["nczitzk"],"location":"sports.ts"}} /> + +## 星島日報 {#xing-dao-ri-bao} + +### Unknown {#xing-dao-ri-bao-unknown} + +<Route namespace="stheadline" data={{"path":"/std/realtime/:category{.+}?","name":"Unknown","maintainers":[],"location":"std/realtime.ts"}} /> + +## 星洲网 {#xing-zhou-wang} + +### Unknown {#xing-zhou-wang-unknown} + +<Route namespace="sinchew" data={{"path":"*","radar":{"source":["sinchew.com.my/"],"target":""},"name":"Unknown","maintainers":[],"url":"sinchew.com.my/","location":"index.ts"}} /> + +## 一亩三分地 {#yi-mu-san-fen-di} + +### Unknown {#yi-mu-san-fen-di-unknown} + +<Route namespace="1point3acres" data={{"path":["/post/:type?/:order?","/thread/:type?/:order?"],"name":"Unknown","maintainers":["EthanWng97","DIYgod","nczitzk"],"url":"instant.1point3acres.com/","description":"分类\n\n | 热门帖子 | 最新帖子 |\n | -------- | -------- |\n | hot | new |\n\n 排序方式\n\n | 最新回复 | 最新发布 |\n | -------- | -------- |\n | | post |","location":"thread.ts"}} /> + +分类 + +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | + +排序方式 + +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post | + +### Unknown {#yi-mu-san-fen-di-unknown} + +<Route namespace="1point3acres" data={{"path":["/post/:type?/:order?","/thread/:type?/:order?"],"name":"Unknown","maintainers":["EthanWng97","DIYgod","nczitzk"],"url":"instant.1point3acres.com/","description":"分类\n\n | 热门帖子 | 最新帖子 |\n | -------- | -------- |\n | hot | new |\n\n 排序方式\n\n | 最新回复 | 最新发布 |\n | -------- | -------- |\n | | post |","location":"thread.ts"}} /> + +分类 + +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | + +排序方式 + +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post | ## 有据 {#you-ju} -### 最新文章列表 {#you-ju-zui-xin-wen-zhang-lie-biao} +### Unknown {#you-ju-unknown} -<Route author="kdanfly" example="/chinafactcheck" path="/chinafactcheck" radar="1" /> +<Route namespace="chinafactcheck" data={{"path":"/","radar":{"source":["chinafactcheck.com/"],"target":""},"name":"Unknown","maintainers":["kdanfly"],"url":"chinafactcheck.com/","location":"index.ts"}} /> + +## 雨苁博客 {#yu-cong-bo-ke} + +### Unknown {#yu-cong-bo-ke-unknown} + +<Route namespace="ddosi" data={{"path":"/","radar":{"source":["ddosi.org/"],"target":""},"name":"Unknown","maintainers":["XinRoom"],"url":"ddosi.org/","location":"index.ts"}} /> + +## 长江大学 {#chang-jiang-da-xue} + +### Unknown {#chang-jiang-da-xue-unknown} + +<Route namespace="yangtzeu" data={{"path":"/dongke/*","name":"Unknown","maintainers":[],"location":"dongke.ts"}} /> + +## 赵容部落 {#zhao-rong-bu-luo} + +### Unknown {#zhao-rong-bu-luo-unknown} + +<Route namespace="zrblog" data={{"path":"/","radar":{"source":["zrblog.net/"],"target":""},"name":"Unknown","maintainers":["cnkmmk"],"url":"zrblog.net/","location":"rss.ts"}} /> + +## 浙江省土地使用权网上交易系统 {#zhe-jiang-sheng-tu-di-shi-yong-quan-wang-shang-jiao-yi-xi-tong} + +### Unknown {#zhe-jiang-sheng-tu-di-shi-yong-quan-wang-shang-jiao-yi-xi-tong-unknown} + +<Route namespace="zjgtjy" data={{"path":"/:type?","name":"Unknown","maintainers":["Fatpandac"],"location":"index.ts"}} /> + +## 正版中国 {#zheng-ban-zhong-guo} + +### Unknown {#zheng-ban-zhong-guo-unknown} + +<Route namespace="getitfree" data={{"path":"/:filter{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## 直播吧 {#zhi-bo-ba} + +### Unknown {#zhi-bo-ba-unknown} + +<Route namespace="zhibo8" data={{"path":"/luxiang/:category?","radar":{"source":["zhibo8.cc/:category/luxiang.htm"],"target":"/luxiang/:category"},"name":"Unknown","maintainers":["TonyRL"],"location":"luxiang.ts"}} /> + +## 中国的中古 {#zhong-guo-de-zhong-gu} + +### Unknown {#zhong-guo-de-zhong-gu-unknown} + +<Route namespace="medieval-china" data={{"path":"/","radar":{"source":["medieval-china.club/"],"target":""},"name":"Unknown","maintainers":["artefaritaKuniklo"],"url":"medieval-china.club/","location":"post.ts"}} /> ## 中国工商银行 {#zhong-guo-gong-shang-yin-hang} ### 外汇牌价 {#zhong-guo-gong-shang-yin-hang-wai-hui-pai-jia} -<Route author="leoleoasd" example="/icbc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91" path="/icbc/whpj/:format?" paramsDesc={['输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。']}> - | 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- | - | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc | -</Route> +<Route namespace="icbc" data={{"path":"/whpj/:format?","categories":["other"],"example":"/icbc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91","parameters":{"format":"输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["icbc.com.cn/column/1438058341489590354.html"],"target":"/whpj"},"name":"外汇牌价","maintainers":["leoleoasd"],"url":"icbc.com.cn/column/1438058341489590354.html","description":"| 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 |\n | ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- |\n | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |","location":"whpj.ts"}} /> + +| 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | +| ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- | +| short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc | ## 中国光大银行 {#zhong-guo-guang-da-yin-hang} +### Unknown {#zhong-guo-guang-da-yin-hang-unknown} + +<Route namespace="cebbank" data={{"path":"/quotation/all","categories":["other"],"example":"/cebbank/quotation/all","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cebbank.com/site/ygzx/whpj/index.html","cebbank.com/eportal/ui","cebbank.com/"]},"name":"Unknown","maintainers":["linbuxiao"],"url":"cebbank.com/site/ygzx/whpj/index.html","location":"all.ts"}} /> + ### 外汇牌价 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia} +<Route namespace="cebbank" data={{"path":"/quotation/history/:type","categories":["other"],"example":"/cebbank/quotation/history/usd","parameters":{"type":"货币的缩写,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"外汇牌价","maintainers":["linbuxiao"],"description":"#### 总览 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-zong-lan}\n\n\n#### 历史牌价 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-li-shi-pai-jia}\n\n | 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 |\n | ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- |\n | usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw |","location":"history.ts"}} /> + #### 总览 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-zong-lan} -<Route author="linbuxiao" example="/cebbank/quotation/all" path="/cebbank/quotation/all" /> - #### 历史牌价 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-li-shi-pai-jia} -<Route author="linbuxiao" example="/cebbank/quotation/history/usd" path="/cebbank/quotation/history/:type" paramsDesc={['货币的缩写,见下表']}> - | 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 | - | ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- | - | usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw | -</Route> +| 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 | +| ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- | +| usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw | ## 中国国家图书馆 {#zhong-guo-guo-jia-tu-shu-guan} ### 读者云平台 {#zhong-guo-guo-jia-tu-shu-guan-du-zhe-yun-ping-tai} -<Route author="nczitzk" example="/nlc/read/电子图书" path="/nlc/read/:type?" paramsDesc={['分类,见下表,默认为电子图书']} radar="1"> - | [电子图书](http://read.nlc.cn/outRes/outResList?type=电子图书) | [电子期刊](http://read.nlc.cn/outRes/outResList?type=电子期刊) | [电子论文](http://read.nlc.cn/outRes/outResList?type=电子论文) | [电子报纸](http://read.nlc.cn/outRes/outResList?type=电子报纸) | [音视频](http://read.nlc.cn/outRes/outResList?type=音视频) | - | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | +<Route namespace="nlc" data={{"path":"/read/:type?","categories":["other"],"example":"/nlc/read/电子图书","parameters":{"type":"分类,见下表,默认为电子图书"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"读者云平台","maintainers":["nczitzk"],"description":"| [电子图书](http://read.nlc.cn/outRes/outResList?type=电子图书) | [电子期刊](http://read.nlc.cn/outRes/outResList?type=电子期刊) | [电子论文](http://read.nlc.cn/outRes/outResList?type=电子论文) | [电子报纸](http://read.nlc.cn/outRes/outResList?type=电子报纸) | [音视频](http://read.nlc.cn/outRes/outResList?type=音视频) |\n | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- |\n\n | [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) |\n | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |","location":"read.ts"}} /> - | [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) | - | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- | -</Route> +| [电子图书](http://read.nlc.cn/outRes/outResList?type=电子图书) | [电子期刊](http://read.nlc.cn/outRes/outResList?type=电子期刊) | [电子论文](http://read.nlc.cn/outRes/outResList?type=电子论文) | [电子报纸](http://read.nlc.cn/outRes/outResList?type=电子报纸) | [音视频](http://read.nlc.cn/outRes/outResList?type=音视频) | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | + +| [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) | +| -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- | + +## 中国国家应急广播 {#zhong-guo-guo-jia-ying-ji-guang-bo} + +### Unknown {#zhong-guo-guo-jia-ying-ji-guang-bo-unknown} + +<Route namespace="cneb" data={{"path":"/yjxx/*","radar":{"source":["cneb.gov.cn/yjxx","cneb.gov.cn/"],"target":"/yjxx"},"name":"Unknown","maintainers":[],"url":"cneb.gov.cn/yjxx","location":"yjxx.ts"}} /> ## 中国互联网联合辟谣平台 {#zhong-guo-hu-lian-wang-lian-he-pi-yao-ping-tai} ### 今日辟谣 {#zhong-guo-hu-lian-wang-lian-he-pi-yao-ping-tai-jin-ri-pi-yao} -<Route author="Fatpandac" example="/piyao/jrpy" path="/piyao/jrpy" /> +<Route namespace="piyao" data={{"path":"/jrpy","categories":["other"],"example":"/piyao/jrpy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["piyao.org.cn/jrpy/index.htm"]},"name":"今日辟谣","maintainers":["Fatpandac"],"url":"piyao.org.cn/jrpy/index.htm","location":"jrpy.ts"}} /> + +## 中国军网 {#zhong-guo-jun-wang} + +### Unknown {#zhong-guo-jun-wang-unknown} + +<Route namespace="81" data={{"path":"/81rc/*","name":"Unknown","maintainers":[],"location":"81rc/index.ts"}} /> + +## 中国科学院 {#zhong-guo-ke-xue-yuan} + +### Unknown {#zhong-guo-ke-xue-yuan-unknown} + +<Route namespace="cas" data={{"path":"/genetics/:path{.+}","name":"Unknown","maintainers":[],"location":"genetics/index.ts"}} /> + +### Unknown {#zhong-guo-ke-xue-yuan-unknown} + +<Route namespace="cas" data={{"path":"/is/:path{.+}","name":"Unknown","maintainers":[],"location":"is/index.ts"}} /> ## 中国炼焦行业协会 {#zhong-guo-lian-jiao-hang-ye-xie-hui} -### 汇总 {#zhong-guo-lian-jiao-hang-ye-xie-hui-hui-zong} +### Unknown {#zhong-guo-lian-jiao-hang-ye-xie-hui-unknown} -<Route author="nczitzk" example="/cnljxh/collect" path="/cnljxh/collect/:id?" paramsDesc={['栏目 id,见下表,可在对应栏目页 URL 中找到,默认为 10039,即市场价格 > 价格汇总']} radar="1" supportBT="1"> - | 价格汇总 | - | -------- | - | 10039 | -</Route> +<Route namespace="cnljxh" data={{"path":"/:category?/:id?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> -### 价格指数 {#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge-zhi-shu} +## 中国期货市场监控中心 {#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin} -<Route author="nczitzk" example="/cnljxh/date" path="/cnljxh/date/:id?" paramsDesc={['栏目 id,见下表,可在对应栏目页 URL 中找到,默认为 5575,即价格指数 > 焦炭指数']} radar="1" supportBT="1"> - | 焦炭指数 | 炼焦煤指数 | - | -------- | ---------- | - | 5575 | 5907 | -</Route> +### Unknown {#zhong-guo-qi-huo-shi-chang-jian-kong-zhong-xin-unknown} -### 分析数据 {#zhong-guo-lian-jiao-hang-ye-xie-hui-fen-xi-shu-ju} - -<Route author="nczitzk" example="/cnljxh/info" path="/cnljxh/info/:id?" paramsDesc={['栏目 id,见下表,可在对应栏目页 URL 中找到,默认为 575,即分析数据 > 市场分析']} radar="1" supportBT="1"> - | 市场分析 | 一周评述 | 核心数据 | - | -------- | -------- | -------- | - | 575 | 5573 | 5417 | -</Route> - -### 新闻 {#zhong-guo-lian-jiao-hang-ye-xie-hui-xin-wen} - -<Route author="nczitzk" example="/cnljxh/news" path="/cnljxh/news/:id?" paramsDesc={['栏目 id,见下表,可在对应栏目页 URL 中找到,默认为 10,即协会公告']} radar="1" supportBT="1"> - <details> - <summary>更多分类</summary> - - #### 协会专区 - - | 协会简介 | 协会章程 | 协会领导 | 入会程序 | 组织机构 | - | -------- | -------- | -------- | -------- | -------- | - | 24 | 25 | 26 | 27 | 28 | - - #### 协会公告 - - | 协会公告 | - | -------- | - | 10 | - - #### 行业新闻 - - | 协会动态 | 企业动态 | 行业动态 | - | -------- | -------- | -------- | - | 8 | 9 | 11 | - - #### 政策法规 - - | 政策法规 | - | -------- | - | 12 | - - #### 行业标准 - - | 国家标准 | 行业标准 | 团体标准 | - | -------- | -------- | -------- | - | 13 | 14 | 15 | - - #### 技术广角 - - | 技术广角 | - | -------- | - | 16 | - </details> -</Route> - -### 价格 {#zhong-guo-lian-jiao-hang-ye-xie-hui-jia-ge} - -<Route author="nczitzk" example="/cnljxh/price" path="/cnljxh/price/:id?" paramsDesc={['栏目 id,见下表,可在对应栏目页 URL 中找到,默认为 299,即市场价格 > 价格行情']} radar="1" supportBT="1"> - | 价格行情 | 双焦运费 | - | -------- | -------- | - | 299 | 2143 | -</Route> +<Route namespace="cfmmc" data={{"path":"/:id{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 中国期货业协会 {#zhong-guo-qi-huo-ye-xie-hui} ### 分析师园地 {#zhong-guo-qi-huo-ye-xie-hui-fen-xi-shi-yuan-di} -<Route author="TonyRL" example="/cfachina/servicesupport/analygarden" path="/cfachina/servicesupport/analygarden/:program?" paramsDesc={['分类,见下表,留空为全部']} radar="1"> - | 有色金属类 | 黑色金属类 | 能源化工类 | 贵金属类 | 农产品类 | 金融类 | 指数类 | - | ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ | - | ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl | -</Route> +<Route namespace="cfachina" data={{"path":"/servicesupport/analygarden/:program?","categories":["other"],"example":"/cfachina/servicesupport/analygarden","parameters":{"program":"分类,见下表,留空为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cfachina.org/servicesupport/analygarden/:program?","cfachina.org/"]},"name":"分析师园地","maintainers":["TonyRL"],"description":"| 有色金属类 | 黑色金属类 | 能源化工类 | 贵金属类 | 农产品类 | 金融类 | 指数类 |\n | ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ |\n | ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl |","location":"analygarden.ts"}} /> + +| 有色金属类 | 黑色金属类 | 能源化工类 | 贵金属类 | 农产品类 | 金融类 | 指数类 | +| ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ | +| ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl | ## 中国汽车工业协会 {#zhong-guo-qi-che-gong-ye-xie-hui} -### 分类 {#zhong-guo-qi-che-gong-ye-xie-hui-fen-lei} +### Unknown {#zhong-guo-qi-che-gong-ye-xie-hui-unknown} -<Route author="nczitzk" example="/caam/1" path="/caam" paramsDesc={['分类,见下表,默认为首页']} radar="1"> - | [首页](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 | -</Route> +<Route namespace="caam" data={{"path":"/:category?","name":"Unknown","maintainers":["nczitzk"],"location":"index.ts"}} /> ## 中国汽车工业协会统计信息网 {#zhong-guo-qi-che-gong-ye-xie-hui-tong-ji-xin-xi-wang} ### 分类 {#zhong-guo-qi-che-gong-ye-xie-hui-tong-ji-xin-xi-wang-fen-lei} -<Route author="nczitzk" example="/auto-stats" path="/auto-stats/:category?" paramsDesc={['分类,见下表,默认为信息快递']} radar="1"> - | 信息快递 | 工作动态 | 专题分析 | - | -------- | -------- | -------- | - | xxkd | gzdt | ztfx | -</Route> +<Route namespace="auto-stats" data={{"path":"/:category?","categories":["other"],"example":"/auto-stats","parameters":{"category":"分类,见下表,默认为信息快递"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 信息快递 | 工作动态 | 专题分析 |\n | -------- | -------- | -------- |\n | xxkd | gzdt | ztfx |","location":"index.ts"}} /> + +| 信息快递 | 工作动态 | 专题分析 | +| -------- | -------- | -------- | +| xxkd | gzdt | ztfx | + +## 中国人民银行 {#zhong-guo-ren-min-yin-hang} + +<details> + <summary>*业务咨询* 和 *投诉建议* 可用的站点参数</summary> + + | 上海市 | 北京市 | 天津市 | 河北省 | + | -------- | ------- | ------- | ------ | + | shanghai | beijing | tianjin | hebei | + + | 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | + | ------ | ------------ | -------- | ------ | + | shanxi | neimenggu | liaoning | jilin | + + | 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | + | ------------ | ------- | -------- | ------ | + | heilongjiang | jiangsu | zhejiang | anhui | + + | 福建省 | 江西省 | 山东省 | 河南省 | + | ------ | ------- | -------- | ------ | + | fujian | jiangxi | shandong | henan | + + | 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | + | ------ | ------ | --------- | -------------- | + | hubei | hunan | guangdong | guangxi | + + | 海南省 | 重庆市 | 四川省 | 贵州省 | + | ------ | --------- | ------- | ------- | + | hainan | chongqing | sichuan | guizhou | + + | 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | + | ------ | ---------- | ------- | ------ | + | yunnan | xizang | shaanxi | gansu | + + | 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | + | ------- | -------------- | ---------------- | ------ | + | qinghai | ningxia | xinjiang | dalian | + + | 宁波市 | 厦门市 | 青岛市 | 深圳市 | + | ------ | ------ | ------- | -------- | + | ningbo | xiamen | qingdao | shenzhen | +</details> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/anhui/kjt/*","name":"Unknown","maintainers":[],"location":"anhui/kjt.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/beijing/bphc/*","name":"Unknown","maintainers":[],"location":"beijing/bphc/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/beijing/kw/:channel","name":"Unknown","maintainers":["Fatpandac"],"location":"beijing/kw/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/cac/*","name":"Unknown","maintainers":[],"location":"cac/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/ccdi/*","name":"Unknown","maintainers":[],"location":"ccdi/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/chinamine-safety/xw/:category{.+}?","name":"Unknown","maintainers":[],"location":"chinamine-safety/xw.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/chinamine-safety/zfxxgk/:category{.+}?","name":"Unknown","maintainers":[],"location":"chinamine-safety/zfxxgk.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/chongqing/gzw/:category{.+}?","name":"Unknown","maintainers":[],"location":"chongqing/gzw.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/cmse/*","name":"Unknown","maintainers":[],"location":"cmse/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/cnnic/*","name":"Unknown","maintainers":[],"location":"cnnic/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/csrc/news/:suffix{.+}?","name":"Unknown","maintainers":[],"location":"csrc/news.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/dianbai/*","name":"Unknown","maintainers":[],"location":"dianbai/dianbai.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/gaozhou/*","name":"Unknown","maintainers":[],"location":"gaozhou/gaozhou.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/gz/:channel/:category","name":"Unknown","maintainers":[],"location":"gz/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/huazhou/*","name":"Unknown","maintainers":[],"location":"huazhou/huazhou.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/maoming/*","name":"Unknown","maintainers":[],"location":"maoming/maoming.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":["/fmprc/:category?","/mfa/wjdt/:category?"],"name":"Unknown","maintainers":["nicolaszf","nczitzk"],"description":"| 分类 | category |\n | ---------- | -------- |\n | 领导人活动 | gjldrhd |\n | 外事日程 | wsrc |\n | 部领导活动 | wjbxw |\n | 业务动态 | sjxw |\n | 发言人表态 | fyrbt |\n | 吹风会 | cfhsl |\n | 大使任免 | dsrm |\n | 驻外报道 | zwbd |\n | 政策解读 | zcjd |","location":"mfa/wjdt.ts"}} /> + +| 分类 | category | +| ---------- | -------- | +| 领导人活动 | gjldrhd | +| 外事日程 | wsrc | +| 部领导活动 | wjbxw | +| 业务动态 | sjxw | +| 发言人表态 | fyrbt | +| 吹风会 | cfhsl | +| 大使任免 | dsrm | +| 驻外报道 | zwbd | +| 政策解读 | zcjd | + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":["/fmprc/:category?","/mfa/wjdt/:category?"],"name":"Unknown","maintainers":["nicolaszf","nczitzk"],"description":"| 分类 | category |\n | ---------- | -------- |\n | 领导人活动 | gjldrhd |\n | 外事日程 | wsrc |\n | 部领导活动 | wjbxw |\n | 业务动态 | sjxw |\n | 发言人表态 | fyrbt |\n | 吹风会 | cfhsl |\n | 大使任免 | dsrm |\n | 驻外报道 | zwbd |\n | 政策解读 | zcjd |","location":"mfa/wjdt.ts"}} /> + +| 分类 | category | +| ---------- | -------- | +| 领导人活动 | gjldrhd | +| 外事日程 | wsrc | +| 部领导活动 | wjbxw | +| 业务动态 | sjxw | +| 发言人表态 | fyrbt | +| 吹风会 | cfhsl | +| 大使任免 | dsrm | +| 驻外报道 | zwbd | +| 政策解读 | zcjd | + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/mgs/*","name":"Unknown","maintainers":[],"location":"mgs/mgs.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/mmht/*","name":"Unknown","maintainers":[],"location":"mmht/mmht.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/moa/:suburl{.+}","radar":{"source":["moa.gov.cn/"],"target":"/moa/:suburl"},"name":"Unknown","maintainers":[],"url":"moa.gov.cn/","location":"moa/moa.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":["/moa/sjzxfb/:category{.+}?","/moa/zdscxx/:category{.+}?"],"name":"Unknown","maintainers":[],"location":"moa/zdscxx.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":["/moa/sjzxfb/:category{.+}?","/moa/zdscxx/:category{.+}?"],"name":"Unknown","maintainers":[],"location":"moa/zdscxx.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/mofcom/article/:suffix{.+}","name":"Unknown","maintainers":[],"location":"mofcom/article.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/mot/:category{.+}?","name":"Unknown","maintainers":[],"location":"mot/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/ndrc/fggz/:category{.+}?","name":"Unknown","maintainers":[],"location":"ndrc/fggz.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/ndrc/xwdt/:category{.+}?","name":"Unknown","maintainers":[],"location":"ndrc/xwdt.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/nifdc/:path{.+}?","name":"Unknown","maintainers":[],"location":"nifdc/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/nmpa/*","name":"Unknown","maintainers":[],"location":"nmpa/generic.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/nopss/*","name":"Unknown","maintainers":[],"location":"nopss/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/nsfc/*","name":"Unknown","maintainers":[],"location":"nsfc/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/pbc/zcyj","radar":{"source":["pbc.gov.cn/redianzhuanti/118742/4122386/4122510/index.html"]},"name":"Unknown","maintainers":["Fatpandac"],"url":"pbc.gov.cn/redianzhuanti/118742/4122386/4122510/index.html","location":"pbc/zcyj.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/sasac/:path{.+}","name":"Unknown","maintainers":[],"location":"sasac/generic.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/sdb/*","name":"Unknown","maintainers":[],"location":"sdb/sdb.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/shanghai/yjj/*","name":"Unknown","maintainers":[],"location":"shanghai/yjj/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/stats/*","name":"Unknown","maintainers":[],"location":"stats/index.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/suzhou/fg/:category{.+}?","name":"Unknown","maintainers":[],"location":"suzhou/fg.ts"}} /> + +### Unknown {#zhong-guo-ren-min-yin-hang-unknown} + +<Route namespace="gov" data={{"path":"/xinyi/*","name":"Unknown","maintainers":[],"location":"xinyi/xinyi.ts"}} /> + +## 中国新闻网 {#zhong-guo-xin-wen-wang} + +### Unknown {#zhong-guo-xin-wen-wang-unknown} + +<Route namespace="chinanews" data={{"path":"/","radar":{"source":["chinanews.com.cn/"],"target":""},"name":"Unknown","maintainers":["yuxinliu-alex"],"url":"chinanews.com.cn/","location":"index.ts"}} /> ## 中国兴业银行 {#zhong-guo-xing-ye-yin-hang} ### 外汇牌价 {#zhong-guo-xing-ye-yin-hang-wai-hui-pai-jia} -<Route author="Qixingchen" example="/cib/whpj/xh?filter_title=USD" path="/cib/whpj/:format?" paramsDesc={['输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。']}> - | 短格式 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | -------- | -------- | -------- | -------- | -------- | -------- | - | short | xh | xc | xhmr | xhmc | xcmr | xcmc | -</Route> +<Route namespace="cib" data={{"path":"/whpj/:format?","categories":["other"],"example":"/cib/whpj/xh?filter_title=USD","parameters":{"format":"输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cib.com.cn/"],"target":"/whpj"},"name":"外汇牌价","maintainers":["Qixingchen"],"url":"cib.com.cn/","description":"| 短格式 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 |\n | ------ | -------- | -------- | -------- | -------- | -------- | -------- |\n | short | xh | xc | xhmr | xhmc | xcmr | xcmc |","location":"whpj.ts"}} /> + +| 短格式 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | +| ------ | -------- | -------- | -------- | -------- | -------- | -------- | +| short | xh | xc | xhmr | xhmc | xcmr | xcmc | ## 中国银行 {#zhong-guo-yin-hang} ### 外汇牌价 {#zhong-guo-yin-hang-wai-hui-pai-jia} -<Route author="LogicJake HenryQW" example="/boc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91" path="/boc/whpj/:format?" paramsDesc={['输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。']}> - | 短格式 | 中行折算价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | - | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc | -</Route> +<Route namespace="boc" data={{"path":"/whpj/:format?","categories":["other"],"example":"/boc/whpj/zs?filter_title=%E8%8B%B1%E9%95%91","parameters":{"format":"输出的标题格式,默认为标题 + 所有价格。短格式仅包含货币名称。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["boc.cn/sourcedb/whpj","boc.cn/"],"target":"/whpj"},"name":"外汇牌价","maintainers":["LogicJake","HenryQW"],"url":"boc.cn/sourcedb/whpj","description":"| 短格式 | 中行折算价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 |\n | ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |","location":"whpj.ts"}} /> + +| 短格式 | 中行折算价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | +| ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | +| short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc | + +## 中国银行保险监督管理委员会 {#zhong-guo-yin-hang-bao-xian-jian-du-guan-li-wei-yuan-hui} + +### Unknown {#zhong-guo-yin-hang-bao-xian-jian-du-guan-li-wei-yuan-hui-unknown} + +<Route namespace="cbirc" data={{"path":"/:category?","radar":{"source":["cbirc.gov.cn/:category","cbirc.gov.cn/"]},"name":"Unknown","maintainers":["JkCheung"],"location":"index.ts"}} /> + +## 中国驻外使领馆 {#zhong-guo-zhu-wai-shi-ling-guan} + +支持国家列表 + +加拿大 `CA` + +- 大使馆: `/embassy/ca` + +- 领事馆城市列表: + +| 城市 | 路由 | +| -------- | ---------------------- | +| 蒙特利尔 | `/embassy/ca/montreal` | + +* * * + +德国 `DE` + +- 大使馆: `/embassy/de` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | -------------------- | +| 慕尼黑 | `/embassy/de/munich` | + +* * * + +法国 `FR` + +- 大使馆: `/embassy/fr` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---------- | ------------------------ | +| 马赛 | `/embassy/fr/marseille` | +| 斯特拉斯堡 | `/embassy/fr/strasbourg` | +| 里昂 | `/embassy/fr/lyon` | + +* * * + +日本 `JP` + +- 大使馆: `/embassy/jp` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | ---------------------- | +| 长崎 | `/embassy/jp/nagasaki` | +| 大阪 | `/embassy/jp/osaka` | +| 福冈 | `/embassy/jp/fukuoka` | +| 名古屋 | `/embassy/jp/nagoya` | +| 札幌 | `/embassy/jp/sapporo` | +| 新潟 | `/embassy/jp/niigata` | + +* * * + +韩国 `KR` + +- 大使馆: `/embassy/kr` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---- | --------------------- | +| 釜山 | `/embassy/kr/busan` | +| 济州 | `/embassy/kr/jeju` | +| 光州 | `/embassy/kr/gwangju` | + +* * * + +马来西亚 `MY` + +- 大使馆: `/embassy/my` + +* * * + +新加坡 `SG` + +- 大使馆: `/embassy/sg` + +* * * + +美国 `US` + +- 大使馆: `/embassy/us` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ------ | -------------------------- | +| 纽约 | `/embassy/us/newyork` | +| 芝加哥 | `/embassy/us/chicago` | +| 旧金山 | `/embassy/us/sanfrancisco` | + +* * * + +英国 `UK` + +- 大使馆: `/embassy/uk` + +- 领事馆城市列表: + +| 城市 | 路由 | +| ---------- | ------------------------ | +| 爱丁堡 | `/embassy/uk/edinburgh` | +| 贝尔法斯特 | `/embassy/uk/belfast` | +| 曼彻斯特 | `/embassy/uk/manchester` | + +### Unknown {#zhong-guo-zhu-wai-shi-ling-guan-unknown} + +<Route namespace="embassy" data={{"path":"/:country/:city?","name":"Unknown","maintainers":["HenryQW"],"location":"index.ts"}} /> + +## 中国作家网 {#zhong-guo-zuo-jia-wang} + +### Unknown {#zhong-guo-zuo-jia-wang-unknown} + +<Route namespace="chinawriter" data={{"path":"/:id{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> ## 中华全国专利代理师协会 {#zhong-hua-quan-guo-zhuan-li-dai-li-shi-xie-hui} ### 标签 {#zhong-hua-quan-guo-zhuan-li-dai-li-shi-xie-hui-biao-qian} -<Route author="nczitzk" example="/acpaa" path="/acpaa/:id?/:name?" paramsDesc={['标签 id,默认为 1,可在对应标签页 URL 中找到', '标签名称,默认为重要通知,可在对应标签页 URL 中找到']} radar="1" /> +<Route namespace="acpaa" data={{"path":"/:id?/:name?","categories":["other"],"example":"/acpaa","parameters":{"id":"标签 id,默认为 1,可在对应标签页 URL 中找到","name":"标签名称,默认为重要通知,可在对应标签页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"标签","maintainers":["nczitzk"],"location":"index.ts"}} /> -## はてな {#%E3%81%AF%E3%81%A6%E3%81%AA} +## 中文播客榜 {#zhong-wen-bo-ke-bang} -### はてな匿名ダイアリー - 人気記事アーカイブ {#%E3%81%AF%E3%81%A6%E3%81%AA-%E3%81%AF%E3%81%A6%E3%81%AA-ni-ming-%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AA%E3%83%BC-ren-qi-ji-shi-%E3%82%A2%E3%83%BC%E3%82%AB%E3%82%A4%E3%83%96} +:::tip +可以通过指定 `limit` 参数确定榜单排名下限,默认为 250。 -<Route author="masakichi" example="/hatena/anonymous_diary/archive" path="/hatena/anonymous_diary/archive" /> +若只查看榜单前 50,可在订阅 URL 后加入 `?limit=50`。 + +即,以 [热门节目](https://xyzrank.com/#/) 为例,路由为[`/xyzrank?limit=50`](https://rsshub.app/xyzrank?limit=50)。 +::: + +### Unknown {#zhong-wen-bo-ke-bang-unknown} + +<Route namespace="xyzrank" data={{"path":"/:category?","radar":{"source":["xyzrank.com/"],"target":""},"name":"Unknown","maintainers":[],"url":"xyzrank.com/","location":"index.ts"}} /> + +## 中证网 {#zhong-zheng-wang} + +### Unknown {#zhong-zheng-wang-unknown} + +<Route namespace="cs" data={{"path":"/:category{.+}?","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +### Unknown {#zhong-zheng-wang-unknown} + +<Route namespace="cs" data={{"path":["/news/zzkx","/zzkx"],"name":"Unknown","maintainers":[],"location":"zzkx.ts"}} /> + +### Unknown {#zhong-zheng-wang-unknown} + +<Route namespace="cs" data={{"path":["/news/zzkx","/zzkx"],"name":"Unknown","maintainers":[],"location":"zzkx.ts"}} /> + +## 字节点击 {#zi-jie-dian-ji} + +### Unknown {#zi-jie-dian-ji-unknown} + +<Route namespace="byteclicks" data={{"path":"/","radar":{"source":["byteclicks.com/"],"target":""},"name":"Unknown","maintainers":["TonyRL"],"url":"byteclicks.com/","location":"index.ts"}} /> + +## 综艺秀 {#zong-yi-xiu} + +### Unknown {#zong-yi-xiu-unknown} + +<Route namespace="zyshow" data={{"path":"*","name":"Unknown","maintainers":[],"location":"index.ts"}} /> + +## アニメ新番組 {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu} + +### Unknown {#%E3%82%A2%E3%83%8B%E3%83%A1-xin-fan-zu-unknown} + +<Route namespace="bangumi" data={{"path":"/moe/*","radar":{"source":["bangumi.moe/"],"target":"/moe"},"name":"Unknown","maintainers":[],"url":"bangumi.moe/","location":"moe/index.ts"}} /> diff --git a/website/docs/routes/picture.mdx b/website/docs/routes/picture.mdx index d0bb94d88..136c323ce 100644 --- a/website/docs/routes/picture.mdx +++ b/website/docs/routes/picture.mdx @@ -1,208 +1,43 @@ -# 🖼️ Picture - -## 1X {#1x} - -### Photos {#1x-photos} - -<Route author="nczitzk" example="/1x" path="/1x/:category?" paramsDesc={['Category, Latest awarded by default, see below']}> - | Category | Title | - | ---------------- | ------------- | - | Latest awarded | latest | - | Popular | popular | - | Latest published | published | - | Abstract | abstract | - | Action | action | - | Animals | animals | - | Architecture | architecture | - | Conceptual | conceptual | - | Creative edit | creative-edit | - | Documentary | documentary | - | Everyday | everyday | - | Fine Art Nude | fine-art-nude | - | Humour | humour | - | Landscape | landscape | - | Macro | macro | - | Mood | mood | - | Night | night | - | Performance | performance | - | Portrait | portrait | - | Still life | still-life | - | Street | street | - | Underwater | underwater | - | Wildlife | wildlife | -</Route> - -## 35PHOTO {#35photo} - -### New photos {#35photo-new-photos} - -<Route author="nczitzk" example="/35photo/new" path="/35photo/new" notOperational="1" /> - -### Featured photos {#35photo-featured-photos} - -<Route author="nczitzk" example="/35photo/actual" path="/35photo/actual" notOperational="1" /> - -### New interesting {#35photo-new-interesting} - -<Route author="nczitzk" example="/35photo/interesting" path="/35photo/interesting" notOperational="1" /> - -### Photos on the world map {#35photo-photos-on-the-world-map} - -<Route author="nczitzk" example="/35photo/map" path="/35photo/map" notOperational="1" /> - -### Genre {#35photo-genre} - -<Route author="nczitzk" example="/35photo/genre/99" path="/35photo/genre/:id" paramsDesc={['id, can be found in URL']} notOperational="1" /> - -### Author {#35photo-author} - -<Route author="nczitzk" example="/35photo/author/mariuszsix" path="/35photo/author/:id" paramsDesc={['id, can be found in URL']} notOperational="1" /> +# picture ## 500px 摄影社区 {#500px-she-ying-she-qu} ### 部落影集 {#500px-she-ying-she-qu-bu-luo-ying-ji} -<Route author="TonyRL" example="/500px/tribe/set/f5de0b8aa6d54ec486f5e79616418001" path="/500px/tribe/set/:id" paramsDesc={['部落 ID']} radar="1" /> +<Route namespace="500px" data={{"path":"/tribe/set/:id","categories":["picture"],"example":"/500px/tribe/set/f5de0b8aa6d54ec486f5e79616418001","parameters":{"id":"部落 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"部落影集","maintainers":["TonyRL"],"location":"tribe-set.ts"}} /> ### 摄影师作品 {#500px-she-ying-she-qu-she-ying-shi-zuo-pin} -<Route author="TonyRL" example="/500px/user/works/hujunli" path="/500px/user/works/:id" paramsDesc={['摄影师 ID']} radar="1" notOperational="1" /> +<Route namespace="500px" data={{"path":"/user/works/:id","categories":["picture"],"example":"/500px/user/works/hujunli","parameters":{"id":"摄影师 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["500px.com.cn/:id","500px.com.cn/community/user-details/:id","500px.com.cn/community/user-details/:id/*"]},"name":"摄影师作品","maintainers":["TonyRL"],"location":"user.ts"}} /> ## 8KCosplay {#8kcosplay} -### 最新 {#8kcosplay-zui-xin} - -<Route author="KotoriK" example="/8kcos/" path="/8kcos/" /> - -### 分类 {#8kcosplay-fen-lei} - -<Route author="KotoriK" example="/8kcos/cat/8kasianidol" path="/8kcos/cat/:cat*" paramsDesc={['默认值为8kasianidol,将目录页面url中 /category/ 后面的部分填入。如:https://www.8kcosplay.com/category/8kchineseidol/%e9%a3%8e%e4%b9%8b%e9%a2%86%e5%9f%9f/ 对应的RSS页面为/8kcos/cat/8kchineseidol/%e9%a3%8e%e4%b9%8b%e9%a2%86%e5%9f%9f/。']} /> - ### 标签 {#8kcosplay-biao-qian} -<Route author="KotoriK" example="/8kcos/tag/cosplay" path="/8kcos/tag/:tag" paramsDesc={['标签名']} /> +<Route namespace="8kcos" data={{"path":"/tag/:tag","categories":["picture"],"example":"/8kcos/tag/cosplay","parameters":{"tag":"标签名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["8kcosplay.com/tag/:tag"]},"name":"标签","maintainers":["KotoriK"],"url":"8kcosplay.com/","location":"tag.ts"}} /> + +### 最新 {#8kcosplay-zui-xin} + +<Route namespace="8kcos" data={{"path":"/","categories":["picture"],"example":"/8kcos/","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["8kcosplay.com/"],"target":""},"name":"最新","maintainers":["KotoriK"],"url":"8kcosplay.com/","location":"latest.ts"}} /> ## ArtStation {#artstation} ### Artist Profolio {#artstation-artist-profolio} -<Route author="TonyRL" example="/artstation/wlop" path="/artstation/:handle" paramsDesc={['Artist handle, can be found in URL']} /> - -## Asian to lick {#asian-to-lick} - -### Top rated {#asian-to-lick-top-rated} - -<Route author="nczitzk" example="/asiantolick" path="/asiantolick" radar="1" /> - -### News {#asian-to-lick-news} - -<Route author="nczitzk" example="/asiantolick/page/news" path="/asiantolick/page/news" radar="1" /> - -### Category {#asian-to-lick-category} - -<Route author="nczitzk" example="/asiantolick/category/90" path="/asiantolick/category/:id" paramsDesc={['Category id, can be found in URL']} radar="1"> - | Category | id | - | ---------- | ---- | - | Lolita | 90 | - | Hot Sister | 91 | - | Cosplay | 1030 | - | Sexy | 93 | - | Others | 94 | - | Thailand | 99 | - | Magazine | 100 | - | Hard Sexy | 103 | -</Route> - -### Tag {#asian-to-lick-tag} - -<Route author="nczitzk" example="/asiantolick/tag/1045" path="/asiantolick/tag/:id" paramsDesc={['Tag id, can be found in URL']} radar="1"> - | 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 | | -</Route> - -### Search {#asian-to-lick-search} - -<Route author="nczitzk" example="/asiantolick/search/lolita" path="/asiantolick/search/:keyword" paramsDesc={['Keyword']} radar="1" /> - -### Page {#asian-to-lick-page} - -<Route author="nczitzk" example="/asiantolick/page/news" path="/asiantolick/page/:id" paramsDesc={['Page id']} radar="1" /> - -## Bing {#bing} - -### Daily Wallpaper {#bing-daily-wallpaper} - -<Route author="FHYunCai" example="/bing" path="/bing" radar="1" /> +<Route namespace="artstation" data={{"path":"/:handle","categories":["picture"],"example":"/artstation/wlop","parameters":{"handle":"Artist handle, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.artstation.com/:handle"]},"name":"Artist Profolio","maintainers":["TonyRL"],"location":"user.ts"}} /> ## Booru {#booru} ### MMDArchive 标签查询 {#booru-mmdarchive-biao-qian-cha-xun} -<Route author="N78Wy" example="/booru/mmda/tags/full_body+blue_eyes" path="/booru/mmda/tags/:tags?" paramsDesc={['标签,多个标签使用空格 ` ` 或者 `%20` 连接,如需根据作者查询则在 `user:` 后接上作者名,如:`user:xxxx`']} notOperational="1"> - For example: +<Route namespace="booru" data={{"path":"/mmda/tags/:tags?","categories":["picture"],"example":"/booru/mmda/tags/full_body+blue_eyes","parameters":{"tags":"标签,多个标签使用空格 ` ` 或者 `%20` 连接,如需根据作者查询则在 `user:` 后接上作者名,如:`user:xxxx`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"MMDArchive 标签查询","maintainers":["N78Wy"],"description":"For example:\n\n - 默认查询 (什么 tag 都不加):`/booru/mmda/tags`\n - 默认查询单个 tag:`/booru/mmda/tags/full_body`\n - 默认查询多个 tag:`/booru/mmda/tags/full_body%20blue_eyes`\n - 默认查询根据作者查询:`/booru/mmda/tags/user:xxxx`","location":"mmda.ts"}} /> - - 默认查询 (什么 tag 都不加):`/booru/mmda/tags` - - 默认查询单个 tag:`/booru/mmda/tags/full_body` - - 默认查询多个 tag:`/booru/mmda/tags/full_body%20blue_eyes` - - 默认查询根据作者查询:`/booru/mmda/tags/user:xxxx` -</Route> +For example: -## CNU 视觉联盟 {#cnu-shi-jue-lian-meng} - -### 每日精选 {#cnu-shi-jue-lian-meng-mei-ri-jing-xuan} - -<Route author="hoilc" example="/cnu/selected" path="/cnu/selected" /> - -### 发现 {#cnu-shi-jue-lian-meng-fa-xian} - -<Route author="hoilc" example="/cnu/discovery/hot/自然" path="/cnu/discovery/:type?/:category?" paramsDesc={['板块类型, 默认为`热门`, 具体参见下表', '图片类别, 默认为`0`代表全部, 可参见[这里](http://www.cnu.cc/discoveryPage/hot-0)']} /> - -| 热门 | 推荐 | 最新 | -| ---- | --------- | ------ | -| hot | recommend | recent | - -## DailyArt 每日艺术 {#dailyart-mei-ri-yi-shu} - -### DailyArt {#dailyart-mei-ri-yi-shu-dailyart} - -<Route author="zphw" example="/dailyart/en" path="/dailyart/:language?" paramsDesc={['Support en, es, fr, de, it, zh, jp, etc. English by default.']} anticrawler="1" /> +- 默认查询 (什么 tag 都不加):`/booru/mmda/tags` +- 默认查询单个 tag:`/booru/mmda/tags/full_body` +- 默认查询多个 tag:`/booru/mmda/tags/full_body%20blue_eyes` +- 默认查询根据作者查询:`/booru/mmda/tags/user:xxxx` ## E-Hentai {#e-hentai} @@ -215,209 +50,130 @@ For RSS content, specify options in the `routeParams` parameter in query string ### Favorites {#e-hentai-favorites} -<Route author="yindaheng98" example="/ehentai/favorites/0/posted/1" path="/ehentai/favorites/:favcat?/:order?/:page?/:routeParams?" paramsDesc={['Favorites folder number','`posted`(Sort by gallery release time) , `favorited`(Sort by time added to favorites)', 'Page number', 'Additional parameters, see the table above']} anticrawler="1" supportBT="1" /> - -### Tag {#e-hentai-tag} - -<Route author="yindaheng98" example="/ehentai/tag/language:chinese/1" path="/ehentai/tag/:tag/:page?/:routeParams?" paramsDesc={['Tag', 'Page number', 'Additional parameters, see the table above']} anticrawler="1" supportBT="1" /> +<Route namespace="ehentai" data={{"path":"/favorites/:favcat?/:order?/:page?/:routeParams?","categories":["picture"],"example":"/ehentai/favorites/0/posted/1","parameters":{"favcat":"Favorites folder number","order":"`posted`(Sort by gallery release time) , `favorited`(Sort by time added to favorites)","page":"Page number","routeParams":"Additional parameters, see the table above"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Favorites","maintainers":["yindaheng98","syrinka"],"location":"favorites.ts"}} /> ### Search {#e-hentai-search} -<Route author="yindaheng98" example="/ehentai/search/f_search=artist%3Amana%24/1" path="/ehentai/search/:params?/:page?/:routeParams?" paramsDesc={['Search parameters. You can copy the content after `https://e-hentai.org/?`', 'Page number', 'Additional parameters, see the table above']} anticrawler="1" supportBT="1" /> +<Route namespace="ehentai" data={{"path":"/search/:params?/:page?/:routeParams?","categories":["picture"],"example":"/ehentai/search/f_search=artist%3Amana%24/1","parameters":{"params":"Search parameters. You can copy the content after `https://e-hentai.org/?`","page":"Page number","routeParams":"Additional parameters, see the table above"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["yindaheng98","syrinka"],"location":"search.ts"}} /> + +### Tag {#e-hentai-tag} + +<Route namespace="ehentai" data={{"path":"/tag/:tag/:page?/:routeParams?","categories":["picture"],"example":"/ehentai/tag/language:chinese/1","parameters":{"tag":"Tag","page":"Page number","routeParams":"Additional parameters, see the table above"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":true,"supportPodcast":false,"supportScihub":false},"name":"Tag","maintainers":["yindaheng98","syrinka"],"location":"tag.ts"}} /> ## Fantia {#fantia} ### Search {#fantia-search} -<Route author="nczitzk" example="/fantia/search/posts/all/daily" path="/fantia/search/:type?/:caty?/:period?/:order?/:rating?/:keyword?" paramsDesc={['Type, see the table below, `posts` by default', 'Category, see the table below, can also be found in search page URL, `すべてのクリエイター` by default', 'Ranking period, see the table below, empty by default' ,'Sorting, see the table below, `更新の新しい順` by default', 'Rating, see the table below, `すべて` by default', 'Keyword, empty by default']}> - Type +<Route namespace="fantia" data={{"path":"/search/:type?/:caty?/:period?/:order?/:rating?/:keyword?","categories":["picture"],"example":"/fantia/search/posts/all/daily","parameters":{"type":"Type, see the table below, `posts` by default","caty":"Category, see the table below, can also be found in search page URL, `すべてのクリエイター` by default","period":"Ranking period, see the table below, empty by default","order":"Sorting, see the table below, `更新の新しい順` by default","rating":"Rating, see the table below, `すべて` by default","keyword":"Keyword, empty by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":[],"description":"Type\n\n | クリエイター | 投稿 | 商品 | コミッション |\n | ------------ | ----- | -------- | ------------ |\n | fanclubs | posts | products | commissions |\n\n Category\n\n | 分类 | 分类名 |\n | ---------------------- | ---------- |\n | イラスト | illust |\n | 漫画 | comic |\n | コスプレ | cosplay |\n | YouTuber・配信者 | youtuber |\n | Vtuber | vtuber |\n | 音声作品・ASMR | voice |\n | 声優・歌い手 | voiceactor |\n | アイドル | idol |\n | アニメ・映像・写真 | anime |\n | 3D | 3d |\n | ゲーム制作 | game |\n | 音楽 | music |\n | 小説 | novel |\n | ドール | doll |\n | アート・デザイン | art |\n | プログラム | program |\n | 創作・ハンドメイド | handmade |\n | 歴史・評論・情報 | history |\n | 鉄道・旅行・ミリタリー | railroad |\n | ショップ | shop |\n | その他 | other |\n\n Ranking period\n\n | デイリー | ウィークリー | マンスリー | 全期間 |\n | -------- | ------------ | ---------- | ------ |\n | daily | weekly | monthly | all |\n\n Sorting\n\n | 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 |\n | -------------- | ------------ | -------------- | ------------ | -------------- |\n | updater | update_old | newer | create_old | popular |\n\n Rating\n\n | すべて | 一般のみ | R18 のみ |\n | ------ | -------- | -------- |\n | all | general | adult |","location":"search.ts"}} /> - | クリエイター | 投稿 | 商品 | コミッション | - | ------------ | ----- | -------- | ------------ | - | fanclubs | posts | products | commissions | +Type - Category +| クリエイター | 投稿 | 商品 | コミッション | +| ------------ | ----- | -------- | ------------ | +| fanclubs | posts | products | commissions | - | 分类 | 分类名 | - | ---------------------- | ---------- | - | イラスト | illust | - | 漫画 | comic | - | コスプレ | cosplay | - | YouTuber・配信者 | youtuber | - | Vtuber | vtuber | - | 音声作品・ASMR | voice | - | 声優・歌い手 | voiceactor | - | アイドル | idol | - | アニメ・映像・写真 | anime | - | 3D | 3d | - | ゲーム制作 | game | - | 音楽 | music | - | 小説 | novel | - | ドール | doll | - | アート・デザイン | art | - | プログラム | program | - | 創作・ハンドメイド | handmade | - | 歴史・評論・情報 | history | - | 鉄道・旅行・ミリタリー | railroad | - | ショップ | shop | - | その他 | other | +Category - Ranking period +| 分类 | 分类名 | +| ---------------------- | ---------- | +| イラスト | illust | +| 漫画 | comic | +| コスプレ | cosplay | +| YouTuber・配信者 | youtuber | +| Vtuber | vtuber | +| 音声作品・ASMR | voice | +| 声優・歌い手 | voiceactor | +| アイドル | idol | +| アニメ・映像・写真 | anime | +| 3D | 3d | +| ゲーム制作 | game | +| 音楽 | music | +| 小説 | novel | +| ドール | doll | +| アート・デザイン | art | +| プログラム | program | +| 創作・ハンドメイド | handmade | +| 歴史・評論・情報 | history | +| 鉄道・旅行・ミリタリー | railroad | +| ショップ | shop | +| その他 | other | - | デイリー | ウィークリー | マンスリー | 全期間 | - | -------- | ------------ | ---------- | ------ | - | daily | weekly | monthly | all | +Ranking period - Sorting +| デイリー | ウィークリー | マンスリー | 全期間 | +| -------- | ------------ | ---------- | ------ | +| daily | weekly | monthly | all | - | 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 | - | -------------- | ------------ | -------------- | ------------ | -------------- | - | updater | update\_old | newer | create\_old | popular | +Sorting - Rating +| 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 | +| -------------- | ------------ | -------------- | ------------ | -------------- | +| updater | update\_old | newer | create\_old | popular | - | すべて | 一般のみ | R18 のみ | - | ------ | -------- | -------- | - | all | general | adult | -</Route> +Rating + +| すべて | 一般のみ | R18 のみ | +| ------ | -------- | -------- | +| all | general | adult | ### User Posts {#fantia-user-posts} -<Route author="nczitzk" example="/fantia/user/3498" path="/fantia/user/:id" paramsDesc={['User id, can be found in user profile URL']} /> +<Route namespace="fantia" data={{"path":"/user/:id","categories":["picture"],"example":"/fantia/user/3498","parameters":{"id":"User id, can be found in user profile URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fantia.jp/fanclubs/:id"]},"name":"User Posts","maintainers":["nczitzk"],"location":"user.ts"}} /> -## GoComics {#gocomics} +## Google {#google} -### Comic Strips {#gocomics-comic-strips} +### Public Albums {#google-public-albums} -<Route author="stjohnjohnson" example="/gocomics/foxtrot" path="/gocomics/:strip" paramsDesc={['URL path of the strip on gocomics.com']} /> +<Route namespace="google" data={{"path":"/album/:id","categories":["picture"],"example":"/google/album/msFFnAzKmQmWj76EA","parameters":{"id":"album ID, can be found in URL, for example, `https://photos.app.goo.gl/msFFnAzKmQmWj76EA` to `msFFnAzKmQmWj76EA`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Public Albums","maintainers":["hoilc"],"location":"album.ts"}} /> -## Google Doodles {#google-doodles} +### Update {#google-update} -### Update {#google-doodles-update} - -<Route author="xyqfer" example="/google/doodles/zh-CN" path="/google/doodles/:language?" paramsDesc={['Language, default to `zh-CN`, for other language values, you can get it from [Google Doodles official website](https://www.google.com/doodles)']} /> - -## Google Photos {#google-photos} - -### Public Albums {#google-photos-public-albums} - -<Route author="hoilc" example="/google/album/msFFnAzKmQmWj76EA" path="/google/album/:id" paramsDesc={['album ID, can be found in URL, for example, `https://photos.app.goo.gl/msFFnAzKmQmWj76EA` to `msFFnAzKmQmWj76EA`']} radar="1" notOperational="1" /> - -## Konachan Anime Wallpapers {#konachan-anime-wallpapers} - -:::tip -- Tags can be copied after `tags=` in [konachan](https://konachan.com/post) URL -- The route can be / konachan or /konachan.com or /konachan.net, where the first two are the same, and .net is an all-age healthy wallpaper ♡ -- Official Posts RSS: `https://konachan.com/post/piclens?tags=[tags]` -::: - -### Popular Recent Posts {#konachan-anime-wallpapers-popular-recent-posts} - -<Route author="magic-akari" example="/konachan/post/popular_recent" path="/konachan/post/popular_recent/:period?" paramsDesc={['Default to 24 hours']}> - For example: - - - 24 hours: [https://rsshub.app/konachan/post/popular\_recent/1d](https://rsshub.app/konachan/post/popular_recent/1d) - - 1 week: [https://rsshub.app/konachan/post/popular\_recent/1w](https://rsshub.app/konachan/post/popular_recent/1w) - - 1 month: [https://rsshub.app/konachan/post/popular\_recent/1m](https://rsshub.app/konachan/post/popular_recent/1m) - - 1 year: [https://rsshub.app/konachan/post/popular\_recent/1y](https://rsshub.app/konachan/post/popular_recent/1y) -</Route> - -## Mic Mic Idol {#mic-mic-idol} - -### Latest {#mic-mic-idol-latest} - -<Route author="KotoriK" example="/micmicidol" path="/micmicidol" /> - -### 标签 {#mic-mic-idol-biao-qian} - -<Route author="KotoriK" example="/micmicidol/search/Young%20Jump?limit=50" path="/micmicidol/search/:label" paramsDesc={['标签名']} notOperational="1" /> - -获取数量可以通过 [limit](/parameter#条数限制) 参数控制。默认值为`50`。 +<Route namespace="google" data={{"path":"/doodles/:language?","categories":["picture"],"example":"/google/doodles/zh-CN","parameters":{"language":"Language, default to `zh-CN`, for other language values, you can get it from [Google Doodles official website](https://www.google.com/doodles)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Update","maintainers":["xyqfer"],"location":"doodles.ts"}} /> ## MM 范 {#mm-fan} -### 分类 {#mm-fan-fen-lei} - -<Route author="nczitzk" example="/95mm/tab/热门" path="/95mm/tab/:tab?" paramsDesc={['分类,见下表,默认为最新']}> - | 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -</Route> - ### 标签 {#mm-fan-biao-qian} -<Route author="nczitzk" example="/95mm/tag/黑丝" path="/95mm/tag/:tag" paramsDesc={['标签,可在对应标签页中找到']} /> +<Route namespace="95mm" data={{"path":"/tag/:tag","categories":["picture"],"example":"/95mm/tag/黑丝","parameters":{"tag":"标签,可在对应标签页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["95mm.org/"]},"name":"标签","maintainers":["nczitzk"],"url":"95mm.org/","location":"tag.ts"}} /> + +### 分类 {#mm-fan-fen-lei} + +<Route namespace="95mm" data={{"path":"/tab/:tab?","categories":["picture"],"example":"/95mm/tab/热门","parameters":{"tab":"分类,见下表,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["95mm.org/"]},"name":"分类","maintainers":["nczitzk"],"url":"95mm.org/","description":"| 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |","location":"tab.ts"}} /> + +| 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ### 集合 {#mm-fan-ji-he} -<Route author="nczitzk" example="/95mm/category/1" path="/95mm/category/:category" paramsDesc={['集合,见下表']}> - | 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 | - | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | - | 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 | -</Route> +<Route namespace="95mm" data={{"path":"/category/:category","categories":["picture"],"example":"/95mm/category/1","parameters":{"category":"集合,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["95mm.org/"]},"name":"集合","maintainers":["nczitzk"],"url":"95mm.org/","description":"| 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 |\n | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- |\n | 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 |","location":"category.ts"}} /> + +| 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 | +| -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | +| 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 | ## NASA Astronomy Picture of the Day {#nasa-astronomy-picture-of-the-day} -### NASA {#nasa-astronomy-picture-of-the-day-nasa} - -<Route author="nczitzk" example="/nasa/apod" path="/nasa/apod" /> - ### Cheng Kung University Mirror {#nasa-astronomy-picture-of-the-day-cheng-kung-university-mirror} -<Route author="nczitzk" example="/nasa/apod-ncku" path="/nasa/apod-ncku" /> +<Route namespace="nasa" data={{"path":"/apod-ncku","categories":["picture"],"example":"/nasa/apod-ncku","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apod.nasa.govundefined"]},"name":"Cheng Kung University Mirror","maintainers":["nczitzk","williamgateszhao"],"url":"apod.nasa.govundefined","location":"apod-ncku.ts"}} /> ### NASA 中文 {#nasa-astronomy-picture-of-the-day-nasa-zhong-wen} -<Route author="nczitzk" example="/nasa/apod-cn" path="/nasa/apod-cn" notOperational="1"> - :::tip - [NASA 中文](https://www.nasachina.cn/) 提供了每日天文图的中英双语图文说明,但在更新上偶尔略有一两天的延迟。 - ::: -</Route> +<Route namespace="nasa" data={{"path":"/apod-cn","categories":["picture"],"example":"/nasa/apod-cn","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apod.nasa.govundefined"]},"name":"NASA 中文","maintainers":["nczitzk","williamgateszhao"],"url":"apod.nasa.govundefined","description":":::tip\n [NASA 中文](https://www.nasachina.cn/) 提供了每日天文图的中英双语图文说明,但在更新上偶尔略有一两天的延迟。\n :::","location":"apod-cn.ts"}} /> -## National Geographic {#national-geographic} +:::tip +[NASA 中文](https://www.nasachina.cn/) 提供了每日天文图的中英双语图文说明,但在更新上偶尔略有一两天的延迟。 +::: -### Photo of the Day {#national-geographic-photo-of-the-day} +### NASA {#nasa-astronomy-picture-of-the-day-nasa} -<Route author="LogicJake OrangeEd1t TonyRL" example="/natgeo/dailyphoto" path="/natgeo/dailyphoto" /> - -### 每日一图 {#national-geographic-mei-ri-yi-tu} - -<Route author="LogicJake OrangeEd1t TonyRL" example="/natgeo/dailyphoto" path="/natgeo/dailyphoto" /> +<Route namespace="nasa" data={{"path":"/apod","categories":["picture"],"example":"/nasa/apod","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apod.nasa.govundefined"]},"name":"NASA","maintainers":["nczitzk","williamgateszhao"],"url":"apod.nasa.govundefined","location":"apod.ts"}} /> ## Pixabay {#pixabay} ### Search {#pixabay-search} -<Route author="TonyRL" example="/pixabay/search/cat" path="/pixabay/search/:q/:order?" paramsDesc={['Search term', 'Order, `popular` or `latest`, `latest` by default']} radar="1" configRequired="1" /> - -## Porn Image XXX {#porn-image-xxx} - -### 最新图片 {#porn-image-xxx-zui-xin-tu-pian} - -<Route author="hoilc" example="/porn-images-xxx/tag/jk" path="/porn-images-xxx/:type?/:name?" paramsDesc={['搜索类型, `tag`为标签, `keyword`为关键字, 默认留空为全部','搜索内容, 可在 URL 中找到,默认留空为全部']} anticrawler="1" /> - -## Rare Historical Photos {#rare-historical-photos} - -### Home {#rare-historical-photos-home} - -<Route author="TonyRL" example="/rarehistoricalphotos" path="/rarehistoricalphotos" radar="1" /> - -## Tits Guru {#tits-guru} - -### Home {#tits-guru-home} - -<Route author="MegrezZhu" example="/tits-guru/home" path="/tits-guru/home" /> - -### Daily Best {#tits-guru-daily-best} - -<Route author="MegrezZhu" example="/tits-guru/daily" path="/tits-guru/daily" /> - -### Models {#tits-guru-models} - -<Route author="MegrezZhu" example="/tits-guru/model/mila-azul" path="/tits-guru/model/:name" paramsDesc={['Module name, see [here](https://tits-guru.com/models) for details']} /> - -### Categories {#tits-guru-categories} - -<Route author="MegrezZhu" example="/tits-guru/category/bikini" path="/tits-guru/category/:type" paramsDesc={['Category, see [here](https://tits-guru.com/categories) for details']} /> +<Route namespace="pixabay" data={{"path":"/search/:q/:order?","categories":["picture"],"example":"/pixabay/search/cat","parameters":{"q":"Search term","order":"Order, `popular` or `latest`, `latest` by default"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["pixabay.com/:searchType/search/:q"],"target":"/search/:q"},"name":"Search","maintainers":["TonyRL"],"location":"search.ts"}} /> ## wallhaven {#wallhaven} @@ -429,111 +185,50 @@ However, the number of requests to the site increases a lot when it is turned on For example [Latest Wallpapers](https://wallhaven.cc/latest), the route turning on **Need Details** is [/wallhaven/latest/true](https://rsshub.app/wallhaven/latest/true), and then specify a smaller `limit`. We can get [/wallhaven/latest/true?limit=5](https://rsshub.app/wallhaven/latest/true?limit=5). ::: -### Category {#wallhaven-category} +### Search {#wallhaven-search} -<Route author="nczitzk Fatpandac" example="/wallhaven/latest" path="/wallhaven/:category?/:needDetails?" paramsDesc={['Category, see below, Latest by default', 'Need Details, `true/yes` as yes, no by default']}> - | Latest | Hot | Toplist | Random | - | ------ | --- | ------- | ------ | - | latest | hot | toplist | random | -</Route> +<Route namespace="wallhaven" data={{"path":["/search/:filter?/:needDetails?","/:filter?/:needDetails?"],"categories":["picture"],"example":"/wallhaven/search/categories=110&purity=110&sorting=date_added&order=desc","parameters":{"filter":"Filter, empty by default","needDetails":"Need Details, `true`/`yes` as yes, no by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wallhaven.cc/"]},"name":"Search","maintainers":["nczitzk","Fatpandac"],"url":"wallhaven.cc/","description":":::tip\n Subscribe pages starting with `https://wallhaven.cc/search`, fill the text after `?` as `filter` in the route. The following is an example:\n\n The text after `?` is `q=id%3A711&sorting=random&ref=fp&seed=8g0dgd` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711&sorting=random&ref=fp&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd)\n :::","location":"index.ts"}} /> + +:::tip +Subscribe pages starting with `https://wallhaven.cc/search`, fill the text after `?` as `filter` in the route. The following is an example: + +The text after `?` is `q=id%3A711&sorting=random&ref=fp&seed=8g0dgd` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd) +::: ### Search {#wallhaven-search} -<Route author="nczitzk Fatpandac" example="/wallhaven/search/categories=110&purity=110&sorting=date_added&order=desc" path="/wallhaven/search/:filter?/:needDetails?" paramsDesc={['Filter, empty by default', 'Need Details, `true`/`yes` as yes, no by default']}> - :::tip - Subscribe pages starting with `https://wallhaven.cc/search`, fill the text after `?` as `filter` in the route. The following is an example: - - The text after `?` is `q=id%3A711&sorting=random&ref=fp&seed=8g0dgd` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd) - ::: -</Route> - -## WallpaperHub {#wallpaperhub} - -### Wallpapers {#wallpaperhub-wallpapers} - -<Route author="nczitzk" example="/wallpaperhub" path="/wallpaperhub" radar="1" /> - -## yande.re {#yande-re} +<Route namespace="wallhaven" data={{"path":["/search/:filter?/:needDetails?","/:filter?/:needDetails?"],"categories":["picture"],"example":"/wallhaven/search/categories=110&purity=110&sorting=date_added&order=desc","parameters":{"filter":"Filter, empty by default","needDetails":"Need Details, `true`/`yes` as yes, no by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wallhaven.cc/"]},"name":"Search","maintainers":["nczitzk","Fatpandac"],"url":"wallhaven.cc/","description":":::tip\n Subscribe pages starting with `https://wallhaven.cc/search`, fill the text after `?` as `filter` in the route. The following is an example:\n\n The text after `?` is `q=id%3A711&sorting=random&ref=fp&seed=8g0dgd` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711&sorting=random&ref=fp&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711&sorting=random&ref=fp&seed=8g0dgd)\n :::","location":"index.ts"}} /> :::tip -- Official RSS: `https://yande.re/post/piclens?tags=[tags]` +Subscribe pages starting with `https://wallhaven.cc/search`, fill the text after `?` as `filter` in the route. The following is an example: + +The text after `?` is `q=id%3A711&sorting=random&ref=fp&seed=8g0dgd` for [Wallpaper Search: #landscape - wallhaven.cc](https://wallhaven.cc/search?q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd), so the route is [/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd](https://rsshub.app/wallhaven/q=id%3A711\&sorting=random\&ref=fp\&seed=8g0dgd) ::: -### Popular Recent Posts {#yande-re-popular-recent-posts} - -<Route author="magic-akari SettingDust" example="/yande.re/post/popular_recent" path="/yande.re/post/popular_recent/:period?" paramsDesc={['Default to 24 hours']}> - For example: - - - 24 hours: [https://rsshub.app/yande.re/post/popular\_recent/1d](https://rsshub.app/yande.re/post/popular_recent/1d) - - 1 week: [https://rsshub.app/yande.re/post/popular\_recent/1w](https://rsshub.app/yande.re/post/popular_recent/1w) - - 1 month: [https://rsshub.app/yande.re/post/popular\_recent/1m](https://rsshub.app/yande.re/post/popular_recent/1m) - - 1 year: [https://rsshub.app/yande.re/post/popular\_recent/1y](https://rsshub.app/yande.re/post/popular_recent/1y) -</Route> - ## 北京天文馆 {#bei-jing-tian-wen-guan} ### 每日一图 {#bei-jing-tian-wen-guan-mei-ri-yi-tu} -<Route author="HenryQW" example="/bjp/apod" path="/bjp/apod" radar="1" /> +<Route namespace="bjp" data={{"path":"/apod","categories":["picture"],"example":"/bjp/apod","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bjp.org.cn/APOD/today.shtml","bjp.org.cn/APOD/list.shtml","bjp.org.cn/"]},"name":"每日一图","maintainers":["HenryQW"],"url":"bjp.org.cn/APOD/today.shtml","location":"apod.ts"}} /> -## 煎蛋 {#jian-dan} +## 国家地理 {#guo-jia-di-li} -### 板块 {#jian-dan-ban-kuai} +### 每日一图 {#guo-jia-di-li-mei-ri-yi-tu} -<Route author="nczitzk" example="/jandan/top" path="/jandan/:category?" paramsDesc={['板块,见下表,默认为无聊图热榜']}> - | 问答 | 树洞 | 动物园 | 女装 | 随手拍 | 无聊图 | 鱼塘 | - | ---- | -------- | ------ | ---- | ------ | ------ | ---- | - | qa | treehole | zoo | girl | ooxx | pic | pond | -</Route> - -### 热榜 {#jian-dan-re-bang} - -<Route author="kobemtl Xuanwo xyqfer 9uanhuo nczitzk" example="/jandan/top-4h" path="/jandan/:category?" paramsDesc={['板块,见下表,默认为无聊图热榜']} /> - -| 4 小时热门 | 吐槽 | 无聊图 | 随手拍 | 动物园 | 优评 | 3 日最佳 | 7 日最佳 | -| ---------- | --------- | ------ | -------- | ------- | ------------ | --------- | --------- | -| top-4h | top-tucao | top | top-ooxx | top-zoo | top-comments | top-3days | top-7days | - -### 首页 {#jian-dan-shou-ye} - -<Route author="lonelykid nczitzk" example="/jandan" path="/jandan" /> - -## 酷 18 {#ku-18} - -### 分站 {#ku-18-fen-zhan} - -<Route author="nczitzk" example="/cool18" path="/cool18/:id?" paramsDesc={['分站,见下表,默认为禁忌书屋']}> - | 性趣贴图 | 色色动漫 | 情色靓影 | 私房自拍 | 禁忌书屋 | 性趣论坛 | 情色无忌 | 成人影视 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | bbs | bbs7 | bbs2 | bbs6 | bbs4 | bj | bbs5 | bbs3 | - - :::tip - 留园网文档参见 [此处](https://docs.rsshub.app/routes/new-media#liu-yuan-wang) - - 禁忌书屋文档参见 [此处](https://docs.rsshub.app/routes/reading#jin-ji-shu-wu) - ::: -</Route> - -### 精华区 {#ku-18-jing-hua-qu} - -<Route author="nczitzk" example="/cool18/bbs/gold" path="/cool18/:id/gold" paramsDesc={['分站,见上表,默认为禁忌书屋']} /> - -### 搜索关键字 {#ku-18-sou-suo-guan-jian-zi} - -<Route author="nczitzk" example="/cool18/bbs/keywords/都市" path="/cool18/:id/keywords/:keyword?" paramsDesc={['分站,见上表,默认为禁忌书屋', '关键字']} /> +<Route namespace="natgeo" data={{"path":"/dailyphoto","categories":["picture"],"example":"/natgeo/dailyphoto","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nationalgeographic.com/photo-of-the-day/*","nationalgeographic.com/"]},"name":"每日一图","maintainers":["LogicJake","OrangeEd1t","TonyRL"],"url":"nationalgeographic.com/photo-of-the-day/*","location":"dailyphoto.ts"}} /> ## 喷嚏 {#pen-ti} ### 图卦 {#pen-ti-tu-gua} -<Route author="tgly307" example="/dapenti/tugua" path="/dapenti/tugua" /> +<Route namespace="dapenti" data={{"path":"/tugua","categories":["picture"],"example":"/dapenti/tugua","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"图卦","maintainers":["tgly307"],"location":"tugua.ts"}} /> ### 主题 {#pen-ti-zhu-ti} -<Route author="xyqfer" example="/dapenti/subject/184" path="/dapenti/subject/:id" paramsDesc={['主题 id']} /> +<Route namespace="dapenti" data={{"path":"/subject/:id","categories":["picture"],"example":"/dapenti/subject/184","parameters":{"id":"主题 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"主题","maintainers":["xyqfer"],"location":"subject.ts"}} /> ## 奇葩买家秀 {#qi-pa-mai-jia-xiu} -### 频道 {#qi-pa-mai-jia-xiu-pin-dao} +### Unknown {#qi-pa-mai-jia-xiu-unknown} -<Route author="Fatpandac nczitzk" example="/qipamaijia/fuli" path="/qipamaijia/:cate?" paramsDesc={['频道名,可在对应网址中找到,默认为最新']} radar="1" /> +<Route namespace="qipamaijia" data={{"path":"/:cate?","categories":["picture"],"example":"/qipamaijia/fuli","parameters":{"cate":"频道名,可在对应网址中找到,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qipamaijia.com/","qipamaijia.com/:cate"],"target":"/:cate"},"name":"Unknown","maintainers":["Fatpandac","nczitzk"],"url":"qipamaijia.com/","location":"index.ts"}} /> diff --git a/website/docs/routes/program-update.mdx b/website/docs/routes/program-update.mdx index fef2cecd2..558ac6fb0 100644 --- a/website/docs/routes/program-update.mdx +++ b/website/docs/routes/program-update.mdx @@ -1,126 +1,76 @@ -# 🔄 Application Updates +# program-update ## Amazon {#amazon} ### Kindle Software Updates {#amazon-kindle-software-updates} -<Route author="EthanWng97" example="/amazon/kindle/software-updates" path="/amazon/kindle/software-updates" radar="1" anticrawler="1" /> - -## AMD {#amd} - -### 显卡驱动更新 {#amd-xian-ka-qu-dong-geng-xin} - -<Route author="ysc3839" example="/amd/graphicsdrivers/731F/C0" path="/amd/graphicsdrivers/:id/:rid?" paramsDesc={['id', 'rid']}> - 可从设备管理器查看 id 和 rid。如 `PCI\VEN_1002&DEV_731F&SUBSYS_05771043&REV_C1`,则 id 为 `731F`,rid 为 `C1`。 -</Route> +<Route namespace="amazon" data={{"path":"/kindle/software-updates","categories":["program-update"],"example":"/amazon/kindle/software-updates","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Kindle Software Updates","maintainers":["EthanWng97"],"location":"kindle-software-updates.ts"}} /> ## Android {#android} ### SDK Platform Tools release notes {#android-sdk-platform-tools-release-notes} -<Route author="nczitzk" example="/android/platform-tools-releases" path="/android/platform-tools-releases" /> - -## AnyTXT {#anytxt} - -### Release Notes {#anytxt-release-notes} - -<Route author="nczitzk" example="/anytxt/release-notes" path="/anytxt/release-notes" /> +<Route namespace="android" data={{"path":"/platform-tools-releases","categories":["program-update"],"example":"/android/platform-tools-releases","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["developer.android.com/studio/releases/platform-tools","developer.android.com/"]},"name":"SDK Platform Tools release notes","maintainers":["nczitzk"],"url":"developer.android.com/studio/releases/platform-tools","location":"platform-tools-releases.ts"}} /> ## APKPure {#apkpure} ### Versions {#apkpure-versions} -<Route author="maple3142" example="/apkpure/versions/jp.co.craftegg.band/jp" path="/apkpure/versions/:pkg/:region?" paramsDesc={['Package name', 'Region code, `en` by default']} radar="1" anticrawler="1" puppeteer="1" /> +<Route namespace="apkpure" data={{"path":"/versions/:pkg/:region?","categories":["program-update"],"example":"/apkpure/versions/jp.co.craftegg.band/jp","parameters":{"pkg":"Package name","region":"Region code, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Versions","maintainers":["maple3142"],"location":"versions.ts"}} /> ## App Center {#app-center} ### Release {#app-center-release} -<Route author="Rongronggg9" example="/app-center/release/cloudflare/1.1.1.1-windows/beta" path="/app-center/release/:user/:app/:distribution_group" paramsDesc={['User', 'App name', 'Distribution group']} radar="1"> - :::tip - The parameters can be extracted from the Release page URL: `https://install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group` - ::: -</Route> +<Route namespace="app-center" data={{"path":"/release/:user/:app/:distribution_group","categories":["program-update"],"example":"/app-center/release/cloudflare/1.1.1.1-windows/beta","parameters":{"user":"User","app":"App name","distribution_group":"Distribution group"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group","install.appcenter.ms/orgs/:user/apps/:app/distribution_groups/:distribution_group"]},"name":"Release","maintainers":["Rongronggg9"],"description":":::tip\n The parameters can be extracted from the Release page URL: `https://install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group`\n :::","location":"release.ts"}} /> + +:::tip +The parameters can be extracted from the Release page URL: `https://install.appcenter.ms/users/:user/apps/:app/distribution_groups/:distribution_group` +::: ## App Store/Mac App Store {#app-store-mac-app-store} -### App Update {#app-store-mac-app-store-app-update} +### In-App-Purchase Price Drop Alert {#app-store-mac-app-store-in-app-purchase-price-drop-alert} -<Route author="EkkoG nczitzk" example="/apple/apps/update/us/id408709785" path="/apple/apps/update/:country/:id/:platform?" paramsDesc={['App Store Country, obtain from the app URL, see below', 'App id, obtain from the app URL', 'App Platform, see below, all by default']} radar="1"> - | All | iOS | macOS | tvOS | - | --- | --- | ----- | ---- | - | | iOS | macOS | tvOS | - - :::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). - ::: -</Route> +<Route namespace="appstore" data={{"path":"/iap/:country/:id","categories":["program-update"],"example":"/appstore/iap/us/id953286746","parameters":{"country":"App Store Country, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `us`","id":"App Store app id, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `id953286746`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"In-App-Purchase Price Drop Alert","maintainers":["HenryQW"],"location":"in-app-purchase.ts"}} /> ### Price Drop {#app-store-mac-app-store-price-drop} -<Route author="HenryQW" example="/appstore/price/us/mac/id1152443474" path="/appstore/price/:country/:type/:id" paramsDesc={['App Store Country, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `us`', 'App type,either `iOS` or `mac`', 'App Store app id, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `id1152443474`']} /> - -### In-App-Purchase Price Drop Alert {#app-store-mac-app-store-in-app-purchase-price-drop-alert} - -<Route author="HenryQW" example="/appstore/iap/us/id953286746" path="/appstore/iap/:country/:id" paramsDesc={['App Store Country, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `us`', 'App Store app id, obtain from the app URL https://apps.apple.com/us/app/id953286746, in this case, `id953286746`']} notOperational="1" /> +<Route namespace="appstore" data={{"path":"/price/:country/:type/:id","categories":["program-update"],"example":"/appstore/price/us/mac/id1152443474","parameters":{"country":"App Store Country, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `us`","type":"App type,either `iOS` or `mac`","id":"App Store app id, obtain from the app URL https://apps.apple.com/us/app/id1152443474, in this case, `id1152443474`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apps.apple.com/"]},"name":"Price Drop","maintainers":["HenryQW"],"url":"apps.apple.com/","location":"price.ts"}} /> ### 每日精品限免 / 促销应用(鲜面连线 by AppSo) {#app-store-mac-app-store-mei-ri-jing-pin-xian-mian-cu-xiao-ying-yong-xian-mian-lian-xian-by-appso} -<Route author="Andiedie" example="/appstore/xianmian" path="/appstore/xianmian" /> +<Route namespace="appstore" data={{"path":"/xianmian","categories":["program-update"],"example":"/appstore/xianmian","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["app.so/xianmian"]},"name":"每日精品限免 / 促销应用(鲜面连线 by AppSo)","maintainers":["Andiedie"],"url":"app.so/xianmian","location":"xianmian.ts"}} /> + +## Apple {#apple} + +### App Update {#apple-app-update} + +<Route namespace="apple" data={{"path":"/apps/update/:country/:id/:platform?","categories":["program-update"],"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"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apps.apple.com/:country/app/:appSlug/:id","apps.apple.com/:country/app/:id"],"target":"/apps/update/:country/:id"},"name":"App Update","maintainers":["EkkoG","nczitzk"],"description":"| All | iOS | macOS | tvOS |\n | --- | --- | ----- | ---- |\n | | iOS | macOS | tvOS |\n\n :::tip\n 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).\n :::","location":"apps.ts"}} /> + +| All | iOS | macOS | tvOS | +| --- | --- | ----- | ---- | +| | iOS | macOS | tvOS | + +:::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). +::: ## ASUS {#asus} ### BIOS {#asus-bios} -<Route author="Fatpandac" example="/asus/bios/RT-AX88U" path="/asus/bios/:model" paramsDesc={['Model, can be found in product page']} /> +<Route namespace="asus" data={{"path":"/bios/:model","categories":["program-update"],"example":"/asus/bios/RT-AX88U","parameters":{"model":"Model, can be found in product page"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["asus.com.cn/"]},"name":"BIOS","maintainers":["Fatpandac"],"url":"asus.com.cn/","location":"bios.ts"}} /> ### GPU Tweak {#asus-gpu-tweak} -<Route author="TonyRL" example="/asus/gpu-tweak" path="/asus/gpu-tweak" radar="1" /> - -## Bandisoft {#bandisoft} - -### History {#bandisoft-history} - -<Route author="nczitzk" example="/bandisoft/bandizip" path="/bandisoft/:id?/:lang?" paramsDesc={['Software id, see below, Bandizip by default', 'Language, see below, English by default']}> - Software id - - | Bandizip (Win) | Bandizip (Mac) | Honeycam | Honeyview | - | -------------- | -------------- | -------- | --------- | - | bandizip | bandizip.mac | honeycam | honeyview | - - Language - - | Language | key | - | -------------------- | --- | - | English | en | - | 中文 (简体) | cn | - | 中文 (繁體) | tw | - | 日本語 | jp | - | Русский | ru | - | Español | es | - | Français | fr | - | Deutsch | de | - | Italiano | it | - | Slovenčina | sk | - | Українська | uk | - | Беларуская | be | - | Dansk | da | - | Polski | pl | - | Português Brasileiro | br | - | Čeština | cs | - | Nederlands | nl | - | Slovenščina | sl | - | Türkçe | tr | - | ภาษาไทย | th | - | 한국어 | kr | -</Route> +<Route namespace="asus" data={{"path":"/gpu-tweak","categories":["program-update"],"example":"/asus/gpu-tweak","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["asus.com/campaign/GPU-Tweak-III/*","asus.com/"]},"name":"GPU Tweak","maintainers":["TonyRL"],"url":"asus.com/campaign/GPU-Tweak-III/*","location":"gpu-tweak.ts"}} /> ## Bilibili {#bilibili} ### 更新情报 {#bilibili-geng-xin-qing-bao} -<Route author="nczitzk" example="/bilibili/app/android" path="/bilibili/app/:id?" paramsDesc={['客户端 id,见下表,默认为安卓版']} /> +<Route namespace="bilibili" data={{"path":"/app/:id?","categories":["program-update"],"example":"/bilibili/app/android","parameters":{"id":"客户端 id,见下表,默认为安卓版"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"更新情报","maintainers":["nczitzk"],"description":"| 安卓版 | iPhone 版 | iPad HD 版 | UWP 版 | TV 版 |\n| ------- | --------- | ---------- | ------ | ---------------- |\n| android | iphone | ipad | win | android_tv_yst |","location":"app.ts"}} /> | 安卓版 | iPhone 版 | iPad HD 版 | UWP 版 | TV 版 | | ------- | --------- | ---------- | ------ | ---------------- | @@ -130,165 +80,97 @@ ### BlueStacks 5 Release Notes {#bluestacks-bluestacks-5-release-notes} -<Route author="TonyRL" example="/bluestacks/release/5" path="/bluestacks/release/5" radar="1" anticrawler="1" puppeteer="1" /> +<Route namespace="bluestacks" data={{"path":"/release/5","categories":["program-update"],"example":"/bluestacks/release/5","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bluestacks.com/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5","bluestacks.com/"]},"name":"BlueStacks 5 Release Notes","maintainers":["TonyRL"],"url":"bluestacks.com/hc/en-us/articles/360056960211-Release-Notes-BlueStacks-5","location":"release.ts"}} /> ## Brave {#brave} ### Release Notes {#brave-release-notes} -<Route author="nczitzk" example="/brave/latest" path="/brave/latest" /> - -## Cent Browser {#cent-browser} - -### 更新日志 {#cent-browser-geng-xin-ri-zhi} - -<Route author="hoilc" example="/centbrowser/history" path="/centbrowser/history" /> - -## Checkra1n {#checkra1n} - -### 新版本发布 {#checkra1n-xin-ban-ben-fa-bu} - -<Route author="ntzyz" example="/checkra1n/releases" path="/checkra1n/releases" /> - -## Chocolatey {#chocolatey} - -### Software Update {#chocolatey-software-update} - -<Route author="woodgear" example="/chocolatey/software/GoogleChrome" path="/chocolatey/software" /> +<Route namespace="brave" data={{"path":"/latest","categories":["program-update"],"example":"/brave/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["brave.com/latest","brave.com/"]},"name":"Release Notes","maintainers":["nczitzk"],"url":"brave.com/latest","location":"latest.ts"}} /> ## Civitai {#civitai} ### Latest models {#civitai-latest-models} -<Route author="DIYgod" example="/civitai/models" path="/civitai/models" /> +<Route namespace="civitai" data={{"path":"/models","categories":["program-update"],"example":"/civitai/models","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["civitai.com/"]},"name":"Latest models","maintainers":["DIYgod"],"url":"civitai.com/","location":"models.ts"}} /> ### Model discussions {#civitai-model-discussions} +<Route namespace="civitai" data={{"path":"/discussions/:modelId","categories":["program-update"],"example":"/civitai/discussions/4384","parameters":{"modelId":"N"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["civitai.com/models/:modelId"]},"name":"Model discussions","maintainers":["DIYgod"],"description":":::warning\nNeed to configure `CIVITAI_COOKIE` to obtain image information of NSFW models.\n:::","location":"discussions.ts"}} /> + :::warning Need to configure `CIVITAI_COOKIE` to obtain image information of NSFW models. ::: -<Route author="DIYgod" example="/civitai/discussions/4384" path="/civitai/discussions/:modelId" configRequired="1" /> - ## CPUID {#cpuid} ### News {#cpuid-news} -<Route author="TonyRL" example="/cpuid/news" path="/cpuid/news" radar="1" /> - -## cpython {#cpython} - -### 正式版本发布 {#cpython-zheng-shi-ban-ben-fa-bu} - -<Route author="trim21" example="/cpython" path="/cpython" /> - -### 所有版本发布 {#cpython-suo-you-ban-ben-fa-bu} - -<Route author="trim21" example="/cpython/pre" path="/cpython/pre" /> - -## Ditto clipboard manager {#ditto-clipboard-manager} - -### Changes {#ditto-clipboard-manager-changes} - -<Route author="nczitzk" example="/ditto/changes" path="/ditto/changes/:type?" paramsDesc={['Type, `beta` is an option']} /> +<Route namespace="cpuid" data={{"path":"/news","categories":["program-update"],"example":"/cpuid/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cpuid.com/news.html","cpuid.com/"]},"name":"News","maintainers":[],"url":"cpuid.com/news.html","location":"news.ts"}} /> ## Docker Hub {#docker-hub} ### Image New Build {#docker-hub-image-new-build} -<Route author="HenryQW" example="/dockerhub/build/wangqiru/ttrss" path="/dockerhub/build/:owner/:image/:tag?" paramsDesc={['Image owner', 'Image name', 'Image tag,default to latest']}> - :::warning - The owner of the official image fills in the library, for example: [https://rsshub.app/dockerhub/build/library/mysql](https://rsshub.app/dockerhub/build/library/mysql) - ::: -</Route> +<Route namespace="dockerhub" data={{"path":"/build/:owner/:image/:tag?","categories":["program-update"],"example":"/dockerhub/build/wangqiru/ttrss","parameters":{"owner":"Image owner","image":"Image name","tag":"Image tag,default to latest"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Image New Build","maintainers":["HenryQW"],"description":":::warning\n The owner of the official image fills in the library, for example: [https://rsshub.app/dockerhub/build/library/mysql](https://rsshub.app/dockerhub/build/library/mysql)\n :::","location":"build.ts"}} /> + +:::warning +The owner of the official image fills in the library, for example: [https://rsshub.app/dockerhub/build/library/mysql](https://rsshub.app/dockerhub/build/library/mysql) +::: ### Image New Tag {#docker-hub-image-new-tag} -<Route author="outloudvi" example="/dockerhub/tag/library/mariadb" path="/dockerhub/tag/:owner/:image/:limits?" paramsDesc={['Image owner', 'Image name', 'Tag count, 10 by default']}> - :::warning - Use `library` as the `owner` for official images, such as [https://rsshub.app/dockerhub/tag/library/mysql](https://rsshub.app/dockerhub/tag/library/mysql) - ::: -</Route> +<Route namespace="dockerhub" data={{"path":"/tag/:owner/:image/:limits?","categories":["program-update"],"example":"/dockerhub/tag/library/mariadb","parameters":{"owner":"Image owner","image":"Image name","limits":"Tag count, 10 by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Image New Tag","maintainers":[],"description":":::warning\n Use `library` as the `owner` for official images, such as [https://rsshub.app/dockerhub/tag/library/mysql](https://rsshub.app/dockerhub/tag/library/mysql)\n :::","location":"tag.ts"}} /> + +:::warning +Use `library` as the `owner` for official images, such as [https://rsshub.app/dockerhub/tag/library/mysql](https://rsshub.app/dockerhub/tag/library/mysql) +::: ## Eagle {#eagle} ### Changelog {#eagle-changelog} -<Route author="tigercubden" example="/eagle/changelog/en" path="/eagle/changelog/:language?" paramsDesc={['Language, see list, default to be `cn`']} radar="1"> - Language +<Route namespace="eagle" data={{"path":"/changelog/:language?","categories":["program-update"],"example":"/eagle/changelog/en","parameters":{"language":"Language, see list, default to be `cn`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Changelog","maintainers":["tigercubden"],"description":"Language\n\n | Simplified Chinese | Traditional Chinese | English |\n | ------------------ | ------------------- | ------- |\n | cn | tw | en |","location":"changelog.ts"}} /> - | Simplified Chinese | Traditional Chinese | English | - | ------------------ | ------------------- | ------- | - | cn | tw | en | -</Route> +Language -## Everything {#everything} - -### Changes {#everything-changes} - -<Route author="nczitzk" example="/everything/changes" path="/everything/changes" /> +| Simplified Chinese | Traditional Chinese | English | +| ------------------ | ------------------- | ------- | +| cn | tw | en | ## F-Droid {#f-droid} ### App Update {#f-droid-app-update} -<Route author="garywill" example="/f-droid/apprelease/com.termux" path="/f-droid/apprelease/:app" paramsDesc={['App\'s package name']} radar="1" /> - -## Firefox {#firefox} - -### New Release {#firefox-new-release} - -<Route author="fengkx" example="/firefox/release/desktop" path="/firefox/release/:platform" paramsDesc={['the platform']}> - | Desktop | Android | Beta | Nightly | Android Beta | ESR | - | ------- | ------- | ---- | ------- | ------------ | ------------- | - | desktop | android | beta | nightly | android-beta | organizations | -</Route> - -### Add-ons Update {#firefox-add-ons-update} - -<Route author="DIYgod" example="/firefox/addons/rsshub-radar" path="/firefox/addons/:id" paramsDesc={['Add-ons id, can be found in add-ons url']} /> - -## fish shell {#fish-shell} - -### Release Notes {#fish-shell-release-notes} - -<Route author="x2cf" example="/fishshell" path="/fishshell" radar="1" /> +<Route namespace="f-droid" data={{"path":"/apprelease/:app","categories":["program-update"],"example":"/f-droid/apprelease/com.termux","parameters":{"app":"App's package name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["f-droid.org/en/packages/:app/"]},"name":"App Update","maintainers":["garywill"],"location":"apprelease.ts"}} /> ## FossHub {#fosshub} ### Software Update {#fosshub-software-update} -<Route author="nczitzk" example="/fosshub/qBittorrent" path="/fosshub/:id" paramsDesc={['Software id, can be found in URL']} /> +<Route namespace="fosshub" data={{"path":"/:id","categories":["program-update"],"example":"/fosshub/qBittorrent","parameters":{"id":"Software id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Software Update","maintainers":["nczitzk"],"location":"index.ts"}} /> ## GoFans {#gofans} ### 最新限免 / 促销应用 {#gofans-zui-xin-xian-mian-cu-xiao-ying-yong} -<Route author="HenryQW" example="/gofans" path="/gofans/:kind?" paramsDesc={['Platform, either `macos` or `ios`, empty means both (default)']} radar="1" /> +<Route namespace="gofans" data={{"path":"/:kind?","categories":["program-update"],"example":"/gofans","parameters":{"kind":"Platform, either `macos` or `ios`, empty means both (default)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新限免 / 促销应用","maintainers":["HenryQW"],"location":"index.ts"}} /> -## Google Chrome Web Store {#google-chrome-web-store} +## Google {#google} -### Extension Update {#google-chrome-web-store-extension-update} +### Extension Update {#google-extension-update} -<Route author="DIYgod" example="/google/chrome/extension/kefjpfngnndepjbopdmoebkipbgkggaa" path="/google/chrome/extension/:id" paramsDesc={['Extension id, can be found in extension url']} /> +<Route namespace="google" data={{"path":"/chrome/extension/:id","categories":["program-update"],"example":"/google/chrome/extension/kefjpfngnndepjbopdmoebkipbgkggaa","parameters":{"id":"Extension id, can be found in extension url"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["chromewebstore.google.com/detail/:name/:id"]},"name":"Extension Update","maintainers":["DIYgod"],"location":"extension.ts"}} /> ## Greasy Fork {#greasy-fork} -### Script Update {#greasy-fork-script-update} - -<Route author="imlonghao" path="/greasyfork/:language/:domain?" example="/greasyfork/en/google.com" paramsDesc={['language, located on the top right corner of Greasy Fork\'s search page, set to `all` for including all languages', 'the script\'s target domain']} radar="1" /> - -### Script Version History {#greasy-fork-script-version-history} - -<Route author="miles170" example="/greasyfork/scripts/431691-bypass-all-shortlinks/versions" path="/greasyfork/scripts/:script/versions" paramsDesc={['Script id, can be found in URL']} radar="1" /> - ### Script Feedback {#greasy-fork-script-feedback} -<Route author="miles170" example="/greasyfork/scripts/431691-bypass-all-shortlinks/feedback" path="/greasyfork/scripts/:script/feedback" paramsDesc={['Script id, can be found in URL']} radar="1" /> +<Route namespace="greasyfork" data={{"path":"/scripts/:script/feedback","categories":["program-update"],"example":"/greasyfork/scripts/431691-bypass-all-shortlinks/feedback","parameters":{"script":"Script id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["greasyfork.org/:language/scripts/:script/feedback"]},"name":"Script Feedback","maintainers":["miles170"],"location":"feedback.ts"}} /> -### Script Ranking {#greasy-fork-script-ranking} +### Script Update {#greasy-fork-script-update} -<Route author="ingjieye" example="/greasyfork/scripts/sort/today/all" path="/greasyfork/scripts/sort/:sort/:language?" paramsDesc={['Sort method, see below table', 'Language, located on the top right corner of Greasy Fork\'s search page, set to all for including all languages']} /> +<Route namespace="greasyfork" data={{"path":["/:language/:domain?","/scripts/sort/:sort/:language?"],"categories":["program-update"],"example":"/greasyfork/en/google.com","parameters":{"language":"language, located on the top right corner of Greasy Fork's search page, set to `all` for including all languages","domain":"the script's target domain"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["greasyfork.org/:language","greasyfork.org/:language/scripts/by-site/:domain?"]},"name":"Script Update","maintainers":["imlonghao","miles170"],"description":"| Sort | Description |\n| --------------- | -------------- |\n| today | Daily installs |\n| total_installs | Total installs |\n| ratings | Ratings |\n| created | Created date |\n| updated | Updated date |\n| name | Name |","location":"scripts.ts"}} /> | Sort | Description | | --------------- | -------------- | @@ -299,11 +181,28 @@ Need to configure `CIVITAI_COOKIE` to obtain image information of NSFW models. | updated | Updated date | | name | Name | +### Script Update {#greasy-fork-script-update} + +<Route namespace="greasyfork" data={{"path":["/:language/:domain?","/scripts/sort/:sort/:language?"],"categories":["program-update"],"example":"/greasyfork/en/google.com","parameters":{"language":"language, located on the top right corner of Greasy Fork's search page, set to `all` for including all languages","domain":"the script's target domain"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["greasyfork.org/:language","greasyfork.org/:language/scripts/by-site/:domain?"]},"name":"Script Update","maintainers":["imlonghao","miles170"],"description":"| Sort | Description |\n| --------------- | -------------- |\n| today | Daily installs |\n| total_installs | Total installs |\n| ratings | Ratings |\n| created | Created date |\n| updated | Updated date |\n| name | Name |","location":"scripts.ts"}} /> + +| Sort | Description | +| --------------- | -------------- | +| today | Daily installs | +| total\_installs | Total installs | +| ratings | Ratings | +| created | Created date | +| updated | Updated date | +| name | Name | + +### Script Version History {#greasy-fork-script-version-history} + +<Route namespace="greasyfork" data={{"path":"/scripts/:script/versions","categories":["program-update"],"example":"/greasyfork/scripts/431691-bypass-all-shortlinks/versions","parameters":{"script":"Script id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["greasyfork.org/:language/scripts/:script/versions"]},"name":"Script Version History","maintainers":["miles170"],"location":"versions.ts"}} /> + ## iFi audio {#ifi-audio} ### Download Hub {#ifi-audio-download-hub} -<Route author="EthanWng97" example="/ifi-audio/download/1503007035/44472" path="/ifi-audio/download/:val/:id" paramsDesc={['product val', 'product id']} /> +<Route namespace="ifi-audio" data={{"path":"/download/:val/:id","categories":["program-update"],"example":"/ifi-audio/download/1503007035/44472","parameters":{"val":"product val","id":"product id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Download Hub","maintainers":["EthanWng97"],"description":":::warning\n1. Open [https://ifi-audio.com/download-hub](https://ifi-audio.com/download-hub) and the Network panel\n2. Select the device and the corresponding serial number in the website and click Search\n3. Find the last request named `https://ifi-audio.com/wp-admin/admin-ajax.php` in the Network panel, find out the val and id in the Payload panel, and fill in the url\n:::","location":"download.ts"}} /> :::warning 1. Open [https://ifi-audio.com/download-hub](https://ifi-audio.com/download-hub) and the Network panel @@ -315,420 +214,161 @@ Need to configure `CIVITAI_COOKIE` to obtain image information of NSFW models. ### Changelog {#imagemagick-changelog} -<Route author="nczitzk" example="/imagemagick/changelog" path="/imagemagick/changelog" /> +<Route namespace="imagemagick" data={{"path":"/changelog","categories":["program-update"],"example":"/imagemagick/changelog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["imagemagick.org/script/download.php","imagemagick.org/script","imagemagick.org/"]},"name":"Changelog","maintainers":["nczitzk"],"url":"imagemagick.org/script/download.php","location":"changelog.ts"}} /> ## Infuse {#infuse} ### Release Notes {#infuse-release-notes} -<Route author="NathanDai" example="/firecore/ios" path="/firecore/:os" paramsDesc={['`ios`,`tvos`,`macos`']} /> - -## IPSW\.me {#ipsw-me} - -### Apple Firmware Update-IPSWs/OTAs version {#ipsw-me-apple-firmware-update-ipsws-otas-version} - -<Route author="Jeason0228" example="/ipsw/index/ipsws/iPhone11,8" path="/ipsw/index/:ptype/:pname/" paramsDesc={['Fill in ipsws or otas to get different versions of firmware','Product name, `http://rsshub.app/ipsw/index/ipsws/iPod`, if you fill in the iPad, follow the entire iPad series(ptype default to ipsws).`http://rsshub.app/ipsw/index/ipsws/iPhone11,8`, if you fill in the specific iPhone11,8, submit to the ipsws firmware information of this model']} /> - -## KeePass {#keepass} - -### News {#keepass-news} - -<Route author="TonyRL" example="/keepass" path="/keepass" radar="1" /> - -## Logseq {#logseq} - -:::warning -Logseq 开发团队已经放弃了 [旧网站](https://logseq.com/blog)。 -请使用 `https://github.com/logseq/logseq/releases.atom` 代替。 -::: +<Route namespace="firecore" data={{"path":"/:os","categories":["program-update"],"example":"/firecore/ios","parameters":{"os":"`ios`,`tvos`,`macos`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Release Notes","maintainers":["NathanDai"],"location":"index.ts"}} /> ## MacUpdate {#macupdate} ### Update {#macupdate-update} -<Route author="TonyRL" example="/macupdate/app/11942" path="/macupdate/app/:appId/:appSlug?" paramsDesc={['Application unique ID, can be found in URL', 'Application slug, can be found in URL']} radar="1" /> - -## ManicTime {#manictime} - -### Relases {#manictime-relases} - -<Route author="nczitzk" example="/manictime/releases" path="/manictime/releases" /> - -## Mathpix {#mathpix} - -### Latest Updates {#mathpix-latest-updates} - -<Route author="nczitzk" example="/mathpix/blog" path="/mathpix/blog" /> +<Route namespace="macupdate" data={{"path":"/app/:appId/:appSlug?","categories":["program-update"],"example":"/macupdate/app/11942","parameters":{"appId":"Application unique ID, can be found in URL","appSlug":"Application slug, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["macupdate.com/app/mac/:appId/:appSlug"]},"name":"Update","maintainers":["TonyRL"],"location":"app.ts"}} /> ## Microsoft Edge {#microsoft-edge} ### Addons Update {#microsoft-edge-addons-update} -<Route author="hoilc DIYgod" example="/microsoft/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln" path="/microsoft/edge/addon/:crxid" paramsDesc={['Addon id, can be found in addon url']} /> +<Route namespace="microsoft" data={{"path":"/edge/addon/:crxid","categories":["program-update"],"example":"/microsoft/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln","parameters":{"crxid":"Addon id, can be found in addon url"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["microsoftedge.microsoft.com/addons/detail/:name/:crxid"]},"name":"Addons Update","maintainers":["hoilc","DIYgod"],"location":"addon.ts"}} /> -## Microsoft Store {#microsoft-store} +## Mozilla {#mozilla} -### Updates {#microsoft-store-updates} +### Add-ons Update {#mozilla-add-ons-update} -<Route author="hellodword" example="/microsoft-store/updates/9WZDNCRFHVN5/CN" path="/microsoft-store/updates/:productid/:market?" paramsDesc={['`Share` - `Copy Link` in the Store', '`CN` as default']} /> - -## MIUI {#miui} - -### New firmware {#miui-new-firmware} - -<Route author="Indexyz" example="/miui/aries/" path="/miui/:device/:type?/:region?" paramsDesc={['the device `codename` eg. `aries` for Mi 2S','type', 'Region, default to `cn`']}> - | stable | development | - | ------- | ----------- | - | release | dev | - - | region | region | - | ------ | ------ | - | China | cn | - | Global | global | -</Route> +<Route namespace="firefox" data={{"path":"/addons/:id","categories":["program-update"],"example":"/firefox/addons/rsshub-radar","parameters":{"id":"Add-ons id, can be found in add-ons url"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["addons.mozilla.org/:lang/firefox/addon/:id/versions","addons.mozilla.org/:lang/firefox/addon/:id"]},"name":"Add-ons Update","maintainers":["DIYgod"],"location":"addons.ts"}} /> ## Neat Download Manager {#neat-download-manager} ### Download {#neat-download-manager-download} -<Route author="nczitzk" example="/neatdownloadmanager/download" path="/neatdownloadmanager/download/:os?" paramsDesc={['Operating system, windows or macos, all by default']} /> +<Route namespace="neatdownloadmanager" data={{"path":"/download/:os?","categories":["program-update"],"example":"/neatdownloadmanager/download","parameters":{"os":"Operating system, windows or macos, all by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["neatdownloadmanager.com/index.php","neatdownloadmanager.com/"]},"name":"Download","maintainers":["nczitzk"],"url":"neatdownloadmanager.com/index.php","location":"download.ts"}} /> ## Not a Tesla App {#not-a-tesla-app} ### Tesla Software Updates {#not-a-tesla-app-tesla-software-updates} -<Route author="mrbruce516" example="/notateslaapp/ota" path="/notateslaapp/ota" radar="1" /> - -## NPM {#npm} - -### Package {#npm-package} - -<Route author="Fatpandac" example="/npm/package/rsshub" path="/npm/package/:name" paramsDesc={['Package name']} /> - -## Nvidia Web Driver {#nvidia-web-driver} - -### Changelog {#nvidia-web-driver-changelog} - -<Route author="EkkoG" example="/nvidia/webdriverupdate" path="/nvidia/webdriverupdate" /> +<Route namespace="notateslaapp" data={{"path":"/ota","categories":["program-update"],"example":"/notateslaapp/ota","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["notateslaapp.com/software-updates/history","notateslaapp.com/software-updates","notateslaapp.com/"]},"name":"Tesla Software Updates","maintainers":["mrbruce516"],"url":"notateslaapp.com/software-updates/history","location":"update.ts"}} /> ## O\&O Software {#o-o-software} ### Changelog {#o-o-software-changelog} -<Route author="nczitzk" example="/oo-software/changelog/shutup10" path="/oo-software/changelog/:id" paramsDesc={['Software id, see below, shutup10 by default, can be found in URL']}> - | Software | Id | - | --------------- | ----------- | - | O\&O ShutUp10++ | shutup10 | - | O\&O AppBuster | ooappbuster | - | O\&O Lanytix | oolanytix | - | O\&O DeskInfo | oodeskinfo | -</Route> +<Route namespace="oo-software" data={{"path":"/changelog/:id","categories":["program-update"],"example":"/oo-software/changelog/shutup10","parameters":{"id":"Software id, see below, shutup10 by default, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Changelog","maintainers":["nczitzk"],"description":"| Software | Id |\n | --------------- | ----------- |\n | O&O ShutUp10++ | shutup10 |\n | O&O AppBuster | ooappbuster |\n | O&O Lanytix | oolanytix |\n | O&O DeskInfo | oodeskinfo |","location":"changelog.ts"}} /> -## OneNote Gem Add-Ins {#onenote-gem-add-ins} - -### Release History {#onenote-gem-add-ins-release-history} - -<Route author="nczitzk" example="/onenotegem/release" path="/onenotegem/release" /> - -## OpenWrt {#openwrt} - -### Releases {#openwrt-releases} - -<Route author="DIYgod" example="/openwrt/releases/xiaomi/xiaomi_redmi_router_ac2100" path="/releases/:brand/:model" paramsDesc={['Device Model, can be found in url of `Table of Hardware` -> `Device Page`', 'Same as above']} /> +| Software | Id | +| --------------- | ----------- | +| O\&O ShutUp10++ | shutup10 | +| O\&O AppBuster | ooappbuster | +| O\&O Lanytix | oolanytix | +| O\&O DeskInfo | oodeskinfo | ## Postman {#postman} ### Release Notes {#postman-release-notes} -<Route author="nczitzk" example="/postman/release-notes" path="/postman/release-notes" /> - -## Potplayer {#potplayer} - -### Version History {#potplayer-version-history} - -<Route author="nczitzk" example="/potplayer/update" path="/potplayer/update/:language?" paramsDesc={['Language, see below, English by default']}> - | 한국어 | 中文 (简体) | 中文 (繁体) | ENGLISH | Українська | РУССКИЙ | Polski | - | ------ | ----------- | ----------- | ------- | ---------- | ------- | ------ | - | ko | zh\_CN | zh\_TW | en | uk | ru | pl | -</Route> +<Route namespace="postman" data={{"path":"/release-notes","categories":["program-update"],"example":"/postman/release-notes","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["postman.com/downloads/release-notes","postman.com/"]},"name":"Release Notes","maintainers":["nczitzk"],"url":"postman.com/downloads/release-notes","location":"release-notes.ts"}} /> ## PuTTY {#putty} ### Change Log {#putty-change-log} -<Route author="nczitzk" example="/putty/changes" path="/putty/changes" /> +<Route namespace="putty" data={{"path":"/changes","categories":["program-update"],"example":"/putty/changes","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.chiark.greenend.org.uk/~sgtatham/putty/changes.html","www.chiark.greenend.org.uk/"]},"name":"Change Log","maintainers":["nczitzk"],"url":"www.chiark.greenend.org.uk/~sgtatham/putty/changes.html","location":"changes.ts"}} /> ## qBittorrent {#qbittorrent} ### News {#qbittorrent-news} -<Route author="TonyRL" example="/qbittorrent/news" path="/qbittorrent/news" radar="1" notOperational="1" /> - -## QNAP {#qnap} - -### Release Notes {#qnap-release-notes} - -<Route author="nczitzk" example="/qnap/release-notes/qts" path="/qnap/release-notes/:id" paramsDesc={['OS id, see below']} notOperational="1"> - | QTS | QuTS hero | QuTScloud | QuWAN Orchestrator | QES | TAS | AfoBot | - | --- | ---------- | --------- | ------------------- | --- | --- | ------ | - | qts | quts\_hero | qutscloud | quwan\_orchestrator | qes | tas | afobot | -</Route> - -## QQ 互联 SDK {#qq-hu-lian-sdk} - -### 更新日志 {#qq-hu-lian-sdk-geng-xin-ri-zhi} - -<Route author="nuomi1" example="/tencent/qq/sdk/changelog/iOS" path="/tencent/qq/sdk/changelog/:platform" paramsDesc={['平台,iOS / Android']} /> - -## QTTabBar {#qttabbar} - -### Change Log {#qttabbar-change-log} - -<Route author="nczitzk" example="/qttabbar/change-log" path="/qttabbar/change-log" /> - -## Quicker {#quicker} - -### 版本更新 {#quicker-ban-ben-geng-xin} - -<Route author="Cesaryuan nczitzk" example="/quicker/versions" path="/quicker/versions" /> +<Route namespace="qbittorrent" data={{"path":"/news","categories":["program-update"],"example":"/qbittorrent/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qbittorrent.org/news.php","qbittorrent.org/"]},"name":"News","maintainers":["TonyRL"],"url":"qbittorrent.org/news.php","location":"news.ts"}} /> ## RemNote {#remnote} ### Changelog {#remnote-changelog} -<Route author="TonyRL amakerlife" example="/remnote/changelog" path="/remnote/changelog" radar="1" /> - -## RescueTime {#rescuetime} - -### Release Notes {#rescuetime-release-notes} - -<Route author="nczitzk" example="/rescuetime/release-notes" path="/rescuetime/release-notes/:os?" paramsDesc={['OS id, see below']}> - | Mac OS | Windows | - | ------ | ------- | - | mac | windows | -</Route> +<Route namespace="remnote" data={{"path":"/changelog","categories":["program-update"],"example":"/remnote/changelog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["remnote.com/changelog","remnote.com/"]},"name":"Changelog","maintainers":["TonyRL","amakerlife"],"url":"remnote.com/changelog","location":"changelog.ts"}} /> ## RSSHub {#rsshub} ### New routes {#rsshub-new-routes} -<Route author="DIYgod" path="/rsshub/routes/:lang?" example="/rsshub/routes/en" paramsDesc={['Language, `zh` means Chinese docs, other values or null means English docs, `en` by default']} /> - -## Sesame {#sesame} - -### Release Notes {#sesame-release-notes} - -<Route author="nczitzk" example="/sesame/release_notes" path="/sesame/release_notes" /> - -## simpread {#simpread} - -### 消息通知 {#simpread-xiao-xi-tong-zhi} - -<Route author="zytomorrow" example="/simpread/notice" path="/simpread/notice" /> - -### 更新日志 {#simpread-geng-xin-ri-zhi} - -<Route author="zytomorrow" example="/simpread/changelog" path="/simpread/changelog" /> - -## sketch.com {#sketch-com} - -### Beta update {#sketch-com-beta-update} - -<Route author="Jeason0228" example="/sketch/beta" path="/sketch/beta" /> - -### Release update {#sketch-com-release-update} - -<Route author="Jeason0228" example="/sketch/updates" path="/sketch/updates" notOperational="1" /> +<Route namespace="rsshub" data={{"path":"/routes/:lang?","categories":["program-update"],"example":"/rsshub/routes/en","parameters":{"lang":"Language, `zh` means Chinese docs, other values or null means English docs, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["docs.rsshub.app/*"],"target":"/routes"},"name":"New routes","maintainers":["DIYgod"],"url":"docs.rsshub.app/*","location":"routes.ts"}} /> ## Sony {#sony} ### Software Downloads {#sony-software-downloads} -<Route author="EthanWng97" example="/sony/downloads/product/nw-wm1am2" path="/sony/downloads/:productType/:productId" paramsDesc={['product type', 'product id']}> - :::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`. - ::: -</Route> +<Route namespace="sony" data={{"path":"/downloads/:productType/:productId","categories":["program-update"],"example":"/sony/downloads/product/nw-wm1am2","parameters":{"productType":"product type","productId":"product id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sony.com/electronics/support/:productType/:productId/downloads"]},"name":"Software Downloads","maintainers":["EthanWng97"],"description":":::tip\n 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`.\n :::","location":"downloads.ts"}} /> + +:::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`. +::: ## SourceForge {#sourceforge} ### Software {#sourceforge-software} -<Route author="JimenezLi" example="/sourceforge/topic=artificial-intelligence&os=windows" path="/sourceforge/:routeParams?" paramsDesc={['route params, see below']}> - For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows"](https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows), thus subscribing to `/sourceforge/topic=artificial-intelligence&os=windows`. +<Route namespace="sourceforge" data={{"path":"/:routeParams?","categories":["program-update"],"example":"/sourceforge/topic=artificial-intelligence&os=windows","parameters":{"routeParams":"route params, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Software","maintainers":["JimenezLi"],"description":"For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence&os=windows\"](https://sourceforge.net/directory/?topic=artificial-intelligence&os=windows), thus subscribing to `/sourceforge/topic=artificial-intelligence&os=windows`.\n\n URL params can duplicate, such as `/sourceforge/topic=artificial-intelligence&os=windows&os=linux`.","location":"index.ts"}} /> - URL params can duplicate, such as `/sourceforge/topic=artificial-intelligence&os=windows&os=linux`. -</Route> +For some URL like [https://sourceforge.net/directory/artificial-intelligence/windows/](https://sourceforge.net/directory/artificial-intelligence/windows/), it is equal to [https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows"](https://sourceforge.net/directory/?topic=artificial-intelligence\&os=windows), thus subscribing to `/sourceforge/topic=artificial-intelligence&os=windows`. -## Thunderbird {#thunderbird} - -### Changelog {#thunderbird-changelog} - -<Route author="garywill" example="/thunderbird/release" path="/thunderbird/release" /> - -## Total Commander {#total-commander} - -### What's New {#total-commander-what-s-new} - -<Route author="nczitzk" example="/totalcommander/whatsnew" path="/totalcommander/whatsnew" /> +URL params can duplicate, such as `/sourceforge/topic=artificial-intelligence&os=windows&os=linux`. ## TradingView {#tradingview} -### Blog {#tradingview-blog} - -<Route author="nczitzk" example="/tradingview/blog/en" path="/tradingview/blog/:language?/category/:category?" paramsDesc={['Language, see below, `en` as English by default', 'Category, see below, all by default']} radar="1"> - #### 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 | -</Route> - ### Desktop releases and release notes {#tradingview-desktop-releases-and-release-notes} -<Route author="nczitzk" example="/tradingview/desktop" path="/tradingview/desktop" radar="1" /> - -### Pine Script™ Release notes {#tradingview-pine-script%E2%84%A2-release-notes} - -<Route author="nczitzk" example="/tradingview/pine" path="/tradingview/pine/version?" paramsDesc={['Version, see below, `v5` by default']} radar="1"> - | v5 | v4 | - | -- | -- | -</Route> +<Route namespace="tradingview" data={{"path":"/desktop","categories":["program-update"],"example":"/tradingview/desktop","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tradingview.com/support/solutions/43000673888-tradingview-desktop-releases-and-release-notes/"]},"name":"Desktop releases and release notes","maintainers":["nczitzk"],"url":"tradingview.com/support/solutions/43000673888-tradingview-desktop-releases-and-release-notes/","location":"desktop.ts"}} /> ## Typora {#typora} ### Changelog {#typora-changelog} -<Route author="cnzgray" example="/typora/changelog" path="/typora/changelog" radar="1" /> +<Route namespace="typora" data={{"path":"/changelog","categories":["program-update"],"example":"/typora/changelog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["support.typora.io/"]},"name":"Changelog","maintainers":["cnzgray"],"url":"support.typora.io/","location":"changelog.ts"}} /> ### Dev Release Changelog {#typora-dev-release-changelog} -<Route author="nczitzk" example="/typora/changelog/dev" path="/typora/changelog/dev" radar="1" /> +<Route namespace="typora" data={{"path":"/changelog/dev","categories":["program-update"],"example":"/typora/changelog/dev","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["support.typora.io/"],"target":"/changelog"},"name":"Dev Release Changelog","maintainers":["nczitzk"],"url":"support.typora.io/","location":"changelog-dev.ts"}} /> ## Unraid {#unraid} ### Community Apps {#unraid-community-apps} -<Route author="KTachibanaM" example="/unraid/community-apps" path="/unraid/community-apps" radar="1" /> +<Route namespace="unraid" data={{"path":"/community-apps","categories":["program-update"],"example":"/unraid/community-apps","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["unraid.net/community/apps"]},"name":"Community Apps","maintainers":["KTachibanaM"],"url":"unraid.net/community/apps","location":"community-apps.ts"}} /> ## Western Digital {#western-digital} ### Download {#western-digital-download} -<Route author="nczitzk" example="/wdc/download/279" path="/wdc/download/:id?" paramsDesc={['Software id, can be found in URL, 279 as Western Digital Dashboard by default']} /> +<Route namespace="wdc" data={{"path":"/download/:id?","categories":["program-update"],"example":"/wdc/download/279","parameters":{"id":"Software id, can be found in URL, 279 as Western Digital Dashboard by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Download","maintainers":[],"location":"download.ts"}} /> ## winstall {#winstall} ### Apps Update {#winstall-apps-update} -<Route author="TonyRL" example="/winstall/Mozilla.Firefox" path="/winstall/:appId" paramsDesc={['Application ID']} radar="1" /> +<Route namespace="winstall" data={{"path":"/:appId","categories":["program-update"],"example":"/winstall/Mozilla.Firefox","parameters":{"appId":"Application ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["winstall.app/apps/:appId"]},"name":"Apps Update","maintainers":["TonyRL"],"location":"update.ts"}} /> ## WizTree {#wiztree} ### What's New {#wiztree-what-s-new} -<Route author="nczitzk" example="/diskanalyzer/whats-new" path="/diskanalyzer/whats-new" /> +<Route namespace="diskanalyzer" data={{"path":"/whats-new","categories":["program-update"],"example":"/diskanalyzer/whats-new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["diskanalyzer.com/whats-new","diskanalyzer.com/"]},"name":"What's New","maintainers":["nczitzk"],"url":"diskanalyzer.com/whats-new","location":"whats-new.ts"}} /> ## WziFile {#wzifile} ### Version History {#wzifile-version-history} -<Route author="Fatpandac" example="/wizfile/updates" path="/wizfile/updates" /> - -## X410 {#x410} - -### News {#x410-news} - -<Route author="nczitzk" example="/x410/news" path="/x410/news" /> - -## xclient.info {#xclient-info} - -### 应用更新 {#xclient-info-ying-yong-geng-xin} - -<Route author="DIYgod" example="/xclient/app/sketch" path="/xclient/app/:name" paramsDesc={['应用名, 可在应用页 URL 中找到']} /> - -## Xiaomi.eu {#xiaomi-eu} - -### ROM Releases {#xiaomi-eu-rom-releases} - -<Route author="maple3142" example="/xiaomieu/releases" path="/xiaomieu/releases" /> - -## XYplorer {#xyplorer} - -### What's New {#xyplorer-what-s-new} - -<Route author="nczitzk" example="/xyplorer/whatsnew" path="/xyplorer/whatsnew" /> +<Route namespace="wizfile" data={{"path":"/updates","categories":["program-update"],"example":"/wizfile/updates","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["antibody-software.com/wizfile/download"]},"name":"Version History","maintainers":["Fatpandac"],"url":"antibody-software.com/wizfile/download","location":"index.ts"}} /> ## Zotero {#zotero} ### Version History {#zotero-version-history} -<Route author="jasongzy" example="/zotero/versions" path="/zotero/versions" /> +<Route namespace="zotero" data={{"path":"/versions","categories":["program-update"],"example":"/zotero/versions","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zotero.org/","zotero.org/support/changelog"]},"name":"Version History","maintainers":["jasongzy"],"url":"zotero.org/","location":"versions.ts"}} /> -## 腾讯云移动直播 SDK {#teng-xun-yun-yi-dong-zhi-bo-sdk} +## 王者荣耀 {#wang-zhe-rong-yao} -### 更新日志 {#teng-xun-yun-yi-dong-zhi-bo-sdk-geng-xin-ri-zhi} +### 更新日志 {#wang-zhe-rong-yao-geng-xin-ri-zhi} -<Route author="EkkoG" example="/qcloud/mlvb/changelog" path="/qcloud/mlvb/changelog" /> - -## 小米应用商店 {#xiao-mi-ying-yong-shang-dian} - -### 金米奖 {#xiao-mi-ying-yong-shang-dian-jin-mi-jiang} - -<Route author="nczitzk" example="/mi/golden" path="/mi/golden" /> - -## 猿料 {#yuan-liao} - -### 标签 {#yuan-liao-biao-qian} - -<Route author="nczitzk" example="/yuanliao" path="/yuanliao/:tag/:sort?" paramsDesc={['标签,见下表,默认为 `utools`', '排序,见下表,默认为最新回复']}> - 标签 - - | uTools | 插件发布 | - | ------ | -------- | - | utools | plugins | - - 排序 - - | 最新回复 | 热门回复 | 新鲜出炉 | 陈年旧贴 | - | -------- | ------------- | ---------- | --------- | - | | -commentCount | -createdAt | createdAt | -</Route> +<Route namespace="tencent" data={{"path":"/qq/sdk/changelog/:platform","categories":["program-update"],"example":"/tencent/qq/sdk/changelog/iOS","parameters":{"platform":"平台,iOS / Android"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"更新日志","maintainers":["nuomi1"],"location":"qq/sdk/changelog.ts"}} /> diff --git a/website/docs/routes/programming.mdx b/website/docs/routes/programming.mdx index 97cf7c56d..7786e404d 100644 --- a/website/docs/routes/programming.mdx +++ b/website/docs/routes/programming.mdx @@ -1,232 +1,174 @@ -# 💻 Programming +# programming ## A List Apart {#a-list-apart} -### Articles {#a-list-apart-articles} - -<Route author="Rjnishant530" example="/alistapart" path="/alistapart" radar="1" /> - ### Topics {#a-list-apart-topics} -<Route author="Rjnishant530" example="/alistapart/application-development" path="/alistapart/:topic" paramsDesc={['Any Topic or from the table below. Defaults to All Articles']} radar="1"> - You have the option to utilize the main heading or use individual categories as topics for the path. +<Route namespace="alistapart" data={{"path":"/:topic","categories":["programming"],"example":"/alistapart/application-development","parameters":{"topic":"Any Topic or from the table below. Defaults to All Articles"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["alistapart.com/blog/topic/:topic"]},"name":"Topics","maintainers":["Rjnishant530"],"url":"alistapart.com/articles/","description":"You have the option to utilize the main heading or use individual categories as topics for the path.\n\n | **Code** | *code* |\n | --------------------------- | ------------------------- |\n | **Application Development** | *application-development* |\n | **Browsers** | *browsers* |\n | **CSS** | *css* |\n | **HTML** | *html* |\n | **JavaScript** | *javascript* |\n | **The Server Side** | *the-server-side* |\n\n | **Content** | *content* |\n | -------------------- | ------------------ |\n | **Community** | *community* |\n | **Content Strategy** | *content-strategy* |\n | **Writing** | *writing* |\n\n | **Design** | *design* |\n | -------------------------- | ---------------------- |\n | **Brand Identity** | *brand-identity* |\n | **Graphic Design** | *graphic-design* |\n | **Layout & Grids** | *layout-grids* |\n | **Mobile/Multidevice** | *mobile-multidevice* |\n | **Responsive Design** | *responsive-design* |\n | **Typography & Web Fonts** | *typography-web-fonts* |\n\n | **Industry & Business** | *industry-business* |\n | ----------------------- | ------------------- |\n | **Business** | *business* |\n | **Career** | *career* |\n | **Industry** | *industry* |\n | **State of the Web** | *state-of-the-web* |\n\n | **Process** | *process* |\n | ---------------------- | -------------------- |\n | **Creativity** | *creativity* |\n | **Project Management** | *project-management* |\n | **Web Strategy** | *web-strategy* |\n | **Workflow & Tools** | *workflow-tools* |\n\n | **User Experience** | *user-experience* |\n | ---------------------------- | -------------------------- |\n | **Accessibility** | *accessibility* |\n | **Information Architecture** | *information-architecture* |\n | **Interaction Design** | *interaction-design* |\n | **Usability** | *usability* |\n | **User Research** | *user-research* |","location":"topic.ts"}} /> - | **Code** | *code* | - | --------------------------- | ------------------------- | - | **Application Development** | *application-development* | - | **Browsers** | *browsers* | - | **CSS** | *css* | - | **HTML** | *html* | - | **JavaScript** | *javascript* | - | **The Server Side** | *the-server-side* | +You have the option to utilize the main heading or use individual categories as topics for the path. - | **Content** | *content* | - | -------------------- | ------------------ | - | **Community** | *community* | - | **Content Strategy** | *content-strategy* | - | **Writing** | *writing* | +| **Code** | *code* | +| --------------------------- | ------------------------- | +| **Application Development** | *application-development* | +| **Browsers** | *browsers* | +| **CSS** | *css* | +| **HTML** | *html* | +| **JavaScript** | *javascript* | +| **The Server Side** | *the-server-side* | - | **Design** | *design* | - | -------------------------- | ---------------------- | - | **Brand Identity** | *brand-identity* | - | **Graphic Design** | *graphic-design* | - | **Layout & Grids** | *layout-grids* | - | **Mobile/Multidevice** | *mobile-multidevice* | - | **Responsive Design** | *responsive-design* | - | **Typography & Web Fonts** | *typography-web-fonts* | +| **Content** | *content* | +| -------------------- | ------------------ | +| **Community** | *community* | +| **Content Strategy** | *content-strategy* | +| **Writing** | *writing* | - | **Industry & Business** | *industry-business* | - | ----------------------- | ------------------- | - | **Business** | *business* | - | **Career** | *career* | - | **Industry** | *industry* | - | **State of the Web** | *state-of-the-web* | +| **Design** | *design* | +| -------------------------- | ---------------------- | +| **Brand Identity** | *brand-identity* | +| **Graphic Design** | *graphic-design* | +| **Layout & Grids** | *layout-grids* | +| **Mobile/Multidevice** | *mobile-multidevice* | +| **Responsive Design** | *responsive-design* | +| **Typography & Web Fonts** | *typography-web-fonts* | - | **Process** | *process* | - | ---------------------- | -------------------- | - | **Creativity** | *creativity* | - | **Project Management** | *project-management* | - | **Web Strategy** | *web-strategy* | - | **Workflow & Tools** | *workflow-tools* | +| **Industry & Business** | *industry-business* | +| ----------------------- | ------------------- | +| **Business** | *business* | +| **Career** | *career* | +| **Industry** | *industry* | +| **State of the Web** | *state-of-the-web* | - | **User Experience** | *user-experience* | - | ---------------------------- | -------------------------- | - | **Accessibility** | *accessibility* | - | **Information Architecture** | *information-architecture* | - | **Interaction Design** | *interaction-design* | - | **Usability** | *usability* | - | **User Research** | *user-research* | -</Route> +| **Process** | *process* | +| ---------------------- | -------------------- | +| **Creativity** | *creativity* | +| **Project Management** | *project-management* | +| **Web Strategy** | *web-strategy* | +| **Workflow & Tools** | *workflow-tools* | -## ACM {#acm} - -### A.M.Turing Award Winners {#acm-a-m-turing-award-winners} - -<Route author="nczitzk" example="/acm/amturingaward" path="/acm/amturingaward" /> - -## AI 研习社 {#ai-yan-xi-she} - -### 首页 {#ai-yan-xi-she-shou-ye} - -<Route author="kt286" example="/aiyanxishe/109/hot" path="/aiyanxishe/:id/:sort?" paramsDesc={['领域 id,全部领域为 `all`,单独领域 id 抓包可得','排序方式,默认为 `new`(最新),也可选择 `hot`(最热)或 `recommend`(推荐)']} /> - -## AlgoCasts {#algocasts} - -### 视频更新 {#algocasts-shi-pin-geng-xin} - -<Route author="ImSingee" example="/algocasts" path="/algocasts" radar="1"> - > AlgoCasts 需要付费订阅,RSS 仅做更新提醒,不含付费内容. -</Route> +| **User Experience** | *user-experience* | +| ---------------------------- | -------------------------- | +| **Accessibility** | *accessibility* | +| **Information Architecture** | *information-architecture* | +| **Interaction Design** | *interaction-design* | +| **Usability** | *usability* | +| **User Research** | *user-research* | ## AlternativeTo {#alternativeto} -### Software Alternatives {#alternativeto-software-alternatives} - -<Route author="JimenezLi" example="/alternativeto/software/cpp" path="/alternativeto/software/:name/:routeParams?" paramsDesc={['Software name', 'Filters of software type']} puppeteer="1" radar="1" anticrawler="1"> - > routeParms can be copied from original site URL, example: `/alternativeto/software/cpp/license=opensource&platform=windows` -</Route> - ### Platform Software {#alternativeto-platform-software} -<Route author="JimenezLi" example="/alternativeto/platform/firefox" path="/alternativeto/platform/:name/:routeParams?" paramsDesc={['Platform name', 'Filters of software type']} puppeteer="1" radar="1" anticrawler="1"> - > routeParms can be copied from original site URL, example: `/alternativeto/platform/firefox/license=free` -</Route> +<Route namespace="alternativeto" data={{"path":"/platform/:name/:routeParams?","categories":["programming"],"example":"/alternativeto/platform/firefox","parameters":{"name":"Platform name","routeParams":"Filters of software type"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.alternativeto.net/platform/:name"],"target":"/platform/:name"},"name":"Platform Software","maintainers":["JimenezLi"],"description":"> routeParms can be copied from original site URL, example: `/alternativeto/platform/firefox/license=free`","location":"platform.ts"}} /> + +> routeParms can be copied from original site URL, example: `/alternativeto/platform/firefox/license=free` + +### Software Alternatives {#alternativeto-software-alternatives} + +<Route namespace="alternativeto" data={{"path":"/software/:name/:routeParams?","categories":["programming"],"example":"/alternativeto/software/cpp","parameters":{"name":"Software name","routeParams":"Filters of software type"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.alternativeto.net/software/:name"],"target":"/software/:name"},"name":"Software Alternatives","maintainers":["JimenezLi"],"description":"> routeParms can be copied from original site URL, example: `/alternativeto/software/cpp/license=opensource&platform=windows`","location":"software.ts"}} /> + +> routeParms can be copied from original site URL, example: `/alternativeto/software/cpp/license=opensource&platform=windows` ## AtCoder {#atcoder} -### Present Contests {#atcoder-present-contests} - -<Route author="nczitzk" example="/atcoder/contest/en/upcoming" path="/atcoder/contest/:language?/:status?" paramsDesc={['Language, `jp` as Japanese or `en` as English, English by default', 'Status, see below, Recent Contests by default']}> - Status - - | Active Contests | Upcoming Contests | Recent Contests | - | --------------- | ----------------- | --------------- | - | active | upcoming | recent | -</Route> - ### Contests Archive {#atcoder-contests-archive} -<Route author="nczitzk" example="/atcoder/contest" path="/atcoder/contest/:language?/:rated?/:category?/:keyword?" paramsDesc={['Language, `jp` as Japanese or `en` as English, English by default', 'Rated Range, see below, all by default', 'Category, see below, all by default', 'Keyword']}> - Rated Range +<Route namespace="atcoder" data={{"path":"/contest/:language?/:rated?/:category?/:keyword?","categories":["programming"],"example":"/atcoder/contest","parameters":{"language":"Language, `jp` as Japanese or `en` as English, English by default","rated":"Rated Range, see below, all by default","category":"Category, see below, all by default","keyword":"Keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Contests Archive","maintainers":["nczitzk"],"description":"Rated Range\n\n | ABC Class (Rated for ~1999) | ARC Class (Rated for ~2799) | AGC Class (Rated for ~9999) |\n | ---------------------------- | ---------------------------- | ---------------------------- |\n | 1 | 2 | 3 |\n\n Category\n\n | All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) |\n | --- | ----------------------- | ------------ | ------------------- |\n | 0 | 6 | 50 | 101 |\n\n | JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) |\n | ----------- | -------------------- | ------------------------- |\n | 200 | 1000 | 1001 |\n\n | Sponsored Parallel(unrated) | Optimization Contest |\n | --------------------------- | -------------------- |\n | 1002 | 1200 |","location":"contest.ts"}} /> - | ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) | - | ---------------------------- | ---------------------------- | ---------------------------- | - | 1 | 2 | 3 | +Rated Range - Category +| ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) | +| ---------------------------- | ---------------------------- | ---------------------------- | +| 1 | 2 | 3 | - | All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) | - | --- | ----------------------- | ------------ | ------------------- | - | 0 | 6 | 50 | 101 | +Category - | JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) | - | ----------- | -------------------- | ------------------------- | - | 200 | 1000 | 1001 | +| All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) | +| --- | ----------------------- | ------------ | ------------------- | +| 0 | 6 | 50 | 101 | - | Sponsored Parallel(unrated) | Optimization Contest | - | --------------------------- | -------------------- | - | 1002 | 1200 | -</Route> +| JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) | +| ----------- | -------------------- | ------------------------- | +| 200 | 1000 | 1001 | + +| Sponsored Parallel(unrated) | Optimization Contest | +| --------------------------- | -------------------- | +| 1002 | 1200 | ### Posts {#atcoder-posts} -<Route author="nczitzk" example="/atcoder/post" path="/atcoder/post/:language?/:keyword?" paramsDesc={['Language, `jp` as Japanese or `en` as English, English by default', 'Keyword']} /> +<Route namespace="atcoder" data={{"path":"/post/:language?/:keyword?","categories":["programming"],"example":"/atcoder/post","parameters":{"language":"Language, `jp` as Japanese or `en` as English, English by default","keyword":"Keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Posts","maintainers":["nczitzk"],"location":"post.ts"}} /> ## BBC News Labs {#bbc-news-labs} ### News {#bbc-news-labs-news} -<Route author="elxy" example="/bbcnewslabs/news" path="/bbcnewslabs/news" /> +<Route namespace="bbcnewslabs" data={{"path":"/news","categories":["programming"],"example":"/bbcnewslabs/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bbcnewslabs.co.uk/"]},"name":"News","maintainers":["elxy"],"url":"bbcnewslabs.co.uk/","location":"news.ts"}} /> ## Bitbucket {#bitbucket} ### Commits {#bitbucket-commits} -<Route author="AuroraDysis" example="/bitbucket/commits/blaze-lib/blaze" path="/bitbucket/commits/:workspace/:repo_slug" paramsDesc={['Workspace', 'Repository']} radar="1" /> +<Route namespace="bitbucket" data={{"path":"/commits/:workspace/:repo_slug","categories":["programming"],"example":"/bitbucket/commits/blaze-lib/blaze","parameters":{"workspace":"Workspace","repo_slug":"Repository"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bitbucket.com/commits/:workspace/:repo_slug"]},"name":"Commits","maintainers":["AuroraDysis"],"location":"commits.ts"}} /> ### Tags {#bitbucket-tags} -<Route author="AuroraDysis" example="/bitbucket/tags/blaze-lib/blaze" path="/bitbucket/tags/:workspace/:repo_slug" paramsDesc={['Workspace', 'Repository']} radar="1" /> +<Route namespace="bitbucket" data={{"path":"/tags/:workspace/:repo_slug","categories":["programming"],"example":"/bitbucket/tags/blaze-lib/blaze","parameters":{"workspace":"Workspace","repo_slug":"Repository"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Tags","maintainers":["AuroraDysis"],"location":"tags.ts"}} /> ## Bitmovin {#bitmovin} ### Blog {#bitmovin-blog} -<Route author="elxy" example="/bitmovin/blog" path="/bitmovin/blog" /> +<Route namespace="bitmovin" data={{"path":"/blog","categories":["programming"],"example":"/bitmovin/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bitmovin.com/blog","bitmovin.com/"]},"name":"Blog","maintainers":["elxy"],"url":"bitmovin.com/blog","location":"blog.ts"}} /> ## CNCF {#cncf} ### Category {#cncf-category} -<Route author="Fatpandac" example="/cncf" path="/cncf/:cate?" radar="1" paramsDesc={['blog by default']}> - | Blog | News | Announcements | Reports | - | ---- | ---- | ------------- | ------- | - | blog | news | announcements | reports | -</Route> +<Route namespace="cncf" data={{"path":"/:cate?","categories":["programming"],"example":"/cncf","parameters":{"cate":"blog by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["Fatpandac"],"description":"| Blog | News | Announcements | Reports |\n | ---- | ---- | ------------- | ------- |\n | blog | news | announcements | reports |","location":"index.ts"}} /> + +| Blog | News | Announcements | Reports | +| ---- | ---- | ------------- | ------- | +| blog | news | announcements | reports | ## Codeforces {#codeforces} ### Latest contests {#codeforces-latest-contests} -<Route author="Fatpandac" example="/codeforces/contests" path="/codeforces/contests" /> +<Route namespace="codeforces" data={{"path":"/contests","categories":["programming"],"example":"/codeforces/contests","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.codeforces.com/contests"]},"name":"Latest contests","maintainers":["Fatpandac"],"url":"www.codeforces.com/contests","location":"contests.ts"}} /> ### Recent actions {#codeforces-recent-actions} -<Route author="ftiasch" example="/codeforces/recent-actions" path="/codeforces/recent-actions/:minrating?" paramsDesc={['The minimum blog/comment rating required. Default: 1']} /> - -## dbaplus 社群 {#dbaplus-she-qun} - -### 栏目 {#dbaplus-she-qun-lan-mu} - -<Route author="nczitzk" example="/dbaplus" path="/dbaplus/:tab?" paramsDesc={['栏目,见下表,默认为全部']}> - | 全部 | 数据库 | 运维 | 大数据 | 架构 | PaaS 云 | 职场生涯 | 这里有毒 | - | ---- | ------ | ---- | ------ | ---- | ------- | -------- | -------- | - | All | 153 | 134 | 73 | 141 | 72 | 149 | 21 | -</Route> - -### 活动 {#dbaplus-she-qun-huo-dong} - -<Route author="nczitzk" example="/dbaplus/activity" path="/dbaplus/activity/:type?" paramsDesc={['分类,见下表,默认为线上分享']}> - | 线上分享 | 线下峰会 | - | -------- | -------- | - | online | offline | -</Route> +<Route namespace="codeforces" data={{"path":"/recent-actions/:minrating?","categories":["programming"],"example":"/codeforces/recent-actions","parameters":{"minrating":"The minimum blog/comment rating required. Default: 1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["codeforces.com/recent-actions"],"target":"/recent-actions"},"name":"Recent actions","maintainers":[],"url":"codeforces.com/recent-actions","location":"recent-actions.ts"}} /> ## deeplearning.ai {#deeplearning-ai} ### TheBatch 周报 {#deeplearning-ai-thebatch-zhou-bao} -<Route author="nczitzk juvenn" example="/deeplearning/thebatch" path="/deeplearning/thebatch" radar="1" /> - -## Distill {#distill} - -### Latest {#distill-latest} - -<Route author="nczitzk" example="/distill" path="/distill" /> +<Route namespace="deeplearning" data={{"path":"/thebatch","categories":["programming"],"example":"/deeplearning/thebatch","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.deeplearning.ai/thebatch","www.deeplearning.ai/"]},"name":"TheBatch 周报","maintainers":["nczitzk","juvenn"],"url":"www.deeplearning.ai/thebatch","location":"thebatch.ts"}} /> ## gihyo.jp {#gihyo-jp} ### Series {#gihyo-jp-series} -<Route author="masakichi" example="/gihyo/list/group/Ubuntu-Weekly-Recipe" path="/gihyo/list/group/:id" paramsDesc={['Series']} /> +<Route namespace="gihyo" data={{"path":"/list/group/:id","categories":["programming"],"example":"/gihyo/list/group/Ubuntu-Weekly-Recipe","parameters":{"id":"Series"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gihyo.jp/list/group/:id"]},"name":"Series","maintainers":["masakichi"],"location":"group.ts"}} /> ## Gitee {#gitee} -### 仓库 Releases {#gitee-cang-ku-releases} - -<Route author="TonyRL" example="/gitee/releases/y_project/RuoYi" path="/gitee/releases/:owner/:repo" paramsDesc={['用户名', '仓库名']} radar="1" /> - ### 仓库提交 {#gitee-cang-ku-ti-jiao} -<Route author="TonyRL" example="/gitee/commits/y_project/RuoYi" path="/gitee/commits/:owner/:repo" paramsDesc={['用户名', '仓库名']} radar="1" /> - -### 用户公开动态 {#gitee-yong-hu-gong-kai-dong-tai} - -<Route author="TonyRL" example="/gitee/events/y_project" path="/gitee/events/:username" paramsDesc={['用户名']} radar="1" /> +<Route namespace="gitee" data={{"path":"/commits/:owner/:repo","categories":["programming"],"example":"/gitee/commits/y_project/RuoYi","parameters":{"owner":"用户名","repo":"仓库名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitee.com/:owner/:repo/commits"]},"name":"仓库提交","maintainers":["TonyRL"],"location":"repos/commits.ts"}} /> ### 仓库动态 {#gitee-cang-ku-dong-tai} -<Route author="TonyRL" example="/gitee/events/y_project/RuoYi" path="/gitee/events/:owner/:repo" paramsDesc={['用户名', '仓库名']} radar="1" /> +<Route namespace="gitee" data={{"path":"/events/:owner/:repo","categories":["programming"],"example":"/gitee/events/y_project/RuoYi","parameters":{"owner":"用户名","repo":"仓库名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitee.com/:owner/:repo"]},"name":"仓库动态","maintainers":["TonyRL"],"location":"repos/events.ts"}} /> + +### 仓库 Releases {#gitee-cang-ku-releases} + +<Route namespace="gitee" data={{"path":"/releases/:owner/:repo","categories":["programming"],"example":"/gitee/releases/y_project/RuoYi","parameters":{"owner":"用户名","repo":"仓库名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitee.com/:owner/:repo/releases"]},"name":"仓库 Releases","maintainers":["TonyRL"],"location":"repos/releases.ts"}} /> + +### 用户公开动态 {#gitee-yong-hu-gong-kai-dong-tai} + +<Route namespace="gitee" data={{"path":"/events/:username","categories":["programming"],"example":"/gitee/events/y_project","parameters":{"username":"用户名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitee.com/:username"]},"name":"用户公开动态","maintainers":["TonyRL"],"location":"users/events.ts"}} /> ## GitHub {#github} @@ -240,267 +182,182 @@ GitHub provides some official RSS feeds: - Wiki history: `https://github.com/:owner/:repo/wiki.atom` ::: -### User Repo {#github-user-repo} +### Gist Commits {#github-gist-commits} -<Route author="dragon-yuan" path="/github/repos/:user" example="/github/repos/DIYgod" paramsDesc={['GitHub username']} radar="1" /> - -### Trending {#github-trending} - -<Route author="DIYgod" path="/github/trending/:since/:language/:spoken_language?" example="/github/trending/daily/javascript/en" paramsDesc={['time frame, available in [Trending page](https://github.com/trending/javascript?since=monthly) \'s URL, possible values are: `daily`, `weekly` or `monthly`', 'the feed language, available in [Trending page](https://github.com/trending/javascript?since=monthly) \'s URL, don\'t filter option is `any`', 'natural language, available in [Trending page](https://github.com/trending/javascript?since=monthly) \'s URL']} radar="1" configRequired="1" /> - -### Topics {#github-topics} - -<Route author="queensferryme" example="/github/topics/framework" path="/github/topics/:name/:qs?" paramsDesc={['Topic name, which can be found in the URL of the corresponding [Topics Page](https://github.com/topics/framework)', 'Query string, like `l=php&o=desc&s=stars`. Details listed as follows:']} radar="1"> - | Parameter | Description | Values | - | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | - | `l` | Language | For instance `php`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) | - | `o` | Sorting Order | `asc`, `desc` | - | `s` | Sorting Criteria | `stars`, `forks`, `updated` | - - For instance, the `/github/topics/framework/l=php&o=desc&s=stars` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars). -</Route> - -### Repo Issues {#github-repo-issues} - -<Route author="HenryQW AndreyMZ" path="/github/issue/:user/:repo/:state?/:labels?" example="/github/issue/vuejs/core/all/wontfix" paramsDesc={['GitHub username', 'GitHub repo name', 'the state of the issues. Can be either `open`, `closed`, or `all`. Default: `open`.', 'a list of comma separated label names']} radar="1" /> - -### Repo Pull Requests {#github-repo-pull-requests} - -<Route author="hashman TonyRL" example="/github/pull/DIYgod/RSSHub" path="/github/pull/:user/:repo/:state?/:labels?" paramsDesc={['User name', 'Repo name', 'the state of pull requests. Can be either `open`, `closed`, or `all`. Default: `open`.', 'a list of comma separated label names']} radar="1" /> - -### Repo Pulse {#github-repo-pulse} - -<Route author="jameschensmith" example="/github/pulse/DIYgod/RSSHub" path="/github/pulse/:user/:repo/:period?" paramsDesc={['User name', 'Repo name', 'Time frame, selected from a repository\'s Pulse/Insights page. Possible values are: `daily`, `halfweekly`, `weekly`, or `monthly`. Default: `weekly`. If your RSS client supports it, consider aligning the polling frequency of the feed to the period.']} radar="1" /> - -### User Followers {#github-user-followers} - -<Route author="HenryQW" path="/github/user/followers/:user" example="/github/user/followers/HenryQW" paramsDesc={['GitHub username']} radar="1" /> - -### Repo Stars {#github-repo-stars} - -<Route author="HenryQW" path="/github/stars/:user/:repo" example="/github/stars/DIYGod/RSSHub" paramsDesc={['GitHub username', 'GitHub repo name']} radar="1" /> - -### Repo Branches {#github-repo-branches} - -<Route author="max-arnold" example="/github/branches/DIYgod/RSSHub" path="/github/branches/:user/:repo" paramsDesc={['User name', 'Repo name']} radar="1" /> - -### Files Commits {#github-files-commits} - -<Route author="zengxs" example="/github/file/DIYgod/RSSHub/master/lib/router.ts" path="/github/file/:user/:repo/:branch/:filepath+" paramsDesc={['User name', 'Repo name', 'Branch name', 'File path']} radar="1"> - | User name | Repo name | Branch name | File path | - | --------- | --------- | ----------- | --------------- | - | `DIYgod` | `RSSHub` | `master` | `lib/router.ts` | - - > - If there are special characters such as `/` in the **branch name**, they need to be encoded with urlencode, usually `/` needs to be replaced with `%2f` - > - > - If there are special characters in the **file path**, you need to use urlencode to encode them, but the file path can be recognized normally `/` characters - > - > - If the **file path** ends with `.rss`, `.atom`, `.json`, you need to replace the `.` in the suffix with `%2e` - > - > > Reeder will make an error when subscribing to `% 2erss` or similar suffixes. At this time, add`.rss` after the route to subscribe - > > - > > Such as: replace `https://rsshub.app/github/file/DIYgod/RSSHub/master/lib/router%2ejs` to `https://rsshub.app/github/file/DIYgod/RSSHub/master/lib/router%2ejs.rss` -</Route> - -### Search Result {#github-search-result} - -<Route author="LogicJake" example="/github/search/RSSHub/bestmatch/desc" path="/github/search/:query/:sort?/:order?" paramsDesc={['search keyword', 'Sort options (default to bestmatch)','Sort order, desc and asc (desc descending by default)']}> - | Sort options | sort | - | ---------------- | --------- | - | Best match | bestmatch | - | Most stars | stars | - | Most forks | forks | - | Recently updated | updated | -</Route> - -### User Starred Repositories {#github-user-starred-repositories} - -<Route author="LanceZhu" example="/github/starred_repos/DIYgod" path="/github/starred_repos/:user" paramsDesc={['User name']} radar="1" /> - -### Repo Contributors {#github-repo-contributors} - -<Route author="zoenglinghou" example="/github/contributors/DIYgod/RSSHub" path="/github/contributors/:user/:repo/:order?/:anon?" paramsDesc={['User name','Repo name','Sort order by commit numbers, desc and asc (descending by default)','Show anonymous users. Defaults to no, use any values for yes.']} radar="1" /> - -### Issue / Pull Request comments {#github-issue-pull-request-comments} - -<Route author="TonyRL FliegendeWurst" example="/github/comments/DIYgod/RSSHub/8116" path="/github/comments/:user/:repo/:number?" paramsDesc={['User / Org name', 'Repo name', 'Issue or pull number (if omitted: all)']} radar="1" /> - -### Wiki History {#github-wiki-history} - -<Route author="TonyRL" example="/github/wiki/flutter/flutter/Roadmap" path="/github/wiki/:user/:repo/:page?" paramsDesc={['User / Org name', 'Repo name', 'Page slug, can be found in URL, empty means Home']} radar="1" /> +<Route namespace="github" data={{"path":"/gist/:gistId","categories":["programming"],"example":"/github/gist/d2c152bb7179d07015f336b1a0582679","parameters":{"gistId":"Gist ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gist.github.com/:owner/:gistId/revisions","gist.github.com/:owner/:gistId/stargazers","gist.github.com/:owner/:gistId/forks","gist.github.com/:owner/:gistId"]},"name":"Gist Commits","maintainers":["TonyRL"],"location":"gist.ts"}} /> ### Notifications {#github-notifications} -<Route author="zhzy0077" example="/github/notifications" path="/github/notifications" radar="1" configRequired="1" /> +<Route namespace="github" data={{"path":"/notifications","categories":["programming"],"example":"/github/notifications","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/notifications"]},"name":"Notifications","maintainers":["zhzy0077"],"url":"github.com/notifications","location":"notifications.ts"}} /> -### Gist Commits {#github-gist-commits} +### Repo Branches {#github-repo-branches} -<Route author="TonyRL" example="/github/gist/d2c152bb7179d07015f336b1a0582679" path="/github/gist/:gistId" paramsDesc={['Gist ID']} radar="1" /> +<Route namespace="github" data={{"path":"/branches/:user/:repo","categories":["programming"],"example":"/github/branches/DIYgod/RSSHub","parameters":{"user":"User name","repo":"Repo name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/branches","github.com/:user/:repo"]},"name":"Repo Branches","maintainers":["max-arnold"],"location":"branches.ts"}} /> -## GitLab {#gitlab} +### Repo Contributors {#github-repo-contributors} -### Explore {#gitlab-explore} +<Route namespace="github" data={{"path":"/contributors/:user/:repo/:order?/:anon?","categories":["programming"],"example":"/github/contributors/DIYgod/RSSHub","parameters":{"user":"User name","repo":"Repo name","order":"Sort order by commit numbers, desc and asc (descending by default)","anon":"Show anonymous users. Defaults to no, use any values for yes."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/graphs/contributors","github.com/:user/:repo"],"target":"/contributors/:user/:repo"},"name":"Repo Contributors","maintainers":["zoenglinghou"],"location":"contributors.ts"}} /> -<Route author="imlonghao zoenglinghou" example="/gitlab/explore/trending" path="/gitlab/explore/:type/:host?" paramsDesc={['type', 'Gitlab instance hostname, default to gitlab.com']}> - | Trending | Most stars | All | - | -------- | ---------- | --- | - | trending | starred | all | -</Route> +### Repo Issues {#github-repo-issues} -### Releases {#gitlab-releases} +<Route namespace="github" data={{"path":"/issue/:user/:repo/:state?/:labels?","categories":["programming"],"example":"/github/issue/vuejs/core/all/wontfix","parameters":{"user":"GitHub username","repo":"GitHub repo name","state":"the state of the issues. Can be either `open`, `closed`, or `all`. Default: `open`.","labels":"a list of comma separated label names"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/issues","github.com/:user/:repo/issues/:id","github.com/:user/:repo"],"target":"/issue/:user/:repo"},"name":"Repo Issues","maintainers":["HenryQW","AndreyMZ"],"location":"issue.ts"}} /> -<Route author="zoenglinghou" example="/gitlab/release/pleroma/pleroma/git.pleroma.social" path="/gitlab/release/:namespace/:project/:host?" paramsDesc={['owner or namespace. `/` needs to be replaced with `%2F`', 'project name', 'Gitlab instance hostname, default to gitlab.com']} notOperational="1" /> +### Repo Pull Requests {#github-repo-pull-requests} -### Tags {#gitlab-tags} +<Route namespace="github" data={{"path":"/pull/:user/:repo/:state?/:labels?","categories":["programming"],"example":"/github/pull/DIYgod/RSSHub","parameters":{"user":"User name","repo":"Repo name","state":"the state of pull requests. Can be either `open`, `closed`, or `all`. Default: `open`.","labels":"a list of comma separated label names"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/pulls","github.com/:user/:repo/pulls/:id","github.com/:user/:repo"],"target":"/pull/:user/:repo"},"name":"Repo Pull Requests","maintainers":[],"location":"pulls.ts"}} /> -<Route author="zoenglinghou" example="/gitlab/tag/rluna-open-source%2Ffile-management%2Fowncloud/core/gitlab.com" path="/gitlab/tag/:namespace/:project/:host?" paramsDesc={['owner or namespace. `/` needs to be replaced with `%2F`', 'project name', 'Gitlab instance hostname, default to gitlab.com']} anticrawler="1" /> +### Repo Pulse {#github-repo-pulse} + +<Route namespace="github" data={{"path":"/pulse/:user/:repo/:period?","categories":["programming"],"example":"/github/pulse/DIYgod/RSSHub","parameters":{"user":"User name","repo":"Repo name","period":"Time frame, selected from a repository's Pulse/Insights page. Possible values are: `daily`, `halfweekly`, `weekly`, or `monthly`. Default: `weekly`. If your RSS client supports it, consider aligning the polling frequency of the feed to the period."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/pulse","github.com/:user/:repo/pulse/:period"]},"name":"Repo Pulse","maintainers":["jameschensmith"],"location":"pulse.ts"}} /> + +### Repo Stars {#github-repo-stars} + +<Route namespace="github" data={{"path":"/stars/:user/:repo","categories":["programming"],"example":"/github/stars/DIYGod/RSSHub","parameters":{"user":"GitHub username","repo":"GitHub repo name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/stargazers","github.com/:user/:repo"]},"name":"Repo Stars","maintainers":["HenryQW"],"location":"star.ts"}} /> + +### Search Result {#github-search-result} + +<Route namespace="github" data={{"path":"/search/:query/:sort?/:order?","categories":["programming"],"example":"/github/search/RSSHub/bestmatch/desc","parameters":{"query":"search keyword","sort":"Sort options (default to bestmatch)","order":"Sort order, desc and asc (desc descending by default)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Search Result","maintainers":["LogicJake"],"description":"| Sort options | sort |\n | ---------------- | --------- |\n | Best match | bestmatch |\n | Most stars | stars |\n | Most forks | forks |\n | Recently updated | updated |","location":"search.ts"}} /> + +| Sort options | sort | +| ---------------- | --------- | +| Best match | bestmatch | +| Most stars | stars | +| Most forks | forks | +| Recently updated | updated | + +### Topics {#github-topics} + +<Route namespace="github" data={{"path":"/topics/:name/:qs?","categories":["programming"],"example":"/github/topics/framework","parameters":{"name":"Topic name, which can be found in the URL of the corresponding [Topics Page](https://github.com/topics/framework)","qs":"Query string, like `l=php&o=desc&s=stars`. Details listed as follows:"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/topics"]},"name":"Topics","maintainers":["queensferryme"],"url":"github.com/topics","description":"| Parameter | Description | Values |\n | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |\n | `l` | Language | For instance `php`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) |\n | `o` | Sorting Order | `asc`, `desc` |\n | `s` | Sorting Criteria | `stars`, `forks`, `updated` |\n\n For instance, the `/github/topics/framework/l=php&o=desc&s=stars` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php&o=desc&s=stars).","location":"topic.ts"}} /> + +| Parameter | Description | Values | +| --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `l` | Language | For instance `php`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) | +| `o` | Sorting Order | `asc`, `desc` | +| `s` | Sorting Criteria | `stars`, `forks`, `updated` | + +For instance, the `/github/topics/framework/l=php&o=desc&s=stars` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars). + +### Trending {#github-trending} + +<Route namespace="github" data={{"path":"/trending/:since/:language/:spoken_language?","categories":["programming"],"example":"/github/trending/daily/javascript/en","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"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/trending"],"target":"/trending/:since"},"name":"Trending","maintainers":["DIYgod","jameschensmith"],"url":"github.com/trending","location":"trending.ts"}} /> + +### User Followers {#github-user-followers} + +<Route namespace="github" data={{"path":"/user/followers/:user","categories":["programming"],"example":"/github/user/followers/HenryQW","parameters":{"user":"GitHub username"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user"]},"name":"User Followers","maintainers":["HenryQW"],"location":"follower.ts"}} /> + +### User Repo {#github-user-repo} + +<Route namespace="github" data={{"path":"/repos/:user","categories":["programming"],"example":"/github/repos/DIYgod","parameters":{"user":"GitHub username"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user"]},"name":"User Repo","maintainers":["DIYgod"],"location":"repos.ts"}} /> + +### User Starred Repositories {#github-user-starred-repositories} + +<Route namespace="github" data={{"path":"/starred_repos/:user","categories":["programming"],"example":"/github/starred_repos/DIYgod","parameters":{"user":"User name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user"]},"name":"User Starred Repositories","maintainers":["LanceZhu"],"location":"starred-repos.ts"}} /> + +### Wiki History {#github-wiki-history} + +<Route namespace="github" data={{"path":"/wiki/:user/:repo/:page?","categories":["programming"],"example":"/github/wiki/flutter/flutter/Roadmap","parameters":{"user":"User / Org name","repo":"Repo name","page":"Page slug, can be found in URL, empty means Home"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["github.com/:user/:repo/wiki/:page/_history","github.com/:user/:repo/wiki/:page","github.com/:user/:repo/wiki/_history","github.com/:user/:repo/wiki"],"target":"/wiki/:user/:repo/:page"},"name":"Wiki History","maintainers":["TonyRL"],"location":"wiki.ts"}} /> ## Gitpod {#gitpod} ### Blog {#gitpod-blog} -<Route author="TonyRL" example="/gitpod/blog" path="/gitpod/blog" /> +<Route namespace="gitpod" data={{"path":"/blog","categories":["programming"],"example":"/gitpod/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitpod.io/blog","gitpod.io/"]},"name":"Blog","maintainers":["TonyRL"],"url":"gitpod.io/blog","location":"blog.ts"}} /> ### Changelog {#gitpod-changelog} -<Route author="TonyRL" example="/gitpod/changelog" path="/gitpod/changelog" /> +<Route namespace="gitpod" data={{"path":"/changelog","categories":["programming"],"example":"/gitpod/changelog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gitpod.io/changelog","gitpod.io/"]},"name":"Changelog","maintainers":["TonyRL"],"url":"gitpod.io/changelog","location":"changelog.ts"}} /> ## Go 语言中文网 {#go-yu-yan-zhong-wen-wang} ### 板块 {#go-yu-yan-zhong-wen-wang-ban-kuai} -<Route author="nczitzk" example="/studygolang/go/daily" path="/studygolang/go/:id?" paramsDesc={['板块 id,默认为周刊']} radar="1" /> - -### 周刊 {#go-yu-yan-zhong-wen-wang-zhou-kan} - -<Route author="Weilet nczitzk" example="/studygolang/weekly" path="/studygolang/weekly" radar="1" /> +<Route namespace="studygolang" data={{"path":"/go/:id?","categories":["programming"],"example":"/studygolang/go/daily","parameters":{"id":"板块 id,默认为周刊"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["studygolang.com/go/:id","studygolang.com/"]},"name":"板块","maintainers":["nczitzk"],"location":"go.ts"}} /> ### 招聘 {#go-yu-yan-zhong-wen-wang-zhao-pin} -<Route author="CcccFz nczitzk" example="/studygolang/jobs" path="/studygolang/jobs" radar="1" /> +<Route namespace="studygolang" data={{"path":"/jobs","categories":["programming"],"example":"/studygolang/jobs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"招聘","maintainers":["CcccFz","nczitzk"],"location":"jobs.ts"}} /> + +### 周刊 {#go-yu-yan-zhong-wen-wang-zhou-kan} + +<Route namespace="studygolang" data={{"path":"/weekly","categories":["programming"],"example":"/studygolang/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"周刊","maintainers":["CWeilet","nczitzk"],"location":"weekly.ts"}} /> ## GoCN {#gocn} -### 最新动态 {#gocn-zui-xin-dong-tai} - -<Route author="AtlanCI" example="/gocn/news" path="/gocn/news" radar="1" anticrawler="1" /> - ### 每日新闻 {#gocn-mei-ri-xin-wen} -<Route author="AtlanCI CcccFz" example="/gocn/topics" path="/gocn/topics" radar="1" /> +<Route namespace="gocn" data={{"path":"/topics","categories":["programming"],"example":"/gocn/topics","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gocn.vip/"]},"name":"每日新闻","maintainers":["AtlanCI","CcccFz"],"url":"gocn.vip/","location":"topics.ts"}} /> ### 招聘 {#gocn-zhao-pin} -<Route author="AtlanCI CcccFz" example="/gocn/jobs" path="/gocn/jobs" radar="1" /> +<Route namespace="gocn" data={{"path":"/jobs","categories":["programming"],"example":"/gocn/jobs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gocn.vip/"]},"name":"招聘","maintainers":["AtlanCI","CcccFz"],"url":"gocn.vip/","location":"jobs.ts"}} /> ## Hacker News {#hacker-news} -### Follow User {#hacker-news-follow-user} - -Subscribe to the updates (threads and submission) from a paritcular Hacker News user - -<Route author="cf020031308 nczitzk xie-dongping" example="/hackernews/threads/comments_list/dang" path="/hackernews/:section?/:type?/:user?" paramsDesc={['Section, see above, `index` by default', 'Link, see above, `sources` by default', 'User, only valid for section `threads` and `submitted`']} /> - ### 用户 {#hacker-news-yong-hu} +<Route namespace="hackernews" data={{"path":"/:section?/:type?/:user?","categories":["programming"],"example":"/hackernews/threads/comments_list/dang","parameters":{"section":"内容分区,见上表,默认为 `index`","type":"链接类型,见上表,默认为 `sources`","user":"设定用户,只在 `threads` 和 `submitted` 分区有效"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ycombinator.com/:section","ycombinator.com/"]},"name":"用户","maintainers":["nczitzk","xie-dongping"],"description":"订阅特定用户的内容","location":"index.ts"}} /> + 订阅特定用户的内容 -<Route author="cf020031308 nczitzk xie-dongping" example="/hackernews/threads/comments_list/dang" path="/hackernews/:section?/:type?/:user?" paramsDesc={['内容分区,见上表,默认为 `index`', '链接类型,见上表,默认为 `sources`', '设定用户,只在 `threads` 和 `submitted` 分区有效']} /> - ## Hacking8 {#hacking8} -### 信息流 {#hacking8-xin-xi-liu} - -<Route author="nczitzk" example="/hacking8" path="/hacking8/:category?" paramsDesc={['分类,见下表,默认为最近更新']}> - | 推荐 | 最近更新 | 漏洞 / PoC 监控 | PDF | - | ----- | -------- | --------------- | --- | - | likes | index | vul-poc | pdf | -</Route> - ### 搜索 {#hacking8-sou-suo} -<Route author="nczitzk" example="/hacking8/search/rsshub" path="/hacking8/search/:keyword?" paramsDesc={['关键字,默认为空']} anticrawler="1" /> +<Route namespace="hacking8" data={{"path":"/search/:keyword?","categories":["programming"],"example":"/hacking8/search/rsshub","parameters":{"keyword":"关键字,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hacking8.com/index/:category","hacking8.com/"],"target":"/:category?"},"name":"搜索","maintainers":["nczitzk"],"location":"search.ts"}} /> + +### 信息流 {#hacking8-xin-xi-liu} + +<Route namespace="hacking8" data={{"path":"/:category?","categories":["programming"],"example":"/hacking8","parameters":{"category":"分类,见下表,默认为最近更新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hacking8.com/index/:category","hacking8.com/"]},"name":"信息流","maintainers":["nczitzk"],"description":"| 推荐 | 最近更新 | 漏洞 / PoC 监控 | PDF |\n | ----- | -------- | --------------- | --- |\n | likes | index | vul-poc | pdf |","location":"index.ts"}} /> + +| 推荐 | 最近更新 | 漏洞 / PoC 监控 | PDF | +| ----- | -------- | --------------- | --- | +| likes | index | vul-poc | pdf | ## HackMD {#hackmd} ### Profile {#hackmd-profile} -<Route author="Yukaii kaiix" example="/hackmd/profile/hackmd" path="/hackmd/profile/:path" paramsDesc={['userpath or teampath']} radar="1" /> - -## HackYourNews {#hackyournews} - -### Index {#hackyournews-index} - -<Route author="ftiasch" example="/hackyournews" path="/hackyournews" anticrawler="1" /> +<Route namespace="hackmd" data={{"path":"/profile/:path","categories":["programming"],"example":"/hackmd/profile/hackmd","parameters":{"path":"userpath or teampath"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Profile","maintainers":["Yukaii","kaiix"],"location":"profile.ts"}} /> ## HelloGitHub {#hellogithub} -### 热门 {#hellogithub-re-men} +### 文章 {#hellogithub-wen-zhang} -<Route author="nczitzk" example="/hellogithub/hot" path="/hellogithub/hot/:id?" paramsDesc={['标签 id,可在对应标签页 URL 中找到,默认为全部标签']}> - 以下为部分标签: +<Route namespace="hellogithub" data={{"path":["/article/:sort?/:id?","/:sort?/:id?"],"categories":["programming"],"example":"/hellogithub/article","parameters":{"sort":"排序方式,见下表,默认为 `hot`,即热门","id":"标签 id,可在对应标签页 URL 中找到,默认为全部标签"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["moke8","nczitzk"],"description":"| 热门 | 最近 |\n | ---- | ---- |\n | hot | last |","location":"index.ts"}} /> - | id | 标签 | - | ---------- | -------- | - | Z8PipJsHCX | Python | - | YQHn0gERoi | C | - | WTbsu5GAfC | CLI | - | juBLV86qa5 | 机器学习 | - | D4JBAUo967 | Rust | - | dFA60uKLgr | GUI | - | 0LByh3tjUO | 教程 | - | 4lpGK0sUyk | Web 应用 | - | yrZkGsUC9M | C++ | - | mbP20HIEYD | Ruby | -</Route> - -### 最近 {#hellogithub-zui-jin} - -<Route author="nczitzk" example="/hellogithub/last" path="/hellogithub/last/:id?" paramsDesc={['标签 id,可在对应标签页 URL 中找到,默认为全部标签']}> - 部分标签见上表 -</Route> +| 热门 | 最近 | +| ---- | ---- | +| hot | last | ### 文章 {#hellogithub-wen-zhang} -<Route author="moke8 nczitzk" example="/hellogithub/article" path="/hellogithub/article/:sort?/:id?" paramsDesc={['排序方式,见下表,默认为 `hot`,即热门', '标签 id,可在对应标签页 URL 中找到,默认为全部标签']}> - | 热门 | 最近 | - | ---- | ---- | - | hot | last | -</Route> +<Route namespace="hellogithub" data={{"path":["/article/:sort?/:id?","/:sort?/:id?"],"categories":["programming"],"example":"/hellogithub/article","parameters":{"sort":"排序方式,见下表,默认为 `hot`,即热门","id":"标签 id,可在对应标签页 URL 中找到,默认为全部标签"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["moke8","nczitzk"],"description":"| 热门 | 最近 |\n | ---- | ---- |\n | hot | last |","location":"index.ts"}} /> -### 排行榜 {#hellogithub-pai-hang-bang} - -<Route author="moke8 nczitzk" example="/hellogithub/report" path="/hellogithub/report/:type?" paramsDesc={['分类,见下表,默认为编程语言排行榜']}> - | 编程语言 | 服务器 | 数据库 | - | -------- | -------- | ---------- | - | tiobe | netcraft | db-engines | -</Route> - -### 月刊 {#hellogithub-yue-kan} - -<Route author="moke8 nczitzk CaoMeiYouRen" example="/hellogithub/volume" path="/hellogithub/volume" /> +| 热门 | 最近 | +| ---- | ---- | +| hot | last | ## Hex-Rays {#hex-rays} ### Hex-Rays News {#hex-rays-hex-rays-news} -<Route author="hellodword" example="/hex-rays/news" path="/hex-rays/news" /> +<Route namespace="hex-rays" data={{"path":"/news","categories":["programming"],"example":"/hex-rays/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hex-rays.com/","hex-rays.com/blog"]},"name":"Hex-Rays News","maintainers":["hellodword ","TonyRL"],"url":"hex-rays.com/","location":"index.ts"}} /> ## Huggingface {#huggingface} ### Daily Papers {#huggingface-daily-papers} -<Route author="zeyugao" example="/huggingface/daily-papers" path="/huggingface/daily-papers" /> +<Route namespace="huggingface" data={{"path":"/daily-papers","categories":["programming"],"example":"/huggingface/daily-papers","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["huggingface.co/papers","huggingface.co/"]},"name":"Daily Papers","maintainers":["zeyugao"],"url":"huggingface.co/papers","location":"daily-papers.ts"}} /> ### 中文博客 {#huggingface-zhong-wen-bo-ke} -<Route author="zcf0508" example="/huggingface/blog-zh" path="/huggingface/blog-zh" /> +<Route namespace="huggingface" data={{"path":"/blog-zh","categories":["programming"],"example":"/huggingface/blog-zh","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["huggingface.co/blog/zh","huggingface.co/"]},"name":"中文博客","maintainers":["zcf0508"],"url":"huggingface.co/blog/zh","location":"blog-zh.ts"}} /> ## Issue Hunt {#issue-hunt} ### Project Funded {#issue-hunt-project-funded} -<Route author="running-grass" radar="1" example="/issuehunt/funded/DIYgod/RSSHub" path="/issuehunt/funded/:username/:repo" paramsDesc={['Github user/org','Repository name']} /> +<Route namespace="issuehunt" data={{"path":"/funded/:username/:repo","categories":["programming"],"example":"/issuehunt/funded/DIYgod/RSSHub","parameters":{"username":"Github user/org","repo":"Repository name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Project Funded","maintainers":["running-grass"],"location":"funded.ts"}} /> ## Kong API 网关平台 {#kong-api-wang-guan-ping-tai} @@ -508,296 +365,198 @@ Subscribe to the updates (threads and submission) from a paritcular Hacker News ### 博客最新文章 {#kong-api-wang-guan-ping-tai-bo-ke-zui-xin-wen-zhang} -<Route author="piglei" example="/konghq/blog-posts" path="/konghq/blog-posts" /> +<Route namespace="konghq" data={{"path":"/blog-posts","categories":["programming"],"example":"/konghq/blog-posts","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["konghq.com/blog/*"]},"name":"博客最新文章","maintainers":["piglei"],"url":"konghq.com/blog/*","location":"blog-posts.ts"}} /> ## LeetCode {#leetcode} ### Articles {#leetcode-articles} -<Route author="LogicJake" example="/leetcode/articles" path="/leetcode/articles" /> - -### Daily Question {#leetcode-daily-question} - -<Route author="EthanWng97" example="/leetcode/dailyquestion/en" path="/leetcode/dailyquestion/:lang" paramsDesc={['site, Chines(cn) and Engligh(en)']} /> - -### Daily Question Solution {#leetcode-daily-question-solution} - -<Route author="woaidouya123" example="/leetcode/dailyquestion/solution/en" path="/leetcode/dailyquestion/solution/:lang" paramsDesc={['site, Chines(cn) and Engligh(en)']} /> - -## Linux Patchwork {#linux-patchwork} - -### Patch Comments {#linux-patchwork-patch-comments} - -<Route author="ysc3839" example="/patchwork.kernel.org/comments/10723629" path="/patchwork.kernel.org/comments/:id" paramsDesc={['Patch ID']} /> - -## LWN.net {#lwn-net} - -### Security alerts {#lwn-net-security-alerts} - -<Route author="zengxs" example="/lwn/alerts/CentOS" path="/lwn/alerts/:distributor" paramsDesc={['Distribution identification']}> - | Distribution | Identification | - | :--------------- | :----------------- | - | Arch Linux | `Arch_Linux` | - | CentOS | `CentOS` | - | Debian | `Debian` | - | Fedora | `Fedora` | - | Gentoo | `Gentoo` | - | Mageia | `Mageia` | - | openSUSE | `openSUSE` | - | Oracle | `Oracle` | - | Red Hat | `Red_Hat` | - | Scientific Linux | `Scientific_Linux` | - | Slackware | `Slackware` | - | SUSE | `SUSE` | - | Ubuntu | `Ubuntu` | -</Route> +<Route namespace="leetcode" data={{"path":"/articles","categories":["programming"],"example":"/leetcode/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["leetcode.com/articles"]},"name":"Articles","maintainers":["LogicJake"],"url":"leetcode.com/articles","location":"articles.ts"}} /> ## ModelScope 魔搭社区 {#modelscope-mo-da-she-qu} -### 数据集 {#modelscope-mo-da-she-qu-shu-ju-ji} +### DevPress 官方社区 {#modelscope-mo-da-she-qu-devpress-guan-fang-she-qu} -<Route author="TonyRL" example="/modelscope/datasets" path="/modelscope/datasets" radar="1" /> - -### 模型库 {#modelscope-mo-da-she-qu-mo-xing-ku} - -<Route author="TonyRL" example="/modelscope/models" path="/modelscope/models" radar="1" notOperational="1" /> +<Route namespace="modelscope" data={{"path":"/community","categories":["programming"],"example":"/modelscope/community","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["community.modelscope.cn/"]},"name":"DevPress 官方社区","maintainers":["TonyRL"],"url":"community.modelscope.cn/","location":"community.ts"}} /> ### 创空间 {#modelscope-mo-da-she-qu-chuang-kong-jian} -<Route author="TonyRL" example="/modelscope/studios" path="/modelscope/studios" radar="1" /> +<Route namespace="modelscope" data={{"path":"/studios","categories":["programming"],"example":"/modelscope/studios","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["modelscope.cn/studios"]},"name":"创空间","maintainers":["TonyRL"],"url":"modelscope.cn/studios","location":"studios.ts"}} /> -### DevPress 官方社区 {#modelscope-mo-da-she-qu-devpress-guan-fang-she-qu} +### 模型库 {#modelscope-mo-da-she-qu-mo-xing-ku} -<Route author="TonyRL" example="/modelscope/community" path="/modelscope/community" radar="1" /> +<Route namespace="modelscope" data={{"path":"/models","categories":["programming"],"example":"/modelscope/models","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["modelscope.cn/models"]},"name":"模型库","maintainers":["TonyRL"],"url":"modelscope.cn/models","location":"models.ts"}} /> + +### 数据集 {#modelscope-mo-da-she-qu-shu-ju-ji} + +<Route namespace="modelscope" data={{"path":"/datasets","categories":["programming"],"example":"/modelscope/datasets","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["modelscope.cn/datasets"]},"name":"数据集","maintainers":["TonyRL"],"url":"modelscope.cn/datasets","location":"datasets.ts"}} /> ## MySQL {#mysql} ### Release Notes {#mysql-release-notes} -<Route author="nczitzk" example="/mysql/release/8.0" path="/mysql/release/:version?" paramsDesc={['Version, see below, 8.0 by default']}> - | 8.0 | 5.7 | 5.6 | - | --- | --- | --- | -</Route> +<Route namespace="mysql" data={{"path":"/release/:version?","categories":["programming"],"example":"/mysql/release/8.0","parameters":{"version":"Version, see below, 8.0 by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Release Notes","maintainers":["nczitzk"],"description":"| 8.0 | 5.7 | 5.6 |\n | --- | --- | --- |","location":"release.ts"}} /> + +| 8.0 | 5.7 | 5.6 | +| --- | --- | --- | ## Node.js {#node-js} ### News {#node-js-news} -<Route author="nczitzk" example="/nodejs/blog" path="/nodejs/blog/:language?" paramsDesc={['Language, see below, en by default']}> - | العربية | Catalan | Deutsch | Español | زبان فارسی | - | ------- | ------- | ------- | ------- | ---------- | - | ar | ca | de | es | fa | +<Route namespace="nodejs" data={{"path":"/blog/:language?","categories":["programming"],"example":"/nodejs/blog","parameters":{"language":"Language, see below, en by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nodejs.org/:language/blog","nodejs.org/"]},"name":"News","maintainers":["nczitzk"],"description":"| العربية | Catalan | Deutsch | Español | زبان فارسی |\n | ------- | ------- | ------- | ------- | ---------- |\n | ar | ca | de | es | fa |\n\n | Français | Galego | Italiano | 日本語 | 한국어 |\n | -------- | ------ | -------- | ------ | ------ |\n | fr | gl | it | ja | ko |\n\n | Português do Brasil | limba română | Русский | Türkçe | Українська |\n | ------------------- | ------------ | ------- | ------ | ---------- |\n | pt-br | ro | ru | tr | uk |\n\n | 简体中文 | 繁體中文 |\n | -------- | -------- |\n | zh-cn | zh-tw |","location":"blog.ts"}} /> - | Français | Galego | Italiano | 日本語 | 한국어 | - | -------- | ------ | -------- | ------ | ------ | - | fr | gl | it | ja | ko | +| العربية | Catalan | Deutsch | Español | زبان فارسی | +| ------- | ------- | ------- | ------- | ---------- | +| ar | ca | de | es | fa | - | Português do Brasil | limba română | Русский | Türkçe | Українська | - | ------------------- | ------------ | ------- | ------ | ---------- | - | pt-br | ro | ru | tr | uk | +| Français | Galego | Italiano | 日本語 | 한국어 | +| -------- | ------ | -------- | ------ | ------ | +| fr | gl | it | ja | ko | - | 简体中文 | 繁體中文 | - | -------- | -------- | - | zh-cn | zh-tw | -</Route> +| Português do Brasil | limba română | Русский | Türkçe | Українська | +| ------------------- | ------------ | ------- | ------ | ---------- | +| pt-br | ro | ru | tr | uk | -## NOSEC.org {#nosec-org} - -### Posts {#nosec-org-posts} - -<Route author="hellodword" example="/nosec/hole" path="/nosec/:keykind?" paramsDesc={['对应文章分类']}> - | 分类 | 标识 | - | :------- | :--------- | - | 威胁情报 | `threaten` | - | 安全动态 | `security` | - | 漏洞预警 | `hole` | - | 数据泄露 | `leakage` | - | 专题报告 | `speech` | - | 技术分析 | `skill` | - | 安全工具 | `tool` | -</Route> - -## project-zero issues {#project-zero-issues} - -### issues {#project-zero-issues-issues} - -<Route author="hellodword" example="/project-zero-issues" path="/project-zero-issues" /> +| 简体中文 | 繁體中文 | +| -------- | -------- | +| zh-cn | zh-tw | ## Quicker {#quicker} ### 动作分享 {#quicker-dong-zuo-fen-xiang} -<Route author="nczitzk" example="/quicker/share/Recent" path="/quicker/share/:category?" paramsDesc={['分类,见下表,默认为动作库最新更新']}> - | 动作库最新更新 | 动作库最多赞 | 动作库新动作 | 动作库最近赞 | - | -------------- | ------------ | ------------ | ------------ | - | Recent | Recommended | NewActions | RecentLiked | +<Route namespace="quicker" data={{"path":"/share/:category?","categories":["programming"],"example":"/quicker/share/Recent","parameters":{"category":"分类,见下表,默认为动作库最新更新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["getquicker.net/Share/:category","getquicker.net/"]},"name":"动作分享","maintainers":["nczitzk"],"description":"| 动作库最新更新 | 动作库最多赞 | 动作库新动作 | 动作库最近赞 |\n | -------------- | ------------ | ------------ | ------------ |\n | Recent | Recommended | NewActions | RecentLiked |\n\n | 子程序 | 扩展热键 | 文本指令 |\n | ----------- | --------- | ------------ |\n | SubPrograms | PowerKeys | TextCommands |","location":"share.ts"}} /> - | 子程序 | 扩展热键 | 文本指令 | - | ----------- | --------- | ------------ | - | SubPrograms | PowerKeys | TextCommands | -</Route> +| 动作库最新更新 | 动作库最多赞 | 动作库新动作 | 动作库最近赞 | +| -------------- | ------------ | ------------ | ------------ | +| Recent | Recommended | NewActions | RecentLiked | + +| 子程序 | 扩展热键 | 文本指令 | +| ----------- | --------- | ------------ | +| SubPrograms | PowerKeys | TextCommands | ### 讨论区 {#quicker-tao-lun-qu} -<Route author="Cesaryuan nczitzk" example="/quicker/qa" path="/quicker/qa/:category?/:state?" paramsDesc={['分类,见下表,默认为全部', '状态,见下表,默认为全部']}> - 分类 +<Route namespace="quicker" data={{"path":"/qa/:category?/:state?","categories":["programming"],"example":"/quicker/qa","parameters":{"category":"分类,见下表,默认为全部","state":"状态,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"讨论区","maintainers":["Cesaryuan","nczitzk"],"description":"分类\n\n | 使用问题 | 动作开发 | BUG 反馈 | 功能建议 |\n | -------- | -------- | -------- | -------- |\n | 1 | 9 | 3 | 4 |\n\n | 动作需求 | 经验创意 | 动作推荐 | 信息发布 |\n | -------- | -------- | -------- | -------- |\n | 6 | 2 | 7 | 5 |\n\n | 随便聊聊 | 异常报告 | 全部 |\n | -------- | -------- | ---- |\n | 8 | 10 | all |\n\n 状态\n\n | 全部 | 精华 | 已归档 |\n | ---- | ------ | ------- |\n | | digest | achived |","location":"qa.ts"}} /> - | 使用问题 | 动作开发 | BUG 反馈 | 功能建议 | - | -------- | -------- | -------- | -------- | - | 1 | 9 | 3 | 4 | +分类 - | 动作需求 | 经验创意 | 动作推荐 | 信息发布 | - | -------- | -------- | -------- | -------- | - | 6 | 2 | 7 | 5 | +| 使用问题 | 动作开发 | BUG 反馈 | 功能建议 | +| -------- | -------- | -------- | -------- | +| 1 | 9 | 3 | 4 | - | 随便聊聊 | 异常报告 | 全部 | - | -------- | -------- | ---- | - | 8 | 10 | all | +| 动作需求 | 经验创意 | 动作推荐 | 信息发布 | +| -------- | -------- | -------- | -------- | +| 6 | 2 | 7 | 5 | - 状态 +| 随便聊聊 | 异常报告 | 全部 | +| -------- | -------- | ---- | +| 8 | 10 | all | - | 全部 | 精华 | 已归档 | - | ---- | ------ | ------- | - | | digest | achived | -</Route> +状态 + +| 全部 | 精华 | 已归档 | +| ---- | ------ | ------- | +| | digest | achived | ### 用户更新 {#quicker-yong-hu-geng-xin} -<Route author="Cesaryuan nczitzk" example="/quicker/user/Actions/3-CL" path="/quicker/user/:category/:id" paramsDesc={['分类,见下表', '用户 id,可在对应用户页 URL 中找到']}> - | 动作 | 子程序 | 动作单 | - | ------- | ----------- | ----------- | - | Actions | SubPrograms | ActionLists | -</Route> +<Route namespace="quicker" data={{"path":"/user/:category/:id","categories":["programming"],"example":"/quicker/user/Actions/3-CL","parameters":{"category":"分类,见下表","id":"用户 id,可在对应用户页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户更新","maintainers":["Cesaryuan","nczitzk"],"description":"| 动作 | 子程序 | 动作单 |\n | ------- | ----------- | ----------- |\n | Actions | SubPrograms | ActionLists |","location":"user.ts"}} /> -## react {#react} - -### react-native {#react-react-native} - -<Route author="xixi" example="/react/react-native-weekly" path="/react/react-native-weekly" /> +| 动作 | 子程序 | 动作单 | +| ------- | ----------- | ----------- | +| Actions | SubPrograms | ActionLists | ## Rust 语言中文社区 {#rust-yu-yan-zhong-wen-she-qu} ### 招聘 {#rust-yu-yan-zhong-wen-she-qu-zhao-pin} -<Route author="CcccFz" example="/rustcc/jobs" path="/rustcc/jobs" radar="1" /> +<Route namespace="rustcc" data={{"path":"/jobs","categories":["programming"],"example":"/rustcc/jobs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rustcc.cn/"]},"name":"招聘","maintainers":["CcccFz"],"url":"rustcc.cn/","location":"jobs.ts"}} /> ## SecWiki - 安全维基 {#secwiki-an-quan-wei-ji} ### 最新周刊 {#secwiki-an-quan-wei-ji-zui-xin-zhou-kan} -<Route author="p7e4" example="/sec-wiki/weekly" path="/sec-wiki/weekly" /> +<Route namespace="sec-wiki" data={{"path":"/weekly","categories":["programming"],"example":"/sec-wiki/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新周刊","maintainers":["p7e4"],"location":"weekly.ts"}} /> ## SegmentFault {#segmentfault} +### 博客 {#segmentfault-bo-ke} + +<Route namespace="segmentfault" data={{"path":"/blogs/:tag","categories":["programming"],"example":"/segmentfault/blogs/go","parameters":{"tag":"标签名称,在 [标签](https://segmentfault.com/tags) 中可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["segmentfault.com/t/:tag/blogs"]},"name":"博客","maintainers":["shiluanzzz"],"location":"blogs.ts"}} /> + ### 频道 {#segmentfault-pin-dao} -<Route author="LogicJake Fatpandac" example="/segmentfault/channel/frontend" path="/segmentfault/channel/:name" paramsDesc={['频道名称,在频道 URL 可以找到']} radar="1" /> +<Route namespace="segmentfault" data={{"path":"/channel/:name","categories":["programming"],"example":"/segmentfault/channel/frontend","parameters":{"name":"频道名称,在频道 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["segmentfault.com/channel/:name"]},"name":"频道","maintainers":["LogicJake","Fatpandac"],"location":"channel.ts"}} /> ### 用户 {#segmentfault-yong-hu} -<Route author="leyuuu Fatpandac" example="/segmentfault/user/minnanitkong" path="/segmentfault/user/:name" paramsDesc={['用户 Id,用户详情页 URL 可以找到']} radar="1" anticrawler="1" /> - -### 博客 {#segmentfault-bo-ke} - -<Route author="shiluanzzz" example="/segmentfault/blogs/go" path="/segmentfault/blogs/:tag" paramsDesc={['标签名称,在 [标签](https://segmentfault.com/tags) 中可以找到']} radar="1" anticrawler="1" /> +<Route namespace="segmentfault" data={{"path":"/user/:name","categories":["programming"],"example":"/segmentfault/user/minnanitkong","parameters":{"name":"用户 Id,用户详情页 URL 可以找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["segmentfault.com/u/:name"]},"name":"用户","maintainers":["leyuuu","Fatpandac"],"location":"user.ts"}} /> ## Smashing Magazine {#smashing-magazine} -### Articles {#smashing-magazine-articles} - -<Route author="Rjnishant530" example="/smashingmagazine" path="/smashingmagazine" radar="1" /> - ### Category {#smashing-magazine-category} -<Route author="Rjnishant530" example="/smashingmagazine/react" path="/smashingmagazine/:category?" paramsDesc={['Find in URL or Table below']} radar="1"> - | **Category** | | - | ------------------ | ------------------ | - | Accessibility | accessibility | - | Best practices | best-practices | - | Business | business | - | Career | career | - | Checklists | checklists | - | CSS | css | - | Data Visualization | data-visualization | - | Design | design | - | Design Patterns | design-patterns | - | Design Systems | design-systems | - | E-Commerce | e-commerce | - | Figma | figma | - | Freebies | freebies | - | HTML | html | - | Illustrator | illustrator | - | Inspiration | inspiration | - | JavaScript | javascript | - | Mobile | mobile | - | Performance | performance | - | Privacy | privacy | - | React | react | - | Responsive Design | responsive-design | - | Round-Ups | round-ups | - | SEO | seo | - | Typography | typography | - | Tools | tools | - | UI | ui | - | Usability | usability | - | UX | ux | - | Vue | vue | - | Wallpapers | wallpapers | - | Web Design | web-design | - | Workflow | workflow | -</Route> +<Route namespace="smashingmagazine" data={{"path":"/:category?","categories":["programming"],"example":"/smashingmagazine/react","parameters":{"category":"Find in URL or Table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["smashingmagazine.com/category/:category"],"target":"/:category"},"name":"Category","maintainers":["Rjnishant530"],"url":"smashingmagazine.com/articles/","description":"| **Category** | |\n | ------------------ | ------------------ |\n | Accessibility | accessibility |\n | Best practices | best-practices |\n | Business | business |\n | Career | career |\n | Checklists | checklists |\n | CSS | css |\n | Data Visualization | data-visualization |\n | Design | design |\n | Design Patterns | design-patterns |\n | Design Systems | design-systems |\n | E-Commerce | e-commerce |\n | Figma | figma |\n | Freebies | freebies |\n | HTML | html |\n | Illustrator | illustrator |\n | Inspiration | inspiration |\n | JavaScript | javascript |\n | Mobile | mobile |\n | Performance | performance |\n | Privacy | privacy |\n | React | react |\n | Responsive Design | responsive-design |\n | Round-Ups | round-ups |\n | SEO | seo |\n | Typography | typography |\n | Tools | tools |\n | UI | ui |\n | Usability | usability |\n | UX | ux |\n | Vue | vue |\n | Wallpapers | wallpapers |\n | Web Design | web-design |\n | Workflow | workflow |","location":"category.ts"}} /> -## TesterHome {#testerhome} - -### 最新发布 {#testerhome-zui-xin-fa-bu} - -<Route author="xyqfer" example="/testerhome/newest" path="/testerhome/newest" /> - -## ui.dev {#ui-dev} - -### BYTES - Your weekly dose of JS {#ui-dev-bytes-your-weekly-dose-of-js} - -Staying informed on the JavaScript ecosystem has never been so entertaining. Delivered every Monday and Thursday, for free. [https://bytes.dev](https://bytes.dev) - -<Route author="meixger" example="/bytes" path="/bytes" /> - -### React Newsletter {#ui-dev-react-newsletter} - -Stay up to date on the latest React news, tutorials, resources, and more. Delivered every Tuesday, for free. [https://reactnewsletter.com](https://reactnewsletter.com) - -<Route author="meixger" example="/reactnewsletter" path="/reactnewsletter" /> - -## Visual Studio Code Marketplace {#visual-studio-code-marketplace} - -### Visual Studio Code Plugins Marketplace {#visual-studio-code-marketplace-visual-studio-code-plugins-marketplace} - -<Route author="SeanChao" example="/vscode/marketplace" path="/vscode/marketplace/:category?" paramsDesc={['Category']}> - | Featured | Trending Weekly | Trending Monthly | Trending Daily | Most Popular | Recently Added | - | -------- | --------------- | ---------------- | -------------- | ------------ | -------------- | - | featured | trending | trending\_m | trending\_d | popular | new | -</Route> +| **Category** | | +| ------------------ | ------------------ | +| Accessibility | accessibility | +| Best practices | best-practices | +| Business | business | +| Career | career | +| Checklists | checklists | +| CSS | css | +| Data Visualization | data-visualization | +| Design | design | +| Design Patterns | design-patterns | +| Design Systems | design-systems | +| E-Commerce | e-commerce | +| Figma | figma | +| Freebies | freebies | +| HTML | html | +| Illustrator | illustrator | +| Inspiration | inspiration | +| JavaScript | javascript | +| Mobile | mobile | +| Performance | performance | +| Privacy | privacy | +| React | react | +| Responsive Design | responsive-design | +| Round-Ups | round-ups | +| SEO | seo | +| Typography | typography | +| Tools | tools | +| UI | ui | +| Usability | usability | +| UX | ux | +| Vue | vue | +| Wallpapers | wallpapers | +| Web Design | web-design | +| Workflow | workflow | ## 阿里云 {#a-li-yun} -### 数据库内核月报 {#a-li-yun-shu-ju-ku-nei-he-yue-bao} - -<Route author="junbaor" example="/aliyun/database_month" path="/aliyun/database_month" /> - ### 公告 {#a-li-yun-gong-gao} -<Route author="muzea" example="/aliyun/notice" path="/aliyun/notice/:type?"> - | 类型 | type | - | -------- | ---- | - | 全部 | | - | 升级公告 | 1 | - | 安全公告 | 2 | - | 备案公告 | 3 | - | 其他 | 4 | -</Route> +<Route namespace="aliyun" data={{"path":"/notice/:type?","categories":["programming"],"example":"/aliyun/notice","parameters":{"type":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"公告","maintainers":["muzea"],"description":"| 类型 | type |\n | -------- | ---- |\n | 全部 | |\n | 升级公告 | 1 |\n | 安全公告 | 2 |\n | 备案公告 | 3 |\n | 其他 | 4 |","location":"notice.ts"}} /> + +| 类型 | type | +| -------- | ---- | +| 全部 | | +| 升级公告 | 1 | +| 安全公告 | 2 | +| 备案公告 | 3 | +| 其他 | 4 | ### 开发者社区 - 主题 {#a-li-yun-kai-fa-zhe-she-qu-zhu-ti} -<Route author="umm233" example="/aliyun/developer/group/alitech" path="/aliyun/developer/group/:type" paramsDesc={['对应技术领域分类']} notOperational="1" /> +<Route namespace="aliyun" data={{"path":"/developer/group/:type","categories":["programming"],"example":"/aliyun/developer/group/alitech","parameters":{"type":"对应技术领域分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["developer.aliyun.com/group/:type"]},"name":"开发者社区 - 主题","maintainers":["umm233"],"location":"developer/group.ts"}} /> + +### 数据库内核月报 {#a-li-yun-shu-ju-ku-nei-he-yue-bao} + +<Route namespace="aliyun" data={{"path":"/database_month","categories":["programming"],"example":"/aliyun/database_month","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mysql.taobao.org/monthly","mysql.taobao.org/"]},"name":"数据库内核月报","maintainers":["junbaor"],"url":"mysql.taobao.org/monthly","location":"database-month.ts"}} /> ## 安全客 {#an-quan-ke} @@ -807,342 +566,232 @@ Stay up to date on the latest React news, tutorials, resources, and more. Delive ### 分类订阅 {#an-quan-ke-fen-lei-ding-yue} -<Route author="qwertyuiop6" example="/anquanke/week" path="/anquanke/:category/:fulltext?" paramsDesc={['分类订阅', '是否获取全文,如需获取全文参数传入 `quanwen` 或 `fulltext`']} radar="1"> - | 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 | - | ---------------- | -------- | --------- | ---- | ---- | ---- | - | week | activity | knowledge | news | job | tool | -</Route> +<Route namespace="anquanke" data={{"path":"/:category/:fulltext?","categories":["programming"],"example":"/anquanke/week","parameters":{"category":"分类订阅","fulltext":"是否获取全文,如需获取全文参数传入 `quanwen` 或 `fulltext`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类订阅","maintainers":["qwertyuiop6"],"description":"| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 |\n | ---------------- | -------- | --------- | ---- | ---- | ---- |\n | week | activity | knowledge | news | job | tool |","location":"category.ts"}} /> + +| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 | +| ---------------- | -------- | --------- | ---- | ---- | ---- | +| week | activity | knowledge | news | job | tool | ## 安全内参 {#an-quan-nei-can} ### 分类 {#an-quan-nei-can-fen-lei} -<Route author="XinRoom SunBK201" example="/secrss/category/产业趋势" path="/secrss/category/:category?" radar="1" /> +<Route namespace="secrss" data={{"path":"/category/:category?","categories":["programming"],"example":"/secrss/category/产业趋势","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["XinRoom","SunBK201"],"location":"category.ts"}} /> ### 作者 {#an-quan-nei-can-zuo-zhe} -<Route author="XinRoom SunBK201" example="/secrss/author/网络安全威胁和漏洞信息共享平台" path="/secrss/author/:author" radar="1" /> +<Route namespace="secrss" data={{"path":"/author/:author","categories":["programming"],"example":"/secrss/author/网络安全威胁和漏洞信息共享平台","parameters":{"author":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作者","maintainers":["XinRoom","SunBK201"],"location":"author.ts"}} /> ## 北京智源人工智能研究院 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan} -### 智源社区 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-zhi-yuan-she-qu} +### 智源社区 - 评论 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-zhi-yuan-she-qu-ping-lun} -<Route author="TonyRL" example="/baai/hub" path="/baai/hub/:tagId?/:sort?/:range?" paramsDesc={['社群 ID,可在 [社群页](https://hub.baai.ac.cn/taglist) 或 URL 中找到', '分类,见下表,默认为 `new`', '时间跨度,仅在分类 `readCnt` 时有效']} radar="1"> - 分类 - - | 最热 | 最新 | 头条 | - | ---- | ---- | ------- | - | hot | new | readCnt | - - 时间跨度 - - | 3 天 | 7 天 | 30 天 | - | ---- | ---- | ----- | - | 3 | 7 | 30 | -</Route> +<Route namespace="baai" data={{"path":"/hub/comments","categories":["programming"],"example":"/baai/hub/comments","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hub.baai.ac.cn/comments","hub.baai.ac.cn/"]},"name":"智源社区 - 评论","maintainers":["TonyRL"],"url":"hub.baai.ac.cn/comments","location":"comments.ts"}} /> ### 智源社区 - 活动 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-zhi-yuan-she-qu-huo-dong} -<Route author="TonyRL" example="/baai/hub/events" path="/baai/hub/events" radar="1" /> - -### 智源社区 - 评论 {#bei-jing-zhi-yuan-ren-gong-zhi-neng-yan-jiu-yuan-zhi-yuan-she-qu-ping-lun} - -<Route author="TonyRL" example="/baai/hub/comments" path="/baai/hub/comments" radar="1" /> +<Route namespace="baai" data={{"path":"/hub/events","categories":["programming"],"example":"/baai/hub/events","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hub.baai.ac.cn/events","hub.baai.ac.cn/"]},"name":"智源社区 - 活动","maintainers":["TonyRL"],"url":"hub.baai.ac.cn/events","location":"events.ts"}} /> ## 登链社区 {#deng-lian-she-qu} ### 文章 {#deng-lian-she-qu-wen-zhang} -<Route author="running-grass" example="/learnblockchain/posts/DApp/newest" path="/learnblockchain/posts/:cid/:sort?" paramsDesc={['分类id,更多分类可以论坛的URL找到', '排序方式,默认精选']} radar="1"> - | id | 分类 | - | -------- | ------------ | - | all | 全部 | - | DApp | 去中心化应用 | - | chains | 公链 | - | 联盟链 | 联盟链 | - | scaling | Layer2 | - | langs | 编程语言 | - | security | 安全 | - | dst | 存储 | - | basic | 理论研究 | - | other | 其他 | +<Route namespace="learnblockchain" data={{"path":"/posts/:cid/:sort?","categories":["programming"],"example":"/learnblockchain/posts/DApp/newest","parameters":{"cid":"分类id,更多分类可以论坛的URL找到","sort":"排序方式,默认精选"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"文章","maintainers":["running-grass"],"description":"| id | 分类 |\n | -------- | ------------ |\n | all | 全部 |\n | DApp | 去中心化应用 |\n | chains | 公链 |\n | 联盟链 | 联盟链 |\n | scaling | Layer2 |\n | langs | 编程语言 |\n | security | 安全 |\n | dst | 存储 |\n | basic | 理论研究 |\n | other | 其他 |\n\n | id | 排序方式 |\n | -------- | ----------- |\n | newest | 最新 |\n | featured | 精选 (默认) |\n | featured | 最赞 |\n | hottest | 最热 |","location":"posts.ts"}} /> - | id | 排序方式 | - | -------- | ----------- | - | newest | 最新 | - | featured | 精选 (默认) | - | featured | 最赞 | - | hottest | 最热 | -</Route> +| id | 分类 | +| -------- | ------------ | +| all | 全部 | +| DApp | 去中心化应用 | +| chains | 公链 | +| 联盟链 | 联盟链 | +| scaling | Layer2 | +| langs | 编程语言 | +| security | 安全 | +| dst | 存储 | +| basic | 理论研究 | +| other | 其他 | -## 饿了么开放平台 {#e-le-me-kai-fang-ping-tai} - -### 商家开放平台公告 {#e-le-me-kai-fang-ping-tai-shang-jia-kai-fang-ping-tai-gong-gao} - -<Route author="phantomk" example="/eleme/open/announce" path="/eleme/open/announce" /> - -## 极客时间 {#ji-ke-shi-jian} - -### 专栏文章 {#ji-ke-shi-jian-zhuan-lan-wen-zhang} - -<Route author="fengchang" example="/geektime/column/48" path="/geektime/column/:cid" paramsDesc={['专栏 id,可从[全部专栏](https://time.geekbang.org/paid-content)进入专栏介绍页,在 URL 中找到']} /> +| id | 排序方式 | +| -------- | ----------- | +| newest | 最新 | +| featured | 精选 (默认) | +| featured | 最赞 | +| hottest | 最热 | ## 极术社区 {#ji-shu-she-qu} ### 频道、专栏、用户 {#ji-shu-she-qu-pin-dao-zhuan-lan-yong-hu} -<Route author="bigfei" example="/aijishu/channel/ai" path="/aijishu/:type/:name?" paramsDesc={['文章类型,可以取值如下', '名字,取自URL']} radar="1"> - | type | 说明 | - | ------- | ---- | - | channel | 频道 | - | blog | 专栏 | - | u | 用户 | -</Route> +<Route namespace="aijishu" data={{"path":"/:type/:name?","categories":["programming"],"example":"/aijishu/channel/ai","parameters":{"type":"文章类型,可以取值如下","name":"名字,取自URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道、专栏、用户","maintainers":[],"description":"| type | 说明 |\n | ------- | ---- |\n | channel | 频道 |\n | blog | 专栏 |\n | u | 用户 |","location":"index.ts"}} /> -## 技术头条 {#ji-shu-tou-tiao} - -### 最新分享 {#ji-shu-tou-tiao-zui-xin-fen-xiang} - -<Route author="xyqfer" example="/blogread/newest" path="/blogread/newest" /> +| type | 说明 | +| ------- | ---- | +| channel | 频道 | +| blog | 专栏 | +| u | 用户 | ## 掘金 {#jue-jin} -### 分类 {#jue-jin-fen-lei} - -<Route author="DIYgod" example="/juejin/category/frontend" path="/juejin/category/:category" paramsDesc={['分类名']} radar="1"> - | 后端 | 前端 | Android | iOS | 人工智能 | 开发工具 | 代码人生 | 阅读 | - | ------- | -------- | ------- | --- | -------- | -------- | -------- | ------- | - | backend | frontend | android | ios | ai | freebie | career | article | -</Route> - ### 标签 {#jue-jin-biao-qian} -<Route author="isheng5" example="/juejin/tag/JavaScript" path="/juejin/tag/:tag" paramsDesc={['标签名,可在标签 URL 中找到']} radar="1" /> - -### 热门 {#jue-jin-re-men} - -<Route author="moaix" example="/juejin/trending/ios/monthly" path="/juejin/trending/:category/:type" paramsDesc={['分类名', '类型']} radar="1"> - | category | 标签 | - | -------- | -------- | - | android | Android | - | frontend | 前端 | - | ios | iOS | - | backend | 后端 | - | design | 设计 | - | product | 产品 | - | freebie | 工具资源 | - | article | 阅读 | - | ai | 人工智能 | - | devops | 运维 | - | all | 全部 | - - | type | 类型 | - | ---------- | -------- | - | weekly | 本周最热 | - | monthly | 本月最热 | - | historical | 历史最热 | -</Route> - -### 小册 {#jue-jin-xiao-ce} - -<Route author="xyqfer" example="/juejin/books" path="/juejin/books" radar="1" /> - -> 掘金小册需要付费订阅,RSS 仅做更新提醒,不含付费内容. - -### 沸点 {#jue-jin-fei-dian} - -<Route author="xyqfer laampui" example="/juejin/pins/6824710202487472141" path="/juejin/pins/:type?" paramsDesc={['默认为 recommend,见下表']} radar="1"> - | 推荐 | 热门 | 上班摸鱼 | 内推招聘 | 一图胜千言 | 今天学到了 | 每天一道算法题 | 开发工具推荐 | 树洞一下 | - | --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | - | recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 | -</Route> - -### 用户文章 {#jue-jin-yong-hu-wen-zhang} - -<Route author="Maecenas" example="/juejin/posts/3051900006845944" path="/juejin/posts/:id" paramsDesc={['用户 id, 可在用户页 URL 中找到']} radar="1" /> - -### 收藏集 {#jue-jin-shou-cang-ji} - -<Route author="isQ" example="/juejin/collections/1697301682482439" path="/juejin/collections/:userId" paramsDesc={['用户唯一标志符, 在浏览器地址栏URL中能够找到']} radar="1" /> +<Route namespace="juejin" data={{"path":"/tag/:tag","categories":["programming"],"example":"/juejin/tag/JavaScript","parameters":{"tag":"标签名,可在标签 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/tag/:tag"]},"name":"标签","maintainers":["isheng5"],"location":"tag.ts"}} /> ### 单个收藏夹 {#jue-jin-dan-ge-shou-cang-jia} -<Route author="isQ" example="/juejin/collection/6845243180586123271" path="/juejin/collection/:collectionId" paramsDesc={['收藏夹唯一标志符, 在浏览器地址栏URL中能够找到']} radar="1" /> +<Route namespace="juejin" data={{"path":"/collection/:collectionId","categories":["programming"],"example":"/juejin/collection/6845243180586123271","parameters":{"collectionId":"收藏夹唯一标志符, 在浏览器地址栏URL中能够找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/collection/:collectionId"]},"name":"单个收藏夹","maintainers":["isQ"],"location":"collection.ts"}} /> + +### 沸点 {#jue-jin-fei-dian} + +<Route namespace="juejin" data={{"path":"/pins/:type?","categories":["programming"],"example":"/juejin/pins/6824710202487472141","parameters":{"type":"默认为 recommend,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"沸点","maintainers":["xyqfer","laampui"],"description":"| 推荐 | 热门 | 上班摸鱼 | 内推招聘 | 一图胜千言 | 今天学到了 | 每天一道算法题 | 开发工具推荐 | 树洞一下 |\n | --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |\n | recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 |","location":"pins.ts"}} /> + +| 推荐 | 热门 | 上班摸鱼 | 内推招聘 | 一图胜千言 | 今天学到了 | 每天一道算法题 | 开发工具推荐 | 树洞一下 | +| --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 | + +### 分类 {#jue-jin-fen-lei} + +<Route namespace="juejin" data={{"path":"/category/:category","categories":["programming"],"example":"/juejin/category/frontend","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["DIYgod"],"description":"| 后端 | 前端 | Android | iOS | 人工智能 | 开发工具 | 代码人生 | 阅读 |\n | ------- | -------- | ------- | --- | -------- | -------- | -------- | ------- |\n | backend | frontend | android | ios | ai | freebie | career | article |","location":"category.ts"}} /> + +| 后端 | 前端 | Android | iOS | 人工智能 | 开发工具 | 代码人生 | 阅读 | +| ------- | -------- | ------- | --- | -------- | -------- | -------- | ------- | +| backend | frontend | android | ios | ai | freebie | career | article | + +### 热门 {#jue-jin-re-men} + +<Route namespace="juejin" data={{"path":"/trending/:category/:type","categories":["programming"],"example":"/juejin/trending/ios/monthly","parameters":{"category":"分类名","type":"类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热门","maintainers":["moaix"],"description":"| category | 标签 |\n | -------- | -------- |\n | android | Android |\n | frontend | 前端 |\n | ios | iOS |\n | backend | 后端 |\n | design | 设计 |\n | product | 产品 |\n | freebie | 工具资源 |\n | article | 阅读 |\n | ai | 人工智能 |\n | devops | 运维 |\n | all | 全部 |\n\n | type | 类型 |\n | ---------- | -------- |\n | weekly | 本周最热 |\n | monthly | 本月最热 |\n | historical | 历史最热 |","location":"trending.ts"}} /> + +| category | 标签 | +| -------- | -------- | +| android | Android | +| frontend | 前端 | +| ios | iOS | +| backend | 后端 | +| design | 设计 | +| product | 产品 | +| freebie | 工具资源 | +| article | 阅读 | +| ai | 人工智能 | +| devops | 运维 | +| all | 全部 | + +| type | 类型 | +| ---------- | -------- | +| weekly | 本周最热 | +| monthly | 本月最热 | +| historical | 历史最热 | + +### 收藏集 {#jue-jin-shou-cang-ji} + +<Route namespace="juejin" data={{"path":"/collections/:userId","categories":["programming"],"example":"/juejin/collections/1697301682482439","parameters":{"userId":"用户唯一标志符, 在浏览器地址栏URL中能够找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/user/:id","juejin.cn/user/:id/collections"],"target":"/collections/:id"},"name":"收藏集","maintainers":["isQ"],"location":"favorites.ts"}} /> + +### 小册 {#jue-jin-xiao-ce} + +<Route namespace="juejin" data={{"path":"/books","categories":["programming"],"example":"/juejin/books","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/books"]},"name":"小册","maintainers":["xyqfer"],"url":"juejin.cn/books","description":"> 掘金小册需要付费订阅,RSS 仅做更新提醒,不含付费内容.","location":"books.ts"}} /> + +> 掘金小册需要付费订阅,RSS 仅做更新提醒,不含付费内容. + +### 用户文章 {#jue-jin-yong-hu-wen-zhang} + +<Route namespace="juejin" data={{"path":"/posts/:id","categories":["programming"],"example":"/juejin/posts/3051900006845944","parameters":{"id":"用户 id, 可在用户页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/user/:id","juejin.cn/user/:id/posts"]},"name":"用户文章","maintainers":["Maecenas"],"location":"posts.ts"}} /> ### 专栏 {#jue-jin-zhuan-lan} -<Route author="xiangzy1" example="/juejin/column/6960559453037199391" path="/juejin/column/:id" paramsDesc={['专栏 id, 可在专栏页 URL 中找到']} radar="1" /> +<Route namespace="juejin" data={{"path":"/column/:id","categories":["programming"],"example":"/juejin/column/6960559453037199391","parameters":{"id":"专栏 id, 可在专栏页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["juejin.cn/column/:id"]},"name":"专栏","maintainers":["xiangzy1"],"location":"column.ts"}} /> ## 开源中国 {#kai-yuan-zhong-guo} -### 资讯 {#kai-yuan-zhong-guo-zi-xun} +### 数字型账号用户博客 {#kai-yuan-zhong-guo-shu-zi-xing-zhang-hao-yong-hu-bo-ke} -<Route author="tgly307 zengxs" example="/oschina/news/project" path="/oschina/news/:category?" paramsDesc={['板块名']} radar="1"> - | [综合资讯][osc_gen] | [软件更新资讯][osc_proj] | [行业资讯][osc_ind] | [编程语言资讯][osc_pl] | - | ------------------- | ------------------------ | ------------------- | ---------------------- | - | industry | project | industry-news | programming | - - 订阅 [全部板块资讯][osc_all] 可以使用 [https://rsshub.app/oschina/news](https://rsshub.app/oschina/news) - - [osc_all]: https://www.oschina.net/news "开源中国 - 全部资讯" - - [osc_gen]: https://www.oschina.net/news/industry "开源中国 - 综合资讯" - - [osc_proj]: https://www.oschina.net/news/project "开源中国 - 软件更新资讯" - - [osc_ind]: https://www.oschina.net/news/industry-news "开源中国 - 行业资讯" - - [osc_pl]: https://www.oschina.net/news/programming "开源中国 - 编程语言资讯" -</Route> - -### 用户博客 {#kai-yuan-zhong-guo-yong-hu-bo-ke} - -<Route author="dxmpalb" example="/oschina/user/lenve" path="/oschina/user/:id" paramsDesc={['用户 id,可通过查看用户博客网址得到,如果博客以 u/数字结尾,使用下一条路由']} radar="1" /> +<Route namespace="oschina" data={{"path":["/u/:uid","/user/:id"],"categories":["programming"],"example":"/oschina/u/3920392","parameters":{"uid":"用户 id,可通过查看用户博客网址得到,以 u/数字结尾,数字即为 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["my.oschina.net/u/:uid"]},"name":"数字型账号用户博客","maintainers":[],"location":"user.ts"}} /> ### 数字型账号用户博客 {#kai-yuan-zhong-guo-shu-zi-xing-zhang-hao-yong-hu-bo-ke} -<Route author="dxmpalb" example="/oschina/u/3920392" path="/oschina/u/:uid" paramsDesc={['用户 id,可通过查看用户博客网址得到,以 u/数字结尾,数字即为 id']} radar="1" /> +<Route namespace="oschina" data={{"path":["/u/:uid","/user/:id"],"categories":["programming"],"example":"/oschina/u/3920392","parameters":{"uid":"用户 id,可通过查看用户博客网址得到,以 u/数字结尾,数字即为 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["my.oschina.net/u/:uid"]},"name":"数字型账号用户博客","maintainers":[],"location":"user.ts"}} /> ### 问答主题 {#kai-yuan-zhong-guo-wen-da-zhu-ti} -<Route author="loveely7" example="/oschina/topic/weekly-news" path="/oschina/topic/:topic" paramsDesc={['主题名,可从 [全部主题](https://www.oschina.net/question/topics) 进入主题页,在 URL 中找到']} radar="1" /> +<Route namespace="oschina" data={{"path":"/topic/:topic","categories":["programming"],"example":"/oschina/topic/weekly-news","parameters":{"topic":"主题名,可从 [全部主题](https://www.oschina.net/question/topics) 进入主题页,在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["oschina.net/question/topic/:topic"]},"name":"问答主题","maintainers":["loveely7"],"location":"topic.ts"}} /> -## 拉勾网 {#la-gou-wang} +### 资讯 {#kai-yuan-zhong-guo-zi-xun} -:::tip -拉勾网官方提供职位的[邮件订阅](https://www.lagou.com/s/subscribe.html),请根据自身需要选择使用。 -::: +<Route namespace="oschina" data={{"path":"/news/:category?","categories":["programming"],"example":"/oschina/news/project","parameters":{"category":"板块名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["oschina.net/news/:category"],"target":"/news/:category"},"name":"资讯","maintainers":["tgly307","zengxs"],"description":"| [综合资讯][osc_gen] | [软件更新资讯][osc_proj] | [行业资讯][osc_ind] | [编程语言资讯][osc_pl] |\n | ------------------- | ------------------------ | ------------------- | ---------------------- |\n | industry | project | industry-news | programming |\n\n 订阅 [全部板块资讯][osc_all] 可以使用 [https://rsshub.app/oschina/news](https://rsshub.app/oschina/news)\n\n [osc_all]: https://www.oschina.net/news \"开源中国 - 全部资讯\"\n\n [osc_gen]: https://www.oschina.net/news/industry \"开源中国 - 综合资讯\"\n\n [osc_proj]: https://www.oschina.net/news/project \"开源中国 - 软件更新资讯\"\n\n [osc_ind]: https://www.oschina.net/news/industry-news \"开源中国 - 行业资讯\"\n\n [osc_pl]: https://www.oschina.net/news/programming \"开源中国 - 编程语言资讯\"","location":"news.ts"}} /> -### 职位招聘 {#la-gou-wang-zhi-wei-zhao-pin} +| [综合资讯][osc_gen] | [软件更新资讯][osc_proj] | [行业资讯][osc_ind] | [编程语言资讯][osc_pl] | +| ------------------- | ------------------------ | ------------------- | ---------------------- | +| industry | project | industry-news | programming | -<Route author="hoilc" example="/lagou/jobs/JavaScript/上海" path="/lagou/jobs/:position/:city" paramsDesc={['职位名,可以参考[拉勾网首页](https://www.lagou.com)的职位列表', '城市名,请参考[拉勾网支持的全部城市](https://www.lagou.com/jobs/allCity.html)']} anticrawler="1" /> +订阅 [全部板块资讯][osc_all] 可以使用 [https://rsshub.app/oschina/news](https://rsshub.app/oschina/news) + +[osc_all]: https://www.oschina.net/news "开源中国 - 全部资讯" + +[osc_gen]: https://www.oschina.net/news/industry "开源中国 - 综合资讯" + +[osc_proj]: https://www.oschina.net/news/project "开源中国 - 软件更新资讯" + +[osc_ind]: https://www.oschina.net/news/industry-news "开源中国 - 行业资讯" + +[osc_pl]: https://www.oschina.net/news/programming "开源中国 - 编程语言资讯" ## 蓝桥云课 {#lan-qiao-yun-ke} +### 技术社区 {#lan-qiao-yun-ke-ji-shu-she-qu} + +<Route namespace="lanqiao" data={{"path":"/questions/:id","categories":["programming"],"example":"/lanqiao/questions/2","parameters":{"id":"topic_id 主题 `id` 可在社区板块 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lanqiao.cn/questions/","lanqiao.cn/questions/topics/:id"]},"name":"技术社区","maintainers":["huhuhang"],"url":"lanqiao.cn/questions/","location":"questions.ts"}} /> + ### 全站发布的课程 {#lan-qiao-yun-ke-quan-zhan-fa-bu-de-ke-cheng} -<Route author="huhuhang" example="/lanqiao/courses/latest/all" path="/lanqiao/courses/:sort/:tag" paramsDesc={['排序规则 sort, 默认(`default`)、最新(`latest`)、最热(`hotest`)', '课程标签 `tag`,可在该页面找到:https://www.lanqiao.cn/courses/']} radar="1" anticrawler="1" /> +<Route namespace="lanqiao" data={{"path":"/courses/:sort/:tag","categories":["programming"],"example":"/lanqiao/courses/latest/all","parameters":{"sort":"排序规则 sort, 默认(`default`)、最新(`latest`)、最热(`hotest`)","tag":"课程标签 `tag`,可在该页面找到:https://www.lanqiao.cn/courses/"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"全站发布的课程","maintainers":["huhuhang"],"location":"courses.ts"}} /> ### 作者发布的课程 {#lan-qiao-yun-ke-zuo-zhe-fa-bu-de-ke-cheng} -<Route author="huhuhang" example="/lanqiao/author/1701267" path="/lanqiao/author/:uid" paramsDesc={['作者 `uid` 可在作者主页 URL 中找到']} radar="1" /> - -### 技术社区 {#lan-qiao-yun-ke-ji-shu-she-qu} - -<Route author="huhuhang" example="/lanqiao/questions/2" path="/lanqiao/questions/:id" paramsDesc={['topic_id 主题 `id` 可在社区板块 URL 中找到']} radar="1" anticrawler="1" /> +<Route namespace="lanqiao" data={{"path":"/author/:uid","categories":["programming"],"example":"/lanqiao/author/1701267","parameters":{"uid":"作者 `uid` 可在作者主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lanqiao.cn/users/:uid"]},"name":"作者发布的课程","maintainers":["huhuhang"],"location":"author.ts"}} /> ## 洛谷 {#luo-gu} -### 日报 {#luo-gu-ri-bao} - -<Route author="LogicJake prnake nczitzk" example="/luogu/daily" path="/luogu/daily/:id?" paramsDesc={['年度日报所在帖子 id,可在 URL 中找到,不填默认为 `47327`']} radar="1" notOperational="1" /> - ### 比赛列表 {#luo-gu-bi-sai-lie-biao} -<Route author="prnake" example="/luogu/contest" path="/luogu/contest" radar="1" /> +<Route namespace="luogu" data={{"path":"/contest","categories":["programming"],"example":"/luogu/contest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["luogu.com.cn/contest/list","luogu.com.cn/"]},"name":"比赛列表","maintainers":["prnake"],"url":"luogu.com.cn/contest/list","location":"contest.ts"}} /> -### 用户动态 {#luo-gu-yong-hu-dong-tai} +### 日报 {#luo-gu-ri-bao} -<Route author="solstice23" example="/luogu/user/feed/1" path="/luogu/user/feed/:uid" paramsDesc={['用户 UID']} radar="1" /> +<Route namespace="luogu" data={{"path":"/daily/:id?","categories":["programming"],"example":"/luogu/daily","parameters":{"id":"年度日报所在帖子 id,可在 URL 中找到,不填默认为 `47327`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["luogu.com.cn/discuss/47327","luogu.com.cn/"],"target":"/daily"},"name":"日报","maintainers":["LogicJake ","prnake ","nczitzk"],"url":"luogu.com.cn/discuss/47327","location":"daily.ts"}} /> ### 用户博客 {#luo-gu-yong-hu-bo-ke} -<Route author="ftiasch" example="/luogu/user/blog/ftiasch" path="/luogu/user/blog/:name" paramsDesc={['博客名称']} radar="1" /> +<Route namespace="luogu" data={{"path":"/user/blog/:name","categories":["programming"],"example":"/luogu/user/blog/ftiasch","parameters":{"name":"博客名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["luogu.com.cn/blog/:name"]},"name":"用户博客","maintainers":[],"location":"user-blog.ts"}} /> -## 美团开放平台 {#mei-tuan-kai-fang-ping-tai} +### 用户动态 {#luo-gu-yong-hu-dong-tai} -### 美团开放平台公告 {#mei-tuan-kai-fang-ping-tai-mei-tuan-kai-fang-ping-tai-gong-gao} - -<Route author="youzipi" example="/meituan/open/announce" path="/meituan/open/announce" notOperational="1" /> +<Route namespace="luogu" data={{"path":"/user/feed/:uid","categories":["programming"],"example":"/luogu/user/feed/1","parameters":{"uid":"用户 UID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["luogu.com.cn/user/:uid"]},"name":"用户动态","maintainers":["solstice23"],"location":"user-feed.ts"}} /> ## 墨天轮 {#mo-tian-lun} ### 合辑 {#mo-tian-lun-he-ji} -<Route author="yueneiqi" example="/modb/topic/44158" path="/modb/topic/:id" paramsDesc={['合辑序号']} radar="1" /> - -## 平安银河实验室 {#ping-an-yin-he-shi-yan-shi} - -### posts {#ping-an-yin-he-shi-yan-shi-posts} - -<Route author="hellodword" example="/galaxylab" path="/galaxylab" /> +<Route namespace="modb" data={{"path":"/topic/:id","categories":["programming"],"example":"/modb/topic/44158","parameters":{"id":"合辑序号"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"合辑","maintainers":["yueneiqi"],"location":"topic.ts"}} /> ## 前端早早聊 {#qian-duan-zao-zao-liao} ### 文章 {#qian-duan-zao-zao-liao-wen-zhang} -<Route author="shaomingbo" example="/zaozao/article/quality" path="/zaozao/article/:type?" paramsDesc={['文章分类']} radar="1"> - | 精品推荐 | 技术干货 | 职场成长 | 社区动态 | 组件物料 | 行业动态 | - | --------- | -------- | -------- | --------- | -------- | -------- | - | recommend | quality | growth | community | material | industry | -</Route> +<Route namespace="zaozao" data={{"path":"/article/:type?","categories":["programming"],"example":"/zaozao/article/quality","parameters":{"type":"文章分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zaozao.run/article/:type"],"target":"/article/:type"},"name":"文章","maintainers":["shaomingbo"],"description":"| 精品推荐 | 技术干货 | 职场成长 | 社区动态 | 组件物料 | 行业动态 |\n | --------- | -------- | -------- | --------- | -------- | -------- |\n | recommend | quality | growth | community | material | industry |","location":"article.ts"}} /> -## 微信开放平台 {#wei-xin-kai-fang-ping-tai} - -### 微信开放社区 - 小程序公告 {#wei-xin-kai-fang-ping-tai-wei-xin-kai-fang-she-qu-xiao-cheng-xu-gong-gao} - -<Route author="phantomk" example="/wechat-open/community/xcx-announce" path="/wechat-open/community/xcx-announce" /> - -### 微信开放社区 - 小游戏公告 {#wei-xin-kai-fang-ping-tai-wei-xin-kai-fang-she-qu-xiao-you-xi-gong-gao} - -<Route author="phantomk" example="/wechat-open/community/xyx-announce" path="/wechat-open/community/xyx-announce" /> - -### 微信开放社区 - 微信支付公告 {#wei-xin-kai-fang-ping-tai-wei-xin-kai-fang-she-qu-wei-xin-zhi-fu-gong-gao} - -<Route author="phantomk" example="/wechat-open/community/pay-announce" path="/wechat-open/community/pay-announce" /> - -### 微信开放社区 - 小游戏问答 {#wei-xin-kai-fang-ping-tai-wei-xin-kai-fang-she-qu-xiao-you-xi-wen-da} - -<Route author="bestony" example="/wechat-open/community/xyx-question/0" path="/wechat-open/community/xyx-question/:category" paramsDesc={['0', 'hot', 'topic']}> - | 全部 | 游戏引擎 | 规则 | 账号 | 运营 | 游戏审核 | API 和组件 | 框架 | 管理后台 | 开发者工具 | 客户端 | 插件 | 云开发 | 教程反馈 | 其他 | - | ---- | -------- | ---- | ----- | ---- | -------- | ---------- | ---- | -------- | ---------- | ------ | ---- | ------ | -------- | ---- | - | 0 | 4096 | 8192 | 16384 | 2048 | 1 | 2 | 64 | 4 | 8 | 16 | 256 | 1024 | 128 | 32 | -</Route> - -### 微信开放社区 - 小程序问答 {#wei-xin-kai-fang-ping-tai-wei-xin-kai-fang-she-qu-xiao-cheng-xu-wen-da} - -<Route author="bestony" example="/wechat-open/community/xcx-question/new" path="/wechat-open/community/xcx-question/:tag" paramsDesc={['new', 'hot', 'topic']}> - | 最新 | 最热 | 热门话题 | - | ---- | ---- | -------- | - | new | hot | topic | -</Route> - -### 微信支付 - 商户平台公告 {#wei-xin-kai-fang-ping-tai-wei-xin-zhi-fu-shang-hu-ping-tai-gong-gao} - -<Route author="phantomk" example="/wechat-open/pay/announce" path="/wechat-open/pay/announce" /> +| 精品推荐 | 技术干货 | 职场成长 | 社区动态 | 组件物料 | 行业动态 | +| --------- | -------- | -------- | --------- | -------- | -------- | +| recommend | quality | growth | community | material | industry | ## 微信小程序 {#wei-xin-xiao-cheng-xu} +:::tip +公众号直接抓取困难,故目前提供几种间接抓取方案,请自行选择 +::: + ### 公众平台系统公告栏目 {#wei-xin-xiao-cheng-xu-gong-zhong-ping-tai-xi-tong-gong-gao-lan-mu} -<Route author="xyqfer" example="/wechat/announce" path="/wechat/announce" /> - -### 基础库更新日志 {#wei-xin-xiao-cheng-xu-ji-chu-ku-geng-xin-ri-zhi} - -<Route author="magicLaLa nczitzk" example="/weixin/miniprogram/framework" path="/weixin/miniprogram/framework" /> - -### 开发者工具更新日志 {#wei-xin-xiao-cheng-xu-kai-fa-zhe-gong-ju-geng-xin-ri-zhi} - -<Route author="nczitzk" example="/weixin/miniprogram/devtools" path="/weixin/miniprogram/devtools" /> - -### 小程序插件 {#wei-xin-xiao-cheng-xu-xiao-cheng-xu-cha-jian} - -<Route author="xyqfer" example="/wechat/miniprogram/plugins" path="/wechat/miniprogram/plugins" notOperational="1" /> - -### 云开发更新日志 {#wei-xin-xiao-cheng-xu-yun-kai-fa-geng-xin-ri-zhi} - -<Route author="nczitzk" example="/weixin/miniprogram/wxcloud/cloud-sdk" path="/weixin/miniprogram/wxcloud/:caty?" paramsDesc={['日志分类']}> - | 小程序基础库更新日志(云开发部分) | IDE 云开发 & 云控制台更新日志 | wx-server-sdk 更新日志 | - | ---------------------------------- | ----------------------------- | ---------------------- | - | cloud-sdk | ide | server-sdk | -</Route> +<Route namespace="wechat" data={{"path":"/announce","categories":["programming"],"example":"/wechat/announce","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mp.weixin.qq.com/cgi-bin/announce"]},"name":"公众平台系统公告栏目","maintainers":["xyqfer"],"url":"mp.weixin.qq.com/cgi-bin/announce","location":"announce.ts"}} /> ## 印记中文 {#yin-ji-zhong-wen} -### 周刊 - JavaScript {#yin-ji-zhong-wen-zhou-kan-javascript} +### Unknown {#yin-ji-zhong-wen-unknown} -<Route author="hestudy" example="/docschina/weekly" path="/docschina/weekly/:category?" paramsDesc={['周刊分类,见下表,默认为js']}> - | javascript | node | react | - | ---------- | ---- | ----- | - | js | node | react | -</Route> +<Route namespace="docschina" data={{"path":"/weekly/:category?","categories":["programming"],"example":"/docschina/weekly","parameters":{"category":"周刊分类,见下表,默认为js"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["daijinru","hestudy"],"location":"weekly.ts"}} /> diff --git a/website/docs/routes/reading.mdx b/website/docs/routes/reading.mdx index 0a9257d71..34f38746d 100644 --- a/website/docs/routes/reading.mdx +++ b/website/docs/routes/reading.mdx @@ -1,426 +1,233 @@ -# 📚 Reading - -## All Poetry {#all-poetry} - -### Poems {#all-poetry-poems} - -<Route author="HenryQW" example="/allpoetry/newest" path="/allpoetry/:order?" paramsDesc={['Ordering, `best` or `newest`, `best` by default']} /> - -## Free Computer Books {#free-computer-books} - -### Selected New Books {#free-computer-books-selected-new-books} - -<Route author="cubroe" example="/freecomputerbooks" path="/freecomputerbooks" radar="1" /> - -### Current Book List {#free-computer-books-current-book-list} - -<Route author="cubroe" example="/freecomputerbooks/compscAlgorithmBooks" path="/freecomputerbooks/:category" paramsDesc={['A category id., which should be the HTML file name (but **without** the `.html` suffix) in the URL path of a book list page.']} radar="1" /> +# reading ## hameln {#hameln} ### chapter {#hameln-chapter} -<Route author="huangliangshusheng" example="/hameln/chapter/264928" path="/hameln/chapter/:id" paramsDesc={['Novel id, can be found in URL']}> - Eg: [https://syosetu.org/novel/264928](https://syosetu.org/novel/264928) -</Route> +<Route namespace="hameln" data={{"path":"/chapter/:id","categories":["reading"],"example":"/hameln/chapter/264928","parameters":{"id":"Novel id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["syosetu.org/novel/:id"]},"name":"chapter","maintainers":["huangliangshusheng"],"description":"Eg: [https://syosetu.org/novel/264928](https://syosetu.org/novel/264928)","location":"chapter.ts"}} /> + +Eg: [https://syosetu.org/novel/264928](https://syosetu.org/novel/264928) ## Inoreader {#inoreader} -### HTML Clip {#inoreader-html-clip} - -<Route author="BeautyyuYanli" example="/inoreader/html_clip/1006346356/News?limit=3" path="/html_clip/:user/:tag" paramsDesc={['user id, the interger after user/ in the example URL','tag, the string after tag/ in the example URL']}> - Use common query parameter `limit=n` to limit the number of articles, default to 20 - - Eg: [https://www.inoreader.com/stream/user/1006346356/tag/News/view/html?limit=3](https://www.inoreader.com/stream/user/1006346356/tag/News/view/html?limit=3) -</Route> - ### RSS {#inoreader-rss} -<Route author="EthanWng97" example="/inoreader/rss/1005137674/user-favorites" path="/inoreader/rss/:user/:tag" paramsDesc={['user id, the interger after user/ in the example URL','tag, the string after tag/ in the example URL']} /> +<Route namespace="inoreader" data={{"path":"/rss/:user/:tag","categories":["reading"],"example":"/inoreader/rss/1005137674/user-favorites","parameters":{"user":"user id, the interger after user/ in the example URL","tag":"tag, the string after tag/ in the example URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"RSS","maintainers":["EthanWng97"],"location":"rss.ts"}} /> ## Literotica {#literotica} ### New Stories {#literotica-new-stories} -<Route author="nczitzk" example="/literotica/new" path="/literotica/new" /> - -### Category {#literotica-category} - -<Route author="nczitzk" example="/literotica/category/anal-sex-stories" path="/literotica/category/:category?" paramsDesc={['Category, can be found in URL']} /> +<Route namespace="literotica" data={{"path":"/new","categories":["reading"],"example":"/literotica/new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["literotica.com/"]},"name":"New Stories","maintainers":["nczitzk"],"url":"literotica.com/","location":"new.ts"}} /> ## MagazineLib {#magazinelib} ### Latest Magazine {#magazinelib-latest-magazine} -<Route author="EthanWng97" example="/magazinelib/latest-magazine/new+yorker" path="/magazinelib/latest-magazine/:query?" paramsDesc={['query, search page querystring']} notOperational="1"> - For instance, when doing search at [https://magazinelib.com](https://magazinelib.com) and you get url `https://magazinelib.com/?s=new+yorker`, the query is `new+yorker` -</Route> +<Route namespace="magazinelib" data={{"path":"/latest-magazine/:query?","categories":["reading"],"example":"/magazinelib/latest-magazine/new+yorker","parameters":{"query":"query, search page querystring"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Latest Magazine","maintainers":["EthanWng97"],"description":"For instance, when doing search at [https://magazinelib.com](https://magazinelib.com) and you get url `https://magazinelib.com/?s=new+yorker`, the query is `new+yorker`","location":"latest-magazine.ts"}} /> + +For instance, when doing search at [https://magazinelib.com](https://magazinelib.com) and you get url `https://magazinelib.com/?s=new+yorker`, the query is `new+yorker` ## Penguin Random House {#penguin-random-house} -### Book Lists {#penguin-random-house-book-lists} - -<Route author="StevenRCE0" example="/penguin-random-house/the-read-down" path="/penguin-random-house/the-read-down" /> - ### Articles {#penguin-random-house-articles} -<Route author="StevenRCE0" example="/penguin-random-house/articles" path="/penguin-random-house/articles" /> +<Route namespace="penguin-random-house" data={{"path":"/articles","categories":["reading"],"example":"/penguin-random-house/articles","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["penguinrandomhouse.com/articles"]},"name":"Articles","maintainers":["StevenRCE0"],"url":"penguinrandomhouse.com/articles","location":"articles.ts"}} /> + +### Book Lists {#penguin-random-house-book-lists} + +<Route namespace="penguin-random-house" data={{"path":"/the-read-down","categories":["reading"],"example":"/penguin-random-house/the-read-down","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["penguinrandomhouse.com/the-read-down"]},"name":"Book Lists","maintainers":["StevenRCE0"],"url":"penguinrandomhouse.com/the-read-down","location":"thereaddown.ts"}} /> ## SF 轻小说 {#sf-qing-xiao-shuo} ### 章节 {#sf-qing-xiao-shuo-zhang-jie} -<Route author="keocheung" example="/sfacg/novel/chapter/672431" path="/sfacg/novel/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} radar="1" /> +<Route namespace="sfacg" data={{"path":"/novel/chapter/:id","categories":["reading"],"example":"/sfacg/novel/chapter/672431","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["book.sfacg.com/Novel/:id/*"]},"name":"章节","maintainers":["keocheung"],"location":"novel-chapter.ts"}} /> ## SoBooks {#sobooks} -### 首页 {#sobooks-shou-ye} - -<Route author="nczitzk" example="/sobooks" path="/sobooks/:category?" paramsDesc={['分类, 见下表']}> - | 分类 | 分类名 | - | -------- | ---------------- | - | 小说文学 | xiaoshuowenxue | - | 历史传记 | lishizhuanji | - | 人文社科 | renwensheke | - | 励志成功 | lizhichenggong | - | 经济管理 | jingjiguanli | - | 学习教育 | xuexijiaoyu | - | 生活时尚 | shenghuoshishang | - | 英文原版 | yingwenyuanban | -</Route> - ### 标签 {#sobooks-biao-qian} -<Route author="nczitzk" example="/sobooks/tag/小说" path="/sobooks/tag/:id?" paramsDesc={['标签, 见下表,默认为小说']}> - 热门标签 +<Route namespace="sobooks" data={{"path":"/tag/:id?","categories":["reading"],"example":"/sobooks/tag/小说","parameters":{"id":"标签, 见下表,默认为小说"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sobooks.net/books/tag/:tag"],"target":"/tag/:tag"},"name":"标签","maintainers":["nczitzk"],"description":"热门标签\n\n | 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ |\n | 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 |\n | 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 |\n | 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 |\n | 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 |\n | 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 |","location":"tag.ts"}} /> - | 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | - | 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 | - | 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 | - | 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 | - | 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 | - | 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 | -</Route> +热门标签 + +| 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | +| 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 | +| 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 | +| 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 | +| 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 | +| 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 | ### 归档 {#sobooks-gui-dang} -<Route author="nczitzk" example="/sobooks/date/2020-11" path="/sobooks/date/:date?" paramsDesc={['日期,见例子,默认为当前年月']} /> +<Route namespace="sobooks" data={{"path":"/date/:date?","categories":["reading"],"example":"/sobooks/date/2020-11","parameters":{"date":"日期,见例子,默认为当前年月"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sobooks.net/:category"],"target":"/:category"},"name":"归档","maintainers":["nczitzk"],"location":"date.ts"}} /> + +### 首页 {#sobooks-shou-ye} + +<Route namespace="sobooks" data={{"path":"/:category?","categories":["reading"],"example":"/sobooks","parameters":{"category":"分类, 见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sobooks.net/:category"],"target":"/:category"},"name":"首页","maintainers":["nczitzk"],"description":"| 分类 | 分类名 |\n | -------- | ---------------- |\n | 小说文学 | xiaoshuowenxue |\n | 历史传记 | lishizhuanji |\n | 人文社科 | renwensheke |\n | 励志成功 | lizhichenggong |\n | 经济管理 | jingjiguanli |\n | 学习教育 | xuexijiaoyu |\n | 生活时尚 | shenghuoshishang |\n | 英文原版 | yingwenyuanban |","location":"index.ts"}} /> + +| 分类 | 分类名 | +| -------- | ---------------- | +| 小说文学 | xiaoshuowenxue | +| 历史传记 | lishizhuanji | +| 人文社科 | renwensheke | +| 励志成功 | lizhichenggong | +| 经济管理 | jingjiguanli | +| 学习教育 | xuexijiaoyu | +| 生活时尚 | shenghuoshishang | +| 英文原版 | yingwenyuanban | ## syosetu {#syosetu} ### chapter {#syosetu-chapter} -<Route author="huangliangshusheng" example="/syosetu/chapter/n1976ey" path="/syosetu/chapter/:id" paramsDesc={['Novel id, can be found in URL']}> - Eg: `https://ncode.syosetu.com/n1976ey/` -</Route> +<Route namespace="syosetu" data={{"path":"/chapter/:id","categories":["reading"],"example":"/syosetu/chapter/n1976ey","parameters":{"id":"Novel id, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["novel18.syosetu.com/:id"]},"name":"chapter","maintainers":["huangliangshusheng"],"description":"Eg: `https://ncode.syosetu.com/n1976ey/`","location":"chapter.ts"}} /> -## UU 看书 {#uu-kan-shu} - -### 小说更新 {#uu-kan-shu-xiao-shuo-geng-xin} - -<Route author="jacky2001114" example="/novel/uukanshu/49621" path="/novel/uukanshu/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} /> +Eg: `https://ncode.syosetu.com/n1976ey/` ## 爱思想 {#ai-si-xiang} ### 栏目 {#ai-si-xiang-lan-mu} -<Route author="HenryQW nczitzk" example="/aisixiang/column/722" path="/aisixiang/column/:id" paramsDesc={['栏目 ID, 可在对应栏目 URL 中找到']} /> - -### 专题 {#ai-si-xiang-zhuan-ti} - -<Route author="nczitzk" example="/aisixiang/zhuanti/211" path="/aisixiang/zhuanti/:id" paramsDesc={['专题 ID, 可在对应专题 URL 中找到']}> - :::tip - 更多专题请见 [关键词](http://www.aisixiang.com/zhuanti/) - ::: -</Route> - -### 排行 {#ai-si-xiang-pai-hang} - -<Route author="HenryQW nczitzk" example="/aisixiang/toplist/1/7" path="/aisixiang/toplist/:id?/:period?" paramsDesc={['类型', '范围, 仅适用于点击排行榜, 可选一天(1),一周(7),一月(30),所有(-1),默认为一天']}> - | 文章点击排行 | 最近更新文章 | 文章推荐排行 | - | ------------ | ------------ | ------------ | - | 1 | 10 | 11 | -</Route> +<Route namespace="aisixiang" data={{"path":"/column/:id","categories":["reading"],"example":"/aisixiang/column/722","parameters":{"id":"栏目 ID, 可在对应栏目 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["HenryQW","nczitzk"],"location":"column.ts"}} /> ### 思想库(专栏) {#ai-si-xiang-si-xiang-ku-zhuan-lan} -<Route author="hoilc nczitzk" example="/aisixiang/thinktank/WuQine/论文" path="/aisixiang/thinktank/:id/:type?" paramsDesc={['专栏 ID,一般为作者拼音,可在URL中找到', '栏目类型,参考下表,默认为全部']}> - | 论文 | 时评 | 随笔 | 演讲 | 访谈 | 著作 | 读书 | 史论 | 译作 | 诗歌 | 书信 | 科学 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -</Route> +<Route namespace="aisixiang" data={{"path":"/thinktank/:id/:type?","categories":["reading"],"example":"/aisixiang/thinktank/WuQine/论文","parameters":{"id":"专栏 ID,一般为作者拼音,可在URL中找到","type":"栏目类型,参考下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"思想库(专栏)","maintainers":["hoilc","nczitzk"],"description":"| 论文 | 时评 | 随笔 | 演讲 | 访谈 | 著作 | 读书 | 史论 | 译作 | 诗歌 | 书信 | 科学 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |","location":"thinktank.ts"}} /> -## 笔趣阁 {#bi-qu-ge} +| 论文 | 时评 | 随笔 | 演讲 | 访谈 | 著作 | 读书 | 史论 | 译作 | 诗歌 | 书信 | 科学 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + +### 专题 {#ai-si-xiang-zhuan-ti} + +<Route namespace="aisixiang" data={{"path":"/zhuanti/:id","categories":["reading"],"example":"/aisixiang/zhuanti/211","parameters":{"id":"专题 ID, 可在对应专题 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专题","maintainers":["nczitzk"],"description":":::tip\n 更多专题请见 [关键词](http://www.aisixiang.com/zhuanti/)\n :::","location":"zhuanti.ts"}} /> :::tip -此处的 **笔趣阁** 指网络上使用和 **笔趣阁** 样式相似模板的小说阅读网站,包括但不限于下方列举的网址。 +更多专题请见 [关键词](http://www.aisixiang.com/zhuanti/) ::: -| 网址 | 名称 | -| ---------------------------------------------------- | ---------- | -| [https://www.xbiquwx.la](https://www.xbiquwx.la) | 笔尖中文 | -| [http://www.biqu5200.net](http://www.biqu5200.net) | 笔趣阁 | -| [https://www.xbiquge.so](https://www.xbiquge.so) | 笔趣阁 | -| [https://www.biqugeu.net](https://www.biqugeu.net) | 顶点小说网 | -| [http://www.b520.cc](http://www.b520.cc) | 笔趣阁 | -| [https://www.ahfgb.com](https://www.ahfgb.com) | 笔趣鸽 | -| [https://www.ibiquge.la](https://www.ibiquge.la) | 香书小说 | -| [https://www.biquge.tv](https://www.biquge.tv) | 笔趣阁 | -| [https://www.bswtan.com](https://www.bswtan.com) | 笔书网 | -| [https://www.biquge.co](https://www.biquge.co) | 笔趣阁 | -| [https://www.bqzhh.com](https://www.bqzhh.com) | 笔趣阁 | -| [http://www.biqugse.com](http://www.biqugse.com) | 笔趣阁 | -| [https://www.ibiquge.info](https://www.ibiquge.info) | 爱笔楼 | -| [https://www.ishuquge.com](https://www.ishuquge.com) | 书趣阁 | -| [https://www.mayiwxw.com](https://www.mayiwxw.com) | 蚂蚁文学 | - -### 小说 {#bi-qu-ge-xiao-shuo} - -<Route author="nczitzk" example="/biquge/http://www.biqu5200.net/0_7/" path="/biquge/:url" paramsDesc={['小说 Url,即对应小说详情页的 Url,可在地址栏中找到']} anticrawler="1" radar="1"> - :::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 - 上方列举的网址可能部分不可用,这取决于该网站的维护者是否持续运营网站。请选择可以正常访问的网址,获取更新的前提是该网站可以正常访问。 - ::: -</Route> - ## 超星 {#chao-xing} ### 期刊 {#chao-xing-qi-kan} -<Route author="nczitzk" example="/chaoxing/qk/6b5c39b3dd84352be512e29df0297437" path="/chaoxing/qk/:id/:needContent?" paramsDesc={['期刊 id,可在期刊页 URL 中找到', '需要获取文章全文,填写 true/yes 表示需要,默认需要']} anticrawler="1" radar="1"> - :::tip - 全部期刊可以在 [这里](http://qk.chaoxing.com/space/index) 找到,你也可以从 [学科分类](https://qikan.chaoxing.com/jourclassify) 和 [期刊导航](https://qikan.chaoxing.com/search/openmag) 中发现更多期刊。 +<Route namespace="chaoxing" data={{"path":"/qk/:id/:needContent?","categories":["reading"],"example":"/chaoxing/qk/6b5c39b3dd84352be512e29df0297437","parameters":{"id":"期刊 id,可在期刊页 URL 中找到","needContent":"需要获取文章全文,填写 true/yes 表示需要,默认需要"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"期刊","maintainers":["nczitzk"],"description":":::tip\n 全部期刊可以在 [这里](http://qk.chaoxing.com/space/index) 找到,你也可以从 [学科分类](https://qikan.chaoxing.com/jourclassify) 和 [期刊导航](https://qikan.chaoxing.com/search/openmag) 中发现更多期刊。\n\n 如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=&mags=6b5c39b3dd84352be512e29df0297437&isort=20&from=space),其 URL 为 `http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437`。`6b5c39b3dd84352be512e29df0297437` 即为期刊 id,所得路由为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437)\n :::\n\n :::warning\n 你可以设置参数 **需要获取文章全文** 为 `true` `yes` `t` `y` 等值(或者忽略这个参数),RSS 的条目会携带期刊中的 **文章全文**,而不仅仅是 **文章概要**。但因为发起访问请求过多会被该网站屏蔽,你可以将其关闭(设置该参数为 `false` `no` `f` `n` 等值),这将会大大减少请求次数从而更难触发网站的反爬机制。\n\n 路由默认会获取 **30** 个条目。在路由后指定 `?limit=<条目数量>` 减少或增加单次获取条目数量,同样可以减少请求次数,如设置为一次获取 **10** 个条目,路由可以更改为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10)\n\n 在根据上文设置 **需要获取文章全文** 为不需要时,你可以将 `limit` 值增大,从而获取更多的条目,此时因为不获取全文也不会触发反爬机制,如 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100)\n :::","location":"qk.ts"}} /> - 如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=\&mags=6b5c39b3dd84352be512e29df0297437\&isort=20\&from=space),其 URL 为 `http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437`。`6b5c39b3dd84352be512e29df0297437` 即为期刊 id,所得路由为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437) - ::: +:::tip +全部期刊可以在 [这里](http://qk.chaoxing.com/space/index) 找到,你也可以从 [学科分类](https://qikan.chaoxing.com/jourclassify) 和 [期刊导航](https://qikan.chaoxing.com/search/openmag) 中发现更多期刊。 - :::warning - 你可以设置参数 **需要获取文章全文** 为 `true` `yes` `t` `y` 等值(或者忽略这个参数),RSS 的条目会携带期刊中的 **文章全文**,而不仅仅是 **文章概要**。但因为发起访问请求过多会被该网站屏蔽,你可以将其关闭(设置该参数为 `false` `no` `f` `n` 等值),这将会大大减少请求次数从而更难触发网站的反爬机制。 +如订阅 [**上海文艺**](http://m.chaoxing.com/mqk/list?sw=\&mags=6b5c39b3dd84352be512e29df0297437\&isort=20\&from=space),其 URL 为 `http://m.chaoxing.com/mqk/list?mags=6b5c39b3dd84352be512e29df0297437`。`6b5c39b3dd84352be512e29df0297437` 即为期刊 id,所得路由为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437) +::: - 路由默认会获取 **30** 个条目。在路由后指定 `?limit=<条目数量>` 减少或增加单次获取条目数量,同样可以减少请求次数,如设置为一次获取 **10** 个条目,路由可以更改为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10) +:::warning +你可以设置参数 **需要获取文章全文** 为 `true` `yes` `t` `y` 等值(或者忽略这个参数),RSS 的条目会携带期刊中的 **文章全文**,而不仅仅是 **文章概要**。但因为发起访问请求过多会被该网站屏蔽,你可以将其关闭(设置该参数为 `false` `no` `f` `n` 等值),这将会大大减少请求次数从而更难触发网站的反爬机制。 - 在根据上文设置 **需要获取文章全文** 为不需要时,你可以将 `limit` 值增大,从而获取更多的条目,此时因为不获取全文也不会触发反爬机制,如 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100) - ::: -</Route> +路由默认会获取 **30** 个条目。在路由后指定 `?limit=<条目数量>` 减少或增加单次获取条目数量,同样可以减少请求次数,如设置为一次获取 **10** 个条目,路由可以更改为 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437?limit=10) + +在根据上文设置 **需要获取文章全文** 为不需要时,你可以将 `limit` 值增大,从而获取更多的条目,此时因为不获取全文也不会触发反爬机制,如 [`/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100`](https://rsshub.app/chaoxing/qk/6b5c39b3dd84352be512e29df0297437/false?limit=100) +::: ## 刺猬猫 {#ci-wei-mao} ### 章节 {#ci-wei-mao-zhang-jie} -<Route author="keocheung" example="/ciweimao/chapter/100043404" path="/ciweimao/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} radar="1" /> - -## 单向空间 {#dan-xiang-kong-jian} - -### 单读 {#dan-xiang-kong-jian-dan-du} - -<Route author="imkero" example="/owspace/read/0" path="/owspace/read/:type?" paramsDesc={['栏目分类,不填则默认为首页']}> - | 首页 | 文字 | 影像 | 声音 | 单向历 | 谈论 | - | ---- | ---- | ---- | ---- | ------ | ---- | - | 0 | 1 | 2 | 3 | 4 | 6 | -</Route> +<Route namespace="ciweimao" data={{"path":"/chapter/:id","categories":["reading"],"example":"/ciweimao/chapter/100043404","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wap.ciweimao.com/book/:id"]},"name":"章节","maintainers":["keocheung"],"location":"chapter.ts"}} /> ## 東立出版社 {#dong-li-chu-ban-she} ### 新聞 {#dong-li-chu-ban-she-xin-wen} -<Route author="CokeMine" example="/tongli/news/6" path="/tongli/news/:type" paramsDesc={['分類,可以在“新聞”鏈接中找到']} radar="1" /> - -## 飞地 {#fei-di} - -### 分类 {#fei-di-fen-lei} - -<Route author="LogicJake" example="/enclavebooks/category/1" path="/enclavebooks/category/:id" paramsDesc={['类别 id,可在[分类api](https://app.enclavebooks.cn/v2/discovery)返回数据中的category查看']} /> - -### 用户创作 {#fei-di-yong-hu-chuang-zuo} - -<Route author="junbaor" example="/enclavebooks/user/103702" path="/enclavebooks/user/:uid" paramsDesc={['用户ID, 自行抓包寻找']} /> - -### 用户收藏 {#fei-di-yong-hu-shou-cang} - -<Route author="junbaor" example="/enclavebooks/collection/103702" path="/enclavebooks/collection/:uid" paramsDesc={['用户ID, 自行抓包寻找']} /> +<Route namespace="tongli" data={{"path":"/news/:type","categories":["reading"],"example":"/tongli/news/6","parameters":{"type":"分類,可以在“新聞”鏈接中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新聞","maintainers":["CokeMine"],"location":"news.ts"}} /> ## 欢乐书客 {#huan-le-shu-ke} ### 章节 {#huan-le-shu-ke-zhang-jie} -<Route author="keocheung" example="/hbooker/chapter/100113279" path="/hbooker/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} radar="1" /> +<Route namespace="hbooker" data={{"path":"/chapter/:id","categories":["reading"],"example":"/hbooker/chapter/100113279","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hbooker.com/book/:id"]},"name":"章节","maintainers":["keocheung"],"location":"chapter.ts"}} /> ## 晋江文学城 {#jin-jiang-wen-xue-cheng} ### 作者最新作品 {#jin-jiang-wen-xue-cheng-zuo-zhe-zui-xin-zuo-pin} -<Route author="nczitzk" example="/jjwxc/author/4364484" path="/jjwxc/author/:id?" paramsDesc={['作者 id,可在对应作者页中找到']} radar="1" /> +<Route namespace="jjwxc" data={{"path":"/author/:id?","categories":["reading"],"example":"/jjwxc/author/4364484","parameters":{"id":"作者 id,可在对应作者页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作者最新作品","maintainers":["nczitzk"],"location":"author.ts"}} /> ### 作品 {#jin-jiang-wen-xue-cheng-zuo-pin} -<Route author="nczitzk" example="/jjwxc/book/7013024" path="/jjwxc/book/:id?" paramsDesc={['作品 id,可在对应作品页中找到']} radar="1" /> - -## 禁忌书屋 {#jin-ji-shu-wu} - -### 首页 {#jin-ji-shu-wu-shou-ye} - -<Route author="nczitzk" example="/cool18/bbs4" path="/cool18/bbs4" /> - -### 精华区 {#jin-ji-shu-wu-jing-hua-qu} - -<Route author="nczitzk" example="/cool18/bbs4/gold" path="/cool18/bbs4/gold" /> - -### 栏目分类 {#jin-ji-shu-wu-lan-mu-fen-lei} - -<Route author="nczitzk" example="/cool18/bbs4/type/都市" path="/cool18/bbs4/type/:keyword?" paramsDesc={['分类,见下表,默认为首页']}> - | 都市 | 校园 | 乡野 | 古风 | 异国 | 玄幻 | 红杏 | 伦理 | 浪漫 | 暴虐 | 摄心 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -</Route> - -### 搜索关键字 {#jin-ji-shu-wu-sou-suo-guan-jian-zi} - -<Route author="nczitzk" example="/cool18/bbs4/keywords/都市" path="/cool18/bbs4/keywords/:keyword?" paramsDesc={['关键字']} /> - -## 孔夫子旧书网 {#kong-fu-zi-jiu-shu-wang} - -### 用户动态 {#kong-fu-zi-jiu-shu-wang-yong-hu-dong-tai} - -<Route author="nczitzk" example="/kongfz/people/5032170" path="/kongfz/people/:id" paramsDesc={['用户 id, 可在对应用户页 URL 中找到']} /> - -### 店铺上架 {#kong-fu-zi-jiu-shu-wang-dian-pu-shang-jia} - -<Route author="nczitzk" example="/kongfz/shop/238901/1" path="/kongfz/shop/:id/:cat?" paramsDesc={['店铺 id, 可在对应店铺页 URL 中找到', '分类 id,可在对应分类页 URL 中找到,默认为店铺最新上架']} /> +<Route namespace="jjwxc" data={{"path":"/book/:id?","categories":["reading"],"example":"/jjwxc/book/7013024","parameters":{"id":"作品 id,可在对应作品页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"作品","maintainers":["nczitzk"],"location":"book.ts"}} /> ## 哩哔轻小说 {#li-bi-qing-xiao-shuo} ### 小说更新 {#li-bi-qing-xiao-shuo-xiao-shuo-geng-xin} -<Route author="misakicoca" path="/linovelib/novel/:id" example="/linovelib/novel/2547" paramsDesc={['小说 id,对应书架开始阅读 URL 中找到']} anticrawler="1" /> +<Route namespace="linovelib" data={{"path":"/novel/:id","categories":["reading"],"example":"/linovelib/novel/2547","parameters":{"id":"小说 id,对应书架开始阅读 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"小说更新","maintainers":["misakicoca"],"location":"novel.ts"}} /> ## 明月中文网 {#ming-yue-zhong-wen-wang} -### 分类 {#ming-yue-zhong-wen-wang-fen-lei} - -<Route author="nczitzk" example="/56kog/class/1_1" path="/56kog/class/:category?" paramsDesc={['分类,见下表,默认为玄幻魔法']} radar="1"> - | [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) | - | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | - | 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 | - - | [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) | - | ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | - | 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 | -</Route> - ### 榜单 {#ming-yue-zhong-wen-wang-bang-dan} -<Route author="nczitzk" example="/56kog/top/weekvisit" path="/56kog/top/:category?" paramsDesc={['分类,见下表,默认为周点击榜']} radar="1"> - | [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) | - | ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | - | weekvisit | goodnum | postdate | -</Route> +<Route namespace="56kog" data={{"path":"/top/:category?","categories":["reading"],"example":"/56kog/top/weekvisit","parameters":{"category":"分类,见下表,默认为周点击榜"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"榜单","maintainers":["nczitzk"],"description":"| [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) |\n | ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- |\n | weekvisit | goodnum | postdate |","location":"top.ts"}} /> + +| [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) | +| ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | +| weekvisit | goodnum | postdate | + +### 分类 {#ming-yue-zhong-wen-wang-fen-lei} + +<Route namespace="56kog" data={{"path":"/class/:category?","categories":["reading"],"example":"/56kog/class/1_1","parameters":{"category":"分类,见下表,默认为玄幻魔法"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) |\n | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |\n | 1_1 | 2_1 | 4_1 | 5_1 | 6_1 |\n\n | [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) |\n | ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |\n | 8_1 | 3_1 | 7_1 | 9_1 | 10_1 |","location":"class.ts"}} /> + +| [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 | + +| [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) | +| ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | +| 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 | ## 起点 {#qi-dian} -### 章节 {#qi-dian-zhang-jie} - -<Route author="fuzy112" example="/qidian/chapter/1010400217" path="/qidian/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} /> - ### 讨论区 {#qi-dian-tao-lun-qu} -<Route author="fuzy112" example="/qidian/forum/1010400217" path="/qidian/forum/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} notOperational="1" /> - -### 限时免费 {#qi-dian-xian-shi-mian-fei} - -<Route author="LogicJake" example="/qidian/free" path="/qidian/free/:type?" paramsDesc={['默认不填为起点中文网,填 mm 为起点女生网']} /> +<Route namespace="qidian" data={{"path":"/forum/:id","categories":["reading"],"example":"/qidian/forum/1010400217","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["book.qidian.com/info/:id"]},"name":"讨论区","maintainers":["fuzy112"],"location":"forum.ts"}} /> ### 限时免费下期预告 {#qi-dian-xian-shi-mian-fei-xia-qi-yu-gao} -<Route author="LogicJake" example="/qidian/free-next" path="/qidian/free-next/:type?" paramsDesc={['默认不填为起点中文网,填 mm 为起点女生网']} /> +<Route namespace="qidian" data={{"path":"/free-next/:type?","categories":["reading"],"example":"/qidian/free-next","parameters":{"type":"默认不填为起点中文网,填 mm 为起点女生网"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.qidian.com/free"],"target":"/free"},"name":"限时免费下期预告","maintainers":["LogicJake"],"url":"www.qidian.com/free","location":"free-next.ts"}} /> + +### 限时免费 {#qi-dian-xian-shi-mian-fei} + +<Route namespace="qidian" data={{"path":"/free/:type?","categories":["reading"],"example":"/qidian/free","parameters":{"type":"默认不填为起点中文网,填 mm 为起点女生网"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.qidian.com/free"],"target":"/free"},"name":"限时免费","maintainers":["LogicJake"],"url":"www.qidian.com/free","location":"free.ts"}} /> + +### 章节 {#qi-dian-zhang-jie} + +<Route namespace="qidian" data={{"path":"/chapter/:id","categories":["reading"],"example":"/qidian/chapter/1010400217","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["book.qidian.com/info/:id"]},"name":"章节","maintainers":["fuzy112"],"location":"chapter.ts"}} /> ### 作者 {#qi-dian-zuo-zhe} -<Route author="miles170" example="/qidian/author/9639927" path="/qidian/author/:id" paramsDesc={['作者 id, 可在作者页面 URL 找到']} /> - -## 青空文庫 {#qing-kong-wen-ku} - -### 青空文庫新着リスト {#qing-kong-wen-ku-qing-kong-wen-ku-xin-zhe-%E3%83%AA%E3%82%B9%E3%83%88} - -<Route author="sgqy" example="/aozora/newbook/10" path="/aozora/newbook/:count?" paramsDesc={['更新数量. 设置每次下载列表大小. 范围是 1 到 50.']}> - 书籍网站每日一更。信息更新时间为书籍最初出版时间,排序可能不符合网络发表时间,请认准未读消息. -</Route> +<Route namespace="qidian" data={{"path":"/author/:id","categories":["reading"],"example":"/qidian/author/9639927","parameters":{"id":"作者 id, 可在作者页面 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["my.qidian.com/author/:id"]},"name":"作者","maintainers":["miles170"],"location":"author.ts"}} /> ## 轻小说文库 {#qing-xiao-shuo-wen-ku} ### 章节 {#qing-xiao-shuo-wen-ku-zhang-jie} -<Route author="zsakvo" example="/wenku8/chapter/74" path="/wenku8/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} anticrawler="1" /> +<Route namespace="wenku8" data={{"path":"/chapter/:id","categories":["reading"],"example":"/wenku8/chapter/74","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"章节","maintainers":["zsakvo"],"location":"chapter.ts"}} /> ### 最新卷 {#qing-xiao-shuo-wen-ku-zui-xin-juan} -<Route author="huangliangshusheng" example="/wenku8/volume/1163" path="/wenku8/volume/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} radar="1" /> - -### 首页分类 {#qing-xiao-shuo-wen-ku-shou-ye-fen-lei} - -<Route author="Fatpandac" example="/wenku8/lastupdate" path="/wenku8/:categoty?" paramsDesc={['首页分类,见下表,默认为今日更新']} configRequired="1"> - :::warning - 首页需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: - - | 今日更新 | 完结全本 | 新书一览 | 动画化作品 | 热门轻小说 | 轻小说列表 | - | :--------: | :------: | :------: | :--------: | :--------: | :---------: | - | lastupdate | fullflag | postdate | anime | allvisit | articlelist | -</Route> +<Route namespace="wenku8" data={{"path":"/volume/:id","categories":["reading"],"example":"/wenku8/volume/1163","parameters":{"id":"小说 id, 可在对应小说页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新卷","maintainers":["huangliangshusheng"],"location":"volume.ts"}} /> ## 日本語多読道場 {#ri-ben-yu-duo-du-dao-chang} ### 等级 {#ri-ben-yu-duo-du-dao-chang-deng-ji} -<Route author="eternasuno" example="/yomujp/n1" path="/yomujp/:level?" paramsDesc={['等级,n1~n6,为空默认全部']} /> +<Route namespace="yomujp" data={{"path":"/:level?","categories":["reading"],"example":"/yomujp/n1","parameters":{"level":"等级,n1~n6,为空默认全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yomujp.com/","yomujp.com/:level"],"target":"/:level"},"name":"等级","maintainers":["eternasuno"],"url":"yomujp.com/","location":"level.ts"}} /> ## 书伴 {#shu-ban} ### 分类 {#shu-ban-fen-lei} -<Route author="OdinZhang" example="/bookfere/skills" path="/bookfere/:category" paramsDesc={['分类名']}> - | 每周一书 | 使用技巧 | 图书推荐 | 新闻速递 | 精选短文 | - | -------- | -------- | -------- | -------- | -------- | - | weekly | skills | books | news | essay | -</Route> +<Route namespace="bookfere" data={{"path":"/:category","categories":["reading"],"example":"/bookfere/skills","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["OdinZhang"],"description":"| 每周一书 | 使用技巧 | 图书推荐 | 新闻速递 | 精选短文 |\n | -------- | -------- | -------- | -------- | -------- |\n | weekly | skills | books | news | essay |","location":"category.ts"}} /> -## 虛詞 {#xu-ci} - -### 版块 {#xu-ci-ban-kuai} - -<Route author="LogicJake" example="/p-articles/section/critics-art" path="/p-articles/section/:section" paramsDesc={['版块链接, 可在对应版块 URL 中找到, 子版块链接用`-`连接']} /> - -### 作者 {#xu-ci-zuo-zhe} - -<Route author="LogicJake" example="/p-articles/contributors/朗天" path="/p-articles/contributors/:author" paramsDesc={['作者 id, 可在作者页面 URL 找到']} /> - -## 中国的中古 {#zhong-guo-de-zhong-gu} - -### 首页 {#zhong-guo-de-zhong-gu-shou-ye} - -<Route author="artefaritaKuniklo" example="/medieval-china" path="/medieval-china" /> - -## 纵横 {#zong-heng} - -### 章节 {#zong-heng-zhang-jie} - -<Route author="georeth" example="/zongheng/chapter/672340" path="/zongheng/chapter/:id" paramsDesc={['小说 id, 可在对应小说页 URL 中找到']} /> - -## 左岸读书 {#zuo-an-du-shu} - -### 主页 {#zuo-an-du-shu-zhu-ye} - -<Route author="kt286" example="/zreading" path="/zreading" /> +| 每周一书 | 使用技巧 | 图书推荐 | 新闻速递 | 精选短文 | +| -------- | -------- | -------- | -------- | -------- | +| weekly | skills | books | news | essay | diff --git a/website/docs/routes/shopping.mdx b/website/docs/routes/shopping.mdx index 3b611d111..b27fc6331 100644 --- a/website/docs/routes/shopping.mdx +++ b/website/docs/routes/shopping.mdx @@ -1,201 +1,165 @@ -# 🛍️ Shopping +# shopping ## 0818 团 {#0818-tuan} ### 分类 {#0818-tuan-fen-lei} -<Route author="TonyRL" example="/0818tuan" path="/0818tuan/:listId?" paramsDesc={['活动分类,见下表,默认为 `1`']} radar="1"> - | 最新线报 | 实测活动 | 优惠券 | - | -------- | -------- | ------ | - | 1 | 2 | 3 | -</Route> +<Route namespace="0818tuan" data={{"path":"/:listId?","categories":["shopping"],"example":"/0818tuan","parameters":{"listId":"活动分类,见下表,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["TonyRL"],"description":"| 最新线报 | 实测活动 | 优惠券 |\n | -------- | -------- | ------ |\n | 1 | 2 | 3 |","location":"index.ts"}} /> -## AppSales {#appsales} - -### Apps {#appsales-apps} - -<Route author="nczitzk" example="/appsales/highlights" path="/appsales/:caty?/:time?" paramsDesc={['Category, `highlights` by default', 'Time, `24h` by default']}> - Category - - | Highlights | Active Sales | Now Free | Watchlist Charts | - | ---------- | ------------ | -------- | ---------------- | - | highlights | activesales | nowfree | mostwanted | - - Time - - | the latest 24 hours | the latest week | all the time | - | ------------------- | --------------- | ------------ | - | 24h | week | alltime | - - :::tip - Parameter `time` only works when `mostwanted` is chosen as the category. - ::: -</Route> +| 最新线报 | 实测活动 | 优惠券 | +| -------- | -------- | ------ | +| 1 | 2 | 3 | ## Arcteryx {#arcteryx} ### New Arrivals {#arcteryx-new-arrivals} -<Route author="EthanWng97" example="/arcteryx/new-arrivals/us/mens" path="/arcteryx/new-arrivals/:country/:gender" paramsDesc={['country', 'gender']} anticrawler="1"> - Country +<Route namespace="arcteryx" data={{"path":"/new-arrivals/:country/:gender","categories":["shopping"],"example":"/arcteryx/new-arrivals/us/mens","parameters":{"country":"country","gender":"gender"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["arcteryx.com/:country/en/c/:gender/new-arrivals"]},"name":"New Arrivals","maintainers":["EthanWng97"],"description":"Country\n\n | United States | Canada | United Kingdom |\n | ------------- | ------ | -------------- |\n | us | ca | gb |\n\n gender\n\n | male | female |\n | ---- | ------ |\n | mens | womens |\n\n :::tip\n Parameter `country` can be found within the url of `Arcteryx` website.\n :::","location":"new-arrivals.ts"}} /> - | United States | Canada | United Kingdom | - | ------------- | ------ | -------------- | - | us | ca | gb | +Country - gender +| United States | Canada | United Kingdom | +| ------------- | ------ | -------------- | +| us | ca | gb | - | male | female | - | ---- | ------ | - | mens | womens | +gender - :::tip - Parameter `country` can be found within the url of `Arcteryx` website. - ::: -</Route> +| male | female | +| ---- | ------ | +| mens | womens | + +:::tip +Parameter `country` can be found within the url of `Arcteryx` website. +::: ### Outlet {#arcteryx-outlet} -<Route author="EthanWng97" example="/arcteryx/outlet/us/mens" path="/arcteryx/outlet/:country/:gender" paramsDesc={['country', 'gender']} anticrawler="1"> - Country +<Route namespace="arcteryx" data={{"path":"/outlet/:country/:gender","categories":["shopping"],"example":"/arcteryx/outlet/us/mens","parameters":{"country":"country","gender":"gender"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["outlet.arcteryx.com/:country/en/c/:gender"]},"name":"Outlet","maintainers":["EthanWng97"],"description":"Country\n\n | United States | Canada | United Kingdom |\n | ------------- | ------ | -------------- |\n | us | ca | gb |\n\n gender\n\n | male | female |\n | ---- | ------ |\n | mens | womens |\n\n :::tip\n Parameter `country` can be found within the url of `Arcteryx` website.\n :::","location":"outlet.ts"}} /> - | United States | Canada | United Kingdom | - | ------------- | ------ | -------------- | - | us | ca | gb | +Country - gender +| United States | Canada | United Kingdom | +| ------------- | ------ | -------------- | +| us | ca | gb | - | male | female | - | ---- | ------ | - | mens | womens | +gender - :::tip - Parameter `country` can be found within the url of `Arcteryx` website. - ::: -</Route> +| male | female | +| ---- | ------ | +| mens | womens | + +:::tip +Parameter `country` can be found within the url of `Arcteryx` website. +::: ### Regear New Arrivals {#arcteryx-regear-new-arrivals} -<Route author="EthanWng97" example="/arcteryx/regear/new-arrivals" path="/arcteryx/regear/new-arrivals" /> +<Route namespace="arcteryx" data={{"path":"/regear/new-arrivals","categories":["shopping"],"example":"/arcteryx/regear/new-arrivals","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["regear.arcteryx.com/shop/new-arrivals","regear.arcteryx.com/"]},"name":"Regear New Arrivals","maintainers":["EthanWng97"],"url":"regear.arcteryx.com/shop/new-arrivals","location":"regear-new-arrivals.ts"}} /> ## Bellroy {#bellroy} ### New Releases {#bellroy-new-releases} -<Route author="EthanWng97" example="/bellroy/new-releases" path="/bellroy/new-releases" /> - -## booth.pm {#booth-pm} - -### Shop {#booth-pm-shop} - -<Route author="KTachibanaM" example="/booth.pm/shop/annn-boc0123" path="/booth.pm/shop/:subdomain" paramsDesc={['Shop subdomain']} /> +<Route namespace="bellroy" data={{"path":"/new-releases","categories":["shopping"],"example":"/bellroy/new-releases","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bellroy.com/collection/new-releases","bellroy.com/"]},"name":"New Releases","maintainers":["EthanWng97"],"url":"bellroy.com/collection/new-releases","location":"new-releases.ts"}} /> ## Furstar {#furstar} -### 最新售卖角色列表 {#furstar-zui-xin-shou-mai-jue-se-lie-biao} +### 画师列表 {#furstar-hua-shi-lie-biao} -<Route author="NeverBehave" example="/furstar/characters/cn" path="/furstar/characters/:lang?" paramsDesc={['语言, 留空为jp, 支持cn, en']} /> +<Route namespace="furstar" data={{"path":"/artists/:lang?","categories":["shopping"],"example":"/furstar/artists/cn","parameters":{"lang":"语言, 留空为jp, 支持cn, en"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["furstar.jp/"],"target":"/artists"},"name":"画师列表","maintainers":["NeverBehave"],"url":"furstar.jp/","location":"artists.ts"}} /> ### 已经出售的角色列表 {#furstar-yi-jing-chu-shou-de-jue-se-lie-biao} -<Route author="NeverBehave" example="/furstar/archive/cn" path="/furstar/archive/:lang?" paramsDesc={['语言, 留空为jp, 支持cn, en']} /> +<Route namespace="furstar" data={{"path":"/archive/:lang?","categories":["shopping"],"example":"/furstar/archive/cn","parameters":{"lang":"语言, 留空为jp, 支持cn, en"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["furstar.jp/:lang/archive.php","furstar.jp/archive.php"],"target":"/archive/:lang"},"name":"已经出售的角色列表","maintainers":["NeverBehave"],"location":"archive.ts"}} /> -### 画师列表 {#furstar-hua-shi-lie-biao} +### 最新售卖角色列表 {#furstar-zui-xin-shou-mai-jue-se-lie-biao} -<Route author="NeverBehave" example="/furstar/artists/cn" path="/furstar/artists/:lang?" paramsDesc={['语言, 留空为jp, 支持cn, en']} /> +<Route namespace="furstar" data={{"path":"/characters/:lang?","categories":["shopping"],"example":"/furstar/characters/cn","parameters":{"lang":"语言, 留空为jp, 支持cn, en"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["furstar.jp/:lang","furstar.jp/"],"target":"/characters/:lang"},"name":"最新售卖角色列表","maintainers":["NeverBehave"],"location":"index.ts"}} /> ## Gumroad {#gumroad} ### Products {#gumroad-products} -<Route author="Fatpandac" example="/gumroad/afkmaster/Eve10" path="/gumroad/:username/:products" paramsDesc={['username, can be found in URL', 'products name, can be found in URL']} radar="1" notOperational="1"> - `https://afkmaster.gumroad.com/l/Eve10` -> `/gumroad/afkmaster/Eve10` -</Route> +<Route namespace="gumroad" data={{"path":"/:username/:products","categories":["shopping"],"example":"/gumroad/afkmaster/Eve10","parameters":{"username":"username, can be found in URL","products":"products name, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Products","maintainers":["Fatpandac"],"description":"`https://afkmaster.gumroad.com/l/Eve10` -> `/gumroad/afkmaster/Eve10`","location":"index.ts"}} /> + +`https://afkmaster.gumroad.com/l/Eve10` -> `/gumroad/afkmaster/Eve10` ## hotukdeals {#hotukdeals} -### thread {#hotukdeals-thread} - -<Route author="DIYgod" example="/hotukdeals/hot" path="/hotukdeals/:type" paramsDesc={['should be one of highlights, hot, new, discussed']} anticrawler="1" /> - ### hottest {#hotukdeals-hottest} -<Route author="DIYgod" example="/hotukdeals/hottest" path="/hotukdeals/hottest" anticrawler="1" /> +<Route namespace="hotukdeals" data={{"path":"/hottest","categories":["shopping"],"example":"/hotukdeals/hottest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.hotukdeals.com/"]},"name":"hottest","maintainers":["DIYgod"],"url":"www.hotukdeals.com/","location":"hottest.ts"}} /> + +### thread {#hotukdeals-thread} + +<Route namespace="hotukdeals" data={{"path":"/:type","categories":["shopping"],"example":"/hotukdeals/hot","parameters":{"type":"should be one of highlights, hot, new, discussed"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"thread","maintainers":["DIYgod"],"location":"index.ts"}} /> ## IKEA {#ikea} ### UK - New Product Release {#ikea-uk-new-product-release} -<Route author="HenryQW" example="/ikea/gb/new" path="/ikea/gb/new" notOperational="1" /> +<Route namespace="ikea" data={{"path":"/gb/new","categories":["shopping"],"example":"/ikea/gb/new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ikea.com/gb/en/new/new-products/","ikea.com/"]},"name":"UK - New Product Release","maintainers":["HenryQW"],"url":"ikea.com/gb/en/new/new-products/","location":"gb/new.ts"}} /> ### UK - Offers {#ikea-uk-offers} -<Route author="HenryQW" example="/ikea/gb/offer" path="/ikea/gb/offer" notOperational="1" /> +<Route namespace="ikea" data={{"path":"/gb/offer","categories":["shopping"],"example":"/ikea/gb/offer","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ikea.com/gb/en/offers","ikea.com/"]},"name":"UK - Offers","maintainers":["HenryQW"],"url":"ikea.com/gb/en/offers","location":"gb/offer.ts"}} /> ### 中国 - 会员特惠 {#ikea-zhong-guo-hui-yuan-te-hui} -<Route author="jzhangdev" example="/ikea/cn/family_offers" path="/ikea/cn/family_offers" radar="1" notOperational="1" /> +<Route namespace="ikea" data={{"path":"/cn/family_offers","categories":["shopping"],"example":"/ikea/cn/family_offers","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ikea.cn/cn/zh/offers/family-offers","ikea.cn/"]},"name":"中国 - 会员特惠","maintainers":["jzhangdev"],"url":"ikea.cn/cn/zh/offers/family-offers","location":"cn/family-offers.ts"}} /> ### 中国 - 低价优选 {#ikea-zhong-guo-di-jia-you-xuan} -<Route author="jzhangdev" example="/ikea/cn/low_price" path="/ikea/cn/low_price" radar="1" /> +<Route namespace="ikea" data={{"path":"/cn/low_price","categories":["shopping"],"example":"/ikea/cn/low_price","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40","ikea.cn/"]},"name":"中国 - 低价优选","maintainers":["jzhangdev"],"url":"ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40","location":"cn/low-price.ts"}} /> ### 中国 - 当季新品推荐 {#ikea-zhong-guo-dang-ji-xin-pin-tui-jian} -<Route author="jzhangdev" example="/ikea/cn/new" path="/ikea/cn/new" radar="1" /> +<Route namespace="ikea" data={{"path":"/cn/new","categories":["shopping"],"example":"/ikea/cn/new","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ikea.cn/cn/zh/new/","ikea.cn/"]},"name":"中国 - 当季新品推荐","maintainers":["jzhangdev"],"url":"ikea.cn/cn/zh/new/","location":"cn/new.ts"}} /> ## MyFigureCollection {#myfigurecollection} ### Activity {#myfigurecollection-activity} -<Route author="nczitzk" example="/myfigurecollection/activity" path="/myfigurecollection/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?" paramsDesc={['Category, Figures by default', 'Language, as above, `en` by default', 'Latest Additions, on as `1` by default, off as `0`', 'Changes, on as `1` by default, off as `0`', 'Alerts, on as `1` by default, off as `0`', 'Pictures, on as `1` by default, off as `0`']}> - Category +<Route namespace="myfigurecollection" data={{"path":"/activity/:category?/:language?/:latestAdditions?/:latestEdits?/:latestAlerts?/:latestPictures?","categories":["shopping"],"example":"/myfigurecollection/activity","parameters":{"category":"Category, Figures by default","language":"Language, as above, `en` by default","latestAdditions":"Latest Additions, on as `1` by default, off as `0`","latestEdits":"Changes, on as `1` by default, off as `0`","latestAlerts":"Alerts, on as `1` by default, off as `0`","latestPictures":"Pictures, on as `1` by default, off as `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zh.myfigurecollection.net/browse","zh.myfigurecollection.net/"],"target":"/:category?/:language?"},"name":"Activity","maintainers":["nczitzk"],"url":"zh.myfigurecollection.net/browse","description":"Category\n\n | Figures | Goods | Media |\n | ------- | ----- | ----- |\n | 0 | 1 | 2 |\n\n Language\n\n | Id | Language |\n | -- | ---------- |\n | | en |\n | de | Deutsch |\n | es | Español |\n | fi | Suomeksi |\n | fr | Français |\n | it | Italiano |\n | ja | 日本語 |\n | nl | Nederlands |\n | no | Norsk |\n | pl | Polski |\n | pt | Português |\n | ru | Русский |\n | sv | Svenska |\n | zh | 中文 |","location":"activity.ts"}} /> - | Figures | Goods | Media | - | ------- | ----- | ----- | - | 0 | 1 | 2 | +Category - Language +| Figures | Goods | Media | +| ------- | ----- | ----- | +| 0 | 1 | 2 | - | Id | Language | - | -- | ---------- | - | | en | - | de | Deutsch | - | es | Español | - | fi | Suomeksi | - | fr | Français | - | it | Italiano | - | ja | 日本語 | - | nl | Nederlands | - | no | Norsk | - | pl | Polski | - | pt | Português | - | ru | Русский | - | sv | Svenska | - | zh | 中文 | -</Route> +Language -### Pictures {#myfigurecollection-pictures} - -<Route author="nczitzk" example="/myfigurecollection/potd" path="/myfigurecollection/:category?/:language?" paramsDesc={['Category, Pictures OTD by default', 'Language, as above, `en` by default']}> - | Pictures OTD | Pictures OTW | Pictures OTM | - | ------------ | ------------ | ------------ | - | potd | potw | potm | -</Route> +| Id | Language | +| -- | ---------- | +| | en | +| de | Deutsch | +| es | Español | +| fi | Suomeksi | +| fr | Français | +| it | Italiano | +| ja | 日本語 | +| nl | Nederlands | +| no | Norsk | +| pl | Polski | +| pt | Português | +| ru | Русский | +| sv | Svenska | +| zh | 中文 | ### 圖片 {#myfigurecollection-tu-pian} -<Route author="nczitzk" example="/myfigurecollection/potd" path="/myfigurecollection/:category?/:language?" paramsDesc={['分类,默认为每日圖片', '语言,见上表,默认为空,即 `en`']}> - | 每日圖片 | 每週圖片 | 每月圖片 | - | -------- | -------- | -------- | - | potd | potw | potm | -</Route> +<Route namespace="myfigurecollection" data={{"path":"/:category?/:language?","categories":["shopping"],"example":"/myfigurecollection/potd","parameters":{"category":"分类,默认为每日圖片","language":"语言,见上表,默认为空,即 `en`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zh.myfigurecollection.net/browse","zh.myfigurecollection.net/"]},"name":"圖片","maintainers":["nczitzk"],"url":"zh.myfigurecollection.net/browse","description":"| 每日圖片 | 每週圖片 | 每月圖片 |\n | -------- | -------- | -------- |\n | potd | potw | potm |","location":"index.ts"}} /> + +| 每日圖片 | 每週圖片 | 每月圖片 | +| -------- | -------- | -------- | +| potd | potw | potm | ## MyMusicSheet {#mymusicsheet} ### User Sheets {#mymusicsheet-user-sheets} -<Route author="Freddd13" example="/mymusicsheet/user/sheets/HalcyonMusic/USD/1" path="/mymusicsheet/user/sheets/:username/:iso?/:freeOnly?" paramsDesc={['用户名,可在URL中找到', '用于显示价格的ISO 4217货币代码, 支持常见代码, 默认为人民币, 即`CNY`', '只返回免费谱, 任意值为开启']} radar="1" /> +<Route namespace="mymusicsheet" data={{"path":"/user/sheets/:username/:iso?/:freeOnly?","categories":["shopping"],"example":"/mymusicsheet/user/sheets/HalcyonMusic/USD/1","parameters":{"username":"用户名,可在URL中找到","iso":"用于显示价格的ISO 4217货币代码, 支持常见代码, 默认为人民币, 即`CNY`","freeOnly":"只返回免费谱, 任意值为开启"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mymusicsheet.com/:username/*","mymusicsheet.com/:username"],"target":"/user/sheets/:username"},"name":"User Sheets","maintainers":["Freddd13"],"description":"关于 ISO 4217,请参考[维基百科](https://zh.wikipedia.org/zh-cn/ISO_4217#%E7%8E%B0%E8%A1%8C%E4%BB%A3%E7%A0%81)","location":"usersheets.ts"}} /> 关于 ISO 4217,请参考[维基百科](https://zh.wikipedia.org/zh-cn/ISO_4217#%E7%8E%B0%E8%A1%8C%E4%BB%A3%E7%A0%81) @@ -203,35 +167,35 @@ ### New Arrivals {#patagonia-new-arrivals} -<Route author="EthanWng97" example="/patagonia/new-arrivals/mens" path="/patagonia/new-arrivals/:category" paramsDesc={['category, see below']}> - | Men's | Women's | Kids' & Baby | Packs & Gear | - | ----- | ------- | ------------ | ------------ | - | mens | womens | kids | luggage | -</Route> +<Route namespace="patagonia" data={{"path":"/new-arrivals/:category","categories":["shopping"],"example":"/patagonia/new-arrivals/mens","parameters":{"category":"category, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"New Arrivals","maintainers":[],"description":"| Men's | Women's | Kids' & Baby | Packs & Gear |\n | ----- | ------- | ------------ | ------------ |\n | mens | womens | kids | luggage |","location":"new-arrivals.ts"}} /> + +| Men's | Women's | Kids' & Baby | Packs & Gear | +| ----- | ------- | ------------ | ------------ | +| mens | womens | kids | luggage | ## ShopBack {#shopback} ### Store {#shopback-store} -<Route author="nczitzk" example="/shopback/shopee-mart" path="/shopback/:store" paramsDesc={['Store, can be found in URL']} /> +<Route namespace="shopback" data={{"path":"/:store","categories":["shopping"],"example":"/shopback/shopee-mart","parameters":{"store":"Store, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["shopback.com.tw/:category","shopback.com.tw/"]},"name":"Store","maintainers":["nczitzk"],"location":"store.ts"}} /> ## Snow Peak {#snow-peak} ### New Arrivals(USA) {#snow-peak-new-arrivals-usa} -<Route author="EthanWng97" example="/snowpeak/us/new-arrivals" path="/snowpeak/us/new-arrivals" /> +<Route namespace="snowpeak" data={{"path":"/us/new-arrivals","categories":["shopping"],"example":"/snowpeak/us/new-arrivals","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["snowpeak.com/collections/new-arrivals","snowpeak.com/"]},"name":"New Arrivals(USA)","maintainers":["EthanWng97"],"url":"snowpeak.com/collections/new-arrivals","location":"us-new-arrivals.ts"}} /> ## Uniqlo {#uniqlo} ### New Arrivals {#uniqlo-new-arrivals} -<Route author="DIYgod" example="/uniqlo/new/sg/men" path="/uniqlo/new/:country/:category" paramsDesc={['currently only supports sg, us, jp', 'supports `men` `women`, `kids`, `baby`']} radar="1" /> +<Route namespace="uniqlo" data={{"path":"/new/:country/:category","categories":["shopping"],"example":"/uniqlo/new/sg/men","parameters":{"country":"currently only supports sg, us, jp","category":"supports `men` `women`, `kids`, `baby`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"New Arrivals","maintainers":["DIYgod"],"location":"new.ts"}} /> ## Zagg {#zagg} ### New Arrivals {#zagg-new-arrivals} -<Route author="EthanWng97" example="/zagg/new-arrivals/brand=164&cat=3038,3041" path="/zagg/new-arrivals/:query?" paramsDesc={['query, search page querystring']} notOperational="1" /> +<Route namespace="zagg" data={{"path":"/new-arrivals/:query?","categories":["shopping"],"example":"/zagg/new-arrivals/brand=164&cat=3038,3041","parameters":{"query":"query, search page querystring"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"New Arrivals","maintainers":["EthanWng97"],"description":"For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3041`, the query is `brand=164&cat=3038%2C3041`","location":"new-arrivals.ts"}} /> For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3041`, the query is `brand=164&cat=3038%2C3041` @@ -239,7 +203,7 @@ For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3 ### 票务更新 {#da-mai-wang-piao-wu-geng-xin} -<Route author="hoilc" example="/damai/activity/上海/音乐会/全部/柴可夫斯基" path="/damai/activity/:city/:category/:subcategory/:keyword?" paramsDesc={['城市,如果不需要限制,请填入`全部`', '分类,如果不需要限制,请填入`全部`', '子分类,如果不需要限制,请填入`全部`', '搜索关键字,置空为不限制']} radar="1" /> +<Route namespace="damai" data={{"path":"/activity/:city/:category/:subcategory/:keyword?","categories":["shopping"],"example":"/damai/activity/上海/音乐会/全部/柴可夫斯基","parameters":{"city":"城市,如果不需要限制,请填入`全部`","category":"分类,如果不需要限制,请填入`全部`","subcategory":"子分类,如果不需要限制,请填入`全部`","keyword":"搜索关键字,置空为不限制"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"票务更新","maintainers":["hoilc"],"description":"城市、分类名、子分类名,请参见[大麦网搜索页面](https://search.damai.cn/search.htm)","location":"activity.ts"}} /> 城市、分类名、子分类名,请参见[大麦网搜索页面](https://search.damai.cn/search.htm) @@ -247,87 +211,51 @@ For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3 ### 搜索结果 {#duo-zhua-yu-sou-suo-jie-guo} -<Route author="fengkx" example="/duozhuayu/search/JavaScript" path="/duozhuayu/search/:wd" paramsDesc={['搜索关键词']} radar="1" /> +<Route namespace="duozhuayu" data={{"path":"/search/:wd","categories":["shopping"],"example":"/duozhuayu/search/JavaScript","parameters":{"wd":"搜索关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["duozhuayu.com/search/book/:wd"]},"name":"搜索结果","maintainers":["fengkx"],"location":"search.ts"}} /> ## 逛丢 {#guang-diu} +### 关键字搜索 {#guang-diu-guan-jian-zi-sou-suo} + +<Route namespace="guangdiu" data={{"path":"/search/:query?","categories":["shopping"],"example":"/guangdiu/search/k=百度网盘","parameters":{"query":"链接参数,对应网址问号后的内容"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"关键字搜索","maintainers":["Huzhixin00"],"location":"search.ts"}} /> + ### 国内折扣 / 海外折扣 {#guang-diu-guo-nei-zhe-kou-hai-wai-zhe-kou} -<Route author="Fatpandac" example="/guangdiu/k=daily" path="/guangdiu/:query?" paramsDesc={['链接参数,对应网址问号后的内容']}> - :::tip - 海外折扣: [`/guangdiu/k=daily&c=us`](https://rsshub.app/guangdiu/k=daily\&c=us) - ::: -</Route> +<Route namespace="guangdiu" data={{"path":"/:query?","categories":["shopping"],"example":"/guangdiu/k=daily","parameters":{"query":"链接参数,对应网址问号后的内容"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"国内折扣 / 海外折扣","maintainers":["Fatpandac"],"description":":::tip\n 海外折扣: [`/guangdiu/k=daily&c=us`](https://rsshub.app/guangdiu/k=daily&c=us)\n :::","location":"index.ts"}} /> -### 一小时风云榜 {#guang-diu-yi-xiao-shi-feng-yun-bang} - -<Route author="Fatpandac" example="/guangdiu/rank" path="/guangdiu/rank" /> +:::tip +海外折扣: [`/guangdiu/k=daily&c=us`](https://rsshub.app/guangdiu/k=daily\&c=us) +::: ### 九块九 {#guang-diu-jiu-kuai-jiu} -<Route author="Fatpandac" example="/guangdiu/cheaps/k=clothes" path="/guangdiu/cheaps/:query?" paramsDesc={['链接参数,对应网址问号后的内容']} /> +<Route namespace="guangdiu" data={{"path":"/cheaps/:query?","categories":["shopping"],"example":"/guangdiu/cheaps/k=clothes","parameters":{"query":"链接参数,对应网址问号后的内容"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"九块九","maintainers":["fatpandac"],"location":"cheaps.ts"}} /> -### 关键字搜索 {#guang-diu-guan-jian-zi-sou-suo} +### 一小时风云榜 {#guang-diu-yi-xiao-shi-feng-yun-bang} -<Route author="Huzhixin00" example="/guangdiu/search/k=百度网盘" path="/guangdiu/search/:query?" paramsDesc={['链接参数,对应网址问号后的内容']} /> - -## 好好住 {#hao-hao-zhu} - -### 整屋案例 {#hao-hao-zhu-zheng-wu-an-li} - -<Route author="hoilc" example="/haohaozhu/whole-house/日式" path="/haohaozhu/whole-house/:keyword?" paramsDesc={['分类名或关键字,请使用中文']} /> - -### 发现 {#hao-hao-zhu-fa-xian} - -<Route author="hoilc" example="/haohaozhu/discover/厨房" path="/haohaozhu/discover/:keyword?" paramsDesc={['分类名或关键字,请使用中文']} /> +<Route namespace="guangdiu" data={{"path":"/rank","categories":["shopping"],"example":"/guangdiu/rank","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["guangdiu.com/rank"]},"name":"一小时风云榜","maintainers":["fatpandac"],"url":"guangdiu.com/rank","location":"rank.ts"}} /> ## 京东 {#jing-dong} ### 商品价格 {#jing-dong-shang-pin-jia-ge} -<Route author="nczitzk" example="/jd/price/526835" path="/jd/price/:id" paramsDesc={['商品 id,可在商品详情页 URL 中找到']} notOperational="1"> - :::tip - 如商品 `https://item.jd.com/526835.html` 中的 id 为 `526835`,所以路由为 [`/jd/price/526835`](https://rsshub.app/jd/price/526835) - ::: -</Route> +<Route namespace="jd" data={{"path":"/price/:id","categories":["shopping"],"example":"/jd/price/526835","parameters":{"id":"商品 id,可在商品详情页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"商品价格","maintainers":["nczitzk"],"description":":::tip\n 如商品 `https://item.jd.com/526835.html` 中的 id 为 `526835`,所以路由为 [`/jd/price/526835`](https://rsshub.app/jd/price/526835)\n :::","location":"price.ts"}} /> -## 麦当劳 {#mai-dang-lao} - -### 麦当劳活动资讯 {#mai-dang-lao-mai-dang-lao-huo-dong-zi-xun} - -<Route author="huyyi" example="/mcdonalds/sales+event" path="/mcdonalds/:category" paramsDesc={['分类名(可用+连接多个分类)']}> - | 全部分类 | 社会责任 | 人员品牌 | 产品故事 | 优惠 | 品牌文化 | 活动速报 | - | ---------- | -------------- | -------- | -------- | ----- | -------- | -------- | - | news\_list | responsibility | brand | product | sales | culture | event | -</Route> - -## 缺书网 {#que-shu-wang} - -### 促销 {#que-shu-wang-cu-xiao} - -<Route author="kt286" example="/queshu/sale" path="/queshu/sale" /> - -### 单品活动信息 {#que-shu-wang-dan-pin-huo-dong-xin-xi} - -<Route author="kt286" example="/queshu/book/34626813" path="/queshu/book/:bookid" paramsDesc={['图书ID,可在链接中获取']} /> - -## 人民邮电出版社 {#ren-min-you-dian-chu-ban-she} - -### 图书列表 {#ren-min-you-dian-chu-ban-she-tu-shu-lie-biao} - -<Route author="hoilc" example="/ptpress/book/new" path="/ptpress/book/:type?" paramsDesc={['排序方式,默认`new`为最新图书,可选`hot`为最热图书']} /> +:::tip +如商品 `https://item.jd.com/526835.html` 中的 id 为 `526835`,所以路由为 [`/jd/price/526835`](https://rsshub.app/jd/price/526835) +::: ## 上海东方艺术中心 {#shang-hai-dong-fang-yi-shu-zhong-xin} ### 演出月历 {#shang-hai-dong-fang-yi-shu-zhong-xin-yan-chu-yue-li} -<Route author="TonyRL" example="/shoac/recent-show" path="/shoac/recent-show" /> +<Route namespace="shoac" data={{"path":"/recent-show","categories":["shopping"],"example":"/shoac/recent-show","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["shoac.com.cn/"]},"name":"演出月历","maintainers":["TonyRL"],"url":"shoac.com.cn/","location":"recent-show.ts"}} /> ## 上海文化广场 {#shang-hai-wen-hua-guang-chang} ### 节目列表 {#shang-hai-wen-hua-guang-chang-jie-mu-lie-biao} -<Route author="fuzy112" example="/shcstheatre/programs" path="/shcstheatre/programs" /> +<Route namespace="shcstheatre" data={{"path":"/programs","categories":["shopping"],"example":"/shcstheatre/programs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.shcstheatre.com/Program/programList.aspx"]},"name":"节目列表","maintainers":["fuzy112"],"url":"www.shcstheatre.com/Program/programList.aspx","location":"programs.ts"}} /> ## 什么值得买 {#shen-me-zhi-de-mai} @@ -337,212 +265,202 @@ For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3 ### 关键词 {#shen-me-zhi-de-mai-guan-jian-ci} -<Route author="DIYgod" example="/smzdm/keyword/女装" path="/smzdm/keyword/:keyword" paramsDesc={['你想订阅的关键词']} radar="1" /> - -### 排行榜 {#shen-me-zhi-de-mai-pai-hang-bang} - -<Route author="DIYgod" example="/smzdm/ranking/pinlei/11/3" path="/smzdm/ranking/:rank_type/:rank_id/:hour" paramsDesc={['榜单类型','榜单ID','时间跨度']} radar="1"> - - 榜单类型 - - | 好价品类榜 | 好价电商榜 | 海淘 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 | -</Route> - -### 好文 {#shen-me-zhi-de-mai-hao-wen} - -<Route author="LogicJake" example="/smzdm/haowen/1" path="/smzdm/haowen/:day?" paramsDesc={['以天为时间跨度,默认为 `all`,其余可以选择 `1`,`7`,`30`,`365`']} /> +<Route namespace="smzdm" data={{"path":"/keyword/:keyword","categories":["shopping"],"example":"/smzdm/keyword/女装","parameters":{"keyword":"你想订阅的关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"关键词","maintainers":["DIYgod","MeanZhang"],"location":"keyword.ts"}} /> ### 好文分类 {#shen-me-zhi-de-mai-hao-wen-fen-lei} -<Route author="LogicJake" example="/smzdm/haowen/fenlei/shenghuodianqi" path="/smzdm/haowen/fenlei/:name/:sort?" paramsDesc={['分类名,可在 URL 中查看','排序方式,默认为最新']}> - | 最新 | 周排行 | 月排行 | - | ---- | ------ | ------ | - | 0 | 7 | 30 | -</Route> +<Route namespace="smzdm" data={{"path":"/haowen/fenlei/:name/:sort?","categories":["shopping"],"example":"/smzdm/haowen/fenlei/shenghuodianqi","parameters":{"name":"分类名,可在 URL 中查看","sort":"排序方式,默认为最新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["post.smzdm.com/fenlei/:name"],"target":"/haowen/fenlei/:name"},"name":"好文分类","maintainers":["LogicJake"],"description":"| 最新 | 周排行 | 月排行 |\n | ---- | ------ | ------ |\n | 0 | 7 | 30 |","location":"haowen-fenlei.ts"}} /> + +| 最新 | 周排行 | 月排行 | +| ---- | ------ | ------ | +| 0 | 7 | 30 | + +### 好文 {#shen-me-zhi-de-mai-hao-wen} + +<Route namespace="smzdm" data={{"path":"/haowen/:day?","categories":["shopping"],"example":"/smzdm/haowen/1","parameters":{"day":"以天为时间跨度,默认为 `all`,其余可以选择 `1`,`7`,`30`,`365`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"好文","maintainers":["LogicJake"],"location":"haowen.ts"}} /> + +### 排行榜 {#shen-me-zhi-de-mai-pai-hang-bang} + +<Route namespace="smzdm" data={{"path":"/ranking/:rank_type/:rank_id/:hour","categories":["shopping"],"example":"/smzdm/ranking/pinlei/11/3","parameters":{"rank_type":"榜单类型","rank_id":"榜单ID","hour":"时间跨度"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"排行榜","maintainers":["DIYgod"],"description":"- 榜单类型\n\n | 好价品类榜 | 好价电商榜 | 海淘 TOP 榜 | 好文排行榜 | 好物排行榜 |\n | ---------- | ---------- | ----------- | ---------- | ---------- |\n | pinlei | dianshang | haitao | haowen | haowu |\n\n - 榜单 ID\n\n 好价品类榜\n\n | 全部 | 食品生鲜 | 电脑数码 | 运动户外 | 家用电器 | 白菜 | 服饰鞋包 | 日用百货 |\n | ---- | -------- | -------- | -------- | -------- | ---- | -------- | -------- |\n | 11 | 12 | 13 | 14 | 15 | 17 | 74 | 75 |\n\n 好价电商榜\n\n | 券活动 | 京东 | 天猫 | 亚马逊中国 | 国美在线 | 苏宁易购 | 网易 | 西集网 | 美国亚马逊 | 日本亚马逊 | ebay |\n | ------ | ---- | ---- | ---------- | -------- | -------- | ---- | ------ | ---------- | ---------- | ---- |\n | 24 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |\n\n 海淘 TOP 榜\n\n | 全部 | 海外直邮 | 美国榜 | 欧洲榜 | 澳新榜 | 亚洲榜 | 晒物榜 |\n | ---- | -------- | ------ | ------ | ------ | ------ | ------ |\n | 39 | 34 | 35 | 36 | 37 | 38 | hsw |\n\n 好文排行榜\n\n | 原创 | 资讯 |\n | ---- | ---- |\n | yc | zx |\n\n 好物排行榜\n\n | 新晋榜 | 消费众测 | 新锐品牌 | 好物榜单 |\n | ------ | -------- | -------- | -------- |\n | hwall | zc | nb | hw |\n\n - 时间跨度\n\n | 3 小时 | 12 小时 | 24 小时 |\n | ------ | ------- | ------- |\n | 3 | 12 | 24 |","location":"ranking.ts"}} /> + +- 榜单类型 + +| 好价品类榜 | 好价电商榜 | 海淘 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 | ### 用户文章 {#shen-me-zhi-de-mai-yong-hu-wen-zhang} -<Route author="xfangbao" example="/smzdm/article/6902738986" path="/smzdm/article/:uid" paramsDesc={['用户id,网址上直接可以看到']} /> +<Route namespace="smzdm" data={{"path":"/article/:uid","categories":["shopping"],"example":"/smzdm/article/6902738986","parameters":{"uid":"用户id,网址上直接可以看到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhiyou.smzdm.com/member/:uid/article"]},"name":"用户文章","maintainers":["xfangbao"],"location":"article.ts"}} /> ### 用户爆料 {#shen-me-zhi-de-mai-yong-hu-bao-liao} -<Route author="nczitzk" example="/smzdm/baoliao/7367111021" path="/smzdm/baoliao/:uid" paramsDesc={['用户id,网址上直接可以看到']} /> +<Route namespace="smzdm" data={{"path":"/baoliao/:uid","categories":["shopping"],"example":"/smzdm/baoliao/7367111021","parameters":{"uid":"用户id,网址上直接可以看到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhiyou.smzdm.com/member/:uid/baoliao"]},"name":"用户爆料","maintainers":["nczitzk"],"location":"baoliao.ts"}} /> ## 淘宝众筹 {#tao-bao-zhong-chou} ### 众筹项目 {#tao-bao-zhong-chou-zhong-chou-xiang-mu} -<Route author="xyqfer Fatpandac" example="/taobao/zhongchou/all" path="/taobao/zhongchou/:type?" paramsDesc={['类型, 默认为 `all` 全部']}> - | 全部 | 科技 | 食品 | 动漫 | 设计 | 公益 | 娱乐 | 影音 | 书籍 | 游戏 | 其他 | - | ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- | - | all | tech | agriculture | acg | design | love | tele | music | book | game | other | -</Route> +<Route namespace="taobao" data={{"path":"/zhongchou/:type?","categories":["shopping"],"example":"/taobao/zhongchou/all","parameters":{"type":"类型, 默认为 `all` 全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"众筹项目","maintainers":["xyqfer","Fatpandac"],"description":"| 全部 | 科技 | 食品 | 动漫 | 设计 | 公益 | 娱乐 | 影音 | 书籍 | 游戏 | 其他 |\n | ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- |\n | all | tech | agriculture | acg | design | love | tele | music | book | game | other |","location":"zhongchou.ts"}} /> + +| 全部 | 科技 | 食品 | 动漫 | 设计 | 公益 | 娱乐 | 影音 | 书籍 | 游戏 | 其他 | +| ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- | +| all | tech | agriculture | acg | design | love | tele | music | book | game | other | ## 特斯拉中国 {#te-si-la-zhong-guo} ### 价格 {#te-si-la-zhong-guo-jia-ge} -<Route author="xiaokyo" example="/tesla/price" path="/tesla/price" radar="1" /> +<Route namespace="tesla" data={{"path":"/price","categories":["shopping"],"example":"/tesla/price","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tesla.cn/model3/design","tesla.cn/"]},"name":"价格","maintainers":["xiaokyo"],"url":"tesla.cn/model3/design","location":"price/index.ts"}} /> ### 权益中心 {#te-si-la-zhong-guo-quan-yi-zhong-xin} -<Route author="simonsmh nczitzk" example="/tesla/cx/生活方式/北京" path="/tesla/cx/:category?/:city?" paramsDesc={['分类,见下表,默认为空,即全部', '城市,默认为空,即全国']} radar="1"> - | 充电免停 | 酒店 | 美食 | 生活方式 | - | -------- | ---- | ---- | -------- | +<Route namespace="tesla" data={{"path":"/cx/:category?/:city?","categories":["shopping"],"example":"/tesla/cx/生活方式/北京","parameters":{"category":"分类,见下表,默认为空,即全部","city":"城市,默认为空,即全国"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"权益中心","maintainers":["simonsmh","nczitzk"],"description":"| 充电免停 | 酒店 | 美食 | 生活方式 |\n | -------- | ---- | ---- | -------- |\n\n :::tip\n 分类为 **充电免停** 时,城市参数不起作用\n :::\n\n <details>\n <summary>可选城市</summary>\n\n | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 |\n | ---- | ---- | ------------------ | ---- | ---- | ---- |\n\n | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 |\n | ---- | ---- | ---- | ---- | ---- | ------ |\n\n | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 |\n | ---- | ---- | ---- | ---- | ---- | ------ |\n\n | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 |\n | ---- | ---- | ---- | ---- | ---- | ------ |\n\n | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 |\n | ------ | ---- | ---- | ---- | ---- | ---- |\n\n | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 |\n | ---- | ---- | ---- | ---- | ------ | ---- |\n\n | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 |\n | ---- | ---- | ---- | ---- | ---- | ---- |\n\n | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 |\n | ---- | ---- | -------------- | ---- | ---- | ------ |\n\n | 曲阜 | 郴州 | 济源 | 兴义 |\n | ---- | ---- | ---- | ---- |\n </details>","location":"cx.ts"}} /> - :::tip - 分类为 **充电免停** 时,城市参数不起作用 - ::: +| 充电免停 | 酒店 | 美食 | 生活方式 | +| -------- | ---- | ---- | -------- | - <details> - <summary>可选城市</summary> +:::tip +分类为 **充电免停** 时,城市参数不起作用 +::: - | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | - | ---- | ---- | ---- | ---- | ---- | ---- | +<details> + <summary>可选城市</summary> - | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | - | ---- | ---- | ------------------ | ---- | ---- | ---- | + | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | + | ---- | ---- | ------------------ | ---- | ---- | ---- | - | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | - | ------ | ---- | ---- | ---- | ---- | ---- | + | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | + | ------ | ---- | ---- | ---- | ---- | ---- | - | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | - | ---- | ---- | ---- | ---- | ------ | ---- | + | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | + | ---- | ---- | ---- | ---- | ------ | ---- | - | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | - | ---- | ---- | -------------- | ---- | ---- | ------ | + | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 曲阜 | 郴州 | 济源 | 兴义 | - | ---- | ---- | ---- | ---- | - </details> -</Route> + | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | + | ---- | ---- | -------------- | ---- | ---- | ------ | -## 玩物志 {#wan-wu-zhi} - -### 最新 {#wan-wu-zhi-zui-xin} - -<Route author="xyqfer" example="/coolbuy/newest" path="/coolbuy/newest" /> - -## 微店 {#wei-dian} - -### 商品上新 {#wei-dian-shang-pin-shang-xin} - -<Route author="LogicJake" example="/weidian/goods/431508863" path="/weidian/goods/:id" paramsDesc={['商铺 id']} /> + | 曲阜 | 郴州 | 济源 | 兴义 | + | ---- | ---- | ---- | ---- | +</details> ## 消费者报道 {#xiao-fei-zhe-bao-dao} ### 要闻 {#xiao-fei-zhe-bao-dao-yao-wen} -<Route author="EsuRt Fatpandac" example="/ccreports/article" path="/ccreports/article" /> - -## 小米 {#xiao-mi} - -### 小米众筹 {#xiao-mi-xiao-mi-zhong-chou} - -<Route author="DIYgod" example="/mi/crowdfunding" path="/mi/crowdfunding" /> +<Route namespace="ccreports" data={{"path":"/article","categories":["shopping"],"example":"/ccreports/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ccreports.com.cn/"]},"name":"要闻","maintainers":["EsuRt","Fatpandac"],"url":"www.ccreports.com.cn/","location":"index.ts"}} /> ## 小米有品 {#xiao-mi-you-pin} ### 小米有品众筹 {#xiao-mi-you-pin-xiao-mi-you-pin-zhong-chou} -<Route author="bigfei" example="/xiaomiyoupin/crowdfunding" path="/xiaomiyoupin/crowdfunding" /> +<Route namespace="xiaomiyoupin" data={{"path":"/crowdfunding","categories":["shopping"],"example":"/xiaomiyoupin/crowdfunding","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaomiyoupin.com/"]},"name":"小米有品众筹","maintainers":["bigfei"],"url":"xiaomiyoupin.com/","location":"crowdfunding.ts"}} /> ### 小米有品每日上新 {#xiao-mi-you-pin-xiao-mi-you-pin-mei-ri-shang-xin} -<Route author="xyqfer DIYgod bigfei" example="/xiaomiyoupin/latest" path="/xiaomiyoupin/latest" /> +<Route namespace="xiaomiyoupin" data={{"path":"/latest","categories":["shopping"],"example":"/xiaomiyoupin/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaomiyoupin.com/"]},"name":"小米有品每日上新","maintainers":["xyqfer","DIYgod","bigfei"],"url":"xiaomiyoupin.com/","location":"latest.ts"}} /> ## 秀动网 {#xiu-dong-wang} +### 厂牌 - 演出更新 {#xiu-dong-wang-chang-pai-yan-chu-geng-xin} + +<Route namespace="showstart" data={{"path":"/brand/:id","categories":["shopping"],"example":"/showstart/brand/34707","parameters":{"id":"厂牌 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.showstart.com/host/:id"]},"name":"厂牌 - 演出更新","maintainers":["lchtao26"],"description":":::tip\n厂牌 ID 查询: `/showstart/search/brand/:keyword`,如: [https://rsshub.app/showstart/search/brand/ 声场](https://rsshub.app/showstart/search/brand/声场)\n:::","location":"brand.ts"}} /> + +:::tip +厂牌 ID 查询: `/showstart/search/brand/:keyword`,如: [https://rsshub.app/showstart/search/brand/ 声场](https://rsshub.app/showstart/search/brand/声场) +::: + ### 演出更新 {#xiu-dong-wang-yan-chu-geng-xin} -<Route author="lchtao26" example="/showstart/event/571/3" path="/showstart/event/:cityCode/:showStyle?" paramsDesc={['演出城市 (编号)', '演出风格 (编号)']} /> +<Route namespace="showstart" data={{"path":"/event/:cityCode/:showStyle?","categories":["shopping"],"example":"/showstart/event/571/3","parameters":{"cityCode":"演出城市 (编号)","showStyle":"演出风格 (编号)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"演出更新","maintainers":["lchtao26"],"description":":::tip\n- 演出城市 `cityCode` 查询: `/showstart/search/city/:keyword`, 如: [https://rsshub.app/showstart/search/city/ 杭州](https://rsshub.app/showstart/search/city/杭州)\n\n- 演出风格 `showStyle` 查询: `/showstart/search/style/:keyword`,如: [https://rsshub.app/showstart/search/style/ 摇滚](https://rsshub.app/showstart/search/style/摇滚)\n:::","location":"event.ts"}} /> :::tip - 演出城市 `cityCode` 查询: `/showstart/search/city/:keyword`, 如: [https://rsshub.app/showstart/search/city/ 杭州](https://rsshub.app/showstart/search/city/杭州) @@ -552,103 +470,18 @@ For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3 ### 演出搜索 {#xiu-dong-wang-yan-chu-sou-suo} -<Route author="lchtao26" example="/showstart/search/live" path="/showstart/search/:type/:keyword?" paramsDesc={['类别', '搜索关键词']} /> +<Route namespace="showstart" data={{"path":"/search/:type/:keyword?","categories":["shopping"],"example":"/showstart/search/live","parameters":{"type":"类别","keyword":"搜索关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"演出搜索","maintainers":["lchtao26"],"location":"search.ts"}} /> ### 音乐人 - 演出更新 {#xiu-dong-wang-yin-yue-ren-yan-chu-geng-xin} -<Route author="lchtao26" example="/showstart/artist/301783" path="/showstart/artist/:id" paramsDesc={['音乐人 ID']} /> +<Route namespace="showstart" data={{"path":"/artist/:id","categories":["shopping"],"example":"/showstart/artist/301783","parameters":{"id":"音乐人 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.showstart.com/artist/:id"]},"name":"音乐人 - 演出更新","maintainers":["lchtao26"],"description":":::tip\n音乐人 ID 查询: `/showstart/search/artist/:keyword`,如: [https://rsshub.app/showstart/search/artist/ 周杰伦](https://rsshub.app/showstart/search/artist/周杰伦)\n:::","location":"artist.ts"}} /> :::tip 音乐人 ID 查询: `/showstart/search/artist/:keyword`,如: [https://rsshub.app/showstart/search/artist/ 周杰伦](https://rsshub.app/showstart/search/artist/周杰伦) ::: -### 厂牌 - 演出更新 {#xiu-dong-wang-chang-pai-yan-chu-geng-xin} - -<Route author="lchtao26" example="/showstart/brand/34707" path="/showstart/brand/:id" paramsDesc={['厂牌 ID']} /> - -:::tip -厂牌 ID 查询: `/showstart/search/brand/:keyword`,如: [https://rsshub.app/showstart/search/brand/ 声场](https://rsshub.app/showstart/search/brand/声场) -::: - -## 有赞 {#you-zan} - -### 商品上新 {#you-zan-shang-pin-shang-xin} - -<Route author="LogicJake" example="/youzan/goods/13328377" path="/youzan/goods/:id" paramsDesc={['商铺id']} /> - -## 正版中国 {#zheng-ban-zhong-guo} - -### 分类 {#zheng-ban-zhong-guo-fen-lei} - -<Route author="sanmmm nczitzk" example="/getitfree/category/pc" path="/getitfree/category/:id" paramsDesc={['分类,见下表,可在对应分类页中找到,默认为所有类别']} radar="1"> - :::tip - 可以叠加使用得到分类结果并集,如 [`/getitfree/category/pc,android`](https://rsshub.app/getitfree/category/pc,android) - ::: - - | 所有类别 | Android | iOS | Mac | PC | UWP | 公告 | 永久免费 | 限时免费 | 正版折扣 | - | -------- | ------- | --- | --- | -- | --- | ------------ | -------- | -------- | -------- | - | | android | ios | mac | pc | uwp | notification | free | giveaway | discount | -</Route> - -### 标签 {#zheng-ban-zhong-guo-biao-qian} - -<Route author="nczitzk" example="/getitfree/tag/ai" path="/getitfree/tag/:id" paramsDesc={['标签,见下表,可在对应标签页中找到,默认为所有标签']} radar="1"> - :::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 | 下载 | 书签管理 | 健康 | - | -------- | ------- | ---- | -------- | ---- | - - | 全平台 | 办公软件 | 加密保护 | 卸载 / 清理 / 优化 | 卸载清理 | - | ------ | -------- | -------- | ------------------ | -------- | - - | 图像处理 | 图片 / 编辑 / 管理 | 壁纸 | 备份 / 恢复 / 加密 | 备份恢复 | - | -------- | ------------------ | ---- | ------------------ | -------- | - - | 字体 | 学习 | 密码管理 | 导航 | 开始菜单 | - | ---- | ---- | -------- | ---- | -------- | - - | 录屏截图 | 影音 / 刻录 / 转换 | 投屏镜像 | 提醒 | 摄影 | - | -------- | ------------------ | -------- | ---- | ---- | - - | 播放器 | 收藏夹 | 效率工具 | 数据传输 | 数据恢复 | - | ------ | ------ | -------- | -------- | -------- | - - | 数据擦除 | 文件管理 | 文档 / 转换 / 压缩 | 文档扫描 | 日历 | - | -------- | -------- | ------------------ | -------- | ---- | - - | 杀毒防护 | 查重 | 正版特惠 | 水印 | 清理优化 | - | -------- | ---- | -------- | ---- | -------- | - - | 滤镜 | 硬件外设 | 硬盘 / 分区 / 驱动 | 硬盘检测 | 稍后阅读 | - | ---- | -------- | ------------------ | -------- | -------- | - - | 笔记 | 系统工具 | 素材 | 网络 / 安全 / 传输 | 网络安全 | - | ---- | -------- | ---- | ------------------ | -------- | - - | 色彩 | 视频剪辑 | 视频转换 | 记账 | 设计 | - | ---- | -------- | -------- | ---- | ---- | - - | 软件卸载 | 远程控制 | 音乐 | 音频 | 驱动 | - | -------- | -------- | ---- | ---- | ---- | -</Route> - -### 搜索 {#zheng-ban-zhong-guo-sou-suo} - -<Route author="sanmmm nczitzk" example="/getitfree/search/windows" path="/getitfree/search/:keyword" paramsDesc={['关键字']} radar="1" /> - ## 中国养猪网 {#zhong-guo-yang-zhu-wang} -### 每日生猪价格更新 {#zhong-guo-yang-zhu-wang-mei-ri-sheng-zhu-jia-ge-geng-xin} +### Unknown {#zhong-guo-yang-zhu-wang-unknown} -<Route author="importcjj" example="/zhuwang/zhujia" path="/zhuwang/zhujia" radar="1" /> +<Route namespace="zhuwang" data={{"path":"/zhujia","categories":["shopping"],"example":"/zhuwang/zhujia","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhujia.zhuwang.cc/"]},"name":"Unknown","maintainers":[],"url":"zhujia.zhuwang.cc/","location":"index.ts"}} /> diff --git a/website/docs/routes/social-media.mdx b/website/docs/routes/social-media.mdx index 50fef9293..9b08c1c51 100644 --- a/website/docs/routes/social-media.mdx +++ b/website/docs/routes/social-media.mdx @@ -1,299 +1,227 @@ -# 💬 Social Media +# social-media -## 755 {#755} +## Bilibili {#bilibili} -### 用户时间线 {#755-yong-hu-shi-jian-xian} +### B 站每周必看 {#bilibili-b-zhan-mei-zhou-bi-kan} -<Route author="hoilc" example="/755/user/akimoto-manatsu" path="/755/user/:username" paramsDesc={['用户名, 可在 URL 中找到']} /> - -## bilibili {#bilibili} - -### 番剧 {#bilibili-fan-ju} - -<Route author="DIYgod" example="/bilibili/bangumi/media/9192" path="/bilibili/bangumi/media/:mediaid" paramsDesc={['番剧媒体 id, 番剧主页 URL 中获取']} /> - -### 用户追番列表 {#bilibili-yong-hu-zhui-fan-lie-biao} - -<Route author="wdssmq" example="/bilibili/user/bangumi/208259" path="/bilibili/user/bangumi/:uid/:type?" paramsDesc={['用户 id','1为番,2为剧,留空为1']} radar="1" /> - -### UP 主投稿 {#bilibili-up-zhu-tou-gao} - -<Route author="DIYgod" example="/bilibili/user/video/2267573" path="/bilibili/user/video/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '默认为开启内嵌视频, 任意值为关闭']} anticrawler="1" radar="1"> - :::tip[动态的专栏显示全文] - 可以使用 [UP 主动态](#bilibili-up-zhu-dong-tai)路由作为代替绕过反爬限制 - ::: -</Route> - -### UP 主专栏 {#bilibili-up-zhu-zhuan-lan} - -<Route author="lengthmin" example="/bilibili/user/article/334958638" path="/bilibili/user/article/:uid" paramsDesc={['用户 id, 可在 UP 主主页中找到']} radar="1" /> - -### UP 主动态 {#bilibili-up-zhu-dong-tai} - -<Route author="DIYgod zytomorrow CaoMeiYouRen JimenezLi" example="/bilibili/user/dynamic/2267573" path="/bilibili/user/dynamic/:uid/:routeParams?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '额外参数;请参阅以下说明和表格']} radar="1"> - | 键 | 含义 | 接受的值 | 默认值 | - | ------------ | --------------------------------- | -------------- | ------ | - | showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | - | disableEmbed | 关闭内嵌视频 | 0/1/true/false | false | - | useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | - | directLink | 使用内容直链 | 0/1/true/false | false | - - 用例:`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1` - - :::tip[动态的专栏显示全文] - 动态的专栏显示全文请使用通用参数里的 `mode=fulltext` - - 举例: bilibili 专栏全文输出 /bilibili/user/dynamic/2267573/?mode=fulltext - ::: -</Route> - -### UP 主频道的合集 {#bilibili-up-zhu-pin-dao-de-he-ji} - -<Route author="shininome" example="/bilibili/user/collection/245645656/529166" path="/bilibili/user/collection/:uid/:sid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '合集 id, 可在合集页面的 URL 中找到', '默认为开启内嵌视频, 任意值为关闭']} /> - -### UP 主频道的视频列表 {#bilibili-up-zhu-pin-dao-de-shi-pin-lie-biao} - -<Route author="weirongxu" example="/bilibili/user/channel/2267573/396050" path="/bilibili/user/channel/:uid/:sid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '频道 id, 可在频道的 URL 中找到', '默认为开启内嵌视频, 任意值为关闭']} /> - -### UP 主默认收藏夹 {#bilibili-up-zhu-mo-ren-shou-cang-jia} - -<Route author="DIYgod" example="/bilibili/user/fav/2267573" path="/bilibili/user/fav/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '默认为开启内嵌视频, 任意值为关闭']} radar="1" /> - -### UP 主非默认收藏夹 {#bilibili-up-zhu-fei-mo-ren-shou-cang-jia} - -<Route author="Qixingchen" example="/bilibili/fav/756508/50948568" path="/bilibili/fav/:uid/:fid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能', '默认为开启内嵌视频, 任意值为关闭']} /> - -### UP 主投币视频 {#bilibili-up-zhu-tou-bi-shi-pin} - -<Route author="DIYgod" example="/bilibili/user/coin/208259" path="/bilibili/user/coin/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '默认为开启内嵌视频, 任意值为关闭']} radar="1" /> - -### UP 主点赞视频 {#bilibili-up-zhu-dian-zan-shi-pin} - -<Route author="ygguorun" example="/bilibili/user/like/208259" path="/bilibili/user/like/:uid/:disableEmbed?" paramsDesc={['用户 id, 可在 UP 主主页中找到', '默认为开启内嵌视频, 任意值为关闭']} radar="1" /> - -### UP 主粉丝 {#bilibili-up-zhu-fen-si} - -<Route author="Qixingchen" example="/bilibili/user/followers/2267573/3" path="/bilibili/user/followers/:uid/:loginUid" paramsDesc={['用户 id, 可在 UP 主主页中找到','用于登入的用户id,需要配置对应的 Cookie 值']} radar="1" configRequired="1"> - :::warning - UP 主粉丝现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> - -### UP 主关注用户 {#bilibili-up-zhu-guan-zhu-yong-hu} - -<Route author="Qixingchen" example="/bilibili/user/followings/2267573/3" path="/bilibili/user/followings/:uid/:loginUid" paramsDesc={['用户 id, 可在 UP 主主页中找到','用于登入的用户id,需要配置对应的 Cookie 值']} radar="1" configRequired="1"> - :::warning - UP 主关注用户现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> - -### 分区视频 {#bilibili-fen-qu-shi-pin} - -<Route author="DIYgod" example="/bilibili/partion/33" path="/bilibili/partion/:tid/:disableEmbed?" paramsDesc={['分区 id', '默认为开启内嵌视频, 任意值为关闭']} radar="1"> - 动画 - - | MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 | - | ------- | ------ | ---------------- | ---- | ---- | - | 24 | 25 | 47 | 86 | 27 | - - 番剧 - - | 连载动画 | 完结动画 | 资讯 | 官方延伸 | - | -------- | -------- | ---- | -------- | - | 33 | 32 | 51 | 152 | - - 国创 - - | 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 | - | -------- | ------------ | ------ | -------------- | ---- | - | 153 | 168 | 169 | 195 | 170 | - - 音乐 - - | 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ | - | -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- | - | 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 | - - 舞蹈 - - | 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 | - | ---- | ---- | -------- | ------ | -------- | -------- | - | 20 | 198 | 199 | 200 | 154 | 156 | - - 游戏 - - | 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen | - | -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- | - | 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 | - - 知识 - - | 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 | - | -------- | -------- | ---- | -------- | -------- | ------------ | - | 201 | 124 | 207 | 208 | 209 | 122 | - - ~~科技~~ - - | ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ | - | ---------------- | -------- | -------- | -------- | - | 39 | 96 | 98 | 176 | - - 数码 - - | 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 | - | -------- | -------- | -------- | -------- | - | 95 | 189 | 190 | 191 | - - 生活 - - | 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ | - | ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- | - | 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 | - - 鬼畜 - - | 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 | - | -------- | ------ | ------------- | -------- | - | 22 | 26 | 126 | 127 | - - 时尚 - - | 美妆 | 服饰 | 健身 | T 台 | 风向标 | - | ---- | ---- | ---- | ---- | ------ | - | 157 | 158 | 164 | 159 | 192 | - - ~~广告~~ - - | ~~广告~~ | - | -------- | - | 166 | - - 资讯 - - | 热点 | 环球 | 社会 | 综合 | - | ---- | ---- | ---- | ---- | - | 203 | 204 | 205 | 206 | - - 娱乐 - - | 综艺 | 明星 | Korea 相关 | - | ---- | ---- | ---------- | - | 71 | 137 | 131 | - - 影视 - - | 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 | - | -------- | -------- | ---- | ---------- | - | 182 | 183 | 85 | 184 | - - 纪录片 - - | 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 | - | ---- | ---------- | ---------------- | ---- | ---------------- | - | 177 | 37 | 178 | 179 | 180 | - - 电影 - - | 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 | - | ---- | -------- | -------- | -------- | -------- | - | 23 | 147 | 145 | 146 | 83 | - - 电视剧 - - | 全部 | 国产剧 | 海外剧 | - | ---- | ------ | ------ | - | 11 | 185 | 187 | -</Route> - -### 分区视频排行榜 {#bilibili-fen-qu-shi-pin-pai-hang-bang} - -<Route author="lengthmin" example="/bilibili/partion/ranking/171/3" path="/bilibili/partion/ranking/:tid/:days?/:disableEmbed?" paramsDesc={['分区 id, 见上方表格', '缺省为 7, 指最近多少天内的热度排序', '默认为开启内嵌视频, 任意值为关闭']} /> - -### 视频选集列表 {#bilibili-shi-pin-xuan-ji-lie-biao} - -<Route author="sxzz" example="/bilibili/video/page/BV1i7411M7N9" path="/bilibili/video/page/:bvid/:disableEmbed?" paramsDesc={['可在视频页 URL 中找到', '默认为开启内嵌视频, 任意值为关闭']} /> - -### 视频评论 {#bilibili-shi-pin-ping-lun} - -<Route author="Qixingchen" example="/bilibili/video/reply/BV1vA411b7ip" path="/bilibili/video/reply/:bvid" paramsDesc={['可在视频页 URL 中找到']} /> - -### 视频弹幕 {#bilibili-shi-pin-tan-mu} - -<Route author="Qixingchen" example="/bilibili/video/danmaku/BV1vA411b7ip/1" path="/bilibili/video/danmaku/:bvid/:pid?" paramsDesc={['视频AV号,可在视频页 URL 中找到','分P号,不填默认为1']} /> +<Route namespace="bilibili" data={{"path":"/weekly/:disableEmbed?","categories":["social-media"],"example":"/bilibili/weekly","parameters":{"disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"B 站每周必看","maintainers":["ttttmr"],"location":"weekly-recommend.ts"}} /> ### link 公告 {#bilibili-link-gong-gao} -<Route author="Qixingchen" example="/bilibili/link/news/live" path="/bilibili/link/news/:product" paramsDesc={['公告分类, 包括 直播:live 小视频:vc 相簿:wh']} /> +<Route namespace="bilibili" data={{"path":"/link/news/:product","categories":["social-media"],"example":"/bilibili/link/news/live","parameters":{"product":"公告分类, 包括 直播:live 小视频:vc 相簿:wh"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"link 公告","maintainers":["Qixingchen"],"location":"link-news.ts"}} /> -### 视频搜索 {#bilibili-shi-pin-sou-suo} +### UP 主专栏 {#bilibili-up-zhu-zhuan-lan} -<Route author="Symty" example="/bilibili/vsearch/RSSHub" path="/bilibili/vsearch/:kw/:order?/:disableEmbed?/:tid?" paramsDesc={['检索关键字', '排序方式, 综合:totalrank 最多点击:click 最新发布:pubdate(缺省) 最多弹幕:dm 最多收藏:stow', '默认为开启内嵌视频, 任意值为关闭', '分区 id']}> - 分区 id 的取值请参考下表: +<Route namespace="bilibili" data={{"path":"/user/article/:uid","categories":["social-media"],"example":"/bilibili/user/article/334958638","parameters":{"uid":"用户 id, 可在 UP 主主页中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"]},"name":"UP 主专栏","maintainers":["lengthmin","Qixingchen"],"location":"article.ts"}} /> - | 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 | - | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ | - | 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 | -</Route> +### UP 主投币视频 {#bilibili-up-zhu-tou-bi-shi-pin} -### 用户关注动态 {#bilibili-yong-hu-guan-zhu-dong-tai} +<Route namespace="bilibili" data={{"path":"/user/coin/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/coin/208259","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/coin/:uid"},"name":"UP 主投币视频","maintainers":["DIYgod"],"location":"coin.ts"}} /> -<Route author="TigerCubDen JimenezLi" example="/bilibili/followings/dynamic/109937383" path="/bilibili/followings/dynamic/:uid/:routeParams?" paramsDesc={['用户 id', '额外参数;请参阅 [#UP 主动态](#bilibili-up-zhu-dong-tai) 的说明和表格']} configRequired="1"> - :::warning - 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +### UP 主动态 {#bilibili-up-zhu-dong-tai} -### 用户关注视频动态 {#bilibili-yong-hu-guan-zhu-shi-pin-dong-tai} +<Route namespace="bilibili" data={{"path":"/user/dynamic/:uid/:routeParams?","categories":["social-media"],"example":"/bilibili/user/dynamic/2267573","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","routeParams":"额外参数;请参阅以下说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/dynamic/:uid"},"name":"UP 主动态","maintainers":["DIYgod","zytomorrow","CaoMeiYouRen","JimenezLi"],"description":"| 键 | 含义 | 接受的值 | 默认值 |\n | ------------ | --------------------------------- | -------------- | ------ |\n | showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false |\n | disableEmbed | 关闭内嵌视频 | 0/1/true/false | false |\n | useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false |\n | directLink | 使用内容直链 | 0/1/true/false | false |\n\n 用例:`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1`\n\n :::tip[动态的专栏显示全文]\n 动态的专栏显示全文请使用通用参数里的 `mode=fulltext`\n\n 举例: bilibili 专栏全文输出 /bilibili/user/dynamic/2267573/?mode=fulltext\n :::","location":"dynamic.ts"}} /> -<Route author="LogicJake" example="/bilibili/followings/video/2267573" path="/bilibili/followings/video/:uid/:disableEmbed?" paramsDesc={['用户 id', '默认为开启内嵌视频, 任意值为关闭']} configRequired="1"> - :::warning - 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +| 键 | 含义 | 接受的值 | 默认值 | +| ------------ | --------------------------------- | -------------- | ------ | +| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | +| disableEmbed | 关闭内嵌视频 | 0/1/true/false | false | +| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | +| directLink | 使用内容直链 | 0/1/true/false | false | -### 用户关注专栏 {#bilibili-yong-hu-guan-zhu-zhuan-lan} +用例:`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1` -<Route author="woshiluo" example="/bilibili/followings/article/99800931" path="/bilibili/followings/article/:uid" paramsDesc={['用户 id']} configRequired="1"> - :::warning - 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +:::tip[动态的专栏显示全文] +动态的专栏显示全文请使用通用参数里的 `mode=fulltext` -### 用户稍后再看 {#bilibili-yong-hu-shao-hou-zai-kan} +举例: bilibili 专栏全文输出 /bilibili/user/dynamic/2267573/?mode=fulltext +::: -<Route author="JimenezLi" example="/bilibili/watchlater/2267573" path="/bilibili/watchlater/:uid/:disableEmbed?" paramsDesc={['用户 id', '默认为开启内嵌视频, 任意值为关闭']} configRequired="1"> - :::warning - 用户稍后再看需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +### UP 主非默认收藏夹 {#bilibili-up-zhu-fei-mo-ren-shou-cang-jia} -### 直播开播 {#bilibili-zhi-bo-kai-bo} +<Route namespace="bilibili" data={{"path":"/fav/:uid/:fid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/fav/756508/50948568","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","fid":"收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"UP 主非默认收藏夹","maintainers":["Qixingchen"],"location":"fav.ts"}} /> -见 [#哔哩哔哩直播](/routes/live#bi-li-bi-li-zhi-bo) +### UP 主粉丝 {#bilibili-up-zhu-fen-si} -### 直播搜索 {#bilibili-zhi-bo-sou-suo} +<Route namespace="bilibili" data={{"path":"/user/followers/:uid/:loginUid","categories":["social-media"],"example":"/bilibili/user/followers/2267573/3","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","loginUid":"用于登入的用户id,需要配置对应的 Cookie 值"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/followers/:uid"},"name":"UP 主粉丝","maintainers":["Qixingchen"],"description":":::warning\n UP 主粉丝现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"followers.ts"}} /> -见 [#哔哩哔哩直播](/routes/live#bi-li-bi-li-zhi-bo) +:::warning +UP 主粉丝现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: -### 直播分区 {#bilibili-zhi-bo-fen-qu} +### UP 主关注用户 {#bilibili-up-zhu-guan-zhu-yong-hu} -见 [#哔哩哔哩直播](/routes/live#bi-li-bi-li-zhi-bo) +<Route namespace="bilibili" data={{"path":"/user/followings/:uid/:loginUid","categories":["social-media"],"example":"/bilibili/user/followings/2267573/3","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","loginUid":"用于登入的用户id,需要配置对应的 Cookie 值"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/followings/:uid"},"name":"UP 主关注用户","maintainers":["Qixingchen"],"description":":::warning\n UP 主关注用户现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"followings.ts"}} /> -### 会员购新品上架 {#bilibili-hui-yuan-gou-xin-pin-shang-jia} +:::warning +UP 主关注用户现在需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: -<Route author="DIYgod" example="/bilibili/mall/new/1" path="/bilibili/mall/new/:category?" paramsDesc={['分类,默认全部,见下表']}> - | 全部 | 手办 | 魔力赏 | 周边 | 游戏 | - | ---- | ---- | ------ | ---- | ---- | - | 0 | 1 | 7 | 3 | 6 | -</Route> +### UP 主点赞视频 {#bilibili-up-zhu-dian-zan-shi-pin} + +<Route namespace="bilibili" data={{"path":"/user/like/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/like/208259","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/like/:uid"},"name":"UP 主点赞视频","maintainers":["ygguorun"],"location":"like.ts"}} /> + +### UP 主频道的视频列表 {#bilibili-up-zhu-pin-dao-de-shi-pin-lie-biao} + +<Route namespace="bilibili" data={{"path":"/user/channel/:uid/:sid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/channel/2267573/396050","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","sid":"频道 id, 可在频道的 URL 中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"UP 主频道的视频列表","maintainers":["weirongxu"],"location":"user-channel.ts"}} /> + +### UP 主频道的合集 {#bilibili-up-zhu-pin-dao-de-he-ji} + +<Route namespace="bilibili" data={{"path":"/user/collection/:uid/:sid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/collection/245645656/529166","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","sid":"合集 id, 可在合集页面的 URL 中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"UP 主频道的合集","maintainers":["shininome"],"location":"user-collection.ts"}} /> + +### UP 主默认收藏夹 {#bilibili-up-zhu-mo-ren-shou-cang-jia} + +<Route namespace="bilibili" data={{"path":"/user/fav/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/fav/2267573","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid","space.bilibili.com/:uid/favlist"],"target":"/user/fav/:uid"},"name":"UP 主默认收藏夹","maintainers":["DIYgod"],"location":"user-fav.ts"}} /> + +### UP 主投稿 {#bilibili-up-zhu-tou-gao} + +<Route namespace="bilibili" data={{"path":"/user/video/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/user/video/2267573","parameters":{"uid":"用户 id, 可在 UP 主主页中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/video/:uid"},"name":"UP 主投稿","maintainers":["DIYgod"],"description":":::tip[动态的专栏显示全文]\n 可以使用 [UP 主动态](#bilibili-up-zhu-dong-tai)路由作为代替绕过反爬限制\n :::","location":"video.ts"}} /> + +:::tip[动态的专栏显示全文] +可以使用 [UP 主动态](#bilibili-up-zhu-dong-tai)路由作为代替绕过反爬限制 +::: + +### 分区视频排行榜 {#bilibili-fen-qu-shi-pin-pai-hang-bang} + +<Route namespace="bilibili" data={{"path":"/partion/ranking/:tid/:days?/:disableEmbed?","categories":["social-media"],"example":"/bilibili/partion/ranking/171/3","parameters":{"tid":"分区 id, 见上方表格","days":"缺省为 7, 指最近多少天内的热度排序","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分区视频排行榜","maintainers":["lengthmin"],"location":"partion-ranking.ts"}} /> + +### 分区视频 {#bilibili-fen-qu-shi-pin} + +<Route namespace="bilibili" data={{"path":"/partion/:tid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/partion/33","parameters":{"tid":"分区 id","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分区视频","maintainers":["DIYgod"],"description":"动画\n\n | MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 |\n | ------- | ------ | ---------------- | ---- | ---- |\n | 24 | 25 | 47 | 86 | 27 |\n\n 番剧\n\n | 连载动画 | 完结动画 | 资讯 | 官方延伸 |\n | -------- | -------- | ---- | -------- |\n | 33 | 32 | 51 | 152 |\n\n 国创\n\n | 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 |\n | -------- | ------------ | ------ | -------------- | ---- |\n | 153 | 168 | 169 | 195 | 170 |\n\n 音乐\n\n | 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ |\n | -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- |\n | 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 |\n\n 舞蹈\n\n | 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 |\n | ---- | ---- | -------- | ------ | -------- | -------- |\n | 20 | 198 | 199 | 200 | 154 | 156 |\n\n 游戏\n\n | 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen |\n | -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- |\n | 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 |\n\n 知识\n\n | 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 |\n | -------- | -------- | ---- | -------- | -------- | ------------ |\n | 201 | 124 | 207 | 208 | 209 | 122 |\n\n ~~科技~~\n\n | ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ |\n | ---------------- | -------- | -------- | -------- |\n | 39 | 96 | 98 | 176 |\n\n 数码\n\n | 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 |\n | -------- | -------- | -------- | -------- |\n | 95 | 189 | 190 | 191 |\n\n 生活\n\n | 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ |\n | ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- |\n | 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 |\n\n 鬼畜\n\n | 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 |\n | -------- | ------ | ------------- | -------- |\n | 22 | 26 | 126 | 127 |\n\n 时尚\n\n | 美妆 | 服饰 | 健身 | T 台 | 风向标 |\n | ---- | ---- | ---- | ---- | ------ |\n | 157 | 158 | 164 | 159 | 192 |\n\n ~~广告~~\n\n | ~~广告~~ |\n | -------- |\n | 166 |\n\n 资讯\n\n | 热点 | 环球 | 社会 | 综合 |\n | ---- | ---- | ---- | ---- |\n | 203 | 204 | 205 | 206 |\n\n 娱乐\n\n | 综艺 | 明星 | Korea 相关 |\n | ---- | ---- | ---------- |\n | 71 | 137 | 131 |\n\n 影视\n\n | 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 |\n | -------- | -------- | ---- | ---------- |\n | 182 | 183 | 85 | 184 |\n\n 纪录片\n\n | 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 |\n | ---- | ---------- | ---------------- | ---- | ---------------- |\n | 177 | 37 | 178 | 179 | 180 |\n\n 电影\n\n | 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 |\n | ---- | -------- | -------- | -------- | -------- |\n | 23 | 147 | 145 | 146 | 83 |\n\n 电视剧\n\n | 全部 | 国产剧 | 海外剧 |\n | ---- | ------ | ------ |\n | 11 | 185 | 187 |","location":"partion.ts"}} /> + +动画 + +| MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 | +| ------- | ------ | ---------------- | ---- | ---- | +| 24 | 25 | 47 | 86 | 27 | + +番剧 + +| 连载动画 | 完结动画 | 资讯 | 官方延伸 | +| -------- | -------- | ---- | -------- | +| 33 | 32 | 51 | 152 | + +国创 + +| 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 | +| -------- | ------------ | ------ | -------------- | ---- | +| 153 | 168 | 169 | 195 | 170 | + +音乐 + +| 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ | +| -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- | +| 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 | + +舞蹈 + +| 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 | +| ---- | ---- | -------- | ------ | -------- | -------- | +| 20 | 198 | 199 | 200 | 154 | 156 | + +游戏 + +| 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen | +| -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- | +| 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 | + +知识 + +| 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 | +| -------- | -------- | ---- | -------- | -------- | ------------ | +| 201 | 124 | 207 | 208 | 209 | 122 | + +~~科技~~ + +| ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ | +| ---------------- | -------- | -------- | -------- | +| 39 | 96 | 98 | 176 | + +数码 + +| 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 | +| -------- | -------- | -------- | -------- | +| 95 | 189 | 190 | 191 | + +生活 + +| 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ | +| ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- | +| 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 | + +鬼畜 + +| 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 | +| -------- | ------ | ------------- | -------- | +| 22 | 26 | 126 | 127 | + +时尚 + +| 美妆 | 服饰 | 健身 | T 台 | 风向标 | +| ---- | ---- | ---- | ---- | ------ | +| 157 | 158 | 164 | 159 | 192 | + +~~广告~~ + +| ~~广告~~ | +| -------- | +| 166 | + +资讯 + +| 热点 | 环球 | 社会 | 综合 | +| ---- | ---- | ---- | ---- | +| 203 | 204 | 205 | 206 | + +娱乐 + +| 综艺 | 明星 | Korea 相关 | +| ---- | ---- | ---------- | +| 71 | 137 | 131 | + +影视 + +| 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 | +| -------- | -------- | ---- | ---------- | +| 182 | 183 | 85 | 184 | + +纪录片 + +| 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 | +| ---- | ---------- | ---------------- | ---- | ---------------- | +| 177 | 37 | 178 | 179 | 180 | + +电影 + +| 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 | +| ---- | -------- | -------- | -------- | -------- | +| 23 | 147 | 145 | 146 | 83 | + +电视剧 + +| 全部 | 国产剧 | 海外剧 | +| ---- | ------ | ------ | +| 11 | 185 | 187 | + +### 歌单 {#bilibili-ge-dan} + +<Route namespace="bilibili" data={{"path":"/audio/:id","categories":["social-media"],"example":"/bilibili/audio/10624","parameters":{"id":"歌单 id, 可在歌单页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"歌单","maintainers":["LogicJake"],"location":"audio.ts"}} /> ### 会员购作品 {#bilibili-hui-yuan-gou-zuo-pin} -<Route author="DIYgod" example="/bilibili/mall/ip/0_3000294" path="/bilibili/mall/ip/:id" paramsDesc={['作品 id, 可在作品列表页 URL 中找到']} /> +<Route namespace="bilibili" data={{"path":"/mall/ip/:id","categories":["social-media"],"example":"/bilibili/mall/ip/0_3000294","parameters":{"id":"作品 id, 可在作品列表页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"会员购作品","maintainers":["DIYgod"],"location":"mall-ip.ts"}} /> + +### 会员购新品上架 {#bilibili-hui-yuan-gou-xin-pin-shang-jia} + +<Route namespace="bilibili" data={{"path":"/mall/new/:category?","categories":["social-media"],"example":"/bilibili/mall/new/1","parameters":{"category":"分类,默认全部,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"会员购新品上架","maintainers":["DIYgod"],"description":"| 全部 | 手办 | 魔力赏 | 周边 | 游戏 |\n | ---- | ---- | ------ | ---- | ---- |\n | 0 | 1 | 7 | 3 | 6 |","location":"mall-new.ts"}} /> + +| 全部 | 手办 | 魔力赏 | 周边 | 游戏 | +| ---- | ---- | ------ | ---- | ---- | +| 0 | 1 | 7 | 3 | 6 | ### 会员购票务 {#bilibili-hui-yuan-gou-piao-wu} -<Route author="nightmare-mio" example="/bilibili/platform/-1" path="/bilibili/platform/:area?/:p_type?/:uid?" paramsDesc={['省市-国标码,默认为-1即全国','类型:见下表,默认为全部类型','用户id,可以不填,不过不填不设置cookie,搜索结果与登入账号后搜索结果不一样。可以在url中找到,需要配置cookie值,只需要SESSDATA的值即可']} /> +<Route namespace="bilibili" data={{"path":"/platform/:area?/:p_type?/:uid?","categories":["social-media"],"example":"/bilibili/platform/-1","parameters":{"area":"省市-国标码,默认为-1即全国","p_type":"类型:见下表,默认为全部类型","uid":"用户id,可以不填,不过不填不设置cookie,搜索结果与登入账号后搜索结果不一样。可以在url中找到,需要配置cookie值,只需要SESSDATA的值即可"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["show.bilibili.com/platform"]},"name":"会员购票务","maintainers":["nightmare-mio"],"url":"show.bilibili.com/platform","description":"| 类型 |\n| -------- |\n| 演出 |\n| 展览 |\n| 本地生活 |","location":"platform.ts"}} /> | 类型 | | -------- | @@ -301,217 +229,153 @@ | 展览 | | 本地生活 | -### 综合热门 {#bilibili-zong-he-re-men} +### 漫画更新 {#bilibili-man-hua-geng-xin} -<Route author="ziminliu" example="/bilibili/popular/all" path="/bilibili/popular/all" /> +<Route namespace="bilibili" data={{"path":"/manga/update/:comicid","categories":["social-media"],"example":"/bilibili/manga/update/26009","parameters":{"comicid":"漫画 id, 可在 URL 中找到, 支持带有`mc`前缀"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["manga.bilibili.com/detail/:comicid"]},"name":"漫画更新","maintainers":["hoilc"],"location":"manga-update.ts"}} /> ### 热搜 {#bilibili-re-sou} -<Route author="CaoMeiYouRen" example="/bilibili/hot-search" path="/bilibili/hot-search" /> +<Route namespace="bilibili" data={{"path":"/hot-search","categories":["social-media"],"example":"/bilibili/hot-search","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.bilibili.com/"]},"name":"热搜","maintainers":["CaoMeiYouRen"],"url":"www.bilibili.com/","location":"hot-search.ts"}} /> -### 排行榜 {#bilibili-pai-hang-bang} +### 视频弹幕 {#bilibili-shi-pin-tan-mu} -<Route author="DIYgod" example="/bilibili/ranking/0/3/1" path="/bilibili/ranking/:tid/:days?/:arc_type?/:disableEmbed?" paramsDesc={['排行榜分区 id, 默认 0', '时间跨度, 可为 1 3 7 30', '投稿时间, 可为 0(全部投稿) 1(近期投稿) , 默认 1', '默认为开启内嵌视频, 任意值为关闭']}> - | 全站 | 动画 | 国创相关 | 音乐 | 舞蹈 | 游戏 | 科技 | 数码 | 生活 | 鬼畜 | 时尚 | 娱乐 | 影视 | - | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 1 | 168 | 3 | 129 | 4 | 36 | 188 | 160 | 119 | 155 | 5 | 181 | -</Route> +<Route namespace="bilibili" data={{"path":"/video/danmaku/:bvid/:pid?","categories":["social-media"],"example":"/bilibili/video/danmaku/BV1vA411b7ip/1","parameters":{"bvid":"视频AV号,可在视频页 URL 中找到","pid":"分P号,不填默认为1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"视频弹幕","maintainers":["Qixingchen"],"location":"danmaku.ts"}} /> -### 歌单 {#bilibili-ge-dan} +### 视频选集列表 {#bilibili-shi-pin-xuan-ji-lie-biao} -<Route author="LogicJake" example="/bilibili/audio/10624" path="/bilibili/audio/:id" paramsDesc={['歌单 id, 可在歌单页 URL 中找到']} /> +<Route namespace="bilibili" data={{"path":"/video/page/:bvid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/video/page/BV1i7411M7N9","parameters":{"bvid":"可在视频页 URL 中找到","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"视频选集列表","maintainers":["sxzz"],"location":"page.ts"}} /> -### 专栏文集 {#bilibili-zhuan-lan-wen-ji} +### 视频评论 {#bilibili-shi-pin-ping-lun} -<Route author="hoilc" example="/bilibili/readlist/25611" path="/bilibili/readlist/:listid" paramsDesc={['文集 id, 可在专栏文集 URL 中找到']} /> +<Route namespace="bilibili" data={{"path":"/video/reply/:bvid","categories":["social-media"],"example":"/bilibili/video/reply/BV1vA411b7ip","parameters":{"bvid":"可在视频页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"视频评论","maintainers":["Qixingchen"],"location":"reply.ts"}} /> -### B 站每周必看 {#bilibili-b-zhan-mei-zhou-bi-kan} +### 视频搜索 {#bilibili-shi-pin-sou-suo} -<Route author="ttttmr" example="/bilibili/weekly" path="/bilibili/weekly/:disableEmbed?" paramsDesc={['默认为开启内嵌视频, 任意值为关闭']} /> +<Route namespace="bilibili" data={{"path":"/vsearch/:kw/:order?/:disableEmbed?/:tid?","categories":["social-media"],"example":"/bilibili/vsearch/RSSHub","parameters":{"kw":"检索关键字","order":"排序方式, 综合:totalrank 最多点击:click 最新发布:pubdate(缺省) 最多弹幕:dm 最多收藏:stow","disableEmbed":"默认为开启内嵌视频, 任意值为关闭","tid":"分区 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"视频搜索","maintainers":["Symty"],"description":"分区 id 的取值请参考下表:\n\n | 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 |\n | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ |\n | 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 |","location":"vsearch.ts"}} /> -### 漫画更新 {#bilibili-man-hua-geng-xin} +分区 id 的取值请参考下表: -<Route author="hoilc" example="/bilibili/manga/update/26009" path="/bilibili/manga/update/:comicid" paramsDesc={['漫画 id, 可在 URL 中找到, 支持带有`mc`前缀']} /> +| 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 | +| -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ | +| 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 | + +### 用户关注专栏 {#bilibili-yong-hu-guan-zhu-zhuan-lan} + +<Route namespace="bilibili" data={{"path":"/followings/article/:uid","categories":["social-media"],"example":"/bilibili/followings/article/99800931","parameters":{"uid":"用户 id"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户关注专栏","maintainers":["woshiluo"],"description":":::warning\n 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"followings-article.ts"}} /> + +:::warning +用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: + +### 用户关注动态 {#bilibili-yong-hu-guan-zhu-dong-tai} + +<Route namespace="bilibili" data={{"path":"/followings/dynamic/:uid/:routeParams?","categories":["social-media"],"example":"/bilibili/followings/dynamic/109937383","parameters":{"uid":"用户 id","routeParams":"额外参数;请参阅 [#UP 主动态](#bilibili-up-zhu-dong-tai) 的说明和表格"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户关注动态","maintainers":["TigerCubDen","JimenezLi"],"description":":::warning\n 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"followings-dynamic.ts"}} /> + +:::warning +用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: + +### 用户关注视频动态 {#bilibili-yong-hu-guan-zhu-shi-pin-dong-tai} + +<Route namespace="bilibili" data={{"path":"/followings/video/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/followings/video/2267573","parameters":{"uid":"用户 id","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户关注视频动态","maintainers":["LogicJake"],"description":":::warning\n 用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"followings-video.ts"}} /> + +:::warning +用户动态需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: ### 用户追漫更新 {#bilibili-yong-hu-zhui-man-geng-xin} -<Route author="yindaheng98" example="/bilibili/manga/followings/26009" path="/bilibili/manga/followings/:uid/:limits?" paramsDesc={['用户 id', '抓取最近更新前多少本漫画,默认为10']} configRequired="1"> - :::warning - 用户追漫需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +<Route namespace="bilibili" data={{"path":"/manga/followings/:uid/:limits?","categories":["social-media"],"example":"/bilibili/manga/followings/26009","parameters":{"uid":"用户 id","limits":"抓取最近更新前多少本漫画,默认为10"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户追漫更新","maintainers":["yindaheng98"],"description":":::warning\n 用户追漫需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"manga-followings.ts"}} /> + +:::warning +用户追漫需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: + +### 用户追番列表 {#bilibili-yong-hu-zhui-fan-lie-biao} + +<Route namespace="bilibili" data={{"path":"/user/bangumi/:uid/:type?","categories":["social-media"],"example":"/bilibili/user/bangumi/208259","parameters":{"uid":"用户 id","type":"1为番,2为剧,留空为1"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["space.bilibili.com/:uid"],"target":"/user/bangumi/:uid"},"name":"用户追番列表","maintainers":["wdssmq"],"location":"user-bangumi.ts"}} /> + +### 用户稍后再看 {#bilibili-yong-hu-shao-hou-zai-kan} + +<Route namespace="bilibili" data={{"path":"/watchlater/:uid/:disableEmbed?","categories":["social-media"],"example":"/bilibili/watchlater/2267573","parameters":{"uid":"用户 id","disableEmbed":"默认为开启内嵌视频, 任意值为关闭"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户稍后再看","maintainers":["JimenezLi"],"description":":::warning\n 用户稍后再看需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"watchlater.ts"}} /> + +:::warning +用户稍后再看需要 b 站登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: + +### 专栏文集 {#bilibili-zhuan-lan-wen-ji} + +<Route namespace="bilibili" data={{"path":"/readlist/:listid","categories":["social-media"],"example":"/bilibili/readlist/25611","parameters":{"listid":"文集 id, 可在专栏文集 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"专栏文集","maintainers":["hoilc"],"location":"readlist.ts"}} /> + +### 综合热门 {#bilibili-zong-he-re-men} + +<Route namespace="bilibili" data={{"path":"/popular/all","categories":["social-media"],"example":"/bilibili/popular/all","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"综合热门","maintainers":["ziminliu"],"location":"popular.ts"}} /> ## Bluesky (bsky) {#bluesky-bsky} -### Post {#bluesky-bsky-post} - -<Route author="TonyRL" example="/bsky/profile/bsky.app" path="/bsky/profile/:handle" paramsDesc={['User handle, can be found in URL']} radar="1" /> - ### Keywords {#bluesky-bsky-keywords} -<Route author="untitaker" example="/bsky/keyword/hello" path="/bsky/keyword/:keyword" radar="1" /> +<Route namespace="bsky" data={{"path":"/keyword/:keyword","categories":["social-media"],"example":"/bsky/keyword/hello","parameters":{"keyword":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keywords","maintainers":["untitaker"],"location":"keyword.ts"}} /> + +### Post {#bluesky-bsky-post} + +<Route namespace="bsky" data={{"path":"/profile/:handle","categories":["social-media"],"example":"/bsky/profile/bsky.app","parameters":{"handle":"User handle, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bsky.app/profile/:handle"]},"name":"Post","maintainers":["TonyRL"],"location":"posts.ts"}} /> ## Crossbell {#crossbell} -### Notes {#crossbell-notes} +### Feeds of following {#crossbell-feeds-of-following} -<Route author="DIYgod" example="/crossbell/notes" path="/crossbell/notes" radar="1" /> +<Route namespace="crossbell" data={{"path":"/feeds/following/:characterId","categories":["social-media"],"example":"/crossbell/feeds/following/10","parameters":{"characterId":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Feeds of following","maintainers":["DIYgod"],"location":"feeds/following.ts"}} /> ### Notes of character {#crossbell-notes-of-character} -<Route author="DIYgod" example="/crossbell/notes/character/10" path="/crossbell/notes/character/:characterId" radar="1" /> +<Route namespace="crossbell" data={{"path":"/notes/character/:characterId","categories":["social-media"],"example":"/crossbell/notes/character/10","parameters":{"characterId":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["crossbell.io/*"],"target":"/notes"},"name":"Notes of character","maintainers":["DIYgod"],"url":"crossbell.io/*","location":"notes/character.ts"}} /> + +### Notes {#crossbell-notes} + +<Route namespace="crossbell" data={{"path":"/notes","categories":["social-media"],"example":"/crossbell/notes","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["crossbell.io/*"]},"name":"Notes","maintainers":["DIYgod"],"url":"crossbell.io/*","location":"notes/index.ts"}} /> ### Notes of source {#crossbell-notes-of-source} -<Route author="DIYgod" example="/crossbell/notes/source/xlog" path="/crossbell/notes/source/:source" radar="1" /> - -### Feeds of following {#crossbell-feeds-of-following} - -<Route author="DIYgod" example="/crossbell/feeds/following/10" path="/crossbell/feeds/following/:characterId" radar="1" /> - -## CuriousCat {#curiouscat} - -### User {#curiouscat-user} - -<Route author="lucasew" path="/curiouscat/user/:name" example="/curiouscat/user/kretyn" paramsDesc={['name, username that is in the URL']} /> +<Route namespace="crossbell" data={{"path":"/notes/source/:source","categories":["social-media"],"example":"/crossbell/notes/source/xlog","parameters":{"source":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["crossbell.io/*"],"target":"/notes"},"name":"Notes of source","maintainers":["DIYgod"],"url":"crossbell.io/*","location":"notes/source.ts"}} /> ## Curius {#curius} ### User {#curius-user} -<Route author="Ovler-Young" example="/curius/links/yuu-yuu" path="/curius/links/:name" paramsDesc={['Username, can be found in URL']} /> +<Route namespace="curius" data={{"path":"/links/:name","categories":["social-media"],"example":"/curius/links/yuu-yuu","parameters":{"name":"Username, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["curius.app/:name"]},"name":"User","maintainers":["Ovler-Young"],"location":"links.ts"}} /> ## Daily.dev {#daily-dev} -### Popular {#daily-dev-popular} - -<Route author="Rjnishant530" example="/daily" path="/daily" /> - ### Most Discussed {#daily-dev-most-discussed} -<Route author="Rjnishant530" example="/daily/discussed" path="/daily/discussed" /> +<Route namespace="daily" data={{"path":"/discussed","categories":["social-media"],"example":"/daily/discussed","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["daily.dev/popular"],"target":""},"name":"Most Discussed","maintainers":["Rjnishant530"],"url":"daily.dev/popular","location":"discussed.ts"}} /> ### Most upvoted {#daily-dev-most-upvoted} -<Route author="Rjnishant530" example="/daily/upvoted" path="/daily/upvoted" /> - -## Dev.to {#dev-to} - -### Top Posts {#dev-to-top-posts} - -<Route author="dwemerx" example="/dev.to/top/month" path="/dev.to/top/:period" paramsDesc={['period']}> - | dev.to weekly top | dev.to monthly top | dev.to yearly top | dev.to top posts of all time | - | ----------------- | ------------------ | ----------------- | ---------------------------- | - | week | month | year | infinity | -</Route> +<Route namespace="daily" data={{"path":"/upvoted","categories":["social-media"],"example":"/daily/upvoted","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["daily.dev/popular"],"target":""},"name":"Most upvoted","maintainers":["Rjnishant530"],"url":"daily.dev/popular","location":"upvoted.ts"}} /> ## Discord {#discord} ### Channel Messages {#discord-channel-messages} -<Route author="TonyRL" path="/discord/channel/:channelId" example="/discord/channel/950465850056536084" paramsDesc={['Channel ID']} radar="1" configRequired="1" /> - -## Disqus {#disqus} - -### Comment {#disqus-comment} - -<Route author="DIYgod" path="/disqus/posts/:forum" example="/disqus/posts/diygod-me" paramsDesc={['forum, disqus name of the target website']} /> +<Route namespace="discord" data={{"path":"/channel/:channelId","categories":["social-media"],"example":"/discord/channel/950465850056536084","parameters":{"channelId":"Channel ID"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["discord.com/channels/:guildId/:channelId/:messageID","discord.com/channels/:guildId/:channelId"]},"name":"Channel Messages","maintainers":["TonyRL"],"location":"channel.ts"}} /> ## Fansly {#fansly} -### User Timeline {#fansly-user-timeline} - -<Route author="TonyRL" example="/fansly/user/AeriGoMoo" path="/fansly/user/:username" paramsDesc={['User ID']} radar="1" /> - ### Hashtag {#fansly-hashtag} -<Route author="TonyRL" example="/fansly/tag/free" path="/fansly/tag/:tag" paramsDesc={['Hashtag']} radar="1" /> +<Route namespace="fansly" data={{"path":"/tag/:tag","categories":["social-media"],"example":"/fansly/tag/free","parameters":{"tag":"Hashtag"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fansly.com/explore/tag/:tag"]},"name":"Hashtag","maintainers":["TonyRL"],"location":"tag.ts"}} /> -## Fur Affinity {#fur-affinity} +### User Timeline {#fansly-user-timeline} -### Home {#fur-affinity-home} - -<Route author="TigerCubDen" example="/furaffinity/home" path="/furaffinity/home/:type?/:nsfw?" paramsDesc={['Art Type, default to be `artwork`', 'NSFW Mode, do not filter NSFW contents when value set to `1`']} radar="1"> - Type - - | artwork | crafts | music | writing | - | ------- | ------ | ----- | ------- | - | artwork | crafts | music | writing | -</Route> - -### Browse {#fur-affinity-browse} - -<Route author="TigerCubDen" example="/furaffinity/browse" path="/furaffinity/browse/:nsfw?" paramsDesc={['NSFW Mode, do not filter NSFW contents when value set to `1`']} radar="1" /> - -### Website Status {#fur-affinity-website-status} - -<Route author="TigerCubDen" example="/furaffinity/status" path="/furaffinity/status" radar="1" /> - -### Search {#fur-affinity-search} - -<Route author="TigerCubDen" example="/furaffinity/search/tiger" path="/furaffinity/search/:keyword/:nsfw?" paramsDesc={['Search keyword, enter any words you want to search, require English', 'NSFW Mode,do not filter NSFW contents when value set to `1`']} radar="1" /> - -### Userpage Profile {#fur-affinity-userpage-profile} - -<Route author="TigerCubDen" example="/furaffinity/user/tiger-jungle" path="/furaffinity/user/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Watching List {#fur-affinity-user-s-watching-list} - -<Route author="TigerCubDen" example="/furaffinity/watching/okami9312" path="/furaffinity/watching/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Watcher List {#fur-affinity-user-s-watcher-list} - -<Route author="TigerCubDen" example="/furaffinity/watchers/malikshadowclaw" path="/furaffinity/watchers/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Commission Information {#fur-affinity-user-s-commission-information} - -<Route author="TigerCubDen" example="/furaffinity/commissions/flashlioness" path="/furaffinity/commissions/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Shouts {#fur-affinity-user-s-shouts} - -<Route author="TigerCubDen" example="/furaffinity/shouts/redodgft" path="/furaffinity/shouts/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Journals {#fur-affinity-user-s-journals} - -<Route author="TigerCubDen" example="/furaffinity/journals/rukis" path="/furaffinity/journals/:username" paramsDesc={['Username, can find in userpage']} radar="1" /> - -### User's Gallery {#fur-affinity-user-s-gallery} - -<Route author="TigerCubDen" example="/furaffinity/gallery/flashlioness" path="/furaffinity/gallery/:username/:nsfw?" paramsDesc={['Username, can find in userpage', 'NSFW Mode, do not filter NSFW contents when value set to `1`']} radar="1" /> - -### User's Scraps {#fur-affinity-user-s-scraps} - -<Route author="TigerCubDen" example="/furaffinity/scraps/flashlioness" path="/furaffinity/scraps/:username/:nsfw?" paramsDesc={['Username, can find in userpage', 'NSFW Mode, do not filter NSFW contents when value set to `1`']} radar="1" /> - -### User's Favorites {#fur-affinity-user-s-favorites} - -<Route author="TigerCubDen" example="/furaffinity/favorites/tiger-jungle" path="/furaffinity/favorites/:username/:nsfw?" paramsDesc={['Username, can find in userpage', 'NSFW Mode, do not filter NSFW contents when value set to `1`']} radar="1" /> - -### Submission Comments {#fur-affinity-submission-comments} - -<Route author="TigerCubDen" example="/furaffinity/submission_comments/34909983" path="/furaffinity/submission_comments/:id" paramsDesc={['Submission id, can find in URL of submission page']} radar="1" /> - -### Journal Comments {#fur-affinity-journal-comments} - -<Route author="TigerCubDen" example="/furaffinity/journal_comments/9750669" path="/furaffinity/journal_comments/:id" paramsDesc={['Journal id, can find in URL of journal page']} radar="1" /> - -## Gab {#gab} - -### User's Posts {#gab-user-s-posts} - -<Route author="zphw" example="/gab/user/realdonaldtrump" path="/gab/user/:username" paramsDesc={['Username']} /> +<Route namespace="fansly" data={{"path":"/user/:username","categories":["social-media"],"example":"/fansly/user/AeriGoMoo","parameters":{"username":"User ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fansly.com/:username/posts","fansly.com/:username/media"]},"name":"User Timeline","maintainers":["TonyRL"],"location":"post.ts"}} /> ## GETTR {#gettr} ### User timeline {#gettr-user-timeline} -<Route author="TonyRL" example="/gettr/user/jasonmillerindc" path="/gettr/user/:id" paramsDesc={['User id']} radar="1" /> - -## iCity {#icity} - -### 用户动态 {#icity-yong-hu-dong-tai} - -<Route author="nczitzk" example="/icity/sai" path="/icity/:id" paramsDesc={['用户 id']} /> +<Route namespace="gettr" data={{"path":"/user/:id","categories":["social-media"],"example":"/gettr/user/jasonmillerindc","parameters":{"id":"User id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gettr.com/user/:id"]},"name":"User timeline","maintainers":["TonyRL"],"location":"user.ts"}} /> ## Instagram {#instagram} @@ -519,70 +383,72 @@ It's highly recommended to deploy with Redis cache enabled. ::: -### User Profile / Hashtag {#instagram-user-profile-hashtag} - -:::tip -You may need to setup cookie for a less restrictive rate limit and private profiles. -::: - -<Route author="TonyRL" example="/instagram/2/user/stefaniejoosten" path="/instagram/2/:category/:key" paramsDesc={['Feed category, see table below','Username / Hashtag name']} radar="1" anticrawler="1" /> - -| User timeline | Hashtag | -| ------------- | ------- | -| user | tags | - ### User Profile / Hashtag - Private API {#instagram-user-profile-hashtag-private-api} +<Route namespace="instagram" data={{"path":"/:category/:key","categories":["social-media"],"example":"/instagram/user/stefaniejoosten","parameters":{"category":"Feed category, see table above","key":"Username / Hashtag name"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Profile / Hashtag - Private API","maintainers":["oppilate","DIYgod"],"description":":::warning\nDue to [Instagram Private API](https://github.com/dilame/instagram-private-api) restrictions, you have to setup your credentials on the server. 2FA is not supported. See [deployment guide](https://docs.rsshub.app/install/) for more.\n:::","location":"private-api/index.ts"}} /> + :::warning Due to [Instagram Private API](https://github.com/dilame/instagram-private-api) restrictions, you have to setup your credentials on the server. 2FA is not supported. See [deployment guide](https://docs.rsshub.app/install/) for more. ::: -<Route author="oppilate DIYgod" example="/instagram/user/stefaniejoosten" path="/instagram/:category/:key" paramsDesc={['Feed category, see table above','Username / Hashtag name']} radar="1" anticrawler="1" configRequired="1" /> +### User Profile / Hashtag {#instagram-user-profile-hashtag} -### User Profile - Picnob {#instagram-user-profile-picnob} +<Route namespace="instagram" data={{"path":"/2/:category/:key","categories":["social-media"],"example":"/instagram/2/user/stefaniejoosten","parameters":{"category":"Feed category, see table below","key":"Username / Hashtag name"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Profile / Hashtag","maintainers":["TonyRL"],"description":":::tip\nYou may need to setup cookie for a less restrictive rate limit and private profiles.\n:::\n\n\n| User timeline | Hashtag |\n| ------------- | ------- |\n| user | tags |","location":"web-api/index.ts"}} /> -<Route author="TonyRL" example="/picnob/user/stefaniejoosten" path="/picnob/profile/:id" paramsDesc={['Instagram id']} radar="1" /> +:::tip +You may need to setup cookie for a less restrictive rate limit and private profiles. +::: + +| User timeline | Hashtag | +| ------------- | ------- | +| user | tags | + +## Instagram {#instagram} + +:::tip +It's highly recommended to deploy with Redis cache enabled. +::: ### User Profile - Picuki {#instagram-user-profile-picuki} -<Route author="hoilc Rongronggg9" example="/picuki/profile/stefaniejoosten" path="/picuki/profile/:id/:functionalFlag?" paramsDesc={['Instagram id','functional flag, see the table below']} radar="1" anticrawler="1"> - | functionalFlag | Video embedding | Fetching Instagram Stories | - | -------------- | --------------------------------------- | -------------------------- | - | 0 | off, only show video poster as an image | off | - | 1 (default) | on | off | - | 10 | on | on | +<Route namespace="picuki" data={{"path":"/profile/:id/:functionalFlag?","categories":["social-media"],"example":"/picuki/profile/stefaniejoosten","parameters":{"id":"Instagram id","functionalFlag":"functional flag, see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.picuki.com/profile/:id"],"target":"/profile/:id"},"name":"User Profile - Picuki","maintainers":["hoilc","Rongronggg9","devinmugen"],"description":"| functionalFlag | Video embedding | Fetching Instagram Stories |\n | -------------- | --------------------------------------- | -------------------------- |\n | 0 | off, only show video poster as an image | off |\n | 1 (default) | on | off |\n | 10 | on | on |\n\n :::warning\n Instagram Stories do not have a reliable guid. It is possible that your RSS reader show the same story more than once.\n Though, every Story expires after 24 hours, so it may be not so serious.\n :::","location":"profile.ts"}} /> - :::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. - ::: -</Route> +| functionalFlag | Video embedding | Fetching Instagram Stories | +| -------------- | --------------------------------------- | -------------------------- | +| 0 | off, only show video poster as an image | off | +| 1 (default) | on | off | +| 10 | on | on | + +:::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. +::: ## Keep {#keep} ### 运动日记 {#keep-yun-dong-ri-ji} -<Route author="Dectinc DIYgod" example="/keep/user/556b02c1ab59390afea671ea" path="/keep/user/:id" paramsDesc={['Keep 用户 id']} /> +<Route namespace="keep" data={{"path":"/user/:id","categories":["social-media"],"example":"/keep/user/556b02c1ab59390afea671ea","parameters":{"id":"Keep 用户 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gotokeep.com/users/:id"]},"name":"运动日记","maintainers":["Dectinc","DIYgod"],"location":"user.ts"}} /> ## Lemmy {#lemmy} ### Community {#lemmy-community} -<Route author="wb14123" example="/lemmy/technology@lemmy.world/Hot" path="/lemmy/:community/:sort?" paramsDesc={['Lemmmy community, for example technology@lemmy.world', 'Sort by, defaut to Active']} configRequired="1" /> +<Route namespace="lemmy" data={{"path":"/:community/:sort?","categories":["social-media"],"example":"/lemmy/technology@lemmy.world/Hot","parameters":{"community":"Lemmmy community, for example technology@lemmy.world","sort":"Sort by, defaut to Active"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Community","maintainers":["wb14123"],"location":"index.ts"}} /> ## Lofter {#lofter} -### User {#lofter-user} - -<Route author="hoilc nczitzk" example="/lofter/user/i" path="/lofter/user/:name?" paramsDesc={['Lofter user name, can be found in the URL']} /> - ### Tag {#lofter-tag} -<Route author="hoilc nczitzk" example="/lofter/tag/cosplay/date" path="/lofter/tag/:name?/:type?" paramsDesc={['tag name, such as `名侦探柯南`, `摄影` by default', 'ranking type, see below, new by default']}> - | new | date | week | month | total | - | ---- | ---- | ---- | ----- | ----- | - | 最新 | 日榜 | 周榜 | 月榜 | 总榜 | -</Route> +<Route namespace="lofter" data={{"path":"/tag/:name?/:type?","categories":["social-media"],"example":"/lofter/tag/cosplay/date","parameters":{"name":"tag name, such as `名侦探柯南`, `摄影` by default","type":"ranking type, see below, new by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Tag","maintainers":["hoilc","nczitzk"],"description":"| new | date | week | month | total |\n | ---- | ---- | ---- | ----- | ----- |\n | 最新 | 日榜 | 周榜 | 月榜 | 总榜 |","location":"tag.ts"}} /> + +| new | date | week | month | total | +| ---- | ---- | ---- | ----- | ----- | +| 最新 | 日榜 | 周榜 | 月榜 | 总榜 | + +### User {#lofter-user} + +<Route namespace="lofter" data={{"path":"/user/:name?","categories":["social-media"],"example":"/lofter/user/i","parameters":{"name":"Lofter user name, can be found in the URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User","maintainers":["hondajojo","nczitzk"],"location":"user.ts"}} /> ## Mastodon {#mastodon} @@ -595,235 +461,191 @@ Official user RSS: These feed do not include boosts (a.k.a. reblogs). RSSHub provides a feed for user timeline based on the Mastodon API, but to use that, you may need to create application on a Mastodon instance, and configure your RSSHub instance. Check the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. ::: -### User timeline {#mastodon-user-timeline} - -<Route author="notofoe" example="/mastodon/acct/CatWhitney@mastodon.social/statuses" path="/mastodon/acct/:acct/statuses/:only_media?" paramsDesc={['Webfinger account URI, like `user@host`', 'whether only display media content, default to false, any value to true']} /> - -Started from Mastodon v4.0.0, the use of the `search` API in the route no longer requires a user token. -If the domain of your Webfinger account URI is the same as the API host of the instance (i.e., no delegation called in some other protocols), then no configuration is required and the route is available out of the box. -However, you can still specify these route-specific configurations if you need to override them. - ### Instance timeline (local) {#mastodon-instance-timeline-local} -<Route author="hoilc" example="/mastodon/timeline/pawoo.net/true" path="/mastodon/timeline/:site/:only_media?" paramsDesc={['instance address, only domain, no `http://` or `https://` protocol header', 'whether only display media content, default to false, any value to true']} /> +<Route namespace="mastodon" data={{"path":"/timeline/:site/:only_media?","categories":["social-media"],"example":"/mastodon/timeline/pawoo.net/true","parameters":{"site":"instance address, only domain, no `http://` or `https://` protocol header","only_media":"whether only display media content, default to false, any value to true"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Instance timeline (local)","maintainers":["hoilc"],"description":"If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`.","location":"timeline-local.ts"}} /> If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`. ### Instance timeline (federated) {#mastodon-instance-timeline-federated} -<Route author="hoilc" example="/mastodon/remote/pawoo.net/true" path="/mastodon/remote/:site/:only_media?" paramsDesc={['instance address, only domain, no `http://` or `https://` protocol header', 'whether only display media content, default to false, any value to true']} /> +<Route namespace="mastodon" data={{"path":"/remote/:site/:only_media?","categories":["social-media"],"example":"/mastodon/remote/pawoo.net/true","parameters":{"site":"instance address, only domain, no `http://` or `https://` protocol header","only_media":"whether only display media content, default to false, any value to true"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Instance timeline (federated)","maintainers":["hoilc"],"description":"If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`.","location":"timeline-remote.ts"}} /> If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`. -### User timeline (backup) {#mastodon-user-timeline-backup} +### User timeline {#mastodon-user-timeline} -<Route author="notofoe" example="/mastodon/account_id/mastodon.social/23634/statuses/only_media" path="/mastodon/account/:site/:account_id/statuses/:only_media?" paramsDesc={['instance address, only domain, no `http://` or `https://` protocol header', 'account id. login your instance, then search for the user profile; the account id is in the url', 'whether only display media content, default to false, any value to true']} /> +<Route namespace="mastodon" data={{"path":"/acct/:acct/statuses/:only_media?","categories":["social-media"],"example":"/mastodon/acct/CatWhitney@mastodon.social/statuses","parameters":{"acct":"Webfinger account URI, like `user@host`","only_media":"whether only display media content, default to false, any value to true"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User timeline","maintainers":["notofoe"],"description":"Started from Mastodon v4.0.0, the use of the `search` API in the route no longer requires a user token.\nIf the domain of your Webfinger account URI is the same as the API host of the instance (i.e., no delegation called in some other protocols), then no configuration is required and the route is available out of the box.\nHowever, you can still specify these route-specific configurations if you need to override them.","location":"acct.ts"}} /> -If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`. +Started from Mastodon v4.0.0, the use of the `search` API in the route no longer requires a user token. +If the domain of your Webfinger account URI is the same as the API host of the instance (i.e., no delegation called in some other protocols), then no configuration is required and the route is available out of the box. +However, you can still specify these route-specific configurations if you need to override them. ## Misskey {#misskey} ### Featured Notes {#misskey-featured-notes} -<Route author="Misaka13514" example="/misskey/notes/featured/misskey.io" path="/misskey/notes/featured/:site" paramsDesc={['instance address, domain only, without `http://` or `https://` protocol header']} radar="1" /> - -## piapro {#piapro} - -### User latest works {#piapro-user-latest-works} - -<Route author="hoilc" example="/piapro/user/shine_longer" path="/piapro/user/:pid" paramsDesc={['User ID, can be found in url']} /> - -### Website latest works {#piapro-website-latest-works} - -<Route author="hoilc" example="/piapro/public/music/miku/2" path="/piapro/public/:type/:tag?/:category?" paramsDesc={['work type, can be `music`,`illust`,`text`','`tag` parameter in url','category ID, `categoryId` parameter in url']} /> +<Route namespace="misskey" data={{"path":"/notes/featured/:site","categories":["social-media"],"example":"/misskey/notes/featured/misskey.io","parameters":{"site":"instance address, domain only, without `http://` or `https://` protocol header"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Featured Notes","maintainers":["Misaka13514"],"location":"featured-notes.ts"}} /> ## pixiv {#pixiv} -### User Bookmark {#pixiv-user-bookmark} +### Following timeline {#pixiv-following-timeline} -<Route author="EYHN" path="/pixiv/user/bookmarks/:id" example="/pixiv/user/bookmarks/15288095" paramsDesc={['user id, available in user\'s homepage URL']} radar="1" /> +<Route namespace="pixiv" data={{"path":"/user/illustfollows","categories":["social-media"],"example":"/pixiv/user/illustfollows","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.pixiv.net/bookmark_new_illust.php"]},"name":"Following timeline","maintainers":["ClarkeCheng"],"url":"www.pixiv.net/bookmark_new_illust.php","description":":::warning\n Only for self-hosted\n :::","location":"illustfollow.ts"}} /> -### User Activity {#pixiv-user-activity} - -<Route author="EYHN" path="/pixiv/user/:id" example="/pixiv/user/15288095" paramsDesc={['user id, available in user\'s homepage URL']} radar="1" /> - -### User Novels {#pixiv-user-novels} - -<Route author="TonyRL" example="/pixiv/user/novels/27104704" path="/pixiv/user/novels/:id" paramsDesc={['User id, available in user\'s homepage URL']} radar="1" /> - -### Rankings {#pixiv-rankings} - -<Route author="EYHN" path="/pixiv/ranking/:mode/:date?" example="/pixiv/ranking/week" paramsDesc={['rank type', 'format: `2018-4-25`']} radar="1"> - | daily rank | weekly rank | monthly rank | male rank | female rank | AI-generated work Rankings | original rank | rookie user rank | - | ---------- | ----------- | ------------ | --------- | ----------- | -------------------------- | -------------- | ---------------- | - | day | week | month | day\_male | day\_female | day\_ai | week\_original | week\_rookie | - - | R-18 daily rank | R-18 AI-generated work | R-18 male rank | R-18 female rank | R-18 weekly rank | R-18G rank | - | --------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------- | - | day\_r18 | day\_r18\_ai | day\_male\_r18 | day\_female\_r18 | week\_r18 | week\_r18g | -</Route> +:::warning +Only for self-hosted +::: ### Keyword {#pixiv-keyword} -<Route author="DIYgod" example="/pixiv/search/Nezuko/popular/2" path="/pixiv/search/:keyword/:order?/:mode?" paramsDesc={['keyword', 'rank mode, empty or other for time order, popular for popular order', 'filte R18 content']} radar="1"> - | only not R18 | only R18 | no filter | - | ------------ | -------- | -------------- | - | safe | r18 | empty or other | -</Route> +<Route namespace="pixiv" data={{"path":"/search/:keyword/:order?/:mode?","categories":["social-media"],"example":"/pixiv/search/Nezuko/popular/2","parameters":{"keyword":"keyword","order":"rank mode, empty or other for time order, popular for popular order","mode":"filte R18 content"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keyword","maintainers":["DIYgod"],"description":"| only not R18 | only R18 | no filter |\n | ------------ | -------- | -------------- |\n | safe | r18 | empty or other |","location":"search.ts"}} /> -### Following timeline {#pixiv-following-timeline} +| only not R18 | only R18 | no filter | +| ------------ | -------- | -------------- | +| safe | r18 | empty or other | -<Route author="ClarkeCheng" example="/pixiv/user/illustfollows" path="/pixiv/user/illustfollows" radar="1" configRequired="1"> - :::warning - Only for self-hosted - ::: -</Route> +### Rankings {#pixiv-rankings} -## pixivFANBOX {#pixivfanbox} +<Route namespace="pixiv" data={{"path":"/ranking/:mode/:date?","categories":["social-media"],"example":"/pixiv/ranking/week","parameters":{"mode":"rank type","date":"format: `2018-4-25`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Rankings","maintainers":["EYHN"],"description":"| daily rank | weekly rank | monthly rank | male rank | female rank | AI-generated work Rankings | original rank | rookie user rank |\n | ---------- | ----------- | ------------ | --------- | ----------- | -------------------------- | -------------- | ---------------- |\n | day | week | month | day_male | day_female | day_ai | week_original | week_rookie |\n\n | R-18 daily rank | R-18 AI-generated work | R-18 male rank | R-18 female rank | R-18 weekly rank | R-18G rank |\n | --------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------- |\n | day_r18 | day_r18_ai | day_male_r18 | day_female_r18 | week_r18 | week_r18g |","location":"ranking.ts"}} /> -### User {#pixivfanbox-user} +| daily rank | weekly rank | monthly rank | male rank | female rank | AI-generated work Rankings | original rank | rookie user rank | +| ---------- | ----------- | ------------ | --------- | ----------- | -------------------------- | -------------- | ---------------- | +| day | week | month | day\_male | day\_female | day\_ai | week\_original | week\_rookie | -<Route author="sgqy" example="/fanbox/otomeoto" path="/fanbox/:user?" paramsDesc={['User name. Can be found in URL. Default is official news']} /> +| R-18 daily rank | R-18 AI-generated work | R-18 male rank | R-18 female rank | R-18 weekly rank | R-18G rank | +| --------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------- | +| day\_r18 | day\_r18\_ai | day\_male\_r18 | day\_female\_r18 | week\_r18 | week\_r18g | + +### User Bookmark {#pixiv-user-bookmark} + +<Route namespace="pixiv" data={{"path":"/user/bookmarks/:id","categories":["social-media"],"example":"/pixiv/user/bookmarks/15288095","parameters":{"id":"user id, available in user's homepage URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.pixiv.net/users/:id/bookmarks/artworks"]},"name":"User Bookmark","maintainers":["EYHN"],"location":"bookmarks.ts"}} /> + +### User Novels {#pixiv-user-novels} + +<Route namespace="pixiv" data={{"path":"/user/novels/:id","categories":["social-media"],"example":"/pixiv/user/novels/27104704","parameters":{"id":"User id, available in user's homepage URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.pixiv.net/users/:id/novels"]},"name":"User Novels","maintainers":["TonyRL"],"location":"novels.ts"}} /> + +### User Activity {#pixiv-user-activity} + +<Route namespace="pixiv" data={{"path":"/user/:id","categories":["social-media"],"example":"/pixiv/user/15288095","parameters":{"id":"user id, available in user's homepage URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.pixiv.net/users/:id"]},"name":"User Activity","maintainers":["DIYgod"],"location":"user.ts"}} /> ## Plurk {#plurk} -### Topic {#plurk-topic} - -<Route author="TonyRL" path="/plurk/topic/:topic" example="/plurk/topic/standwithukraine" paramsDesc={['Topic ID, can be found in URL']} radar="1" /> - -### Top {#plurk-top} - -<Route author="TonyRL" path="/plurk/top/:category?/:lang?" example="/plurk/top/topReplurks" paramsDesc={['Category, see the table below, `topReplurks` by default', 'Language, see the table below, `en` by default']} radar="1"> - | Top Replurks | Top Favorites | Top Responded | - | ------------ | ------------- | ------------- | - | topReplurks | topFavorites | topResponded | - - | English | 中文(繁體) | - | ------- | ------------ | - | en | zh | -</Route> - ### Anonymous {#plurk-anonymous} -<Route author="TonyRL" path="/plurk/anonymous" example="/plurk/anonymous" radar="1" /> - -### Search {#plurk-search} - -<Route author="TonyRL" path="/plurk/search/:keyword" example="/plurk/search/FGO" paramsDesc={['Search keyword']} radar="1" /> +<Route namespace="plurk" data={{"path":"/anonymous","categories":["social-media"],"example":"/plurk/anonymous","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["plurk.com/anonymous"]},"name":"Anonymous","maintainers":["TonyRL"],"url":"plurk.com/anonymous","location":"anonymous.ts"}} /> ### Hotlinks {#plurk-hotlinks} -<Route author="TonyRL" path="/plurk/hotlinks" example="/plurk/hotlinks" radar="1" /> +<Route namespace="plurk" data={{"path":"/hotlinks","categories":["social-media"],"example":"/plurk/hotlinks","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["plurk.com/hotlinks"]},"name":"Hotlinks","maintainers":["TonyRL"],"url":"plurk.com/hotlinks","location":"hotlinks.ts"}} /> ### Plurk News {#plurk-plurk-news} -<Route author="TonyRL" path="/plurk/news/:lang?" example="/plurk/news/:lang?" paramsDesc={['Language, see the table above, `en` by default']} radar="1" /> +<Route namespace="plurk" data={{"path":"/news/:lang?","categories":["social-media"],"example":"/plurk/news/:lang?","parameters":{"lang":"Language, see the table above, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["plurk.com/news"],"target":"/news"},"name":"Plurk News","maintainers":["TonyRL"],"url":"plurk.com/news","location":"news.ts"}} /> + +### Search {#plurk-search} + +<Route namespace="plurk" data={{"path":"/search/:keyword","categories":["social-media"],"example":"/plurk/search/FGO","parameters":{"keyword":"Search keyword"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Search","maintainers":["TonyRL"],"location":"search.ts"}} /> + +### Top {#plurk-top} + +<Route namespace="plurk" data={{"path":"/top/:category?/:lang?","categories":["social-media"],"example":"/plurk/top/topReplurks","parameters":{"category":"Category, see the table below, `topReplurks` by default","lang":"Language, see the table below, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Top","maintainers":["TonyRL"],"description":"| Top Replurks | Top Favorites | Top Responded |\n | ------------ | ------------- | ------------- |\n | topReplurks | topFavorites | topResponded |\n\n | English | 中文(繁體) |\n | ------- | ------------ |\n | en | zh |","location":"top.ts"}} /> + +| Top Replurks | Top Favorites | Top Responded | +| ------------ | ------------- | ------------- | +| topReplurks | topFavorites | topResponded | + +| English | 中文(繁體) | +| ------- | ------------ | +| en | zh | + +### Topic {#plurk-topic} + +<Route namespace="plurk" data={{"path":"/topic/:topic","categories":["social-media"],"example":"/plurk/topic/standwithukraine","parameters":{"topic":"Topic ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["plurk.com/topic/:topic"]},"name":"Topic","maintainers":["TonyRL"],"location":"topic.ts"}} /> ### User {#plurk-user} -<Route author="TonyRL" path="/plurk/user/:user" example="/plurk/user/plurkoffice" paramsDesc={['User ID, can be found in URL']} radar="1" /> +<Route namespace="plurk" data={{"path":"/user/:user","categories":["social-media"],"example":"/plurk/user/plurkoffice","parameters":{"user":"User ID, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User","maintainers":["TonyRL"],"location":"user.ts"}} /> ## Rattibha {#rattibha} ### User Threads {#rattibha-user-threads} -<Route author="yshalsager" example="/rattibha/user/elonmusk" path="/rattibha/user/:user" paramsDesc={['Twitter username, without @']} radar="1" /> - -## Soul {#soul} - -### 瞬间更新 {#soul-shun-jian-geng-xin} - -<Route author="ImSingee" example="/soul/Y2w2aTNWQVBLOU09" path="/soul/:id" paramsDesc={['用户 id, 分享用户主页时的 URL 的 userIdEcpt 参数']} radar="1" notOperational="1" /> - -### 热门瞬间 {#soul-re-men-shun-jian} - -<Route author="BugWriter2" example="/soul/posts/hot/NXJiSlM5V21kamJWVlgvZUh1NEExdz09" path="/soul/posts/hot/:pid*" paramsDesc={['瞬间 id, 分享用户瞬间时的 URL 的 postIdEcpt 参数']} /> - -:::tip -提供不同内容的 `pid`, 可以得到不同的热门瞬间推荐,如果想看多个种类的热门可以用 `/` 把不同的 `pid` 连起来,例如: `NXJiSlM5V21kamJWVlgvZUh1NEExdz09/MkM0amxSTUNiTEpLcHhzSlRzTEI1dz09` -::: +<Route namespace="rattibha" data={{"path":"/user/:user","categories":["social-media"],"example":"/rattibha/user/elonmusk","parameters":{"user":"Twitter username, without @"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rattibha.com/:user"]},"name":"User Threads","maintainers":["yshalsager"],"location":"user.ts"}} /> ## Telegram {#telegram} ### Channel {#telegram-channel} -<Route author="DIYgod Rongronggg9" path="/telegram/channel/:username/:routeParams?" example="/telegram/channel/awesomeDIYgod/searchQuery=twitter" paramsDesc={['channel username', 'extra parameters, see the table below']} radar="1"> - | Key | Description | Accepts | Defaults to | - | --------------------- | --------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | - | showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true | - | showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true | - | showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true | - | showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true | - | showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true | - | showInlineButtons | Show inline buttons | 0/1/true/false | false | - | showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true | - | showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true | - | includeFwd | Include forwarded messages | 0/1/true/false | true | - | includeReply | Include reply messages | 0/1/true/false | true | - | includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true | - | includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false | - | searchQuery | search query | keywords; replace `#` by `%23` for hashtag searching | (search disabled) | +<Route namespace="telegram" data={{"path":"/channel/:username/:routeParams?","categories":["social-media"],"example":"/telegram/channel/awesomeDIYgod/searchQuery=twitter","parameters":{"username":"channel username","routeParams":"extra parameters, see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["t.me/s/:username"],"target":"/channel/:username"},"name":"Channel","maintainers":["DIYgod","Rongronggg9"],"description":"| Key | Description | Accepts | Defaults to |\n | --------------------- | --------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- |\n | showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true |\n | showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true |\n | showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true |\n | showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true |\n | showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true |\n | showInlineButtons | Show inline buttons | 0/1/true/false | false |\n | showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true |\n | showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true |\n | includeFwd | Include forwarded messages | 0/1/true/false | true |\n | includeReply | Include reply messages | 0/1/true/false | true |\n | includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true |\n | includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false |\n | searchQuery | search query | keywords; replace `#` by `%23` for hashtag searching | (search disabled) |\n\n Specify different option values than default values can meet different needs, URL\n\n ```\n https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0\n ```\n\n generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions.\n\n :::tip\n For backward compatibility reasons, invalid `routeParams` will be treated as `searchQuery` .\n\n Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting `https://t.me/s/:username`.\n :::","location":"channel.ts"}} /> - Specify different option values than default values can meet different needs, URL +| Key | Description | Accepts | Defaults to | +| --------------------- | --------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | +| showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true | +| showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true | +| showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true | +| showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true | +| showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true | +| showInlineButtons | Show inline buttons | 0/1/true/false | false | +| showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true | +| showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true | +| includeFwd | Include forwarded messages | 0/1/true/false | true | +| includeReply | Include reply messages | 0/1/true/false | true | +| includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true | +| includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false | +| searchQuery | search query | keywords; replace `#` by `%23` for hashtag searching | (search disabled) | - ``` - https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0 - ``` +Specify different option values than default values can meet different needs, URL - generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions. +``` +https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0 +``` - :::tip - For backward compatibility reasons, invalid `routeParams` will be treated as `searchQuery` . +generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions. - Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting `https://t.me/s/:username`. - ::: -</Route> +:::tip +For backward compatibility reasons, invalid `routeParams` will be treated as `searchQuery` . -### Channel with long videos and file support {#telegram-channel-with-long-videos-and-file-support} - -<Route author="synchrone" example="/telegram/channel/telegram" path="/telegram/channel/:username" paramsDesc={['Channel name, without @']} configRequired="1" /> - -:::warning -This route requires user-based `TELEGRAM_SESSION`. +Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting `https://t.me/s/:username`. ::: ### Sticker Pack {#telegram-sticker-pack} -<Route author="DIYgod" example="/telegram/stickerpack/DIYgod" path="/telegram/stickerpack/:name" paramsDesc={['Sticker Pack name, available in the sharing URL']} /> +<Route namespace="telegram" data={{"path":"/stickerpack/:name","categories":["social-media"],"example":"/telegram/stickerpack/DIYgod","parameters":{"name":"Sticker Pack name, available in the sharing URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Sticker Pack","maintainers":["DIYgod"],"location":"stickerpack.ts"}} /> ### Telegram Blog {#telegram-telegram-blog} -<Route author="fengkx" example="/telegram/blog" path="/telegram/blog" /> +<Route namespace="telegram" data={{"path":"/blog","categories":["social-media"],"example":"/telegram/blog","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["telegram.org/blog"]},"name":"Telegram Blog","maintainers":["fengkx"],"url":"telegram.org/blog","location":"blog.ts"}} /> ## Threads {#threads} ### User timeline {#threads-user-timeline} -<Route author="ninboy" path="/threads/:user/:routeParams?" example="/threads/zuck" radar="1" paramsDesc={['Username', 'Extra parameters, see the table below']}> - Specify options (in the format of query string) in parameter `routeParams` to control some extra features for threads +<Route namespace="threads" data={{"path":"/:user/:routeParams?","categories":["social-media"],"example":"/threads/zuck","parameters":{"user":"Username","routeParams":"Extra parameters, see the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User timeline","maintainers":["ninboy"],"description":"Specify options (in the format of query string) in parameter `routeParams` to control some extra features for threads\n\n | Key | Description | Accepts | Defaults to |\n | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- |\n | `showAuthorInTitle` | Show author name in title | `0`/`1`/`true`/`false` | `true` |\n | `showAuthorInDesc` | Show author name in description (RSS body) | `0`/`1`/`true`/`false` | `true` |\n | `showQuotedAuthorAvatarInDesc` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `false` |\n | `showAuthorAvatarInDesc` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `falseP` |\n | `showEmojiForQuotesAndReply` | Use \"🔁\" instead of \"QT\", \"↩️\" instead of \"Re\" | `0`/`1`/`true`/`false` | `true` |\n | `showQuotedInTitle` | Show quoted tweet in title | `0`/`1`/`true`/`false` | `true` |\n | `replies` | Show replies | `0`/`1`/`true`/`false` | `true` |\n\n Specify different option values than default values to improve readability. The URL\n\n ```\n https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1\n ```","location":"index.ts"}} /> - | Key | Description | Accepts | Defaults to | - | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- | - | `showAuthorInTitle` | Show author name in title | `0`/`1`/`true`/`false` | `true` | - | `showAuthorInDesc` | Show author name in description (RSS body) | `0`/`1`/`true`/`false` | `true` | - | `showQuotedAuthorAvatarInDesc` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `false` | - | `showAuthorAvatarInDesc` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `falseP` | - | `showEmojiForQuotesAndReply` | Use "🔁" instead of "QT", "↩️" instead of "Re" | `0`/`1`/`true`/`false` | `true` | - | `showQuotedInTitle` | Show quoted tweet in title | `0`/`1`/`true`/`false` | `true` | - | `replies` | Show replies | `0`/`1`/`true`/`false` | `true` | +Specify options (in the format of query string) in parameter `routeParams` to control some extra features for threads - Specify different option values than default values to improve readability. The URL +| Key | Description | Accepts | Defaults to | +| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------- | +| `showAuthorInTitle` | Show author name in title | `0`/`1`/`true`/`false` | `true` | +| `showAuthorInDesc` | Show author name in description (RSS body) | `0`/`1`/`true`/`false` | `true` | +| `showQuotedAuthorAvatarInDesc` | Show avatar of quoted author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `false` | +| `showAuthorAvatarInDesc` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | `0`/`1`/`true`/`false` | `falseP` | +| `showEmojiForQuotesAndReply` | Use "🔁" instead of "QT", "↩️" instead of "Re" | `0`/`1`/`true`/`false` | `true` | +| `showQuotedInTitle` | Show quoted tweet in title | `0`/`1`/`true`/`false` | `true` | +| `replies` | Show replies | `0`/`1`/`true`/`false` | `true` | - ``` - https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1 - ``` -</Route> +Specify different option values than default values to improve readability. The URL + +``` +https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuotedAuthorAvatarInDesc=1&showAuthorAvatarInDesc=1&showEmojiForQuotesAndReply=1&showQuotedInTitle=1 +``` ## TikTok {#tiktok} ### User {#tiktok-user} -<Route author="TonyRL" example="/tiktok/user/@linustech/true" path="/tiktok/user/:user/:iframe?" paramsDesc={['User ID, including @', 'Use the official iframe to embed the video, which allows you to view the video if the default option does not work. Default to `false`']} puppeteer="1" radar="1" /> +<Route namespace="tiktok" data={{"path":"/user/:user/:iframe?","categories":["social-media"],"example":"/tiktok/user/@linustech/true","parameters":{"user":"User ID, including @","iframe":"Use the official iframe to embed the video, which allows you to view the video if the default option does not work. Default to `false`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tiktok.com/:user"],"target":"/user/:user"},"name":"User","maintainers":["TonyRL"],"location":"user.ts"}} /> ## Twitter {#twitter} @@ -862,181 +684,152 @@ generates <img loading="lazy" src="/img/readable-twitter.png" alt="Readable Twitter RSS of Durov" /> -### User timeline {#twitter-user-timeline} +### Collection {#twitter-collection} -<Route author="DIYgod yindaheng98 Rongronggg9" path="/twitter/user/:id/:routeParams?" example="/twitter/user/DIYgod" paramsDesc={['username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', 'extra parameters, see the table above; particularly when `routeParams=exclude_replies`, replies are excluded; `routeParams=exclude_rts` excludes retweets,`routeParams=exclude_rts_replies` exclude replies and retweets; for default include all.']} radar="1" configRequired="1" /> +<Route namespace="twitter" data={{"path":"/collection/:uid/:collectionId/:routeParams?","categories":["social-media"],"example":"/twitter/collection/DIYgod/1527857429467172864","parameters":{"uid":"username, should match the generated token","collectionId":"collection ID, can be found in URL","routeParams":"extra parameters, see the table above"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Collection","maintainers":["TonyRL"],"description":":::warning\n This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations.\n :::","location":"collection.ts"}} /> -### User media {#twitter-user-media} - -<Route author="yindaheng98 Rongronggg9 DIYgod" path="/twitter/media/:id/:routeParams?" example="/twitter/media/DIYgod" paramsDesc={['username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', 'extra parameters, see the table above.']} radar="1" configRequired="1" /> +:::warning +This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. +::: ### Keyword {#twitter-keyword} -<Route author="DIYgod yindaheng98 Rongronggg9" example="/twitter/keyword/RSSHub" path="/twitter/keyword/:keyword/:routeParams?" paramsDesc={['keyword', 'extra parameters, see the table above']} radar="1" configRequired="1" /> - -### Tweet Details {#twitter-tweet-details} - -<Route author="LarchLiu Rongronggg9 DIYgod" example="/twitter/tweet/DIYgod/status/1650844643997646852" path="/twitter/tweet/:id/status/:status/:original?" paramsDesc={['username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', 'tweet ID', 'extra parameters, data type of return, if the value is not `0`/`false` and `config.isPackage` is `true`, return the original data of twitter']} radar="1" configRequired="1" /> - -### User following timeline {#twitter-user-following-timeline} - -<Route author="DIYgod" example="/twitter/followings/DIYgod" path="/twitter/followings/:id/:routeParams?" paramsDesc={['username', 'extra parameters, see the table above']} radar="1" configRequired="1" notOperational="1"> - :::warning - This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. - ::: -</Route> +<Route namespace="twitter" data={{"path":"/keyword/:keyword/:routeParams?","categories":["social-media"],"example":"/twitter/keyword/RSSHub","parameters":{"keyword":"keyword","routeParams":"extra parameters, see the table above"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Keyword","maintainers":["DIYgod","yindaheng98","Rongronggg9"],"location":"keyword.ts"}} /> ### List timeline {#twitter-list-timeline} -<Route author="xyqfer" example="/twitter/list/ladyleet/javascript" path="/twitter/list/:id/:name/:routeParams?" paramsDesc={['username', 'list name', 'extra parameters, see the table above']} radar="1" notOperational="1" /> - -### User likes {#twitter-user-likes} - -<Route author="xyqfer" example="/twitter/likes/DIYgod" path="/twitter/likes/:id/:routeParams?" paramsDesc={['username', 'extra parameters, see the table above']} radar="1" notOperational="1" /> +<Route namespace="twitter" data={{"path":"/list/:id/:name/:routeParams?","categories":["social-media"],"example":"/twitter/list/ladyleet/javascript","parameters":{"id":"username","name":"list name","routeParams":"extra parameters, see the table above"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"List timeline","maintainers":["xyqfer"],"location":"list.ts"}} /> ### Trends {#twitter-trends} -<Route author="sakamossan" example="/twitter/trends/23424856" path="/twitter/trends/:woeid?" paramsDesc={['Yahoo! Where On Earth ID. default to woeid=1 (World Wide)']} radar="1" notOperational="1" /> +<Route namespace="twitter" data={{"path":"/trends/:woeid?","categories":["social-media"],"example":"/twitter/trends/23424856","parameters":{"woeid":"Yahoo! Where On Earth ID. default to woeid=1 (World Wide)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Trends","maintainers":["sakamossan"],"location":"trends.ts"}} /> -### Collection {#twitter-collection} +### Tweet Details {#twitter-tweet-details} -<Route author="TonyRL" example="/twitter/collection/DIYgod/1527857429467172864" path="/twitter/collection/:uid/:collectionId/:routeParams?" paramsDesc={['username, should match the generated token', 'collection ID, can be found in URL', 'extra parameters, see the table above']} radar="1" configRequired="1" notOperational="1"> - :::warning - This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. - ::: -</Route> +<Route namespace="twitter" data={{"path":"/tweet/:id/status/:status/:original?","categories":["social-media"],"example":"/twitter/tweet/DIYgod/status/1650844643997646852","parameters":{"id":"username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`","status":"tweet ID","original":"extra parameters, data type of return, if the value is not `0`/`false` and `config.isPackage` is `true`, return the original data of twitter"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Tweet Details","maintainers":["LarchLiu","Rongronggg9"],"location":"tweet.ts"}} /> + +### User following timeline {#twitter-user-following-timeline} + +<Route namespace="twitter" data={{"path":"/followings/:id/:routeParams?","categories":["social-media"],"example":"/twitter/followings/DIYgod","parameters":{"id":"username","routeParams":"extra parameters, see the table above"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User following timeline","maintainers":["DIYgod"],"description":":::warning\n This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations.\n :::","location":"followings.ts"}} /> + +:::warning +This route requires Twitter token's corresponding id, therefore it's only available when self-hosting, refer to the [Deploy Guide](/install/#route-specific-configurations) for route-specific configurations. +::: + +### User likes {#twitter-user-likes} + +<Route namespace="twitter" data={{"path":"/likes/:id/:routeParams?","categories":["social-media"],"example":"/twitter/likes/DIYgod","parameters":{"id":"username","routeParams":"extra parameters, see the table above"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User likes","maintainers":["xyqfer"],"location":"likes.ts"}} /> + +### User media {#twitter-user-media} + +<Route namespace="twitter" data={{"path":"/media/:id/:routeParams?","categories":["social-media"],"example":"/twitter/media/DIYgod","parameters":{"id":"username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`","routeParams":"extra parameters, see the table above."},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User media","maintainers":["yindaheng98","Rongronggg9"],"location":"media.ts"}} /> + +### User timeline {#twitter-user-timeline} + +<Route namespace="twitter" data={{"path":"/user/:id/:routeParams?","categories":["social-media"],"example":"/twitter/user/DIYgod","parameters":{"id":"username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`","routeParams":"extra parameters, see the table above; particularly when `routeParams=exclude_replies`, replies are excluded; `routeParams=exclude_rts` excludes retweets,`routeParams=exclude_rts_replies` exclude replies and retweets; for default include all."},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User timeline","maintainers":["DIYgod","yindaheng98","Rongronggg9"],"location":"user.ts"}} /> ## Vimeo {#vimeo} -### User Profile {#vimeo-user-profile} +### Category {#vimeo-category} -<Route author="MisteryMonster" example="/vimeo/user/filmsupply/picks" path="/vimeo/user/:username/:cat?" paramsDesc={['In this example [https://vimeo.com/filmsupply](https://vimeo.com/filmsupply) is `filmsupply`', 'deafult for all latest videos, others categories in this example such as `Docmentary`, `Narrative`, `Drama`. Set `picks` for promote orders, just orderd like web page. When `picks` added, published date won\'t show up']}> - :::tip[Special category name attention] - Some of the categories contain slash like `3D/CG` , must change the slash `/` to the vertical bar`|`. - ::: -</Route> +<Route namespace="vimeo" data={{"path":"/category/:category/:staffpicks?","categories":["social-media"],"example":"/vimeo/category/documentary/staffpicks","parameters":{"category":"Category name can get from url like `documentary` in [https://vimeo.com/categories/documentary/videos](https://vimeo.com/categories/documentary/videos) ","staffpicks":"type `staffpicks` to sort with staffpicks"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["MisteryMonster"],"location":"category.ts"}} /> ### Channel {#vimeo-channel} -<Route author="MisteryMonster" example="/vimeo/channel/bestoftheyear" path="/vimeo/channel/:channel" paramsDesc={['channel name can get from url like `bestoftheyear` in [https://vimeo.com/channels/bestoftheyear/videos](https://vimeo.com/channels/bestoftheyear/videos) .']} radar="1" /> +<Route namespace="vimeo" data={{"path":"/channel/:channel","categories":["social-media"],"example":"/vimeo/channel/bestoftheyear","parameters":{"channel":"channel name can get from url like `bestoftheyear` in [https://vimeo.com/channels/bestoftheyear/videos](https://vimeo.com/channels/bestoftheyear/videos) ."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vimeo.com/channels/:channel","vimeo.com/channels/:channel/videos","vimeo.com/channels/:channel/videos/:sort/:format"]},"name":"Channel","maintainers":["MisteryMonster"],"location":"channel.ts"}} /> -### Category {#vimeo-category} +### User Profile {#vimeo-user-profile} -<Route author="MisteryMonster" example="/vimeo/category/documentary/staffpicks" path="/vimeo/category/:category/:staffpicks?" paramsDesc={['Category name can get from url like `documentary` in [https://vimeo.com/categories/documentary/videos](https://vimeo.com/categories/documentary/videos) ', 'type `staffpicks` to sort with staffpicks']} radar="1" /> +<Route namespace="vimeo" data={{"path":"/user/:username/:cat?","categories":["social-media"],"example":"/vimeo/user/filmsupply/picks","parameters":{"username":"In this example [https://vimeo.com/filmsupply](https://vimeo.com/filmsupply) is `filmsupply`","cat":"deafult for all latest videos, others categories in this example such as `Docmentary`, `Narrative`, `Drama`. Set `picks` for promote orders, just orderd like web page. When `picks` added, published date won't show up"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"User Profile","maintainers":["MisteryMonster"],"description":":::tip[Special category name attention]\n Some of the categories contain slash like `3D/CG` , must change the slash `/` to the vertical bar`|`.\n :::","location":"usr-videos.ts"}} /> -## YouTube {#youtube} +:::tip[Special category name attention] +Some of the categories contain slash like `3D/CG` , must change the slash `/` to the vertical bar`|`. +::: -### User {#youtube-user} +## YouTube Live {#youtube-live} -<Route author="DIYgod" path="/youtube/user/:username/:embed?" example="/youtube/user/JFlaMusic" paramsDesc={['YouTuber id', 'Default to embed the video, set to any value to disable embedding']} radar="1" /> +### Channel {#youtube-live-channel} -### Channel {#youtube-channel} +<Route namespace="youtube" data={{"path":"/channel/:id/:embed?","categories":["social-media"],"example":"/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ","parameters":{"id":"YouTube channel id","embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.youtube.com/channel/:id"],"target":"/channel/:id"},"name":"Channel","maintainers":["DIYgod"],"description":":::tip\nYouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ).\n:::","location":"channel.ts"}} /> :::tip YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel\_id=UCDwDMPOZfxVV0x\_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ). ::: -<Route author="DIYgod" path="/youtube/channel/:id/:embed?" example="/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ" paramsDesc={['YouTube channel id', 'Default to embed the video, set to any value to disable embedding']} radar="1" /> +### Community {#youtube-live-community} -### Custom URL {#youtube-custom-url} +<Route namespace="youtube" data={{"path":"/community/:handle","categories":["social-media"],"example":"/youtube/community/@JFlaMusic","parameters":{"handle":"YouTube handles or channel id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Community","maintainers":["TonyRL"],"location":"community.ts"}} /> -<Route author="TonyRL" path="/youtube/c/:id/:embed?" example="/youtube/c/YouTubeCreators" paramsDesc={['YouTube custom URL', 'Default to embed the video, set to any value to disable embedding']} radar="1" /> +### Music Charts {#youtube-live-music-charts} -### Playlist {#youtube-playlist} +<Route namespace="youtube" data={{"path":"/charts/:category?/:country?/:embed?","categories":["social-media"],"example":"/youtube/charts","parameters":{"category":"Chart, see table below, default to `TopVideos`","country":"Country Code, see table below, default to global","embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Music Charts","maintainers":["TonyRL"],"description":"Chart\n\n | Top artists | Top songs | Top music videos | Trending |\n | ----------- | --------- | ---------------- | -------------- |\n | TopArtists | TopSongs | TopVideos | TrendingVideos |\n\n Country Code\n\n | Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada |\n | --------- | --------- | ------- | ------- | ------- | ------ | ------ |\n | ar | au | at | be | bo | br | ca |\n\n | Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador |\n | ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- |\n | cl | co | cr | cz | dk | do | ec |\n\n | Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala |\n | ----- | ----------- | ------- | ------- | ------ | ------- | --------- |\n | eg | sv | ee | fi | fr | de | gt |\n\n | Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy |\n | -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- |\n | hn | hu | is | in | id | ie | il | it |\n\n | Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua |\n | ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- |\n | jp | ke | lu | mx | nl | nz | ni |\n\n | Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania |\n | ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- |\n | ng | no | pa | py | pe | pl | pt | ro |\n\n | Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland |\n | ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- |\n | ru | sa | rs | za | kr | es | se | ch |\n\n | Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States |\n | -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- |\n | tz | tr | ug | ua | ae | gb | us |\n\n | Uruguay | Zimbabwe |\n | ------- | -------- |\n | uy | zw |","location":"charts.ts"}} /> -<Route author="HenryQW" path="/youtube/playlist/:id/:embed?" example="/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z" paramsDesc={['YouTube playlist id', 'Default to embed the video, set to any value to disable embedding']} radar="1" /> +Chart -### Community {#youtube-community} +| Top artists | Top songs | Top music videos | Trending | +| ----------- | --------- | ---------------- | -------------- | +| TopArtists | TopSongs | TopVideos | TrendingVideos | -<Route author="TonyRL" path="/youtube/community/:handle" example="/youtube/community/@JFlaMusic" paramsDesc={['YouTube handles or channel id']} radar="1" /> +Country Code -### Subscriptions {#youtube-subscriptions} +| Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada | +| --------- | --------- | ------- | ------- | ------- | ------ | ------ | +| ar | au | at | be | bo | br | ca | -<Route author="TonyRL" path="/youtube/subscriptions/:embed?" example="/youtube/subscriptions" paramsDesc={['Default to embed the video, set to any value to disable embedding']} configRequired="1" radar="1" /> +| Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador | +| ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- | +| cl | co | cr | cz | dk | do | ec | -### Music Charts {#youtube-music-charts} +| Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala | +| ----- | ----------- | ------- | ------- | ------ | ------- | --------- | +| eg | sv | ee | fi | fr | de | gt | -<Route author="TonyRL" path="/youtube/charts/:category?/:country?/:embed?" example="/youtube/charts" paramsDesc={['Chart, see table below, default to `TopVideos`', 'Country Code, see table below, default to global', 'Default to embed the video, set to any value to disable embedding']} radar="1"> - Chart +| Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | +| -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- | +| hn | hu | is | in | id | ie | il | it | - | Top artists | Top songs | Top music videos | Trending | - | ----------- | --------- | ---------------- | -------------- | - | TopArtists | TopSongs | TopVideos | TrendingVideos | +| Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua | +| ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- | +| jp | ke | lu | mx | nl | nz | ni | - Country Code +| Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania | +| ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- | +| ng | no | pa | py | pe | pl | pt | ro | - | Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada | - | --------- | --------- | ------- | ------- | ------- | ------ | ------ | - | ar | au | at | be | bo | br | ca | +| Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland | +| ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- | +| ru | sa | rs | za | kr | es | se | ch | - | Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador | - | ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- | - | cl | co | cr | cz | dk | do | ec | +| Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States | +| -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- | +| tz | tr | ug | ua | ae | gb | us | - | Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala | - | ----- | ----------- | ------- | ------- | ------ | ------- | --------- | - | eg | sv | ee | fi | fr | de | gt | +| Uruguay | Zimbabwe | +| ------- | -------- | +| uy | zw | - | Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | - | -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- | - | hn | hu | is | in | id | ie | il | it | +### Playlist {#youtube-live-playlist} - | Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua | - | ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- | - | jp | ke | lu | mx | nl | nz | ni | +<Route namespace="youtube" data={{"path":"/playlist/:id/:embed?","categories":["social-media"],"example":"/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z","parameters":{"id":"YouTube playlist id","embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Playlist","maintainers":["HenryQW"],"location":"playlist.ts"}} /> - | Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania | - | ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- | - | ng | no | pa | py | pe | pl | pt | ro | +### Subscriptions {#youtube-live-subscriptions} - | Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland | - | ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- | - | ru | sa | rs | za | kr | es | se | ch | +<Route namespace="youtube" data={{"path":"/subscriptions/:embed?","categories":["social-media"],"example":"/youtube/subscriptions","parameters":{"embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.youtube.com/feed/subscriptions","www.youtube.com/feed/channels"],"target":"/subscriptions"},"name":"Subscriptions","maintainers":["TonyRL"],"url":"www.youtube.com/feed/subscriptions","location":"subscriptions.ts"}} /> - | Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States | - | -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- | - | tz | tr | ug | ua | ae | gb | us | +### User {#youtube-live-user} - | Uruguay | Zimbabwe | - | ------- | -------- | - | uy | zw | -</Route> - -## 巴哈姆特 {#ba-ha-mu-te} - -### 个人小屋 {#ba-ha-mu-te-ge-ren-xiao-wu} - -<Route author="hoilc" example="/bahamut/creation/tpesamguo/338592" path="/bahamut/creation/:author/:category?" paramsDesc={['作者 ID, 即为个人小屋 URL 中 `owner` 参数','分类ID, 即为创作分类 URL 中 `c` 参数']} /> - -### 创作大厅 {#ba-ha-mu-te-chuang-zuo-da-ting} - -<Route author="hoilc" example="/bahamut/creation_index/4/0/2" path="/bahamut/creation_index/:category?/:subcategory?/:type?" paramsDesc={['分类 ID, 即为 URL 中 `k1` 参数, 0 或置空为不限','子分类 ID, 即为 URL 中 `k2` 参数, 0或置空为不限', '排行类型, 即为 URL 中 `vt` 参数, 0或置空为達人專欄']}> - 分类 ID 参考如下 - - | 不限 | 日誌 | 小說 | 繪圖 | Cosplay | 同人商品 | - | ---- | ---- | ---- | ---- | ------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | - - 子分类 ID 比较多不作列举 - - 排行类型参考如下 - - | 達人專欄 | 最新創作 | 最新推薦 | 熱門創作 | 精選閣樓 | - | -------- | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="youtube" data={{"path":"/user/:username/:embed?","categories":["social-media"],"example":"/youtube/user/JFlaMusic","parameters":{"username":"YouTuber id","embed":"Default to embed the video, set to any value to disable embedding"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.youtube.com/user/:username"],"target":"/user/:username"},"name":"User","maintainers":["DIYgod"],"location":"user.ts"}} /> ## 唱吧 {#chang-ba} ### 用户 {#chang-ba-yong-hu} -<Route author="kt286 xizeyoupan" example="/changba/skp6hhF59n48R-UpqO3izw" path="/changba/:userid" paramsDesc={['用户ID, 可在对应分享页面的 URL 中找到']} radar="1" supportPodcast="1" /> +<Route namespace="changba" data={{"path":"/:userid","categories":["social-media"],"example":"/changba/skp6hhF59n48R-UpqO3izw","parameters":{"userid":"用户ID, 可在对应分享页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["changba.com/s/:userid"]},"name":"用户","maintainers":[],"location":"user.ts"}} /> -## 抖音 {#dou-yin} +## 抖音直播 {#dou-yin-zhi-bo} :::warning -反爬严格,需要启用 puppeteer。\ -抖音的视频 CDN 会验证 Referer,意味着许多阅读器都无法直接播放内嵌视频,以下是一些变通解决方案: +反爬严格,需要启用 puppeteer。抖音的视频 CDN 会验证 Referer,意味着许多阅读器都无法直接播放内嵌视频,以下是一些变通解决方案: 1. 启用内嵌视频 (`embed=1`), 参考 [通用参数 -> 多媒体处理](/parameter#多媒体处理) 配置 `multimedia_hotlink_template` **或** `wrap_multimedia_in_iframe`。 2. 关闭内嵌视频 (`embed=0`),手动点击 `视频直链` 超链接,一般情况下均可成功播放视频。若仍然出现 HTTP 403,请复制 URL 以后到浏览器打开。 @@ -1049,47 +842,39 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout | ------- | ---------------- | ---------------------- | ------- | | `embed` | 是否启用内嵌视频 | `0`/`1`/`true`/`false` | `false` | -### 博主 {#dou-yin-bo-zhu} +### 标签 {#dou-yin-zhi-bo-biao-qian} -<Route author="Max-Tortoise Rongronggg9" example="/douyin/user/MS4wLjABAAAARcAHmmF9mAG3JEixq_CdP72APhBlGlLVbN-1eBcPqao" path="/douyin/user/:uid/:routeParams?" paramsDesc={['uid,可在用户页面 URL 中找到', '额外参数,query string 格式,请参阅上面的表格']} anticrawler="1" radar="1" puppeteer="1" /> +<Route namespace="douyin" data={{"path":"/hashtag/:cid/:routeParams?","categories":["social-media"],"example":"/douyin/hashtag/1592824105719812","parameters":{"cid":"标签 ID,可在标签页面 URL 中找到","routeParams":"额外参数,query string 格式,请参阅上面的表格"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["douyin.com/hashtag/:cid"],"target":"/hashtag/:cid"},"name":"标签","maintainers":["TonyRL"],"location":"hashtag.ts"}} /> -### 标签 {#dou-yin-biao-qian} +### 博主 {#dou-yin-zhi-bo-bo-zhu} -<Route author="TonyRL" example="/douyin/hashtag/1592824105719812" path="/douyin/hashtag/:cid/:routeParams?" paramsDesc={['标签 ID,可在标签页面 URL 中找到', '额外参数,query string 格式,请参阅上面的表格']} anticrawler="1" radar="1" puppeteer="1" /> - -### 直播 {#dou-yin-zhi-bo} - -见 [#抖音直播](/routes/live#dou-yin-zhi-bo) +<Route namespace="douyin" data={{"path":"/user/:uid/:routeParams?","categories":["social-media"],"example":"/douyin/user/MS4wLjABAAAARcAHmmF9mAG3JEixq_CdP72APhBlGlLVbN-1eBcPqao","parameters":{"uid":"uid,可在用户页面 URL 中找到","routeParams":"额外参数,query string 格式,请参阅上面的表格"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["douyin.com/user/:uid"],"target":"/user/:uid"},"name":"博主","maintainers":["Max-Tortoise","Rongronggg9"],"location":"user.ts"}} /> ## 豆瓣 {#dou-ban} -### 正在上映的电影 {#dou-ban-zheng-zai-shang-ying-de-dian-ying} +### Unknown {#dou-ban-unknown} -<Route author="DIYgod" example="/douban/movie/playing" path="/douban/movie/playing" /> +<Route namespace="douban" data={{"path":"/doulist/:id","categories":["social-media"],"example":"/douban/doulist/37716774","parameters":{"id":"豆列id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["LogicJake","honue"],"location":"other/doulist.ts"}} /> -### 正在上映的高分电影 {#dou-ban-zheng-zai-shang-ying-de-gao-fen-dian-ying} +### Unknown {#dou-ban-unknown} -<Route author="DIYgod" example="/douban/movie/playing/7.5" path="/douban/movie/playing/:score" paramsDesc={['返回大于等于这个分数的电影']} /> - -### 即将上映的电影 {#dou-ban-ji-jiang-shang-ying-de-dian-ying} - -<Route author="DIYgod" example="/douban/movie/later" path="/douban/movie/later" /> +<Route namespace="douban" data={{"path":"/book/latest","categories":["social-media"],"example":"/douban/book/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["fengkx"],"location":"other/latest-book.ts"}} /> ### 北美票房榜 {#dou-ban-bei-mei-piao-fang-bang} -<Route author="DIYgod" example="/douban/movie/ustop" path="/douban/movie/ustop" /> +<Route namespace="douban" data={{"path":"/movie/ustop","categories":["social-media"],"example":"/douban/movie/ustop","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"北美票房榜","maintainers":["DIYgod"],"location":"other/ustop.ts"}} /> -### 一周口碑榜 {#dou-ban-yi-zhou-kou-bei-bang} +### 豆瓣书店 {#dou-ban-dou-ban-shu-dian} -<Route author="umm233 nczitzk" example="/douban/movie/weekly" path="/douban/movie/weekly/:type?" paramsDesc={['分类,可在榜单页 URL 中找到,默认为一周口碑电影榜']}> - | 一周口碑电影榜 | 华语口碑剧集榜 | - | ------------------- | ------------------------- | - | movie\_weekly\_best | tv\_chinese\_best\_weekly | -</Route> +<Route namespace="douban" data={{"path":"/bookstore","categories":["social-media"],"example":"/douban/bookstore","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"豆瓣书店","maintainers":["xyqfer"],"location":"other/bookstore.ts"}} /> + +### 豆瓣电影人 {#dou-ban-dou-ban-dian-ying-ren} + +<Route namespace="douban" data={{"path":"/celebrity/:id/:sort?","categories":["social-media"],"example":"/douban/celebrity/1274261","parameters":{"id":"电影人 id","sort":"排序方式,缺省为 `time`(时间排序),可为 `vote` (评价排序)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"豆瓣电影人","maintainers":["minimalistrojan"],"location":"other/celebrity.ts"}} /> ### 豆瓣电影分类 {#dou-ban-dou-ban-dian-ying-fen-lei} -<Route author="zzwab" example="/douban/movie/classification/R/7.5/Netflix,2020" path="/douban/movie/classification/:sort?/:score?/:tags?" paramsDesc={['排序方式,默认为U', '最低评分,默认不限制', '分类标签,多个标签之间用英文逗号分隔,常见的标签到豆瓣电影的分类页面查看,支持自定义标签']} /> +<Route namespace="douban" data={{"path":"/movie/classification/:sort?/:score?/:tags?","categories":["social-media"],"example":"/douban/movie/classification/R/7.5/Netflix,2020","parameters":{"sort":"排序方式,默认为U","score":"最低评分,默认不限制","tags":"分类标签,多个标签之间用英文逗号分隔,常见的标签到豆瓣电影的分类页面查看,支持自定义标签"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"豆瓣电影分类","maintainers":["zzwab"],"description":"排序方式可选值如下\n\n| 近期热门 | 标记最多 | 评分最高 | 最近上映 |\n| -------- | -------- | -------- | -------- |\n| U | T | S | R |","location":"other/classification.ts"}} /> 排序方式可选值如下 @@ -1097,375 +882,272 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout | -------- | -------- | -------- | -------- | | U | T | S | R | -### 豆瓣电影人 {#dou-ban-dou-ban-dian-ying-ren} +### 豆瓣读书论坛 {#dou-ban-dou-ban-du-shu-lun-tan} -<Route author="minimalistrojan" example="/douban/celebrity/1274261" path="/douban/celebrity/:id/:sort?" paramsDesc={['电影人 id', '排序方式,缺省为 `time`(时间排序),可为 `vote` (评价排序)']} /> +<Route namespace="douban" data={{"path":"/:id/discussion","categories":["social-media"],"example":"/douban/36328704/discussion","parameters":{"id":"书本id;默认论坛文章使用\"按回应时间排序\",仅第一页文章"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["book.douban.com/:id/discussion"]},"name":"豆瓣读书论坛","maintainers":["nightmare-mio"],"location":"other/discussion.ts"}} /> ### 豆瓣小组 {#dou-ban-dou-ban-xiao-zu} -<Route author="DIYgod" example="/douban/group/648102" path="/douban/group/:groupid/:type?" paramsDesc={['豆瓣小组的 id', '缺省 最新,essence 最热,elite 精华']} /> - -### 浏览发现 {#dou-ban-liu-lan-fa-xian} - -<Route author="clarkzsd Fatpandac" example="/douban/explore" path="/douban/explore" /> - -### 浏览发现分栏目 {#dou-ban-liu-lan-fa-xian-fen-lan-mu} - -<Route author="LogicJake" example="/douban/explore/column/2" path="/douban/explore_column/:id" paramsDesc={['分栏目id']} /> - -### 新书速递 {#dou-ban-xin-shu-su-di} - -<Route author="fengkx" example="/douban/book/latest" path="douban/book/latest" /> - -### 最新增加的音乐 {#dou-ban-zui-xin-zeng-jia-de-yin-yue} - -<Route author="fengkx xyqfer" example="/douban/music/latest/chinese" path="/douban/music/latest/:area?" paramsDesc={['区域类型,默认全部']} notOperational="1"> - | 华语 | 欧美 | 日韩 | - | ------- | ------- | ----------- | - | chinese | western | japankorean | -</Route> - -### 热门同城活动 {#dou-ban-re-men-tong-cheng-huo-dong} - -<Route author="xyqfer" example="/douban/event/hot/118172" path="/douban/event/hot/:locationId" paramsDesc={['位置 id, [同城首页](https://www.douban.com/location)打开控制台执行 `window.__loc_id__` 获取']} /> - -### 商务印书馆新书速递 {#dou-ban-shang-wu-yin-shu-guan-xin-shu-su-di} - -<Route author="xyqfer" example="/douban/commercialpress/latest" path="/douban/commercialpress/latest" /> - -### 豆瓣书店 {#dou-ban-dou-ban-shu-dian} - -<Route author="xyqfer" example="/douban/bookstore" path="/douban/bookstore" /> - -### 热门图书排行 {#dou-ban-re-men-tu-shu-pai-hang} - -<Route author="xyqfer queensferryme" example="/douban/book/rank/fiction" path="/douban/book/rank/:type?" paramsDesc={['图书类型,默认合并列表']}> - | 全部 | 虚构 | 非虚构 | - | ---- | ------- | ---------- | - | | fiction | nonfiction | -</Route> - -### 豆瓣豆列 {#dou-ban-dou-ban-dou-lie} - -<Route author="LogicJake" example="/douban/doulist/37716774" path="douban/doulist/:id" paramsDesc={['豆列id']} /> - -### 用户广播 {#dou-ban-yong-hu-guang-bo} - -<Route author="alfredcai" example="/douban/people/62759792/status" path="douban/people/:userid/status/:routeParams" paramsDesc={['整数型用户 id', '额外参数;见下']} radar="1"> - :::tip - - **目前只支持整数型 id** - - 字母型的 id,可以通过头像图片链接来找到其整数型 id,图片命名规则`ul[userid]-*.jpg`或`u[userid]-*.jpg`,即取文件名中间的数字 - - 例如:用户 id: `MovieL`他的头像图片链接:`https://img1.doubanio.com/icon/ul1128221-98.jpg`他的整数型 id: `1128221` - ::: - - 对于豆瓣用户广播内容,在 `routeParams` 参数中以 query string 格式设置如下选项可以控制输出的样式 - - | 键 | 含义 | 接受的值 | 默认值 | - | -------------------------- | -------------------------------------------------------------- | -------------- | ------ | - | readable | 是否开启细节排版可读性优化 | 0/1/true/false | false | - | authorNameBold | 是否加粗作者名字 | 0/1/true/false | false | - | showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | true | - | showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false | - | showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | - | showEmojiForRetweet | 显示 “🔁” 取代 “Fw”(转发) | 0/1/true/false | false | - | showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发的广播) | 0/1/true/false | false | - | addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false | - | showTimestampInDescription | 在正文处显示广播的时间戳 | 0/1/true/false | false | - | showComments | 在正文处显示评论 | 0/1/true/false | false | - | widthOfPics | 广播配图宽(生效取决于阅读器) | 不指定 / 数字 | 不指定 | - | heightOfPics | 广播配图高(生效取决于阅读器) | 不指定 / 数字 | 不指定 | - | sizeOfAuthorAvatar | 作者头像大小 | 数字 | 48 | - - 指定更多与默认值不同的参数选项可以改善 RSS 的可读性,如 - - [https://rsshub.app/douban/people/113894409/status/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=1\&addLinkForPics=1\&showTimestampInDescription=1\&showComments=1\&widthOfPics=100](https://rsshub.app/douban/people/113894409/status/readable=1\&authorNameBold=1\&showAuthorInTitle=1\&showAuthorInDesc=1\&showAuthorAvatarInDesc=1\&showEmojiForRetweet=1\&showRetweetTextInTitle=1\&addLinkForPics=1\&showTimestampInDescription=1\&showComments=1\&widthOfPics=100) - - 的效果为 - - <img loading="lazy" src="/img/readable-douban.png" alt="豆瓣读书的可读豆瓣广播 RSS" /> -</Route> - -### 日记最新回应 {#dou-ban-ri-ji-zui-xin-hui-ying} - -<Route author="nczitzk" example="/douban/replies/xiaoyaxiaoya" path="/douban/replies/:uid" paramsDesc={['用户id,可在用户日记页 URL 中找到']} notOperational="1" /> - -### 最新回应过的日记 {#dou-ban-zui-xin-hui-ying-guo-de-ri-ji} - -<Route author="nczitzk" example="/douban/replied/xiaoyaxiaoya" path="/douban/replied/:uid" paramsDesc={['用户id,可在用户日记页 URL 中找到']} notOperational="1" /> - -### 话题 {#dou-ban-hua-ti} - -<Route author="LogicJake" example="/douban/topic/48823" path="/douban/topic/:id/:sort?" paramsDesc={['话题id','排序方式,hot或new,默认为new']} /> - -### 频道专题 {#dou-ban-pin-dao-zhuan-ti} - -<Route author="umm233" example="/douban/channel/30168934/hot" path="/douban/channel/:id/:nav?" paramsDesc={['频道id','专题分类,可选,默认为 default']}> - | 默认 | 热门 | 最新 | - | ------- | ---- | ---- | - | default | hot | new | -</Route> - -### 频道书影音 {#dou-ban-pin-dao-shu-ying-yin} - -<Route author="umm233" example="/douban/channel/30168934/subject/0" path="/douban/channel/:id/subject/:nav" paramsDesc={['频道id','书影音分类']}> - | 电影 | 电视剧 | 图书 | 唱片 | - | ---- | ------ | ---- | ---- | - | 0 | 1 | 2 | 3 | -</Route> - -### 用户想看 {#dou-ban-yong-hu-xiang-kan} - -<Route author="exherb" example="/douban/people/exherb/wish" path="/douban/people/:userid/wish/:routeParams?" paramsDesc={['用户id','额外参数;见下']}> - 对于豆瓣用户想看的内容,在 `routeParams` 参数中以 query string 格式设置如下选项可以控制输出的样式 - - | 键 | 含义 | 接受的值 | 默认值 | - | ---------- | ---------- | -------- | ------ | - | pagesCount | 查询页面数 | | 1 | -</Route> +<Route namespace="douban" data={{"path":"/group/:groupid/:type?","categories":["social-media"],"example":"/douban/group/648102","parameters":{"groupid":"豆瓣小组的 id","type":"缺省 最新,essence 最热,elite 精华"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.douban.com/group/:groupid"],"target":"/group/:groupid"},"name":"豆瓣小组","maintainers":["DIYgod"],"location":"other/group.ts"}} /> ### 豆瓣招聘 {#dou-ban-dou-ban-zhao-pin} -<Route author="Fatpandac" example="/douban/jobs/campus" path="/douban/jobs/:type" paramsDesc={['招聘类型,见下表']}> - | 社会招聘 | 校园招聘 | 实习生招聘 | - | :------: | :------: | :--------: | - | social | campus | intern | -</Route> +<Route namespace="douban" data={{"path":"/jobs/:type","categories":["social-media"],"example":"/douban/jobs/campus","parameters":{"type":"招聘类型,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"豆瓣招聘","maintainers":["Fatpandac"],"description":"| 社会招聘 | 校园招聘 | 实习生招聘 |\n | :------: | :------: | :--------: |\n | social | campus | intern |","location":"other/jobs.ts"}} /> + +| 社会招聘 | 校园招聘 | 实习生招聘 | +| :------: | :------: | :--------: | +| social | campus | intern | ### 豆瓣榜单与集合 {#dou-ban-dou-ban-bang-dan-yu-ji-he} -<Route author="5upernova-heng honue" example="/douban/list/subject_real_time_hotest" path="/douban/list/:type?/:routeParams?" paramsDesc={['榜单类型,见下表。默认为实时热门书影音','额外参数;请参阅以下说明和表格']}> - | 榜单 / 集合 | 路由 | - | ------------------ | ----------------------------- | - | 实时热门书影音 | subject\_real\_time\_hotest | - | 影院热映 | movie\_showing | - | 实时热门电影 | movie\_real\_time\_hotest | - | 实时热门电视 | tv\_real\_time\_hotest | - | 一周口碑电影榜 | movie\_weekly\_best | - | 华语口碑剧集榜 | tv\_chinese\_best\_weekly | - | 全球口碑剧集榜 | tv\_global\_best\_weekly | - | 国内口碑综艺榜 | show\_chinese\_best\_weekly | - | 国外口碑综艺榜 | show\_global\_best\_weekly | - | 热播新剧国产剧 | tv\_domestic | - | 热播新剧欧美剧 | tv\_american | - | 热播新剧日剧 | tv\_japanese | - | 热播新剧韩剧 | tv\_korean | - | 热播新剧动画 | tv\_animation | - | 虚构类小说热门榜 | book\_fiction\_hot\_weekly | - | 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly | - | 热门单曲榜 | music\_single | - | 华语新碟榜 | music\_chinese | - | ... | ... | +<Route namespace="douban" data={{"path":"/list/:type?/:routeParams?","categories":["social-media"],"example":"/douban/list/subject_real_time_hotest","parameters":{"type":"榜单类型,见下表。默认为实时热门书影音","routeParams":"额外参数;请参阅以下说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.douban.com/subject_collection/:type"],"target":"/list/:type"},"name":"豆瓣榜单与集合","maintainers":["5upernova-heng","honue"],"description":"| 榜单 / 集合 | 路由 |\n | ------------------ | ----------------------------- |\n | 实时热门书影音 | subject_real_time_hotest |\n | 影院热映 | movie_showing |\n | 实时热门电影 | movie_real_time_hotest |\n | 实时热门电视 | tv_real_time_hotest |\n | 一周口碑电影榜 | movie_weekly_best |\n | 华语口碑剧集榜 | tv_chinese_best_weekly |\n | 全球口碑剧集榜 | tv_global_best_weekly |\n | 国内口碑综艺榜 | show_chinese_best_weekly |\n | 国外口碑综艺榜 | show_global_best_weekly |\n | 热播新剧国产剧 | tv_domestic |\n | 热播新剧欧美剧 | tv_american |\n | 热播新剧日剧 | tv_japanese |\n | 热播新剧韩剧 | tv_korean |\n | 热播新剧动画 | tv_animation |\n | 虚构类小说热门榜 | book_fiction_hot_weekly |\n | 非虚构类小说热门榜 | book_nonfiction_hot_weekly |\n | 热门单曲榜 | music_single |\n | 华语新碟榜 | music_chinese |\n | ... | ... |\n\n | 额外参数 | 含义 | 接受的值 | 默认值 |\n | -------- | ---------------------- | -------- | ------ |\n | playable | 仅看有可播放片源的影片 | 0/1 | 0 |\n | score | 筛选评分 | 0-10 | 0 |\n\n 用例:`/douban/list/tv_korean/playable=1&score=8`\n\n > 上面的榜单 / 集合并没有列举完整。\n >\n > 如何找到榜单对应的路由参数:\n > 在豆瓣手机 APP 中,对应地榜单页面右上角,点击分享链接。链接路径 `subject_collection` 后的路径就是路由参数 `type`。\n > 如:小说热门榜的分享链接为:`https://m.douban.com/subject_collection/ECDIHUN4A`,其对应本 RSS 路由的 `type` 为 `ECDIHUN4A`,对应的订阅链接路由:[`/douban/list/ECDIHUN4A`](https://rsshub.app/douban/list/ECDIHUN4A)","location":"other/list.ts"}} /> - | 额外参数 | 含义 | 接受的值 | 默认值 | - | -------- | ---------------------- | -------- | ------ | - | playable | 仅看有可播放片源的影片 | 0/1 | 0 | - | score | 筛选评分 | 0-10 | 0 | +| 榜单 / 集合 | 路由 | +| ------------------ | ----------------------------- | +| 实时热门书影音 | subject\_real\_time\_hotest | +| 影院热映 | movie\_showing | +| 实时热门电影 | movie\_real\_time\_hotest | +| 实时热门电视 | tv\_real\_time\_hotest | +| 一周口碑电影榜 | movie\_weekly\_best | +| 华语口碑剧集榜 | tv\_chinese\_best\_weekly | +| 全球口碑剧集榜 | tv\_global\_best\_weekly | +| 国内口碑综艺榜 | show\_chinese\_best\_weekly | +| 国外口碑综艺榜 | show\_global\_best\_weekly | +| 热播新剧国产剧 | tv\_domestic | +| 热播新剧欧美剧 | tv\_american | +| 热播新剧日剧 | tv\_japanese | +| 热播新剧韩剧 | tv\_korean | +| 热播新剧动画 | tv\_animation | +| 虚构类小说热门榜 | book\_fiction\_hot\_weekly | +| 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly | +| 热门单曲榜 | music\_single | +| 华语新碟榜 | music\_chinese | +| ... | ... | - 用例:`/douban/list/tv_korean/playable=1&score=8` +| 额外参数 | 含义 | 接受的值 | 默认值 | +| -------- | ---------------------- | -------- | ------ | +| playable | 仅看有可播放片源的影片 | 0/1 | 0 | +| score | 筛选评分 | 0-10 | 0 | - > 上面的榜单 / 集合并没有列举完整。 - > - > 如何找到榜单对应的路由参数: - > 在豆瓣手机 APP 中,对应地榜单页面右上角,点击分享链接。链接路径 `subject_collection` 后的路径就是路由参数 `type`。 - > 如:小说热门榜的分享链接为:`https://m.douban.com/subject_collection/ECDIHUN4A`,其对应本 RSS 路由的 `type` 为 `ECDIHUN4A`,对应的订阅链接路由:[`/douban/list/ECDIHUN4A`](https://rsshub.app/douban/list/ECDIHUN4A) -</Route> +用例:`/douban/list/tv_korean/playable=1&score=8` + +> 上面的榜单 / 集合并没有列举完整。 +> +> 如何找到榜单对应的路由参数: +> 在豆瓣手机 APP 中,对应地榜单页面右上角,点击分享链接。链接路径 `subject_collection` 后的路径就是路由参数 `type`。 +> 如:小说热门榜的分享链接为:`https://m.douban.com/subject_collection/ECDIHUN4A`,其对应本 RSS 路由的 `type` 为 `ECDIHUN4A`,对应的订阅链接路由:[`/douban/list/ECDIHUN4A`](https://rsshub.app/douban/list/ECDIHUN4A) ### 豆瓣每月推荐片单 {#dou-ban-dou-ban-mei-yue-tui-jian-pian-dan} -<Route author="honue" example="/douban/recommended/tv" path="/douban/recommended/:type?/:routeParams?" paramsDesc={['片单类型剧集/电影,tv或movie,默认为tv','额外参数;请参阅以下说明和表格']}> - | 额外参数 | 含义 | 接受的值 | 默认值 | - | -------- | ---------------------- | -------- | ------ | - | playable | 仅看有可播放片源的影片 | 0/1 | 0 | - | score | 筛选评分 | 0-10 | 0 | +<Route namespace="douban" data={{"path":"/recommended/:type?/:routeParams?","categories":["social-media"],"example":"/douban/recommended/tv","parameters":{"type":"片单类型剧集/电影,tv或movie,默认为tv","routeParams":"额外参数;请参阅以下说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"豆瓣每月推荐片单","maintainers":["honue"],"description":"| 额外参数 | 含义 | 接受的值 | 默认值 |\n | -------- | ---------------------- | -------- | ------ |\n | playable | 仅看有可播放片源的影片 | 0/1 | 0 |\n | score | 筛选评分 | 0-10 | 0 |\n\n 用例:`/douban/recommended/tv/playable=0&score=8`\n\n :::tip\n 整合了 /douban/list/ 路由,省去每月手动更新 id 参数,因为当月推荐剧集片单中,会有还未播出 / 开评分剧集、海外平台播出剧集,请自行考虑是否使用额外参数。\n :::","location":"other/recommended.ts"}} /> - 用例:`/douban/recommended/tv/playable=0&score=8` +| 额外参数 | 含义 | 接受的值 | 默认值 | +| -------- | ---------------------- | -------- | ------ | +| playable | 仅看有可播放片源的影片 | 0/1 | 0 | +| score | 筛选评分 | 0-10 | 0 | - :::tip - 整合了 /douban/list/ 路由,省去每月手动更新 id 参数,因为当月推荐剧集片单中,会有还未播出 / 开评分剧集、海外平台播出剧集,请自行考虑是否使用额外参数。 - ::: -</Route> +用例:`/douban/recommended/tv/playable=0&score=8` -### 豆瓣读书论坛 {#dou-ban-dou-ban-du-shu-lun-tan} - -<Route author="nightmare-mio" example="/douban/36328704/discussion" path="/douban/:id/discussion" paramsDesc={['书本id;默认论坛文章使用"按回应时间排序",仅第一页文章']} /> - -## 饭否 {#fan-fou} - -:::warning -部署时需要申请并配置饭否 Consumer Key、Consumer Secret、用户名和密码,具体见部署文档 +:::tip +整合了 /douban/list/ 路由,省去每月手动更新 id 参数,因为当月推荐剧集片单中,会有还未播出 / 开评分剧集、海外平台播出剧集,请自行考虑是否使用额外参数。 ::: -### 用户动态 {#fan-fou-yong-hu-dong-tai} +### 话题 {#dou-ban-hua-ti} -<Route author="junbaor" example="/fanfou/user_timeline/wangxing" path="/fanfou/user_timeline/:uid" paramsDesc={['用户的uid']} notOperational="1" configRequired="1" /> +<Route namespace="douban" data={{"path":"/topic/:id/:sort?","categories":["social-media"],"example":"/douban/topic/48823","parameters":{"id":"话题id","sort":"排序方式,hot或new,默认为new"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"话题","maintainers":["LogicJake"],"location":"other/topic.ts"}} /> -### 当前登录用户的时间线 {#fan-fou-dang-qian-deng-lu-yong-hu-de-shi-jian-xian} +### 即将上映的电影 {#dou-ban-ji-jiang-shang-ying-de-dian-ying} -<Route author="junbaor" example="/fanfou/home_timeline" path="/fanfou/home_timeline" configRequired="1" /> +<Route namespace="douban" data={{"path":"/movie/later","categories":["social-media"],"example":"/douban/movie/later","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"即将上映的电影","maintainers":["DIYgod"],"location":"other/later.ts"}} /> -### 用户收藏 {#fan-fou-yong-hu-shou-cang} +### 浏览发现 {#dou-ban-liu-lan-fa-xian} -<Route author="junbaor" example="/fanfou/favorites/wangxing" path="/fanfou/favorites/:uid" paramsDesc={['用户的uid']} notOperational="1" configRequired="1" /> +<Route namespace="douban" data={{"path":"/explore","categories":["social-media"],"example":"/douban/explore","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"浏览发现","maintainers":["clarkzsd"],"location":"other/explore.ts"}} /> -### 热门话题 {#fan-fou-re-men-hua-ti} +### 频道书影音 {#dou-ban-pin-dao-shu-ying-yin} -<Route author="junbaor" example="/fanfou/trends" path="/fanfou/trends" notOperational="1" configRequired="1" /> +<Route namespace="douban" data={{"path":"/channel/:id/subject/:nav","categories":["social-media"],"example":"/douban/channel/30168934/subject/0","parameters":{"id":"频道id","nav":"书影音分类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道书影音","maintainers":["umm233"],"description":"| 电影 | 电视剧 | 图书 | 唱片 |\n | ---- | ------ | ---- | ---- |\n | 0 | 1 | 2 | 3 |","location":"channel/subject.ts"}} /> -### 饭否搜索 {#fan-fou-fan-fou-sou-suo} +| 电影 | 电视剧 | 图书 | 唱片 | +| ---- | ------ | ---- | ---- | +| 0 | 1 | 2 | 3 | -<Route author="junbaor" example="/fanfou/public_timeline/RSSHub" path="/fanfou/public_timeline/:keyword" paramsDesc={['关键字']} configRequired="1" /> +### 频道专题 {#dou-ban-pin-dao-zhuan-ti} + +<Route namespace="douban" data={{"path":"/channel/:id/:nav?","categories":["social-media"],"example":"/douban/channel/30168934/hot","parameters":{"id":"频道id","nav":"专题分类,可选,默认为 default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道专题","maintainers":["umm233"],"description":"| 默认 | 热门 | 最新 |\n | ------- | ---- | ---- |\n | default | hot | new |","location":"channel/topic.ts"}} /> + +| 默认 | 热门 | 最新 | +| ------- | ---- | ---- | +| default | hot | new | + +### 热门图书排行 {#dou-ban-re-men-tu-shu-pai-hang} + +<Route namespace="douban" data={{"path":"/book/rank/:type?","categories":["social-media"],"example":"/douban/book/rank/fiction","parameters":{"type":"图书类型,默认合并列表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热门图书排行","maintainers":["xyqfer","queensferryme"],"description":"| 全部 | 虚构 | 非虚构 |\n | ---- | ------- | ---------- |\n | | fiction | nonfiction |","location":"book/rank.ts"}} /> + +| 全部 | 虚构 | 非虚构 | +| ---- | ------- | ---------- | +| | fiction | nonfiction | + +### 热门同城活动 {#dou-ban-re-men-tong-cheng-huo-dong} + +<Route namespace="douban" data={{"path":"/event/hot/:locationId","categories":["social-media"],"example":"/douban/event/hot/118172","parameters":{"locationId":"位置 id, [同城首页](https://www.douban.com/location)打开控制台执行 `window.__loc_id__` 获取"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热门同城活动","maintainers":["xyqfer"],"location":"event/hot.ts"}} /> + +### 日记最新回应 {#dou-ban-ri-ji-zui-xin-hui-ying} + +<Route namespace="douban" data={{"path":"/replies/:uid","categories":["social-media"],"example":"/douban/replies/xiaoyaxiaoya","parameters":{"uid":"用户id,可在用户日记页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"日记最新回应","maintainers":["nczitzk"],"location":"other/replies.ts"}} /> + +### 商务印书馆新书速递 {#dou-ban-shang-wu-yin-shu-guan-xin-shu-su-di} + +<Route namespace="douban" data={{"path":"/commercialpress/latest","categories":["social-media"],"example":"/douban/commercialpress/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"商务印书馆新书速递","maintainers":["xyqfer"],"location":"commercialpress/latest.ts"}} /> + +### 一周口碑榜 {#dou-ban-yi-zhou-kou-bei-bang} + +<Route namespace="douban" data={{"path":"/movie/weekly/:type?","categories":["social-media"],"example":"/douban/movie/weekly","parameters":{"type":"分类,可在榜单页 URL 中找到,默认为一周口碑电影榜"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"一周口碑榜","maintainers":["numm233","nczitzk"],"description":"| 一周口碑电影榜 | 华语口碑剧集榜 |\n | ------------------- | ------------------------- |\n | movie_weekly_best | tv_chinese_best_weekly |","location":"other/weekly-best.ts"}} /> + +| 一周口碑电影榜 | 华语口碑剧集榜 | +| ------------------- | ------------------------- | +| movie\_weekly\_best | tv\_chinese\_best\_weekly | + +### 用户想看 {#dou-ban-yong-hu-xiang-kan} + +<Route namespace="douban" data={{"path":"/people/:userid/wish/:routeParams?","categories":["social-media"],"example":"/douban/people/exherb/wish","parameters":{"userid":"用户id","routeParams":"额外参数;见下"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户想看","maintainers":["exherb"],"description":"对于豆瓣用户想看的内容,在 `routeParams` 参数中以 query string 格式设置如下选项可以控制输出的样式\n\n | 键 | 含义 | 接受的值 | 默认值 |\n | ---------- | ---------- | -------- | ------ |\n | pagesCount | 查询页面数 | | 1 |","location":"people/wish.ts"}} /> + +对于豆瓣用户想看的内容,在 `routeParams` 参数中以 query string 格式设置如下选项可以控制输出的样式 + +| 键 | 含义 | 接受的值 | 默认值 | +| ---------- | ---------- | -------- | ------ | +| pagesCount | 查询页面数 | | 1 | + +### 正在上映的电影 {#dou-ban-zheng-zai-shang-ying-de-dian-ying} + +<Route namespace="douban" data={{"path":["/movie/playing","/movie/playing/:score"],"categories":["social-media"],"example":"/douban/movie/playing","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"正在上映的电影","maintainers":["DIYgod"],"location":"other/playing.ts"}} /> + +### 正在上映的电影 {#dou-ban-zheng-zai-shang-ying-de-dian-ying} + +<Route namespace="douban" data={{"path":["/movie/playing","/movie/playing/:score"],"categories":["social-media"],"example":"/douban/movie/playing","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"正在上映的电影","maintainers":["DIYgod"],"location":"other/playing.ts"}} /> + +### 最新增加的音乐 {#dou-ban-zui-xin-zeng-jia-de-yin-yue} + +<Route namespace="douban" data={{"path":"/music/latest/:area?","categories":["social-media"],"example":"/douban/music/latest/chinese","parameters":{"area":"区域类型,默认全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新增加的音乐","maintainers":["fengkx","xyqfer"],"description":"| 华语 | 欧美 | 日韩 |\n | ------- | ------- | ----------- |\n | chinese | western | japankorean |","location":"other/latest-music.ts"}} /> + +| 华语 | 欧美 | 日韩 | +| ------- | ------- | ----------- | +| chinese | western | japankorean | + +### 最新回应过的日记 {#dou-ban-zui-xin-hui-ying-guo-de-ri-ji} + +<Route namespace="douban" data={{"path":"/replied/:uid","categories":["social-media"],"example":"/douban/replied/xiaoyaxiaoya","parameters":{"uid":"用户id,可在用户日记页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新回应过的日记","maintainers":["nczitzk"],"location":"other/replied.ts"}} /> ## 方格子 {#fang-ge-zi} ### 出版專題 {#fang-ge-zi-chu-ban-zhuan-ti} -<Route author="Maecenas" example="/vocus/publication/bass" path="/vocus/publication/:id" paramsDesc={['出版專題 id,可在出版專題主页的 URL 找到']} radar="1" /> +<Route namespace="vocus" data={{"path":"/publication/:id","categories":["social-media"],"example":"/vocus/publication/bass","parameters":{"id":"出版專題 id,可在出版專題主页的 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vocus.cc/:id/home","vocus.cc/:id/introduce"]},"name":"出版專題","maintainers":["Maecenas"],"location":"publication.ts"}} /> ### 用户个人文章 {#fang-ge-zi-yong-hu-ge-ren-wen-zhang} -<Route author="LogicJake" example="/vocus/user/tsetyan" path="/vocus/user/:id" paramsDesc={['用户 id,可在用户主页的 URL 找到']} radar="1" /> +<Route namespace="vocus" data={{"path":"/user/:id","categories":["social-media"],"example":"/vocus/user/tsetyan","parameters":{"id":"用户 id,可在用户主页的 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户个人文章","maintainers":["LogicJake"],"location":"user.ts"}} /> ## 即刻 {#ji-ke} -### 用户动态 {#ji-ke-yong-hu-dong-tai} +### 圈子 - 纯文字 {#ji-ke-quan-zi-chun-wen-zi} -<Route author="DIYgod prnake" example="/jike/user/3EE02BC9-C5B3-4209-8750-4ED1EE0F67BB" path="/jike/user/:id" paramsDesc={['用户 id, 可在即刻分享出来的单条动态页点击用户头像进入个人主页,然后在个人主页的 URL 中找到,或者在单条动态页使用 RSSHub Radar 插件']} radar="1" /> +<Route namespace="jike" data={{"path":"/topic/text/:id","categories":["social-media"],"example":"/jike/topic/text/553870e8e4b0cafb0a1bef68","parameters":{"id":"圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["web.okjike.com/topic/:id"]},"name":"圈子 - 纯文字","maintainers":["HenryQW"],"location":"topic-text.ts"}} /> ### 圈子 {#ji-ke-quan-zi} -<Route author="DIYgod prnake" example="/jike/topic/556688fae4b00c57d9dd46ee" path="/jike/topic/:id/:showUid?" paramsDesc={['圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到', '是否在内容中显示用户信息,设置为 1 则开启']} radar="1" /> +<Route namespace="jike" data={{"path":"/topic/:id/:showUid?","categories":["social-media"],"example":"/jike/topic/556688fae4b00c57d9dd46ee","parameters":{"id":"圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到","showUid":"是否在内容中显示用户信息,设置为 1 则开启"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["web.okjike.com/topic/:id"],"target":"/topic/:id"},"name":"圈子","maintainers":["DIYgod","prnake"],"location":"topic.ts"}} /> -### 圈子 - 纯文字 {#ji-ke-quan-zi-chun-wen-zi} +### 用户动态 {#ji-ke-yong-hu-dong-tai} -<Route author="HenryQW" example="/jike/topic/text/553870e8e4b0cafb0a1bef68" path="/jike/topic/text/:id" paramsDesc={['圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到']} radar="1" /> +<Route namespace="jike" data={{"path":"/user/:id","categories":["social-media"],"example":"/jike/user/3EE02BC9-C5B3-4209-8750-4ED1EE0F67BB","parameters":{"id":"用户 id, 可在即刻分享出来的单条动态页点击用户头像进入个人主页,然后在个人主页的 URL 中找到,或者在单条动态页使用 RSSHub Radar 插件"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["web.okjike.com/u/:uid"],"target":"/user/:uid"},"name":"用户动态","maintainers":["DIYgod","prnake"],"location":"user.ts"}} /> ## 简书 {#jian-shu} ### 首页 {#jian-shu-shou-ye} -<Route author="DIYgod HenryQW JimenezLi" example="/jianshu/home" path="/jianshu/home" radar="1" /> +<Route namespace="jianshu" data={{"path":"/home","categories":["social-media"],"example":"/jianshu/home","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.jianshu.com/"]},"name":"首页","maintainers":["DIYgod","HenryQW","JimenezLi"],"url":"www.jianshu.com/","location":"home.ts"}} /> ### 专题 {#jian-shu-zhuan-ti} -<Route author="DIYgod HenryQW JimenezLi" example="/jianshu/collection/xYuZYD" path="/jianshu/collection/:id" paramsDesc={['专题 id, 可在专题页 URL 中找到']} radar="1" /> +<Route namespace="jianshu" data={{"path":"/collection/:id","categories":["social-media"],"example":"/jianshu/collection/xYuZYD","parameters":{"id":"专题 id, 可在专题页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.jianshu.com/c/:id"]},"name":"专题","maintainers":["DIYgod","HenryQW","JimenezLi"],"location":"collection.ts"}} /> ### 作者 {#jian-shu-zuo-zhe} -<Route author="DIYgod HenryQW JimenezLi" example="/jianshu/user/yZq3ZV" path="/jianshu/user/:id" paramsDesc={['作者 id, 可在作者主页 URL 中找到']} radar="1" /> +<Route namespace="jianshu" data={{"path":"/user/:id","categories":["social-media"],"example":"/jianshu/user/yZq3ZV","parameters":{"id":"作者 id, 可在作者主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.jianshu.com/u/:id"]},"name":"作者","maintainers":["DIYgod","HenryQW","JimenezLi"],"location":"user.ts"}} /> ## 酷安 {#ku-an} -### 图文 {#ku-an-tu-wen} +### 话题 {#ku-an-hua-ti} -<Route author="xizeyoupan" example="/coolapk/tuwen" path="/coolapk/tuwen/:type?" paramsDesc={['默认为hot']}> - | 参数名称 | 编辑精选 | 最新 | - | -------- | -------- | ------ | - | type | hot | latest | -</Route> - -### 头条 {#ku-an-tou-tiao} - -<Route author="xizeyoupan" example="/coolapk/toutiao" path="/coolapk/toutiao/:type?" paramsDesc={['默认为history']}> - | 参数名称 | 历史头条 | 最新 | - | -------- | -------- | ------ | - | type | history | latest | -</Route> +<Route namespace="coolapk" data={{"path":"/huati/:tag","categories":["social-media"],"example":"/coolapk/huati/iPhone","parameters":{"tag":"话题名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"话题","maintainers":["xizeyoupan"],"location":"huati.ts"}} /> ### 看看号 {#ku-an-kan-kan-hao} -<Route author="xizeyoupan" example="/coolapk/dyh/1524" path="/coolapk/dyh/:dyhId" paramsDesc={['看看号ID']}> - :::tip - 仅限于采集**站内订阅**的看看号的内容。看看号 ID 可在看看号界面右上分享 - 复制链接得到。 - ::: -</Route> +<Route namespace="coolapk" data={{"path":"/dyh/:dyhId","categories":["social-media"],"example":"/coolapk/dyh/1524","parameters":{"dyhId":"看看号ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"看看号","maintainers":["xizeyoupan"],"description":":::tip\n 仅限于采集**站内订阅**的看看号的内容。看看号 ID 可在看看号界面右上分享 - 复制链接得到。\n :::","location":"dyh.ts"}} /> -### 话题 {#ku-an-hua-ti} - -<Route author="xizeyoupan" example="/coolapk/huati/iPhone" path="/coolapk/huati/:tag" paramsDesc={['话题名称']} /> - -### 用户 {#ku-an-yong-hu} - -<Route author="xizeyoupan" example="/coolapk/user/3177668/dynamic" path="/coolapk/user/:uid/dynamic" paramsDesc={['在个人界面右上分享-复制链接获取']} /> +:::tip +仅限于采集**站内订阅**的看看号的内容。看看号 ID 可在看看号界面右上分享 - 复制链接得到。 +::: ### 热榜 {#ku-an-re-bang} -<Route author="xizeyoupan" example="/coolapk/hot" path="/coolapk/hot/:type?/:period?" paramsDesc={['默认为`jrrm`','默认为`daily`']}> - | 参数名称 | 今日热门 | 点赞榜 | 评论榜 | 收藏榜 | 酷图榜 | - | -------- | -------- | ------ | ------ | ------ | ------ | - | type | jrrm | dzb | plb | scb | ktb | +<Route namespace="coolapk" data={{"path":"/hot/:type?/:period?","categories":["social-media"],"example":"/coolapk/hot","parameters":{"type":"默认为`jrrm`","period":"默认为`daily`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"热榜","maintainers":["xizeyoupan"],"description":"| 参数名称 | 今日热门 | 点赞榜 | 评论榜 | 收藏榜 | 酷图榜 |\n | -------- | -------- | ------ | ------ | ------ | ------ |\n | type | jrrm | dzb | plb | scb | ktb |\n\n | 参数名称 | 日榜 | 周榜 |\n | -------- | ----- | ------ |\n | period | daily | weekly |\n\n :::tip\n 今日热门没有周榜,酷图榜日榜的参数会变成周榜,周榜的参数会变成月榜。\n :::","location":"hot.ts"}} /> - | 参数名称 | 日榜 | 周榜 | - | -------- | ----- | ------ | - | period | daily | weekly | +| 参数名称 | 今日热门 | 点赞榜 | 评论榜 | 收藏榜 | 酷图榜 | +| -------- | -------- | ------ | ------ | ------ | ------ | +| type | jrrm | dzb | plb | scb | ktb | - :::tip - 今日热门没有周榜,酷图榜日榜的参数会变成周榜,周榜的参数会变成月榜。 - ::: -</Route> +| 参数名称 | 日榜 | 周榜 | +| -------- | ----- | ------ | +| period | daily | weekly | -## 美拍 {#mei-pai} +:::tip +今日热门没有周榜,酷图榜日榜的参数会变成周榜,周榜的参数会变成月榜。 +::: -### 用户动态 {#mei-pai-yong-hu-dong-tai} +### 头条 {#ku-an-tou-tiao} -<Route author="ihewro" example="/meipai/user/56537299" path="/meipai/user/:id" paramsDesc={['用户 id, 可在 分享出去获得的用户主页 URL 中找到']} /> +<Route namespace="coolapk" data={{"path":"/toutiao/:type?","categories":["social-media"],"example":"/coolapk/toutiao","parameters":{"type":"默认为history"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"头条","maintainers":["xizeyoupan"],"description":"| 参数名称 | 历史头条 | 最新 |\n | -------- | -------- | ------ |\n | type | history | latest |","location":"toutiao.ts"}} /> -## 全民 K 歌 {#quan-min-k-ge} +| 参数名称 | 历史头条 | 最新 | +| -------- | -------- | ------ | +| type | history | latest | -### 用户作品列表 {#quan-min-k-ge-yong-hu-zuo-pin-lie-biao} +### 图文 {#ku-an-tu-wen} -<Route author="zhangxiang012" example="/qq/kg/639a9a86272c308e33" path="/qq/kg/:userId" paramsDesc={['用户 ID, 可在对应页面的 URL 中找到']} radar="1" rssaid="1" supportPodcast="1" /> +<Route namespace="coolapk" data={{"path":["/tuwen/:type?","/tuwen-xinxian"],"categories":["social-media"],"example":"/coolapk/tuwen","parameters":{"type":"默认为hot"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"图文","maintainers":["xizeyoupan"],"description":"| 参数名称 | 编辑精选 | 最新 |\n | -------- | -------- | ------ |\n | type | hot | latest |","location":"tuwen.ts"}} /> -### 用户作品评论动态 {#quan-min-k-ge-yong-hu-zuo-pin-ping-lun-dong-tai} +| 参数名称 | 编辑精选 | 最新 | +| -------- | -------- | ------ | +| type | hot | latest | -<Route author="zhangxiang012" example="/qq/kg/reply/OhXHMdO1VxLWQOOm" path="/qq/kg/reply/:playId" paramsDesc={['音频页 ID, 可在对应页面的 URL 中找到']} radar="1" rssaid="1" /> +### 图文 {#ku-an-tu-wen} -## 数字尾巴 {#shu-zi-wei-ba} +<Route namespace="coolapk" data={{"path":["/tuwen/:type?","/tuwen-xinxian"],"categories":["social-media"],"example":"/coolapk/tuwen","parameters":{"type":"默认为hot"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"图文","maintainers":["xizeyoupan"],"description":"| 参数名称 | 编辑精选 | 最新 |\n | -------- | -------- | ------ |\n | type | hot | latest |","location":"tuwen.ts"}} /> -### 首页 {#shu-zi-wei-ba-shou-ye} +| 参数名称 | 编辑精选 | 最新 | +| -------- | -------- | ------ | +| type | hot | latest | -<Route author="Erriy" example="/dgtle" path="/dgtle" /> +### 用户 {#ku-an-yong-hu} -### 闲置(分类) {#shu-zi-wei-ba-xian-zhi-fen-lei} +<Route namespace="coolapk" data={{"path":"/user/:uid/dynamic","categories":["social-media"],"example":"/coolapk/user/3177668/dynamic","parameters":{"uid":"在个人界面右上分享-复制链接获取"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户","maintainers":["xizeyoupan"],"location":"user-dynamic.ts"}} /> -<Route author="xyqfer hoilc" example="/dgtle/trade/111" path="/dgtle/trade/:typeId?" paramsDesc={['分类 id,默认为全部']}> - | 全部 | 电脑 | 手机 | 平板 | 相机 | 影音 | 外设 | 生活 | 公告 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 111 | 109 | 110 | 113 | 114 | 115 | 112 | 116 | -</Route> +## 腾讯新闻较真查证平台 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai} -### 闲置(关键词) {#shu-zi-wei-ba-xian-zhi-guan-jian-ci} +### 用户作品评论动态 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai-yong-hu-zuo-pin-ping-lun-dong-tai} -<Route author="gaoliang hoilc" example="/dgtle/trade/search/ipad" path="/dgtle/trade/search/:keyword" paramsDesc={['搜索关键词']} /> +<Route namespace="qq" data={{"path":"/kg/reply/:playId","categories":["social-media"],"example":"/qq/kg/reply/OhXHMdO1VxLWQOOm","parameters":{"playId":"音频页 ID, 可在对应页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户作品评论动态","maintainers":["zhangxiang012"],"location":"kg/reply.ts"}} /> -### 鲸图(分类) {#shu-zi-wei-ba-jing-tu-fen-lei} +### 用户作品列表 {#teng-xun-xin-wen-jiao-zhen-cha-zheng-ping-tai-yong-hu-zuo-pin-lie-biao} -<Route author="Erriy" example="/dgtle/whale/category/0" path="/dgtle/whale/category/:category" paramsDesc={['分类 id']}> - | 精选 | 人物 | 静物 | 二次元 | 黑白 | 自然 | 美食 | 电影与游戏 | 科技与艺术 | 城市与建筑 | 萌物 | 美女 | - | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---------- | ---------- | ---------- | ---- | ---- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -</Route> +<Route namespace="qq" data={{"path":"/kg/:userId","categories":["social-media"],"example":"/qq/kg/639a9a86272c308e33","parameters":{"userId":"用户 ID, 可在对应页面的 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"用户作品列表","maintainers":["zhangxiang012"],"location":"kg/user.ts"}} /> -### 鲸图(排行榜) {#shu-zi-wei-ba-jing-tu-pai-hang-bang} - -<Route author="Erriy" example="/dgtle/whale/rank/download/day" path="/dgtle/whale/rank/:type/:rule" paramsDesc={['排行榜类型', '排行榜周期']}> - type - - | 下载排行榜 | 点赞排行榜 | - | ---------- | ---------- | - | download | like | - - rule - - | 日排行 | 周排行 | 月排行 | 总排行 | - | ------ | ------ | ------ | ------ | - | day | week | month | amount | -</Route> - -## 微博 {#wei-bo} +## 微博绿洲 {#wei-bo-lv-zhou} :::warning -微博会针对请求的来源地区返回不同的结果。\ -一个已知的例子为:部分视频因未知原因仅限中国大陆境内访问 (CDN 域名为 `locallimit.us.sinaimg.cn` 而非 `f.video.weibocdn.com`)。若一条微博含有这种视频且 RSSHub 实例部署在境外,抓取到的微博可能不含视频。将 RSSHub 部署在境内有助于抓取这种视频,但阅读器也必须处于境内网络环境以加载视频。 +微博会针对请求的来源地区返回不同的结果。一个已知的例子为:部分视频因未知原因仅限中国大陆境内访问 (CDN 域名为 `locallimit.us.sinaimg.cn` 而非 `f.video.weibocdn.com`)。若一条微博含有这种视频且 RSSHub 实例部署在境外,抓取到的微博可能不含视频。将 RSSHub 部署在境内有助于抓取这种视频,但阅读器也必须处于境内网络环境以加载视频。 ::: 对于微博内容,在 `routeParams` 参数中以 query string 格式指定选项,可以控制输出的样式 @@ -1499,34 +1181,21 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout <img loading="lazy" src="/img/readable-weibo.png" alt="微博小秘书的可读微博 RSS" /> -### 博主 {#wei-bo-bo-zhu} +### 博主 {#wei-bo-lv-zhou-bo-zhu} -<Route author="DIYgod iplusx Rongronggg9" example="/weibo/user/1195230310" path="/weibo/user/:uid/:routeParams?" paramsDesc={['用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示']} radar="1" anticrawler="1"> - :::warning - 部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 `https://m.weibo.cn/u/:uid` 验证。如需要订阅该部分博主,可配置 Cookie 后订阅。 +<Route namespace="weibo" data={{"path":"/user/:uid/:routeParams?","categories":["social-media"],"example":"/weibo/user/1195230310","parameters":{"uid":"用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取","routeParams":"额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.weibo.cn/u/:uid","m.weibo.cn/profile/:uid"],"target":"/user/:uid"},"name":"博主","maintainers":["DIYgod","iplusx","Rongronggg9"],"description":":::warning\n 部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 `https://m.weibo.cn/u/:uid` 验证。如需要订阅该部分博主,可配置 Cookie 后订阅。\n\n 未提供 Cookie 的情况下偶尔会触发反爬限制,提供 Cookie 可缓解该情况。\n\n 微博用户 Cookie 的配置可参照部署文档\n :::","location":"user.ts"}} /> - 未提供 Cookie 的情况下偶尔会触发反爬限制,提供 Cookie 可缓解该情况。 +:::warning +部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 `https://m.weibo.cn/u/:uid` 验证。如需要订阅该部分博主,可配置 Cookie 后订阅。 - 微博用户 Cookie 的配置可参照部署文档 - ::: -</Route> +未提供 Cookie 的情况下偶尔会触发反爬限制,提供 Cookie 可缓解该情况。 -### 关键词 {#wei-bo-guan-jian-ci} +微博用户 Cookie 的配置可参照部署文档 +::: -<Route author="DIYgod Rongronggg9" example="/weibo/keyword/DIYgod" path="/weibo/keyword/:keyword/:routeParams?" paramsDesc={['你想订阅的微博关键词', '额外参数;请参阅上面的说明和表格']} radar="1" /> +### 超话 {#wei-bo-lv-zhou-chao-hua} -### 热搜榜 {#wei-bo-re-sou-bang} - -<Route author="xyqfer shinemoon" example="/weibo/search/hot" path="/weibo/search/hot/:fulltext?" radar="1" /> - -- 使用`/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`,以规避微博的外链限制,否则图片无法显示。) - -### 超话 {#wei-bo-chao-hua} - -<Route author="zengxs Rongronggg9" example="/weibo/super_index/1008084989d223732bf6f02f75ea30efad58a9/sort_time" path="/weibo/super_index/:id/:type?/:routeParams?" paramsDesc={['超话ID', '类型:见下表', '额外参数;请参阅上面的说明和表格']} radar="1" /> +<Route namespace="weibo" data={{"path":"/super_index/:id/:type?/:routeParams?","categories":["social-media"],"example":"/weibo/super_index/1008084989d223732bf6f02f75ea30efad58a9/sort_time","parameters":{"id":"超话ID","type":"类型:见下表","routeParams":"额外参数;请参阅上面的说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["weibo.com/p/:id/super_index"],"target":"/super_index/:id"},"name":"超话","maintainers":["zengxs","Rongronggg9"],"description":"| type | 备注 |\n| ---------- | ---------------- |\n| soul | 精华 |\n| video | 视频(暂不支持) |\n| album | 相册(暂不支持) |\n| hot_sort | 热门 |\n| sort_time | 最新帖子 |\n| feed | 最新评论 |","location":"super-index.ts"}} /> | type | 备注 | | ---------- | ---------------- | @@ -1537,63 +1206,62 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout | sort\_time | 最新帖子 | | feed | 最新评论 | -### 个人时间线 {#wei-bo-ge-ren-shi-jian-xian} +### 个人时间线 {#wei-bo-lv-zhou-ge-ren-shi-jian-xian} -<Route author="zytomorrow DIYgod Rongronggg9" example="/weibo/timeline/3306934123" path="/weibo/timeline/:uid/:feature?/:routeParams?" paramsDesc={['用户的uid', '过滤类型ID,0:全部、1:原创、2:图片、3:视频、4:音乐,默认为0。', '额外参数;请参阅上面的说明和表格']} configRequired="1"> - :::warning - 需要对应用户打开页面进行授权生成 token 才能生成内容 +<Route namespace="weibo" data={{"path":"/timeline/:uid/:feature?/:routeParams?","categories":["social-media"],"example":"/weibo/timeline/3306934123","parameters":{"uid":"用户的uid","feature":"过滤类型ID,0:全部、1:原创、2:图片、3:视频、4:音乐,默认为0。","routeParams":"额外参数;请参阅上面的说明和表格"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"个人时间线","maintainers":["zytomorrow","DIYgod","Rongronggg9"],"description":":::warning\n 需要对应用户打开页面进行授权生成 token 才能生成内容\n\n 自部署需要申请并配置微博 key,具体见部署文档\n :::","location":"timeline.ts"}} /> - 自部署需要申请并配置微博 key,具体见部署文档 - ::: -</Route> +:::warning +需要对应用户打开页面进行授权生成 token 才能生成内容 -### 最新关注时间线 {#wei-bo-zui-xin-guan-zhu-shi-jian-xian} +自部署需要申请并配置微博 key,具体见部署文档 +::: -<Route author="CaoMeiYouRen" example="/weibo/friends" path="/weibo/friends/:routeParams?" paramsDesc={['额外参数;请参阅上面的说明和表格']} configRequired="1"> - :::warning - 此方案必须使用用户`Cookie`进行抓取 +### 关键词 {#wei-bo-lv-zhou-guan-jian-ci} - 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 +<Route namespace="weibo" data={{"path":"/keyword/:keyword/:routeParams?","categories":["social-media"],"example":"/weibo/keyword/DIYgod","parameters":{"keyword":"你想订阅的微博关键词","routeParams":"额外参数;请参阅上面的说明和表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"关键词","maintainers":["DIYgod","Rongronggg9"],"location":"keyword.ts"}} /> - 微博用户 Cookie 的配置可参照部署文档 - ::: -</Route> +### 热搜榜 {#wei-bo-lv-zhou-re-sou-bang} -### 自定义分组 {#wei-bo-zi-ding-yi-fen-zu} +<Route namespace="weibo" data={{"path":"/search/hot/:fulltext?","categories":["social-media"],"example":"/weibo/search/hot","parameters":{"fulltext":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["s.weibo.com/top/summary"]},"name":"热搜榜","maintainers":["xyqfer","shinemoon"],"url":"s.weibo.com/top/summary","description":"- 使用`/weibo/search/hot`可以获取热搜条目列表;\n- 使用`/weibo/search/hot/fulltext`可以进一步获取热搜条目下的摘要信息(不含图片视频);\n- 使用`/weibo/search/hot/fulltext?pic=true`可以获取图片缩略(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为`https://weibo.com`,以规避微博的外链限制,否则图片无法显示。)\n- 使用`/weibo/search/hot/fulltext?pic=true&fullpic=true`可以获取 Original 图片(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为`https://weibo.com`,以规避微博的外链限制,否则图片无法显示。)","location":"search/hot.ts"}} /> -<Route author="monologconnor Rongronggg9" example="/weibo/group/4541216424989965" path="/weibo/group/:gid/:gname?/:routeParams?" paramsDesc={['分组id, 在网页版分组地址栏末尾`?gid=`处获取', '分组显示名称; 默认为: `微博分组`', '额外参数;请参阅上面的说明和表格']} configRequired="1"> - :::warning - 由于微博官方未提供自定义分组相关 api, 此方案必须使用用户`Cookie`进行抓取 - - 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 - - 微博用户 Cookie 的配置可参照部署文档 - ::: -</Route> - -## 微博绿洲 {#wei-bo-lv-zhou} +- 使用`/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`,以规避微博的外链限制,否则图片无法显示。) ### 用户 {#wei-bo-lv-zhou-yong-hu} -<Route author="kt286" example="/weibo/oasis/user/1990895721" path="/weibo/oasis/user/:userid" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} /> +<Route namespace="weibo" data={{"path":"/oasis/user/:userid","categories":["social-media"],"example":"/weibo/oasis/user/1990895721","parameters":{"userid":"用户 id, 可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["m.weibo.cn/u/:uid","m.weibo.cn/profile/:uid"],"target":"/user/:uid"},"name":"用户","maintainers":["kt286"],"location":"oasis/user.ts"}} /> + +### 自定义分组 {#wei-bo-lv-zhou-zi-ding-yi-fen-zu} + +<Route namespace="weibo" data={{"path":"/group/:gid/:gname?/:routeParams?","categories":["social-media"],"example":"/weibo/group/4541216424989965","parameters":{"gid":"分组id, 在网页版分组地址栏末尾`?gid=`处获取","gname":"分组显示名称; 默认为: `微博分组`","routeParams":"额外参数;请参阅上面的说明和表格"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"自定义分组","maintainers":["monologconnor","Rongronggg9"],"description":":::warning\n 由于微博官方未提供自定义分组相关 api, 此方案必须使用用户`Cookie`进行抓取\n\n 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知\n\n 微博用户 Cookie 的配置可参照部署文档\n :::","location":"group.ts"}} /> + +:::warning +由于微博官方未提供自定义分组相关 api, 此方案必须使用用户`Cookie`进行抓取 + +因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 + +微博用户 Cookie 的配置可参照部署文档 +::: + +### 最新关注时间线 {#wei-bo-lv-zhou-zui-xin-guan-zhu-shi-jian-xian} + +<Route namespace="weibo" data={{"path":"/friends/:routeParams?","categories":["social-media"],"example":"/weibo/friends","parameters":{"routeParams":"额外参数;请参阅上面的说明和表格"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["weibo.com/"],"target":"/friends"},"name":"最新关注时间线","maintainers":["CaoMeiYouRen"],"url":"weibo.com/","description":":::warning\n 此方案必须使用用户`Cookie`进行抓取\n\n 因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知\n\n 微博用户 Cookie 的配置可参照部署文档\n :::","location":"friends.ts"}} /> + +:::warning +此方案必须使用用户`Cookie`进行抓取 + +因微博 cookies 的过期与更新方案未经验证,部署一次 Cookie 的有效时长未知 + +微博用户 Cookie 的配置可参照部署文档 +::: ## 小红书 {#xiao-hong-shu} -### 用户笔记 {#xiao-hong-shu-yong-hu-bi-ji} - -<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/notes" path="/xiaohongshu/user/:user_id/notes/:fulltext?" paramsDesc={['用户 ID', '若为`fulltext`将抓取笔记全文,若为空则只抓取笔记标题']} puppeteer="1" radar="1" /> - -:::tip -笔记全文不支持显示视频 -::: - -### 用户收藏 {#xiao-hong-shu-yong-hu-shou-cang} - -<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/collect" path="/xiaohongshu/user/:user_id/collect" paramsDesc={['用户 ID']} puppeteer="1" radar="1" /> - ### 专辑 {#xiao-hong-shu-zhuan-ji} -<Route author="lotosbin" example="/xiaohongshu/board/5db6f79200000000020032df" path="/xiaohongshu/board/:board_id" paramsDesc={['专辑 ID']} puppeteer="1" radar="1" /> +<Route namespace="xiaohongshu" data={{"path":"/board/:board_id","categories":["social-media"],"example":"/xiaohongshu/board/5db6f79200000000020032df","parameters":{"board_id":"专辑 ID"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xiaohongshu.com/board/:board_id"]},"name":"专辑","maintainers":["lotosbin"],"location":"board.ts"}} /> ## 新榜 {#xin-bang} @@ -1602,133 +1270,133 @@ YouTube provides official RSS feeds for channels, for instance [https://www.yout 请勿过高频抓取,新榜疑似对每天调用 token 总次数进行了限制,超限会报错 ::: -### 微信公众号 {#xin-bang-wei-xin-gong-zhong-hao} - -<Route author="lessmoe" example="/newrank/wechat/chijiread" path="/newrank/wechat/:wxid" paramsDesc={['微信号,若微信号与新榜信息不一致,以新榜为准']} anticrawler="1" configRequired="1" /> - ### 抖音短视频 {#xin-bang-dou-yin-duan-shi-pin} -<Route author="lessmoe" example="/newrank/douyin/110266463747" path="/newrank/douyin/:dyid" paramsDesc={['抖音ID,可在新榜账号详情 URL 中找到']} anticrawler="1" configRequired="1" /> +<Route namespace="newrank" data={{"path":"/douyin/:dyid","categories":["social-media"],"example":"/newrank/douyin/110266463747","parameters":{"dyid":"抖音ID,可在新榜账号详情 URL 中找到"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"抖音短视频","maintainers":["lessmoe"],"description":":::warning\n免费版账户抖音每天查询次数 20 次,如需增加次数可购买新榜会员或等待未来多账户支持\n:::","location":"douyin.ts"}} /> :::warning 免费版账户抖音每天查询次数 20 次,如需增加次数可购买新榜会员或等待未来多账户支持 ::: +### 微信公众号 {#xin-bang-wei-xin-gong-zhong-hao} + +<Route namespace="newrank" data={{"path":"/wechat/:wxid","categories":["social-media"],"example":"/newrank/wechat/chijiread","parameters":{"wxid":"微信号,若微信号与新榜信息不一致,以新榜为准"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"微信公众号","maintainers":["lessmoe"],"location":"wechat.ts"}} /> + ## 知乎 {#zhi-hu} +### Unknown {#zhi-hu-unknown} + +<Route namespace="zhihu" data={{"path":"/xhu/topic/:topicId","categories":["social-media"],"example":"/zhihu/xhu/topic/19566035","parameters":{"topicId":"话题ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/topic/:topicId/:type"]},"name":"Unknown","maintainers":["JimenezLi"],"location":"xhu/topic.ts"}} /> + +### xhu - 用户动态 {#zhi-hu-xhu-yong-hu-dong-tai} + +<Route namespace="zhihu" data={{"path":"/xhu/people/activities/:hexId","categories":["social-media"],"example":"/zhihu/xhu/people/activities/246e6cf44e94cefbf4b959cb5042bc91","parameters":{"hexId":"用户的 16 进制 id,获取方式见下方说明"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/people/:id"],"target":"/people/activities/:id"},"name":"xhu - 用户动态","maintainers":["JimenezLi"],"description":"[xhu](https://github.com/REToys/xhu)\n\n :::tip\n 用户的 16 进制 id 获取方式:\n\n 1. 可以通过 RSSHub Radar 扩展获取;\n 2. 或者在用户主页打开 F12 控制台,执行以下代码:`console.log(/\"id\":\"([0-9a-f]*?)\",\"urlToken\"/.exec(document.getElementById('js-initialData').innerHTML)[1]);` 即可获取用户的 16 进制 id。\n :::","location":"xhu/activities.ts"}} /> + +[xhu](https://github.com/REToys/xhu) + +:::tip +用户的 16 进制 id 获取方式: + +1. 可以通过 RSSHub Radar 扩展获取; +2. 或者在用户主页打开 F12 控制台,执行以下代码:`console.log(/"id":"([0-9a-f]*?)","urlToken"/.exec(document.getElementById('js-initialData').innerHTML)[1]);` 即可获取用户的 16 进制 id。 +::: + +### xhu - 用户回答 {#zhi-hu-xhu-yong-hu-hui-da} + +<Route namespace="zhihu" data={{"path":"/xhu/people/answers/:hexId","categories":["social-media"],"example":"/zhihu/xhu/people/answers/246e6cf44e94cefbf4b959cb5042bc91","parameters":{"hexId":"用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/people/:id/answers"],"target":"/people/answers/:id"},"name":"xhu - 用户回答","maintainers":["JimenezLi"],"location":"xhu/answers.ts"}} /> + +### xhu - 收藏夹 {#zhi-hu-xhu-shou-cang-jia} + +<Route namespace="zhihu" data={{"path":"/xhu/collection/:id","categories":["social-media"],"example":"/zhihu/xhu/collection/26444956","parameters":{"id":"收藏夹 id, 可在收藏夹页面 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/collection/:id"]},"name":"xhu - 收藏夹","maintainers":["JimenezLi"],"location":"xhu/collection.ts"}} /> + +### xhu - 用户文章 {#zhi-hu-xhu-yong-hu-wen-zhang} + +<Route namespace="zhihu" data={{"path":"/xhu/people/posts/:hexId","categories":["social-media"],"example":"/zhihu/xhu/people/posts/246e6cf44e94cefbf4b959cb5042bc91","parameters":{"hexId":"用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"xhu - 用户文章","maintainers":["JimenezLi"],"location":"xhu/posts.ts"}} /> + +### xhu - 问题 {#zhi-hu-xhu-wen-ti} + +<Route namespace="zhihu" data={{"path":"/xhu/question/:questionId/:sortBy?","categories":["social-media"],"example":"/zhihu/xhu/question/264051433","parameters":{"questionId":"问题 id","sortBy":"排序方式:`default`, `created`, `updated`。默认为 `default`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/question/:questionId"],"target":"/xhu/question/:questionId"},"name":"xhu - 问题","maintainers":["JimenezLi"],"location":"xhu/question.ts"}} /> + +### xhu- 专栏 {#zhi-hu-xhu-zhuan-lan} + +<Route namespace="zhihu" data={{"path":"/xhu/zhuanlan/:id","categories":["social-media"],"example":"/zhihu/xhu/zhuanlan/githubdaily","parameters":{"id":"专栏 id, 可在专栏主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhuanlan.zhihu.com/:id"],"target":"/zhuanlan/:id"},"name":"xhu- 专栏","maintainers":["JimenezLi"],"location":"xhu/zhuanlan.ts"}} /> + +### 话题 {#zhi-hu-hua-ti} + +<Route namespace="zhihu" data={{"path":"/topic/:topicId/:isTop?","categories":["social-media"],"example":"/zhihu/topic/19828946","parameters":{"topicId":"话题 id","isTop":"仅精华,默认为否,其他值为是"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/topic/:topicId/:type"],"target":"/topic/:topicId"},"name":"话题","maintainers":["xyqfer"],"location":"topic.ts"}} /> + ### 收藏夹 {#zhi-hu-shou-cang-jia} -<Route author="huruji Colin-XKL Fatpandac" example="/zhihu/collection/26444956" path="/zhihu/collection/:id/:getAll?" paramsDesc={['收藏夹 id,可在收藏夹页面 URL 中找到', '获取全部收藏内容,任意值为打开']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/collection/:id/:getAll?","categories":["social-media"],"example":"/zhihu/collection/26444956","parameters":{"id":"收藏夹 id,可在收藏夹页面 URL 中找到","getAll":"获取全部收藏内容,任意值为打开"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/collection/:id"],"target":"/collection/:id"},"name":"收藏夹","maintainers":["huruji","Colin-XKL","Fatpandac"],"location":"collection.ts"}} /> + +### 问题 {#zhi-hu-wen-ti} + +<Route namespace="zhihu" data={{"path":"/question/:questionId/:sortBy?","categories":["social-media"],"example":"/zhihu/question/59895982","parameters":{"questionId":"问题 id","sortBy":"排序方式:`default`, `created`, `updated`。默认为 `default`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/question/:questionId"],"target":"/question/:questionId"},"name":"问题","maintainers":[],"location":"question.ts"}} /> ### 用户动态 {#zhi-hu-yong-hu-dong-tai} -<Route author="DIYgod" example="/zhihu/people/activities/diygod" path="/zhihu/people/activities/:id" paramsDesc={['作者 id,可在用户主页 URL 中找到']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/people/activities/:id","categories":["social-media"],"example":"/zhihu/people/activities/diygod","parameters":{"id":"作者 id,可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/people/:id"]},"name":"用户动态","maintainers":["DIYgod"],"location":"activities.ts"}} /> ### 用户回答 {#zhi-hu-yong-hu-hui-da} -<Route author="DIYgod prnake" example="/zhihu/people/answers/diygod" path="/zhihu/people/answers/:id" paramsDesc={['作者 id,可在用户主页 URL 中找到']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/people/answers/:id","categories":["social-media"],"example":"/zhihu/people/answers/diygod","parameters":{"id":"作者 id,可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/people/:id/answers"]},"name":"用户回答","maintainers":["DIYgod","prnake"],"location":"answers.ts"}} /> ### 用户文章 {#zhi-hu-yong-hu-wen-zhang} -<Route author="whtsky Colin-XKL" example="/zhihu/posts/people/frederchen" path="/zhihu/posts/:usertype/:id" paramsDesc={['作者 id,可在用户主页 URL 中找到', '用户类型usertype,参考用户主页的URL。目前有两种,见下表']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/posts/:usertype/:id","categories":["social-media"],"example":"/zhihu/posts/people/frederchen","parameters":{"usertype":"作者 id,可在用户主页 URL 中找到","id":"用户类型usertype,参考用户主页的URL。目前有两种,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/:usertype/:id/posts"]},"name":"用户文章","maintainers":["whtsky","Colin-XKL"],"description":"| 普通用户 | 机构用户 |\n| -------- | -------- |\n| people | org |","location":"posts.ts"}} /> | 普通用户 | 机构用户 | | -------- | -------- | | people | org | -### 专栏 {#zhi-hu-zhuan-lan} +### 用户关注时间线 {#zhi-hu-yong-hu-guan-zhu-shi-jian-xian} -<Route author="DIYgod" example="/zhihu/zhuanlan/googledevelopers" path="/zhihu/zhuanlan/:id" paramsDesc={['专栏 id,可在专栏主页 URL 中找到']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/timeline","categories":["social-media"],"example":"/zhihu/timeline","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"用户关注时间线","maintainers":["SeanChao"],"description":":::warning\n 用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。\n :::","location":"timeline.ts"}} /> -### 知乎日报 {#zhi-hu-zhi-hu-ri-bao} - -<Route author="DHPO" example="/zhihu/daily" path="/zhihu/daily" anticrawler="1" radar="1" /> - -### 知乎日报 - 合集 {#zhi-hu-zhi-hu-ri-bao-he-ji} - -<Route author="ccbikai" example="/zhihu/daily/section/2" path="/zhihu/daily/section/:sectionId" paramsDesc={['合集 id,可在 https://news-at.zhihu.com/api/7/sections 找到']} anticrawler="1" /> - -### 知乎热榜 {#zhi-hu-zhi-hu-re-bang} - -<Route author="DIYgod" example="/zhihu/hotlist" path="/zhihu/hotlist" radar="1" /> - -### 知乎分类热榜 {#zhi-hu-zhi-hu-fen-lei-re-bang} - -<Route author="nczitzk" example="/zhihu/hot" path="/zhihu/hot/:category?" paramsDesc={['分类,见下表,默认为全站']} anticrawler="1" radar="1"> - | 全站 | 国际 | 科学 | 汽车 | 视频 | 时尚 | 时事 | 数码 | 体育 | 校园 | 影视 | - | ----- | ----- | ------- | ---- | ------ | ------- | ----- | ------- | ----- | ------ | ---- | - | total | focus | science | car | zvideo | fashion | depth | digital | sport | school | film | -</Route> - -### 知乎想法热榜 {#zhi-hu-zhi-hu-xiang-fa-re-bang} - -<Route author="xyqfer" example="/zhihu/pin/hotlist" path="/zhihu/pin/hotlist" anticrawler="1" radar="1" /> - -### 问题 {#zhi-hu-wen-ti} - -<Route author="xyqfer hacklu" example="/zhihu/question/59895982" path="/zhihu/question/:questionId/:sortBy?" paramsDesc={['问题 id', '排序方式:`default`, `created`, `updated`。默认为 `default`']} anticrawler="1" radar="1" /> - -### 话题 {#zhi-hu-hua-ti} - -<Route author="xyqfer" example="/zhihu/topic/19828946" path="/zhihu/topic/:topicId/:isTop?" paramsDesc={['话题 id', '仅精华,默认为否,其他值为是']} anticrawler="1" radar="1" /> +:::warning +用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 +::: ### 用户想法 {#zhi-hu-yong-hu-xiang-fa} -<Route author="xyqfer" example="/zhihu/people/pins/kan-dan-45" path="/zhihu/people/pins/:id" paramsDesc={['作者 id,可在用户主页 URL 中找到']} anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/people/pins/:id","categories":["social-media"],"example":"/zhihu/people/pins/kan-dan-45","parameters":{"id":"作者 id,可在用户主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/people/:id/pins"]},"name":"用户想法","maintainers":["xyqfer"],"location":"pin/people.ts"}} /> -### 知乎书店 - 新书 {#zhi-hu-zhi-hu-shu-dian-xin-shu} +### 知乎日报 - 合集 {#zhi-hu-zhi-hu-ri-bao-he-ji} -<Route author="xyqfer" example="/zhihu/bookstore/newest" path="/zhihu/bookstore/newest" anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/daily/section/:sectionId","categories":["social-media"],"example":"/zhihu/daily/section/2","parameters":{"sectionId":"合集 id,可在 https://news-at.zhihu.com/api/7/sections 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["daily.zhihu.com/*"],"target":"/daily"},"name":"知乎日报 - 合集","maintainers":["ccbikai"],"url":"daily.zhihu.com/*","location":"daily-section.ts"}} /> -### 知乎想法 - 24 小时新闻汇总 {#zhi-hu-zhi-hu-xiang-fa-24-xiao-shi-xin-wen-hui-zong} +### 知乎日报 {#zhi-hu-zhi-hu-ri-bao} -<Route author="xyqfer" example="/zhihu/pin/daily" path="/zhihu/pin/daily" anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/daily","categories":["social-media"],"example":"/zhihu/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["daily.zhihu.com/*"]},"name":"知乎日报","maintainers":["DHPO"],"url":"daily.zhihu.com/*","location":"daily.ts"}} /> + +### 知乎分类热榜 {#zhi-hu-zhi-hu-fen-lei-re-bang} + +<Route namespace="zhihu" data={{"path":"/hot/:category?","categories":["social-media"],"example":"/zhihu/hot","parameters":{"category":"分类,见下表,默认为全站"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"知乎分类热榜","maintainers":["nczitzk"],"description":"| 全站 | 国际 | 科学 | 汽车 | 视频 | 时尚 | 时事 | 数码 | 体育 | 校园 | 影视 |\n | ----- | ----- | ------- | ---- | ------ | ------- | ----- | ------- | ----- | ------ | ---- |\n | total | focus | science | car | zvideo | fashion | depth | digital | sport | school | film |","location":"hot.ts"}} /> + +| 全站 | 国际 | 科学 | 汽车 | 视频 | 时尚 | 时事 | 数码 | 体育 | 校园 | 影视 | +| ----- | ----- | ------- | ---- | ------ | ------- | ----- | ------- | ----- | ------ | ---- | +| total | focus | science | car | zvideo | fashion | depth | digital | sport | school | film | + +### 知乎热榜 {#zhi-hu-zhi-hu-re-bang} + +<Route namespace="zhihu" data={{"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"],"url":"www.zhihu.com/hot","location":"hotlist.ts"}} /> ### 知乎书店 - 知乎周刊 {#zhi-hu-zhi-hu-shu-dian-zhi-hu-zhou-kan} -<Route author="LogicJake" example="/zhihu/weekly" path="/zhihu/weekly" anticrawler="1" radar="1" /> +<Route namespace="zhihu" data={{"path":"/weekly","categories":["social-media"],"example":"/zhihu/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/pub/weekly"]},"name":"知乎书店 - 知乎周刊","maintainers":["LogicJake"],"url":"www.zhihu.com/pub/weekly","location":"weekly.ts"}} /> -### 用户关注时间线 {#zhi-hu-yong-hu-guan-zhu-shi-jian-xian} +### 知乎书店 - 新书 {#zhi-hu-zhi-hu-shu-dian-xin-shu} -<Route author="SeanChao" example="/zhihu/timeline" path="/zhihu/timeline" anticrawler="1" configRequired="1"> - :::warning - 用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 - ::: -</Route> +<Route namespace="zhihu" data={{"path":"/bookstore/newest","categories":["social-media"],"example":"/zhihu/bookstore/newest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"知乎书店 - 新书","maintainers":["xyqfer"],"location":"bookstore/newest.ts"}} /> -### xhu - 用户动态 {#zhi-hu-xhu-yong-hu-dong-tai} +### 知乎想法 - 24 小时新闻汇总 {#zhi-hu-zhi-hu-xiang-fa-24-xiao-shi-xin-wen-hui-zong} -[xhu](https://github.com/REToys/xhu) +<Route namespace="zhihu" data={{"path":"/pin/daily","categories":["social-media"],"example":"/zhihu/pin/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["daily.zhihu.com/*"],"target":"/daily"},"name":"知乎想法 - 24 小时新闻汇总","maintainers":["xyqfer"],"url":"daily.zhihu.com/*","location":"pin/daily.ts"}} /> -<Route author="JimenezLi" example="/zhihu/xhu/people/activities/246e6cf44e94cefbf4b959cb5042bc91" path="/zhihu/xhu/people/activities/:hexId" paramsDesc={['用户的 16 进制 id,获取方式见下方说明']} radar="1"> - :::tip - 用户的 16 进制 id 获取方式: +### 知乎想法热榜 {#zhi-hu-zhi-hu-xiang-fa-re-bang} - 1. 可以通过 RSSHub Radar 扩展获取; - 2. 或者在用户主页打开 F12 控制台,执行以下代码:`console.log(/"id":"([0-9a-f]*?)","urlToken"/.exec(document.getElementById('js-initialData').innerHTML)[1]);` 即可获取用户的 16 进制 id。 - ::: -</Route> +<Route namespace="zhihu" data={{"path":"/pin/hotlist","categories":["social-media"],"example":"/zhihu/pin/hotlist","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.zhihu.com/zhihu/bookstore/newest"]},"name":"知乎想法热榜","maintainers":["xyqfer"],"url":"www.zhihu.com/zhihu/bookstore/newest","location":"pin/hotlist.ts"}} /> -### xhu - 用户回答 {#zhi-hu-xhu-yong-hu-hui-da} +### 专栏 {#zhi-hu-zhuan-lan} -<Route author="JimenezLi" example="/zhihu/xhu/people/answers/246e6cf44e94cefbf4b959cb5042bc91" path="/zhihu/xhu/people/answers/:hexId" paramsDesc={['用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)']} radar="1" /> - -### xhu - 用户文章 {#zhi-hu-xhu-yong-hu-wen-zhang} - -<Route author="JimenezLi" example="/zhihu/xhu/people/posts/246e6cf44e94cefbf4b959cb5042bc91" path="/zhihu/xhu/people/posts/:hexId" paramsDesc={['用户的 16 进制 id,获取方式同 [xhu - 用户动态](#zhi-hu-xhu-yong-hu-dong-tai)']} radar="1" /> - -### xhu - 收藏夹 {#zhi-hu-xhu-shou-cang-jia} - -<Route author="JimenezLi" example="/zhihu/xhu/collection/26444956" path="/zhihu/xhu/collection/:id" paramsDesc={['收藏夹 id, 可在收藏夹页面 URL 中找到']} radar="1" /> - -### xhu- 专栏 {#zhi-hu-xhu-zhuan-lan} - -<Route author="JimenezLi" example="/zhihu/xhu/zhuanlan/githubdaily" path="/zhihu/xhu/zhuanlan/:id" paramsDesc={['专栏 id, 可在专栏主页 URL 中找到']} radar="1" /> - -### xhu - 问题 {#zhi-hu-xhu-wen-ti} - -<Route author="JimenezLi" example="/zhihu/xhu/question/264051433" path="/zhihu/xhu/question/:questionId/:sortBy?" paramsDesc={['问题 id', '排序方式:`default`, `created`, `updated`。默认为 `default`']} radar="1" /> - -### xhu - 话题 {#zhi-hu-xhu-hua-ti} - -<Route author="JimenezLi" example="/zhihu/xhu/topic/19566035" path="/zhihu/xhu/topic/:topicId" paramsDesc={['话题ID']} radar="1" /> +<Route namespace="zhihu" data={{"path":"/zhuanlan/:id","categories":["social-media"],"example":"/zhihu/zhuanlan/googledevelopers","parameters":{"id":"专栏 id,可在专栏主页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zhuanlan.zhihu.com/:id"]},"name":"专栏","maintainers":["DIYgod"],"location":"zhuanlan.ts"}} /> diff --git a/website/docs/routes/study.mdx b/website/docs/routes/study.mdx index ee6abc9a7..7d7fcad16 100644 --- a/website/docs/routes/study.mdx +++ b/website/docs/routes/study.mdx @@ -1,343 +1,122 @@ -# 📖 Study +# study ## Asian Innovation and Entrepreneurship Association {#asian-innovation-and-entrepreneurship-association} ### Seminar Series {#asian-innovation-and-entrepreneurship-association-seminar-series} -<Route author="zxx-457" example="/aiea/seminars/upcoming" path="/aiea/seminars/:period" paramsDesc={['Time frame']}> - | Time frame | - | ---------- | - | upcoming | - | past | - | both | -</Route> +<Route namespace="aiea" data={{"path":"/seminars/:period","categories":["study"],"example":"/aiea/seminars/upcoming","parameters":{"period":"Time frame"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Seminar Series","maintainers":["zxx-457"],"description":"| Time frame |\n | ---------- |\n | upcoming |\n | past |\n | both |","location":"index.ts"}} /> + +| Time frame | +| ---------- | +| upcoming | +| past | +| both | ## Chinese Social Science Net {#chinese-social-science-net} ### Institute of Law {#chinese-social-science-net-institute-of-law} -<Route author="HankChow" example="/cssn/iolaw/zxzp" path="/cssn/iolaw/:section?" paramsDesc={['Section ID, can be found in the URL. For example, the Section ID of URL `http://iolaw.cssn.cn/zxzp/` is `zxzp`. The default value is `zxzp`']} /> - -## CTFHub Calendar {#ctfhub-calendar} - -### 查询国内外 CTF 赛事信息 {#ctfhub-calendar-cha-xun-guo-nei-wai-ctf-sai-shi-xin-xi} - -<Route author="frankli0324" example="/ctfhub/search" path="/ctfhub/search/:limit?/:form?/:class?/:title?" paramsDesc={['一个整数,筛选最新的limit场比赛,默认为10', '比赛形式', '比赛类型', '通过CTF赛事名称过滤']}> - | `:class` | 类型 | - | :------: | ---------------------------------- | - | 0 | Jeopardy \[解题] | - | 1 | Attack with Defense \[AwD 攻防] | - | 2 | Robo Hacking Game \[RHG AI 自动化] | - | 3 | Real World \[RW 真实世界] | - | 4 | King of The Hill \[KoH 抢占山头] | - | 5 | Mix \[混合] | - - > class 以 [https://api.ctfhub.com/User\_API/Event/getType](https://api.ctfhub.com/User_API/Event/getType) 的返回结果为准 - - | `:form` | 形式 | - | :-----: | ------ | - | 0 | 线上赛 | - | 1 | 线下赛 | -</Route> - -### 查询近期赛事 {#ctfhub-calendar-cha-xun-jin-qi-sai-shi} - -<Route author="frankli0324" example="/ctfhub/upcoming" path="/ctfhub/upcoming/:limit?" paramsDesc={['一个整数,筛选最近的limit场比赛,默认为5']} /> +<Route namespace="cssn" data={{"path":"/iolaw/:section?","categories":["study"],"example":"/cssn/iolaw/zxzp","parameters":{"section":"Section ID, can be found in the URL. For example, the Section ID of URL `http://iolaw.cssn.cn/zxzp/` is `zxzp`. The default value is `zxzp`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Institute of Law","maintainers":["HankChow"],"location":"iolaw.ts"}} /> ## DBLP {#dblp} ### Keyword Search {#dblp-keyword-search} -<Route author="ytno1" example="/dblp/knowledge%20tracing" path="/dblp/:field" paramsDesc={['Research field']} radar="1" /> - -## Howtoforge Linux Tutorials {#howtoforge-linux-tutorials} - -### tutorials {#howtoforge-linux-tutorials-tutorials} - -<Route author="cnkmmk" example="/howtoforge" path="/howtoforge" /> - -## iciba {#iciba} - -### Daily English Sentence {#iciba-daily-english-sentence} - -<Route author="mashirozx" example="/iciba/7/poster" path="/iciba/:days?/:img_type?" paramsDesc={['number of items to show (min = 1, max = 7, default = 1)', 'image style']}> - | `:img_type` | image style | - | ----------- | -------------- | - | original | Original size | - | medium | Medium size | - | thumbnail | Thumbnail size | - | poster | Art poster | -</Route> - -## IELTS 雅思 {#ielts-ya-si} - -### 最新消息 {#ielts-ya-si-zui-xin-xiao-xi} - -<Route author="zenxds" example="/ielts" path="/ielts" puppeteer="1" /> - -## Link Research {#link-research} - -### Theses {#link-research-theses} - -<Route author="y9c" example="/linkresearcher/category=theses&subject=生物" path="/linkresearcher/theses/:param" supportScihub="1" paramsDesc={['key=value,eg. subject=生物']} radar="1"> - | `:param` | example | definition | - | -------- | --------------- | ------------------------------------- | - | category | category=thesis | **one of** theses/information/careers | - | subject | subject = 生物 | string / undefined | - | columns | columns = 健康 | string / undefined | - | columns | columns=virus | string / undefined | -</Route> - -## MarginNote {#marginnote} - -### 标签 {#marginnote-biao-qian} - -<Route author="nczitzk" example="/marginnote/tag/经验分享" path="/marginnote/tag/:id?" paramsDesc={['标签名,见下表,默认为 经验分享']}> - | 经验分享 | 论坛精华 | 待跟进反馈 | 优秀建议 | 精选回答 | 官方签名 | 自动更新 | 3674 以上版本支持 | 368 以上版本支持 | 未经验证的安全风险 | 笔记本分享 | 关键反馈 | 精选话题讨论 | 灵感盒 | 引用 | - | -------- | -------- | ---------- | -------- | -------- | -------- | -------- | ----------------- | ---------------- | ------------------ | ---------- | -------- | ------------ | ------ | ---- | -</Route> +<Route namespace="dblp" data={{"path":"/:field","categories":["study"],"example":"/dblp/knowledge%20tracing","parameters":{"field":"Research field"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dblp.org/:field"]},"name":"Keyword Search","maintainers":["ytno1"],"location":"publication.ts"}} /> ## MindMeister {#mindmeister} ### Public Maps {#mindmeister-public-maps} -<Route author="TonyRL" example="/mindmeister/mind-map-examples" path="/mindmeister/:category?/:language?" paramsDesc={['Categories, see the table below, `mind-map-examples` by default', 'Languages, see the table below, `en` by default']} radar="1"> - | Categories | parameter | - | ------------- | ----------------- | - | Featured Map | mind-map-examples | - | Business | business | - | Design | design | - | Education | education | - | Entertainment | entertainment | - | Life | life | - | Marketing | marketing | - | Productivity | productivity | - | Summaries | summaries | - | Technology | technology | - | Other | other | +<Route namespace="mindmeister" data={{"path":"/:category?/:language?","categories":["study"],"example":"/mindmeister/mind-map-examples","parameters":{"category":"Categories, see the table below, `mind-map-examples` by default","language":"Languages, see the table below, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Public Maps","maintainers":["TonyRL"],"description":"| Categories | parameter |\n | ------------- | ----------------- |\n | Featured Map | mind-map-examples |\n | Business | business |\n | Design | design |\n | Education | education |\n | Entertainment | entertainment |\n | Life | life |\n | Marketing | marketing |\n | Productivity | productivity |\n | Summaries | summaries |\n | Technology | technology |\n | Other | other |\n\n | Languages | parameter |\n | ---------- | --------- |\n | English | en |\n | Deutsch | de |\n | Français | fr |\n | Español | es |\n | Português | pt |\n | Nederlands | nl |\n | Dansk | da |\n | Русский | ru |\n | 日本語 | ja |\n | Italiano | it |\n | 简体中文 | zh |\n | 한국어 | ko |\n | Other | other |","location":"example.ts"}} /> - | Languages | parameter | - | ---------- | --------- | - | English | en | - | Deutsch | de | - | Français | fr | - | Español | es | - | Português | pt | - | Nederlands | nl | - | Dansk | da | - | Русский | ru | - | 日本語 | ja | - | Italiano | it | - | 简体中文 | zh | - | 한국어 | ko | - | Other | other | -</Route> +| Categories | parameter | +| ------------- | ----------------- | +| Featured Map | mind-map-examples | +| Business | business | +| Design | design | +| Education | education | +| Entertainment | entertainment | +| Life | life | +| Marketing | marketing | +| Productivity | productivity | +| Summaries | summaries | +| Technology | technology | +| Other | other | + +| Languages | parameter | +| ---------- | --------- | +| English | en | +| Deutsch | de | +| Français | fr | +| Español | es | +| Português | pt | +| Nederlands | nl | +| Dansk | da | +| Русский | ru | +| 日本語 | ja | +| Italiano | it | +| 简体中文 | zh | +| 한국어 | ko | +| Other | other | ## NEEA 中国教育考试网 {#neea-zhong-guo-jiao-yu-kao-shi-wang} -### 国家教育考试 {#neea-zhong-guo-jiao-yu-kao-shi-wang-guo-jia-jiao-yu-kao-shi} - -<Route author="SunShinenny" example="/neea/gaokao" path="/neea/:type" paramsDesc={['类别,如 gaokao']} /> - -| `:type` | 类别名称 | -| -------- | ------------------ | -| gaokao | 普通高考 | -| chengkao | 成人高考 | -| yankao | 研究生考试 | -| zikao | 自学考试 | -| ntce | 中小学教师资格考试 | - -### 社会证书考试 {#neea-zhong-guo-jiao-yu-kao-shi-wang-she-hui-zheng-shu-kao-shi} - -<Route author="SunShinenny" example="/neea/cet" path="/neea/:type" paramsDesc={['类别,如 cet']} /> - -| `:type` | 类别名称 | -| ------- | ----------------------------- | -| cet | 全国四六级(CET) | -| ncre | 全国计算机等级考试(NCRE) | -| nit | 全国计算机应用水平考试(NIT) | -| pets | 全国英语等级考试 (PETS) | -| wsk | 全国外语水平考试 (WSK) | -| ccpt | 书画等级考试 (CCPT) | -| wsk | 全国外语水平考试 (WSK) | -| mets | 医护英语水平考试 (METS) | - ### 教育部考试中心日本语能力测试重要通知 {#neea-zhong-guo-jiao-yu-kao-shi-wang-jiao-yu-bu-kao-shi-zhong-xin-ri-ben-yu-neng-li-ce-shi-zhong-yao-tong-zhi} -<Route author="nczitzk" example="/neea/jlpt" path="/neea/jlpt" /> +<Route namespace="neea" data={{"path":"/jlpt","categories":["study"],"example":"/neea/jlpt","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jlpt.neea.cn/"]},"name":"教育部考试中心日本语能力测试重要通知","maintainers":["nczitzk"],"url":"jlpt.neea.cn/","location":"jlpt.ts"}} /> ## ORCID {#orcid} ### Works List {#orcid-works-list} -<Route author="OrangeEd1t" example="/orcid/0000-0002-4731-9700" path="/orcid/:id" paramsDesc={['Open Researcher and Contributor ID']} /> - -## ResearchGate {#researchgate} - -### Publications {#researchgate-publications} - -<Route author="nczitzk" example="/researchgate/publications/Somsak-Panha" path="/researchgate/publications/:username" paramsDesc={['Username, can be found in URL']} puppeteer="1" anticrawler="1" /> +<Route namespace="orcid" data={{"path":"/:id","categories":["study"],"example":"/orcid/0000-0002-4731-9700","parameters":{"id":"Open Researcher and Contributor ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Works List","maintainers":["OrangeEd1t"],"location":"index.ts"}} /> ## Tableau {#tableau} ### Viz of the day {#tableau-viz-of-the-day} -<Route author="KaiyoungYu" example="/tableau/viz-of-the-day" path="/tableau/viz-of-the-day" radar="1" /> +<Route namespace="tableau" data={{"path":"/viz-of-the-day","categories":["study"],"example":"/tableau/viz-of-the-day","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Viz of the day","maintainers":[],"location":"viz-of-the-day.ts"}} /> ## The Korea Institute of Marine Law {#the-korea-institute-of-marine-law} ### Thesis {#the-korea-institute-of-marine-law-thesis} -<Route author="TonyRL" example="/kimlaw/thesis" path="/kimlaw/thesis" radar="1" /> +<Route namespace="kimlaw" data={{"path":"/thesis","categories":["study"],"example":"/kimlaw/thesis","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kimlaw.or.kr/67","kimlaw.or.kr/"]},"name":"Thesis","maintainers":["TonyRL"],"url":"kimlaw.or.kr/67","location":"thesis.ts"}} /> ## X-MOL {#x-mol} ### News {#x-mol-news} -<Route author="cssxsh" example="/x-mol/news/3" path="/x-mol/news/:tag?" paramsDesc={['Tag number, can be obtained from news list URL. Empty value means news index.']} /> - -## XMind {#xmind} - -### Mindmap Gallery {#xmind-mindmap-gallery} - -<Route author="nczitzk" example="/xmind/mindmap" path="/xmind/mindmap/:lang?" paramsDesc={['language code, all languages by default']}> - | English | Español | Deutsch | Français | 中文 | 日本語 | - | ------- | ------- | ------- | -------- | ---- | ------ | - | en | es | de | fr | zh | jp | -</Route> - -## ZhiMap {#zhimap} - -### 导图社区导图更新 {#zhimap-dao-tu-she-qu-dao-tu-geng-xin} - -<Route author="laampui" example="/zhimap/820156a42e9a490796c7fd56916aa95b/1" path="/zhimap/:categoryUuid?/:recommend?" paramsDesc={['分类 uuid,见下表,默认为33b67d1bad1d4e37812f71d42764af34', '1 为按推荐排序,0 为按最新排序,默认为 0']}> - | 热门 | 学科 | 学习 | 语言 | 工作 | 提升 | 生活 | 互联网 | 教育 | 其他 | 行业 | 服务发布 | 医疗 | - | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | - | 33b67d1bad1d4e37812f71d42764af34 | 9434268e893a46aa9a1a231059849984 | 820156a42e9a490796c7fd56916aa95b | 959c81f606ca495c882c7e461429eb2a | 5af4bca5496e4733a2d582690627e25f | 5300988dff564756b5d462cea8a865b7 | 02fdcc2ab6374bc6b9b9717e70c87723 | 437d434fe9eb410a94dcefb889994e2b | 9747cbf78f96492c973aa6ab23925eee | d4c3a92a9cf64da7b187763211dc6ff6 | 58231ab9cef34af7819c3f6e2160c007 | 73d89972bee0457997c983d7fca19f9f | 853ce8b3a4c24b87a03f66af95c5e06c | -</Route> - -## ZhiShiFenZi {#zhishifenzi} - -### News {#zhishifenzi-news} - -<Route author="y9c" example="/zhishifenzi/news/ai" path="/zhishifenzi/news/:type" paramsDesc={['type,eg. ai']}> - | `:type` | type name | - | --------- | --------- | - | biology | Biology | - | medicine | Medicine | - | ai | AI | - | physics | physics | - | chymistry | Chymistry | - | astronomy | Astronomy | - | others | Others | - - > leave it blank(`/zhishifenzi/news`)to get all -</Route> - -### depth {#zhishifenzi-depth} - -<Route author="y9c" example="/zhishifenzi/depth" path="/zhishifenzi/depth" /> - -### innovation {#zhishifenzi-innovation} - -<Route author="y9c" example="/zhishifenzi/innovation/company" path="/zhishifenzi/innovation/:type" paramsDesc={['type,eg. company']}> - | `:type` | type name | - | ------------- | ------------- | - | ~~multiple~~ | ~~Multiple~~ | - | company | Company | - | product | Product | - | technology | Technology | - | ~~character~~ | ~~Character~~ | - | policy | Policy | - - > leave it blank(`/zhishifenzi/innovation`)to get all -</Route> - -## 德阳考试中心 {#de-yang-kao-shi-zhong-xin} - -### 考试新闻 {#de-yang-kao-shi-zhong-xin-kao-shi-xin-wen} - -<Route author="zytomorrow" example="/dykszx/news" path="/dykszx/news/:type?" paramsDesc={['考试类型']}> - | 新闻中心 | 公务员考试 | 事业单位 | (职)业资格、职称考试 | 其他 | - | :------: | :--------: | :------: | :--------------------: | :---: | - | all | gwy | sydw | zyzc | other | -</Route> - -## 东莞教研网 {#dong-guan-jiao-yan-wang} - -### 分类 {#dong-guan-jiao-yan-wang-fen-lei} - -<Route author="nczitzk" example="/dgjyw/tz" path="/dgjyw/:category?" paramsDesc={['分类,见下表,默认为通知']}> - | 通知 | 动态 | 公示 | - | ---- | ---- | ---- | - | 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)。 - ::: -</Route> +<Route namespace="x-mol" data={{"path":"/news/:tag?","categories":["study"],"example":"/x-mol/news/3","parameters":{"tag":"Tag number, can be obtained from news list URL. Empty value means news index."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["x-mol.com/news/index"],"target":"/news"},"name":"News","maintainers":["cssxsh"],"url":"x-mol.com/news/index","location":"news.ts"}} /> ## 福建考试报名网 {#fu-jian-kao-shi-bao-ming-wang} ### 分类 {#fu-jian-kao-shi-bao-ming-wang-fen-lei} -<Route author="nczitzk" example="/fjksbm" path="/fjksbm/:category?" paramsDesc={['分类,见下表,默认为网络报名进行中']} radar="1"> - | 已发布公告 (方案),即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束,等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 | - | --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | news | policy | -</Route> +<Route namespace="fjksbm" data={{"path":"/:category?","categories":["study"],"example":"/fjksbm","parameters":{"category":"分类,见下表,默认为网络报名进行中"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["fjksbm.com/portal/:category?","fjksbm.com/portal"]},"name":"分类","maintainers":["nczitzk"],"description":"| 已发布公告 (方案),即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束,等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 |\n | --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- |\n | 0 | 1 | 2 | 3 | 4 | 5 | news | policy |","location":"index.ts"}} /> + +| 已发布公告 (方案),即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束,等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 | +| --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | news | policy | ## 湖南人事考试网 {#hu-nan-ren-shi-kao-shi-wang} ### 公告 {#hu-nan-ren-shi-kao-shi-wang-gong-gao} -<Route author="TonyRL" example="/hunanpea/rsks/2f1a6239-b4dc-491b-92af-7d95e0f0543e" path="/hunanpea/rsks/:guid" paramsDesc={['分类 id,可在 URL 中找到']} radar="1" /> - -## 经济 50 人论坛 {#jing-ji-50-ren-lun-tan} - -### 专家文章 {#jing-ji-50-ren-lun-tan-zhuan-jia-wen-zhang} - -<Route author="sddiky" example="/50forum" path="/50forum" radar="1" /> - -## 幕布 {#mu-bu} - -### 精选社区 {#mu-bu-jing-xuan-she-qu} - -<Route author="laampui nczitzk" example="/mubu/explore/16/读书笔记" path="/mubu/explore/:category?/:title?" paramsDesc={['分类 id', '显示标题']} /> +<Route namespace="hunanpea" data={{"path":"/rsks/:guid","categories":["study"],"example":"/hunanpea/rsks/2f1a6239-b4dc-491b-92af-7d95e0f0543e","parameters":{"guid":"分类 id,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rsks.hunanpea.com/Category/:guid/ArticlesByCategory.do"]},"name":"公告","maintainers":["TonyRL"],"location":"rsks.ts"}} /> ## 山东省教育招生考试院 {#shan-dong-sheng-jiao-yu-zhao-sheng-kao-shi-yuan} ### 新闻 {#shan-dong-sheng-jiao-yu-zhao-sheng-kao-shi-yuan-xin-wen} -<Route author="nczitzk" example="/sdzk" path="/sdzk/:bcid?/:cid?" paramsDesc={['板块 id,可在对应板块页 URL 中找到,默认为 `1`,即信息与政策', '栏目 id,可在对应板块页 URL 中找到,默认为 `16`,即通知公告']}> - :::tip - 若订阅 [信息与政策](https://www.sdzk.cn/NewsList.aspx?BCID=1),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1`。截取 `BCID=1` 作为参数,此时路由为 [`/sdzk/1`](https://rsshub.app/sdzk/1)。 +<Route namespace="sdzk" data={{"path":"/:bcid?/:cid?","categories":["study"],"example":"/sdzk","parameters":{"bcid":"板块 id,可在对应板块页 URL 中找到,默认为 `1`,即信息与政策","cid":"栏目 id,可在对应板块页 URL 中找到,默认为 `16`,即通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["nczitzk"],"description":":::tip\n 若订阅 [信息与政策](https://www.sdzk.cn/NewsList.aspx?BCID=1),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1`。截取 `BCID=1` 作为参数,此时路由为 [`/sdzk/1`](https://rsshub.app/sdzk/1)。\n\n 若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16`。截取 `BCID=1` 与 `CID=16` 作为参数,此时路由为 [`/sdzk/1/16`](https://rsshub.app/sdzk/1/16)。\n :::","location":"index.ts"}} /> - 若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1\&CID=16),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16`。截取 `BCID=1` 与 `CID=16` 作为参数,此时路由为 [`/sdzk/1/16`](https://rsshub.app/sdzk/1/16)。 - ::: -</Route> +:::tip +若订阅 [信息与政策](https://www.sdzk.cn/NewsList.aspx?BCID=1),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1`。截取 `BCID=1` 作为参数,此时路由为 [`/sdzk/1`](https://rsshub.app/sdzk/1)。 -## 扇贝 {#shan-bei} - -### 用户打卡 {#shan-bei-yong-hu-da-ka} - -<Route author="DIYgod" example="/shanbay/checkin/ddwej" path="/shanbay/checkin/:id" paramsDesc={['用户 id']} /> - -### 精选文章 {#shan-bei-jing-xuan-wen-zhang} - -<Route author="qiwihui" example="/shanbay/footprints" path="/shanbay/footprints/:category?" paramsDesc={['分类 id']} notOperational="1"> - | 用户故事 | 地道表达法 | 实用口语 | 语法教室 | 读新闻学英语 | 单词鸡汤 | 扇贝理念 | 英语知识 | 原汁英文 | - | -------- | ---------- | -------- | -------- | ------------ | -------- | -------- | -------- | -------- | - | 1 | 31 | 46 | 34 | 40 | 43 | 16 | 7 | 10 | - - | 学习方法 | 影视剧讲义 | 产品更新 | 精读文章 | 他山之石 | Quora 翻译 | TED 推荐 | 大耳狐小课堂 | 互动话题 | - | -------- | ---------- | -------- | -------- | -------- | ---------- | -------- | ------------ | -------- | - | 13 | 22 | 28 | 4 | 19 | 25 | 37 | 49 | 52 | -</Route> +若订阅 [通知公告](https://www.sdzk.cn/NewsList.aspx?BCID=1\&CID=16),网址为 `https://www.sdzk.cn/NewsList.aspx?BCID=1&CID=16`。截取 `BCID=1` 与 `CID=16` 作为参数,此时路由为 [`/sdzk/1/16`](https://rsshub.app/sdzk/1/16)。 +::: ## 上海市教育考试院 {#shang-hai-shi-jiao-yu-kao-shi-yuan} @@ -345,353 +124,166 @@ ### 消息 {#shang-hai-shi-jiao-yu-kao-shi-yuan-xiao-xi} -<Route author="jialinghui Misaka13514" example="/shmeea/08000" path="/shmeea/:id?" radar="1" paramsDesc={['页面 ID,可在 URL 中找到,默认为消息速递']}> - :::tip - 例如:消息速递的网址为 `https://www.shmeea.edu.cn/page/08000/index.html`,则页面 ID 为 `08000`。 - ::: +<Route namespace="shmeea" data={{"path":"/:id?","categories":["study"],"example":"/shmeea/08000","parameters":{"id":"页面 ID,可在 URL 中找到,默认为消息速递"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"消息","maintainers":["jialinghui","Misaka13514"],"description":":::tip\n 例如:消息速递的网址为 `https://www.shmeea.edu.cn/page/08000/index.html`,则页面 ID 为 `08000`。\n :::\n\n :::warning\n 暂不支持大类分类和[院内动态](https://www.shmeea.edu.cn/page/19000/index.html)\n :::","location":"index.ts"}} /> - :::warning - 暂不支持大类分类和[院内动态](https://www.shmeea.edu.cn/page/19000/index.html) - ::: -</Route> +:::tip +例如:消息速递的网址为 `https://www.shmeea.edu.cn/page/08000/index.html`,则页面 ID 为 `08000`。 +::: + +:::warning +暂不支持大类分类和[院内动态](https://www.shmeea.edu.cn/page/19000/index.html) +::: ### 自学考试通知公告 {#shang-hai-shi-jiao-yu-kao-shi-yuan-zi-xue-kao-shi-tong-zhi-gong-gao} -<Route author="h2ws" example="/shmeea/self-study" path="/shmeea/self-study" radar="1" /> - -## 思维导图社区 {#si-wei-dao-tu-she-qu} - -### 热门导图 {#si-wei-dao-tu-she-qu-re-men-dao-tu} - -<Route author="nczitzk" example="/edrawsoft/mindmap/1/PV/DESC/CN/1" path="/edrawsoft/mindmap/:classId?/:order?/:sort?/:lang?/:price?/:search?" paramsDesc={['分类编号,见下表,默认为全部分类', '排序参数,`PV` 指 最多浏览,`TIME` 指 最新发布,`LIKE` 指 最多点赞,默认为 `PV` 即 最多浏览', '排序方式,`DESC` 指 降序,`ASC` 指 升序,默认为 `DESC` 即 降序', '模板语言,默认为 `CN`', '是否免费,`1` 指 全部,`2` 指 免费,`3` 指 付费,`4` 指 会员免费,默认为 `1` 即 全部', '搜索关键词,默认为空']}> - :::tip - 不支持分类搜索和自定义搜索排序,即 `search` 参数不为空时,其他参数不起作用。 - ::: - - 分类编号如下表(选择全部则填入编号 0) - - | 职业技能 | 企业家 / 管理者 | 程序员 | 产品经理 | 运营 / 市场营销 | 人事 / 培训 / 行政 | 法律 / 法务 | 医学 / 药学 / 保健 | 银行 / 金融 / 证券 / 保险 | 电商 / 微商 / 零售 | 编辑 / 媒体 / 出版 | 机械 / 电子 / 制造业 | 城市 / 建筑 / 房地产 | 其他技能 | - | -------- | --------------- | ------ | -------- | --------------- | ------------------ | ----------- | ------------------ | ------------------------- | ------------------ | ------------------ | -------------------- | -------------------- | -------- | - | 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 58 | 59 | - - | 考研考证 | 研究生考试 | 建考 | 法考 | 教师资格证 | 公考 | 英语 | 医考 | 会计师 | 计算机 | 专升本 | - | -------- | ---------- | ---- | ---- | ---------- | ---- | ---- | ---- | ------ | ------ | ------ | - | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | - - | 生活娱乐 | 体育 | 音乐 | 影视 | 旅游 | 游戏 | 兴趣 | 生活 | - | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 3 | 29 | 30 | 31 | 32 | 33 | 34 | 56 | - - | 校园教育 | 大学 | 高中 | 初中 | 小学 | 教育 | - | -------- | ---- | ---- | ---- | ---- | ---- | - | 4 | 35 | 36 | 37 | 38 | 39 | - - | 读书笔记 | 文学作品 | 心灵成长 | 经管知识 | 终身学习 | 通用知识 | 知识栏目 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 5 | 40 | 41 | 42 | 43 | 44 | 45 | - - | 创意脑图 | 长图 | 鱼骨图 | 时间线 | 圆圈图 | 组织结构 | 树状图 | 流程图 | - | -------- | ---- | ------ | ------ | ------ | -------- | ------ | ------ | - | 6 | 46 | 47 | 48 | 49 | 50 | 51 | 57 | -</Route> - -## 搜韵网 {#sou-yun-wang} - -### 诗词日历 {#sou-yun-wang-shi-ci-ri-li} - -<Route author="nczitzk" example="/souyun/today" path="/souyun/today" /> +<Route namespace="shmeea" data={{"path":"/self-study","categories":["study"],"example":"/shmeea/self-study","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.shmeea.edu.cn/page/04000/index.html","www.shmeea.edu.cn/"]},"name":"自学考试通知公告","maintainers":["h2ws"],"url":"www.shmeea.edu.cn/page/04000/index.html","location":"self-study.ts"}} /> ## 网易公开课 {#wang-yi-gong-kai-ke} +:::tip +部分歌单及听歌排行信息为登陆后可见,自建时将环境变量`NCM_COOKIES`设为登陆后的 Cookie 值,即可正常获取。 +::: + ### 精品课程 {#wang-yi-gong-kai-ke-jing-pin-ke-cheng} -<Route author="hoilc" example="/163/open/vip" path="/163/open/vip" radar="1" /> - -## 下厨房 {#xia-chu-fang} - -### 用户作品 {#xia-chu-fang-yong-hu-zuo-pin} - -<Route author="xyqfer" example="/xiachufang/user/cooked/103309404" path="/xiachufang/user/cooked/:id" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} /> - -### 用户菜谱 {#xia-chu-fang-yong-hu-cai-pu} - -<Route author="xyqfer" example="/xiachufang/user/created/103309404" path="/xiachufang/user/created/:id" paramsDesc={['用户 id, 可在用户主页 URL 中找到']} /> - -### 作品动态 {#xia-chu-fang-zuo-pin-dong-tai} - -<Route author="xyqfer" example="/xiachufang/popular/hot" path="/xiachufang/popular/:timeframe?" paramsDesc={['默认最新上传']}> - | 正在流行 | 24 小时最佳 | 本周最受欢迎 | 新秀菜谱 | 月度最佳 | - | -------- | ----------- | ------------ | -------- | ---------- | - | hot | pop | week | rising | monthhonor | -</Route> - -## 学堂在线 {#xue-tang-zai-xian} - -### 课程信息 {#xue-tang-zai-xian-ke-cheng-xin-xi} - -<Route author="sanmmm" example="/xuetangx/course/course-v1:TsinghuaX+20240103X+2019_T1/status" path="/xuetangx/course/:cid/:type" paramsDesc={['课程id, 从课程页URL中可得到', '课程信息类型']}> - 课程信息类型 - - | 课程开始时间 | 课程结束时间 | 课程进度 | - | ------------ | ------------ | -------- | - | start | end | status | -</Route> - -### 课程列表 {#xue-tang-zai-xian-ke-cheng-lie-biao} - -<Route author="sanmmm" example="/xuetangx/course/list/0/1/0" path="/xuetangx/course/list/:mode/:status/:credential/:type?" paramsDesc={['课程模式', '课程状态', '课程认证类型', '学科分类 默认为`全部`']}> - 课程模式 - - | 自主 | 随堂 | 付费 | 全部 | - | ---- | ---- | ---- | ---- | - | 0 | 1 | 2 | -1 | - - 课程状态 - - | 即将开课 | 已开课 | 已结课 | 全部 | - | -------- | ------ | ------ | ---- | - | 1 | 2 | 3 | -1 | - - 课程认证类型 - - | 签字认证 | 认证开放 | 全部 | - | -------- | -------- | ---- | - | 1 | 2 | -1 | - - 学科分类 - - | 全部 | 计算机 | 经管・会计 | 创业 | 电子 | 工程 | 环境・地球 | 医学・健康 | 生命科学 | 数学 | 物理 | 化学 | 社科・法律 | 文学 | 历史 | 哲学 | 艺术・设计 | 外语 | 教育 | 其他 | 大学先修课 | 公共管理 | 建筑 | 职场 | 全球胜任力 | - | ---- | ------ | ---------- | ---- | ---- | ---- | ---------- | ---------- | -------- | ---- | ---- | ---- | ---------- | ---- | ---- | ---- | ---------- | ---- | ---- | ---- | ---------- | -------- | ---- | ---- | ---------- | - | -1 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 201 | 2550 | 2783 | 2952 | 6200 | -</Route> - -## 阳光高考 {#yang-guang-gao-kao} - -### 教育部阳光高考信息公开平台招生政策规定 {#yang-guang-gao-kao-jiao-yu-bu-yang-guang-gao-kao-xin-xi-gong-kai-ping-tai-zhao-sheng-zheng-ce-gui-ding} - -<Route author="nczitzk" example="/chsi/zszcgd" path="/chsi/zszcgd/:category?" paramsDesc={['分类,默认为招生政策']}> - | 招生政策 | 深化考试招生制度改革 | 教育法律法规 | - | -------- | -------------------- | ------------ | - | dnzszc | zdgg | jyflfg | -</Route> - -## 印象识堂 {#yin-xiang-shi-tang} - -### 印象剪藏 {#yin-xiang-shi-tang-yin-xiang-jian-cang} - -<Route author="nczitzk" example="/yinxiang/note" path="/yinxiang/note" /> - -### 卡片清单 {#yin-xiang-shi-tang-ka-pian-qing-dan} - -<Route author="nczitzk" example="/yinxiang/card/32" path="/yinxiang/card/:id?" paramsDesc={['卡片 id,见下表,默认为每周收藏排行榜・TOP5']} notOperational="1"> - :::tip - 卡片对应的话题、专题等内容过期后,该卡片 id 也会失效,此时填入该卡片 id 将会报错。 - ::: - - | 每周收藏排行榜・TOP5 | 每周热门「读书笔记」榜 TOP5 | 【印象话题】选择的悖论 | 【印象专题】如何一秒洞察问题本质? | 「识堂开讲」5 位嘉宾精华笔记大放送 | 【印象话题】培养专注力的 5 个步骤 | 🎁 购物清单主题活动获奖结果 | - | -------------------- | --------------------------- | ---------------------- | ---------------------------------- | ---------------------------------- | --------------------------------- | --------------------------- | - | 32 | 33 | 101 | 103 | 104 | 105 | 106 | -</Route> - -### 用户公开笔记 {#yin-xiang-shi-tang-yong-hu-gong-kai-bi-ji} - -<Route author="nczitzk" example="/yinxiang/personal/ZUhuRTmW5SKE7vvHPqI7cg" path="/yinxiang/personal/:id" paramsDesc={['用户 id,可在用户页 URL 中找到']} /> - -### 笔记分类 {#yin-xiang-shi-tang-bi-ji-fen-lei} - -<Route author="nczitzk" example="/yinxiang/category/28" path="/yinxiang/category/:id" paramsDesc={['分类 id,可在分类页 URL 中找到']} /> - -### 笔记标签 {#yin-xiang-shi-tang-bi-ji-biao-qian} - -<Route author="nczitzk" example="/yinxiang/tag/人生算法" path="/yinxiang/tag/:id" paramsDesc={['标签名,可在标签页中找到']} /> - -## 有道云笔记 {#you-dao-yun-bi-ji} - -### 学霸感悟 {#you-dao-yun-bi-ji-xue-ba-gan-wu} - -<Route author="nczitzk" example="/youdao/xueba" path="/youdao/xueba" /> - -### 笔记最新动态 {#you-dao-yun-bi-ji-bi-ji-zui-xin-dong-tai} - -<Route author="nczitzk" example="/youdao/latest" path="/youdao/latest" /> +<Route namespace="163" data={{"path":"/open/vip","categories":["study"],"example":"/163/open/vip","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vip.open.163.com/"]},"name":"精品课程","maintainers":["hoilc"],"url":"vip.open.163.com/","location":"open/vip.ts"}} /> ## 语雀 {#yu-que} ### 知识库 {#yu-que-zhi-shi-ku} -<Route author="aha2mao ltaoo" example="/yuque/ruanyf/weekly" path="/yuque/:name/:book" paramsDesc={['用戶名', '知识库 ID']} radar="1"> - | Node.js 专栏 | 阮一峰每周分享 | 语雀使用手册 | - | -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | - | [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) | -</Route> +<Route namespace="yuque" data={{"path":"/:name/:book","categories":["study"],"example":"/yuque/ruanyf/weekly","parameters":{"name":"用戶名","book":"知识库 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yuque.com/:name/:book"]},"name":"知识库","maintainers":["aha2mao","ltaoo"],"description":"| Node.js 专栏 | 阮一峰每周分享 | 语雀使用手册 |\n | -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- |\n | [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) |","location":"book.ts"}} /> -## 中国大学 MOOC (慕课) {#zhong-guo-da-xue-mooc-mu-ke} - -### 最新 {#zhong-guo-da-xue-mooc-mu-ke-zui-xin} - -<Route author="xyqfer" example="/icourse163/newest" path="/icourse163/newest" /> +| Node.js 专栏 | 阮一峰每周分享 | 语雀使用手册 | +| -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | +| [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) | ## 中国管理现代化研究会 {#zhong-guo-guan-li-xian-dai-hua-yan-jiu-hui} ### 栏目 {#zhong-guo-guan-li-xian-dai-hua-yan-jiu-hui-lan-mu} -<Route author="nczitzk" example="/camchina" path="/camchina/:id?" paramsDesc={['分类,见下表,默认为 1,即新闻']}> - | 新闻 | 通告栏 | - | ---- | ------ | - | 1 | 2 | -</Route> +<Route namespace="camchina" data={{"path":"/:id?","categories":["study"],"example":"/camchina","parameters":{"id":"分类,见下表,默认为 1,即新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cste.org.cn/categories/:id","cste.org.cn/"]},"name":"栏目","maintainers":["nczitzk"],"description":"| 新闻 | 通告栏 |\n | ---- | ------ |\n | 1 | 2 |","location":"index.ts"}} /> + +| 新闻 | 通告栏 | +| ---- | ------ | +| 1 | 2 | ## 中国计算机学会 {#zhong-guo-ji-suan-ji-xue-hui} -### 新闻 {#zhong-guo-ji-suan-ji-xue-hui-xin-wen} +### 大数据专家委员会 {#zhong-guo-ji-suan-ji-xue-hui-da-shu-ju-zhuan-jia-wei-yuan-hui} -<Route author="nczitzk" example="/ccf/news" path="/ccf/news/:category?" paramsDesc={['分类,见下表,默认为 CCF 新闻']}> - | CCF 新闻 | CCF 聚焦 | ACM 信息 | - | ----------- | -------- | --------- | - | Media\_list | Focus | ACM\_News | -</Route> +<Route namespace="ccf" data={{"path":"/tfbd/:caty/:id","categories":["study"],"example":"/ccf/tfbd/xwdt/tzgg","parameters":{"caty":"主分类,可在 URL 找到","id":"子分类,可在 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tfbd.ccf.org.cn/tfbd/:caty/:id","tfbd.ccf.org.cn/"]},"name":"大数据专家委员会","maintainers":["tudou027"],"location":"tfbd/index.ts"}} /> ### 计算机视觉专委会 - 学术动态 - 分类 {#zhong-guo-ji-suan-ji-xue-hui-ji-suan-ji-shi-jue-zhuan-wei-hui-xue-shu-dong-tai-fen-lei} -<Route author="elxy" example="/ccf/ccfcv/xsdt/xsqy" path="/ccf/ccfcv/:channel/:category" paramsDesc={['频道,仅支持 `xsdt`', '分类,见下表,亦可在网站 url 里找到']}> - | 学术前沿 | 热点征文 | 学术会议 | - | -------- | -------- | -------- | - | xsqy | rdzw | xshy | -</Route> +<Route namespace="ccf" data={{"path":"/ccfcv/:channel/:category","categories":["study"],"example":"/ccf/ccfcv/xsdt/xsqy","parameters":{"channel":"频道,仅支持 `xsdt`","category":"分类,见下表,亦可在网站 url 里找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机视觉专委会 - 学术动态 - 分类","maintainers":["elxy"],"description":"| 学术前沿 | 热点征文 | 学术会议 |\n | -------- | -------- | -------- |\n | xsqy | rdzw | xshy |","location":"ccfcv/index.ts"}} /> -### 大数据专家委员会 {#zhong-guo-ji-suan-ji-xue-hui-da-shu-ju-zhuan-jia-wei-yuan-hui} +| 学术前沿 | 热点征文 | 学术会议 | +| -------- | -------- | -------- | +| xsqy | rdzw | xshy | -<Route author="tudou027" example="/ccf/tfbd/xwdt/tzgg" path="/ccf/tfbd/:caty/:id" paramsDesc={['主分类,可在 URL 找到', '子分类,可在 URL 找到']} radar="1" /> +### 新闻 {#zhong-guo-ji-suan-ji-xue-hui-xin-wen} + +<Route namespace="ccf" data={{"path":"/news/:category?","categories":["study"],"example":"/ccf/news","parameters":{"category":"分类,见下表,默认为 CCF 新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ccf.org.cn/:category","ccf.org.cn/"],"target":"/news/:category"},"name":"新闻","maintainers":["nczitzk"],"description":"| CCF 新闻 | CCF 聚焦 | ACM 信息 |\n | ----------- | -------- | --------- |\n | Media_list | Focus | ACM_News |","location":"news.ts"}} /> + +| CCF 新闻 | CCF 聚焦 | ACM 信息 | +| ----------- | -------- | --------- | +| Media\_list | Focus | ACM\_News | ## 中国技术经济学会 {#zhong-guo-ji-shu-jing-ji-xue-hui} ### 栏目 {#zhong-guo-ji-shu-jing-ji-xue-hui-lan-mu} -<Route author="nczitzk" example="/cste" path="/cste/:id?" paramsDesc={['分类,见下表,默认为 16,即通知公告']}> - | 通知公告 | 学会新闻 | 科协简讯 | 学科动态 | 往事钩沉 | - | -------- | -------- | -------- | -------- | -------- | - | 16 | 18 | 19 | 20 | 21 | -</Route> +<Route namespace="cste" data={{"path":"/:id?","categories":["study"],"example":"/cste","parameters":{"id":"分类,见下表,默认为 16,即通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["nczitzk"],"description":"| 通知公告 | 学会新闻 | 科协简讯 | 学科动态 | 往事钩沉 |\n | -------- | -------- | -------- | -------- | -------- |\n | 16 | 18 | 19 | 20 | 21 |","location":"index.ts"}} /> + +| 通知公告 | 学会新闻 | 科协简讯 | 学科动态 | 往事钩沉 | +| -------- | -------- | -------- | -------- | -------- | +| 16 | 18 | 19 | 20 | 21 | ## 中国人工智能学会 {#zhong-guo-ren-gong-zhi-neng-xue-hui} ### 学会动态 {#zhong-guo-ren-gong-zhi-neng-xue-hui-xue-hui-dong-tai} -<Route author="tudou027" example="/caai/45" path="/caai/:caty" paramsDesc={['分类 ID,可在 URL 找到']} radar="1" /> +<Route namespace="caai" data={{"path":"/:caty","categories":["study"],"example":"/caai/45","parameters":{"caty":"分类 ID,可在 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"学会动态","maintainers":["tudou027"],"location":"index.ts"}} /> ## 中国研究生招生信息网 {#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang} ### 考研热点新闻 {#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang-kao-yan-re-dian-xin-wen} -<Route author="yanbot-team" example="/chsi/hotnews" path="/chsi/hotnews" radar="1" /> +<Route namespace="chsi" data={{"path":"/hotnews","categories":["study"],"example":"/chsi/hotnews","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.chsi.com.cn/"]},"name":"考研热点新闻","maintainers":["yanbot-team"],"url":"yz.chsi.com.cn/","location":"hotnews.ts"}} /> ### 考研动态 {#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang-kao-yan-dong-tai} -<Route author="SunBK201" example="/chsi/kydt" path="/chsi/kydt" radar="1" /> +<Route namespace="chsi" data={{"path":"/kydt","categories":["study"],"example":"/chsi/kydt","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.chsi.com.cn/kyzx/kydt"]},"name":"考研动态","maintainers":["SunBK201"],"url":"yz.chsi.com.cn/kyzx/kydt","location":"kydt.ts"}} /> ### 考研资讯 {#zhong-guo-yan-jiu-sheng-zhao-sheng-xin-xi-wang-kao-yan-zi-xun} -<Route author="yanbot-team" example="/chsi/kyzx/fstj" path="/chsi/kyzx/:type" radar="1" paramsDesc={[' type 见下表,亦可在网站 URL 找到']}> - | `:type` | 专题名称 | - | ------- | -------- | - | fstj | 复试调剂 | - | kydt | 考研动态 | - | zcdh | 政策导航 | - | kyrw | 考研人物 | - | jyxd | 经验心得 | -</Route> +<Route namespace="chsi" data={{"path":"/kyzx/:type","categories":["study"],"example":"/chsi/kyzx/fstj","parameters":{"type":" type 见下表,亦可在网站 URL 找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.chsi.com.cn/kyzx/:type"]},"name":"考研资讯","maintainers":["yanbot-team"],"description":"| `:type` | 专题名称 |\n | ------- | -------- |\n | fstj | 复试调剂 |\n | kydt | 考研动态 |\n | zcdh | 政策导航 |\n | kyrw | 考研人物 |\n | jyxd | 经验心得 |","location":"kyzx.ts"}} /> + +| `:type` | 专题名称 | +| ------- | -------- | +| fstj | 复试调剂 | +| kydt | 考研动态 | +| zcdh | 政策导航 | +| kyrw | 考研人物 | +| jyxd | 经验心得 | ## 中国智库网 {#zhong-guo-zhi-ku-wang} ### 观点与实践 {#zhong-guo-zhi-ku-wang-guan-dian-yu-shi-jian} -<Route author="AEliu" example="/chinathinktanks/57" path="/chinathinktanks/:id" radar="1" paramsDesc={['见下表,亦可在网站 url 里找到']}> - | `:id` | 专题名称 | - | ----- | -------- | - | 2 | 党的建设 | - | 3 | 社会 | - | 4 | 生态 | - | 5 | 政治 | - | 6 | 经济 | - | 7 | 文化 | - | 9 | 热点专题 | - | 10 | 国际关系 | - | 13 | 国外智库 | - | 46 | 智库报告 | - | 57 | 智库要闻 | - | 126 | 世界经济 | - | 127 | 宏观经济 | - | 128 | 区域经济 | - | 129 | 产业企业 | - | 130 | 三农问题 | - | 131 | 财政金融 | - | 132 | 科技创新 | - | 133 | 民主 | - | 134 | 法治 | - | 135 | 行政 | - | 136 | 国家治理 | - | 137 | 社会事业 | - | 138 | 社会保障 | - | 139 | 民族宗教 | - | 140 | 人口就业 | - | 141 | 社会治理 | - | 142 | 文化产业 | - | 143 | 公共文化 | - | 144 | 文化体制 | - | 145 | 文化思想 | - | 146 | 资源 | - | 147 | 能源 | - | 148 | 环境 | - | 149 | 生态文明 | - | 150 | 思想建设 | - | 151 | 作风建设 | - | 152 | 组织建设 | - | 153 | 制度建设 | - | 154 | 反腐倡廉 | - | 155 | 中国外交 | - | 156 | 全球治理 | - | 157 | 大国关系 | - | 158 | 地区政治 | - | 181 | 执政能力 | -</Route> +<Route namespace="chinathinktanks" data={{"path":"/:id","categories":["study"],"example":"/chinathinktanks/57","parameters":{"id":"见下表,亦可在网站 url 里找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"观点与实践","maintainers":["Aeliu"],"description":"| `:id` | 专题名称 |\n | ----- | -------- |\n | 2 | 党的建设 |\n | 3 | 社会 |\n | 4 | 生态 |\n | 5 | 政治 |\n | 6 | 经济 |\n | 7 | 文化 |\n | 9 | 热点专题 |\n | 10 | 国际关系 |\n | 13 | 国外智库 |\n | 46 | 智库报告 |\n | 57 | 智库要闻 |\n | 126 | 世界经济 |\n | 127 | 宏观经济 |\n | 128 | 区域经济 |\n | 129 | 产业企业 |\n | 130 | 三农问题 |\n | 131 | 财政金融 |\n | 132 | 科技创新 |\n | 133 | 民主 |\n | 134 | 法治 |\n | 135 | 行政 |\n | 136 | 国家治理 |\n | 137 | 社会事业 |\n | 138 | 社会保障 |\n | 139 | 民族宗教 |\n | 140 | 人口就业 |\n | 141 | 社会治理 |\n | 142 | 文化产业 |\n | 143 | 公共文化 |\n | 144 | 文化体制 |\n | 145 | 文化思想 |\n | 146 | 资源 |\n | 147 | 能源 |\n | 148 | 环境 |\n | 149 | 生态文明 |\n | 150 | 思想建设 |\n | 151 | 作风建设 |\n | 152 | 组织建设 |\n | 153 | 制度建设 |\n | 154 | 反腐倡廉 |\n | 155 | 中国外交 |\n | 156 | 全球治理 |\n | 157 | 大国关系 |\n | 158 | 地区政治 |\n | 181 | 执政能力 |","location":"viewpoint.ts"}} /> + +| `:id` | 专题名称 | +| ----- | -------- | +| 2 | 党的建设 | +| 3 | 社会 | +| 4 | 生态 | +| 5 | 政治 | +| 6 | 经济 | +| 7 | 文化 | +| 9 | 热点专题 | +| 10 | 国际关系 | +| 13 | 国外智库 | +| 46 | 智库报告 | +| 57 | 智库要闻 | +| 126 | 世界经济 | +| 127 | 宏观经济 | +| 128 | 区域经济 | +| 129 | 产业企业 | +| 130 | 三农问题 | +| 131 | 财政金融 | +| 132 | 科技创新 | +| 133 | 民主 | +| 134 | 法治 | +| 135 | 行政 | +| 136 | 国家治理 | +| 137 | 社会事业 | +| 138 | 社会保障 | +| 139 | 民族宗教 | +| 140 | 人口就业 | +| 141 | 社会治理 | +| 142 | 文化产业 | +| 143 | 公共文化 | +| 144 | 文化体制 | +| 145 | 文化思想 | +| 146 | 资源 | +| 147 | 能源 | +| 148 | 环境 | +| 149 | 生态文明 | +| 150 | 思想建设 | +| 151 | 作风建设 | +| 152 | 组织建设 | +| 153 | 制度建设 | +| 154 | 反腐倡廉 | +| 155 | 中国外交 | +| 156 | 全球治理 | +| 157 | 大国关系 | +| 158 | 地区政治 | +| 181 | 执政能力 | ## 中华人民共和国学位证书查询 {#zhong-hua-ren-min-gong-he-guo-xue-wei-zheng-shu-cha-xun} -### 各学位授予单位学位证书上网进度 {#zhong-hua-ren-min-gong-he-guo-xue-wei-zheng-shu-cha-xun-ge-xue-wei-shou-yu-dan-wei-xue-wei-zheng-shu-shang-wang-jin-du} +### Unknown {#zhong-hua-ren-min-gong-he-guo-xue-wei-zheng-shu-cha-xun-unknown} -<Route author="TonyRL" example="/chinadegrees/11" path="/chinadegrees/:province?" paramsDesc={['省市代号,见下表,亦可在 [这里](http://www.chinadegrees.com.cn/help/provinceSwqk.html) 找到,默认为 `11`']} radar="1" puppeteer="1" notOperational="1"> - | 省市 | 代号 | - | ---------------- | ---- | - | 北京市 | 11 | - | 天津市 | 12 | - | 河北省 | 13 | - | 山西省 | 14 | - | 内蒙古自治区 | 15 | - | 辽宁省 | 21 | - | 吉林省 | 22 | - | 黑龙江省 | 23 | - | 上海市 | 31 | - | 江苏省 | 32 | - | 浙江省 | 33 | - | 安徽省 | 34 | - | 福建省 | 35 | - | 江西省 | 36 | - | 山东省 | 37 | - | 河南省 | 41 | - | 湖北省 | 42 | - | 湖南省 | 43 | - | 广东省 | 44 | - | 广西壮族自治区 | 45 | - | 海南省 | 46 | - | 重庆市 | 50 | - | 四川省 | 51 | - | 贵州省 | 52 | - | 云南省 | 53 | - | 西藏自治区 | 54 | - | 陕西省 | 61 | - | 甘肃省 | 62 | - | 青海省 | 63 | - | 宁夏回族自治区 | 64 | - | 新疆维吾尔自治区 | 65 | - | 台湾 | 71 | -</Route> +<Route namespace="chinadegrees" data={{"path":"/:province?","categories":["study"],"example":"/chinadegrees/11","parameters":{"province":"省市代号,见下表,亦可在 [这里](http://www.chinadegrees.com.cn/help/provinceSwqk.html) 找到,默认为 `11`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["TonyRL"],"location":"province.ts"}} /> diff --git a/website/docs/routes/traditional-media.mdx b/website/docs/routes/traditional-media.mdx index 3074c61ae..9d6a414d4 100644 --- a/website/docs/routes/traditional-media.mdx +++ b/website/docs/routes/traditional-media.mdx @@ -1,386 +1,208 @@ -# 📰 News - -## 21 财经 {#21-cai-jing} - -### 频道 {#21-cai-jing-pin-dao} - -<Route author="brilon" example="/21caijing/channel/readnumber" path="/21caijing/channel/:name" paramsDesc={['频道名称,可在 [https://m.21jingji.com/](https://m.21jingji.com/) 页面 URL 中找到']} /> - -## ABC News {#abc-news} - -### Channel & Topic {#abc-news-channel-topic} - -<Route author="nczitzk" example="/abc" path="/abc/:category?" paramsDesc={['Category, can be found in the URL, can also be filled in with the `documentId` in the source code of the page, `news/justin` as **Just In** by default']}> - :::tip - All Topics in [Topic Library](https://abc.net.au/news/topics) are supported, you can fill in the field after `topic` in its URL, or fill in the `documentId`. - - For example, the URL for [Computer Science](https://www.abc.net.au/news/topic/computer-science) is `https://www.abc.net.au/news/topic/computer-science`, the `category` is `news/topic/computer-science`, and the `documentId` of the Topic is `2302`, so the route is [/abc/news/topic/computer-science](https://rsshub.app/abc/news/topic/computer-science) and [/abc/2302](https://rsshub.app/abc/2302). - - The supported channels are all listed in the table below. For other channels, please find the `documentId` in the source code of the channel page and fill it in as above. - ::: -</Route> - -## Aljazeera 半岛电视台 {#aljazeera-ban-dao-dian-shi-tai} - -### News {#aljazeera-ban-dao-dian-shi-tai-news} - -<Route author="nczitzk" example="/aljazeera/english/news" path="/aljazeera/:language?/:category?" paramsDesc={['Language, see below, arbric by default, as Arbric', 'Category, can be found in URL, homepage by default']}> - Language - - | Arbric | Chinese | English | - | ------ | ------- | ------- | - | arbric | 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) - ::: -</Route> - -### Tag {#aljazeera-ban-dao-dian-shi-tai-tag} - -<Route author="nczitzk" example="/aljazeera/english/tag/science-and-technology" path="/aljazeera/:language?/tag/:id" paramsDesc={['Language, see below, arbric by default, as Arbric', 'Tag id, can be found in URL']}> - Language - - | Arbric | Chinese | English | - | ------ | ------- | ------- | - | arbric | 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) - ::: -</Route> - -### Official RSS {#aljazeera-ban-dao-dian-shi-tai-official-rss} - -<Route author="nczitzk" example="/aljazeera/english/rss" path="/aljazeera/:language?/rss" paramsDesc={['Language, see below, arbric by default, as Arbric']}> - Language - - | Arbric | Chinese | English | - | ------ | ------- | ------- | - | arbric | chinese | english | - - :::tip - There is no RSS source for Al Jazeera Chinese, returning homepage content by default - ::: -</Route> +# traditional-media ## AP News {#ap-news} ### Topics {#ap-news-topics} -<Route author="zoenglinghou mjysci TonyRL" example="/apnews/topics/apf-topnews" path="/apnews/topics/:topic?" paramsDesc={['Topic name, can be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`, `trending-news` by default']} radar="1" /> - -## BBC {#bbc} - -### News {#bbc-news} - -<Route author="HenryQW DIYgod" example="/bbc/world-asia" path="/bbc/:channel?" paramsDesc={['channel, default to `top stories`']}> - Provides a better reading experience (full text articles) over the official ones. - - Support major channels, refer to [BBC RSS feeds](https://www.bbc.co.uk/news/10628494). Eg, `business` for `https://feeds.bbci.co.uk/news/business/rss.xml`. - - - Channel contains sub-directories, such as `https://feeds.bbci.co.uk/news/world/asia/rss.xml`, replace `/` with `-`, `/bbc/world-asia`. -</Route> - -### BBC 中文网 {#bbc-bbc-zhong-wen-wang} - -<Route author="HenryQW" example="/bbc/chinese/business" path="/bbc/:lang/:channel?" paramsDesc={['语言,简体或繁体中文','频道,默认为主页']} notOperational="1"> - 支持大部分频道,频道名称见 [BBC 中文网 RSS 服务](https://www.bbc.com/zhongwen/simp/services/2009/09/000000_rss)。 - - 简体版: - - - 频道,如金融财经 `https://www.bbc.co.uk/zhongwen/simp/business/index.xml` 则为 `/bbc/chinese/business`. - - 繁體版: - - - 频道,如金融財經 `https://www.bbc.co.uk/zhongwen/trad/business/index.xml` 则为 `/bbc/traditionalchinese/business`. -</Route> +<Route namespace="apnews" data={{"path":"/topics/:topic?","categories":["traditional-media"],"example":"/apnews/topics/apf-topnews","parameters":{"topic":"Topic name, can be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`, `trending-news` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["apnews.com/hub/:topic"],"target":"/topics/:topic"},"name":"Topics","maintainers":["zoenglinghou","mjysci","TonyRL"],"location":"topics.ts"}} /> ## Caixin Global {#caixin-global} ### Latest News {#caixin-global-latest-news} -<Route author="TonyRL" example="/caixinglobal/latest" path="/caixinglobal/latest" radar="1" /> +<Route namespace="caixinglobal" data={{"path":"/latest","categories":["traditional-media"],"example":"/caixinglobal/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caixinglobal.com/news","caixinglobal.com/"]},"name":"Latest News","maintainers":["TonyRL"],"url":"caixinglobal.com/news","location":"latest.ts"}} /> ## Canadian Broadcasting Corporation {#canadian-broadcasting-corporation} ### News {#canadian-broadcasting-corporation-news} -<Route author="wb14123" example="/cbc/topics" path="/cbc/topics/:topic?" paramsDesc={['Channel,`Top Stories` by default. For secondary channel like `canada/toronto`, use `-` to replace `/`']} radar="1" notOperational="1" /> - -## Chicago Tribune {#chicago-tribune} - -### News {#chicago-tribune-news} - -<Route author="oppilate" example="/chicagotribune/nation-world" path="/chicagotribune/:category/:subcategory?" paramsDesc={['Category', 'Subcategory']}> - Generates full-text that the official feed doesn't provide. - Refer to [Chicago Tribune's feed page](https://www.chicagotribune.com/about/ct-chicago-tribune-rss-feeds-htmlstory.html) for categories. For instance, `https://www.chicagotribune.com/arcio/rss/category/nation-world/` corresponds to `/chicagotribune/nation-world`. -</Route> - -## ChinaFile {#chinafile} - -### Reporting & Opinion {#chinafile-reporting-opinion} - -<Route author="oppilate" example="/chinafile/all" path="/chinafile/:category?" paramsDesc={['Category, by default `all`']}> - Generates full-text feeds that the official feed doesn't provide. - - | All | The China NGO Project | - | --- | --------------------- | - | all | ngo | -</Route> +<Route namespace="cbc" data={{"path":"/topics/:topic?","categories":["traditional-media"],"example":"/cbc/topics","parameters":{"topic":"Channel,`Top Stories` by default. For secondary channel like `canada/toronto`, use `-` to replace `/`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cbc.ca/news"],"target":"/topics"},"name":"News","maintainers":["wb14123"],"url":"cbc.ca/news","location":"topics.ts"}} /> ## CNBC {#cnbc} ### Full article RSS {#cnbc-full-article-rss} -<Route author="TonyRL" example="/cnbc/rss" path="/cnbc/rss/:id?" paramsDesc={['Channel ID, can be found in Official RSS URL, `100003114` (Top News) by default']}> - Provides a better reading experience (full articles) over the official ones. +<Route namespace="cnbc" data={{"path":"/rss/:id?","categories":["traditional-media"],"example":"/cnbc/rss","parameters":{"id":"Channel ID, can be found in Official RSS URL, `100003114` (Top News) by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cnbc.com/id/:id/device/rss/rss.html"],"target":"/rss/:id"},"name":"Full article RSS","maintainers":["TonyRL"],"description":"Provides a better reading experience (full articles) over the official ones.\n\n Support all channels, refer to [CNBC RSS feeds](https://www.cnbc.com/rss-feeds/).","location":"rss.ts"}} /> - Support all channels, refer to [CNBC RSS feeds](https://www.cnbc.com/rss-feeds/). -</Route> +Provides a better reading experience (full articles) over the official ones. -## Deutsche Welle {#deutsche-welle} +Support all channels, refer to [CNBC RSS feeds](https://www.cnbc.com/rss-feeds/). -### News {#deutsche-welle-news} +## Corona Virus Disease 2019 {#corona-virus-disease-2019} -<Route author="nczitzk" example="/dw/en" path="/dw/:lang?/:caty?" paramsDesc={['Language, can be found in the URL of the corresponding language version page, German by default', 'Category, all by default']}> - | All | German Press | Culture | Economy | Science & Nature | - | --- | ------------ | ------- | ------- | ---------------- | - | all | press | cul | eco | sci | -</Route> +### News {#corona-virus-disease-2019-news} + +<Route namespace="scmp" data={{"path":"/:category_id","categories":["traditional-media"],"example":"/scmp/3","parameters":{"category_id":"Category"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scmp.com/rss/:category_id/feed"]},"name":"News","maintainers":["proletarius101"],"description":"See the [official RSS page](https://www.scmp.com/rss) to get the ID of each category. This route provides fulltext that the offical feed doesn't.","location":"index.ts"}} /> + +See the [official RSS page](https://www.scmp.com/rss) to get the ID of each category. This route provides fulltext that the offical feed doesn't. + +### Topics {#corona-virus-disease-2019-topics} + +<Route namespace="scmp" data={{"path":"/topics/:topic","categories":["traditional-media"],"example":"/scmp/topics/coronavirus-pandemic-all-stories","parameters":{"topic":"Topic, can be found in URL"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scmp.com/topics/:topic"]},"name":"Topics","maintainers":["TonyRL"],"location":"topic.ts"}} /> ## DNA India {#dna-india} ### News {#dna-india-news} -<Route author="Rjnishant530" example="/dnaindia/headlines" path="/dnaindia/:category" paramsDesc={['Find it in the URL, or tables below']} radar="1"> - Categories: +<Route namespace="dnaindia" data={{"path":["/:category","/topic/:topic"],"categories":["traditional-media"],"example":"/dnaindia/headlines","parameters":{"category":"Find it in the URL, or tables below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dnaindia.com/:category"]},"name":"News","maintainers":["Rjnishant530"],"description":"Categories:\n\n | Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World |\n | --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- |\n | headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world |","location":"category.ts"}} /> - | Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World | - | --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- | - | headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world | -</Route> +Categories: -### Topic {#dna-india-topic} +| Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World | +| --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- | +| headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world | -<Route author="Rjnishant530" example="/dnaindia/topic/dna-verified" path="/dnaindia/topic/:topic" paramsDesc={['Find it in the URL']} radar="1"> - Topics: +### News {#dna-india-news} - | DNA verified | - | ------------ | - | dna-verified | +<Route namespace="dnaindia" data={{"path":["/:category","/topic/:topic"],"categories":["traditional-media"],"example":"/dnaindia/headlines","parameters":{"category":"Find it in the URL, or tables below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dnaindia.com/:category"]},"name":"News","maintainers":["Rjnishant530"],"description":"Categories:\n\n | Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World |\n | --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- |\n | headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world |","location":"category.ts"}} /> - :::tip[Topic] - The URL of the form `https://www.dnaindia.com/topic/dna-verified` demonstrates the utilization of the subdomain `topic` - ::: -</Route> +Categories: + +| Headlines | Explainer | India | Entertainment | Sports | Viral | Lifestyle | Education | Business | World | +| --------- | --------- | ----- | ------------- | ------ | ----- | --------- | --------- | -------- | ----- | +| headlines | explainer | india | entertainment | sports | viral | lifestyle | education | business | world | ## Ekantipur / कान्तिपुर (Nepal) {#ekantipur-%E0%A4%95%E0%A4%BE%E0%A4%A8%E0%A5%8D%E0%A4%A4%E0%A4%BF%E0%A4%AA%E0%A5%81%E0%A4%B0-nepal} ### Full Article RSS {#ekantipur-%E0%A4%95%E0%A4%BE%E0%A4%A8%E0%A5%8D%E0%A4%A4%E0%A4%BF%E0%A4%AA%E0%A5%81%E0%A4%B0-nepal-full-article-rss} -<Route author="maniche04" example="/ekantipur/news" path="/ekantipur/:channel?" paramsDesc={['Find it in the ekantipur.com menu or pick from the list below:']} radar="1"> - Channels: +<Route namespace="ekantipur" data={{"path":"/:channel?","categories":["traditional-media"],"example":"/ekantipur/news","parameters":{"channel":"Find it in the ekantipur.com menu or pick from the list below:"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ekantipur.com/:channel"],"target":"/:channel"},"name":"Full Article RSS","maintainers":["maniche04"],"description":"Channels:\n\n | समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग |\n | ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- |\n | news | business | opinion | sports | national | entertainment | photo_feature | feature | world | blog |","location":"issue.ts"}} /> - | समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग | - | ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- | - | news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog | -</Route> +Channels: + +| समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग | +| ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- | +| news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog | ## Financial Times {#financial-times} ### FT 中文网 {#financial-times-ft-zhong-wen-wang} -<Route author="HenryQW xyqfer" example="/ft/chinese/hotstoryby7day" path="/ft/:language/:channel?" paramsDesc={['语言,简体`chinese`,繁体`traditional`', '频道,缺省为每日更新']}> - :::tip - - 不支持付费文章。 - ::: +<Route namespace="ft" data={{"path":"/:language/:channel?","categories":["traditional-media"],"example":"/ft/chinese/hotstoryby7day","parameters":{"language":"语言,简体`chinese`,繁体`traditional`","channel":"频道,缺省为每日更新"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"FT 中文网","maintainers":["HenryQW","xyqfer"],"description":":::tip\n - 不支持付费文章。\n :::\n\n 通过提取文章全文,以提供比官方源更佳的阅读体验。\n\n 支持所有频道,频道名称见 [官方频道 RSS](http://www.ftchinese.com/channel/rss.html).\n\n - 频道为单一路径,如 `http://www.ftchinese.com/rss/news` 则为 `/ft/chinese/news`.\n - 频道包含多重路径,如 `http://www.ftchinese.com/rss/column/007000002` 则替换 `/` 为 `-` `/ft/chinese/column-007000002`.","location":"channel.ts"}} /> - 通过提取文章全文,以提供比官方源更佳的阅读体验。 +:::tip +- 不支持付费文章。 +::: - 支持所有频道,频道名称见 [官方频道 RSS](http://www.ftchinese.com/channel/rss.html). +通过提取文章全文,以提供比官方源更佳的阅读体验。 - - 频道为单一路径,如 `http://www.ftchinese.com/rss/news` 则为 `/ft/chinese/news`. - - 频道包含多重路径,如 `http://www.ftchinese.com/rss/column/007000002` 则替换 `/` 为 `-` `/ft/chinese/column-007000002`. -</Route> +支持所有频道,频道名称见 [官方频道 RSS](http://www.ftchinese.com/channel/rss.html). + +- 频道为单一路径,如 `http://www.ftchinese.com/rss/news` 则为 `/ft/chinese/news`. +- 频道包含多重路径,如 `http://www.ftchinese.com/rss/column/007000002` 则替换 `/` 为 `-` `/ft/chinese/column-007000002`. ### myFT personal RSS {#financial-times-myft-personal-rss} -<Route author="HenryQW" example="/ft/myft/rss-key" path="/ft/myft/:key" paramsDesc={['the last part of myFT personal RSS address']} configRequired="1"> - :::tip - - Visit ft.com -> myFT -> Contact Preferences to enable personal RSS feed, see [help.ft.com](https://help.ft.com/faq/email-alerts-and-contact-preferences/what-is-myft-rss-feed/) - - Obtain the key from the personal RSS address, it looks like `12345678-abcd-4036-82db-vdv20db024b8` - ::: -</Route> +<Route namespace="ft" data={{"path":"/myft/:key","categories":["traditional-media"],"example":"/ft/myft/rss-key","parameters":{"key":"the last part of myFT personal RSS address"},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"myFT personal RSS","maintainers":["HenryQW"],"description":":::tip\n - Visit ft.com -> myFT -> Contact Preferences to enable personal RSS feed, see [help.ft.com](https://help.ft.com/faq/email-alerts-and-contact-preferences/what-is-myft-rss-feed/)\n - Obtain the key from the personal RSS address, it looks like `12345678-abcd-4036-82db-vdv20db024b8`\n :::","location":"myft.ts"}} /> + +:::tip +- Visit ft.com -> myFT -> Contact Preferences to enable personal RSS feed, see [help.ft.com](https://help.ft.com/faq/email-alerts-and-contact-preferences/what-is-myft-rss-feed/) +- Obtain the key from the personal RSS address, it looks like `12345678-abcd-4036-82db-vdv20db024b8` +::: ## Korean Central News Agency (KCNA) 朝鲜中央通讯社 {#korean-central-news-agency-kcna-chao-xian-zhong-yang-tong-xun-she} ### News {#korean-central-news-agency-kcna-chao-xian-zhong-yang-tong-xun-she-news} -<Route author="Rongronggg9" example="/kcna/en" path="/kcna/:lang/:category?" paramsDesc={['Language, refer to the table below', 'Category, refer to the table below']} anticrawler="1" radar="1"> - | Language | 조선어 | English | 中国语 | Русский | Español | 日本語 | - | -------- | ------ | ------- | ------ | ------- | ------- | ------ | - | `:lang` | `kp` | `en` | `cn` | `ru` | `es` | `jp` | +<Route namespace="kcna" data={{"path":"/:lang/:category?","categories":["traditional-media"],"example":"/kcna/en","parameters":{"lang":"Language, refer to the table below","category":"Category, refer to the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.kcna.kp/:lang","www.kcna.kp/:lang/category/articles/q/1ee9bdb7186944f765208f34ecfb5407.kcmsf","www.kcna.kp/:lang/category/articles.kcmsf"],"target":"/:lang"},"name":"News","maintainers":["Rongronggg9"],"description":"| Language | 조선어 | English | 中国语 | Русский | Español | 日本語 |\n | -------- | ------ | ------- | ------ | ------- | ------- | ------ |\n | `:lang` | `kp` | `en` | `cn` | `ru` | `es` | `jp` |\n\n | Category | `:category` |\n | ---------------------------------------------------------------- | ---------------------------------- |\n | WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | `54c0ca4ca013a92cc9cf95bd4004c61a` |\n | Latest News (default) | `1ee9bdb7186944f765208f34ecfb5407` |\n | Top News | `5394b80bdae203fadef02522cfb578c0` |\n | Home News | `b2b3bcc1b0a4406ab0c36e45d5db58db` |\n | Documents | `a8754921399857ebdbb97a98a1e741f5` |\n | World | `593143484cf15d48ce85c26139582395` |\n | Society-Life | `93102e5a735d03979bc58a3a7aefb75a` |\n | External | `0f98b4623a3ef82aeea78df45c423fd0` |\n | News Commentary | `12c03a49f7dbe829bceea8ac77088c21` |","location":"news.ts"}} /> - | Category | `:category` | - | ---------------------------------------------------------------- | ---------------------------------- | - | WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | `54c0ca4ca013a92cc9cf95bd4004c61a` | - | Latest News (default) | `1ee9bdb7186944f765208f34ecfb5407` | - | Top News | `5394b80bdae203fadef02522cfb578c0` | - | Home News | `b2b3bcc1b0a4406ab0c36e45d5db58db` | - | Documents | `a8754921399857ebdbb97a98a1e741f5` | - | World | `593143484cf15d48ce85c26139582395` | - | Society-Life | `93102e5a735d03979bc58a3a7aefb75a` | - | External | `0f98b4623a3ef82aeea78df45c423fd0` | - | News Commentary | `12c03a49f7dbe829bceea8ac77088c21` | -</Route> +| Language | 조선어 | English | 中国语 | Русский | Español | 日本語 | +| -------- | ------ | ------- | ------ | ------- | ------- | ------ | +| `:lang` | `kp` | `en` | `cn` | `ru` | `es` | `jp` | + +| Category | `:category` | +| ---------------------------------------------------------------- | ---------------------------------- | +| WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | `54c0ca4ca013a92cc9cf95bd4004c61a` | +| Latest News (default) | `1ee9bdb7186944f765208f34ecfb5407` | +| Top News | `5394b80bdae203fadef02522cfb578c0` | +| Home News | `b2b3bcc1b0a4406ab0c36e45d5db58db` | +| Documents | `a8754921399857ebdbb97a98a1e741f5` | +| World | `593143484cf15d48ce85c26139582395` | +| Society-Life | `93102e5a735d03979bc58a3a7aefb75a` | +| External | `0f98b4623a3ef82aeea78df45c423fd0` | +| News Commentary | `12c03a49f7dbe829bceea8ac77088c21` | ## La Jornada {#la-jornada} ### News {#la-jornada-news} -<Route author="Thealf154" example="/jornada/2022-10-12/capital" path="/jornada/:date?/:category?" paramsDesc={['Date string, must be in format of `YYYY-MM-DD`. You can get today\'s news using `today`', 'Category, refer to the table below']} radar="1"> - Provides a way to get an specific rss feed by date and category over the official one. +<Route namespace="jornada" data={{"path":"/:date?/:category?","categories":["traditional-media"],"example":"/jornada/2022-10-12/capital","parameters":{"date":"Date string, must be in format of `YYYY-MM-DD`. You can get today's news using `today`","category":"Category, refer to the table below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["Thealf154"],"description":"Provides a way to get an specific rss feed by date and category over the official one.\n\n | Category | `:category` |\n | -------------------- | ----------- |\n | Capital | capital |\n | Cartones | cartones |\n | Ciencia y Tecnología | ciencia |\n | Cultura | cultura |\n | Deportes | deportes |\n | Economía | economia |\n | Estados | estados |\n | Mundo | mundo |\n | Opinión | opinion |\n | Política | politica |\n | Sociedad | sociedad |","location":"index.ts"}} /> - | Category | `:category` | - | -------------------- | ----------- | - | Capital | capital | - | Cartones | cartones | - | Ciencia y Tecnología | ciencia | - | Cultura | cultura | - | Deportes | deportes | - | Economía | economia | - | Estados | estados | - | Mundo | mundo | - | Opinión | opinion | - | Política | politica | - | Sociedad | sociedad | -</Route> +Provides a way to get an specific rss feed by date and category over the official one. -## Ming Pao 明报 {#ming-pao-ming-bao} - -### 即时新闻 {#ming-pao-ming-bao-ji-shi-xin-wen} - -<Route author="TonyRL" example="/mingpao/ins/all" path="/mingpao/ins/:category?" paramsDesc={['频道,预设为总目录']}> - | category | 即时新闻频道 | - | -------- | ------------ | - | all | 总目录 | - | s00001 | 港闻 | - | s00002 | 经济 | - | s00003 | 地产 | - | s00004 | 两岸 | - | s00005 | 国际 | - | s00006 | 体育 | - | s00007 | 娱乐 | - | s00022 | 文摘 | - | s00024 | 热点 | -</Route> - -### Ming Pao Daily 每日明报 {#ming-pao-ming-bao-ming-pao-daily-mei-ri-ming-bao} - -<Route author="TonyRL" example="/mingpao/pns/s00017" path="/mingpao/pns/:category?" paramsDesc={['channel,default to brief']} /> - -:::tip -Only `s00017` is in English. -::: - -| category | Channel | -| -------- | ------------- | -| s00001 | Brief | -| s00002 | Local | -| s00003 | Editorial | -| s00004 | Economy | -| s00005 | Supplement | -| s00011 | Education | -| s00012 | Views | -| s00013 | China | -| s00014 | International | -| s00015 | Sports | -| s00016 | Entertainment | -| s00017 | English | -| s00018 | Columnist | +| Category | `:category` | +| -------------------- | ----------- | +| Capital | capital | +| Cartones | cartones | +| Ciencia y Tecnología | ciencia | +| Cultura | cultura | +| Deportes | deportes | +| Economía | economia | +| Estados | estados | +| Mundo | mundo | +| Opinión | opinion | +| Política | politica | +| Sociedad | sociedad | ## National Public Radio {#national-public-radio} ### News {#national-public-radio-news} -<Route author="bennyyip" example="/npr/1001" path="/npr/:endpoint?" paramsDesc={['Channel ID, can be found in Official RSS URL, `1001` by default']}> - Provide full article RSS for CBC topics. -</Route> +<Route namespace="npr" data={{"path":"/:endpoint?","categories":["traditional-media"],"example":"/npr/1001","parameters":{"endpoint":"Channel ID, can be found in Official RSS URL, `1001` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["bennyyip"],"description":"Provide full article RSS for CBC topics.","location":"full.ts"}} /> + +Provide full article RSS for CBC topics. ## NHK {#nhk} ### News Web Easy {#nhk-news-web-easy} -<Route author="Andiedie" example="/nhk/news_web_easy" path="/nhk/news_web_easy" /> +<Route namespace="nhk" data={{"path":"/news_web_easy","categories":["traditional-media"],"example":"/nhk/news_web_easy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www3.nhk.or.jp/news/easy/","www3.nhk.or.jp/"]},"name":"News Web Easy","maintainers":["Andiedie"],"url":"www3.nhk.or.jp/news/easy/","location":"news-web-easy.ts"}} /> ### WORLD-JAPAN - Top Stories {#nhk-world-japan-top-stories} -<Route author="TonyRL" example="/nhk/news/en" path="/nhk/news/:lang?" paramsDesc={['Language, see below, `en` by default']} radar="1" notOperational="1"> - | العربية | বাংলা | မြန်မာဘာသာစကား | 中文(简体) | 中文(繁體) | English | Français | - | ------- | -- | ------------ | ------------ | ------------ | ------- | -------- | - | ar | bn | my | zh | zt | en | fr | +<Route namespace="nhk" data={{"path":"/news/:lang?","categories":["traditional-media"],"example":"/nhk/news/en","parameters":{"lang":"Language, see below, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www3.nhk.or.jp/nhkworld/:lang/news/list/","www3.nhk.or.jp/nhkworld/:lang/news/"],"target":"/news/:lang"},"name":"WORLD-JAPAN - Top Stories","maintainers":["TonyRL"],"description":"| العربية | বাংলা | မြန်မာဘာသာစကား | 中文(简体) | 中文(繁體) | English | Français |\n | ------- | -- | ------------ | ------------ | ------------ | ------- | -------- |\n | ar | bn | my | zh | zt | en | fr |\n\n | हिन्दी | Bahasa Indonesia | 코리언 | فارسی | Português | Русский | Español |\n | -- | ---------------- | ------ | ----- | --------- | ------- | ------- |\n | hi | id | ko | fa | pt | ru | es |\n\n | Kiswahili | ภาษาไทย | Türkçe | Українська | اردو | Tiếng Việt |\n | --------- | ------- | ------ | ---------- | ---- | ---------- |\n | sw | th | tr | uk | ur | vi |","location":"news.ts"}} /> - | हिन्दी | Bahasa Indonesia | 코리언 | فارسی | Português | Русский | Español | - | -- | ---------------- | ------ | ----- | --------- | ------- | ------- | - | hi | id | ko | fa | pt | ru | es | +| العربية | বাংলা | မြန်မာဘာသာစကား | 中文(简体) | 中文(繁體) | English | Français | +| ------- | -- | ------------ | ------------ | ------------ | ------- | -------- | +| ar | bn | my | zh | zt | en | fr | - | Kiswahili | ภาษาไทย | Türkçe | Українська | اردو | Tiếng Việt | - | --------- | ------- | ------ | ---------- | ---- | ---------- | - | sw | th | tr | uk | ur | vi | -</Route> +| हिन्दी | Bahasa Indonesia | 코리언 | فارسی | Português | Русский | Español | +| -- | ---------------- | ------ | ----- | --------- | ------- | ------- | +| hi | id | ko | fa | pt | ru | es | + +| Kiswahili | ภาษาไทย | Türkçe | Українська | اردو | Tiếng Việt | +| --------- | ------- | ------ | ---------- | ---- | ---------- | +| sw | th | tr | uk | ur | vi | ## Now 新聞 {#now-xin-wen} ### 新聞 {#now-xin-wen-xin-wen} -<Route author="nczitzk" example="/now/news" path="/now/news/:category?/:id?" paramsDesc={['分类,见下表,默认为首页', '编号,可在对应专题/节目页 URL 中找到 topicId']}> - :::tip - **编号** 仅对事件追蹤、評論節目、新聞專題三个分类起作用,例子如下: +<Route namespace="now" data={{"path":"/news/:category?/:id?","categories":["traditional-media"],"example":"/now/news","parameters":{"category":"分类,见下表,默认为首页","id":"编号,可在对应专题/节目页 URL 中找到 topicId"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.now.com/"]},"name":"新聞","maintainers":["nczitzk"],"url":"news.now.com/","description":":::tip\n **编号** 仅对事件追蹤、評論節目、新聞專題三个分类起作用,例子如下:\n\n 对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123&topicId=1056) 话题,其网址为 `https://news.now.com/home/tracker/detail?catCode=123&topicId=1056`,其中 `topicId` 为 1056,则对应路由为 [`/now/news/tracker/1056`](https://rsshub.app/now/news/tracker/1056)\n :::\n\n | 首頁 | 港聞 | 兩岸國際 | 娛樂 |\n | ---- | ----- | ------------- | ------------- |\n | | local | international | entertainment |\n\n | 生活 | 科技 | 財經 | 體育 |\n | ---- | ---------- | ------- | ------ |\n | life | technology | finance | sports |\n\n | 事件追蹤 | 評論節目 | 新聞專題 |\n | -------- | -------- | -------- |\n | tracker | feature | opinion |","location":"news.ts"}} /> - 对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123\&topicId=1056) 话题,其网址为 `https://news.now.com/home/tracker/detail?catCode=123&topicId=1056`,其中 `topicId` 为 1056,则对应路由为 [`/now/news/tracker/1056`](https://rsshub.app/now/news/tracker/1056) - ::: +:::tip +**编号** 仅对事件追蹤、評論節目、新聞專題三个分类起作用,例子如下: - | 首頁 | 港聞 | 兩岸國際 | 娛樂 | - | ---- | ----- | ------------- | ------------- | - | | local | international | entertainment | +对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123\&topicId=1056) 话题,其网址为 `https://news.now.com/home/tracker/detail?catCode=123&topicId=1056`,其中 `topicId` 为 1056,则对应路由为 [`/now/news/tracker/1056`](https://rsshub.app/now/news/tracker/1056) +::: - | 生活 | 科技 | 財經 | 體育 | - | ---- | ---------- | ------- | ------ | - | life | technology | finance | sports | +| 首頁 | 港聞 | 兩岸國際 | 娛樂 | +| ---- | ----- | ------------- | ------------- | +| | local | international | entertainment | - | 事件追蹤 | 評論節目 | 新聞專題 | - | -------- | -------- | -------- | - | tracker | feature | opinion | -</Route> +| 生活 | 科技 | 財經 | 體育 | +| ---- | ---------- | ------- | ------ | +| life | technology | finance | sports | -### 熱門 {#now-xin-wen-re-men} - -<Route author="nczitzk" example="/now/news/rank" path="/now/news/rank" /> - -## Radio France Internationale 法国国际广播电台 {#radio-france-internationale-fa-guo-guo-ji-guang-bo-dian-tai} - -### Generic News {#radio-france-internationale-fa-guo-guo-ji-guang-bo-dian-tai-generic-news} - -<Route author="nczitzk" example="/rfi" path="/rfi/:path*" paramsDesc={['URL path, can be obtained from the URL of the corresponding page, `en` by default']} radar="1"> - :::tip - - To subscribe to [English News](https://www.rfi.fr/en/), whose URL is `https://www.rfi.fr/en`, you can get the route as [`/rfi/en`](https://rsshub.app/rfi/en). - - To subscribe to [English Europe News](https://www.rfi.fr/en/europe/), whose URL is `https://www.rfi.fr/en/europe`, you can get the route as [`/rfi/en/europe`](https://rsshub.app/rfi/en/europe). - - To subscribe to topic [Paris Olympics 2024](https://www.rfi.fr/en/tag/paris-olympics-2024/), whose URL is `https://www.rfi.fr/en/tag/paris-olympics-2024`, you can get the route as [`/rfi/en/tag/paris-olympics-2024`](https://rsshub.app/rfi/en/tag/paris-olympics-2024). - ::: - - :::warning - This route does not support podcasts, please use the Offical RSS feed instead. - ::: -</Route> +| 事件追蹤 | 評論節目 | 新聞專題 | +| -------- | -------- | -------- | +| tracker | feature | opinion | ## Radio Free Asia (RFA) 自由亚洲电台 {#radio-free-asia-rfa-zi-you-ya-zhou-dian-tai} ### News {#radio-free-asia-rfa-zi-you-ya-zhou-dian-tai-news} -<Route author="zphw" example="/rfa/english" path="/rfa/:language?/:channel?/:subChannel?" paramsDesc={['language, English by default', 'channel', 'subchannel, where applicable']} /> +<Route namespace="rfa" data={{"path":"/:language?/:channel?/:subChannel?","categories":["traditional-media"],"example":"/rfa/english","parameters":{"language":"language, English by default","channel":"channel","subChannel":"subchannel, where applicable"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["zphw"],"description":"Delivers a better experience by supporting parameter specification.\n\nParameters can be obtained from the official website, for instance:\n\n`https://www.rfa.org/cantonese/news` corresponds to `/rfa/cantonese/news`\n\n`https://www.rfa.org/cantonese/news/htm` corresponds to `/rfa/cantonese/news/htm`","location":"index.ts"}} /> Delivers a better experience by supporting parameter specification. @@ -398,246 +220,176 @@ You can use `sophi=true` query parameter to invoke the **experimental** method, ### Category/Topic/Author {#reuters-lu-tou-she-category-topic-author} -<Route author="HenryQW proletarius101 LyleLee nczitzk" example="/reuters/world/us" path="/reuters/:category/:topic?" paramsDesc={['find it in the URL, or tables below', 'find it in the URL, or tables below']}> - - `:category`: +<Route namespace="reuters" data={{"path":"/:category/:topic?","categories":["traditional-media"],"example":"/reuters/world/us","parameters":{"category":"find it in the URL, or tables below","topic":"find it in the URL, or tables below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["reuters.com/:category/:topic?","reuters.com/"]},"name":"Category/Topic/Author","maintainers":["LyleLee","HenryQW","proletarius101","black-desk","nczitzk"],"description":"- `:category`:\n\n | World | Business | Legal | Markets | Breakingviews | Technology | Graphics |\n | ----- | -------- | ----- | ------- | ------------- | ---------- | -------- |\n | world | business | legal | markets | breakingviews | technology | graphics |\n\n - `world/:topic`:\n\n | All | Africa | Americas | Asia Pacific | China | Europe | India | Middle East | United Kingdom | United States | The Great Reboot | Reuters Next |\n | --- | ------ | -------- | ------------ | ----- | ------ | ----- | ----------- | -------------- | ------------- | ---------------- | ------------ |\n | | africa | americas | asia-pacific | china | europe | india | middle-east | uk | us | the-great-reboot | reuters-next |\n\n - `business/:topic`:\n\n | All | Aerospace & Defense | Autos & Transportation | Energy | Environment | Finance | Healthcare & Pharmaceuticals | Media & Telecom | Retail & Consumer | Sustainable Business | Charged | Future of Health | Future of Money | Take Five | Reuters Impact |\n | --- | ------------------- | ---------------------- | ------ | ----------- | ------- | ---------------------------- | --------------- | ----------------- | -------------------- | ------- | ---------------- | --------------- | --------- | -------------- |\n | | aerospace-defense | autos-transportation | energy | environment | finance | healthcare-pharmaceuticals | media-telecom | retail-consumer | sustainable-business | charged | future-of-health | future-of-money | take-five | reuters-impact |\n\n - `legal/:topic`:\n\n | All | Government | Legal Industry | Litigation | Transactional |\n | --- | ---------- | -------------- | ---------- | ------------- |\n | | government | legalindustry | litigation | transactional |\n\n - `authors/:topic`:\n\n | Default | Jonathan Landay | any other authors |\n | ------- | --------------- | ----------------- |\n | reuters | jonathan-landay | their name in URL |\n\n More could be found in the URL of the category/topic page.","location":"common.ts"}} /> - | World | Business | Legal | Markets | Breakingviews | Technology | Graphics | - | ----- | -------- | ----- | ------- | ------------- | ---------- | -------- | - | world | business | legal | markets | breakingviews | technology | graphics | +- `:category`: - - `world/:topic`: + | World | Business | Legal | Markets | Breakingviews | Technology | Graphics | + | ----- | -------- | ----- | ------- | ------------- | ---------- | -------- | + | world | business | legal | markets | breakingviews | technology | graphics | - | All | Africa | Americas | Asia Pacific | China | Europe | India | Middle East | United Kingdom | United States | The Great Reboot | Reuters Next | - | --- | ------ | -------- | ------------ | ----- | ------ | ----- | ----------- | -------------- | ------------- | ---------------- | ------------ | - | | africa | americas | asia-pacific | china | europe | india | middle-east | uk | us | the-great-reboot | reuters-next | +- `world/:topic`: - - `business/:topic`: + | All | Africa | Americas | Asia Pacific | China | Europe | India | Middle East | United Kingdom | United States | The Great Reboot | Reuters Next | + | --- | ------ | -------- | ------------ | ----- | ------ | ----- | ----------- | -------------- | ------------- | ---------------- | ------------ | + | | africa | americas | asia-pacific | china | europe | india | middle-east | uk | us | the-great-reboot | reuters-next | - | All | Aerospace & Defense | Autos & Transportation | Energy | Environment | Finance | Healthcare & Pharmaceuticals | Media & Telecom | Retail & Consumer | Sustainable Business | Charged | Future of Health | Future of Money | Take Five | Reuters Impact | - | --- | ------------------- | ---------------------- | ------ | ----------- | ------- | ---------------------------- | --------------- | ----------------- | -------------------- | ------- | ---------------- | --------------- | --------- | -------------- | - | | aerospace-defense | autos-transportation | energy | environment | finance | healthcare-pharmaceuticals | media-telecom | retail-consumer | sustainable-business | charged | future-of-health | future-of-money | take-five | reuters-impact | +- `business/:topic`: - - `legal/:topic`: + | All | Aerospace & Defense | Autos & Transportation | Energy | Environment | Finance | Healthcare & Pharmaceuticals | Media & Telecom | Retail & Consumer | Sustainable Business | Charged | Future of Health | Future of Money | Take Five | Reuters Impact | + | --- | ------------------- | ---------------------- | ------ | ----------- | ------- | ---------------------------- | --------------- | ----------------- | -------------------- | ------- | ---------------- | --------------- | --------- | -------------- | + | | aerospace-defense | autos-transportation | energy | environment | finance | healthcare-pharmaceuticals | media-telecom | retail-consumer | sustainable-business | charged | future-of-health | future-of-money | take-five | reuters-impact | - | All | Government | Legal Industry | Litigation | Transactional | - | --- | ---------- | -------------- | ---------- | ------------- | - | | government | legalindustry | litigation | transactional | +- `legal/:topic`: - - `authors/:topic`: + | All | Government | Legal Industry | Litigation | Transactional | + | --- | ---------- | -------------- | ---------- | ------------- | + | | government | legalindustry | litigation | transactional | - | Default | Jonathan Landay | any other authors | - | ------- | --------------- | ----------------- | - | reuters | jonathan-landay | their name in URL | +- `authors/:topic`: - More could be found in the URL of the category/topic page. -</Route> + | Default | Jonathan Landay | any other authors | + | ------- | --------------- | ----------------- | + | reuters | jonathan-landay | their name in URL | + +More could be found in the URL of the category/topic page. ### Inverstigates {#reuters-lu-tou-she-inverstigates} -<Route author="LyleLee" example="/reuters/investigates" path="/reuters/investigates" /> +<Route namespace="reuters" data={{"path":"/investigates","categories":["traditional-media"],"example":"/reuters/investigates","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Inverstigates","maintainers":["LyleLee"],"location":"investigates.ts"}} /> ## Rodong Sinmun 劳动新闻 {#rodong-sinmun-lao-dong-xin-wen} ### News {#rodong-sinmun-lao-dong-xin-wen-news} -<Route author="TonyRL" example="/rodong/news" path="/rodong/news/:language?" paramsDesc={['Language, see below, `ko` by default']} radar="1"> - | 조선어 | English | 中文 | - | ------ | ------- | ---- | - | ko | en | cn | -</Route> +<Route namespace="rodong" data={{"path":"/news/:language?","categories":["traditional-media"],"example":"/rodong/news","parameters":{"language":"Language, see below, `ko` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rodong.rep.kp/cn/index.php","rodong.rep.kp/en/index.php","rodong.rep.kp/ko/index.php","rodong.rep.kp/cn","rodong.rep.kp/en","rodong.rep.kp/ko"],"target":"/news"},"name":"News","maintainers":["TonyRL"],"url":"rodong.rep.kp/cn/index.php","description":"| 조선어 | English | 中文 |\n | ------ | ------- | ---- |\n | ko | en | cn |","location":"news.ts"}} /> -## RTHK 香港電台 {#rthk-xiang-gang-dian-tai} - -### News {#rthk-xiang-gang-dian-tai-news} - -RTHK offical provides full text RSS, check the offical website for detail information: [https://news.rthk.hk/rthk/en/rss.htm](https://news.rthk.hk/rthk/en/rss.htm) - -This route adds the missing photo and Link element. (Offical RSS doesn't have Link element may cause issue on some RSS client) - -<Route author="KeiLongW" example="/rthk-news/hk/international" path="/rthk-news/:lang/:category" paramsDesc={['Language,Traditional Chinese`hk`,English`en`','Category']}> - | local | greaterchina | international | finance | sport | - | ---------- | ------------------ | ------------- | ------------ | ---------- | - | Local News | Greater China News | World News | Finance News | Sport News | -</Route> - -### 傳媒透視 {#rthk-xiang-gang-dian-tai-chuan-mei-tou-shi} - -<Route author="tpnonthealps" example="/mediadigest/latest" path="/mediadigest/:range" paramsDesc={['时间范围']}> - 细则: - - - `:range` 时间范围参数 - (可为 `latest` 或 `四位数字的年份`) - - - `latest`: 最新的 50 篇文章 - - - `2020`: 2020 年的所有文章 - - - 全文输出转换为简体字: `?opencc=t2s` - (`opencc` 是 RSSHub 的通用参数,详情请参阅 [「中文简繁体转换」](/parameter#中文简繁体转换)) -</Route> +| 조선어 | English | 中文 | +| ------ | ------- | ---- | +| ko | en | cn | ## Russian News Agency TASS {#russian-news-agency-tass} ### News {#russian-news-agency-tass-news} -<Route author="TonyRL" example="/tass/politics" path="/tass/:category?" paramsDesc={['Category, can be found in URL, `politics` by default']} radar="1"> - | Russian Politics & Diplomacy | World | Business & Economy | Military & Defense | Science & Space | Emergencies | Society & Culture | Press Review | Sports | - | ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ | - | politics | world | economy | defense | science | emergencies | society | pressreview | sports | -</Route> +<Route namespace="tass" data={{"path":"/:category?","categories":["traditional-media"],"example":"/tass/politics","parameters":{"category":"Category, can be found in URL, `politics` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tass.com/:category"],"target":"/:category"},"name":"News","maintainers":["TonyRL"],"description":"| Russian Politics & Diplomacy | World | Business & Economy | Military & Defense | Science & Space | Emergencies | Society & Culture | Press Review | Sports |\n | ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ |\n | politics | world | economy | defense | science | emergencies | society | pressreview | sports |","location":"news.ts"}} /> + +| Russian Politics & Diplomacy | World | Business & Economy | Military & Defense | Science & Space | Emergencies | Society & Culture | Press Review | Sports | +| ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ | +| politics | world | economy | defense | science | emergencies | society | pressreview | sports | ## Solidot {#solidot} ### 最新消息 {#solidot-zui-xin-xiao-xi} -<Route author="sgqy" example="/solidot/linux" path="/solidot/:type?" paramsDesc={['消息类型。默认为 www. 在网站上方选择后复制子域名即可']}> - :::tip - Solidot 提供的 feed: +<Route namespace="solidot" data={{"path":"/:type?","categories":["traditional-media"],"example":"/solidot/linux","parameters":{"type":"消息类型。默认为 www. 在网站上方选择后复制子域名即可"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新消息","maintainers":["sgqy","hang333","TonyRL"],"description":":::tip\n Solidot 提供的 feed:\n\n - [https://www.solidot.org/index.rss](https://www.solidot.org/index.rss)\n :::\n\n | 全部 | 创业 | Linux | 科学 | 科技 | 移动 | 苹果 | 硬件 | 软件 | 安全 | 游戏 | 书籍 | ask | idle | 博客 | 云计算 | 奇客故事 |\n | ---- | ------- | ----- | ------- | ---------- | ------ | ----- | -------- | -------- | -------- | ----- | ----- | --- | ---- | ---- | ------ | -------- |\n | www | startup | linux | science | technology | mobile | apple | hardware | software | security | games | books | ask | idle | blog | cloud | story |","location":"main.ts"}} /> - - [https://www.solidot.org/index.rss](https://www.solidot.org/index.rss) - ::: +:::tip +Solidot 提供的 feed: - | 全部 | 创业 | Linux | 科学 | 科技 | 移动 | 苹果 | 硬件 | 软件 | 安全 | 游戏 | 书籍 | ask | idle | 博客 | 云计算 | 奇客故事 | - | ---- | ------- | ----- | ------- | ---------- | ------ | ----- | -------- | -------- | -------- | ----- | ----- | --- | ---- | ---- | ------ | -------- | - | www | startup | linux | science | technology | mobile | apple | hardware | software | security | games | books | ask | idle | blog | cloud | story | -</Route> +- [https://www.solidot.org/index.rss](https://www.solidot.org/index.rss) +::: -## South China Morning Post 南华早报 {#south-china-morning-post-nan-hua-zao-bao} - -### News {#south-china-morning-post-nan-hua-zao-bao-news} - -<Route author="proletarius101" example="/scmp/3" path="/scmp/:category_id" paramsDesc={['Category']}> - See the [official RSS page](https://www.scmp.com/rss) to get the ID of each category. This route provides fulltext that the offical feed doesn't. -</Route> - -### Topics {#south-china-morning-post-nan-hua-zao-bao-topics} - -<Route author="TonyRL" example="/scmp/topics/coronavirus-pandemic-all-stories" path="/scmp/topics/:topic" paramsDesc={['Topic, can be found in URL']} radar="1" /> +| 全部 | 创业 | Linux | 科学 | 科技 | 移动 | 苹果 | 硬件 | 软件 | 安全 | 游戏 | 书籍 | ask | idle | 博客 | 云计算 | 奇客故事 | +| ---- | ------- | ----- | ------- | ---------- | ------ | ----- | -------- | -------- | -------- | ----- | ----- | --- | ---- | ---- | ------ | -------- | +| www | startup | linux | science | technology | mobile | apple | hardware | software | security | games | books | ask | idle | blog | cloud | story | ## Sputnik News 俄罗斯卫星通讯社 {#sputnik-news-e-luo-si-wei-xing-tong-xun-she} ### Category {#sputnik-news-e-luo-si-wei-xing-tong-xun-she-category} -<Route author="nczitzk" example="/sputniknews" path="/sputniknews/:category?/:language?" paramsDesc={['Category, can be found in URL, `news` by default', 'Language, see below, English by default']}> - Categories for International site: +<Route namespace="sputniknews" data={{"path":"/:category?/:language?","categories":["traditional-media"],"example":"/sputniknews","parameters":{"category":"Category, can be found in URL, `news` by default","language":"Language, see below, English by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Category","maintainers":["nczitzk"],"description":"Categories for International site:\n\n | WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION |\n | ----- | -------- | -------- | ----- | ---- | ------- |\n | world | covid-19 | business | sport | tech | opinion |\n\n Categories for Chinese site:\n\n | 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 |\n | ---- | ----- | ------ | --------------- | ------------------------ | ------- |\n | news | china | russia | category_guoji | russia_china_relations | opinion |\n\n Language\n\n | Language | Id |\n | ----------- | ----------- |\n | English | english |\n | Spanish | spanish |\n | German | german |\n | French | french |\n | Greek | greek |\n | Italian | italian |\n | Czech | czech |\n | Polish | polish |\n | Serbian | serbian |\n | Latvian | latvian |\n | Lithuanian | lithuanian |\n | Moldavian | moldavian |\n | Belarusian | belarusian |\n | Armenian | armenian |\n | Abkhaz | abkhaz |\n | Ssetian | ssetian |\n | Georgian | georgian |\n | Azerbaijani | azerbaijani |\n | Arabic | arabic |\n | Turkish | turkish |\n | Persian | persian |\n | Dari | dari |\n | Kazakh | kazakh |\n | Kyrgyz | kyrgyz |\n | Uzbek | uzbek |\n | Tajik | tajik |\n | Vietnamese | vietnamese |\n | Japanese | japanese |\n | Chinese | chinese |\n | Portuguese | portuguese |","location":"index.ts"}} /> - | WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION | - | ----- | -------- | -------- | ----- | ---- | ------- | - | world | covid-19 | business | sport | tech | opinion | +Categories for International site: - Categories for Chinese site: +| WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION | +| ----- | -------- | -------- | ----- | ---- | ------- | +| world | covid-19 | business | sport | tech | opinion | - | 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 | - | ---- | ----- | ------ | --------------- | ------------------------ | ------- | - | news | china | russia | category\_guoji | russia\_china\_relations | opinion | +Categories for Chinese site: - Language +| 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 | +| ---- | ----- | ------ | --------------- | ------------------------ | ------- | +| news | china | russia | category\_guoji | russia\_china\_relations | opinion | - | Language | Id | - | ----------- | ----------- | - | English | english | - | Spanish | spanish | - | German | german | - | French | french | - | Greek | greek | - | Italian | italian | - | Czech | czech | - | Polish | polish | - | Serbian | serbian | - | Latvian | latvian | - | Lithuanian | lithuanian | - | Moldavian | moldavian | - | Belarusian | belarusian | - | Armenian | armenian | - | Abkhaz | abkhaz | - | Ssetian | ssetian | - | Georgian | georgian | - | Azerbaijani | azerbaijani | - | Arabic | arabic | - | Turkish | turkish | - | Persian | persian | - | Dari | dari | - | Kazakh | kazakh | - | Kyrgyz | kyrgyz | - | Uzbek | uzbek | - | Tajik | tajik | - | Vietnamese | vietnamese | - | Japanese | japanese | - | Chinese | chinese | - | Portuguese | portuguese | -</Route> +Language + +| Language | Id | +| ----------- | ----------- | +| English | english | +| Spanish | spanish | +| German | german | +| French | french | +| Greek | greek | +| Italian | italian | +| Czech | czech | +| Polish | polish | +| Serbian | serbian | +| Latvian | latvian | +| Lithuanian | lithuanian | +| Moldavian | moldavian | +| Belarusian | belarusian | +| Armenian | armenian | +| Abkhaz | abkhaz | +| Ssetian | ssetian | +| Georgian | georgian | +| Azerbaijani | azerbaijani | +| Arabic | arabic | +| Turkish | turkish | +| Persian | persian | +| Dari | dari | +| Kazakh | kazakh | +| Kyrgyz | kyrgyz | +| Uzbek | uzbek | +| Tajik | tajik | +| Vietnamese | vietnamese | +| Japanese | japanese | +| Chinese | chinese | +| Portuguese | portuguese | ## Taiwan News 台灣英文新聞 {#taiwan-news-tai-wan-ying-wen-xin-wen} ### Hot News {#taiwan-news-tai-wan-ying-wen-xin-wen-hot-news} -<Route author="TonyRL" example="/taiwannews/hot" path="/taiwannews/hot/:lang?" paramsDesc={['Language, `en` or `zh`, `en` by default']} radar="1" /> +<Route namespace="taiwannews" data={{"path":"/hot/:lang?","categories":["traditional-media"],"example":"/taiwannews/hot","parameters":{"lang":"Language, `en` or `zh`, `en` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["taiwannews.com.tw/:lang/index"],"target":"/hot/:lang"},"name":"Hot News","maintainers":["TonyRL"],"location":"hot.ts"}} /> ## The Atlantic {#the-atlantic} ### News {#the-atlantic-news} -<Route author="EthanWng97" example="/theatlantic/latest" path="/theatlantic/:category" paramsDesc={['category, see below']}> - | Popular | Latest | Politics | Technology | Business | - | ------------ | ------ | -------- | ---------- | -------- | - | most-popular | latest | politics | technology | business | +<Route namespace="theatlantic" data={{"path":"/:category","categories":["traditional-media"],"example":"/theatlantic/latest","parameters":{"category":"category, see below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.theatlantic.com/:category"]},"name":"News","maintainers":["EthanWng97"],"description":"| Popular | Latest | Politics | Technology | Business |\n | ------------ | ------ | -------- | ---------- | -------- |\n | most-popular | latest | politics | technology | business |\n\n More categories (except photo) can be found within the navigation bar at [https://www.theatlantic.com](https://www.theatlantic.com)","location":"news.ts"}} /> - More categories (except photo) can be found within the navigation bar at [https://www.theatlantic.com](https://www.theatlantic.com) -</Route> +| Popular | Latest | Politics | Technology | Business | +| ------------ | ------ | -------- | ---------- | -------- | +| most-popular | latest | politics | technology | business | + +More categories (except photo) can be found within the navigation bar at [https://www.theatlantic.com](https://www.theatlantic.com) ## The Economist {#the-economist} ### Category {#the-economist-category} -<Route author="ImSingee" example="/economist/latest" path="/economist/:endpoint" paramsDesc={['Category name, can be found on the [official page](https://www.economist.com/rss). For example, https://www.economist.com/china/rss.xml to china']} radar="1" /> +<Route namespace="economist" data={{"path":"/:endpoint","categories":["traditional-media"],"example":"/economist/latest","parameters":{"endpoint":"Category name, can be found on the [official page](https://www.economist.com/rss). For example, https://www.economist.com/china/rss.xml to china"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["economist.com/:endpoint"]},"name":"Category","maintainers":["ImSingee"],"location":"full.ts"}} /> ### Espresso {#the-economist-espresso} -<Route author="TonyRL" example="/economist/espresso" path="/economist/espresso" radar="1" /> +<Route namespace="economist" data={{"path":"/espresso","categories":["traditional-media"],"example":"/economist/espresso","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["economist.com/the-world-in-brief","economist.com/espresso"]},"name":"Espresso","maintainers":["TonyRL"],"url":"economist.com/the-world-in-brief","location":"espresso.ts"}} /> ### Global Business Review {#the-economist-global-business-review} -<Route author="prnake" example="/economist/global-business-review/cn-en" path="/economist/global-business-review/:language?" paramsDesc={['Language, `en`, `cn`, `tw` are supported, support multiple options, default to cn-en']} radar="1" /> - -## The Guardian 卫报 {#the-guardian-wei-bao} - -### Editorial {#the-guardian-wei-bao-editorial} - -<Route author="HenryQW" example="/guardian/editorial" path="/guardian/editorial"> - Provides a better reading experience (full text articles) over the official one. -</Route> - -### China {#the-guardian-wei-bao-china} - -<Route author="Polynomia" example="/guardian/china" path="/guardian/china" /> +<Route namespace="economist" data={{"path":"/global-business-review/:language?","categories":["traditional-media"],"example":"/economist/global-business-review/cn-en","parameters":{"language":"Language, `en`, `cn`, `tw` are supported, support multiple options, default to cn-en"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["businessreview.global/"],"target":"/global-business-review"},"name":"Global Business Review","maintainers":["prnake"],"url":"businessreview.global/","location":"global-business-review.ts"}} /> ## The Hindu {#the-hindu} ### Topic {#the-hindu-topic} -<Route author="TonyRL" example="/thehindu/topic/rains" path="/thehindu/topic/:topic" paramsDesc={['Topic slug, can be found in URL.']} radar="1" /> +<Route namespace="thehindu" data={{"path":"/topic/:topic","categories":["traditional-media"],"example":"/thehindu/topic/rains","parameters":{"topic":"Topic slug, can be found in URL."},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["thehindu.com/topic/:topic"]},"name":"Topic","maintainers":["TonyRL"],"location":"topic.ts"}} /> ## The New York Times 纽约时报 {#the-new-york-times-niu-yue-shi-bao} -### News {#the-new-york-times-niu-yue-shi-bao-news} - -<Route author="HenryQW" example="/nytimes/dual" path="/nytimes/:lang?" paramsDesc={['language, default to Chinese']}> - By extracting the full text of articles, we provide a better reading experience (full text articles) over the official one. - - | Default to Chinese | Chinese-English | English | Chinese-English (Traditional Chinese) | Traditional Chinese | - | ------------------ | --------------- | ------- | ------------------------------------- | ------------------- | - | (empty) | dual | en | dual-traditionalchinese | traditionalchinese | -</Route> - -### 新闻简报 {#the-new-york-times-niu-yue-shi-bao-xin-wen-jian-bao} - -<Route author="yueyericardo nczitzk" example="/nytimes/daily_briefing_chinese" path="/nytimes/daily_briefing_chinese"> - 网站地址:[https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese) -</Route> - ### Best Seller Books {#the-new-york-times-niu-yue-shi-bao-best-seller-books} -<Route author="melvinto" example="/nytimes/book/combined-print-and-e-book-nonfiction" path="/nytimes/book/:category?" /> +<Route namespace="nytimes" data={{"path":"/book/:category?","categories":["traditional-media"],"example":"/nytimes/book/combined-print-and-e-book-nonfiction","parameters":{"category":"N"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nytimes.com/"],"target":""},"name":"Best Seller Books","maintainers":["melvinto"],"url":"nytimes.com/","description":"| Category |\n| ------------------------------------ |\n| combined-print-and-e-book-nonfiction |\n| hardcover-nonfiction |\n| paperback-nonfiction |\n| advice-how-to-and-miscellaneous |\n| combined-print-and-e-book-fiction |\n| hardcover-fiction |\n| trade-fiction-paperback |\n| childrens-middle-grade-hardcover |\n| picture-books |\n| series-books |\n| young-adult-hardcover |","location":"book.ts"}} /> | Category | | ------------------------------------ | @@ -653,859 +405,522 @@ This route adds the missing photo and Link element. (Offical RSS doesn't have Li | series-books | | young-adult-hardcover | +### News {#the-new-york-times-niu-yue-shi-bao-news} + +<Route namespace="nytimes" data={{"path":"/:lang?","categories":["traditional-media"],"example":"/nytimes/dual","parameters":{"lang":"language, default to Chinese"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nytimes.com/"],"target":""},"name":"News","maintainers":["HenryQW"],"url":"nytimes.com/","description":"By extracting the full text of articles, we provide a better reading experience (full text articles) over the official one.\n\n | Default to Chinese | Chinese-English | English | Chinese-English (Traditional Chinese) | Traditional Chinese |\n | ------------------ | --------------- | ------- | ------------------------------------- | ------------------- |\n | (empty) | dual | en | dual-traditionalchinese | traditionalchinese |","location":"index.ts"}} /> + +By extracting the full text of articles, we provide a better reading experience (full text articles) over the official one. + +| Default to Chinese | Chinese-English | English | Chinese-English (Traditional Chinese) | Traditional Chinese | +| ------------------ | --------------- | ------- | ------------------------------------- | ------------------- | +| (empty) | dual | en | dual-traditionalchinese | traditionalchinese | + +### 新闻简报 {#the-new-york-times-niu-yue-shi-bao-xin-wen-jian-bao} + +<Route namespace="nytimes" data={{"path":"/daily_briefing_chinese","categories":["traditional-media"],"example":"/nytimes/daily_briefing_chinese","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nytimes.com/"],"target":""},"name":"新闻简报","maintainers":["yueyericardo","nczitzk"],"url":"nytimes.com/","description":"网站地址:[https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese)","location":"daily-briefing-chinese.ts"}} /> + +网站地址:[https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese) + ## The Nikkei 日本経済新聞 {#the-nikkei-ri-ben-jing-ji-xin-wen} -### Home {#the-nikkei-ri-ben-jing-ji-xin-wen-home} - -<Route author="zjysdhr" example="/nikkei/index" path="/nikkei/index" radar="1" /> - ### News {#the-nikkei-ri-ben-jing-ji-xin-wen-news} -<Route author="Arracc" example="/nikkei/news" path="/nikkei/:category/:article_type?" paramsDesc={['Category, see table below','Only includes free articles, set `free` to enable, disabled by default']}> - | 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル | - | ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- | - | news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle | -</Route> +<Route namespace="nikkei" data={{"path":"/:category/:article_type?","categories":["traditional-media"],"example":"/nikkei/news","parameters":{"category":"Category, see table below","article_type":"Only includes free articles, set `free` to enable, disabled by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.nikkei.com/:category/archive","www.nikkei.com/:category"],"target":"/:category"},"name":"News","maintainers":["Arracc"],"description":"| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル |\n | ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- |\n | news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |","location":"news.ts"}} /> -### 中文版新闻 {#the-nikkei-ri-ben-jing-ji-xin-wen-zhong-wen-ban-xin-wen} - -<Route author="nczitzk" example="/nikkei/cn" path="/nikkei/cn/:language?/:path?" paramsDesc={['语言,可选 `zh` 即 繁体中文,`cn` 即 简体中文', '类目路径,默认为空,可在对应类目页 URL 中找到']} radar="1"> - :::tip - 如 [中国 经济 日经中文网](https://cn.nikkei.com/china/ceconomy.html) 的 URL 为 `https://cn.nikkei.com/china/ceconomy.html` 对应路由为 [`/nikkei/cn/cn/china/ceconomy`](https://rsshub.app/nikkei/cn/cn/china/ceconomy) - - 如 [中國 經濟 日經中文網](https://zh.cn.nikkei.com/china/ceconomy.html) 的 URL 为 `https://zh.cn.nikkei.com/china/ceconomy.html` 对应路由为 [`/nikkei/cn/zh/china/ceconomy`](https://rsshub.app/nikkei/cn/zh/china/ceconomy) - - 特别地,当 `path` 填入 `rss` 后(如路由为 [`/nikkei/cn/cn/rss`](https://rsshub.app/nikkei/cn/cn/rss)),此时返回的是 [官方 RSS 的内容](https://cn.nikkei.com/rss.html) - ::: -</Route> +| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル | +| ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- | +| news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle | ### Nikkei Asia Latest News {#the-nikkei-ri-ben-jing-ji-xin-wen-nikkei-asia-latest-news} -<Route author="rainrdx" example="/nikkei/asia" path="/nikkei/asia" radar="1" /> +<Route namespace="nikkei" data={{"path":"/asia","categories":["traditional-media"],"example":"/nikkei/asia","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["asia.nikkei.com/"]},"name":"Nikkei Asia Latest News","maintainers":["rainrdx"],"url":"asia.nikkei.com/","location":"asia/index.ts"}} /> ## The Wall Street Journal (WSJ) 华尔街日报 {#the-wall-street-journal-wsj-hua-er-jie-ri-bao} ### News {#the-wall-street-journal-wsj-hua-er-jie-ri-bao-news} -<Route author="oppilate EthanWng97" example="/wsj/en-us/opinion" path="/wsj/:lang/:category?" paramsDesc={['Language, `en-us`, `zh-cn`, `zh-tw`', 'Category. See below']}> - en\_us +<Route namespace="wsj" data={{"path":"/:lang/:category?","categories":["traditional-media"],"example":"/wsj/en-us/opinion","parameters":{"lang":"Language, `en-us`, `zh-cn`, `zh-tw`","category":"Category. See below"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["oppilate"],"description":"en_us\n\n | World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports |\n | ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ |\n | world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports |\n\n zh-cn / zh-tw\n\n | 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 |\n | ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- |\n | world | china | markets | economy | business | technology | life-arts | opinion |\n\n Provide full article RSS for WSJ topics.","location":"news.ts"}} /> - | World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports | - | ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ | - | world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports | +en\_us - zh-cn / zh-tw +| World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports | +| ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ | +| world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports | - | 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 | - | ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- | - | world | china | markets | economy | business | technology | life-arts | opinion | +zh-cn / zh-tw - Provide full article RSS for WSJ topics. -</Route> +| 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 | +| ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- | +| world | china | markets | economy | business | technology | life-arts | opinion | -## Voice of America (VOA) {#voice-of-america-voa} - -透過提取全文,以獲得更好的閱讀體驗 - -<Route author="zphw" example="/voa/cantonese/zprtie-ttp" path="/voa/:language/:channel?" paramsDesc={['語言','頻道,可於官網獲取']}> - `语言` - - | 粵語 | 中文 | 藏語 | - | --------- | ------- | ------- | - | cantonese | chinese | tibetan | - - `频道` - - 可於各語言官網聚合新聞處 (如 [https://www.voacantonese.com/rssfeeds](https://www.voacantonese.com/rssfeeds)) 獲取 - - 例如 `https://www.voacantonese.com/api/zyrtyequty` 將對應 `/voa/cantonese/zyrtyequty` -</Route> +Provide full article RSS for WSJ topics. ## Voice of Mongolia 蒙古之声 {#voice-of-mongolia-meng-gu-zhi-sheng} ### News {#voice-of-mongolia-meng-gu-zhi-sheng-news} -<Route author="zphw" example="/vom/featured" path="/vom/featured/:lang?" paramsDesc={['Language, see the table below, `mn` by default']}> - | English | 日本語 | Монгол | Русский | 简体中文 | - | ------- | ------ | ------ | ------- | -------- | - | en | ja | mn | ru | zh | -</Route> +<Route namespace="vom" data={{"path":"/featured/:lang?","categories":["traditional-media"],"example":"/vom/featured","parameters":{"lang":"Language, see the table below, `mn` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["vom.mn/:lang","vom.mn/"],"target":"/featured/:lang"},"name":"News","maintainers":["TonyRL"],"description":"| English | 日本語 | Монгол | Русский | 简体中文 |\n | ------- | ------ | ------ | ------- | -------- |\n | en | ja | mn | ru | zh |","location":"featured.ts"}} /> + +| English | 日本語 | Монгол | Русский | 简体中文 | +| ------- | ------ | ------ | ------- | -------- | +| en | ja | mn | ru | zh | ## Yomiuri Shimbun 読売新聞 {#yomiuri-shimbun-du-mai-xin-wen} ### News {#yomiuri-shimbun-du-mai-xin-wen-news} -<Route author="Arracc" example="/yomiuri/news" path="/yomiuri/:category?" paramsDesc={['Category, `news` by default']}> - Free articles only. +<Route namespace="yomiuri" data={{"path":"/:category?","categories":["traditional-media"],"example":"/yomiuri/news","parameters":{"category":"Category, `news` by default"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.yomiuri.co.jp/:category?"]},"name":"News","maintainers":["Arracc"],"description":"Free articles only.\n\n | Category | Parameter |\n | -------------- | --------- |\n | 新着・速報 | news |\n | 社会 | national |\n | 政治 | politics |\n | 経済 | economy |\n | スポーツ | sports |\n | 国際 | world |\n | 地域 | local |\n | 科学・IT | science |\n | エンタメ・文化 | culture |\n | ライフ | life |\n | 医療・健康 | medical |\n | 教育・就活 | kyoiku |\n | 選挙・世論調査 | election |\n | 囲碁・将棋 | igoshougi |\n | 社説 | editorial |\n | 皇室 | koushitsu |","location":"news.ts"}} /> - | Category | Parameter | - | -------------- | --------- | - | 新着・速報 | news | - | 社会 | national | - | 政治 | politics | - | 経済 | economy | - | スポーツ | sports | - | 国際 | world | - | 地域 | local | - | 科学・IT | science | - | エンタメ・文化 | culture | - | ライフ | life | - | 医療・健康 | medical | - | 教育・就活 | kyoiku | - | 選挙・世論調査 | election | - | 囲碁・将棋 | igoshougi | - | 社説 | editorial | - | 皇室 | koushitsu | -</Route> +Free articles only. -## 半月谈 {#ban-yue-tan} - -### 板块 {#ban-yue-tan-ban-kuai} - -<Route author="LogicJake" example="/banyuetan/jicengzhili" path="/banyuetan/:name" paramsDesc={['板块名称,可在 URL 中找到']} /> +| Category | Parameter | +| -------------- | --------- | +| 新着・速報 | news | +| 社会 | national | +| 政治 | politics | +| 経済 | economy | +| スポーツ | sports | +| 国際 | world | +| 地域 | local | +| 科学・IT | science | +| エンタメ・文化 | culture | +| ライフ | life | +| 医療・健康 | medical | +| 教育・就活 | kyoiku | +| 選挙・世論調査 | election | +| 囲碁・将棋 | igoshougi | +| 社説 | editorial | +| 皇室 | koushitsu | ## 北极星电力网 {#bei-ji-xing-dian-li-wang} -### 环保要闻 {#bei-ji-xing-dian-li-wang-huan-bao-yao-wen} - -<Route author="zsimple" example="/bjx/huanbao" path="/bjx/huanbao" radar="1" /> - ### 光伏 {#bei-ji-xing-dian-li-wang-guang-fu} -<Route author="Sxuet" example="/bjx/gf/sc" path="/bjx/gf/:type" paramsDesc={['分类,北极星光伏最后的`type`字段']} radar="1"> - `:type` 类型可选如下 +<Route namespace="bjx" data={{"path":"/gf/:type","categories":["traditional-media"],"example":"/bjx/gf/sc","parameters":{"type":"分类,北极星光伏最后的`type`字段"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"光伏","maintainers":["Sxuet"],"description":"`:type` 类型可选如下\n\n | 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 |\n | ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- |\n | yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js |","location":"types.ts"}} /> - | 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 | - | ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- | - | yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js | -</Route> +`:type` 类型可选如下 -## 财新网 {#cai-xin-wang} +| 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 | +| ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- | +| yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js | + +### 环保要闻 {#bei-ji-xing-dian-li-wang-huan-bao-yao-wen} + +<Route namespace="bjx" data={{"path":"/huanbao","categories":["traditional-media"],"example":"/bjx/huanbao","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["huanbao.bjx.com.cn/yw","huanbao.bjx.com.cn/"]},"name":"环保要闻","maintainers":["zsimple"],"url":"huanbao.bjx.com.cn/yw","location":"huanbao.ts"}} /> + +## 财新博客 {#cai-xin-bo-ke} > 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。 -### 新闻分类 {#cai-xin-wang-xin-wen-fen-lei} +### 财新数据通 {#cai-xin-bo-ke-cai-xin-shu-ju-tong} -<Route author="idealclover" example="/caixin/finance/regulation" path="/caixin/:column/:category" paramsDesc={['栏目名', '栏目下的子分类名']} supportPodcast="1"> - Column 列表: +<Route namespace="caixin" data={{"path":"/database","categories":["traditional-media"],"example":"/caixin/database","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["k.caixin.com/web","k.caixin.com/"]},"name":"财新数据通","maintainers":["nczitzk"],"url":"k.caixin.com/web","location":"database.ts"}} /> - | 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 | - | ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ | - | economy | finance | china | science | international | opinion | culture | weekly | +### 财新一线 {#cai-xin-bo-ke-cai-xin-yi-xian} - 以金融板块为例的 category 列表:(其余 column 以类似方式寻找) +<Route namespace="caixin" data={{"path":"/k","categories":["traditional-media"],"example":"/caixin/k","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"财新一线","maintainers":["boypt"],"location":"k.ts"}} /> - | 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 | - | ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ | - | regulation | bank | stock | insurance\_trust | investment | innovation | market | +### 财新周刊 {#cai-xin-bo-ke-cai-xin-zhou-kan} - Category 列表: +<Route namespace="caixin" data={{"path":"/weekly","categories":["traditional-media"],"example":"/caixin/weekly","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["weekly.caixin.com/","weekly.caixin.com/*"]},"name":"财新周刊","maintainers":["TonyRL"],"url":"weekly.caixin.com/","location":"weekly.ts"}} /> - | 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 | - | ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ | - | coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column | -</Route> +### 首页新闻 {#cai-xin-bo-ke-shou-ye-xin-wen} -### 首页新闻 {#cai-xin-wang-shou-ye-xin-wen} +<Route namespace="caixin" data={{"path":"/article","categories":["traditional-media"],"example":"/caixin/article","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"radar":{"source":["caixin.com/"]},"name":"首页新闻","maintainers":["EsuRt"],"url":"caixin.com/","location":"article.ts"}} /> -<Route author="EsuRt" example="/caixin/article" path="/caixin/article" radar="1" supportPodcast="1" /> +### 新闻分类 {#cai-xin-bo-ke-xin-wen-fen-lei} -### 最新文章 {#cai-xin-wang-zui-xin-wen-zhang} +<Route namespace="caixin" data={{"path":"/:column/:category","categories":["traditional-media"],"example":"/caixin/finance/regulation","parameters":{"column":"栏目名","category":"栏目下的子分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":true,"supportScihub":false},"name":"新闻分类","maintainers":["idealclover"],"description":"Column 列表:\n\n | 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 |\n | ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ |\n | economy | finance | china | science | international | opinion | culture | weekly |\n\n 以金融板块为例的 category 列表:(其余 column 以类似方式寻找)\n\n | 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 |\n | ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ |\n | regulation | bank | stock | insurance_trust | investment | innovation | market |\n\n Category 列表:\n\n | 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 |\n | ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ |\n | coverstory | first | editorial | current_affairs | editor_desk | economy | finance | business | environment_technology | cwcivil | column |","location":"category.ts"}} /> -<Route author="tpnonthealps" example="/caixin/latest" path="/caixin/latest" radar="1"> - 说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。 -</Route> +Column 列表: -### 财新数据通 {#cai-xin-wang-cai-xin-shu-ju-tong} +| 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 | +| ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ | +| economy | finance | china | science | international | opinion | culture | weekly | -<Route author="nczitzk" example="/caixin/database" path="/caixin/database" radar="1" /> +以金融板块为例的 category 列表:(其余 column 以类似方式寻找) -### 财新一线 {#cai-xin-wang-cai-xin-yi-xian} +| 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 | +| ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ | +| regulation | bank | stock | insurance\_trust | investment | innovation | market | -<Route author="boypt" example="/caixin/k" path="/caixin/k" radar="1" supportPodcast="1" /> +Category 列表: -### 财新周刊 {#cai-xin-wang-cai-xin-zhou-kan} +| 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 | +| ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ | +| coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column | -<Route author="TonyRL" example="/caixin/weekly" path="/caixin/weekly" radar="1" /> +### 最新文章 {#cai-xin-bo-ke-zui-xin-wen-zhang} + +<Route namespace="caixin" data={{"path":"/latest","categories":["traditional-media"],"example":"/caixin/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["caixin.com/"]},"name":"最新文章","maintainers":["tpnonthealps"],"url":"caixin.com/","description":"说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。","location":"latest.ts"}} /> + +说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。 ## 参考消息 {#can-kao-xiao-xi} ### 栏目 {#can-kao-xiao-xi-lan-mu} -<Route author="yuxinliu-alex nczitzk" example="/cankaoxiaoxi/column/diyi" path="/cankaoxiaoxi/column/:id?" paramsDesc={['栏目 id,默认为 `diyi`,即第一关注']}> - | 栏目 | id | - | -------------- | -------- | - | 第一关注 | diyi | - | 中国 | zhongguo | - | 国际 | gj | - | 观点 | guandian | - | 锐参考 | ruick | - | 体育健康 | tiyujk | - | 科技应用 | kejiyy | - | 文化旅游 | wenhualy | - | 参考漫谈 | cankaomt | - | 研究动态 | yjdt | - | 海外智库 | hwzk | - | 业界信息・观点 | yjxx | - | 海外看中国城市 | hwkzgcs | - | 译名趣谈 | ymymqt | - | 译名发布 | ymymfb | - | 双语汇 | ymsyh | - | 参考视频 | video | - | 军事 | junshi | - | 参考人物 | cankaorw | -</Route> +<Route namespace="cankaoxiaoxi" data={{"path":["/column/:id?","/:id?"],"categories":["traditional-media"],"example":"/cankaoxiaoxi/column/diyi","parameters":{"id":"栏目 id,默认为 `diyi`,即第一关注"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["yuxinliu-alex","nczitzk"],"description":"| 栏目 | id |\n | -------------- | -------- |\n | 第一关注 | diyi |\n | 中国 | zhongguo |\n | 国际 | gj |\n | 观点 | guandian |\n | 锐参考 | ruick |\n | 体育健康 | tiyujk |\n | 科技应用 | kejiyy |\n | 文化旅游 | wenhualy |\n | 参考漫谈 | cankaomt |\n | 研究动态 | yjdt |\n | 海外智库 | hwzk |\n | 业界信息・观点 | yjxx |\n | 海外看中国城市 | hwkzgcs |\n | 译名趣谈 | ymymqt |\n | 译名发布 | ymymfb |\n | 双语汇 | ymsyh |\n | 参考视频 | video |\n | 军事 | junshi |\n | 参考人物 | cankaorw |","location":"index.ts"}} /> -## 朝日新聞デジタル {#chao-ri-xin-wen-%E3%83%87%E3%82%B8%E3%82%BF%E3%83%AB} +| 栏目 | id | +| -------------- | -------- | +| 第一关注 | diyi | +| 中国 | zhongguo | +| 国际 | gj | +| 观点 | guandian | +| 锐参考 | ruick | +| 体育健康 | tiyujk | +| 科技应用 | kejiyy | +| 文化旅游 | wenhualy | +| 参考漫谈 | cankaomt | +| 研究动态 | yjdt | +| 海外智库 | hwzk | +| 业界信息・观点 | yjxx | +| 海外看中国城市 | hwkzgcs | +| 译名趣谈 | ymymqt | +| 译名发布 | ymymfb | +| 双语汇 | ymsyh | +| 参考视频 | video | +| 军事 | junshi | +| 参考人物 | cankaorw | -### 新聞 {#chao-ri-xin-wen-%E3%83%87%E3%82%B8%E3%82%BF%E3%83%AB-xin-wen} +### 栏目 {#can-kao-xiao-xi-lan-mu} -<Route author="nczitzk" example="/asahi/area/hokkaido" path="/asahi/area/:id" paramsDesc={['地方 id,见下表']} notOperational="1"> - 北海道・東北 +<Route namespace="cankaoxiaoxi" data={{"path":["/column/:id?","/:id?"],"categories":["traditional-media"],"example":"/cankaoxiaoxi/column/diyi","parameters":{"id":"栏目 id,默认为 `diyi`,即第一关注"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["yuxinliu-alex","nczitzk"],"description":"| 栏目 | id |\n | -------------- | -------- |\n | 第一关注 | diyi |\n | 中国 | zhongguo |\n | 国际 | gj |\n | 观点 | guandian |\n | 锐参考 | ruick |\n | 体育健康 | tiyujk |\n | 科技应用 | kejiyy |\n | 文化旅游 | wenhualy |\n | 参考漫谈 | cankaomt |\n | 研究动态 | yjdt |\n | 海外智库 | hwzk |\n | 业界信息・观点 | yjxx |\n | 海外看中国城市 | hwkzgcs |\n | 译名趣谈 | ymymqt |\n | 译名发布 | ymymfb |\n | 双语汇 | ymsyh |\n | 参考视频 | video |\n | 军事 | junshi |\n | 参考人物 | cankaorw |","location":"index.ts"}} /> - | 北海道 | 青森 | 秋田 | 岩手 | 山形 | 宮城 | 福島 | - | -------- | ------ | ----- | ----- | -------- | ------ | --------- | - | hokkaido | aomori | akita | iwate | yamagata | miyagi | fukushima | - - 関東 - - | 群馬 | 茨城 | 栃木 | 埼玉 | 千葉 | 東京 | 神奈川 | - | ----- | ------- | ------- | ------- | ----- | ----- | -------- | - | gunma | ibaraki | tochigi | saitama | chiba | tokyo | kanagawa | - - 東海・甲信越 - - | 静岡 | 岐阜 | 愛知 | 三重 | 新潟 | 山梨 | 長野 | - | -------- | ---- | ----- | ---- | ------- | --------- | ------ | - | shizuoka | gifu | aichi | mie | niigata | yamanashi | nagano | - - 近畿・北陸 - - | 滋賀 | 京都 | 奈良 | 和歌山 | 大阪 | 兵庫 | 富山 | 石川 | 福井 | - | ----- | ----- | ---- | -------- | ----- | ----- | ------ | -------- | ----- | - | shiga | kyoto | nara | wakayama | osaka | hyogo | toyama | ishikawa | fukui | - - 中国・四国 - - | 鳥取 | 島根 | 岡山 | 広島 | 山口 | 香川 | 愛媛 | 徳島 | 高知 | - | ------- | ------- | ------- | --------- | --------- | ------ | ----- | --------- | ----- | - | tottori | shimane | okayama | hiroshima | yamaguchi | kagawa | ehime | tokushima | kochi | - - 九州・沖縄 - - | 福岡 | 大分 | 宮崎 | 鹿児島 | 佐賀 | 長崎 | 熊本 | 沖縄 | - | ------- | ---- | -------- | --------- | ---- | -------- | -------- | ------- | - | fukuoka | oita | miyazaki | kagoshima | saga | nagasaki | kumamoto | okinawa | -</Route> +| 栏目 | id | +| -------------- | -------- | +| 第一关注 | diyi | +| 中国 | zhongguo | +| 国际 | gj | +| 观点 | guandian | +| 锐参考 | ruick | +| 体育健康 | tiyujk | +| 科技应用 | kejiyy | +| 文化旅游 | wenhualy | +| 参考漫谈 | cankaomt | +| 研究动态 | yjdt | +| 海外智库 | hwzk | +| 业界信息・观点 | yjxx | +| 海外看中国城市 | hwkzgcs | +| 译名趣谈 | ymymqt | +| 译名发布 | ymymfb | +| 双语汇 | ymsyh | +| 参考视频 | video | +| 军事 | junshi | +| 参考人物 | cankaorw | ## 第一财经 {#di-yi-cai-jing} -### 最新 {#di-yi-cai-jing-zui-xin} +### DT 财经 {#di-yi-cai-jing-dt-cai-jing} -<Route author="nczitzk" example="/yicai/latest" path="/yicai/latest" /> +<Route namespace="yicai" data={{"path":"/dt/:column?/:category?","categories":["traditional-media"],"example":"/yicai/dt/article","parameters":{"column":"栏目,见下表,默认为文章","category":"分类,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"DT 财经","maintainers":["nczitzk"],"description":"#### [文章](https://dt.yicai.com/article)\n\n | 分类 | ID |\n | -------- | ---------- |\n | 全部 | article/0 |\n | 新流行 | article/31 |\n | 新趋势 | article/32 |\n | 商业黑马 | article/33 |\n | 新品 | article/34 |\n | 营销 | article/35 |\n | 大公司 | article/36 |\n | 城市生活 | article/38 |\n\n #### [报告](https://dt.yicai.com/report)\n\n | 分类 | ID |\n | ---------- | --------- |\n | 全部 | report/0 |\n | 人群观念 | report/9 |\n | 人群行为 | report/22 |\n | 美妆个护 | report/23 |\n | 3C 数码 | report/24 |\n | 营销趋势 | report/25 |\n | 服饰鞋包 | report/27 |\n | 互联网 | report/28 |\n | 城市与居住 | report/29 |\n | 消费趋势 | report/30 |\n | 生活趋势 | report/37 |\n\n #### [可视化](https://dt.yicai.com/visualization)\n\n | 分类 | ID |\n | -------- | ---------------- |\n | 全部 | visualization/0 |\n | 新流行 | visualization/39 |\n | 新趋势 | visualization/40 |\n | 商业黑马 | visualization/41 |\n | 新品 | visualization/42 |\n | 营销 | visualization/43 |\n | 大公司 | visualization/44 |\n | 城市生活 | visualization/45 |","location":"dt.ts"}} /> -### 头条 {#di-yi-cai-jing-tou-tiao} +#### [文章](https://dt.yicai.com/article) {#di-yi-cai-jing-dt-cai-jing-} -<Route author="nczitzk" example="/yicai/headline" path="/yicai/headline" /> +| 分类 | ID | +| -------- | ---------- | +| 全部 | article/0 | +| 新流行 | article/31 | +| 新趋势 | article/32 | +| 商业黑马 | article/33 | +| 新品 | article/34 | +| 营销 | article/35 | +| 大公司 | article/36 | +| 城市生活 | article/38 | + +#### [报告](https://dt.yicai.com/report) {#di-yi-cai-jing-dt-cai-jing-} + +| 分类 | ID | +| ---------- | --------- | +| 全部 | report/0 | +| 人群观念 | report/9 | +| 人群行为 | report/22 | +| 美妆个护 | report/23 | +| 3C 数码 | report/24 | +| 营销趋势 | report/25 | +| 服饰鞋包 | report/27 | +| 互联网 | report/28 | +| 城市与居住 | report/29 | +| 消费趋势 | report/30 | +| 生活趋势 | report/37 | + +#### [可视化](https://dt.yicai.com/visualization) {#di-yi-cai-jing-dt-cai-jing-} + +| 分类 | ID | +| -------- | ---------------- | +| 全部 | visualization/0 | +| 新流行 | visualization/39 | +| 新趋势 | visualization/40 | +| 商业黑马 | visualization/41 | +| 新品 | visualization/42 | +| 营销 | visualization/43 | +| 大公司 | visualization/44 | +| 城市生活 | visualization/45 | ### VIP 频道 {#di-yi-cai-jing-vip-pin-dao} -<Route author="nczitzk" example="/yicai/vip/428" path="/yicai/vip/:id?" paramsDesc={['频道 id,可在对应频道页中找到,默认为一元点金']} /> - -### 新闻 {#di-yi-cai-jing-xin-wen} - -<Route author="nczitzk" example="/yicai/news" path="/yicai/news/:id?" paramsDesc={['分类 id,见下表,可在对应分类页中找到,默认为新闻']}> - | Id | 名称 | - | ------------------------ | ---------- | - | gushi | A 股 | - | kechuangban | 科创板 | - | hongguan | 大政 | - | jinrong | 金融 | - | quanqiushichang | 海外市场 | - | gongsi | 产经 | - | shijie | 全球 | - | kechuang | 科技 | - | quyu | 区域 | - | comment | 评论 | - | dafengwenhua | 商业人文 | - | books | 阅读周刊 | - | loushi | 地产 | - | automobile | 汽车 | - | china\_financial\_herald | 对话陆家嘴 | - | fashion | 时尚 | - | ad | 商业资讯 | - | info | 资讯 | - | jzfxb | 价值风向标 | - | shuducaijing | 数读财经 | - | shujujiepan | 数据解盘 | - | shudushenghuo | 数读生活 | - | cbndata | CBNData | - | dtcj | DT 财经 | - | xfsz | 消费数知 | -</Route> +<Route namespace="yicai" data={{"path":"/vip/:id?","categories":["traditional-media"],"example":"/yicai/vip/428","parameters":{"id":"频道 id,可在对应频道页中找到,默认为一元点金"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/vip/product/:id","yicai.com/"],"target":"/vip/:id"},"name":"VIP 频道","maintainers":["nczitzk"],"location":"vip.ts"}} /> ### 关注 {#di-yi-cai-jing-guan-zhu} -<Route author="nczitzk" example="/yicai/feed/669" path="/yicai/feed/:id?" paramsDesc={['主题 id,可在对应主题页中找到,默认为一财早报']}> - :::tip - 全部主题词见 [此处](https://www.yicai.com/feed/alltheme) - ::: -</Route> +<Route namespace="yicai" data={{"path":"/feed/:id?","categories":["traditional-media"],"example":"/yicai/feed/669","parameters":{"id":"主题 id,可在对应主题页中找到,默认为一财早报"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/feed/:id","yicai.com/feed"],"target":"/feed/:id"},"name":"关注","maintainers":["nczitzk"],"description":":::tip\n 全部主题词见 [此处](https://www.yicai.com/feed/alltheme)\n :::","location":"feed.ts"}} /> + +:::tip +全部主题词见 [此处](https://www.yicai.com/feed/alltheme) +::: ### 视听 {#di-yi-cai-jing-shi-ting} -<Route author="nczitzk" example="/yicai/video" path="/yicai/video/:id?" paramsDesc={['分类 id,见下表,可在对应分类页中找到,默认为视听']}> - | Id | 名称 | - | -------------------- | ---------------------------- | - | youliao | 有料 | - | appshipin | 此刻 | - | yicaisudi | 速递 | - | caishang | 财商 | - | shiji | 史记 | - | jinrigushi | 今日股市 | - | tangulunjin | 谈股论金 | - | gongsiyuhangye | 公司与行业 | - | cjyxx | 财经夜行线 | - | 6thtradingday | 第六交易日 | - | cjfw | 财经风味 | - | chuangshidai | 创时代 | - | weilaiyaoqinghan | 未来邀请函 | - | tounaofengbao | 头脑风暴 | - | zhongguojingyingzhe | 中国经营者 | - | shichanglingjuli | 市场零距离 | - | huanqiucaijing | 环球财经视界 | - | zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 | - | jiemacaishang | 解码财商 | - | sxpl | 首席评论 | - | zhongguojingjiluntan | 中国经济论坛 | - | opinionleader | 意见领袖 | - | xinjinrong | 解码新金融 | - | diyidichan | 第一地产 | - | zhichedaren | 智车达人 | - | chuangtoufengyun | 创投风云 | - | chunxiangrensheng | 醇享人生 | - | diyishengyin | 第一声音 | - | sanliangboqianjin | 财智双全 | - | weilaiyaoqinghan | 未来邀请函 | - | zjdy | 主角 ▪ 大医 | - | leye | 乐业之城 | - | sanrenxing | 价值三人行 | - | yuandongli | 中国源动力 | - | pioneerzone | 直击引领区 | -</Route> +<Route namespace="yicai" data={{"path":"/video/:id?","categories":["traditional-media"],"example":"/yicai/video","parameters":{"id":"分类 id,见下表,可在对应分类页中找到,默认为视听"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/video/:id","yicai.com/video"],"target":"/video/:id"},"name":"视听","maintainers":["nczitzk"],"description":"| Id | 名称 |\n | -------------------- | ---------------------------- |\n | youliao | 有料 |\n | appshipin | 此刻 |\n | yicaisudi | 速递 |\n | caishang | 财商 |\n | shiji | 史记 |\n | jinrigushi | 今日股市 |\n | tangulunjin | 谈股论金 |\n | gongsiyuhangye | 公司与行业 |\n | cjyxx | 财经夜行线 |\n | 6thtradingday | 第六交易日 |\n | cjfw | 财经风味 |\n | chuangshidai | 创时代 |\n | weilaiyaoqinghan | 未来邀请函 |\n | tounaofengbao | 头脑风暴 |\n | zhongguojingyingzhe | 中国经营者 |\n | shichanglingjuli | 市场零距离 |\n | huanqiucaijing | 环球财经视界 |\n | zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 |\n | jiemacaishang | 解码财商 |\n | sxpl | 首席评论 |\n | zhongguojingjiluntan | 中国经济论坛 |\n | opinionleader | 意见领袖 |\n | xinjinrong | 解码新金融 |\n | diyidichan | 第一地产 |\n | zhichedaren | 智车达人 |\n | chuangtoufengyun | 创投风云 |\n | chunxiangrensheng | 醇享人生 |\n | diyishengyin | 第一声音 |\n | sanliangboqianjin | 财智双全 |\n | weilaiyaoqinghan | 未来邀请函 |\n | zjdy | 主角 ▪ 大医 |\n | leye | 乐业之城 |\n | sanrenxing | 价值三人行 |\n | yuandongli | 中国源动力 |\n | pioneerzone | 直击引领区 |","location":"video.ts"}} /> -### 正在 {#di-yi-cai-jing-zheng-zai} +| Id | 名称 | +| -------------------- | ---------------------------- | +| youliao | 有料 | +| appshipin | 此刻 | +| yicaisudi | 速递 | +| caishang | 财商 | +| shiji | 史记 | +| jinrigushi | 今日股市 | +| tangulunjin | 谈股论金 | +| gongsiyuhangye | 公司与行业 | +| cjyxx | 财经夜行线 | +| 6thtradingday | 第六交易日 | +| cjfw | 财经风味 | +| chuangshidai | 创时代 | +| weilaiyaoqinghan | 未来邀请函 | +| tounaofengbao | 头脑风暴 | +| zhongguojingyingzhe | 中国经营者 | +| shichanglingjuli | 市场零距离 | +| huanqiucaijing | 环球财经视界 | +| zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 | +| jiemacaishang | 解码财商 | +| sxpl | 首席评论 | +| zhongguojingjiluntan | 中国经济论坛 | +| opinionleader | 意见领袖 | +| xinjinrong | 解码新金融 | +| diyidichan | 第一地产 | +| zhichedaren | 智车达人 | +| chuangtoufengyun | 创投风云 | +| chunxiangrensheng | 醇享人生 | +| diyishengyin | 第一声音 | +| sanliangboqianjin | 财智双全 | +| weilaiyaoqinghan | 未来邀请函 | +| zjdy | 主角 ▪ 大医 | +| leye | 乐业之城 | +| sanrenxing | 价值三人行 | +| yuandongli | 中国源动力 | +| pioneerzone | 直击引领区 | -<Route author="sanmmm nczitzk" example="/yicai/brief" path="/yicai/brief" /> +### 头条 {#di-yi-cai-jing-tou-tiao} + +<Route namespace="yicai" data={{"path":"/headline","categories":["traditional-media"],"example":"/yicai/headline","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/"]},"name":"头条","maintainers":["nczitzk"],"url":"yicai.com/","location":"headline.ts"}} /> + +### 新闻 {#di-yi-cai-jing-xin-wen} + +<Route namespace="yicai" data={{"path":"/news/:id?","categories":["traditional-media"],"example":"/yicai/news","parameters":{"id":"分类 id,见下表,可在对应分类页中找到,默认为新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/news/:id","yicai.com/news"],"target":"/news/:id"},"name":"新闻","maintainers":["nczitzk"],"description":"| Id | 名称 |\n | ------------------------ | ---------- |\n | gushi | A 股 |\n | kechuangban | 科创板 |\n | hongguan | 大政 |\n | jinrong | 金融 |\n | quanqiushichang | 海外市场 |\n | gongsi | 产经 |\n | shijie | 全球 |\n | kechuang | 科技 |\n | quyu | 区域 |\n | comment | 评论 |\n | dafengwenhua | 商业人文 |\n | books | 阅读周刊 |\n | loushi | 地产 |\n | automobile | 汽车 |\n | china_financial_herald | 对话陆家嘴 |\n | fashion | 时尚 |\n | ad | 商业资讯 |\n | info | 资讯 |\n | jzfxb | 价值风向标 |\n | shuducaijing | 数读财经 |\n | shujujiepan | 数据解盘 |\n | shudushenghuo | 数读生活 |\n | cbndata | CBNData |\n | dtcj | DT 财经 |\n | xfsz | 消费数知 |","location":"news.ts"}} /> + +| Id | 名称 | +| ------------------------ | ---------- | +| gushi | A 股 | +| kechuangban | 科创板 | +| hongguan | 大政 | +| jinrong | 金融 | +| quanqiushichang | 海外市场 | +| gongsi | 产经 | +| shijie | 全球 | +| kechuang | 科技 | +| quyu | 区域 | +| comment | 评论 | +| dafengwenhua | 商业人文 | +| books | 阅读周刊 | +| loushi | 地产 | +| automobile | 汽车 | +| china\_financial\_herald | 对话陆家嘴 | +| fashion | 时尚 | +| ad | 商业资讯 | +| info | 资讯 | +| jzfxb | 价值风向标 | +| shuducaijing | 数读财经 | +| shujujiepan | 数据解盘 | +| shudushenghuo | 数读生活 | +| cbndata | CBNData | +| dtcj | DT 财经 | +| xfsz | 消费数知 | ### 一财号 {#di-yi-cai-jing-yi-cai-hao} -<Route author="nczitzk" example="/yicai/author/100005663" path="/yicai/author/:id?" paramsDesc={['作者 id,可在对应作者页中找到,默认为第一财经研究院']} /> +<Route namespace="yicai" data={{"path":"/author/:id?","categories":["traditional-media"],"example":"/yicai/author/100005663","parameters":{"id":"作者 id,可在对应作者页中找到,默认为第一财经研究院"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/author/:id","yicai.com/author"],"target":"/author/:id"},"name":"一财号","maintainers":["nczitzk"],"location":"author.ts"}} /> -### DT 财经 {#di-yi-cai-jing-dt-cai-jing} +### 正在 {#di-yi-cai-jing-zheng-zai} -<Route author="nczitzk" example="/yicai/dt/article" path="/yicai/dt/:column?/:category?" paramsDesc={['栏目,见下表,默认为文章', '分类,见下表,默认为全部']} radar="1"> - #### [文章](https://dt.yicai.com/article) +<Route namespace="yicai" data={{"path":"/brief","categories":["traditional-media"],"example":"/yicai/brief","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/brief"]},"name":"正在","maintainers":["sanmmm","nczitzk"],"url":"yicai.com/brief","location":"brief.ts"}} /> - | 分类 | ID | - | -------- | ---------- | - | 全部 | article/0 | - | 新流行 | article/31 | - | 新趋势 | article/32 | - | 商业黑马 | article/33 | - | 新品 | article/34 | - | 营销 | article/35 | - | 大公司 | article/36 | - | 城市生活 | article/38 | +### 最新 {#di-yi-cai-jing-zui-xin} - #### [报告](https://dt.yicai.com/report) - - | 分类 | ID | - | ---------- | --------- | - | 全部 | report/0 | - | 人群观念 | report/9 | - | 人群行为 | report/22 | - | 美妆个护 | report/23 | - | 3C 数码 | report/24 | - | 营销趋势 | report/25 | - | 服饰鞋包 | report/27 | - | 互联网 | report/28 | - | 城市与居住 | report/29 | - | 消费趋势 | report/30 | - | 生活趋势 | report/37 | - - #### [可视化](https://dt.yicai.com/visualization) - - | 分类 | ID | - | -------- | ---------------- | - | 全部 | visualization/0 | - | 新流行 | visualization/39 | - | 新趋势 | visualization/40 | - | 商业黑马 | visualization/41 | - | 新品 | visualization/42 | - | 营销 | visualization/43 | - | 大公司 | visualization/44 | - | 城市生活 | visualization/45 | -</Route> +<Route namespace="yicai" data={{"path":"/latest","categories":["traditional-media"],"example":"/yicai/latest","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yicai.com/"]},"name":"最新","maintainers":["nczitzk"],"url":"yicai.com/","location":"latest.ts"}} /> ## 东方网 {#dong-fang-wang} +### 24 小时热闻 {#dong-fang-wang-24-xiao-shi-re-wen} + +<Route namespace="eastday" data={{"path":"/24/:category?","categories":["traditional-media"],"example":"/eastday/24","parameters":{"category":"分类,见下表,默认为社会"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mini.eastday.com/"],"target":"/24"},"name":"24 小时热闻","maintainers":["nczitzk"],"url":"mini.eastday.com/","description":"| 推荐 | 社会 | 娱乐 | 国际 | 军事 |\n | ---- | ---- | ---- | ---- | ---- |\n\n | 养生 | 汽车 | 体育 | 财经 | 游戏 |\n | ---- | ---- | ---- | ---- | ---- |\n\n | 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 |\n | ---- | ---- | ---- | ---- | ---- | ---- |","location":"24.ts"}} /> + +| 推荐 | 社会 | 娱乐 | 国际 | 军事 | +| ---- | ---- | ---- | ---- | ---- | + +| 养生 | 汽车 | 体育 | 财经 | 游戏 | +| ---- | ---- | ---- | ---- | ---- | + +| 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 | +| ---- | ---- | ---- | ---- | ---- | ---- | + ### 上海新闻 {#dong-fang-wang-shang-hai-xin-wen} -<Route author="saury" example="/eastday/sh" path="/eastday/sh" /> +<Route namespace="eastday" data={{"path":"/sh","categories":["traditional-media"],"example":"/eastday/sh","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sh.eastday.com/"]},"name":"上海新闻","maintainers":["saury"],"url":"sh.eastday.com/","location":"sh.ts"}} /> ### 原创 {#dong-fang-wang-yuan-chuang} -<Route author="nczitzk" example="/eastday/portrait" path="/eastday/portrait" /> - -### 24 小时热闻 {#dong-fang-wang-24-xiao-shi-re-wen} - -<Route author="nczitzk" example="/eastday/24" path="/eastday/24/:category?" paramsDesc={['分类,见下表,默认为社会']}> - | 推荐 | 社会 | 娱乐 | 国际 | 军事 | - | ---- | ---- | ---- | ---- | ---- | - - | 养生 | 汽车 | 体育 | 财经 | 游戏 | - | ---- | ---- | ---- | ---- | ---- | - - | 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 | - | ---- | ---- | ---- | ---- | ---- | ---- | -</Route> +<Route namespace="eastday" data={{"path":"/portrait","categories":["traditional-media"],"example":"/eastday/portrait","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.eastday.com/"]},"name":"原创","maintainers":["nczitzk"],"url":"www.eastday.com/","location":"portrait.ts"}} /> ## 东网 {#dong-wang} -### 即時新聞 {#dong-wang-ji-shi-xin-wen} - -<Route author="Fatpandac" example="/oncc/zh-hant/news" path="/oncc/:language/:channel?" paramsDesc={['`zh-hans` 为简体,`zh-hant` 为繁体', '频道,默认为港澳']}> - 频道参数可以从官网的地址中获取,如: - - `https://hk.on.cc/hk/finance/index_cn.html` 对应 `/oncc/zh-hans/finance` - - `https://hk.on.cc/hk/finance/index.html` 对应 `/oncc/zh-hant/finance` -</Route> - ### Money18 {#dong-wang-money18} -<Route author="nczitzk" example="/oncc/money18/exp" path="/oncc/money18/:id?" paramsDesc={['栏目 id,可在对应栏目页 URL 中找到,默认为 exp,即新聞總覽']}> - | 新聞總覽 | 全日焦點 | 板塊新聞 | 國際金融 | 大行報告 | A 股新聞 | 地產新聞 | 投資理財 | 新股 IPO | 科技財情 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | - | exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech | -</Route> +<Route namespace="oncc" data={{"path":"/money18/:id?","categories":["traditional-media"],"example":"/oncc/money18/exp","parameters":{"id":"栏目 id,可在对应栏目页 URL 中找到,默认为 exp,即新聞總覽"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Money18","maintainers":["nczitzk"],"description":"| 新聞總覽 | 全日焦點 | 板塊新聞 | 國際金融 | 大行報告 | A 股新聞 | 地產新聞 | 投資理財 | 新股 IPO | 科技財情 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |\n | exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech |","location":"money18.ts"}} /> + +| 新聞總覽 | 全日焦點 | 板塊新聞 | 國際金融 | 大行報告 | A 股新聞 | 地產新聞 | 投資理財 | 新股 IPO | 科技財情 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | +| exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech | + +### 即時新聞 {#dong-wang-ji-shi-xin-wen} + +<Route namespace="oncc" data={{"path":"/:language/:channel?","categories":["traditional-media"],"example":"/oncc/zh-hant/news","parameters":{"language":"`zh-hans` 为简体,`zh-hant` 为繁体","channel":"频道,默认为港澳"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"即時新聞","maintainers":["Fatpandac"],"description":"频道参数可以从官网的地址中获取,如:\n\n `https://hk.on.cc/hk/finance/index_cn.html` 对应 `/oncc/zh-hans/finance`\n\n `https://hk.on.cc/hk/finance/index.html` 对应 `/oncc/zh-hant/finance`","location":"index.ts"}} /> + +频道参数可以从官网的地址中获取,如: + +`https://hk.on.cc/hk/finance/index_cn.html` 对应 `/oncc/zh-hans/finance` + +`https://hk.on.cc/hk/finance/index.html` 对应 `/oncc/zh-hant/finance` ## 公視新聞網 {#gong-shi-xin-wen-wang} -### 即時新聞 {#gong-shi-xin-wen-wang-ji-shi-xin-wen} - -<Route author="nczitzk" example="/pts/dailynews" path="/pts/dailynews" /> - -### 專題策展 {#gong-shi-xin-wen-wang-zhuan-ti-ce-zhan} - -<Route author="nczitzk" example="/pts/curations" path="/pts/curations" /> - -### 觀點 {#gong-shi-xin-wen-wang-guan-dian} - -<Route author="nczitzk" example="/pts/opinion" path="/pts/opinion" /> - ### 數位敘事 {#gong-shi-xin-wen-wang-shu-wei-xu-shi} -<Route author="nczitzk" example="/pts/projects" path="/pts/projects" /> - -### 深度報導 {#gong-shi-xin-wen-wang-shen-du-bao-dao} - -<Route author="nczitzk" example="/pts/report" path="/pts/report" /> - -### 分類 {#gong-shi-xin-wen-wang-fen-lei} - -<Route author="nczitzk" example="/pts/category/9" path="/pts/category/:id" paramsDesc={['分類 id,见下表,可在对应分類页 URL 中找到']}> - | 名称 | 编号 | - | -------- | ---- | - | 政治 | 1 | - | 社會 | 7 | - | 全球 | 4 | - | 生活 | 5 | - | 兩岸 | 9 | - | 地方 | 11 | - | 產經 | 10 | - | 文教科技 | 6 | - | 環境 | 3 | - | 社福人權 | 12 | -</Route> - -### 標籤 {#gong-shi-xin-wen-wang-biao-qian} - -<Route author="nczitzk" example="/pts/tag/230" path="/pts/tag/:id" paramsDesc={['標籤 id,可在对应標籤页 URL 中找到']} /> +<Route namespace="pts" data={{"path":"/projects","categories":["traditional-media"],"example":"/pts/projects","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.pts.org.tw/projects","news.pts.org.tw/"]},"name":"數位敘事","maintainers":["nczitzk"],"url":"news.pts.org.tw/projects","location":"projects.ts"}} /> ### 整理報導 {#gong-shi-xin-wen-wang-zheng-li-bao-dao} -<Route author="nczitzk" example="/pts/live/62e8e4bbb4de2cbd74468b2b" path="/pts/live/:id" paramsDesc={['報導 id,可在对应整理報導页 URL 中找到']} /> +<Route namespace="pts" data={{"path":"/live/:id","categories":["traditional-media"],"example":"/pts/live/62e8e4bbb4de2cbd74468b2b","parameters":{"id":"報導 id,可在对应整理報導页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.pts.org.tw/live/:id","news.pts.org.tw/"]},"name":"整理報導","maintainers":[],"location":"live.ts"}} /> + +### 專題策展 {#gong-shi-xin-wen-wang-zhuan-ti-ce-zhan} + +<Route namespace="pts" data={{"path":"/curations","categories":["traditional-media"],"example":"/pts/curations","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.pts.org.tw/curations","news.pts.org.tw/"]},"name":"專題策展","maintainers":["nczitzk"],"url":"news.pts.org.tw/curations","location":"curations.ts"}} /> ## 共同网 {#gong-tong-wang} ### 最新报道 {#gong-tong-wang-zui-xin-bao-dao} -<Route author="Rongronggg9" example="/kyodonews" path="/kyodonews/:language?/:keyword?" paramsDesc={['语言: `china` = 简体中文 (默认), `tchina` = 繁體中文', '关键词']}> - `keyword` 为关键词,由于共同网有许多关键词并不在主页列出,此处不一一列举,可从关键词页的 URL 的最后一级路径中提取。如 `日中关系` 的关键词页 URL 为 `https://china.kyodonews.net/news/japan-china_relationship`, 则将 `japan-china_relationship` 填入 `keyword`。特别地,当填入 `rss` 时,将从共同网官方 RSS 中抓取文章;略去时,将从首页抓取最新报道 (注意:首页更新可能比官方 RSS 稍慢)。 -</Route> +<Route namespace="kyodonews" data={{"path":"/:language?/:keyword?","categories":["traditional-media"],"example":"/kyodonews","parameters":{"language":"语言: `china` = 简体中文 (默认), `tchina` = 繁體中文","keyword":"关键词"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新报道","maintainers":["Rongronggg9"],"description":"`keyword` 为关键词,由于共同网有许多关键词并不在主页列出,此处不一一列举,可从关键词页的 URL 的最后一级路径中提取。如 `日中关系` 的关键词页 URL 为 `https://china.kyodonews.net/news/japan-china_relationship`, 则将 `japan-china_relationship` 填入 `keyword`。特别地,当填入 `rss` 时,将从共同网官方 RSS 中抓取文章;略去时,将从首页抓取最新报道 (注意:首页更新可能比官方 RSS 稍慢)。","location":"index.ts"}} /> + +`keyword` 为关键词,由于共同网有许多关键词并不在主页列出,此处不一一列举,可从关键词页的 URL 的最后一级路径中提取。如 `日中关系` 的关键词页 URL 为 `https://china.kyodonews.net/news/japan-china_relationship`, 则将 `japan-china_relationship` 填入 `keyword`。特别地,当填入 `rss` 时,将从共同网官方 RSS 中抓取文章;略去时,将从首页抓取最新报道 (注意:首页更新可能比官方 RSS 稍慢)。 ## 广州日报 {#guang-zhou-ri-bao} ### 客户端 {#guang-zhou-ri-bao-ke-hu-duan} -<Route author="TimWu007" example="/gzdaily/app/74" path="/gzdaily/app/:column?" paramsDesc={['栏目 ID,点击对应栏目后在地址栏找到']}> - :::tip - 在北京时间深夜可能无法获取内容。 - ::: +<Route namespace="gzdaily" data={{"path":"/app/:column?","categories":["traditional-media"],"example":"/gzdaily/app/74","parameters":{"column":"栏目 ID,点击对应栏目后在地址栏找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"客户端","maintainers":["TimWu007"],"description":":::tip\n 在北京时间深夜可能无法获取内容。\n :::\n\n 常用栏目 ID:\n\n | 栏目名 | ID |\n | ------ | ---- |\n | 首页 | 74 |\n | 时局 | 374 |\n | 广州 | 371 |\n | 大湾区 | 397 |\n | 城区 | 2980 |","location":"app.ts"}} /> - 常用栏目 ID: +:::tip +在北京时间深夜可能无法获取内容。 +::: - | 栏目名 | ID | - | ------ | ---- | - | 首页 | 74 | - | 时局 | 374 | - | 广州 | 371 | - | 大湾区 | 397 | - | 城区 | 2980 | -</Route> +常用栏目 ID: -## 国际金融报栏目 {#guo-ji-jin-rong-bao-lan-mu} - -### 栏目 {#guo-ji-jin-rong-bao-lan-mu-lan-mu} - -<Route author="Origami404" example="/ifnews/48" path="/ifnews/:cid" paramsDesc={['栏目 ID']}> - `cid`可在对应栏目的 url 后的参数中获取,如`热点快报`的栏目 url 为`http://www.ifnews.com/column.html?cid=48`, `cid`即为`48`. -</Route> +| 栏目名 | ID | +| ------ | ---- | +| 首页 | 74 | +| 时局 | 374 | +| 广州 | 371 | +| 大湾区 | 397 | +| 城区 | 2980 | ## 河北网络广播电视台 {#he-bei-wang-luo-guang-bo-dian-shi-tai} ### 农博士在行动 {#he-bei-wang-luo-guang-bo-dian-shi-tai-nong-bo-shi-zai-xing-dong} -<Route author="iamqiz nczitzk" example="/hebtv/nbszxd" path="/hebtv/nbszxd" radar="1" supportBT="1" supportPodcast="1" /> +<Route namespace="hebtv" data={{"path":"/nbszxd","categories":["traditional-media"],"example":"/hebtv/nbszxd","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":true,"supportPodcast":true,"supportScihub":false},"radar":{"source":["web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml"]},"name":"农博士在行动","maintainers":["iamqiz","nczitzk"],"url":"web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml","location":"nong-bo-shi-zai-xing-dong.ts"}} /> ## 湖南日报 {#hu-nan-ri-bao} ### 电子刊物 {#hu-nan-ri-bao-dian-zi-kan-wu} -<Route author="nczitzk" example="/hnrb" path="/hnrb/:id?" paramsDesc={['编号,见下表,默认为全部']} anticrawler="1"> - | 版 | 编号 | - | -------------------- | ---- | - | 全部 | | - | 第 01 版:头版 | 1 | - | 第 02 版:要闻 | 2 | - | 第 03 版:要闻 | 3 | - | 第 04 版:深度 | 4 | - | 第 05 版:市州 | 5 | - | 第 06 版:理论・学习 | 6 | - | 第 07 版:观察 | 7 | - | 第 08 版:时事 | 8 | - | 第 09 版:中缝 | 9 | -</Route> +<Route namespace="hnrb" data={{"path":"/:id?","categories":["traditional-media"],"example":"/hnrb","parameters":{"id":"编号,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["voc.com.cn/"],"target":"/:id"},"name":"电子刊物","maintainers":["nczitzk"],"url":"voc.com.cn/","description":"| 版 | 编号 |\n | -------------------- | ---- |\n | 全部 | |\n | 第 01 版:头版 | 1 |\n | 第 02 版:要闻 | 2 |\n | 第 03 版:要闻 | 3 |\n | 第 04 版:深度 | 4 |\n | 第 05 版:市州 | 5 |\n | 第 06 版:理论・学习 | 6 |\n | 第 07 版:观察 | 7 |\n | 第 08 版:时事 | 8 |\n | 第 09 版:中缝 | 9 |","location":"index.ts"}} /> + +| 版 | 编号 | +| -------------------- | ---- | +| 全部 | | +| 第 01 版:头版 | 1 | +| 第 02 版:要闻 | 2 | +| 第 03 版:要闻 | 3 | +| 第 04 版:深度 | 4 | +| 第 05 版:市州 | 5 | +| 第 06 版:理论・学习 | 6 | +| 第 07 版:观察 | 7 | +| 第 08 版:时事 | 8 | +| 第 09 版:中缝 | 9 | ## 华尔街见闻 {#hua-er-jie-jian-wen} -### 资讯 {#hua-er-jie-jian-wen-zi-xun} - -<Route author="nczitzk" example="/wallstreetcn/global" path="/wallstreetcn/:category?" paramsDesc={['资讯分类,默认`global`,见下表']}> - | id | 分类 | - | ------------ | ---- | - | global | 最新 | - | shares | 股市 | - | bonds | 债市 | - | commodities | 商品 | - | forex | 外汇 | - | enterprise | 公司 | - | asset-manage | 资管 | - | tmt | 科技 | - | estate | 地产 | - | car | 汽车 | - | medicine | 医药 | -</Route> - -### 最新 {#hua-er-jie-jian-wen-zui-xin} - -<Route author="conanjunn nczitzk" example="/wallstreetcn/news/global" path="/wallstreetcn/news/global" /> - ### 实时快讯 {#hua-er-jie-jian-wen-shi-shi-kuai-xun} -<Route author="nczitzk" example="/wallstreetcn/live" path="/wallstreetcn/live/:category?/:score?" paramsDesc={['快讯分类,默认`global`,见下表', '快讯重要度,默认`1`全部快讯,可设置为`2`只看重要的']}> - | 要闻 | A 股 | 美股 | 港股 | 外汇 | 商品 | 理财 | - | ------ | ------- | -------- | -------- | ----- | --------- | --------- | - | global | a-stock | us-stock | hk-stock | forex | commodity | financing | -</Route> +<Route namespace="wallstreetcn" data={{"path":"/live/:category?/:score?","categories":["traditional-media"],"example":"/wallstreetcn/live","parameters":{"category":"快讯分类,默认`global`,见下表","score":"快讯重要度,默认`1`全部快讯,可设置为`2`只看重要的"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wallstreetcn.com/live/:category","wallstreetcn.com/"],"target":"/live/:category?"},"name":"实时快讯","maintainers":["nczitzk"],"description":"| 要闻 | A 股 | 美股 | 港股 | 外汇 | 商品 | 理财 |\n | ------ | ------- | -------- | -------- | ----- | --------- | --------- |\n | global | a-stock | us-stock | hk-stock | forex | commodity | financing |","location":"live.ts"}} /> + +| 要闻 | A 股 | 美股 | 港股 | 外汇 | 商品 | 理财 | +| ------ | ------- | -------- | -------- | ----- | --------- | --------- | +| global | a-stock | us-stock | hk-stock | forex | commodity | financing | ### 最热文章 {#hua-er-jie-jian-wen-zui-re-wen-zhang} -<Route author="nczitzk" example="/wallstreetcn/hot" path="/wallstreetcn/hot/:period?" paramsDesc={['时期,可选 `day` 即 当日 或 `week` 即 当周,默认为当日']} /> +<Route namespace="wallstreetcn" data={{"path":"/hot/:period?","categories":["traditional-media"],"example":"/wallstreetcn/hot","parameters":{"period":"时期,可选 `day` 即 当日 或 `week` 即 当周,默认为当日"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wallstreetcn.com/"]},"name":"最热文章","maintainers":["nczitzk"],"url":"wallstreetcn.com/","location":"hot.ts"}} /> ## 華視 {#hua-shi} ### 新聞 {#hua-shi-xin-wen} -<Route author="miles170" example="/cts/real" path="/cts/:category" paramsDesc={['类别']} radar="1" anticrawler="1"> - | 即時 | 氣象 | 政治 | 國際 | 社會 | 運動 | 生活 | 財經 | 台語 | 地方 | 產業 | 綜合 | 藝文 | 娛樂 | - | ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- | - | real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain | -</Route> +<Route namespace="cts" data={{"path":"/:category","categories":["traditional-media"],"example":"/cts/real","parameters":{"category":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.cts.com.tw/:category/index.html"]},"name":"新聞","maintainers":["miles170"],"description":"| 即時 | 氣象 | 政治 | 國際 | 社會 | 運動 | 生活 | 財經 | 台語 | 地方 | 產業 | 綜合 | 藝文 | 娛樂 |\n | ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- |\n | real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain |","location":"news.ts"}} /> + +| 即時 | 氣象 | 政治 | 國際 | 社會 | 運動 | 生活 | 財經 | 台語 | 地方 | 產業 | 綜合 | 藝文 | 娛樂 | +| ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- | +| real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain | ## 环球网 {#huan-qiu-wang} ### 分类 {#huan-qiu-wang-fen-lei} -<Route author="yuxinliu-alex" example="/huanqiu/news/china" path="/huanqiu/news/:category?" paramsDesc={['类别,可以使用二级域名作为参数,默认为:china']}> - | 国内新闻 | 国际新闻 | 军事 | 台海 | 评论 | - | -------- | -------- | ---- | ------ | ------- | - | china | world | mil | taiwai | opinion | -</Route> +<Route namespace="huanqiu" data={{"path":"/news/:category?","categories":["traditional-media"],"example":"/huanqiu/news/china","parameters":{"category":"类别,可以使用二级域名作为参数,默认为:china"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["huanqiu.com/"]},"name":"分类","maintainers":["yuxinliu-alex"],"url":"huanqiu.com/","description":"| 国内新闻 | 国际新闻 | 军事 | 台海 | 评论 |\n | -------- | -------- | ---- | ------ | ------- |\n | china | world | mil | taiwai | opinion |","location":"index.ts"}} /> -## 极客公园 {#ji-ke-gong-yuan} - -### 全球快讯 {#ji-ke-gong-yuan-quan-qiu-kuai-xun} - -<Route author="xyqfer" example="/geekpark/breakingnews" path="/geekpark/breakingnews" /> - -## 界面新闻 {#jie-mian-xin-wen} - -### 栏目 {#jie-mian-xin-wen-lan-mu} - -<Route author="WenhuWee nczitzk" example="/jiemian/lists/65" path="/jiemian/lists/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']} radar="1"> - | [首页](https://www.jiemian.com) | [商业](https://www.jiemian.com/lists/2.html) | [财经](https://www.jiemian.com/lists/800.html) | [新闻](https://www.jiemian.com/lists/801.html) | [文化生活](https://www.jiemian.com/lists/130.html) | [快报](https://www.jiemian.com/lists/4.html) | - | ------------------------------- | -------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------- | - | | 2 | 800 | 801 | 130 | 4 | - - <details> - <summary>更多分类</summary> - - #### [首页](https://www.jiemian.com) - - | [科技](https://www.jiemian.com/lists/65.html) | [金融](https://www.jiemian.com/lists/9.html) | [证券](https://www.jiemian.com/lists/112.html) | [地产](https://www.jiemian.com/lists/62.html) | [汽车](https://www.jiemian.com/lists/51.html) | [健康](https://www.jiemian.com/lists/472.html) | - | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | - | 65 | 9 | 112 | 62 | 51 | 472 | - - | [大湾区](https://www.jiemian.com/lists/680.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | [文旅](https://www.jiemian.com/lists/105.html) | [数据](https://www.jiemian.com/lists/154.html) | [ESG](https://www.jiemian.com/lists/712.html) | [双碳](https://www.jiemian.com/lists/877.html) | - | ------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | - | 680 | 704 | 105 | 154 | 712 | 877 | - - | [电厂](https://www.jiemian.com/lists/872.html) | - | ---------------------------------------------- | - | 872 | - - #### [商业](https://www.jiemian.com/lists/2.html) - - | [科技](https://www.jiemian.com/lists/65.html) | [地产](https://www.jiemian.com/lists/62.html) | [ 汽车](https://www.jiemian.com/lists/51.html) | [消费](https://www.jiemian.com/lists/31.html) | [工业](https://www.jiemian.com/lists/28.html) | [时尚](https://www.jiemian.com/lists/68.html) | - | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | - | 65 | 62 | 51 | 31 | 28 | 68 | - - | [交通](https://www.jiemian.com/lists/30.html) | [医药](https://www.jiemian.com/lists/472.html) | [互联网](https://www.jiemian.com/lists/851.html) | [创投 ](https://www.jiemian.com/lists/858.html) | [能源](https://www.jiemian.com/lists/856.html) | [数码](https://www.jiemian.com/lists/853.html) | - | --------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | - | 30 | 472 | 851 | 858 | 856 | 853 | - - | [教育](https://www.jiemian.com/lists/256.html) | [食品](https://www.jiemian.com/lists/845.html) | [新能源](https://www.jiemian.com/lists/857.html) | [家电](https://www.jiemian.com/lists/850.html) | [健康](https://www.jiemian.com/lists/854.html) | [酒业](https://www.jiemian.com/lists/676.html) | - | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | - | 256 | 845 | 857 | 850 | 854 | 676 | - - | [物流](https://www.jiemian.com/lists/841.html) | [零售](https://www.jiemian.com/lists/847.html) | [美妆](https://www.jiemian.com/lists/838.html) | [楼市](https://www.jiemian.com/city/main/181.html) | [家居](https://www.jiemian.com/lists/694.html) | [餐饮](https://www.jiemian.com/lists/848.html) | - | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | - | 841 | 847 | 838 | city/main/181 | 694 | 848 | - - | [日用](https://www.jiemian.com/lists/846.html) | [企服](https://www.jiemian.com/lists/852.html) | [珠宝](https://www.jiemian.com/lists/839.html) | [腕表](https://www.jiemian.com/lists/840.html) | [ 商学院](https://www.jiemian.com/lists/605.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | - | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------- | ------------------------------------------------ | - | 846 | 852 | 839 | 840 | 605 | 704 | - - | [电厂](https://www.jiemian.com/lists/872.html) | [农业](https://www.jiemian.com/lists/883.html) | - | ---------------------------------------------- | ---------------------------------------------- | - | 872 | 883 | - - #### [财经](https://www.jiemian.com/lists/800.html) - - | [金融](https://www.jiemian.com/lists/9.html) | [投资](https://www.jiemian.com/lists/86.html) | [证券](https://www.jiemian.com/lists/112.html) | [IPO](https://www.jiemian.com/lists/699.html) | [宏观](https://www.jiemian.com/lists/174.html) | [股市](https://www.jiemian.com/lists/418.html) | - | -------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | - | 9 | 86 | 112 | 699 | 174 | 418 | - - | [财富](https://www.jiemian.com/lists/410.html) | [有连云](https://www.jiemian.com/lists/889.html) | - | ---------------------------------------------- | ------------------------------------------------ | - | 410 | 889 | - - #### [新闻](https://www.jiemian.com/lists/801.html) - - | [天下](https://www.jiemian.com/lists/32.html) | [中国](https://www.jiemian.com/lists/71.html) | [ 评论](https://www.jiemian.com/lists/8.html) | [数据](https://www.jiemian.com/lists/154.html) | [职场](https://www.jiemian.com/lists/50.html) | [国是](https://www.jiemian.com/lists/422.html) | - | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | - | 32 | 71 | 8 | 154 | 50 | 422 | - - | [体育](https://www.jiemian.com/lists/82.html) | [文娱](https://www.jiemian.com/lists/63.html) | [ 影像](https://www.jiemian.com/lists/225.html) | [营销](https://www.jiemian.com/lists/49.html) | [大 湾区](https://www.jiemian.com/lists/680.html) | [ESG](https://www.jiemian.com/lists/712.html) | - | --------------------------------------------- | --------------------------------------------- | ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------- | --------------------------------------------- | - | 82 | 63 | 225 | 49 | 680 | 712 | - - | [双碳](https://www.jiemian.com/lists/877.html) | [长三角](https://www.jiemian.com/lists/917.html) | - | ---------------------------------------------- | ------------------------------------------------ | - | 877 | 917 | - - #### [文化生活](https://www.jiemian.com/lists/130.html) - - | [文化](https://www.jiemian.com/lists/130.html) | [文旅](https://www.jiemian.com/lists/105.html) | [生活方式](https://www.jiemian.com/lists/135.html) | [美食美酒](https://www.jiemian.com/lists/865.html) | [艺术](https://www.jiemian.com/lists/643.html) | [游戏](https://www.jiemian.com/lists/118.html) | - | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | - | 130 | 105 | 135 | 865 | 643 | 118 | - - | [正午](https://www.jiemian.com/lists/53.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | - | --------------------------------------------- | ------------------------------------------------------ | - | 53 | video/lists/195\_1 | - - #### [快报](https://www.jiemian.com/lists/4.html) - - | [今日热点](https://www.jiemian.com/lists/1324kb.html) | [公司头条](https://www.jiemian.com/lists/1322kb.html) | [股市前沿](https://www.jiemian.com/lists/1327kb.html) | [监管通报](https://www.jiemian.com/lists/1330kb.html) | [财经速览](https://www.jiemian.com/lists/1326kb.html) | [时事追踪](https://www.jiemian.com/lists/1325kb.html) | - | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | - | 1324kb | 1322kb | 1327kb | 1330kb | 1326kb | 1325kb | - </details> -</Route> - -### VIP {#jie-mian-xin-wen-vip} - -<Route author="nczitzk" example="/jiemian/pro/lists/12" path="/jiemian/pro/lists/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']} radar="1"> - | [投资早晚报](https://www.jiemian.com/pro/lists/12.html) | [宏观晚 6 点](https://www.jiemian.com/pro/lists/20.html) | [打新早报](https://www.jiemian.com/pro/lists/21.html) | [盘前机会前瞻](https://www.jiemian.com/pro/lists/13.html) | [公告快评](https://www.jiemian.com/pro/lists/14.html) | [盘中必读](https://www.jiemian.com/pro/lists/15.html) | - | ------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | - | 12 | 20 | 21 | 13 | 14 | 15 | - - | [金股挖掘](https://www.jiemian.com/pro/lists/16.html) | [调研早知道](https://www.jiemian.com/pro/lists/17.html) | [研报新知](https://www.jiemian.com/pro/lists/18.html) | [大势侦察](https://www.jiemian.com/pro/lists/1.html) | [市场风向标](https://www.jiemian.com/pro/lists/19.html) | - | ----------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | - | 16 | 17 | 18 | 1 | 19 | -</Route> - -### 界面号 {#jie-mian-xin-wen-jie-mian-hao} - -<Route author="nczitzk" example="/jiemian/account/main/1" path="/jiemian/account/main/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']} radar="1"> - | [财经号](https://www.jiemian.com/account/main/1.html) | [城市号](https://www.jiemian.com/account/main/2.html) | [媒体号](https://www.jiemian.com/account/main/3.html) | - | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | - | 1 | 2 | 3 | -</Route> - -### 视频 {#jie-mian-xin-wen-shi-pin} - -<Route author="nczitzk" example="/jiemian/video/lists/258_1" path="/jiemian/video/lists/:id" paramsDesc={['分类 id,见下表,可在对应分类页 URL 中找到']} radar="1"> - | [界面 Vnews](https://www.jiemian.com/video/lists/258_1.html) | [直播](https://www.jiemian.com/videoLive/lists_1.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | [面谈](https://www.jiemian.com/video/lists/111_1.html) | [品牌创酷](https://www.jiemian.com/video/lists/226_1.html) | [番 茄社](https://www.jiemian.com/video/lists/567_1.html) | - | ------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------- | - | 258\_1 | videoLive/lists\_1 | 195\_1 | 111\_1 | 226\_1 | 567\_1 | - - | [商业微史记](https://www.jiemian.com/video/lists/882_1.html) | - | ------------------------------------------------------------ | - | 882\_1 | -</Route> - -### 专题 {#jie-mian-xin-wen-zhuan-ti} - -<Route author="nczitzk" example="/jiemian/special/1192" path="/jiemian/special/lists/:id" paramsDesc={['分类 id,可在对应分类页 URL 中找到']} radar="1" /> - -## 经济观察网 {#jing-ji-guan-cha-wang} - -### 栏目 {#jing-ji-guan-cha-wang-lan-mu} - -<Route author="nczitzk" example="/eeo/yaowen/dashi" path="/eeo/:column?/:category?" paramsDesc={['栏目,见下表,默认为 商业产业', '分类,见下表,默认为该栏目下所有分类']}> - :::tip - 以下小标题即栏目 `column`,标题下表格中为对应栏目的分类 `category`,两者需要配合使用。 - - 如订阅 **时事・政策・宏观** 栏目中的 **大宗商品** 分类,填入 [`/eeo/yaowen/dzsp`](http://rsshub.app/eeo/yaowen/dzsp)。 - - 若栏目下没有分类,如 **商业产业** 栏目,直接填入 [`/eeo/shangyechanye`](http://rsshub.app/eeo/shangyechanye)。 - - 或者欲订阅该栏目下的所有分类,如订阅 **时事・政策・宏观** 中的所有分类,则直接将分类 `category` 留空,即 [`/eeo/yaowen`](http://rsshub.app/eeo/yaowen)。 - ::: - - 商业产业 shangyechanye [`/eeo/shangyechanye`](http://rsshub.app/eeo/shangyechanye) - - 财经 caijing [`/eeo/caijing`](http://rsshub.app/eeo/caijing) - - 上市公司 ssgsn [`/eeo/ssgsn`](http://rsshub.app/eeo/ssgsn) - - 地产 dichan [`/eeo/dichan`](http://rsshub.app/eeo/dichan) - - 汽车 qiche [`/eeo/qiche`](http://rsshub.app/eeo/qiche) - - TMT tmt [`/eeo/tmt`](http://rsshub.app/eeo/tmt) - - 评论 pinglun [`/eeo/pinglun`](http://rsshub.app/eeo/pinglun) - - 研究院 yanjiuyuan [`/eeo/yanjiuyuan`](http://rsshub.app/eeo/yanjiuyuan) - - :::tip[建议] - 请优先选择订阅以上栏目,下面的栏目大部分已经很久没有更新。 - ::: - - 两会 lianghui [`/eeo/lianghui`](http://rsshub.app/eeo/lianghui) - - 时事・政策・宏观 yaowen [`/eeo/yaowen`](http://rsshub.app/eeo/yaowen) - - | 时事 | 政策 | 宏观 | 智库 | 首席观点 | 大宗商品 | - | ----- | ------ | ------- | ---------- | -------- | -------- | - | dashi | hfggzc | hfshuju | hfdongjian | sxgd | dzsp | - - 证券・资本・理财 jinrong [`/eeo/jinrong`](http://rsshub.app/eeo/jinrong) - - | 债市 | 资本 | 理财 | 证券 | 银行 | - | ------- | ----- | ----- | --------- | ----- | - | zhaishi | ziben | licai | zhengquan | jijin | - - | 保险 | PE / 创投 | 科创板 | 新三板 | 互联网金融 | - | ------- | --------- | ----------- | --------- | ---------- | - | jinkong | chuangtou | kechuangban | xinsanban | hlwjr | - - 新科技・互联网・O2O shangye [`/eeo/shangye`](http://rsshub.app/eeo/shangye) - - | 新科技 | 互联网 | 大健康 | O2O | 花蕾之约 | 创业家笔记 | 环境 | - | ----------- | --------- | ------ | ----- | ------------ | ---------- | -------- | - | xinnengyuan | dianshang | yiliao | wuliu | hualeizhiyue | cyjbj | huanjing | - - 房产・汽车・消费 fcqcxf [`/eeo/fcqcxf`](http://rsshub.app/eeo/fcqcxf) - - | 房产 | 汽车 | 消费 | - | ------ | ----- | ------- | - | dichan | qiche | xiaofei | - - 影视・体育・娱乐 yule [`/eeo/yule`](http://rsshub.app/eeo/yule) - - | 娱乐 | 影视 | 体育 | 教育 | - | ---- | ------- | ---- | ------ | - | yule | yingshi | tiyu | jiaoyu | - - 观察家・书评・思想 gcj [`/eeo/gcj`](http://rsshub.app/eeo/gcj) - - | 观察家 | 专栏 | 个人历史 | 书评 | - | ---------- | -------- | -------- | ------- | - | guanchajia | zhuanlan | lishi | shuping | - - | 纵深 | 文化 | 领读 | - | -------- | ------ | ------ | - | zongshen | wenhua | lingdu | -</Route> - -### 分类资讯 {#jing-ji-guan-cha-wang-fen-lei-zi-xun} - -<Route author="epirus" example="/eeo/15" path="/eeo/:category" paramsDesc={['分类']}> - category 对应的关键词有 - - | 时事 | 政策 | 证券 | 资本 | 理财 | 新科技 | 大健康 | 房产 | 汽车 | 消费 | 影视 | 娱乐 | 体育 | 教育 | 观察家 | 专栏 | 书评 | 个人历史 | 宏观 | - | ---- | ---- | ---- | ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | -------- | ---- | - | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -</Route> - -## 靠谱新闻 {#kao-pu-xin-wen} - -### 新闻聚合 {#kao-pu-xin-wen-xin-wen-ju-he} - -<Route author="wushijishan nczitzk" example="/kaopunews/:language?" path="/kaopunews" paramsDesc={['语言,可选 zh-hans 即简体中文,或 zh-hant 即繁体中文']} /> +| 国内新闻 | 国际新闻 | 军事 | 台海 | 评论 | +| -------- | -------- | ---- | ------ | ------- | +| china | world | mil | taiwai | opinion | ## 客家電視台 {#ke-jia-dian-shi-tai} ### 新聞首頁 {#ke-jia-dian-shi-tai-xin-wen-shou-ye} -<Route author="TonyRL" example="/hakkatv/news" path="/hakkatv/news/:type?" paramsDesc={['新聞,見下表,留空為全部']} radar="1"> - | 客家焦點 | 政經要聞 | 民生醫療 | 地方風采 | 國際萬象 | - | -------- | --------- | -------- | -------- | ------------- | - | hakka | political | medical | local | international | -</Route> +<Route namespace="hakkatv" data={{"path":"/news/:type?","categories":["traditional-media"],"example":"/hakkatv/news","parameters":{"type":"新聞,見下表,留空為全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hakkatv.org.tw/news"],"target":"/news"},"name":"新聞首頁","maintainers":["TonyRL"],"url":"hakkatv.org.tw/news","description":"| 客家焦點 | 政經要聞 | 民生醫療 | 地方風采 | 國際萬象 |\n | -------- | --------- | -------- | -------- | ------------- |\n | hakka | political | medical | local | international |","location":"type.ts"}} /> + +| 客家焦點 | 政經要聞 | 民生醫療 | 地方風采 | 國際萬象 | +| -------- | --------- | -------- | -------- | ------------- | +| hakka | political | medical | local | international | ## 理论网 {#li-lun-wang} ### 学习时报 {#li-lun-wang-xue-xi-shi-bao} -<Route author="nczitzk" example="/cntheory/paper" path="/cntheory/paper/:id?" paramsDesc={['板块,默认为全部']}> - 如订阅 **第 A1 版:国内大局**,路由为 [`/cntheory/paper/国内大局`](https://rsshub.app/cntheory/paper/国内大局)。 -</Route> +<Route namespace="cntheory" data={{"path":"/paper/:id?","categories":["traditional-media"],"example":"/cntheory/paper","parameters":{"id":"板块,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"学习时报","maintainers":["nczitzk"],"description":"如订阅 **第 A1 版:国内大局**,路由为 [`/cntheory/paper/国内大局`](https://rsshub.app/cntheory/paper/国内大局)。","location":"paper.ts"}} /> + +如订阅 **第 A1 版:国内大局**,路由为 [`/cntheory/paper/国内大局`](https://rsshub.app/cntheory/paper/国内大局)。 ## 联合早报 {#lian-he-zao-bao} @@ -1513,868 +928,621 @@ This route adds the missing photo and Link element. (Offical RSS doesn't have Li 由于 [RSSHub#10309](https://github.com/DIYgod/RSSHub/issues/10309) 中的问题,使用靠近香港的服务器部署将从 hk 版联合早报爬取内容,造成输出的新闻段落顺序错乱。如有订阅此源的需求,建议寻求部署在远离香港的服务器上的 RSSHub,或者在自建时选择远离香港的服务器。 ::: +### 互动新闻 {#lian-he-zao-bao-hu-dong-xin-wen} + +<Route namespace="zaobao" data={{"path":"/interactive-graphics","categories":["traditional-media"],"example":"/zaobao/interactive-graphics","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"互动新闻","maintainers":["shunf4"],"location":"interactive.ts"}} /> + ### 即时新闻 {#lian-he-zao-bao-ji-shi-xin-wen} -<Route author="lengthmin" example="/zaobao/realtime/china" path="/zaobao/realtime/:section?" paramsDesc={['分类,缺省为 china']}> - | 中国 | 新加坡 | 国际 | 财经 | - | ----- | --------- | ----- | -------- | - | china | singapore | world | zfinance | -</Route> +<Route namespace="zaobao" data={{"path":"/realtime/:section?","categories":["traditional-media"],"example":"/zaobao/realtime/china","parameters":{"section":"分类,缺省为 china"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"即时新闻","maintainers":["shunf4"],"description":"| 中国 | 新加坡 | 国际 | 财经 |\n | ----- | --------- | ----- | -------- |\n | china | singapore | world | zfinance |","location":"realtime.ts"}} /> -### 新闻 {#lian-he-zao-bao-xin-wen} - -<Route author="lengthmin" example="/zaobao/znews/china" path="/zaobao/znews/:section?" paramsDesc={['分类,缺省为 china']}> - | 中国 | 新加坡 | 东南亚 | 国际 | 体育 | - | ----- | --------- | ------ | ----- | ------ | - | china | singapore | sea | world | sports | -</Route> +| 中国 | 新加坡 | 国际 | 财经 | +| ----- | --------- | ----- | -------- | +| china | singapore | world | zfinance | ### 其他栏目 {#lian-he-zao-bao-qi-ta-lan-mu} +<Route namespace="zaobao" data={{"path":"/:type?/:section?","categories":["traditional-media"],"example":"/zaobao/lifestyle/health","parameters":{"type":"https://www.zaobao.com/**lifestyle**/health 中的 **lifestyle**","section":"https://www.zaobao.com/lifestyle/**health** 中的 **health**"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"其他栏目","maintainers":["shunf4"],"description":"除了上面两个兼容规则之外,联合早报网站里所有页面形如 [https://www.zaobao.com/lifestyle/health](https://www.zaobao.com/lifestyle/health) 这样的栏目都能被这个规则解析到,早报的大部分栏目都是这个样式的。你可以测试之后再订阅。","location":"index.ts"}} /> + 除了上面两个兼容规则之外,联合早报网站里所有页面形如 [https://www.zaobao.com/lifestyle/health](https://www.zaobao.com/lifestyle/health) 这样的栏目都能被这个规则解析到,早报的大部分栏目都是这个样式的。你可以测试之后再订阅。 -<Route author="lengthmin" example="/zaobao/lifestyle/health" path="/zaobao/:type?/:section?" paramsDesc={['https://www.zaobao.com/**lifestyle**/health 中的 **lifestyle**', 'https://www.zaobao.com/lifestyle/**health** 中的 **health**']} notOperational="1" /> +### 新闻 {#lian-he-zao-bao-xin-wen} -### 互动新闻 {#lian-he-zao-bao-hu-dong-xin-wen} +<Route namespace="zaobao" data={{"path":"/znews/:section?","categories":["traditional-media"],"example":"/zaobao/znews/china","parameters":{"section":"分类,缺省为 china"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["shunf4"],"description":"| 中国 | 新加坡 | 东南亚 | 国际 | 体育 |\n | ----- | --------- | ------ | ----- | ------ |\n | china | singapore | sea | world | sports |","location":"znews.ts"}} /> -<Route author="shunf4" example="/zaobao/interactive-graphics" path="/zaobao/interactive-graphics" /> +| 中国 | 新加坡 | 东南亚 | 国际 | 体育 | +| ----- | --------- | ------ | ----- | ------ | +| china | singapore | sea | world | sports | ## 聯合新聞網 {#lian-he-xin-wen-wang} ### 即時新聞 {#lian-he-xin-wen-wang-ji-shi-xin-wen} -<Route author="miles170" example="/udn/news/breakingnews/99" path="/udn/news/breakingnews/:id" paramsDesc={['类别']} radar="1"> - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 99 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | - | 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 | -</Route> +<Route namespace="udn" data={{"path":"/news/breakingnews/:id","categories":["traditional-media"],"example":"/udn/news/breakingnews/99","parameters":{"id":"类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["udn.com/news/breaknews/1/:id","udn.com/"]},"name":"即時新聞","maintainers":["miles170"],"description":"| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 99 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ |\n | 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 |","location":"breaking-news.ts"}} /> + +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 99 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | +| 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 | ### 轉角國際 - 首頁 {#lian-he-xin-wen-wang-zhuan-jiao-guo-ji-shou-ye} -<Route author="emdoe nczitzk" example="/udn/global" path="/udn/global/:category?" paramsDesc={['分类,见下表,默认为首頁']}> - | 首頁 | 最新文章 | 熱門文章 | - | ---- | -------- | -------- | - | | new | hot | -</Route> +<Route namespace="udn" data={{"path":"/global/:category?","categories":["traditional-media"],"example":"/udn/global","parameters":{"category":"分类,见下表,默认为首頁"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["global.udn.com/global_vision/index/:category","global.udn.com/"]},"name":"轉角國際 - 首頁","maintainers":["nczitzk"],"description":"| 首頁 | 最新文章 | 熱門文章 |\n | ---- | -------- | -------- |\n | | new | hot |","location":"global/index.ts"}} /> + +| 首頁 | 最新文章 | 熱門文章 | +| ---- | -------- | -------- | +| | new | hot | ### 轉角國際 - 標籤 {#lian-he-xin-wen-wang-zhuan-jiao-guo-ji-biao-qian} -<Route author="nczitzk" example="/udn/global/tag/過去24小時" path="/udn/global/tag/:tag?" paramsDesc={['标签,可在对应标签页 URL 中找到']}> - | 過去 24 小時 | 鏡頭背後 | 深度專欄 | 重磅廣播 | - | ------------ | -------- | -------- | -------- | -</Route> +<Route namespace="udn" data={{"path":"/global/tag/:tag?","categories":["traditional-media"],"example":"/udn/global/tag/過去24小時","parameters":{"tag":"标签,可在对应标签页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["global.udn.com/search/tagging/1020/:tag","global.udn.com/"]},"name":"轉角國際 - 標籤","maintainers":["emdoe","nczitzk"],"description":"| 過去 24 小時 | 鏡頭背後 | 深度專欄 | 重磅廣播 |\n | ------------ | -------- | -------- | -------- |","location":"global/tag.ts"}} /> + +| 過去 24 小時 | 鏡頭背後 | 深度專欄 | 重磅廣播 | +| ------------ | -------- | -------- | -------- | ## 南方都市报 {#nan-fang-dou-shi-bao} ### 奥一网 {#nan-fang-dou-shi-bao-ao-yi-wang} -<Route author="TimWu007" example="/oeeee/web/170" path="/oeeee/web/:channel" paramsDesc={['频道 ID']}> - - 若在桌面端打开奥一网栏目页(如 `https://www.oeeee.com/api/channel.php?s=/index/index/channel/gz`),可查看该页源代码,搜索 `OECID`。 - - 若在移动端打开奥一网栏目页(格式例:`https://m.oeeee.com/m.php?s=/m2/channel&channel_id=169`),即可从 url 中获取。需注意的是,如果该栏目页的 url 格式为 `https://m.oeeee.com/detailChannel_indexData.html?channel_id=266` ,则 `266` 并非为本路由可用的频道 ID,建议从桌面端获取。 -</Route> +<Route namespace="oeeee" data={{"path":"/web/:channel","categories":["traditional-media"],"example":"/oeeee/web/170","parameters":{"channel":"频道 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"奥一网","maintainers":["TimWu007"],"description":"- 若在桌面端打开奥一网栏目页(如 `https://www.oeeee.com/api/channel.php?s=/index/index/channel/gz`),可查看该页源代码,搜索 `OECID`。\n - 若在移动端打开奥一网栏目页(格式例:`https://m.oeeee.com/m.php?s=/m2/channel&channel_id=169`),即可从 url 中获取。需注意的是,如果该栏目页的 url 格式为 `https://m.oeeee.com/detailChannel_indexData.html?channel_id=266` ,则 `266` 并非为本路由可用的频道 ID,建议从桌面端获取。","location":"web.ts"}} /> -### 南都客户端(按南都号 ID) {#nan-fang-dou-shi-bao-nan-dou-ke-hu-duan-an-nan-dou-hao-id} - -<Route author="TimWu007" example="/oeeee/app/channel/50" path="/oeeee/app/channel/:id?" paramsDesc={['南都号 ID']}> - 南都号的 UID 可通过 `m.mp.oeeee.com` 下的文章页面获取。点击文章上方的南都号头像,进入该南都号的个人主页,即可从 url 中获取。 -</Route> +- 若在桌面端打开奥一网栏目页(如 `https://www.oeeee.com/api/channel.php?s=/index/index/channel/gz`),可查看该页源代码,搜索 `OECID`。 +- 若在移动端打开奥一网栏目页(格式例:`https://m.oeeee.com/m.php?s=/m2/channel&channel_id=169`),即可从 url 中获取。需注意的是,如果该栏目页的 url 格式为 `https://m.oeeee.com/detailChannel_indexData.html?channel_id=266` ,则 `266` 并非为本路由可用的频道 ID,建议从桌面端获取。 ### 南都客户端(按记者) {#nan-fang-dou-shi-bao-nan-dou-ke-hu-duan-an-ji-zhe} -<Route author="TimWu007" example="/oeeee/app/reporter/249" path="/oeeee/app/reporter/:id" paramsDesc={['记者 UID']}> - 记者的 UID 可通过 `m.mp.oeeee.com` 下的文章页面获取。点击文章下方的作者头像,进入该作者的个人主页,即可从 url 中获取。 -</Route> +<Route namespace="oeeee" data={{"path":"/app/reporter/:id","categories":["traditional-media"],"example":"/oeeee/app/reporter/249","parameters":{"id":"记者 UID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"南都客户端(按记者)","maintainers":["TimWu007"],"description":"记者的 UID 可通过 `m.mp.oeeee.com` 下的文章页面获取。点击文章下方的作者头像,进入该作者的个人主页,即可从 url 中获取。","location":"app/reporter.ts"}} /> + +记者的 UID 可通过 `m.mp.oeeee.com` 下的文章页面获取。点击文章下方的作者头像,进入该作者的个人主页,即可从 url 中获取。 ## 南方网 {#nan-fang-wang} ### 南方 +(按栏目 ID) {#nan-fang-wang-nan-fang-an-lan-mu-id} -<Route author="TimWu007" example="/southcn/nfapp/column/38" path="/southcn/nfapp/column/:column?" paramsDesc={['栏目或南方号 ID']}> - :::tip - 若此处输入的是栏目 ID(而非南方号 ID),则该接口会返回与输入栏目相关联栏目的文章。例如,输入栏目 ID `38`(广州),则返回的结果还会包含 ID 为 `3547`(市长报道集)的文章。 - ::: +<Route namespace="southcn" data={{"path":"/nfapp/column/:column?","categories":["traditional-media"],"example":"/southcn/nfapp/column/38","parameters":{"column":"栏目或南方号 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"南方 +(按栏目 ID)","maintainers":["TimWu007"],"description":":::tip\n 若此处输入的是栏目 ID(而非南方号 ID),则该接口会返回与输入栏目相关联栏目的文章。例如,输入栏目 ID `38`(广州),则返回的结果还会包含 ID 为 `3547`(市长报道集)的文章。\n :::\n\n 1. `pc.nfapp.southcn.com` 下的文章页面,可通过 url 查看,例:`http://pc.nfapp.southcn.com/13707/7491109.html` 的栏目 ID 为 `13707`。\n 2. `static.nfapp.southcn.com` 下的文章页面,可查看网页源代码,搜索 `columnid`。\n 3. [https://m.nfapp.southcn.com/column/all](https://m.nfapp.southcn.com/column/all) 列出了部分栏目,`id` 即为栏目 ID。","location":"nfapp/column.ts"}} /> - 1. `pc.nfapp.southcn.com` 下的文章页面,可通过 url 查看,例:`http://pc.nfapp.southcn.com/13707/7491109.html` 的栏目 ID 为 `13707`。 - 2. `static.nfapp.southcn.com` 下的文章页面,可查看网页源代码,搜索 `columnid`。 - 3. [https://m.nfapp.southcn.com/column/all](https://m.nfapp.southcn.com/column/all) 列出了部分栏目,`id` 即为栏目 ID。 -</Route> +:::tip +若此处输入的是栏目 ID(而非南方号 ID),则该接口会返回与输入栏目相关联栏目的文章。例如,输入栏目 ID `38`(广州),则返回的结果还会包含 ID 为 `3547`(市长报道集)的文章。 +::: + +1. `pc.nfapp.southcn.com` 下的文章页面,可通过 url 查看,例:`http://pc.nfapp.southcn.com/13707/7491109.html` 的栏目 ID 为 `13707`。 +2. `static.nfapp.southcn.com` 下的文章页面,可查看网页源代码,搜索 `columnid`。 +3. [https://m.nfapp.southcn.com/column/all](https://m.nfapp.southcn.com/column/all) 列出了部分栏目,`id` 即为栏目 ID。 ### 南方 +(按作者) {#nan-fang-wang-nan-fang-an-zuo-zhe} -<Route author="TimWu007" example="/southcn/nfapp/reporter/969927791" path="/southcn/nfapp/reporter/:reporter" paramsDesc={['作者 UUID']} notOperational="1"> - 作者的 UUID 只可通过 `static.nfapp.southcn.com` 下的文章页面获取。点击文章下方的作者介绍,进入该作者的个人主页,即可从 url 中获取。 -</Route> +<Route namespace="southcn" data={{"path":"/nfapp/reporter/:reporter","categories":["traditional-media"],"example":"/southcn/nfapp/reporter/969927791","parameters":{"reporter":"作者 UUID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"南方 +(按作者)","maintainers":["TimWu007"],"description":"作者的 UUID 只可通过 `static.nfapp.southcn.com` 下的文章页面获取。点击文章下方的作者介绍,进入该作者的个人主页,即可从 url 中获取。","location":"nfapp/reporter.ts"}} /> -## 南方周末 {#nan-fang-zhou-mo} - -### 新闻分类 {#nan-fang-zhou-mo-xin-wen-fen-lei} - -<Route author="ranpox xyqfer" example="/infzm/2" path="/infzm/:id" paramsDesc={['南方周末内容分区 id, 可在该内容分区的 URL 中找到(即 https://www.infzm.com/contents?term_id=:id)']}> - 下面给出部分参考: - - | 推荐 | 新闻 | 观点 | 文化 | 人物 | 影像 | 专题 | 生活 | 视频 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 2 | 3 | 4 | 7 | 8 | 6 | 5 | 131 | -</Route> - -## 南湖清风 {#nan-hu-qing-feng} - -### 嘉兴日报 {#nan-hu-qing-feng-jia-xing-ri-bao} - -<Route author="nczitzk" example="/cnjxol/jxrb" path="/cnjxol/jxrb/:id?" paramsDesc={['编号,见下表,默认为全部']} anticrawler="1"> - | 版 | 编号 | - | -------------------- | ---- | - | 全部 | | - | 第 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 | -</Route> - -### 南湖晚报 {#nan-hu-qing-feng-nan-hu-wan-bao} - -<Route author="nczitzk" example="/cnjxol/nhwb" path="/cnjxol/nhwb/:id?" paramsDesc={['编号,见下表,默认为全部']} anticrawler="1"> - | 版 | 编号 | - | ------------------------------------ | ---- | - | 全部 | | - | 第 01 版:要闻 | 01 | - | 第 02 版:品质嘉兴・红船旁的美丽城镇 | 02 | - | 第 03 版:嘉兴新闻 | 03 | - | 第 04 版:嘉兴新闻 | 04 | - | 第 05 版:今日聚焦 | 05 | - | 第 06 版:嘉兴新闻 | 06 | - | 第 07 版:热线新闻 | 07 | - | 第 08 版:财经新闻 | 08 | - | 第 09 版:热线新闻 | 09 | - | 第 10 版:公益广告 | 10 | - | 第 11 版:消费周刊 | 11 | - | 第 12 版:悦读坊 | 12 | -</Route> +作者的 UUID 只可通过 `static.nfapp.southcn.com` 下的文章页面获取。点击文章下方的作者介绍,进入该作者的个人主页,即可从 url 中获取。 ## 内蒙古广播电视台 {#nei-meng-gu-guang-bo-dian-shi-tai} ### 点播 {#nei-meng-gu-guang-bo-dian-shi-tai-dian-bo} -<Route author="nczitzk" example="/nmtv/column/877" path="/nmtv/column/:id?" paramsDesc={['栏目 id,可在对应栏目 URL 中找到']}> - :::tip - 如 [蒙古语卫视新闻联播](http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877) 的 URL 为 `http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877`,其栏目 id 为末尾数字编号,即 `877`。可以得到其对应路由为 [`/nmtv/column/877`](https://rsshub.app/nmtv/column/877) - ::: -</Route> +<Route namespace="nmtv" data={{"path":"/column/:id?","categories":["traditional-media"],"example":"/nmtv/column/877","parameters":{"id":"栏目 id,可在对应栏目 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"点播","maintainers":["nczitzk"],"description":":::tip\n 如 [蒙古语卫视新闻联播](http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877) 的 URL 为 `http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877`,其栏目 id 为末尾数字编号,即 `877`。可以得到其对应路由为 [`/nmtv/column/877`](https://rsshub.app/nmtv/column/877)\n :::","location":"column.ts"}} /> + +:::tip +如 [蒙古语卫视新闻联播](http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877) 的 URL 为 `http://www.nmtv.cn/folder292/folder663/folder301/folder830/folder877`,其栏目 id 为末尾数字编号,即 `877`。可以得到其对应路由为 [`/nmtv/column/877`](https://rsshub.app/nmtv/column/877) +::: ## 澎湃新闻 {#peng-pai-xin-wen} 以下所有路由可使用参数`old`以采取旧全文获取方法。该方法会另外获取网页中的图片与视频资源。在原始 url 追加`?old=yes`以启用. -### 首页头条 {#peng-pai-xin-wen-shou-ye-tou-tiao} - -<Route author="HenryQW nczitzk bigfei" example="/thepaper/featured" path="/thepaper/featured" /> - -### 频道 {#peng-pai-xin-wen-pin-dao} - -<Route author="xyqfer nczitzk bigfei" example="/thepaper/channel/25950" path="/thepaper/channel/:id" paramsDesc={['频道 id,可在频道页 URL 中找到']}> - | 频道 ID | 频道名 | - | ------- | ------ | - | 26916 | 视频 | - | 108856 | 战疫 | - | 25950 | 时事 | - | 25951 | 财经 | - | 36079 | 澎湃号 | - | 119908 | 科技 | - | 25952 | 思想 | - | 119489 | 智库 | - | 25953 | 生活 | - | 26161 | 问吧 | - | 122908 | 国际 | - | -21 | 体育 | - | -24 | 评论 | -</Route> - ### 栏目 {#peng-pai-xin-wen-lan-mu} -<Route author="nczitzk bigfei" example="/thepaper/list/25457" path="/thepaper/list/:id" paramsDesc={['栏目 id,可在栏目页 URL 中找到']}> - | 栏目 ID | 栏目名 | - | ------- | ------------ | - | 26912 | 上直播 | - | 26913 | 七环视频 | - | 26965 | 温度计 | - | 26908 | 一级视场 | - | 27260 | World 湃 | - | 26907 | 湃客科技 | - | 33168 | 纪录湃 | - | 26911 | 围观 | - | 26918 | @所有人 | - | 26906 | 大都会 | - | 26909 | 追光灯 | - | 26910 | 运动装 | - | 26914 | 健寻记 | - | 82188 | AI 播报 | - | 89035 | 眼界 | - | 92278 | 关键帧 | - | 90069 | 战疫 | - | 25462 | 中国政库 | - | 25488 | 中南海 | - | 97924 | 初心之路 | - | 25489 | 舆论场 | - | 25490 | 打虎记 | - | 25423 | 人事风向 | - | 25426 | 法治中国 | - | 25424 | 一号专案 | - | 25463 | 港台来信 | - | 25491 | 长三角政商 | - | 25428 | 直击现场 | - | 68750 | 公益湃 | - | 27604 | 暖闻 | - | 25464 | 澎湃质量报告 | - | 25425 | 绿政公署 | - | 25429 | 澎湃国际 | - | 25481 | 外交学人 | - | 25430 | 澎湃防务 | - | 25678 | 唐人街 | - | 25427 | 澎湃人物 | - | 25422 | 浦江头条 | - | 25487 | 教育家 | - | 25634 | 全景现场 | - | 25635 | 美数课 | - | 25600 | 快看 | - | 25434 | 10% 公司 | - | 25436 | 能见度 | - | 25433 | 地产界 | - | 25438 | 财经上下游 | - | 25435 | 金改实验室 | - | 25437 | 牛市点线面 | - | 119963 | IPO 最前线 | - | 25485 | 澎湃商学院 | - | 25432 | 自贸区连线 | - | 37978 | 进博会在线 | - | 36079 | 湃客 | - | 27392 | 政务 | - | 77286 | 媒体 | - | 27234 | 科学湃 | - | 119445 | 生命科学 | - | 119447 | 未来 2% | - | 119446 | 元宇宙观察 | - | 119448 | 科创 101 | - | 119449 | 科学城邦 | - | 25444 | 社论 | - | 27224 | 澎湃评论 | - | 26525 | 思想湃 | - | 26878 | 上海书评 | - | 25483 | 思想市场 | - | 25457 | 私家历史 | - | 25574 | 翻书党 | - | 25455 | 艺术评论 | - | 26937 | 古代艺术 | - | 25450 | 文化课 | - | 25482 | 逝者 | - | 25536 | 专栏 | - | 26506 | 异次元 | - | 97313 | 海平面 | - | 103076 | 一问三知 | - | 25445 | 澎湃研究所 | - | 25446 | 全球智库 | - | 26915 | 城市漫步 | - | 25456 | 市政厅 | - | 104191 | 世界会客厅 | - | 25448 | 有戏 | - | 26609 | 文艺范 | - | 25942 | 身体 | - | 26015 | 私・奔 | - | 25599 | 运动家 | - | 25842 | 私家地理 | - | 80623 | 非常品 | - | 26862 | 楼市 | - | 25769 | 生活方式 | - | 25990 | 澎湃联播 | - | 26173 | 视界 | - | 26202 | 亲子学堂 | - | 26404 | 赢家 | - | 26490 | 汽车圈 | - | 115327 | IP SH | - | 117340 | 酒业 | -</Route> +<Route namespace="thepaper" data={{"path":"/list/:id","categories":["traditional-media"],"example":"/thepaper/list/25457","parameters":{"id":"栏目 id,可在栏目页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"栏目","maintainers":["nczitzk","bigfei"],"description":"| 栏目 ID | 栏目名 |\n | ------- | ------------ |\n | 26912 | 上直播 |\n | 26913 | 七环视频 |\n | 26965 | 温度计 |\n | 26908 | 一级视场 |\n | 27260 | World 湃 |\n | 26907 | 湃客科技 |\n | 33168 | 纪录湃 |\n | 26911 | 围观 |\n | 26918 | @所有人 |\n | 26906 | 大都会 |\n | 26909 | 追光灯 |\n | 26910 | 运动装 |\n | 26914 | 健寻记 |\n | 82188 | AI 播报 |\n | 89035 | 眼界 |\n | 92278 | 关键帧 |\n | 90069 | 战疫 |\n | 25462 | 中国政库 |\n | 25488 | 中南海 |\n | 97924 | 初心之路 |\n | 25489 | 舆论场 |\n | 25490 | 打虎记 |\n | 25423 | 人事风向 |\n | 25426 | 法治中国 |\n | 25424 | 一号专案 |\n | 25463 | 港台来信 |\n | 25491 | 长三角政商 |\n | 25428 | 直击现场 |\n | 68750 | 公益湃 |\n | 27604 | 暖闻 |\n | 25464 | 澎湃质量报告 |\n | 25425 | 绿政公署 |\n | 25429 | 澎湃国际 |\n | 25481 | 外交学人 |\n | 25430 | 澎湃防务 |\n | 25678 | 唐人街 |\n | 25427 | 澎湃人物 |\n | 25422 | 浦江头条 |\n | 25487 | 教育家 |\n | 25634 | 全景现场 |\n | 25635 | 美数课 |\n | 25600 | 快看 |\n | 25434 | 10% 公司 |\n | 25436 | 能见度 |\n | 25433 | 地产界 |\n | 25438 | 财经上下游 |\n | 25435 | 金改实验室 |\n | 25437 | 牛市点线面 |\n | 119963 | IPO 最前线 |\n | 25485 | 澎湃商学院 |\n | 25432 | 自贸区连线 |\n | 37978 | 进博会在线 |\n | 36079 | 湃客 |\n | 27392 | 政务 |\n | 77286 | 媒体 |\n | 27234 | 科学湃 |\n | 119445 | 生命科学 |\n | 119447 | 未来 2% |\n | 119446 | 元宇宙观察 |\n | 119448 | 科创 101 |\n | 119449 | 科学城邦 |\n | 25444 | 社论 |\n | 27224 | 澎湃评论 |\n | 26525 | 思想湃 |\n | 26878 | 上海书评 |\n | 25483 | 思想市场 |\n | 25457 | 私家历史 |\n | 25574 | 翻书党 |\n | 25455 | 艺术评论 |\n | 26937 | 古代艺术 |\n | 25450 | 文化课 |\n | 25482 | 逝者 |\n | 25536 | 专栏 |\n | 26506 | 异次元 |\n | 97313 | 海平面 |\n | 103076 | 一问三知 |\n | 25445 | 澎湃研究所 |\n | 25446 | 全球智库 |\n | 26915 | 城市漫步 |\n | 25456 | 市政厅 |\n | 104191 | 世界会客厅 |\n | 25448 | 有戏 |\n | 26609 | 文艺范 |\n | 25942 | 身体 |\n | 26015 | 私・奔 |\n | 25599 | 运动家 |\n | 25842 | 私家地理 |\n | 80623 | 非常品 |\n | 26862 | 楼市 |\n | 25769 | 生活方式 |\n | 25990 | 澎湃联播 |\n | 26173 | 视界 |\n | 26202 | 亲子学堂 |\n | 26404 | 赢家 |\n | 26490 | 汽车圈 |\n | 115327 | IP SH |\n | 117340 | 酒业 |","location":"list.ts"}} /> -### 侧边栏 {#peng-pai-xin-wen-ce-bian-lan} - -<Route author="bigfei" example="/thepaper/sidebar/hotNews" path="/thepaper/sidebar/sec?" paramsDesc={['边栏 id,如下, 默认hotNews']}> - | 边栏 ID | 边栏名 | - | ------------------------ | -------- | - | hotNews | 澎湃热榜 | - | financialInformationNews | 澎湃财讯 | - | morningEveningNews | 早晚报 | -</Route> +| 栏目 ID | 栏目名 | +| ------- | ------------ | +| 26912 | 上直播 | +| 26913 | 七环视频 | +| 26965 | 温度计 | +| 26908 | 一级视场 | +| 27260 | World 湃 | +| 26907 | 湃客科技 | +| 33168 | 纪录湃 | +| 26911 | 围观 | +| 26918 | @所有人 | +| 26906 | 大都会 | +| 26909 | 追光灯 | +| 26910 | 运动装 | +| 26914 | 健寻记 | +| 82188 | AI 播报 | +| 89035 | 眼界 | +| 92278 | 关键帧 | +| 90069 | 战疫 | +| 25462 | 中国政库 | +| 25488 | 中南海 | +| 97924 | 初心之路 | +| 25489 | 舆论场 | +| 25490 | 打虎记 | +| 25423 | 人事风向 | +| 25426 | 法治中国 | +| 25424 | 一号专案 | +| 25463 | 港台来信 | +| 25491 | 长三角政商 | +| 25428 | 直击现场 | +| 68750 | 公益湃 | +| 27604 | 暖闻 | +| 25464 | 澎湃质量报告 | +| 25425 | 绿政公署 | +| 25429 | 澎湃国际 | +| 25481 | 外交学人 | +| 25430 | 澎湃防务 | +| 25678 | 唐人街 | +| 25427 | 澎湃人物 | +| 25422 | 浦江头条 | +| 25487 | 教育家 | +| 25634 | 全景现场 | +| 25635 | 美数课 | +| 25600 | 快看 | +| 25434 | 10% 公司 | +| 25436 | 能见度 | +| 25433 | 地产界 | +| 25438 | 财经上下游 | +| 25435 | 金改实验室 | +| 25437 | 牛市点线面 | +| 119963 | IPO 最前线 | +| 25485 | 澎湃商学院 | +| 25432 | 自贸区连线 | +| 37978 | 进博会在线 | +| 36079 | 湃客 | +| 27392 | 政务 | +| 77286 | 媒体 | +| 27234 | 科学湃 | +| 119445 | 生命科学 | +| 119447 | 未来 2% | +| 119446 | 元宇宙观察 | +| 119448 | 科创 101 | +| 119449 | 科学城邦 | +| 25444 | 社论 | +| 27224 | 澎湃评论 | +| 26525 | 思想湃 | +| 26878 | 上海书评 | +| 25483 | 思想市场 | +| 25457 | 私家历史 | +| 25574 | 翻书党 | +| 25455 | 艺术评论 | +| 26937 | 古代艺术 | +| 25450 | 文化课 | +| 25482 | 逝者 | +| 25536 | 专栏 | +| 26506 | 异次元 | +| 97313 | 海平面 | +| 103076 | 一问三知 | +| 25445 | 澎湃研究所 | +| 25446 | 全球智库 | +| 26915 | 城市漫步 | +| 25456 | 市政厅 | +| 104191 | 世界会客厅 | +| 25448 | 有戏 | +| 26609 | 文艺范 | +| 25942 | 身体 | +| 26015 | 私・奔 | +| 25599 | 运动家 | +| 25842 | 私家地理 | +| 80623 | 非常品 | +| 26862 | 楼市 | +| 25769 | 生活方式 | +| 25990 | 澎湃联播 | +| 26173 | 视界 | +| 26202 | 亲子学堂 | +| 26404 | 赢家 | +| 26490 | 汽车圈 | +| 115327 | IP SH | +| 117340 | 酒业 | ### 明查 {#peng-pai-xin-wen-ming-cha} -<Route author="nczitzk" example="/thepaper/factpaper" path="/thepaper/factpaper/:status?" paramsDesc={['状态 id,可选 `1` 即 有定论 或 `0` 即 核查中,默认为 `1`']} /> +<Route namespace="thepaper" data={{"path":"/factpaper/:status?","categories":["traditional-media"],"example":"/thepaper/factpaper","parameters":{"status":"状态 id,可选 `1` 即 有定论 或 `0` 即 核查中,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["factpaper.cn/"],"target":"/factpaper/:status"},"name":"明查","maintainers":["nczitzk"],"url":"factpaper.cn/","location":"factpaper.ts"}} /> -### 澎湃美数组作品集 {#peng-pai-xin-wen-peng-pai-mei-shu-zu-zuo-pin-ji} +### 频道 {#peng-pai-xin-wen-pin-dao} -<Route author="umm233" example="/thepaper/839studio/2" path="/thepaper/839studio/:id?" paramsDesc={['分类 id 可选,默认订阅全部分类']}> - | 视频 | 交互 | 信息图 | 数据故事 | - | ---- | ---- | ------ | -------- | - | 2 | 4 | 3 | 453 | -</Route> +<Route namespace="thepaper" data={{"path":"/channel/:id","categories":["traditional-media"],"example":"/thepaper/channel/25950","parameters":{"id":"频道 id,可在频道页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"频道","maintainers":["xyqfer","nczitzk","bigfei"],"description":"| 频道 ID | 频道名 |\n | ------- | ------ |\n | 26916 | 视频 |\n | 108856 | 战疫 |\n | 25950 | 时事 |\n | 25951 | 财经 |\n | 36079 | 澎湃号 |\n | 119908 | 科技 |\n | 25952 | 思想 |\n | 119489 | 智库 |\n | 25953 | 生活 |\n | 26161 | 问吧 |\n | 122908 | 国际 |\n | -21 | 体育 |\n | -24 | 评论 |","location":"channel.ts"}} /> -## 齐鲁网 {#qi-lu-wang} +| 频道 ID | 频道名 | +| ------- | ------ | +| 26916 | 视频 | +| 108856 | 战疫 | +| 25950 | 时事 | +| 25951 | 财经 | +| 36079 | 澎湃号 | +| 119908 | 科技 | +| 25952 | 思想 | +| 119489 | 智库 | +| 25953 | 生活 | +| 26161 | 问吧 | +| 122908 | 国际 | +| -21 | 体育 | +| -24 | 评论 | -### 电视节目 {#qi-lu-wang-dian-shi-jie-mu} +### 首页头条 {#peng-pai-xin-wen-shou-ye-tou-tiao} -<Route author="nczitzk" example="/iqilu/v/sdws/sdxwlb" path="/iqilu/v/:category?" paramsDesc={['节目 id,可在对应节目页 URL 中找到,见下表,默认为 `sdws/sdxwlb`,即山东新闻联播']} radar="1" supportPodcast="1" anticrawler="1"> - | 节目名称 | 节目 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 | -</Route> +<Route namespace="thepaper" data={{"path":"/featured","categories":["traditional-media"],"example":"/thepaper/featured","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["thepaper.cn/"]},"name":"首页头条","maintainers":["HenryQW","nczitzk","bigfei"],"url":"thepaper.cn/","location":"featured.ts"}} /> ## 人民网 {#ren-min-wang} -### 通用 {#ren-min-wang-tong-yong} +### 领导留言板 {#ren-min-wang-ling-dao-liu-yan-ban} -<Route author="nczitzk" example="/people" path="/people/:site?/:category?" paramsDesc={['站点,可在对应站点 URL 中找到', '分类,可在对应分类页中找到']}> - 订阅 **单级** 栏目如 [滚动 -- 生态 -- 人民网](http://env.people.com.cn/GB/74877/index.html) 分类栏目,分为 3 步: +<Route namespace="people" data={{"path":"/liuyan/:id/:state?","categories":["traditional-media"],"example":"/people/liuyan/539","parameters":{"id":"编号,可在对应人物页 URL 中找到","state":"状态,见下表,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["liuyan.people.com.cn/"]},"name":"领导留言板","maintainers":["nczitzk"],"url":"liuyan.people.com.cn/","description":"| 全部 | 待回复 | 办理中 | 已办理 |\n | ---- | ------ | ------ | ------ |\n | 1 | 2 | 3 | 4 |","location":"liuyan.ts"}} /> - 1. 将 URL `http://env.people.com.cn/GB/74877/index.html` 中 `http://` 与 `.people.com.cn/` 中间的 `env` 作为 `site` 参数填入; - 2. 将 `http://env.people.com.cn/GB/` 与 `/index.html` 间的 `74877` 作为 `category` 参数填入; - 3. 最终可获得 [`/people/env/74877`](https://rsshub.app/people/env/74877)。 - - 订阅 **多级** 栏目如 [经济观察 -- 观点 -- 人民网](http://opinion.people.com.cn/GB/427456/434878/index.html) 分类栏目,同样分为 3 步: - - 1. 将 URL `http://opinion.people.com.cn/GB/427456/434878/index.html` 中 `http://` 与 `.people.com.cn/` 中间的 `opinion` 作为 `site` 参数填入; - 2. 把 `http://opinion.people.com.cn/GB/` 与 `/index.html` 间 `427456/434878` 作为 `category` 参数填入; - 3. 最终可获得 [`/people/opinion/427456/434878`](https://rsshub.app/people/opinion/427456/434878)。 - - :::tip - 人民网大部分站点支持上述通用规则进行订阅。 - ::: -</Route> +| 全部 | 待回复 | 办理中 | 已办理 | +| ---- | ------ | ------ | ------ | +| 1 | 2 | 3 | 4 | ### 习近平系列重要讲话 {#ren-min-wang-xi-jin-ping-xi-lie-zhong-yao-jiang-hua} -<Route author="LogicJake" example="/people/xjpjh" path="/people/xjpjh/:keyword?/:year?" paramsDesc={['关键词,默认不填','年份,默认 all']} /> - -### 中国共产党新闻网 24 小时滚动新闻 {#ren-min-wang-zhong-guo-gong-chan-dang-xin-wen-wang-24-xiao-shi-gun-dong-xin-wen} - -<Route author="nczitzk" example="/people/cpc/24h" path="/people/cpc/24h" /> - -### 领导留言板 {#ren-min-wang-ling-dao-liu-yan-ban} - -<Route author="nczitzk" example="/people/liuyan/539" path="/people/liuyan/:id/:state?" paramsDesc={['编号,可在对应人物页 URL 中找到', '状态,见下表,默认为全部']}> - | 全部 | 待回复 | 办理中 | 已办理 | - | ---- | ------ | ------ | ------ | - | 1 | 2 | 3 | 4 | -</Route> +<Route namespace="people" data={{"path":"/xjpjh/:keyword?/:year?","categories":["traditional-media"],"example":"/people/xjpjh","parameters":{"keyword":"关键词,默认不填","year":"年份,默认 all"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["people.com.cn/"],"target":"/:site?/:category?"},"name":"习近平系列重要讲话","maintainers":[],"url":"people.com.cn/","location":"xjpjh.ts"}} /> ## 三立新聞網 {#san-li-xin-wen-wang} ### 新聞 {#san-li-xin-wen-wang-xin-wen} -<Route author="nczitzk" example="/setn" path="/setn/:category?" paramsDesc={['分类,见下表,默认为即時']}> - | 即時 | 熱門 | 娛樂 | 政治 | 社會 | - | ---- | ---- | ---- | ---- | ---- | +<Route namespace="setn" data={{"path":"/:category?","categories":["traditional-media"],"example":"/setn","parameters":{"category":"分类,见下表,默认为即時"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["setn.com/ViewAll.aspx","setn.com/"],"target":""},"name":"新聞","maintainers":["nczitzk"],"url":"setn.com/ViewAll.aspx","description":"| 即時 | 熱門 | 娛樂 | 政治 | 社會 |\n | ---- | ---- | ---- | ---- | ---- |\n\n | 國際 | 兩岸 | 生活 | 健康 | 旅遊 |\n | ---- | ---- | ---- | ---- | ---- |\n\n | 運動 | 地方 | 財經 | 富房網 | 名家 |\n | ---- | ---- | ---- | ------ | ---- |\n\n | 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 |\n | ---- | ---- | ---- | ---- | ---- | -------- |","location":"index.ts"}} /> - | 國際 | 兩岸 | 生活 | 健康 | 旅遊 | - | ---- | ---- | ---- | ---- | ---- | +| 即時 | 熱門 | 娛樂 | 政治 | 社會 | +| ---- | ---- | ---- | ---- | ---- | - | 運動 | 地方 | 財經 | 富房網 | 名家 | - | ---- | ---- | ---- | ------ | ---- | +| 國際 | 兩岸 | 生活 | 健康 | 旅遊 | +| ---- | ---- | ---- | ---- | ---- | - | 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 | - | ---- | ---- | ---- | ---- | ---- | -------- | -</Route> +| 運動 | 地方 | 財經 | 富房網 | 名家 | +| ---- | ---- | ---- | ------ | ---- | -## 三联生活周刊 {#san-lian-sheng-huo-zhou-kan} - -### 栏目 {#san-lian-sheng-huo-zhou-kan-lan-mu} - -提取文章全文,获得更好的阅读体验。支持所有频道,频道名称见 [杂志栏目](https://www.lifeweek.com.cn/classify?type=2)。例如 [调查栏目](https://www.lifeweek.com.cn/column/9) URL 最后的数字为栏目 ID - -<Route author="changren-wcr" example="/lifeweek/channel/9" path="/lifeweek/channel/:channel" paramsDesc={['栏目 ID']}> - | 调查 | 热点 | 人物 | 社会 | 经济 | 文化 | - | ---- | ---- | ---- | ---- | ---- | ---- | - | 9 | 6 | 10 | 2 | 3 | 4 | -</Route> - -### 标签 {#san-lian-sheng-huo-zhou-kan-biao-qian} - -提取文章全文,获得更好的阅读体验。支持所有标签,标签名称见 [全部标签](https://www.lifeweek.com.cn/classify?type=1)。例如 [社会调查标签](https://www.lifeweek.com.cn/articleList/122) URL 最后的数字为标签 ID - -<Route author="changren-wcr" example="/lifeweek/tag/122" path="/lifeweek/tag/:tag" paramsDesc={['标签 ID']}> - | 社会调查 | 社会 | 经济 | 理财 | 热点 | - | -------- | ---- | ---- | ---- | ---- | - | 122 | 21 | 73 | 74 | 123 | -</Route> +| 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 | +| ---- | ---- | ---- | ---- | ---- | -------- | ## 厦门网 {#xia-men-wang} ### 数字媒体 {#xia-men-wang-shu-zi-mei-ti} -<Route author="nczitzk" example="/xmnn/epaper/xmrb" path="/xmnn/epaper/:id?" paramsDesc={['报纸 id,见下表,默认为 `xmrb`,即厦门日报']} radar="1"> - | 厦门日报 | 厦门晚报 | 海西晨报 | 城市捷报 | - | -------- | -------- | -------- | -------- | - | xmrb | xmwb | hxcb | csjb | -</Route> +<Route namespace="xmnn" data={{"path":"/epaper/:id?","categories":["traditional-media"],"example":"/xmnn/epaper/xmrb","parameters":{"id":"报纸 id,见下表,默认为 `xmrb`,即厦门日报"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["epaper.xmnn.cn/:id"],"target":"/epaper/:id"},"name":"数字媒体","maintainers":["nczitzk"],"description":"| 厦门日报 | 厦门晚报 | 海西晨报 | 城市捷报 |\n | -------- | -------- | -------- | -------- |\n | xmrb | xmwb | hxcb | csjb |","location":"epaper.ts"}} /> -### 新闻 {#xia-men-wang-xin-wen} - -<Route author="nczitzk" example="/xmnn/news/xmxw" path="/xmnn/news/:category?" paramsDesc={['分类 id,见下表,默认为厦门新闻']} radar="1"> - | 分类名 | 分类 id | - | ------------ | ------- | - | 厦门新闻发布 | xmxwfb | - | 厦门新闻 | xmxw | - | 本网快报 | bwkb | - | 厦门网眼 | xmwy | - | 福建新闻 | fjxw | - | 国内新闻 | gnxw | - | 国际新闻 | gjxw | - | 台海新闻 | thxw | - | 社会新闻 | shxw | -</Route> +| 厦门日报 | 厦门晚报 | 海西晨报 | 城市捷报 | +| -------- | -------- | -------- | -------- | +| xmrb | xmwb | hxcb | csjb | ## 四川广播电视台 {#si-chuan-guang-bo-dian-shi-tai} ### 电视回放 {#si-chuan-guang-bo-dian-shi-tai-dian-shi-hui-fang} -<Route author="nczitzk" example="/sctv/programme/1" path="/sctv/programme/:id?/:limit?/:isFull?" paramsDesc={['节目 id,可在对应节目页中找到,默认为 `1`,即四川新闻联播', '期数,默认为 15,即单次获取最新 15 期', '是否仅获取完整视频,填写 true/yes 表示是、false/no 表示否,默认是']}> - :::tip - 参数 **是否仅获取完整视频** 设置为 `true` `yes` `t` `y` 等值后,路由仅返回当期节目的完整视频,而不会返回节目所提供的节选视频。 +<Route namespace="sctv" data={{"path":"/programme/:id?/:limit?/:isFull?","categories":["traditional-media"],"example":"/sctv/programme/1","parameters":{"id":"节目 id,可在对应节目页中找到,默认为 `1`,即四川新闻联播","limit":"期数,默认为 15,即单次获取最新 15 期","isFull":"是否仅获取完整视频,填写 true/yes 表示是、false/no 表示否,默认是"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"电视回放","maintainers":["nczitzk"],"description":":::tip\n 参数 **是否仅获取完整视频** 设置为 `true` `yes` `t` `y` 等值后,路由仅返回当期节目的完整视频,而不会返回节目所提供的节选视频。\n\n 查看更多电视节目请前往 [电视回放](https://www.sctv.com/column/list)\n :::\n\n | 节目 | id |\n | ---------------------- | ------- |\n | 四川新闻联播 | 1 |\n | 早安四川 | 2 |\n | 今日视点 | 3 |\n | 龙门阵摆四川 | 10523 |\n | 非常话题 | 1014756 |\n | 新闻现场 | 8385 |\n | 黄金三十分 | 8386 |\n | 全媒直播间 | 8434 |\n | 晚报十点半 | 8435 |\n | 现场快报 | 8436 |\n | 四川乡村新闻 | 3673 |\n | 四川文旅报道 | 8174 |\n | 乡村会客厅 | 3674 |\n | 金字招牌 | 3675 |\n | 问您所 “?” | 3677 |\n | 蜀你最能 | 3679 |\n | 美丽乡村印象 | 3678 |\n | 美丽乡村 | 3676 |\n | 乡村大篷车 | 3680 |\n | 华西论健 | 3681 |\n | 乡村聚乐部 | 3682 |\n | 医保近距离 | 6403 |\n | 音你而来 | 7263 |\n | 吃八方 | 7343 |\n | 世界那么大 | 7344 |\n | 风云川商 | 7345 |\n | 麻辣烫 | 7346 |\n | 财经快报 | 7473 |\n | 医生来了 | 7873 |\n | 安逸的旅途 | 8383 |\n | 运动 + | 8433 |\n | 好戏连台 | 9733 |\n | 防癌大讲堂 | 1018673 |\n | 消费新观察 | 1017153 |\n | 天天耍大牌 | 1014753 |\n | 廉洁四川 | 1014754 |\n | 看世界 | 1014755 |\n | 金熊猫说教育(资讯版) | 1014757 |\n | 她说 | 1014759 |\n | 嗨宝贝 | 1014762 |\n | 萌眼看世界 | 1014764 |\n | 乡村大讲堂 | 1014765 |\n | 四川党建 | 1014766 |\n | 健康四川 | 1014767 |\n | 技能四川 | 12023 |","location":"programme.ts"}} /> - 查看更多电视节目请前往 [电视回放](https://www.sctv.com/column/list) - ::: +:::tip +参数 **是否仅获取完整视频** 设置为 `true` `yes` `t` `y` 等值后,路由仅返回当期节目的完整视频,而不会返回节目所提供的节选视频。 - | 节目 | id | - | ---------------------- | ------- | - | 四川新闻联播 | 1 | - | 早安四川 | 2 | - | 今日视点 | 3 | - | 龙门阵摆四川 | 10523 | - | 非常话题 | 1014756 | - | 新闻现场 | 8385 | - | 黄金三十分 | 8386 | - | 全媒直播间 | 8434 | - | 晚报十点半 | 8435 | - | 现场快报 | 8436 | - | 四川乡村新闻 | 3673 | - | 四川文旅报道 | 8174 | - | 乡村会客厅 | 3674 | - | 金字招牌 | 3675 | - | 问您所 “?” | 3677 | - | 蜀你最能 | 3679 | - | 美丽乡村印象 | 3678 | - | 美丽乡村 | 3676 | - | 乡村大篷车 | 3680 | - | 华西论健 | 3681 | - | 乡村聚乐部 | 3682 | - | 医保近距离 | 6403 | - | 音你而来 | 7263 | - | 吃八方 | 7343 | - | 世界那么大 | 7344 | - | 风云川商 | 7345 | - | 麻辣烫 | 7346 | - | 财经快报 | 7473 | - | 医生来了 | 7873 | - | 安逸的旅途 | 8383 | - | 运动 + | 8433 | - | 好戏连台 | 9733 | - | 防癌大讲堂 | 1018673 | - | 消费新观察 | 1017153 | - | 天天耍大牌 | 1014753 | - | 廉洁四川 | 1014754 | - | 看世界 | 1014755 | - | 金熊猫说教育(资讯版) | 1014757 | - | 她说 | 1014759 | - | 嗨宝贝 | 1014762 | - | 萌眼看世界 | 1014764 | - | 乡村大讲堂 | 1014765 | - | 四川党建 | 1014766 | - | 健康四川 | 1014767 | - | 技能四川 | 12023 | -</Route> +查看更多电视节目请前往 [电视回放](https://www.sctv.com/column/list) +::: + +| 节目 | id | +| ---------------------- | ------- | +| 四川新闻联播 | 1 | +| 早安四川 | 2 | +| 今日视点 | 3 | +| 龙门阵摆四川 | 10523 | +| 非常话题 | 1014756 | +| 新闻现场 | 8385 | +| 黄金三十分 | 8386 | +| 全媒直播间 | 8434 | +| 晚报十点半 | 8435 | +| 现场快报 | 8436 | +| 四川乡村新闻 | 3673 | +| 四川文旅报道 | 8174 | +| 乡村会客厅 | 3674 | +| 金字招牌 | 3675 | +| 问您所 “?” | 3677 | +| 蜀你最能 | 3679 | +| 美丽乡村印象 | 3678 | +| 美丽乡村 | 3676 | +| 乡村大篷车 | 3680 | +| 华西论健 | 3681 | +| 乡村聚乐部 | 3682 | +| 医保近距离 | 6403 | +| 音你而来 | 7263 | +| 吃八方 | 7343 | +| 世界那么大 | 7344 | +| 风云川商 | 7345 | +| 麻辣烫 | 7346 | +| 财经快报 | 7473 | +| 医生来了 | 7873 | +| 安逸的旅途 | 8383 | +| 运动 + | 8433 | +| 好戏连台 | 9733 | +| 防癌大讲堂 | 1018673 | +| 消费新观察 | 1017153 | +| 天天耍大牌 | 1014753 | +| 廉洁四川 | 1014754 | +| 看世界 | 1014755 | +| 金熊猫说教育(资讯版) | 1014757 | +| 她说 | 1014759 | +| 嗨宝贝 | 1014762 | +| 萌眼看世界 | 1014764 | +| 乡村大讲堂 | 1014765 | +| 四川党建 | 1014766 | +| 健康四川 | 1014767 | +| 技能四川 | 12023 | ## 天下雜誌 {#tian-xia-za-zhi} -### 最新上線 {#tian-xia-za-zhi-zui-xin-shang-xian} - -<Route author="TonyRL" example="/cw/today" path="/cw/today" radar="1" puppeteer="1" /> - ### 主頻道 {#tian-xia-za-zhi-zhu-bin-dao} -<Route author="TonyRL" example="/cw/master/8" path="/cw/master/:channel" paramsDesc={['主頻道 ID,可在 URL 中找到']} radar="1" puppeteer="1"> - | 主頻道名稱 | 主頻道 ID | - | ---------- | --------- | - | 財經 | 8 | - | 產業 | 7 | - | 國際 | 9 | - | 管理 | 10 | - | 環境 | 12 | - | 教育 | 13 | - | 人物 | 14 | - | 政治社會 | 77 | - | 調查排行 | 15 | - | 健康關係 | 79 | - | 時尚品味 | 11 | - | 運動生活 | 103 | - | 重磅外媒 | 16 | -</Route> +<Route namespace="cw" data={{"path":"/master/:channel","categories":["traditional-media"],"example":"/cw/master/8","parameters":{"channel":"主頻道 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"主頻道","maintainers":["TonyRL"],"description":"| 主頻道名稱 | 主頻道 ID |\n | ---------- | --------- |\n | 財經 | 8 |\n | 產業 | 7 |\n | 國際 | 9 |\n | 管理 | 10 |\n | 環境 | 12 |\n | 教育 | 13 |\n | 人物 | 14 |\n | 政治社會 | 77 |\n | 調查排行 | 15 |\n | 健康關係 | 79 |\n | 時尚品味 | 11 |\n | 運動生活 | 103 |\n | 重磅外媒 | 16 |","location":"master.ts"}} /> + +| 主頻道名稱 | 主頻道 ID | +| ---------- | --------- | +| 財經 | 8 | +| 產業 | 7 | +| 國際 | 9 | +| 管理 | 10 | +| 環境 | 12 | +| 教育 | 13 | +| 人物 | 14 | +| 政治社會 | 77 | +| 調查排行 | 15 | +| 健康關係 | 79 | +| 時尚品味 | 11 | +| 運動生活 | 103 | +| 重磅外媒 | 16 | ### 子頻道 {#tian-xia-za-zhi-zi-bin-dao} -<Route author="TonyRL" example="/cw/sub/615" path="/cw/sub/:channel" paramsDesc={['子頻道 ID,可在 URL 中找到']} radar="1" puppeteer="1" anticrawler="1" /> +<Route namespace="cw" data={{"path":"/sub/:channel","categories":["traditional-media"],"example":"/cw/sub/615","parameters":{"channel":"子頻道 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"子頻道","maintainers":["TonyRL"],"location":"sub.ts"}} /> + +### 最新上線 {#tian-xia-za-zhi-zui-xin-shang-xian} + +<Route namespace="cw" data={{"path":"/today","categories":["traditional-media"],"example":"/cw/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cw.com.tw/today","cw.com.tw/"]},"name":"最新上線","maintainers":["TonyRL"],"url":"cw.com.tw/today","location":"today.ts"}} /> ### 作者 {#tian-xia-za-zhi-zuo-zhe} -<Route author="TonyRL" example="/cw/author/57" path="/cw/author/:channel" paramsDesc={['作者 ID,可在 URL 中找到']} radar="1" puppeteer="1" anticrawler="1" /> - -## 文汇报 {#wen-hui-bao} - -### 分类 {#wen-hui-bao-fen-lei} - -<Route author="hoilc" example="/whb/bihui" path="/whb/:category" paramsDesc={['文汇报分类名,可在该分类的 URL 中找到(即 http://www.whb.cn/zhuzhan/:category/index.html)']} /> +<Route namespace="cw" data={{"path":"/author/:channel","categories":["traditional-media"],"example":"/cw/author/57","parameters":{"channel":"作者 ID,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cw.com.tw/author/:channel"]},"name":"作者","maintainers":["TonyRL"],"location":"author.ts"}} /> ## 无线新闻 {#wu-xian-xin-wen} ### 新闻 {#wu-xian-xin-wen-xin-wen} -<Route author="nczitzk" example="/tvb/news" path="/tvb/news/:category?/:language?" paramsDesc={['分类,见下表,默认为要聞', '语言,见下表']}> - 分类 +<Route namespace="tvb" data={{"path":"/news/:category?/:language?","categories":["traditional-media"],"example":"/tvb/news","parameters":{"category":"分类,见下表,默认为要聞","language":"语言,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tvb.com/:language/:category","tvb.com/"]},"name":"新闻","maintainers":["nczitzk"],"description":"分类\n\n | 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 |\n | ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- |\n | focus | instant | local | greaterchina | world | finance | sports | parliament | weather |\n\n 语言\n\n | 繁 | 简 |\n | -- | -- |\n | tc | sc |","location":"news.ts"}} /> - | 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 | - | ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- | - | focus | instant | local | greaterchina | world | finance | sports | parliament | weather | +分类 - 语言 +| 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 | +| ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- | +| focus | instant | local | greaterchina | world | finance | sports | parliament | weather | - | 繁 | 简 | - | -- | -- | - | tc | sc | -</Route> +语言 + +| 繁 | 简 | +| -- | -- | +| tc | sc | ## 希望之声 {#xi-wang-zhi-sheng} ### 频道 {#xi-wang-zhi-sheng-pin-dao} -<Route author="Fatpandac" example="/soundofhope/term/203" path="/soundofhope/:channel/:id" paramsDesc={['频道', '子频道 ID']} anticrawler="1"> - 参数均可在官网获取,如: +<Route namespace="soundofhope" data={{"path":"/:channel/:id","categories":["traditional-media"],"example":"/soundofhope/term/203","parameters":{"channel":"频道","id":"子频道 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["soundofhope.org/:channel/:id"]},"name":"频道","maintainers":["Fatpandac"],"description":"参数均可在官网获取,如:\n\n `https://www.soundofhope.org/term/203` 对应 `/soundofhope/term/203`","location":"channel.ts"}} /> - `https://www.soundofhope.org/term/203` 对应 `/soundofhope/term/203` -</Route> +参数均可在官网获取,如: + +`https://www.soundofhope.org/term/203` 对应 `/soundofhope/term/203` ## 香港经济日报 {#xiang-gang-jing-ji-ri-bao} ### 新闻 {#xiang-gang-jing-ji-ri-bao-xin-wen} +<Route namespace="hket" data={{"path":"/:category?","categories":["traditional-media"],"example":"/hket/sran001","parameters":{"category":"分类,默认为全部新闻,可在 URL 中找到,部分见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.hket.com/"],"target":""},"name":"新闻","maintainers":["TonyRL"],"url":"www.hket.com/","description":"香港经济日报已有提供简单 RSS,详细可前往官方网站: [https://www.hket.com/rss](https://www.hket.com/rss)\n\n此路由主要补全官方 RSS 全文输出及完善分类输出。\n\n <details>\n <summary>分类</summary>\n\n | sran001 | sran008 | sran010 | sran011 | sran012 | srat006 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 全部新闻 | 财经地产 | 科技信息 | 国际新闻 | 商业新闻 | 香港新闻 |\n\n | sran009 | sran009-1 | sran009-2 | sran009-3 | sran009-4 | sran009-5 | sran009-6 |\n | -------- | --------- | --------- | ---------- | --------- | --------- | --------- |\n | 即时财经 | 股市 | 新股 IPO | 新经济追踪 | 当炒股 | 宏观解读 | Hot Talk |\n\n | sran011-1 | sran011-2 | sran011-3 |\n | --------- | ------------ | ------------ |\n | 环球政治 | 环球经济金融 | 环球社会热点 |\n\n | sran016 | sran016-1 | sran016-2 | sran016-3 | sran016-4 | sran016-5 |\n | ---------- | ---------- | ---------- | ---------- | ---------- | -------------- |\n | 大湾区主页 | 大湾区发展 | 大湾区工作 | 大湾区买楼 | 大湾区消费 | 大湾区投资理财 |\n\n | srac002 | srac003 | srac004 | srac005 |\n | -------- | -------- | -------- | -------- |\n | 即时中国 | 经济脉搏 | 国情动向 | 社会热点 |\n\n | srat001 | srat008 | srat055 | srat069 | srat070 |\n | ------- | ------- | -------- | -------- | --------- |\n | 话题 | 观点 | 休闲消费 | 娱乐新闻 | TOPick TV |\n\n | srat052 | srat052-1 | srat052-2 | srat052-3 |\n | -------- | --------- | ---------- | --------- |\n | 健康主页 | 食用安全 | 医生诊症室 | 保健美颜 |\n\n | srat053 | srat053-1 | srat053-2 | srat053-3 | srat053-4 |\n | -------- | --------- | --------- | --------- | ---------- |\n | 亲子主页 | 儿童健康 | 育儿经 | 教育 | 亲子好去处 |\n\n | srat053-6 | srat053-61 | srat053-62 | srat053-63 | srat053-64 |\n | ----------- | ---------- | ---------- | ---------- | ---------- |\n | Band 1 学堂 | 幼稚园 | 中小学 | 尖子教室 | 海外升学 |\n\n | srat072-1 | srat072-2 | srat072-3 | srat072-4 |\n | ---------- | ---------- | ---------------- | ----------------- |\n | 健康身心活 | 抗癌新方向 | 「糖」「心」解密 | 风湿不再 你我自在 |\n\n | sraw007 | sraw009 | sraw010 | sraw011 | sraw012 | sraw014 | sraw018 | sraw019 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 全部博客 | Bloggers | 收息攻略 | 精明消费 | 退休规划 | 个人增值 | 财富管理 | 绿色金融 |\n\n | sraw015 | sraw015-07 | sraw015-08 | sraw015-09 | sraw015-10 |\n | -------- | ---------- | ---------- | ---------- | ---------- |\n | 移民百科 | 海外置业 | 移民攻略 | 移民点滴 | 海外理财 |\n\n | sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 |\n | -------- | ------------ | --------- | --------- | --------- |\n | ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 |\n </details>","location":"index.ts"}} /> + 香港经济日报已有提供简单 RSS,详细可前往官方网站: [https://www.hket.com/rss](https://www.hket.com/rss) 此路由主要补全官方 RSS 全文输出及完善分类输出。 -<Route author="TonyRL" example="/hket/sran001" path="/hket/:category?" paramsDesc={['分类,默认为全部新闻,可在 URL 中找到,部分见下表']} radar="1"> - <details> - <summary>分类</summary> +<details> + <summary>分类</summary> - | sran001 | sran008 | sran010 | sran011 | sran012 | srat006 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 全部新闻 | 财经地产 | 科技信息 | 国际新闻 | 商业新闻 | 香港新闻 | + | sran001 | sran008 | sran010 | sran011 | sran012 | srat006 | + | -------- | -------- | -------- | -------- | -------- | -------- | + | 全部新闻 | 财经地产 | 科技信息 | 国际新闻 | 商业新闻 | 香港新闻 | - | sran009 | sran009-1 | sran009-2 | sran009-3 | sran009-4 | sran009-5 | sran009-6 | - | -------- | --------- | --------- | ---------- | --------- | --------- | --------- | - | 即时财经 | 股市 | 新股 IPO | 新经济追踪 | 当炒股 | 宏观解读 | Hot Talk | + | sran009 | sran009-1 | sran009-2 | sran009-3 | sran009-4 | sran009-5 | sran009-6 | + | -------- | --------- | --------- | ---------- | --------- | --------- | --------- | + | 即时财经 | 股市 | 新股 IPO | 新经济追踪 | 当炒股 | 宏观解读 | Hot Talk | - | sran011-1 | sran011-2 | sran011-3 | - | --------- | ------------ | ------------ | - | 环球政治 | 环球经济金融 | 环球社会热点 | + | sran011-1 | sran011-2 | sran011-3 | + | --------- | ------------ | ------------ | + | 环球政治 | 环球经济金融 | 环球社会热点 | - | sran016 | sran016-1 | sran016-2 | sran016-3 | sran016-4 | sran016-5 | - | ---------- | ---------- | ---------- | ---------- | ---------- | -------------- | - | 大湾区主页 | 大湾区发展 | 大湾区工作 | 大湾区买楼 | 大湾区消费 | 大湾区投资理财 | + | sran016 | sran016-1 | sran016-2 | sran016-3 | sran016-4 | sran016-5 | + | ---------- | ---------- | ---------- | ---------- | ---------- | -------------- | + | 大湾区主页 | 大湾区发展 | 大湾区工作 | 大湾区买楼 | 大湾区消费 | 大湾区投资理财 | - | srac002 | srac003 | srac004 | srac005 | - | -------- | -------- | -------- | -------- | - | 即时中国 | 经济脉搏 | 国情动向 | 社会热点 | + | srac002 | srac003 | srac004 | srac005 | + | -------- | -------- | -------- | -------- | + | 即时中国 | 经济脉搏 | 国情动向 | 社会热点 | - | srat001 | srat008 | srat055 | srat069 | srat070 | - | ------- | ------- | -------- | -------- | --------- | - | 话题 | 观点 | 休闲消费 | 娱乐新闻 | TOPick TV | + | srat001 | srat008 | srat055 | srat069 | srat070 | + | ------- | ------- | -------- | -------- | --------- | + | 话题 | 观点 | 休闲消费 | 娱乐新闻 | TOPick TV | - | srat052 | srat052-1 | srat052-2 | srat052-3 | - | -------- | --------- | ---------- | --------- | - | 健康主页 | 食用安全 | 医生诊症室 | 保健美颜 | + | srat052 | srat052-1 | srat052-2 | srat052-3 | + | -------- | --------- | ---------- | --------- | + | 健康主页 | 食用安全 | 医生诊症室 | 保健美颜 | - | srat053 | srat053-1 | srat053-2 | srat053-3 | srat053-4 | - | -------- | --------- | --------- | --------- | ---------- | - | 亲子主页 | 儿童健康 | 育儿经 | 教育 | 亲子好去处 | + | srat053 | srat053-1 | srat053-2 | srat053-3 | srat053-4 | + | -------- | --------- | --------- | --------- | ---------- | + | 亲子主页 | 儿童健康 | 育儿经 | 教育 | 亲子好去处 | - | srat053-6 | srat053-61 | srat053-62 | srat053-63 | srat053-64 | - | ----------- | ---------- | ---------- | ---------- | ---------- | - | Band 1 学堂 | 幼稚园 | 中小学 | 尖子教室 | 海外升学 | + | srat053-6 | srat053-61 | srat053-62 | srat053-63 | srat053-64 | + | ----------- | ---------- | ---------- | ---------- | ---------- | + | Band 1 学堂 | 幼稚园 | 中小学 | 尖子教室 | 海外升学 | - | srat072-1 | srat072-2 | srat072-3 | srat072-4 | - | ---------- | ---------- | ---------------- | ----------------- | - | 健康身心活 | 抗癌新方向 | 「糖」「心」解密 | 风湿不再 你我自在 | + | srat072-1 | srat072-2 | srat072-3 | srat072-4 | + | ---------- | ---------- | ---------------- | ----------------- | + | 健康身心活 | 抗癌新方向 | 「糖」「心」解密 | 风湿不再 你我自在 | - | sraw007 | sraw009 | sraw010 | sraw011 | sraw012 | sraw014 | sraw018 | sraw019 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 全部博客 | Bloggers | 收息攻略 | 精明消费 | 退休规划 | 个人增值 | 财富管理 | 绿色金融 | + | sraw007 | sraw009 | sraw010 | sraw011 | sraw012 | sraw014 | sraw018 | sraw019 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 全部博客 | Bloggers | 收息攻略 | 精明消费 | 退休规划 | 个人增值 | 财富管理 | 绿色金融 | - | sraw015 | sraw015-07 | sraw015-08 | sraw015-09 | sraw015-10 | - | -------- | ---------- | ---------- | ---------- | ---------- | - | 移民百科 | 海外置业 | 移民攻略 | 移民点滴 | 海外理财 | + | sraw015 | sraw015-07 | sraw015-08 | sraw015-09 | sraw015-10 | + | -------- | ---------- | ---------- | ---------- | ---------- | + | 移民百科 | 海外置业 | 移民攻略 | 移民点滴 | 海外理财 | - | sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 | - | -------- | ------------ | --------- | --------- | --------- | - | ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 | - </details> -</Route> + | sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 | + | -------- | ------------ | --------- | --------- | --------- | + | ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 | +</details> ## 新华每日电讯 {#xin-hua-mei-ri-dian-xun} ### 今日 {#xin-hua-mei-ri-dian-xun-jin-ri} -<Route author="Dustin-Jiang" example="/mrdx/today" path="/mrdx/today" /> - -## 新假期周刊 {#xin-jia-qi-zhou-kan} - -### 最新文章 {#xin-jia-qi-zhou-kan-zui-xin-wen-zhang} - -<Route author="TonyRL" example="/weekendhk" path="/weekendhk" radar="1" /> - -## 新京报 {#xin-jing-bao} - -### 栏目 {#xin-jing-bao-lan-mu} - -<Route author="DIYgod" example="/bjnews/realtime" path="/bjnews/:category" paramsDesc={['新京报的栏目名,点击对应栏目后在地址栏找到']} /> +<Route namespace="mrdx" data={{"path":"/today","categories":["traditional-media"],"example":"/mrdx/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mrdx.cn*"]},"name":"今日","maintainers":["Dustin-Jiang"],"url":"mrdx.cn*","location":"daily.ts"}} /> ## 新快报 {#xin-kuai-bao} ### 新闻 {#xin-kuai-bao-xin-wen} -<Route author="TimWu007" example="/xkb/350" path="/xkb/:channel" paramsDesc={['栏目 ID,点击对应栏目后在地址栏找到']}> - 常用栏目 ID: +<Route namespace="xkb" data={{"path":"/:channel","categories":["traditional-media"],"example":"/xkb/350","parameters":{"channel":"栏目 ID,点击对应栏目后在地址栏找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["TimWu007"],"description":"常用栏目 ID:\n\n | 栏目名 | ID |\n | ------ | --- |\n | 首页 | 350 |\n | 重点 | 359 |\n | 广州 | 353 |\n | 湾区 | 360 |\n | 天下 | 355 |","location":"index.ts"}} /> - | 栏目名 | ID | - | ------ | --- | - | 首页 | 350 | - | 重点 | 359 | - | 广州 | 353 | - | 湾区 | 360 | - | 天下 | 355 | -</Route> +常用栏目 ID: + +| 栏目名 | ID | +| ------ | --- | +| 首页 | 350 | +| 重点 | 359 | +| 广州 | 353 | +| 湾区 | 360 | +| 天下 | 355 | ## 新蓝网(浙江广播电视集团) {#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan} -### 浙江新闻联播 {#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan-zhe-jiang-xin-wen-lian-bo} - -<Route author="yhkang" example="/cztv/zjxwlb" path="/cztv/zjxwlb" /> - ### 浙江新闻联播 - 每日合集 {#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan-zhe-jiang-xin-wen-lian-bo-mei-ri-he-ji} -<Route author="yhkang" example="/cztv/zjxwlb/daily" path="/cztv/zjxwlb/daily" /> +<Route namespace="cztv" data={{"path":"/zjxwlb/daily","categories":["traditional-media"],"example":"/cztv/zjxwlb/daily","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cztv.com/videos/zjxwlb","cztv.com/"]},"name":"浙江新闻联播 - 每日合集","maintainers":["yhkang"],"url":"cztv.com/videos/zjxwlb","location":"daily.ts"}} /> + +### 浙江新闻联播 {#xin-lan-wang-zhe-jiang-guang-bo-dian-shi-ji-tuan-zhe-jiang-xin-wen-lian-bo} + +<Route namespace="cztv" data={{"path":"/zjxwlb","categories":["traditional-media"],"example":"/cztv/zjxwlb","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cztv.com/videos/zjxwlb","cztv.com/"]},"name":"浙江新闻联播","maintainers":["yhkang"],"url":"cztv.com/videos/zjxwlb","location":"zjxwlb.ts"}} /> ## 新唐人电视台 {#xin-tang-ren-dian-shi-tai} ### 频道 {#xin-tang-ren-dian-shi-tai-pin-dao} -<Route author="Fatpandac" example="/ntdtv/b5/prog1201" path="/ntdtv/:language/:id" paramsDesc={['语言,简体为`gb`,繁体为`b5`', '子频道名称']}> - 参数均可在官网获取,如: +<Route namespace="ntdtv" data={{"path":"/:language/:id","categories":["traditional-media"],"example":"/ntdtv/b5/prog1201","parameters":{"language":"语言,简体为`gb`,繁体为`b5`","id":"子频道名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ntdtv.com/:language/:id"]},"name":"频道","maintainers":["Fatpandac"],"description":"参数均可在官网获取,如:\n\n `https://www.ntdtv.com/b5/prog1201` 对应 `/ntdtv/b5/prog1201`","location":"channel.ts"}} /> - `https://www.ntdtv.com/b5/prog1201` 对应 `/ntdtv/b5/prog1201` -</Route> +参数均可在官网获取,如: + +`https://www.ntdtv.com/b5/prog1201` 对应 `/ntdtv/b5/prog1201` ## 信报财经新闻 {#xin-bao-cai-jing-xin-wen} ### 即时新闻 {#xin-bao-cai-jing-xin-wen-ji-shi-xin-wen} -<Route author="TonyRL" example="/hkej/index" path="/hkej/:category?" paramsDesc={['分类,默认为全部新闻']} anticrawler="1"> - | index | stock | hongkong | china | international | property | current | - | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | - | 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 | -</Route> +<Route namespace="hkej" data={{"path":"/:category?","categories":["traditional-media"],"example":"/hkej/index","parameters":{"category":"分类,默认为全部新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hkej.com/"]},"name":"即时新闻","maintainers":["TonyRL"],"url":"hkej.com/","description":"| index | stock | hongkong | china | international | property | current |\n | -------- | -------- | -------- | -------- | ------------- | -------- | -------- |\n | 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 |","location":"index.ts"}} /> -## 星島日報 {#xing-dao-ri-bao} - -### 即時 {#xing-dao-ri-bao-ji-shi} - -<Route author="TonyRL" example="/stheadline/std/realtime/kol" path="/stheadline/std/realtime/:category*" paramsDesc={['分類路徑,URL 中 `/realtime/` 後的部分,預設為`即時`']} radar="1" /> - -## 星洲网 {#xing-zhou-wang} - -### 首页 {#xing-zhou-wang-shou-ye} - -<Route author="nczitzk" example="/sinchew" path="/sinchew" /> - -### 最新 {#xing-zhou-wang-zui-xin} - -<Route author="nczitzk" example="/sinchew/latest" path="/sinchew/latest" /> - -### 分类 {#xing-zhou-wang-fen-lei} - -<Route author="nczitzk" example="/sinchew/category/头条" path="/sinchew/category/:category?" paramsDesc={['分类,见下表,亦可以在对应分类页 URL 中找到']}> - | 头条 | 国内 | 国际 | 言路 | 财经 | 地方 | 副刊 | 娱乐 | 体育 | 百格 | 星角攝 | 好运来 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ------ | - - :::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/国际/天下事)。 - ::: -</Route> +| index | stock | hongkong | china | international | property | current | +| -------- | -------- | -------- | -------- | ------------- | -------- | -------- | +| 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 | ## 央视新闻 {#yang-shi-xin-wen} -### 新闻联播 {#yang-shi-xin-wen-xin-wen-lian-bo} - -<Route author="zengxs" example="/cctv/xwlb" path="/cctv/xwlb" radar="1"> - 新闻联播内容摘要。 -</Route> - ### 栏目 {#yang-shi-xin-wen-lan-mu} -<Route author="nczitzk" example="/cctv/lm/xwzk" path="/cctv/lm/:id?" paramsDesc={['栏目 id,可在对应栏目页 URL 中找到,默认为 `xwzk` 即 新闻周刊']} radar="1"> - | 焦点访谈 | 等着我 | 今日说法 | 开讲啦 | - | -------- | ------ | -------- | ------ | - | jdft | dzw | jrsf | kjl | +<Route namespace="cctv" data={{"path":"/lm/:id?","categories":["traditional-media"],"example":"/cctv/lm/xwzk","parameters":{"id":"栏目 id,可在对应栏目页 URL 中找到,默认为 `xwzk` 即 新闻周刊"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.cctv.com/:category"],"target":"/:category"},"name":"栏目","maintainers":["nczitzk"],"description":"| 焦点访谈 | 等着我 | 今日说法 | 开讲啦 |\n | -------- | ------ | -------- | ------ |\n | jdft | dzw | jrsf | kjl |\n\n | 正大综艺 | 经济半小时 | 第一动画乐园 |\n | -------- | ---------- | ------------ |\n | zdzy | jjbxs | dydhly |\n\n :::tip\n 更多栏目请看 [这里](https://tv.cctv.com/lm)\n :::","location":"lm.ts"}} /> - | 正大综艺 | 经济半小时 | 第一动画乐园 | - | -------- | ---------- | ------------ | - | zdzy | jjbxs | dydhly | +| 焦点访谈 | 等着我 | 今日说法 | 开讲啦 | +| -------- | ------ | -------- | ------ | +| jdft | dzw | jrsf | kjl | - :::tip - 更多栏目请看 [这里](https://tv.cctv.com/lm) - ::: -</Route> +| 正大综艺 | 经济半小时 | 第一动画乐园 | +| -------- | ---------- | ------------ | +| zdzy | jjbxs | dydhly | -### 专题 {#yang-shi-xin-wen-zhuan-ti} +:::tip +更多栏目请看 [这里](https://tv.cctv.com/lm) +::: -<Route author="idealclover xyqfer" example="/cctv/world" path="/cctv/:category" paramsDesc={['分类名']} radar="1"> - | 新闻 | 国内 | 国际 | 社会 | 法治 | 文娱 | 科技 | 生活 | 教育 | 每周质量报告 | 新闻 1+1 | - | ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- | - | news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 | -</Route> +### 新闻联播 {#yang-shi-xin-wen-xin-wen-lian-bo} -### 新闻联播文字版 {#yang-shi-xin-wen-xin-wen-lian-bo-wen-zi-ban} +<Route namespace="cctv" data={{"path":"/xwlb","categories":["traditional-media"],"example":"/cctv/xwlb","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["tv.cctv.com/lm/xwlb","tv.cctv.com/"]},"name":"新闻联播","maintainers":["zengxs"],"url":"tv.cctv.com/lm/xwlb","description":"新闻联播内容摘要。","location":"xwlb.ts"}} /> -<Route author="luyuhuang" example="/xinwenlianbo/index" path="/xinwenlianbo/index" radar="1" anticrawler="1" /> +新闻联播内容摘要。 ### 央视网图片《镜象》 {#yang-shi-xin-wen-yang-shi-wang-tu-pian-%E3%80%8A-jing-xiang-%E3%80%8B} -<Route author="nczitzk" example="/cctv/photo/jx" path="/cctv/photo/jx" radar="1" /> +<Route namespace="cctv" data={{"path":"/photo/jx","categories":["traditional-media"],"example":"/cctv/photo/jx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["photo.cctv.com/jx","photo.cctv.com/"]},"name":"央视网图片《镜象》","maintainers":["nczitzk"],"url":"photo.cctv.com/jx","location":"jx.ts"}} /> + +### 专题 {#yang-shi-xin-wen-zhuan-ti} + +<Route namespace="cctv" data={{"path":"/:category","categories":["traditional-media"],"example":"/cctv/world","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.cctv.com/:category"]},"name":"专题","maintainers":["idealclover","xyqfer"],"description":"| 新闻 | 国内 | 国际 | 社会 | 法治 | 文娱 | 科技 | 生活 | 教育 | 每周质量报告 | 新闻 1+1 |\n | ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- |\n | news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 |","location":"category.ts"}} /> + +| 新闻 | 国内 | 国际 | 社会 | 法治 | 文娱 | 科技 | 生活 | 教育 | 每周质量报告 | 新闻 1+1 | +| ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- | +| news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 | ## 羊城晚报金羊网 {#yang-cheng-wan-bao-jin-yang-wang} ### 新闻 {#yang-cheng-wan-bao-jin-yang-wang-xin-wen} -<Route author="TimWu007" example="/ycwb/1" path="/ycwb/:node" paramsDesc={['栏目 id']}> - 注:小部分栏目的 URL 会给出 nodeid。如未给出,可打开某条新闻链接后,查看网页源代码,搜索 nodeid 的值。 +<Route namespace="ycwb" data={{"path":"/:node","categories":["traditional-media"],"example":"/ycwb/1","parameters":{"node":"栏目 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["TimWu007"],"description":"注:小部分栏目的 URL 会给出 nodeid。如未给出,可打开某条新闻链接后,查看网页源代码,搜索 nodeid 的值。\n\n 常用栏目节点:\n\n | 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 |\n | ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- |\n | 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 |\n\n | 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 |\n | ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- |\n | 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 |","location":"index.ts"}} /> - 常用栏目节点: +注:小部分栏目的 URL 会给出 nodeid。如未给出,可打开某条新闻链接后,查看网页源代码,搜索 nodeid 的值。 - | 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 | - | ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | - | 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 | +常用栏目节点: - | 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 | - | ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- | - | 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 | -</Route> +| 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 | +| ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | +| 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 | + +| 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 | +| ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- | +| 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 | ## 浙江在线 {#zhe-jiang-zai-xian} ### 浙报集团系列报刊 {#zhe-jiang-zai-xian-zhe-bao-ji-tuan-xi-lie-bao-kan} -<Route author="nczitzk" example="/zjol/paper/zjrb" path="/zjol/paper/:id?" paramsDesc={['报纸 id,见下表,默认为 `zjrb`,即浙江日报']}> - | 浙江日报 | 钱江晚报 | 美术报 | 浙江老年报 | 浙江法制报 | 江南游报 | - | -------- | -------- | ------ | ---------- | ---------- | -------- | - | zjrb | qjwb | msb | zjlnb | zjfzb | jnyb | -</Route> +<Route namespace="zjol" data={{"path":"/paper/:id?","categories":["traditional-media"],"example":"/zjol/paper/zjrb","parameters":{"id":"报纸 id,见下表,默认为 `zjrb`,即浙江日报"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"浙报集团系列报刊","maintainers":["nczitzk"],"description":"| 浙江日报 | 钱江晚报 | 美术报 | 浙江老年报 | 浙江法制报 | 江南游报 |\n | -------- | -------- | ------ | ---------- | ---------- | -------- |\n | zjrb | qjwb | msb | zjlnb | zjfzb | jnyb |","location":"paper.ts"}} /> + +| 浙江日报 | 钱江晚报 | 美术报 | 浙江老年报 | 浙江法制报 | 江南游报 | +| -------- | -------- | ------ | ---------- | ---------- | -------- | +| zjrb | qjwb | msb | zjlnb | zjfzb | jnyb | ## 中国环球电视网 {#zhong-guo-huan-qiu-dian-shi-wang} ### 播客 {#zhong-guo-huan-qiu-dian-shi-wang-bo-ke} -<Route author="5upernova-heng" example="/cgtn/podcast/ezfm/4" path="/cgtn/podcast/:category/:id" paramsDesc={['类型名','播客 id']} radar="1"> - > 类型名与播客 id 可以在播客对应的 URL 中找到 - > 如 URL `https://radio.cgtn.com/podcast/column/ezfm/More-to-Read/4` ,其 `category` 为 `ezfm` ,`id` 为 `4`,对应的订阅路由为 [`/podcast/ezfm/4`](https://rsshub.app/podcast/ezfm/4) -</Route> +<Route namespace="cgtn" data={{"path":"/podcast/:category/:id","categories":["traditional-media"],"example":"/cgtn/podcast/ezfm/4","parameters":{"category":"类型名","id":"播客 id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cgtn.com/podcast/column/:category/*/:id"]},"name":"播客","maintainers":["5upernova-heng"],"description":"> 类型名与播客 id 可以在播客对应的 URL 中找到\n > 如 URL `https://radio.cgtn.com/podcast/column/ezfm/More-to-Read/4` ,其 `category` 为 `ezfm` ,`id` 为 `4`,对应的订阅路由为 [`/podcast/ezfm/4`](https://rsshub.app/podcast/ezfm/4)","location":"podcast.ts"}} /> + +> 类型名与播客 id 可以在播客对应的 URL 中找到 +> 如 URL `https://radio.cgtn.com/podcast/column/ezfm/More-to-Read/4` ,其 `category` 为 `ezfm` ,`id` 为 `4`,对应的订阅路由为 [`/podcast/ezfm/4`](https://rsshub.app/podcast/ezfm/4) ## 中国科技网 {#zhong-guo-ke-ji-wang} ### 科技日报 {#zhong-guo-ke-ji-wang-ke-ji-ri-bao} -<Route author="lyqluis" example="/stdaily/digitalpaper" path="/stdaily/digitalpaper" /> - -## 中国日报 {#zhong-guo-ri-bao} - -### 英语点津 {#zhong-guo-ri-bao-ying-yu-dian-jin} - -<Route author="sanmmm" example="/chinadaily/english/thelatest" path="/chinadaily/english/:category" paramsDesc={['目录分类']}> - 目录分类 - - | 最新 | 双语 | 热词 | 口语 | 译词 | 视频 | 听力 | 专栏 | 文件 | 考试 | - | --------- | --------------- | -------------- | ---------------- | -------------- | ------------ | --------- | --------- | ------------------------ | ------------ | - | thelatest | news\_bilingual | news\_hotwords | practice\_tongue | trans\_collect | video\_links | audio\_cd | columnist | 5af95d44a3103f6866ee845c | englishexams | -</Route> - -## 中国新闻网 {#zhong-guo-xin-wen-wang} - -### 最新 {#zhong-guo-xin-wen-wang-zui-xin} - -<Route author="yuxinliu-alex" example="/chinanews" path="/chinanews" radar="1" /> +<Route namespace="stdaily" data={{"path":"/digitalpaper","categories":["traditional-media"],"example":"/stdaily/digitalpaper","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"科技日报","maintainers":["lyqluis"],"location":"digitalpaper.ts"}} /> ## 中国新闻周刊 {#zhong-guo-xin-wen-zhou-kan} ### 栏目 {#zhong-guo-xin-wen-zhou-kan-lan-mu} +<Route namespace="inewsweek" data={{"path":"/:channel","categories":["traditional-media"],"example":"/inewsweek/survey","parameters":{"channel":"栏目"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["inewsweek.cn/:channel","inewsweek.cn/"]},"name":"栏目","maintainers":["changren-wcr"],"description":"提取文章全文。\n\n | 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 |\n | ----- | -------- | ------- | ------- | ----- | ------ | ------ |\n | cover | politics | society | finance | world | survey | people |","location":"index.ts"}} /> + 提取文章全文。 -<Route author="changren-wcr" example="/inewsweek/survey" path="/inewsweek/:channel" paramsDesc={['栏目']}> - | 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 | - | ----- | -------- | ------- | ------- | ----- | ------ | ------ | - | cover | politics | society | finance | world | survey | people | -</Route> - -## 中山网 {#zhong-shan-wang} - -### 中山网新闻 {#zhong-shan-wang-zhong-shan-wang-xin-wen} - -<Route author="laampui" example="/zsnews/index/35" path="/zsnews/index/:cateid" paramsDesc={['类别']}> - | 35 | 36 | 37 | 38 | 39 | - | ---- | ---- | ---- | ---- | ---- | - | 本地 | 镇区 | 热点 | 社会 | 综合 | -</Route> +| 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 | +| ----- | -------- | ------- | ------- | ----- | ------ | ------ | +| cover | politics | society | finance | world | survey | people | ## 中央通讯社 {#zhong-yang-tong-xun-she} +### Unknown {#zhong-yang-tong-xun-she-unknown} + +<Route namespace="cna" data={{"path":"/web/:id?","categories":["traditional-media"],"example":"/cna/web/aall","parameters":{"id":"分类 id,见上表。此參數默认为 aall"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["dzx-dzx"],"location":"web/index.ts"}} /> + ### 分类 {#zhong-yang-tong-xun-she-fen-lei} -<Route author="nczitzk" example="/cna/aall" path="/cna/:id?" paramsDesc={['分类 id 或新闻专题 id。分类 id 见下表,新闻专题 id 為 https://www.cna.com.tw/list/newstopic.aspx 中,連結的數字部份。此參數默认为 aall']}> - | 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov | -</Route> +<Route namespace="cna" data={{"path":"/:id?","categories":["traditional-media"],"example":"/cna/aall","parameters":{"id":"分类 id 或新闻专题 id。分类 id 见下表,新闻专题 id 為 https://www.cna.com.tw/list/newstopic.aspx 中,連結的數字部份。此參數默认为 aall"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"分类","maintainers":["nczitzk"],"description":"| 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 |\n | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n | aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov |","location":"index.ts"}} /> -### 分类 (网页爬虫方法) {#zhong-yang-tong-xun-she-fen-lei-wang-ye-pa-chong-fang-fa} - -<Route author="dzx-dzx" example="/cna/web/aall" path="/cna/web/:id?" paramsDesc={['分类 id,见上表。此參數默认为 aall']} /> +| 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov | diff --git a/website/docs/routes/travel.mdx b/website/docs/routes/travel.mdx index 4ff25ff28..27d79658d 100644 --- a/website/docs/routes/travel.mdx +++ b/website/docs/routes/travel.mdx @@ -1,125 +1,97 @@ -# 🛫 Travel +# travel ## 12306 {#12306} -### 最新动态 {#12306-zui-xin-dong-tai} - -<Route author="LogicJake" example="/12306/zxdt" path="/12306/zxdt/:id?" paramsDesc={['铁路局id,可在 URL 中找到,不填默认显示所有铁路局动态']} /> - ### 售票信息 {#12306-shou-piao-xin-xi} -<Route author="Fatpandac" example="/12306/2022-02-19/重庆/永川东" path="/12306/:date/:from/:to/:type?" paramsDesc={['时间,格式为(YYYY-MM-DD)', '始发站', '终点站', '售票类型,成人和学生可选,默认为成人']} /> +<Route namespace="12306" data={{"path":"/:date/:from/:to/:type?","categories":["travel"],"example":"/12306/2022-02-19/重庆/永川东","parameters":{"date":"时间,格式为(YYYY-MM-DD)","from":"始发站","to":"终点站","type":"售票类型,成人和学生可选,默认为成人"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"售票信息","maintainers":["Fatpandac"],"location":"index.ts"}} /> + +### 最新动态 {#12306-zui-xin-dong-tai} + +<Route namespace="12306" data={{"path":"/zxdt/:id?","categories":["travel"],"example":"/12306/zxdt","parameters":{"id":"铁路局id,可在 URL 中找到,不填默认显示所有铁路局动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.12306.cn/","www.12306.cn/mormhweb/1/:id/index_fl.html"],"target":"/zxdt/:id"},"name":"最新动态","maintainers":["LogicJake"],"url":"www.12306.cn/","location":"zxdt.ts"}} /> ## Brooklyn Museum 纽约布鲁克林博物馆 {#brooklyn-museum-niu-yue-bu-lu-ke-lin-bo-wu-guan} ### Exhibitions {#brooklyn-museum-niu-yue-bu-lu-ke-lin-bo-wu-guan-exhibitions} -<Route author="chazeon" example="/brooklynmuseum/exhibitions" path="/brooklynmuseum/exhibitions/:state?" paramsDesc={['展览进行的状态:`current` 对应展览当前正在进行,`past` 对应过去的展览,`upcoming` 对应即将举办的展览,默认为 `current`']} /> +<Route namespace="brooklynmuseum" data={{"path":"/exhibitions/:state?","categories":["travel"],"example":"/brooklynmuseum/exhibitions","parameters":{"state":"展览进行的状态:`current` 对应展览当前正在进行,`past` 对应过去的展览,`upcoming` 对应即将举办的展览,默认为 `current`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Exhibitions","maintainers":[],"location":"exhibitions.ts"}} /> ## National Geographic {#national-geographic} ### Latest Stories {#national-geographic-latest-stories} -<Route author="miles170" example="/nationalgeographic/latest-stories" path="/nationalgeographic/latest-stories" /> +<Route namespace="nationalgeographic" data={{"path":"/latest-stories","categories":["travel"],"example":"/nationalgeographic/latest-stories","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.nationalgeographic.com/pages/topic/latest-stories"]},"name":"Latest Stories","maintainers":["miles170"],"url":"www.nationalgeographic.com/pages/topic/latest-stories","location":"latest-stories.ts"}} /> ## New Museum 纽约新美术馆 {#new-museum-niu-yue-xin-mei-shu-guan} ### Exhibitions {#new-museum-niu-yue-xin-mei-shu-guan-exhibitions} -<Route author="chazeon" example="/newmuseum/exhibitions" path="/newmuseum/exhibitions" /> +<Route namespace="newmuseum" data={{"path":"/exhibitions","categories":["travel"],"example":"/newmuseum/exhibitions","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Exhibitions","maintainers":["chazeon"],"location":"exhibitions.ts"}} /> ## 飞客茶馆 {#fei-ke-cha-guan} -### 优惠信息 {#fei-ke-cha-guan-you-hui-xin-xi} - -<Route author="howel52" example="/flyert/preferential" path="/flyert/preferential" /> - ### 信用卡 {#fei-ke-cha-guan-xin-yong-ka} -<Route author="nicolaszf" example="/flyert/creditcard/zhongxin" path="/flyert/creditcard/:bank" paramsDesc={['信用卡板块各银行的拼音简称']}> - | 信用卡模块 | bank | - | ---------- | ------------- | - | 国内信用卡 | creditcard | - | 浦发银行 | pufa | - | 招商银行 | zhaoshang | - | 中信银行 | zhongxin | - | 交通银行 | jiaotong | - | 中国银行 | zhonghang | - | 工商银行 | gongshang | - | 广发银行 | guangfa | - | 农业银行 | nongye | - | 建设银行 | jianshe | - | 汇丰银行 | huifeng | - | 民生银行 | mingsheng | - | 兴业银行 | xingye | - | 花旗银行 | huaqi | - | 上海银行 | shanghai | - | 无卡支付 | wuka | - | 投资理财 | 137 | - | 网站权益汇 | 145 | - | 境外信用卡 | intcreditcard | -</Route> +<Route namespace="flyert" data={{"path":"/creditcard/:bank","categories":["travel"],"example":"/flyert/creditcard/zhongxin","parameters":{"bank":"信用卡板块各银行的拼音简称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["flyert.com/"]},"name":"信用卡","maintainers":["nicolaszf"],"url":"flyert.com/","description":"| 信用卡模块 | bank |\n | ---------- | ------------- |\n | 国内信用卡 | creditcard |\n | 浦发银行 | pufa |\n | 招商银行 | zhaoshang |\n | 中信银行 | zhongxin |\n | 交通银行 | jiaotong |\n | 中国银行 | zhonghang |\n | 工商银行 | gongshang |\n | 广发银行 | guangfa |\n | 农业银行 | nongye |\n | 建设银行 | jianshe |\n | 汇丰银行 | huifeng |\n | 民生银行 | mingsheng |\n | 兴业银行 | xingye |\n | 花旗银行 | huaqi |\n | 上海银行 | shanghai |\n | 无卡支付 | wuka |\n | 投资理财 | 137 |\n | 网站权益汇 | 145 |\n | 境外信用卡 | intcreditcard |","location":"creditcard.ts"}} /> + +| 信用卡模块 | bank | +| ---------- | ------------- | +| 国内信用卡 | creditcard | +| 浦发银行 | pufa | +| 招商银行 | zhaoshang | +| 中信银行 | zhongxin | +| 交通银行 | jiaotong | +| 中国银行 | zhonghang | +| 工商银行 | gongshang | +| 广发银行 | guangfa | +| 农业银行 | nongye | +| 建设银行 | jianshe | +| 汇丰银行 | huifeng | +| 民生银行 | mingsheng | +| 兴业银行 | xingye | +| 花旗银行 | huaqi | +| 上海银行 | shanghai | +| 无卡支付 | wuka | +| 投资理财 | 137 | +| 网站权益汇 | 145 | +| 境外信用卡 | intcreditcard | + +### 优惠信息 {#fei-ke-cha-guan-you-hui-xin-xi} + +<Route namespace="flyert" data={{"path":"/preferential","categories":["travel"],"example":"/flyert/preferential","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["flyert.com/"]},"name":"优惠信息","maintainers":["howel52"],"url":"flyert.com/","location":"preferential.ts"}} /> ## 福州地铁 {#fu-zhou-di-tie} ### 通知公告 {#fu-zhou-di-tie-tong-zhi-gong-gao} -<Route author="HankChow" example="/fzmtr/announcements" path="/fzmtr/announcements" /> +<Route namespace="fzmtr" data={{"path":"/announcements","categories":["travel"],"example":"/fzmtr/announcements","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通知公告","maintainers":["HankChow"],"location":"announcements.ts"}} /> ## 广州地铁 {#guang-zhou-di-tie} ### 新闻 {#guang-zhou-di-tie-xin-wen} -<Route author="HankChow" example="/guangzhoumetro/news" path="/guangzhoumetro/news" /> +<Route namespace="guangzhoumetro" data={{"path":"/news","categories":["travel"],"example":"/guangzhoumetro/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻","maintainers":["HankChow"],"location":"news.ts"}} /> ## 国家地理 {#guo-jia-di-li} ### 分类 {#guo-jia-di-li-fen-lei} -<Route author="fengkx" example="/natgeo/environment/article" path="/natgeo/:cat/:type?" paramsDesc={['分类', '类型, 例如`https://www.natgeomedia.com/environment/photo/`对应 `cat`, `type` 分别为 `environment`, `photo`']} /> - -## 活动行 {#huo-dong-xing} - -### 最新活动 {#huo-dong-xing-zui-xin-huo-dong} - -<Route author="kfgamehacker" example="/huodongxing/explore" path="/huodongxing/explore" /> - -## 马蜂窝 {#ma-feng-wo} - -### 游记 {#ma-feng-wo-you-ji} - -<Route author="sinchang" example="/mafengwo/note/hot" path="/mafengwo/note/:type" paramsDesc={['目前支持两种, `hot` 代表热门游记, `latest` 代表最新游记']} /> - -### 自由行 {#ma-feng-wo-zi-you-xing} - -<Route author="nczitzk" example="/mafengwo/ziyouxing/10186" path="/mafengwo/ziyouxing/:code" paramsDesc={['目的地代码,可在该目的地页面的 URL 中找到']} notOperational="1"> - 目的地代码请参见 [这里](http://www.mafengwo.cn/mdd/) -</Route> - -## 纽约大都会美术馆 {#niu-yue-da-dou-hui-mei-shu-guan} - -### Exhibitions {#niu-yue-da-dou-hui-mei-shu-guan-exhibitions} - -<Route author="chazeon" example="/metmuseum/exhibitions" path="/metmusem/exhibitions/:state?" paramsDesc={['展览进行的状态:`current` 对应展览当前正在进行,`past` 对应过去的展览,`upcoming` 对应即将举办的展览,默认为 `current`']} anticrawler="1" /> +<Route namespace="natgeo" data={{"path":"/:cat/:type?","categories":["travel"],"example":"/natgeo/environment/article","parameters":{"cat":"分类","type":"类型, 例如`https://www.natgeomedia.com/environment/photo/`对应 `cat`, `type` 分别为 `environment`, `photo`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["natgeomedia.com/:cat/:type","natgeomedia.com/"],"target":"/:cat/:type"},"name":"分类","maintainers":["fengkx"],"location":"natgeo.ts"}} /> ## 纽约犹太人博物馆 {#niu-yue-you-tai-ren-bo-wu-guan} ### Exhibitions {#niu-yue-you-tai-ren-bo-wu-guan-exhibitions} -<Route author="chazeon" example="/jewishmuseum/exhibitions" path="/jewishmuseum/exhibitions" /> +<Route namespace="jewishmuseum" data={{"path":"/exhibitions","categories":["travel"],"example":"/jewishmuseum/exhibitions","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Exhibitions","maintainers":["chazeon"],"location":"exhibitions.ts"}} /> ## 中国国际航空公司 {#zhong-guo-guo-ji-hang-kong-gong-si} ### 服务公告 {#zhong-guo-guo-ji-hang-kong-gong-si-fu-wu-gong-gao} -<Route author="LandonLi" example="/airchina/announcement" path="/airchina/announcement" radar="1" /> +<Route namespace="airchina" data={{"path":"/announcement","categories":["travel"],"example":"/airchina/announcement","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.airchina.com.cn/"]},"name":"服务公告","maintainers":["LandonLi"],"url":"www.airchina.com.cn/","location":"index.ts"}} /> ## 走进日本 {#zou-jin-ri-ben} -### 政治外交 {#zou-jin-ri-ben-zheng-zhi-wai-jiao} +### Unknown {#zou-jin-ri-ben-unknown} -<Route author="laampui" example="/nippon/Politics" path="/nippon/:category?" paramsDesc={['默认政治,可选如下']}> - | 政治 | 经济 | 社会 | 展览预告 | 焦点专题 | 深度报道 | 话题 | 日本信息库 | 日本一蹩 | 人物访谈 | 编辑部通告 | - | -------- | ------- | ------- | -------- | ------------------ | -------- | ------------ | ---------- | ------------- | -------- | ------------- | - | Politics | Economy | Society | Culture | Science,Technology | In-depth | japan-topics | japan-data | japan-glances | People | Announcements | -</Route> +<Route namespace="nippon" data={{"path":"/:category?","categories":["travel"],"example":"/nippon/Politics","parameters":{"category":"默认政治,可选如下"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.nippon.com/nippon/:category?","www.nippon.com/cn"]},"name":"Unknown","maintainers":["laampui"],"location":"index.ts"}} /> diff --git a/website/docs/routes/university.mdx b/website/docs/routes/university.mdx index 2849402a2..f7c760172 100644 --- a/website/docs/routes/university.mdx +++ b/website/docs/routes/university.mdx @@ -1,1299 +1,579 @@ -# 🎓 University - -## Beijing Jiaotong University 北京交通大学 {#beijing-jiaotong-university-bei-jing-jiao-tong-da-xue} - -### BJTU Graduate School {#beijing-jiaotong-university-bei-jing-jiao-tong-da-xue-bjtu-graduate-school} - -<Route author="E1nzbern" example="/bjtu/gs/all" path="/bjtu/gs/:type" paramsDesc={['Type of articles']}> - | All articles | Notification | News | Admissions Promotion | Training | Degrees | Admissions | Master Admissions | PhD Admissions | Admissions Brochure | Admissions Policies and Regulations | Notice from Graduate Student Work Department | News from Graduate Student Work Department | - | ------------ | ------------ | ---- | -------------------- | -------- | ------- | ---------- | ----------------- | -------------- | ------------------- | ----------------------------------- | -------------------------------------------- | ------------------------------------------ | - | all | noti | news | zsxc | py | xw | zs | sszs | bszs | zsjz | zcfg | ygbtzgg | ygbnews | -</Route> - -Note: [Source website](https://gs.bjtu.edu.cn/) only provides articles in Chinese. +# university ## East China Normal University 华东师范大学 {#east-china-normal-university-hua-dong-shi-fan-da-xue} ### ACM Online-Judge contests list {#east-china-normal-university-hua-dong-shi-fan-da-xue-acm-online-judge-contests-list} -<Route author="a180285" example="/ecnu/acm/contest/public" path="/ecnu/acm/contest/:category?" radar="1" paramsDesc={['category is optional, default is all, use `public` for public only contests']} notOperational="1" /> +<Route namespace="ecnu" data={{"path":"/acm/contest/:category?","categories":["university"],"example":"/ecnu/acm/contest/public","parameters":{"category":"category is optional, default is all, use `public` for public only contests"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["acm.ecnu.edu.cn/contest/","acm.ecnu.edu.cn/"],"target":"/acm/contest/"},"name":"ACM Online-Judge contests list","maintainers":["a180285"],"url":"acm.ecnu.edu.cn/contest/","location":"contest.ts"}} /> ### 研究生院 {#east-china-normal-university-hua-dong-shi-fan-da-xue-yan-jiu-sheng-yuan} -<Route author="shengmaosu" example="/ecnu/yjs" path="/ecnu/yjs" radar="1" /> - -## MIT {#mit} - -### MIT OCW Most popular courses of the month {#mit-mit-ocw-most-popular-courses-of-the-month} - -<Route author="dwemerx" example="/mit/ocw-top" path="/mit/ocw-top" notOperational="1" /> - -### MIT graduateadmissions's all blogs {#mit-mit-graduateadmissions-s-all-blogs} - -<Route author="LogicJake" example="/mit/graduateadmissions/index/all" path="/mit/graduateadmissions/index/all" notOperational="1" /> - -### MIT graduateadmissions's blogs by department {#mit-mit-graduateadmissions-s-blogs-by-department} - -<Route author="LogicJake" example="/mit/graduateadmissions/department/eecs" path="/mit/graduateadmissions/department/:name" paramsDesc={['department name which can be found in url']} notOperational="1" /> - -### MIT graduateadmissions's blogs by category {#mit-mit-graduateadmissions-s-blogs-by-category} - -<Route author="LogicJake" example="/mit/graduateadmissions/category/beyond-the-lab" path="/mit/graduateadmissions/category/:name" paramsDesc={['category name which can be found in url']} notOperational="1" /> - -### MIT CSAIL {#mit-mit-csail} - -<Route author="nczitzk" example="/mit/csail/news" path="/mit/csail/news" /> +<Route namespace="ecnu" data={{"path":"/yjs","categories":["university"],"example":"/ecnu/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.kaoyan.com/ecnu/tiaoji","yz.kaoyan.com/"]},"name":"研究生院","maintainers":["shengmaosu"],"url":"yz.kaoyan.com/ecnu/tiaoji","location":"yjs.ts"}} /> ## Nanjing University of the Arts 南京艺术学院 {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan} -### Official Information {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-official-information} - -<Route author="evnydd0sf" example="/nua/index/346" path="/nua/index/:type" paramsDesc={['News Type']} radar="1" anticrawler="1"> - | News Type | Parameters | - | --------- | ---------- | - | 公告 | 346 | - | 南艺要闻 | 332 | -</Route> - -### Shuangxing Information {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-shuangxing-information} - -<Route author="evnydd0sf" example="/nua/sxw/230" path="/nua/sxw/:type" paramsDesc={['News Type']} radar="1" anticrawler="1"> - | News Type | Parameters | - | --------- | ---------- | - | 校园电视 | 230 | - | 院部动态 | 232 | - | 动感校园 | 233 | - | 招就指南 | 234 | - | 南艺院报 | 236 | -</Route> - -### School of Design {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-school-of-design} - -<Route author="evnydd0sf" example="/nua/dc/news" path="/nua/dc/:type" paramsDesc={['News Type']} radar="1" anticrawler="1"> - | News Type | Parameters | - | ------------------------ | ---------- | - | 学院新闻 NEWS | news | - | 展览 EXHIBITION | exhibition | - | 研创 RESEARCH & CREATION | rc | - | 项目 PROJECT | project | - | 党团 PARTY | party | - | 后浪 YOUTH | youth | -</Route> - ### Graduate Institute {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-graduate-institute} -<Route author="evnydd0sf" example="/nua/gra/1959" path="/nua/gra/:type" paramsDesc={['News Type']} radar="1" anticrawler="1"> - | News Type | Parameters | - | --------- | ---------- | - | 招生工作 | 1959 | - | 培养工作 | 1962 | - | 学位工作 | 1958 | -</Route> +<Route namespace="nua" data={{"path":"/gra/:type","categories":["university"],"example":"/nua/gra/1959","parameters":{"type":"News Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grad.nua.edu.cn/:type/list.htm"]},"name":"Graduate Institute","maintainers":["evnydd0sf"],"description":"| News Type | Parameters |\n | --------- | ---------- |\n | 招生工作 | 1959 |\n | 培养工作 | 1962 |\n | 学位工作 | 1958 |","location":"gra.ts"}} /> + +| News Type | Parameters | +| --------- | ---------- | +| 招生工作 | 1959 | +| 培养工作 | 1962 | +| 学位工作 | 1958 | ### Library {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-library} -<Route author="evnydd0sf" example="/nua/lib/xwdt" path="/nua/lib/:type" paramsDesc={['News Type']} radar="1" anticrawler="1"> - | News Type | Parameters | - | --------- | ---------- | - | 新闻动态 | xwdt | - | 党建动态 | djdt | - | 资源动态 | zydt | - | 服务动态 | fwdt | -</Route> +<Route namespace="nua" data={{"path":"/lib/:type","categories":["university"],"example":"/nua/lib/xwdt","parameters":{"type":"News Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lib.nua.edu.cn/:type/list.htm"]},"name":"Library","maintainers":["evnydd0sf"],"description":"| News Type | Parameters |\n | --------- | ---------- |\n | 新闻动态 | xwdt |\n | 党建动态 | djdt |\n | 资源动态 | zydt |\n | 服务动态 | fwdt |","location":"lib.ts"}} /> -## Polimi {#polimi} +| News Type | Parameters | +| --------- | ---------- | +| 新闻动态 | xwdt | +| 党建动态 | djdt | +| 资源动态 | zydt | +| 服务动态 | fwdt | -### News {#polimi-news} +### Official Information {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-official-information} -<Route author="exuanbo" example="/polimi/news" path="/polimi/news/:language?" paramsDesc={['English language code en']} notOperational="1" /> +<Route namespace="nua" data={{"path":"/index/:type","categories":["university"],"example":"/nua/index/346","parameters":{"type":"News Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["index.nua.edu.cn/:type/list.htm"]},"name":"Official Information","maintainers":["evnydd0sf"],"description":"| News Type | Parameters |\n | --------- | ---------- |\n | 公告 | 346 |\n | 南艺要闻 | 332 |","location":"index.ts"}} /> + +| News Type | Parameters | +| --------- | ---------- | +| 公告 | 346 | +| 南艺要闻 | 332 | + +### School of Design {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-school-of-design} + +<Route namespace="nua" data={{"path":"/dc/:type","categories":["university"],"example":"/nua/dc/news","parameters":{"type":"News Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dc.nua.edu.cn/:type/list.htm"]},"name":"School of Design","maintainers":["evnydd0sf"],"description":"| News Type | Parameters |\n | ------------------------ | ---------- |\n | 学院新闻 NEWS | news |\n | 展览 EXHIBITION | exhibition |\n | 研创 RESEARCH & CREATION | rc |\n | 项目 PROJECT | project |\n | 党团 PARTY | party |\n | 后浪 YOUTH | youth |","location":"dc.ts"}} /> + +| News Type | Parameters | +| ------------------------ | ---------- | +| 学院新闻 NEWS | news | +| 展览 EXHIBITION | exhibition | +| 研创 RESEARCH & CREATION | rc | +| 项目 PROJECT | project | +| 党团 PARTY | party | +| 后浪 YOUTH | youth | + +### Shuangxing Information {#nanjing-university-of-the-arts-nan-jing-yi-shu-xue-yuan-shuangxing-information} + +<Route namespace="nua" data={{"path":"/sxw/:type","categories":["university"],"example":"/nua/sxw/230","parameters":{"type":"News Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sxw.nua.edu.cn/:type/list.htm"]},"name":"Shuangxing Information","maintainers":["evnydd0sf"],"description":"| News Type | Parameters |\n | --------- | ---------- |\n | 校园电视 | 230 |\n | 院部动态 | 232 |\n | 动感校园 | 233 |\n | 招就指南 | 234 |\n | 南艺院报 | 236 |","location":"sxw.ts"}} /> + +| News Type | Parameters | +| --------- | ---------- | +| 校园电视 | 230 | +| 院部动态 | 232 | +| 动感校园 | 233 | +| 招就指南 | 234 | +| 南艺院报 | 236 | ## Tianjin University 天津大学 {#tianjin-university-tian-jin-da-xue} -### News {#tianjin-university-tian-jin-da-xue-news} +### Admission Office of Graduate {#tianjin-university-tian-jin-da-xue-admission-office-of-graduate} -<Route author="SuperPung" example="/tju/news/focus" path="/tju/news/:type?" paramsDesc={['default `focus`']}> - | Focus on TJU | General News | Internal News | Media Report | Pictures of TJU | - | :----------: | :----------: | :-----------: | :----------: | :-------------: | - | focus | general | internal | media | picture | -</Route> +<Route namespace="tju" data={{"path":"/yzb/:type?","categories":["university"],"example":"/tju/yzb/notice","parameters":{"type":"default `notice`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Admission Office of Graduate","maintainers":["SuperPung"],"description":"| School-level Notice | Master | Doctor | On-the-job Degree |\n | :-----------------: | :----: | :----: | :---------------: |\n | notice | master | doctor | job |","location":"yzb/index.ts"}} /> + +| School-level Notice | Master | Doctor | On-the-job Degree | +| :-----------------: | :----: | :----: | :---------------: | +| notice | master | doctor | job | ### College of Intelligence and Computing {#tianjin-university-tian-jin-da-xue-college-of-intelligence-and-computing} -<Route author="SuperPung" example="/tju/cic/news" path="/tju/cic/:type?" paramsDesc={['default `news`']}> - | College News | Notification | TJU Forum for CIC | - | :----------: | :----------: | :---------------: | - | news | notification | forum | -</Route> +<Route namespace="tju" data={{"path":"/cic/:type?","categories":["university"],"example":"/tju/cic/news","parameters":{"type":"default `news`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"College of Intelligence and Computing","maintainers":["SuperPung"],"description":"| College News | Notification | TJU Forum for CIC |\n | :----------: | :----------: | :---------------: |\n | news | notification | forum |","location":"cic/index.ts"}} /> + +| College News | Notification | TJU Forum for CIC | +| :----------: | :----------: | :---------------: | +| news | notification | forum | + +### News {#tianjin-university-tian-jin-da-xue-news} + +<Route namespace="tju" data={{"path":"/news/:type?","categories":["university"],"example":"/tju/news/focus","parameters":{"type":"default `focus`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"News","maintainers":["SuperPung"],"description":"| Focus on TJU | General News | Internal News | Media Report | Pictures of TJU |\n | :----------: | :----------: | :-----------: | :----------: | :-------------: |\n | focus | general | internal | media | picture |","location":"news/index.ts"}} /> + +| Focus on TJU | General News | Internal News | Media Report | Pictures of TJU | +| :----------: | :----------: | :-----------: | :----------: | :-------------: | +| focus | general | internal | media | picture | ### The Office of Academic Affairs {#tianjin-university-tian-jin-da-xue-the-office-of-academic-affairs} -<Route author="AmosChenYQ SuperPung" example="/tju/oaa/news" path="/tju/oaa/:type?" paramsDesc={['default `news`']}> - | News | Notification | - | :--: | :----------: | - | news | notification | -</Route> +<Route namespace="tju" data={{"path":"/oaa/:type?","categories":["university"],"example":"/tju/oaa/news","parameters":{"type":"default `news`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"The Office of Academic Affairs","maintainers":["AmosChenYQ","SuperPung"],"description":"| News | Notification |\n | :--: | :----------: |\n | news | notification |","location":"oaa/index.ts"}} /> -### Admission Office of Graduate {#tianjin-university-tian-jin-da-xue-admission-office-of-graduate} - -<Route author="SuperPung" example="/tju/yzb/notice" path="/tju/yzb/:type?" paramsDesc={['default `notice`']}> - | School-level Notice | Master | Doctor | On-the-job Degree | - | :-----------------: | :----: | :----: | :---------------: | - | notice | master | doctor | job | -</Route> - -## University of Massachusetts Amherst {#university-of-massachusetts-amherst} - -### College of Electrical and Computer Engineering {#university-of-massachusetts-amherst-college-of-electrical-and-computer-engineering} - -#### News {#university-of-massachusetts-amherst-college-of-electrical-and-computer-engineering-news} - -<Route author="gammapi" example="/umass/amherst/ecenews" path="/umass/amherst/ecenews" radar="1" notOperational="1" /> - -#### Seminar {#university-of-massachusetts-amherst-college-of-electrical-and-computer-engineering-seminar} - -<Route author="gammapi" example="/umass/amherst/eceseminar" path="/umass/amherst/eceseminar" radar="1" notOperational="1" /> - -Note:[Source website](https://ece.umass.edu/seminar) may be empty when there's no upcoming seminars. This is normal and will cause rsshub fail to fetch this feed. - -### College of Information & Computer Sciences News {#university-of-massachusetts-amherst-college-of-information-computer-sciences-news} - -<Route author="gammapi" example="/umass/amherst/csnews" path="/umass/amherst/csnews" radar="1" /> - -### International Programs Office {#university-of-massachusetts-amherst-international-programs-office} - -#### Events {#university-of-massachusetts-amherst-international-programs-office-events} - -<Route author="gammapi" example="/umass/amherst/ipostories" path="/umass/amherst/ipostories" radar="1" /> - -#### Featured Stories {#university-of-massachusetts-amherst-international-programs-office-featured-stories} - -<Route author="gammapi" example="/umass/amherst/ipoevents" path="/umass/amherst/ipoevents" radar="1" notOperational="1" /> - -## University of Texas at Dallas {#university-of-texas-at-dallas} - -### International Student Services {#university-of-texas-at-dallas-international-student-services} - -<Route author="Chang4Tech" example="/utdallas/isso" path="/utdallas/isso" notOperational="1" /> +| News | Notification | +| :--: | :----------: | +| news | notification | ## University of Washington {#university-of-washington} ### Global Innovation Exchange News {#university-of-washington-global-innovation-exchange-news} -<Route author="dykderrick" example="/uw/gix/news/blog" path="/uw/gix/news/:category" paramsDesc={['Blog Type']}> - | Blog | In The News | - | ---- | ----------- | - | blog | inthenews | -</Route> +<Route namespace="uw" data={{"path":"/gix/news/:category","categories":["university"],"example":"/uw/gix/news/blog","parameters":{"category":"Blog Type"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gixnetwork.org/news/:category"]},"name":"Global Innovation Exchange News","maintainers":["dykderrick"],"description":"| Blog | In The News |\n | ---- | ----------- |\n | blog | inthenews |","location":"gix/news.ts"}} /> -## 安徽工业大学 {#an-hui-gong-ye-da-xue} - -### 教务处 {#an-hui-gong-ye-da-xue-jiao-wu-chu} - -<Route author="Diffumist" example="/ahut/jwc" path="/ahut/jwc" /> - -### 学校要闻 {#an-hui-gong-ye-da-xue-xue-xiao-yao-wen} - -<Route author="Diffumist" example="/ahut/news" path="/ahut/news" /> - -### 计算机学院公告 {#an-hui-gong-ye-da-xue-ji-suan-ji-xue-yuan-gong-gao} - -<Route author="Diffumist" example="/ahut/cstzgg" path="/ahut/cstzgg" notOperational="1" /> +| Blog | In The News | +| ---- | ----------- | +| blog | inthenews | ## 安徽建筑大学 {#an-hui-jian-zhu-da-xue} ### 通知公告 {#an-hui-jian-zhu-da-xue-tong-zhi-gong-gao} -<Route author="Yuk-0v0" example="/ahjzu/news" path="/ahjzu/news" notOperational="1" /> - -## 安徽农业大学 {#an-hui-nong-ye-da-xue} - -### 计算机学院 {#an-hui-nong-ye-da-xue-ji-suan-ji-xue-yuan} - -<Route author="SimonHu-HN" example="/ahau/cs_news/xxtg" path="/ahau/cs_news/:type" paramsDesc={['类型名']} notOperational="1"> - | 信息通告 | 新闻动态 | - | -------- | -------- | - | xxtg | xwddyn | -</Route> - -### 教务处 {#an-hui-nong-ye-da-xue-jiao-wu-chu} - -<Route author="SimonHu-HN" example="/ahau/jwc/jwyw" path="/ahau/jwc/:type" paramsDesc={['类型名']} notOperational="1"> - | 教务要闻 | 通知公告 | - | -------- | -------- | - | jwyw | tzgg | -</Route> - -### 安农大官网新闻 {#an-hui-nong-ye-da-xue-an-nong-da-guan-wang-xin-wen} - -<Route author="SimonHu-HN" example="/ahau/main/xnyw" path="/ahau/main/:type" paramsDesc={['类型名']} notOperational="1"> - | 校内要闻 | 学院动态 | - | -------- | -------- | - | xnyw | xydt | -</Route> - -## 安徽医科大学 {#an-hui-yi-ke-da-xue} - -### 研究生学院通知公告 {#an-hui-yi-ke-da-xue-yan-jiu-sheng-xue-yuan-tong-zhi-gong-gao} - -<Route author="Origami404" example="/ahmu/news" path="/ahmu/news" notOperational="1" /> - -## 北华航天工业学院 {#bei-hua-hang-tian-gong-ye-xue-yuan} - -### 新闻 {#bei-hua-hang-tian-gong-ye-xue-yuan-xin-wen} - -<Route author="SunShinenny" example="/nciae/news" path="/nciae/news" notOperational="1" /> - -### 学术信息 {#bei-hua-hang-tian-gong-ye-xue-yuan-xue-shu-xin-xi} - -<Route author="SunShinenny" example="/nciae/xsxx" path="/nciae/xsxx" notOperational="1" /> - -### 通知公告 {#bei-hua-hang-tian-gong-ye-xue-yuan-tong-zhi-gong-gao} - -<Route author="SunShinenny" example="/nciae/tzgg" path="/nciae/tzgg" notOperational="1" /> +<Route namespace="ahjzu" data={{"path":"/news","categories":["university"],"example":"/ahjzu/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.ahjzu.edu.cn/20/list.htm"]},"name":"通知公告","maintainers":["Yuk-0v0"],"url":"news.ahjzu.edu.cn/20/list.htm","location":"news.ts"}} /> ## 北京大学 {#bei-jing-da-xue} -### 信科公告通知 {#bei-jing-da-xue-xin-ke-gong-gao-tong-zhi} - -<Route author="Ir1d" example="/pku/eecs/0" path="/pku/eecs/:type" paramsDesc={['分区 type,可在网页 URL 中找到']} radar="1" notOperational="1"> - | 全部 | 学院通知 | 人事通知 | 教务通知 | 学工通知 | 科研通知 | 财务通知 | 工会通知 | 院友通知 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 6 | 8 | 7 | 5 | 3 | 4 | -</Route> - -### 每周一推 - 中国政治学研究中心 {#bei-jing-da-xue-mei-zhou-yi-tui-zhong-guo-zheng-zhi-xue-yan-jiu-zhong-xin} - -<Route author="vhxubo" example="/pku/rccp/mzyt" path="/pku/rccp/mzyt" radar="1" /> - -### 生命科学学院近期讲座 {#bei-jing-da-xue-sheng-ming-ke-xue-xue-yuan-jin-qi-jiang-zuo} - -<Route author="TPOB" example="/pku/cls/lecture" path="/pku/cls/lecture" radar="1" /> - -### 生命科学学院通知公告 {#bei-jing-da-xue-sheng-ming-ke-xue-xue-yuan-tong-zhi-gong-gao} - -<Route author="william-swl" example="/pku/cls/announcement" path="/pku/cls/announcement" radar="1" /> - ### 北大未名 BBS 全站十大 {#bei-jing-da-xue-bei-da-wei-ming-bbs-quan-zhan-shi-da} -<Route author="wooddance" example="/pku/bbs/hot" path="/pku/bbs/hot" radar="1" anticrawler="1"> - :::warning - 论坛部分帖子正文内容的获取需要用户登录后的 Cookie 值,详情见部署页面的配置模块。 - ::: -</Route> +<Route namespace="pku" data={{"path":"/bbs/hot","categories":["university"],"example":"/pku/bbs/hot","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bbs.pku.edu.cn/v2/hot-topic.php","bbs.pku.edu.cn/"]},"name":"北大未名 BBS 全站十大","maintainers":["wooddance"],"url":"bbs.pku.edu.cn/v2/hot-topic.php","description":":::warning\n 论坛部分帖子正文内容的获取需要用户登录后的 Cookie 值,详情见部署页面的配置模块。\n :::","location":"bbs/hot.ts"}} /> -### 学生就业指导服务中心 {#bei-jing-da-xue-xue-sheng-jiu-ye-zhi-dao-fu-wu-zhong-xin} - -<Route author="DylanXie123" example="/pku/scc/recruit/zpxx" path="/pku/scc/recruit/:type?" paramsDesc={['分区,见下表,默认请求 `zpxx`']} radar="1"> - | xwrd | tzgg | zpxx | sxxx | cyxx | - | -------- | -------- | -------- | -------- | -------- | - | 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 | -</Route> - -### 人事处 {#bei-jing-da-xue-ren-shi-chu} - -<Route author="nczitzk" example="/pku/hr" path="/pku/hr/:category?" paramsDesc={['分类,见下方说明,默认为首页最新公告']} radar="1" notOperational="1"> - :::tip - 分类字段处填写的是对应北京大学人事处分类页网址中介于 **`http://hr.pku.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。 - - 如 [北京大学人事处 - 人才招聘 - 教师 - 教学科研人员](https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm) 的网址为 `https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm` 其中介于 **`http://hr.pku.edu.cn/`** 和 **`/index.ht`** 中间的一段为 `rczp/js/jxkyry`。随后,并将其中的 `/` 修改为 `-`,可以得到 `rczp-js-jxkyry`。所以最终我们的路由为 [`/pku/hr/rczp-js-jxkyry`](https://rsshub.app/pku/hr/rczp-js-jxkyry) - ::: -</Route> - -### 研究生招生网 {#bei-jing-da-xue-yan-jiu-sheng-zhao-sheng-wang} - -<Route author="shengmaosu" example="/pku/admission/sszs" path="/pku/admission/sszs" radar="1" /> +:::warning +论坛部分帖子正文内容的获取需要用户登录后的 Cookie 值,详情见部署页面的配置模块。 +::: ### 观点 - 国家发展研究院 {#bei-jing-da-xue-guan-dian-guo-jia-fa-zhan-yan-jiu-yuan} -<Route author="MisLink" example="/pku/nsd/gd" path="/pku/nsd/gd" radar="1" /> +<Route namespace="pku" data={{"path":"/nsd/gd","categories":["university"],"example":"/pku/nsd/gd","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["nsd.pku.edu.cn/"]},"name":"观点 - 国家发展研究院","maintainers":["MisLink"],"url":"nsd.pku.edu.cn/","location":"nsd.ts"}} /> -### 软件与微电子学院 - 通知公告 {#bei-jing-da-xue-ruan-jian-yu-wei-dian-zi-xue-yuan-tong-zhi-gong-gao} +### 每周一推 - 中国政治学研究中心 {#bei-jing-da-xue-mei-zhou-yi-tui-zhong-guo-zheng-zhi-xue-yan-jiu-zhong-xin} -<Route author="legr4ndk" example="/pku/ss/notices" path="/pku/ss/notices" radar="1" notOperational="1" /> +<Route namespace="pku" data={{"path":"/rccp/mzyt","categories":["university"],"example":"/pku/rccp/mzyt","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.rccp.pku.edu.cn/"]},"name":"每周一推 - 中国政治学研究中心","maintainers":["vhxubo"],"url":"www.rccp.pku.edu.cn/","location":"rccp/mzyt.ts"}} /> + +### 人事处 {#bei-jing-da-xue-ren-shi-chu} + +<Route namespace="pku" data={{"path":"/hr/:category?","categories":["university"],"example":"/pku/hr","parameters":{"category":"分类,见下方说明,默认为首页最新公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hr.pku.edu.cn/"]},"name":"人事处","maintainers":["nczitzk"],"url":"hr.pku.edu.cn/","description":":::tip\n 分类字段处填写的是对应北京大学人事处分类页网址中介于 **`http://hr.pku.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。\n\n 如 [北京大学人事处 - 人才招聘 - 教师 - 教学科研人员](https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm) 的网址为 `https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm` 其中介于 **`http://hr.pku.edu.cn/`** 和 **`/index.ht`** 中间的一段为 `rczp/js/jxkyry`。随后,并将其中的 `/` 修改为 `-`,可以得到 `rczp-js-jxkyry`。所以最终我们的路由为 [`/pku/hr/rczp-js-jxkyry`](https://rsshub.app/pku/hr/rczp-js-jxkyry)\n :::","location":"hr.ts"}} /> + +:::tip +分类字段处填写的是对应北京大学人事处分类页网址中介于 **`http://hr.pku.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。 + +如 [北京大学人事处 - 人才招聘 - 教师 - 教学科研人员](https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm) 的网址为 `https://hr.pku.edu.cn/rczp/js/jxkyry/index.htm` 其中介于 **`http://hr.pku.edu.cn/`** 和 **`/index.ht`** 中间的一段为 `rczp/js/jxkyry`。随后,并将其中的 `/` 修改为 `-`,可以得到 `rczp-js-jxkyry`。所以最终我们的路由为 [`/pku/hr/rczp-js-jxkyry`](https://rsshub.app/pku/hr/rczp-js-jxkyry) +::: ### 软件与微电子学院 - 招生通知 {#bei-jing-da-xue-ruan-jian-yu-wei-dian-zi-xue-yuan-zhao-sheng-tong-zhi} -<Route author="legr4ndk" example="/pku/ss/admission" path="/pku/ss/admission" radar="1" anticrawler="1" /> +<Route namespace="pku" data={{"path":"/ss/admission","categories":["university"],"example":"/pku/ss/admission","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ss.pku.edu.cn/admission/admnotice","ss.pku.edu.cn/"]},"name":"软件与微电子学院 - 招生通知","maintainers":["legr4ndk"],"url":"ss.pku.edu.cn/admission/admnotice","location":"ss/admission.ts"}} /> ### 软件与微电子学院 - 硕士统考招生通知 {#bei-jing-da-xue-ruan-jian-yu-wei-dian-zi-xue-yuan-shuo-shi-tong-kao-zhao-sheng-tong-zhi} -<Route author="legr4ndk" example="/pku/ss/pgadmin" path="/pku/ss/pgadmin" radar="1" /> +<Route namespace="pku" data={{"path":"/ss/pgadmin","categories":["university"],"example":"/pku/ss/pgadmin","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ss.pku.edu.cn/admission/admbrochure/admission01","ss.pku.edu.cn/"]},"name":"软件与微电子学院 - 硕士统考招生通知","maintainers":["legr4ndk"],"url":"ss.pku.edu.cn/admission/admbrochure/admission01","location":"ss/pg-admin.ts"}} /> + +### 生命科学学院通知公告 {#bei-jing-da-xue-sheng-ming-ke-xue-xue-yuan-tong-zhi-gong-gao} + +<Route namespace="pku" data={{"path":"/cls/announcement","categories":["university"],"example":"/pku/cls/announcement","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bio.pku.edu.cn/homes/Index/news/21/21.html","bio.pku.edu.cn/"]},"name":"生命科学学院通知公告","maintainers":["william-swl"],"url":"bio.pku.edu.cn/homes/Index/news/21/21.html","location":"cls/announcement.ts"}} /> + +### 生命科学学院近期讲座 {#bei-jing-da-xue-sheng-ming-ke-xue-xue-yuan-jin-qi-jiang-zuo} + +<Route namespace="pku" data={{"path":"/cls/lecture","categories":["university"],"example":"/pku/cls/lecture","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bio.pku.edu.cn/homes/Index/news_jz/7/7.html","bio.pku.edu.cn/"]},"name":"生命科学学院近期讲座","maintainers":["TPOB"],"url":"bio.pku.edu.cn/homes/Index/news_jz/7/7.html","location":"cls/lecture.ts"}} /> + +### 学生就业指导服务中心 {#bei-jing-da-xue-xue-sheng-jiu-ye-zhi-dao-fu-wu-zhong-xin} + +<Route namespace="pku" data={{"path":"/scc/recruit/:type?","categories":["university"],"example":"/pku/scc/recruit/zpxx","parameters":{"type":"分区,见下表,默认请求 `zpxx`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"学生就业指导服务中心","maintainers":["DylanXie123"],"description":"| xwrd | tzgg | zpxx | sxxx | cyxx |\n | -------- | -------- | -------- | -------- | -------- |\n | 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 |","location":"scc/recruit.ts"}} /> + +| xwrd | tzgg | zpxx | sxxx | cyxx | +| -------- | -------- | -------- | -------- | -------- | +| 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 | + +### 研究生招生网 {#bei-jing-da-xue-yan-jiu-sheng-zhao-sheng-wang} + +<Route namespace="pku" data={{"path":"/admission/sszs","categories":["university"],"example":"/pku/admission/sszs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["admission.pku.edu.cn/zsxx/sszs/index.htm","admission.pku.edu.cn/"]},"name":"研究生招生网","maintainers":["pkuyjs"],"url":"admission.pku.edu.cn/zsxx/sszs/index.htm","location":"pkuyjs.ts"}} /> ## 北京航空航天大学 {#bei-jing-hang-kong-hang-tian-da-xue} ### 新闻网 {#bei-jing-hang-kong-hang-tian-da-xue-xin-wen-wang} -<Route author="AlanDecode" example="/buaa/news/zhxw" path="/buaa/news/:type" paramsDesc={['新闻版块']} radar="1"> - | 综合新闻 | 信息公告 | 学术文化 | 校园风采 | 科教在线 | 媒体北航 | 专题新闻 | 北航人物 | - | -------- | --------- | ------------ | --------- | --------- | --------- | -------- | -------- | - | zhxw | xxgg\_new | xsjwhhd\_new | xyfc\_new | kjzx\_new | mtbh\_new | ztxw | bhrw | -</Route> +<Route namespace="buaa" data={{"path":"/news/:type","categories":["university"],"example":"/buaa/news/zhxw","parameters":{"type":"新闻版块"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻网","maintainers":["AlanDecode"],"description":"| 综合新闻 | 信息公告 | 学术文化 | 校园风采 | 科教在线 | 媒体北航 | 专题新闻 | 北航人物 |\n | -------- | --------- | ------------ | --------- | --------- | --------- | -------- | -------- |\n | zhxw | xxgg_new | xsjwhhd_new | xyfc_new | kjzx_new | mtbh_new | ztxw | bhrw |","location":"news/index.ts"}} /> -### 集成电路科学与工程学院 {#bei-jing-hang-kong-hang-tian-da-xue-ji-cheng-dian-lu-ke-xue-yu-gong-cheng-xue-yuan} - -<Route author="MeanZhang" example="/buaa/sme/tzgg" path="/buaa/sme/:path*" paramsDesc={['版块路径,默认为 `gzgg`']} radar="1"> - :::tip - 路径参数应填写板块 URL 中 `http://www.sme.buaa.edu.cn/` 和 `.htm` 之间的字段。 - - 示例: - - 1. [通知公告](http://www.sme.buaa.edu.cn/tzgg.htm) 页面的 URL 为 `http://www.sme.buaa.edu.cn/tzgg.htm`,对应的路径参数为 `tzgg`,完整路由为 `/buaa/sme/tzgg`; - 2. [就业信息](http://www.sme.buaa.edu.cn/zsjy/jyxx.htm) 页面的 URL 为 `http://www.sme.buaa.edu.cn/zsjy/jyxx.htm`,对应的路径参数为 `zsjy/jyxx`,完整路由为 `/buaa/sme/zsjy/jyxx`。 - ::: - - :::warning - 部分页面(如[学院介绍](http://www.sme.buaa.edu.cn/xygk/xyjs.htm)、[微纳中心](http://www.sme.buaa.edu.cn/wnzx.htm)、[院学生会](http://www.sme.buaa.edu.cn/xsgz/yxsh.htm))存在无内容、内容跳转至外站等情况,因此可能出现解析失败的现象。 - ::: -</Route> +| 综合新闻 | 信息公告 | 学术文化 | 校园风采 | 科教在线 | 媒体北航 | 专题新闻 | 北航人物 | +| -------- | --------- | ------------ | --------- | --------- | --------- | -------- | -------- | +| zhxw | xxgg\_new | xsjwhhd\_new | xyfc\_new | kjzx\_new | mtbh\_new | ztxw | bhrw | ## 北京科技大学 {#bei-jing-ke-ji-da-xue} +### 天津学院 {#bei-jing-ke-ji-da-xue-tian-jin-xue-yuan} + +<Route namespace="ustb" data={{"path":"/tj/news/:type?","categories":["university"],"example":"/ustb/tj/news/all","parameters":{"type":"默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"天津学院","maintainers":["henbf"],"description":"| 全部 | 学院新闻 | 学术活动 | 城市建设学院 | 信息工程学院 | 经济学院 | 管理学院 | 材料系 | 机械工程系 | 护理系 | 法律系 | 外语系 | 艺术系 |\n | ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ |\n | all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx |","location":"tj/news.ts"}} /> + +| 全部 | 学院新闻 | 学术活动 | 城市建设学院 | 信息工程学院 | 经济学院 | 管理学院 | 材料系 | 机械工程系 | 护理系 | 法律系 | 外语系 | 艺术系 | +| ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ | +| all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx | + ### 研究生院 {#bei-jing-ke-ji-da-xue-yan-jiu-sheng-yuan} -<Route author="DA1Y1" example="/ustb/yjsy/news/all" path="/ustb/yjsy/news/:type" paramsDesc={['文章类别']}> - | 北京科技大学研究生院 | 土木与资源工程学院 | 能源与环境工程学院 | 冶金与生态工程学院 | 材料科学与工程学院 | 机械工程学院 | 自动化学院 | 计算机与通信工程学院 | 数理学院 | 化学与生物工程学院 | 经济管理学院 | 文法学院 | 马克思主义学院 | 外国语学院 | 国家材料服役安全科学中心 | 新金属材料国家重点实验室 | 工程技术研究院 | 钢铁共性技术协同创新中心 | 钢铁冶金新技术国家重点实验室 | 新材料技术研究院 | 科技史与文化遗产研究院 | 顺德研究生院 | - | -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ | - | all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd | -</Route> +<Route namespace="ustb" data={{"path":"/yjsy/news/:type","categories":["university"],"example":"/ustb/yjsy/news/all","parameters":{"type":"文章类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.ustb.edu.cn/:type"]},"name":"研究生院","maintainers":["DA1Y1"],"description":"| 北京科技大学研究生院 | 土木与资源工程学院 | 能源与环境工程学院 | 冶金与生态工程学院 | 材料科学与工程学院 | 机械工程学院 | 自动化学院 | 计算机与通信工程学院 | 数理学院 | 化学与生物工程学院 | 经济管理学院 | 文法学院 | 马克思主义学院 | 外国语学院 | 国家材料服役安全科学中心 | 新金属材料国家重点实验室 | 工程技术研究院 | 钢铁共性技术协同创新中心 | 钢铁冶金新技术国家重点实验室 | 新材料技术研究院 | 科技史与文化遗产研究院 | 顺德研究生院 |\n | -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ |\n | all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd |","location":"yjsy/news.ts"}} /> + +| 北京科技大学研究生院 | 土木与资源工程学院 | 能源与环境工程学院 | 冶金与生态工程学院 | 材料科学与工程学院 | 机械工程学院 | 自动化学院 | 计算机与通信工程学院 | 数理学院 | 化学与生物工程学院 | 经济管理学院 | 文法学院 | 马克思主义学院 | 外国语学院 | 国家材料服役安全科学中心 | 新金属材料国家重点实验室 | 工程技术研究院 | 钢铁共性技术协同创新中心 | 钢铁冶金新技术国家重点实验室 | 新材料技术研究院 | 科技史与文化遗产研究院 | 顺德研究生院 | +| -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ | +| all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd | ### 研究生招生信息网 {#bei-jing-ke-ji-da-xue-yan-jiu-sheng-zhao-sheng-xin-xi-wang} -<Route author="yanbot-team" example="/ustb/yzxc/tzgg" path="/ustb/yzxc/tzgg" /> - -### 天津学院 {#bei-jing-ke-ji-da-xue-tian-jin-xue-yuan} - -<Route author="henbf" example="/ustb/tj/news/all" path="/ustb/tj/news/:type?" paramsDesc={['默认为 `all`']}> - | 全部 | 学院新闻 | 学术活动 | 城市建设学院 | 信息工程学院 | 经济学院 | 管理学院 | 材料系 | 机械工程系 | 护理系 | 法律系 | 外语系 | 艺术系 | - | ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ | - | all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx | -</Route> +<Route namespace="ustb" data={{"path":"/yzxc/tzgg","categories":["university"],"example":"/ustb/yzxc/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yzxc.ustb.edu.cn/"]},"name":"研究生招生信息网","maintainers":["yanbot-team"],"url":"yzxc.ustb.edu.cn/","location":"yzxc/tzgg.ts"}} /> ## 北京理工大学 {#bei-jing-li-gong-da-xue} -### 教务处通知 {#bei-jing-li-gong-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="sinofp" example="/bit/jwc" path="/bit/jwc" radar="1" notOperational="1" /> - ### 计院通知 {#bei-jing-li-gong-da-xue-ji-yuan-tong-zhi} -<Route author="sinofp" example="/bit/cs" path="/bit/cs" radar="1" notOperational="1" /> +<Route namespace="bit" data={{"path":"/cs","categories":["university"],"example":"/bit/cs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cs.bit.edu.cn/tzgg","cs.bit.edu.cn/"]},"name":"计院通知","maintainers":["sinofp"],"url":"cs.bit.edu.cn/tzgg","location":"cs/cs.ts"}} /> + +### 教务处通知 {#bei-jing-li-gong-da-xue-jiao-wu-chu-tong-zhi} + +<Route namespace="bit" data={{"path":"/jwc","categories":["university"],"example":"/bit/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.bit.edu.cn/tzgg","jwc.bit.edu.cn/"]},"name":"教务处通知","maintainers":["sinofp"],"url":"jwc.bit.edu.cn/tzgg","location":"jwc/jwc.ts"}} /> ### 人才招聘 {#bei-jing-li-gong-da-xue-ren-cai-zhao-pin} -<Route author="nczitzk" example="/bit/rszhaopin" path="/bit/rszhaopin" radar="1" /> +<Route namespace="bit" data={{"path":"/rszhaopin","categories":["university"],"example":"/bit/rszhaopin","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rszhaopin.bit.edu.cn/"]},"name":"人才招聘","maintainers":["nczitzk"],"url":"rszhaopin.bit.edu.cn/","location":"rszhaopin.ts"}} /> ### 研究生院招生信息 {#bei-jing-li-gong-da-xue-yan-jiu-sheng-yuan-zhao-sheng-xin-xi} -<Route author="shengmaosu" example="/bit/yjs" path="/bit/yjs" radar="1" /> - -## 北京林业大学 {#bei-jing-lin-ye-da-xue} - -### 绿色新闻网 {#bei-jing-lin-ye-da-xue-lv-se-xin-wen-wang} - -<Route author="markmingjie" example="/bjfu/news/lsyw" path="/bjfu/news/:type" paramsDesc={['新闻栏目']}> - | 绿色要闻 | 校园动态 | 教学科研 | 党建思政 | 一周排行 | - | -------- | -------- | -------- | -------- | -------- | - | lsyw | xydt | jxky | djsz | yzph | -</Route> - -### 研究生院培养动态 {#bei-jing-lin-ye-da-xue-yan-jiu-sheng-yuan-pei-yang-dong-tai} - -<Route author="markmingjie" example="/bjfu/grs" path="/bjfu/grs" /> - -### 科技处通知公告 {#bei-jing-lin-ye-da-xue-ke-ji-chu-tong-zhi-gong-gao} - -<Route author="markmingjie" example="/bjfu/kjc" path="/bjfu/kjc" /> - -### 信息学院通知 {#bei-jing-lin-ye-da-xue-xin-xi-xue-yuan-tong-zhi} - -<Route author="wzc-blog" example="/bjfu/it/xyxw" path="/bjfu/it/:type" paramsDesc={['通知类别']}> - | 学院新闻 | 科研动态 | 本科生培养 | 研究生培养 | - | -------- | -------- | ---------- | ---------- | - | xyxw | kydt | pydt | pydt2 | -</Route> - -### 教务处通知公告 {#bei-jing-lin-ye-da-xue-jiao-wu-chu-tong-zhi-gong-gao} - -<Route author="markmingjie" example="/bjfu/jwc/jwkx" path="/bjfu/jwc/:type" paramsDesc={['通知类别']}> - | 教务快讯 | 考试信息 | 课程信息 | 教改动态 | 图片新闻 | - | -------- | -------- | -------- | -------- | -------- | - | jwkx | ksxx | kcxx | jgdt | tpxw | -</Route> +<Route namespace="bit" data={{"path":"/yjs","categories":["university"],"example":"/bit/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grd.bit.edu.cn/zsgz/zsxx/index.htm","grd.bit.edu.cn/"]},"name":"研究生院招生信息","maintainers":["shengmaosu"],"url":"grd.bit.edu.cn/zsgz/zsxx/index.htm","location":"yjs.ts"}} /> ## 北京师范大学 {#bei-jing-shi-fan-da-xue} -### 经济与工商管理学院 {#bei-jing-shi-fan-da-xue-jing-ji-yu-gong-shang-guan-li-xue-yuan} +### 教务处通知公告 {#bei-jing-shi-fan-da-xue-jiao-wu-chu-tong-zhi-gong-gao} -<Route author="nczitzk" example="/bnu/bs" path="/bnu/bs/:category?" paramsDesc={['分类,见下表,默认为学院新闻']}> - | 学院新闻 | 通知公告 | 学术成果 | 学术讲座 | 教师观点 | 人才招聘 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | xw | zytzyyg | xzcg | xzjz | xz | bshzs | -</Route> +<Route namespace="bjfu" data={{"path":"/jwc/:type","categories":["university"],"example":"/bjfu/jwc/jwkx","parameters":{"type":"通知类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.bjfu.edu.cn/:type/index.html"]},"name":"教务处通知公告","maintainers":["markmingjie"],"description":"| 教务快讯 | 考试信息 | 课程信息 | 教改动态 | 图片新闻 |\n | -------- | -------- | -------- | -------- | -------- |\n | jwkx | ksxx | kcxx | jgdt | tpxw |","location":"jwc/index.ts"}} /> + +| 教务快讯 | 考试信息 | 课程信息 | 教改动态 | 图片新闻 | +| -------- | -------- | -------- | -------- | -------- | +| jwkx | ksxx | kcxx | jgdt | tpxw | + +### 科技处通知公告 {#bei-jing-shi-fan-da-xue-ke-ji-chu-tong-zhi-gong-gao} + +<Route namespace="bjfu" data={{"path":"/kjc","categories":["university"],"example":"/bjfu/kjc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["kyc.bjfu.edu.cn/"]},"name":"科技处通知公告","maintainers":["markmingjie"],"url":"kyc.bjfu.edu.cn/","location":"kjc.ts"}} /> + +### 绿色新闻网 {#bei-jing-shi-fan-da-xue-lv-se-xin-wen-wang} + +<Route namespace="bjfu" data={{"path":"/news/:type","categories":["university"],"example":"/bjfu/news/lsyw","parameters":{"type":"新闻栏目"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.bjfu.edu.cn/:type/index.html"]},"name":"绿色新闻网","maintainers":["markmingjie"],"description":"| 绿色要闻 | 校园动态 | 教学科研 | 党建思政 | 一周排行 |\n | -------- | -------- | -------- | -------- | -------- |\n | lsyw | xydt | jxky | djsz | yzph |","location":"news/index.ts"}} /> + +| 绿色要闻 | 校园动态 | 教学科研 | 党建思政 | 一周排行 | +| -------- | -------- | -------- | -------- | -------- | +| lsyw | xydt | jxky | djsz | yzph | + +### 信息学院通知 {#bei-jing-shi-fan-da-xue-xin-xi-xue-yuan-tong-zhi} + +<Route namespace="bjfu" data={{"path":"/it/:type","categories":["university"],"example":"/bjfu/it/xyxw","parameters":{"type":"通知类别"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["it.bjfu.edu.cn/:type/index.html"]},"name":"信息学院通知","maintainers":["wzc-blog"],"description":"| 学院新闻 | 科研动态 | 本科生培养 | 研究生培养 |\n | -------- | -------- | ---------- | ---------- |\n | xyxw | kydt | pydt | pydt2 |","location":"it/index.ts"}} /> + +| 学院新闻 | 科研动态 | 本科生培养 | 研究生培养 | +| -------- | -------- | ---------- | ---------- | +| xyxw | kydt | pydt | pydt2 | + +### 研究生院培养动态 {#bei-jing-shi-fan-da-xue-yan-jiu-sheng-yuan-pei-yang-dong-tai} + +<Route namespace="bjfu" data={{"path":"/grs","categories":["university"],"example":"/bjfu/grs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["graduate.bjfu.edu.cn/"]},"name":"研究生院培养动态","maintainers":["markmingjie"],"url":"graduate.bjfu.edu.cn/","location":"grs.ts"}} /> + +## 北京师范大学 {#bei-jing-shi-fan-da-xue} ### 党委学生工作部 {#bei-jing-shi-fan-da-xue-dang-wei-xue-sheng-gong-zuo-bu} -<Route author="Fatpandac" example="/bnu/dwxgb/xwzx/tzgg" path="/bnu/dwxgb/:category/:type" paramsDesc={['大分类', '子分类,例子如下']}> - `https://dwxgb.bnu.edu.cn/xwzx/tzgg/index.html` 则对应为 \`/bnu/dwxgb/xwzx/tzgg -</Route> +<Route namespace="bnu" data={{"path":"/dwxgb/:category/:type","categories":["university"],"example":"/bnu/dwxgb/xwzx/tzgg","parameters":{"category":"大分类","type":"子分类,例子如下"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dwxgb.bnu.edu.cn/:category/:type/index.html"]},"name":"党委学生工作部","maintainers":["Fatpandac"],"description":"`https://dwxgb.bnu.edu.cn/xwzx/tzgg/index.html` 则对应为 `/bnu/dwxgb/xwzx/tzgg","location":"dwxgb.ts"}} /> -### 图书馆通知 {#bei-jing-shi-fan-da-xue-tu-shu-guan-tong-zhi} +`https://dwxgb.bnu.edu.cn/xwzx/tzgg/index.html` 则对应为 \`/bnu/dwxgb/xwzx/tzgg -<Route author="TonyRL" example="/bnu/lib/zydt" path="/bjfu/lib/:category?" paramsDesc={['分类,见下表,默认为 `zydt`']} radar="1" anticrawler="1"> - | 资源动态 | 新闻动态 | 系列讲座 | - | -------- | -------- | -------- | - | zydt | xwdt | xljz1 | -</Route> +### 经济与工商管理学院 {#bei-jing-shi-fan-da-xue-jing-ji-yu-gong-shang-guan-li-xue-yuan} -### 党委学生工作部辅导员发展中心 {#bei-jing-shi-fan-da-xue-dang-wei-xue-sheng-gong-zuo-bu-fu-dao-yuan-fa-zhan-zhong-xin} +<Route namespace="bnu" data={{"path":"/bs/:category?","categories":["university"],"example":"/bnu/bs","parameters":{"category":"分类,见下表,默认为学院新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bs.bnu.edu.cn/:category/index.html"],"target":"/bs/:category"},"name":"经济与工商管理学院","maintainers":["nczitzk"],"description":"| 学院新闻 | 通知公告 | 学术成果 | 学术讲座 | 教师观点 | 人才招聘 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | xw | zytzyyg | xzcg | xzjz | xz | bshzs |","location":"bs.ts"}} /> -<Route author="TonyRL" example="/bnu/fdy/tzgg/dwjs" path="/bnu/fdy/:path*" paramsDesc={['路径,默认为 `tzgg`']} radar="1"> - :::tip - 路径处填写对应页面 URL 中 `https://fdy.bnu.edu.cn/` 和 `/index.htm` 之间的字段。下面是一个例子。 - - 若订阅 [通知公告 > 队伍建设](https://fdy.bnu.edu.cn/tzgg/dwjs/index.htm) 则将对应页面 URL `https://fdy.bnu.edu.cn/tzgg/dwjs/index.htm` 中 `https://fdy.bnu.edu.cn/` 和 `/index.htm` 之间的字段 `tzgg/dwjs` 作为路径填入。此时路由为 [`/bnu/fdy/tzgg/dwjs`](https://rsshub.app/bnu/fdy/tzgg/dwjs) - ::: -</Route> - -## 北京物资学院 {#bei-jing-wu-zi-xue-yuan} - -### 通知公告 {#bei-jing-wu-zi-xue-yuan-tong-zhi-gong-gao} - -<Route author="Muxq99" example="/bwu/news" path="/bwu/news" notOperational="1" /> - -:::warning -由于学校官网对非大陆 IP 的访问存在限制,需自行部署。 -::: +| 学院新闻 | 通知公告 | 学术成果 | 学术讲座 | 教师观点 | 人才招聘 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| xw | zytzyyg | xzcg | xzjz | xz | bshzs | ## 北京协和医学院 {#bei-jing-xie-he-yi-xue-yuan} ### “4+4” 试点班招生网通知公告 {#bei-jing-xie-he-yi-xue-yuan-4-4-shi-dian-ban-zhao-sheng-wang-tong-zhi-gong-gao} -<Route author="nczitzk" example="/pumc/mdadmission" path="/pumc/mdadmission" /> +<Route namespace="pumc" data={{"path":"/mdadmission","categories":["university"],"example":"/pumc/mdadmission","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["mdadmission.pumc.edu.cn/mdweb/site","mdadmission.pumc.edu.cn/"]},"name":"“4+4” 试点班招生网通知公告","maintainers":["nczitzk"],"url":"mdadmission.pumc.edu.cn/mdweb/site","location":"mdadmission.ts"}} /> ## 北京邮电大学 {#bei-jing-you-dian-da-xue} -### 硕士研究生招生通知 {#bei-jing-you-dian-da-xue-shuo-shi-yan-jiu-sheng-zhao-sheng-tong-zhi} - -<Route author="ihewro" example="/bupt/yz/int" path="/bupt/yz/:type" paramsDesc={['学院英文缩写']} notOperational="1"> - | 综合 | 信息与通信工程学院 | 电子工程学院 | 计算机学院 | 自动化学院 | 软件学院 | 数字媒体与设计艺术学院 | 网络空间安全学院 | 理学院 | 经济管理学院 | 人文学院 | 马克思主义学院 | 网络技术研究院 | 信息光子学与光通信研究院 | - | ---- | ------------------ | ------------ | ---------- | ---------- | -------- | ---------------------- | ---------------- | ------ | ------------ | -------- | -------------- | -------------- | ------------------------ | - | all | sice | see | scs | sa | sse | sdmda | scss | sci | sem | sh | mtri | int | ipoc | -</Route> - -### 研究生院通知 {#bei-jing-you-dian-da-xue-yan-jiu-sheng-yuan-tong-zhi} - -<Route author="RicardoMing" example="/bupt/grs" path="/bupt/grs" notOperational="1" /> - -### 信息门户 {#bei-jing-you-dian-da-xue-xin-xi-men-hu} - -<Route author="RicardoMing wzekin" example="/bupt/portal" path="/bupt/portal" notOperational="1" /> - -:::warning -由于需要登陆 `https://webapp.bupt.edu.cn/wap/login.html?redirect=http://` 后的 Cookie 值,所以只能自建,详情见部署页面的配置模块 -::: - -### 校园新闻 {#bei-jing-you-dian-da-xue-xiao-yuan-xin-wen} - -<Route author="wzekin" example="/bupt/news" path="/bupt/news" notOperational="1" /> - -:::warning -由于需要登陆 `https://webapp.bupt.edu.cn/wap/login.html?redirect=http://` 后的 Cookie 值,所以只能自建,详情见部署页面的配置模块 -::: - -### BTBYR 趣味盒 {#bei-jing-you-dian-da-xue-btbyr-qu-wei-he} - -<Route author="prnake" example="/bupt/funbox" path="/bupt/funbox" configRequired="1" /> - -:::warning -由于需要登陆 BTBYR 后的 Cookie 值,所以只能自建,并且部署和订阅端均需支持 IPV6 网络或使用镜像站点。 -::: - ### 人才招聘 {#bei-jing-you-dian-da-xue-ren-cai-zhao-pin} -<Route author="nczitzk" example="/bupt/rczp" path="/bupt/rczp" /> - -## 常州大学 {#chang-zhou-da-xue} - -### 教务处 {#chang-zhou-da-xue-jiao-wu-chu} - -<Route author="richardchien" example="/cczu/jwc/1425" path="/cczu/jwc/:category?" paramsDesc={['可选,默认为 `all`']} anticrawler="1"> - | 全部 | 通知公告 | 教务新闻 | 各类活动与系列讲座 | 本科教学工程 | 他山之石 | 信息快递 | - | ---- | -------- | -------- | ------------------ | ------------ | -------- | -------- | - | all | 1425 | 1437 | 1485 | 1487 | 1442 | 1445 | -</Route> - -### 新闻网 {#chang-zhou-da-xue-xin-wen-wang} - -<Route author="richardchien" example="/cczu/news/6620" path="/cczu/news/:category?" paramsDesc={['可选,默认为 `all`']} notOperational="1"> - | 全部 | 常大要闻 | 校园快讯 | 媒体常大 | 时事热点 | 高教动态 | 网上橱窗 | 新媒常大 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | all | 6620 | 6621 | 6687 | 6628 | 6629 | 6640 | 6645 | -</Route> - -## 成都信息工程大学 {#cheng-du-xin-xi-gong-cheng-da-xue} - -### 成信新闻网 {#cheng-du-xin-xi-gong-cheng-da-xue-cheng-xin-xin-wen-wang} - -<Route author="kimika" example="/cuit/cxxww/1" path="/cuit/cxxww/:type?" paramsDesc={['默认为 `1`']} notOperational="1"> - | 综合新闻 | 信息公告 | 焦点新闻 | 学术动态 | 工作交流 | 媒体成信 | 更名专题 | 文化活动 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | 5 | 7 | 9 | 10 | -</Route> - -## 重庆大学 {#chong-qing-da-xue} - -### 本科教学信息网通知公告 {#chong-qing-da-xue-ben-ke-jiao-xue-xin-xi-wang-tong-zhi-gong-gao} - -<Route author="El-Chiang Hagb" example="/cqu/jwc/" path="/cqu/jwc/:path*" paramsDesc={['路径']} anticrawler="1"> - | 分类 | 路径 | - | ----------------------------------------------------------------- | ------------------- | - | [通知公告](http://jwc.cqu.edu.cn/index/tzgg.htm) | `index/tzgg` 或留空 | - | [通知公告 / 学籍管理](http://jwc.cqu.edu.cn/index/tzgg/xjgl.htm) | `index/tzgg/xjgl` | - | [通知公告 / 交流交换](http://jwc.cqu.edu.cn/index/tzgg/jljh1.htm) | `index/tzgg/jljh1` | - | [通知公告 / 教学运行](http://jwc.cqu.edu.cn/index/tzgg/jxyx.htm) | `index/tzgg/jxyx` | - | [通知公告 / 教学质量](http://jwc.cqu.edu.cn/index/tzgg/jxzl.htm) | `index/tzgg/jxzl` | - | [通知公告 / 教研教改](http://jwc.cqu.edu.cn/index/tzgg/jyjg.htm) | `index/tzgg/jyjg` | - | [通知公告 / 创新实践](http://jwc.cqu.edu.cn/index/tzgg/cxsj.htm) | `index/tzgg/cxsj` | - | [学籍管理 / 学籍处理](http://jwc.cqu.edu.cn/xjgl/xjcl.htm) | `xjgl/xjcl` | - | [学籍管理 / 交流交换](http://jwc.cqu.edu.cn/xjgl/jljh.htm) | `xjgl/jljh` | - | [学籍管理 / 学生推免](http://jwc.cqu.edu.cn/xjgl/xstm.htm) | `xjgl/xstm` | - | [学籍管理 / 转专业](http://jwc.cqu.edu.cn/xjgl/zzy.htm) | `xjgl/zzy` | - | [教学运行 / 学生选课](http://jwc.cqu.edu.cn/jxyx/xsxk.htm) | `jxyx/xsxk` | - | [教学运行 / 考试安排](http://jwc.cqu.edu.cn/jxyx/ksap.htm) | `jxyx/ksap` | - | [教学运行 / 助教管理](http://jwc.cqu.edu.cn/jxyx/zjgl.htm) | `jxyx/zjgl` | -</Route> - -:::tip -路径参数的值为相应通知列表页面的地址去除后缀名和域名后的路径。 - -例如 “通知公告” 列表页面地址为 `http://jwc.cqu.edu.cn/index/tzgg.htm`,相应参数为 `index/tgzz`。 -::: - -:::warning -原重庆大学教务网网站变更为重庆大学本科教学信息网。该路由编写时(2021-07-29)它[正处于试运行阶段](http://jwc.cqu.edu.cn/info/1080/3482.htm)。 - -通知的分类比较迷,请小心甄别、使用(以免漏掉需要的通知)。 -::: - -### 新闻网讲座预告 {#chong-qing-da-xue-xin-wen-wang-jiang-zuo-yu-gao} - -<Route author="nicolaszf" example="/cqu/news/jzyg" path="/cqu/news/jzyg" notOperational="1" /> - -### 新闻网通知公告简报 {#chong-qing-da-xue-xin-wen-wang-tong-zhi-gong-gao-jian-bao} - -<Route author="Hagb" example="/cqu/news/tz" path="/cqu/news/tz" notOperational="1" /> - -### 校团委 {#chong-qing-da-xue-xiao-tuan-wei} - -<Route author="Hagb" example="/cqu/youth/gzdt" path="/cqu/youth/:category" paramsDesc={['分类名']} anticrawler="1"> - | 工作动态 | 院系风采 | 通知公告(可能需内网) | 文件转载 | - | -------- | -------- | ---------------------- | -------- | - | gzdt | yxfc | tzgg | wjzz | -</Route> - -### 数学与统计学院 {#chong-qing-da-xue-shu-xue-yu-tong-ji-xue-yuan} - -<Route author="Hagb" example="/cqu/sci/1053" path="/cqu/sci/:category" paramsDesc={['分类名']} anticrawler="1"> - | 学院新闻 | 学院公告 | 学院活动 | 学术活动 | - | -------- | -------- | -------- | -------- | - | 1053 | 1054 | 1055 | 1056 | -</Route> - -### 信息化办公室 {#chong-qing-da-xue-xin-xi-hua-ban-gong-shi} - -<Route author="Hagb" example="/cqu/net/tzgg" path="/cqu/net/:category" paramsDesc={['分类名']} anticrawler="1"> - | 通知公告 | 单位动态 | 语言文字 | - | -------- | -------- | -------- | - | tzgg | dwdt | yywz | -</Route> - -## 重庆科技学院 {#chong-qing-ke-ji-xue-yuan} - -### 教务处公告 {#chong-qing-ke-ji-xue-yuan-jiao-wu-chu-gong-gao} - -<Route author="binarization" example="/cqust/jw/notify" path="/cqust/jw/:type?" paramsDesc={['可选,默认为 `notify`']} notOperational="1"> - | 通知公告 | 教务快讯 | - | -------- | -------- | - | notify | news | -</Route> - -### 图书馆公告 {#chong-qing-ke-ji-xue-yuan-tu-shu-guan-gong-gao} - -<Route author="binarization" example="/cqust/lib/news" path="/cqust/lib/:type?" paramsDesc={['可选,默认为 `news`']} notOperational="1"> - | 本馆公告 | - | -------- | - | news | -</Route> - -## 重庆理工大学 {#chong-qing-li-gong-da-xue} - -### 学校通知 {#chong-qing-li-gong-da-xue-xue-xiao-tong-zhi} - -<Route author="Colin-XKL" example="/cqut/news" path="/cqut/news" radar="1" notOperational="1" /> - -### 图书馆通知 {#chong-qing-li-gong-da-xue-tu-shu-guan-tong-zhi} - -<Route author="Colin-XKL" example="/cqut/libnews" path="/cqut/libnews" radar="1" notOperational="1" /> +<Route namespace="bupt" data={{"path":"/rczp","categories":["university"],"example":"/bupt/rczp","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bupt.edu.cn/"]},"name":"人才招聘","maintainers":["nczitzk"],"url":"bupt.edu.cn/","location":"rczp.ts"}} /> ## 重庆文理学院 {#chong-qing-wen-li-xue-yuan} ### 通知公告 {#chong-qing-wen-li-xue-yuan-tong-zhi-gong-gao} -<Route author="Fatpandac" example="/cqwu/news/academiceve" path="/cqwu/news/:type?" paramsDesc={['可选,默认为 academiceve ']} radar="1"> - | 通知公告 | 学术活动公告 | - | -------- | ------------ | - | notify | academiceve | -</Route> +<Route namespace="cqwu" data={{"path":"/news/:type?","categories":["university"],"example":"/cqwu/news/academiceve","parameters":{"type":"可选,默认为 academiceve "},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通知公告","maintainers":["Fatpandac"],"description":"| 通知公告 | 学术活动公告 |\n | -------- | ------------ |\n | notify | academiceve |","location":"index.ts"}} /> -## 大连大学 {#da-lian-da-xue} - -### 教务处信息 {#da-lian-da-xue-jiao-wu-chu-xin-xi} - -<Route author="SettingDust" example="/dlu/jiaowu/news" path="/dlu/jiaowu/news" /> - -## 大连工业大学 {#da-lian-gong-ye-da-xue} - -### 教务处新闻 {#da-lian-gong-ye-da-xue-jiao-wu-chu-xin-wen} - -<Route author="xu42" example="/dpu/jiaowu/news/2" path="/dpu/jiaowu/news/:type?" paramsDesc={['默认为 `2`']} notOperational="1"> - | 新闻动态 | 通知公告 | 教务文件 | - | -------- | -------- | -------- | - | 2 | 3 | 4 | -</Route> - -### 网络服务新闻 {#da-lian-gong-ye-da-xue-wang-luo-fu-wu-xin-wen} - -<Route author="xu42" example="/dpu/wlfw/news/2" path="/dpu/wlfw/news/:type?" paramsDesc={['默认为 `1`']} notOperational="1"> - | 新闻动态 | 通知公告 | - | -------- | -------- | - | 1 | 2 | -</Route> - -## 大连海事大学 {#da-lian-hai-shi-da-xue} - -### 新闻网 {#da-lian-hai-shi-da-xue-xin-wen-wang} - -<Route author="arjenzhou" example="/dlmu/news/hdyw" path="/dlmu/news/:type" paramsDesc={['默认为 `hdyw`']} notOperational="1"> - | 海大要闻 | 媒体海大 | 综合新闻 | 院系风采 | 海大校报 | 理论园地 | 海大讲坛 | 艺文荟萃 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | - | hdyw | mthd | zhxw | yxfc | hdxb | llyd | hdjt | ywhc | -</Route> - -### 研究生院 {#da-lian-hai-shi-da-xue-yan-jiu-sheng-yuan} - -#### 招生工作 {#da-lian-hai-shi-da-xue-yan-jiu-sheng-yuan-zhao-sheng-gong-zuo} - -<Route author="nczitzk" example="/dlmu/grs/zsgz/ssyjs" path="/dlmu/grs/zsgz/:type" paramsDesc={['招生类别']} notOperational="1"> - | 博士研究生 | 硕士研究生 | 同等学力攻读硕士学位 | 港澳台地区招生 | - | :--------: | :--------: | :------------------: | :------------: | - | bsyjs | ssyjs | tdxlgdssxw | gatdqzs | -</Route> - -## 大连理工大学 {#da-lian-li-gong-da-xue} - -### 通用 {#da-lian-li-gong-da-xue-tong-yong} - -<Route author="nczitzk" example="/dut" path="/dut/:site?/:category?" paramsDesc={['站点,可在 URL 中找到,默认为 **新闻网**', '分类,可在 URL 中找到,默认为各站点默认分类栏目,如 **新闻网** 即为 **头条关注**']} notOperational="1"> - 订阅 **单级** 栏目如 [大连理工大学新闻网](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) 分类栏目在下方 [**新闻网**](#da-lian-li-gong-da-xue-xin-wen-wang) 参数表格中 `category` 参数为 `rcpy`,并非上面例子中给出的 `xwjj01/rcpy`。这意味着开发者对路由 `/dut/news/xwjj01/rcpy` 指定了快捷方式 `/dut/news/rcpy`。两者的效果是一致的。 - ::: -</Route> - -### 新闻网 {#da-lian-li-gong-da-xue-xin-wen-wang} - -<Route author="nczitzk" example="/dut/news" path="/dut/news/:category?" paramsDesc={['分类,见下表,默认为 [**头条关注**](https://news.dlut.edu.cn/ttgz.htm)']} notOperational="1"> - | 头条关注 | 新闻聚焦 | 人才培养 | 科学研究 | 交流合作 | - | -------- | -------- | -------- | -------- | -------- | - | ttgz | xwjj | rcpy | kxyj | jlhz | - - | 一线风采 | 大工人物 | 图说大工 | 影像大工 | 媒体大工 | - | -------- | -------- | -------- | -------- | -------- | - | yxfc | dgrw | tsdg | yxdg | mtdg | -</Route> - -### 人事处 {#da-lian-li-gong-da-xue-ren-shi-chu} - -<Route author="nczitzk" example="/dut/perdep" path="/dut/perdep/:category?" paramsDesc={['分类,见下表,默认为 [**通知公告**](http://perdep.dlut.edu.cn/tzgg/tzgg.htm)']}> - | 通知公告 | 工作动态 | 政策法规 | - | -------- | -------- | -------- | - | tzgg | gzdt | zcfg | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学人事处](http://perdep.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 教务处 {#da-lian-li-gong-da-xue-jiao-wu-chu} - -<Route author="beautyyuyanli nczitzk" example="/dut/teach" path="/dut/teach/:category?" paramsDesc={['分类,见下表,默认为 [**新闻快递**](http://teach.dlut.edu.cn/xwkd/xwkd.htm)']}> - | 新闻快递 | 重要通告 | 办会公示 | - | -------- | -------- | -------- | - | xwkd | zytg | bhgs | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学教务处](http://teach.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 研究生院 {#da-lian-li-gong-da-xue-yan-jiu-sheng-yuan} - -<Route author="nczitzk" example="/dut/gs" path="/dut/gs/:category?" paramsDesc={['分类,见下表,默认为 [**重要通知**](http://gs.dlut.edu.cn/zytz.htm)']}> - | 重要通知 | 工作动态 | 政策法规 | - | -------- | -------- | -------- | - | zytz | gzdt | zcfg | - - | 研究生招生 - 政策文件 | 研究生招生 - 工作动态 | 研究生招生 - 资料下载 | - | --------------------- | --------------------- | --------------------- | - | yjszs/zcwj1 | yjszs/gzdt/gzdt | yjszs/zlxz/zlxz | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学研究生院](http://gs.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 软件学院 {#da-lian-li-gong-da-xue-ruan-jian-xue-yuan} - -<Route author="nczitzk" example="/dut/ssdut" path="/dut/ssdut/:category?" paramsDesc={['分类,见下表,默认为 [**焦点新闻**](http://ssdut.dlut.edu.cn/ywgg/xueyuanxinwen/jdxw.htm)']} notOperational="1"> - | 焦点新闻 | 综合新闻 | 学院通知 | 学术动态 | 本科生通知 | 研究生通知 | - | -------- | -------- | -------- | -------- | ---------- | ---------- | - | jdxw | zhxw | xytz | xsdt | bkstz | yjstz | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学软件学院](http://ssdut.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 开发区校区 {#da-lian-li-gong-da-xue-kai-fa-qu-xiao-qu} - -<Route author="nczitzk" example="/dut/eda" path="/dut/eda/:category?" paramsDesc={['分类,见下表,默认为 [**通知公告**](http://eda.dlut.edu.cn/tzgg/tzgg.htm)']}> - | 通知公告 | 校区新闻 | - | -------- | -------- | - | tzgg | xqxw | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学开发区校区](http://eda.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 盘锦校区 {#da-lian-li-gong-da-xue-pan-jin-xiao-qu} - -<Route author="nczitzk" example="/dut/panjin" path="/dut/panjin/:category?" paramsDesc={['分类,见下表,默认为 [**公告**](https://panjin.dlut.edu.cn/index/gg.htm)']} notOperational="1"> - | 校区新闻 | 校园文化 | 学员风采 | 学术动态 | 媒体报道 | 公告 | - | -------- | -------- | -------- | -------- | -------- | ---- | - | xqxw | xywh | xyfc | xsdt | mtbd | gg | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学盘锦校区](https://panjin.dlut.edu.cn/index.htm),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 盘锦校区学生事务办公室 {#da-lian-li-gong-da-xue-pan-jin-xiao-qu-xue-sheng-shi-wu-ban-gong-shi} - -<Route author="nczitzk" example="/dut/xsgzb" path="/dut/xsgzb/:category?" paramsDesc={['分类,见下表,默认为 [**通知公告**](http://xsgzb.dlut.edu.cn/index/zytz.htm)']}> - | 通知公告 | 学工动态 | 公示公告 | - | -------- | -------- | --------- | - | zytz | xgdt | gsgonggao | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学盘锦校区学生事务办公室](http://xsgzb.dlut.edu.cn/index.htm),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 盘锦校区教务教学事务办公室 {#da-lian-li-gong-da-xue-pan-jin-xiao-qu-jiao-wu-jiao-xue-shi-wu-ban-gong-shi} - -<Route author="nczitzk" example="/dut/pjteach" path="/dut/pjteach/:category?" paramsDesc={['分类,见下表,默认为 [**新闻快递**](http://pjteach.dlut.edu.cn/index/xwkd.htm)']}> - | 新闻快递 | 重要通知 | 教学文件 | 常见问题 | 选课与考试 | - | -------- | -------- | -------- | -------- | ---------- | - | xwkd | zytz | jxwj | cjwt | xkyks | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学盘锦校区教务教学事务办公室](http://pjteach.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 盘锦校区总务部 {#da-lian-li-gong-da-xue-pan-jin-xiao-qu-zong-wu-bu} - -<Route author="nczitzk" example="/dut/pjxqzwb" path="/dut/pjxqzwb/:category?" paramsDesc={['分类,见下表,默认为 [**通知公告**](http://pjxqzwb.dlut.edu.cn/index/tzgg.htm)']}> - | 通知公告 | 党政园地 | 总务快讯 | 法规制度 | - | -------- | -------- | -------- | -------- | - | tzgg | dzyd | zwkx | fgzd | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学盘锦校区总务部](http://pjxqzwb.dlut.edu.cn/index.htm),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 体育与健康学院盘锦分院 {#da-lian-li-gong-da-xue-ti-yu-yu-jian-kang-xue-yuan-pan-jin-fen-yuan} - -<Route author="nczitzk" example="/dut/tjpj" path="/dut/tjpj/:category?" paramsDesc={['分类,见下表,默认为 [**学院新闻**](http://tjpj.dlut.edu.cn/index/xyxw.htm)']}> - | 学院新闻 | 通知公告 | - | -------- | -------- | - | xyxw | zxgg | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学体育与健康学院盘锦分院](http://tjpj.dlut.edu.cn/index.htm),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 国际合作与交流处(港澳台办) {#da-lian-li-gong-da-xue-guo-ji-he-zuo-yu-jiao-liu-chu-gang-ao-tai-ban} - -<Route author="beautyyuyanli nczitzk" example="/dut/dutdice" path="/dut/dutdice/:category?" paramsDesc={['分类,见下表,默认为 [**新闻速递**](http://dutdice.dlut.edu.cn/xwsd/xxxw.htm)']} anticrawler="1"> - | 教师通知 | 学生通知 | 新闻速递 | - | -------- | ----------- | -------- | - | jstz | xstong\_zhi | xwsd | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学国际合作与交流处(港澳台办)](http://dutdice.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 体育场馆中心 {#da-lian-li-gong-da-xue-ti-yu-chang-guan-zhong-xin} - -<Route author="beautyyuyanli nczitzk" example="/dut/tycgzx" path="/dut/tycgzx/:category?" paramsDesc={['分类,见下表,默认为 [**通知公告**](http://tycgzx.dlut.edu.cn/tzgg/tzgg.htm)']}> - | 通知公告 | 活动日程 | 新闻动态 | 健康知识 | - | -------- | -------- | -------- | -------- | - | tzgg | hdrc | xwdt | jkzs | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学体育场馆中心](http://tycgzx.dlut.edu.cn),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> - -### 公共基础学院 {#da-lian-li-gong-da-xue-gong-gong-ji-chu-xue-yuan} - -<Route author="ueiu" example="/fldpj" path="/dut/fldpj/:category?" paramsDesc={['分类,见下表,默认为 [**重要通知**](http://fldpj.dlut.edu.cn/index/zytz.htm)']}> - | 重要通知 | 学术动态 | 院务公开 | - | -------- | -------- | -------- | - | zytz | xsdt | ywgk | - - :::tip - 表格仅呈现了部分分类栏目,更多分类栏目参见 [大连理工大学公共基础学院](http://fldpj.dlut.edu.cn/index.htm),并按照上方 [**通用**](#da-lian-li-gong-da-xue-tong-yong) 规则订阅。 - ::: -</Route> +| 通知公告 | 学术活动公告 | +| -------- | ------------ | +| notify | academiceve | ## 电子科技大学 {#dian-zi-ke-ji-da-xue} -### 研究生院 {#dian-zi-ke-ji-da-xue-yan-jiu-sheng-yuan} +### 计算机科学与工程学院 {#dian-zi-ke-ji-da-xue-ji-suan-ji-ke-xue-yu-gong-cheng-xue-yuan} -<Route author="huyyi mobyw" example="/uestc/gr" path="/uestc/gr" anticrawler="1" /> - -### 文化素质教育中心 {#dian-zi-ke-ji-da-xue-wen-hua-su-zhi-jiao-yu-zhong-xin} - -<Route author="truobel mobyw" example="/uestc/cqe/tzgg" path="/uestc/cqe/:type?" paramsDesc={['默认为 `tzgg`']} puppeteer="1" notOperational="1"> - | 活动预告 | 通知公告 | - | -------- | -------- | - | hdyg | tzgg | -</Route> +<Route namespace="uestc" data={{"path":"/scse","categories":["university"],"example":"/uestc/scse","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scse.uestc.edu.cn/"]},"name":"计算机科学与工程学院","maintainers":["talengu","mobyw"],"url":"scse.uestc.edu.cn/","location":"scse.ts"}} /> ### 教务处 {#dian-zi-ke-ji-da-xue-jiao-wu-chu} -<Route author="achjqz mobyw" example="/uestc/jwc/student" path="/uestc/jwc/:type?" paramsDesc={['默认为 `important`']} anticrawler="1"> - | 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | - | --------- | ------------ | ------------ | -------- | ------ | - | important | student | teacher | teach | office | -</Route> +<Route namespace="uestc" data={{"path":"/jwc/:type?","categories":["university"],"example":"/uestc/jwc/student","parameters":{"type":"默认为 `important`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.uestc.edu.cn/"],"target":"/jwc"},"name":"教务处","maintainers":["achjqz","mobyw"],"url":"jwc.uestc.edu.cn/","description":"| 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 |\n | --------- | ------------ | ------------ | -------- | ------ |\n | important | student | teacher | teach | office |","location":"jwc.ts"}} /> + +| 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | +| --------- | ------------ | ------------ | -------- | ------ | +| important | student | teacher | teach | office | + +### 文化素质教育中心 {#dian-zi-ke-ji-da-xue-wen-hua-su-zhi-jiao-yu-zhong-xin} + +<Route namespace="uestc" data={{"path":"/cqe/:type?","categories":["university"],"example":"/uestc/cqe/tzgg","parameters":{"type":"默认为 `tzgg`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cqe.uestc.edu.cn/"],"target":"/cqe"},"name":"文化素质教育中心","maintainers":["truobel","mobyw"],"url":"cqe.uestc.edu.cn/","description":"| 活动预告 | 通知公告 |\n | -------- | -------- |\n | hdyg | tzgg |","location":"cqe.ts"}} /> + +| 活动预告 | 通知公告 | +| -------- | -------- | +| hdyg | tzgg | ### 新闻中心 {#dian-zi-ke-ji-da-xue-xin-wen-zhong-xin} -<Route author="achjqz mobyw" example="/uestc/news/culture" path="/uestc/news/:type?" paramsDesc={['默认为 `announcement`']} anticrawler="1"> - | 学术 | 文化 | 公告 | 校内通知 | - | ------- | ------- | ------------ | ------------ | - | academy | culture | announcement | notification | -</Route> +<Route namespace="uestc" data={{"path":"/news/:type?","categories":["university"],"example":"/uestc/news/culture","parameters":{"type":"默认为 `announcement`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.uestc.edu.cn/"],"target":"/news"},"name":"新闻中心","maintainers":["achjqz","mobyw"],"url":"news.uestc.edu.cn/","description":"| 学术 | 文化 | 公告 | 校内通知 |\n | ------- | ------- | ------------ | ------------ |\n | academy | culture | announcement | notification |","location":"news.ts"}} /> -### 自动化工程学院 {#dian-zi-ke-ji-da-xue-zi-dong-hua-gong-cheng-xue-yuan} - -<Route author="talengu mobyw" example="/uestc/auto" path="/uestc/auto" puppeteer="1" notOperational="1" /> - -### 计算机科学与工程学院 {#dian-zi-ke-ji-da-xue-ji-suan-ji-ke-xue-yu-gong-cheng-xue-yuan} - -<Route author="talengu mobyw" example="/uestc/scse" path="/uestc/scse" puppeteer="1" notOperational="1" /> +| 学术 | 文化 | 公告 | 校内通知 | +| ------- | ------- | ------------ | ------------ | +| academy | culture | announcement | notification | ### 信息与通信工程学院 {#dian-zi-ke-ji-da-xue-xin-xi-yu-tong-xin-gong-cheng-xue-yuan} -<Route author="huyyi mobyw" example="/uestc/sice" path="/uestc/sice" puppeteer="1" notOperational="1" /> +<Route namespace="uestc" data={{"path":"/sice","categories":["university"],"example":"/uestc/sice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sice.uestc.edu.cn/"]},"name":"信息与通信工程学院","maintainers":["huyyi","mobyw"],"url":"sice.uestc.edu.cn/","location":"sice.ts"}} /> ### 信息与软件工程学院 {#dian-zi-ke-ji-da-xue-xin-xi-yu-ruan-jian-gong-cheng-xue-yuan} -<Route author="Yadomin" example="/uestc/sise/1" path="/uestc/sise/:type?" paramsDesc={['默认为 `1`']} puppeteer="1"> - | 最新 | 院办 | 学生科 | 教务科 | 研管科 | 组织 | 人事 | 实践教育中心 | Int'I | - | ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -</Route> +<Route namespace="uestc" data={{"path":"/sise/:type?","categories":["university"],"example":"/uestc/sise/1","parameters":{"type":"默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sise.uestc.edu.cn/"],"target":"/sise"},"name":"信息与软件工程学院","maintainers":["Yadomin","mobyw"],"url":"sise.uestc.edu.cn/","description":"| 最新 | 院办 | 学生科 | 教务科 | 研管科 | 组织 | 人事 | 实践教育中心 | Int'I |\n | ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- |\n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |","location":"sise.ts"}} /> + +| 最新 | 院办 | 学生科 | 教务科 | 研管科 | 组织 | 人事 | 实践教育中心 | Int'I | +| ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | + +### 研究生院 {#dian-zi-ke-ji-da-xue-yan-jiu-sheng-yuan} + +<Route namespace="uestc" data={{"path":"/gr","categories":["university"],"example":"/uestc/gr","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gr.uestc.edu.cn/"]},"name":"研究生院","maintainers":["huyyi","mobyw"],"url":"gr.uestc.edu.cn/","location":"gr.ts"}} /> + +### 自动化工程学院 {#dian-zi-ke-ji-da-xue-zi-dong-hua-gong-cheng-xue-yuan} + +<Route namespace="uestc" data={{"path":"/auto","categories":["university"],"example":"/uestc/auto","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["auto.uestc.edu.cn/"]},"name":"自动化工程学院","maintainers":["talengu","mobyw"],"url":"auto.uestc.edu.cn/","location":"auto.ts"}} /> ## 东北大学 {#dong-bei-da-xue} ### 新闻网 {#dong-bei-da-xue-xin-wen-wang} -<Route author="JeasonLau" example="/neu/news/ddyw" path="/neu/news/:type" paramsDesc={['种类名,见下表']} notOperational="1"> - | 种类名 | 参数 | - | -------- | ---- | - | 东大要闻 | ddyw | - | 媒体东大 | mtdd | - | 通知公告 | tzgg | - | 新闻纵横 | xwzh | - | 人才培养 | rcpy | - | 学术科研 | xsky | - | 英文新闻 | 217 | - | 招生就业 | zsjy | - | 考研出国 | kycg | - | 校园文学 | xywx | - | 校友风采 | xyfc | - | 时事热点 | ssrd | - | 教育前沿 | jyqy | - | 文化体育 | whty | - | 最新科技 | zxkj | -</Route> +<Route namespace="neu" data={{"path":"/news/:type","categories":["university"],"example":"/neu/news/ddyw","parameters":{"type":"种类名,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["neunews.neu.edu.cn/:type/list.htm"]},"name":"新闻网","maintainers":["JeasonLau"],"description":"| 种类名 | 参数 |\n | -------- | ---- |\n | 东大要闻 | ddyw |\n | 媒体东大 | mtdd |\n | 通知公告 | tzgg |\n | 新闻纵横 | xwzh |\n | 人才培养 | rcpy |\n | 学术科研 | xsky |\n | 英文新闻 | 217 |\n | 招生就业 | zsjy |\n | 考研出国 | kycg |\n | 校园文学 | xywx |\n | 校友风采 | xyfc |\n | 时事热点 | ssrd |\n | 教育前沿 | jyqy |\n | 文化体育 | whty |\n | 最新科技 | zxkj |","location":"news.ts"}} /> + +| 种类名 | 参数 | +| -------- | ---- | +| 东大要闻 | ddyw | +| 媒体东大 | mtdd | +| 通知公告 | tzgg | +| 新闻纵横 | xwzh | +| 人才培养 | rcpy | +| 学术科研 | xsky | +| 英文新闻 | 217 | +| 招生就业 | zsjy | +| 考研出国 | kycg | +| 校园文学 | xywx | +| 校友风采 | xyfc | +| 时事热点 | ssrd | +| 教育前沿 | jyqy | +| 文化体育 | whty | +| 最新科技 | zxkj | ### 医学与生物信息工程学院 {#dong-bei-da-xue-yi-xue-yu-sheng-wu-xin-xi-gong-cheng-xue-yuan} -<Route author="TennousuAthena" example="/neu/bmie/news" path="/neu/bmie/:type" paramsDesc={['分类 id 见下表']}> - | Id | 名称 | - | ----------------------- | ---------- | - | news | 学院新闻 | - | academic | 学术科研 | - | talent\_development | 人才培养 | - | international\_exchange | 国际交流 | - | announcement | 通知公告 | - | undergraduate\_dev | 本科生培养 | - | postgraduate\_dev | 研究生培养 | - | undergraduate\_recruit | 本科生招募 | - | postgraduate\_recruit | 研究生招募 | - | CPC\_build | 党的建设 | - | CPC\_work | 党委工作 | - | union\_work | 工会工作 | - | CYL\_work | 共青团工作 | - | security\_management | 安全管理 | - | alumni\_style | 校友风采 | -</Route> +<Route namespace="neu" data={{"path":"/bmie/:type","categories":["university"],"example":"/neu/bmie/news","parameters":{"type":"分类 id 见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"医学与生物信息工程学院","maintainers":["tennousuathena"],"description":"| Id | 名称 |\n | ----------------------- | ---------- |\n | news | 学院新闻 |\n | academic | 学术科研 |\n | talent_development | 人才培养 |\n | international_exchange | 国际交流 |\n | announcement | 通知公告 |\n | undergraduate_dev | 本科生培养 |\n | postgraduate_dev | 研究生培养 |\n | undergraduate_recruit | 本科生招募 |\n | postgraduate_recruit | 研究生招募 |\n | CPC_build | 党的建设 |\n | CPC_work | 党委工作 |\n | union_work | 工会工作 |\n | CYL_work | 共青团工作 |\n | security_management | 安全管理 |\n | alumni_style | 校友风采 |","location":"bmie.ts"}} /> -## 东北师范大学 {#dong-bei-shi-fan-da-xue} - -### 历史文化学院 {#dong-bei-shi-fan-da-xue-li-shi-wen-hua-xue-yuan} - -<Route author="nczitzk" example="/nenu/sohac" path="/nenu/sohac/:path+" paramsDesc={['路径,默认为通知公告']}> - :::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)。 - ::: -</Route> - -### 研究生院 {#dong-bei-shi-fan-da-xue-yan-jiu-sheng-yuan} - -<Route author="nczitzk" example="/nenu/yjsy" path="/nenu/yjsy/:path+" paramsDesc={['路径,默认为通知公告']}> - :::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)。 - ::: -</Route> - -## 东莞理工学院 {#dong-guan-li-gong-xue-yuan} - -### 教务处通知 {#dong-guan-li-gong-xue-yuan-jiao-wu-chu-tong-zhi} - -<Route author="AnyMoe" example="/dgut/jwc/" path="/dgut/jwc/:type?" paramsDesc={['默认为 `2`']} notOperational="1"> - | 教务公告 | 教学信息 | - | -------- | -------- | - | 1 | 2 | -</Route> - -### 学工部动态 {#dong-guan-li-gong-xue-yuan-xue-gong-bu-dong-tai} - -<Route author="AnyMoe" example="/dgut/xsc/" path="/dgut/xsc/:type?" paramsDesc={['默认为 `2`']}> - | 学工动态 | 通知公告 | 网上公示 | - | -------- | -------- | -------- | - | 1 | 2 | 4 | -</Route> +| Id | 名称 | +| ----------------------- | ---------- | +| news | 学院新闻 | +| academic | 学术科研 | +| talent\_development | 人才培养 | +| international\_exchange | 国际交流 | +| announcement | 通知公告 | +| undergraduate\_dev | 本科生培养 | +| postgraduate\_dev | 研究生培养 | +| undergraduate\_recruit | 本科生招募 | +| postgraduate\_recruit | 研究生招募 | +| CPC\_build | 党的建设 | +| CPC\_work | 党委工作 | +| union\_work | 工会工作 | +| CYL\_work | 共青团工作 | +| security\_management | 安全管理 | +| alumni\_style | 校友风采 | ## 东华大学 {#dong-hua-da-xue} ### 教务处通知 {#dong-hua-da-xue-jiao-wu-chu-tong-zhi} -<Route author="KiraKiseki" example="/dhu/jiaowu/news/student" path="/dhu/jiaowu/news/:type?" paramsDesc={['默认为 `student`']} notOperational="1"> - | 学生专栏 | 教师专栏 | - | -------- | -------- | - | student | teacher | -</Route> +<Route namespace="dhu" data={{"path":"/jiaowu/news/:type?","categories":["university"],"example":"/dhu/jiaowu/news/student","parameters":{"type":"默认为 `student`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处通知","maintainers":["KiraKiseki"],"description":"| 学生专栏 | 教师专栏 |\n | -------- | -------- |\n | student | teacher |","location":"jiaowu/news.ts"}} /> -### 最新信息公开 {#dong-hua-da-xue-zui-xin-xin-xi-gong-kai} - -<Route author="KiraKiseki" example="/dhu/xxgk/news" path="/dhu/xxgk/news" /> - -### 研究生院通知 {#dong-hua-da-xue-yan-jiu-sheng-yuan-tong-zhi} - -<Route author="fox2049" example="/dhu/yjs/news/class" path="/dhu/yjs/news/:type?" paramsDesc={['默认为 `class`']}> - | 新闻动态 | 通知公告 | 选课考试 | - | -------- | -------- | -------- | - | trend | notice | class | -</Route> - -### 研究生招生信息 {#dong-hua-da-xue-yan-jiu-sheng-zhao-sheng-xin-xi} - -<Route author="fox2049" example="/dhu/yjs/zs/master" path="/dhu/yjs/zs/:type?" paramsDesc={['默认为 `master`']} anticrawler="1"> - | 博士招生 | 硕士招生 | - | -------- | -------- | - | doctor | master | -</Route> +| 学生专栏 | 教师专栏 | +| -------- | -------- | +| student | teacher | ### 学术信息 {#dong-hua-da-xue-xue-shu-xin-xi} -<Route author="fox2049" example="/dhu/news/xsxx" path="/dhu/news/xsxx" /> +<Route namespace="dhu" data={{"path":"/news/xsxx","categories":["university"],"example":"/dhu/news/xsxx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.dhu.edu.cn/6410"]},"name":"学术信息","maintainers":["fox2049"],"url":"news.dhu.edu.cn/6410","location":"news/xsxx.ts"}} /> + +### 研究生院通知 {#dong-hua-da-xue-yan-jiu-sheng-yuan-tong-zhi} + +<Route namespace="dhu" data={{"path":"/yjs/news/:type?","categories":["university"],"example":"/dhu/yjs/news/class","parameters":{"type":"默认为 `class`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生院通知","maintainers":["fox2049"],"description":"| 新闻动态 | 通知公告 | 选课考试 |\n | -------- | -------- | -------- |\n | trend | notice | class |","location":"yjs/news.ts"}} /> + +| 新闻动态 | 通知公告 | 选课考试 | +| -------- | -------- | -------- | +| trend | notice | class | + +### 研究生招生信息 {#dong-hua-da-xue-yan-jiu-sheng-zhao-sheng-xin-xi} + +<Route namespace="dhu" data={{"path":"/yjs/zs/:type?","categories":["university"],"example":"/dhu/yjs/zs/master","parameters":{"type":"默认为 `master`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生招生信息","maintainers":["fox2049"],"description":"| 博士招生 | 硕士招生 |\n | -------- | -------- |\n | doctor | master |","location":"yjs/zs.ts"}} /> + +| 博士招生 | 硕士招生 | +| -------- | -------- | +| doctor | master | + +### 最新信息公开 {#dong-hua-da-xue-zui-xin-xin-xi-gong-kai} + +<Route namespace="dhu" data={{"path":"/xxgk/news","categories":["university"],"example":"/dhu/xxgk/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"最新信息公开","maintainers":["KiraKiseki"],"location":"xxgk/news.ts"}} /> ## 东南大学 {#dong-nan-da-xue} -### 信息科学与工程学院学术活动 {#dong-nan-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-xue-shu-huo-dong} - -<Route author="HenryQW" example="/seu/radio/academic" path="/seu/radio/academic" radar="1" anticrawler="1" /> - -### 研究生招生网通知公告 {#dong-nan-da-xue-yan-jiu-sheng-zhao-sheng-wang-tong-zhi-gong-gao} - -<Route author="fuzy112" example="/seu/yzb/6676" path="/seu/yzb/:type" paramsDesc={['分类名,见下表']} radar="1" anticrawler="1"> - | 硕士招生 | 博士招生 | 港澳台及中外合作办学 | - | -------- | -------- | -------------------- | - | 6676 | 6677 | 6679 | -</Route> - ### 计算机技术与工程学院 {#dong-nan-da-xue-ji-suan-ji-ji-shu-yu-gong-cheng-xue-yuan} -<Route author="LogicJake" example="/seu/cse/xyxw" path="/seu/cse/:type?" paramsDesc={['分类名,默认为 `xyxw`']} radar="1" anticrawler="1"> - | 学院新闻 | 通知公告 | 教务信息 | 就业信息 | 学工事务 | - | -------- | -------- | -------- | -------- | -------- | - | xyxw | tzgg | jwxx | jyxx | xgsw | -</Route> +<Route namespace="seu" data={{"path":"/cse/:type?","categories":["university"],"example":"/seu/cse/xyxw","parameters":{"type":"分类名,默认为 `xyxw`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cse.seu.edu.cn/:type/list.htm","cse.seu.edu.cn/"]},"name":"计算机技术与工程学院","maintainers":["LogicJake"],"description":"| 学院新闻 | 通知公告 | 教务信息 | 就业信息 | 学工事务 |\n | -------- | -------- | -------- | -------- | -------- |\n | xyxw | tzgg | jwxx | jyxx | xgsw |","location":"cse/index.ts"}} /> + +| 学院新闻 | 通知公告 | 教务信息 | 就业信息 | 学工事务 | +| -------- | -------- | -------- | -------- | -------- | +| xyxw | tzgg | jwxx | jyxx | xgsw | + +### 信息科学与工程学院学术活动 {#dong-nan-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-xue-shu-huo-dong} + +<Route namespace="seu" data={{"path":"/radio/academic","categories":["university"],"example":"/seu/radio/academic","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["radio.seu.edu.cn/_s29/15986/list.psp","radio.seu.edu.cn/"]},"name":"信息科学与工程学院学术活动","maintainers":["HenryQW"],"url":"radio.seu.edu.cn/_s29/15986/list.psp","location":"radio/academic.ts"}} /> ### 研究生院全部公告 {#dong-nan-da-xue-yan-jiu-sheng-yuan-quan-bu-gong-gao} -<Route author="Denkiyohou" example="/seu/yjs" path="/seu/yjs" anticrawler="1" /> +<Route namespace="seu" data={{"path":"/yjs","categories":["university"],"example":"/seu/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["seugs.seu.edu.cn/26671/list.htm","seugs.seu.edu.cn/"]},"name":"研究生院全部公告","maintainers":["Denkiyohou"],"url":"seugs.seu.edu.cn/26671/list.htm","location":"yjs.ts"}} /> + +### 研究生招生网通知公告 {#dong-nan-da-xue-yan-jiu-sheng-zhao-sheng-wang-tong-zhi-gong-gao} + +<Route namespace="seu" data={{"path":"/yzb/:type","categories":["university"],"example":"/seu/yzb/6676","parameters":{"type":"分类名,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yzb.seu.edu.cn/:type/list.htm"]},"name":"研究生招生网通知公告","maintainers":["fuzy112"],"description":"| 硕士招生 | 博士招生 | 港澳台及中外合作办学 |\n | -------- | -------- | -------------------- |\n | 6676 | 6677 | 6679 |","location":"yzb/index.ts"}} /> + +| 硕士招生 | 博士招生 | 港澳台及中外合作办学 | +| -------- | -------- | -------------------- | +| 6676 | 6677 | 6679 | ## 对外经济贸易大学 {#dui-wai-jing-ji-mao-yi-da-xue} ### 人力资源处 {#dui-wai-jing-ji-mao-yi-da-xue-ren-li-zi-yuan-chu} -<Route author="nczitzk" example="/uibe/hr" path="/uibe/hr/:category?/:type?" paramsDesc={['分类,可在对应页 URL 中找到,默认为通知公告', '类型,可在对应页 URL 中找到,默认为空']}> - :::tip - 如 [通知公告](http://hr.uibe.edu.cn/tzgg) 的 URL 为 `http://hr.uibe.edu.cn/tzgg`,其路由为 [`/uibe/hr/tzgg`](https://rsshub.app/uibe/hr/tzgg) +<Route namespace="uibe" data={{"path":"/hr/:category?/:type?","categories":["university"],"example":"/uibe/hr","parameters":{"category":"分类,可在对应页 URL 中找到,默认为通知公告","type":"类型,可在对应页 URL 中找到,默认为空"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hr.uibe.edu.cn/:category/:type","hr.uibe.edu.cn/:category","hr.uibe.edu.cn/"]},"name":"人力资源处","maintainers":["nczitzk"],"description":":::tip\n 如 [通知公告](http://hr.uibe.edu.cn/tzgg) 的 URL 为 `http://hr.uibe.edu.cn/tzgg`,其路由为 [`/uibe/hr/tzgg`](https://rsshub.app/uibe/hr/tzgg)\n\n 如 [教师招聘](http://hr.uibe.edu.cn/jszp) 中的 [招聘信息](http://hr.uibe.edu.cn/jszp/zpxx) 的 URL 为 `http://hr.uibe.edu.cn/jszp/zpxx`,其路由为 [`/uibe/hr/jszp/zpxx`](https://rsshub.app/uibe/jszp/zpxx)\n :::","location":"hr.ts"}} /> - 如 [教师招聘](http://hr.uibe.edu.cn/jszp) 中的 [招聘信息](http://hr.uibe.edu.cn/jszp/zpxx) 的 URL 为 `http://hr.uibe.edu.cn/jszp/zpxx`,其路由为 [`/uibe/hr/jszp/zpxx`](https://rsshub.app/uibe/jszp/zpxx) - ::: -</Route> +:::tip +如 [通知公告](http://hr.uibe.edu.cn/tzgg) 的 URL 为 `http://hr.uibe.edu.cn/tzgg`,其路由为 [`/uibe/hr/tzgg`](https://rsshub.app/uibe/hr/tzgg) -## 福州大学 {#fu-zhou-da-xue} - -### 教务处通知 {#fu-zhou-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="Lao-Liu233" example="/fzu/jxtz" path="/fzu/:type" paramsDesc={['分类见下表']} anticrawler="1" /> - -| 教学通知 | 专家讲座 | -| -------- | -------- | -| jxtz | zjjz | - -### 教务处通知(无文章内容) {#fu-zhou-da-xue-jiao-wu-chu-tong-zhi-wu-wen-zhang-nei-rong} - -<Route author="Lao-Liu233" example="/fzu_min/jxtz" path="/fzu_min/:type" paramsDesc={['分类见下表']} anticrawler="1" /> - -| 教学通知 | 专家讲座 | -| -------- | -------- | -| jxtz | zjjz | - -## 复旦大学继续教育学院 {#fu-dan-da-xue-ji-xu-jiao-yu-xue-yuan} - -### 成人夜大通知公告 {#fu-dan-da-xue-ji-xu-jiao-yu-xue-yuan-cheng-ren-ye-da-tong-zhi-gong-gao} - -<Route author="mrbruce516" example="/fudan/cce" path="/fudan/cce" anticrawler="1" /> - -## 广东工业大学 {#guang-dong-gong-ye-da-xue} - -### 通知公文网 {#guang-dong-gong-ye-da-xue-tong-zhi-gong-wen-wang} - -<Route author="Jim Kirisame" example="/gdut/oa_news" path="/gdut/oa_news/:category" paramsDesc={['分类名']}> - | 校内简讯 | 校内通知 | 公示公告 | 招标公告 | 招标结果 | - | -------- | -------- | ------------ | -------------- | -------------- | - | news | notice | announcement | tender\_invite | tender\_result | -</Route> - -## 广东海洋大学 {#guang-dong-hai-yang-da-xue} - -### 广东海洋大学 {#guang-dong-hai-yang-da-xue-guang-dong-hai-yang-da-xue} - -<Route author="Xiaotouming" example="/gdoujwc" path="/gdoujwc" notOperational="1" /> +如 [教师招聘](http://hr.uibe.edu.cn/jszp) 中的 [招聘信息](http://hr.uibe.edu.cn/jszp/zpxx) 的 URL 为 `http://hr.uibe.edu.cn/jszp/zpxx`,其路由为 [`/uibe/hr/jszp/zpxx`](https://rsshub.app/uibe/jszp/zpxx) +::: ## 广西民族大学 {#guang-xi-min-zu-da-xue} -### 研究生院招生公告 {#guang-xi-min-zu-da-xue-yan-jiu-sheng-yuan-zhao-sheng-gong-gao} - -<Route author="real-jiakai" example="/gxmzu/yjszsgg" path="/gxmzu/yjszsgg" radar="1" anticrawler="1" /> - ### 人工智能学院通知公告 {#guang-xi-min-zu-da-xue-ren-gong-zhi-neng-xue-yuan-tong-zhi-gong-gao} -<Route author="real-jiakai" example="/gxmzu/aitzgg" path="/gxmzu/aitzgg" radar="1" anticrawler="1" /> +<Route namespace="gxmzu" data={{"path":"/aitzgg","categories":["university"],"example":"/gxmzu/aitzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ai.gxmzu.edu.cn/index/tzgg.htm","ai.gxmzu.edu.cn/"]},"name":"人工智能学院通知公告","maintainers":["real-jiakai"],"url":"ai.gxmzu.edu.cn/index/tzgg.htm","location":"ai.ts"}} /> ### 图书馆最新消息 {#guang-xi-min-zu-da-xue-tu-shu-guan-zui-xin-xiao-xi} -<Route author="real-jiakai" example="/gxmzu/libzxxx" path="/gxmzu/libzxxx" radar="1" anticrawler="1" /> +<Route namespace="gxmzu" data={{"path":"/libzxxx","categories":["university"],"example":"/gxmzu/libzxxx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["library.gxmzu.edu.cn/news/news_list.jsp","library.gxmzu.edu.cn/"]},"name":"图书馆最新消息","maintainers":["real-jiakai"],"url":"library.gxmzu.edu.cn/news/news_list.jsp","location":"lib.ts"}} /> + +### 研究生院招生公告 {#guang-xi-min-zu-da-xue-yan-jiu-sheng-yuan-zhao-sheng-gong-gao} + +<Route namespace="gxmzu" data={{"path":"/yjszsgg","categories":["university"],"example":"/gxmzu/yjszsgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yjs.gxmzu.edu.cn/tzgg/zsgg.htm","yjs.gxmzu.edu.cn/"]},"name":"研究生院招生公告","maintainers":["real-jiakai"],"url":"yjs.gxmzu.edu.cn/tzgg/zsgg.htm","location":"yjs.ts"}} /> ## 广州大学 {#guang-zhou-da-xue} ### 研究生院招生动态 {#guang-zhou-da-xue-yan-jiu-sheng-yuan-zhao-sheng-dong-tai} -<Route author="shengmaosu" example="/gzhu/yjs" path="/gzhu/yjs" radar="1" notOperational="1" /> - -## 广州航海学院 {#guang-zhou-hang-hai-xue-yuan} - -### 教务处通知公告 {#guang-zhou-hang-hai-xue-yuan-jiao-wu-chu-tong-zhi-gong-gao} - -<Route author="skyedai910" example="/gzmtu/jwc" path="/gzmtu/jwc" /> - -### 图书馆通知公告 {#guang-zhou-hang-hai-xue-yuan-tu-shu-guan-tong-zhi-gong-gao} - -<Route author="skyedai910" example="/gzmtu/tsg" path="/gzmtu/tsg" /> - -## 桂林电子科技大学 {#gui-lin-dian-zi-ke-ji-da-xue} - -### 新闻资讯 {#gui-lin-dian-zi-ke-ji-da-xue-xin-wen-zi-xun} - -<Route author="cssxsh" example="/guet/xwzx/xykx" path="/guet/xwzx/:type" paramsDesc={['资讯类型,如下表']} notOperational="1"> - | 桂电要闻 | 文明校园建设 | 桂电新闻 | 校园快讯 | 学院动态 | 媒体桂电 | 通知公告 | 招标公示 | 学术活动 | - | -------- | ------------ | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | gdyw | wmxyjs | gdxw | xykx | xydt | mtgd | tzgg | zbgs | xshd | - - 注 1: 不要吐槽拼音缩写,缩写原本的 URL 构成就这样。 -</Route> - -## 桂林航天工业学院 {#gui-lin-hang-tian-gong-ye-xue-yuan} - -### 新闻资讯 {#gui-lin-hang-tian-gong-ye-xue-yuan-xin-wen-zi-xun} - -<Route author="wyml" example="/guat/news/ghyw" path="/guat/news/:type?" paramsDesc={['资讯类型,如下表']} notOperational="1"> - | 桂航要闻 | 院部动态 | 通知公告 | 信息公开 | 桂航大讲堂 | - | -------- | -------- | -------- | -------- | ---------- | - | gdyw | ybdt | tzgg | xxgk | ghdjt | - - 注 1: 不要吐槽拼音缩写,缩写原本的 URL 构成就这样。 -</Route> - -## 国防科技大学 {#guo-fang-ke-ji-da-xue} - -### 研究生招生信息网 {#guo-fang-ke-ji-da-xue-yan-jiu-sheng-zhao-sheng-xin-xi-wang} - -<Route author="nczitzk" example="/nudt/yjszs/16" path="/nudt/yjszs/:id?" paramsDesc={['分类 id,默认为 `0` 即通知公告']}> - | 通知公告 | 招生简章 | 学校政策 | 硕士招生 | 博士招生 | 院所发文 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 8 | 12 | 16 | 17 | 23 | -</Route> +<Route namespace="gzhu" data={{"path":"/yjs","categories":["university"],"example":"/gzhu/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yjsy.gzhu.edu.cn/zsxx/zsdt/zsdt.htm","yjsy.gzhu.edu.cn/"]},"name":"研究生院招生动态","maintainers":["shengmaosu"],"url":"yjsy.gzhu.edu.cn/zsxx/zsdt/zsdt.htm","location":"yjs.ts"}} /> ## 哈尔滨工程大学 {#ha-er-bin-gong-cheng-da-xue} +### Unknown {#ha-er-bin-gong-cheng-da-xue-unknown} + +<Route namespace="hrbeu" data={{"path":"/job/bigemploy","categories":["university"],"example":"/hrbeu/job/bigemploy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["job.hrbeu.edu.cn/*"]},"name":"Unknown","maintainers":["Derekmini"],"url":"job.hrbeu.edu.cn/*","location":"job/bigemploy.ts"}} /> + +### Unknown {#ha-er-bin-gong-cheng-da-xue-unknown} + +<Route namespace="hrbeu" data={{"path":"/job/list/:id","categories":["university"],"example":"/hrbeu/job/list/tzgg","parameters":{"id":"栏目,如下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["Derekmini"],"location":"job/list.ts"}} /> + ### 本科生院工作通知 {#ha-er-bin-gong-cheng-da-xue-ben-ke-sheng-yuan-gong-zuo-tong-zhi} -<Route author="XYenon" example="/hrbeu/ugs/news/jwc/jxap" path="/hrbeu/ugs/news/:author?/:category?" paramsDesc={['发布部门,默认为 `gztz`', '分类,默认为 `all`']}> - author 列表: +<Route namespace="hrbeu" data={{"path":"/ugs/news/:author?/:category?","categories":["university"],"example":"/hrbeu/ugs/news/jwc/jxap","parameters":{"author":"发布部门,默认为 `gztz`","category":"分类,默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ugs.hrbeu.edu.cn/:author/list.htm"],"target":"/ugs/news/:author"},"name":"本科生院工作通知","maintainers":["XYenon"],"description":"author 列表:\n\n | 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 |\n | ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- |\n | jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz |\n\n category 列表:\n\n `all` 为全部\n\n 教务处:\n\n | 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 |\n | -------- | -------- | -------- | -------- | -------- |\n | jxap | ksgl | xjgl | wytk | cjgl |\n\n 实践教学与交流处:\n\n | 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 |\n | -------- | ---------- | -------- | -------- | -------- | -------- | -------- |\n | syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl |\n\n 教育评估处:\n\n | 教学研究与教学成果 | 质量监控 |\n | ------------------ | -------- |\n | jxyjyjxcg | zljk |\n\n 专业建设处:\n\n | 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 |\n | -------------- | ---------- | ---------------------- | -------- | -------- |\n | zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx |\n\n 国家大学生文化素质基地:无\n\n 教师教学发展中心:\n\n | 教师培训 |\n | -------- |\n | jspx |\n\n 综合办公室:\n\n | 联系课程 |\n | -------- |\n | lxkc |\n\n 工作通知:无","location":"ugs/news.ts"}} /> - | 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 | - | ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- | - | jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz | +author 列表: - category 列表: +| 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 | +| ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- | +| jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz | - `all` 为全部 +category 列表: - 教务处: +`all` 为全部 - | 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 | - | -------- | -------- | -------- | -------- | -------- | - | jxap | ksgl | xjgl | wytk | cjgl | +教务处: - 实践教学与交流处: +| 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 | +| -------- | -------- | -------- | -------- | -------- | +| jxap | ksgl | xjgl | wytk | cjgl | - | 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 | - | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | - | syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl | +实践教学与交流处: - 教育评估处: +| 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 | +| -------- | ---------- | -------- | -------- | -------- | -------- | -------- | +| syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl | - | 教学研究与教学成果 | 质量监控 | - | ------------------ | -------- | - | jxyjyjxcg | zljk | +教育评估处: - 专业建设处: +| 教学研究与教学成果 | 质量监控 | +| ------------------ | -------- | +| jxyjyjxcg | zljk | - | 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 | - | -------------- | ---------- | ---------------------- | -------- | -------- | - | zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx | +专业建设处: - 国家大学生文化素质基地:无 +| 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 | +| -------------- | ---------- | ---------------------- | -------- | -------- | +| zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx | - 教师教学发展中心: +国家大学生文化素质基地:无 - | 教师培训 | - | -------- | - | jspx | +教师教学发展中心: - 综合办公室: +| 教师培训 | +| -------- | +| jspx | - | 联系课程 | - | -------- | - | lxkc | +综合办公室: - 工作通知:无 -</Route> +| 联系课程 | +| -------- | +| lxkc | -### 研究生院 {#ha-er-bin-gong-cheng-da-xue-yan-jiu-sheng-yuan} - -<Route author="Derekmini XYenon" example="/hrbeu/yjsy/list/2981" path="/hrbeu/yjsy/list/:id" paramsDesc={['栏目编号,由 `URL` 中获取。']} radar="1"> - | 通知公告 | 新闻动态 | 学籍注册 | 奖助学金 | 其他 | - | :------: | :------: | :------: | :------: | :--: | - | 2981 | 2980 | 3009 | 3011 | ... | -</Route> +工作通知:无 ### 就业服务平台 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai} -<Route author="Derekmini" example="/hrbeu/job/list/tzgg" path="/hrbeu/job/list/:id" paramsDesc={['栏目,如下表']} radar="1"> - | 通知公告 | 热点新闻 | - | :------: | :------: | - | tzgg | rdxw | -</Route> +<Route namespace="hrbeu" data={{"path":"/job/calendar","categories":["university"],"example":"/hrbeu/job/calendar","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["job.hrbeu.edu.cn/*"]},"name":"就业服务平台","maintainers":["Derekmini"],"url":"job.hrbeu.edu.cn/*","description":"| 通知公告 | 热点新闻 |\n | :------: | :------: |\n | tzgg | rdxw |\n\n#### 大型招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-da-xing-zhao-pin-hui}\n\n\n#### 今日招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-jin-ri-zhao-pin-hui}","location":"job/calendar.ts"}} /> + +| 通知公告 | 热点新闻 | +| :------: | :------: | +| tzgg | rdxw | #### 大型招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-da-xing-zhao-pin-hui} -<Route author="Derekmini" example="/hrbeu/job/bigemploy" path="/hrbeu/job/bigemploy" radar="1" /> - #### 今日招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-jin-ri-zhao-pin-hui} -<Route author="Derekmini" example="/hrbeu/job/calendar" path="/hrbeu/job/calendar" radar="1" /> - -### 工学新闻 {#ha-er-bin-gong-cheng-da-xue-gong-xue-xin-wen} - -<Route author="Derekmini XYenon" example="/hrbeu/gx/list/xw/yw" path="/hrbeu/gx/:type/:column/:id?" paramsDesc={['页面类型,如 `新闻 - 要闻` 页面为 `list` 类型,`新闻 - 专题策划` 页面为 `card` 类型,通过直接观察页面来判断;','主栏,如 `新闻:xw`,由 `URL` 中获取;','次栏,如 `要闻:yw`,如果次栏存在,则为必选,由 `URL` 中获取。']} radar="1" anticrawler="1"> - | 新闻 | 新闻 - 要闻 | 新闻 - 专题策划 | 其他 | - | :------: | :---------: | :-------------: | :--: | - | /card/xw | /list/xw/yw | /card/xw/ztch | ... | -</Route> - ### 水声工程学院 {#ha-er-bin-gong-cheng-da-xue-shui-sheng-gong-cheng-xue-yuan} -<Route author="Derekmini" example="/hrbeu/uae/xwdt" path="/hrbeu/uae/:id" paramsDesc={['栏目编号,在 `URL` 中获取,如果有多级编号,将 `/` 替换为 `-`。']} radar="1" anticrawler="1"> - | 新闻动态 | 通知公告 | 科学研究 / 科研动态 | - | :------: | :------: | :-----------------: | - | xwdt | tzgg | kxyj-kydt | -</Route> +<Route namespace="hrbeu" data={{"path":"/uae/:id","categories":["university"],"example":"/hrbeu/uae/xwdt","parameters":{"id":"栏目编号,在 `URL` 中获取,如果有多级编号,将 `/` 替换为 `-`。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["uae.hrbeu.edu.cn/:id.htm"]},"name":"水声工程学院","maintainers":[],"description":"| 新闻动态 | 通知公告 | 科学研究 / 科研动态 |\n | :------: | :------: | :-----------------: |\n | xwdt | tzgg | kxyj-kydt |","location":"uae/news.ts"}} /> + +| 新闻动态 | 通知公告 | 科学研究 / 科研动态 | +| :------: | :------: | :-----------------: | +| xwdt | tzgg | kxyj-kydt | + +### 研究生院 {#ha-er-bin-gong-cheng-da-xue-yan-jiu-sheng-yuan} + +<Route namespace="hrbeu" data={{"path":"/yjsy/list/:id","categories":["university"],"example":"/hrbeu/yjsy/list/2981","parameters":{"id":"栏目编号,由 `URL` 中获取。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yjsy.hrbeu.edu.cn/:id/list.htm"]},"name":"研究生院","maintainers":["Derekmini"],"description":"| 通知公告 | 新闻动态 | 学籍注册 | 奖助学金 | 其他 |\n | :------: | :------: | :------: | :------: | :--: |\n | 2981 | 2980 | 3009 | 3011 | ... |","location":"yjsy/list.ts"}} /> + +| 通知公告 | 新闻动态 | 学籍注册 | 奖助学金 | 其他 | +| :------: | :------: | :------: | :------: | :--: | +| 2981 | 2980 | 3009 | 3011 | ... | ## 哈尔滨工业大学 {#ha-er-bin-gong-ye-da-xue} @@ -1303,279 +583,161 @@ Note:[Source website](https://ece.umass.edu/seminar) may be empty when there's ### 教务处通知公告 {#ha-er-bin-gong-ye-da-xue-jiao-wu-chu-tong-zhi-gong-gao} -<Route author="lty96117" example="/hit/jwc" path="/hit/jwc" radar="1" notOperational="1" /> +<Route namespace="hit" data={{"path":"/jwc","categories":["university"],"example":"/hit/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.hit.edu.cn/*"]},"name":"教务处通知公告","maintainers":["lty96117"],"url":"jwc.hit.edu.cn/*","location":"jwc.ts"}} /> ### 今日哈工大 {#ha-er-bin-gong-ye-da-xue-jin-ri-ha-gong-da} -<Route author="ranpox" example="/hit/today/10" path="/hit/today/:category" paramsDesc={['分类编号,`10`为公告公示,`11`为新闻快讯,同时支持详细分类,使用方法见下']} radar="1"> - :::tip - 今日哈工大的文章分为公告公示和新闻快讯,每个页面右侧列出了更详细的分类,其编号为每个 URL 路径的最后一个数字。 - 例如会议讲座的路径为`/taxonomy/term/10/25`,则可以通过 [`/hit/today/25`](https://rsshub.app/hit/today/25) 订阅该详细类别。 - ::: +<Route namespace="hit" data={{"path":"/today/:category","categories":["university"],"example":"/hit/today/10","parameters":{"category":"分类编号,`10`为公告公示,`11`为新闻快讯,同时支持详细分类,使用方法见下"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["today.hit.edu.cn/category/:category"]},"name":"今日哈工大","maintainers":["ranpox"],"description":":::tip\n 今日哈工大的文章分为公告公示和新闻快讯,每个页面右侧列出了更详细的分类,其编号为每个 URL 路径的最后一个数字。\n 例如会议讲座的路径为`/taxonomy/term/10/25`,则可以通过 [`/hit/today/25`](https://rsshub.app/hit/today/25) 订阅该详细类别。\n :::\n\n :::warning\n 部分文章需要经过统一身份认证后才能阅读全文。\n :::","location":"today.ts"}} /> - :::warning - 部分文章需要经过统一身份认证后才能阅读全文。 - ::: -</Route> +:::tip +今日哈工大的文章分为公告公示和新闻快讯,每个页面右侧列出了更详细的分类,其编号为每个 URL 路径的最后一个数字。 +例如会议讲座的路径为`/taxonomy/term/10/25`,则可以通过 [`/hit/today/25`](https://rsshub.app/hit/today/25) 订阅该详细类别。 +::: + +:::warning +部分文章需要经过统一身份认证后才能阅读全文。 +::: ### 研究生院通知公告 {#ha-er-bin-gong-ye-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} -<Route author="hlmu" example="/hit/hitgs" path="/hit/hitgs" radar="1" notOperational="1" /> +<Route namespace="hit" data={{"path":"/hitgs","categories":["university"],"example":"/hit/hitgs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hitgs.hit.edu.cn/*"]},"name":"研究生院通知公告","maintainers":["hlmu"],"url":"hitgs.hit.edu.cn/*","location":"hitgs.ts"}} /> ## 哈尔滨工业大学(深圳) {#ha-er-bin-gong-ye-da-xue-shen-zhen} ### 新闻中心 {#ha-er-bin-gong-ye-da-xue-shen-zhen-xin-wen-zhong-xin} -<Route author="xandery-geek" example="/hitsz/article/id-74" path="/hitsz/article/:category?" paramsDesc={['分类名,默认为校园动态']} radar="1" notOperational="1"> - | 校区要闻 | 媒体报道 | 综合新闻 | 校园动态 | 讲座论坛 | 热点专题 | 招标信息 | 重要关注 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 | -</Route> +<Route namespace="hitsz" data={{"path":"/article/:category?","categories":["university"],"example":"/hitsz/article/id-74","parameters":{"category":"分类名,默认为校园动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻中心","maintainers":["xandery-geek"],"description":"| 校区要闻 | 媒体报道 | 综合新闻 | 校园动态 | 讲座论坛 | 热点专题 | 招标信息 | 重要关注 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 |","location":"article.ts"}} /> + +| 校区要闻 | 媒体报道 | 综合新闻 | 校园动态 | 讲座论坛 | 热点专题 | 招标信息 | 重要关注 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 | ## 哈尔滨工业大学(威海) {#ha-er-bin-gong-ye-da-xue-wei-hai} ### 今日工大 - 通知公告 {#ha-er-bin-gong-ye-da-xue-wei-hai-jin-ri-gong-da-tong-zhi-gong-gao} -<Route author="raptazure" example="/hitwh/today" path="/hitwh/today" radar="1" anticrawler="1" /> +<Route namespace="hitwh" data={{"path":"/today","categories":["university"],"example":"/hitwh/today","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hitwh.edu.cn/1024/list.htm","hitwh.edu.cn/"]},"name":"今日工大 - 通知公告","maintainers":["raptazure"],"url":"hitwh.edu.cn/1024/list.htm","location":"today.ts"}} /> ## 哈尔滨理工大学 {#ha-er-bin-li-gong-da-xue} ### 教务处 {#ha-er-bin-li-gong-da-xue-jiao-wu-chu} -<Route author="LenaNouzen" example="/hrbust/jwzx" path="/hrbust/jwzx/:type?/:page?" paramsDesc={['分类名,默认为教务公告', '文章数,默认为12']}> - | 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | - | -------- | -------- | -------- | -------- | - | 351 | 353 | 354 | 355 | -</Route> +<Route namespace="hrbust" data={{"path":"/jwzx/:type?/:page?","categories":["university"],"example":"/hrbust/jwzx","parameters":{"type":"分类名,默认为教务公告","page":"文章数,默认为12"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["LenaNouzen"],"description":"| 名师风采 | 热点新闻 | 教务公告 | 教学新闻 |\n | -------- | -------- | -------- | -------- |\n | 351 | 353 | 354 | 355 |","location":"jwzx.ts"}} /> -## 海南大学 {#hai-nan-da-xue} - -### 硕士研究生招生动态 {#hai-nan-da-xue-shuo-shi-yan-jiu-sheng-zhao-sheng-dong-tai} - -<Route author="OdinZhang" example="/hainanu/ssszs" path="/hainanu/ssszs" /> +| 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | +| -------- | -------- | -------- | -------- | +| 351 | 353 | 354 | 355 | ## 杭州电子科技大学 {#hang-zhou-dian-zi-ke-ji-da-xue} ### 计算机学院 - 通知公告 {#hang-zhou-dian-zi-ke-ji-da-xue-ji-suan-ji-xue-yuan-tong-zhi-gong-gao} -<Route author="legr4ndk" example="/hdu/cs" path="/hdu/cs" radar="1" /> +<Route namespace="hdu" data={{"path":"/cs","categories":["university"],"example":"/hdu/cs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["computer.hdu.edu.cn/6738/list.htm"]},"name":"计算机学院 - 通知公告","maintainers":["legr4ndk"],"url":"computer.hdu.edu.cn/6738/list.htm","location":"cs/notice.ts"}} /> ### 计算机学院 - 研究生通知 {#hang-zhou-dian-zi-ke-ji-da-xue-ji-suan-ji-xue-yuan-yan-jiu-sheng-tong-zhi} -<Route author="legr4ndk" example="/hdu/cs/pg" path="/hdu/cs/pg" radar="1" /> - -## 合肥工业大学 {#he-fei-gong-ye-da-xue} - -### 通知公告 {#he-fei-gong-ye-da-xue-tong-zhi-gong-gao} - -<Route author="log-e" example="/hfut/tzgg" path="/hfut/tzgg" notOperational="1" /> - -## 河海大学 {#he-hai-da-xue} - -### 河海大学图书馆 - 新闻动态 {#he-hai-da-xue-he-hai-da-xue-tu-shu-guan-xin-wen-dong-tai} - -<Route author="plusmultiply0" example="/hhu/libNews" path="/hhu/libNews" notOperational="1" /> - -### 常州校区图书馆 - 新闻动态 {#he-hai-da-xue-chang-zhou-xiao-qu-tu-shu-guan-xin-wen-dong-tai} - -<Route author="plusmultiply0" example="/hhu/libNewsc" path="/hhu/libNewsc" notOperational="1" /> +<Route namespace="hdu" data={{"path":"/cs/pg","categories":["university"],"example":"/hdu/cs/pg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["computer.hdu.edu.cn/6769/list.htm"]},"name":"计算机学院 - 研究生通知","maintainers":["legr4ndk"],"url":"computer.hdu.edu.cn/6769/list.htm","location":"cs/pg.ts"}} /> ## 河南财政金融学院 {#he-nan-cai-zheng-jin-rong-xue-yuan} ### 河南财政金融学院 {#he-nan-cai-zheng-jin-rong-xue-yuan-he-nan-cai-zheng-jin-rong-xue-yuan} -<Route author="WenPeiTung" example="/hafu/news/ggtz" path="/hafu/news/:type?" radar="1" paramsDesc={['分类,见下表(默认为 `ggtz`)']} anticrawler="1"> - | 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 | - | ------------ | -------------- | ------------------ | - | ggtz | jwc | zsjyc | -</Route> +<Route namespace="hafu" data={{"path":"/news/:type?","categories":["university"],"example":"/hafu/news/ggtz","parameters":{"type":"分类,见下表(默认为 `ggtz`)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"河南财政金融学院","maintainers":[],"description":"| 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 |\n | ------------ | -------------- | ------------------ |\n | ggtz | jwc | zsjyc |","location":"news.ts"}} /> -## 河南大学 {#he-nan-da-xue} - -### 河南大学 {#he-nan-da-xue-he-nan-da-xue} - -<Route author="CasterWx" example="/henu/xszl" path="/henu/:type" paramsDesc={['分类,见下表']} notOperational="1"> - | 学生专栏 | 教师专栏 | 新闻公告 | 院部动态 | 高教前沿 | - | -------- | -------- | -------- | -------- | -------- | - | xszl | jszl | xwgg | ybdt | gjqy | -</Route> +| 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 | +| ------------ | -------------- | ------------------ | +| ggtz | jwc | zsjyc | ## 黑龙江中医药大学 {#hei-long-jiang-zhong-yi-yao-da-xue} ### 研究生院 {#hei-long-jiang-zhong-yi-yao-da-xue-yan-jiu-sheng-yuan} -<Route author="nczitzk" example="/hljucm/yjsy" path="/hljucm/yjsy/:category?" paramsDesc={['分类, 见下表,默认为新闻动态']} radar="1" notOperational="1"> - | 新闻动态 | 通知公告 | - | -------- | -------- | - | xwdt | tzgg | -</Route> +<Route namespace="hljucm" data={{"path":"/yjsy/:category?","categories":["university"],"example":"/hljucm/yjsy","parameters":{"category":"分类, 见下表,默认为新闻动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生院","maintainers":["nczitzk"],"description":"| 新闻动态 | 通知公告 |\n | -------- | -------- |\n | xwdt | tzgg |","location":"yjsy.ts"}} /> -## 湖北大学 {#hu-bei-da-xue} - -### 新闻通知 {#hu-bei-da-xue-xin-wen-tong-zhi} - -<Route author="cijiugechu" example="/hubu/news/zhxw" path="/universities/hubu/news/:type?" paramsDesc={['默认为 `zhxw`']} notOperational="1"> - | 综合新闻 | 湖大要闻 | 通知公告 | 学术学者学生 | 媒体湖大 | - | -------- | -------- | -------- | ------------ | -------- | - | zhxw | hdyw | tzgg | xsxzxs | mthd | -</Route> - -## 湖北工业大学 {#hu-bei-gong-ye-da-xue} - -### 新闻中心 {#hu-bei-gong-ye-da-xue-xin-wen-zhong-xin} - -<Route author="Lava-Swimmer" example="/hbut/news/tzgg" path="/hbut/news/:type" radar="1" paramsDesc={['分类']} anticrawler="1"> - | 通知公告 | 湖工要闻 | 学术活动 | 媒体湖工大 | 综合新闻 | 湖工故事 | - | -------- | -------- | -------- | ---------- | -------- | -------- | - | tzgg | hgyw | xshd | mthgd | zhxw | hggs | -</Route> - -### 计算机学院 {#hu-bei-gong-ye-da-xue-ji-suan-ji-xue-yuan} - -<Route author="Lava-Swimmer" example="/hbut/cs/xwdt" path="/hbut/cs/:type" radar="1" paramsDesc={['分类']} anticrawler="1"> - | 新闻动态 | 通知公告 | 教学信息 | 科研动态 | 党建活动 | - | -------- | -------- | -------- | -------- | -------- | - | xwdt | tzgg | jxxx | kydt | djhd | -</Route> - -:::warning -jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TLS\_REJECT\_UNAUTHORIZED = 0 -::: +| 新闻动态 | 通知公告 | +| -------- | -------- | +| xwdt | tzgg | ## 湖南大学 {#hu-nan-da-xue} ### 校园招聘 {#hu-nan-da-xue-xiao-yuan-zhao-pin} -<Route author="ningyougan" example="/hnu/careers" path="/hnu/careers" /> - -## 湖南科技大学 {#hu-nan-ke-ji-da-xue} - -### 教务处通知 {#hu-nan-ke-ji-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="Pretty9" example="/hnust/jwc" path="/hnust/jwc" /> - -### 计算机科学与工程学院通知 {#hu-nan-ke-ji-da-xue-ji-suan-ji-ke-xue-yu-gong-cheng-xue-yuan-tong-zhi} - -<Route author="Pretty9" example="/hnust/computer" path="/hnust/computer" anticrawler="1" /> - -### 化学化工学院通知 {#hu-nan-ke-ji-da-xue-hua-xue-hua-gong-xue-yuan-tong-zhi} - -<Route author="OrbitZore" example="/hnust/chem" path="/hnust/chem" /> - -### 艺术学院通知 {#hu-nan-ke-ji-da-xue-yi-shu-xue-yuan-tong-zhi} - -<Route author="Pretty9" example="/hnust/art" path="/hnust/art" /> - -### 研究生院招生工作 {#hu-nan-ke-ji-da-xue-yan-jiu-sheng-yuan-zhao-sheng-gong-zuo} - -<Route author="Pretty9" example="/hnust/graduate/sszs" path="/hnust/graduate/:type?" paramsDesc={['默认为 `sszs`']} notOperational="1"> - | 硕士招生 | 博士招生 | - | -------- | -------- | - | sszs | bszs | -</Route> +<Route namespace="hnu" data={{"path":"/careers","categories":["university"],"example":"/hnu/careers","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scc.hnu.edu.cnundefined"]},"name":"校园招聘","maintainers":["ningyougan"],"url":"scc.hnu.edu.cnundefined","location":"careers.ts"}} /> ## 湖南农业大学 {#hu-nan-nong-ye-da-xue} -### 教务处 {#hu-nan-nong-ye-da-xue-jiao-wu-chu} +### 公共管理与法学学院 {#hu-nan-nong-ye-da-xue-gong-gong-guan-li-yu-fa-xue-xue-yuan} -<Route author="lcandy2" example="/hunau/jwc" path="/hunau/jwc/:category?/:page?" paramsDesc={['页面分类,默认为 `tzgg`', '页码,默认为 `1`']}> - | 分类 | 通知公告 | 教务动态 | 其他教务通知... | - | ---- | -------- | -------- | --------------- | - | 参数 | tzgg | jwds | 对应 URL | -</Route> +<Route namespace="hunau" data={{"path":"/gfxy/:category?/:page?","categories":["university"],"example":"/hunau/gfxy","parameters":{"category":"页面分类,默认为 `tzgg`","page":"页码,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xky.hunau.edu.cn/","xky.hunau.edu.cntzgg_8472","xky.hunau.edu.cn/:category"],"target":"/:category"},"name":"公共管理与法学学院","maintainers":[],"url":"xky.hunau.edu.cn/","description":"| 分类 | 通知公告 | 学院新闻 | 其他分类通知... |\n | ---- | -------- | -------- | --------------- |\n | 参数 | tzgg | xyxw | 对应 URL |","location":"gfxy/index.ts"}} /> + +| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | +| ---- | -------- | -------- | --------------- | +| 参数 | tzgg | xyxw | 对应 URL | ### 国际交流与合作处、国际教育学院、港澳台事务办公室 {#hu-nan-nong-ye-da-xue-guo-ji-jiao-liu-yu-he-zuo-chu-guo-ji-jiao-yu-xue-yuan-gang-ao-tai-shi-wu-ban-gong-shi} -<Route author="lcandy2" example="/hunau/ied" path="/hunau/ied/:type?/:category?/:page?" paramsDesc={['页面归属,默认为 `xwzx`','页面分类,默认为 `ggtz`', '页码,默认为 `1`']}> - | 分类 | 公告通知 | 新闻快讯 | 其他分类... | - | -------- | -------- | -------- | ----------- | - | type | xwzx | xwzx | 对应 URL | - | category | tzgg | xwkx | 对应 URL | -</Route> +<Route namespace="hunau" data={{"path":"/ied/:type?/:category?/:page?","categories":["university"],"example":"/hunau/ied","parameters":{"type":"页面归属,默认为 `xwzx`","category":"页面分类,默认为 `ggtz`","page":"页码,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xky.hunau.edu.cn/","xky.hunau.edu.cntzgg_8472","xky.hunau.edu.cn/:category"],"target":"/:category"},"name":"国际交流与合作处、国际教育学院、港澳台事务办公室","maintainers":["lcandy2"],"url":"xky.hunau.edu.cn/","description":"| 分类 | 公告通知 | 新闻快讯 | 其他分类... |\n | -------- | -------- | -------- | ----------- |\n | type | xwzx | xwzx | 对应 URL |\n | category | tzgg | xwkx | 对应 URL |","location":"ied.ts"}} /> -### 公共管理与法学学院 {#hu-nan-nong-ye-da-xue-gong-gong-guan-li-yu-fa-xue-xue-yuan} +| 分类 | 公告通知 | 新闻快讯 | 其他分类... | +| -------- | -------- | -------- | ----------- | +| type | xwzx | xwzx | 对应 URL | +| category | tzgg | xwkx | 对应 URL | -<Route author="lcandy2" example="/hunau/gfxy" path="/hunau/gfxy/:category?/:page?" paramsDesc={['页面分类,默认为 `tzgg`', '页码,默认为 `1`']}> - | 分类 | 通知公告 | 学院新闻 | 其他分类通知... | - | ---- | -------- | -------- | --------------- | - | 参数 | tzgg | xyxw | 对应 URL | -</Route> +### 教务处 {#hu-nan-nong-ye-da-xue-jiao-wu-chu} + +<Route namespace="hunau" data={{"path":"/jwc/:category?/:page?","categories":["university"],"example":"/hunau/jwc","parameters":{"category":"页面分类,默认为 `tzgg`","page":"页码,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xky.hunau.edu.cn/","xky.hunau.edu.cntzgg_8472","xky.hunau.edu.cn/:category"],"target":"/:category"},"name":"教务处","maintainers":[],"url":"xky.hunau.edu.cn/","description":"| 分类 | 通知公告 | 教务动态 | 其他教务通知... |\n | ---- | -------- | -------- | --------------- |\n | 参数 | tzgg | jwds | 对应 URL |","location":"jwc.ts"}} /> + +| 分类 | 通知公告 | 教务动态 | 其他教务通知... | +| ---- | -------- | -------- | --------------- | +| 参数 | tzgg | jwds | 对应 URL | ### 信息与智能科学学院 {#hu-nan-nong-ye-da-xue-xin-xi-yu-zhi-neng-ke-xue-xue-yuan} -<Route author="lcandy2" example="/hunau/xky" path="/hunau/xky/:category?/:page?" paramsDesc={['页面分类,默认为 `tzgg_8472`', '页码,默认为 `1`']}> - | 分类 | 通知公告 | 学院新闻 | 其他分类通知... | - | ---- | ---------- | -------- | --------------- | - | 参数 | tzgg\_8472 | xyxw | 对应 URL | -</Route> +<Route namespace="hunau" data={{"path":"/xky/:category?/:page?","categories":["university"],"example":"/hunau/xky","parameters":{"category":"页面分类,默认为 `tzgg_8472`","page":"页码,默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xky.hunau.edu.cn/","xky.hunau.edu.cntzgg_8472","xky.hunau.edu.cn/:category"],"target":"/:category"},"name":"信息与智能科学学院","maintainers":[],"url":"xky.hunau.edu.cn/","description":"| 分类 | 通知公告 | 学院新闻 | 其他分类通知... |\n | ---- | ---------- | -------- | --------------- |\n | 参数 | tzgg_8472 | xyxw | 对应 URL |","location":"xky/index.ts"}} /> + +| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | +| ---- | ---------- | -------- | --------------- | +| 参数 | tzgg\_8472 | xyxw | 对应 URL | ## 华北电力大学 {#hua-bei-dian-li-da-xue} ### 北京校区研究生院 {#hua-bei-dian-li-da-xue-bei-jing-xiao-qu-yan-jiu-sheng-yuan} -<Route author="nilleo" example="/ncepu/master/tzgg" path="/ncepu/master/:type" paramsDesc={['类型参数']}> - | 类型 | 硕士招生信息 | 通知公告 | 研究生培养信息 | - | ---- | ------------ | -------- | -------------- | - | 参数 | zsxx | tzgg | pyxx | -</Route> +<Route namespace="ncepu" data={{"path":"/master/:type","categories":["university"],"example":"/ncepu/master/tzgg","parameters":{"type":"类型参数"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"北京校区研究生院","maintainers":["nilleo"],"description":"| 类型 | 硕士招生信息 | 通知公告 | 研究生培养信息 |\n | ---- | ------------ | -------- | -------------- |\n | 参数 | zsxx | tzgg | pyxx |","location":"master/masterinfo.ts"}} /> + +| 类型 | 硕士招生信息 | 通知公告 | 研究生培养信息 | +| ---- | ------------ | -------- | -------------- | +| 参数 | zsxx | tzgg | pyxx | ## 华北水利水电大学 {#hua-bei-shui-li-shui-dian-da-xue} ### 学校通知 {#hua-bei-shui-li-shui-dian-da-xue-xue-xiao-tong-zhi} -<Route author="vuhe" example="/ncwu/notice" path="/ncwu/notice" radar="1" /> +<Route namespace="ncwu" data={{"path":"/notice","categories":["university"],"example":"/ncwu/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ncwu.edu.cn/xxtz.htm"]},"name":"学校通知","maintainers":[],"url":"ncwu.edu.cn/xxtz.htm","location":"notice.ts"}} /> ## 华东理工大学 {#hua-dong-li-gong-da-xue} -### 研究生院通知公告 {#hua-dong-li-gong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} +### 本科教务处信息网 {#hua-dong-li-gong-da-xue-ben-ke-jiao-wu-chu-xin-xi-wang} -<Route author="shengmaosu" example="/ecust/yjs" path="/ecust/yjs" radar="1" /> +<Route namespace="ecust" data={{"path":"/jwc/:category?","categories":["university"],"example":"/ecust/jwc/mto","parameters":{"category":"订阅板块,默认为全部订阅"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"本科教务处信息网","maintainers":["lxl66566"],"description":"| 其他任意值 | mto | mttb | gi | mpt | fai |\n | ---------- | ------------ | ------------------ | -------- | ------------ | ------------ |\n | 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 |","location":"jwc/notice.ts"}} /> + +| 其他任意值 | mto | mttb | gi | mpt | fai | +| ---------- | ------------ | ------------------ | -------- | ------------ | ------------ | +| 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 | ### 继续教育学院 - 学院公告 {#hua-dong-li-gong-da-xue-ji-xu-jiao-yu-xue-yuan-xue-yuan-gong-gao} -<Route author="jialinghui" example="/ecust/jxjy/news" path="/ecust/jxjy/news" radar="1" notOperational="1" /> +<Route namespace="ecust" data={{"path":"/jxjy/news","categories":["university"],"example":"/ecust/jxjy/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["e.ecust.edu.cn/engine2/m/38F638B77773ADD3","e.ecust.edu.cn/"]},"name":"继续教育学院 - 学院公告","maintainers":["jialinghui"],"url":"e.ecust.edu.cn/engine2/m/38F638B77773ADD3","location":"e/news.ts"}} /> -### 本科教务处信息网 {#hua-dong-li-gong-da-xue-ben-ke-jiao-wu-chu-xin-xi-wang} +### 研究生院通知公告 {#hua-dong-li-gong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} -<Route author="lxl66566" example="/ecust/jwc/mto" path="/ecust/jwc/:category?" paramsDesc={['订阅板块,默认为全部订阅']}> - | 其他任意值 | mto | mttb | gi | mpt | fai | - | ---------- | ------------ | ------------------ | -------- | ------------ | ------------ | - | 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 | -</Route> +<Route namespace="ecust" data={{"path":"/yjs","categories":["university"],"example":"/ecust/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gschool.ecust.edu.cn/12753/list.htm","gschool.ecust.edu.cn/"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"gschool.ecust.edu.cn/12753/list.htm","location":"gschool/yjs.ts"}} /> ## 华南理工大学 {#hua-nan-li-gong-da-xue} -### 研究生院通知公告 {#hua-nan-li-gong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} - -<Route author="shengmaosu" example="/scut/yjs" path="/scut/yjs" radar="1" anticrawler="1" /> - -### 教务处通知公告 {#hua-nan-li-gong-da-xue-jiao-wu-chu-tong-zhi-gong-gao} - -<Route author="imkero" example="/scut/jwc/notice/all" path="/scut/jwc/notice/:category?" paramsDesc={['通知分类,默认为 `all`']} notOperational="1"> - | 全部 | 选课 | 考试 | 实践 | 交流 | 教师 | 信息 | - | ---- | ------ | ---- | -------- | ------------- | ------- | ---- | - | all | course | exam | practice | communication | teacher | info | -</Route> - -### 教务处学院通知 {#hua-nan-li-gong-da-xue-jiao-wu-chu-xue-yuan-tong-zhi} - -<Route author="imkero Rongronggg9" example="/scut/jwc/school/all" path="/scut/jwc/school/:category?" paramsDesc={['通知分类,默认为 `all`']} notOperational="1"> - | 全部 | 选课 | 考试 | 信息 | - | ---- | ------ | ---- | ---- | - | all | course | exam | info | -</Route> - -### 教务处新闻动态 {#hua-nan-li-gong-da-xue-jiao-wu-chu-xin-wen-dong-tai} - -<Route author="imkero" example="/scut/jwc/news" path="/scut/jwc/news" anticrawler="1" /> - -### 土木与交通学院 - 学工通知 {#hua-nan-li-gong-da-xue-tu-mu-yu-jiao-tong-xue-yuan-xue-gong-tong-zhi} - -<Route author="railzy" example="/scut/scet/notice" path="/scut/scet/notice" radar="1" notOperational="1" /> - ### 电子与信息学院 - 新闻速递 {#hua-nan-li-gong-da-xue-dian-zi-yu-xin-xi-xue-yuan-xin-wen-su-di} -<Route author="auto-bot-ty" example="/scut/seie/news_center" path="/scut/seie/news_center" radar="1" anticrawler="1" /> +<Route namespace="scut" data={{"path":"/seie/news_center","categories":["university"],"example":"/scut/seie/news_center","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www2.scut.edu.cn/ee/16285/list.htm"]},"name":"电子与信息学院 - 新闻速递","maintainers":["auto-bot-ty"],"url":"www2.scut.edu.cn/ee/16285/list.htm","description":":::warning\n由于学院官网对非大陆 IP 的访问存在限制,需自行部署。\n:::","location":"seie/news-ccenter.ts"}} /> :::warning 由于学院官网对非大陆 IP 的访问存在限制,需自行部署。 @@ -1583,525 +745,381 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TL ### 机械与汽车工程学院 - 通知公告 {#hua-nan-li-gong-da-xue-ji-xie-yu-qi-che-gong-cheng-xue-yuan-tong-zhi-gong-gao} -<Route author="Ermaotie" example="/scut/smae/yjsjw" path="/scut/smae/:category?" radar="1" paramsDesc={['通知分类,默认为 `yjsjw`']} anticrawler="1"> - | 公务信息 | 党建工作 | 人事工作 | 学生工作 | 科研实验室 | 本科生教务 | 研究生教务 | - | -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- | - | gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw | -</Route> +<Route namespace="scut" data={{"path":"/smae/:category?","categories":["university"],"example":"/scut/smae/yjsjw","parameters":{"category":"通知分类,默认为 `yjsjw`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"机械与汽车工程学院 - 通知公告","maintainers":["Ermaotie"],"description":"| 公务信息 | 党建工作 | 人事工作 | 学生工作 | 科研实验室 | 本科生教务 | 研究生教务 |\n | -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- |\n | gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw |","location":"smae/notice.ts"}} /> + +| 公务信息 | 党建工作 | 人事工作 | 学生工作 | 科研实验室 | 本科生教务 | 研究生教务 | +| -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- | +| gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw | + +### 教务处新闻动态 {#hua-nan-li-gong-da-xue-jiao-wu-chu-xin-wen-dong-tai} + +<Route namespace="scut" data={{"path":"/jwc/news","categories":["university"],"example":"/scut/jwc/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处新闻动态","maintainers":["imkero"],"location":"jwc/news.ts"}} /> + +### 教务处通知公告 {#hua-nan-li-gong-da-xue-jiao-wu-chu-tong-zhi-gong-gao} + +<Route namespace="scut" data={{"path":"/jwc/notice/:category?","categories":["university"],"example":"/scut/jwc/notice/all","parameters":{"category":"通知分类,默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处通知公告","maintainers":["imkero"],"description":"| 全部 | 选课 | 考试 | 实践 | 交流 | 教师 | 信息 |\n | ---- | ------ | ---- | -------- | ------------- | ------- | ---- |\n | all | course | exam | practice | communication | teacher | info |","location":"jwc/notice.ts"}} /> + +| 全部 | 选课 | 考试 | 实践 | 交流 | 教师 | 信息 | +| ---- | ------ | ---- | -------- | ------------- | ------- | ---- | +| all | course | exam | practice | communication | teacher | info | + +### 教务处学院通知 {#hua-nan-li-gong-da-xue-jiao-wu-chu-xue-yuan-tong-zhi} + +<Route namespace="scut" data={{"path":"/jwc/school/:category?","categories":["university"],"example":"/scut/jwc/school/all","parameters":{"category":"通知分类,默认为 `all`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处学院通知","maintainers":["imkero","Rongronggg9"],"description":"| 全部 | 选课 | 考试 | 信息 |\n | ---- | ------ | ---- | ---- |\n | all | course | exam | info |","location":"jwc/school.ts"}} /> + +| 全部 | 选课 | 考试 | 信息 | +| ---- | ------ | ---- | ---- | +| all | course | exam | info | + +### 土木与交通学院 - 学工通知 {#hua-nan-li-gong-da-xue-tu-mu-yu-jiao-tong-xue-yuan-xue-gong-tong-zhi} + +<Route namespace="scut" data={{"path":"/scet/notice","categories":["university"],"example":"/scut/scet/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"土木与交通学院 - 学工通知","maintainers":["railzy"],"location":"scet/notice.ts"}} /> + +### 研究生院通知公告 {#hua-nan-li-gong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} + +<Route namespace="scut" data={{"path":"/yjs","categories":["university"],"example":"/scut/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www2.scut.edu.cn/graduate/14562/list.htm"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"www2.scut.edu.cn/graduate/14562/list.htm","location":"yjs.ts"}} /> ## 华南农业大学 {#hua-nan-nong-ye-da-xue} ### 华农研讯 {#hua-nan-nong-ye-da-xue-hua-nong-yan-xun} -<Route author="shengmaosu" example="/scau/yzb" path="/scau/yzb" radar="1" /> +<Route namespace="scau" data={{"path":"/yzb","categories":["university"],"example":"/scau/yzb","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yzb.scau.edu.cn/2136/list1.htm","yzb.scau.edu.cn/"]},"name":"华农研讯","maintainers":["shengmaosu"],"url":"yzb.scau.edu.cn/2136/list1.htm","location":"yjs.ts"}} /> ### 研究生院通知 {#hua-nan-nong-ye-da-xue-yan-jiu-sheng-yuan-tong-zhi} -<Route author="Chunssu" example="/scau/yjsy" path="/scau/yjsy" radar="1" /> +<Route namespace="scau" data={{"path":"/yjsy","categories":["university"],"example":"/scau/yjsy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yjsy.scau.edu.cn/208/list.htm","yjsy.scau.edu.cn/"]},"name":"研究生院通知","maintainers":["Chunssu"],"url":"yjsy.scau.edu.cn/208/list.htm","location":"yjsy.ts"}} /> ## 华南师范大学 {#hua-nan-shi-fan-da-xue} -### 软件学院通知公告 {#hua-nan-shi-fan-da-xue-ruan-jian-xue-yuan-tong-zhi-gong-gao} +### 计算机学院竞赛通知 {#hua-nan-shi-fan-da-xue-ji-suan-ji-xue-yuan-jing-sai-tong-zhi} -<Route author="shengmaosu" example="/scnu/ss" path="/scnu/ss" radar="1" /> - -### 研究生院通知公告 {#hua-nan-shi-fan-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} - -<Route author="shengmaosu" example="/scnu/yjs" path="/scnu/yjs" radar="1" /> +<Route namespace="scnu" data={{"path":"/cs/match","categories":["university"],"example":"/scnu/cs/match","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cs.scnu.edu.cn/xueshenggongzuo/chengchangfazhan/kejichuangxin/","cs.scnu.edu.cn/"]},"name":"计算机学院竞赛通知","maintainers":["fengkx"],"url":"cs.scnu.edu.cn/xueshenggongzuo/chengchangfazhan/kejichuangxin/","location":"cs/match.ts"}} /> ### 教务处通知 {#hua-nan-shi-fan-da-xue-jiao-wu-chu-tong-zhi} -<Route author="fengkx" example="/scnu/jw" path="/scnu/jw" radar="1" /> +<Route namespace="scnu" data={{"path":"/jw","categories":["university"],"example":"/scnu/jw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jw.scnu.edu.cn/ann/index.html","jw.scnu.edu.cn/"]},"name":"教务处通知","maintainers":["fengkx"],"url":"jw.scnu.edu.cn/ann/index.html","location":"jw.ts"}} /> + +### 软件学院通知公告 {#hua-nan-shi-fan-da-xue-ruan-jian-xue-yuan-tong-zhi-gong-gao} + +<Route namespace="scnu" data={{"path":"/ss","categories":["university"],"example":"/scnu/ss","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ss.scnu.edu.cn/tongzhigonggao","ss.scnu.edu.cn/"]},"name":"软件学院通知公告","maintainers":["shengmaosu"],"url":"ss.scnu.edu.cn/tongzhigonggao","location":"ss.ts"}} /> ### 图书馆通知 {#hua-nan-shi-fan-da-xue-tu-shu-guan-tong-zhi} -<Route author="fengkx" example="/scnu/library" path="/scnu/library" radar="1" /> +<Route namespace="scnu" data={{"path":"/library","categories":["university"],"example":"/scnu/library","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lib.scnu.edu.cn/news/zuixingonggao","lib.scnu.edu.cn/"]},"name":"图书馆通知","maintainers":["fengkx"],"url":"lib.scnu.edu.cn/news/zuixingonggao","location":"library.ts"}} /> -### 计算机学院竞赛通知 {#hua-nan-shi-fan-da-xue-ji-suan-ji-xue-yuan-jing-sai-tong-zhi} +### 研究生院通知公告 {#hua-nan-shi-fan-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} -<Route author="fengkx" example="/scnu/cs/match" path="/scnu/cs/match" radar="1" anticrawler="1" /> - -### 物理与电信工程学院通知 {#hua-nan-shi-fan-da-xue-wu-li-yu-dian-xin-gong-cheng-xue-yuan-tong-zhi} - -<Route author="Shinonome28" example="/scnu/physics-school-announcements" path="/scnu/physics-school-announcements" anticrawler="1" /> - -### 物理与电信工程学院新闻 {#hua-nan-shi-fan-da-xue-wu-li-yu-dian-xin-gong-cheng-xue-yuan-xin-wen} - -<Route author="Shinonome28" example="/scnu/physics-school-news" path="/scnu/physics-school-news" /> - -### 物理与电信工程学院研究动态 {#hua-nan-shi-fan-da-xue-wu-li-yu-dian-xin-gong-cheng-xue-yuan-yan-jiu-dong-tai} - -<Route author="Shinonome28" example="/scnu/physics-school-research-news" path="/scnu/physics-school-research-news" /> +<Route namespace="scnu" data={{"path":"/yjs","categories":["university"],"example":"/scnu/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.scnu.edu.cn/tongzhigonggao/ssgg","yz.scnu.edu.cn/"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"yz.scnu.edu.cn/tongzhigonggao/ssgg","location":"yjs.ts"}} /> ## 华中科技大学 {#hua-zhong-ke-ji-da-xue} -### 研究生院通知公告 {#hua-zhong-ke-ji-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} +### 人工智能和自动化学院新闻 {#hua-zhong-ke-ji-da-xue-ren-gong-zhi-neng-he-zi-dong-hua-xue-yuan-xin-wen} -<Route author="shengmaosu" example="/hust/yjs" path="/hust/yjs" radar="1" anticrawler="1" /> - -### 人工智能和自动化学院通知 {#hua-zhong-ke-ji-da-xue-ren-gong-zhi-neng-he-zi-dong-hua-xue-yuan-tong-zhi} - -<Route author="budui" example="/hust/aia/notice" path="/hust/aia/notice/:type?" paramsDesc={['分区,默认为最新通知,可在网页 URL 中找到']} radar="1" anticrawler="1"> - | 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 | - | ---- | ---- | ---- | ------ | ------ | -------- | ------ | - | | dz | ky | bk | yjs | xgsz | litui | -</Route> +<Route namespace="hust" data={{"path":["/aia/news","/auto/news"],"categories":["university"],"example":"/hust/aia/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aia.hust.edu.cn/xyxw.htm","aia.hust.edu.cn/"]},"name":"人工智能和自动化学院新闻","maintainers":["budui"],"url":"aia.hust.edu.cn/xyxw.htm","location":"aia/news.ts"}} /> ### 人工智能和自动化学院新闻 {#hua-zhong-ke-ji-da-xue-ren-gong-zhi-neng-he-zi-dong-hua-xue-yuan-xin-wen} -<Route author="budui" example="/hust/aia/news" path="/hust/aia/news" radar="1" anticrawler="1" /> +<Route namespace="hust" data={{"path":["/aia/news","/auto/news"],"categories":["university"],"example":"/hust/aia/news","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["aia.hust.edu.cn/xyxw.htm","aia.hust.edu.cn/"]},"name":"人工智能和自动化学院新闻","maintainers":["budui"],"url":"aia.hust.edu.cn/xyxw.htm","location":"aia/news.ts"}} /> + +### 人工智能和自动化学院通知 {#hua-zhong-ke-ji-da-xue-ren-gong-zhi-neng-he-zi-dong-hua-xue-yuan-tong-zhi} + +<Route namespace="hust" data={{"path":["/aia/notice/:type?","/auto/notice/:type?"],"categories":["university"],"example":"/hust/aia/notice","parameters":{"type":"分区,默认为最新通知,可在网页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"人工智能和自动化学院通知","maintainers":["budui"],"description":"| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 |\n | ---- | ---- | ---- | ------ | ------ | -------- | ------ |\n | | dz | ky | bk | yjs | xgsz | litui |","location":"aia/notice.ts"}} /> + +| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 | +| ---- | ---- | ---- | ------ | ------ | -------- | ------ | +| | dz | ky | bk | yjs | xgsz | litui | + +### 人工智能和自动化学院通知 {#hua-zhong-ke-ji-da-xue-ren-gong-zhi-neng-he-zi-dong-hua-xue-yuan-tong-zhi} + +<Route namespace="hust" data={{"path":["/aia/notice/:type?","/auto/notice/:type?"],"categories":["university"],"example":"/hust/aia/notice","parameters":{"type":"分区,默认为最新通知,可在网页 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"人工智能和自动化学院通知","maintainers":["budui"],"description":"| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 |\n | ---- | ---- | ---- | ------ | ------ | -------- | ------ |\n | | dz | ky | bk | yjs | xgsz | litui |","location":"aia/notice.ts"}} /> + +| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 | +| ---- | ---- | ---- | ------ | ------ | -------- | ------ | +| | dz | ky | bk | yjs | xgsz | litui | + +### 研究生院通知公告 {#hua-zhong-ke-ji-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} + +<Route namespace="hust" data={{"path":"/yjs","categories":["university"],"example":"/hust/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gszs.hust.edu.cn/zsxx/ggtz.htm","gszs.hust.edu.cn/"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"gszs.hust.edu.cn/zsxx/ggtz.htm","location":"yjs.ts"}} /> ## 华中师范大学 {#hua-zhong-shi-fan-da-xue} -### 研究生通知公告 {#hua-zhong-shi-fan-da-xue-yan-jiu-sheng-tong-zhi-gong-gao} - -<Route author="shengmaosu" example="/ccnu/yjs" path="/ccnu/yjs" radar="1" notOperational="1" /> - ### 计算机学院 {#hua-zhong-shi-fan-da-xue-ji-suan-ji-xue-yuan} -<Route author="shengmaosu" example="/ccnu/cs" path="/ccnu/cs" radar="1" anticrawler="1" /> - -### 伍论贡学院 {#hua-zhong-shi-fan-da-xue-wu-lun-gong-xue-yuan} - -<Route author="shengmaosu" example="/ccnu/wu" path="/ccnu/wu" radar="1" /> +<Route namespace="ccnu" data={{"path":"/cs","categories":["university"],"example":"/ccnu/cs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cs.ccnu.edu.cn/xwzx/tzgg.htm","cs.ccnu.edu.cn/"]},"name":"计算机学院","maintainers":["shengmaosu"],"url":"cs.ccnu.edu.cn/xwzx/tzgg.htm","location":"cs.ts"}} /> ### 就业信息 {#hua-zhong-shi-fan-da-xue-jiu-ye-xin-xi} -<Route author="jackyu1996" example="/ccnu/career" path="/ccnu/career" radar="1" /> +<Route namespace="ccnu" data={{"path":"/career","categories":["university"],"example":"/ccnu/career","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ccnu.91wllm.com/news/index/tag/tzgg","ccnu.91wllm.com/"]},"name":"就业信息","maintainers":["jackyu1996"],"url":"ccnu.91wllm.com/news/index/tag/tzgg","location":"career.ts"}} /> -## 吉林大学 {#ji-lin-da-xue} +### 伍论贡学院 {#hua-zhong-shi-fan-da-xue-wu-lun-gong-xue-yuan} -### 校内通知 {#ji-lin-da-xue-xiao-nei-tong-zhi} +<Route namespace="ccnu" data={{"path":"/wu","categories":["university"],"example":"/ccnu/wu","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["uowji.ccnu.edu.cn/xwzx/tzgg.htm","uowji.ccnu.edu.cn/"]},"name":"伍论贡学院","maintainers":["shengmaosu"],"url":"uowji.ccnu.edu.cn/xwzx/tzgg.htm","location":"wu.ts"}} /> -<Route author="276562578" example="/jlu/oa" path="/jlu" notOperational="1" /> +### 研究生通知公告 {#hua-zhong-shi-fan-da-xue-yan-jiu-sheng-tong-zhi-gong-gao} -## 吉林工商学院 {#ji-lin-gong-shang-xue-yuan} - -### 主页 {#ji-lin-gong-shang-xue-yuan-zhu-ye} - -<Route author="nczitzk" example="/jlbtc" path="/jlbtc/:category?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 学院新闻 | 通知公告 | 媒体工商 | 博学讲堂 | 师生风采 | - | -------- | -------- | -------- | -------- | -------- | - | xyxw | tzgg | mtgs | bxjt | ssfc | -</Route> - -### 科研处 {#ji-lin-gong-shang-xue-yuan-ke-yan-chu} - -<Route author="nczitzk" example="/jlbtc/kyc" path="/jlbtc/kyc/:category?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 通知公告 | 新闻动态 | - | -------- | -------- | - | tzgg | xwdt | -</Route> - -### 教务处 {#ji-lin-gong-shang-xue-yuan-jiao-wu-chu} - -<Route author="nczitzk" example="/jlbtc/jwc" path="/jlbtc/jwc/:id?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 教务新闻 | 通知公告 | 教务工作 | 教师发展工作 | 学籍考务工作 | 教学基本建设 | - | -------- | -------- | -------- | ------------ | ------------ | ------------ | - | 1888 | 1887 | 1947 | 1949 | 2011 | 1948 | -</Route> +<Route namespace="ccnu" data={{"path":"/yjs","categories":["university"],"example":"/ccnu/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.ccnu.edu.cn/zsgz/ssyjs.htm","gs.ccnu.edu.cn/"]},"name":"研究生通知公告","maintainers":["shengmaosu"],"url":"gs.ccnu.edu.cn/zsgz/ssyjs.htm","location":"yjs.ts"}} /> ## 吉首大学 {#ji-shou-da-xue} -### 通知公告 {#ji-shou-da-xue-tong-zhi-gong-gao} - -<Route author="wenjia03" example="/jsu/notice" path="/jsu/notice" /> - ### 计算机科学与工程学院 - 通知公告 {#ji-shou-da-xue-ji-suan-ji-ke-xue-yu-gong-cheng-xue-yuan-tong-zhi-gong-gao} -<Route author="wenjia03" example="/jsu/rjxy" path="/jsu/rjxy" /> +<Route namespace="jsu" data={{"path":"/rjxy","categories":["university"],"example":"/jsu/rjxy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机科学与工程学院 - 通知公告","maintainers":["wenjia03"],"location":"rjxy.ts"}} /> ### 教务处 {#ji-shou-da-xue-jiao-wu-chu} -<Route author="wenjia03" example="/jsu/jwc/jwdt" path="/jsu/jwc/:types?" paramsDesc={['通知分类 默认为`jwtz`']}> - | 教务通知 | 教务动态 | - | -------- | -------- | - | jwtz | jwdt | -</Route> +<Route namespace="jsu" data={{"path":"/jwc/:types?","categories":["university"],"example":"/jsu/jwc/jwdt","parameters":{"types":"通知分类 默认为`jwtz`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["wenjia03"],"description":"| 教务通知 | 教务动态 |\n | -------- | -------- |\n | jwtz | jwdt |","location":"jwc.ts"}} /> + +| 教务通知 | 教务动态 | +| -------- | -------- | +| jwtz | jwdt | ### 数学与统计学院 - 通知公告 {#ji-shou-da-xue-shu-xue-yu-tong-ji-xue-yuan-tong-zhi-gong-gao} -<Route author="wenjia03" example="/jsu/stxy" path="/jsu/stxy" /> +<Route namespace="jsu" data={{"path":"/stxy","categories":["university"],"example":"/jsu/stxy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"数学与统计学院 - 通知公告","maintainers":["wenjia03"],"location":"math.ts"}} /> -### 创新中心 {#ji-shou-da-xue-chuang-xin-zhong-xin} +### 通知公告 {#ji-shou-da-xue-tong-zhi-gong-gao} -<Route author="wenjia03" example="/cxzx/xkjs" path="/cxzx/:types?" paramsDesc={['通知分类 默认为`xkjs`']}> - | 通知公告 | 学科竞赛公告 | 创新项目公告 | 竞赛新闻 | 竞赛通知 | - | -------- | ------------ | ------------ | -------- | -------- | - | tzgg | xkjs | cxtz | jsxw | jstz | -</Route> - -## 暨南大学 {#ji-nan-da-xue} - -### 暨南要闻 {#ji-nan-da-xue-ji-nan-yao-wen} - -<Route author="hang333" example="/jnu/yw/tt" path="/jnu/yw/:type?" paramsDesc={['暨南要闻类型,默认为 `yw`']}> - | 暨大头条 | 暨南要闻 | - | -------- | -------- | - | tt | yw | -</Route> - -### 校园时讯 {#ji-nan-da-xue-xiao-yuan-shi-xun} - -<Route author="hang333" example="/jnu/xysx/yxsd" path="/jnu/xysx/:type" paramsDesc={['校园时讯类型']}> - | 院系速递 | 部门快讯 | - | -------- | -------- | - | yxsd | bmkx | -</Route> - -## 江南大学 {#jiang-nan-da-xue} - -### 教务处通知 {#jiang-nan-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="fuzy112" example="/ju/jwc/all" path="/ju/jwc/:type?" paramsDesc={['默认为 `all`']} anticrawler="1"> - | all | tzgg | ksap | wjgg | tmgz | djks | xjgl | bysj | syjs | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 全部 | 通知公告 | 考试安排 | 违纪公告 | 推免工作 | 等级考试 | 学籍管理 | 毕业设计 | 实验教学 | - - | sjcx | xkjs | yjszj | jxgg | zyjs | kcjs | jcjs | jxcg | xsbg | - | -------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 实践创新 | 学科竞赛 | 研究生助教 | 教学改革 | 专业建设 | 课程建设 | 教材建设 | 教学成果 | 学术报告 | -</Route> +<Route namespace="jsu" data={{"path":"/notice","categories":["university"],"example":"/jsu/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"通知公告","maintainers":["wenjia03"],"location":"universityindex.ts"}} /> ## 江苏海洋大学 {#jiang-su-hai-yang-da-xue} ### 官网通知公告 {#jiang-su-hai-yang-da-xue-guan-wang-tong-zhi-gong-gao} -<Route author="real-jiakai" example="/jou/tzgg" path="/jou/tzgg" radar="1" /> +<Route namespace="jou" data={{"path":"/tzgg","categories":["university"],"example":"/jou/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.jou.edu.cn/index/tzgg.htm","www.jou.edu.cn/"]},"name":"官网通知公告","maintainers":["real-jiakai"],"url":"www.jou.edu.cn/index/tzgg.htm","location":"home.ts"}} /> ### 研招网通知公告 {#jiang-su-hai-yang-da-xue-yan-zhao-wang-tong-zhi-gong-gao} -<Route author="real-jiakai" example="/jou/yztzgg" path="/jou/yztzgg" radar="1" /> - -## 井冈山大学 {#jing-gang-shan-da-xue} - -### 教务处通知 {#jing-gang-shan-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="butten42" example="/jgsu/jwc" path="/jgsu/jwc" notOperational="1" /> - -## 昆明理工大学 {#kun-ming-li-gong-da-xue} - -### 教务处 {#kun-ming-li-gong-da-xue-jiao-wu-chu} - -<Route author="geekrainy" example="/kmust/jwc/notify" path="/kmust/jwc/:type?" paramsDesc={['默认为 `notify`']} notOperational="1"> - | 教务通知 | 教务新闻 | - | -------- | -------- | - | notify | news | -</Route> - -### 宣讲会 {#kun-ming-li-gong-da-xue-xuan-jiang-hui} - -<Route author="geekrainy" example="/kmust/job/careers/inner" path="/kmust/job/careers/:type?" paramsDesc={['默认为 `inner`']}> - | 校内宣讲会 | 校外宣讲会 | - | ---------- | ---------- | - | inner | outer | -</Route> - -### 双选会 {#kun-ming-li-gong-da-xue-shuang-xuan-hui} - -<Route author="geekrainy" example="/kmust/job/jobfairs" path="/kmust/job/jobfairs" /> +<Route namespace="jou" data={{"path":"/yztzgg","categories":["university"],"example":"/jou/yztzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.jou.edu.cn/index/zxgg.htm","yz.jou.edu.cn/"]},"name":"研招网通知公告","maintainers":["real-jiakai"],"url":"yz.jou.edu.cn/index/zxgg.htm","location":"yz.ts"}} /> ## 乐山师范学院 {#le-shan-shi-fan-xue-yuan} ### 教学部通知公告 {#le-shan-shi-fan-xue-yuan-jiao-xue-bu-tong-zhi-gong-gao} -<Route author="nyaShine" example="/lsnu/jiaowc/tzgg" path="/lsnu/jiaowc/tzgg/:category?" paramsDesc={['分类名']} radar="1" notOperational="1"> - | 实践教学科 | 教育运行科 | 教研教改科 | 学籍管理科 | 考试科 | 教材建设管理科 | - | ---------- | ---------- | ---------- | ---------- | ------ | -------------- | - | sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk | -</Route> +<Route namespace="lsnu" data={{"path":"/jiaowc/tzgg/:category?","categories":["university"],"example":"/lsnu/jiaowc/tzgg","parameters":{"category":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lsnu.edu.cn/"],"target":"/jiaowc/tzgg"},"name":"教学部通知公告","maintainers":["nyaShine"],"url":"lsnu.edu.cn/","description":"| 实践教学科 | 教育运行科 | 教研教改科 | 学籍管理科 | 考试科 | 教材建设管理科 |\n | ---------- | ---------- | ---------- | ---------- | ------ | -------------- |\n | sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk |","location":"jiaowc/tzgg.ts"}} /> -## 辽宁工程技术大学 {#liao-ning-gong-cheng-ji-shu-da-xue} - -### 教务公告 {#liao-ning-gong-cheng-ji-shu-da-xue-jiao-wu-gong-gao} - -<Route author="ikvarxt" example="/lntu/jwnews" path="/lntu/jwnews" notOperational="1" /> - -## 临沂大学 {#lin-yi-da-xue} - -### 新闻 {#lin-yi-da-xue-xin-wen} - -<Route author="ueiu" example="/lyu/news/ldyw" path="/lyu/news/:type" paramsDesc={['分类名']} notOperational="1"> - | 临大要闻 | 信息公告 | - | -------- | -------- | - | ldyw | xxgg | -</Route> - -## 洛阳理工学院 {#luo-yang-li-gong-xue-yuan} - -### 教务处 {#luo-yang-li-gong-xue-yuan-jiao-wu-chu} - -<Route author="vhxubo" example="/lit/jwc" path="/lit/jwc" notOperational="1" /> - -### 新闻中心 {#luo-yang-li-gong-xue-yuan-xin-wen-zhong-xin} - -<Route author="vhxubo" example="/lit/xwzx" path="/lit/xwzx/:name?" paramsDesc={['默认为 `all`']} notOperational="1"> - | 全部 | 公告通知 | 新闻快讯 | 学术信息 | 媒体新闻 | - | ---- | -------- | -------- | -------- | -------- | - | all | ggtz | xwkx | xsxx | mtxw | -</Route> - -### 团委 {#luo-yang-li-gong-xue-yuan-tuan-wei} - -<Route author="vhxubo" example="/lit/tw" path="/lit/tw/:name?" paramsDesc={['默认为 `all`']}> - | 全部 | 团内通知 | 青年快讯 | - | ---- | -------- | -------- | - | all | tntz | qnkx | -</Route> +| 实践教学科 | 教育运行科 | 教研教改科 | 学籍管理科 | 考试科 | 教材建设管理科 | +| ---------- | ---------- | ---------- | ---------- | ------ | -------------- | +| sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk | ## 南昌大学 {#nan-chang-da-xue} ### 教务通知 {#nan-chang-da-xue-jiao-wu-tong-zhi} -<Route author="ywh555hhh" example="/ncu/jwc" path="/ncu/jwc" radar="1" /> - -## 南昌航空大学 {#nan-chang-hang-kong-da-xue} - -### 教务处公告与新闻 {#nan-chang-hang-kong-da-xue-jiao-wu-chu-gong-gao-yu-xin-wen} - -<Route author="Sg4Dylan" example="/nchu/jwc/notice" path="/nchu/jwc/:type?" paramsDesc={['默认为 `notice`']} notOperational="1"> - | 教务公告 | 教务新闻 | - | -------- | -------- | - | notice | news | -</Route> +<Route namespace="ncu" data={{"path":"/jwc","categories":["university"],"example":"/ncu/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.ncu.edu.cn/","jwc.ncu.edu.cn/jwtz/index.htm"]},"name":"教务通知","maintainers":["ywh555hhh"],"url":"jwc.ncu.edu.cn/","location":"jwc.ts"}} /> ## 南方科技大学 {#nan-fang-ke-ji-da-xue} -### 研究生网通知公告 {#nan-fang-ke-ji-da-xue-yan-jiu-sheng-wang-tong-zhi-gong-gao} +### 采购与招标管理部 {#nan-fang-ke-ji-da-xue-cai-gou-yu-zhao-biao-guan-li-bu} -<Route author="shengmaosu" example="/sustech/yjs" path="/sustech/yjs" radar="1" /> +<Route namespace="sustech" data={{"path":"/bidding","categories":["university"],"example":"/sustech/bidding","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["biddingoffice.sustech.edu.cn/"]},"name":"采购与招标管理部","maintainers":["sparkcyf"],"url":"biddingoffice.sustech.edu.cn/","location":"bidding.ts"}} /> ### 新闻网(中文) {#nan-fang-ke-ji-da-xue-xin-wen-wang-zhong-wen} -<Route author="sparkcyf" example="/sustech/newshub-zh" path="/sustech/newshub-zh" radar="1" /> +<Route namespace="sustech" data={{"path":"/newshub-zh","categories":["university"],"example":"/sustech/newshub-zh","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["newshub.sustech.edu.cn/news"]},"name":"新闻网(中文)","maintainers":["sparkcyf"],"url":"newshub.sustech.edu.cn/news","location":"newshub-zh.ts"}} /> -### 采购与招标管理部 {#nan-fang-ke-ji-da-xue-cai-gou-yu-zhao-biao-guan-li-bu} +### 研究生网通知公告 {#nan-fang-ke-ji-da-xue-yan-jiu-sheng-wang-tong-zhi-gong-gao} -<Route author="sparkcyf" example="/sustech/bidding" path="/sustech/bidding" radar="1" /> +<Route namespace="sustech" data={{"path":"/yjs","categories":["university"],"example":"/sustech/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.sustech.edu.cn/"]},"name":"研究生网通知公告","maintainers":["shengmaosu"],"url":"gs.sustech.edu.cn/","location":"yjs.ts"}} /> ## 南京大学 {#nan-jing-da-xue} -### 本科生院 {#nan-jing-da-xue-ben-ke-sheng-yuan} +### ITSC 信息中心 {#nan-jing-da-xue-itsc-xin-xi-zhong-xin} -<Route author="ret-1" example="/nju/jw/ggtz" path="/nju/jw/:type" paramsDesc={['分类名']}> - | 公告通知 | 教学动态 | - | -------- | -------- | - | ggtz | jxdt | -</Route> - -### 研究生院 {#nan-jing-da-xue-yan-jiu-sheng-yuan} - -<Route author="ret-1" example="/nju/gra" path="/nju/gra" /> - -### 人才招聘网 {#nan-jing-da-xue-ren-cai-zhao-pin-wang} - -<Route author="ret-1" example="/nju/rczp/xxfb" path="/nju/rczp/:type" paramsDesc={['分类名']}> - | 信息发布 | 教研类岗位 | 管理岗位及其他 | - | -------- | ---------- | -------------- | - | xxfb | jylgw | gllgw | -</Route> - -### 科学技术处 {#nan-jing-da-xue-ke-xue-ji-shu-chu} - -<Route author="ret-1" example="/nju/scit/tzgg" path="/nju/scit/:type" paramsDesc={['分类名']}> - | 通知公告 | 科研动态 | - | -------- | -------- | - | tzgg | kydt | -</Route> - -### 资产管理处 {#nan-jing-da-xue-zi-chan-guan-li-chu} - -<Route author="ret-1" example="/nju/zcc" path="/nju/zcc" /> - -### 招标办公室 {#nan-jing-da-xue-zhao-biao-ban-gong-shi} - -<Route author="ret-1" example="/nju/zbb/cgxx" path="/nju/zbb/:type" paramsDesc={['分类名']}> - | 采购信息 | 成交公示 | 政府采购意向公开 | - | -------- | -------- | ---------------- | - | cgxx | cjgs | zfcgyxgk | -</Route> - -### 基建处 {#nan-jing-da-xue-ji-jian-chu} - -<Route author="ret-1" example="/nju/jjc" path="/nju/jjc" /> +<Route namespace="nju" data={{"path":"/itsc","categories":["university"],"example":"/nju/itsc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["itsc.nju.edu.cn/tzgg/list.htm"]},"name":"ITSC 信息中心","maintainers":["ret-1"],"url":"itsc.nju.edu.cn/tzgg/list.htm","location":"itsc.ts"}} /> ### 本科迎新 {#nan-jing-da-xue-ben-ke-ying-xin} -<Route author="ret-1" example="/nju/admission" path="/nju/admission" /> - -### 后勤集团 {#nan-jing-da-xue-hou-qin-ji-tuan} - -<Route author="ret-1" example="/nju/hqjt" path="/nju/hqjt" notOperational="1" /> - -### 大学外语部 {#nan-jing-da-xue-da-xue-wai-yu-bu} - -<Route author="ret-1" example="/nju/dafls" path="/nju/dafls" /> +<Route namespace="nju" data={{"path":"/admission","categories":["university"],"example":"/nju/admission","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["admission.nju.edu.cn/tzgg/index.html","admission.nju.edu.cn/tzgg","admission.nju.edu.cn/"]},"name":"本科迎新","maintainers":["ret-1"],"url":"admission.nju.edu.cn/tzgg/index.html","location":"admission.ts"}} /> ### 本科生交换生系统 {#nan-jing-da-xue-ben-ke-sheng-jiao-huan-sheng-xi-tong} -<Route author="cqjjjzr" example="/nju/exchangesys/proj" path="/nju/exchangesys/:type" paramsDesc={['分类名']} notOperational="1"> - | 新闻通知 | 交换生项目 | - | -------- | ---------- | - | news | proj | -</Route> +<Route namespace="nju" data={{"path":"/exchangesys/:type","categories":["university"],"example":"/nju/exchangesys/proj","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"本科生交换生系统","maintainers":[],"description":"| 新闻通知 | 交换生项目 |\n | -------- | ---------- |\n | news | proj |","location":"exchangesys.ts"}} /> + +| 新闻通知 | 交换生项目 | +| -------- | ---------- | +| news | proj | + +### 本科生院 {#nan-jing-da-xue-ben-ke-sheng-yuan} + +<Route namespace="nju" data={{"path":"/jw/:type","categories":["university"],"example":"/nju/jw/ggtz","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jw.nju.edu.cn/:type/list.htm"]},"name":"本科生院","maintainers":["cqjjjzr"],"description":"| 公告通知 | 教学动态 |\n | -------- | -------- |\n | ggtz | jxdt |","location":"jw.ts"}} /> + +| 公告通知 | 教学动态 | +| -------- | -------- | +| ggtz | jxdt | + +### 大学外语部 {#nan-jing-da-xue-da-xue-wai-yu-bu} + +<Route namespace="nju" data={{"path":"/dafls","categories":["university"],"example":"/nju/dafls","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dafls.nju.edu.cn/13167/list.html","dafls.nju.edu.cn/"]},"name":"大学外语部","maintainers":["ret-1"],"url":"dafls.nju.edu.cn/13167/list.html","location":"dafls.ts"}} /> + +### 后勤集团 {#nan-jing-da-xue-hou-qin-ji-tuan} + +<Route namespace="nju" data={{"path":"/hqjt","categories":["university"],"example":"/nju/hqjt","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["webplus.nju.edu.cn/_s25/main.psp"]},"name":"后勤集团","maintainers":["ret-1"],"url":"webplus.nju.edu.cn/_s25/main.psp","location":"hqjt.ts"}} /> + +### 基建处 {#nan-jing-da-xue-ji-jian-chu} + +<Route namespace="nju" data={{"path":"/jjc","categories":["university"],"example":"/nju/jjc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jjc.nju.edu.cn/main.htm","jjc.nju.edu.cn/"]},"name":"基建处","maintainers":["ret-1"],"url":"jjc.nju.edu.cn/main.htm","location":"jjc.ts"}} /> + +### 科学技术处 {#nan-jing-da-xue-ke-xue-ji-shu-chu} + +<Route namespace="nju" data={{"path":"/scit/:type","categories":["university"],"example":"/nju/scit/tzgg","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"科学技术处","maintainers":["ret-1"],"description":"| 通知公告 | 科研动态 |\n | -------- | -------- |\n | tzgg | kydt |","location":"scit.ts"}} /> + +| 通知公告 | 科研动态 | +| -------- | -------- | +| tzgg | kydt | + +### 人才招聘网 {#nan-jing-da-xue-ren-cai-zhao-pin-wang} + +<Route namespace="nju" data={{"path":"/rczp/:type","categories":["university"],"example":"/nju/rczp/xxfb","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["rczp.nju.edu.cn/sylm/:type/index.html"]},"name":"人才招聘网","maintainers":["ret-1"],"description":"| 信息发布 | 教研类岗位 | 管理岗位及其他 |\n | -------- | ---------- | -------------- |\n | xxfb | jylgw | gllgw |","location":"rczp.ts"}} /> + +| 信息发布 | 教研类岗位 | 管理岗位及其他 | +| -------- | ---------- | -------------- | +| xxfb | jylgw | gllgw | ### 校医院 {#nan-jing-da-xue-xiao-yi-yuan} -<Route author="ret-1" example="/nju/hospital" path="/nju/hospital" /> +<Route namespace="nju" data={{"path":"/hospital","categories":["university"],"example":"/nju/hospital","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hospital.nju.edu.cn/ggtz/index.html"]},"name":"校医院","maintainers":["ret-1"],"url":"hospital.nju.edu.cn/ggtz/index.html","location":"hosptial.ts"}} /> -### ITSC 信息中心 {#nan-jing-da-xue-itsc-xin-xi-zhong-xin} +### 研究生院 {#nan-jing-da-xue-yan-jiu-sheng-yuan} -<Route author="ret-1" example="/nju/itsc" path="/nju/itsc" /> +<Route namespace="nju" data={{"path":"/gra","categories":["university"],"example":"/nju/gra","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["grawww.nju.edu.cn/main.htm","grawww.nju.edu.cn/"]},"name":"研究生院","maintainers":["ret-1"],"url":"grawww.nju.edu.cn/main.htm","location":"gra.ts"}} /> + +### 招标办公室 {#nan-jing-da-xue-zhao-biao-ban-gong-shi} + +<Route namespace="nju" data={{"path":"/zbb/:type","categories":["university"],"example":"/nju/zbb/cgxx","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"招标办公室","maintainers":["ret-1"],"description":"| 采购信息 | 成交公示 | 政府采购意向公开 |\n | -------- | -------- | ---------------- |\n | cgxx | cjgs | zfcgyxgk |","location":"zbb.ts"}} /> + +| 采购信息 | 成交公示 | 政府采购意向公开 | +| -------- | -------- | ---------------- | +| cgxx | cjgs | zfcgyxgk | + +### 资产管理处 {#nan-jing-da-xue-zi-chan-guan-li-chu} + +<Route namespace="nju" data={{"path":"/zcc","categories":["university"],"example":"/nju/zcc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zcc.nju.edu.cn/tzgg/gyfytdglk/index.html","zcc.nju.edu.cn/tzgg/index.html","zcc.nju.edu.cn/"]},"name":"资产管理处","maintainers":["ret-1"],"url":"zcc.nju.edu.cn/tzgg/gyfytdglk/index.html","location":"zcc.ts"}} /> ## 南京工程学院 {#nan-jing-gong-cheng-xue-yuan} -### 南京工程学院通知公告 {#nan-jing-gong-cheng-xue-yuan-nan-jing-gong-cheng-xue-yuan-tong-zhi-gong-gao} - -<Route author="zefengdaguo" example="/njit/tzgg" path="/njit/tzgg" /> - ### 南京工程学院教务处 {#nan-jing-gong-cheng-xue-yuan-nan-jing-gong-cheng-xue-yuan-jiao-wu-chu} -<Route author="zefengdaguo" example="/njit/jwc/jx" path="/njit/jwc/:type?" paramsDesc={['默认为 `jx`']} notOperational="1" /> +<Route namespace="njit" data={{"path":"/jwc/:type?","categories":["university"],"example":"/njit/jwc/jx","parameters":{"type":"默认为 `jx`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"南京工程学院教务处","maintainers":["zefengdaguo"],"description":"| 教学 | 考试 | 信息 | 实践 |\n| ---- | ---- | ---- | ---- |\n| jx | ks | xx | sj |","location":"jwc.ts"}} /> | 教学 | 考试 | 信息 | 实践 | | ---- | ---- | ---- | ---- | | jx | ks | xx | sj | -## 南京工业大学 {#nan-jing-gong-ye-da-xue} +### 南京工程学院通知公告 {#nan-jing-gong-cheng-xue-yuan-nan-jing-gong-cheng-xue-yuan-tong-zhi-gong-gao} -### 南京工业大学教务处 {#nan-jing-gong-ye-da-xue-nan-jing-gong-ye-da-xue-jiao-wu-chu} - -<Route author="TrumanGu" example="/njtech/jwc" path="/njtech/jwc" notOperational="1" /> +<Route namespace="njit" data={{"path":"/tzgg","categories":["university"],"example":"/njit/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.njit.edu.cn/"]},"name":"南京工程学院通知公告","maintainers":["zefengdaguo"],"url":"www.njit.edu.cn/","location":"tzgg.ts"}} /> ## 南京航空航天大学 {#nan-jing-hang-kong-hang-tian-da-xue} +### 计算机科学与技术学院 {#nan-jing-hang-kong-hang-tian-da-xue-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan} + +<Route namespace="nuaa" data={{"path":"/cs/:type/:getDescription?","categories":["university"],"example":"/nuaa/cs/jxdt","parameters":{"type":"分类名,见下表","getDescription":"是否获取全文"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机科学与技术学院","maintainers":["LogicJake","Seiry","qrzbing","Xm798"],"description":"| 通知公告 | 热点新闻 | 学科科研 | 教学动态 | 本科生培养 | 研究生培养 | 学生工作 |\n | -------- | -------- | -------- | -------- | ---------- | ---------- | -------- |\n | tzgg | rdxw | xkky | jxdt | be | me | xsgz |","location":"college/cs.ts"}} /> + +| 通知公告 | 热点新闻 | 学科科研 | 教学动态 | 本科生培养 | 研究生培养 | 学生工作 | +| -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | +| tzgg | rdxw | xkky | jxdt | be | me | xsgz | + ### 教务处 {#nan-jing-hang-kong-hang-tian-da-xue-jiao-wu-chu} -<Route author="arcosx Seiry qrzbing Xm798" example="/nuaa/jwc/tzgg/getDescription" path="/nuaa/jwc/:type/:getDescription?" paramsDesc={['分类名,见下表', '是否获取全文']} puppeteer="1" radar="1"> - | 通知公告 | 教学服务 | 教学建设 | 学生培养 | 教学资源 | - | -------- | -------- | -------- | -------- | -------- | - | tzgg | jxfw | jxjs | xspy | jxzy | -</Route> +<Route namespace="nuaa" data={{"path":"/jwc/:type/:getDescription?","categories":["university"],"example":"/nuaa/jwc/tzgg/getDescription","parameters":{"type":"分类名,见下表","getDescription":"是否获取全文"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["arcosx","Seiry","qrzbing","Xm798"],"description":"| 通知公告 | 教学服务 | 教学建设 | 学生培养 | 教学资源 |\n | -------- | -------- | -------- | -------- | -------- |\n | tzgg | jxfw | jxjs | xspy | jxzy |","location":"jwc/jwc.ts"}} /> + +| 通知公告 | 教学服务 | 教学建设 | 学生培养 | 教学资源 | +| -------- | -------- | -------- | -------- | -------- | +| tzgg | jxfw | jxjs | xspy | jxzy | ### 研究生院 {#nan-jing-hang-kong-hang-tian-da-xue-yan-jiu-sheng-yuan} -<Route author="junfengP Seiry Xm798" example="/nuaa/yjsy/tzgg/getDescription" path="/nuaa/yjsy/:type/:getDescription?" paramsDesc={['分类名,见下表', '是否获取全文']} puppeteer="1" radar="1"> - | 通知公告 | 新闻动态 | 学术信息 | 师生风采 | - | -------- | -------- | -------- | -------- | - | tzgg | xwdt | xsxx | ssfc | -</Route> +<Route namespace="nuaa" data={{"path":"/yjsy/:type/:getDescription?","categories":["university"],"example":"/nuaa/yjsy/tzgg/getDescription","parameters":{"type":"分类名,见下表","getDescription":"是否获取全文"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生院","maintainers":["junfengP","Seiry","Xm798"],"description":"| 通知公告 | 新闻动态 | 学术信息 | 师生风采 |\n | -------- | -------- | -------- | -------- |\n | tzgg | xwdt | xsxx | ssfc |","location":"yjsy/yjsy.ts"}} /> -### 自动化学院 {#nan-jing-hang-kong-hang-tian-da-xue-zi-dong-hua-xue-yuan} - -<Route author="Xm798" example="/nuaa/cae/zhxw" path="/nuaa/cs/:type/:getDescription?" paramsDesc={['分类名,见下表', '是否获取全文']} puppeteer="1" radar="1" notOperational="1"> - | 综合新闻 | 党委行政 | 人事 / 合作 | 研究生培养 | 本科生培养 | 学生工作 | 通知公告 | 学术信息 | 答辩公告 | - | -------- | -------- | ----------- | ---------- | ---------- | -------- | -------- | -------- | -------- | - | zhxw | dwxz | rshz | yjs | bks | xsgz | tzgg | xsxx | dbgg | -</Route> - -### 计算机科学与技术学院 {#nan-jing-hang-kong-hang-tian-da-xue-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan} - -<Route author="LogicJake Seiry qrzbing Xm798" example="/nuaa/cs/jxdt" path="/nuaa/cs/:type/:getDescription?" paramsDesc={['分类名,见下表', '是否获取全文']} puppeteer="1" radar="1"> - | 通知公告 | 热点新闻 | 学科科研 | 教学动态 | 本科生培养 | 研究生培养 | 学生工作 | - | -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | - | tzgg | rdxw | xkky | jxdt | be | me | xsgz | -</Route> +| 通知公告 | 新闻动态 | 学术信息 | 师生风采 | +| -------- | -------- | -------- | -------- | +| tzgg | xwdt | xsxx | ssfc | ## 南京理工大学 {#nan-jing-li-gong-da-xue} -### 教务处 {#nan-jing-li-gong-da-xue-jiao-wu-chu} - -<Route author="MilkShakeYoung jasongzy" example="/njust/jwc/xstz" path="/njust/jwc/:type?" paramsDesc={['分类名,见下表,默认为学生通知']} radar="1" puppeteer="1"> - | 教师通知 | 学生通知 | 新闻 | 学院动态 | - | -------- | -------- | ---- | -------- | - | jstz | xstz | xw | xydt | -</Route> - ### 财务处 {#nan-jing-li-gong-da-xue-cai-wu-chu} -<Route author="MilkShakeYoung jasongzy" example="/njust/cwc/tzgg" path="/njust/cwc/:type?" paramsDesc={['分类名,见下表,默认为通知公告']} radar="1" puppeteer="1" notOperational="1"> - | 通知公告 | 办事流程 | - | -------- | -------- | - | tzgg | bslc | -</Route> +<Route namespace="njust" data={{"path":"/cwc/:type?","categories":["university"],"example":"/njust/cwc/tzgg","parameters":{"type":"分类名,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"财务处","maintainers":["MilkShakeYoung","jasongzy"],"description":"| 通知公告 | 办事流程 |\n | -------- | -------- |\n | tzgg | bslc |","location":"cwc.ts"}} /> -### 研究生院 {#nan-jing-li-gong-da-xue-yan-jiu-sheng-yuan} - -<Route author="MilkShakeYoung jasongzy" example="/njust/gs/sytzgg_4568" path="/njust/gs/:type?" paramsDesc={['分类 ID,部分示例参数见下表,默认为首页通知公告,其他分类 ID 可以从网站 URL Path 中找到,如国际交流为 `gjjl`']} radar="1" puppeteer="1"> - | 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 | - | ------------ | ------------ | -------- | -------- | -------- | -------- | - | sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl | -</Route> - -### 电光学院 {#nan-jing-li-gong-da-xue-dian-guang-xue-yuan} - -<Route author="jasongzy" example="/njust/eoe/tzgg" path="/njust/eoe/:type?" paramsDesc={['分类名,见下表,默认为通知公告']} radar="1" puppeteer="1"> - | 通知公告 | 新闻动态 | - | -------- | -------- | - | tzgg | xwdt | -</Route> +| 通知公告 | 办事流程 | +| -------- | -------- | +| tzgg | bslc | ### 电光学院研学网 {#nan-jing-li-gong-da-xue-dian-guang-xue-yuan-yan-xue-wang} -<Route author="jasongzy" example="/njust/dgxg/gstz" path="/njust/dgxg/:type?" paramsDesc={['分类名,见下表,默认为公示通知']} radar="1" puppeteer="1"> - | 公示通知 | 学术文化 | 就业指导 | - | -------- | -------- | -------- | - | gstz | xswh | jyzd | -</Route> +<Route namespace="njust" data={{"path":"/dgxg/:type?","categories":["university"],"example":"/njust/dgxg/gstz","parameters":{"type":"分类名,见下表,默认为公示通知"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"电光学院研学网","maintainers":["jasongzy"],"description":"| 公示通知 | 学术文化 | 就业指导 |\n | -------- | -------- | -------- |\n | gstz | xswh | jyzd |","location":"dgxg.ts"}} /> + +| 公示通知 | 学术文化 | 就业指导 | +| -------- | -------- | -------- | +| gstz | xswh | jyzd | ### 电光学院年级网站 {#nan-jing-li-gong-da-xue-dian-guang-xue-yuan-nian-ji-wang-zhan} -<Route author="jasongzy" example="/njust/eo/17/tz" path="/njust/eo/:grade?/:type?" paramsDesc={['年级,见下表,默认为本科 2017 级,未列出的年级所对应的参数可以从级网二级页面的 URL Path 中找到,例如:本科 2020 级为 `_t1316`', '类别,见下表,默认为年级通知(通知公告),未列出的类别所对应的参数可以从级网二级页面的 URL Path 中找到,例如:电光 20 的通知公告为 `tzgg_12969`']} radar="1" puppeteer="1" notOperational="1"> - `grade` 列表: +<Route namespace="njust" data={{"path":"/eo/:grade?/:type?","categories":["university"],"example":"/njust/eo/17/tz","parameters":{"grade":"年级,见下表,默认为本科 2017 级,未列出的年级所对应的参数可以从级网二级页面的 URL Path 中找到,例如:本科 2020 级为 `_t1316`","type":"类别,见下表,默认为年级通知(通知公告),未列出的类别所对应的参数可以从级网二级页面的 URL Path 中找到,例如:电光 20 的通知公告为 `tzgg_12969`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"电光学院年级网站","maintainers":["jasongzy"],"description":"`grade` 列表:\n\n | 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 |\n | ------------ | ------------ | ------------ | ------------ |\n | 16 | 17 | 18 | 19 |\n\n `type` 列表:\n\n | 年级通知(通知公告) | 每日动态(主任寄语) |\n | -------------------- | -------------------- |\n | tz | dt |","location":"eo.ts"}} /> - | 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 | - | ------------ | ------------ | ------------ | ------------ | - | 16 | 17 | 18 | 19 | +`grade` 列表: - `type` 列表: +| 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 | +| ------------ | ------------ | ------------ | ------------ | +| 16 | 17 | 18 | 19 | - | 年级通知(通知公告) | 每日动态(主任寄语) | - | -------------------- | -------------------- | - | tz | dt | -</Route> +`type` 列表: -## 南京林业大学 {#nan-jing-lin-ye-da-xue} +| 年级通知(通知公告) | 每日动态(主任寄语) | +| -------------------- | -------------------- | +| tz | dt | -### 教务处 {#nan-jing-lin-ye-da-xue-jiao-wu-chu} +### 电光学院 {#nan-jing-li-gong-da-xue-dian-guang-xue-yuan} -<Route author="kiusiudeng" example="/njfu/jwc/1798" path="/njfu/jwc/:category?" paramsDesc={['省略则默认为tzgg']} notOperational="1"> - | 校级发文 | 通知公告 | 上级发文 | 下载专区 | - | -------- | -------- | -------- | -------- | - | xjfw | tzgg | sjfw | xzzq | -</Route> +<Route namespace="njust" data={{"path":"/eoe/:type?","categories":["university"],"example":"/njust/eoe/tzgg","parameters":{"type":"分类名,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"电光学院","maintainers":["jasongzy"],"description":"| 通知公告 | 新闻动态 |\n | -------- | -------- |\n | tzgg | xwdt |","location":"eoe.ts"}} /> + +| 通知公告 | 新闻动态 | +| -------- | -------- | +| tzgg | xwdt | + +### 教务处 {#nan-jing-li-gong-da-xue-jiao-wu-chu} + +<Route namespace="njust" data={{"path":"/jwc/:type?","categories":["university"],"example":"/njust/jwc/xstz","parameters":{"type":"分类名,见下表,默认为学生通知"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["MilkShakeYoung","jasongzy"],"description":"| 教师通知 | 学生通知 | 新闻 | 学院动态 |\n | -------- | -------- | ---- | -------- |\n | jstz | xstz | xw | xydt |","location":"jwc.ts"}} /> + +| 教师通知 | 学生通知 | 新闻 | 学院动态 | +| -------- | -------- | ---- | -------- | +| jstz | xstz | xw | xydt | + +### 研究生院 {#nan-jing-li-gong-da-xue-yan-jiu-sheng-yuan} + +<Route namespace="njust" data={{"path":"/gs/:type?","categories":["university"],"example":"/njust/gs/sytzgg_4568","parameters":{"type":"分类 ID,部分示例参数见下表,默认为首页通知公告,其他分类 ID 可以从网站 URL Path 中找到,如国际交流为 `gjjl`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.njust.edu.cn/:type/list.htm"],"target":"/gs/:type"},"name":"研究生院","maintainers":["MilkShakeYoung","jasongzy"],"description":"| 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 |\n | ------------ | ------------ | -------- | -------- | -------- | -------- |\n | sytzgg_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |","location":"gs.ts"}} /> + +| 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 | +| ------------ | ------------ | -------- | -------- | -------- | -------- | +| sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl | ## 南京师范大学 {#nan-jing-shi-fan-da-xue} -### 教务通知 {#nan-jing-shi-fan-da-xue-jiao-wu-tong-zhi} - -<Route author="Shujakuinkuraudo" example="/njnu/jwc/xstz" path="/njnu/jwc/:type" paramsDesc={['分类名']} notOperational="1"> - | 教师通知 | 新闻动态 | 学生通知 | - | -------- | -------- | -------- | - | jstz | xwdt | xstz | -</Route> - ### 计算机与电子信息学院 - 人工智能学院 {#nan-jing-shi-fan-da-xue-ji-suan-ji-yu-dian-zi-xin-xi-xue-yuan-ren-gong-zhi-neng-xue-yuan} -<Route author="Shujakuinkuraudo" example="/njnu/ceai/xszx" path="/njnu/ceai/:type" paramsDesc={['分类名']} notOperational="1"> - | 学院公告 | 学院新闻 | 学生资讯 | - | -------- | -------- | -------- | - | xygg | xyxw | xszx | -</Route> +<Route namespace="njnu" data={{"path":"/ceai/:type","categories":["university"],"example":"/njnu/ceai/xszx","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机与电子信息学院 - 人工智能学院","maintainers":["Shujakuinkuraudo"],"description":"| 学院公告 | 学院新闻 | 学生资讯 |\n | -------- | -------- | -------- |\n | xygg | xyxw | xszx |","location":"ceai/ceai.ts"}} /> + +| 学院公告 | 学院新闻 | 学生资讯 | +| -------- | -------- | -------- | +| xygg | xyxw | xszx | + +### 教务通知 {#nan-jing-shi-fan-da-xue-jiao-wu-tong-zhi} + +<Route namespace="njnu" data={{"path":"/jwc/:type","categories":["university"],"example":"/njnu/jwc/xstz","parameters":{"type":"分类名"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务通知","maintainers":["Shujakuinkuraudo"],"description":"| 教师通知 | 新闻动态 | 学生通知 |\n | -------- | -------- | -------- |\n | jstz | xwdt | xstz |","location":"jwc/jwc.ts"}} /> + +| 教师通知 | 新闻动态 | 学生通知 | +| -------- | -------- | -------- | +| jstz | xwdt | xstz | ## 南京晓庄学院 {#nan-jing-xiao-zhuang-xue-yuan} ### 官网通知公告 {#nan-jing-xiao-zhuang-xue-yuan-guan-wang-tong-zhi-gong-gao} -<Route author="real-jiakai" example="/njxzc/tzgg" path="/njxzc/tzgg" radar="1" anticrawler="1" /> +<Route namespace="njxzc" data={{"path":"/tzgg","categories":["university"],"example":"/njxzc/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.njxzc.edu.cn/89/list.htm","www.njxzc.edu.cn/"]},"name":"官网通知公告","maintainers":["real-jiakai"],"url":"www.njxzc.edu.cn/89/list.htm","location":"home.ts"}} /> ### 图书馆通知公告 {#nan-jing-xiao-zhuang-xue-yuan-tu-shu-guan-tong-zhi-gong-gao} -<Route author="real-jiakai" example="/njxzc/libtzgg" path="/njxzc/libtzgg" radar="1" anticrawler="1" /> +<Route namespace="njxzc" data={{"path":"/libtzgg","categories":["university"],"example":"/njxzc/libtzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lib.njxzc.edu.cn/pxyhd/list.htm","lib.njxzc.edu.cn/"]},"name":"图书馆通知公告","maintainers":["real-jiakai"],"url":"lib.njxzc.edu.cn/pxyhd/list.htm","location":"lib.ts"}} /> ## 南京信息工程大学 {#nan-jing-xin-xi-gong-cheng-da-xue} @@ -2119,363 +1137,223 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TL [https://rsshub.app/**nuist**/`bulletin`](https://rsshub.app/nuist/bulletin) 或 [https://rsshub.app/**nuist**/`bulletin`/`791`](https://rsshub.app/nuist/bulletin) ::: -### 南信大信息公告栏 {#nan-jing-xin-xi-gong-cheng-da-xue-nan-xin-da-xin-xi-gong-gao-lan} +### NUIST AS(南信大大气科学学院) {#nan-jing-xin-xi-gong-cheng-da-xue-nuist-as-nan-xin-da-da-qi-ke-xue-xue-yuan} -<Route author="gylidian" example="/nuist/bulletin/791" path="/nuist/bulletin/:category?" paramsDesc={['默认为 `791`']} radar="1" anticrawler="1"> - | 全部 | 文件公告 | 学术报告 | 招标信息 | 会议通知 | 党政事务 | 组织人事 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | - | 791 | 792 | xsbgw | 779 | 780 | 781 | 782 | +<Route namespace="nuist" data={{"path":"/cas/:category?","categories":["university"],"example":"/nuist/cas/xxgg","parameters":{"category":"默认为信息公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"NUIST AS(南信大大气科学学院)","maintainers":["gylidian"],"description":"| 信息公告 | 新闻快讯 | 科学研究 | 网上公示 | 本科教育 | 研究生教育 |\n | -------- | -------- | -------- | -------- | -------- | ---------- |\n | xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy |","location":"cas.ts"}} /> - | 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 | - | -------- | -------- | -------- | -------- | -------- | -------- | ---- | - | 783 | 784 | 785 | 786 | 788 | 789 | qt | - - :::warning - 全文内容需使用 校园网或[VPN](http://vpn.nuist.edu.cn) 获取 - ::: -</Route> +| 信息公告 | 新闻快讯 | 科学研究 | 网上公示 | 本科教育 | 研究生教育 | +| -------- | -------- | -------- | -------- | -------- | ---------- | +| xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy | ### NUIST CS(南信大计软院) {#nan-jing-xin-xi-gong-cheng-da-xue-nuist-cs-nan-xin-da-ji-ruan-yuan} -<Route author="gylidian" example="/nuist/scs/xwkx" path="/nuist/scs/:category?" paramsDesc={['默认为新闻快讯']} radar="1"> - | 新闻快讯 | 通知公告 | 教务信息 | 科研动态 | 学子风采 | - | -------- | -------- | -------- | -------- | -------- | - | xwkx | tzgg | jwxx | kydt | xzfc | -</Route> +<Route namespace="nuist" data={{"path":"/scs/:category?","categories":["university"],"example":"/nuist/scs/xwkx","parameters":{"category":"默认为新闻快讯"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scs.nuist.edu.cn/:category/list.htm"],"target":"/scs/:category"},"name":"NUIST CS(南信大计软院)","maintainers":["gylidian"],"description":"| 新闻快讯 | 通知公告 | 教务信息 | 科研动态 | 学子风采 |\n | -------- | -------- | -------- | -------- | -------- |\n | xwkx | tzgg | jwxx | kydt | xzfc |","location":"scs.ts"}} /> -### 教务处 {#nan-jing-xin-xi-gong-cheng-da-xue-jiao-wu-chu} - -<Route author="gylidian" example="/nuist/jwc/jxyw" path="/nuist/jwc/:category?" paramsDesc={['默认为教学要闻']} radar="1" anticrawler="1"> - | 教学要闻 | 学院教学 | 教务管理 | 教学研究 | 教务管理 | 教材建设 | 考试中心 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx | -</Route> - -### 研究生院学科建设处 {#nan-jing-xin-xi-gong-cheng-da-xue-yan-jiu-sheng-yuan-xue-ke-jian-she-chu} - -<Route author="gylidian nczitzk" example="/nuist/yjs/index/tzgg" path="/nuist/yjs/:path+" paramsDesc={['默认为通知公告']} notOperational="1"> - :::tip - 路径字段处填写的是对应南京信息工程大学研究生院学科建设处分类页网址中介于 **`https://yjs.nuist.edu.cn/`** 和 **.htm** 中间的一段。 - - 如 [南京信息工程大学研究生院学科建设处工作动态](https://yjs.nuist.edu.cn/index/gzdt.htm) 的网址为 `https://yjs.nuist.edu.cn/index/gzdt.htm` 其中介于 **`https://yjs.nuist.edu.cn/`** 和 **.htm** 中间的一段为 `index/gzdt`。可以得到路由为 [`/nuist/yjs/index/gzdt`](https://rsshub.app/nuist/yjs/index/gzdt) - ::: - - 以下为部分分类: - - | 工作动态 | 通知公告 | 招生工作 | 培养与学位 | 学生工作 | - | ---------- | ---------- | --------- | ---------- | ---------- | - | index/gzdt | index/tzgg | zsgz/sszs | xwgz/xwtz | xsgz1/xzfc | -</Route> - -### 南信大学生工作处 {#nan-jing-xin-xi-gong-cheng-da-xue-nan-xin-da-xue-sheng-gong-zuo-chu} - -<Route author="gylidian" example="/nuist/xgc" path="/nuist/xgc" /> +| 新闻快讯 | 通知公告 | 教务信息 | 科研动态 | 学子风采 | +| -------- | -------- | -------- | -------- | -------- | +| xwkx | tzgg | jwxx | kydt | xzfc | ### NUIST ESE(南信大环科院) {#nan-jing-xin-xi-gong-cheng-da-xue-nuist-ese-nan-xin-da-huan-ke-yuan} -<Route author="gylidian" example="/nuist/sese/tzgg1" path="/nuist/sese/:category?" paramsDesc={['默认为通知公告']} radar="1" anticrawler="1"> - | 通知公告 | 新闻快讯 | 学术动态 | 学生工作 | 研究生教育 | 本科教育 | - | -------- | -------- | -------- | -------- | ---------- | -------- | - | tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 | -</Route> +<Route namespace="nuist" data={{"path":"/sese/:category?","categories":["university"],"example":"/nuist/sese/tzgg1","parameters":{"category":"默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"NUIST ESE(南信大环科院)","maintainers":["gylidian"],"description":"| 通知公告 | 新闻快讯 | 学术动态 | 学生工作 | 研究生教育 | 本科教育 |\n | -------- | -------- | -------- | -------- | ---------- | -------- |\n | tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 |","location":"sese.ts"}} /> -### NUIST AS(南信大大气科学学院) {#nan-jing-xin-xi-gong-cheng-da-xue-nuist-as-nan-xin-da-da-qi-ke-xue-xue-yuan} +| 通知公告 | 新闻快讯 | 学术动态 | 学生工作 | 研究生教育 | 本科教育 | +| -------- | -------- | -------- | -------- | ---------- | -------- | +| tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 | -<Route author="gylidian" example="/nuist/cas/xxgg" path="/nuist/cas/:category?" paramsDesc={['默认为信息公告']} radar="1" anticrawler="1"> - | 信息公告 | 新闻快讯 | 科学研究 | 网上公示 | 本科教育 | 研究生教育 | - | -------- | -------- | -------- | -------- | -------- | ---------- | - | xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy | -</Route> +### 教务处 {#nan-jing-xin-xi-gong-cheng-da-xue-jiao-wu-chu} -### 南京信息工程大学图书馆 {#nan-jing-xin-xi-gong-cheng-da-xue-nan-jing-xin-xi-gong-cheng-da-xue-tu-shu-guan} +<Route namespace="nuist" data={{"path":"/jwc/:category?","categories":["university"],"example":"/nuist/jwc/jxyw","parameters":{"category":"默认为教学要闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["gylidian"],"description":"| 教学要闻 | 学院教学 | 教务管理 | 教学研究 | 教务管理 | 教材建设 | 考试中心 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx |","location":"jwc.ts"}} /> -<Route author="gylidian" example="/nuist/lib" path="/nuist/library/lib" notOperational="1" /> +| 教学要闻 | 学院教学 | 教务管理 | 教学研究 | 教务管理 | 教材建设 | 考试中心 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx | + +### 南信大信息公告栏 {#nan-jing-xin-xi-gong-cheng-da-xue-nan-xin-da-xin-xi-gong-gao-lan} + +<Route namespace="nuist" data={{"path":"/bulletin/:category?","categories":["university"],"example":"/nuist/bulletin/791","parameters":{"category":"默认为 `791`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bulletin.nuist.edu.cn/:category/list.htm"],"target":"/bulletin/:category"},"name":"南信大信息公告栏","maintainers":["gylidian"],"description":"| 全部 | 文件公告 | 学术报告 | 招标信息 | 会议通知 | 党政事务 | 组织人事 |\n | ---- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 791 | 792 | xsbgw | 779 | 780 | 781 | 782 |\n\n | 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 |\n | -------- | -------- | -------- | -------- | -------- | -------- | ---- |\n | 783 | 784 | 785 | 786 | 788 | 789 | qt |\n\n :::warning\n 全文内容需使用 校园网或[VPN](http://vpn.nuist.edu.cn) 获取\n :::","location":"bulletin.ts"}} /> + +| 全部 | 文件公告 | 学术报告 | 招标信息 | 会议通知 | 党政事务 | 组织人事 | +| ---- | -------- | -------- | -------- | -------- | -------- | -------- | +| 791 | 792 | xsbgw | 779 | 780 | 781 | 782 | + +| 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 | +| -------- | -------- | -------- | -------- | -------- | -------- | ---- | +| 783 | 784 | 785 | 786 | 788 | 789 | qt | + +:::warning +全文内容需使用 校园网或[VPN](http://vpn.nuist.edu.cn) 获取 +::: + +### 南信大学生工作处 {#nan-jing-xin-xi-gong-cheng-da-xue-nan-xin-da-xue-sheng-gong-zuo-chu} + +<Route namespace="nuist" data={{"path":"/xgc","categories":["university"],"example":"/nuist/xgc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xgc.nuist.edu.cn/","xgc.nuist.edu.cn/419/list.htm"]},"name":"南信大学生工作处","maintainers":["gylidian"],"url":"xgc.nuist.edu.cn/","location":"xgc.ts"}} /> ## 南京邮电大学 {#nan-jing-you-dian-da-xue} ### 教务处通知与新闻 {#nan-jing-you-dian-da-xue-jiao-wu-chu-tong-zhi-yu-xin-wen} -<Route author="shaoye" example="/njupt/jwc/notice" path="/njupt/jwc/:type?" paramsDesc={['默认为 `notice`']}> - | 通知公告 | 教务快讯 | - | -------- | -------- | - | notice | news | -</Route> +<Route namespace="njupt" data={{"path":"/jwc/:type?","categories":["university"],"example":"/njupt/jwc/notice","parameters":{"type":"默认为 `notice`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处通知与新闻","maintainers":["shaoye"],"description":"| 通知公告 | 教务快讯 |\n | -------- | -------- |\n | notice | news |","location":"jwc.ts"}} /> + +| 通知公告 | 教务快讯 | +| -------- | -------- | +| notice | news | ## 南京中医药大学 {#nan-jing-zhong-yi-yao-da-xue} ### 研究生院博士招生 {#nan-jing-zhong-yi-yao-da-xue-yan-jiu-sheng-yuan-bo-shi-zhao-sheng} -<Route author="real-jiakai" example="/njucm/grabszs" path="/njucm/grabszs" radar="1" anticrawler="1" /> - -## 南开大学 {#nan-kai-da-xue} - -### 南开大学教务处 {#nan-kai-da-xue-nan-kai-da-xue-jiao-wu-chu} - -<Route author="zhongweili" example="/nku/jwc/1" path="/nku/jwc/:type" paramsDesc={['分区 type,可在网页 URL 中找到']}> - | 通知公告 | 新闻动态 | - | -------- | -------- | - | 1 | 2 | -</Route> +<Route namespace="njucm" data={{"path":"/grabszs","categories":["university"],"example":"/njucm/grabszs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["lib.njucm.edu.cn/2899/list.htm","lib.njucm.edu.cn/"]},"name":"研究生院博士招生","maintainers":["real-jiakai"],"url":"lib.njucm.edu.cn/2899/list.htm","location":"grabs.ts"}} /> ## 齐鲁工业大学 {#qi-lu-gong-ye-da-xue} ### 通知公告 {#qi-lu-gong-ye-da-xue-tong-zhi-gong-gao} -<Route author="SunBK201" example="/qlu/notice" path="/qlu/notice" radar="1" /> +<Route namespace="qlu" data={{"path":"/notice","categories":["university"],"example":"/qlu/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["qlu.edu.cn/tzggsh/list1.htm"]},"name":"通知公告","maintainers":["SunBK201"],"url":"qlu.edu.cn/tzggsh/list1.htm","location":"notice.ts"}} /> ## 青岛大学 {#qing-dao-da-xue} -### 教务处通知 {#qing-dao-da-xue-jiao-wu-chu-tong-zhi} - -<Route author="abc1763613206" example="/qdu/jwc" path="/qdu/jwc" radar="1" anticrawler="1" /> - ### 后勤管理处通知 {#qing-dao-da-xue-hou-qin-guan-li-chu-tong-zhi} -<Route author="abc1763613206" example="/qdu/houqin" path="/qdu/houqin" radar="1" /> +<Route namespace="qdu" data={{"path":"/houqin","categories":["university"],"example":"/qdu/houqin","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["houqin.qdu.edu.cn/tzgg.htm","houqin.qdu.edu.cn/"]},"name":"后勤管理处通知","maintainers":["abc1763613206"],"url":"houqin.qdu.edu.cn/tzgg.htm","location":"houqin.ts"}} /> + +### 教务处通知 {#qing-dao-da-xue-jiao-wu-chu-tong-zhi} + +<Route namespace="qdu" data={{"path":"/jwc","categories":["university"],"example":"/qdu/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.qdu.edu.cn/jwtz.htm","jwc.qdu.edu.cn/"]},"name":"教务处通知","maintainers":["abc1763613206"],"url":"jwc.qdu.edu.cn/jwtz.htm","location":"jwc.ts"}} /> ## 青岛科技大学 {#qing-dao-ke-ji-da-xue} ### 教务通知 {#qing-dao-ke-ji-da-xue-jiao-wu-tong-zhi} -<Route author="Silent-wqh" example="/qust/jw" path="/qust/jw" radar="1" /> - -## 清华大学 {#qing-hua-da-xue} - -### 清华大学校内信息发布平台 {#qing-hua-da-xue-qing-hua-da-xue-xiao-nei-xin-xi-fa-bu-ping-tai} - -<Route author="prnake" example="/thu/zhongyao" path="/thu/:type" paramsDesc={['默认为重要公告']} notOperational="1"> - | 重要公告 | 教务公告 | 科研通知 | 办公通知 | 海报列表 | 疫情防控 | - | -------- | -------- | -------- | -------- | -------- | :------: | - | zhongyao | jiaowu | keyan | bangong | haibao | yiqing | -</Route> - -:::warning -由于学校通知仅允许校园网访问,需自行部署。 -::: - -### 清华大学招聘信息 {#qing-hua-da-xue-qing-hua-da-xue-zhao-pin-xin-xi} - -<Route author="Halcao DylanXie123" example="/thu/career" path="/thu/career" notOperational="1" /> - -## 厦门大学 {#xia-men-da-xue} - -### 航空航天学院 {#xia-men-da-xue-hang-kong-hang-tian-xue-yuan} - -<Route author="jch12138" example="/xmu/aero/yjsjw" path="/xmu/aero/:type" paramsDesc={['分类见下表']} anticrawler="1"> - | 通知公告 | 本科生教务 | 研究生教务 | - | :------: | :--------: | :--------: | - | tzgg | bksjw | yjsjw | -</Route> - -## 厦门理工大学 {#xia-men-li-gong-da-xue} - -### 教务处 {#xia-men-li-gong-da-xue-jiao-wu-chu} - -<Route author="icecliffs" example="/xmut/jwc/bkjw/jxyx" path="/xmut/jwc/:type/:method" paramsDesc={['系统类型,分为 `bkjw` 本科生教务处, `yjjw` 研究生处', '分类如下表']} anticrawler="1"> - | 本科生教务处 | 系统说明 | 研究生处 | 系统说明 | - | :----------: | :------: | :------: | :------: | - | jxyx | 教学运行 | tzgg | 通知公告 | - | zhsw | 综合事务 | xwdt | 新闻动态 | - | xwgl | 学务管理 | xstj | 学术研究 | - | sjjx | 实践教学 | yjsjw | 工作简讯 | - | jyjg | 教研教改 | | | -</Route> - -## 山东大学 {#shan-dong-da-xue} - -### 软件学院通知 {#shan-dong-da-xue-ruan-jian-xue-yuan-tong-zhi} - -<Route author="Ji4n1ng" example="/sdu/sc/0" path="/sdu/sc/:type?" paramsDesc={['默认为 `0`']} radar="1"> - | 通知公告 | 学术动态 | 本科教育 | 研究生教育 | - | -------- | -------- | -------- | ---------- | - | 0 | 1 | 2 | 3 | -</Route> - -### 材料科学与工程学院通知 {#shan-dong-da-xue-cai-liao-ke-xue-yu-gong-cheng-xue-yuan-tong-zhi} - -<Route author="Ji4n1ng" example="/sdu/cmse/0" path="/sdu/cmse/:type?" paramsDesc={['默认为 `0`']} radar="1"> - | 通知公告 | 学院新闻 | 本科生教育 | 研究生教育 | 学术动态 | - | -------- | -------- | ---------- | ---------- | -------- | - | 0 | 1 | 2 | 3 | 4 | -</Route> - -### 机械工程学院通知 {#shan-dong-da-xue-ji-xie-gong-cheng-xue-yuan-tong-zhi} - -<Route author="Ji4n1ng" example="/sdu/mech/0" path="/sdu/mech/:type?" paramsDesc={['默认为 `0`']} radar="1"> - | 通知公告 | 院所新闻 | 教学信息 | 学术动态 | 学院简报 | - | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | -</Route> - -### 能源与动力工程学院通知 {#shan-dong-da-xue-neng-yuan-yu-dong-li-gong-cheng-xue-yuan-tong-zhi} - -<Route author="Ji4n1ng" example="/sdu/epe/0" path="/sdu/epe/:type?" paramsDesc={['默认为 `0`']} radar="1" notOperational="1"> - | 学院动态 | 通知公告 | 学术论坛 | - | -------- | -------- | -------- | - | 0 | 1 | 2 | -</Route> - -### 计算机科学与技术学院通知 {#shan-dong-da-xue-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan-tong-zhi} - -<Route author="suxb201" example="/sdu/cs/0" path="/sdu/cs/:type?" paramsDesc={['默认为 `0`']} radar="1"> - | 学院公告 | 学术报告 | 科技简讯 | - | -------- | -------- | -------- | - | 0 | 1 | 2 | -</Route> +<Route namespace="qust" data={{"path":"/jw","categories":["university"],"example":"/qust/jw","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jw.qust.edu.cn/jwtz.htm","jw.qust.edu.cn/"]},"name":"教务通知","maintainers":["Silent-wqh"],"url":"jw.qust.edu.cn/jwtz.htm","location":"jw.ts"}} /> ## 山东大学(威海) {#shan-dong-da-xue-wei-hai} -### 新闻网 {#shan-dong-da-xue-wei-hai-xin-wen-wang} +### 材料科学与工程学院通知 {#shan-dong-da-xue-wei-hai-cai-liao-ke-xue-yu-gong-cheng-xue-yuan-tong-zhi} -<Route author="kxxt" example="/sdu/wh/news/xyyw" path="/sdu/wh/news/:column?" paramsDesc={['专栏名称,默认为校园要闻(`xyyw`)']} radar="1" notOperational="1"> - | 校园要闻 | 学生动态 | 综合新闻 | 山大视点 | 菁菁校园 | 校园简讯 | 玛珈之窗 | 热点专题 | 媒体视角 | 高教视野 | 理论学习 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx | -</Route> +<Route namespace="sdu" data={{"path":"/cmse/:type?","categories":["university"],"example":"/sdu/cmse/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"材料科学与工程学院通知","maintainers":["Ji4n1ng"],"description":"| 通知公告 | 学院新闻 | 本科生教育 | 研究生教育 | 学术动态 |\n | -------- | -------- | ---------- | ---------- | -------- |\n | 0 | 1 | 2 | 3 | 4 |","location":"cmse.ts"}} /> + +| 通知公告 | 学院新闻 | 本科生教育 | 研究生教育 | 学术动态 | +| -------- | -------- | ---------- | ---------- | -------- | +| 0 | 1 | 2 | 3 | 4 | + +### 机械工程学院通知 {#shan-dong-da-xue-wei-hai-ji-xie-gong-cheng-xue-yuan-tong-zhi} + +<Route namespace="sdu" data={{"path":"/mech/:type?","categories":["university"],"example":"/sdu/mech/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"机械工程学院通知","maintainers":["Ji4n1ng"],"description":"| 通知公告 | 院所新闻 | 教学信息 | 学术动态 | 学院简报 |\n | -------- | -------- | -------- | -------- | -------- |\n | 0 | 1 | 2 | 3 | 4 |","location":"mech.ts"}} /> + +| 通知公告 | 院所新闻 | 教学信息 | 学术动态 | 学院简报 | +| -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | + +### 计算机科学与技术学院通知 {#shan-dong-da-xue-wei-hai-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan-tong-zhi} + +<Route namespace="sdu" data={{"path":"/cs/:type?","categories":["university"],"example":"/sdu/cs/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机科学与技术学院通知","maintainers":["Ji4n1ng"],"description":"| 学院公告 | 学术报告 | 科技简讯 |\n | -------- | -------- | -------- |\n | 0 | 1 | 2 |","location":"cs.ts"}} /> + +| 学院公告 | 学术报告 | 科技简讯 | +| -------- | -------- | -------- | +| 0 | 1 | 2 | ### 教务处 {#shan-dong-da-xue-wei-hai-jiao-wu-chu} -<Route author="kxxt" example="/sdu/wh/jwc/gztz" path="/sdu/wh/jwc/:column?" paramsDesc={['专栏名称,默认为工作通知(`gztz`)']} radar="1" notOperational="1"> - | 规章制度 | 专业建设 | 实践教学 | 支部风采 | 服务指南 | 教务要闻 | 工作通知 | 教务简报 | 常用下载 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz | -</Route> +<Route namespace="sdu" data={{"path":"/wh/jwc/:column?","categories":["university"],"example":"/sdu/wh/jwc/gztz","parameters":{"column":"专栏名称,默认为工作通知(`gztz`)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["kxxt"],"description":"| 规章制度 | 专业建设 | 实践教学 | 支部风采 | 服务指南 | 教务要闻 | 工作通知 | 教务简报 | 常用下载 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz |","location":"wh/jwc.ts"}} /> + +| 规章制度 | 专业建设 | 实践教学 | 支部风采 | 服务指南 | 教务要闻 | 工作通知 | 教务简报 | 常用下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz | + +### 能源与动力工程学院通知 {#shan-dong-da-xue-wei-hai-neng-yuan-yu-dong-li-gong-cheng-xue-yuan-tong-zhi} + +<Route namespace="sdu" data={{"path":"/epe/:type?","categories":["university"],"example":"/sdu/epe/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"能源与动力工程学院通知","maintainers":["Ji4n1ng"],"description":"| 学院动态 | 通知公告 | 学术论坛 |\n | -------- | -------- | -------- |\n | 0 | 1 | 2 |","location":"epe.ts"}} /> + +| 学院动态 | 通知公告 | 学术论坛 | +| -------- | -------- | -------- | +| 0 | 1 | 2 | + +### 软件学院通知 {#shan-dong-da-xue-wei-hai-ruan-jian-xue-yuan-tong-zhi} + +<Route namespace="sdu" data={{"path":"/sc/:type?","categories":["university"],"example":"/sdu/sc/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"软件学院通知","maintainers":["Ji4n1ng"],"description":"| 通知公告 | 学术动态 | 本科教育 | 研究生教育 |\n | -------- | -------- | -------- | ---------- |\n | 0 | 1 | 2 | 3 |","location":"sc.ts"}} /> + +| 通知公告 | 学术动态 | 本科教育 | 研究生教育 | +| -------- | -------- | -------- | ---------- | +| 0 | 1 | 2 | 3 | + +### 新闻网 {#shan-dong-da-xue-wei-hai-xin-wen-wang} + +<Route namespace="sdu" data={{"path":"/wh/news/:column?","categories":["university"],"example":"/sdu/wh/news/xyyw","parameters":{"column":"专栏名称,默认为校园要闻(`xyyw`)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻网","maintainers":["kxxt"],"description":"| 校园要闻 | 学生动态 | 综合新闻 | 山大视点 | 菁菁校园 | 校园简讯 | 玛珈之窗 | 热点专题 | 媒体视角 | 高教视野 | 理论学习 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx |","location":"wh/news.ts"}} /> + +| 校园要闻 | 学生动态 | 综合新闻 | 山大视点 | 菁菁校园 | 校园简讯 | 玛珈之窗 | 热点专题 | 媒体视角 | 高教视野 | 理论学习 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx | ## 山东科技大学 {#shan-dong-ke-ji-da-xue} ### 研究生招生网 {#shan-dong-ke-ji-da-xue-yan-jiu-sheng-zhao-sheng-wang} -<Route author="nczitzk" example="/sdust/yjsy/zhaosheng" path="/sdust/yjsy/zhaosheng/:id?" paramsDesc={['栏目 id,见下表,默认为通知公告']} notOperational="1"> - 栏目 +<Route namespace="sdust" data={{"path":"/yjsy/zhaosheng/:id?","categories":["university"],"example":"/sdust/yjsy/zhaosheng","parameters":{"id":"栏目 id,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生招生网","maintainers":["nczitzk"],"description":"栏目\n\n | 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 |\n | -------- | -------- | -------- | -------- | -------- |\n | zsjz | zyml | wjlq | glgd | zlxz |\n\n | 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 |\n | -------- | -------- | -------- | ---------- | -------- |\n | tzgg | bszs | sszs | tms | zsxc |","location":"yjsy/zhaosheng.ts"}} /> - | 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 | - | -------- | -------- | -------- | -------- | -------- | - | zsjz | zyml | wjlq | glgd | zlxz | +栏目 - | 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 | - | -------- | -------- | -------- | ---------- | -------- | - | tzgg | bszs | sszs | tms | zsxc | -</Route> +| 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 | +| -------- | -------- | -------- | -------- | -------- | +| zsjz | zyml | wjlq | glgd | zlxz | + +| 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 | +| -------- | -------- | -------- | ---------- | -------- | +| tzgg | bszs | sszs | tms | zsxc | ## 上海大学 {#shang-hai-da-xue} ### 官网信息 {#shang-hai-da-xue-guan-wang-xin-xi} -<Route author="lonelyion" example="/shu/news" path="/shu/:type?" paramsDesc={['消息类型,默认为`news`']}> - | 综合新闻 | 科研动态 | 通知公告 | 重要新闻 | - | -------- | -------- | -------- | --------- | - | news | research | notice | important | -</Route> +<Route namespace="shu" data={{"path":"/:type?","categories":["university"],"example":"/shu/news","parameters":{"type":"消息类型,默认为`news`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.shu.edu.cn/:type"],"target":"/:type"},"name":"官网信息","maintainers":["lonelyion"],"description":"| 综合新闻 | 科研动态 | 通知公告 | 重要新闻 |\n | -------- | -------- | -------- | --------- |\n | news | research | notice | important |","location":"index.ts"}} /> -### 教务处通知公告 {#shang-hai-da-xue-jiao-wu-chu-tong-zhi-gong-gao} - -<Route author="tuxinghuan" example="/shu/jwb/notice" path="/shu/jwb/:type?" paramsDesc={['消息类型,默认为`notice`']}> - | 通知通告 | 新闻 | 政策文件 | - | -------- | ---- | -------- | - | notice | news | policy | -</Route> - -## 上海第二工业大学 {#shang-hai-di-er-gong-ye-da-xue} - -### 教务处 {#shang-hai-di-er-gong-ye-da-xue-jiao-wu-chu} - -<Route author="TonyRL" example="/sspu/jwc/:listId" path="/sspu/jwc/897" paramsDesc={['专栏 ID,见下表']} radar="1"> - | 学生专栏 | 教师专栏 | - | -------- | -------- | - | 897 | 898 | -</Route> - -### 体育部 {#shang-hai-di-er-gong-ye-da-xue-ti-yu-bu} - -<Route author="nczitzk" example="/sspu/pe" path="/sspu/pe/id?" paramsDesc={['栏目 id,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 体育新闻 | 场馆管理 | 相关下载 | - | -------- | -------- | -------- | -------- | - | 342 | 343 | 324 | 325 | - - <details> - <summary>更多栏目</summary> - - #### [部门概况](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 | - </details> -</Route> +| 综合新闻 | 科研动态 | 通知公告 | 重要新闻 | +| -------- | -------- | -------- | --------- | +| news | research | notice | important | ## 上海电力大学 {#shang-hai-dian-li-da-xue} ### 新闻网与学院通知 {#shang-hai-dian-li-da-xue-xin-wen-wang-yu-xue-yuan-tong-zhi} -<Route author="gumibea TeamSUEP" example="/shiep/news/notice" path="/shiep/:type/:id?" paramsDesc={['类型名称,见下表', '页面 ID,默认为通知公告或学院公告所对应的 ID']} radar="1"> - 类型名称与默认 ID: +<Route namespace="shiep" data={{"path":"/:type/:id?","categories":["university"],"example":"/shiep/news/notice","parameters":{"type":"类型名称,见下表","id":"页面 ID,默认为通知公告或学院公告所对应的 ID"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻网与学院通知","maintainers":["gumibea","TeamSUEP"],"description":"类型名称与默认 ID:\n\n 学院一览:\n\n | 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) |\n | ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- |\n | energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy |\n | 892 | 1231 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 |\n\n 党群部门:\n\n | 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 |\n | ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ |\n | dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc |\n | 4014 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 |\n\n 行政部门:\n\n | 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 |\n | -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ |\n | office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx |\n | 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 |\n\n 其它:\n\n | 新闻网 | Shanghai University of Electric Power | 信息公开网 | 本科招生网 | 本科就业信息网 | 妇工委 | 文明办 | 学习路上 | 上海热交换系统节能工程技术研究中心 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源化学实验教学中心 | 教师教学发展中心 | 电力装备设计与制造虚拟仿真中心 | 上海市电力材料防护与新材料重点实验室 | 能源电力智库 | 国家新能源电力系统实验教学示范中心 | 智能发电实验教学中心 |\n | ------ | ------------------------------------- | ---------- | ---------- | -------------- | ------ | ------- | -------- | ---------------------------------- | ------------------------------ | ---------------------------- | -------------------- | ---------------- | ------------------------------ | ------------------------------------ | ------------ | ---------------------------------- | -------------------- |\n | news | english | xxgk | zs | career | fgw | wenming | ztjy | energy-saving | gec | green-energy | hhsyzx | jsjxfzzx | jxfz | mpep | nydlzk | restec | spgc |\n | notice | events | zxgkxx | zxxx | tzgg | 1411 | 2202 | 5575 | tzgg | 1959 | 118 | 3709 | 3909 | 3330 | 1134 | tzgg | 1366 | 4449 |\n\n 参数与来源页面对应规则为:`https://${type}.shiep.edu.cn/${id}/list.htm`","location":"index.ts"}} /> - 学院一览: +类型名称与默认 ID: - | 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) | - | ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- | - | energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy | - | 892 | 1231 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 | +学院一览: - 党群部门: +| 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) | +| ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- | +| energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy | +| 892 | 1231 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 | - | 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 | - | ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ | - | dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc | - | 4014 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 | +党群部门: - 行政部门: +| 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 | +| ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ | +| dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc | +| 4014 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 | - | 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 | - | -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ | - | office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx | - | 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 | +行政部门: - 其它: +| 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 | +| -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ | +| office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx | +| 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 | - | 新闻网 | Shanghai University of Electric Power | 信息公开网 | 本科招生网 | 本科就业信息网 | 妇工委 | 文明办 | 学习路上 | 上海热交换系统节能工程技术研究中心 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源化学实验教学中心 | 教师教学发展中心 | 电力装备设计与制造虚拟仿真中心 | 上海市电力材料防护与新材料重点实验室 | 能源电力智库 | 国家新能源电力系统实验教学示范中心 | 智能发电实验教学中心 | - | ------ | ------------------------------------- | ---------- | ---------- | -------------- | ------ | ------- | -------- | ---------------------------------- | ------------------------------ | ---------------------------- | -------------------- | ---------------- | ------------------------------ | ------------------------------------ | ------------ | ---------------------------------- | -------------------- | - | news | english | xxgk | zs | career | fgw | wenming | ztjy | energy-saving | gec | green-energy | hhsyzx | jsjxfzzx | jxfz | mpep | nydlzk | restec | spgc | - | notice | events | zxgkxx | zxxx | tzgg | 1411 | 2202 | 5575 | tzgg | 1959 | 118 | 3709 | 3909 | 3330 | 1134 | tzgg | 1366 | 4449 | +其它: - 参数与来源页面对应规则为:`https://${type}.shiep.edu.cn/${id}/list.htm` -</Route> +| 新闻网 | Shanghai University of Electric Power | 信息公开网 | 本科招生网 | 本科就业信息网 | 妇工委 | 文明办 | 学习路上 | 上海热交换系统节能工程技术研究中心 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源化学实验教学中心 | 教师教学发展中心 | 电力装备设计与制造虚拟仿真中心 | 上海市电力材料防护与新材料重点实验室 | 能源电力智库 | 国家新能源电力系统实验教学示范中心 | 智能发电实验教学中心 | +| ------ | ------------------------------------- | ---------- | ---------- | -------------- | ------ | ------- | -------- | ---------------------------------- | ------------------------------ | ---------------------------- | -------------------- | ---------------- | ------------------------------ | ------------------------------------ | ------------ | ---------------------------------- | -------------------- | +| news | english | xxgk | zs | career | fgw | wenming | ztjy | energy-saving | gec | green-energy | hhsyzx | jsjxfzzx | jxfz | mpep | nydlzk | restec | spgc | +| notice | events | zxgkxx | zxxx | tzgg | 1411 | 2202 | 5575 | tzgg | 1959 | 118 | 3709 | 3909 | 3330 | 1134 | tzgg | 1366 | 4449 | + +参数与来源页面对应规则为:`https://${type}.shiep.edu.cn/${id}/list.htm` ## 上海海事大学 {#shang-hai-hai-shi-da-xue} ### 官网信息 {#shang-hai-hai-shi-da-xue-guan-wang-xin-xi} -<Route author="imbytecat simonsmh" example="/shmtu/www/events" path="/shmtu/www/:type" paramsDesc={['类型名称']} /> +<Route namespace="shmtu" data={{"path":"/www/:type","categories":["university"],"example":"/shmtu/www/events","parameters":{"type":"类型名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.shmtu.edu.cn/:type"]},"name":"官网信息","maintainers":["imbytecat","simonsmh"],"description":"| 学术讲座 | 通知公告 |\n| -------- | -------- |\n| events | notes |","location":"www.ts"}} /> | 学术讲座 | 通知公告 | | -------- | -------- | @@ -2483,7 +1361,7 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TL ### 教务信息 {#shang-hai-hai-shi-da-xue-jiao-wu-xin-xi} -<Route author="imbytecat simonsmh" example="/shmtu/jwc/jwgg" path="/shmtu/jwc/:type" paramsDesc={['类型名称']} /> +<Route namespace="shmtu" data={{"path":"/jwc/:type","categories":["university"],"example":"/shmtu/jwc/jwgg","parameters":{"type":"类型名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.shmtu.edu.cn/:type"]},"name":"教务信息","maintainers":["imbytecat","simonsmh"],"description":"| 教务公告 | 教务新闻 |\n| -------- | -------- |\n| jwgg | jwxw |","location":"jwc.ts"}} /> | 教务公告 | 教务新闻 | | -------- | -------- | @@ -2491,1217 +1369,695 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE\_TL ### 数字平台 {#shang-hai-hai-shi-da-xue-shu-zi-ping-tai} -<Route author="imbytecat" example="/shmtu/portal/bmtzgg" path="/shmtu/portal/:type" paramsDesc={['类型名称']} /> +<Route namespace="shmtu" data={{"path":"/portal/:type","categories":["university"],"example":"/shmtu/portal/bmtzgg","parameters":{"type":"类型名称"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["portal.shmtu.edu.cn/:type"]},"name":"数字平台","maintainers":["imbytecat"],"description":"| 部门通知公告 | 学术与大型活动公告 | 部门动态 |\n| ------------ | ------------------ | -------- |\n| bmtzgg | xsydxhdgg | bmdt |","location":"portal.ts"}} /> | 部门通知公告 | 学术与大型活动公告 | 部门动态 | | ------------ | ------------------ | -------- | | bmtzgg | xsydxhdgg | bmdt | -## 上海海洋大学 {#shang-hai-hai-yang-da-xue} - -### 官网信息 {#shang-hai-hai-yang-da-xue-guan-wang-xin-xi} - -<Route author="Swung0x48" example="/shou/www/tzgg" path="/shou/www/:type" paramsDesc={['消息类型']} notOperational="1"> - | 通知公告 | 招标信息 | 要闻 | 媒体聚焦 | 学术讲座 | 科技前沿 | - | -------- | -------- | ---- | -------- | -------- | -------- | - | tzgg | zbxx | yw | mtjj | xsjz | xsqy | -</Route> - ## 上海交通大学 {#shang-hai-jiao-tong-da-xue} -### 电子信息与电气工程学院学术动态 {#shang-hai-jiao-tong-da-xue-dian-zi-xin-xi-yu-dian-qi-gong-cheng-xue-yuan-xue-shu-dong-tai} - -<Route author="HenryQW" example="/sjtu/seiee/academic" path="/sjtu/seiee/academic" radar="1" /> - -### 电子信息与电气工程学院本科教务办 {#shang-hai-jiao-tong-da-xue-dian-zi-xin-xi-yu-dian-qi-gong-cheng-xue-yuan-ben-ke-jiao-wu-ban} - -<Route author="Polynomia" example="/sjtu/seiee/bjwb/major_select" path="/sjtu/seiee/bjwb/:type" paramsDesc={['无默认选项']} radar="1" anticrawler="1"> - | 分专业 | 转专业 | 直升研究生 | 交换交流 | 国际办学 | - | ------------- | --------------- | ------------ | -------- | ------------- | - | major\_select | major\_transfer | postgraduate | abroad | international | -</Route> - -### 电子信息与电气工程学院学生工作办公室 {#shang-hai-jiao-tong-da-xue-dian-zi-xin-xi-yu-dian-qi-gong-cheng-xue-yuan-xue-sheng-gong-zuo-ban-gong-shi} - -<Route author="Polynomia xxchan" example="/sjtu/seiee/xsb/news" path="/sjtu/seiee/xsb/:type?" paramsDesc={['默认列举所有通知公告']} radar="1"> - | 信息通告 | 奖学金 | 助学金 | 讲座活动 | 党团活动 | 新闻发布 | 本科生综合测评 | - | -------- | ----------- | ------------ | -------- | -------- | -------- | -------------- | - | 空 | scholarship | financialAid | lecture | activity | news | zhcp | -</Route> - -### 研究生通知公告 {#shang-hai-jiao-tong-da-xue-yan-jiu-sheng-tong-zhi-gong-gao} - -<Route author="mzr1996 dzx-dzx" example="/sjtu/gs/enroll/59" path="/sjtu/gs/:type/:num?" paramsDesc={['类别', '细分类别, 仅对`type`为`enroll`或`exchange`有效']} radar="1" anticrawler="1"> - | 工作信息 | 招生信息 | 培养信息 | 学位学科 | 国际交流 | 创新工程 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | work | enroll | train | degree | exchange | xsjy | - - 当`type`为`enroll`, `num`可选字段: - - | 58 | 59 | 60 | 61 | 62 | - | -------- | -------- | ---------- | -------- | -------- | - | 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | - - 当`type`为`exchange`, `num`可选字段: - - | 67 | 68 | 69 | 70 | 71 | - | -------------- | -------------- | -------------- | -------------- | -------------- | - | 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 | -</Route> - ### 教务处通知公告 {#shang-hai-jiao-tong-da-xue-jiao-wu-chu-tong-zhi-gong-gao} -<Route author="SeanChao" example="/sjtu/jwc" path="/sjtu/jwc/:type?" paramsDesc={['默认为 notice']} radar="1"> - | 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | - | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | - | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | -</Route> +<Route namespace="sjtu" data={{"path":"/jwc/:type?","categories":["university"],"example":"/sjtu/jwc","parameters":{"type":"默认为 notice"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处通知公告","maintainers":["SeanChao"],"description":"| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 |\n | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- |\n | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge |","location":"jwc.ts"}} /> + +| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | +| -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | +| news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | ### 同去网最新活动 {#shang-hai-jiao-tong-da-xue-tong-qu-wang-zui-xin-huo-dong} -<Route author="SeanChao" example="/sjtu/tongqu/lecture" path="/sjtu/tongqu/:type?" paramsDesc={['类型,默认为全部']} notOperational="1"> - | 全部 | 最新 | 招新 | 讲座 | 户外 | 招聘 | 游学 | 比赛 | 公益 | 主题党日 | 学生事务 | 广告 | 其他 | - | ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ | - | all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others | -</Route> +<Route namespace="sjtu" data={{"path":"/tongqu/:type?","categories":["university"],"example":"/sjtu/tongqu/lecture","parameters":{"type":"类型,默认为全部"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"同去网最新活动","maintainers":["SeanChao"],"description":"| 全部 | 最新 | 招新 | 讲座 | 户外 | 招聘 | 游学 | 比赛 | 公益 | 主题党日 | 学生事务 | 广告 | 其他 |\n | ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ |\n | all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others |","location":"tongqu/activity.ts"}} /> + +| 全部 | 最新 | 招新 | 讲座 | 户外 | 招聘 | 游学 | 比赛 | 公益 | 主题党日 | 学生事务 | 广告 | 其他 | +| ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ | +| all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others | + +### 研究生通知公告 {#shang-hai-jiao-tong-da-xue-yan-jiu-sheng-tong-zhi-gong-gao} + +<Route namespace="sjtu" data={{"path":"/gs/:type/:num?","categories":["university"],"example":"/sjtu/gs/enroll/59","parameters":{"type":"类别","num":"细分类别, 仅对`type`为`enroll`或`exchange`有效"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.sjtu.edu.cn/announcement/:type"],"target":"/gs/:type"},"name":"研究生通知公告","maintainers":["dzx-dzx"],"description":"| 工作信息 | 招生信息 | 培养信息 | 学位学科 | 国际交流 | 创新工程 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | work | enroll | train | degree | exchange | xsjy |\n\n 当`type`为`enroll`, `num`可选字段:\n\n | 58 | 59 | 60 | 61 | 62 |\n | -------- | -------- | ---------- | -------- | -------- |\n | 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 |\n\n 当`type`为`exchange`, `num`可选字段:\n\n | 67 | 68 | 69 | 70 | 71 |\n | -------------- | -------------- | -------------- | -------------- | -------------- |\n | 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 |","location":"gs.ts"}} /> + +| 工作信息 | 招生信息 | 培养信息 | 学位学科 | 国际交流 | 创新工程 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| work | enroll | train | degree | exchange | xsjy | + +当`type`为`enroll`, `num`可选字段: + +| 58 | 59 | 60 | 61 | 62 | +| -------- | -------- | ---------- | -------- | -------- | +| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | + +当`type`为`exchange`, `num`可选字段: + +| 67 | 68 | 69 | 70 | 71 | +| -------------- | -------------- | -------------- | -------------- | -------------- | +| 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 | ### 研究生招生网招考信息 {#shang-hai-jiao-tong-da-xue-yan-jiu-sheng-zhao-sheng-wang-zhao-kao-xin-xi} -<Route author="stdrc" example="/sjtu/yzb/zkxx/sszs" path="/sjtu/yzb/zkxx/:type" paramsDesc={['无默认选项']} radar="1"> - | 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | - | -------- | -------- | ---------- | -------- | -------- | - | bszs | sszs | gatzs | kdxx | yxdt | -</Route> +<Route namespace="sjtu" data={{"path":"/yzb/zkxx/:type","categories":["university"],"example":"/sjtu/yzb/zkxx/sszs","parameters":{"type":"无默认选项"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生招生网招考信息","maintainers":["stdrc"],"description":"| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 |\n | -------- | -------- | ---------- | -------- | -------- |\n | bszs | sszs | gatzs | kdxx | yxdt |","location":"yzb/zkxx.ts"}} /> -## 上海科技大学 {#shang-hai-ke-ji-da-xue} - -### 活动通知 {#shang-hai-ke-ji-da-xue-huo-dong-tong-zhi} - -<Route author="nczitzk" example="/shanghaitech/activity" path="/shanghaitech/activity" anticrawler="1" /> - -### 信息科技与技术学院活动 {#shang-hai-ke-ji-da-xue-xin-xi-ke-ji-yu-ji-shu-xue-yuan-huo-dong} - -<Route author="HenryQW" example="/shanghaitech/sist/activity" path="/shanghaitech/sist/activity" notOperational="1" /> - -## 上海理工大学 {#shang-hai-li-gong-da-xue} - -### 教务处 {#shang-hai-li-gong-da-xue-jiao-wu-chu} - -<Route author="Diffumist" example="/usst/jwc" path="/usst/jwc" notOperational="1" /> - -## 上海立信会计金融学院 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan} - -:::warning -分区 ID 是`info/iList.jsp?cat_id=`后方数字 - -目前仅支持文章分区的识别 -::: - -### 官网 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-guan-wang} - -<Route author="NeverBehave" example="/slu/tzgg/12707" path="/slu/tzgg/:id" paramsDesc={['类别ID']} notOperational="1" /> - -### 教务处 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-jiao-wu-chu} - -<Route author="NeverBehave" example="/slu/jwc/13424" path="/slu/jwc/:id" paramsDesc={['类别ID']} notOperational="1" /> - -### 学生处 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-xue-sheng-chu} - -<Route author="NeverBehave" example="/slu/xsc/14751" path="/slu/xsc/:id" paramsDesc={['类别ID']} notOperational="1" /> - -### 会计学院 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-kuai-ji-xue-yuan} - -<Route author="NeverBehave" example="/slu/kjxy/13496" path="/slu/kjxy/:id" paramsDesc={['类别ID']} notOperational="1" /> - -### 财税与公共管理学院 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-cai-shui-yu-gong-gong-guan-li-xue-yuan} - -<Route author="NeverBehave" example="/slu/csggxy/14751" path="/slu/csggxy/:id" paramsDesc={['类别ID']} notOperational="1" /> - -### 体育与健康学院 {#shang-hai-li-xin-kuai-ji-jin-rong-xue-yuan-ti-yu-yu-jian-kang-xue-yuan} - -<Route author="NeverBehave" example="/slu/tyyjkxy/14754" path="/slu/tyyjkxy/:id" paramsDesc={['类别ID']} notOperational="1" /> +| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | +| -------- | -------- | ---------- | -------- | -------- | +| bszs | sszs | gatzs | kdxx | yxdt | ## 上海社会科学院 {#shang-hai-she-hui-ke-xue-yuan} ### 研究生院 {#shang-hai-she-hui-ke-xue-yuan-yan-jiu-sheng-yuan} -<Route author="yanbot-team" example="/sass/gs/1793" path="/sass/gs/:type" paramsDesc={['类别 ID,见下表,其他未列出的栏目参数可以从页面的 URL Path 中找到,例如:硕士统考招生的网址为 `https://gs.sass.org.cn/1793/list.htm`,则类别 ID 为`1793`']} radar="1"> - | 硕士统考招生 | 硕士推免招生 | - | ------------ | ------------ | - | 1793 | sstmzs | -</Route> +<Route namespace="sass" data={{"path":"/gs/:type","categories":["university"],"example":"/sass/gs/1793","parameters":{"type":"类别 ID,见下表,其他未列出的栏目参数可以从页面的 URL Path 中找到,例如:硕士统考招生的网址为 `https://gs.sass.org.cn/1793/list.htm`,则类别 ID 为`1793`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.sass.org.cn/:type/list.htm"]},"name":"研究生院","maintainers":["yanbot-team"],"description":"| 硕士统考招生 | 硕士推免招生 |\n | ------------ | ------------ |\n | 1793 | sstmzs |","location":"gs/index.ts"}} /> + +| 硕士统考招生 | 硕士推免招生 | +| ------------ | ------------ | +| 1793 | sstmzs | ## 上海外国语大学 {#shang-hai-wai-guo-yu-da-xue} ### 上外新闻 {#shang-hai-wai-guo-yu-da-xue-shang-wai-xin-wen} -<Route author="Duuckjing" example="/shisu/news/notice" path="/shisu/news/:category" paramsDesc={['新闻的分类可根据自己的需要选择,首页为全部新闻']} radar="1"> - | 首页 | 特稿 | 学术 | 教学 | 国际 | 校园 | 人物 | 视讯 | 公告 | - | ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ | - | news | gazette | research- | academics- | international | campus | people | multimedia | notice | -</Route> +<Route namespace="shisu" data={{"path":"/news/:category","categories":["university"],"example":"/shisu/news/notice","parameters":{"category":"新闻的分类可根据自己的需要选择,首页为全部新闻"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.shisu.edu.cn/:category/index.html"]},"name":"上外新闻","maintainers":["Duuckjing"],"description":"| 首页 | 特稿 | 学术 | 教学 | 国际 | 校园 | 人物 | 视讯 | 公告 |\n | ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ |\n | news | gazette | research- | academics- | international | campus | people | multimedia | notice |","location":"news.ts"}} /> + +| 首页 | 特稿 | 学术 | 教学 | 国际 | 校园 | 人物 | 视讯 | 公告 | +| ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ | +| news | gazette | research- | academics- | international | campus | people | multimedia | notice | ## 深圳大学 {#shen-zhen-da-xue} ### 研究生招生网 {#shen-zhen-da-xue-yan-jiu-sheng-zhao-sheng-wang} -<Route author="NagaruZ" example="/szu/yz/1" path="/szu/yz/:type?" paramsDesc={['默认为 `1`']} radar="1" notOperational="1"> - | 研究生 | 博士生 | - | ------ | ------ | - | 1 | 2 | -</Route> +<Route namespace="szu" data={{"path":"/yz/:type?","categories":["university"],"example":"/szu/yz/1","parameters":{"type":"默认为 `1`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生招生网","maintainers":["NagaruZ"],"description":"| 研究生 | 博士生 |\n | ------ | ------ |\n | 1 | 2 |","location":"yz/index.ts"}} /> -## 四川大学 {#si-chuan-da-xue} - -### 教务处通知公告 {#si-chuan-da-xue-jiao-wu-chu-tong-zhi-gong-gao} - -<Route author="KXXH" example="/scu/jwc/notice" path="/scu/jwc/notice" notOperational="1" /> - -### 学工部通知公告 {#si-chuan-da-xue-xue-gong-bu-tong-zhi-gong-gao} - -<Route author="stevelee477" example="/scu/xg/notice" path="/scu/xg/notice" anticrawler="1" /> +| 研究生 | 博士生 | +| ------ | ------ | +| 1 | 2 | ## 四川工商学院 {#si-chuan-gong-shang-xue-yuan} -### 学院新闻 {#si-chuan-gong-shang-xue-yuan-xue-yuan-xin-wen} - -<Route author="HyperCherry" example="/stbu/xyxw" path="/stbu/syxw" notOperational="1" /> - ### 计算机学院通知公告 {#si-chuan-gong-shang-xue-yuan-ji-suan-ji-xue-yuan-tong-zhi-gong-gao} -<Route author="HyperCherry" example="/stbu/jsjxy" path="/stbu/jsjxy" notOperational="1" /> +<Route namespace="stbu" data={{"path":"/jsjxy","categories":["university"],"example":"/stbu/jsjxy","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jsjxy.stbu.edu.cn/news","jsjxy.stbu.edu.cn/"]},"name":"计算机学院通知公告","maintainers":["HyperCherry"],"url":"jsjxy.stbu.edu.cn/news","description":":::warning\n计算机学院通知公告疑似禁止了非大陆 IP 访问,使用路由需要自行 [部署](https://docs.rsshub.app/install)。\n:::","location":"jsjxy.ts"}} /> :::warning 计算机学院通知公告疑似禁止了非大陆 IP 访问,使用路由需要自行 [部署](https://docs.rsshub.app/install)。 ::: -## 四川旅游学院 {#si-chuan-lv-you-xue-yuan} - -### 信息与工程学院动态公告列表 {#si-chuan-lv-you-xue-yuan-xin-xi-yu-gong-cheng-xue-yuan-dong-tai-gong-gao-lie-biao} - -<Route author="talenHuang" example="/sctu/xgxy" path="/sctu/information-engineer-faculty/index" notOperational="1" /> - -### 信息与工程学院公告详情 {#si-chuan-lv-you-xue-yuan-xin-xi-yu-gong-cheng-xue-yuan-gong-gao-xiang-qing} - -<Route author="talenHuang" example="/sctu/xgxy/652" path="/sctu/information-engineer-faculty/context/:id" paramsDesc={['文章id']} notOperational="1" /> - -### 教务处 {#si-chuan-lv-you-xue-yuan-jiao-wu-chu} - -<Route author="talenHuang" example="/sctu/jwc/13" path="/sctu/jwc/index:type?" paramsDesc={['可选参数,默认为 `13`']} notOperational="1"> - | 教务通知 | 信息公告 | - | -------- | -------- | - | 13 | 14 | -</Route> - -### 教务处通告详情 {#si-chuan-lv-you-xue-yuan-jiao-wu-chu-tong-gao-xiang-qing} - -<Route author="talenHuang" example="/sctu/jwc/13/645" path="/sctu/jwc/context/:type/:id" paramsDesc={['通知类型','文章id']} notOperational="1" /> - ## 四川农业大学 {#si-chuan-nong-ye-da-xue} ### 动物科技学院 {#si-chuan-nong-ye-da-xue-dong-wu-ke-ji-xue-yuan} -<Route author="nczitzk" example="/sicau/dky/tzgg" path="/sicau/dky/:category?" paramsDesc={['分类,见下表,默认为通知公告']} anticrawler="1"> - | 通知公告 | 学院动态 | 教学管理 | 动科大讲堂 | 就业信息 | - | -------- | -------- | -------- | ---------- | -------- | - | tzgg | xydt | jxgl | dkdjt | zpxx | -</Route> +<Route namespace="sicau" data={{"path":"/dky/:category?","categories":["university"],"example":"/sicau/dky/tzgg","parameters":{"category":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dky.sicau.edu.cn/"]},"name":"动物科技学院","maintainers":["nczitzk"],"url":"dky.sicau.edu.cn/","description":"| 通知公告 | 学院动态 | 教学管理 | 动科大讲堂 | 就业信息 |\n | -------- | -------- | -------- | ---------- | -------- |\n | tzgg | xydt | jxgl | dkdjt | zpxx |","location":"dky.ts"}} /> + +| 通知公告 | 学院动态 | 教学管理 | 动科大讲堂 | 就业信息 | +| -------- | -------- | -------- | ---------- | -------- | +| tzgg | xydt | jxgl | dkdjt | zpxx | ### 研究生院 {#si-chuan-nong-ye-da-xue-yan-jiu-sheng-yuan} -<Route author="nczitzk" example="/sicau/yan/xwgg" path="/sicau/yan/:category?" paramsDesc={['分类,见下表,默认为新闻公告']} notOperational="1"> - | 新闻公告 | 学术报告 | - | -------- | -------- | - | xwgg | xsbg | -</Route> +<Route namespace="sicau" data={{"path":"/yan/:category?","categories":["university"],"example":"/sicau/yan/xwgg","parameters":{"category":"分类,见下表,默认为新闻公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yan.sicau.edu.cn/"]},"name":"研究生院","maintainers":["nczitzk"],"url":"yan.sicau.edu.cn/","description":"| 新闻公告 | 学术报告 |\n | -------- | -------- |\n | xwgg | xsbg |","location":"yan.ts"}} /> + +| 新闻公告 | 学术报告 | +| -------- | -------- | +| xwgg | xsbg | ### 招生就业 {#si-chuan-nong-ye-da-xue-zhao-sheng-jiu-ye} -<Route author="nczitzk" example="/sicau/zsjy/bkszs" path="/sicau/zsjy/:category?" paramsDesc={['分类,见下表,默认为本科生招生']} anticrawler="1"> - | 本科生招生 | 研究生招生 | 毕业生选录指南 | - | ---------- | ---------- | -------------- | - | bkszs | yjszs | bysxlzn | -</Route> +<Route namespace="sicau" data={{"path":"/zsjy/:category?","categories":["university"],"example":"/sicau/zsjy/bkszs","parameters":{"category":"分类,见下表,默认为本科生招生"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["dky.sicau.edu.cn/"]},"name":"招生就业","maintainers":["nczitzk"],"url":"dky.sicau.edu.cn/","description":"| 本科生招生 | 研究生招生 | 毕业生选录指南 |\n | ---------- | ---------- | -------------- |\n | bkszs | yjszs | bysxlzn |","location":"zsjy.ts"}} /> + +| 本科生招生 | 研究生招生 | 毕业生选录指南 | +| ---------- | ---------- | -------------- | +| bkszs | yjszs | bysxlzn | ## 四川职业技术学院 {#si-chuan-zhi-ye-ji-shu-xue-yuan} ### 学院公告 {#si-chuan-zhi-ye-ji-shu-xue-yuan-xue-yuan-gong-gao} -<Route author="nczitzk" example="/scvtc/xygg" path="/scvtc/xygg" notOperational="1" /> +<Route namespace="scvtc" data={{"path":"/xygg","categories":["university"],"example":"/scvtc/xygg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["scvtc.edu.cn/ggfw1/xygg.htm","scvtc.edu.cn/"]},"name":"学院公告","maintainers":["nczitzk"],"url":"scvtc.edu.cn/ggfw1/xygg.htm","location":"xygg.ts"}} /> ## 苏州科技大学 {#su-zhou-ke-ji-da-xue} ### 教务处 {#su-zhou-ke-ji-da-xue-jiao-wu-chu} -<Route author="Fatpandac" example="/usts/jwch" path="/usts/jwch/:type?" paramsDesc={['类型,默认为教务动态']} radar="1"> - | 类型 | 教务动态 | 公告在线 | 选课通知 | - | ---- | -------- | -------- | -------- | - | | jwdt | ggzx | xktz | -</Route> +<Route namespace="usts" data={{"path":"/jwch/:type?","categories":["university"],"example":"/usts/jwch","parameters":{"type":"类型,默认为教务动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":[],"description":"| 类型 | 教务动态 | 公告在线 | 选课通知 |\n | ---- | -------- | -------- | -------- |\n | | jwdt | ggzx | xktz |","location":"jwch.ts"}} /> -## 太原师范学院 {#tai-yuan-shi-fan-xue-yuan} - -### 通知公告 {#tai-yuan-shi-fan-xue-yuan-tong-zhi-gong-gao} - -<Route author="2PoL" example="/tynu" path="/tynu" radar="1" notOperational="1" /> +| 类型 | 教务动态 | 公告在线 | 选课通知 | +| ---- | -------- | -------- | -------- | +| | jwdt | ggzx | xktz | ## 同济大学 {#tong-ji-da-xue} -### 研究生院通知公告 {#tong-ji-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} +### 本科生院通知公告 {#tong-ji-da-xue-ben-ke-sheng-yuan-tong-zhi-gong-gao} -<Route author="shengmaosu" example="/tongji/yjs" path="/tongji/yjs" radar="1" /> +<Route namespace="tongji" data={{"path":"/bks","categories":["university"],"example":"/tongji/bks","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["bksy.tongji.edu.cn/"]},"name":"本科生院通知公告","maintainers":["shiquda"],"url":"bksy.tongji.edu.cn/","location":"bks.ts"}} /> ### 软件学院通知 {#tong-ji-da-xue-ruan-jian-xue-yuan-tong-zhi} -<Route author="sgqy" example="/tongji/sse/xytz" path="/tongji/sse/:type?" paramsDesc={['通知类型,默认为 `xytz`']} radar="1"> - | 本科生通知 | 研究生通知 | 教工通知 | 全体通知 | 学院通知 | 学院新闻 | 学院活动 | - | ---------- | ---------- | -------- | -------- | -------- | -------- | -------- | - | bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd | +<Route namespace="tongji" data={{"path":"/sse/:type?","categories":["university"],"example":"/tongji/sse/xytz","parameters":{"type":"通知类型,默认为 `xytz`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"软件学院通知","maintainers":["sgqy"],"description":"| 本科生通知 | 研究生通知 | 教工通知 | 全体通知 | 学院通知 | 学院新闻 | 学院活动 |\n | ---------- | ---------- | -------- | -------- | -------- | -------- | -------- |\n | bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd |\n\n 注意: `qttz` 与 `xytz` 在原网站等价.","location":"sse/notice.ts"}} /> - 注意: `qttz` 与 `xytz` 在原网站等价. -</Route> +| 本科生通知 | 研究生通知 | 教工通知 | 全体通知 | 学院通知 | 学院新闻 | 学院活动 | +| ---------- | ---------- | -------- | -------- | -------- | -------- | -------- | +| bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd | -### 本科生院通知公告 {#tong-ji-da-xue-ben-ke-sheng-yuan-tong-zhi-gong-gao} +注意: `qttz` 与 `xytz` 在原网站等价. -<Route author="shiquda" example="/tongji/bks" path="/tongji/bks" radar="1" /> +### 研究生院通知公告 {#tong-ji-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} + +<Route namespace="tongji" data={{"path":"/yjs","categories":["university"],"example":"/tongji/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.tongji.edu.cn/zsxw/ggtz.htm","yz.tongji.edu.cn/"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"yz.tongji.edu.cn/zsxw/ggtz.htm","location":"yjs.ts"}} /> ## 潍坊学院 {#wei-fang-xue-yuan} -### 新闻 {#wei-fang-xue-yuan-xin-wen} - -<Route author="cccht" example="/wfu/news/wyyw" path="/wfu/news/:type?" paramsDesc={['分类,默认为 `wyyw`,具体参数见下表']} notOperational="1"> - | **内容** | **参数** | - | :------: | :------: | - | 潍院要闻 | wyyw | - | 综合新闻 | zhxw | - | 学术纵横 | xszh | -</Route> - ### 教务处通知 {#wei-fang-xue-yuan-jiao-wu-chu-tong-zhi} -<Route author="cccht" example="/wfu/jwc" path="/wfu/jwc" notOperational="1" /> +<Route namespace="wfu" data={{"path":"/jwc","categories":["university"],"example":"/wfu/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.wfu.edu.cn/"]},"name":"教务处通知","maintainers":["cccht"],"url":"jwc.wfu.edu.cn/","location":"jwc.ts"}} /> -## 温州大学 {#wen-zhou-da-xue} +### 新闻 {#wei-fang-xue-yuan-xin-wen} -### 新闻 {#wen-zhou-da-xue-xin-wen} +<Route namespace="wfu" data={{"path":"/news/:type?","categories":["university"],"example":"/wfu/news/wyyw","parameters":{"type":"分类,默认为 `wyyw`,具体参数见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["news.wfu.edu.cn/"],"target":"/news"},"name":"新闻","maintainers":["cccht"],"url":"news.wfu.edu.cn/","description":"| **内容** | **参数** |\n | :------: | :------: |\n | 潍院要闻 | wyyw |\n | 综合新闻 | zhxw |\n | 学术纵横 | xszh |","location":"news.ts"}} /> -<Route author="Chandler-Lu" example="/wzu/news/0" path="/wzu/news/:type" paramsDesc={['分类,见下表 默认为`0`']} anticrawler="1"> - | 温大新闻 | 媒体温大 | 学术温大 | 通知公告 | 招标信息 | 学术公告 | - | :------: | :------: | :------: | :------: | :------: | :------: | - | 0 | 1 | 2 | 3 | 4 | 5 | -</Route> - -## 温州商学院 {#wen-zhou-shang-xue-yuan} - -### 温州商学院 {#wen-zhou-shang-xue-yuan-wen-zhou-shang-xue-yuan} - -<Route author="howel52" example="/wzbc/notice" path="/wzbc/:type" paramsDesc={['分类,见下表']} notOperational="1"> - | 校园新闻 | 媒体商院 | 通知公告 | 人才招聘 | 行事历 | 招标公告 | 学术动态 | - | -------- | -------- | -------- | -------- | ------- | -------- | -------- | - | news | media | notice | jobs | workday | tender | activity | -</Route> +| **内容** | **参数** | +| :------: | :------: | +| 潍院要闻 | wyyw | +| 综合新闻 | zhxw | +| 学术纵横 | xszh | ## 武昌首义学院 {#wu-chang-shou-yi-xue-yuan} ### 新闻中心 {#wu-chang-shou-yi-xue-yuan-xin-wen-zhong-xin} -<Route author="Derekmini" example="/wsyu/news/xxyw" path="/wsyu/news/:type?" paramsDesc={['分类,默认为 `xxyw`']}> - | 学校要闻 | 综合新闻 | 媒体聚焦 | - | -------- | -------- | -------- | - | xxyw | zhxw | mtjj | -</Route> +<Route namespace="wsyu" data={{"path":"/news/:type?","categories":["university"],"example":"/wsyu/news/xxyw","parameters":{"type":"分类,默认为 `xxyw`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"新闻中心","maintainers":["Derekmini"],"description":"| 学校要闻 | 综合新闻 | 媒体聚焦 |\n | -------- | -------- | -------- |\n | xxyw | zhxw | mtjj |","location":"news.ts"}} /> + +| 学校要闻 | 综合新闻 | 媒体聚焦 | +| -------- | -------- | -------- | +| xxyw | zhxw | mtjj | ## 武汉大学 {#wu-han-da-xue} ### 计算机学院公告 {#wu-han-da-xue-ji-suan-ji-xue-yuan-gong-gao} -<Route author="ttyfly" example="/whu/cs/2" path="/whu/cs/:type" paramsDesc={['公告类型,详见表格']}> - | 公告类型 | 学院新闻 | 学术交流 | 通知公告 | 科研进展 | - | -------- | -------- | -------- | -------- | -------- | - | 参数 | 0 | 1 | 2 | 3 | -</Route> +<Route namespace="whu" data={{"path":"/cs/:type","categories":["university"],"example":"/whu/cs/2","parameters":{"type":"公告类型,详见表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机学院公告","maintainers":["ttyfly"],"description":"| 公告类型 | 学院新闻 | 学术交流 | 通知公告 | 科研进展 |\n | -------- | -------- | -------- | -------- | -------- |\n | 参数 | 0 | 1 | 2 | 3 |","location":"cs.ts"}} /> -### 新闻网 {#wu-han-da-xue-xin-wen-wang} - -<Route author="SChen1024 nczitzk" example="/whu/news" path="/whu/news/:category?" paramsDesc={['分类,见下表,默认为 `wdzx/wdyw`, 即 **武大要闻**']} radar="1" anticrawler="1"> - | 武大资讯 | 武大要闻 | 综合新闻 | 合作交流 | 一线传真 | - | --------- | --------- | --------- | --------- | --------- | - | wdzx/wdyw | wdzx/wdyw | wdzx/zhxw | wdzx/hzjl | wdzx/yxcz | - - <details> - <summary>更多分类</summary> - - #### 学术动态 - - | 学术动态 | - | -------- | - | kydt | - - #### 校园文化 - - | 缤纷校园 | 校友之声 | 珞珈副刊 | 校史钩沉 | - | --------- | --------- | --------- | --------- | - | xywh/bfxy | xywh/xyzs | xywh/ljfk | xywh/xsgc | - - #### 专题报道 - - | 专题报道 | 主题教育 | 顶天立地建学科 | 学习在线 | 记者调查 | 校庆征文 我与武大 | - | -------- | --------- | -------------- | --------- | --------- | ----------------- | - | ztbd | ztbd/ztjy | ztbd/dtldjxk | ztbd/xxzx | ztbd/jzdc | ztbd/xqzw\_wywd | - - #### 媒体武大 - - | 媒体武大 | - | -------- | - | mtwd | - - #### 珞珈人物 - - | 珞珈人物 | - | -------- | - | ljrw | - - #### 视听空间 - - | 视听空间 | 珞珈影像 | 武大视频 | - | --------- | --------- | --------- | - | stkj/ljyx | stkj/ljyx | stkj/wdsp | - </details> -</Route> +| 公告类型 | 学院新闻 | 学术交流 | 通知公告 | 科研进展 | +| -------- | -------- | -------- | -------- | -------- | +| 参数 | 0 | 1 | 2 | 3 | ### 研究生院 {#wu-han-da-xue-yan-jiu-sheng-yuan} -<Route author="Delreyaa" example="/whu/gs/0" path="/whu/gs/:type?" paramsDesc={['分类,默认为 `0`,具体参数见下表']}> - | 公告类型 | 新闻动态 | 学术探索 | 院系风采 | 通知 (全部) | 通知 (招生) | 通知 (培养) | 通知 (学位) | 通知 (质量与专业学位) | 通知 (综合) | - | -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- | - | 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -</Route> +<Route namespace="whu" data={{"path":"/gs/:type?","categories":["university"],"example":"/whu/gs/0","parameters":{"type":"分类,默认为 `0`,具体参数见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.whu.edu.cn/index.htm","gs.whu.edu.cn/"],"target":"/gs"},"name":"研究生院","maintainers":["Delreyaa"],"url":"gs.whu.edu.cn/index.htm","description":"| 公告类型 | 新闻动态 | 学术探索 | 院系风采 | 通知 (全部) | 通知 (招生) | 通知 (培养) | 通知 (学位) | 通知 (质量与专业学位) | 通知 (综合) |\n | -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- |\n | 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |","location":"gs/index.ts"}} /> -### 弘毅学堂 {#wu-han-da-xue-hong-yi-xue-tang} - -<Route author="nczitzk" example="/whu/hyxt" path="/whu/hyxt/:category?" paramsDesc={['分类,见下表,默认为 `xwdt`, 即 **新闻动态**']} radar="1" anticrawler="1"> - | 新闻动态 | 通知公告 | 学子风采 | 学术论坛 | - | -------- | -------- | -------- | -------- | - | xwdt | tzgg | xzfc | xslt | - - <details> - <summary>更多分类</summary> - - #### 学堂简报 - - | 学堂简报 | - | -------- | - | 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 | - </details> -</Route> +| 公告类型 | 新闻动态 | 学术探索 | 院系风采 | 通知 (全部) | 通知 (招生) | 通知 (培养) | 通知 (学位) | 通知 (质量与专业学位) | 通知 (综合) | +| -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- | +| 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ## 武汉纺织大学 {#wu-han-fang-zhi-da-xue} -### 信息门户公告 {#wu-han-fang-zhi-da-xue-xin-xi-men-hu-gong-gao} - -<Route author="loyio" example="/wtu/2" path="/wtu/:type" paramsDesc={['公告类型,详见表格']} anticrawler="1"> - | 公告类型 | 通知公告 | 教务信息 | 科研动态 | - | -------- | -------- | -------- | -------- | - | 参数 | 1 | 2 | 3 | -</Route> - ### 就业信息 {#wu-han-fang-zhi-da-xue-jiu-ye-xin-xi} -<Route author="ticks-tan" example="/wtu/job/xxtz" path="/wtu/job/:type" paramsDesc={['信息类型']}> - | 信息类型 | 消息通知 | 通知公告 | 新闻快递 | - | -------- | -------- | -------- | -------- | - | 参数 | xxtz | tzgg | xwkd | -</Route> +<Route namespace="wtu" data={{"path":"/job/:type","categories":["university"],"example":"/wtu/job/xxtz","parameters":{"type":"信息类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wtu.91wllm.com/news/index/tag/:type"]},"name":"就业信息","maintainers":["ticks-tan"],"description":"| 信息类型 | 消息通知 | 通知公告 | 新闻快递 |\n | -------- | -------- | -------- | -------- |\n | 参数 | xxtz | tzgg | xwkd |","location":"job.ts"}} /> + +| 信息类型 | 消息通知 | 通知公告 | 新闻快递 | +| -------- | -------- | -------- | -------- | +| 参数 | xxtz | tzgg | xwkd | + +### 信息门户公告 {#wu-han-fang-zhi-da-xue-xin-xi-men-hu-gong-gao} + +<Route namespace="wtu" data={{"path":"/:type","categories":["university"],"example":"/wtu/2","parameters":{"type":"公告类型,详见表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"信息门户公告","maintainers":["loyio"],"description":"| 公告类型 | 通知公告 | 教务信息 | 科研动态 |\n | -------- | -------- | -------- | -------- |\n | 参数 | 1 | 2 | 3 |","location":"index.ts"}} /> + +| 公告类型 | 通知公告 | 教务信息 | 科研动态 | +| -------- | -------- | -------- | -------- | +| 参数 | 1 | 2 | 3 | ## 西安财经大学 {#xi-an-cai-jing-da-xue} ### 教务处 {#xi-an-cai-jing-da-xue-jiao-wu-chu} -<Route author="shaokeyibb" example="/xaufe/jiaowu/tzgg" path="/xaufe/jiaowu/:category?" paramsDesc={['分类,默认为通知公告']} radar="1" notOperational="1"> - | 通知公告 | - | :------: | - | tzgg | -</Route> +<Route namespace="xaufe" data={{"path":"/jiaowu/:category?","categories":["university"],"example":"/xaufe/jiaowu/tzgg","parameters":{"category":"分类,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["shaokeyibb"],"description":"| 通知公告 |\n | :------: |\n | tzgg |","location":"jiaowu.ts"}} /> + +| 通知公告 | +| :------: | +| tzgg | ## 西安电子科技大学 {#xi-an-dian-zi-ke-ji-da-xue} ### 教务处 {#xi-an-dian-zi-ke-ji-da-xue-jiao-wu-chu} -<Route author="ShadowySpirits" example="/xidian/jwc/tzgg" path="/xidian/jwc/:category?" paramsDesc={['通知类别,默认为通知公告']} radar="1"> - | 教学信息 | 教学研究 | 实践教学 | 质量监控 | 通知公告 | - | :------: | :------: | :------: | :------: | :------: | - | jxxx | jxyj | sjjx | zljk | tzgg | -</Route> +<Route namespace="xidian" data={{"path":"/jwc/:category?","categories":["university"],"example":"/xidian/jwc/tzgg","parameters":{"category":"通知类别,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["ShadowySpirits"],"description":"| 教学信息 | 教学研究 | 实践教学 | 质量监控 | 通知公告 |\n | :------: | :------: | :------: | :------: | :------: |\n | jxxx | jxyj | sjjx | zljk | tzgg |","location":"jwc.ts"}} /> + +| 教学信息 | 教学研究 | 实践教学 | 质量监控 | 通知公告 | +| :------: | :------: | :------: | :------: | :------: | +| jxxx | jxyj | sjjx | zljk | tzgg | ## 西安交通大学 {#xi-an-jiao-tong-da-xue} -### 教务处 {#xi-an-jiao-tong-da-xue-jiao-wu-chu} +### 第二附属医院新闻 {#xi-an-jiao-tong-da-xue-di-er-fu-shu-yi-yuan-xin-wen} -<Route author="hoilc" example="/xjtu/dean/jxxx/xytz/ksap" path="/xjtu/dean/:subpath+" paramsDesc={['栏目路径,支持多级,不包括末尾的`.htm`']}> - :::tip - 支持`http://dean.xjtu.edu.cn/`下所有**有文章列表**的栏目, +<Route namespace="xjtu" data={{"path":"/2yuan/news/:id?","categories":["university"],"example":"/xjtu/2yuan/news","parameters":{"id":"编号,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"第二附属医院新闻","maintainers":["nczitzk"],"description":"| 分类 | 编号 |\n | -------- | ---- |\n | 通知公告 | 110 |\n | 综合新闻 | 6 |\n | 科室动态 | 8 |\n | 教学动态 | 45 |\n | 科研动态 | 51 |\n | 护理动态 | 57 |\n | 党群活动 | 63 |\n | 外事活动 | 13 |\n | 媒体二院 | 14 |\n | 理论政策 | 16 |","location":"2yuan/news.ts"}} /> - 例如`http://dean.xjtu.edu.cn/gzlc.htm`,则`subpath`为`gzlc` - - 又例`http://dean.xjtu.edu.cn/jxxx/xytz.htm`,则`subpath`为`jxxx/xytz` - ::: -</Route> - -### 国际处通知 {#xi-an-jiao-tong-da-xue-guo-ji-chu-tong-zhi} - -<Route author="guitaoliu" example="/xjtu/international/hzjl" path="/xjtu/international/:subpath+" paramsDesc={['栏目路径,支持多级,不包括末尾的`.htm`']} /> - -### 研究生院通知公告 {#xi-an-jiao-tong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} - -<Route author="nczitzk" example="/xjtu/gs/tzgg" path="/xjtu/gs/tzgg" /> - -### 就业创业中心 {#xi-an-jiao-tong-da-xue-jiu-ye-chuang-ye-zhong-xin} - -<Route author="DylanXie123" example="/xjtu/job/zxgg" path="/xjtu/job/:subpath?" paramsDesc={['栏目类型,默认请求`zxgg`,详见下方表格']}> - 栏目类型 - - | 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 | - | -------- | ------ | -------- | -------- | -------- | -------- | - | zxgg | xds | zddw | gjzz | cxcy | jysx | -</Route> +| 分类 | 编号 | +| -------- | ---- | +| 通知公告 | 110 | +| 综合新闻 | 6 | +| 科室动态 | 8 | +| 教学动态 | 45 | +| 科研动态 | 51 | +| 护理动态 | 57 | +| 党群活动 | 63 | +| 外事活动 | 13 | +| 媒体二院 | 14 | +| 理论政策 | 16 | ### 电气学院 {#xi-an-jiao-tong-da-xue-dian-qi-xue-yuan} -<Route author="DylanXie123" example="/xjtu/ee/1114" path="/xjtu/ee/:id?" paramsDesc={['栏目id,默认请求`1124`,可在 URL 中找到']} /> +<Route namespace="xjtu" data={{"path":"/ee/:id?","categories":["university"],"example":"/xjtu/ee/1114","parameters":{"id":"栏目id,默认请求`1124`,可在 URL 中找到"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ee.xjtu.edu.cn/"]},"name":"电气学院","maintainers":["DylanXie123"],"url":"ee.xjtu.edu.cn/","location":"ee.ts"}} /> + +### 就业创业中心 {#xi-an-jiao-tong-da-xue-jiu-ye-chuang-ye-zhong-xin} + +<Route namespace="xjtu" data={{"path":"/job/:subpath?","categories":["university"],"example":"/xjtu/job/zxgg","parameters":{"subpath":"栏目类型,默认请求`zxgg`,详见下方表格"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"就业创业中心","maintainers":["DylanXie123"],"description":"栏目类型\n\n | 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 |\n | -------- | ------ | -------- | -------- | -------- | -------- |\n | zxgg | xds | zddw | gjzz | cxcy | jysx |","location":"job.ts"}} /> + +栏目类型 + +| 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 | +| -------- | ------ | -------- | -------- | -------- | -------- | +| zxgg | xds | zddw | gjzz | cxcy | jysx | ### 科技在线 {#xi-an-jiao-tong-da-xue-ke-ji-zai-xian} -<Route author="nczitzk" example="/xjtu/std/zytz" path="/xjtu/std/:category?" paramsDesc={['分类,见下表,默认为通知公告']} notOperational="1"> - | 通知公告 | 重要通知 | 项目申报 | 成果申报 | 信息快讯 | - | -------- | -------- | -------- | -------- | -------- | - | | zytz | xmsb | cgsb | xxkx | -</Route> +<Route namespace="xjtu" data={{"path":"/std/:category?","categories":["university"],"example":"/xjtu/std/zytz","parameters":{"category":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"科技在线","maintainers":["nczitzk"],"description":"| 通知公告 | 重要通知 | 项目申报 | 成果申报 | 信息快讯 |\n | -------- | -------- | -------- | -------- | -------- |\n | | zytz | xmsb | cgsb | xxkx |","location":"std.ts"}} /> -### 第一附属医院新闻 {#xi-an-jiao-tong-da-xue-di-yi-fu-shu-yi-yuan-xin-wen} +| 通知公告 | 重要通知 | 项目申报 | 成果申报 | 信息快讯 | +| -------- | -------- | -------- | -------- | -------- | +| | zytz | xmsb | cgsb | xxkx | -<Route author="TonyRL" example="/xjtu/dyyy/index/xsxx" path="/xjtu/dyyy/:path+" paramsDesc={['栏目路径,支持多级,不包括末尾的`.htm`']} radar="1" notOperational="1" /> +### 研究生院通知公告 {#xi-an-jiao-tong-da-xue-yan-jiu-sheng-yuan-tong-zhi-gong-gao} -### 第二附属医院新闻 {#xi-an-jiao-tong-da-xue-di-er-fu-shu-yi-yuan-xin-wen} - -<Route author="nczitzk" example="/xjtu/2yuan/news" path="/xjtu/2yuan/news/:id?" paramsDesc={['编号,见下表,默认为通知公告']} notOperational="1"> - | 分类 | 编号 | - | -------- | ---- | - | 通知公告 | 110 | - | 综合新闻 | 6 | - | 科室动态 | 8 | - | 教学动态 | 45 | - | 科研动态 | 51 | - | 护理动态 | 57 | - | 党群活动 | 63 | - | 外事活动 | 13 | - | 媒体二院 | 14 | - | 理论政策 | 16 | -</Route> +<Route namespace="xjtu" data={{"path":"/gs/tzgg","categories":["university"],"example":"/xjtu/gs/tzgg","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gs.xjtu.edu.cn/"]},"name":"研究生院通知公告","maintainers":["nczitzk"],"url":"gs.xjtu.edu.cn/","location":"gs/tzgg.ts"}} /> ## 西安理工大学 {#xi-an-li-gong-da-xue} -### 学校主页 {#xi-an-li-gong-da-xue-xue-xiao-zhu-ye} - -<Route author="mocusez" example="/xaut/index/tzgg" path="/xaut/index/:category?" paramsDesc={['通知类别,默认为通知公告']} radar="1"> - | 通知公告 | 校园要闻 | 媒体播报 | 学术活动 | - | :------: | :------: | :------: | :------: | - | tzgg | xyyw | mtbd | xshd | -</Route> - ### 教务处 {#xi-an-li-gong-da-xue-jiao-wu-chu} -<Route author="mocusez" example="/xaut/jwc/tzgg" path="/xaut/jwc/:category?" paramsDesc={['通知类别,默认为通知公告']} radar="1"> - :::warning - 有些内容需使用校园网或 VPN 访问知行网获取 - ::: +<Route namespace="xaut" data={{"path":"/jwc/:category?","categories":["university"],"example":"/xaut/jwc/tzgg","parameters":{"category":"通知类别,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["mocusez"],"description":":::warning\n 有些内容需使用校园网或 VPN 访问知行网获取\n :::\n\n | 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 |\n | :------: | :------: | :------: | :----------: | :----------: | :------: | :------: |\n | tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs |","location":"jwc.ts"}} /> - | 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 | - | :------: | :------: | :------: | :----------: | :----------: | :------: | :------: | - | tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs | -</Route> +:::warning +有些内容需使用校园网或 VPN 访问知行网获取 +::: + +| 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 | +| :------: | :------: | :------: | :----------: | :----------: | :------: | :------: | +| tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs | ### 人事处 {#xi-an-li-gong-da-xue-ren-shi-chu} -<Route author="light0926 mocusez" example="/xaut/rsc/tzgg" path="/xaut/rsc/:category?" paramsDesc={['通知类别,默认为通知公告']} radar="1"> - :::warning - 有些内容指向外部链接,目前只提供这些链接,不提供具体内容,去除 jwc 和 index 的修改 - ::: +<Route namespace="xaut" data={{"path":"/rsc/:category?","categories":["university"],"example":"/xaut/rsc/tzgg","parameters":{"category":"通知类别,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"人事处","maintainers":["mocusez","light0926"],"description":":::warning\n 有些内容指向外部链接,目前只提供这些链接,不提供具体内容,去除 jwc 和 index 的修改\n :::\n\n | 通知公告 | 工作动态 |\n | :------: | :------: |\n | tzgg | gzdt |","location":"rsc.ts"}} /> - | 通知公告 | 工作动态 | - | :------: | :------: | - | tzgg | gzdt | -</Route> +:::warning +有些内容指向外部链接,目前只提供这些链接,不提供具体内容,去除 jwc 和 index 的修改 +::: -## 西北工业大学 {#xi-bei-gong-ye-da-xue} +| 通知公告 | 工作动态 | +| :------: | :------: | +| tzgg | gzdt | -### 翱翔门户 {#xi-bei-gong-ye-da-xue-ao-xiang-men-hu} +### 学校主页 {#xi-an-li-gong-da-xue-xue-xiao-zhu-ye} -<Route author="WhoIsSure" example="/nwpu/10000" path="/nwpu/:column" paramsDesc={['栏目ID']} notOperational="1"> - 栏目 ID +<Route namespace="xaut" data={{"path":"/index/:category?","categories":["university"],"example":"/xaut/index/tzgg","parameters":{"category":"通知类别,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"学校主页","maintainers":["mocusez"],"description":"| 通知公告 | 校园要闻 | 媒体播报 | 学术活动 |\n | :------: | :------: | :------: | :------: |\n | tzgg | xyyw | mtbd | xshd |","location":"index.ts"}} /> - | 咨询中心 | 通知公告 | 校内新闻 | 校务公开 | 历史文件查询 | 教育教学 | 学术交流 | 学院动态 | 部门动态 | - | -------- | -------- | -------- | -------- | ------------ | -------- | -------- | -------- | -------- | - | 10000 | 10001 | 10002 | 10003 | 10004 | 10005 | 10006 | 10007 | 10008 | -</Route> +| 通知公告 | 校园要闻 | 媒体播报 | 学术活动 | +| :------: | :------: | :------: | :------: | +| tzgg | xyyw | mtbd | xshd | ## 西北农林科技大学 {#xi-bei-nong-lin-ke-ji-da-xue} ### 校园要闻 {#xi-bei-nong-lin-ke-ji-da-xue-xiao-yuan-yao-wen} -<Route author="dingyx99 karinido" example="/nwafu/lib" path="/nwafu/:type?" paramsDesc={['默认为 `jiaowu`']} notOperational="1"> - 通知类别 +<Route namespace="nwafu" data={{"path":"/:type?","categories":["university"],"example":"/nwafu/lib","parameters":{"type":"默认为 `jiaowu`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"校园要闻","maintainers":["karinido"],"description":"通知类别\n\n | 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 |\n | ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ |\n | lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm |","location":"all.ts"}} /> - | 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 | - | ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ | - | lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm | -</Route> +通知类别 -## 西南财经大学 {#xi-nan-cai-jing-da-xue} - -### 经济信息工程学院 {#xi-nan-cai-jing-da-xue-jing-ji-xin-xi-gong-cheng-xue-yuan} - -<Route author="Hivol" example="/swufe/seie/tzgg" path="/swufe/seie/:type?" paramsDesc={['分类名(默认为tzgg)']} notOperational="1"> - | 学院新闻 | 通知公告 | - | -------- | -------- | - | xyxw | tzgg | -</Route> +| 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 | +| ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ | +| lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm | ## 西南交通大学 {#xi-nan-jiao-tong-da-xue} -### 教务网 {#xi-nan-jiao-tong-da-xue-jiao-wu-wang} - -<Route author="mobyw" example="/swjtu/jwc" path="/swjtu/jwc" anticrawler="1" /> - -### 扬华素质网 {#xi-nan-jiao-tong-da-xue-yang-hua-su-zhi-wang} - -<Route author="mobyw" example="/swjtu/xg/tzgg" path="/swjtu/xg/:code?" paramsDesc={['栏目(默认为tzgg)']} anticrawler="1"> - 栏目列表: - - | 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 | - | -------- | -------- | -------- | -------- | - | tzgg | yhxw | dcxy | xgzj | -</Route> - -### 就业招聘信息 {#xi-nan-jiao-tong-da-xue-jiu-ye-zhao-pin-xin-xi} - -<Route author="qizidog" example="/swjtu/jyzpxx" path="/swjtu/jyzpxx" anticrawler="1" /> - ### 交通运输与物流学院 {#xi-nan-jiao-tong-da-xue-jiao-tong-yun-shu-yu-wu-liu-xue-yuan} +<Route namespace="swjtu" data={{"path":"/jtys/yjs","categories":["university"],"example":"/swjtu/jtys/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"交通运输与物流学院","maintainers":["qizidog"],"description":"#### 研究生通知 {#xi-nan-jiao-tong-da-xue-jiao-tong-yun-shu-yu-wu-liu-xue-yuan-yan-jiu-sheng-tong-zhi}","location":"jtys/yjs.ts"}} /> + #### 研究生通知 {#xi-nan-jiao-tong-da-xue-jiao-tong-yun-shu-yu-wu-liu-xue-yuan-yan-jiu-sheng-tong-zhi} -<Route author="zoenglinghou qizidog" example="/swjtu/jtys/yjs" path="/swjtu/jtys/yjs" anticrawler="1" /> +### 教务网 {#xi-nan-jiao-tong-da-xue-jiao-wu-wang} -## 西南科技大学 {#xi-nan-ke-ji-da-xue} +<Route namespace="swjtu" data={{"path":"/jwc","categories":["university"],"example":"/swjtu/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.swjtu.edu.cn/vatuu/WebAction","jwc.swjtu.edu.cn/"]},"name":"教务网","maintainers":["mobyw"],"url":"jwc.swjtu.edu.cn/vatuu/WebAction","location":"jwc.ts"}} /> -### 教务处新闻 {#xi-nan-ke-ji-da-xue-jiao-wu-chu-xin-wen} +### 就业招聘信息 {#xi-nan-jiao-tong-da-xue-jiu-ye-zhao-pin-xin-xi} -<Route author="lengthmin" example="/swust/jwc/news" path="/swust/jwc/news" /> +<Route namespace="swjtu" data={{"path":"/jyzpxx","categories":["university"],"example":"/swjtu/jyzpxx","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jiuye.swjtu.edu.cn/career","jiuye.swjtu.edu.cn/"]},"name":"就业招聘信息","maintainers":["qizidog"],"url":"jiuye.swjtu.edu.cn/career","location":"jyzpxx.ts"}} /> -### 教务处通知 {#xi-nan-ke-ji-da-xue-jiao-wu-chu-tong-zhi} +### 扬华素质网 {#xi-nan-jiao-tong-da-xue-yang-hua-su-zhi-wang} -<Route author="lengthmin" example="/swust/jwc/notice/1" path="/swust/jwc/notice/:type?" paramsDesc={['分区 type,缺省为 1,详见下方表格']}> - | 创新创业教育 | 学生学业 | 建设与改革 | 教学质量保障 | 教学运行 | 教师教学 | - | ------------ | -------- | ---------- | ------------ | -------- | -------- | - | 1 | 2 | 3 | 4 | 5 | 6 | -</Route> +<Route namespace="swjtu" data={{"path":"/xg/:code?","categories":["university"],"example":"/swjtu/xg/tzgg","parameters":{"code":"栏目(默认为tzgg)"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["xg.swjtu.edu.cn/web/Home/PushNewsList","xg.swjtu.edu.cn/web/Home/NewsList","xg.swjtu.edu.cn/web/Home/ColourfulCollegeNewsList","xg.swjtu.edu.cn/web/Publicity/List","xg.swjtu.edu.cn/"],"target":"/xg"},"name":"扬华素质网","maintainers":["mobyw"],"url":"xg.swjtu.edu.cn/web/Home/PushNewsList","description":"栏目列表:\n\n | 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 |\n | -------- | -------- | -------- | -------- |\n | tzgg | yhxw | dcxy | xgzj |","location":"xg.ts"}} /> -### 计科学院通知 {#xi-nan-ke-ji-da-xue-ji-ke-xue-yuan-tong-zhi} +栏目列表: -<Route author="lengthmin" example="/swust/cs/1" path="/swust/cs/:type?" paramsDesc={['分区 type,缺省为 1,详见下方表格']} notOperational="1"> - | 新闻动态 | 学术动态 | 通知公告 | 教研动态 | - | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | -</Route> +| 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 | +| -------- | -------- | -------- | -------- | +| tzgg | yhxw | dcxy | xgzj | ## 西南石油大学 {#xi-nan-shi-you-da-xue} ### 办公网 {#xi-nan-shi-you-da-xue-ban-gong-wang} -<Route author="CYTMWIA" example="/swpu/bgw/zytzgg" path="/swpu/bgw/:code" paramsDesc={['栏目代码']} anticrawler="1"> - | 栏目 | 重要通知公告 | 部门通知公告 | 本周活动 | 学术报告 | - | ---- | ------------ | ------------ | -------- | -------- | - | 代码 | zytzgg | bmtzgg | bzhd | xsbg | -</Route> +<Route namespace="swpu" data={{"path":"/bgw/:code","categories":["university"],"example":"/swpu/bgw/zytzgg","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"办公网","maintainers":["CYTMWIA"],"url":"swpu.edu.cn/","description":"| 栏目 | 重要通知公告 | 部门通知公告 | 本周活动 | 学术报告 |\n | ---- | ------------ | ------------ | -------- | -------- |\n | 代码 | zytzgg | bmtzgg | bzhd | xsbg |","location":"bgw.ts"}} /> -### 教务处 {#xi-nan-shi-you-da-xue-jiao-wu-chu} - -<Route author="CYTMWIA" example="/swpu/dean/tzgg" path="/swpu/dean/:code" paramsDesc={['栏目代码']} anticrawler="1"> - | 栏目 | 通知公告 | 新闻报道 | 视点声音 | - | ---- | -------- | -------- | -------- | - | 代码 | tzgg | xwbd | sdsy | -</Route> - -### 计算机科学学院 {#xi-nan-shi-you-da-xue-ji-suan-ji-ke-xue-xue-yuan} - -<Route author="CYTMWIA" example="/swpu/scs/tzgg" path="/swpu/scs/:code" paramsDesc={['栏目代码']} anticrawler="1"> - | 栏目 | 通知公告 | 新闻速递 | - | ---- | -------- | -------- | - | 代码 | tzgg | xwsd | -</Route> - -### 电气信息学院 {#xi-nan-shi-you-da-xue-dian-qi-xin-xi-xue-yuan} - -<Route author="CYTMWIA" example="/swpu/dxy/1156" path="/swpu/dxy/:code" paramsDesc={['栏目代码']} anticrawler="1"> - | 栏目 | 学院新闻 | 学院通知 | - | ---- | -------- | -------- | - | 代码 | 1122 | 1156 | -</Route> +| 栏目 | 重要通知公告 | 部门通知公告 | 本周活动 | 学术报告 | +| ---- | ------------ | ------------ | -------- | -------- | +| 代码 | zytzgg | bmtzgg | bzhd | xsbg | ### 财经学院 {#xi-nan-shi-you-da-xue-cai-jing-xue-yuan} -<Route author="RiverTwilight" example="/swpu/cjxy/xyxw" path="/swpu/cjxy/:code" paramsDesc={['栏目代码']} notOperational="1"> - | 栏目 | 学院新闻 | 学院通知 | - | ---- | -------- | -------- | - | 代码 | xyxw | xytz | -</Route> +<Route namespace="swpu" data={{"path":"/cjxy/:code","categories":["university"],"example":"/swpu/cjxy/xyxw","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"财经学院","maintainers":["RiverTwilight"],"url":"swpu.edu.cn/","description":"| 栏目 | 学院新闻 | 学院通知 |\n | ---- | -------- | -------- |\n | 代码 | xyxw | xytz |","location":"cjxy.ts"}} /> + +| 栏目 | 学院新闻 | 学院通知 | +| ---- | -------- | -------- | +| 代码 | xyxw | xytz | + +### 电气信息学院 {#xi-nan-shi-you-da-xue-dian-qi-xin-xi-xue-yuan} + +<Route namespace="swpu" data={{"path":"/dxy/:code","categories":["university"],"example":"/swpu/dxy/1156","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"电气信息学院","maintainers":["CYTMWIA"],"url":"swpu.edu.cn/","description":"| 栏目 | 学院新闻 | 学院通知 |\n | ---- | -------- | -------- |\n | 代码 | 1122 | 1156 |","location":"dxy.ts"}} /> + +| 栏目 | 学院新闻 | 学院通知 | +| ---- | -------- | -------- | +| 代码 | 1122 | 1156 | + +### 计算机科学学院 {#xi-nan-shi-you-da-xue-ji-suan-ji-ke-xue-xue-yuan} + +<Route namespace="swpu" data={{"path":"/scs/:code","categories":["university"],"example":"/swpu/scs/tzgg","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"计算机科学学院","maintainers":["CYTMWIA"],"url":"swpu.edu.cn/","description":"| 栏目 | 通知公告 | 新闻速递 |\n | ---- | -------- | -------- |\n | 代码 | tzgg | xwsd |","location":"scs.ts"}} /> + +| 栏目 | 通知公告 | 新闻速递 | +| ---- | -------- | -------- | +| 代码 | tzgg | xwsd | + +### 教务处 {#xi-nan-shi-you-da-xue-jiao-wu-chu} + +<Route namespace="swpu" data={{"path":"/dean/:code","categories":["university"],"example":"/swpu/dean/tzgg","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"教务处","maintainers":["CYTMWIA"],"url":"swpu.edu.cn/","description":"| 栏目 | 通知公告 | 新闻报道 | 视点声音 |\n | ---- | -------- | -------- | -------- |\n | 代码 | tzgg | xwbd | sdsy |","location":"dean.ts"}} /> + +| 栏目 | 通知公告 | 新闻报道 | 视点声音 | +| ---- | -------- | -------- | -------- | +| 代码 | tzgg | xwbd | sdsy | ### 信息学院 {#xi-nan-shi-you-da-xue-xin-xi-xue-yuan} -<Route author="RiverTwilight" example="/swpu/is/xyxw" path="/swpu/is/:code" paramsDesc={['栏目代码']} notOperational="1"> - | 栏目 | 学院新闻 | 通知公告 | 教育教学 | 学生工作 | 招生就业 | - | ---- | -------- | -------- | -------- | -------- | -------- | - | 代码 | xyxw | tzgg | jyjx | xsgz | zsjy | -</Route> +<Route namespace="swpu" data={{"path":"/is/:code","categories":["university"],"example":"/swpu/is/xyxw","parameters":{"code":"栏目代码"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["swpu.edu.cn/"],"target":""},"name":"信息学院","maintainers":["RiverTwilight"],"url":"swpu.edu.cn/","description":"| 栏目 | 学院新闻 | 通知公告 | 教育教学 | 学生工作 | 招生就业 |\n | ---- | -------- | -------- | -------- | -------- | -------- |\n | 代码 | xyxw | tzgg | jyjx | xsgz | zsjy |","location":"is.ts"}} /> + +| 栏目 | 学院新闻 | 通知公告 | 教育教学 | 学生工作 | 招生就业 | +| ---- | -------- | -------- | -------- | -------- | -------- | +| 代码 | xyxw | tzgg | jyjx | xsgz | zsjy | ## 新乡医学院三全学院 {#xin-xiang-yi-xue-yuan-san-quan-xue-yuan} ### 官网信息 {#xin-xiang-yi-xue-yuan-san-quan-xue-yuan-guan-wang-xin-xi} -<Route author="nyaShine" example="/sqmc/www/3157" path="/sqmc/www/:category?" paramsDesc={['分类ID,默认为`3157`']} radar="1"> - | 学校要闻 | 通知 | 学术讲座 | 基层风采书院 | 基层风采院系 | 外媒报道 | 三全学院报 | - | -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- | - | 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 | -</Route> +<Route namespace="sqmc" data={{"path":"/www/:category?","categories":["university"],"example":"/sqmc/www/3157","parameters":{"category":"分类ID,默认为`3157`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sqmc.edu.cn/:category/list.htm"]},"name":"官网信息","maintainers":["nyaShine"],"description":"| 学校要闻 | 通知 | 学术讲座 | 基层风采书院 | 基层风采院系 | 外媒报道 | 三全学院报 |\n | -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- |\n | 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 |","location":"www.ts"}} /> -## 信阳师范学院 {#xin-yang-shi-fan-xue-yuan} - -### 高等教育自学考试办公室 {#xin-yang-shi-fan-xue-yuan-gao-deng-jiao-yu-zi-xue-kao-shi-ban-gong-shi} - -<Route author="VxRain" example="/xynu/zkb/zkzx" path="/xynu/zkb/:category" paramsDesc={['分类ID']}> - 分类 ID(如果请求的分类 ID 在不存在下表中,默认请求`zkzx`) - - | 主考专业 | 规章制度 | 实践课程 | 毕业论文 | 学士学位 | 自考毕业 | 自考教材 | 自考指南 | 联系我们 | 自考资讯 | 报名指南 | 日程安排 | 新生入门 | 转考免考 | 复习资料 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | zkzy | gzzd | sjkc | bylw | xsxw | zkby | zkjc | zkzn | lxwm | zkzx | bmzn | rcap | xsrm | zkmk | fxzl | -</Route> - -## 扬州大学 {#yang-zhou-da-xue} - -### 官网消息 {#yang-zhou-da-xue-guan-wang-xiao-xi} - -<Route author="LogicJake" example="/yzu/home/xxyw" path="/yzu/home/:type" paramsDesc={['分类名']} notOperational="1"> - | 学校要闻 | 校园新闻 | 信息公告 | 学术活动 | 媒体扬大 | - | -------- | -------- | -------- | -------- | -------- | - | xxyw | xyxw | xxgg | xshd | mtyd | -</Route> - -### 研究生招生 {#yang-zhou-da-xue-yan-jiu-sheng-zhao-sheng} - -<Route author="LogicJake" example="/yzu/yjszs/tzgg" path="/yzu/yjszs/:type" paramsDesc={['分类名']} notOperational="1"> - | 通知公告 | 博士招生 | 硕士招生 | - | -------- | -------- | -------- | - | tzgg | bszs | sszs | -</Route> - -## 云南大学 {#yun-nan-da-xue} - -### 官网消息通告 {#yun-nan-da-xue-guan-wang-xiao-xi-tong-gao} - -<Route author="hzcheney" example="/ynu/home" path="/ynu/home" notOperational="1" /> - -### 教务处主要通知 {#yun-nan-da-xue-jiao-wu-chu-zhu-yao-tong-zhi} - -<Route author="hzcheney" example="/ynu/jwc/1" path="/ynu/jwc/:category" paramsDesc={['教务处通知分类']} anticrawler="1"> - | 教务科 | 学籍科 | 教学研究科 | 实践科学科 | - | ------ | ------ | ---------- | ---------- | - | 1 | 2 | 3 | 4 | -</Route> - -### 研究生院重要通知(置顶消息) {#yun-nan-da-xue-yan-jiu-sheng-yuan-zhong-yao-tong-zhi-zhi-ding-xiao-xi} - -<Route author="hzcheney" example="/ynu/grs/zytz" path="/ynu/grs/zytz" notOperational="1" /> - -### 研究生院其他通知 {#yun-nan-da-xue-yan-jiu-sheng-yuan-qi-ta-tong-zhi} - -<Route author="hzcheney" example="/ynu/grs/qttz/2" path="/ynu/grs/qttz/:category" paramsDesc={['研究生院通知分类']} anticrawler="1"> - | 招生工作 | 研究生培养 | 质量管理 | 学位工作 | 综合办公室 | 相关下载 | - | -------- | ---------- | -------- | -------- | ---------- | -------- | - | 1 | 2 | 3 | 4 | 5 | 6 | -</Route> - -## 云南师范大学 {#yun-nan-shi-fan-da-xue} - -### 继续教育学院 {#yun-nan-shi-fan-da-xue-ji-xu-jiao-yu-xue-yuan} - -#### 新闻 {#yun-nan-shi-fan-da-xue-ji-xu-jiao-yu-xue-yuan-xin-wen} - -<Route author="SettingDust" example="/ynnu/edu/news" path="/ynnu/edu/news" notOperational="1" /> - -## 长江大学 {#chang-jiang-da-xue} - -### 动物科学学院 {#chang-jiang-da-xue-dong-wu-ke-xue-xue-yuan} - -<Route author="nczitzk" example="/yangtzeu/dongke" path="/yangtzeu/dongke/:path+" paramsDesc={['路径,默认为学院新闻']}> - :::tip - 若订阅 [院情总览 - 通知公告](https://dongke.yangtzeu.edu.cn/yqzl/tzgg.htm),网址为 `https://dongke.yangtzeu.edu.cn/yqzl/tzgg.htm`。截取 `https://dongke.yangtzeu.edu.cn` 到末尾 `.htm` 的部分 `/yqzl/tzgg` 作为参数,此时路由为 [`/yangtzeu/dongke/yqzl/tzgg`](https://rsshub.app/yangtzeu/dongke/yqzl/tzgg)。 - - 若订阅子分类 [学生工作](https://dongke.yangtzeu.edu.cn/xsgz.htm),网址为 `https://dongke.yangtzeu.edu.cn/xsgz.htm`。截取 `https://dongke.yangtzeu.edu.cn` 到末尾 `.htm` 的部分 `/xsgz` 作为参数,此时路由为 [`/yangtzeu/dongke/xsgz`](https://rsshub.app/yangtzeu/dongke/xsgz)。 - ::: -</Route> +| 学校要闻 | 通知 | 学术讲座 | 基层风采书院 | 基层风采院系 | 外媒报道 | 三全学院报 | +| -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- | +| 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 | ## 浙江大学 {#zhe-jiang-da-xue} -### 普通栏目 如学术 / 图片 / 新闻等 {#zhe-jiang-da-xue-pu-tong-lan-mu-ru-xue-shu-tu-pian-xin-wen-deng} +### Unknown {#zhe-jiang-da-xue-unknown} -<Route author="Jeason0228" example="/zju/list/xs" path="/zju/list/:type" paramsDesc={['`xs`为学术,`xw`为新闻,`5461`是图片新闻,`578`是浙大报道,具体参数参考左侧的菜单']} /> - -### 研究生院 {#zhe-jiang-da-xue-yan-jiu-sheng-yuan} - -<Route author="Caicailiushui" example="/zju/grs/1" path="/zju/grs/:type" paramsDesc={['分类,见下表']}> - | 全部公告 | 教学管理 | 各类资助 | 学科建设 | 海外交流 | - | -------- | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="zju" data={{"path":"/cst/:type","categories":["university"],"example":"/zju/cst/0","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"Unknown","maintainers":["yonvenne","zwithz"],"location":"cst/index.ts"}} /> ### 就业服务平台 {#zhe-jiang-da-xue-jiu-ye-fu-wu-ping-tai} -<Route author="Caicailiushui" example="/zju/career/1" path="/zju/career/:type" paramsDesc={['分类,见下表']}> - | 新闻动态 | 活动通知 | 学院通知 | 告示通知 | - | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | -</Route> +<Route namespace="zju" data={{"path":"/career/:type","categories":["university"],"example":"/zju/career/1","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"就业服务平台","maintainers":["Caicailiushui"],"description":"| 新闻动态 | 活动通知 | 学院通知 | 告示通知 |\n | -------- | -------- | -------- | -------- |\n | 1 | 2 | 3 | 4 |","location":"career/index.ts"}} /> -### 物理学院 {#zhe-jiang-da-xue-wu-li-xue-yuan} +| 新闻动态 | 活动通知 | 学院通知 | 告示通知 | +| -------- | -------- | -------- | -------- | +| 1 | 2 | 3 | 4 | -<Route author="Caicailiushui" example="/zju/physics/1" path="/zju/physics/:type" paramsDesc={['分类,见下表']} notOperational="1"> - | 本院动态 | 科研进展 | 研究生教育最新消息 | - | -------- | -------- | ------------------ | - | 1 | 2 | 3 | -</Route> +### 普通栏目 如学术 / 图片 / 新闻等 {#zhe-jiang-da-xue-pu-tong-lan-mu-ru-xue-shu-tu-pian-xin-wen-deng} + +<Route namespace="zju" data={{"path":"/list/:type","categories":["university"],"example":"/zju/list/xs","parameters":{"type":"`xs`为学术,`xw`为新闻,`5461`是图片新闻,`578`是浙大报道,具体参数参考左侧的菜单"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"普通栏目 如学术 / 图片 / 新闻等","maintainers":["Jeason0228"],"location":"list.ts"}} /> ### 软件学院 {#zhe-jiang-da-xue-ruan-jian-xue-yuan} -<Route author="yonvenne zwithz" example="/zju/cst/0" path="/zju/cst/:type" paramsDesc={['分类,见下表']} radar="1"> - | 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -</Route> +<Route namespace="zju" data={{"path":"/cst/custom/:id","categories":["university"],"example":"/zju/cst/custom/36194+36241+36246","parameters":{"id":"提取出通知页面中的 `ID`,如 `http://www.cst.zju.edu.cn/36246/list.htm` 中的 `36246`,可将你想获取通知的多个页面,通过 `+` 符号来聚合。"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"软件学院","maintainers":["zwithz"],"description":"| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- |\n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |\n\n#### 自定义聚合通知 {#zhe-jiang-da-xue-ruan-jian-xue-yuan-zi-ding-yi-ju-he-tong-zhi}","location":"cst/custom.ts"}} /> + +| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | #### 自定义聚合通知 {#zhe-jiang-da-xue-ruan-jian-xue-yuan-zi-ding-yi-ju-he-tong-zhi} -<Route author="zwithz" example="/zju/cst/custom/36194+36241+36246" path="/zju/cst/custom/:id" paramsDesc={['提取出通知页面中的 `ID`,如 `http://www.cst.zju.edu.cn/36246/list.htm` 中的 `36246`,可将你想获取通知的多个页面,通过 `+` 符号来聚合。']} /> +### 物理学院 {#zhe-jiang-da-xue-wu-li-xue-yuan} -## 浙江大学城市学院 {#zhe-jiang-da-xue-cheng-shi-xue-yuan} +<Route namespace="zju" data={{"path":"/physics/:type","categories":["university"],"example":"/zju/physics/1","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"物理学院","maintainers":["Caicailiushui"],"description":"| 本院动态 | 科研进展 | 研究生教育最新消息 |\n | -------- | -------- | ------------------ |\n | 1 | 2 | 3 |","location":"physics/index.ts"}} /> -### 新闻通知 {#zhe-jiang-da-xue-cheng-shi-xue-yuan-xin-wen-tong-zhi} +| 本院动态 | 科研进展 | 研究生教育最新消息 | +| -------- | -------- | ------------------ | +| 1 | 2 | 3 | -<Route author="zhang-wangz" example="/zucc/news/latest" path="/zucc/news/latest" /> +### 研究生院 {#zhe-jiang-da-xue-yan-jiu-sheng-yuan} -### 计算分院全站搜索 {#zhe-jiang-da-xue-cheng-shi-xue-yuan-ji-suan-fen-yuan-quan-zhan-sou-suo} +<Route namespace="zju" data={{"path":"/grs/:type","categories":["university"],"example":"/zju/grs/1","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"研究生院","maintainers":["Caicailiushui"],"description":"| 全部公告 | 教学管理 | 各类资助 | 学科建设 | 海外交流 |\n | -------- | -------- | -------- | -------- | -------- |\n | 1 | 2 | 3 | 4 | 5 |","location":"grs/index.ts"}} /> -<Route author="zhang-wangz" example="/zucc/cssearch/latest/0/白卡" path="/zucc/cssearch/latest/:webVpn?/:key?" paramsDesc={['见下表(默认为0)','关键词(默认为白卡)']}> - | 0 | 1 | - | ------------------ | -------------------- | - | 文章地址为正常地址 | 获取的是 webvpn 地址 | -</Route> - -## 浙江工商大学 {#zhe-jiang-gong-shang-da-xue} - -### 浙江工商大学 {#zhe-jiang-gong-shang-da-xue-zhe-jiang-gong-shang-da-xue} - -<Route author="nicolaszf" example="/zjgsu/tzgg" path="/zjgsu/:type" paramsDesc={['分类,见下表']}> - | 通知公告 | 学生专区 | 公示公告 | - | -------- | -------- | -------- | - | tzgg | xszq | gsgg | -</Route> - -## 浙江工业大学 {#zhe-jiang-gong-ye-da-xue} - -### 浙江工业大学 {#zhe-jiang-gong-ye-da-xue-zhe-jiang-gong-ye-da-xue} - -<Route author="junbaor" example="/zjut/1" path="/zjut/:type" paramsDesc={['板块id']} notOperational="1"> - | 公告栏 | 每周会议 | 屏峰班车 | 新闻速递 | 学术动态 | - | ------ | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 10 | 25 | -</Route> - -### 设计与建筑学院 {#zhe-jiang-gong-ye-da-xue-she-ji-yu-jian-zhu-xue-yuan} - -<Route author="yikZero" example="/zjut/design/16" path="/zjut/design/:type" paramsDesc={['板块id']}> - | 学院新闻 | 公告通知 | 学术交流 | - | -------- | -------- | -------- | - | 16 | 18 | 20 | -</Route> +| 全部公告 | 教学管理 | 各类资助 | 学科建设 | 海外交流 | +| -------- | -------- | -------- | -------- | -------- | +| 1 | 2 | 3 | 4 | 5 | ## 浙江中医药大学 {#zhe-jiang-zhong-yi-yao-da-xue} ### 教务处 {#zhe-jiang-zhong-yi-yao-da-xue-jiao-wu-chu} -<Route author="CCraftY" example="/zcmu/jwc/1" path="/zcmu/jwc/:type?" paramsDesc={['通知模块id']} anticrawler="1"> - | 教务管理 | 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | -</Route> +<Route namespace="zcmu" data={{"path":"/jwc/:type?","categories":["university"],"example":"/zcmu/jwc/1","parameters":{"type":"通知模块id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"教务处","maintainers":["CCraftY"],"description":"| 教务管理 | 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 |\n | -------- | -------- | -------- | -------- | -------- | -------- |\n | 0 | 1 | 2 | 3 | 4 | 5 |","location":"jwc/index.ts"}} /> + +| 教务管理 | 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | ### 药学院 {#zhe-jiang-zhong-yi-yao-da-xue-yao-xue-yuan} -<Route author="CCraftY" example="/zcmu/yxy/0" path="/zcmu/yxy/:type?" paramsDesc={['模块id']}> - | 通知公告 | 评优评奖 | 文明规范 | 创新创业 | 校园文化 | 心理驿站 | 日常通知 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | -</Route> +<Route namespace="zcmu" data={{"path":"/yxy/:type?","categories":["university"],"example":"/zcmu/yxy/0","parameters":{"type":"模块id"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"药学院","maintainers":["CCraftY"],"description":"| 通知公告 | 评优评奖 | 文明规范 | 创新创业 | 校园文化 | 心理驿站 | 日常通知 |\n | -------- | -------- | -------- | -------- | -------- | -------- | -------- |\n | 0 | 1 | 2 | 3 | 4 | 5 | 6 |","location":"yxy/index.ts"}} /> -## 郑州大学 {#zheng-zhou-da-xue} - -### 郑州大学新闻网 {#zheng-zhou-da-xue-zheng-zhou-da-xue-xin-wen-wang} - -<Route author="niayyy-S" example="/zzu/news/zh" path="/zzu/news/:type?" paramsDesc={['可选,默认为 `zh`']} notOperational="1"> - | 参数名称 | 综合新闻 | 学术动态 | 媒体郑大 | 院系风采 | 教学科研 | 学生信息 | 外事信息 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 参数 | zh | xs | mt | yx | ky | stu | ws | -</Route> - -### 软件学院 {#zheng-zhou-da-xue-ruan-jian-xue-yuan} - -<Route author="niayyy-S" example="/zzu/soft/news/xyxw" path="/zzu/soft/news/:type?" paramsDesc={['可选,默认为 `xyxw`']} notOperational="1"> - | 参数名称 | 学院新闻 | 学院公告 | 学生工作 | - | -------- | -------- | -------- | -------- | - | 参数 | xyxw | xygg | xsgz | -</Route> - -## 郑州轻工业大学 {#zheng-zhou-qing-gong-ye-da-xue} - -### 智慧门户 {#zheng-zhou-qing-gong-ye-da-xue-zhi-hui-men-hu} - -<Route author="Fantasia1999" example="/zzuli/campus/0" path="/zzuli/campus/:type" paramsDesc={['分类,见下表']} radar="1"> - | 参数名称 | 公告信息 | 学工信息 | 教学信息 | 信息快递 | 学术报告 | 科研信息 | 网络公告 | 班车查询 | 周会表 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------ | - | 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -</Route> - -### 研究生处 {#zheng-zhou-qing-gong-ye-da-xue-yan-jiu-sheng-chu} - -<Route author="Fantasia1999" example="/zzuli/yjsc/0" path="/zzuli/yjsc/:type" paramsDesc={['分类,见下表']} radar="1"> - | 参数名称 | 公告通知 | 招生工作 | 新闻资讯 | 培养工作 | 学位工作 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 参数 | 0 | 1 | 2 | 3 | 4 | -</Route> - -## 中北大学 {#zhong-bei-da-xue} - -### 各种新闻通知 {#zhong-bei-da-xue-ge-zhong-xin-wen-tong-zhi} - -<Route author="Dreace" example="/nuc/zbxw" path="/nuc/:type?" paramsDesc={['默认为 zbxw']}> - | 中北新闻 | 通知公告 | 学术活动 | 教务通知 | - | -------- | -------- | -------- | -------- | - | zbxw | tzgg | xshd | jwtz | -</Route> +| 通知公告 | 评优评奖 | 文明规范 | 创新创业 | 校园文化 | 心理驿站 | 日常通知 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | ## 中国传媒大学 {#zhong-guo-chuan-mei-da-xue} ### 研究生招生网 {#zhong-guo-chuan-mei-da-xue-yan-jiu-sheng-zhao-sheng-wang} -<Route author="YunYouJun niuyi1017" example="/cuc/yz" path="/cuc/yz" /> - -## 中国地质大学(武汉) {#zhong-guo-di-zhi-da-xue-wu-han} - -### 今日文章 - 包含全校网站最新通知 {#zhong-guo-di-zhi-da-xue-wu-han-jin-ri-wen-zhang-bao-han-quan-xiao-wang-zhan-zui-xin-tong-zhi} - -<Route author="Dorad" example="/cug/news" path="/cug/news" notOperational="1" /> - -### 研究生院综合通知公告 {#zhong-guo-di-zhi-da-xue-wu-han-yan-jiu-sheng-yuan-zong-he-tong-zhi-gong-gao} - -<Route author="sanmmm" example="/cug/graduate" path="/cug/graduate" anticrawler="1" /> - -### 中国地质大学通知公告 {#zhong-guo-di-zhi-da-xue-wu-han-zhong-guo-di-zhi-da-xue-tong-zhi-gong-gao} - -<Route author="chunibyo-wly" example="/cug/undergraduate" path="/cug/undergraduate" notOperational="1" /> - -### 地理与信息工程学院综合通知公告 {#zhong-guo-di-zhi-da-xue-wu-han-di-li-yu-xin-xi-gong-cheng-xue-yuan-zong-he-tong-zhi-gong-gao} - -<Route author="chunibyo-wly" example="/cug/xgxy" path="/cug/xgxy" anticrawler="1" /> - -### 工程学院 {#zhong-guo-di-zhi-da-xue-wu-han-gong-cheng-xue-yuan} - -<Route author="Dorad" example="/cug/gcxy/1" path="/cug/gcxy/:type" notOperational="1" /> - -| 所有 | 学院新闻 | 通知公告 | 党建工作 | 学术动态 | 本科生教育 | 研究生教育 | 教工之家 | -| ---- | -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | -| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +<Route namespace="cuc" data={{"path":"/yz","categories":["university"],"example":"/cuc/yz","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.cuc.edu.cn/8549/list.htm","yz.cuc.edu.cn/"]},"name":"研究生招生网","maintainers":["niuyi1017"],"url":"yz.cuc.edu.cn/8549/list.htm","location":"yz.ts"}} /> ## 中国海洋大学 {#zhong-guo-hai-yang-da-xue} -### 信息科学与工程学院 {#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan} +### 教务处 {#zhong-guo-hai-yang-da-xue-jiao-wu-chu} -<Route author="GeoffreyChen777 3401797899" example="/ouc/it/0" path="/ouc/it/:type?" paramsDesc={['默认为 `0`']} radar="1" anticrawler="1"> - | 学院要闻 | 学院公告 | 学院活动 | - | -------- | -------- | -------- | - | 0 | 1 | 2 | -</Route> - -### 信息科学与工程学院团学工作 {#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-tuan-xue-gong-zuo} - -<Route author="3401797899" example="/ouc/it/tx/xwdt" path="/ouc/it/tx/:id?" paramsDesc={['默认为 `xwdt`,id过多,这里只举几个例']} radar="1" anticrawler="1"> - | 新闻动态 | 学院活动 | 奖助工作获奖情况 | - | -------- | -------- | ---------------- | - | xwdt | tzgg | 21758 | -</Route> - -### 研究生院 {#zhong-guo-hai-yang-da-xue-yan-jiu-sheng-yuan} - -<Route author="shengmaosu" example="/ouc/yjs" path="/ouc/yjs" radar="1" anticrawler="1" /> +<Route namespace="ouc" data={{"path":"/jwc","categories":["university"],"example":"/ouc/jwc","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwc.ouc.edu.cn/","jwc.ouc.edu.cn/6517/list.htm"]},"name":"教务处","maintainers":["3401797899"],"url":"jwc.ouc.edu.cn/","location":"jwc.ts"}} /> ### 信息科学与工程学院研究生招生通知公告 {#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-yan-jiu-sheng-zhao-sheng-tong-zhi-gong-gao} -<Route author="shengmaosu" example="/ouc/it/postgraduate" path="/ouc/it/postgraduate" radar="1" notOperational="1" /> +<Route namespace="ouc" data={{"path":"/it/postgraduate","categories":["university"],"example":"/ouc/it/postgraduate","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["it.ouc.edu.cn/_s381/16619/list.psp","it.ouc.edu.cn/16619/list.htm","it.ouc.edu.cn/"]},"name":"信息科学与工程学院研究生招生通知公告","maintainers":["shengmaosu"],"url":"it.ouc.edu.cn/_s381/16619/list.psp","location":"it-postgraduate.ts"}} /> -### 教务处 {#zhong-guo-hai-yang-da-xue-jiao-wu-chu} +### 信息科学与工程学院团学工作 {#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan-tuan-xue-gong-zuo} -<Route author="3401797899" example="/ouc/jwc" path="/ouc/jwc" radar="1" anticrawler="1" /> +<Route namespace="ouc" data={{"path":"/it/tx/:id?","categories":["university"],"example":"/ouc/it/tx/xwdt","parameters":{"id":"默认为 `xwdt`,id过多,这里只举几个例"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["it.ouc.edu.cn/tx/:id/list.htm"],"target":"/it/tx/:id"},"name":"信息科学与工程学院团学工作","maintainers":["3401797899"],"url":"it.ouc.edu.cn/","description":"| 新闻动态 | 学院活动 | 奖助工作获奖情况 |\n | -------- | -------- | ---------------- |\n | xwdt | tzgg | 21758 |","location":"it-tx.ts"}} /> + +| 新闻动态 | 学院活动 | 奖助工作获奖情况 | +| -------- | -------- | ---------------- | +| xwdt | tzgg | 21758 | + +### 信息科学与工程学院 {#zhong-guo-hai-yang-da-xue-xin-xi-ke-xue-yu-gong-cheng-xue-yuan} + +<Route namespace="ouc" data={{"path":"/it/:type?","categories":["university"],"example":"/ouc/it/0","parameters":{"type":"默认为 `0`"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["it.ouc.edu.cn/"],"target":"/it"},"name":"信息科学与工程学院","maintainers":["GeoffreyChen777","3401797899"],"url":"it.ouc.edu.cn/","description":"| 学院要闻 | 学院公告 | 学院活动 |\n | -------- | -------- | -------- |\n | 0 | 1 | 2 |","location":"it.ts"}} /> + +| 学院要闻 | 学院公告 | 学院活动 | +| -------- | -------- | -------- | +| 0 | 1 | 2 | ### 选课信息教务通知 {#zhong-guo-hai-yang-da-xue-xuan-ke-xin-xi-jiao-wu-tong-zhi} -<Route author="3401797899" example="/ouc/jwgl" path="/ouc/jwgl" radar="1" configRequired="1"> - :::warning - 由于选课通知仅允许校园网访问,需自行部署。 - ::: -</Route> +<Route namespace="ouc" data={{"path":"/jwgl","categories":["university"],"example":"/ouc/jwgl","parameters":{},"features":{"requireConfig":true,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["jwgl.ouc.edu.cn/cas/login.action","jwgl.ouc.edu.cn/public/SchoolNotice.jsp"]},"name":"选课信息教务通知","maintainers":["3401797899"],"url":"jwgl.ouc.edu.cn/cas/login.action","description":":::warning\n 由于选课通知仅允许校园网访问,需自行部署。\n :::","location":"jwgl.ts"}} /> + +:::warning +由于选课通知仅允许校园网访问,需自行部署。 +::: + +### 研究生院 {#zhong-guo-hai-yang-da-xue-yan-jiu-sheng-yuan} + +<Route namespace="ouc" data={{"path":"/yjs","categories":["university"],"example":"/ouc/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.ouc.edu.cn/5926/list.htm"]},"name":"研究生院","maintainers":["shengmaosu"],"url":"yz.ouc.edu.cn/5926/list.htm","location":"yjs.ts"}} /> ## 中国科学技术大学 {#zhong-guo-ke-xue-ji-shu-da-xue} +### 电子工程与信息科学系 {#zhong-guo-ke-xue-ji-shu-da-xue-dian-zi-gong-cheng-yu-xin-xi-ke-xue-xi} + +<Route namespace="ustc" data={{"path":"/eeis/:type?","categories":["university"],"example":"/ustc/eeis/tzgg","parameters":{"type":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["eeis.ustc.edu.cn/"],"target":"/eeis"},"name":"电子工程与信息科学系","maintainers":["jasongzy"],"url":"eeis.ustc.edu.cn/","description":"| 通知公告 | 新闻信息 |\n | -------- | -------- |\n | tzgg | xwxx |","location":"eeis.ts"}} /> + +| 通知公告 | 新闻信息 | +| -------- | -------- | +| tzgg | xwxx | + ### 官网通知公告 {#zhong-guo-ke-xue-ji-shu-da-xue-guan-wang-tong-zhi-gong-gao} -<Route author="hang333 jasongzy" example="/ustc/news/gl" path="/ustc/news/:type?" paramsDesc={['分类,默认为管理类']} radar="1" anticrawler="1"> - | 教学类 | 科研类 | 管理类 | 服务类 | - | ------ | ------ | ------ | ------ | - | jx | ky | gl | fw | -</Route> +<Route namespace="ustc" data={{"path":"/news/:type?","categories":["university"],"example":"/ustc/news/gl","parameters":{"type":"分类,默认为管理类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ustc.edu.cn/"],"target":"/news"},"name":"官网通知公告","maintainers":["hang333","jasongzy"],"url":"ustc.edu.cn/","description":"| 教学类 | 科研类 | 管理类 | 服务类 |\n | ------ | ------ | ------ | ------ |\n | jx | ky | gl | fw |","location":"index.ts"}} /> + +| 教学类 | 科研类 | 管理类 | 服务类 | +| ------ | ------ | ------ | ------ | +| jx | ky | gl | fw | ### 教务处通知新闻 {#zhong-guo-ke-xue-ji-shu-da-xue-jiao-wu-chu-tong-zhi-xin-wen} -<Route author="hang333" example="/ustc/jwc/info" path="/ustc/jwc/:type?" paramsDesc={['分类,默认显示所有种类']} radar="1"> - | 信息 | 教学 | 考试 | 交流 | - | ---- | -------- | ---- | -------- | - | info | teaching | exam | exchange | -</Route> +<Route namespace="ustc" data={{"path":"/jwc/:type?","categories":["university"],"example":"/ustc/jwc/info","parameters":{"type":"分类,默认显示所有种类"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.teach.ustc.edu.cn/"],"target":"/jwc"},"name":"教务处通知新闻","maintainers":["hang333"],"url":"www.teach.ustc.edu.cn/","description":"| 信息 | 教学 | 考试 | 交流 |\n | ---- | -------- | ---- | -------- |\n | info | teaching | exam | exchange |","location":"jwc.ts"}} /> -### 研究生院 {#zhong-guo-ke-xue-ji-shu-da-xue-yan-jiu-sheng-yuan} - -<Route author="jasongzy" example="/ustc/gs/tzgg" path="/ustc/gs/:type?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 新闻动态 | - | -------- | -------- | - | tzgg | xwdt | -</Route> - -### 信息科学技术学院 {#zhong-guo-ke-xue-ji-shu-da-xue-xin-xi-ke-xue-ji-shu-xue-yuan} - -<Route author="jasongzy" example="/ustc/sist/tzgg" path="/ustc/sist/:type?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 招生工作 | - | -------- | -------- | - | tzgg | zsgz | -</Route> - -### 电子工程与信息科学系 {#zhong-guo-ke-xue-ji-shu-da-xue-dian-zi-gong-cheng-yu-xin-xi-ke-xue-xi} - -<Route author="jasongzy" example="/ustc/eeis/tzgg" path="/ustc/eeis/:type?" paramsDesc={['分类,见下表,默认为通知公告']} radar="1"> - | 通知公告 | 新闻信息 | - | -------- | -------- | - | tzgg | xwxx | -</Route> +| 信息 | 教学 | 考试 | 交流 | +| ---- | -------- | ---- | -------- | +| info | teaching | exam | exchange | ### 就业信息网 {#zhong-guo-ke-xue-ji-shu-da-xue-jiu-ye-xin-xi-wang} -<Route author="nczitzk" example="/ustc/job" path="/ustc/job/:category?" paramsDesc={['分类,见下表,默认为招聘公告']} radar="1" notOperational="1"> - | 专场招聘会 | 校园双选会 | 空中宣讲 | 招聘公告 | - | ----------- | ------------ | --------- | -------- | - | RecruitList | Doublechoice | Broadcast | joblist2 | -</Route> +<Route namespace="ustc" data={{"path":"/job/:category?","categories":["university"],"example":"/ustc/job","parameters":{"category":"分类,见下表,默认为招聘公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["job.ustc.edu.cn/"],"target":"/job"},"name":"就业信息网","maintainers":["nczitzk"],"url":"job.ustc.edu.cn/","description":"| 专场招聘会 | 校园双选会 | 空中宣讲 | 招聘公告 |\n | ----------- | ------------ | --------- | -------- |\n | RecruitList | Doublechoice | Broadcast | joblist2 |","location":"job.ts"}} /> + +| 专场招聘会 | 校园双选会 | 空中宣讲 | 招聘公告 | +| ----------- | ------------ | --------- | -------- | +| RecruitList | Doublechoice | Broadcast | joblist2 | + +### 信息科学技术学院 {#zhong-guo-ke-xue-ji-shu-da-xue-xin-xi-ke-xue-ji-shu-xue-yuan} + +<Route namespace="ustc" data={{"path":"/sist/:type?","categories":["university"],"example":"/ustc/sist/tzgg","parameters":{"type":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["sist.ustc.edu.cn/"],"target":"/sist"},"name":"信息科学技术学院","maintainers":["jasongzy"],"url":"sist.ustc.edu.cn/","description":"| 通知公告 | 招生工作 |\n | -------- | -------- |\n | tzgg | zsgz |","location":"sist.ts"}} /> + +| 通知公告 | 招生工作 | +| -------- | -------- | +| tzgg | zsgz | + +### 研究生院 {#zhong-guo-ke-xue-ji-shu-da-xue-yan-jiu-sheng-yuan} + +<Route namespace="ustc" data={{"path":"/gs/:type?","categories":["university"],"example":"/ustc/gs/tzgg","parameters":{"type":"分类,见下表,默认为通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["gradschool.ustc.edu.cn/"],"target":"/gs"},"name":"研究生院","maintainers":["jasongzy"],"url":"gradschool.ustc.edu.cn/","description":"| 通知公告 | 新闻动态 |\n | -------- | -------- |\n | tzgg | xwdt |","location":"gs.ts"}} /> + +| 通知公告 | 新闻动态 | +| -------- | -------- | +| tzgg | xwdt | ## 中国科学院 {#zhong-guo-ke-xue-yuan} ### 成果转化 {#zhong-guo-ke-xue-yuan-cheng-guo-zhuan-hua} -<Route author="nczitzk" example="/cas/cg/cgzhld" path="/cas/cg/:caty?" paramsDesc={['分类,见下表,默认为工作动态']} radar="1" notOperational="1"> - | 工作动态 | 科技成果转移转化亮点工作 | - | -------- | ------------------------ | - | zh | cgzhld | -</Route> +<Route namespace="cas" data={{"path":"/cg/:caty?","categories":["university"],"example":"/cas/cg/cgzhld","parameters":{"caty":"分类,见下表,默认为工作动态"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.cas.cn/cg/:caty?"]},"name":"成果转化","maintainers":["nczitzk"],"description":"| 工作动态 | 科技成果转移转化亮点工作 |\n | -------- | ------------------------ |\n | zh | cgzhld |","location":"cg/index.ts"}} /> -### 上海微系统与信息技术研究所 科技进展 {#zhong-guo-ke-xue-yuan-shang-hai-wei-xi-tong-yu-xin-xi-ji-shu-yan-jiu-suo-ke-ji-jin-zhan} - -<Route author="HenryQW" example="/cas/sim/kyjz" path="/cas/sim/kyjz" radar="1" notOperational="1" /> - -### 信息工程研究所 第二研究室 处理架构组 知识库 {#zhong-guo-ke-xue-yuan-xin-xi-gong-cheng-yan-jiu-suo-di-er-yan-jiu-shi-chu-li-jia-gou-zu-zhi-shi-ku} - -<Route author="renzhexigua" example="/cas/mesalab/kb" path="/cas/mesalab/kb" radar="1" /> +| 工作动态 | 科技成果转移转化亮点工作 | +| -------- | ------------------------ | +| zh | cgzhld | ### 电工研究所 科研动态 {#zhong-guo-ke-xue-yuan-dian-gong-yan-jiu-suo-ke-yan-dong-tai} -<Route author="nczitzk" example="/cas/iee/kydt" path="/cas/iee/kydt" radar="1" anticrawler="1" /> +<Route namespace="cas" data={{"path":"/iee/kydt","categories":["university"],"example":"/cas/iee/kydt","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.iee.cas.cn/xwzx/kydt","www.iee.cas.cn/"]},"name":"电工研究所 科研动态","maintainers":["nczitzk"],"url":"www.iee.cas.cn/xwzx/kydt","location":"iee/kydt.ts"}} /> + +### 上海微系统与信息技术研究所 科技进展 {#zhong-guo-ke-xue-yuan-shang-hai-wei-xi-tong-yu-xin-xi-ji-shu-yan-jiu-suo-ke-ji-jin-zhan} + +<Route namespace="cas" data={{"path":"/sim/kyjz","categories":["university"],"example":"/cas/sim/kyjz","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.sim.cas.cn/xwzx2016/kyjz","www.sim.cas.cn/"]},"name":"上海微系统与信息技术研究所 科技进展","maintainers":["HenryQW"],"url":"www.sim.cas.cn/xwzx2016/kyjz","location":"sim/kyjz.ts"}} /> + +### 信息工程研究所 第二研究室 处理架构组 知识库 {#zhong-guo-ke-xue-yuan-xin-xi-gong-cheng-yan-jiu-suo-di-er-yan-jiu-shi-chu-li-jia-gou-zu-zhi-shi-ku} + +<Route namespace="cas" data={{"path":"/mesalab/kb","categories":["university"],"example":"/cas/mesalab/kb","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.mesalab.cn/f/article/articleList","www.mesalab.cn/"]},"name":"信息工程研究所 第二研究室 处理架构组 知识库","maintainers":["renzhexigua"],"url":"www.mesalab.cn/f/article/articleList","location":"mesalab/kb.ts"}} /> ### 自动化所 {#zhong-guo-ke-xue-yuan-zi-dong-hua-suo} -<Route author="shengmaosu" example="/cas/ia/yjs" path="/cas/ia/yjs" radar="1" /> - -### 软件研究所 {#zhong-guo-ke-xue-yuan-ruan-jian-yan-jiu-suo} - -<Route author="Misaka13514" example="/cas/isxwdt2016/tzgg2016" path="/cas/is/:path+" paramsDesc={['路径,可在 URL 找到']} radar="1" notOperational="1"> - 路径参数示例: - - | 通知公告 | 科技动态 | 科普动态 | - | ----------------- | ----------------- | ----------------- | - | xwdt2016/tzgg2016 | xwdt2016/kjdt2016 | kxcb2016/kpdt2016 | -</Route> - -### 遗传与发育生物学研究所 {#zhong-guo-ke-xue-yuan-yi-chuan-yu-fa-yu-sheng-wu-xue-yan-jiu-suo} - -<Route author="panyq357" example="/cas/genetics/jixs/yg" path="/cas/genetics/:path+" paramsDesc={['路径,可在 URL 找到']} radar="1"> - 路径参数示例: - - | 路径 | 栏目 | - | :--------------------- | :--------- | - | jixs/yg | 学术预告 | - | dtxw/kyjz | 科研进展 | - | edu/zsxx/ssszs\_187556 | 硕士生招生 | - | edu/zsxx/bsszs\_187557 | 博士生招生 | - | dqyd/djgz/dwyw | 党委要闻 | -</Route> +<Route namespace="cas" data={{"path":"/ia/yjs","categories":["university"],"example":"/cas/ia/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["www.ia.cas.cn/yjsjy/zs/sszs","www.ia.cas.cn/"]},"name":"自动化所","maintainers":["shengmaosu"],"url":"www.ia.cas.cn/yjsjy/zs/sszs","location":"ia/yjs.ts"}} /> ## 中国科学院大学 {#zhong-guo-ke-xue-yuan-da-xue} -### 招聘信息 {#zhong-guo-ke-xue-yuan-da-xue-zhao-pin-xin-xi} - -<Route author="Fatpandac" example="/ucas/job" path="/ucas/job/:type?" paramsDesc={['招聘类型,默认为博士后']} radar="1" notOperational="1"> - | 招聘类型 | 博士后 | 课题项目聘用 | 管理支撑人才 | 教学科研人才 | - | :------: | :----: | :----------: | :----------: | :----------: | - | 参数 | bsh | ktxmpy | glzcrc | jxkyrc | -</Route> - ### 人工智能学院 {#zhong-guo-ke-xue-yuan-da-xue-ren-gong-zhi-neng-xue-yuan} -<Route author="shengmaosu" example="/ucas/ai" path="/ucas/ai" radar="1" anticrawler="1" /> +<Route namespace="ucas" data={{"path":"/ai","categories":["university"],"example":"/ucas/ai","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ai.ucas.ac.cn/index.php/zh-cn/tzgg","ai.ucas.ac.cn/"]},"name":"人工智能学院","maintainers":["shengmaosu"],"url":"ai.ucas.ac.cn/index.php/zh-cn/tzgg","location":"ai.ts"}} /> + +### 招聘信息 {#zhong-guo-ke-xue-yuan-da-xue-zhao-pin-xin-xi} + +<Route namespace="ucas" data={{"path":"/job/:type?","categories":["university"],"example":"/ucas/job","parameters":{"type":"招聘类型,默认为博士后"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"招聘信息","maintainers":["Fatpandac"],"description":"| 招聘类型 | 博士后 | 课题项目聘用 | 管理支撑人才 | 教学科研人才 |\n | :------: | :----: | :----------: | :----------: | :----------: |\n | 参数 | bsh | ktxmpy | glzcrc | jxkyrc |","location":"index.ts"}} /> + +| 招聘类型 | 博士后 | 课题项目聘用 | 管理支撑人才 | 教学科研人才 | +| :------: | :----: | :----------: | :----------: | :----------: | +| 参数 | bsh | ktxmpy | glzcrc | jxkyrc | ## 中国农业大学 {#zhong-guo-nong-ye-da-xue} +### Unknown {#zhong-guo-nong-ye-da-xue-unknown} + +<Route namespace="cau" data={{"path":"/yjs","categories":["university"],"example":"/cau/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["yz.cau.edu.cn/col/col41740/index.html","yz.cau.edu.cn/"]},"name":"Unknown","maintainers":["shengmaosu"],"url":"yz.cau.edu.cn/col/col41740/index.html","location":"yjs.ts"}} /> + ### 研招网通知公告 {#zhong-guo-nong-ye-da-xue-yan-zhao-wang-tong-zhi-gong-gao} -<Route author="shengmaosu" example="/cau/yjs" path="/cau/yjs" radar="1" /> +<Route namespace="cau" data={{"path":"/ele","categories":["university"],"example":"/cau/ele","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ciee.cau.edu.cn/col/col26712/index.html","ciee.cau.edu.cn/"]},"name":"研招网通知公告","maintainers":["shengmaosu"],"url":"ciee.cau.edu.cn/col/col26712/index.html","description":"#### 信电学院 {#zhong-guo-nong-ye-da-xue-yan-zhao-wang-tong-zhi-gong-gao-xin-dian-xue-yuan}","location":"ele.ts"}} /> #### 信电学院 {#zhong-guo-nong-ye-da-xue-yan-zhao-wang-tong-zhi-gong-gao-xin-dian-xue-yuan} -<Route author="shengmaosu" example="/cau/ele" path="/cau/ele" radar="1" /> - ## 中国人民大学 {#zhong-guo-ren-min-da-xue} ### 人事处 {#zhong-guo-ren-min-da-xue-ren-shi-chu} -<Route author="nczitzk" example="/ruc/hr" path="/ruc/hr/:category?" paramsDesc={['分类,见下方说明,默认为首页通知公告']}> - :::tip - 分类字段处填写的是对应中国人民大学人事处分类页网址中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。 +<Route namespace="ruc" data={{"path":"/hr/:category?","categories":["university"],"example":"/ruc/hr","parameters":{"category":"分类,见下方说明,默认为首页通知公告"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["hr.ruc.edu.cn/"]},"name":"人事处","maintainers":["nczitzk"],"url":"hr.ruc.edu.cn/","description":":::tip\n 分类字段处填写的是对应中国人民大学人事处分类页网址中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。\n\n 如 [中国人民大学人事处 - 办事机构 - 教师事务办公室 - 教师通知公告](http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm) 的网址为 `http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm` 其中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段为 `bsjg/bsjsswbgs/jstzgg`。随后,并将其中的 `/` 修改为 `-`,可以得到 `bsjg-bsjsswbgs-jstzgg`。所以最终我们的路由为 [`/ruc/hr/bsjg-bsjsswbgs-jstzgg`](https://rsshub.app/ruc/hr/bsjg-bsjsswbgs-jstzgg)\n :::","location":"hr.ts"}} /> - 如 [中国人民大学人事处 - 办事机构 - 教师事务办公室 - 教师通知公告](http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm) 的网址为 `http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm` 其中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段为 `bsjg/bsjsswbgs/jstzgg`。随后,并将其中的 `/` 修改为 `-`,可以得到 `bsjg-bsjsswbgs-jstzgg`。所以最终我们的路由为 [`/ruc/hr/bsjg-bsjsswbgs-jstzgg`](https://rsshub.app/ruc/hr/bsjg-bsjsswbgs-jstzgg) - ::: -</Route> +:::tip +分类字段处填写的是对应中国人民大学人事处分类页网址中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段,并将其中的 `/` 修改为 `-`。 + +如 [中国人民大学人事处 - 办事机构 - 教师事务办公室 - 教师通知公告](http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm) 的网址为 `http://hr.ruc.edu.cn/bsjg/bsjsswbgs/jstzgg/index.htm` 其中介于 **`http://hr.ruc.edu.cn/`** 和 **/index.htm** 中间的一段为 `bsjg/bsjsswbgs/jstzgg`。随后,并将其中的 `/` 修改为 `-`,可以得到 `bsjg-bsjsswbgs-jstzgg`。所以最终我们的路由为 [`/ruc/hr/bsjg-bsjsswbgs-jstzgg`](https://rsshub.app/ruc/hr/bsjg-bsjsswbgs-jstzgg) +::: ## 中国石油大学(华东) {#zhong-guo-shi-you-da-xue-hua-dong} +### 计算机科学与技术学院 {#zhong-guo-shi-you-da-xue-hua-dong-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan} + +<Route namespace="upc" data={{"path":"/jsj/:type","categories":["university"],"example":"/upc/jsj/news","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机科学与技术学院","maintainers":["Veagau"],"description":"| 学院新闻 | 学术关注 | 学工动态 | 通知公告 |\n | -------- | -------- | -------- | -------- |\n | news | scholar | states | notice |","location":"jsj.ts"}} /> + +| 学院新闻 | 学术关注 | 学工动态 | 通知公告 | +| -------- | -------- | -------- | -------- | +| news | scholar | states | notice | + ### 研究生院通知公告 {#zhong-guo-shi-you-da-xue-hua-dong-yan-jiu-sheng-yuan-tong-zhi-gong-gao} -<Route author="shengmaosu" example="/upc/yjs" path="/upc/yjs" radar="1" anticrawler="1" /> +<Route namespace="upc" data={{"path":"/yjs","categories":["university"],"example":"/upc/yjs","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["zs.gs.upc.edu.cn/sszs/list.htm","zs.gs.upc.edu.cn/"]},"name":"研究生院通知公告","maintainers":["shengmaosu"],"url":"zs.gs.upc.edu.cn/sszs/list.htm","location":"yjs.ts"}} /> ### 主页 {#zhong-guo-shi-you-da-xue-hua-dong-zhu-ye} -<Route author="Veagau" example="/upc/main/notice" path="/upc/main/:type" paramsDesc={['分类,见下表']} radar="1" anticrawler="1"> - | 通知公告 | 学术动态 | - | -------- | -------- | - | notice | scholar | -</Route> +<Route namespace="upc" data={{"path":"/main/:type","categories":["university"],"example":"/upc/main/notice","parameters":{"type":"分类,见下表"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"主页","maintainers":["Veagau"],"description":"| 通知公告 | 学术动态 |\n | -------- | -------- |\n | notice | scholar |","location":"main.ts"}} /> -### 计算机科学与技术学院 {#zhong-guo-shi-you-da-xue-hua-dong-ji-suan-ji-ke-xue-yu-ji-shu-xue-yuan} - -<Route author="Veagau" example="/upc/jsj/news" path="/upc/jsj/:type" paramsDesc={['分类,见下表']} radar="1" anticrawler="1"> - | 学院新闻 | 学术关注 | 学工动态 | 通知公告 | - | -------- | -------- | -------- | -------- | - | news | scholar | states | notice | -</Route> - -## 中国药科大学 {#zhong-guo-yao-ke-da-xue} - -### 中国药科大学 {#zhong-guo-yao-ke-da-xue-zhong-guo-yao-ke-da-xue} - -<Route author="kba977" example="/cpu/home" path="/cpu/:type" paramsDesc={['分类,见下表']} notOperational="1"> - | 首页 | 教务处 | 研究生院 | - | ---- | ------ | -------- | - | home | jwc | yjsy | -</Route> +| 通知公告 | 学术动态 | +| -------- | -------- | +| notice | scholar | ## 中南财经政法大学 {#zhong-nan-cai-jing-zheng-fa-da-xue} ### 通知公告 {#zhong-nan-cai-jing-zheng-fa-da-xue-tong-zhi-gong-gao} -<Route author="nczitzk" example="/zuel/notice" path="/zuel/notice" notOperational="1" /> +<Route namespace="zuel" data={{"path":"/notice","categories":["university"],"example":"/zuel/notice","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["wap.zuel.edu.cn/","wap.zuel.edu.cn/notice/list.htm"]},"name":"通知公告","maintainers":["nczitzk"],"url":"wap.zuel.edu.cn/","location":"notice.ts"}} /> ## 中南大学 {#zhong-nan-da-xue} -### 就业信息网招聘信息 {#zhong-nan-da-xue-jiu-ye-xin-xi-wang-zhao-pin-xin-xi} - -<Route author="TonyRL" example="/csu/career" path="/csu/career" radar="1" /> - ### 计算机学院 {#zhong-nan-da-xue-ji-suan-ji-xue-yuan} -<Route author="j1g5awi" example="/csu/cse" path="/csu/cse/:type?" paramsDesc={['类型']} radar="1" anticrawler="1"> - | 类型 | 学院新闻 | 通知公告 | 学术信息 | 学工动态 | 科研动态 | - | ---- | -------- | -------- | -------- | -------- | -------- | - | 参数 | xyxw | tzgg | xsxx | xgdt | kydt | -</Route> +<Route namespace="csu" data={{"path":"/cse/:type?","categories":["university"],"example":"/csu/cse","parameters":{"type":"类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"计算机学院","maintainers":["j1g5awi"],"description":"| 类型 | 学院新闻 | 通知公告 | 学术信息 | 学工动态 | 科研动态 |\n | ---- | -------- | -------- | -------- | -------- | -------- |\n | 参数 | xyxw | tzgg | xsxx | xgdt | kydt |","location":"cse.ts"}} /> + +| 类型 | 学院新闻 | 通知公告 | 学术信息 | 学工动态 | 科研动态 | +| ---- | -------- | -------- | -------- | -------- | -------- | +| 参数 | xyxw | tzgg | xsxx | xgdt | kydt | + +### 就业信息网招聘信息 {#zhong-nan-da-xue-jiu-ye-xin-xi-wang-zhao-pin-xin-xi} + +<Route namespace="csu" data={{"path":"/career","categories":["university"],"example":"/csu/career","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["career.csu.edu.cn/campus/index/category/1","career.csu.edu.cn/campus","career.csu.edu.cn/"]},"name":"就业信息网招聘信息","maintainers":["TonyRL"],"url":"career.csu.edu.cn/campus/index/category/1","location":"career.ts"}} /> ### 校长信箱 {#zhong-nan-da-xue-xiao-zhang-xin-xiang} -<Route author="j1g5awi" example="/csu/mail" path="/csu/mail/:type?" paramsDesc={['类型']} radar="1"> - | 类型 | 校长信箱 | 党委信箱 | - | ---- | -------- | -------- | - | 参数 | 01 | 02 | -</Route> +<Route namespace="csu" data={{"path":"/mail/:type?","categories":["university"],"example":"/csu/mail","parameters":{"type":"类型"},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":false,"supportBT":false,"supportPodcast":false,"supportScihub":false},"name":"校长信箱","maintainers":["j1g5awi"],"description":"| 类型 | 校长信箱 | 党委信箱 |\n | ---- | -------- | -------- |\n | 参数 | 01 | 02 |","location":"mail.ts"}} /> + +| 类型 | 校长信箱 | 党委信箱 | +| ---- | -------- | -------- | +| 参数 | 01 | 02 | ## 中山大学 {#zhong-shan-da-xue} +### Unknown {#zhong-shan-da-xue-unknown} + +<Route namespace="sysu" data={{"path":"/ygafz/:type?","categories":["university"],"example":"/sysu/ygafz","parameters":{"type":"分类,见下表,默认为 `notice`"},"features":{"requireConfig":false,"requirePuppeteer":true,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["ygafz.sysu.edu.cn/:type?"]},"name":"Unknown","maintainers":["TonyRL"],"location":"ygafz.ts"}} /> + ### 数据科学与计算机学院动态 {#zhong-shan-da-xue-shu-ju-ke-xue-yu-ji-suan-ji-xue-yuan-dong-tai} -<Route author="Neutrino3316 MegrezZhu nczitzk" example="/sysu/cse" path="/sysu/cse" anticrawler="1" /> - -### 粤港澳发展研究院 {#zhong-shan-da-xue-yue-gang-ao-fa-zhan-yan-jiu-yuan} - -<Route author="TonyRL" example="/sysu/ygafz" path="/sysu/ygafz/:type?" paramsDesc={['分类,见下表,默认为 `notice`']} radar="1" puppeteer="1" anticrawler="1"> - | 人才招聘 | 人才培养 | 新闻动态 | 通知公告 | 专家观点 | - | ---------- | ------------- | -------- | -------- | -------- | - | jobopening | personnelplan | news | notice | opinion | - - | 研究成果 | 研究论文 | 学术著作 | 形势政策 | - | -------- | -------- | -------- | -------- | - | results | papers | writings | policy | -</Route> +<Route namespace="sysu" data={{"path":"/cse","categories":["university"],"example":"/sysu/cse","parameters":{},"features":{"requireConfig":false,"requirePuppeteer":false,"antiCrawler":true,"supportBT":false,"supportPodcast":false,"supportScihub":false},"radar":{"source":["cse.sysu.edu.cn/"]},"name":"数据科学与计算机学院动态","maintainers":[],"url":"cse.sysu.edu.cn/","location":"cse.ts"}} /> diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/advanced/script-standard.md b/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/advanced/script-standard.md index 3b27b37aa..f8a3dbf59 100644 --- a/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/advanced/script-standard.md +++ b/website/i18n/zh/docusaurus-plugin-content-docs/current/joinus/advanced/script-standard.md @@ -107,7 +107,7 @@ RSSHub 会将所有路由命名空间的文件夹名附加到路由前面。路 - 键: 对应的路由 - 值:一个字符串数组,包括所有维护者的 GitHub ID。 -要生成维护者列表,可使用以下命令:`pnpm run build:maintainer`,它将在 `assets/build/` 目录下一份维护者列表。 +要生成维护者列表,可使用以下命令:`pnpm run build`,它将在 `assets/build/` 目录下一份维护者列表。 :::danger @@ -119,7 +119,7 @@ RSSHub 会将所有路由命名空间的文件夹名附加到路由前面。路 所有路由都需要包含 `radar.ts` 文件,其中包括相应的域名。最低要求是规则出现在相应的站点上,即需要填写 `title` 和 `docs` 字段。 -要生成完整的 `radar-rules.js` 文件,可使用以下命令:`yarn build:radar`,它将在 `assets/build/` 目录下创建文件。 +要生成完整的 `radar-rules.js` 文件,可使用以下命令:`yarn build`,它将在 `assets/build/` 目录下创建文件。 :::tip diff --git a/website/src/components/Route.tsx b/website/src/components/Route.tsx index 16bec5712..4f1d0b5f2 100644 --- a/website/src/components/Route.tsx +++ b/website/src/components/Route.tsx @@ -2,38 +2,19 @@ import MarkdownIt from 'markdown-it'; import Badge from './Badge'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; +import type { Route } from '../../../lib/types'; export default function Route({ - author = 'DIYgod', - path = '', - example = '', - paramsDesc = 'N/A', - anticrawler = null, - supportBT = null, - supportPodcast = null, - supportScihub = null, - radar = null, - configRequired = null, - puppeteer = null, - notOperational = null, + namespace, + data, children = null, }: { - author?: string; - path: string; - example?: string; - paramsDesc?: string; - anticrawler?: boolean; - supportBT?: boolean; - supportPodcast?: boolean; - supportScihub?: boolean; - radar?: boolean; - configRequired?: boolean; - puppeteer?: boolean; - notOperational?: boolean; + namespace: string, + data: Route; children?: JSX.Element | JSX.Element[]; }): JSX.Element { - const demoUrl = 'https://rsshub.app' + example; - const paramMatch = path.match(/(?<=:).*?(?=\/|$)/g); + const demoUrl = 'https://rsshub.app' + data.example; + const paramMatch = data.path.match?.(/(?<=:).*?(?=\/|$)/g); const renderMarkdown = (item, inline = true) => { const md = new MarkdownIt({ @@ -43,28 +24,23 @@ export default function Route({ }; return ( - <div className={`routeBlock ${notOperational ? "notOperational" : ""}`} id={path}> + <div className='routeBlock' id={namespace + JSON.stringify(data.path)}> <p className="badges"> - {notOperational && ( - <Link to={`https://github.com/search?q=${encodeURIComponent('repo:DIYgod/RSSHub')}+${encodeURIComponent(`"${path}"`)}&type=issues`}> - <Badge type="caution"><Translate id="badge.notOperational" /></Badge> - </Link> - )} - {anticrawler && ( + {data.features.antiCrawler && ( <Link to="/faq"> <Badge type="caution"><Translate id="badge.anticrawler" /></Badge> </Link> )} - {supportBT && <Badge type="tip"><Translate id="badge.supportBT" /></Badge>} - {supportPodcast && <Badge type="tip"><Translate id="badge.supportPodcast" /></Badge>} - {supportScihub && <Badge type="tip"><Translate id="badge.supportSciHub" /></Badge>} - {puppeteer && <Badge type="warning"><Translate id="badge.puppeteer" /></Badge>} - {configRequired && ( + {data.features.supportBT && <Badge type="tip"><Translate id="badge.supportBT" /></Badge>} + {data.features.supportPodcast && <Badge type="tip"><Translate id="badge.supportPodcast" /></Badge>} + {data.features.supportScihub && <Badge type="tip"><Translate id="badge.supportSciHub" /></Badge>} + {data.features.requirePuppeteer && <Badge type="warning"><Translate id="badge.puppeteer" /></Badge>} + {data.features.requireConfig && ( <Link to="/install/config#route-specific-configurations"> <Badge type="warning"><Translate id="badge.configRequired" /></Badge> </Link> )} - {radar && ( + {data.radar && ( <Link to="/usage#radar"> <Badge type="tip"><Translate id="badge.radar" /></Badge> </Link> @@ -72,7 +48,7 @@ export default function Route({ </p> <p className="author"> <Translate id="route.author" /> - {author.split(' ').map((uid) => ( + {data.maintainers.map((uid) => ( <Link to={`https://github.com/${uid}`} key={uid}> @{uid}{' '} </Link> @@ -86,7 +62,7 @@ export default function Route({ <img loading="lazy" src={`https://img.shields.io/website.svg?label=&url=${encodeURIComponent(demoUrl)}&cacheSeconds=7200`} /> </p> <p className="path"> - <Translate id="route.path" /><code>{path}</code> + <Translate id="route.path" /><code>{data.path}</code> </p> {paramMatch ? ( <div> @@ -100,7 +76,7 @@ export default function Route({ '*': <Translate id="route.parameter.zeroOrMore" />, '+': <Translate id="route.parameter.oneOrMore" />, }[item[item.length - 1]] || <Translate id="route.parameter.required" /> } - <Translate id="route.dash" /><span dangerouslySetInnerHTML={{ __html: renderMarkdown(paramsDesc[index]) }}></span> + <Translate id="route.dash" /><span dangerouslySetInnerHTML={{ __html: renderMarkdown(data.parameters[item.replace(/:|\?|\+|\*/g, '')] || '') }}></span> </li> ))} </ul>