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
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
<span><small><i>{{ item.issue }}</i></small></span><br>
|
|
8
|
+
<img src={{ item.img }}>
|
|
9
|
+
</p>
|
|
10
|
+
<p>
|
|
11
|
+
<span>{{ item.abstract }}</span><br>
|
|
12
|
+
</p>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { art } = require('@/utils/render');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const baseUrl = 'https://www.mindmeister.com';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { category = 'mind-map-examples', language = 'en' } = ctx.params;
|
|
9
|
+
const link = `${baseUrl}${language === 'en' || language === 'other' ? '' : `/${language}`}/${category === 'mind-map-examples' ? category : `mind-maps/${category}?language=${language}`}`;
|
|
10
|
+
const respsonse = await got(link);
|
|
11
|
+
|
|
12
|
+
const $ = cheerio.load(respsonse.data);
|
|
13
|
+
|
|
14
|
+
const items = $('#public-listing .map-tile-wrapper')
|
|
15
|
+
.toArray()
|
|
16
|
+
.map((item) => {
|
|
17
|
+
item = $(item);
|
|
18
|
+
const imageUrl = new URL(
|
|
19
|
+
item
|
|
20
|
+
.find('.map-wrapper')
|
|
21
|
+
.attr('style')
|
|
22
|
+
.match(/url\('(.*)'\);/)[1]
|
|
23
|
+
).href;
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
title: item.find('.title').text(),
|
|
27
|
+
description: art(path.join(__dirname, 'templates/image.art'), {
|
|
28
|
+
src: imageUrl.split('?')[0],
|
|
29
|
+
alt: item.find('.title').text().trim(),
|
|
30
|
+
}),
|
|
31
|
+
link: item.find('.title').attr('href'),
|
|
32
|
+
author: item.find('.author').text().trim().replace(/^by/, ''),
|
|
33
|
+
category: item.find('.fw-bold').text(),
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
ctx.state.data = {
|
|
38
|
+
title: $('head title').text(),
|
|
39
|
+
description: $('head meta[name=description]').text(),
|
|
40
|
+
link,
|
|
41
|
+
item: items,
|
|
42
|
+
language,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'mindmeister.com': {
|
|
3
|
+
_name: 'MindMeister',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '分类',
|
|
7
|
+
docs: 'https://docs.rsshub.app/study.html#mindmeister',
|
|
8
|
+
source: ['/:language/mind-maps/:category', '/:language/:category', '/:category'],
|
|
9
|
+
target: (params) => `/mindmeister/${params.category}${params.language ? `/${params.language}` : ''}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<img src="{{ src }}" alt="{{ alt }}">
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const md = require('markdown-it')({
|
|
4
|
+
html: true,
|
|
5
|
+
linkify: true,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
module.exports = async (ctx) => {
|
|
9
|
+
const id = ctx.params.id;
|
|
10
|
+
|
|
11
|
+
const rootUrl = 'https://mirror.xyz';
|
|
12
|
+
const currentUrl = id.endsWith('.eth') ? `${rootUrl}/${id}` : `https://${id}.mirror.xyz`;
|
|
13
|
+
|
|
14
|
+
const response = await got({
|
|
15
|
+
method: 'get',
|
|
16
|
+
url: currentUrl,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const data = JSON.parse(response.data.match(/"__NEXT_DATA__" type="application\/json">({"props":.*})<\/script>/)[1]);
|
|
20
|
+
|
|
21
|
+
const items = data.props.pageProps.project.posts.map((item) => ({
|
|
22
|
+
title: item.title,
|
|
23
|
+
description: md.render(item.body),
|
|
24
|
+
link: `${currentUrl}/${item._id}`,
|
|
25
|
+
pubDate: parseDate(item.timestamp * 1000),
|
|
26
|
+
author: item.publisher.project.displayName,
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
ctx.state.data = {
|
|
30
|
+
title: `${data.props.pageProps.project.displayName} - Mirror`,
|
|
31
|
+
link: currentUrl,
|
|
32
|
+
item: items,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'mirror.xyz': {
|
|
3
|
+
_name: 'Mirror',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: 'User',
|
|
7
|
+
docs: 'https://docs.rsshub.app/new-media.html#mirror-user',
|
|
8
|
+
source: ['/:id', '/'],
|
|
9
|
+
target: (params, url) => {
|
|
10
|
+
const matches = new URL(url).toString().match(/https:\/\/(.*?)\.mirror\.xyz/);
|
|
11
|
+
const id = matches ? matches[1] : params.id;
|
|
12
|
+
return `/mirror/${id}`;
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
};
|
package/lib/v2/nbd/radar.js
CHANGED
|
@@ -6,13 +6,13 @@ module.exports = {
|
|
|
6
6
|
title: '分类',
|
|
7
7
|
docs: 'https://docs.rsshub.app/finance.html#mei-jing-wang',
|
|
8
8
|
source: '/',
|
|
9
|
-
|
|
9
|
+
target: '/nbd',
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
title: '重磅原创',
|
|
13
13
|
docs: 'https://docs.rsshub.app/finance.html#mei-jing-wang',
|
|
14
14
|
source: '/',
|
|
15
|
-
|
|
15
|
+
target: '/nbd/daily',
|
|
16
16
|
},
|
|
17
17
|
],
|
|
18
18
|
},
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
const cheerio = require('cheerio');
|
|
4
|
+
const baseUrl = 'https://www.ncwu.edu.cn/xxtz.htm';
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const response = await got(baseUrl);
|
|
8
|
+
|
|
9
|
+
const $ = cheerio.load(response.data);
|
|
10
|
+
const list = $('div.news-item')
|
|
11
|
+
.toArray()
|
|
12
|
+
.map((item) => {
|
|
13
|
+
item = $(item);
|
|
14
|
+
return {
|
|
15
|
+
title: `「` + item.find('a.dw').text() + `」` + item.find('a.dw').next().text(),
|
|
16
|
+
description: item.find('div.detail').text(),
|
|
17
|
+
pubDate: parseDate(item.find('div.month').text() + '-' + item.find('div.day').text(), 'YYYY-MM-DD'),
|
|
18
|
+
link: item.find('a.dw').next().attr('href'),
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
ctx.state.data = {
|
|
23
|
+
title: $('title').text(),
|
|
24
|
+
link: baseUrl,
|
|
25
|
+
item: list,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
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
|
+
const ids = {
|
|
9
|
+
'': {
|
|
10
|
+
id: 'BAI5E21O',
|
|
11
|
+
title: '首页',
|
|
12
|
+
},
|
|
13
|
+
qsyk: {
|
|
14
|
+
id: 'BD21K0DL',
|
|
15
|
+
title: '轻松一刻',
|
|
16
|
+
},
|
|
17
|
+
cz: {
|
|
18
|
+
id: 'CICMICLU',
|
|
19
|
+
title: '槽值',
|
|
20
|
+
},
|
|
21
|
+
rj: {
|
|
22
|
+
id: 'CICMOMBL',
|
|
23
|
+
title: '人间',
|
|
24
|
+
},
|
|
25
|
+
dgxm: {
|
|
26
|
+
id: 'CICMPVC5',
|
|
27
|
+
title: '大国小民',
|
|
28
|
+
},
|
|
29
|
+
ssyg: {
|
|
30
|
+
id: 'CICMLCOU',
|
|
31
|
+
title: '三三有梗',
|
|
32
|
+
},
|
|
33
|
+
sd: {
|
|
34
|
+
id: 'D551V75C',
|
|
35
|
+
title: '数读',
|
|
36
|
+
},
|
|
37
|
+
kk: {
|
|
38
|
+
id: 'D55253RH',
|
|
39
|
+
title: '看客',
|
|
40
|
+
},
|
|
41
|
+
xhx: {
|
|
42
|
+
id: 'D553A53L',
|
|
43
|
+
title: '下划线',
|
|
44
|
+
},
|
|
45
|
+
txs: {
|
|
46
|
+
id: 'D553PGHQ',
|
|
47
|
+
title: '谈心社',
|
|
48
|
+
},
|
|
49
|
+
dd: {
|
|
50
|
+
id: 'CICMS5BI',
|
|
51
|
+
title: '哒哒',
|
|
52
|
+
},
|
|
53
|
+
pbgl: {
|
|
54
|
+
id: 'CQ9UDVKO',
|
|
55
|
+
title: '胖编怪聊',
|
|
56
|
+
},
|
|
57
|
+
qyd: {
|
|
58
|
+
id: 'CQ9UJIJN',
|
|
59
|
+
title: '曲一刀',
|
|
60
|
+
},
|
|
61
|
+
jrzs: {
|
|
62
|
+
id: 'BD284UM8',
|
|
63
|
+
title: '今日之声',
|
|
64
|
+
},
|
|
65
|
+
lc: {
|
|
66
|
+
id: 'CICMMGBH',
|
|
67
|
+
title: '浪潮',
|
|
68
|
+
},
|
|
69
|
+
fd: {
|
|
70
|
+
id: 'D5543R68',
|
|
71
|
+
title: '沸点',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
module.exports = async (ctx) => {
|
|
76
|
+
const id = ctx.params.id ?? '';
|
|
77
|
+
|
|
78
|
+
const rootUrl = 'https://3g.163.com';
|
|
79
|
+
const currentUrl = `${rootUrl}/touch/exclusive${id ? `/sub/${id}` : ''}`;
|
|
80
|
+
const apiUrl = `${rootUrl}/touch/reconstruct/article/list/${ids[id].id}wangning/0-20.html`;
|
|
81
|
+
|
|
82
|
+
const response = await got({
|
|
83
|
+
method: 'get',
|
|
84
|
+
url: apiUrl,
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const data = JSON.parse(response.data.match(/^artiList\((.*)\)$/)[1])[`${ids[id].id}wangning`];
|
|
88
|
+
|
|
89
|
+
let items = data.map((item) => ({
|
|
90
|
+
title: item.title,
|
|
91
|
+
author: item.source,
|
|
92
|
+
link: item.skipURL || item.url || `${rootUrl}/dy/article/${item.docid}.html`,
|
|
93
|
+
pubDate: timezone(parseDate(item.ptime), +8),
|
|
94
|
+
videoId: item.skipType === 'video' ? item.stitle : '',
|
|
95
|
+
}));
|
|
96
|
+
|
|
97
|
+
items = await Promise.all(
|
|
98
|
+
items.map((item) =>
|
|
99
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
100
|
+
try {
|
|
101
|
+
if (item.videoId) {
|
|
102
|
+
const detailResponse = await got({
|
|
103
|
+
method: 'get',
|
|
104
|
+
url: `${rootUrl}/touch/video/detail/jsonp/VIA8K0PTB.html?callback=videoList`,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const video = JSON.parse(detailResponse.data.match(/^videoList\((.*)\)$/)[1])?.mp4_url;
|
|
108
|
+
|
|
109
|
+
item.description = art(path.join(__dirname, 'templates/exclusive.art'), {
|
|
110
|
+
video,
|
|
111
|
+
});
|
|
112
|
+
} else {
|
|
113
|
+
const detailResponse = await got({
|
|
114
|
+
method: 'get',
|
|
115
|
+
url: item.link,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
const content = cheerio.load(detailResponse.data);
|
|
119
|
+
|
|
120
|
+
content('.m-linkCard').remove();
|
|
121
|
+
|
|
122
|
+
content('.m-photo').each(function () {
|
|
123
|
+
content(this).html(
|
|
124
|
+
art(path.join(__dirname, 'templates/exclusive.art'), {
|
|
125
|
+
image: content(this).find('img').attr('data-src'),
|
|
126
|
+
})
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
item.description = content('.article-body').html();
|
|
131
|
+
}
|
|
132
|
+
} catch (e) {
|
|
133
|
+
// no-empty
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
delete item.videoId;
|
|
137
|
+
|
|
138
|
+
return item;
|
|
139
|
+
})
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
ctx.state.data = {
|
|
144
|
+
title: `网易独家 - ${ids[id].title}`,
|
|
145
|
+
link: currentUrl,
|
|
146
|
+
item: items,
|
|
147
|
+
};
|
|
148
|
+
};
|
package/lib/v2/netease/radar.js
CHANGED
package/lib/v2/netease/router.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module.exports = function (router) {
|
|
2
|
+
router.get('/exclusive/:id?', require('./exclusive'));
|
|
2
3
|
router.get('/renjian/:category?', require('./renjian'));
|
|
3
4
|
router.get('/today/:need_content?', require('./today'));
|
|
4
5
|
router.get('/news/rank/:category?/:type?/:time?', require('./rank'));
|
package/lib/v2/nju/rczp.js
CHANGED
|
@@ -1,38 +1,48 @@
|
|
|
1
|
-
const
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
2
|
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
-
const
|
|
3
|
+
const config = require('@/config').value;
|
|
4
4
|
|
|
5
5
|
module.exports = async (ctx) => {
|
|
6
6
|
const type = ctx.params.type;
|
|
7
7
|
const title_dict = {
|
|
8
|
-
xxfb: '信息发布',
|
|
9
|
-
jylgw: '教研类岗位',
|
|
10
|
-
gllgw: '管理岗位及其他',
|
|
8
|
+
xxfb: { title: '信息发布', channelid: '9531,9532,9533,9534,9535,9419' },
|
|
9
|
+
jylgw: { title: '教研类岗位', channelid: '9420,9421,9422,9423' },
|
|
10
|
+
gllgw: { title: '管理岗位及其他', channelid: '9424,9425,9426' },
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
const browser = await require('@/utils/puppeteer')();
|
|
14
|
-
const page = await browser.newPage();
|
|
15
12
|
const link = `https://rczp.nju.edu.cn/sylm/${type}/index.html`;
|
|
16
|
-
await page.goto(link);
|
|
17
13
|
|
|
18
|
-
const
|
|
19
|
-
|
|
14
|
+
const data = await ctx.cache.tryGet(
|
|
15
|
+
`nju:rczp:${type}`,
|
|
16
|
+
async () => {
|
|
17
|
+
const { data } = await got.post('https://rczp.nju.edu.cn/njdx/openapi/t/info/list.do', {
|
|
18
|
+
headers: {
|
|
19
|
+
referer: link,
|
|
20
|
+
'x-requested-with': 'XMLHttpRequest',
|
|
21
|
+
},
|
|
22
|
+
form: {
|
|
23
|
+
channelid: Buffer.from(title_dict[type].channelid).toString('base64'),
|
|
24
|
+
pagesize: Buffer.from('15').toString('base64'),
|
|
25
|
+
pageno: Buffer.from('1').toString('base64'),
|
|
26
|
+
hasPage: Buffer.from('true').toString('base64'),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
return data;
|
|
30
|
+
},
|
|
31
|
+
config.cache.routeExpire,
|
|
32
|
+
false
|
|
33
|
+
);
|
|
20
34
|
|
|
21
|
-
const
|
|
22
|
-
|
|
35
|
+
const items = data.infolist.map((item) => ({
|
|
36
|
+
title: item.title,
|
|
37
|
+
description: item.summary,
|
|
38
|
+
link: item.url,
|
|
39
|
+
pubDate: parseDate(item.releasetime, 'x'),
|
|
40
|
+
author: item.username,
|
|
41
|
+
}));
|
|
23
42
|
|
|
24
43
|
ctx.state.data = {
|
|
25
|
-
title: `人才招聘-${title_dict[type]}`,
|
|
44
|
+
title: `人才招聘-${title_dict[type].title}`,
|
|
26
45
|
link,
|
|
27
|
-
item:
|
|
28
|
-
.map((index, item) => {
|
|
29
|
-
item = $(item);
|
|
30
|
-
return {
|
|
31
|
-
title: item.find('a').attr('title'),
|
|
32
|
-
link: item.find('a').attr('href'),
|
|
33
|
-
pubDate: timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), +8),
|
|
34
|
-
};
|
|
35
|
-
})
|
|
36
|
-
.get(),
|
|
46
|
+
item: items,
|
|
37
47
|
};
|
|
38
48
|
};
|
package/lib/v2/njust/utils.js
CHANGED
|
@@ -10,6 +10,10 @@ async function getContent(url, pptr = false) {
|
|
|
10
10
|
// get: () => undefined,
|
|
11
11
|
// });
|
|
12
12
|
// });
|
|
13
|
+
await page.setRequestInterception(true);
|
|
14
|
+
page.on('request', (request) => {
|
|
15
|
+
request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
|
|
16
|
+
});
|
|
13
17
|
await page.goto(url, {
|
|
14
18
|
waitUntil: 'networkidle0',
|
|
15
19
|
});
|
|
@@ -5,12 +5,11 @@ const host = 'http://aao.nuaa.edu.cn/';
|
|
|
5
5
|
* @desc 返回一个可用的cookie,使用 `got` 发起请求的时候,传入到`options.headers.cookie`即可
|
|
6
6
|
*/
|
|
7
7
|
module.exports = async function getCookie() {
|
|
8
|
-
const browser = await require('@/utils/puppeteer')();
|
|
8
|
+
const browser = await require('@/utils/puppeteer')({ stealth: true });
|
|
9
9
|
const page = await browser.newPage();
|
|
10
|
-
await page.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(navigator, 'webdriver', { get: () => false });
|
|
10
|
+
await page.setRequestInterception(true);
|
|
11
|
+
page.on('request', (request) => {
|
|
12
|
+
request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
|
|
14
13
|
});
|
|
15
14
|
|
|
16
15
|
await page.goto(host, {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'nyaa.si': {
|
|
3
|
+
_name: 'nyaa',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '搜索结果',
|
|
7
|
+
docs: 'https://docs.rsshub.app/multimedia.html#nyaa-sou-suo-jie-guo',
|
|
8
|
+
source: '/',
|
|
9
|
+
target: (params, url) => {
|
|
10
|
+
url = new URL(url);
|
|
11
|
+
if (url.hostname.split('.')[0] === 'nyaa') {
|
|
12
|
+
const searchParams = url.searchParams;
|
|
13
|
+
const query = searchParams.has('q') ? searchParams.get('q') : '';
|
|
14
|
+
return `/nyaa/search/${query}`;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
sukebei: [
|
|
20
|
+
{
|
|
21
|
+
title: 'sukebei 搜索结果',
|
|
22
|
+
docs: 'https://docs.rsshub.app/multimedia.html#nyaa-sukebei-sou-suo-jie-guo',
|
|
23
|
+
source: '/',
|
|
24
|
+
target: (params, url) => {
|
|
25
|
+
const searchParams = new URL(url).searchParams;
|
|
26
|
+
const query = searchParams.has('q') ? searchParams.get('q') : '';
|
|
27
|
+
return `/nyaa/sukebei/search/${query}`;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -11,8 +11,10 @@ module.exports = async (ctx) => {
|
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
const rootURL = ctx.routerPath.split('/')[1] === 'sukebei' ? 'https://sukebei.nyaa.si' : 'https://nyaa.si';
|
|
14
15
|
const { query = '' } = ctx.params;
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
const feed = await parser.parseURL(`${rootURL}/?page=rss&c=0_0&f=0&q=${encodeURI(query)}`);
|
|
16
18
|
|
|
17
19
|
feed.items.map((item) => {
|
|
18
20
|
item.link = item.guid;
|
|
@@ -24,7 +26,7 @@ module.exports = async (ctx) => {
|
|
|
24
26
|
|
|
25
27
|
ctx.state.data = {
|
|
26
28
|
title: feed.title,
|
|
27
|
-
link:
|
|
29
|
+
link: `${rootURL}/?f=0&c=0_0&q=${query}`,
|
|
28
30
|
description: feed.description,
|
|
29
31
|
item: feed.items,
|
|
30
32
|
};
|