feat(route): add more popular financial routes
This commit is contained in:
parent
e480f605f6
commit
54083d0ba8
|
|
@ -1,13 +1,14 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { getHeaders, randomString, decryptAES } from './utils';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/news',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
example: '/ainvest/news',
|
||||
parameters: {},
|
||||
view: ViewType.Articles,
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -13,7 +13,8 @@ const STATUS_MAP = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/gushitong/index',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Notifications,
|
||||
example: '/baidu/gushitong/index',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import MarkdownIt from 'markdown-it';
|
||||
|
|
@ -8,7 +8,8 @@ const md = MarkdownIt({
|
|||
|
||||
export const route: Route = {
|
||||
path: '/collections',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/bigquant/collections',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DataItem, Route } from '@/types';
|
||||
import { DataItem, Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -132,7 +132,8 @@ const handler: Route['handler'] = async (ctx) => {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/announcement/:type',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/binance/announcement/new-cryptocurrency-listing',
|
||||
parameters: {
|
||||
type: {
|
||||
|
|
@ -154,14 +155,14 @@ export const route: Route = {
|
|||
description: `
|
||||
Type category
|
||||
|
||||
- new-cryptocurrency-listing => New Cryptocurrency Listing
|
||||
- latest-binance-news => Latest Binance News
|
||||
- latest-activities => Latest Activities
|
||||
- new-fiat-listings => New Fiat Listings
|
||||
- api-updates => API Updates
|
||||
- crypto-airdrop => Crypto Airdrop
|
||||
- wallet-maintenance-updates => Wallet Maintenance Updates
|
||||
- delisting => Delisting
|
||||
- new-cryptocurrency-listing => New Cryptocurrency Listing
|
||||
- latest-binance-news => Latest Binance News
|
||||
- latest-activities => Latest Activities
|
||||
- new-fiat-listings => New Fiat Listings
|
||||
- api-updates => API Updates
|
||||
- crypto-airdrop => Crypto Airdrop
|
||||
- wallet-maintenance-updates => Wallet Maintenance Updates
|
||||
- delisting => Delisting
|
||||
`,
|
||||
maintainers: ['enpitsulin'],
|
||||
handler,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DataItem, Route } from '@/types';
|
||||
import { DataItem, Route, ViewType } from '@/types';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { load } from 'cheerio';
|
||||
import cache from '@/utils/cache';
|
||||
|
|
@ -139,7 +139,8 @@ const findTypeLabel = (type: string) => {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/announcement/:type/:lang?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/bitget/announcement/all/zh-CN',
|
||||
parameters: {
|
||||
type: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { load } from 'cheerio';
|
||||
import got from '@/utils/got';
|
||||
import rssParser from '@/utils/rss-parser';
|
||||
|
|
@ -30,7 +30,8 @@ const parseAuthorNewsList = async (slug) => {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/authors/:id/:slug/:source?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
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: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { rootUrl, asyncPoolAll, parseNewsList, parseArticle } from './utils';
|
||||
const site_title_mapping = {
|
||||
'/': 'News',
|
||||
|
|
@ -17,10 +17,14 @@ const site_title_mapping = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:site?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/bloomberg/bbiz',
|
||||
parameters: {
|
||||
site: 'Site ID, can be found below',
|
||||
site: {
|
||||
description: 'Site ID, can be found below',
|
||||
options: Object.keys(site_title_mapping).map((key) => ({ value: key, label: site_title_mapping[key] })),
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
|
|
@ -12,9 +12,21 @@ const __dirname = getCurrentPath(import.meta.url);
|
|||
|
||||
export const route: Route = {
|
||||
path: '/report/:category',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/eastmoney/report/strategyreport',
|
||||
parameters: { category: '研报类型' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: '研报类型',
|
||||
options: [
|
||||
{ value: 'strategyreport', label: '策略报告' },
|
||||
{ value: 'macresearch', label: '宏观研究' },
|
||||
{ value: 'brokerreport', label: '券商晨报' },
|
||||
{ value: 'industry', label: '行业研报' },
|
||||
{ value: 'stock', label: '个股研报' },
|
||||
],
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import got from '@/utils/got';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/search/:keyword',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/eastmoney/search/web3',
|
||||
parameters: { keyword: '关键词,可以设置为自己需要检索的关键词' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -6,7 +6,8 @@ import timezone from '@/utils/timezone';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/ttjj/user/:uid',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.SocialMedia,
|
||||
example: '/eastmoney/ttjj/user/6551094298949188',
|
||||
parameters: { uid: '用户id, 可以通过天天基金App分享用户主页到浏览器,在相应的URL中找到' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/express-news',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/fastbull/express-news',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -11,7 +11,8 @@ import path from 'node:path';
|
|||
|
||||
export const route: Route = {
|
||||
path: ['/news', '/'],
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/fastbull/news',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
|
@ -12,9 +12,15 @@ const categories = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:category?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/finviz',
|
||||
parameters: { category: 'Category, see below, News by default' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: 'Category, see below, News by default',
|
||||
options: Object.keys(categories).map((key) => ({ value: key, label: key })),
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,40 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { apiUrl, favicon, getBParam, getBuildId, getGToken, parseList, parseItem } from './utils';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/:categoryId?/:lang?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/followin',
|
||||
parameters: { categoryId: 'Category ID, see table below, `1` by default', lang: 'Language, see table below, `en` by default' },
|
||||
parameters: {
|
||||
categoryId: {
|
||||
description: 'Category ID',
|
||||
options: [
|
||||
{ value: '1', label: 'For You' },
|
||||
{ value: '9', label: 'Market' },
|
||||
{ value: '13', label: 'Meme' },
|
||||
{ value: '14', label: 'BRC20' },
|
||||
{ value: '3', label: 'NFT' },
|
||||
{ value: '5', label: 'Thread' },
|
||||
{ value: '6', label: 'In-depth' },
|
||||
{ value: '8', label: 'Tutorials' },
|
||||
{ value: '11', label: 'Videos' },
|
||||
],
|
||||
default: '1',
|
||||
},
|
||||
lang: {
|
||||
description: 'Language',
|
||||
options: [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'zh-Hans', label: '简体中文' },
|
||||
{ value: 'zh-Hant', label: '繁體中文' },
|
||||
{ value: 'vi', label: 'Tiếng Việt' },
|
||||
],
|
||||
default: 'en',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,25 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { baseUrl, favicon, getBuildId, parseList, parseItem } from './utils';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/news/:lang?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/followin/news',
|
||||
parameters: { lang: 'Language, see table above, `en` by default' },
|
||||
parameters: {
|
||||
lang: {
|
||||
description: 'Language',
|
||||
options: [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'zh-Hans', label: '简体中文' },
|
||||
{ value: 'zh-Hant', label: '繁體中文' },
|
||||
{ value: 'vi', label: 'Tiếng Việt' },
|
||||
],
|
||||
default: 'en',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import { load } from 'cheerio';
|
||||
import got from '@/utils/got';
|
||||
|
|
@ -7,7 +7,8 @@ import timezone from '@/utils/timezone';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/kx',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Notifications,
|
||||
example: '/fx678/kx',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -6,9 +6,21 @@ import { parseItem } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/home/:tag?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/home',
|
||||
parameters: { tag: '分类标签,见下表,默认为 `web_home_page`' },
|
||||
parameters: {
|
||||
tag: {
|
||||
description: '分类标签,见下表,默认为 `web_home_page`',
|
||||
options: [
|
||||
{ value: 'web_home_page', label: '推荐' },
|
||||
{ value: 'stock', label: '股票' },
|
||||
{ value: 'fund', label: '基金' },
|
||||
{ value: 'new_stock', label: '新股' },
|
||||
{ value: 'research', label: '研报' },
|
||||
],
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -6,9 +6,18 @@ import { parseItem } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/hot-article/:type?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/hot-article',
|
||||
parameters: { type: '`day` 为日排行,`week` 为周排行,默认为 `day`' },
|
||||
parameters: {
|
||||
type: {
|
||||
description: '`day` 为日排行,`week` 为周排行,默认为 `day`',
|
||||
options: [
|
||||
{ value: 'day', label: '日排行' },
|
||||
{ value: 'week', label: '周排行' },
|
||||
],
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
@ -24,7 +33,7 @@ export const route: Route = {
|
|||
},
|
||||
],
|
||||
name: '最热文章',
|
||||
maintainers: [],
|
||||
maintainers: ['nczitzk'],
|
||||
handler,
|
||||
url: 'gelonghui.com/',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -6,7 +6,8 @@ import { parseItem } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/keyword/:keyword',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/keyword/早报',
|
||||
parameters: { keyword: '搜索关键字' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -11,7 +11,8 @@ const baseUrl = 'https://www.gelonghui.com';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/live',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/live',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -7,7 +7,8 @@ import { parseItem } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/subject/:id',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/subject/4',
|
||||
parameters: { id: '主题编号,可在主题页 URL 中找到' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -6,7 +6,8 @@ import { parseItem } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/user/:id',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gelonghui/user/5273',
|
||||
parameters: { id: '用户编号,可在用户页 URL 中找到' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -12,7 +12,8 @@ import { config } from '@/config';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:important?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Notifications,
|
||||
example: '/jin10',
|
||||
parameters: { important: '只看重要,任意值开启,留空关闭' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -7,7 +7,8 @@ import { config } from '@/config';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/topic/:id',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/jin10/topic/396',
|
||||
parameters: { id: 'N' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -19,9 +19,16 @@ const categories = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/lives/:category?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Notifications,
|
||||
example: '/jinse/lives',
|
||||
parameters: { category: '分类,见下表,默认为全部' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: '分类',
|
||||
options: Object.entries(categories).map(([value, label]) => ({ value, label })),
|
||||
default: '0',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -11,9 +11,31 @@ import path from 'node:path';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/timeline/:category?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/jinse/timeline',
|
||||
parameters: { category: '分类,见下表,默认为头条' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: '分类',
|
||||
options: [
|
||||
{ value: '头条', label: '头条' },
|
||||
{ value: '独家', label: '独家' },
|
||||
{ value: '铭文', label: '铭文' },
|
||||
{ value: '产业', label: '产业' },
|
||||
{ value: '项目', label: '项目' },
|
||||
{ value: '政策', label: '政策' },
|
||||
{ value: 'AI', label: 'AI' },
|
||||
{ value: 'Web 3.0', label: 'Web 3.0' },
|
||||
{ value: '以太坊 2.0', label: '以太坊 2.0' },
|
||||
{ value: 'DeFi', label: 'DeFi' },
|
||||
{ value: 'Layer2', label: 'Layer2' },
|
||||
{ value: 'NFT', label: 'NFT' },
|
||||
{ value: 'DAO', label: 'DAO' },
|
||||
{ value: '百科', label: '百科' },
|
||||
],
|
||||
default: '头条',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Data, Route } from '@/types';
|
||||
import { Data, Route, ViewType } from '@/types';
|
||||
import type { Context } from 'hono';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -97,6 +97,8 @@ const render = (data) => art(path.join(__dirname, 'templates', 'community-descri
|
|||
|
||||
export const route: Route = {
|
||||
path: '/community',
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/jiuyangongshe/community',
|
||||
maintainers: ['TonyRL'],
|
||||
name: '社群',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -8,7 +8,8 @@ const rootUrl = 'https://www.laohu8.com';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/personal/:id',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/laohu8/personal/3527667596890271',
|
||||
parameters: { id: '用户 ID,见网址链接' },
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import { categories } from './category-map';
|
||||
|
|
@ -8,9 +8,16 @@ const endpoint = `${baseUrl}/wp-json`;
|
|||
|
||||
export const route: Route = {
|
||||
path: '/cn/:category?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/mckinsey/cn',
|
||||
parameters: { category: '分类,见下表,默认为全部' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: '分类',
|
||||
options: Object.entries(categories).map(([value, label]) => ({ value, label: label.name })),
|
||||
default: '25',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -7,9 +7,49 @@ import { parseDate } from '@/utils/parse-date';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:id?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/stcn/yw',
|
||||
parameters: { id: '栏目 id,见下表,默认为要闻' },
|
||||
parameters: {
|
||||
id: {
|
||||
description: '栏目 id',
|
||||
options: [
|
||||
{ value: 'kx', label: '快讯' },
|
||||
{ value: 'yw', label: '要闻' },
|
||||
{ value: 'gs', label: '股市' },
|
||||
{ value: 'company', label: '公司' },
|
||||
{ value: 'data', label: '数据' },
|
||||
{ value: 'fund', label: '基金' },
|
||||
{ value: 'finance', label: '金融' },
|
||||
{ value: 'comment', label: '评论' },
|
||||
{ value: 'cj', label: '产经' },
|
||||
{ value: 'ct', label: '创投' },
|
||||
{ value: 'kcb', label: '科创板' },
|
||||
{ value: 'xsb', label: '新三板' },
|
||||
{ value: 'tj', label: '投教' },
|
||||
{ value: 'zk', label: 'ESG' },
|
||||
{ value: 'gd', label: '滚动' },
|
||||
{ value: 'gsyl', label: '股市一览' },
|
||||
{ value: 'djjd', label: '独家解读' },
|
||||
{ value: 'gsxw', label: '公司新闻' },
|
||||
{ value: 'gsdt', label: '公司动态' },
|
||||
{ value: 'djsj', label: '独家数据' },
|
||||
{ value: 'kd', label: '看点数据' },
|
||||
{ value: 'zj', label: '资金流向' },
|
||||
{ value: 'sj_kcb', label: '科创板' },
|
||||
{ value: 'hq', label: '行情总貌' },
|
||||
{ value: 'zl', label: '专栏' },
|
||||
{ value: 'author', label: '作者' },
|
||||
{ value: 'cjhy', label: '行业' },
|
||||
{ value: 'cjqc', label: '汽车' },
|
||||
{ value: 'tjkt', label: '投教课堂' },
|
||||
{ value: 'zczs', label: '政策知识' },
|
||||
{ value: 'tjdt', label: '投教动态' },
|
||||
{ value: 'zthd', label: '专题活动' },
|
||||
],
|
||||
default: 'yw',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import { getData, getList } from './utils';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/daily-updates/news',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Notifications,
|
||||
example: '/stockedge/daily-updates/news',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -6,7 +6,8 @@ import dayjs from 'dayjs';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/express',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/techflowpost/express',
|
||||
radar: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import timezone from '@/utils/timezone';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
@ -12,6 +12,8 @@ export const route: Route = {
|
|||
},
|
||||
],
|
||||
name: '首页',
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
maintainers: ['nczitzk'],
|
||||
handler,
|
||||
url: 'techflowpost.com/',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -41,9 +41,29 @@ const channelMap = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:channel?/:original?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/theblockbeats/newsflash',
|
||||
parameters: { channel: '类型,见下表,默认为快讯', original: '文章类型,仅 `channel` 为 `article` 时有效,见下表,留空为全部' },
|
||||
parameters: {
|
||||
channel: {
|
||||
description: '类型',
|
||||
options: [
|
||||
{ value: 'newsflash', label: '快讯' },
|
||||
{ value: 'article', label: '文章' },
|
||||
],
|
||||
default: 'newsflash',
|
||||
},
|
||||
original: {
|
||||
description: '文章类型,仅 `channel` 为 `article` 时有效',
|
||||
options: [
|
||||
{ value: '0', label: '全部' },
|
||||
{ value: '1', label: '深度' },
|
||||
{ value: '2', label: '精选' },
|
||||
{ value: '3', label: '热点追踪' },
|
||||
],
|
||||
default: '0',
|
||||
},
|
||||
},
|
||||
name: '新闻快讯',
|
||||
maintainers: ['Fatpandac', 'jameshih'],
|
||||
handler,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -6,9 +6,24 @@ import { parseDate } from '@/utils/parse-date';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/materials/:id?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/youzhiyouxing/materials',
|
||||
parameters: { id: '分类,见下表,默认为全部' },
|
||||
parameters: {
|
||||
id: {
|
||||
description: '分类',
|
||||
options: [
|
||||
{ value: '0', label: '全部' },
|
||||
{ value: '4', label: '知行小酒馆' },
|
||||
{ value: '2', label: '知行黑板报' },
|
||||
{ value: '10', label: '无人知晓' },
|
||||
{ value: '1', label: '孟岩专栏' },
|
||||
{ value: '3', label: '知行读书会' },
|
||||
{ value: '11', label: '你好,同路人' },
|
||||
],
|
||||
default: '0',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -70,7 +70,8 @@ const ids = {
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:id?/:category?',
|
||||
categories: ['finance'],
|
||||
categories: ['finance', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/zhitongcaijing',
|
||||
parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,默认为 recommend,即推荐', category: '分类 id,可在对应栏目子分类页 URL 中找到,默认为全部' },
|
||||
features: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue