rsshub 1.0.0-master.db4e8ed → 1.0.0-master.db74812
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/router.js +7 -10
- package/lib/v2/acg17/maintainer.js +3 -0
- package/lib/v2/acg17/post.js +20 -0
- package/lib/v2/acg17/radar.js +13 -0
- package/lib/v2/acg17/router.js +3 -0
- package/lib/v2/apple/exchange_repair.js +28 -21
- package/lib/v2/bdys/index.js +98 -0
- package/lib/v2/bdys/maintainer.js +3 -0
- package/lib/v2/bdys/radar.js +20 -0
- package/lib/v2/bdys/router.js +3 -0
- package/lib/v2/bdys/templates/desc.art +21 -0
- package/lib/v2/bjsk/index.js +52 -0
- package/lib/v2/bjsk/maintainer.js +3 -0
- package/lib/v2/bjsk/radar.js +13 -0
- package/lib/v2/bjsk/router.js +3 -0
- package/lib/v2/cartoonmad/comic.js +70 -0
- package/lib/v2/cartoonmad/maintainer.js +3 -0
- package/lib/v2/cartoonmad/radar.js +13 -0
- package/lib/v2/cartoonmad/router.js +3 -0
- package/lib/v2/cartoonmad/templates/chapter.art +1 -0
- package/lib/{routes/universities → v2}/cas/cg/index.js +4 -2
- package/lib/{routes/universities → v2}/cas/iee/kydt.js +7 -5
- package/lib/v2/cas/maintainer.js +6 -0
- package/lib/v2/cas/mesalab/kb.js +41 -0
- package/lib/v2/cas/radar.js +40 -0
- package/lib/v2/cas/router.js +6 -0
- package/lib/v2/cas/sim/kyjz.js +47 -0
- package/lib/v2/cast/index.js +74 -0
- package/lib/v2/cast/maintainer.js +3 -0
- package/lib/v2/cast/radar.js +13 -0
- package/lib/v2/cast/router.js +3 -0
- package/lib/v2/gov/beijing/bphc/index.js +1 -1
- package/lib/v2/issuehunt/funded.js +28 -0
- package/lib/v2/issuehunt/maintainer.js +3 -0
- package/lib/v2/issuehunt/radar.js +13 -0
- package/lib/v2/issuehunt/router.js +3 -0
- package/lib/v2/jiaoliudao/index.js +35 -0
- package/lib/v2/jiaoliudao/maintainer.js +3 -0
- package/lib/v2/jiaoliudao/radar.js +13 -0
- package/lib/v2/jiaoliudao/router.js +3 -0
- package/lib/v2/jin10/index.js +58 -0
- package/lib/v2/jin10/maintainer.js +3 -0
- package/lib/v2/jin10/radar.js +13 -0
- package/lib/v2/jin10/router.js +3 -0
- package/lib/v2/jin10/templates/description.art +2 -0
- package/lib/v2/mclaren/index.js +96 -0
- package/lib/v2/mclaren/maintainer.js +3 -0
- package/lib/v2/mclaren/radar.js +29 -0
- package/lib/v2/mclaren/router.js +3 -0
- package/lib/v2/mclaren/templates/desc.art +6 -0
- package/lib/v2/misskey/featured-notes.js +29 -0
- package/lib/v2/misskey/maintainer.js +3 -0
- package/lib/v2/misskey/radar.js +35 -0
- package/lib/v2/misskey/router.js +3 -0
- package/lib/v2/misskey/templates/note.art +21 -0
- package/lib/v2/misskey/utils.js +31 -0
- package/lib/v2/nbd/index.js +6 -6
- package/lib/v2/piyao/jrpy.js +39 -0
- package/lib/v2/piyao/maintainer.js +3 -0
- package/lib/v2/piyao/radar.js +13 -0
- package/lib/v2/piyao/router.js +3 -0
- package/lib/v2/qq/fact/index.js +61 -0
- package/lib/v2/qq/maintainer.js +1 -0
- package/lib/v2/qq/radar.js +8 -0
- package/lib/v2/qq/router.js +1 -0
- package/lib/v2/qq/templates/article.art +19 -0
- package/lib/v2/rodong/maintainer.js +3 -0
- package/lib/v2/rodong/news.js +45 -0
- package/lib/v2/rodong/radar.js +13 -0
- package/lib/v2/rodong/router.js +3 -0
- package/lib/v2/sspai/bookmarks.js +41 -0
- package/lib/v2/sspai/maintainer.js +1 -0
- package/lib/v2/sspai/radar.js +6 -0
- package/lib/v2/sspai/router.js +1 -0
- package/lib/v2/stcn/index.js +25 -32
- package/lib/v2/stcn/maintainer.js +0 -3
- package/lib/v2/stcn/radar.js +4 -22
- package/lib/v2/stcn/router.js +1 -1
- package/lib/v2/swjtu/jtys/yjs.js +37 -0
- package/lib/v2/swjtu/maintainer.js +3 -0
- package/lib/v2/swjtu/radar.js +13 -0
- package/lib/v2/swjtu/router.js +3 -0
- package/lib/v2/thepaper/utils.js +50 -64
- package/lib/v2/u9a9/index.js +66 -0
- package/lib/v2/u9a9/maintainer.js +4 -0
- package/lib/v2/u9a9/radar.js +19 -0
- package/lib/v2/u9a9/router.js +4 -0
- package/lib/v2/wechat/maintainer.js +0 -1
- package/lib/v2/wechat/radar.js +0 -11
- package/lib/v2/wechat/router.js +0 -1
- package/package.json +8 -8
- package/lib/routes/cartoonmad/comic.js +0 -69
- package/lib/routes/jinshi/index.js +0 -35
- package/lib/routes/swjtu/tl/news.js +0 -35
- package/lib/routes/tencent/factcheck/index.js +0 -51
- package/lib/routes/universities/cas/mesalab/kb.js +0 -45
- package/lib/routes/universities/cas/sim/academic.js +0 -59
- package/lib/v2/mp4er/index.js +0 -83
- package/lib/v2/mp4er/maintainer.js +0 -3
- package/lib/v2/mp4er/radar.js +0 -13
- package/lib/v2/mp4er/router.js +0 -3
- package/lib/v2/wechat/wemp.js +0 -58
package/lib/router.js
CHANGED
|
@@ -590,10 +590,10 @@ router.get('/scnu/cs/match', lazyloadRouteHandler('./routes/universities/scnu/cs
|
|
|
590
590
|
// router.get('/gdut/news', lazyloadRouteHandler('./routes/universities/gdut/news'));
|
|
591
591
|
|
|
592
592
|
// 中国科学院
|
|
593
|
-
router.get('/cas/sim/academic', lazyloadRouteHandler('./routes/universities/cas/sim/academic'));
|
|
594
|
-
router.get('/cas/mesalab/kb', lazyloadRouteHandler('./routes/universities/cas/mesalab/kb'));
|
|
595
|
-
router.get('/cas/iee/kydt', lazyloadRouteHandler('./routes/universities/cas/iee/kydt'));
|
|
596
|
-
router.get('/cas/cg/:caty?', lazyloadRouteHandler('./routes/universities/cas/cg/index'));
|
|
593
|
+
// router.get('/cas/sim/academic', lazyloadRouteHandler('./routes/universities/cas/sim/academic'));
|
|
594
|
+
// router.get('/cas/mesalab/kb', lazyloadRouteHandler('./routes/universities/cas/mesalab/kb'));
|
|
595
|
+
// router.get('/cas/iee/kydt', lazyloadRouteHandler('./routes/universities/cas/iee/kydt'));
|
|
596
|
+
// router.get('/cas/cg/:caty?', lazyloadRouteHandler('./routes/universities/cas/cg/index'));
|
|
597
597
|
|
|
598
598
|
// 中国传媒大学
|
|
599
599
|
// router.get('/cuc/yz', lazyloadRouteHandler('./v2/cuc/yz'));
|
|
@@ -1007,7 +1007,7 @@ router.get('/tencentvideo/playlist/:id', lazyloadRouteHandler('./routes/tencent/
|
|
|
1007
1007
|
// router.get('/copymanga/comic/:id', lazyloadRouteHandler('./routes/copymanga/comic'));
|
|
1008
1008
|
|
|
1009
1009
|
// 動漫狂
|
|
1010
|
-
router.get('/cartoonmad/comic/:id', lazyloadRouteHandler('./routes/cartoonmad/comic'));
|
|
1010
|
+
// router.get('/cartoonmad/comic/:id', lazyloadRouteHandler('./routes/cartoonmad/comic'));
|
|
1011
1011
|
// Vol
|
|
1012
1012
|
router.get('/vol/:mode?', lazyloadRouteHandler('./routes/vol/lastupdate'));
|
|
1013
1013
|
// 咚漫
|
|
@@ -1798,7 +1798,7 @@ router.get('/im2maker/:channel?', lazyloadRouteHandler('./routes/im2maker/index'
|
|
|
1798
1798
|
router.get('/cninfo/announcement/:column/:code/:orgId/:category?/:search?', lazyloadRouteHandler('./routes/cninfo/announcement'));
|
|
1799
1799
|
|
|
1800
1800
|
// 金十数据
|
|
1801
|
-
router.get('/jinshi/index', lazyloadRouteHandler('./routes/jinshi/index'));
|
|
1801
|
+
// router.get('/jinshi/index', lazyloadRouteHandler('./routes/jinshi/index'));
|
|
1802
1802
|
|
|
1803
1803
|
// 中华人民共和国农业农村部
|
|
1804
1804
|
router.get('/gov/moa/sjzxfb', lazyloadRouteHandler('./routes/gov/moa/sjzxfb'));
|
|
@@ -2122,7 +2122,7 @@ router.get('/wineyun/:category', lazyloadRouteHandler('./routes/wineyun'));
|
|
|
2122
2122
|
router.get('/kzfeed/topic/:id', lazyloadRouteHandler('./routes/kzfeed/topic'));
|
|
2123
2123
|
|
|
2124
2124
|
// 腾讯新闻较真查证平台
|
|
2125
|
-
router.get('/factcheck', lazyloadRouteHandler('./routes/tencent/factcheck'));
|
|
2125
|
+
// router.get('/factcheck', lazyloadRouteHandler('./routes/tencent/factcheck'));
|
|
2126
2126
|
|
|
2127
2127
|
// X-MOL化学资讯平台
|
|
2128
2128
|
router.get('/x-mol/news/:tag?', lazyloadRouteHandler('./routes/x-mol/news.js'));
|
|
@@ -2631,9 +2631,6 @@ router.get('/hnust/art', lazyloadRouteHandler('./routes/universities/hnust/art/i
|
|
|
2631
2631
|
router.get('/hnust/chem', lazyloadRouteHandler('./routes/universities/hnust/chem/index'));
|
|
2632
2632
|
router.get('/hnust/graduate/:type?', lazyloadRouteHandler('./routes/universities/hnust/graduate/index'));
|
|
2633
2633
|
|
|
2634
|
-
// 西南交通大学
|
|
2635
|
-
router.get('/swjtu/tl/news', lazyloadRouteHandler('./routes/swjtu/tl/news'));
|
|
2636
|
-
|
|
2637
2634
|
// AGE动漫
|
|
2638
2635
|
// router.get('/agefans/detail/:id', lazyloadRouteHandler('./routes/agefans/detail'));
|
|
2639
2636
|
// router.get('/agefans/update', lazyloadRouteHandler('./routes/agefans/update'));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
3
|
+
|
|
4
|
+
const host = 'http://acg17.com';
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const response = await got(`${host}/wp-json/wp/v2/posts?per_page=30`);
|
|
8
|
+
const list = response.data;
|
|
9
|
+
ctx.state.data = {
|
|
10
|
+
title: `ACG17 - 全部文章`,
|
|
11
|
+
link: `${host}/blog`,
|
|
12
|
+
description: 'ACG17 - 全部文章',
|
|
13
|
+
item: list.map((item) => ({
|
|
14
|
+
title: item.title.rendered,
|
|
15
|
+
link: item.link,
|
|
16
|
+
pubDate: parseDate(item.date_gmt),
|
|
17
|
+
description: item.content.rendered,
|
|
18
|
+
})),
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
-
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
4
|
const host = 'https://support.apple.com/';
|
|
5
5
|
|
|
6
6
|
module.exports = async (ctx) => {
|
|
7
7
|
const country = ctx.params.country ?? '';
|
|
8
|
-
const link = new URL(`${country}/
|
|
8
|
+
const link = new URL(`${country}/service-programs`, host).href;
|
|
9
9
|
|
|
10
|
-
const response = await got
|
|
10
|
+
const response = await got(link);
|
|
11
11
|
const $ = cheerio.load(response.data);
|
|
12
|
-
const list = $('section.as-
|
|
12
|
+
const list = $('section.as-container-column')
|
|
13
|
+
.toArray()
|
|
14
|
+
.map((item) => {
|
|
15
|
+
item = $(item);
|
|
16
|
+
const a = item.find('.icon-chevronright').parent();
|
|
17
|
+
return {
|
|
18
|
+
title: a.text(),
|
|
19
|
+
link: new URL(a.attr('href'), host).href,
|
|
20
|
+
pubDate: parseDate(item.find('.note').text(), ['MMMM D, YYYY', 'D MMMM YYYY', 'YYYY 年 M 月 D 日']),
|
|
21
|
+
};
|
|
22
|
+
});
|
|
13
23
|
|
|
14
24
|
const out = await Promise.all(
|
|
15
|
-
list.map((item) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const itemUrl = new URL($a.attr('href'), host).href;
|
|
19
|
-
|
|
20
|
-
return ctx.cache.tryGet(itemUrl, async () => {
|
|
21
|
-
const response = await got.get(itemUrl);
|
|
25
|
+
list.map((item) =>
|
|
26
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
27
|
+
const response = await got(item.link);
|
|
22
28
|
const $$ = cheerio.load(response.data);
|
|
23
|
-
const description = $$('.main').html();
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// delete input and dropdown elements
|
|
31
|
+
$$('div.as-sn-lookup-wrapper').remove();
|
|
32
|
+
$$('div.as-dropdown-wrapper').remove();
|
|
33
|
+
item.description = $$('.main').html();
|
|
34
|
+
|
|
35
|
+
item.author = 'Apple Inc.';
|
|
36
|
+
|
|
37
|
+
return item;
|
|
38
|
+
})
|
|
39
|
+
)
|
|
33
40
|
);
|
|
34
41
|
|
|
35
42
|
ctx.state.data = {
|
|
36
|
-
title: `Apple - ${$('.
|
|
43
|
+
title: `Apple - ${$('h1.as-center').text()}`,
|
|
37
44
|
link,
|
|
38
45
|
item: out,
|
|
39
46
|
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
const { art } = require('@/utils/render');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const asyncPool = require('tiny-async-pool');
|
|
8
|
+
const config = require('@/config').value;
|
|
9
|
+
|
|
10
|
+
// Visit https://www.bdys.me for the list of domains
|
|
11
|
+
const allowDomains = ['52bdys.com', 'bde4.icu', 'bdys01.com'];
|
|
12
|
+
|
|
13
|
+
module.exports = async (ctx) => {
|
|
14
|
+
const caty = ctx.params.caty || 'all';
|
|
15
|
+
const type = ctx.params.type || 'all';
|
|
16
|
+
const area = ctx.params.area || 'all';
|
|
17
|
+
const year = ctx.params.year || 'all';
|
|
18
|
+
const order = ctx.params.order || '0';
|
|
19
|
+
|
|
20
|
+
const site = ctx.query.domain || 'bdys01.com';
|
|
21
|
+
if (!config.feature.allow_user_supply_unsafe_domain && !allowDomains.includes(new URL(`https://${site}`).hostname)) {
|
|
22
|
+
ctx.throw(403, `This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const rootUrl = `https://www.${site}`;
|
|
26
|
+
const currentUrl = `${rootUrl}/s/${caty}?${type === 'all' ? '' : '&type=' + type}${area === 'all' ? '' : '&area=' + area}${year === 'all' ? '' : '&year=' + year}&order=${order}`;
|
|
27
|
+
const response = await got({
|
|
28
|
+
method: 'get',
|
|
29
|
+
url: currentUrl,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const $ = cheerio.load(response.data);
|
|
33
|
+
|
|
34
|
+
let jsessionid = '';
|
|
35
|
+
|
|
36
|
+
const list = $('.card-body .card a')
|
|
37
|
+
.slice(0, 15)
|
|
38
|
+
.toArray()
|
|
39
|
+
.map((item) => {
|
|
40
|
+
item = $(item);
|
|
41
|
+
const link = item.attr('href').split(';jsessionid=');
|
|
42
|
+
jsessionid = link[1];
|
|
43
|
+
const next = item.next();
|
|
44
|
+
return {
|
|
45
|
+
title: next.find('h3').text(),
|
|
46
|
+
link: `${rootUrl}${link[0]}`,
|
|
47
|
+
pubDate: parseDate(next.find('.text-muted').text()),
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const headers = {
|
|
52
|
+
cookie: `JSESSIONID=${jsessionid}`,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const items = [];
|
|
56
|
+
|
|
57
|
+
for await (const data of asyncPool(1, list, (item) =>
|
|
58
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
59
|
+
const detailResponse = await got({
|
|
60
|
+
method: 'get',
|
|
61
|
+
url: item.link,
|
|
62
|
+
headers,
|
|
63
|
+
});
|
|
64
|
+
const downloadResponse = await got({
|
|
65
|
+
method: 'get',
|
|
66
|
+
url: `${rootUrl}/downloadInfo/list?mid=${item.link.split('/')[4].split('.')[0]}`,
|
|
67
|
+
headers,
|
|
68
|
+
});
|
|
69
|
+
const content = cheerio.load(detailResponse.data);
|
|
70
|
+
|
|
71
|
+
content('svg').remove();
|
|
72
|
+
const torrents = content('.download-list .list-group');
|
|
73
|
+
|
|
74
|
+
item.description = art(path.join(__dirname, 'templates/desc.art'), {
|
|
75
|
+
info: content('.row.mt-3').html(),
|
|
76
|
+
synopsis: content('#synopsis').html(),
|
|
77
|
+
links: downloadResponse.data,
|
|
78
|
+
torrents: torrents.html(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
item.pubDate = timezone(parseDate(content('.bg-purple-lt').text().replace('更新时间:', '')), +8);
|
|
82
|
+
item.guid = `${item.link}#${content('.card h1').text()}`;
|
|
83
|
+
|
|
84
|
+
item.enclosure_url = torrents.html() ? `${rootUrl}${torrents.find('a').first().attr('href')}` : downloadResponse.data.pop().url;
|
|
85
|
+
item.enclosure_type = 'application/x-bittorrent';
|
|
86
|
+
|
|
87
|
+
return item;
|
|
88
|
+
})
|
|
89
|
+
)) {
|
|
90
|
+
items.push(data);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ctx.state.data = {
|
|
94
|
+
title: '哔嘀影视',
|
|
95
|
+
link: currentUrl,
|
|
96
|
+
item: items,
|
|
97
|
+
};
|
|
98
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const bdys = {
|
|
2
|
+
_name: '哔嘀影视',
|
|
3
|
+
'.': [
|
|
4
|
+
{
|
|
5
|
+
title: '首页',
|
|
6
|
+
docs: 'https://docs.rsshub.app/multimedia.html#bi-di-ying-shi',
|
|
7
|
+
source: ['/s/:caty'],
|
|
8
|
+
target: (params, url) => {
|
|
9
|
+
const searchParams = new URL(url).searchParams;
|
|
10
|
+
return `/bdys/${params.caty}/${searchParams.get('type') || 'all'}/${searchParams.get('area') || 'all'}/${searchParams.get('year') || 'all'}/${searchParams.get('order') || '0'}`;
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
'52bdys.com': bdys,
|
|
18
|
+
'bde4.icu': bdys,
|
|
19
|
+
'bdys01.com': bdys,
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{{ if info }}
|
|
2
|
+
{{@ info }}<br>
|
|
3
|
+
{{ /if }}
|
|
4
|
+
|
|
5
|
+
{{ if synopsis }}
|
|
6
|
+
{{@ synopsis }}<br>
|
|
7
|
+
{{ /if}}
|
|
8
|
+
|
|
9
|
+
{{ if links }}
|
|
10
|
+
<div><b>下载地址:</b>
|
|
11
|
+
{{ each links link }}
|
|
12
|
+
<div class="item"><div class="content">{{ link.downloadCategory.name }}: <a href="{{ link.url }}">{{ link.url }}</a></div></div>
|
|
13
|
+
{{ /each }}
|
|
14
|
+
</div>
|
|
15
|
+
{{ /if }}
|
|
16
|
+
|
|
17
|
+
{{ if torrents }}
|
|
18
|
+
<div><b>种子列表:</b>
|
|
19
|
+
{{@ torrents }}
|
|
20
|
+
</div>
|
|
21
|
+
{{ /if }}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const got = require('@/utils/got');
|
|
2
|
+
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
|
|
5
|
+
const baseUrl = 'https://www.bjsk.org.cn';
|
|
6
|
+
|
|
7
|
+
module.exports = async (ctx) => {
|
|
8
|
+
const { path = 'newslist-1486-0-0' } = ctx.params;
|
|
9
|
+
const link = `${baseUrl}/${path}.html`;
|
|
10
|
+
const { data: response } = await got(link, {
|
|
11
|
+
https: {
|
|
12
|
+
rejectUnauthorized: false,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
const $ = cheerio.load(response);
|
|
16
|
+
|
|
17
|
+
const list = $('.article-list a')
|
|
18
|
+
.toArray()
|
|
19
|
+
.map((item) => {
|
|
20
|
+
item = $(item);
|
|
21
|
+
return {
|
|
22
|
+
title: item.attr('title'),
|
|
23
|
+
link: `${baseUrl}${item.attr('href')}`,
|
|
24
|
+
pubDate: parseDate(item.find('.time').text(), 'YYYY.MM.DD'),
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const items = await Promise.all(
|
|
29
|
+
list.map((item) =>
|
|
30
|
+
ctx.cache.tryGet(item.link, async () => {
|
|
31
|
+
const { data: response } = await got(item.link, {
|
|
32
|
+
https: {
|
|
33
|
+
rejectUnauthorized: false,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const $ = cheerio.load(response);
|
|
37
|
+
item.description = $('.article-main').html();
|
|
38
|
+
item.author = $('.info')
|
|
39
|
+
.text()
|
|
40
|
+
.match(/作者:(.*)\s+来源/)[1];
|
|
41
|
+
return item;
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
ctx.state.data = {
|
|
47
|
+
title: $('head title').text(),
|
|
48
|
+
link,
|
|
49
|
+
image: 'https://www.bjsk.org.cn/favicon.ico',
|
|
50
|
+
item: items,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'bjsk.org.cn': {
|
|
3
|
+
_name: '北京社科网',
|
|
4
|
+
'.': [
|
|
5
|
+
{
|
|
6
|
+
title: '通用',
|
|
7
|
+
docs: 'https://docs.rsshub.app/government.html#bei-jing-she-ke-wang',
|
|
8
|
+
source: ['/*'],
|
|
9
|
+
target: (_, url) => `/bjsk/${url.split('/')[3].replace('.html', '')}`,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const cheerio = require('cheerio');
|
|
2
|
+
const got = require('@/utils/got');
|
|
3
|
+
const iconv = require('iconv-lite');
|
|
4
|
+
const { art } = require('@/utils/render');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const baseUrl = 'https://www.cartoonmad.com';
|
|
8
|
+
const KEY = '5e585';
|
|
9
|
+
|
|
10
|
+
const load = (id, { chapter, pages }) => {
|
|
11
|
+
let description = '';
|
|
12
|
+
for (let page = 1; page <= pages; page++) {
|
|
13
|
+
const url = `${baseUrl}/${KEY}/${id}/${chapter}/${String(page).padStart(3, '0')}.jpg`;
|
|
14
|
+
description += art(path.join(__dirname, 'templates/chapter.art'), {
|
|
15
|
+
url,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return description;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const getChapters = (id, list, tryGet) =>
|
|
22
|
+
Promise.all(
|
|
23
|
+
list.map((item) =>
|
|
24
|
+
tryGet(item.link, () => {
|
|
25
|
+
item.description = load(id, item);
|
|
26
|
+
|
|
27
|
+
return item;
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
module.exports = async (ctx) => {
|
|
33
|
+
const { id } = ctx.params;
|
|
34
|
+
const link = `${baseUrl}/comic/${id}`;
|
|
35
|
+
|
|
36
|
+
const { data } = await got(link, {
|
|
37
|
+
responseType: 'buffer',
|
|
38
|
+
headers: {
|
|
39
|
+
Referer: 'https://www.cartoonmad.com/',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
const content = iconv.decode(data, 'big5');
|
|
43
|
+
const $ = cheerio.load(content);
|
|
44
|
+
|
|
45
|
+
const bookIntro = $('#info').eq(0).find('td').text().trim();
|
|
46
|
+
// const coverImgSrc = $('.cover').parent().find('img').attr('src');
|
|
47
|
+
const list = $('#info')
|
|
48
|
+
.eq(1)
|
|
49
|
+
.find('a')
|
|
50
|
+
.toArray()
|
|
51
|
+
.map((item) => {
|
|
52
|
+
item = $(item);
|
|
53
|
+
return {
|
|
54
|
+
title: item.text(),
|
|
55
|
+
link: `${baseUrl}${item.attr('href')}`,
|
|
56
|
+
chapter: item.text().match(/\d+/)[0],
|
|
57
|
+
pages: item.next('font').text().match(/\d+/)[0],
|
|
58
|
+
};
|
|
59
|
+
})
|
|
60
|
+
.reverse();
|
|
61
|
+
|
|
62
|
+
const chapters = await getChapters(id, list, ctx.cache.tryGet);
|
|
63
|
+
|
|
64
|
+
ctx.state.data = {
|
|
65
|
+
title: $('head title').text(),
|
|
66
|
+
link,
|
|
67
|
+
description: bookIntro,
|
|
68
|
+
item: chapters,
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<img src="{{ url }}"><br>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
3
5
|
|
|
4
6
|
module.exports = async (ctx) => {
|
|
5
7
|
ctx.params.caty = ctx.params.caty || 'zh';
|
|
6
8
|
|
|
7
9
|
const rootUrl = 'https://www.cas.cn';
|
|
8
|
-
const currentUrl = `${rootUrl}/cg/${ctx.params.caty}
|
|
10
|
+
const currentUrl = `${rootUrl}/cg/${ctx.params.caty}/`;
|
|
9
11
|
const response = await got({
|
|
10
12
|
method: 'get',
|
|
11
13
|
url: currentUrl,
|
|
@@ -35,7 +37,7 @@ module.exports = async (ctx) => {
|
|
|
35
37
|
const content = cheerio.load(detailResponse.data);
|
|
36
38
|
|
|
37
39
|
item.description = content('.TRS_Editor').html();
|
|
38
|
-
item.pubDate =
|
|
40
|
+
item.pubDate = timezone(parseDate(content('meta[name="PubDate"]').attr('content')), 8);
|
|
39
41
|
|
|
40
42
|
return item;
|
|
41
43
|
})
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const got = require('@/utils/got');
|
|
2
2
|
const cheerio = require('cheerio');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
3
5
|
|
|
4
6
|
module.exports = async (ctx) => {
|
|
5
|
-
const rootUrl = 'http://www.iee.cas.cn/xwzx/kydt';
|
|
7
|
+
const rootUrl = 'http://www.iee.cas.cn/xwzx/kydt/';
|
|
6
8
|
const response = await got({
|
|
7
9
|
method: 'get',
|
|
8
10
|
url: rootUrl,
|
|
@@ -11,15 +13,15 @@ module.exports = async (ctx) => {
|
|
|
11
13
|
const $ = cheerio.load(response.data);
|
|
12
14
|
const list = $('li.entry .entry-content-title')
|
|
13
15
|
.slice(0, 15)
|
|
14
|
-
.
|
|
16
|
+
.toArray()
|
|
17
|
+
.map((item) => {
|
|
15
18
|
item = $(item);
|
|
16
19
|
const a = item.find('a');
|
|
17
20
|
return {
|
|
18
21
|
title: a.text(),
|
|
19
22
|
link: a.attr('href'),
|
|
20
23
|
};
|
|
21
|
-
})
|
|
22
|
-
.get();
|
|
24
|
+
});
|
|
23
25
|
|
|
24
26
|
const items = await Promise.all(
|
|
25
27
|
list.map((item) =>
|
|
@@ -31,7 +33,7 @@ module.exports = async (ctx) => {
|
|
|
31
33
|
const content = cheerio.load(detailResponse.data);
|
|
32
34
|
|
|
33
35
|
item.description = content('.article-content').html();
|
|
34
|
-
item.pubDate =
|
|
36
|
+
item.pubDate = timezone(parseDate(content('time').text().split(':')[1]), 8);
|
|
35
37
|
|
|
36
38
|
return item;
|
|
37
39
|
})
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const cherrio = require('cheerio');
|
|
2
|
+
const got = require('@/utils/got');
|
|
3
|
+
const { parseDate } = require('@/utils/parse-date');
|
|
4
|
+
const timezone = require('@/utils/timezone');
|
|
5
|
+
|
|
6
|
+
module.exports = async (ctx) => {
|
|
7
|
+
const homepage = 'https://www.mesalab.cn';
|
|
8
|
+
const url = `${homepage}/f/article/articleList?pageNo=1&pageSize=15&createTimeSort=DESC`;
|
|
9
|
+
const response = await got(url);
|
|
10
|
+
|
|
11
|
+
const $ = cherrio.load(response.data);
|
|
12
|
+
const articles = $('.aw-item').toArray();
|
|
13
|
+
|
|
14
|
+
const items = await Promise.all(
|
|
15
|
+
articles.map((item) => {
|
|
16
|
+
const a = $(item).find('a').first();
|
|
17
|
+
const title = a.text().trim();
|
|
18
|
+
const link = `${homepage}${a.attr('href')}`;
|
|
19
|
+
|
|
20
|
+
return ctx.cache.tryGet(link, async () => {
|
|
21
|
+
const result = await got(link);
|
|
22
|
+
const $ = cherrio.load(result.data);
|
|
23
|
+
return {
|
|
24
|
+
title,
|
|
25
|
+
author: $('.user_name').text(),
|
|
26
|
+
pubDate: timezone(parseDate($('.link_postdate').text().replace(/\s+/g, ' ')), 8),
|
|
27
|
+
description: $('#article_content').html() + ($('.attachment').length ? $('.attachment').html() : ''),
|
|
28
|
+
link,
|
|
29
|
+
category: $('.category .category_r span').first().text(),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
ctx.state.data = {
|
|
36
|
+
title: 'MESA 知识库',
|
|
37
|
+
description: '中国科学院信息工程研究所 第二研究室 处理架构组',
|
|
38
|
+
link: url,
|
|
39
|
+
item: items,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'cas.cn': {
|
|
3
|
+
_name: '中国科学院',
|
|
4
|
+
www: [
|
|
5
|
+
{
|
|
6
|
+
title: '成果转化',
|
|
7
|
+
docs: 'https://docs.rsshub.app/university.html#zhong-guo-ke-xue-yuan',
|
|
8
|
+
source: ['/cg/:caty?'],
|
|
9
|
+
target: '/cas/cg/:caty?',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
'www.sim': [
|
|
13
|
+
{
|
|
14
|
+
title: '上海微系统与信息技术研究所 - 科技进展',
|
|
15
|
+
docs: 'https://docs.rsshub.app/university.html#zhong-guo-ke-xue-yuan',
|
|
16
|
+
source: ['/xwzx2016/kyjz/', '/'],
|
|
17
|
+
target: '/cas/sim/kyjz',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
'www.iee': [
|
|
21
|
+
{
|
|
22
|
+
title: '电工研究所 科研动态',
|
|
23
|
+
docs: 'https://docs.rsshub.app/university.html#zhong-guo-ke-xue-yuan',
|
|
24
|
+
source: ['/xwzx/kydt', '/'],
|
|
25
|
+
target: '/cas/iee/kydt',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
'mesalab.cn': {
|
|
30
|
+
_name: '中国科学院',
|
|
31
|
+
www: [
|
|
32
|
+
{
|
|
33
|
+
title: '信息工程研究所 第二研究室 处理架构组 知识库',
|
|
34
|
+
docs: 'https://docs.rsshub.app/university.html#zhong-guo-ke-xue-yuan',
|
|
35
|
+
source: ['/f/article/articleList', '/'],
|
|
36
|
+
target: '/cas/mesalab/kb',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
};
|