/lib/$1""
}
- },
- ""_moduleAliases"": {
- ""@"": ""./lib""
}
}"
f4c9ad41c42b8879a2470f975956dc89e6080206,2020-12-03 14:17:37,dependabot-preview[bot],chore(deps-dev): bump eslint-plugin-prettier from 3.1.4 to 3.2.0,False,bump eslint-plugin-prettier from 3.1.4 to 3.2.0,chore,"diff --git a/package.json b/package.json
index 83c64d2c718fc2..ee8464e6542880 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
""entities"": ""2.1.0"",
""eslint"": ""7.14.0"",
""eslint-config-prettier"": ""6.15.0"",
- ""eslint-plugin-prettier"": ""3.1.4"",
+ ""eslint-plugin-prettier"": ""3.2.0"",
""jest"": ""26.6.3"",
""mockdate"": ""3.0.2"",
""nock"": ""13.0.5"",
diff --git a/yarn.lock b/yarn.lock
index a6cebf53c013de..fe31e8070d9c7d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4990,10 +4990,10 @@ eslint-config-prettier@6.15.0:
dependencies:
get-stdin ""^6.0.0""
-eslint-plugin-prettier@3.1.4:
- version ""3.1.4""
- resolved ""https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2""
- integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==
+eslint-plugin-prettier@3.2.0:
+ version ""3.2.0""
+ resolved ""https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz#af391b2226fa0e15c96f36c733f6e9035dbd952c""
+ integrity sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg==
dependencies:
prettier-linter-helpers ""^1.0.0"""
4b84b0dbd7204f125633f60a7805f952e0067d09,2023-03-11 20:07:17,cxfksword,feat(route): add VCB-Studio (#12074),False,add VCB-Studio (#12074),feat,"diff --git a/docs/anime.md b/docs/anime.md
index cfac9ad97f0811..19fb30caacc489 100644
--- a/docs/anime.md
+++ b/docs/anime.md
@@ -436,6 +436,22 @@ Sources
+## VCB-Studio
+
+### 最新文章
+
+
+
+### 分类文章
+
+
+
+| 作品项目 | 科普系列 | 计划与日志 |
+| ----- | ---- | ------- |
+| works | kb | planlog |
+
+
+
## Vol.moe
### vol
diff --git a/lib/v2/vcb-s/category.js b/lib/v2/vcb-s/category.js
new file mode 100644
index 00000000000000..68a7d3b4bbaec4
--- /dev/null
+++ b/lib/v2/vcb-s/category.js
@@ -0,0 +1,51 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+const rootUrl = 'https://vcb-s.com';
+const cateAPIUrl = `${rootUrl}/wp-json/wp/v2/categories`;
+const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`;
+
+module.exports = async (ctx) => {
+ const cate = ctx.params.cate;
+ const limit = ctx.query.limit ?? 7;
+
+ const cateUrl = `${cateAPIUrl}?slug=${cate}`;
+ const category = await ctx.cache.tryGet(cateUrl, async () => {
+ const res = await got.get(cateUrl);
+
+ if (typeof res.data === 'string') {
+ res.data = JSON.parse(res.body.trim());
+ }
+ return res.data[0];
+ });
+
+ const url = `${postsAPIUrl}?categories=${category.id}&page=1&per_page=${limit}&_embed`;
+ const response = await got.get(url);
+ if (typeof response.data === 'string') {
+ response.data = JSON.parse(response.body.trim());
+ }
+ const data = response.data;
+
+ const items = data.map((item) => {
+ const description = art(path.join(__dirname, 'templates/post.art'), {
+ post: item.content.rendered.replace(/(.*?)<\/pre>/gs, '$1
').replace(/(.*?)<\/div>/gs, '$1
'),
+ medias: item._embedded['wp:featuredmedia'],
+ });
+
+ return {
+ title: item.title.rendered,
+ link: item.link,
+ description,
+ pubDate: parseDate(item.date_gmt),
+ author: item._embedded.author[0].name,
+ };
+ });
+
+ ctx.state.data = {
+ title: `${category.name} | VCB-Studio`,
+ link: `${rootUrl}/archives/category/${category.slug}`,
+ item: items,
+ };
+};
diff --git a/lib/v2/vcb-s/index.js b/lib/v2/vcb-s/index.js
new file mode 100644
index 00000000000000..4801e13069d250
--- /dev/null
+++ b/lib/v2/vcb-s/index.js
@@ -0,0 +1,39 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const { art } = require('@/utils/render');
+const path = require('path');
+
+const rootUrl = 'https://vcb-s.com';
+const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`;
+
+module.exports = async (ctx) => {
+ const limit = ctx.query.limit ?? 7;
+ const url = `${postsAPIUrl}?per_page=${limit}&_embed`;
+
+ const response = await got.get(url);
+ if (typeof response.data === 'string') {
+ response.data = JSON.parse(response.body.trim());
+ }
+ const data = response.data;
+
+ const items = data.map((item) => {
+ const description = art(path.join(__dirname, 'templates/post.art'), {
+ post: item.content.rendered.replace(/(.*?)<\/pre>/gs, '$1
').replace(/(.*?)<\/div>/gs, '$1
'),
+ medias: item._embedded['wp:featuredmedia'],
+ });
+
+ return {
+ title: item.title.rendered,
+ link: item.link,
+ description,
+ pubDate: parseDate(item.date_gmt),
+ author: item._embedded.author[0].name,
+ };
+ });
+
+ ctx.state.data = {
+ title: 'VCB-Studio - 大家一起实现的故事!',
+ link: rootUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/vcb-s/maintainer.js b/lib/v2/vcb-s/maintainer.js
new file mode 100644
index 00000000000000..f23ed63842cb75
--- /dev/null
+++ b/lib/v2/vcb-s/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ '/': ['cxfksword'],
+ '/category/:cate': ['cxfksword'],
+};
diff --git a/lib/v2/vcb-s/radar.js b/lib/v2/vcb-s/radar.js
new file mode 100644
index 00000000000000..3f4f8083651f45
--- /dev/null
+++ b/lib/v2/vcb-s/radar.js
@@ -0,0 +1,19 @@
+module.exports = {
+ 'vcb-s.com': {
+ _name: 'VCB-Studio',
+ '.': [
+ {
+ title: '最新文章',
+ docs: 'https://docs.rsshub.app/anime.html#vcb-studio',
+ source: ['/'],
+ target: '/vcb-s',
+ },
+ {
+ title: '分类文章',
+ docs: 'https://docs.rsshub.app/anime.html#vcb-studio',
+ source: ['/archives/category/:cate'],
+ target: '/vcb-s/category/:cate',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/vcb-s/router.js b/lib/v2/vcb-s/router.js
new file mode 100644
index 00000000000000..18fb0db3d1d5f4
--- /dev/null
+++ b/lib/v2/vcb-s/router.js
@@ -0,0 +1,4 @@
+module.exports = (router) => {
+ router.get('/', require('./index'));
+ router.get('/category/:cate', require('./category'));
+};
diff --git a/lib/v2/vcb-s/templates/post.art b/lib/v2/vcb-s/templates/post.art
new file mode 100644
index 00000000000000..2f026e84c5b6c6
--- /dev/null
+++ b/lib/v2/vcb-s/templates/post.art
@@ -0,0 +1,9 @@
+
+{{ if medias }}
+{{ each medias media }}
+
+{{ /each }}
+{{ /if }}
+{{ if post }}
+{{@ post }}
+{{ /if }}"
e6d01108cc4f548e9d884139335c505771cae9fa,2024-11-08 19:01:08,dependabot[bot],chore(deps): bump @scalar/hono-api-reference from 0.5.158 to 0.5.159 (#17507),False,bump @scalar/hono-api-reference from 0.5.158 to 0.5.159 (#17507),chore,"diff --git a/package.json b/package.json
index 87a7ac155723cf..cc61c5c07d3945 100644
--- a/package.json
+++ b/package.json
@@ -64,7 +64,7 @@
""@opentelemetry/semantic-conventions"": ""1.27.0"",
""@postlight/parser"": ""2.2.3"",
""@rss3/sdk"": ""0.0.23"",
- ""@scalar/hono-api-reference"": ""0.5.158"",
+ ""@scalar/hono-api-reference"": ""0.5.159"",
""@sentry/node"": ""7.119.1"",
""@tonyrl/rand-user-agent"": ""2.0.81"",
""aes-js"": ""3.1.2"",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2ad040fd32436c..bbb2f8fc3c9b6d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -54,8 +54,8 @@ importers:
specifier: 0.0.23
version: 0.0.23
'@scalar/hono-api-reference':
- specifier: 0.5.158
- version: 0.5.158(hono@4.6.9)
+ specifier: 0.5.159
+ version: 0.5.159(hono@4.6.9)
'@sentry/node':
specifier: 7.119.1
version: 7.119.1
@@ -1746,18 +1746,18 @@ packages:
'@rss3/sdk@0.0.23':
resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==}
- '@scalar/hono-api-reference@0.5.158':
- resolution: {integrity: sha512-2P7l/ivuC/RWpAKddLtkqIZ89TA5/QlpfEBrdpH9/yjn4NpR5XkbtT+/8uZVELCyjfUMpGcaNXrxuJERFJ3sxA==}
+ '@scalar/hono-api-reference@0.5.159':
+ resolution: {integrity: sha512-nUKaN0CKvytbXPj9b6taF/efKKRqEUwhVxlfLVjrJXN0eHNHDWxG9e/5Tyw1o2MXJo1cQpGZ4qTh48k/8u6ZjA==}
engines: {node: '>=18'}
peerDependencies:
hono: ^4.0.0
- '@scalar/openapi-types@0.1.4':
- resolution: {integrity: sha512-+wRXgmqzgDnj8Dxqf4OOPMPo4or/LRd1Bsy4pnrIW0yBt8rKSdtBb+jH/aRnhgDDmKVjWxJ+KFk7WlSKvZwNTw==}
+ '@scalar/openapi-types@0.1.5':
+ resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==}
engines: {node: '>=18'}
- '@scalar/types@0.0.18':
- resolution: {integrity: sha512-gfJB/e9Rq/vjsiWlNwBkaIAZVb9v5guHQB5uVoVFcU0gdAuXni0KVxFxl3gGTu2zhBdB+DkixjyPcNzpqwksmA==}
+ '@scalar/types@0.0.19':
+ resolution: {integrity: sha512-wOxtXd35BS0DaVhBopQUB8c8hfLQ+/PKEr99GbOZW+4DWCrEB8JfWJgvpJyxHU6by7LHNVY4fvpFQR7Ezh1IIw==}
engines: {node: '>=18'}
'@sec-ant/readable-stream@0.4.1':
@@ -7295,16 +7295,16 @@ snapshots:
'@rss3/api-core': 0.0.23
'@rss3/api-utils': 0.0.23
- '@scalar/hono-api-reference@0.5.158(hono@4.6.9)':
+ '@scalar/hono-api-reference@0.5.159(hono@4.6.9)':
dependencies:
- '@scalar/types': 0.0.18
+ '@scalar/types': 0.0.19
hono: 4.6.9
- '@scalar/openapi-types@0.1.4': {}
+ '@scalar/openapi-types@0.1.5': {}
- '@scalar/types@0.0.18':
+ '@scalar/types@0.0.19':
dependencies:
- '@scalar/openapi-types': 0.1.4
+ '@scalar/openapi-types': 0.1.5
'@unhead/schema': 1.11.11
'@sec-ant/readable-stream@0.4.1': {}"
7565a7d2d872fe89ece5cd682468ac3e44fe8545,2020-10-03 04:47:52,233yeee,feat: add 中国人大网 (#5772),False,add 中国人大网 (#5772),feat,"diff --git a/docs/government.md b/docs/government.md
index fdf5ca977bc522..39315111bdf319 100644
--- a/docs/government.md
+++ b/docs/government.md
@@ -133,6 +133,16 @@ pageClass: routes
+## 中国人大网
+
+
+
+| 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 |
+| ---- | ---- | ---- | ---- | -------- | -------- |
+| c183 | c184 | c185 | c189 | c12435 | c10134 |
+
+
+
## 中国信息通信研究院
### 白皮书
diff --git a/lib/router.js b/lib/router.js
index 89f567a781a1b6..8be0af7959e7dd 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -3269,4 +3269,7 @@ router.get('/nobelprize/:caty?', require('./routes/nobelprize/index'));
// 中華民國國防部
router.get('/gov/taiwan/mnd', require('./routes/gov/taiwan/mnd'));
+// 中国人大网
+router.get('/npc/:caty', require('./routes/npc/index'));
+
module.exports = router;
diff --git a/lib/routes/npc/index.js b/lib/routes/npc/index.js
new file mode 100644
index 00000000000000..4fcb8365519a77
--- /dev/null
+++ b/lib/routes/npc/index.js
@@ -0,0 +1,42 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const { caty } = ctx.params;
+ // 主页
+ const response = await got(`http://www.npc.gov.cn/npc/${caty}/list.shtml`);
+ const data = response.body;
+ const $ = cheerio.load(data, { decodeEntities: false });
+ const title = $('title').text();
+ // 获取每条的链接
+ const links = $('.clist a')
+ .map((index, item) => [$(item).attr('href')])
+ .get();
+ // 获取标题、日期
+ const list = await Promise.all(
+ links.map(async (link) => {
+ const response = await got(`http://www.npc.gov.cn${link}`);
+ const data = response.body;
+ const $ = cheerio.load(data, { decodeEntities: false });
+ const title = $('title').text().replace('_中国人大网', '');
+ const time = $('span.fr').text();
+ const description = $('#Zoom p')
+ .map((index, item) => $.html(item))
+ .get()
+ .join('');
+ return Promise.resolve([title, link, time, description]);
+ })
+ );
+ // 整合
+ ctx.state.data = {
+ title: title,
+ link: `http://www.npc.gov.cn/npc/${caty}/list.shtml`,
+ description: title,
+ item: list.map((item) => ({
+ title: item[0],
+ link: `http://www.npc.gov.cn${item[1]}`,
+ pubDate: new Date(item[2].substr(0, 4), parseInt(item[2].substr(5, 2)) - 1, item[2].substr(8, 2), item[2].substr(12, 2), item[2].substr(15, 2), item[2].substr(18, 2)).toUTCString(),
+ description: item[3],
+ })),
+ };
+};"
56e998d0a9b81ac2a40379605231073a9eb6f954,2022-07-05 18:13:47,Ethan Shen,fix(route): 櫻坂46博客 (#10131),False,櫻坂46博客 (#10131),fix,"diff --git a/docs/new-media.md b/docs/new-media.md
index 61a4f8908a9005..50dfe6795a355f 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -1432,7 +1432,34 @@ Supported sub-sites:
### 櫻坂 46 博客
-
+
+
+| 编号 | 姓名 |
+| -- | ------ |
+| 03 | 上村 莉菜 |
+| 04 | 尾関 梨香 |
+| 06 | 小池 美波 |
+| 07 | 小林 由依 |
+| 08 | 齋藤 冬優花 |
+| 11 | 菅井 友香 |
+| 14 | 土生 瑞穂 |
+| 15 | 原田 葵 |
+| 43 | 井上 梨名 |
+| 53 | 遠藤 光莉 |
+| 54 | 大園 玲 |
+| 55 | 大沼 晶保 |
+| 56 | 幸阪 茉里乃 |
+| 44 | 関 有美子 |
+| 45 | 武元 唯衣 |
+| 46 | 田村 保乃 |
+| 47 | 藤吉 夏鈴 |
+| 57 | 増本 綺良 |
+| 48 | 松田 里奈 |
+| 50 | 森田 ひかる |
+| 58 | 守屋 麗奈 |
+| 51 | 山﨑 天 |
+
+
### 日向坂 46 新闻
diff --git a/lib/router.js b/lib/router.js
index bff9ff3e7e0bf2..2439a78ae2c2de 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -1894,7 +1894,7 @@ router.get('/keyakizaka46/news', lazyloadRouteHandler('./routes/keyakizaka46/new
router.get('/hinatazaka46/news', lazyloadRouteHandler('./routes/hinatazaka46/news'));
router.get('/keyakizaka46/blog', lazyloadRouteHandler('./routes/keyakizaka46/blog'));
router.get('/hinatazaka46/blog', lazyloadRouteHandler('./routes/hinatazaka46/blog'));
-router.get('/sakurazaka46/blog', lazyloadRouteHandler('./routes/sakurazaka46/blog'));
+// router.get('/sakurazaka46/blog', lazyloadRouteHandler('./routes/sakurazaka46/blog'));
// 酷安
router.get('/coolapk/tuwen/:type?', lazyloadRouteHandler('./routes/coolapk/tuwen'));
diff --git a/lib/routes/sakurazaka46/blog.js b/lib/routes/sakurazaka46/blog.js
deleted file mode 100644
index f2d743bde9a0f8..00000000000000
--- a/lib/routes/sakurazaka46/blog.js
+++ /dev/null
@@ -1,38 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: 'https://sakurazaka46.com/s/s46/diary/blog',
- headers: {
- Referer: 'https://sakurazaka46.com/',
- },
- });
-
- const data = response.data;
- const $ = cheerio.load(data);
- const list = $('ul.com-blog-part li');
- let itemPicUrl;
-
- ctx.state.data = {
- allowEmpty: true,
- title: '櫻坂46 公式ブログ',
- link: 'https://sakurazaka46.com/s/s46/diary/blog',
- item:
- list &&
- list
- .map((index, item) => {
- item = $(item);
- itemPicUrl = item.find('div.wrap-bg span.img').attr('style').replace('background-image: url(', '').replace(');', '');
- return {
- title: item.find('div.date-title h3.title').text().trim(),
- link: item.find('a').first().attr('href'),
- pubDate: item.find('div.date-title p.date').text(),
- author: item.find('div.prof-in p.name').text().trim(),
- description: `
`,
- };
- })
- .get(),
- };
-};
diff --git a/lib/v2/sakurazaka46/blog.js b/lib/v2/sakurazaka46/blog.js
new file mode 100644
index 00000000000000..bb03565a839cf0
--- /dev/null
+++ b/lib/v2/sakurazaka46/blog.js
@@ -0,0 +1,54 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const timezone = require('@/utils/timezone');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const id = ctx.params.id ?? '';
+
+ const rootUrl = 'https://sakurazaka46.com';
+ const currentUrl = `${rootUrl}/s/s46/diary/blog/list${id ? `?ct=${id}` : ''}`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ let items = $('.com-blog-part .box a')
+ .toArray()
+ .map((item) => {
+ item = $(item);
+
+ return {
+ title: item.text(),
+ author: item.find('.name').text(),
+ link: `${rootUrl}${item.attr('href')}`,
+ };
+ });
+
+ items = await Promise.all(
+ items.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+
+ const content = cheerio.load(detailResponse.data);
+
+ item.description = content('.box-article').html();
+ item.pubDate = timezone(parseDate(content('.blog-foot .date').text()), +9);
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `${$('title').text()}${id ? ` - ${$('.name').first().text()}` : ''}`,
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/sakurazaka46/maintainer.js b/lib/v2/sakurazaka46/maintainer.js
new file mode 100644
index 00000000000000..92b2a643d6671a
--- /dev/null
+++ b/lib/v2/sakurazaka46/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/blog/:id?': ['victor21813', 'nczitzk'],
+};
diff --git a/lib/v2/sakurazaka46/radar.js b/lib/v2/sakurazaka46/radar.js
new file mode 100644
index 00000000000000..23bb42c4d80c91
--- /dev/null
+++ b/lib/v2/sakurazaka46/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'sakurazaka46.com': {
+ _name: '櫻坂46',
+ '.': [
+ {
+ title: '公式ブログ',
+ docs: 'https://docs.rsshub.app/new-media.html#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')}`,
+ },
+ ],
+ },
+};
diff --git a/lib/v2/sakurazaka46/router.js b/lib/v2/sakurazaka46/router.js
new file mode 100644
index 00000000000000..22505a9f862300
--- /dev/null
+++ b/lib/v2/sakurazaka46/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/blog/:id?', require('./blog'));
+};"
a60a81de65fa9eaa51440b486d71f35051054fe3,2024-01-16 06:45:08,dependabot[bot],chore(deps-dev): bump nock from 13.4.0 to 13.5.0 (#14254),False,bump nock from 13.4.0 to 13.5.0 (#14254),chore,"diff --git a/package.json b/package.json
index 41db0a8d5ec8bb..2afa1e5a876ed0 100644
--- a/package.json
+++ b/package.json
@@ -195,7 +195,7 @@
""jest-junit"": ""16.0.0"",
""lint-staged"": ""15.2.0"",
""mockdate"": ""3.0.5"",
- ""nock"": ""13.4.0"",
+ ""nock"": ""13.5.0"",
""nodemon"": ""3.0.2"",
""prettier"": ""3.2.2"",
""remark"": ""14.0.3"",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6e077ff013d6ba..74715f7ae4262e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -338,8 +338,8 @@ devDependencies:
specifier: 3.0.5
version: 3.0.5
nock:
- specifier: 13.4.0
- version: 13.4.0
+ specifier: 13.5.0
+ version: 13.5.0
nodemon:
specifier: 3.0.2
version: 3.0.2
@@ -6839,8 +6839,8 @@ packages:
lower-case: 1.1.4
dev: false
- /nock@13.4.0:
- resolution: {integrity: sha512-W8NVHjO/LCTNA64yxAPHV/K47LpGYcVzgKd3Q0n6owhwvD0Dgoterc25R4rnZbckJEb6Loxz1f5QMuJpJnbSyQ==}
+ /nock@13.5.0:
+ resolution: {integrity: sha512-9hc1eCS2HtOz+sE9W7JQw/tXJktg0zoPSu48s/pYe73e25JW9ywiowbqnUSd7iZPeVawLcVpPZeZS312fwSY+g==}
engines: {node: '>= 10.13'}
dependencies:
debug: 4.3.4(supports-color@5.5.0)"
3b89ca084e96e6fd71f9ff02e61acefc45d7c72f,2022-06-07 03:42:42,dependabot[bot],chore(deps): bump rand-user-agent from 1.0.65 to 1.0.66 (#9909),False,bump rand-user-agent from 1.0.65 to 1.0.66 (#9909),chore,"diff --git a/package.json b/package.json
index a63648a21c09d8..20aa90c2fffe32 100644
--- a/package.json
+++ b/package.json
@@ -122,7 +122,7 @@
""puppeteer-extra"": ""3.2.3"",
""puppeteer-extra-plugin-stealth"": ""2.9.0"",
""query-string"": ""7.1.1"",
- ""rand-user-agent"": ""1.0.65"",
+ ""rand-user-agent"": ""1.0.66"",
""require-all"": ""3.0.0"",
""rss-parser"": ""3.12.0"",
""showdown"": ""2.1.0"",
diff --git a/yarn.lock b/yarn.lock
index fa8efb10d4fad2..aeb2584c3c75ff 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -11468,10 +11468,10 @@ ramda@^0.26.1:
resolved ""https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06""
integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ==
-rand-user-agent@1.0.65:
- version ""1.0.65""
- resolved ""https://registry.yarnpkg.com/rand-user-agent/-/rand-user-agent-1.0.65.tgz#c33eb859245c725f6b3d55820ba7fb87e6ece23b""
- integrity sha512-QLUI7l+0GQt/IpMEyamViPmknirXFGGpTIhxfizhBggrfUciwBh4h9iSgetRDzVHksogUdjMezNEdnoiOV/PuA==
+rand-user-agent@1.0.66:
+ version ""1.0.66""
+ resolved ""https://registry.yarnpkg.com/rand-user-agent/-/rand-user-agent-1.0.66.tgz#15830bb6c28e398a9d0bb08973e4c5113aaa9942""
+ integrity sha512-qi/JhTAhE4BODL5pDp3DjdMRVTDoWrbeEH1myjdaa7ioI4AnWP1KZrisrcc1AnBs6KypH5bLnV2QJsImEXEKcA==
randexp@0.4.6:
version ""0.4.6"""
17626929149b79251acf30a3eb03fa7e610af0c4,2024-03-08 21:05:33,Enoch Ma,fix(route): show correct author name (AEON) (#14721),False,show correct author name (AEON) (#14721),fix,"diff --git a/lib/routes/aeon/utils.ts b/lib/routes/aeon/utils.ts
index 52d558503d980e..c24e7f0183d251 100644
--- a/lib/routes/aeon/utils.ts
+++ b/lib/routes/aeon/utils.ts
@@ -29,14 +29,14 @@ const getData = async (ctx, list) => {
// e.g. https://aeon.co/essays/how-to-mourn-a-forest-a-lesson-from-west-papua .
// But that's very rare.
- item.author = data.props.pageProps.article.authors.map((author) => author.displayName).join(', ');
+ item.author = data.props.pageProps.article.authors.map((author) => author.name).join(', ');
const article = data.props.pageProps.article;
const capture = load(article.body);
const banner = article.thumbnail?.urls?.header;
capture('p.pullquote').remove();
- const authorsBio = article.authors.map((author) => '' + author.displayName + author.authorBio.replaceAll(/^
/g, ' ')).join('');
+ const authorsBio = article.authors.map((author) => '
' + author.name + author.authorBio.replaceAll(/^
/g, ' ')).join('');
item.description = art(path.join(__dirname, 'templates/essay.art'), { banner, authorsBio, content: capture.html() });
}"
ac018809138d4c3078b94441255310b43ec33555,2022-02-10 00:11:32,dependabot[bot],chore(deps-dev): bump @types/cheerio from 0.22.30 to 0.22.31 (#9050),False,bump @types/cheerio from 0.22.30 to 0.22.31 (#9050),chore,"diff --git a/package.json b/package.json
index b55ed207a1512c..e81a41af022245 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
""homepage"": ""https://github.com/DIYgod/RSSHub#readme"",
""devDependencies"": {
""@napi-rs/pinyin"": ""1.7.0"",
- ""@types/cheerio"": ""0.22.30"",
+ ""@types/cheerio"": ""0.22.31"",
""@types/got"": ""9.6.12"",
""@types/koa"": ""2.13.4"",
""@vercel/nft"": ""0.17.4"",
diff --git a/yarn.lock b/yarn.lock
index 6475eadb155fd1..97e6b934640e7f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1598,10 +1598,10 @@
resolved ""https://registry.yarnpkg.com/@types/chance/-/chance-1.1.3.tgz#d19fe9391288d60fdccd87632bfc9ab2b4523fea""
integrity sha512-X6c6ghhe4/sQh4XzcZWSFaTAUOda38GQHmq9BUanYkOE/EO7ZrkazwKmtsj3xzTjkLWmwULE++23g3d3CCWaWw==
-""@types/cheerio@0.22.30"":
- version ""0.22.30""
- resolved ""https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.30.tgz#6c1ded70d20d890337f0f5144be2c5e9ce0936e6""
- integrity sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==
+""@types/cheerio@0.22.31"":
+ version ""0.22.31""
+ resolved ""https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.31.tgz#b8538100653d6bb1b08a1e46dec75b4f2a5d5eb6""
+ integrity sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==
dependencies:
""@types/node"" ""*"""
096e57d429f0072314cd0dacf7268a04c895a5c2,2024-08-19 22:22:21,Andvari,fix(route/gisreportsonlline): Restore linefeed (#16487),False,Restore linefeed (#16487),fix,"diff --git a/lib/routes/gisreportsonline/index.ts b/lib/routes/gisreportsonline/index.ts
index fb90dd51d490d1..fcf9b2ff49cce4 100644
--- a/lib/routes/gisreportsonline/index.ts
+++ b/lib/routes/gisreportsonline/index.ts
@@ -45,7 +45,7 @@ async function handler(ctx) {
item.description = content('header.entry-header ~ :not(#pos-conclusion ~ *)')
.toArray()
- .map((e) => content(e).html())
+ .map((e) => content(e).prop('outerHTML'))
.join('');
return item;"
dafa855b81b2caa7ed6324b66424f032cd8bb248,2022-02-09 18:25:58,dependabot[bot],chore(deps): bump googleapis from 91.0.0 to 95.0.0 (#8992),False,bump googleapis from 91.0.0 to 95.0.0 (#8992),chore,"diff --git a/package.json b/package.json
index c56b3b4cc71400..6d15464ada3efb 100644
--- a/package.json
+++ b/package.json
@@ -92,7 +92,7 @@
""etag"": ""1.8.1"",
""fanfou-sdk"": ""4.2.0"",
""git-rev-sync"": ""3.0.1"",
- ""googleapis"": ""91.0.0"",
+ ""googleapis"": ""95.0.0"",
""got"": ""11.8.3"",
""https-proxy-agent"": ""5.0.0"",
""iconv-lite"": ""0.6.3"",
diff --git a/yarn.lock b/yarn.lock
index 94489a234dd958..ddcaa934b909b8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6333,10 +6333,10 @@ googleapis-common@^5.0.2:
url-template ""^2.0.8""
uuid ""^8.0.0""
-googleapis@91.0.0:
- version ""91.0.0""
- resolved ""https://registry.yarnpkg.com/googleapis/-/googleapis-91.0.0.tgz#c5e51ca568ed687f0694a082237c7b7b96a19b3b""
- integrity sha512-iHqXZwgYam0g8n0Yyi+YHx8kgwT+H5O4k3fe0LB1JhWRp1dSKYu+ShY4PQbW584zLOE4kK3LHf2B+x1THx+ZPQ==
+googleapis@95.0.0:
+ version ""95.0.0""
+ resolved ""https://registry.yarnpkg.com/googleapis/-/googleapis-95.0.0.tgz#63f6e28e78874044585f1e86c100a308a44fb385""
+ integrity sha512-ZpFZW7FDwcjQa2+xZNS2SC5sK2s46iWKA5QSFVJSK3RELQec4PYHhzKwzbeCzt4urnjYp6udPif95zXTFxbtRA==
dependencies:
google-auth-library ""^7.0.2""
googleapis-common ""^5.0.2"""
0615d26ab1d6ef691bd274473fec0fd3e3c41413,2024-05-03 21:53:02,Tony,chore: fix depedabot upgrade,False,fix depedabot upgrade,chore,"diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d3d9d120ec810f..c67d7e01c29471 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -15,6 +15,30 @@ permissions:
contents: read
jobs:
+ fix-pnpmp-lock:
+ # workaround for https://github.com/dependabot/dependabot-core/issues/7258
+ # until https://github.com/pnpm/pnpm/issues/6530 is fixed
+ if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request'
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: pnpm/action-setup@v3
+ with:
+ version: 8
+ - uses: actions/setup-node@v4
+ with:
+ node-version: lts/*
+ cache: 'pnpm'
+ - run: |
+ rm pnpm-lock.yaml
+ pnpm i
+ - uses: stefanzweifel/git-auto-commit-action@v5
+ with:
+ commit_message: 'chore: fix pnpm install'
+
vitest:
runs-on: ubuntu-latest
timeout-minutes: 10"
8e27ffcc3d08aaf5a533db7c2468f9e315849fb4,2025-02-24 14:06:17,dependabot[bot],chore(deps): bump @tonyrl/rand-user-agent from 2.0.81 to 2.0.83 (#18443),False,bump @tonyrl/rand-user-agent from 2.0.81 to 2.0.83 (#18443),chore,"diff --git a/package.json b/package.json
index 4388bff6874630..a26991879faf95 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
""@rss3/sdk"": ""0.0.25"",
""@scalar/hono-api-reference"": ""0.5.175"",
""@sentry/node"": ""9.1.0"",
- ""@tonyrl/rand-user-agent"": ""2.0.81"",
+ ""@tonyrl/rand-user-agent"": ""2.0.83"",
""aes-js"": ""3.1.2"",
""art-template"": ""4.13.2"",
""cheerio"": ""1.0.0"",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e178c3d46a8b65..f81f037bd09b5f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -66,8 +66,8 @@ importers:
specifier: 9.1.0
version: 9.1.0
'@tonyrl/rand-user-agent':
- specifier: 2.0.81
- version: 2.0.81
+ specifier: 2.0.83
+ version: 2.0.83
aes-js:
specifier: 3.1.2
version: 3.1.2
@@ -2065,8 +2065,8 @@ packages:
resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==}
engines: {node: '>=14.16'}
- '@tonyrl/rand-user-agent@2.0.81':
- resolution: {integrity: sha512-pL8is8iSle1gVPeNGSIKNpnyDaxSChWAtG7Kbbx1wq91Y8NJ+O+S/AsNvrQ7GVzKZF7rPTiRGl2eHNDVjdR2/A==}
+ '@tonyrl/rand-user-agent@2.0.83':
+ resolution: {integrity: sha512-FqifQhfeJ1WojY8j6s7D3qcs20KhZwVggirT7btqi7g5bSTbbD4v0cuhxHaASyHlv3R757Jum2ro03dRVUXgVw==}
engines: {node: '>=14.16'}
'@tootallnate/quickjs-emscripten@0.23.0':
@@ -7836,7 +7836,7 @@ snapshots:
dependencies:
defer-to-connect: 2.0.1
- '@tonyrl/rand-user-agent@2.0.81': {}
+ '@tonyrl/rand-user-agent@2.0.83': {}
'@tootallnate/quickjs-emscripten@0.23.0': {}"
bd759b49d6f959072ce285af1f4c11456413ef00,2023-06-07 20:44:57,Youssif Shaaban Alsager,feat(route): Add Rattibha Twitter user threads (#12630),False,Add Rattibha Twitter user threads (#12630),feat,"diff --git a/docs/en/social-media.md b/docs/en/social-media.md
index d4c1dc9e8855a5..f06f6bd4983a7e 100644
--- a/docs/en/social-media.md
+++ b/docs/en/social-media.md
@@ -376,6 +376,12 @@ Only for self-hosted
+## Rattibha
+
+### User Threads
+
+
+
## Telegram
### Channel
diff --git a/lib/v2/rattibha/maintainer.js b/lib/v2/rattibha/maintainer.js
new file mode 100644
index 00000000000000..6a82a2f6393743
--- /dev/null
+++ b/lib/v2/rattibha/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/user/:user': ['yshalsager'],
+};
diff --git a/lib/v2/rattibha/radar.js b/lib/v2/rattibha/radar.js
new file mode 100644
index 00000000000000..6678dc36967c8c
--- /dev/null
+++ b/lib/v2/rattibha/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'rattibha.com': {
+ _name: 'رتبها - Rattibha',
+ '.': [
+ {
+ title: 'User Threads',
+ docs: 'https://docs.rsshub.app/en/social-media.html#rattibha',
+ source: ['/:user'],
+ target: '/rattibha/user/:user',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/rattibha/router.js b/lib/v2/rattibha/router.js
new file mode 100644
index 00000000000000..c0a2646ba9ce91
--- /dev/null
+++ b/lib/v2/rattibha/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/user/:user', require('./user'));
+};
diff --git a/lib/v2/rattibha/user.js b/lib/v2/rattibha/user.js
new file mode 100644
index 00000000000000..8aa1dbc6406021
--- /dev/null
+++ b/lib/v2/rattibha/user.js
@@ -0,0 +1,43 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const baseUrl = 'https://rattibha.com';
+ const { user: twitterUser } = ctx.params;
+
+ const {
+ data: { user: userData },
+ } = await got(`${baseUrl}/user?id=${twitterUser}`, {
+ headers: {
+ accept: 'application/json',
+ },
+ });
+ const { data: userThreads } = await got(`${baseUrl}/u_threads?id=${userData.account_user_id}`, { headers: { accept: 'application/json' } });
+
+ // extract the relevant data from the API response
+ const list = userThreads.map((item) => ({
+ title: item.thread.t.info.text,
+ link: `${baseUrl}/thread/${item.thread_id}`,
+ pubDate: parseDate(item.thread.created_at),
+ updated: parseDate(item.thread.updated_at),
+ author: userData.name,
+ api_link: `${baseUrl}/threads?id=${item.thread_id}`,
+ }));
+
+ // Get tweet full text
+ const items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.api_link, async () => {
+ const { data: threads } = await got(item.api_link, { headers: { accept: 'application/json' } });
+ item.description = threads.reduce((accumulator, tweet) => `${accumulator}${tweet.tweet_detail.info.text}
`, '');
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `سلاسل تغريدات ${twitterUser}`,
+ link: `${baseUrl}/${twitterUser}`,
+ item: items,
+ };
+};"
bbeefb0962ce028483fe793b5b837153dec5b3c2,2024-02-05 17:39:51,github-actions[bot],style: auto format,False,auto format,style,"diff --git a/website/docs/routes/government.mdx b/website/docs/routes/government.mdx
index da920cce827c40..71ca7b15e8564f 100644
--- a/website/docs/routes/government.mdx
+++ b/website/docs/routes/government.mdx
@@ -12,9 +12,9 @@
-## Constitutional Court of Baden-Württemberg (Germany) {#constitutional-court-of-baden-wvrttemberg-germany}
+## Constitutional Court of Baden-Württemberg (Germany) {#constitutional-court-of-baden-w%C3%BCrttemberg-germany}
-### Press releases {#constitutional-court-of-baden-wvrttemberg-germany-press-releases}
+### Press releases {#constitutional-court-of-baden-w%C3%BCrttemberg-germany-press-releases}
diff --git a/website/docs/routes/other.mdx b/website/docs/routes/other.mdx
index c697910947312f..abca26609334ef 100644
--- a/website/docs/routes/other.mdx
+++ b/website/docs/routes/other.mdx
@@ -121,7 +121,7 @@ See [#app-store-mac-app-store](/routes/program-update#app-store-mac-app-store)
-### Macao Pagina Electrónica Especial Contra Epidemias: What’s New {#corona-virus-disease-2019-macao-pagina-electronica-especial-contra-epidemias-what-s-new}
+### 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}
Official Website: [https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx](https://www.ssm.gov.mo/apps1/PreventWuhanInfection/en.aspx)"
bb99de6957b10b823b11ce6294015f431428cab1,2020-07-21 22:18:39,dependabot-preview[bot],chore(deps): bump @sentry/node from 5.19.2 to 5.20.0,False,bump @sentry/node from 5.19.2 to 5.20.0,chore,"diff --git a/package.json b/package.json
index c0b6ec9e36e21d..6f7c91c7014d2f 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
""dependencies"": {
""@koa/router"": ""9.3.1"",
""@postlight/mercury-parser"": ""2.2.0"",
- ""@sentry/node"": ""5.19.2"",
+ ""@sentry/node"": ""5.20.0"",
""aes-js"": ""3.1.2"",
""art-template"": ""4.13.2"",
""cheerio"": ""1.0.0-rc.3"",
diff --git a/yarn.lock b/yarn.lock
index e13bdfc01cc554..fef1a3a57bc6cf 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1312,83 +1312,83 @@
dependencies:
safe-buffer ""^5.0.1""
-""@sentry/apm@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/apm/-/apm-5.19.2.tgz#369fdcbc9fa5db992f707b24f3165e106a277cf7""
- integrity sha512-V7p5niqG/Nn1OSMAyreChiIrQFYzFHKADKNaDEvIXqC4hxFnMG8lPRqEFJH49fNjsFBFfIG9iY1rO1ZFg3S42Q==
- dependencies:
- ""@sentry/browser"" ""5.19.2""
- ""@sentry/hub"" ""5.19.2""
- ""@sentry/minimal"" ""5.19.2""
- ""@sentry/types"" ""5.19.2""
- ""@sentry/utils"" ""5.19.2""
+""@sentry/apm@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/apm/-/apm-5.20.0.tgz#14c1900ce83582c988c7620ab41d0d2d95956059""
+ integrity sha512-6zfMRYXG/9VzsmgQqYqFFvg/5XJYOimY/KIrJAijemMLb0Xhwu3xw/2eelWxkWilTBXUWO+dQel5P7JBA8QsKw==
+ dependencies:
+ ""@sentry/browser"" ""5.20.0""
+ ""@sentry/hub"" ""5.20.0""
+ ""@sentry/minimal"" ""5.20.0""
+ ""@sentry/types"" ""5.20.0""
+ ""@sentry/utils"" ""5.20.0""
tslib ""^1.9.3""
-""@sentry/browser@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/browser/-/browser-5.19.2.tgz#8bad445b8d1efd50e6510bb43b3018b941f6e5cb""
- integrity sha512-o6Z532n+0N5ANDzgR9GN+Q6CU7zVlIJvBEW234rBiB+ZZj6XwTLS1dD+JexGr8lCo8PeXI2rypKcj1jUGLVW8w==
+""@sentry/browser@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/browser/-/browser-5.20.0.tgz#010ae9a09060ca1859dcc1dbfa186798db82ef7e""
+ integrity sha512-xVPL7/RuAPcemfSzXiyPHAt4M+0BfzkdTlN+PZb6frCEo4k6E0UiN6WLsGj/iwa2gXhyfTQXtbTuP+tDuNPEJw==
dependencies:
- ""@sentry/core"" ""5.19.2""
- ""@sentry/types"" ""5.19.2""
- ""@sentry/utils"" ""5.19.2""
+ ""@sentry/core"" ""5.20.0""
+ ""@sentry/types"" ""5.20.0""
+ ""@sentry/utils"" ""5.20.0""
tslib ""^1.9.3""
-""@sentry/core@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/core/-/core-5.19.2.tgz#99a64ef0e55230fc02a083c48fa07ada85de4929""
- integrity sha512-sfbBsVXpA0WYJUichz5IhvqKD8xJUfQvsszrTsUKa7PQAMAboOmuh6bo8KquaVQnAZyZWZU08UduvlSV3tA7tw==
+""@sentry/core@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/core/-/core-5.20.0.tgz#4c6daad108af94cd0ec5a13fd20b2bfe61ccd586""
+ integrity sha512-fzzWKEolc0O6H/phdDenzKs7JXDSb0sooxVn0QCUkwWSzACALQh+NR/UciOXyhyuoUiqu4zthYQx02qtGqizeQ==
dependencies:
- ""@sentry/hub"" ""5.19.2""
- ""@sentry/minimal"" ""5.19.2""
- ""@sentry/types"" ""5.19.2""
- ""@sentry/utils"" ""5.19.2""
+ ""@sentry/hub"" ""5.20.0""
+ ""@sentry/minimal"" ""5.20.0""
+ ""@sentry/types"" ""5.20.0""
+ ""@sentry/utils"" ""5.20.0""
tslib ""^1.9.3""
-""@sentry/hub@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/hub/-/hub-5.19.2.tgz#ab7f3d2d253c3441b2833a530b17c6de2418b2c7""
- integrity sha512-2KkEYX4q9TDCOiaVEo2kQ1W0IXyZxJxZtIjDdFQyes9T4ubYlKHAbvCjTxHSQv37lDO4t7sOIApWG9rlkHzlEA==
+""@sentry/hub@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/hub/-/hub-5.20.0.tgz#3c8ceb29debaea4184bca210cfa7fdd4aad639cb""
+ integrity sha512-DiU8fpjAAMOgSx5tsTekMtHPCAtSNWSNS91FFkDCqPn6fYG+/aK/hB5kTlJwr+GTM1815+WWrtXP6y2ecSmZuA==
dependencies:
- ""@sentry/types"" ""5.19.2""
- ""@sentry/utils"" ""5.19.2""
+ ""@sentry/types"" ""5.20.0""
+ ""@sentry/utils"" ""5.20.0""
tslib ""^1.9.3""
-""@sentry/minimal@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.19.2.tgz#0fc2fdf9911a0cb31b52f7ccad061b74785724a3""
- integrity sha512-rApEOkjy+ZmkeqEItgFvUFxe5l+dht9AumuUzq74pWp+HJqxxv9IVTusKppBsE1adjtmyhwK4O3Wr8qyc75xlw==
+""@sentry/minimal@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.20.0.tgz#309ab4159b44ce3350698294e47da97903593dad""
+ integrity sha512-oA+0g7p3bapzjgGKQIkSjcjA85VG1HPmjxBD9wpRvNjmYuVmm80Cl1H/P+xg/hupw/kNmASAX4IOd5Z9pEeboA==
dependencies:
- ""@sentry/hub"" ""5.19.2""
- ""@sentry/types"" ""5.19.2""
+ ""@sentry/hub"" ""5.20.0""
+ ""@sentry/types"" ""5.20.0""
tslib ""^1.9.3""
-""@sentry/node@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/node/-/node-5.19.2.tgz#8c1c2f6c983c3d8b25143e5b99c4b6cc745125ec""
- integrity sha512-gbww3iTWkdvYIAhOmULbv8znKwkIpklGJ0SPtAh0orUMuaa0lVht+6HQIhRgeXp50lMzNaYC3fuzkbFfYgpS7A==
- dependencies:
- ""@sentry/apm"" ""5.19.2""
- ""@sentry/core"" ""5.19.2""
- ""@sentry/hub"" ""5.19.2""
- ""@sentry/types"" ""5.19.2""
- ""@sentry/utils"" ""5.19.2""
- cookie ""^0.3.1""
+""@sentry/node@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/node/-/node-5.20.0.tgz#8efd42aa86289c0ba98eca7601b4d5032bcae3a5""
+ integrity sha512-xOSP+sWptQff1dQR8G9DCpATT99odsnEpg+X/uqW6bUvjfgsabiPN4nc/orwkTNtm4MhffZiXVq48IAgl/x8Uw==
+ dependencies:
+ ""@sentry/apm"" ""5.20.0""
+ ""@sentry/core"" ""5.20.0""
+ ""@sentry/hub"" ""5.20.0""
+ ""@sentry/types"" ""5.20.0""
+ ""@sentry/utils"" ""5.20.0""
+ cookie ""^0.4.1""
https-proxy-agent ""^5.0.0""
lru_map ""^0.3.3""
tslib ""^1.9.3""
-""@sentry/types@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/types/-/types-5.19.2.tgz#ead586f0b64b91c396d3521b938ca25f7b59d655""
- integrity sha512-O6zkW8oM1qK5Uma9+B/UMlmlm9/gkw9MooqycWuEhIaKfDBj/yVbwb/UTiJmNkGc5VJQo0v1uXUZZQt6/Xq1GA==
+""@sentry/types@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/types/-/types-5.20.0.tgz#0bccbc96ce6fabd115545ec4e70c78ba6c506644""
+ integrity sha512-/9tiGiXBRsOKM66HeCpt0iSF0vnAIqHzXgC97icNQIstx/ZA8tcLs9540cHDeaN0cyZUyZF1o8ECqcLXGNODWQ==
-""@sentry/utils@5.19.2"":
- version ""5.19.2""
- resolved ""https://registry.yarnpkg.com/@sentry/utils/-/utils-5.19.2.tgz#f2819d9de5abc33173019e81955904247e4a8246""
- integrity sha512-gEPkC0CJwvIWqcTcPSdIzqJkJa9N5vZzUZyBvdu1oiyJu7MfazpJEvj3whfJMysSfXJQxoJ+a1IPrA73VY23VA==
+""@sentry/utils@5.20.0"":
+ version ""5.20.0""
+ resolved ""https://registry.yarnpkg.com/@sentry/utils/-/utils-5.20.0.tgz#d67636d83a3001008ad442e3a13f6cc88d48aaf6""
+ integrity sha512-w0AeAzWEf35h9U9QL/4lgS9MqaTPjeSmQYNU/n4ef3FKr+u8HP68Ra7NZ0adiKgi67Yxr652kWopOLPl7CxvZg==
dependencies:
- ""@sentry/types"" ""5.19.2""
+ ""@sentry/types"" ""5.20.0""
tslib ""^1.9.3""
""@sindresorhus/is@^0.14.0"":
@@ -3695,10 +3695,10 @@ cookie@0.4.0:
resolved ""https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba""
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
-cookie@^0.3.1:
- version ""0.3.1""
- resolved ""https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb""
- integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
+cookie@^0.4.1:
+ version ""0.4.1""
+ resolved ""https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1""
+ integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
cookiejar@^2.1.0:
version ""2.1.2"""
4356fad91a268c81b8dacd2e3d9d07dbdce231a0,2023-10-28 18:37:14,eternasuno,feat(route): add yomujp route (#13595),False,add yomujp route (#13595),feat,"diff --git a/lib/v2/yomujp/level.js b/lib/v2/yomujp/level.js
new file mode 100644
index 00000000000000..3aea6201035fa2
--- /dev/null
+++ b/lib/v2/yomujp/level.js
@@ -0,0 +1,101 @@
+const { parseDate } = require('@/utils/parse-date');
+const cheerio = require('cheerio');
+const got = require('@/utils/got');
+const md5 = require('@/utils/md5');
+
+module.exports = async (ctx) => {
+ const level = formatLevel(ctx.params.level);
+ const url = new URL('https://yomujp.com/wp-json/wp/v2/posts');
+ url.searchParams.append('categories', getLevel(level));
+ url.searchParams.append('per_page', parseInt(ctx.query.limit) || 10);
+ const posts = await get(url);
+
+ const item = posts.map((post) => {
+ const $ = cheerio.load(post.content.rendered.replace(/[\n\t\r]/g, ''));
+ const audio = $('audio.vapfem_audio>source');
+ const description = $('section')
+ .slice(2, -2)
+ .find('.elementor-widget-text-editor>div,.elementor-widget-image>div>img')
+ .map((_, el) => {
+ if (el.tagName === 'img') {
+ return `
`;
+ } else if (el.firstChild.tagName === 'p') {
+ return `
${$(el.firstChild).html()}
`;
+ } else {
+ return `${$(el).html()}
`;
+ }
+ })
+ .get()
+ .join('');
+
+ return {
+ title: post.title.rendered,
+ author: $('section:last-of-type p:first-of-type').text().replace(/^.+:/, ''),
+ description,
+ pubDate: parseDate(post.date_gmt),
+ updated: parseDate(post.modified_gmt),
+ guid: md5(post.guid.rendered),
+ link: post.link,
+ itunes_item_image: $('section:nth-of-type(2) img').attr('src'),
+ enclosure_url: audio.attr('src'),
+ enclosure_type: audio.attr('type'),
+ };
+ });
+
+ ctx.state.data = {
+ title: level ? `${level.toUpperCase()} | 日本語多読道場` : '日本語多読道場',
+ link: `https://yomujp.com/${level}`,
+ description: 'みなさん、こんにちは。 「 日本語多読道場(にほんごたどくどうじょう) Yomujp」は日本語を勉強する人のための読みものサイト(website)です。 日本の地理、食べもの、動物、植物、文化や歴史などを紹介します。',
+ language: 'ja-jp',
+ 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();
+
+ switch (lowerCaseLevel) {
+ case 'n6':
+ return 'n5l';
+
+ case 'n5l':
+ case 'n5':
+ case 'n4':
+ case 'n3':
+ case 'n2':
+ case 'n1':
+ return lowerCaseLevel;
+
+ default:
+ return '';
+ }
+};
+
+const getLevel = (level) => {
+ switch (level) {
+ case 'n6':
+ case 'n5l':
+ return '27';
+ case 'n5':
+ return '26';
+ case 'n4':
+ return '21';
+ case 'n3':
+ return '20';
+ case 'n2':
+ return '19';
+ case 'n1':
+ return '17';
+
+ default:
+ return '17,19,20,21,26,27';
+ }
+};
+
+const get = async (url) => {
+ const response = await got({ method: 'get', url });
+
+ return response.data;
+};
diff --git a/lib/v2/yomujp/maintainer.js b/lib/v2/yomujp/maintainer.js
new file mode 100644
index 00000000000000..5eb6ed44cbdfe8
--- /dev/null
+++ b/lib/v2/yomujp/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/:level?': ['eternasuno'],
+};
diff --git a/lib/v2/yomujp/radar.js b/lib/v2/yomujp/radar.js
new file mode 100644
index 00000000000000..8e11ddbd170acd
--- /dev/null
+++ b/lib/v2/yomujp/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ '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/v2/yomujp/router.js b/lib/v2/yomujp/router.js
new file mode 100644
index 00000000000000..d5dbd51f17a451
--- /dev/null
+++ b/lib/v2/yomujp/router.js
@@ -0,0 +1,3 @@
+module.exports = (router) => {
+ router.get('/:level?', require('./level'));
+};
diff --git a/website/docs/routes/reading.md b/website/docs/routes/reading.md
index 6deedf5699f8db..6a7316ce459097 100644
--- a/website/docs/routes/reading.md
+++ b/website/docs/routes/reading.md
@@ -511,6 +511,12 @@ count 的取值范围为 1-12,为防止请求次数过多,推荐设置为 5
+## 日本語多読道場 {#ri-ben-yu-duo-du-dao-chang}
+
+### 等级 {#ri-ben-yu-duo-du-dao-chang-deng-ji}
+
+
+
## 生物帮 {#sheng-wu-bang}
### 所有栏目 {#sheng-wu-bang-suo-you-lan-mu}"
442d68e1895e02f1b1580d9d7831a35a8a06e293,2023-12-18 22:19:24,DIYgod,feat: remove notOperational routes - new media,False,remove notOperational routes - new media,feat,"diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index 3efaa733017636..b25731c043a9ae 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -346,27 +346,7 @@
},
],
},
- 'buaq.net': { _name: '不安全资讯', '.': [{ title: '不安全资讯', docs: 'http://docs.rsshub.app/routes/new-media#bu-an-quan', source: '/', target: '/buaq' }] },
'jian-ning.com': { _name: '建宁闲谈', '.': [{ title: '文章', docs: 'https://docs.rsshub.app/routes/blog#jian-ning-xian-tan', source: '/*', target: '/blogs/jianning' }] },
- 'matataki.io': {
- _name: 'matataki',
- www: [
- { title: '最热作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/article/', target: '/matataki/posts/hot' },
- { title: '最新作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/article/latest', target: '/matataki/posts/latest' },
- { title: '作者创作', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/user/:uid', target: (params) => `/matataki/users/${params.uid}/posts` },
- { title: 'Fan票关联作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: ['/token/:tokenId', '/token/:tokenId/circle'], target: (params) => `/matataki/tokens/${params.tokenId}/posts` },
- {
- title: '标签关联作品',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: ['/tag/:tagId'],
- target: (params, url) => {
- const tagName = new URL(url).searchParams.get('name');
- return `/matataki/tags/${params.tagId}/${tagName}/posts`;
- },
- },
- { title: '收藏夹', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/user/:uid/favlist/:fid', target: (params) => `/matataki/users/${params.uid}/favorites/${params.fid}/posts` },
- ],
- },
'eventernote.com': { _name: 'Eventernote', www: [{ title: '声优活动及演唱会', docs: 'https://docs.rsshub.app/routes/anime#eventernote', source: '/actors/:name/:id/events', target: '/eventernote/actors/:name/:id' }] },
'huya.com': { _name: '虎牙直播', '.': [{ title: '直播间开播', docs: 'https://docs.rsshub.app/routes/live#hu-ya-zhi-bo-zhi-bo-jian-kai-bo', source: '/:id', target: '/huya/live/:id' }] },
'craigslist.org': { _name: 'Craigslist', '.': [{ title: '商品搜索列表', docs: 'https://docs.rsshub.app/routes/shopping#craigslist' }] },
diff --git a/lib/radar-rules.js b/lib/radar-rules.js
index 4a54c681eae28a..bb6356062e3d26 100644
--- a/lib/radar-rules.js
+++ b/lib/radar-rules.js
@@ -925,17 +925,6 @@ module.exports = {
},
],
},
- 'buaq.net': {
- _name: '不安全资讯',
- '.': [
- {
- title: '不安全资讯',
- docs: 'http://docs.rsshub.app/routes/new-media#bu-an-quan',
- source: '/',
- target: '/buaq',
- },
- ],
- },
'jian-ning.com': {
_name: '建宁闲谈',
'.': [
@@ -947,50 +936,6 @@ module.exports = {
},
],
},
- 'matataki.io': {
- _name: 'matataki',
- www: [
- {
- title: '最热作品',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: '/article/',
- target: '/matataki/posts/hot',
- },
- {
- title: '最新作品',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: '/article/latest',
- target: '/matataki/posts/latest',
- },
- {
- title: '作者创作',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: '/user/:uid',
- target: (params) => `/matataki/users/${params.uid}/posts`,
- },
- {
- title: 'Fan票关联作品',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: ['/token/:tokenId', '/token/:tokenId/circle'],
- target: (params) => `/matataki/tokens/${params.tokenId}/posts`,
- },
- {
- title: '标签关联作品',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: ['/tag/:tagId'],
- target: (params, url) => {
- const tagName = new URL(url).searchParams.get('name');
- return `/matataki/tags/${params.tagId}/${tagName}/posts`;
- },
- },
- {
- title: '收藏夹',
- docs: 'https://docs.rsshub.app/routes/new-media#matataki',
- source: '/user/:uid/favlist/:fid',
- target: (params) => `/matataki/users/${params.uid}/favorites/${params.fid}/posts`,
- },
- ],
- },
'huya.com': {
_name: '虎牙直播',
'.': [
diff --git a/lib/router.js b/lib/router.js
index 0443025b3b253a..fcb036837fc866 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -40,9 +40,6 @@ router.get('/mzitu/tag/:tag', lazyloadRouteHandler('./routes/mzitu/tag'));
// pixiv-fanbox
router.get('/fanbox/:user?', lazyloadRouteHandler('./routes/fanbox/main'));
-// 法律白話文運動
-router.get('/plainlaw/archives', lazyloadRouteHandler('./routes/plainlaw/archives.js'));
-
// Dockone
router.get('/dockone/weekly', lazyloadRouteHandler('./routes/dockone/weekly'));
@@ -51,9 +48,6 @@ router.get('/zcfy', lazyloadRouteHandler('./routes/zcfy/index'));
router.get('/zcfy/index', lazyloadRouteHandler('./routes/zcfy/index')); // 废弃
router.get('/zcfy/hot', lazyloadRouteHandler('./routes/zcfy/hot'));
-// 今日头条
-router.get('/jinritoutiao/keyword/:keyword', lazyloadRouteHandler('./routes/jinritoutiao/keyword'));
-
// Disqus
router.get('/disqus/posts/:forum', lazyloadRouteHandler('./routes/disqus/posts'));
@@ -131,9 +125,6 @@ router.get('/one', lazyloadRouteHandler('./routes/one/index'));
// Thunderbird
router.get('/thunderbird/release', lazyloadRouteHandler('./routes/thunderbird/release'));
-// tuicool
-router.get('/tuicool/mags/:type', lazyloadRouteHandler('./routes/tuicool/mags'));
-
// Hexo
router.get('/hexo/next/:url', lazyloadRouteHandler('./routes/hexo/next'));
router.get('/hexo/yilia/:url', lazyloadRouteHandler('./routes/hexo/yilia'));
@@ -169,9 +160,6 @@ router.get('/wikipedia/mainland', lazyloadRouteHandler('./routes/wikipedia/mainl
// 联合国 United Nations
router.get('/un/scveto', lazyloadRouteHandler('./routes/un/scveto'));
-// e 公司
-// router.get('/egsea/flash', lazyloadRouteHandler('./routes/egsea/flash'));
-
// 选股宝
router.get('/xuangubao/subject/:subject_id', lazyloadRouteHandler('./routes/xuangubao/subject'));
@@ -493,7 +481,6 @@ router.get('/geekpark/breakingnews', lazyloadRouteHandler('./routes/geekpark/bre
// 百度
router.get('/baidu/doodles', lazyloadRouteHandler('./routes/baidu/doodles'));
// router.get('/baidu/topwords/:boardId?', lazyloadRouteHandler('./routes/baidu/topwords'));
-router.get('/baidu/daily', lazyloadRouteHandler('./routes/baidu/daily'));
// 搜狗
router.get('/sogou/doodles', lazyloadRouteHandler('./routes/sogou/doodles'));
@@ -513,13 +500,6 @@ router.get('/gnn/gnn', lazyloadRouteHandler('./routes/gnn/gnn'));
// a9vg游戏新闻
router.get('/a9vg/a9vg', lazyloadRouteHandler('./routes/a9vg/a9vg'));
-// IT桔子
-router.get('/itjuzi/invest', lazyloadRouteHandler('./routes/itjuzi/invest'));
-router.get('/itjuzi/merge', lazyloadRouteHandler('./routes/itjuzi/merge'));
-
-// 探物
-router.get('/tanwu/products', lazyloadRouteHandler('./routes/tanwu/products'));
-
// GitChat
router.get('/gitchat/newest/:category?/:selected?', lazyloadRouteHandler('./routes/gitchat/newest'));
@@ -607,7 +587,6 @@ router.get('/tingdiantz/95598/:province/:city/:district?', lazyloadRouteHandler(
// PMCAFF
router.get('/pmcaff/list/:typeid', lazyloadRouteHandler('./routes/pmcaff/list'));
router.get('/pmcaff/feed/:typeid', lazyloadRouteHandler('./routes/pmcaff/feed'));
-router.get('/pmcaff/user/:userid', lazyloadRouteHandler('./routes/pmcaff/user'));
// icourse163
router.get('/icourse163/newest', lazyloadRouteHandler('./routes/icourse163/newest'));
@@ -706,10 +685,6 @@ router.get('/duozhi', lazyloadRouteHandler('./routes/duozhi'));
// 高清电台
router.get('/gaoqing/latest', lazyloadRouteHandler('./routes/gaoqing/latest'));
-// 鲸跃汽车
-router.get('/whalegogo/home', lazyloadRouteHandler('./routes/whalegogo/home'));
-router.get('/whalegogo/portal/:type_id/:tagid?', lazyloadRouteHandler('./routes/whalegogo/portal'));
-
// LeetCode
// router.get('/leetcode/articles', lazyloadRouteHandler('./routes/leetcode/articles'));
router.get('/leetcode/submission/us/:user', lazyloadRouteHandler('./routes/leetcode/check-us'));
@@ -725,9 +700,6 @@ router.get('/sketch/updates', lazyloadRouteHandler('./routes/sketch/updates'));
// 每日安全
router.get('/security/pulses', lazyloadRouteHandler('./routes/security/pulses'));
-// DoNews
-router.get('/donews/:column?', lazyloadRouteHandler('./routes/donews/index'));
-
// WeGene
router.get('/wegene/column/:type/:category', lazyloadRouteHandler('./routes/wegene/column'));
router.get('/wegene/newest', lazyloadRouteHandler('./routes/wegene/newest'));
@@ -739,9 +711,6 @@ router.get('/instapaper/person/:name', lazyloadRouteHandler('./routes/instapaper
router.get('/ui-cn/article', lazyloadRouteHandler('./routes/ui-cn/article'));
router.get('/ui-cn/user/:id', lazyloadRouteHandler('./routes/ui-cn/user'));
-// 决胜网
-router.get('/juesheng', lazyloadRouteHandler('./routes/juesheng'));
-
// 一些博客
// 敬维-以认真的态度做完美的事情: https://jingwei.link/
router.get('/blogs/jingwei.link', lazyloadRouteHandler('./routes/blogs/jingwei_link'));
@@ -755,9 +724,6 @@ router.get('/blogs/wang54/:id?', lazyloadRouteHandler('./routes/blogs/wang54'));
// WordPress
router.get('/blogs/wordpress/:domain/:https?', lazyloadRouteHandler('./routes/blogs/wordpress'));
-// 西祠胡同
-router.get('/xici/:id?', lazyloadRouteHandler('./routes/xici'));
-
// 今日热榜 migrated to v2
// router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub'));
@@ -819,15 +785,9 @@ router.get('/matters/author/:uid', lazyloadRouteHandler('./routes/matters/author
// MobData
router.get('/mobdata/report', lazyloadRouteHandler('./routes/mobdata/report'));
-// 谷雨
-router.get('/tencent/guyu/channel/:name', lazyloadRouteHandler('./routes/tencent/guyu/channel'));
-
// 古诗文网
router.get('/gushiwen/recommend/:annotation?', lazyloadRouteHandler('./routes/gushiwen/recommend'));
-// 电商在线
-router.get('/imaijia/category/:category', lazyloadRouteHandler('./routes/imaijia/category'));
-
// 21财经
router.get('/21caijing/channel/:name', lazyloadRouteHandler('./routes/21caijing/channel'));
@@ -898,10 +858,6 @@ router.get('/paidai/news', lazyloadRouteHandler('./routes/paidai/news'));
// 漫画db
router.get('/manhuadb/comics/:id', lazyloadRouteHandler('./routes/manhuadb/comics'));
-// 装备前线
-router.get('/zfrontier/postlist/:type', lazyloadRouteHandler('./routes/zfrontier/postlist'));
-router.get('/zfrontier/board/:boardId', lazyloadRouteHandler('./routes/zfrontier/board_postlist'));
-
// Hpoi 手办维基
router.get('/hpoi/info/:type?', lazyloadRouteHandler('./routes/hpoi/info'));
router.get('/hpoi/:category/:words', lazyloadRouteHandler('./routes/hpoi'));
@@ -925,7 +881,7 @@ router.get('/enclavebooks/collection/:uid', lazyloadRouteHandler('./routes/encla
router.get('/digitaling/index', lazyloadRouteHandler('./routes/digitaling/index'));
// 数英网文章专题
-router.get('/digitaling/articles/:category/:subcate', lazyloadRouteHandler('./routes/digitaling/article'));
+router.get('/digitaling/articles/:category/:subcate?', lazyloadRouteHandler('./routes/digitaling/article'));
// 数英网项目专题
router.get('/digitaling/projects/:category', lazyloadRouteHandler('./routes/digitaling/project'));
@@ -939,9 +895,6 @@ router.get('/maxnews/dota2', lazyloadRouteHandler('./routes/maxnews/dota2'));
// 柠檬 - 私房歌
router.get('/ningmeng/song', lazyloadRouteHandler('./routes/ningmeng/song'));
-// 紫竹张先生
-router.get('/zzz/:category?/:language?', lazyloadRouteHandler('./routes/zzz'));
-
// AlgoCasts
router.get('/algocasts', lazyloadRouteHandler('./routes/algocasts/all'));
@@ -982,19 +935,12 @@ router.get('/dekudeals/:type', lazyloadRouteHandler('./routes/dekudeals'));
// 快科技(原驱动之家)
// router.get('/kkj/news', lazyloadRouteHandler('./routes/kkj/news'));
-// sixthtone
-router.get('/sixthtone/news', lazyloadRouteHandler('./routes/sixthtone/news'));
-
// AI研习社
router.get('/aiyanxishe/:id/:sort?', lazyloadRouteHandler('./routes/aiyanxishe/home'));
// 活动行
router.get('/huodongxing/explore', lazyloadRouteHandler('./routes/hdx/explore'));
-// 巴比特作者专栏
-router.get('/8btc/:authorid', lazyloadRouteHandler('./routes/8btc/author'));
-router.get('/8btc/news/flash', lazyloadRouteHandler('./routes/8btc/news/flash'));
-
// LWN.net Alerts
router.get('/lwn/alerts/:distributor', lazyloadRouteHandler('./routes/lwn/alerts'));
@@ -1008,9 +954,6 @@ router.get('/lolapp/article/:uuid', lazyloadRouteHandler('./routes/lolapp/articl
// 左岸读书
router.get('/zreading', lazyloadRouteHandler('./routes/zreading/home'));
-// NBA
-router.get('/nba/app_news', lazyloadRouteHandler('./routes/nba/app_news'));
-
// 天津产权交易中心
router.get('/tprtc/cqzr', lazyloadRouteHandler('./routes/tprtc/cqzr'));
router.get('/tprtc/qyzc', lazyloadRouteHandler('./routes/tprtc/qyzc'));
@@ -1049,9 +992,6 @@ router.get('/meituan/tech/home', lazyloadRouteHandler('./routes//meituan/tech/ho
router.get('/codeceo/home', lazyloadRouteHandler('./routes/codeceo/home'));
router.get('/codeceo/:type/:category?', lazyloadRouteHandler('./routes/codeceo/category'));
-// BOF
-router.get('/bof/home', lazyloadRouteHandler('./routes/bof/home'));
-
// 爱发电
router.get('/afdian/explore/:type?/:category?', lazyloadRouteHandler('./routes/afdian/explore'));
router.get('/afdian/dynamic/:uid', lazyloadRouteHandler('./routes/afdian/dynamic'));
@@ -1079,7 +1019,6 @@ router.get('/wikihow/category/:category/:type', lazyloadRouteHandler('./routes/w
router.get('/10000link/news/:category?', lazyloadRouteHandler('./routes/10000link/news'));
// 一兜糖
-router.get('/yidoutang/index', lazyloadRouteHandler('./routes/yidoutang/index.js'));
router.get('/yidoutang/guide', lazyloadRouteHandler('./routes/yidoutang/guide.js'));
router.get('/yidoutang/mtest', lazyloadRouteHandler('./routes/yidoutang/mtest.js'));
router.get('/yidoutang/case/:type', lazyloadRouteHandler('./routes/yidoutang/case.js'));
@@ -1158,9 +1097,6 @@ router.get('/weidian/goods/:id', lazyloadRouteHandler('./routes/weidian/goods'))
// 有赞
router.get('/youzan/goods/:id', lazyloadRouteHandler('./routes/youzan/goods'));
-// 币世界快讯
-router.get('/bishijie/kuaixun', lazyloadRouteHandler('./routes/bishijie/kuaixun'));
-
// 顺丰丰桥
router.get('/sf/sffq-announce', lazyloadRouteHandler('./routes/sf/sffq-announce'));
@@ -1205,12 +1141,6 @@ router.get('/nfmovies/:id?', lazyloadRouteHandler('./routes/nfmovies/index'));
// 书友社区
router.get('/andyt/:view?', lazyloadRouteHandler('./routes/andyt/index'));
-// 品途商业评论
-router.get('/pintu360/:type?', lazyloadRouteHandler('./routes/pintu360/index'));
-
-// engadget中国版
-router.get('/engadget-cn', lazyloadRouteHandler('./routes/engadget/home'));
-
// engadget
router.get('/engadget/:lang?', lazyloadRouteHandler('./routes/engadget/home'));
@@ -1247,9 +1177,6 @@ router.get('/zhanqi/room/:id', lazyloadRouteHandler('./routes/zhanqi/room'));
// 酒云网
router.get('/wineyun/:category', lazyloadRouteHandler('./routes/wineyun'));
-// 快知
-router.get('/kzfeed/topic/:id', lazyloadRouteHandler('./routes/kzfeed/topic'));
-
// X-MOL化学资讯平台
// router.get('/x-mol/news/:tag?', lazyloadRouteHandler('./routes/x-mol/news.js'));
// router.get('/x-mol/paper/:type/:magazine', lazyloadRouteHandler('./routes/x-mol/paper'));
@@ -1535,9 +1462,6 @@ router.get('/lagou/jobs/:position/:city', lazyloadRouteHandler('./routes/lagou/j
router.get('/yzu/home/:type', lazyloadRouteHandler('./routes/universities/yzu/home'));
router.get('/yzu/yjszs/:type', lazyloadRouteHandler('./routes/universities/yzu/yjszs'));
-// 德国新闻社卫健新闻
-router.get('/krankenkassen', lazyloadRouteHandler('./routes/krankenkassen'));
-
// 桂林航天工业学院
router.get('/guat/news/:type?', lazyloadRouteHandler('./routes/guat/news'));
@@ -1821,9 +1745,6 @@ router.get('/missevan/drama/:id', lazyloadRouteHandler('./routes/missevan/drama'
// AMD
router.get('/amd/graphicsdrivers/:id/:rid?', lazyloadRouteHandler('./routes/amd/graphicsdrivers'));
-// 电商报
-router.get('/dsb/area/:area', lazyloadRouteHandler('./routes/dsb/area'));
-
// 靠谱新闻
router.get('/kaopunews/:language?', lazyloadRouteHandler('./routes/kaopunews'));
@@ -1857,7 +1778,6 @@ router.get('/kuaibao', lazyloadRouteHandler('./routes/kuaibao/index'));
// SocialBeta
router.get('/socialbeta/home', lazyloadRouteHandler('./routes/socialbeta/home'));
-router.get('/socialbeta/hunt', lazyloadRouteHandler('./routes/socialbeta/hunt'));
// 东方我乐多丛志
router.get('/touhougarakuta/:language/:type', lazyloadRouteHandler('./routes/touhougarakuta'));
@@ -1896,12 +1816,6 @@ router.get('/tencent/bigdata', lazyloadRouteHandler('./routes/tencent/bigdata/in
// 搜韵网
router.get('/souyun/today', lazyloadRouteHandler('./routes/souyun/today'));
-// 生物谷
-router.get('/bioon/latest', lazyloadRouteHandler('./routes/bioon/latest'));
-
-// soomal
-router.get('/soomal/topics/:category/:language?', lazyloadRouteHandler('./routes/soomal/topics'));
-
// JustRun
router.get('/justrun', lazyloadRouteHandler('./routes/justrun/index'));
@@ -1943,9 +1857,6 @@ router.get('/wenxuecity/bbs/:cat/:elite?', lazyloadRouteHandler('./routes/wenxue
router.get('/wenxuecity/hot/:cid', lazyloadRouteHandler('./routes/wenxuecity/hot'));
router.get('/wenxuecity/news', lazyloadRouteHandler('./routes/wenxuecity/news'));
-// 不安全
-router.get('/buaq', lazyloadRouteHandler('./routes/buaq/index'));
-
// 快出海
router.get('/kchuhai', lazyloadRouteHandler('./routes/kchuhai/index'));
@@ -1970,9 +1881,6 @@ router.get('/blogs/jianning', lazyloadRouteHandler('./routes/blogs/jianning'));
// 互动吧
router.get('/hudongba/:city/:id', lazyloadRouteHandler('./routes/hudongba/index'));
-// 飞雪娱乐网
-router.get('/feixuew/:id?', lazyloadRouteHandler('./routes/feixuew/index'));
-
// 1X
router.get('/1x/:category?', lazyloadRouteHandler('./routes/1x/index'));
@@ -1982,15 +1890,8 @@ router.get('/jx3/:caty?', lazyloadRouteHandler('./routes/jx3/news'));
// 泉州市跨境电子商务协会
router.get('/qzcea/:caty?', lazyloadRouteHandler('./routes/qzcea/index'));
-// 福利年
-router.get('/fulinian/:caty?', lazyloadRouteHandler('./routes/fulinian/index'));
-
// CGTN
-router.get('/cgtn/top', lazyloadRouteHandler('./routes/cgtn/top'));
router.get('/cgtn/most/:type?/:time?', lazyloadRouteHandler('./routes/cgtn/most'));
-
-router.get('/cgtn/pick', lazyloadRouteHandler('./routes/cgtn/pick'));
-
router.get('/cgtn/opinions', lazyloadRouteHandler('./routes/cgtn/opinions'));
// AppSales
@@ -2042,9 +1943,6 @@ router.get('/gov/taiwan/mnd', lazyloadRouteHandler('./routes/gov/taiwan/mnd'));
// 高科技行业门户
router.get('/ofweek/news', lazyloadRouteHandler('./routes/ofweek/news'));
-// 八阕
-router.get('/popyard/:caty?', lazyloadRouteHandler('./routes/popyard/index'));
-
// World Trade Organization
router.get('/wto/dispute-settlement/:year?', lazyloadRouteHandler('./routes/wto/dispute-settlement'));
@@ -2054,12 +1952,6 @@ router.get('/forum4399/:mtag', lazyloadRouteHandler('./routes/game4399/forum'));
// 国防科技大学
router.get('/nudt/yjszs/:id?', lazyloadRouteHandler('./routes/universities/nudt/yjszs'));
-// 全现在
-router.get('/allnow/column/:id', lazyloadRouteHandler('./routes/allnow/column'));
-router.get('/allnow/tag/:id', lazyloadRouteHandler('./routes/allnow/tag'));
-router.get('/allnow/user/:id', lazyloadRouteHandler('./routes/allnow/user'));
-router.get('/allnow', lazyloadRouteHandler('./routes/allnow/index'));
-
// dev.to
router.get('/dev.to/top/:period', lazyloadRouteHandler('./routes/dev.to/top'));
@@ -2110,12 +2002,6 @@ router.get('/nwpu/:column', lazyloadRouteHandler('./routes/nwpu/index'));
// 美国联邦最高法院
router.get('/us/supremecourt/argument_audio/:year?', lazyloadRouteHandler('./routes/us/supremecourt/argument_audio'));
-// 未名新闻
-router.get('/mitbbs/:caty?', lazyloadRouteHandler('./routes/mitbbs/index'));
-
-// 贾真的电商108将
-router.get('/jiazhen108', lazyloadRouteHandler('./routes/jiazhen108/index'));
-
// 优设网
router.get('/uisdc/talk/:sort?', lazyloadRouteHandler('./routes/uisdc/talk'));
router.get('/uisdc/hangye/:caty?', lazyloadRouteHandler('./routes/uisdc/hangye'));
@@ -2123,9 +2009,6 @@ router.get('/uisdc/news', lazyloadRouteHandler('./routes/uisdc/news'));
router.get('/uisdc/zt/:title?', lazyloadRouteHandler('./routes/uisdc/zt'));
router.get('/uisdc/topic/:title?/:sort?', lazyloadRouteHandler('./routes/uisdc/topic'));
-// 中国劳工观察
-router.get('/chinalaborwatch/reports/:lang?/:industry?', lazyloadRouteHandler('./routes/chinalaborwatch/reports'));
-
// 美国中央情报局
router.get('/cia/foia-annual-report', lazyloadRouteHandler('./routes/us/cia/foia-annual-report'));
@@ -2135,15 +2018,9 @@ router.get('/everything/changes', lazyloadRouteHandler('./routes/everything/chan
// 中国劳工通讯
router.get('/clb/commentary/:lang?', lazyloadRouteHandler('./routes/clb/commentary'));
-// 国际教育研究所
-router.get('/iie/blog', lazyloadRouteHandler('./routes/iie/blog'));
-
// 超理论坛
router.get('/chaoli/:channel?', lazyloadRouteHandler('./routes/chaoli/index'));
-// Polar
-router.get('/polar/blog', lazyloadRouteHandler('./routes/polar/blog'));
-
// XYplorer
router.get('/xyplorer/whatsnew', lazyloadRouteHandler('./routes/xyplorer/whatsnew'));
@@ -2166,23 +2043,6 @@ router.get('/qstheory/:category?', lazyloadRouteHandler('./routes/qstheory/index
// 生命时报
router.get('/lifetimes/:category?', lazyloadRouteHandler('./routes/lifetimes/index'));
-// MakeUseOf
-router.get('/makeuseof/:category?', lazyloadRouteHandler('./routes/makeuseof/index'));
-
-// 瞬Matataki
-// 热门作品
-router.get('/matataki/posts/hot/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/scoreranking'));
-// 最新作品
-router.get('/matataki/posts/latest/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/timeranking'));
-// 作者创作
-router.get('/matataki/users/:authorId/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/author'));
-// Fan票关联作品
-router.get('/matataki/tokens/:id/posts/:filterCode/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/token'));
-// 标签关联作品
-router.get('/matataki/tags/:tagId/:tagName/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/tag'));
-// 收藏夹
-router.get('/matataki/users/:userId/favorites/:favoriteListId/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/favorite'));
-
// Zhimap 知识导图社区
router.get('/zhimap/:categoryUuid?/:recommend?', lazyloadRouteHandler('./routes/zhimap/index'));
@@ -2203,9 +2063,6 @@ router.get('/mind42/:caty?', lazyloadRouteHandler('./routes/mind42/index'));
// 幕布网
router.get('/mubu/explore/:category?/:title?', lazyloadRouteHandler('./routes/mubu/explore'));
-// Esquirehk
-router.get('/esquirehk/tag/:id', lazyloadRouteHandler('./routes/esquirehk/tag'));
-
// 国家普通话测试 杭州市
router.get('/putonghua', lazyloadRouteHandler('./routes/putonghua/hangzhou'));
@@ -2220,9 +2077,6 @@ router.get('/yinxiang/card/:id', lazyloadRouteHandler('./routes/yinxiang/card'))
router.get('/yinxiang/personal/:id', lazyloadRouteHandler('./routes/yinxiang/personal'));
router.get('/yinxiang/category/:id', lazyloadRouteHandler('./routes/yinxiang/category'));
-// 遠見 gvm.com.tw
-router.get('/gvm/index/:category?', lazyloadRouteHandler('./routes/gvm/index'));
-
// 触乐
router.get('/chuapp/index/:category?', lazyloadRouteHandler('./routes/chuapp/index'));
@@ -2247,9 +2101,6 @@ router.get('/ustr/press-releases/:year?/:month?', lazyloadRouteHandler('./routes
// 游戏动力
router.get('/vgn/:platform?', lazyloadRouteHandler('./routes/vgn/index'));
-// 国际能源署
-router.get('/iea/:category?', lazyloadRouteHandler('./routes/iea/index'));
-
// The Brain
router.get('/thebrain/:category?', lazyloadRouteHandler('./routes/thebrain/blog'));
@@ -2265,9 +2116,6 @@ router.get('/marginnote/tag/:id?', lazyloadRouteHandler('./routes/marginnote/tag
// ASML
router.get('/asml/press-releases', lazyloadRouteHandler('./routes/asml/press-releases'));
-// 中国机械工程学会
-router.get('/cmes/news/:category?', lazyloadRouteHandler('./routes/cmes/news'));
-
// Craigslist
router.get('/craigslist/:location/:type', lazyloadRouteHandler('./routes/craigslist/search'));
@@ -2282,12 +2130,6 @@ router.get('/mathunion/fields-medal', lazyloadRouteHandler('./routes/mathunion/f
// ACM
router.get('/acm/amturingaward', lazyloadRouteHandler('./routes/acm/amturingaward'));
-// 網路天文館
-router.get('/tam/forecast', lazyloadRouteHandler('./routes/tam/forecast'));
-
-// Day One
-router.get('/dayone/blog', lazyloadRouteHandler('./routes/dayone/blog'));
-
// 滴答清单
router.get('/dida365/habit/checkins', lazyloadRouteHandler('./routes/dida365/habit-checkins'));
@@ -2297,24 +2139,12 @@ router.get('/ditto/changes/:type?', lazyloadRouteHandler('./routes/ditto/changes
// iDaily 每日环球视野
router.get('/idaily/today', lazyloadRouteHandler('./routes/idaily/index'));
-// 北屋
-router.get('/northhouse/:category?', lazyloadRouteHandler('./routes/northhouse/index'));
-
// Oak Ridge National Laboratory
router.get('/ornl/news', lazyloadRouteHandler('./routes/ornl/news'));
// 信阳师范学院 自考办
router.get('/xynu/zkb/:category', lazyloadRouteHandler('./routes/universities/xynu/zkb'));
-// Bell Labs
-router.get('/bell-labs/events-news/:category?', lazyloadRouteHandler('./routes/bell-labs/events-news.js'));
-
-// 中国科学院青年创新促进会
-router.get('/yicas/blog', lazyloadRouteHandler('./routes/yicas/blog'));
-
-// 九三学社
-router.get('/93/:category?', lazyloadRouteHandler('./routes/93/index'));
-
// DailyArt
router.get('/dailyart/:language?', lazyloadRouteHandler('./routes/dailyart/index'));
@@ -2333,21 +2163,12 @@ router.get('/nace/blog/:sort?', lazyloadRouteHandler('./routes/nace/blog'));
// Semiconductor Industry Association
router.get('/semiconductors/latest-news', lazyloadRouteHandler('./routes/semiconductors/latest-news'));
-// VOA News
-router.get('/voa/day-photos', lazyloadRouteHandler('./routes/voa/day-photos'));
-
// Voice of America
router.get('/voa/:language/:channel?', lazyloadRouteHandler('./routes/voa/index'));
-// 游戏葡萄
-router.get('/gamegrape/:id?', lazyloadRouteHandler('./routes/gamegrape/index'));
-
// 阳光高考
router.get('/chsi/zszcgd/:category?', lazyloadRouteHandler('./routes/chsi/zszcgd'));
-// 眾新聞
-router.get('/hkcnews/news/:category?', lazyloadRouteHandler('./routes/hkcnews/news'));
-
// AnyTXT
router.get('/anytxt/release-notes', lazyloadRouteHandler('./routes/anytxt/release-notes'));
@@ -2390,12 +2211,6 @@ router.get('/cqut/libnews', lazyloadRouteHandler('./routes/universities/cqut/cqu
// 城农 Growin' City
router.get('/growincity/news/:id?', lazyloadRouteHandler('./routes/growincity/news'));
-// Thrillist
-router.get('/thrillist/:tag?', lazyloadRouteHandler('./routes/thrillist/index'));
-
-// 丁香园
-router.get('/dxy/vaccine/:province?/:city?/:location?', lazyloadRouteHandler('./routes/dxy/vaccine'));
-
// 中国庭审公开网
router.get('/tingshen', lazyloadRouteHandler('./routes/tingshen/tingshen'));
@@ -2463,9 +2278,6 @@ router.get('/furaffinity/favorites/:username/:nsfw?', lazyloadRouteHandler('./ro
router.get('/furaffinity/submission_comments/:id', lazyloadRouteHandler('./routes/furaffinity/submission_comments'));
router.get('/furaffinity/journal_comments/:id', lazyloadRouteHandler('./routes/furaffinity/journal_comments'));
-// 亿欧网
-router.get('/iyiou', lazyloadRouteHandler('./routes/iyiou'));
-
// 香港商报
router.get('/hkcd/pdf', lazyloadRouteHandler('./routes/hkcd/pdf'));
@@ -2483,9 +2295,6 @@ router.get('/trakt/collection/:username/:type?', lazyloadRouteHandler('./routes/
// 全球化智库
router.get('/ccg/:category?', lazyloadRouteHandler('./routes/ccg/index'));
-// 中国橡胶网
-router.get('/cria/news/:id?', lazyloadRouteHandler('./routes/cria/news'));
-
// 灵异网
router.get('/lingyi/:category', lazyloadRouteHandler('./routes/lingyi/index'));
@@ -2526,9 +2335,6 @@ router.get('/hugo/releases', lazyloadRouteHandler('./routes/hugo/releases'));
// 东立出版
router.get('/tongli/news/:type', lazyloadRouteHandler('./routes/tongli/news'));
-// OR
-router.get('/or/:id?', lazyloadRouteHandler('./routes/or'));
-
// 字型故事
router.get('/fontstory', lazyloadRouteHandler('./routes/fontstory/tw'));
@@ -2571,12 +2377,6 @@ router.get('/tanchinese/:category?', lazyloadRouteHandler('./routes/tanchinese')
// yuzu emulator
router.get('/yuzu-emu/entry', lazyloadRouteHandler('./routes/yuzu-emu/entry'));
-// Resources - The Partnership on AI
-router.get('/partnershiponai/resources', lazyloadRouteHandler('./routes/partnershiponai/resources'));
-
-// Common App
-router.get('/commonapp/blog', lazyloadRouteHandler('./routes/commonapp/blog'));
-
// Europa Press
router.get('/europapress/:category?', lazyloadRouteHandler('./routes/europapress'));
@@ -2609,9 +2409,6 @@ router.get('/x410/news', lazyloadRouteHandler('./routes/x410/news'));
router.get('/micmicidol', lazyloadRouteHandler('./routes/micmicidol/latest'));
router.get('/micmicidol/search/:label', lazyloadRouteHandler('./routes/micmicidol/search'));
-// 香港高登
-router.get('/hkgolden/:id?/:limit?/:sort?', lazyloadRouteHandler('./routes/hkgolden'));
-
// 香港討論區
router.get('/discuss/:fid', lazyloadRouteHandler('./routes/discuss'));
diff --git a/lib/routes/199it/category.js b/lib/routes/199it/category.js
index 489505265a2ffb..ae8455c96b8183 100644
--- a/lib/routes/199it/category.js
+++ b/lib/routes/199it/category.js
@@ -1,6 +1,6 @@
const utils = require('./utils');
-const rootUrl = 'http://www.199it.com/archives/category/';
+const rootUrl = 'https://www.199it.com/archives/category';
module.exports = async (ctx) => {
const keyword = ctx.params.caty.split('|').join('/');
diff --git a/lib/routes/199it/tag.js b/lib/routes/199it/tag.js
index 7bee423df5fc16..d158e8118836bd 100644
--- a/lib/routes/199it/tag.js
+++ b/lib/routes/199it/tag.js
@@ -1,6 +1,6 @@
const utils = require('./utils');
-const rootUrl = 'http://www.199it.com/archives/tag/';
+const rootUrl = 'https://www.199it.com/archives/tag';
module.exports = async (ctx) => {
const keyword = ctx.params.tag.split('|').join('/');
diff --git a/lib/routes/199it/utils.js b/lib/routes/199it/utils.js
index bbbf926541dcfc..2cc478daf7f99d 100644
--- a/lib/routes/199it/utils.js
+++ b/lib/routes/199it/utils.js
@@ -25,7 +25,7 @@ module.exports = async (ctx, keyword, currentUrl) => {
ctx.cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',
- url: item.link,
+ url: `https:${item.link}`,
});
const content = cheerio.load(detailResponse.data);
diff --git a/lib/routes/8btc/author.js b/lib/routes/8btc/author.js
deleted file mode 100644
index 2f04fb41e0d8b8..00000000000000
--- a/lib/routes/8btc/author.js
+++ /dev/null
@@ -1,49 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const authorid = ctx.params.authorid;
- const response = await got.get(`https://webapi.8btc.com/bbt_api/comments/list?author_id=${authorid}&fetch_num=20`);
-
- const ProcessFeed = (data) => {
- const $ = cheerio.load(data);
-
- // 提取内容
- return $('.bbt-html').html();
- };
-
- const items = await Promise.all(
- response.data.data.list.map(async (item) => {
- const link = `https://www.8btc.com/article/${item.post_id}`;
-
- const cache = await ctx.cache.get(link);
- if (cache) {
- return Promise.resolve(JSON.parse(cache));
- }
-
- const response = await got({
- method: 'get',
- url: link,
- });
-
- const description = ProcessFeed(response.data);
-
- const single = {
- title: item.post.title,
- description,
- pubDate: item.date_gmt,
- link,
- author: item.reviewer.name,
- };
- ctx.cache.set(link, JSON.stringify(single));
- return Promise.resolve(single);
- })
- );
-
- ctx.state.data = {
- title: '巴比特作者专栏',
- link: `https://www.8btc.com/author/${authorid}`,
- description: '巴比特作者专栏',
- item: items,
- };
-};
diff --git a/lib/routes/8btc/news/flash.js b/lib/routes/8btc/news/flash.js
deleted file mode 100644
index b3403fa5de378f..00000000000000
--- a/lib/routes/8btc/news/flash.js
+++ /dev/null
@@ -1,41 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: `https://app.blockmeta.com/w1/news/list?num=30&cat_id=4481&page=1`,
- headers: {
- from: 'web',
- Referer: `https://www.8btc.com/flash`,
- },
- });
-
- const newsflashes = response.data.list;
-
- let newsflashesList = [];
- for (let i = 0; i < newsflashes.length; i++) {
- newsflashesList = newsflashesList.concat(newsflashes[i]);
- }
-
- const out = newsflashesList.map((item) => {
- const pubDate = item.post_date_format;
- const link = item.source.link;
- const title = item.title;
- const description = item.content;
-
- const single = {
- title,
- link,
- pubDate,
- description,
- };
-
- return single;
- });
-
- ctx.state.data = {
- title: `快讯 - 巴比特`,
- link: `https://www.8btc.com/flash`,
- item: out,
- };
-};
diff --git a/lib/routes/93/index.js b/lib/routes/93/index.js
deleted file mode 100644
index f5468f1ded4b78..00000000000000
--- a/lib/routes/93/index.js
+++ /dev/null
@@ -1,50 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || 'lxzn-yzjy';
-
- const rootUrl = 'http://www.93.gov.cn';
- const currentUrl = `${rootUrl}/${category}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('li.clearfix a')
- .slice(0, 15)
- .map((_, item) => {
- item = $(item);
- return {
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- pubDate: new Date(item.next().text()).toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.pageContent').html();
- item.author = content('.pageTitle ul li').eq(1).text().replace('来源:', '');
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/allnow/column.js b/lib/routes/allnow/column.js
deleted file mode 100644
index afb29d127860f1..00000000000000
--- a/lib/routes/allnow/column.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const utils = require('./utils');
-
-module.exports = async (ctx) => {
- const id = ctx.params.id;
-
- ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/column/${id}`);
-};
diff --git a/lib/routes/allnow/index.js b/lib/routes/allnow/index.js
deleted file mode 100644
index 16d1f8f0e927c3..00000000000000
--- a/lib/routes/allnow/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const utils = require('./utils');
-
-module.exports = async (ctx) => {
- ctx.state.data = await utils.processItems(ctx, utils.rootUrl);
-};
diff --git a/lib/routes/allnow/tag.js b/lib/routes/allnow/tag.js
deleted file mode 100644
index f27a72c28b0d68..00000000000000
--- a/lib/routes/allnow/tag.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const utils = require('./utils');
-
-module.exports = async (ctx) => {
- const id = ctx.params.id;
-
- ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/tag/${id}`);
-};
diff --git a/lib/routes/allnow/user.js b/lib/routes/allnow/user.js
deleted file mode 100644
index 8b4b80eb8f47d5..00000000000000
--- a/lib/routes/allnow/user.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const utils = require('./utils');
-
-module.exports = async (ctx) => {
- const id = ctx.params.id;
-
- ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/user/${id}`);
-};
diff --git a/lib/routes/allnow/utils.js b/lib/routes/allnow/utils.js
deleted file mode 100644
index 5311c4a104422a..00000000000000
--- a/lib/routes/allnow/utils.js
+++ /dev/null
@@ -1,67 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const timezone = require('@/utils/timezone');
-const { parseDate } = require('@/utils/parse-date');
-
-const rootUrl = 'https://www.allnow.com';
-
-module.exports = {
- rootUrl,
-
- processItems: async (ctx, currentUrl) => {
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.post-list .post')
- .slice(0, ctx.params.limit ? parseInt(ctx.params.limit) : 15)
- .map((_, item) => {
- item = $(item);
-
- return {
- link: `${rootUrl}${item.attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
-
- const content = cheerio.load(detailResponse.data);
-
- item.author = detailResponse.data.match(/authorName:""(.*?)"",avatar/)[1];
- item.title = content('title')
- .text()
- .replace(/-全现在官方网站/, '');
- item.pubDate = timezone(parseDate(detailResponse.data.match(/time:""(.*)"",type/)[1]), +8);
- item.category = detailResponse.data
- .match(/tags:\[(.*)\],columns/)[1]
- .split('},')
- .map((category) => category.match(/title:""(.*)""/)[1]);
- item.description = content('#article-content').html() ?? content('.summary').html() ?? '';
-
- content('video').each(function () {
- item.description += ``;
- });
-
- return item;
- })
- )
- );
-
- return {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- description: $('.desc').eq(0).text(),
- };
- },
-};
diff --git a/lib/routes/baidu/daily.js b/lib/routes/baidu/daily.js
deleted file mode 100644
index 5d4ec6d8f6df90..00000000000000
--- a/lib/routes/baidu/daily.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const iconv = require('iconv-lite');
-
-module.exports = async (ctx) => {
- const host = `https://zhidao.baidu.com/daily?fr=daohang`;
-
- const response = await got.get(host, {
- responseType: 'buffer',
- });
-
- response.data = iconv.decode(response.data, 'gbk');
- const $ = cheerio.load(response.data);
-
- const list = $(""li[class=' clearfix']"").get();
-
- const items = list.map((item) => {
- item = $(item);
-
- return {
- title: item.find('div.daily-cont-top > h2 > a').text(),
- description: item.find('div.daily-cont-top > div > a').text(),
- link: `https://zhidao.baidu.com/${item.find('div.daily-cont-top > h2 > a').attr('href')}`,
- };
- });
-
- const result = await Promise.all(
- items.map(async (item) => {
- const link = item.link;
-
- const cache = await ctx.cache.get(link);
- if (cache) {
- return Promise.resolve(JSON.parse(cache));
- }
-
- const itemReponse = await got.get(link, {
- responseType: 'buffer',
- });
- const data = iconv.decode(itemReponse.data, 'gbk');
- const itemElement = cheerio.load(data);
-
- item.description = itemElement('.detail-wp').html();
-
- ctx.cache.set(link, JSON.stringify(item));
- return item;
- })
- );
-
- ctx.state.data = {
- title: `知道日报`,
- link: host,
- description: `每天都知道一点`,
- item: result,
- };
-};
diff --git a/lib/routes/bell-labs/events-news.js b/lib/routes/bell-labs/events-news.js
deleted file mode 100644
index 1130619d20a245..00000000000000
--- a/lib/routes/bell-labs/events-news.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-const config = {
- events: '.tout-text a',
- 'industry-recognition': '.n-block-section .n-block .rich-text p b',
- 'press-releases': 'h5 a',
-};
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || 'press-releases';
-
- const rootUrl = 'http://www.bell-labs.com';
- const currentUrl = `${rootUrl}/events-news/${category}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- let items = (category === 'industry-recognition' ? $(config[category]).closest('.rich-text') : $(config[category]))
- .slice(0, 15)
- .map((_, i) => {
- let item = $(i);
-
- if (category === 'industry-recognition') {
- item = item.children('.n-link-list').length > 0 ? item.children('.n-link-list') : item.children('p').eq(1);
- }
- if (item.children('a').attr('href')) {
- item = item.children('a');
- }
-
- return {
- title: item.text(),
- link: item.attr('href') || currentUrl,
- pubDate: new Date(category === 'events' ? item.text().split(':')[0].split(' - ')[0] : category === 'industry-recognition' ? $(i).children('p').eq(0).text() : '').toUTCString(),
-
- description: category === 'events' ? item.closest('.n-block').next().find('.rich-text').html() : category === 'industry-recognition' ? `${$(i).find('p').last().text()}
` : '',
- };
- })
- .get();
-
- if (category === 'press-releases') {
- items = await Promise.all(
- items.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- content('.social-media-sharing').remove();
-
- item.description = content('.layout-content').html();
- item.pubDate = new Date(content('meta[name=""search-updated""]').attr('content')).toUTCString();
-
- return item;
- })
- )
- );
- }
-
- ctx.state.data = {
- title: $('title').eq(0).text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/bioon/latest.js b/lib/routes/bioon/latest.js
deleted file mode 100644
index f2d47df92aca0c..00000000000000
--- a/lib/routes/bioon/latest.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const currentUrl = 'http://www.bioon.com';
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
- const list = $('#cms_list li[data-i]')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- const a = item.find('a');
-
- return {
- title: a.text(),
- link: a.attr('href'),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
-
- const content = cheerio.load(detailResponse.data);
-
- const subtitle = content('div.title5 p').text().split(' ');
- const pubDate = `${subtitle.slice(-2)[0]} ${subtitle.slice(-1)}`;
-
- item.pubDate = new Date(pubDate + ' GMT+8').toUTCString();
- item.description = content('div.text3').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: '生物谷 - 最新资讯',
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/bishijie/kuaixun.js b/lib/routes/bishijie/kuaixun.js
deleted file mode 100644
index 4a582dcb3b8bb0..00000000000000
--- a/lib/routes/bishijie/kuaixun.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const buildData = require('@/utils/common-config');
-
-module.exports = async (ctx) => {
- const link = `https://www.bishijie.com/kuaixun/`;
- const host = `https://www.bishijie.com`;
- ctx.state.data = await buildData({
- link,
- url: link,
- title: `%title%`,
- params: {
- title: '币世界快讯列表',
- host,
- },
- item: {
- item: 'ul.newscontainer > li',
- title: `$('div.content a h3').text()`,
- link: `$('div.content a').attr('href')`,
- description: `$('div.content div.news-content div').html()`,
- },
- });
-};
diff --git a/lib/routes/bof/home.js b/lib/routes/bof/home.js
deleted file mode 100644
index b5d29df319e6a8..00000000000000
--- a/lib/routes/bof/home.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'POST',
- url: 'https://www.businessoffashion.com/graphql/v1',
- headers: {
- 'Content-Type': 'application/json',
- },
- data: JSON.stringify({
- operationName: 'GetArticlesGQL',
- variables: {
- first: 5,
- lastCursor: null,
- height: 440,
- width: 670,
- },
- query: 'query GetArticlesGQL($articleSlug: String, $category: String, $authorSlug: String, $height: Int, $lastCursor: ID, $width: Int!, $first: Int) {\n articles(first: $first, after: $lastCursor, filter: {language__eq: chinese, articleSlug__eq: $articleSlug, categorySlug__eq: $category, authorSlug__eq: $authorSlug}) {\n edges {\n cursor\n node {\n __typename\n ... on ArticleInterface {\n title\n summary\n content\n url\n featuredAsset {\n ... on AssetInterface {\n caption\n __typename\n }\n ... on ManagedImage {\n transform(transform: {width: $width, height: $height, crop: FOCALPOINT, fit: CROP})\n __typename\n }\n ... on ManagedVideo {\n url\n __typename\n }\n __typename\n }\n isExclusive\n isSponsored\n published {\n value\n __typename\n }\n __typename\n }\n ... on InternalArticleInterface {\n authors {\n displayName\n slug\n __typename\n }\n __typename\n }\n ... on ExternalArticleInterface {\n source\n __typename\n }\n ... on CuratedArticleLink {\n _id\n title\n published {\n value\n __typename\n }\n url\n __typename\n }\n ... on SyndicatedArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n ... on OriginalArticle {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n slug\n __typename\n }\n __typename\n }\n ... on FashionWeekReview {\n _id\n topics {\n _id\n label\n __typename\n }\n categories {\n _id\n label\n __typename\n }\n __typename\n }\n }\n __typename\n }\n __typename\n }\n}\n',
- }),
- });
-
- const items = response.data.data.articles.edges.map((item) => {
- const url = new URL(item.node.url);
- url.host = 'cn.businessoffashion.com';
- const single = {
- title: item.node.title,
- description: `${item.node.summary}
${item.node.content}`,
- pubDate: new Date(item.node.published.value).toUTCString(),
- link: url.href,
- author: item.node.authors[0].displayName,
- };
-
- return single;
- });
-
- ctx.state.data = {
- title: `BoF时装商业评论 | 时刻为全球时尚产业提供最新的新闻、分析与情报 | BoF`,
- link: `https://cn.businessoffashion.com/`,
- description: 'BoF时装商业评论 | 时刻为全球时尚产业提供最新的新闻、分析与情报 | BoF',
- item: items,
- };
-};
diff --git a/lib/routes/buaq/index.js b/lib/routes/buaq/index.js
deleted file mode 100644
index b8371352c3cea5..00000000000000
--- a/lib/routes/buaq/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const baseUrl = 'https://buaq.net';
-
- const response = await got({
- method: 'get',
- url: baseUrl,
- });
- const $ = cheerio.load(response.data); // 使用 cheerio 加载返回的 HTML
- const list = $('tr[class]');
-
- ctx.state.data = {
- title: `不安全文章 ~ 资讯`,
- link: `https://buaq.net/`,
- description: '不安全文章 ~ 资讯',
- item:
- list &&
- list
- .map((index, item) => {
- item = $(item);
- return {
- title: $('font[size=""4""]', item).children('a').text(),
- pubDate: new Date($('font[size=""1""]', item).children().first().text()).toUTCString(),
- link: baseUrl + $('font[size=""4""]', item).children('a').attr('href'),
- };
- })
- .get(),
- };
-};
diff --git a/lib/routes/cgtn/pick.js b/lib/routes/cgtn/pick.js
deleted file mode 100644
index f70192cf66d4d2..00000000000000
--- a/lib/routes/cgtn/pick.js
+++ /dev/null
@@ -1,45 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const rootUrl = 'https://www.cgtn.com/';
- const response = await got({
- method: 'get',
- url: rootUrl,
- });
-
- const $ = cheerio.load(response.data);
- const list = $('.titleArea')
- .map((_, item) => {
- item = $(item);
- const a = item.find('a');
- return {
- title: a.text(),
- link: a.attr('href'),
- pubDate: new Date(parseInt(a.attr('data-time'))).toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('#cmsMainContent').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: ""CGTN - Editors' Pick"",
- link: rootUrl,
- item: items,
- };
-};
diff --git a/lib/routes/cgtn/top.js b/lib/routes/cgtn/top.js
deleted file mode 100644
index 4c5c93a4791404..00000000000000
--- a/lib/routes/cgtn/top.js
+++ /dev/null
@@ -1,45 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const rootUrl = 'https://www.cgtn.com/';
- const response = await got({
- method: 'get',
- url: rootUrl,
- });
-
- const $ = cheerio.load(response.data);
- const list = $('div.topNews-item')
- .map((_, item) => {
- item = $(item);
- const a = item.find('div.topNews-item-content-title a');
- return {
- title: a.text(),
- link: a.attr('href'),
- pubDate: new Date(parseInt(a.attr('data-time'))).toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('#cmsMainContent').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: 'CGTN - Top News',
- link: rootUrl,
- item: items,
- };
-};
diff --git a/lib/routes/chinalaborwatch/reports.js b/lib/routes/chinalaborwatch/reports.js
deleted file mode 100644
index d2a44980393124..00000000000000
--- a/lib/routes/chinalaborwatch/reports.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const lang = ctx.params.lang || '';
- const industry = ctx.params.industry || '';
-
- const rootUrl = 'http://www.chinalaborwatch.org';
- const currentUrl = `${rootUrl}/${lang === '' ? '' : 'cn/'}reports${industry === '' ? '' : `/industry/${industry}`}`;
-
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
- const $ = cheerio.load(response.data);
-
- const list = $('.Alt1 a, .Alt2 a')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- return {
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.pubDate = new Date(content('#ContentPlaceHolder1_LabelDate').text().replace(/年|月/g, '-').replace('日', '')).toUTCString();
-
- content('h1, #ContentPlaceHolder1_LabelDate').remove();
-
- item.description = content('.mainContent').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `${$('title').text()} - ${lang === '' ? 'China Labour Watch' : '中国劳工观察'}`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/cmes/news.js b/lib/routes/cmes/news.js
deleted file mode 100644
index c2015474d8cf6b..00000000000000
--- a/lib/routes/cmes/news.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || 'Information';
-
- const rootUrl = 'https://www.cmes.org';
- const currentUrl = `${rootUrl}/News/${category}/index.html`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.r_ct')
- .find('a')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
-
- const link = item.attr('href');
-
- let date = '00000000';
- if (link.split('/')[2] !== 'mkc.ckcest.cn') {
- date = link.split('/')[5];
- }
-
- return {
- link,
- title: item.text(),
- pubDate: new Date(`${date.substr(0, 4)}-${date.substr(5, 2)}-${date.substr(7, 2)}`).toDateString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- content('h3, script, .bshare-custom').remove();
-
- item.description = content('.xhjj').html() || content('.detail-page').html();
-
- if (content('#articleTime').html()) {
- item.pubDate = new Date(content('#articleTime').text()).toUTCString();
- }
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/commonapp/blog.js b/lib/routes/commonapp/blog.js
deleted file mode 100644
index a3ee56c9cc960e..00000000000000
--- a/lib/routes/commonapp/blog.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const { parseDate } = require('@/utils/parse-date');
-
-module.exports = async (ctx) => {
- const rootUrl = 'https://www.commonapp.org';
- const jsonUrl = `${rootUrl}/page-data/sq/d/4283793559.json`;
- const response = await got({
- method: 'get',
- url: jsonUrl,
- });
-
- const list = response.data.data.allNodeBlogPost.edges.map((item) => ({
- title: item.node.title,
- author: item.node.field_blog_author,
- pubDate: parseDate(item.node.created),
- link: `${rootUrl}${item.node.path.alias}`,
- }));
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
-
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.inner-page').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: 'Blog - Common App',
- link: `${rootUrl}/blog`,
- item: items,
- };
-};
diff --git a/lib/routes/cria/news.js b/lib/routes/cria/news.js
deleted file mode 100644
index 51c2277678b4cf..00000000000000
--- a/lib/routes/cria/news.js
+++ /dev/null
@@ -1,57 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const id = ctx.params.id || '';
-
- const rootUrl = 'http://www.cria.org.cn';
- const currentUrl = `${rootUrl}/${id ? `newslist/${id}.html` : 'news'}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.ch_news,.enterprise_news_c')
- .find('ul li')
- .map((_, item) => {
- item = $(item);
- const a = item.find('a');
-
- return {
- link: `${rootUrl}${a.attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- try {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.title = content('title').text();
- item.description = content('.news_details_c').html();
- item.pubDate = new Date(detailResponse.data.match(/发布时间:(.*)<\/span>来源:/)[1]).toUTCString();
-
- return item;
- } catch (e) {
- return Promise.resolve('');
- }
- })
- )
- );
-
- const title = id ? response.data.match(/当前位置:中国橡胶网 > (.*)<\/span><\/h3>/)[1] : '新闻资讯';
-
- ctx.state.data = {
- title: `${title} - 中国橡胶网`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/dayone/blog.js b/lib/routes/dayone/blog.js
deleted file mode 100644
index 7e27b27a87f7b6..00000000000000
--- a/lib/routes/dayone/blog.js
+++ /dev/null
@@ -1,56 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const rootUrl = 'https://dayoneapp.com';
- const currentUrl = `${rootUrl}/blog`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('h3 a')
- .slice(0, 20)
- .map((_, item) => {
- item = $(item);
- const info = item.parent().next().text().split(' by ');
-
- return {
- author: info[1],
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- pubDate: new Date(info[0]).toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- const description = content('.blog-layout');
-
- description.children().last().remove();
- content('h1').next().remove();
- content('h1').remove();
-
- item.description = description.html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/donews/index.js b/lib/routes/donews/index.js
deleted file mode 100644
index d1c97e9b72f83b..00000000000000
--- a/lib/routes/donews/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-const util = require('./utils');
-
-module.exports = async (ctx) => {
- const { column = '' } = ctx.params;
-
- let host = `http://www.donews.com/${column}`;
-
- if (column !== '' && column !== 'idonews') {
- host += '/index';
- }
-
- const response = await got.get(host);
-
- const $ = cheerio.load(response.data);
-
- let list,
- title = 'DoNews - ';
-
- if (column === '') {
- title += '首页';
- } else {
- title += $('.breadCrumb > a:nth-child(2)').text();
- }
-
- switch (column) {
- case '':
- // 首页轮播
- list = $('a.news-item').get();
-
- break;
- case 'ent':
- case 'idonews':
- // 首页轮播
- list = $('ul.zl-top > li > a').get();
- list = list.concat($('.fl.w840 > .block > dl > dd > h3 > a').slice(0, 5).get());
-
- break;
- default:
- list = $('.fl.w840 > .block > dl > dd > h3 > a').slice(0, 10).get();
- break;
- }
-
- const items = await Promise.all(
- list.map((e) => {
- const link = $(e).attr('href');
- return ctx.cache.tryGet(link, () => util.ProcessFeed(link));
- })
- );
-
- ctx.state.data = {
- title,
- link: host,
- description: '中国最早的web2.0网站,专业科技媒体、互联网行业门户网站。提供互联网新闻IT资讯,关注科技创新,覆盖移动互联网创业、游戏、风险投资等热点,是中国互联网行业的风向标。',
- item: items,
- };
-};
diff --git a/lib/routes/donews/utils.js b/lib/routes/donews/utils.js
deleted file mode 100644
index 73769b83754060..00000000000000
--- a/lib/routes/donews/utils.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const cheerio = require('cheerio');
-const got = require('@/utils/got');
-
-const ProcessFeed = async (link) => {
- const response = await got.get(link);
- const $ = cheerio.load(response.data);
-
- return {
- title: $('.detail-con h1').text() || $('.detail-con h2').text().replace('{{news.title}}', ''),
- author: $('.tag > .fl > span:nth-child(2)').text().replace('{{news.author}}', ''),
- description: $('.article-con').html(),
- pubDate: new Date($('.tag > .fl > span:nth-child(1)').text().replace('{{news.timeFormat}}', '')),
- link,
- };
-};
-
-module.exports = {
- ProcessFeed,
-};
diff --git a/lib/routes/dsb/area.js b/lib/routes/dsb/area.js
deleted file mode 100644
index ccdead6eed23b4..00000000000000
--- a/lib/routes/dsb/area.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const area = ctx.params.area;
- const host = 'www.dsb.cn';
- const areaUrl = `http://${host}/${area}`;
- const areaResp = await got(areaUrl);
- const $ = cheerio.load(areaResp.data);
- const areaName = $('.new-list-title').text();
- const newsUrls = $('ul.new-list-cons > li > a')
- .map((i, e) => $(e).attr('href'))
- .get();
-
- ctx.state.data = {
- title: `电商报 - ${areaName}`,
- link: areaUrl,
- item: await Promise.all(
- newsUrls.map((url) =>
- ctx.cache.tryGet(url, async () => {
- const newsResp = await got(url);
- const $ = cheerio.load(newsResp.data);
- return {
- title: $('.new-content > h2').text(),
- link: url,
- pubDate: $('.new-content-info > span:nth-child(3)').text(),
- description: $('div.new-content-con').html(),
- };
- })
- )
- ),
- };
-};
diff --git a/lib/routes/dxy/vaccine.js b/lib/routes/dxy/vaccine.js
deleted file mode 100644
index 74c90cbbcbae63..00000000000000
--- a/lib/routes/dxy/vaccine.js
+++ /dev/null
@@ -1,109 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const province = ctx.params.province || '';
- const city = ctx.params.city || '';
- const location = ctx.params.location || '';
- let fullLocation = '';
- if (province) {
- fullLocation += `/${province}`;
- if (city) {
- fullLocation += `/${city}`;
- if (location) {
- fullLocation += `/${location}`;
- }
- }
- }
-
- const rootUrl = 'https://mama.dxy.com';
- const currentUrl = `${rootUrl}/client/vaccine/new-crown-vaccine`;
- const apiUrl = `${rootUrl}/api/vaccine/client/vaccination-point/all`;
-
- const apiResponse = await got({
- method: 'get',
- url: apiUrl,
- });
-
- const response = await got({
- method: 'get',
- url: apiResponse.data.results.fileUrl,
- });
-
- const allPoints = [],
- allLocations = {},
- allLocationIds = {},
- pointDataArray = response.data.results.pointData;
-
- for (const data of pointDataArray) {
- allLocations[data.locationName] = data.locationId;
- allLocationIds[data.locationId] = data.locationName;
- if (data.points) {
- allPoints.push(...data.points);
- } else {
- pointDataArray.push(...data.pointData);
- }
- }
-
- const list = allPoints.map((item) => {
- const locationId = item.locationId;
- const province = locationId - (locationId % 10000);
- const city = locationId - (locationId % 100);
-
- return {
- title: `${allLocationIds[province]}/${allLocationIds.hasOwnProperty(city) ? `${allLocationIds[city]}/` : `${allLocationIds[province]}/`}${allLocationIds[locationId]}`,
- link: item.contentUrl,
- pubDate: new Date(item.modifyDate).toUTCString(),
- };
- });
-
- const items = await Promise.all(
- list
- .filter((item) => {
- if (fullLocation !== '') {
- const locationSplit = item.title.split('/');
- const fullLocationSplit = fullLocation.split('/');
-
- for (let index = 0; index < fullLocationSplit.length; index++) {
- if (locationSplit[index] !== fullLocationSplit[index]) {
- return false;
- }
- }
- }
- return true;
- })
- .map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const result = detailResponse.data.results;
-
- const description =
- ` ${result.point.pointName}
` +
- '' +
- `- 户籍限制:${result.point.registerLimit}
` +
- `- 服务限制:${result.point.serviceTag}
` +
- `- 服务时间:${result.detail.serviceTime}
` +
- `- 地址:${result.point.address}
` +
- `- 电话:${result.point.phoneNo}
` +
- `- 接种人群:${result.detail.targetPeople}
` +
- `- 接种所需材料:${result.detail.materials}
` +
- `- 预约步骤:${result.detail.reserveSteps}
` +
- '
';
-
- item.description = description;
- item.title = `${result.point.pointName}(${item.title})`;
- item.link = `${rootUrl}/client/vaccine/vaccination-point?pointId=${result.point.id}`;
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `新冠疫苗接种点查询${fullLocation ? `(${fullLocation})` : ''} - 丁香园`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/esquirehk/tag.js b/lib/routes/esquirehk/tag.js
deleted file mode 100644
index e53db81757aefc..00000000000000
--- a/lib/routes/esquirehk/tag.js
+++ /dev/null
@@ -1,71 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- let id = ctx.params.id || 'Fashion';
-
- id = id.toLowerCase();
-
- const rootUrl = 'https://www.esquirehk.com';
- const topics = ['style', 'watch', 'money-investment', 'lifestyle', 'culture', 'mens-talk', 'gear', 'people'];
-
- let currentUrl = `${rootUrl}/tag/${id}`;
- if (topics.indexOf(id) > -1) {
- currentUrl = `${rootUrl}/${id}`;
- }
-
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
- const list = $('.FeedStory')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- return {
- author: item.find('.author').text(),
- link: `${rootUrl}${item.find('a.Anchor').eq(0).attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- content('.RelatedBlock').remove();
- content('.TagContainer').remove();
- content('.YouMayLikeContainer').remove();
- content('.SubscriptionContainer').remove();
-
- content('img').each(function () {
- const srcset = content(this).attr('srcset');
- if (srcset) {
- content(this).removeAttr('srcset');
- content(this).removeAttr('data-src');
- content(this).attr('src', `${rootUrl}${srcset.split(',')[1].replace('1032w', '')}`);
- }
- });
-
- item.title = content('.CommonTitle').text();
- item.description = content('.ArticlePage').html();
- item.pubDate = new Date(content('.ArticleFeeds-info time').eq(0).attr('data-timestamp') * 1000).toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `${$('title').text()} - Esquirehk`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/feixuew/index.js b/lib/routes/feixuew/index.js
deleted file mode 100644
index 6c6e1162f8a8c6..00000000000000
--- a/lib/routes/feixuew/index.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- let currentUrl;
- let query;
-
- const rootUrl = 'https://www.feixuew.com';
-
- ctx.params.id = ctx.params.id || 'latest';
-
- if (ctx.params.id === 'latest') {
- currentUrl = rootUrl;
- } else {
- currentUrl = `${rootUrl}/sort/${ctx.params.id}`;
- }
-
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- if (ctx.params.id === 'latest') {
- query = $('ul.ul-new li a').slice(4, 10);
- } else {
- query = $('a.sjwu').slice(0, 10);
- }
-
- const list = query
- .map((_, item) => {
- item = $(item);
- return {
- title: item.attr('title'),
- link: item.attr('href'),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('div.info-con').html();
- item.pubDate = new Date(content('p.f-sgray span').eq(1).text().replace('发布时间:', '') + ' GMT+8').toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `飞雪娱乐网 - ${$('title').text().split('-')[0]}`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/fulinian/index.js b/lib/routes/fulinian/index.js
deleted file mode 100644
index e4548660d9fb56..00000000000000
--- a/lib/routes/fulinian/index.js
+++ /dev/null
@@ -1,50 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-const rootUrl = 'https://www.fulinian.com/';
-
-module.exports = async (ctx) => {
- ctx.params.caty = ctx.params.caty || '';
-
- const currentUrl = `${rootUrl}/${ctx.params.caty}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
- const list = $('article.excerpt')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- const a = item.find('header h2 a');
- return {
- title: a.text(),
- link: a.attr('href'),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('article.article-content').html();
- item.pubDate = new Date(content('div.article-meta span.item').eq(0).text() + ' GMT+8').toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `福利年 - ${$('h1').text()}`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/gamegrape/index.js b/lib/routes/gamegrape/index.js
deleted file mode 100644
index 280a75e099ce6b..00000000000000
--- a/lib/routes/gamegrape/index.js
+++ /dev/null
@@ -1,73 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-function getNum(str) {
- const result = str.match(/(\d{1,2}).*/);
- if (result) {
- return parseInt(result[1]);
- }
-}
-function resolveRelativeTime(relativeTime) {
- const result = /\S* · (\d{1,2}天)?(\d{1,2}小时)?(\d{1,2}分钟)?/.exec(relativeTime);
- let day, hour, min;
- if (result[1]) {
- day = getNum(result[1]);
- }
- if (result[2]) {
- hour = getNum(result[2]);
- }
- if (result[3]) {
- min = getNum(result[3]);
- }
- return (((day || 0) * 24 + (hour || 0)) * 60 + (min || 0)) * 60 * 1000;
-}
-
-module.exports = async (ctx) => {
- const id = ctx.params.id || '';
-
- const rootUrl = 'http://youxiputao.com';
- const currentUrl = `${rootUrl}/article${id ? `/index/id/${id}` : ''}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.news-info-box')
- .slice(0, 15)
- .map((_, item) => {
- item = $(item);
- const a = item.find('a[title]');
-
- return {
- title: a.text(),
- link: `${rootUrl}${a.attr('href')}`,
- pubDate: Date.now() - resolveRelativeTime(item.find('.pull-right').text()),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.info').html();
- item.author = content('.users-info h4').text();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/gvm/index.js b/lib/routes/gvm/index.js
deleted file mode 100644
index 68896d42900c08..00000000000000
--- a/lib/routes/gvm/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-const got = require('got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || 'newest';
- let suffix = '/newest';
-
- const options = {
- newest: '最新文章',
- recommend: '你可能會喜歡',
- opinion: '名家專欄',
- topic: '專題',
- news: '時事熱點',
- politics: '政治',
- society: '社會',
- figure: '人物報導',
- world: '國際',
- world_focus: '全球焦點',
- cross_strait_politics: '兩岸',
- money: '金融理財',
- investment: '投資理財',
- insurance: '保險規劃',
- retire: '退休理財',
- fintech: '金融Fintech',
- real_estate: '房地產',
- economy: '總體經濟',
- tech: '科技',
- tech_trend: '科技趨勢',
- energy: '能源',
- business: '產經',
- industry: '傳產',
- service: '消費服務',
- medical: '生技醫藥',
- family_business_succession: '傳承轉型',
- startup: '創業新創',
- management: '管理',
- agriculture: '農業',
- education: '教育',
- higher_education: '高教',
- technological: '技職',
- parent: '親子教育',
- world_education: '國際文教',
- sports: '體育',
- life: '好享生活',
- art: '時尚設計',
- self_growth: '心靈成長',
- film: '藝文影視',
- travel: '旅遊',
- environment: '環境生態',
- health: '健康',
- food: '美食',
- career: '職場生涯',
- survey: '調查',
- county: '縣市',
- csr: 'CSR',
- };
-
- if (category !== 'newest' && category !== 'recommend') {
- suffix = `/category/${category}`;
- }
-
- const response = await got({
- method: 'get',
- url: 'https://www.gvm.com.tw' + suffix,
- });
-
- const $ = cheerio.load(response.body);
-
- const articles = $('#article_list .article-list-item .article-list-item__intro')
- .map((index, ele) => ({
- title: $('a', ele).text(),
- link: $('a', ele).attr('href'),
- pubDate: new Date($('.time', ele).text()),
- author: $('.author', ele).text(),
- }))
- .get();
-
- const item = await Promise.all(
- articles.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const res = await got.get(item.link);
- const content = cheerio.load(res.body);
- item.description = content('.article-content').html();
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `遠見 - ${options[category]}`,
- link: 'https://www.gvm.com.tw' + suffix,
- item,
- };
-};
diff --git a/lib/routes/hkcnews/news.js b/lib/routes/hkcnews/news.js
deleted file mode 100644
index 476f4c52847443..00000000000000
--- a/lib/routes/hkcnews/news.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-const titles = {
- '': '眾聞',
- 13: '經濟',
- 15: '社會',
- 14: '生活',
- 12: '政治',
- 16: '國際',
- 20: '台灣',
- 21: '人物',
- 19: '中國',
-};
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || '';
-
- const rootUrl = 'https://www.hkcnews.com';
- const apiUrl = `${rootUrl}/data/newsposts${category === '' ? '' : `/${category}`}?page=1`;
- const response = await got({
- method: 'get',
- url: apiUrl,
- });
-
- const list = response.data.items.map((item) => {
- const $ = cheerio.load(item);
- const news = $('.article-block-body a');
- const date = $('.line').eq(1).text().split('.').reverse().join('-');
-
- return {
- title: news.text(),
- link: `${rootUrl}${news.attr('href')}`,
- pubDate: new Date(date.length === 8 ? `${new Date().getFullYear().toString().slice(0, 2)}${date}` : date).toUTCString(),
- };
- });
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.article-content').html();
- // substring 2 times
- // from https://hkcnews.com/article/47878/loreal歐萊雅-薇婭-李佳琦-47884/薇婭、李佳琦幫loreal帶貨引價格爭議-loreal道歉
- // to https://hkcnews.com/article/47878
- item.guid = item.link.substring(0, item.link.lastIndexOf('/')).substring(0, item.link.substring(0, item.link.lastIndexOf('/')).lastIndexOf('/'));
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `眾新聞 - ${titles[category]}`,
- link: `${rootUrl}/news${category === '' ? '' : `/${category}/${titles[category]}`}`,
- item: items,
- };
-};
diff --git a/lib/routes/hkgolden/index.js b/lib/routes/hkgolden/index.js
deleted file mode 100644
index a56b2d4bac61fb..00000000000000
--- a/lib/routes/hkgolden/index.js
+++ /dev/null
@@ -1,110 +0,0 @@
-const got = require('@/utils/got');
-const { parseDate } = require('@/utils/parse-date');
-const dayjs = require('dayjs');
-
-const channels = {
- BW: '吹水台',
- HT: '高登熱',
- NW: '最 新',
- CA: '時事台',
- ET: '娛樂台',
- SP: '體育台',
- FN: '財經台',
- ST: '學術台',
- SY: '講故台',
- EP: '創意台',
- HW: '硬件台',
- IN: '電訊台',
- SW: '軟件台',
- MP: '手機台',
- AP: 'Apps台',
- GM: '遊戲台',
- ED: '飲食台',
- TR: '旅遊台',
- CO: '潮流台',
- AN: '動漫台',
- TO: '玩具台',
- MU: '音樂台',
- VI: '影視台',
- DC: '攝影台',
- TS: '汽車台',
- WK: '上班台',
- LV: '感情台',
- SC: '校園台',
- BB: '親子台',
- PT: '寵物台',
- MB: '站務台',
- RA: '電 台',
- AC: '活動台',
- BS: '買賣台',
- JT: '直播台',
- AU: '成人台',
- OP: '考古台',
-};
-
-const limits = {
- '-1': '全部',
- 1: '正式',
- 0: '公海',
-};
-
-const sorts = {
- 0: '最後回應時間',
- 1: '發表時間',
- 2: '熱門',
-};
-
-module.exports = async (ctx) => {
- const id = ctx.params.id || 'BW';
- const sort = ctx.params.sort || '0';
- const limit = ctx.params.limit || '-1';
-
- const rootUrl = 'https://forum.hkgolden.com';
- const apiRootUrl = 'https://api.hkgolden.com';
- const apiUrl = `${apiRootUrl}/v1/topics/HT/1?sort=${sort}&limit=${limit}`;
-
- const response = await got({
- method: 'get',
- url: apiUrl,
- });
-
- const list = response.data.data.list.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 30).map((item) => ({
- link: item.id,
- title: item.title,
- author: item.authorName,
- pubDate: parseDate(item.orderDate),
- }));
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: `${apiRootUrl}/v1/view/${item.link}`,
- });
-
- const data = detailResponse.data.data;
-
- item.link = `${rootUrl}/thread/${item.id}`;
- item.description =
- `| ${data.authorName} (${dayjs(data.messageDate).format('YYYY-MM-DD hh:mm:ss')}) |
` +
- `| ${data.content.replace(/src=""\/faces/g, 'src=""https://assets.hkgolden.com/faces')} |
`;
-
- for (const reply of data.replies) {
- item.description +=
- `| ${reply.authorName} (${dayjs(reply.replyDate).format('YYYY-MM-DD hh:mm:ss')}) |
` + `| ${reply.content.replace(/src=""\/faces/g, 'src=""https://assets.hkgolden.com/faces')} |
`;
- }
-
- item.description += '
';
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `${channels[id]} (${sorts[sort]}|${limits[limit]}) - 香港高登`,
- link: `${rootUrl}/channel/${id}`,
- item: items,
- };
-};
diff --git a/lib/routes/iea/index.js b/lib/routes/iea/index.js
deleted file mode 100644
index 9206146ddf3c11..00000000000000
--- a/lib/routes/iea/index.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || 'news-and-events';
-
- const rootUrl = 'https://www.iea.org';
- const currentUrl = `${rootUrl}/${category}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.m-news-listing__hover')
- .slice(0, 15)
- .map((_, item) => {
- item = $(item);
-
- const title = $(item).text();
- item = item.parent().get(0).tagName === 'a' ? $(item).parent() : $(item).parent().parent();
-
- return {
- title,
- link: `${rootUrl}${item.attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.m-block__content').html();
- item.pubDate = new Date(content('.o-hero-freepage__meta').text()).toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').eq(0).text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/iie/blog.js b/lib/routes/iie/blog.js
deleted file mode 100644
index 7f653054720604..00000000000000
--- a/lib/routes/iie/blog.js
+++ /dev/null
@@ -1,47 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const rootUrl = 'https://www.iie.org';
- const currentUrl = `${rootUrl}/Learn/Blog`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.events__title a')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- return {
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- pubDate: new Date(item.parent().parent().find('time').attr('datetime')).toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('.wysiwyg').html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/imaijia/category.js b/lib/routes/imaijia/category.js
deleted file mode 100644
index 79ba232c551ba5..00000000000000
--- a/lib/routes/imaijia/category.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category;
-
- const api_url = `http://www.imaijia.com/xstb/front/authorArticleController.do?indexArticles&pageSize=20`;
- const url = `http://www.imaijia.com/#/information.htm?catid=${category}`;
-
- const response = await got({
- method: 'post',
- headers: {
- Referer: url,
- },
- url: api_url,
- form: {
- pageNo: 1,
- catid: category,
- },
- });
-
- const data = response.data;
- const description = data.description;
- const name = data.catName;
- const list = data.resList;
-
- const out = await Promise.all(
- list.map(async (info) => {
- const title = info.title;
- const cat_path = info.catPath;
- const id = info.id;
- const itemUrl = `http://www.imaijia.com/#/atricleDetails.htm?atricleId=${id}&catPath=${cat_path}`;
- const api_url = `http://www.imaijia.com/data/details/${cat_path}${id}.json`;
- const pubDate = info.created;
- const author = info.author;
-
- const cache = await ctx.cache.get(itemUrl);
- if (cache) {
- return Promise.resolve(JSON.parse(cache));
- }
-
- const response = await got.get(api_url);
-
- const description = response.data.resList.articleDataF.content.replace(/src=""/g, 'src=""http://www.imaijia.com');
-
- const single = {
- title,
- link: itemUrl,
- author,
- description,
- pubDate: new Date(pubDate).toUTCString(),
- };
- ctx.cache.set(itemUrl, JSON.stringify(single));
- return Promise.resolve(single);
- })
- );
-
- ctx.state.data = {
- title: `电商在线-${name}`,
- description,
- link: url,
- item: out,
- };
-};
diff --git a/lib/routes/itjuzi/invest.js b/lib/routes/itjuzi/invest.js
deleted file mode 100644
index 55a02c5344104d..00000000000000
--- a/lib/routes/itjuzi/invest.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: 'https://www.itjuzi.com/api/index/invse',
- });
-
- const data = response.data;
-
- ctx.state.data = {
- title: 'IT桔子-投融资事件',
- link: 'https://www.itjuzi.com/',
- item: data.map((item) => {
- const invest = item.invst.map((item) => item.name).join('、');
-
- return {
- title: `${item.name} / ${item.round} / ${item.money}`,
- link: `https://www.itjuzi.com/company/${item.invse_com_id}`,
- description: `
- ![]()
- ${item.name}
- ${item.slogan}
- ${item.round} / ${item.money} / ${item.time}
- 投资方: ${invest}
- `,
- pubDate: new Date(item.time).toUTCString(),
- guid: item.id,
- };
- }),
- };
-};
diff --git a/lib/routes/itjuzi/merge.js b/lib/routes/itjuzi/merge.js
deleted file mode 100644
index 13cb3498c14ccf..00000000000000
--- a/lib/routes/itjuzi/merge.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const got = require('@/utils/got');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: 'https://www.itjuzi.com/api/index/merge',
- });
-
- const data = response.data.data;
-
- ctx.state.data = {
- title: 'IT桔子-并购事件',
- link: 'https://www.itjuzi.com/',
- item: data.map((item) => {
- const party = item.party.map((item) => item.name || item.invst_name).join('、');
-
- return {
- title: `${item.name}-${item.slogan}`,
- link: `https://www.itjuzi.com/merger/${item.id}`,
- description: `
- ![]()
- ${item.name}
- ${item.slogan}
- 股权占比: ${item.ratio} / 金额: ${item.money} / ${item.time}
- 并购方: ${party}
- `,
- pubDate: new Date(item.time).toUTCString(),
- guid: item.id,
- };
- }),
- };
-};
diff --git a/lib/routes/iyiou/index.js b/lib/routes/iyiou/index.js
deleted file mode 100644
index 1cc04996fdb8a9..00000000000000
--- a/lib/routes/iyiou/index.js
+++ /dev/null
@@ -1,41 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const formatPubDate = require('@/utils/date.js');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: `https://www.iyiou.com/news`,
- });
- const $ = cheerio.load(response.data);
- const postList = $('.list-container').find('.eo-article-column').get();
- const result = await Promise.all(
- postList.map(async (item) => {
- const title = $(item).find('.eo-hover-child').find('.content').find('a').find('.title').text();
- const link = 'https://www.iyiou.com' + $(item).find('.eo-hover-child').find('a').attr('href');
- const guid = link;
- const pubDate = formatPubDate($(item).find('.eo-hover-child').find('.content').find('.eo-post-date').text().replace(' ', ''));
-
- const single = {
- title,
- link,
- guid,
- pubDate,
- description: '',
- };
-
- const description_key = 'iyiou' + guid;
- const description_value = await ctx.cache.get(description_key);
-
- if (description_value) {
- single.description = description_value;
- } else {
- const temp = await got(link);
- single.description = $(temp.data).find('.post-body').html();
- ctx.cache.set(description_key, single.description);
- }
- return Promise.resolve(single);
- })
- );
- ctx.state.data = { title: '亿欧网', link: 'https://www.iyiou.com/', item: result };
-};
diff --git a/lib/routes/jiazhen108/index.js b/lib/routes/jiazhen108/index.js
deleted file mode 100644
index 1eabfcd4bd3eb1..00000000000000
--- a/lib/routes/jiazhen108/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const rootUrl = 'http://www.jiazhen108.com/news/';
- const response = await got({
- method: 'get',
- url: rootUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('div.met-news-list ul li')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- const a = item.find('a');
- return {
- title: a.text(),
- link: a.attr('href'),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- item.description = content('section.met-editor').html();
- item.pubDate = new Date(content('div.info span').eq(0).text() + ' GMT+8').toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `「108将」实战分享`,
- link: rootUrl,
- item: items,
- };
-};
diff --git a/lib/routes/jinritoutiao/keyword.js b/lib/routes/jinritoutiao/keyword.js
deleted file mode 100644
index e757e88baba29c..00000000000000
--- a/lib/routes/jinritoutiao/keyword.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const got = require('../../utils/got');
-
-module.exports = async (ctx) => {
- const keyword = ctx.params.keyword;
-
- const response = await got({
- method: 'get',
- url: `https://www.toutiao.com/api/search/content/?offset=0&format=json&keyword=${encodeURIComponent(keyword)}&autoload=true&count=20&cur_tab=1&from=search_tab`,
- headers: {
- Referer: `https://www.toutiao.com/search/?keyword=${encodeURIComponent(keyword)}`,
- },
- });
- let data = response.data.data;
- data = data.filter((item) => !item.cell_type);
-
- ctx.state.data = {
- title: `今日头条: ${keyword}`,
- link: `https://www.toutiao.com/search/?keyword=${keyword}`,
- description: keyword,
- item: data.map((item) => ({
- title: `${item.media_name}: ${item.title}`,
- description: item.abstract,
- pubDate: new Date(parseInt(item.create_time) * 1000),
- link: item.article_url,
- })),
- };
-};
diff --git a/lib/routes/juesheng/index.js b/lib/routes/juesheng/index.js
deleted file mode 100644
index ee33d9ea1a3328..00000000000000
--- a/lib/routes/juesheng/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const response = await got('http://www.juesheng.com/');
- const $ = cheerio.load(response.data);
- const postList = $('.sec-box #informationBox li').get();
- const result = await Promise.all(
- postList.map(async (item) => {
- const title = $(item).find('.news-item-title').find('a').text();
- const link = $(item).find('.news-item-title').find('a').attr('href');
- const guid = link;
-
- const single = {
- title,
- link,
- guid,
- pubDate: '',
- description: '',
- };
-
- const description_key = 'juesheng_description_' + guid;
- const description_value = await ctx.cache.get(description_key);
-
- const pubDate_key = 'juesheng_pubDate_' + guid;
- const pubDate_value = await ctx.cache.get(pubDate_key);
-
- if (description_value && pubDate_value) {
- single.description = description_value;
- single.pubDate = pubDate_value;
- } else {
- const temp = await got(link);
- single.description = $(temp.data).find('.content-box').html();
- single.pubDate = new Date($(temp.data).find('.part-time').text()).toUTCString();
-
- ctx.cache.set(description_key, single.description);
- ctx.cache.set(pubDate_key, single.pubDate);
- }
-
- return Promise.resolve(single);
- })
- );
- ctx.state.data = {
- title: '决胜网',
- link: 'http://www.juesheng.com/',
- description: '决胜网是教育产业门户网站提供:教育门户新闻资讯、互联网+教育、在线教育、兴趣教育、在线职业教育、教育创业、教育信息化、教育创业报道等,找教育就上决胜网教育门户网站。',
- item: result,
- };
-};
diff --git a/lib/routes/krankenkassen/index.js b/lib/routes/krankenkassen/index.js
deleted file mode 100644
index 827073796624df..00000000000000
--- a/lib/routes/krankenkassen/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const response = await got({
- method: 'get',
- url: 'https://www.krankenkassen.de/dpa/',
- });
-
- const data = response.data;
-
- const $ = cheerio.load(data);
- const list = $('.news td a');
-
- const getContent = async (subLink) => {
- const cacheKey = `krankenkassen_${subLink}`;
- const cache = await ctx.cache.get(cacheKey);
- if (cache) {
- return JSON.parse(cache);
- }
-
- const articlePageRes = await got(subLink);
- const articleHtml = articlePageRes.data;
- const $ = cheerio.load(articleHtml);
- const pubDate = $('.untertitel').text();
- const description = $('#content p').text();
- const result = {
- pubDate,
- description,
- title: $('.titel').text(),
- link: subLink,
- };
- ctx.cache.set(cacheKey, JSON.stringify(result));
- return result;
- };
-
- const item = await Promise.all(
- list
- .slice(0, 30)
- .map((index, dom) => {
- dom = $(dom);
- const link = `https://www.krankenkassen.de/dpa/${dom.attr('href')}`;
- return getContent(link);
- })
- .get()
- );
-
- ctx.state.data = {
- title: $('title').text(),
- link: 'https://www.krankenkassen.de/dpa/',
- description: '德国新闻社卫健新闻',
- item,
- };
-};
diff --git a/lib/routes/kzfeed/topic.js b/lib/routes/kzfeed/topic.js
deleted file mode 100644
index 833cfabfc4058e..00000000000000
--- a/lib/routes/kzfeed/topic.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 这里列出部分已知用途且在 Feed 中有用的属性
- *
- * @typedef {Object} Card
- * @property {String} id 卡片 id
- * @property {String} title 卡片标题
- * @property {String} text 正文内容,会有换行符,里面的链接会是 的形式
- * @property {String} video 可能是内嵌视频地址
- * @property {String} video_thumb_img 可能是内嵌视频预览图片
- * @property {Number} bilibili_video_id 可能是关联的 Bilibili av 号
- * @property {String[]} images 内嵌图片地址
- * @property {Card~ImageInfo[]} images_info 内嵌图片信息
- * @property {String} url 原文网址
- * @property {String} url_cover 原文头图
- * @property {String} url_title 原文标题
- * @property {String} url_desc 原文简介
- * @property {String} url_host 原文网址的域名
- * @property {Number} created_time 创建的 Unix 时间戳
- *
- * @typedef {Object} Card~ImageInfo
- * @property {String} url
- * @property {String} format
- * @property {String} size
- * @property {Number} width
- * @property {Number} height
- */
-
-const got = require('@/utils/got');
-
-/**
- * @param {String} ctx.params.id
- */
-module.exports = async (ctx) => {
- const id = ctx.params.id;
-
- const info_res = await got({
- method: 'post',
- url: 'https://kz.sync163.com/api/topic/info',
- headers: {
- from: 'h5',
- token: 'asdfasdfasdf',
- 'Content-Type': 'application/json',
- },
- data: JSON.stringify({
- topic_id: id,
- }),
- });
- const info = info_res.data;
-
- const cards_res = await got({
- method: 'post',
- url: 'https://kz.sync163.com/api/topic/cards',
- headers: {
- from: 'h5',
- token: 'asdfasdfasdf',
- 'Content-Type': 'application/json',
- },
- data: JSON.stringify({
- topic_id: id,
- }),
- });
- const cardList = cards_res.data.list;
-
- ctx.state.data = {
- title: `快知 - ${info.info.name}`,
- description: info.info.description,
- link: `https://kz.sync163.com/web/topic/${id}`,
- image: info.info.icon,
- item: cardList.map(buildFeedItem),
- };
-};
-
-/**
- * @param {Card} cardData
- */
-const buildFeedItem = (cardData) => {
- const description = `
- ![]()
- ${cardData.url_title ? cardData.url_title : ''}${cardData.url_desc ? ` - ${cardData.url_desc}` : ''}
- ${serializeCardText(cardData.text)}
- ${renderImageList(cardData.images)}
- 快知中间页
- `;
-
- return {
- title: cardData.title ? cardData.title : cardData.url_title,
- description,
- pubDate: new Date(cardData.created_time * 1000),
- link: cardData.url,
- };
-};
-
-const renderImageList = (images) => {
- const renderItem = (src) => `
-
-
-
- `;
-
- return `
-
- ${images.map(renderItem).join('')}
-
- `;
-};
-
-const serializeCardText = (text) =>
- text
-
- /* 快知的 API 里的 a 标签名字叫做 a-link ,我们要把它改过来 */
- .replace(//g, '')
-
- /* 替换换行符 */
- .replace(/\n/g, '
');
diff --git a/lib/routes/makeuseof/index.js b/lib/routes/makeuseof/index.js
deleted file mode 100644
index 2edc58bf9aefc1..00000000000000
--- a/lib/routes/makeuseof/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || '';
-
- const rootUrl = 'https://www.makeuseof.com';
- const currentUrl = `${rootUrl}${category === '' ? '' : '/category/' + category}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data);
-
- const list = $('.home-secondary, .listing-content')
- .find('.bc-title-link')
- .slice(0, 15)
- .map((_, item) => {
- item = $(item);
- return {
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- });
- const content = cheerio.load(detailResponse.data);
-
- content('.img-article-item')
- .find('img')
- .each(function () {
- content(this).attr('src', content(this).prev().attr('data-srcset').split('?')[0]);
- });
-
- content('.ad-zone-container, .sharing, .sentinel-article-nextArticle, .article-tags, .w-article-author-bio, .ml-form-embedContainer').remove();
-
- item.description = content('.article-body').html();
- item.author = content('a.author').text().replace('By ', '');
- item.pubDate = new Date(content('time').attr('datetime')).toUTCString();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `MakeUseOf - ${$('.listing-title').text() ? $('.listing-title').text() : 'Trending'}`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/author.js b/lib/routes/matataki/site/posts/author.js
deleted file mode 100644
index af84340585f049..00000000000000
--- a/lib/routes/matataki/site/posts/author.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const authorId = ctx.params.authorId;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const authorName = await matatakiUtils.getUserNickname(authorId);
-
- const items = await matatakiUtils.getPostsAsFeedItems(`/posts/timeRanking?author=${authorId}`, ipfsFlag);
-
- ctx.state.data = {
- title: `瞬Matataki - ${authorName}作品 ${ipfsFlag ? '(IPFS)' : ''}`,
- link: `https://www.matataki.io/user/${authorId}`,
- description: `瞬Matataki - ${authorName}作品`,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/favorite.js b/lib/routes/matataki/site/posts/favorite.js
deleted file mode 100644
index b023588c0784be..00000000000000
--- a/lib/routes/matataki/site/posts/favorite.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const userId = ctx.params.userId;
- const favoriteListId = ctx.params.favoriteListId;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const response = await matatakiUtils.get(`/favorites/post?userId=${userId}&fid=${favoriteListId}&page=1`);
- let items;
-
- if (ipfsFlag) {
- items = await Promise.all(
- response.data.data.list.map(async (item) => {
- const ipfsHtmlHash = await matatakiUtils.getPostIpfsHtmlHash(item.pid);
-
- return {
- title: item.title,
- description: item.short_content,
- link: `${matatakiUtils.IPFS_GATEWAY_URL}/ipfs/${ipfsHtmlHash}`,
- pubDate: item.create_time,
- guid: ipfsHtmlHash,
- };
- })
- );
- } else {
- items = response.data.data.list.map((item) => ({
- title: item.title,
- description: item.short_content,
- link: `https://www.matataki.io/p/${item.pid}`,
- pubDate: item.create_time,
- }));
- }
-
- const text = `瞬Matataki - ${response.data.data.info.nickname || response.data.data.info.username} 收藏夹 #${response.data.data.info.name}# ${ipfsFlag ? '(IPFS)' : ''}`;
- ctx.state.data = {
- title: text,
- link: `https://www.matataki.io/user/${userId}/favlist?fid=${favoriteListId}`,
- description: text,
- allowEmpty: true,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/scoreranking.js b/lib/routes/matataki/site/posts/scoreranking.js
deleted file mode 100644
index 5930c60bc7c175..00000000000000
--- a/lib/routes/matataki/site/posts/scoreranking.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const querystring = ctx.request.querystring;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const items = await matatakiUtils.getPostsAsFeedItems(`/posts/scoreRanking?${querystring}`, ipfsFlag);
-
- ctx.state.data = {
- title: `瞬Matataki - 热门作品 ${ipfsFlag ? '(IPFS)' : ''}`,
- link: `https://www.matataki.io/article/`,
- description: `瞬Matataki - 热门作品`,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/tag.js b/lib/routes/matataki/site/posts/tag.js
deleted file mode 100644
index f6e26fd82aaf3a..00000000000000
--- a/lib/routes/matataki/site/posts/tag.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const tagId = ctx.params.tagId;
- const tagName = ctx.params.tagName;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const items = await matatakiUtils.getPostsAsFeedItems(`/posts/getPostByTag?pagesize=20&tagid=${tagId}&extra=short_content&orderBy=hot_score&order=desc&page=1`, ipfsFlag);
-
- ctx.state.data = {
- title: `瞬Matataki #${tagName} ${ipfsFlag ? '(IPFS)' : ''}`,
- link: `https://www.matataki.io/tags/${tagId}`,
- description: `瞬Matataki #${tagName}`,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/timeranking.js b/lib/routes/matataki/site/posts/timeranking.js
deleted file mode 100644
index 98128919cdbfb4..00000000000000
--- a/lib/routes/matataki/site/posts/timeranking.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const querystring = ctx.request.querystring;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const items = await matatakiUtils.getPostsAsFeedItems(`/posts/timeRanking?${querystring}`, ipfsFlag);
-
- ctx.state.data = {
- title: `瞬Matataki - 最新作品 ${ipfsFlag ? '(IPFS)' : ''}`,
- link: `https://www.matataki.io/article/latest`,
- description: `瞬Matataki - 最新作品`,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/site/posts/token.js b/lib/routes/matataki/site/posts/token.js
deleted file mode 100644
index f767ac8f5d6e90..00000000000000
--- a/lib/routes/matataki/site/posts/token.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const matatakiUtils = require('@/routes/matataki/utils/matataki-utils');
-
-module.exports = async (ctx) => {
- const id = ctx.params.id;
- const filterCode = ctx.params.filterCode;
- const ipfsFlag = !!ctx.params.ipfsFlag;
-
- const tokenName = await matatakiUtils.getTokenName(id);
- const items = await matatakiUtils.getPostsAsFeedItems(`/minetoken/${id}/related?filter=${filterCode}&sort=time-desc&onlyCreator=0&page=1`, ipfsFlag);
-
- ctx.state.data = {
- title: `瞬Matataki - ${tokenName ? tokenName : 'Fan票'}关联作品 ${ipfsFlag ? '(IPFS)' : ''}`,
- link: `https://www.matataki.io/token/${id}/circle`,
- description: `瞬Matataki - ${tokenName ? tokenName : 'Fan票'}关联作品`,
- allowEmpty: true,
- item: items,
- };
-};
diff --git a/lib/routes/matataki/utils/matataki-utils.js b/lib/routes/matataki/utils/matataki-utils.js
deleted file mode 100644
index 3c3edfc3c0f9ca..00000000000000
--- a/lib/routes/matataki/utils/matataki-utils.js
+++ /dev/null
@@ -1,125 +0,0 @@
-const got = require('@/utils/got');
-
-/**
- * Matataki API 地址
- */
-const MTATAKI_API_URL = 'https://api.mttk.net';
-
-/**
- * Matataki 官网地址
- */
-const MATATAKI_WEB_URL = 'https://www.matataki.io/';
-
-/**
- * IPFS网关的URL。可以换成其他公共网关,也可以换成自建的网关地址
- */
-const IPFS_GATEWAY_URL = 'https://10.via0.com';
-
-/**
- * 以`get` 方式调用Matataki API的简单封装
- *
- * @param {string} path 以 / 开始
- */
-function get(path) {
- return got({
- method: 'get',
- url: MTATAKI_API_URL + path,
- headers: {
- Referer: MATATAKI_WEB_URL,
- },
- });
-}
-
-/**
- * 获取用户信息昵称
- *
- * @param {number} userId
- */
-async function getUserNickname(userId) {
- try {
- const userInfoResponse = await get(`/user/${userId}`);
- return userInfoResponse.data.data.nickname || userInfoResponse.data.data.username;
- } catch (err) {
- return '';
- }
-}
-
-/**
- * 获取Fan票名称
- *
- * @param {number} tokenId
- */
-async function getTokenName(tokenId) {
- try {
- const tokenInfoResponse = await get(`/minetoken/${tokenId}`);
- return tokenInfoResponse.data.data.token.name;
- } catch (err) {
- return '';
- }
-}
-
-/**
- * 获取Matataki作品在IPFS上的Hash
- *
- * @param {number} postId
- */
-async function getPostIpfsHtmlHash(postId) {
- const ipfsInfoResponse = await get(`/p/${postId}/ipfs`);
- return ipfsInfoResponse.data.data[0].htmlHash;
-}
-
-/**
- * 将Matataki作品条目转为指向IPFS网关的RSS订阅源条目
- *
- * @param {Object} item
- */
-async function postToIpfsFeedItem(item) {
- const ipfsHtmlHash = await getPostIpfsHtmlHash(item.id);
-
- return {
- title: `${item.title} - ${item.nickname || item.author}${item.token_name ? ' $' + item.token_name : ''}`,
- description: item.short_content,
- link: `${IPFS_GATEWAY_URL}/ipfs/${ipfsHtmlHash}`,
- pubDate: item.create_time,
- guid: ipfsHtmlHash,
- };
-}
-
-/**
- * 将Matataki作品条目转为指向官网的RSS订阅源条目
- *
- * @param {Object} item
- */
-function postToFeedItem(item) {
- return {
- title: `${item.title} - ${item.nickname || item.author}${item.token_name ? ' $' + item.token_name : ''}`,
- description: item.short_content,
- link: `https://www.matataki.io/p/${item.id}`,
- pubDate: item.create_time,
- };
-}
-
-/**
- * 获取作品列表并转为Feed Item数组
- *
- * @param {string} url Matataki作品相关API的url
- * @param {ipfsFlag} ipfsFlag 是否取IPFS地址
- */
-async function getPostsAsFeedItems(url, ipfsFlag) {
- const response = await get(url);
- if (ipfsFlag) {
- return Promise.all(response.data.data.list.map(postToIpfsFeedItem));
- }
- return response.data.data.list.map(postToFeedItem);
-}
-
-module.exports = {
- IPFS_GATEWAY_URL,
- get,
- getUserNickname,
- getTokenName,
- getPostIpfsHtmlHash,
- postToIpfsFeedItem,
- postToFeedItem,
- getPostsAsFeedItems,
-};
diff --git a/lib/routes/mitbbs/index.js b/lib/routes/mitbbs/index.js
deleted file mode 100644
index f7a85df1f11eb3..00000000000000
--- a/lib/routes/mitbbs/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-const iconv = require('iconv-lite');
-
-module.exports = async (ctx) => {
- const caty = ctx.params.caty || '';
- const rootUrl = 'http://www.mitbbs.com';
- const currentUrl = `${rootUrl}/${caty === '' ? 'news/mitbbs_news_zahui.php' : 'news_pg/' + ctx.params.caty + '.html'}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- responseType: 'buffer',
- });
-
- const $ = cheerio.load(iconv.decode(response.data, 'gb2312'));
- const list = $('tr[align=""center""] td a.blue_14p_link, tr[bgcolor=""#FFFFFF""] td a.blue_14p_link')
- .slice(0, 10)
- .map((_, item) => {
- item = $(item);
- return {
- title: item.text(),
- link: `${rootUrl}${item.attr('href')}`,
- pubDate: new Date(item.find('div.weinei_left_con_line_date').text() + ' GMT+8').toUTCString(),
- };
- })
- .get();
-
- const items = await Promise.all(
- list.map((item) =>
- ctx.cache.tryGet(item.link, async () => {
- const detailResponse = await got({
- method: 'get',
- url: item.link,
- responseType: 'buffer',
- });
- const content = cheerio.load(iconv.decode(detailResponse.data, 'gb2312'));
-
- const dateTd = content('.black_32p').parent();
- dateTd.find('span, p').remove();
-
- item.pubDate = new Date(dateTd.text().trim().replace(/年|月/g, '-').replace('日', ' ')).toUTCString();
- item.description = content('table').eq(5).find('table').eq(1).html();
-
- return item;
- })
- )
- );
-
- ctx.state.data = {
- title: `未名新闻 - ${caty === '' ? '新闻大杂烩' : $('strong').eq(1).text()}`,
- link: currentUrl,
- item: items,
- };
-};
diff --git a/lib/routes/nba/app_news.js b/lib/routes/nba/app_news.js
deleted file mode 100644
index b3fcb00375bc2b..00000000000000
--- a/lib/routes/nba/app_news.js
+++ /dev/null
@@ -1,40 +0,0 @@
-const got = require('@/utils/got');
-
-const sourceTimezoneOffset = -8;
-module.exports = async (ctx) => {
- const id_url = 'https://sportsnba.qq.com/news/index?column=banner';
- const articles = await got.get(id_url);
- const articleIds = articles.data.data.map((article) => article.id);
-
- const url = 'https://sportsnba.qq.com/news/item?column=banner&articleIds=' + articleIds.toString();
- const response = await got.get(url);
- const xmls = response.data.data;
- const out = Object.keys(xmls).map((xml) => {
- const data = xmls[xml];
- const link = data.shareUrl;
-
- const guid = data.newsId;
- const title = data.title;
- const time = new Date(data.pub_time);
- time.setTime(time.getTime() + (sourceTimezoneOffset - time.getTimezoneOffset() / 60) * 60 * 60 * 1000);
- const pubDate = time.toUTCString();
-
- const description = '
';
-
- const item = {
- title,
- description,
- pubDate,
- link,
- guid,
- };
-
- return item;
- });
-
- ctx.state.data = {
- title: 'NBA - news',
- link: 'https://kbsapp.sports.qq.com',
- item: out,
- };
-};
diff --git a/lib/routes/northhouse/index.js b/lib/routes/northhouse/index.js
deleted file mode 100644
index 012af84e7794af..00000000000000
--- a/lib/routes/northhouse/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const got = require('@/utils/got');
-const cheerio = require('cheerio');
-
-module.exports = async (ctx) => {
- const category = ctx.params.category || '';
-
- const rootUrl = 'http://www.northhouse.cc';
- const currentUrl = `${rootUrl}${category === '' ? '' : `/category/${category}`}`;
- const response = await got({
- method: 'get',
- url: currentUrl,
- });
-
- const $ = cheerio.load(response.data.replace(/<\/div>/g, '