rsshub 1.0.0-master.fc5a2f6 → 1.0.0-master.fc648b5
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/lib/config.js +4 -0
- package/lib/middleware/anti-hotlink.js +90 -22
- package/lib/middleware/parameter.js +65 -32
- package/lib/middleware/templates/iframe.art +14 -0
- package/lib/radar-rules.js +0 -92
- package/lib/router.js +22 -22
- package/lib/routes/agefans/update.js +1 -1
- package/lib/routes/novel/biqugeinfo.js +2 -2
- package/lib/routes/universities/uestc/sice.js +12 -33
- package/lib/routes/weibo/user.js +10 -19
- package/lib/v2/19lou/index.js +74 -0
- package/lib/v2/19lou/maintainer.js +3 -0
- package/lib/v2/19lou/radar.js +29 -0
- package/lib/v2/19lou/router.js +3 -0
- package/lib/v2/36kr/router.js +1 -1
- package/lib/v2/36kr/user.js +47 -22
- package/lib/v2/acfun/article.js +100 -0
- package/lib/{routes → v2}/acfun/bangumi.js +7 -7
- package/lib/v2/acfun/maintainer.js +5 -0
- package/lib/v2/acfun/radar.js +25 -0
- package/lib/v2/acfun/router.js +5 -0
- package/lib/v2/acfun/video.js +45 -0
- package/lib/v2/agora0/index.js +54 -0
- package/lib/v2/agora0/maintainer.js +3 -0
- package/lib/v2/agora0/radar.js +13 -0
- package/lib/v2/agora0/router.js +3 -0
- package/lib/v2/apnews/maintainer.js +3 -0
- package/lib/v2/apnews/radar.js +13 -0
- package/lib/v2/apnews/router.js +3 -0
- package/lib/v2/apnews/templates/description.art +14 -0
- package/lib/v2/apnews/topics.js +44 -0
- package/lib/v2/appleinsider/index.js +59 -0
- package/lib/v2/appleinsider/maintainer.js +3 -0
- package/lib/v2/appleinsider/radar.js +13 -0
- package/lib/v2/appleinsider/router.js +3 -0
- package/lib/v2/cbnweek/index.js +46 -0
- package/lib/v2/cbnweek/maintainer.js +3 -0
- package/lib/v2/cbnweek/radar.js +13 -0
- package/lib/v2/cbnweek/router.js +3 -0
- package/lib/v2/ccac/news.js +12 -3
- package/lib/v2/cde/index.js +2 -2
- package/lib/v2/cde/maintainer.js +1 -0
- package/lib/v2/cde/radar.js +22 -4
- package/lib/v2/cde/router.js +1 -0
- package/lib/v2/cde/templates/xxgk/breakthroughCure.art +18 -0
- package/lib/v2/cde/templates/xxgk/cliniCal.art +16 -0
- package/lib/v2/cde/templates/xxgk/priorityApproval.art +18 -0
- package/lib/v2/cde/utils.js +2 -2
- package/lib/v2/cde/xxgk.js +73 -0
- package/lib/v2/chinadegrees/maintainer.js +3 -0
- package/lib/v2/chinadegrees/province.js +66 -0
- package/lib/v2/chinadegrees/radar.js +13 -0
- package/lib/v2/chinadegrees/router.js +3 -0
- package/lib/v2/chinadegrees/templates/description.art +4 -0
- package/lib/v2/cnjxol/index.js +94 -0
- package/lib/v2/cnjxol/maintainer.js +4 -0
- package/lib/v2/cnjxol/radar.js +19 -0
- package/lib/v2/cnjxol/router.js +3 -0
- package/lib/v2/cnjxol/templates/description.art +2 -0
- package/lib/v2/cscse/maintainer.js +3 -0
- package/lib/v2/cscse/radar.js +13 -0
- package/lib/v2/cscse/router.js +3 -0
- package/lib/v2/cscse/tzgg.js +54 -0
- package/lib/v2/dgjyw/index.js +67 -0
- package/lib/v2/dgjyw/maintainer.js +3 -0
- package/lib/v2/dgjyw/radar.js +13 -0
- package/lib/v2/dgjyw/router.js +3 -0
- package/lib/v2/domp4/detail.js +67 -0
- package/lib/v2/domp4/latest.js +31 -0
- package/lib/v2/domp4/maintainer.js +4 -0
- package/lib/v2/domp4/radar.js +25 -0
- package/lib/v2/domp4/router.js +4 -0
- package/lib/v2/domp4/utils.js +72 -0
- package/lib/v2/douyin/hashtag.js +5 -43
- package/lib/v2/douyin/live.js +68 -0
- package/lib/v2/douyin/maintainer.js +2 -0
- package/lib/v2/douyin/radar.js +8 -0
- package/lib/v2/douyin/router.js +1 -0
- package/lib/v2/douyin/user.js +5 -43
- package/lib/v2/douyin/utils.js +50 -0
- package/lib/v2/economist/full.js +6 -4
- package/lib/v2/elsevier/issue.js +62 -0
- package/lib/v2/elsevier/journal.js +72 -0
- package/lib/v2/elsevier/maintainer.js +2 -2
- package/lib/v2/elsevier/radar.js +5 -5
- package/lib/v2/elsevier/router.js +4 -2
- package/lib/v2/elsevier/templates/description.art +5 -5
- package/lib/v2/gov/beijing/jw/tzgg.js +58 -0
- package/lib/v2/gov/customs/list.js +21 -17
- package/lib/v2/gov/customs/utils.js +9 -5
- package/lib/v2/gov/maintainer.js +3 -0
- package/lib/v2/gov/nmpa/generic.js +76 -0
- package/lib/v2/gov/pbc/goutongjiaoliu.js +20 -15
- package/lib/v2/gov/pbc/tradeAnnouncement.js +18 -14
- package/lib/v2/gov/radar.js +57 -27
- package/lib/v2/gov/router.js +3 -0
- package/lib/v2/gov/xuzhou/hrss.js +54 -0
- package/lib/v2/hackertalk/index.js +23 -0
- package/lib/v2/hackertalk/maintainer.js +3 -0
- package/lib/v2/hackertalk/radar.js +13 -0
- package/lib/v2/hackertalk/router.js +3 -0
- package/lib/v2/hashnode/blog.js +62 -0
- package/lib/v2/hashnode/maintainer.js +3 -0
- package/lib/v2/hashnode/radar.js +13 -0
- package/lib/v2/hashnode/router.js +3 -0
- package/lib/v2/hashnode/templates/description.art +2 -0
- package/lib/v2/hdu/cs/{index.js → notice.js} +1 -4
- package/lib/v2/hdu/cs/pg.js +54 -0
- package/lib/v2/hdu/maintainer.js +1 -0
- package/lib/v2/hdu/radar.js +6 -0
- package/lib/v2/hdu/router.js +2 -1
- package/lib/v2/heu/gx/list.js +2 -2
- package/lib/v2/heu/job/list.js +2 -2
- package/lib/v2/heu/uae/list.js +2 -2
- package/lib/v2/heu/yjsy/list.js +2 -2
- package/lib/v2/hk01/channel.js +40 -0
- package/lib/{routes → v2}/hk01/hot.js +2 -1
- package/lib/v2/hk01/issue.js +41 -0
- package/lib/v2/hk01/maintainer.js +7 -0
- package/lib/v2/hk01/radar.js +37 -0
- package/lib/v2/hk01/router.js +7 -0
- package/lib/{routes → v2}/hk01/tag.js +2 -1
- package/lib/{routes → v2}/hk01/zone.js +3 -2
- package/lib/v2/hotukdeals/index.js +1 -1
- package/lib/v2/ieee/journal.js +78 -0
- package/lib/v2/ieee/maintainer.js +2 -2
- package/lib/v2/ieee/radar.js +4 -4
- package/lib/v2/ieee/{latestdate.js → recent.js} +34 -42
- package/lib/v2/ieee/router.js +4 -2
- package/lib/v2/ieee/templates/description.art +5 -5
- package/lib/v2/ielts/index.js +7 -2
- package/lib/v2/keep/maintainer.js +3 -0
- package/lib/v2/keep/radar.js +13 -0
- package/lib/v2/keep/router.js +3 -0
- package/lib/v2/keep/templates/user.art +16 -0
- package/lib/{routes → v2}/keep/user.js +14 -4
- package/lib/v2/mdpi/journal.js +65 -0
- package/lib/v2/mdpi/maintainer.js +3 -0
- package/lib/v2/mdpi/radar.js +13 -0
- package/lib/v2/mdpi/router.js +3 -0
- package/lib/v2/mdpi/templates/description.art +12 -0
- package/lib/v2/mindmeister/example.js +44 -0
- package/lib/v2/mindmeister/maintainer.js +3 -0
- package/lib/v2/mindmeister/radar.js +13 -0
- package/lib/v2/mindmeister/router.js +3 -0
- package/lib/v2/mindmeister/templates/image.art +1 -0
- package/lib/v2/mirror/index.js +34 -0
- package/lib/v2/mirror/maintainer.js +3 -0
- package/lib/v2/mirror/radar.js +17 -0
- package/lib/v2/mirror/router.js +3 -0
- package/lib/v2/nbd/radar.js +2 -2
- package/lib/v2/ncwu/maintainer.js +3 -0
- package/lib/v2/ncwu/notice.js +27 -0
- package/lib/v2/ncwu/radar.js +13 -0
- package/lib/v2/ncwu/router.js +3 -0
- package/lib/v2/netease/exclusive.js +148 -0
- package/lib/v2/netease/maintainer.js +1 -0
- package/lib/v2/netease/radar.js +8 -0
- package/lib/v2/netease/router.js +1 -0
- package/lib/v2/netease/templates/exclusive.art +11 -0
- package/lib/v2/nju/rczp.js +34 -24
- package/lib/v2/njust/utils.js +4 -0
- package/lib/v2/nuaa/utils/pypasswaf.js +4 -5
- package/lib/v2/nyaa/maintainer.js +4 -0
- package/lib/v2/nyaa/radar.js +32 -0
- package/lib/v2/nyaa/router.js +4 -0
- package/lib/{routes → v2}/nyaa/search.js +4 -2
- package/lib/v2/nytimes/daily_briefing_chinese.js +47 -41
- package/lib/v2/nytimes/index.js +3 -3
- package/lib/v2/nytimes/maintainer.js +1 -1
- package/lib/v2/nytimes/templates/image.art +3 -0
- package/lib/v2/nytimes/utils.js +7 -1
- package/lib/v2/oceanengine/arithmeticIndex.js +145 -0
- package/lib/v2/oceanengine/maintainer.js +3 -0
- package/lib/v2/oceanengine/radar.js +13 -0
- package/lib/v2/oceanengine/router.js +3 -0
- package/lib/v2/oceanengine/templates/content.art +14 -0
- package/lib/v2/openwrt/maintainer.js +3 -0
- package/lib/v2/openwrt/radar.js +13 -0
- package/lib/v2/openwrt/releases.js +25 -0
- package/lib/v2/openwrt/router.js +3 -0
- package/lib/v2/pincong/utils.js +7 -1
- package/lib/v2/pku/maintainer.js +3 -0
- package/lib/v2/pku/radar.js +20 -0
- package/lib/v2/pku/router.js +3 -0
- package/lib/v2/pku/ss/admission.js +53 -0
- package/lib/v2/pku/ss/notice.js +53 -0
- package/lib/v2/pku/ss/pg_admin.js +53 -0
- package/lib/v2/prestige-av/maintainer.js +3 -0
- package/lib/v2/prestige-av/radar.js +18 -0
- package/lib/v2/prestige-av/router.js +3 -0
- package/lib/{routes → v2}/prestige-av/series.js +8 -5
- package/lib/v2/qq/kg/cache.js +28 -0
- package/lib/v2/qq/kg/reply.js +21 -0
- package/lib/v2/qq/kg/user.js +50 -0
- package/lib/v2/qq/maintainer.js +2 -0
- package/lib/v2/qq/radar.js +14 -0
- package/lib/v2/qq/router.js +2 -0
- package/lib/v2/samsung/maintainer.js +3 -0
- package/lib/v2/samsung/radar.js +13 -0
- package/lib/v2/samsung/research/blog.js +49 -0
- package/lib/v2/samsung/router.js +3 -0
- package/lib/v2/{jasa/latest.js → scitation/journal.js} +24 -27
- package/lib/v2/scitation/maintainer.js +4 -0
- package/lib/v2/scitation/radar.js +19 -0
- package/lib/v2/scitation/router.js +4 -0
- package/lib/v2/scitation/section.js +90 -0
- package/lib/v2/scitation/templates/description.art +11 -0
- package/lib/v2/shuiguopai/index.js +76 -0
- package/lib/v2/shuiguopai/maintainer.js +3 -0
- package/lib/v2/shuiguopai/radar.js +13 -0
- package/lib/v2/shuiguopai/router.js +3 -0
- package/lib/v2/shuiguopai/templates/description.art +6 -0
- package/lib/v2/springer/journal.js +72 -0
- package/lib/v2/springer/maintainer.js +3 -0
- package/lib/v2/springer/radar.js +13 -0
- package/lib/v2/springer/router.js +3 -0
- package/lib/v2/springer/templates/description.art +12 -0
- package/lib/v2/supchina/index.js +67 -0
- package/lib/v2/supchina/maintainer.js +4 -0
- package/lib/v2/supchina/podcasts.js +66 -0
- package/lib/v2/supchina/radar.js +19 -0
- package/lib/v2/supchina/router.js +4 -0
- package/lib/v2/techflow520/index.js +34 -0
- package/lib/v2/techflow520/maintainer.js +4 -0
- package/lib/v2/techflow520/newsflash.js +32 -0
- package/lib/v2/techflow520/radar.js +19 -0
- package/lib/v2/techflow520/router.js +4 -0
- package/lib/v2/tencent/cloud/column.js +51 -0
- package/lib/v2/tencent/maintainer.js +1 -0
- package/lib/v2/tencent/radar.js +11 -0
- package/lib/v2/tencent/router.js +1 -0
- package/lib/v2/test/index.js +16 -1
- package/lib/v2/tiktok/user.js +28 -38
- package/lib/v2/trending/allTrending.js +169 -0
- package/lib/v2/trending/maintainer.js +3 -0
- package/lib/v2/trending/radar.js +35 -0
- package/lib/v2/trending/router.js +3 -0
- package/lib/v2/trending/templates/content.art +24 -0
- package/lib/v2/u3c3/index.js +59 -0
- package/lib/v2/u3c3/maintainer.js +3 -0
- package/lib/v2/u3c3/radar.js +29 -0
- package/lib/v2/u3c3/router.js +3 -0
- package/lib/v2/uraaka-joshi/uraaka-joshi-user.js +7 -1
- package/lib/v2/uraaka-joshi/uraaka-joshi.js +8 -1
- package/lib/v2/vlive/index.js +71 -0
- package/lib/v2/vlive/maintainer.js +3 -0
- package/lib/v2/vlive/radar.js +13 -0
- package/lib/v2/vlive/router.js +3 -0
- package/lib/v2/vlive/templates/post.art +8 -0
- package/lib/v2/vlive/templates/video.art +3 -0
- package/lib/v2/xiaohongshu/util.js +6 -6
- package/lib/v2/xjtu/2yuan/news.js +61 -0
- package/lib/v2/xjtu/dean.js +83 -0
- package/lib/{routes/universities → v2}/xjtu/ee.js +5 -5
- package/lib/{routes/universities → v2}/xjtu/gs/tzgg.js +6 -6
- package/lib/v2/xjtu/international.js +51 -0
- package/lib/v2/xjtu/job.js +81 -0
- package/lib/v2/xjtu/maintainer.js +9 -0
- package/lib/v2/xjtu/radar.js +53 -0
- package/lib/v2/xjtu/router.js +9 -0
- package/lib/v2/xjtu/std.js +58 -0
- package/lib/v2/xjtu/templates/attachments.art +3 -0
- package/lib/v2/xjtu/templates/std.art +4 -0
- package/lib/v2/xueqiu/column.js +42 -0
- package/lib/v2/xueqiu/maintainer.js +1 -0
- package/lib/v2/xueqiu/radar.js +6 -0
- package/lib/v2/xueqiu/router.js +1 -0
- package/lib/v2/zhangyoubao/index.js +42 -0
- package/lib/v2/zhangyoubao/maintainer.js +3 -0
- package/lib/v2/zhangyoubao/radar.js +13 -0
- package/lib/v2/zhangyoubao/router.js +3 -0
- package/lib/v2/zhangyoubao/templates/article.art +1 -0
- package/package.json +20 -19
- package/lib/routes/acfun/video.js +0 -44
- package/lib/routes/apnews/topics.js +0 -43
- package/lib/routes/dgjyw/index.js +0 -66
- package/lib/routes/hk01/channel.js +0 -22
- package/lib/routes/hk01/issue.js +0 -22
- package/lib/routes/mirror/entries.js +0 -80
- package/lib/routes/universities/ncwu/notice.js +0 -42
- package/lib/routes/universities/xjtu/dean.js +0 -86
- package/lib/routes/universities/xjtu/international.js +0 -53
- package/lib/routes/universities/xjtu/job.js +0 -50
- package/lib/v2/elsevier/latest.js +0 -87
- package/lib/v2/elsevier/volume.js +0 -75
- package/lib/v2/ieee/latestvol.js +0 -87
- package/lib/v2/jasa/maintainer.js +0 -4
- package/lib/v2/jasa/radar.js +0 -19
- package/lib/v2/jasa/router.js +0 -4
- package/lib/v2/jasa/section.js +0 -95
- package/lib/v2/jasa/templates/description.art +0 -11
package/lib/v2/heu/yjsy/list.js
CHANGED
|
@@ -39,7 +39,7 @@ module.exports = async (ctx) => {
|
|
|
39
39
|
})
|
|
40
40
|
.get();
|
|
41
41
|
|
|
42
|
-
await Promise.all(
|
|
42
|
+
const items = await Promise.all(
|
|
43
43
|
list.map((item) =>
|
|
44
44
|
ctx.cache.tryGet(item.link, async () => {
|
|
45
45
|
if (item.link.indexOf('page.htm') !== -1) {
|
|
@@ -60,6 +60,6 @@ module.exports = async (ctx) => {
|
|
|
60
60
|
ctx.state.data = {
|
|
61
61
|
title: '研究生院-' + bigTitle,
|
|
62
62
|
link: rootUrl.concat('/', id, '/list.htm'),
|
|
63
|
-
item:
|
|
63
|
+
item: items,
|
|
64
64
|
};
|
|
65
65
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const id = ctx.params.id;
|
|
7
|
+
|
|
8
|
+
const response = await got(`https://web-data.api.hk01.com/v2/page/category/${id}`);
|
|
9
|
+
const data = response.data;
|
|
10
|
+
const list = data.sections[0].items;
|
|
11
|
+
|
|
12
|
+
await Promise.all(
|
|
13
|
+
list.map((item) =>
|
|
14
|
+
ctx.cache.tryGet(`https://www.hk01.com/${item.data.mainCategory}/${item.data.articleId}`, async () => {
|
|
15
|
+
const detailResponse = await got(item.data.canonicalUrl);
|
|
16
|
+
const $ = cheerio.load(detailResponse.data);
|
|
17
|
+
|
|
18
|
+
$('article > div.view-tracker').remove();
|
|
19
|
+
$('article > div.flex.flex-col').remove();
|
|
20
|
+
|
|
21
|
+
item.data.description = $('article').html();
|
|
22
|
+
|
|
23
|
+
return item;
|
|
24
|
+
})
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
ctx.state.data = {
|
|
29
|
+
title: `香港01 - ${data.category.publishName}`,
|
|
30
|
+
description: data.meta.metaDesc,
|
|
31
|
+
link: data.category.publishUrl,
|
|
32
|
+
item: list.map((item) => ({
|
|
33
|
+
title: item.data.title,
|
|
34
|
+
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
|
35
|
+
description: `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
|
36
|
+
pubDate: parseDate(item.data.lastModifyTime * 1000),
|
|
37
|
+
link: item.data.canonicalUrl,
|
|
38
|
+
})),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
3
|
|
|
3
4
|
module.exports = async (ctx) => {
|
|
4
5
|
const response = await got('https://web-data.api.hk01.com/v2/page/hot/');
|
|
@@ -13,7 +14,7 @@ module.exports = async (ctx) => {
|
|
|
13
14
|
title: item.data.title,
|
|
14
15
|
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
|
15
16
|
description: `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
|
16
|
-
pubDate:
|
|
17
|
+
pubDate: parseDate(item.data.lastModifyTime * 1000),
|
|
17
18
|
link: item.data.canonicalUrl,
|
|
18
19
|
})),
|
|
19
20
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
module.exports = async (ctx) => {
|
|
6
|
+
const id = ctx.params.id;
|
|
7
|
+
|
|
8
|
+
const response = await got(`https://web-data.api.hk01.com/v2/page/issue/${id}`);
|
|
9
|
+
const data = response.data;
|
|
10
|
+
const list = data.issue.blocks[0].articles;
|
|
11
|
+
|
|
12
|
+
await Promise.all(
|
|
13
|
+
list.map((item) =>
|
|
14
|
+
ctx.cache.tryGet(`https://www.hk01.com/${item.data.mainCategory}/${item.data.articleId}`, async () => {
|
|
15
|
+
const detailResponse = await got(item.data.canonicalUrl);
|
|
16
|
+
const $ = cheerio.load(detailResponse.data);
|
|
17
|
+
|
|
18
|
+
$('div.lazyload-placeholder').remove();
|
|
19
|
+
$('article > div.view-tracker').remove();
|
|
20
|
+
$('article > div.flex.flex-col').remove();
|
|
21
|
+
|
|
22
|
+
item.data.description = $('article').html();
|
|
23
|
+
|
|
24
|
+
return item;
|
|
25
|
+
})
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
ctx.state.data = {
|
|
30
|
+
title: `香港01 - ${data.issue.title}`,
|
|
31
|
+
description: data.meta.metaDesc,
|
|
32
|
+
link: data.issue.publishUrl,
|
|
33
|
+
item: list.map((item) => ({
|
|
34
|
+
title: item.data.title,
|
|
35
|
+
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
|
36
|
+
description: `<img style="width: 100%" src="${item.data.mainImage.cdnUrl}" /><p>${item.data.description}</p>`,
|
|
37
|
+
pubDate: parseDate(item.data.lastModifyTime * 1000),
|
|
38
|
+
link: item.data.canonicalUrl,
|
|
39
|
+
})),
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'hk01.com': {
|
|
3
|
+
_name: '香港01',
|
|
4
|
+
www: [
|
|
5
|
+
{
|
|
6
|
+
title: '最 Hit',
|
|
7
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#xiang-gang-01',
|
|
8
|
+
source: ['/hot', '/'],
|
|
9
|
+
target: '/hk01/hot',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: 'zone',
|
|
13
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#xiang-gang-01',
|
|
14
|
+
source: '/zone/:id/:title',
|
|
15
|
+
target: '/hk01/zone/:id',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'channel',
|
|
19
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#xiang-gang-01',
|
|
20
|
+
source: '/channel/:id/:title',
|
|
21
|
+
target: '/hk01/channel/:id',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'issue',
|
|
25
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#xiang-gang-01',
|
|
26
|
+
source: '/issue/:id/:title',
|
|
27
|
+
target: '/hk01/issue/:id',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: 'tag',
|
|
31
|
+
docs: 'https://docs.rsshub.app/traditional-media.html#xiang-gang-01',
|
|
32
|
+
source: '/tag/:id/:title',
|
|
33
|
+
target: '/hk01/tag/:id',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
module.exports = function (router) {
|
|
2
|
+
router.get('/channel/:id', require('./channel'));
|
|
3
|
+
router.get('/hot', require('./hot'));
|
|
4
|
+
router.get('/issue/:id', require('./issue'));
|
|
5
|
+
router.get('/tag/:id', require('./tag'));
|
|
6
|
+
router.get('/zone/:id', require('./zone'));
|
|
7
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
3
|
|
|
3
4
|
module.exports = async (ctx) => {
|
|
4
5
|
const id = ctx.params.id;
|
|
@@ -15,7 +16,7 @@ module.exports = async (ctx) => {
|
|
|
15
16
|
title: item.data.title,
|
|
16
17
|
author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
|
|
17
18
|
description: `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
|
|
18
|
-
pubDate:
|
|
19
|
+
pubDate: parseDate(item.data.lastModifyTime * 1000),
|
|
19
20
|
link: item.data.canonicalUrl,
|
|
20
21
|
})),
|
|
21
22
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
2
3
|
|
|
3
4
|
module.exports = async (ctx) => {
|
|
4
5
|
const id = ctx.params.id;
|
|
@@ -19,12 +20,12 @@ module.exports = async (ctx) => {
|
|
|
19
20
|
case 1:
|
|
20
21
|
author = item.data.authors && item.data.authors.map((e) => e.publishName).join(', ');
|
|
21
22
|
description = `<p>${item.data.description}</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`;
|
|
22
|
-
pubDate =
|
|
23
|
+
pubDate = parseDate(item.data.lastModifyTime * 1000);
|
|
23
24
|
break;
|
|
24
25
|
case 2:
|
|
25
26
|
author = item.data.zonePublishName;
|
|
26
27
|
description = `${item.data.teaser.map((e) => '<p>' + e + '</p>').join('')}<img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`;
|
|
27
|
-
pubDate =
|
|
28
|
+
pubDate = parseDate(item.data.lastModifyTime * 1000);
|
|
28
29
|
break;
|
|
29
30
|
default:
|
|
30
31
|
break;
|
|
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
|
|
|
24
24
|
item = $(item);
|
|
25
25
|
return {
|
|
26
26
|
title: item.find('.cept-tt').text(),
|
|
27
|
-
description: `${item.find('.
|
|
27
|
+
description: `${item.find('.thread-listImgCell').html()}<br>${item.find('.cept-vote-temp').html()}<br>${item.find('.overflow--fade').html()}<br>${item.find('.threadGrid-body .userHtml').html()}`,
|
|
28
28
|
link: item.find('.cept-tt').attr('href'),
|
|
29
29
|
};
|
|
30
30
|
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
|
|
6
|
+
const { CookieJar } = require('tough-cookie');
|
|
7
|
+
const cookieJar = new CookieJar();
|
|
8
|
+
|
|
9
|
+
module.exports = async (ctx) => {
|
|
10
|
+
const punumber = ctx.params.journal;
|
|
11
|
+
const sortType = ctx.params.sortType ?? 'vol-only-seq';
|
|
12
|
+
const host = 'https://ieeexplore.ieee.org';
|
|
13
|
+
const jrnlUrl = `${host}/xpl/mostRecentIssue.jsp?punumber=${punumber}`;
|
|
14
|
+
|
|
15
|
+
const response = await got(`${host}/rest/publication/home/metadata?pubid=${punumber}`, {
|
|
16
|
+
cookieJar,
|
|
17
|
+
}).json();
|
|
18
|
+
const volume = response.currentIssue.volume;
|
|
19
|
+
const isnumber = response.currentIssue.issueNumber;
|
|
20
|
+
const jrnlName = response.displayTitle;
|
|
21
|
+
|
|
22
|
+
const response2 = await got
|
|
23
|
+
.post(`${host}/rest/search/pub/${punumber}/issue/${isnumber}/toc`, {
|
|
24
|
+
cookieJar,
|
|
25
|
+
json: {
|
|
26
|
+
punumber,
|
|
27
|
+
isnumber,
|
|
28
|
+
sortType,
|
|
29
|
+
rowsPerPage: '100',
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
.json();
|
|
33
|
+
let list = response2.records.map((item) => {
|
|
34
|
+
const $2 = cheerio.load(item.articleTitle);
|
|
35
|
+
const title = $2.text();
|
|
36
|
+
const link = item.htmlLink;
|
|
37
|
+
const doi = item.doi;
|
|
38
|
+
let authors = 'Do not have author';
|
|
39
|
+
if (item.hasOwnProperty('authors')) {
|
|
40
|
+
authors = item.authors.map((itemAuth) => itemAuth.preferredName).join('; ');
|
|
41
|
+
}
|
|
42
|
+
let abstract = '';
|
|
43
|
+
item.hasOwnProperty('abstract') ? (abstract = item.abstract) : (abstract = '');
|
|
44
|
+
return {
|
|
45
|
+
title,
|
|
46
|
+
link,
|
|
47
|
+
authors,
|
|
48
|
+
doi,
|
|
49
|
+
volume,
|
|
50
|
+
abstract,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const renderDesc = (item) =>
|
|
55
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
56
|
+
item,
|
|
57
|
+
});
|
|
58
|
+
list = await Promise.all(
|
|
59
|
+
list.map((item) =>
|
|
60
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
61
|
+
if (item.abstract !== '') {
|
|
62
|
+
const response3 = await got(`${host}${item.link}`);
|
|
63
|
+
const { abstract } = JSON.parse(response3.body.match(/metadata=(.*);/)[1]);
|
|
64
|
+
const $3 = cheerio.load(abstract);
|
|
65
|
+
item.abstract = $3.text();
|
|
66
|
+
item.description = renderDesc(item);
|
|
67
|
+
}
|
|
68
|
+
return item;
|
|
69
|
+
})
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
ctx.state.data = {
|
|
74
|
+
title: jrnlName,
|
|
75
|
+
link: jrnlUrl,
|
|
76
|
+
item: list,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
'/:journal
|
|
3
|
-
'/:journal/
|
|
2
|
+
'/journal/:journal/:sortType?': ['Derekmini', 'auto-bot-ty'],
|
|
3
|
+
'/journal/:journal/recent/:sortType?': ['Derekmini', 'auto-bot-ty'],
|
|
4
4
|
};
|
package/lib/v2/ieee/radar.js
CHANGED
|
@@ -3,16 +3,16 @@ module.exports = {
|
|
|
3
3
|
_name: 'IEEE',
|
|
4
4
|
www: [
|
|
5
5
|
{
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Journal',
|
|
7
7
|
docs: 'https://docs.rsshub.app/journal.html#ieee-xplore',
|
|
8
8
|
source: '/*',
|
|
9
|
-
target: (params, url) => `/ieee/${new URL(url).searchParams.get('punumber')}
|
|
9
|
+
target: (params, url) => `/ieee/journal/${new URL(url).searchParams.get('punumber')}`,
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
title: '
|
|
12
|
+
title: 'Recent',
|
|
13
13
|
docs: 'https://docs.rsshub.app/journal.html#ieee-xplore',
|
|
14
14
|
source: '/*',
|
|
15
|
-
target: (params, url) => `/ieee/${new URL(url).searchParams.get('punumber')}/
|
|
15
|
+
target: (params, url) => `/ieee/journal/${new URL(url).searchParams.get('punumber')}/recent`,
|
|
16
16
|
},
|
|
17
17
|
],
|
|
18
18
|
},
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
|
-
const
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const { art } = require('@/utils/render');
|
|
5
5
|
|
|
6
|
+
const { CookieJar } = require('tough-cookie');
|
|
7
|
+
const cookieJar = new CookieJar();
|
|
8
|
+
|
|
6
9
|
module.exports = async (ctx) => {
|
|
7
|
-
const host = 'https://ieeexplore.ieee.org';
|
|
8
10
|
const punumber = ctx.params.journal;
|
|
9
11
|
const sortType = ctx.params.sortType ?? 'vol-only-seq';
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
14
|
-
'Accept-Language': 'zh-CN,zh;q=0.9',
|
|
15
|
-
Host: host.replace('https://', ''),
|
|
16
|
-
'User-Agent': config.ua,
|
|
17
|
-
Referer: hostUrl,
|
|
18
|
-
};
|
|
12
|
+
const host = 'https://ieeexplore.ieee.org';
|
|
13
|
+
const jrnlUrl = `${host}/xpl/mostRecentIssue.jsp?punumber=${punumber}`;
|
|
14
|
+
|
|
19
15
|
const date = new Date();
|
|
20
16
|
const year = date.getFullYear();
|
|
21
17
|
const month = date.getMonth() + 1;
|
|
@@ -32,29 +28,28 @@ module.exports = async (ctx) => {
|
|
|
32
28
|
endYM = year + '' + month;
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
url: host.concat('/rest/publication/home/metadata?pubid=', punumber),
|
|
38
|
-
headers,
|
|
31
|
+
const response = await got(`${host}/rest/publication/home/metadata?pubid=${punumber}`, {
|
|
32
|
+
cookieJar,
|
|
39
33
|
}).json();
|
|
40
|
-
const volume =
|
|
41
|
-
const isnumber =
|
|
42
|
-
const jrnlName =
|
|
34
|
+
const volume = response.currentIssue.volume;
|
|
35
|
+
const isnumber = response.currentIssue.issueNumber;
|
|
36
|
+
const jrnlName = response.displayTitle;
|
|
43
37
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const
|
|
38
|
+
const response2 = await got
|
|
39
|
+
.post(`${host}/rest/search/pub/${punumber}/issue/${isnumber}/toc`, {
|
|
40
|
+
cookieJar,
|
|
41
|
+
json: {
|
|
42
|
+
punumber,
|
|
43
|
+
isnumber,
|
|
44
|
+
sortType,
|
|
45
|
+
rowsPerPage: '100',
|
|
46
|
+
ranges: [strYM + `01_` + endYM + `31_Search Latest Date`],
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
.json();
|
|
50
|
+
let list = response2.records.map((item) => {
|
|
51
|
+
const $2 = cheerio.load(item.articleTitle);
|
|
52
|
+
const title = $2.text();
|
|
58
53
|
const link = item.htmlLink;
|
|
59
54
|
const doi = item.doi;
|
|
60
55
|
let authors = 'Do not have author';
|
|
@@ -77,17 +72,14 @@ module.exports = async (ctx) => {
|
|
|
77
72
|
art(path.join(__dirname, 'templates/description.art'), {
|
|
78
73
|
item,
|
|
79
74
|
});
|
|
80
|
-
await Promise.all(
|
|
75
|
+
list = await Promise.all(
|
|
81
76
|
list.map((item) =>
|
|
82
77
|
ctx.cache.tryGet(item.link, async () => {
|
|
83
78
|
if (item.abstract !== '') {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const content = itemResponse.body.match(/metadata=(.*);/)[1];
|
|
89
|
-
const { abstract } = JSON.parse(content);
|
|
90
|
-
item.abstract = abstract;
|
|
79
|
+
const response3 = await got(`${host}${item.link}`);
|
|
80
|
+
const { abstract } = JSON.parse(response3.body.match(/metadata=(.*);/)[1]);
|
|
81
|
+
const $3 = cheerio.load(abstract);
|
|
82
|
+
item.abstract = $3.text();
|
|
91
83
|
item.description = renderDesc(item);
|
|
92
84
|
}
|
|
93
85
|
return item;
|
|
@@ -96,8 +88,8 @@ module.exports = async (ctx) => {
|
|
|
96
88
|
);
|
|
97
89
|
|
|
98
90
|
ctx.state.data = {
|
|
99
|
-
title: jrnlName
|
|
100
|
-
link:
|
|
91
|
+
title: `${jrnlName} - Recent`,
|
|
92
|
+
link: jrnlUrl,
|
|
101
93
|
item: list,
|
|
102
94
|
};
|
|
103
95
|
};
|
package/lib/v2/ieee/router.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
module.exports = function (router) {
|
|
2
|
-
router.get('/:journal/latest/
|
|
3
|
-
router.get('/:journal/latest/
|
|
2
|
+
router.get('/:journal/latest/vol/:sortType?', require('./journal')); // deprecated
|
|
3
|
+
router.get('/:journal/latest/date/:sortType?', require('./recent')); // deprecated
|
|
4
|
+
router.get('/journal/:journal/:sortType?', require('./journal'));
|
|
5
|
+
router.get('/journal/:journal/recent/:sortType?', require('./recent'));
|
|
4
6
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<p>
|
|
2
|
-
<span><big>{{ item.title }}</big></span><br
|
|
2
|
+
<span><big>{{ item.title }}</big></span><br>
|
|
3
3
|
</p>
|
|
4
4
|
<p>
|
|
5
|
-
<span><small><i>{{ item.authors }}</i></small></span><br
|
|
6
|
-
<span><small><i>https://doi.org/{{ item.doi }}</i></small></span><br
|
|
7
|
-
<span><small><i>Volume
|
|
5
|
+
<span><small><i>{{ item.authors }}</i></small></span><br>
|
|
6
|
+
<span><small><i>https://doi.org/{{ item.doi }}</i></small></span><br>
|
|
7
|
+
<span><small><i>Volume {{ item.volume }}</i></small></span><br>
|
|
8
8
|
</p>
|
|
9
9
|
<p>
|
|
10
|
-
<span>{{ item.abstract }}</span><br
|
|
10
|
+
<span>{{ item.abstract }}</span><br>
|
|
11
11
|
</p>
|
package/lib/v2/ielts/index.js
CHANGED
|
@@ -11,8 +11,13 @@ module.exports = async (ctx) => {
|
|
|
11
11
|
async () => {
|
|
12
12
|
const browser = await require('@/utils/puppeteer')({ stealth: true });
|
|
13
13
|
const page = await browser.newPage();
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
await page.setRequestInterception(true);
|
|
15
|
+
page.on('request', (request) => {
|
|
16
|
+
request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
|
|
17
|
+
});
|
|
18
|
+
await page.goto(targetUrl, {
|
|
19
|
+
waitUntil: 'domcontentloaded',
|
|
20
|
+
});
|
|
16
21
|
await page.waitForSelector('div.container');
|
|
17
22
|
|
|
18
23
|
const html = await page.evaluate(() => document.documentElement.innerHTML);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
项目:
|
|
2
|
+
{{ if item.meta.name === item.meta.workoutName }}
|
|
3
|
+
{{ item.meta.name }}
|
|
4
|
+
{{ else }}
|
|
5
|
+
{{ item.meta.name }} - {{ item.meta.workoutName }}
|
|
6
|
+
{{ /if }}
|
|
7
|
+
<br>
|
|
8
|
+
时长:{{ minute }}分{{ second }}秒
|
|
9
|
+
{{ if item.content }}
|
|
10
|
+
<br>
|
|
11
|
+
备注:{{ item.content }}
|
|
12
|
+
{{ /if }}
|
|
13
|
+
{{ if imagesTpl }}
|
|
14
|
+
<br>
|
|
15
|
+
{{@ imagesTpl }}
|
|
16
|
+
{{ /if }}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const got = require('
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { art } = require('@/utils/render');
|
|
3
|
+
const path = require('path');
|
|
2
4
|
|
|
3
5
|
module.exports = async (ctx) => {
|
|
4
6
|
const id = ctx.params.id;
|
|
@@ -11,6 +13,11 @@ module.exports = async (ctx) => {
|
|
|
11
13
|
},
|
|
12
14
|
});
|
|
13
15
|
|
|
16
|
+
// check user have post or not
|
|
17
|
+
if (response.data.data.entries.length === 0) {
|
|
18
|
+
throw Error('该用户运动日记为空');
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
response.data.data.entries[0] = response.data.data.entries[0].entries;
|
|
15
22
|
const data = response.data.data.entries.reduce((all, current) => all.concat(current.entries));
|
|
16
23
|
|
|
@@ -38,9 +45,12 @@ module.exports = async (ctx) => {
|
|
|
38
45
|
title: item.meta.title.trim(),
|
|
39
46
|
pubDate: item.created,
|
|
40
47
|
link: `https://show.gotokeep.com/entries/${item.id}`,
|
|
41
|
-
description:
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
description: art(path.join(__dirname, 'templates/user.art'), {
|
|
49
|
+
item,
|
|
50
|
+
minute,
|
|
51
|
+
second,
|
|
52
|
+
imagesTpl,
|
|
53
|
+
}),
|
|
44
54
|
};
|
|
45
55
|
}),
|
|
46
56
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
|
|
6
|
+
const { CookieJar } = require('tough-cookie');
|
|
7
|
+
const cookieJar = new CookieJar();
|
|
8
|
+
|
|
9
|
+
module.exports = async (ctx) => {
|
|
10
|
+
const journal = ctx.params.journal;
|
|
11
|
+
const host = 'https://www.mdpi.com';
|
|
12
|
+
const jrnlUrl = `${host}/journal/${journal}`;
|
|
13
|
+
|
|
14
|
+
const response = await got(jrnlUrl, {
|
|
15
|
+
cookieJar,
|
|
16
|
+
});
|
|
17
|
+
const $ = cheerio.load(response.data);
|
|
18
|
+
const jrnlName = $('.journal__description').find('h1').text();
|
|
19
|
+
const issueUrl = `${host}${$('.side-menu-ul').find('a').eq(1).attr('href')}`;
|
|
20
|
+
|
|
21
|
+
const response2 = await got(issueUrl, {
|
|
22
|
+
cookieJar,
|
|
23
|
+
});
|
|
24
|
+
const $2 = cheerio.load(response2.data);
|
|
25
|
+
const issue = $2('.content__container').find('h1').text().trim();
|
|
26
|
+
const list = $2('.article-item')
|
|
27
|
+
.map((_, item) => {
|
|
28
|
+
const title = $2(item).find('.title-link').text();
|
|
29
|
+
const link = `${host}${$2(item).find('.title-link').attr('href')}`;
|
|
30
|
+
const authors = $2(item).find('.authors').find('.inlineblock').text();
|
|
31
|
+
const doiLink = $2(item).find('.color-grey-dark').find('a').attr('href');
|
|
32
|
+
let doi = '';
|
|
33
|
+
if (typeof doiLink !== 'undefined') {
|
|
34
|
+
doi = doiLink.replace('https://doi.org/', '');
|
|
35
|
+
}
|
|
36
|
+
$2(item).find('.abstract-full').find('a').remove();
|
|
37
|
+
const abstract = $2(item).find('.abstract-full').text().trim();
|
|
38
|
+
const img = `${host}${$2(item).find('.openpopupgallery').find('img').attr('data-src')}`;
|
|
39
|
+
return {
|
|
40
|
+
title,
|
|
41
|
+
authors,
|
|
42
|
+
link,
|
|
43
|
+
doi,
|
|
44
|
+
abstract,
|
|
45
|
+
issue,
|
|
46
|
+
img,
|
|
47
|
+
};
|
|
48
|
+
})
|
|
49
|
+
.get();
|
|
50
|
+
|
|
51
|
+
const renderDesc = (item) =>
|
|
52
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
53
|
+
item,
|
|
54
|
+
});
|
|
55
|
+
const items = list.map((item) => {
|
|
56
|
+
item.description = renderDesc(item);
|
|
57
|
+
return item;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
ctx.state.data = {
|
|
61
|
+
title: jrnlName,
|
|
62
|
+
link: jrnlUrl,
|
|
63
|
+
item: items,
|
|
64
|
+
};
|
|
65
|
+
};
|