rsshub 1.0.0-master.c0c6f7c → 1.0.0-master.c103270
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -20
- package/lib/config.js +12 -1
- package/lib/index.js +1 -1
- package/lib/radar-rules.js +6 -6
- package/lib/radar.js +2 -1
- package/lib/router.js +16 -16
- package/lib/routes/miniflux/get_feeds.js +2 -2
- package/lib/utils/logger.js +14 -2
- package/lib/v2/2048/index.js +12 -4
- package/lib/v2/{scitation/journal.js → aip/journal-pupp.js} +2 -2
- package/lib/v2/aip/journal.js +55 -0
- package/lib/v2/{scitation → aip}/maintainer.js +0 -1
- package/lib/v2/aip/radar.js +13 -0
- package/lib/v2/aip/router.js +4 -0
- package/lib/v2/baidu/maintainer.js +2 -2
- package/lib/v2/baidu/router.js +2 -2
- package/lib/v2/baidu/tieba/forum.js +4 -3
- package/lib/v2/bangumi/maintainer.js +1 -0
- package/lib/v2/bangumi/radar.js +9 -9
- package/lib/v2/bangumi/router.js +1 -2
- package/lib/v2/bangumi/tv/subject/ep.js +4 -3
- package/lib/v2/bangumi/tv/subject/index.js +18 -16
- package/lib/v2/bangumi/tv/subject/offcial-subject-api.js +3 -2
- package/lib/v2/bangumi/tv/subject/utils.js +5 -0
- package/lib/v2/bilibili/article.js +2 -17
- package/lib/v2/bilibili/cache.js +20 -0
- package/lib/v2/bilibili/dynamic.js +39 -18
- package/lib/v2/bilibili/followings_article.js +1 -10
- package/lib/v2/bilibili/followings_dynamic.js +23 -9
- package/lib/v2/bilibili/maintainer.js +3 -2
- package/lib/v2/bilibili/router.js +3 -2
- package/lib/v2/bilibili/utils.js +3 -1
- package/lib/v2/bilibili/watchlater.js +44 -0
- package/lib/v2/bloomberg/utils.js +6 -4
- package/lib/v2/boc/maintainer.js +3 -0
- package/lib/v2/boc/radar.js +13 -0
- package/lib/v2/boc/router.js +3 -0
- package/lib/{routes → v2}/boc/whpj.js +8 -8
- package/lib/{routes → v2}/caus/index.js +7 -6
- package/lib/v2/caus/maintainer.js +3 -0
- package/lib/v2/caus/radar.js +13 -0
- package/lib/v2/caus/router.js +3 -0
- package/lib/{routes → v2}/cna/index.js +12 -10
- package/lib/v2/cna/maintainer.js +3 -0
- package/lib/v2/cna/radar.js +13 -0
- package/lib/v2/cna/router.js +3 -0
- package/lib/v2/cyzone/author.js +20 -0
- package/lib/v2/cyzone/index.js +27 -0
- package/lib/v2/cyzone/label.js +20 -0
- package/lib/v2/cyzone/maintainer.js +7 -0
- package/lib/v2/cyzone/radar.js +25 -0
- package/lib/v2/cyzone/router.js +6 -0
- package/lib/v2/cyzone/util.js +125 -0
- package/lib/v2/discourse/maintainer.js +4 -0
- package/lib/v2/discourse/notifications.js +39 -0
- package/lib/v2/discourse/posts.js +25 -0
- package/lib/v2/discourse/router.js +4 -0
- package/lib/v2/discourse/utils.js +12 -0
- package/lib/v2/dlnews/category.js +81 -0
- package/lib/v2/dlnews/maintainer.js +3 -0
- package/lib/v2/dlnews/radar.js +19 -0
- package/lib/v2/dlnews/router.js +3 -0
- package/lib/v2/dlnews/templates/description.art +24 -0
- package/lib/v2/dlnews/utils.js +22 -0
- package/lib/v2/domp4/detail.js +4 -2
- package/lib/v2/domp4/latest.js +7 -4
- package/lib/v2/domp4/utils.js +15 -2
- package/lib/v2/dorohedoro/news.js +3 -1
- package/lib/v2/fantia/user.js +16 -0
- package/lib/v2/gov/maintainer.js +1 -0
- package/lib/v2/gov/radar.js +8 -0
- package/lib/v2/gov/router.js +1 -0
- package/lib/v2/gov/shenzhen/zjj/index.js +45 -0
- package/lib/v2/hrbeu/radar.js +3 -3
- package/lib/v2/hrbeu/router.js +1 -1
- package/lib/v2/hrbeu/uae/news.js +66 -0
- package/lib/v2/icbc/maintainer.js +3 -0
- package/lib/v2/icbc/radar.js +13 -0
- package/lib/v2/icbc/router.js +3 -0
- package/lib/v2/icbc/whpj.js +57 -0
- package/lib/v2/ithome/tag.js +14 -3
- package/lib/v2/kunchengblog/essay.js +35 -19
- package/lib/v2/kunchengblog/radar.js +1 -1
- package/lib/v2/kunchengblog/router.js +1 -1
- package/lib/v2/latepost/index.js +83 -29
- package/lib/v2/latepost/radar.js +6 -1
- package/lib/v2/latepost/router.js +1 -1
- package/lib/v2/leetcode/articles.js +1 -1
- package/lib/v2/liulinblog/index.js +98 -0
- package/lib/v2/liulinblog/maintainer.js +6 -2
- package/lib/v2/liulinblog/radar.js +39 -19
- package/lib/v2/liulinblog/router.js +7 -3
- package/lib/v2/mihoyo/bbs/img-ranking.js +106 -0
- package/lib/v2/mihoyo/bbs/static-data.js +137 -0
- package/lib/v2/mihoyo/maintainer.js +1 -0
- package/lib/v2/mihoyo/radar.js +7 -1
- package/lib/v2/mihoyo/router.js +2 -1
- package/lib/v2/newzmz/index.js +53 -77
- package/lib/v2/newzmz/maintainer.js +2 -2
- package/lib/v2/newzmz/router.js +1 -3
- package/lib/v2/newzmz/templates/description.art +59 -7
- package/lib/v2/newzmz/util.js +166 -0
- package/lib/v2/nju/gra.js +13 -5
- package/lib/v2/nwafu/all.js +5 -3
- package/lib/v2/nwafu/utils.js +13 -3
- package/lib/v2/nytimes/index.js +1 -4
- package/lib/v2/nytimes/utils.js +5 -0
- package/lib/v2/pornhub/category.js +44 -0
- package/lib/v2/pornhub/category_url.js +25 -0
- package/lib/v2/pornhub/maintainer.js +8 -0
- package/lib/v2/pornhub/model.js +29 -0
- package/lib/v2/pornhub/pornstar.js +29 -0
- package/lib/v2/pornhub/radar.js +46 -0
- package/lib/v2/pornhub/router.js +8 -0
- package/lib/v2/pornhub/search.js +23 -0
- package/lib/v2/pornhub/templates/description.art +11 -0
- package/lib/v2/pornhub/users.js +30 -0
- package/lib/v2/pornhub/utils.js +30 -0
- package/lib/v2/rsc/journal.js +106 -0
- package/lib/v2/rsc/maintainer.js +3 -0
- package/lib/v2/rsc/radar.js +23 -0
- package/lib/v2/rsc/router.js +3 -0
- package/lib/v2/rsc/templates/image.art +5 -0
- package/lib/v2/stheadline/std/realtime.js +1 -1
- package/lib/v2/stockedge/daily-news.js +1 -1
- package/lib/v2/stockedge/utils.js +1 -0
- package/lib/v2/test/index.js +1 -1
- package/lib/v2/thepaper/utils.js +1 -1
- package/lib/{routes → v2}/tophub/index.js +12 -6
- package/lib/v2/tophub/maintainer.js +3 -0
- package/lib/v2/tophub/radar.js +13 -0
- package/lib/v2/tophub/router.js +3 -0
- package/lib/v2/udn/breaking-news.js +9 -4
- package/lib/v2/v2ex/maintainer.js +5 -0
- package/lib/v2/v2ex/post.js +35 -0
- package/lib/v2/v2ex/radar.js +35 -0
- package/lib/v2/v2ex/router.js +5 -0
- package/lib/{routes → v2}/v2ex/tab.js +17 -21
- package/lib/{routes → v2}/v2ex/topics.js +1 -1
- package/lib/v2/youtube/live.js +49 -0
- package/lib/v2/youtube/maintainer.js +1 -0
- package/lib/v2/youtube/radar.js +6 -0
- package/lib/v2/youtube/router.js +1 -0
- package/lib/v2/youtube/utils.js +12 -0
- package/lib/v2/zhihu/maintainer.js +4 -0
- package/lib/v2/zhihu/radar.js +24 -0
- package/lib/v2/zhihu/router.js +4 -0
- package/lib/v2/zhihu/xhu/auth.js +38 -0
- package/lib/v2/zhihu/xhu/collection.js +64 -0
- package/lib/v2/zhihu/xhu/question.js +44 -0
- package/lib/v2/zhihu/xhu/topic.js +70 -0
- package/lib/v2/zhihu/xhu/zhuanlan.js +83 -0
- package/package.json +12 -12
- package/lib/routes/cyzone/author.js +0 -55
- package/lib/routes/cyzone/label.js +0 -53
- package/lib/routes/pornhub/category.js +0 -22
- package/lib/routes/pornhub/category_url.js +0 -34
- package/lib/routes/pornhub/model.js +0 -35
- package/lib/routes/pornhub/pornstar.js +0 -35
- package/lib/routes/pornhub/search.js +0 -22
- package/lib/routes/pornhub/users.js +0 -35
- package/lib/routes/v2ex/post.js +0 -39
- package/lib/v2/hrbeu/uae/list.js +0 -57
- package/lib/v2/liulinblog/itnews.js +0 -23
- package/lib/v2/liulinblog/kuaixun.js +0 -17
- package/lib/v2/liulinblog/utils.js +0 -42
- package/lib/v2/newzmz/view.js +0 -57
- package/lib/v2/scitation/radar.js +0 -19
- package/lib/v2/scitation/router.js +0 -4
- package/lib/v2/scitation/section.js +0 -76
- /package/lib/v2/{scitation → aip}/templates/description.art +0 -0
- /package/lib/v2/{scitation → aip}/utils.js +0 -0
- /package/lib/v2/mihoyo/{bbs.js → bbs/official.js} +0 -0
package/README.md
CHANGED
|
@@ -23,12 +23,6 @@ RSSHub can be used with browser extension [RSSHub Radar](https://github.com/DIYg
|
|
|
23
23
|
|
|
24
24
|
[English docs](https://docs.rsshub.app/en) | [Telegram Group](https://t.me/rsshub) | [Telegram Channel](https://t.me/awesomeRSSHub)
|
|
25
25
|
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以给任何奇奇怪怪的内容生成 RSS 订阅源。RSSHub 借助于开源社区的力量快速发展中,目前已适配数百家网站的上千项内容
|
|
29
|
-
|
|
30
|
-
可以配合浏览器扩展 [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) 和 移动端辅助 App [RSSBud](https://github.com/Cay-Zhang/RSSBud) (iOS) 与 [RSSAid](https://github.com/LeetaoGoooo/RSSAid) (Android) 食用
|
|
31
|
-
|
|
32
26
|
[中文文档](https://docs.rsshub.app) | [Telegram 群](https://t.me/rsshub) | [Telegram 频道](https://t.me/awesomeRSSHub)
|
|
33
27
|
|
|
34
28
|
## Special Thanks
|
|
@@ -39,7 +33,7 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以
|
|
|
39
33
|
<a href="https://xlog.app/" target="_blank"><img height="100px" src="https://i.imgur.com/JuhHTKD.png"></a>
|
|
40
34
|
</p>
|
|
41
35
|
|
|
42
|
-
[](https://docs.rsshub.app/
|
|
36
|
+
[](https://docs.rsshub.app/support/)
|
|
43
37
|
|
|
44
38
|
### Contributors
|
|
45
39
|
|
|
@@ -53,30 +47,24 @@ Logo designer [sheldonrrr](https://dribbble.com/sheldonrrr)
|
|
|
53
47
|
|
|
54
48
|
## Related Projects
|
|
55
49
|
|
|
56
|
-
- [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) |
|
|
57
|
-
- [RSSBud](https://github.com/Cay-Zhang/RSSBud) ([TestFlight
|
|
58
|
-
- [RSSAid](https://github.com/LeetaoGoooo/RSSAid)
|
|
50
|
+
- [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites.
|
|
51
|
+
- [RSSBud](https://github.com/Cay-Zhang/RSSBud) ([TestFlight](https://testflight.apple.com/join/rjCVzzHP)) | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization.
|
|
52
|
+
- [RSSAid](https://github.com/LeetaoGoooo/RSSAid) | RSSHub Radar for Android platform built with Flutter.
|
|
59
53
|
- [DocSearch](https://github.com/Fatpandac/DocSearch) | Link RSSHub DocSearch into Raycast
|
|
60
54
|
|
|
61
55
|
## Join Us
|
|
62
56
|
|
|
63
57
|
We welcome all pull requests. Suggestions and feedback are also welcomed [here](https://github.com/DIYgod/RSSHub/issues).
|
|
64
58
|
|
|
65
|
-
Refer to [Join Us](https://docs.rsshub.app/
|
|
66
|
-
|
|
67
|
-
见 [参与我们](https://docs.rsshub.app/joinus/quick-start)
|
|
59
|
+
Refer to [Join Us](https://docs.rsshub.app/joinus/quick-start)
|
|
68
60
|
|
|
69
61
|
## Deployment
|
|
70
62
|
|
|
71
|
-
Refer to [Deployment](https://docs.rsshub.app/
|
|
72
|
-
|
|
73
|
-
见 [部署](https://docs.rsshub.app/install/)
|
|
63
|
+
Refer to [Deployment](https://docs.rsshub.app/install/)
|
|
74
64
|
|
|
75
65
|
## Support RSSHub
|
|
76
66
|
|
|
77
|
-
Refer to [Support RSSHub](https://docs.rsshub.app/
|
|
78
|
-
|
|
79
|
-
见 [支持 RSSHub](https://docs.rsshub.app/support/)
|
|
67
|
+
Refer to [Support RSSHub](https://docs.rsshub.app/support/)
|
|
80
68
|
|
|
81
69
|
RSSHub is open source and completely free under the MIT license. However, just like any other open source project, as the project grows, the hosting, development and maintenance requires funding support.
|
|
82
70
|
|
|
@@ -87,8 +75,8 @@ You can support RSSHub via donations.
|
|
|
87
75
|
Recurring donors will be rewarded via express issue response, or even have your name displayed on our GitHub page and website.
|
|
88
76
|
|
|
89
77
|
- Become a Sponser on [GitHub](https://github.com/sponsors/DIYgod)
|
|
90
|
-
- Become a Sponser on [Open Collective](https://opencollective.com/RSSHub)
|
|
91
78
|
- Become a Sponser on [Patreon](https://www.patreon.com/DIYgod)
|
|
79
|
+
- Become a Sponser on [Open Collective](https://opencollective.com/RSSHub)
|
|
92
80
|
- Become a Sponser on [爱发电](https://afdian.net/@diygod)
|
|
93
81
|
- Contact us directly: i@diygod.me
|
|
94
82
|
|
package/lib/config.js
CHANGED
|
@@ -10,6 +10,7 @@ const calculateValue = () => {
|
|
|
10
10
|
const email_config = {};
|
|
11
11
|
const discuz_cookies = {};
|
|
12
12
|
const medium_cookies = {};
|
|
13
|
+
const discourse_config = {};
|
|
13
14
|
|
|
14
15
|
for (const name in envs) {
|
|
15
16
|
if (name.startsWith('BILIBILI_COOKIE_')) {
|
|
@@ -27,6 +28,9 @@ const calculateValue = () => {
|
|
|
27
28
|
} else if (name.startsWith('MEDIUM_COOKIE_')) {
|
|
28
29
|
const username = name.slice(14).toLowerCase();
|
|
29
30
|
medium_cookies[username] = envs[name];
|
|
31
|
+
} else if (name.startsWith('DISCOURSE_CONFIG_')) {
|
|
32
|
+
const id = name.slice('DISCOURSE_CONFIG_'.length);
|
|
33
|
+
discourse_config[id] = JSON.parse(envs[name]);
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|
|
@@ -90,6 +94,7 @@ const calculateValue = () => {
|
|
|
90
94
|
debugInfo: envs.DEBUG_INFO || 'true',
|
|
91
95
|
loggerLevel: envs.LOGGER_LEVEL || 'info',
|
|
92
96
|
noLogfiles: envs.NO_LOGFILES,
|
|
97
|
+
showLoggerTimestamp: envs.SHOW_LOGGER_TIMESTAMP,
|
|
93
98
|
sentry: {
|
|
94
99
|
dsn: envs.SENTRY,
|
|
95
100
|
routeTimeout: parseInt(envs.SENTRY_ROUTE_TIMEOUT) || 30000,
|
|
@@ -136,6 +141,9 @@ const calculateValue = () => {
|
|
|
136
141
|
discord: {
|
|
137
142
|
authorization: envs.DISCORD_AUTHORIZATION,
|
|
138
143
|
},
|
|
144
|
+
discourse: {
|
|
145
|
+
config: discourse_config,
|
|
146
|
+
},
|
|
139
147
|
discuz: {
|
|
140
148
|
cookies: discuz_cookies,
|
|
141
149
|
},
|
|
@@ -247,7 +255,7 @@ const calculateValue = () => {
|
|
|
247
255
|
},
|
|
248
256
|
pixiv: {
|
|
249
257
|
refreshToken: envs.PIXIV_REFRESHTOKEN,
|
|
250
|
-
bypassCdn: envs.PIXIV_BYPASS_CDN !== '0' && envs.PIXIV_BYPASS_CDN !== 'false',
|
|
258
|
+
bypassCdn: envs.PIXIV_BYPASS_CDN && envs.PIXIV_BYPASS_CDN !== '0' && envs.PIXIV_BYPASS_CDN !== 'false',
|
|
251
259
|
bypassCdnHostname: envs.PIXIV_BYPASS_HOSTNAME || 'public-api.secure.pixiv.net',
|
|
252
260
|
bypassCdnDoh: envs.PIXIV_BYPASS_DOH || 'https://1.1.1.1/dns-query',
|
|
253
261
|
imgProxy: envs.PIXIV_IMG_PROXY || 'https://i.pixiv.re',
|
|
@@ -275,6 +283,9 @@ const calculateValue = () => {
|
|
|
275
283
|
telegram: {
|
|
276
284
|
token: envs.TELEGRAM_TOKEN,
|
|
277
285
|
},
|
|
286
|
+
tophub: {
|
|
287
|
+
cookie: envs.TOPHUB_COOKIE,
|
|
288
|
+
},
|
|
278
289
|
twitter: {
|
|
279
290
|
consumer_key: envs.TWITTER_CONSUMER_KEY,
|
|
280
291
|
consumer_secret: envs.TWITTER_CONSUMER_SECRET,
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ if (config.enableCluster && cluster.isMaster && process.env.NODE_ENV !== 'test'
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
logger.info('🎉 RSSHub start! Cheers!');
|
|
32
|
-
logger.info('💖 Can you help keep this open source project alive? Please sponsor 👉 https://docs.rsshub.app/
|
|
32
|
+
logger.info('💖 Can you help keep this open source project alive? Please sponsor 👉 https://docs.rsshub.app/support');
|
|
33
33
|
|
|
34
34
|
module.exports = server;
|
|
35
35
|
}
|
package/lib/radar-rules.js
CHANGED
|
@@ -264,7 +264,7 @@ module.exports = {
|
|
|
264
264
|
www: [
|
|
265
265
|
{
|
|
266
266
|
title: 'ads',
|
|
267
|
-
docs: 'https://docs.rsshub.app/routes/
|
|
267
|
+
docs: 'https://docs.rsshub.app/routes/shopping#leboncoin',
|
|
268
268
|
source: '/recherche',
|
|
269
269
|
target: (params, url) => '/leboncoin/ad/' + url.split('?')[1],
|
|
270
270
|
},
|
|
@@ -817,13 +817,13 @@ module.exports = {
|
|
|
817
817
|
ece: [
|
|
818
818
|
{
|
|
819
819
|
title: 'ECE News',
|
|
820
|
-
docs: 'http://docs.rsshub.app/
|
|
820
|
+
docs: 'http://docs.rsshub.app/routes/university#umass-amherst',
|
|
821
821
|
source: '/news',
|
|
822
822
|
target: '/umass/amherst/ecenews',
|
|
823
823
|
},
|
|
824
824
|
{
|
|
825
825
|
title: 'ECE Seminar',
|
|
826
|
-
docs: 'http://docs.rsshub.app/
|
|
826
|
+
docs: 'http://docs.rsshub.app/routes/university#umass-amherst',
|
|
827
827
|
source: '/seminars',
|
|
828
828
|
target: '/umass/amherst/eceseminar',
|
|
829
829
|
},
|
|
@@ -831,7 +831,7 @@ module.exports = {
|
|
|
831
831
|
'www.cics': [
|
|
832
832
|
{
|
|
833
833
|
title: 'CICS News',
|
|
834
|
-
docs: 'http://docs.rsshub.app/
|
|
834
|
+
docs: 'http://docs.rsshub.app/routes/university#umass-amherst',
|
|
835
835
|
source: '/news',
|
|
836
836
|
target: '/umass/amherst/csnews',
|
|
837
837
|
},
|
|
@@ -839,13 +839,13 @@ module.exports = {
|
|
|
839
839
|
www: [
|
|
840
840
|
{
|
|
841
841
|
title: 'IPO Events',
|
|
842
|
-
docs: 'http://docs.rsshub.app/
|
|
842
|
+
docs: 'http://docs.rsshub.app/routes/university#umass-amherst',
|
|
843
843
|
source: '/ipo/iss/events',
|
|
844
844
|
target: '/umass/amherst/ipoevents',
|
|
845
845
|
},
|
|
846
846
|
{
|
|
847
847
|
title: 'IPO Featured Stories',
|
|
848
|
-
docs: 'http://docs.rsshub.app/
|
|
848
|
+
docs: 'http://docs.rsshub.app/routes/university#umass-amherst',
|
|
849
849
|
source: '/ipo/iss/featured-stories',
|
|
850
850
|
target: '/umass/amherst/ipostories',
|
|
851
851
|
},
|
package/lib/radar.js
CHANGED
|
@@ -3,7 +3,8 @@ const fs = require('fs');
|
|
|
3
3
|
const toSource = require('tosource');
|
|
4
4
|
const { join } = require('path');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// Namespaces that do not require radar.js
|
|
7
|
+
const allowNamespace = ['discourse', 'ehentai', 'test'];
|
|
7
8
|
// Check if a radar.js file is exist under each folder of dirname
|
|
8
9
|
for (const dir of fs.readdirSync(dirname)) {
|
|
9
10
|
const dirPath = join(dirname, dir);
|
package/lib/router.js
CHANGED
|
@@ -77,9 +77,9 @@ router.get('/huya/live/:id', lazyloadRouteHandler('./routes/huya/live'));
|
|
|
77
77
|
router.get('/showroom/room/:id', lazyloadRouteHandler('./routes/showroom/room'));
|
|
78
78
|
|
|
79
79
|
// v2ex
|
|
80
|
-
router.get('/v2ex/topics/:type', lazyloadRouteHandler('./routes/v2ex/topics'));
|
|
81
|
-
router.get('/v2ex/post/:postid', lazyloadRouteHandler('./routes/v2ex/post'));
|
|
82
|
-
router.get('/v2ex/tab/:tabid', lazyloadRouteHandler('./routes/v2ex/tab'));
|
|
80
|
+
// router.get('/v2ex/topics/:type', lazyloadRouteHandler('./routes/v2ex/topics'));
|
|
81
|
+
// router.get('/v2ex/post/:postid', lazyloadRouteHandler('./routes/v2ex/post'));
|
|
82
|
+
// router.get('/v2ex/tab/:tabid', lazyloadRouteHandler('./routes/v2ex/tab'));
|
|
83
83
|
|
|
84
84
|
// f-droid
|
|
85
85
|
router.get('/fdroid/apprelease/:app', lazyloadRouteHandler('./routes/fdroid/apprelease'));
|
|
@@ -93,12 +93,12 @@ router.get('/konachan.com/post/popular_recent/:period', lazyloadRouteHandler('./
|
|
|
93
93
|
router.get('/konachan.net/post/popular_recent/:period', lazyloadRouteHandler('./routes/konachan/post_popular_recent'));
|
|
94
94
|
|
|
95
95
|
// PornHub
|
|
96
|
-
router.get('/pornhub/category/:caty', lazyloadRouteHandler('./routes/pornhub/category'));
|
|
97
|
-
router.get('/pornhub/search/:keyword', lazyloadRouteHandler('./routes/pornhub/search'));
|
|
98
|
-
router.get('/pornhub/:language?/category_url/:url?', lazyloadRouteHandler('./routes/pornhub/category_url'));
|
|
99
|
-
router.get('/pornhub/:language?/users/:username', lazyloadRouteHandler('./routes/pornhub/users'));
|
|
100
|
-
router.get('/pornhub/:language?/model/:username/:sort?', lazyloadRouteHandler('./routes/pornhub/model'));
|
|
101
|
-
router.get('/pornhub/:language?/pornstar/:username/:sort?', lazyloadRouteHandler('./routes/pornhub/pornstar'));
|
|
96
|
+
// router.get('/pornhub/category/:caty', lazyloadRouteHandler('./routes/pornhub/category'));
|
|
97
|
+
// router.get('/pornhub/search/:keyword', lazyloadRouteHandler('./routes/pornhub/search'));
|
|
98
|
+
// router.get('/pornhub/:language?/category_url/:url?', lazyloadRouteHandler('./routes/pornhub/category_url'));
|
|
99
|
+
// router.get('/pornhub/:language?/users/:username', lazyloadRouteHandler('./routes/pornhub/users'));
|
|
100
|
+
// router.get('/pornhub/:language?/model/:username/:sort?', lazyloadRouteHandler('./routes/pornhub/model'));
|
|
101
|
+
// router.get('/pornhub/:language?/pornstar/:username/:sort?', lazyloadRouteHandler('./routes/pornhub/pornstar'));
|
|
102
102
|
|
|
103
103
|
// yande.re
|
|
104
104
|
router.get('/yande.re/post/popular_recent', lazyloadRouteHandler('./routes/yande.re/post_popular_recent'));
|
|
@@ -634,8 +634,8 @@ router.get('/jingdong/zhongchou/:type/:status/:sort', lazyloadRouteHandler('./ro
|
|
|
634
634
|
router.get('/allpoetry/:order?', lazyloadRouteHandler('./routes/allpoetry/order'));
|
|
635
635
|
|
|
636
636
|
// 创业邦
|
|
637
|
-
router.get('/cyzone/author/:id', lazyloadRouteHandler('./routes/cyzone/author'));
|
|
638
|
-
router.get('/cyzone/label/:name', lazyloadRouteHandler('./routes/cyzone/label'));
|
|
637
|
+
// router.get('/cyzone/author/:id', lazyloadRouteHandler('./routes/cyzone/author'));
|
|
638
|
+
// router.get('/cyzone/label/:name', lazyloadRouteHandler('./routes/cyzone/label'));
|
|
639
639
|
|
|
640
640
|
// 政府
|
|
641
641
|
// router.get('/gov/zhengce/zuixin', lazyloadRouteHandler('./routes/gov/zhengce/zuixin'));
|
|
@@ -770,8 +770,8 @@ router.get('/blogs/wordpress/:domain/:https?', lazyloadRouteHandler('./routes/bl
|
|
|
770
770
|
// 西祠胡同
|
|
771
771
|
router.get('/xici/:id?', lazyloadRouteHandler('./routes/xici'));
|
|
772
772
|
|
|
773
|
-
// 今日热榜
|
|
774
|
-
router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub'));
|
|
773
|
+
// 今日热榜 migrated to v2
|
|
774
|
+
// router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub'));
|
|
775
775
|
|
|
776
776
|
// 游戏时光
|
|
777
777
|
router.get('/vgtime/news', lazyloadRouteHandler('./routes/vgtime/news.js'));
|
|
@@ -908,7 +908,7 @@ router.get('/paidai/bbs', lazyloadRouteHandler('./routes/paidai/bbs'));
|
|
|
908
908
|
router.get('/paidai/news', lazyloadRouteHandler('./routes/paidai/news'));
|
|
909
909
|
|
|
910
910
|
// 中国银行
|
|
911
|
-
router.get('/boc/whpj/:format?', lazyloadRouteHandler('./routes/boc/whpj'));
|
|
911
|
+
// router.get('/boc/whpj/:format?', lazyloadRouteHandler('./routes/boc/whpj'));
|
|
912
912
|
|
|
913
913
|
// 漫画db
|
|
914
914
|
router.get('/manhuadb/comics/:id', lazyloadRouteHandler('./routes/manhuadb/comics'));
|
|
@@ -2039,7 +2039,7 @@ router.get('/anki/changes', lazyloadRouteHandler('./routes/anki/changes'));
|
|
|
2039
2039
|
router.get('/abc/:id?', lazyloadRouteHandler('./routes/abc'));
|
|
2040
2040
|
|
|
2041
2041
|
// 台湾中央通讯社
|
|
2042
|
-
router.get('/cna/:id?', lazyloadRouteHandler('./routes/cna/index'));
|
|
2042
|
+
// router.get('/cna/:id?', lazyloadRouteHandler('./routes/cna/index'));
|
|
2043
2043
|
|
|
2044
2044
|
// 华为心声社区
|
|
2045
2045
|
router.get('/huawei/xinsheng/:caty?/:order?/:keyword?', lazyloadRouteHandler('./routes/huawei/xinsheng/index'));
|
|
@@ -2576,7 +2576,7 @@ router.get('/macau-bolsas/:lang?', lazyloadRouteHandler('./routes/macau-bolsas/i
|
|
|
2576
2576
|
router.get('/potplayer/update/:language?', lazyloadRouteHandler('./routes/potplayer/update'));
|
|
2577
2577
|
|
|
2578
2578
|
// 加美财经
|
|
2579
|
-
router.get('/caus/:category?', lazyloadRouteHandler('./routes/caus'));
|
|
2579
|
+
// router.get('/caus/:category?', lazyloadRouteHandler('./routes/caus'));
|
|
2580
2580
|
|
|
2581
2581
|
// 摩点
|
|
2582
2582
|
router.get('/modian/zhongchou/:category?/:sort?/:status?', lazyloadRouteHandler('./routes/modian/zhongchou'));
|
|
@@ -46,11 +46,11 @@ module.exports = async (ctx) => {
|
|
|
46
46
|
const feedsList = response.data;
|
|
47
47
|
|
|
48
48
|
const parameters = ctx.params.parameters
|
|
49
|
-
|
|
49
|
+
?.split('&')
|
|
50
50
|
.map((parameter) => set(parameter))
|
|
51
51
|
.join('');
|
|
52
52
|
|
|
53
|
-
if (parameters
|
|
53
|
+
if (parameters) {
|
|
54
54
|
for (const item of feedsList) {
|
|
55
55
|
if (categories.length && feeds.length) {
|
|
56
56
|
const categoryTitle = item.category.title.toLowerCase();
|
package/lib/utils/logger.js
CHANGED
|
@@ -14,7 +14,16 @@ if (!config.noLogfiles) {
|
|
|
14
14
|
}
|
|
15
15
|
const logger = winston.createLogger({
|
|
16
16
|
level: config.loggerLevel,
|
|
17
|
-
format: winston.format.
|
|
17
|
+
format: winston.format.combine(
|
|
18
|
+
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss.SSS' }),
|
|
19
|
+
winston.format.printf((info) =>
|
|
20
|
+
JSON.stringify({
|
|
21
|
+
timestamp: info.timestamp,
|
|
22
|
+
level: info.level,
|
|
23
|
+
message: info.message,
|
|
24
|
+
})
|
|
25
|
+
)
|
|
26
|
+
),
|
|
18
27
|
transports,
|
|
19
28
|
});
|
|
20
29
|
|
|
@@ -25,7 +34,10 @@ const logger = winston.createLogger({
|
|
|
25
34
|
if (!config.isPackage) {
|
|
26
35
|
logger.add(
|
|
27
36
|
new winston.transports.Console({
|
|
28
|
-
format: winston.format.
|
|
37
|
+
format: winston.format.printf((info) => {
|
|
38
|
+
const infoLevel = winston.format.colorize().colorize(info.level, config.showLoggerTimestamp ? `[${info.timestamp}] ${info.level}` : info.level);
|
|
39
|
+
return `${infoLevel}: ${info.message}`;
|
|
40
|
+
}),
|
|
29
41
|
silent: process.env.NODE_ENV === 'test',
|
|
30
42
|
})
|
|
31
43
|
);
|
package/lib/v2/2048/index.js
CHANGED
|
@@ -9,7 +9,16 @@ module.exports = async (ctx) => {
|
|
|
9
9
|
const id = ctx.params.id ?? '2';
|
|
10
10
|
|
|
11
11
|
const rootUrl = 'https://hjd2048.com';
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
const entranceDomain = await ctx.cache.tryGet('2048:entranceDomain', async () => {
|
|
14
|
+
const { data: response } = await got('https://hjd.tw');
|
|
15
|
+
const $ = cheerio.load(response);
|
|
16
|
+
return $('ul li a')
|
|
17
|
+
.toArray()
|
|
18
|
+
.find((item) => $(item).text() === '最新線路1').attribs.href;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const currentUrl = `${entranceDomain}/2048/thread.php?fid-${id}.html`;
|
|
13
22
|
|
|
14
23
|
const response = await got({
|
|
15
24
|
method: 'get',
|
|
@@ -35,7 +44,6 @@ module.exports = async (ctx) => {
|
|
|
35
44
|
guid: `${rootUrl}/2048/${item.attr('href')}`,
|
|
36
45
|
};
|
|
37
46
|
});
|
|
38
|
-
|
|
39
47
|
const items = await Promise.all(
|
|
40
48
|
list.map((item) =>
|
|
41
49
|
ctx.cache.tryGet(item.guid, async () => {
|
|
@@ -64,7 +72,7 @@ module.exports = async (ctx) => {
|
|
|
64
72
|
|
|
65
73
|
const downloadLink = content('#read_tpc').first().find('a').last();
|
|
66
74
|
|
|
67
|
-
if (downloadLink
|
|
75
|
+
if (downloadLink?.text()?.startsWith('http') && new URL(downloadLink.text()).hostname.match(/datapps\.org$/)) {
|
|
68
76
|
const torrentResponse = await got({
|
|
69
77
|
method: 'get',
|
|
70
78
|
url: downloadLink.text(),
|
|
@@ -73,7 +81,7 @@ module.exports = async (ctx) => {
|
|
|
73
81
|
const torrent = cheerio.load(torrentResponse.data);
|
|
74
82
|
|
|
75
83
|
item.enclosure_type = 'application/x-bittorrent';
|
|
76
|
-
item.enclosure_url = `https://data.
|
|
84
|
+
item.enclosure_url = `https://data.datapps.org/${torrent('.uk-button').last().attr('href')}`;
|
|
77
85
|
|
|
78
86
|
const magnet = torrent('.uk-button').first().attr('href');
|
|
79
87
|
|
|
@@ -6,8 +6,8 @@ const { isValidHost } = require('@/utils/valid-host');
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const pub = ctx.params.pub;
|
|
8
8
|
const jrn = ctx.params.jrn;
|
|
9
|
-
const host = `https
|
|
10
|
-
const jrnlUrl = `${host}
|
|
9
|
+
const host = `https://pubs.aip.org`;
|
|
10
|
+
const jrnlUrl = `${host}/${pub}/${jrn}/issue`;
|
|
11
11
|
if (!isValidHost(pub)) {
|
|
12
12
|
throw Error('Invalid pub');
|
|
13
13
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { renderDesc } = require('./utils');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const pub = ctx.params.pub;
|
|
7
|
+
const jrn = ctx.params.jrn;
|
|
8
|
+
const host = `https://pubs.aip.org`;
|
|
9
|
+
const jrnlUrl = `${host}/${pub}/${jrn}/issue`;
|
|
10
|
+
|
|
11
|
+
const { data: response } = await got.get(jrnlUrl);
|
|
12
|
+
const $ = cheerio.load(response);
|
|
13
|
+
const jrnlName = $('meta[property="og:title"]')
|
|
14
|
+
.attr('content')
|
|
15
|
+
.match(/(?:[^=]*=)?\s*([^>]+)\s*/)[1];
|
|
16
|
+
const publication = $('.al-article-item-wrap.al-normal');
|
|
17
|
+
|
|
18
|
+
const list = publication
|
|
19
|
+
.map((_, item) => {
|
|
20
|
+
const title = $(item).find('.item-title a:first').text();
|
|
21
|
+
const link = $(item).find('.item-title a:first').attr('href');
|
|
22
|
+
const doilink = $(item).find('.citation-label a').attr('href');
|
|
23
|
+
const doi = doilink && doilink.match(/10\.\d+\/\S+/)[0];
|
|
24
|
+
const id = $(item).find('h5[data-resource-id-access]').data('resource-id-access');
|
|
25
|
+
const authors = $(item)
|
|
26
|
+
.find('.al-authors-list')
|
|
27
|
+
.find('a')
|
|
28
|
+
.map(function () {
|
|
29
|
+
return $(this).text();
|
|
30
|
+
})
|
|
31
|
+
.get()
|
|
32
|
+
.join('; ');
|
|
33
|
+
const imgUrl = $(item).find('.issue-featured-image a img').attr('src');
|
|
34
|
+
const img = imgUrl ? imgUrl.replace(/\?.+$/, '') : '';
|
|
35
|
+
const description = renderDesc(title, authors, doi, img);
|
|
36
|
+
return {
|
|
37
|
+
title,
|
|
38
|
+
link,
|
|
39
|
+
doilink,
|
|
40
|
+
id,
|
|
41
|
+
authors,
|
|
42
|
+
img,
|
|
43
|
+
doi,
|
|
44
|
+
description,
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
.get();
|
|
48
|
+
|
|
49
|
+
ctx.state.data = {
|
|
50
|
+
title: jrnlName,
|
|
51
|
+
link: jrnlUrl,
|
|
52
|
+
item: list,
|
|
53
|
+
allowEmpty: true,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'aip.org': {
|
|
3
|
+
_name: 'American Institute of Physics',
|
|
4
|
+
pubs: [
|
|
5
|
+
{
|
|
6
|
+
title: 'Journal',
|
|
7
|
+
docs: 'https://docs.rsshub.app/routes/journal#american-institute-of-physics',
|
|
8
|
+
source: '/:pub/:jrn',
|
|
9
|
+
target: '/aip/:pub/:jrn',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
'/gushitong/index': ['CaoMeiYouRen'],
|
|
3
|
-
'/tieba/forum/:kw': ['u3u'],
|
|
4
|
-
'/tieba/forum
|
|
3
|
+
'/tieba/forum/good/:kw/:cid?/:sortBy?': ['u3u'],
|
|
4
|
+
'/tieba/forum/:kw/:sortBy?': ['u3u'],
|
|
5
5
|
'/tieba/post/:id': ['u3u'],
|
|
6
6
|
'/tieba/post/lz/:id': ['u3u'],
|
|
7
7
|
'/tieba/user/:uid': ['igxlin', 'nczitzk'],
|
package/lib/v2/baidu/router.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = (router) => {
|
|
2
2
|
router.get('/gushitong/index', require('./gushitong'));
|
|
3
|
-
router.get('/tieba/forum/:kw', require('./tieba/forum'));
|
|
4
|
-
router.get('/tieba/forum
|
|
3
|
+
router.get('/tieba/forum/good/:kw/:cid?/:sortBy?', require('./tieba/forum'));
|
|
4
|
+
router.get('/tieba/forum/:kw/:sortBy?', require('./tieba/forum'));
|
|
5
5
|
router.get('/tieba/post/:id', require('./tieba/post'));
|
|
6
6
|
router.get('/tieba/post/lz/:id', require('./tieba/post'));
|
|
7
7
|
router.get('/tieba/user/:uid', require('./tieba/user'));
|
|
@@ -6,7 +6,8 @@ const { art } = require('@/utils/render');
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
|
|
8
8
|
module.exports = async (ctx) => {
|
|
9
|
-
|
|
9
|
+
// sortBy: created, replied
|
|
10
|
+
const { kw, cid = '0', sortBy = 'created' } = ctx.params;
|
|
10
11
|
|
|
11
12
|
// PC端:https://tieba.baidu.com/f?kw=${encodeURIComponent(kw)}
|
|
12
13
|
// 移动端接口:https://tieba.baidu.com/mo/q/m?kw=${encodeURIComponent(kw)}&lp=5024&forum_recommend=1&lm=0&cid=0&has_url_param=1&pn=0&is_ajax=1
|
|
@@ -31,7 +32,7 @@ module.exports = async (ctx) => {
|
|
|
31
32
|
.map((element) => {
|
|
32
33
|
const item = $(element);
|
|
33
34
|
const { id, author_name } = item.data('field');
|
|
34
|
-
const time = item.find('.threadlist_reply_date').text().trim();
|
|
35
|
+
const time = sortBy === 'created' ? item.find('.is_show_create_time').text().trim() : item.find('.threadlist_reply_date').text().trim();
|
|
35
36
|
const title = item.find('a.j_th_tit').text().trim();
|
|
36
37
|
const details = item.find('.threadlist_abs').text().trim();
|
|
37
38
|
const medias = item
|
|
@@ -50,7 +51,7 @@ module.exports = async (ctx) => {
|
|
|
50
51
|
medias,
|
|
51
52
|
author_name,
|
|
52
53
|
}),
|
|
53
|
-
pubDate: timezone(parseDate(time, ['HH:mm', 'M-D']), +8),
|
|
54
|
+
pubDate: timezone(parseDate(time, ['HH:mm', 'M-D', 'YYYY-MM'], true), +8),
|
|
54
55
|
link: `https://tieba.baidu.com/p/${id}`,
|
|
55
56
|
};
|
|
56
57
|
});
|
|
@@ -12,6 +12,7 @@ module.exports = {
|
|
|
12
12
|
'/tv/subject/:id/blogs': ['ylc395'],
|
|
13
13
|
'/tv/subject/:id/comments': ['ylc395'],
|
|
14
14
|
'/tv/subject/:id/topics': ['ylc395'],
|
|
15
|
+
'/tv/subject/:id/:type?/:showOriginalName?': ['JimenezLi'],
|
|
15
16
|
'/tv/topic/:id': ['ylc395'],
|
|
16
17
|
'/tv/user/blog/:id': ['nczitzk'],
|
|
17
18
|
};
|
package/lib/v2/bangumi/radar.js
CHANGED
|
@@ -3,55 +3,55 @@ const bangumiTV = {
|
|
|
3
3
|
'.': [
|
|
4
4
|
{
|
|
5
5
|
title: '小组话题',
|
|
6
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
6
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
7
7
|
source: '/group/:id',
|
|
8
8
|
target: '/bangumi/tv/group/:id',
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
title: '小组话题的新回复',
|
|
12
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
12
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
13
13
|
source: '/group/topic/:id',
|
|
14
14
|
target: '/bangumi/tv/topic/:id',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
title: '现实人物的新作品',
|
|
18
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
18
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
19
19
|
source: '/person/:id',
|
|
20
20
|
target: '/bangumi/tv/person/:id',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
title: '用户日志',
|
|
24
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
24
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
25
25
|
source: '/user/:id',
|
|
26
26
|
target: '/bangumi/tv/user/blog/:id',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
title: '条目的讨论',
|
|
30
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
30
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
31
31
|
source: '/subject/:id',
|
|
32
32
|
target: '/bangumi/tv/subject/:id/topics',
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
title: '条目的评论',
|
|
36
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
36
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
37
37
|
source: '/subject/:id',
|
|
38
38
|
target: '/bangumi/tv/subject/:id/blogs',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
title: '条目的章节',
|
|
42
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
42
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
43
43
|
source: '/subject/:id',
|
|
44
44
|
target: '/bangumi/tv/subject/:id',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
title: '条目的吐槽箱',
|
|
48
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
48
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
49
49
|
source: '/subject/:id',
|
|
50
50
|
target: '/bangumi/tv/subject/:id/comments',
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
title: '放送列表',
|
|
54
|
-
docs: 'https://docs.rsshub.app/routes/anime#bangumi',
|
|
54
|
+
docs: 'https://docs.rsshub.app/routes/anime#bangumi-fan-zu-ji-hua',
|
|
55
55
|
source: '/calendar',
|
|
56
56
|
target: '/bangumi/tv/calendar/today',
|
|
57
57
|
},
|
package/lib/v2/bangumi/router.js
CHANGED
|
@@ -7,8 +7,7 @@ module.exports = function (router) {
|
|
|
7
7
|
router.get('/tv/calendar/today', require('./tv/calendar/today'));
|
|
8
8
|
router.get('/tv/group/:id', require('./tv/group/topic'));
|
|
9
9
|
router.get('/tv/person/:id', require('./tv/person'));
|
|
10
|
-
router.get('/tv/subject/:id', require('./tv/subject'));
|
|
11
|
-
router.get('/tv/subject/:id/:type', require('./tv/subject'));
|
|
10
|
+
router.get('/tv/subject/:id/:type?/:showOriginalName?', require('./tv/subject'));
|
|
12
11
|
router.get('/tv/topic/:id', require('./tv/group/reply'));
|
|
13
12
|
router.get('/tv/user/blog/:id', require('./tv/user/blog'));
|
|
14
13
|
};
|
|
@@ -2,8 +2,9 @@ const got = require('@/utils/got');
|
|
|
2
2
|
const { parseDate } = require('@/utils/parse-date');
|
|
3
3
|
const { art } = require('@/utils/render');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const { getLocalName } = require('./utils');
|
|
5
6
|
|
|
6
|
-
module.exports = async (subjectID) => {
|
|
7
|
+
module.exports = async (subjectID, showOriginalName) => {
|
|
7
8
|
const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`;
|
|
8
9
|
const { data: epsInfo } = await got(url);
|
|
9
10
|
const activeEps = [];
|
|
@@ -15,11 +16,11 @@ module.exports = async (subjectID) => {
|
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
return {
|
|
18
|
-
title: epsInfo
|
|
19
|
+
title: getLocalName(epsInfo, showOriginalName),
|
|
19
20
|
link: `https://bgm.tv/subject/${subjectID}`,
|
|
20
21
|
description: epsInfo.summary,
|
|
21
22
|
item: activeEps.map((e) => ({
|
|
22
|
-
title: `ep.${e.sort} ${e
|
|
23
|
+
title: `ep.${e.sort} ${getLocalName(e, showOriginalName)}`,
|
|
23
24
|
description: art(path.resolve(__dirname, '../../templates/tv/ep.art'), {
|
|
24
25
|
e,
|
|
25
26
|
epsInfo,
|