rsshub 1.0.0-master.b08045c → 1.0.0-master.b08abca
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 +2 -2
- package/lib/app.js +2 -2
- package/lib/config.js +1 -0
- package/lib/radar-rules.js +0 -17
- package/lib/radar.js +1 -1
- package/lib/router.js +26 -29
- package/lib/utils/logger.js +14 -2
- package/lib/v2/8264/list.js +92 -0
- package/lib/v2/8264/maintainer.js +3 -0
- package/lib/v2/8264/radar.js +355 -0
- package/lib/v2/8264/router.js +3 -0
- package/lib/v2/8264/templates/description.art +5 -0
- package/lib/v2/abskoop/index.js +21 -31
- package/lib/v2/abskoop/nsfw.js +16 -37
- package/lib/v2/abskoop/radar.js +13 -2
- package/lib/v2/ainvest/article.js +42 -0
- package/lib/v2/ainvest/maintainer.js +4 -0
- package/lib/v2/ainvest/news.js +39 -0
- package/lib/v2/ainvest/radar.js +19 -0
- package/lib/v2/ainvest/router.js +4 -0
- package/lib/v2/ainvest/utils.js +73 -0
- package/lib/v2/alternativeto/maintainer.js +4 -0
- package/lib/v2/alternativeto/platform.js +32 -0
- package/lib/v2/alternativeto/radar.js +19 -0
- package/lib/v2/alternativeto/router.js +4 -0
- package/lib/v2/alternativeto/software.js +32 -0
- package/lib/v2/alternativeto/utils.js +22 -0
- package/lib/v2/apnews/topics.js +1 -0
- package/lib/v2/baidu/maintainer.js +1 -0
- package/lib/v2/baidu/radar.js +15 -1
- package/lib/v2/baidu/router.js +1 -0
- package/lib/v2/baidu/templates/tieba_search.art +1 -0
- package/lib/v2/baidu/tieba/search.js +63 -0
- 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/{routes → v2}/bbc/index.js +4 -4
- package/lib/v2/bbc/maintainer.js +4 -0
- package/lib/v2/bbc/radar.js +11 -0
- package/lib/v2/bbc/router.js +3 -0
- package/lib/v2/bilibili/dynamic.js +26 -12
- package/lib/v2/bilibili/followings_dynamic.js +1 -1
- package/lib/v2/bilibili/maintainer.js +2 -1
- package/lib/v2/bilibili/router.js +1 -0
- package/lib/v2/bilibili/utils.js +3 -1
- package/lib/v2/bilibili/watchlater.js +44 -0
- package/lib/v2/bjfu/grs.js +22 -36
- package/lib/v2/bjfu/it/index.js +9 -7
- package/lib/v2/bjfu/it/utils.js +38 -29
- package/lib/v2/bjfu/jwc/index.js +3 -8
- package/lib/v2/bjfu/jwc/utils.js +26 -29
- package/lib/v2/bjfu/kjc.js +25 -38
- package/lib/v2/bjfu/news/index.js +12 -9
- package/lib/v2/bjfu/news/utils.js +17 -19
- 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 +16 -15
- 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/v2/cbc/maintainer.js +3 -0
- package/lib/v2/cbc/radar.js +13 -0
- package/lib/v2/cbc/router.js +3 -0
- package/lib/{routes → v2}/cbc/topics.js +11 -26
- package/lib/v2/chinawriter/index.js +88 -0
- package/lib/v2/chinawriter/maintainer.js +3 -0
- package/lib/v2/chinawriter/radar.js +660 -0
- package/lib/v2/chinawriter/router.js +3 -0
- package/lib/v2/cna/index.js +63 -0
- 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/deltaio/blog.js +33 -0
- package/lib/v2/deltaio/maintainer.js +3 -0
- package/lib/v2/deltaio/radar.js +13 -0
- package/lib/v2/deltaio/router.js +3 -0
- package/lib/v2/discourse/maintainer.js +1 -1
- package/lib/v2/discourse/notifications.js +19 -2
- package/lib/v2/discourse/router.js +1 -1
- package/lib/v2/discuz/discuz.js +156 -0
- package/lib/v2/discuz/maintainer.js +5 -0
- package/lib/v2/discuz/radar.js +0 -0
- package/lib/v2/discuz/router.js +5 -0
- package/lib/v2/dn/maintainer.js +3 -0
- package/lib/v2/dn/news.js +90 -0
- package/lib/v2/dn/radar.js +55 -0
- package/lib/v2/dn/router.js +3 -0
- package/lib/v2/dn/templates/description.art +15 -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/douyin/live.js +45 -15
- package/lib/v2/dribbble/maintainer.js +5 -0
- package/lib/v2/dribbble/radar.js +25 -0
- package/lib/v2/dribbble/router.js +5 -0
- package/lib/v2/dribbble/templates/description.art +15 -0
- package/lib/v2/dribbble/utils.js +156 -0
- package/lib/v2/fantia/user.js +16 -0
- package/lib/v2/gamegene/maintainer.js +3 -0
- package/lib/v2/gamegene/news.js +50 -0
- package/lib/v2/gamegene/radar.js +13 -0
- package/lib/v2/gamegene/router.js +3 -0
- package/lib/v2/github/maintainer.js +1 -0
- package/lib/v2/github/pulse.js +87 -0
- package/lib/v2/github/radar.js +6 -0
- package/lib/v2/github/router.js +1 -0
- package/lib/v2/github/templates/pulse-description.art +24 -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/iqiyi/maintainer.js +1 -1
- package/lib/v2/iqiyi/video.js +42 -33
- package/lib/v2/ithome/tag.js +14 -3
- package/lib/v2/japanpost/maintainer.js +3 -0
- package/lib/v2/japanpost/radar.js +22 -0
- package/lib/v2/japanpost/router.js +3 -0
- package/lib/v2/japanpost/templates/track_item_desc.art +14 -0
- package/lib/{routes → v2}/japanpost/track.js +32 -29
- package/lib/{routes → v2}/japanpost/utils.js +10 -11
- package/lib/v2/kamen-rider-official/maintainer.js +3 -0
- package/lib/v2/kamen-rider-official/news.js +110 -0
- package/lib/v2/kamen-rider-official/radar.js +18 -0
- package/lib/v2/kamen-rider-official/router.js +3 -0
- package/lib/v2/kamen-rider-official/templates/description.art +10 -0
- package/lib/v2/kantarworldpanel/index.js +96 -0
- package/lib/v2/kantarworldpanel/maintainer.js +3 -0
- package/lib/v2/kantarworldpanel/radar.js +199 -0
- package/lib/v2/kantarworldpanel/router.js +3 -0
- package/lib/v2/kantarworldpanel/templates/description.art +9 -0
- 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 +2 -2
- package/lib/v2/latepost/radar.js +1 -1
- package/lib/v2/lemmy/index.js +61 -0
- package/lib/v2/lemmy/maintainer.js +3 -0
- package/lib/v2/lemmy/router.js +3 -0
- 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/lsnu/jiaowc/tzgg.js +52 -0
- package/lib/v2/lsnu/maintainer.js +3 -0
- package/lib/v2/lsnu/radar.js +13 -0
- package/lib/v2/lsnu/router.js +3 -0
- package/lib/v2/luxiangdong/archive.js +28 -0
- package/lib/v2/luxiangdong/maintainer.js +3 -0
- package/lib/v2/luxiangdong/radar.js +13 -0
- package/lib/v2/luxiangdong/router.js +3 -0
- package/lib/v2/mail/imap.js +99 -0
- package/lib/v2/mail/maintainer.js +3 -0
- package/lib/v2/mail/router.js +3 -0
- package/lib/v2/mihoyo/bbs/img-ranking.js +106 -0
- package/lib/v2/mihoyo/{bbs.js → bbs/official.js} +1 -1
- 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/mixcloud/index.js +5 -22
- package/lib/v2/mixcloud/queries.js +187 -179
- package/lib/v2/mydrivers/cid.js +38 -0
- package/lib/v2/mydrivers/index.js +40 -89
- package/lib/v2/mydrivers/maintainer.js +5 -1
- package/lib/v2/mydrivers/radar.js +205 -4
- package/lib/v2/mydrivers/rank.js +40 -0
- package/lib/v2/mydrivers/router.js +4 -1
- package/lib/v2/mydrivers/templates/description.art +5 -0
- package/lib/v2/mydrivers/util.js +125 -0
- package/lib/v2/news/whxw.js +1 -0
- 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/reuters/common.js +52 -26
- package/lib/v2/rfi/maintainer.js +1 -1
- package/lib/v2/rfi/news.js +9 -2
- package/lib/v2/rfi/router.js +1 -1
- 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/rsshub/maintainer.js +1 -0
- package/lib/v2/rsshub/router.js +1 -0
- package/lib/v2/rsshub/routes.js +6 -4
- package/lib/v2/rsshub/transform/html.js +9 -0
- package/lib/v2/rsshub/transform/json.js +1 -0
- package/lib/v2/rsshub/transform/sitemap.js +52 -0
- package/lib/v2/scut/maintainer.js +1 -0
- package/lib/v2/scut/radar.js +34 -0
- package/lib/v2/scut/router.js +1 -0
- package/lib/v2/scut/smae/notice.js +54 -0
- package/lib/v2/sqmc/maintainer.js +3 -0
- package/lib/v2/sqmc/radar.js +13 -0
- package/lib/v2/sqmc/router.js +3 -0
- package/lib/v2/sqmc/www.js +49 -0
- package/lib/v2/stheadline/std/realtime.js +8 -6
- 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/tfc-taiwan/index.js +36 -0
- package/lib/v2/tfc-taiwan/maintainer.js +10 -0
- package/lib/v2/tfc-taiwan/radar.js +31 -0
- package/lib/v2/tfc-taiwan/router.js +7 -0
- package/lib/v2/tfc-taiwan/templates/article.art +7 -0
- package/lib/v2/tfc-taiwan/utils.js +56 -0
- package/lib/v2/thepaper/utils.js +1 -1
- package/lib/v2/toodaylab/index.js +99 -0
- package/lib/v2/toodaylab/maintainer.js +7 -0
- package/lib/v2/toodaylab/radar.js +37 -0
- package/lib/v2/toodaylab/router.js +3 -0
- package/lib/v2/udn/breaking-news.js +10 -5
- package/lib/v2/ustc/eeis.js +5 -4
- package/lib/v2/ustc/sist.js +6 -5
- 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/whu/cs.js +71 -0
- package/lib/v2/whu/gs/index.js +85 -0
- package/lib/v2/whu/maintainer.js +5 -0
- package/lib/v2/whu/news.js +102 -0
- package/lib/v2/whu/radar.js +27 -0
- package/lib/v2/whu/router.js +5 -0
- package/lib/v2/xinpianchang/index.js +19 -0
- package/lib/v2/xinpianchang/maintainer.js +4 -0
- package/lib/v2/xinpianchang/radar.js +28 -0
- package/lib/v2/xinpianchang/rank.js +33 -0
- package/lib/v2/xinpianchang/router.js +5 -0
- package/lib/v2/xinpianchang/templates/description.art +13 -0
- package/lib/v2/xinpianchang/util.js +110 -0
- package/lib/v2/xmut/jwc/bkjw.js +62 -0
- package/lib/v2/xmut/jwc/yjs.js +51 -0
- package/lib/v2/xmut/maintainer.js +3 -0
- package/lib/v2/xmut/radar.js +13 -0
- package/lib/v2/xmut/router.js +4 -0
- package/lib/v2/zodgame/forum.js +61 -23
- package/lib/v2/zodgame/templates/forum.art +1 -1
- package/lib/views/welcome.art +1 -1
- package/package.json +46 -17
- package/lib/routes/cna/index.js +0 -54
- package/lib/routes/cyzone/author.js +0 -55
- package/lib/routes/cyzone/label.js +0 -53
- package/lib/routes/discuz/discuz.js +0 -148
- package/lib/routes/dribbble/utils.js +0 -94
- package/lib/routes/kkj/news.js +0 -52
- package/lib/routes/mail/imap.js +0 -79
- 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/universities/whu/cs.js +0 -38
- package/lib/routes/universities/whu/news.js +0 -128
- package/lib/routes/v2ex/post.js +0 -39
- package/lib/v2/abskoop/templates/description.art +0 -3
- 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/{routes → v2}/bbc/utils.js +0 -0
- /package/lib/{routes → v2}/dribbble/keyword.js +0 -0
- /package/lib/{routes → v2}/dribbble/popular.js +0 -0
- /package/lib/{routes → v2}/dribbble/user.js +0 -0
package/README.md
CHANGED
|
@@ -21,9 +21,9 @@ RSSHub delivers millions of contents aggregated from all kinds of sources, our v
|
|
|
21
21
|
|
|
22
22
|
RSSHub can be used with browser extension [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) and mobile auxiliary app [RSSBud](https://github.com/Cay-Zhang/RSSBud) (iOS) and [RSSAid](https://github.com/LeetaoGoooo/RSSAid) (Android)
|
|
23
23
|
|
|
24
|
-
[English docs](https://docs.rsshub.app
|
|
24
|
+
[English docs](https://docs.rsshub.app) | [Telegram Group](https://t.me/rsshub) | [Telegram Channel](https://t.me/awesomeRSSHub)
|
|
25
25
|
|
|
26
|
-
[中文文档](https://docs.rsshub.app) | [Telegram 群](https://t.me/rsshub) | [Telegram 频道](https://t.me/awesomeRSSHub)
|
|
26
|
+
[中文文档](https://docs.rsshub.app/zh/) | [Telegram 群](https://t.me/rsshub) | [Telegram 频道](https://t.me/awesomeRSSHub)
|
|
27
27
|
|
|
28
28
|
## Special Thanks
|
|
29
29
|
|
package/lib/app.js
CHANGED
|
@@ -37,8 +37,8 @@ const app = new Koa();
|
|
|
37
37
|
app.proxy = true;
|
|
38
38
|
|
|
39
39
|
// favicon
|
|
40
|
-
app.use(favicon(__dirname + '/favicon.png'));
|
|
41
|
-
app.use(serve(__dirname + '/static'));
|
|
40
|
+
app.use(favicon(__dirname + '/favicon.png', { maxAge: 31536000000 }));
|
|
41
|
+
app.use(serve(__dirname + '/static', { maxage: 31536000000 }));
|
|
42
42
|
|
|
43
43
|
// global error handing
|
|
44
44
|
app.use(onerror);
|
package/lib/config.js
CHANGED
|
@@ -94,6 +94,7 @@ const calculateValue = () => {
|
|
|
94
94
|
debugInfo: envs.DEBUG_INFO || 'true',
|
|
95
95
|
loggerLevel: envs.LOGGER_LEVEL || 'info',
|
|
96
96
|
noLogfiles: envs.NO_LOGFILES,
|
|
97
|
+
showLoggerTimestamp: envs.SHOW_LOGGER_TIMESTAMP,
|
|
97
98
|
sentry: {
|
|
98
99
|
dsn: envs.SENTRY,
|
|
99
100
|
routeTimeout: parseInt(envs.SENTRY_ROUTE_TIMEOUT) || 30000,
|
package/lib/radar-rules.js
CHANGED
|
@@ -565,23 +565,6 @@ module.exports = {
|
|
|
565
565
|
},
|
|
566
566
|
],
|
|
567
567
|
},
|
|
568
|
-
'japanpost.jp': {
|
|
569
|
-
_name: '日本郵便',
|
|
570
|
-
'trackings.post': [
|
|
571
|
-
{
|
|
572
|
-
title: '郵便・荷物の追跡',
|
|
573
|
-
docs: 'https://docs.rsshub.app/routes/other#ri-ben-you-bian-you-bian-zhui-ji-サービス',
|
|
574
|
-
source: '/services/srv/search/direct',
|
|
575
|
-
target: (params, url) => {
|
|
576
|
-
const reqCode = new URL(url).searchParams.get('reqCodeNo1').toUpperCase();
|
|
577
|
-
const locale = new URL(url).searchParams.get('locale').toLowerCase();
|
|
578
|
-
if ((reqCode.search(/^(?:\d{11,12}|[A-Z]{2}\d{9}[A-Z]{2})$/) === 0 && locale === 'ja') || locale === 'en') {
|
|
579
|
-
return `/japanpost/track/${reqCode}/${locale}`;
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
},
|
|
583
|
-
],
|
|
584
|
-
},
|
|
585
568
|
'csc.edu.cn': {
|
|
586
569
|
_name: '国家留学网',
|
|
587
570
|
www: [
|
package/lib/radar.js
CHANGED
|
@@ -4,7 +4,7 @@ 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
|
+
const allowNamespace = ['discourse', 'discuz', 'ehentai', 'lemmy', 'mail', 'test'];
|
|
8
8
|
// Check if a radar.js file is exist under each folder of dirname
|
|
9
9
|
for (const dir of fs.readdirSync(dirname)) {
|
|
10
10
|
const dirPath = join(dirname, dir);
|
package/lib/router.js
CHANGED
|
@@ -66,9 +66,9 @@ router.get('/geektime/news', lazyloadRouteHandler('./routes/geektime/news'));
|
|
|
66
66
|
router.get('/infzm/:id', lazyloadRouteHandler('./routes/infzm/news'));
|
|
67
67
|
|
|
68
68
|
// Dribbble
|
|
69
|
-
router.get('/dribbble/popular/:timeframe?', lazyloadRouteHandler('./routes/dribbble/popular'));
|
|
70
|
-
router.get('/dribbble/user/:name', lazyloadRouteHandler('./routes/dribbble/user'));
|
|
71
|
-
router.get('/dribbble/keyword/:keyword', lazyloadRouteHandler('./routes/dribbble/keyword'));
|
|
69
|
+
// router.get('/dribbble/popular/:timeframe?', lazyloadRouteHandler('./routes/dribbble/popular'));
|
|
70
|
+
// router.get('/dribbble/user/:name', lazyloadRouteHandler('./routes/dribbble/user'));
|
|
71
|
+
// router.get('/dribbble/keyword/:keyword', lazyloadRouteHandler('./routes/dribbble/keyword'));
|
|
72
72
|
|
|
73
73
|
// 虎牙
|
|
74
74
|
router.get('/huya/live/:id', lazyloadRouteHandler('./routes/huya/live'));
|
|
@@ -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'));
|
|
@@ -351,8 +351,8 @@ router.get('/kmust/job/careers/:type?', lazyloadRouteHandler('./routes/universit
|
|
|
351
351
|
router.get('/kmust/job/jobfairs', lazyloadRouteHandler('./routes/universities/kmust/job/jobfairs'));
|
|
352
352
|
|
|
353
353
|
// 武汉大学
|
|
354
|
-
router.get('/whu/cs/:type', lazyloadRouteHandler('./routes/universities/whu/cs'));
|
|
355
|
-
router.get('/whu/news/:type?', lazyloadRouteHandler('./routes/universities/whu/news'));
|
|
354
|
+
// router.get('/whu/cs/:type', lazyloadRouteHandler('./routes/universities/whu/cs'));
|
|
355
|
+
// router.get('/whu/news/:type?', lazyloadRouteHandler('./routes/universities/whu/news'));
|
|
356
356
|
|
|
357
357
|
// 井冈山大学
|
|
358
358
|
router.get('/jgsu/jwc', lazyloadRouteHandler('./routes/universities/jgsu/jwc'));
|
|
@@ -442,7 +442,7 @@ router.get('/rs05/rs05', lazyloadRouteHandler('./routes/rs05/rs05'));
|
|
|
442
442
|
router.get('/qutoutiao/category/:cid', lazyloadRouteHandler('./routes/qutoutiao/category'));
|
|
443
443
|
|
|
444
444
|
// BBC
|
|
445
|
-
router.get('/bbc/:site?/:channel?', lazyloadRouteHandler('./routes/bbc/index'));
|
|
445
|
+
// router.get('/bbc/:site?/:channel?', lazyloadRouteHandler('./routes/bbc/index'));
|
|
446
446
|
|
|
447
447
|
// 看雪
|
|
448
448
|
router.get('/pediy/topic/:category?/:type?', lazyloadRouteHandler('./routes/pediy/topic'));
|
|
@@ -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'));
|
|
@@ -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'));
|
|
@@ -995,7 +995,7 @@ router.get('/dekudeals/:type', lazyloadRouteHandler('./routes/dekudeals'));
|
|
|
995
995
|
router.get('/metacritic/release/:platform/:type/:sort?', lazyloadRouteHandler('./routes/metacritic/release'));
|
|
996
996
|
|
|
997
997
|
// 快科技(原驱动之家)
|
|
998
|
-
router.get('/kkj/news', lazyloadRouteHandler('./routes/kkj/news'));
|
|
998
|
+
// router.get('/kkj/news', lazyloadRouteHandler('./routes/kkj/news'));
|
|
999
999
|
|
|
1000
1000
|
// sixthtone
|
|
1001
1001
|
router.get('/sixthtone/news', lazyloadRouteHandler('./routes/sixthtone/news'));
|
|
@@ -1142,9 +1142,6 @@ router.get('/leboncoin/ad/:query', lazyloadRouteHandler('./routes/leboncoin/ad.j
|
|
|
1142
1142
|
// DHL
|
|
1143
1143
|
router.get('/dhl/:id', lazyloadRouteHandler('./routes/dhl/shipment-tracking'));
|
|
1144
1144
|
|
|
1145
|
-
// Japanpost
|
|
1146
|
-
router.get('/japanpost/track/:reqCode/:locale?', lazyloadRouteHandler('./routes/japanpost/track'));
|
|
1147
|
-
|
|
1148
1145
|
// Hanime
|
|
1149
1146
|
router.get('/hanime/video', lazyloadRouteHandler('./routes/hanime/video'));
|
|
1150
1147
|
|
|
@@ -1202,7 +1199,7 @@ router.get('/latexstudio/home', lazyloadRouteHandler('./routes/latexstudio/home'
|
|
|
1202
1199
|
router.get('/jskou/:type?', lazyloadRouteHandler('./routes/jskou/index'));
|
|
1203
1200
|
|
|
1204
1201
|
// 邮箱
|
|
1205
|
-
router.get('/mail/imap/:email', lazyloadRouteHandler('./routes/mail/imap'));
|
|
1202
|
+
// router.get('/mail/imap/:email/:folder*', lazyloadRouteHandler('./routes/mail/imap'));
|
|
1206
1203
|
|
|
1207
1204
|
// 好队友
|
|
1208
1205
|
router.get('/network360/jobs', lazyloadRouteHandler('./routes/network360/jobs'));
|
|
@@ -1446,12 +1443,12 @@ router.get('/xinquji/today/internal', lazyloadRouteHandler('./routes/xinquji/int
|
|
|
1446
1443
|
router.get('/gbcc/trust', lazyloadRouteHandler('./routes/gbcc/trust'));
|
|
1447
1444
|
|
|
1448
1445
|
// CBC
|
|
1449
|
-
router.get('/cbc/topics/:topic?', lazyloadRouteHandler('./routes/cbc/topics'));
|
|
1446
|
+
// router.get('/cbc/topics/:topic?', lazyloadRouteHandler('./routes/cbc/topics'));
|
|
1450
1447
|
|
|
1451
1448
|
// discuz
|
|
1452
|
-
router.get('/discuz/:ver([7|x])/:cid([0-9]{2})/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1453
|
-
router.get('/discuz/:ver([7|x])/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1454
|
-
router.get('/discuz/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1449
|
+
// router.get('/discuz/:ver([7|x])/:cid([0-9]{2})/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1450
|
+
// router.get('/discuz/:ver([7|x])/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1451
|
+
// router.get('/discuz/:link(.*)', lazyloadRouteHandler('./routes/discuz/discuz'));
|
|
1455
1452
|
|
|
1456
1453
|
// China Dialogue 中外对话
|
|
1457
1454
|
router.get('/chinadialogue/topics/:topic', lazyloadRouteHandler('./routes/chinadialogue/topics'));
|
|
@@ -2039,7 +2036,7 @@ router.get('/anki/changes', lazyloadRouteHandler('./routes/anki/changes'));
|
|
|
2039
2036
|
router.get('/abc/:id?', lazyloadRouteHandler('./routes/abc'));
|
|
2040
2037
|
|
|
2041
2038
|
// 台湾中央通讯社
|
|
2042
|
-
router.get('/cna/:id?', lazyloadRouteHandler('./routes/cna/index'));
|
|
2039
|
+
// router.get('/cna/:id?', lazyloadRouteHandler('./routes/cna/index'));
|
|
2043
2040
|
|
|
2044
2041
|
// 华为心声社区
|
|
2045
2042
|
router.get('/huawei/xinsheng/:caty?/:order?/:keyword?', lazyloadRouteHandler('./routes/huawei/xinsheng/index'));
|
|
@@ -2576,7 +2573,7 @@ router.get('/macau-bolsas/:lang?', lazyloadRouteHandler('./routes/macau-bolsas/i
|
|
|
2576
2573
|
router.get('/potplayer/update/:language?', lazyloadRouteHandler('./routes/potplayer/update'));
|
|
2577
2574
|
|
|
2578
2575
|
// 加美财经
|
|
2579
|
-
router.get('/caus/:category?', lazyloadRouteHandler('./routes/caus'));
|
|
2576
|
+
// router.get('/caus/:category?', lazyloadRouteHandler('./routes/caus'));
|
|
2580
2577
|
|
|
2581
2578
|
// 摩点
|
|
2582
2579
|
router.get('/modian/zhongchou/:category?/:sort?/:status?', lazyloadRouteHandler('./routes/modian/zhongchou'));
|
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
|
);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const iconv = require('iconv-lite');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
6
|
+
const { art } = require('@/utils/render');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
module.exports = async (ctx) => {
|
|
10
|
+
const { id = '751' } = ctx.params;
|
|
11
|
+
const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30;
|
|
12
|
+
|
|
13
|
+
const rootUrl = 'https://www.8264.com';
|
|
14
|
+
const currentUrl = new URL(`list/${id}`, rootUrl).href;
|
|
15
|
+
|
|
16
|
+
const { data: response } = await got(currentUrl, {
|
|
17
|
+
responseType: 'buffer',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const $ = cheerio.load(iconv.decode(response, 'gbk'));
|
|
21
|
+
|
|
22
|
+
$('div.newslist_info').remove();
|
|
23
|
+
|
|
24
|
+
let items = $('div.newlist_r, div.newslist_r, div.bbslistone_name, dt')
|
|
25
|
+
.find('a')
|
|
26
|
+
.slice(0, limit)
|
|
27
|
+
.toArray()
|
|
28
|
+
.map((item) => {
|
|
29
|
+
item = $(item);
|
|
30
|
+
|
|
31
|
+
const link = item.prop('href');
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
title: item.text(),
|
|
35
|
+
link: /^http/.test(link) ? link : new URL(link, rootUrl).href,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
items = await Promise.all(
|
|
40
|
+
items.map((item) =>
|
|
41
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
42
|
+
const { data: detailResponse } = await got(item.link, {
|
|
43
|
+
responseType: 'buffer',
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const content = cheerio.load(iconv.decode(detailResponse, 'gbk'));
|
|
47
|
+
|
|
48
|
+
content('a.syq, a.xlsj, a.titleoverflow200, #fjump').remove();
|
|
49
|
+
content('i.pstatus').remove();
|
|
50
|
+
content('div.crly').remove();
|
|
51
|
+
|
|
52
|
+
const pubDate = content('span.pub-time').text() || content('span.fby span').first().prop('title') || content('span.fby').first().text().split('发表于').pop().trim();
|
|
53
|
+
|
|
54
|
+
content('img').each(function () {
|
|
55
|
+
content(this).replaceWith(
|
|
56
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
57
|
+
image: {
|
|
58
|
+
src: content(this).prop('file'),
|
|
59
|
+
alt: content(this).prop('alt'),
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
item.title = content('h1').first().text();
|
|
66
|
+
item.description = content('div.art-content, td.t_f').first().html();
|
|
67
|
+
item.author = content('a.user-name, #author').first().text();
|
|
68
|
+
item.category = content('div.fl_dh a, div.site a')
|
|
69
|
+
.toArray()
|
|
70
|
+
.map((c) => content(c).text().trim());
|
|
71
|
+
item.pubDate = timezone(parseDate(pubDate, ['YYYY-MM-DD HH:mm', 'YYYY-M-D HH:mm']), +8);
|
|
72
|
+
|
|
73
|
+
return item;
|
|
74
|
+
})
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const description = $('meta[name="description"]').prop('content').trim();
|
|
79
|
+
const icon = new URL('favicon', rootUrl).href;
|
|
80
|
+
|
|
81
|
+
ctx.state.data = {
|
|
82
|
+
item: items,
|
|
83
|
+
title: `${$('span.country, h2').text()} - ${description.split(',').pop()}`,
|
|
84
|
+
link: currentUrl,
|
|
85
|
+
description,
|
|
86
|
+
language: 'zh-cn',
|
|
87
|
+
icon,
|
|
88
|
+
logo: icon,
|
|
89
|
+
subtitle: $('meta[name="keywords"]').prop('content').trim(),
|
|
90
|
+
author: $('meta[name="author"]').prop('content'),
|
|
91
|
+
};
|
|
92
|
+
};
|