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
|
@@ -7,19 +7,24 @@ module.exports = async (ctx) => {
|
|
|
7
7
|
const sort = ctx.params.sort ?? 'near';
|
|
8
8
|
|
|
9
9
|
const page = await browser.newPage();
|
|
10
|
-
const link = `https://www.prestige-av.com/goods/goods_list.php?mode=series&mid=${id}&sort=${sort}`;
|
|
10
|
+
const link = `https://www.prestige-av.com/goods/goods_list.php?mode=series&mid=${id}&count=100&sort=${sort}`;
|
|
11
|
+
await page.setRequestInterception(true);
|
|
12
|
+
page.on('request', (request) => {
|
|
13
|
+
request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
|
|
14
|
+
});
|
|
11
15
|
await page.goto(link);
|
|
12
16
|
await page.waitForSelector('.buttons');
|
|
13
17
|
await page.click('#AC');
|
|
14
18
|
await page.waitForSelector('#body_goods');
|
|
15
|
-
const
|
|
16
|
-
|
|
19
|
+
const html = await page.evaluate(() => document.documentElement.innerHTML);
|
|
20
|
+
browser.close();
|
|
17
21
|
|
|
18
22
|
const $ = cheerio.load(html);
|
|
19
23
|
const list = $('div#body_goods li');
|
|
20
24
|
|
|
21
25
|
ctx.state.data = {
|
|
22
26
|
title: `【Prestige】${$('div[class=search_title_layout_01]').children('h1').first().text().replace('シリーズ ▶ ', '').replace(/\s*/g, '')}`,
|
|
27
|
+
description: $('meta[name=Description]').attr('content'),
|
|
23
28
|
link: `https://www.prestige-av.com/goods/goods_list.php?mode=series&mid=${id}&sort=${sort}`,
|
|
24
29
|
item:
|
|
25
30
|
list &&
|
|
@@ -34,6 +39,4 @@ module.exports = async (ctx) => {
|
|
|
34
39
|
})
|
|
35
40
|
.get(),
|
|
36
41
|
};
|
|
37
|
-
|
|
38
|
-
browser.close();
|
|
39
42
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { JSDOM } = require('jsdom');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
getPlayInfo: async (ctx, shareId, ksong_mid = '') => {
|
|
6
|
+
const link = `https://node.kg.qq.com/play?s=${shareId}`;
|
|
7
|
+
const cache_key = ksong_mid ? `ksong:${ksong_mid}` : link;
|
|
8
|
+
const data = await ctx.cache.tryGet(cache_key, async () => {
|
|
9
|
+
const response = await got(link);
|
|
10
|
+
const { window } = new JSDOM(response.data, {
|
|
11
|
+
runScripts: 'dangerously',
|
|
12
|
+
});
|
|
13
|
+
const data = window.__DATA__;
|
|
14
|
+
const name = data.detail.song_name;
|
|
15
|
+
const description = data.detail.content;
|
|
16
|
+
const author = data.detail.nick;
|
|
17
|
+
const itunes_item_image = data.detail.cover;
|
|
18
|
+
|
|
19
|
+
const enclosure_url = data.detail.playurl;
|
|
20
|
+
ksong_mid = ksong_mid ? ksong_mid : data.detail.ksong_mid;
|
|
21
|
+
const ctime = data.detail.ctime;
|
|
22
|
+
const comments = data.detail.comments;
|
|
23
|
+
|
|
24
|
+
return { name, link, description, author, enclosure_url, ksong_mid, ctime, itunes_item_image, comments };
|
|
25
|
+
});
|
|
26
|
+
return data;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const cache = require('./cache');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
module.exports = async (ctx) => {
|
|
5
|
+
const playId = ctx.params.playId;
|
|
6
|
+
const url = `https://node.kg.qq.com/play?s=${playId}`;
|
|
7
|
+
const play_item = await cache.getPlayInfo(ctx, playId, '');
|
|
8
|
+
|
|
9
|
+
ctx.state.data = {
|
|
10
|
+
title: `${play_item.name} - ${play_item.author} 的评论`,
|
|
11
|
+
link: url,
|
|
12
|
+
image: play_item.itunes_item_image,
|
|
13
|
+
allowEmpty: true,
|
|
14
|
+
item: play_item.comments.map((item) => ({
|
|
15
|
+
title: `${item.nick}:${item.content}`,
|
|
16
|
+
pubDate: parseDate(item.ctime * 1000),
|
|
17
|
+
link: url,
|
|
18
|
+
guid: `ksong:${play_item.ksong_mid}:${item.comment_id}`,
|
|
19
|
+
})),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { JSDOM } = require('jsdom');
|
|
3
|
+
const cache = require('./cache');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const userId = ctx.params.userId;
|
|
8
|
+
const url = `https://node.kg.qq.com/personal?uid=${userId}`;
|
|
9
|
+
const response = await got(url);
|
|
10
|
+
|
|
11
|
+
const { window } = new JSDOM(response.data, {
|
|
12
|
+
runScripts: 'dangerously',
|
|
13
|
+
});
|
|
14
|
+
const data = window.__DATA__;
|
|
15
|
+
const author = data.data.nickname;
|
|
16
|
+
const authorimg = data.data.head_img_url;
|
|
17
|
+
const ugcList = data.data.ugclist;
|
|
18
|
+
|
|
19
|
+
const items = await Promise.all(
|
|
20
|
+
ugcList.map(async (item) => {
|
|
21
|
+
const link = `https://node.kg.qq.com/play?s=${item.shareid}`;
|
|
22
|
+
const item_info = await cache.getPlayInfo(ctx, item.shareid, item.ksong_mid);
|
|
23
|
+
|
|
24
|
+
const single = {
|
|
25
|
+
title: item.title || '',
|
|
26
|
+
description: item_info.description,
|
|
27
|
+
link,
|
|
28
|
+
guid: `ksong:${item.ksong_mid}`,
|
|
29
|
+
author,
|
|
30
|
+
pubDate: parseDate(item_info.ctime * 1000) || parseDate(item.ctime, 'X'),
|
|
31
|
+
itunes_item_image: item_info.itunes_item_image || item.avatar,
|
|
32
|
+
enclosure_url: item_info.enclosure_url,
|
|
33
|
+
enclosure_type: 'audio/x-m4a',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return single;
|
|
37
|
+
})
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
ctx.state.data = {
|
|
41
|
+
title: `${author} - 全民K歌`,
|
|
42
|
+
link: url,
|
|
43
|
+
description: data.share.content,
|
|
44
|
+
allowEmpty: true,
|
|
45
|
+
item: items,
|
|
46
|
+
image: authorimg,
|
|
47
|
+
itunes_author: author,
|
|
48
|
+
itunes_category: '全民K歌',
|
|
49
|
+
};
|
|
50
|
+
};
|
package/lib/v2/qq/maintainer.js
CHANGED
package/lib/v2/qq/radar.js
CHANGED
|
@@ -23,5 +23,19 @@ module.exports = {
|
|
|
23
23
|
target: '/qq/live/:id',
|
|
24
24
|
},
|
|
25
25
|
],
|
|
26
|
+
'node.kg': [
|
|
27
|
+
{
|
|
28
|
+
title: '用户作品列表 - 全民 K 歌',
|
|
29
|
+
docs: 'https://docs.rsshub.app/live.html#qi-e-zhi-bo-zhi-bo-jian-ti-xing',
|
|
30
|
+
source: ['/personal'],
|
|
31
|
+
target: (_params, url) => `/qq/kg/${new URL(url).searchParams.get('uid')}`,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: '用户作品评论动态 - 全民 K 歌',
|
|
35
|
+
docs: 'https://docs.rsshub.app/live.html#qi-e-zhi-bo-zhi-bo-jian-ti-xing',
|
|
36
|
+
source: ['/play'],
|
|
37
|
+
target: (_params, url) => `/qq/kg/${new URL(url).searchParams.get('s')}`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
26
40
|
},
|
|
27
41
|
};
|
package/lib/v2/qq/router.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module.exports = function (router) {
|
|
2
2
|
router.get('/ac/comic/:id?', require('./ac/comic'));
|
|
3
3
|
router.get('/ac/rank/:type?/:time?', require('./ac/rank'));
|
|
4
|
+
router.get('/kg/:userId', require('./kg/user'));
|
|
5
|
+
router.get('/kg/reply/:playId', require('./kg/reply'));
|
|
4
6
|
router.get('/live/:id', require('./live'));
|
|
5
7
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'samsung.com': {
|
|
3
|
+
_name: 'Samsung',
|
|
4
|
+
research: [
|
|
5
|
+
{
|
|
6
|
+
title: 'Research Blog',
|
|
7
|
+
docs: 'https://docs.rsshub.app/new-media.html#samsung-research-blog',
|
|
8
|
+
source: ['/blog', '/'],
|
|
9
|
+
target: '/samsung/research/blog',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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 rootUrl = 'https://research.samsung.com';
|
|
7
|
+
const currentUrl = `${rootUrl}/blogMain/list.json`;
|
|
8
|
+
|
|
9
|
+
const response = await got({
|
|
10
|
+
method: 'post',
|
|
11
|
+
url: currentUrl,
|
|
12
|
+
json: {
|
|
13
|
+
currentPageNo: 0,
|
|
14
|
+
endIndex: 9,
|
|
15
|
+
startIndex: 0,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
let items = response.data.value.map((item) => ({
|
|
20
|
+
title: item.title,
|
|
21
|
+
author: item.authorName,
|
|
22
|
+
link: `${rootUrl}${item.urlLink}`,
|
|
23
|
+
category: [item.catagoryCode, item.hashTag1, item.hashTag2],
|
|
24
|
+
pubDate: parseDate(item.publicationDtsStr.replace(/On /, ''), 'MMMM D, YYYY'),
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
items = await Promise.all(
|
|
28
|
+
items.map((item) =>
|
|
29
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
30
|
+
const detailResponse = await got({
|
|
31
|
+
method: 'get',
|
|
32
|
+
url: item.link,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const content = cheerio.load(detailResponse.data);
|
|
36
|
+
|
|
37
|
+
item.description = content('.news-con').html();
|
|
38
|
+
|
|
39
|
+
return item;
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
ctx.state.data = {
|
|
45
|
+
title: 'BLOG | Samsung Research',
|
|
46
|
+
link: `${rootUrl}/blog`,
|
|
47
|
+
item: items,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
const config = require('@/config').value;
|
|
4
3
|
const path = require('path');
|
|
5
4
|
const { art } = require('@/utils/render');
|
|
6
5
|
|
|
6
|
+
const { CookieJar } = require('tough-cookie');
|
|
7
|
+
const cookieJar = new CookieJar();
|
|
8
|
+
|
|
7
9
|
module.exports = async (ctx) => {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const headers = {
|
|
13
|
-
'X-Requested-With': 'XMLHttpRequest',
|
|
14
|
-
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
15
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
16
|
-
'User-Agent': config.ua,
|
|
17
|
-
cookie,
|
|
18
|
-
};
|
|
10
|
+
const pub = ctx.params.pub;
|
|
11
|
+
const jrn = ctx.params.jrn;
|
|
12
|
+
const host = `https://${pub}.scitation.org`;
|
|
13
|
+
const jrnlUrl = `${host}/toc/${jrn}/current?size=all`;
|
|
19
14
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
url: hostUrl,
|
|
23
|
-
headers,
|
|
15
|
+
const response = await got(jrnlUrl, {
|
|
16
|
+
cookieJar,
|
|
24
17
|
});
|
|
25
|
-
const $ = cheerio.load(
|
|
18
|
+
const $ = cheerio.load(response.data);
|
|
19
|
+
const jrnlName = $('.header-journal-title').text();
|
|
26
20
|
const list = $('.card')
|
|
27
21
|
.map((_, item) => {
|
|
28
22
|
$(item).find('.access-text').remove();
|
|
@@ -45,17 +39,20 @@ module.exports = async (ctx) => {
|
|
|
45
39
|
art(path.join(__dirname, 'templates/description.art'), {
|
|
46
40
|
item,
|
|
47
41
|
});
|
|
48
|
-
await Promise.all(
|
|
42
|
+
const items = await Promise.all(
|
|
49
43
|
list.map((item) =>
|
|
50
44
|
ctx.cache.tryGet(item.link, async () => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
url: host.concat('/action/PB2showAjaxAbstract'),
|
|
54
|
-
headers,
|
|
45
|
+
const response2 = await got.post(`${host}/action/PB2showAjaxAbstract`, {
|
|
46
|
+
cookieJar,
|
|
55
47
|
body: 'doi=' + item.doi,
|
|
48
|
+
headers: {
|
|
49
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
50
|
+
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
51
|
+
'Accept-Encoding': 'gzip, deflate, br',
|
|
52
|
+
},
|
|
56
53
|
});
|
|
57
|
-
const
|
|
58
|
-
item.abstract =
|
|
54
|
+
const $2 = cheerio.load(response2.data);
|
|
55
|
+
item.abstract = $2('span').text();
|
|
59
56
|
item.description = renderDesc(item);
|
|
60
57
|
return item;
|
|
61
58
|
})
|
|
@@ -63,8 +60,8 @@ module.exports = async (ctx) => {
|
|
|
63
60
|
);
|
|
64
61
|
|
|
65
62
|
ctx.state.data = {
|
|
66
|
-
title:
|
|
67
|
-
link:
|
|
68
|
-
item:
|
|
63
|
+
title: jrnlName,
|
|
64
|
+
link: jrnlUrl,
|
|
65
|
+
item: items,
|
|
69
66
|
};
|
|
70
67
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'scitation.org': {
|
|
3
|
+
_name: 'scitation',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'journal',
|
|
7
|
+
docs: 'https://docs.rsshub.app/journal.html#scitation',
|
|
8
|
+
source: ':pub.scitation.org/toc/:jrn',
|
|
9
|
+
target: '/scitation/:pub/:jrn',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: 'section',
|
|
13
|
+
docs: 'https://docs.rsshub.app/journal.html#scitation',
|
|
14
|
+
source: ':pub.scitation.org/toc/:jrn',
|
|
15
|
+
target: (params, url) => `/scitation/:pub/:jrn/${new URL(url).searchParams.get('tocSection')}`,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
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 pub = ctx.params.pub;
|
|
11
|
+
const jrn = ctx.params.jrn;
|
|
12
|
+
const sec = ctx.params.sec.split('+').join(' ');
|
|
13
|
+
const host = `https://${pub}.scitation.org`;
|
|
14
|
+
const jrnlUrl = `${host}/toc/${jrn}/current?size=all`;
|
|
15
|
+
|
|
16
|
+
const response = await got(jrnlUrl, {
|
|
17
|
+
cookieJar,
|
|
18
|
+
});
|
|
19
|
+
const $ = cheerio.load(response.data);
|
|
20
|
+
const jrnlName = $('.header-journal-title').text();
|
|
21
|
+
const issueUrl = $('.row.js_issue.highlighted').find('a').attr('href');
|
|
22
|
+
const section = $('.subject-heading')
|
|
23
|
+
.map((_, item) => ({
|
|
24
|
+
name: $(item).text(),
|
|
25
|
+
}))
|
|
26
|
+
.get();
|
|
27
|
+
|
|
28
|
+
let ifContainSection = false;
|
|
29
|
+
for (let i = 0, l = section.length; i < l; i++) {
|
|
30
|
+
if (section[i].name === sec) {
|
|
31
|
+
ifContainSection = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
let list;
|
|
35
|
+
if (ifContainSection === true) {
|
|
36
|
+
const secUrl = `${issueUrl}?tocSection=${sec}`;
|
|
37
|
+
const response2 = await got(secUrl, {
|
|
38
|
+
cookieJar,
|
|
39
|
+
});
|
|
40
|
+
const $2 = cheerio.load(response2.data);
|
|
41
|
+
list = $2('.card')
|
|
42
|
+
.map((_, item) => {
|
|
43
|
+
$2(item).find('.access-text').remove();
|
|
44
|
+
const title = $2(item).find('.hlFld-Title').text();
|
|
45
|
+
const authors = $2(item).find('.entryAuthor.all').text();
|
|
46
|
+
const img = $2(item).find('img').attr('src');
|
|
47
|
+
const link = $2(item).find('.ref.nowrap').attr('href');
|
|
48
|
+
const doi = link.replace('/doi/full/', '');
|
|
49
|
+
return {
|
|
50
|
+
title,
|
|
51
|
+
link,
|
|
52
|
+
doi,
|
|
53
|
+
authors,
|
|
54
|
+
img,
|
|
55
|
+
};
|
|
56
|
+
})
|
|
57
|
+
.get();
|
|
58
|
+
|
|
59
|
+
const renderDesc = (item) =>
|
|
60
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
61
|
+
item,
|
|
62
|
+
});
|
|
63
|
+
list = await Promise.all(
|
|
64
|
+
list.map((item) =>
|
|
65
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
66
|
+
const response3 = await got.post(host.concat('/action/PB2showAjaxAbstract'), {
|
|
67
|
+
cookieJar,
|
|
68
|
+
body: 'doi=' + item.doi,
|
|
69
|
+
headers: {
|
|
70
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
71
|
+
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
72
|
+
'Accept-Encoding': 'gzip, deflate, br',
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
const $3 = cheerio.load(response3.data);
|
|
76
|
+
item.abstract = $3('span').text();
|
|
77
|
+
item.description = renderDesc(item);
|
|
78
|
+
return item;
|
|
79
|
+
})
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
ctx.state.data = {
|
|
85
|
+
title: jrnlName.concat(' - ', sec),
|
|
86
|
+
link: jrnlUrl,
|
|
87
|
+
item: list,
|
|
88
|
+
allowEmpty: true,
|
|
89
|
+
};
|
|
90
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<p>
|
|
2
|
+
<span><big>{{ item.title }}</big></span><br>
|
|
3
|
+
</p>
|
|
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
|
+
{{ if item.img }}<img src={{ item.img }}>{{ /if }}
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
<span>{{ item.abstract }}</span><br>
|
|
11
|
+
</p>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const timezone = require('@/utils/timezone');
|
|
4
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const rootUrl = 'https://shuiguopai.com';
|
|
10
|
+
const apiRootUrl = 'https://api.cbbee0.com';
|
|
11
|
+
const listUrl = `${apiRootUrl}/v1_2/homePage`;
|
|
12
|
+
const filmUrl = `${apiRootUrl}/v1_2/filmInfo`;
|
|
13
|
+
|
|
14
|
+
const response = await got({
|
|
15
|
+
method: 'post',
|
|
16
|
+
url: listUrl,
|
|
17
|
+
json: {
|
|
18
|
+
device_id: '',
|
|
19
|
+
hm: '008-api',
|
|
20
|
+
last_page: 0,
|
|
21
|
+
length: 3,
|
|
22
|
+
ltype: 1,
|
|
23
|
+
page: 1,
|
|
24
|
+
userToken: '',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
let items = response.data.data.list.map((item) => ({
|
|
29
|
+
title: item.title,
|
|
30
|
+
guid: item.library_id,
|
|
31
|
+
link: `${rootUrl}/play-details/${item.library_id}`,
|
|
32
|
+
pubDate: timezone(parseDate(item.show_time, 'MM月DD日 HH:mm'), +8),
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
items = await Promise.all(
|
|
36
|
+
items.map((item) =>
|
|
37
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
38
|
+
const detailResponse = await got({
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: item.link,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const content = cheerio.load(detailResponse.data);
|
|
44
|
+
content('iframe').remove();
|
|
45
|
+
|
|
46
|
+
const infoResponse = await got({
|
|
47
|
+
method: 'post',
|
|
48
|
+
url: filmUrl,
|
|
49
|
+
json: {
|
|
50
|
+
device_id: '',
|
|
51
|
+
film_id: detailResponse.data.match(/film_id:"(\d+)",/)[1],
|
|
52
|
+
hm: '008-api',
|
|
53
|
+
userToken: '',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const data = infoResponse.data.data[0];
|
|
58
|
+
|
|
59
|
+
item.author = data.actor;
|
|
60
|
+
item.category = data.tags.map((t) => t.tag_title);
|
|
61
|
+
item.description = art(path.join(__dirname, 'templates/description.art'), {
|
|
62
|
+
video: data.download_url,
|
|
63
|
+
description: content('.content').html(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return item;
|
|
67
|
+
})
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
ctx.state.data = {
|
|
72
|
+
title: '水果派',
|
|
73
|
+
link: rootUrl,
|
|
74
|
+
item: items,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
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 host = 'https://www.springer.com';
|
|
11
|
+
const journal = ctx.params.journal;
|
|
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 = $('h1#journalTitle').text().trim();
|
|
19
|
+
const issueUrl = $('p.c-card__title.u-mb-16.u-flex-grow').find('a').attr('href');
|
|
20
|
+
|
|
21
|
+
const response2 = await got(issueUrl, {
|
|
22
|
+
cookieJar,
|
|
23
|
+
});
|
|
24
|
+
const $2 = cheerio.load(response2.data);
|
|
25
|
+
const issue = $2('.app-volumes-and-issues__info').find('h1').text();
|
|
26
|
+
const list = $2('article.c-card')
|
|
27
|
+
.map((_, item) => {
|
|
28
|
+
const title = $(item).find('.c-card__title').text().trim();
|
|
29
|
+
const link = $(item).find('a').attr('href');
|
|
30
|
+
const doi = link.replace('https://link.springer.com/article/', '');
|
|
31
|
+
const img = $(item).find('img').attr('src');
|
|
32
|
+
const authors = $(item)
|
|
33
|
+
.find('.c-author-list')
|
|
34
|
+
.find('li')
|
|
35
|
+
.map((_, item) => $(item).text().trim())
|
|
36
|
+
.get()
|
|
37
|
+
.join('; ');
|
|
38
|
+
return {
|
|
39
|
+
title,
|
|
40
|
+
link,
|
|
41
|
+
doi,
|
|
42
|
+
issue,
|
|
43
|
+
img,
|
|
44
|
+
authors,
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
.get();
|
|
48
|
+
|
|
49
|
+
const renderDesc = (item) =>
|
|
50
|
+
art(path.join(__dirname, 'templates/description.art'), {
|
|
51
|
+
item,
|
|
52
|
+
});
|
|
53
|
+
const items = await Promise.all(
|
|
54
|
+
list.map((item) =>
|
|
55
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
56
|
+
const response3 = await got(item.link, {
|
|
57
|
+
cookieJar,
|
|
58
|
+
});
|
|
59
|
+
const $3 = cheerio.load(response3.data);
|
|
60
|
+
$3('.c-article__sub-heading').remove();
|
|
61
|
+
item.abstract = $3('div#Abs1-content').text();
|
|
62
|
+
item.description = renderDesc(item);
|
|
63
|
+
return item;
|
|
64
|
+
})
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
ctx.state.data = {
|
|
68
|
+
title: jrnlName,
|
|
69
|
+
link: jrnlUrl,
|
|
70
|
+
item: items,
|
|
71
|
+
};
|
|
72
|
+
};
|