rsshub 1.0.0-master.ec6df29 → 1.0.0-master.ec7b5d6

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.
Files changed (62) hide show
  1. package/lib/config.js +3 -0
  2. package/lib/v2/1point3acres/maintainer.js +2 -2
  3. package/lib/v2/amazon/maintainer.js +1 -1
  4. package/lib/v2/arcteryx/maintainer.js +3 -3
  5. package/lib/v2/bellroy/maintainer.js +1 -1
  6. package/lib/v2/cste/radar.js +1 -1
  7. package/lib/v2/dahecube/radar.js +40 -4
  8. package/lib/v2/fosshub/radar.js +1 -1
  9. package/lib/v2/gov/maintainer.js +2 -0
  10. package/lib/v2/gov/radar.js +27 -2
  11. package/lib/v2/gov/router.js +2 -0
  12. package/lib/v2/gov/safe/business.js +8 -0
  13. package/lib/v2/gov/safe/complaint.js +8 -0
  14. package/lib/v2/gov/safe/templates/message.art +25 -0
  15. package/lib/v2/gov/safe/util.js +87 -0
  16. package/lib/v2/ifi-audio/maintainer.js +1 -1
  17. package/lib/v2/imiker/jinghua.js +87 -0
  18. package/lib/v2/imiker/maintainer.js +3 -0
  19. package/lib/v2/imiker/radar.js +13 -0
  20. package/lib/v2/imiker/router.js +3 -0
  21. package/lib/v2/imiker/templates/description.art +32 -0
  22. package/lib/v2/inoreader/maintainer.js +1 -1
  23. package/lib/v2/leetcode/maintainer.js +1 -1
  24. package/lib/v2/lightnovel/lightNovel.js +62 -0
  25. package/lib/v2/lightnovel/maintainer.js +3 -0
  26. package/lib/v2/lightnovel/radar.js +13 -0
  27. package/lib/v2/lightnovel/router.js +3 -0
  28. package/lib/v2/magazinelib/maintainer.js +1 -1
  29. package/lib/v2/mihoyo/radar.js +1 -1
  30. package/lib/v2/missav/maintainer.js +3 -0
  31. package/lib/v2/missav/new.js +36 -0
  32. package/lib/v2/missav/radar.js +13 -0
  33. package/lib/v2/missav/router.js +3 -0
  34. package/lib/v2/missav/templates/preview.art +3 -0
  35. package/lib/v2/ncu/radar.js +1 -1
  36. package/lib/v2/nmtv/radar.js +1 -1
  37. package/lib/v2/oo-software/radar.js +1 -1
  38. package/lib/v2/patagonia/maintainer.js +1 -1
  39. package/lib/v2/readhub/daily.js +43 -0
  40. package/lib/v2/readhub/index.js +19 -72
  41. package/lib/v2/readhub/maintainer.js +1 -0
  42. package/lib/v2/readhub/radar.js +6 -0
  43. package/lib/v2/readhub/router.js +1 -0
  44. package/lib/v2/readhub/util.js +69 -0
  45. package/lib/v2/routledge/book-series.js +78 -0
  46. package/lib/v2/routledge/maintainer.js +3 -0
  47. package/lib/v2/routledge/radar.js +13 -0
  48. package/lib/v2/routledge/router.js +3 -0
  49. package/lib/v2/routledge/templates/description.art +7 -0
  50. package/lib/v2/snowpeak/maintainer.js +1 -1
  51. package/lib/v2/sony/maintainer.js +1 -1
  52. package/lib/v2/sse/disclosure.js +4 -3
  53. package/lib/v2/techcrunch/maintainer.js +1 -1
  54. package/lib/v2/theatlantic/maintainer.js +1 -1
  55. package/lib/v2/thepaper/radar.js +2 -2
  56. package/lib/v2/wechat/maintainer.js +1 -1
  57. package/lib/v2/xsijishe/maintainer.js +1 -0
  58. package/lib/v2/xsijishe/radar.js +12 -0
  59. package/lib/v2/xsijishe/rank.js +60 -0
  60. package/lib/v2/xsijishe/router.js +1 -0
  61. package/lib/v2/zagg/maintainer.js +1 -1
  62. package/package.json +2 -2
package/lib/config.js CHANGED
@@ -219,6 +219,9 @@ const calculateValue = () => {
219
219
  lastfm: {
220
220
  api_key: envs.LASTFM_API_KEY,
221
221
  },
222
+ lightnovel: {
223
+ cookie: envs.SECURITY_KEY,
224
+ },
222
225
  manhuagui: {
223
226
  cookie: envs.MHGUI_COOKIE,
224
227
  },
@@ -1,8 +1,8 @@
1
1
  module.exports = {
2
2
  '/blog/:category?': ['nczitzk'],
3
3
  '/category/:id?/:type?/:order?': ['nczitzk'],
4
- '/offer/:year?/:major?/:school?': ['NavePnow'],
5
- '/post/:type?/:order?': ['NavePnow', 'DIYgod', 'nczitzk'],
4
+ '/offer/:year?/:major?/:school?': ['EthanWng97'],
5
+ '/post/:type?/:order?': ['EthanWng97', 'DIYgod', 'nczitzk'],
6
6
  '/section/:id?/:type?/:order?': ['nczitzk'],
7
7
  '/user/:id/posts': ['Maecenas'],
8
8
  '/user/:id/threads': ['Maecenas'],
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
2
  '/awsblogs/:locale?': ['HankChow'],
3
- '/kindle/software-updates': ['NavePnow'],
3
+ '/kindle/software-updates': ['EthanWng97'],
4
4
  };
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- '/new-arrivals/:country/:gender': ['NavePnow'],
3
- '/outlet/:country/:gender': ['NavePnow'],
4
- '/regear/new-arrivals': ['NavePnow'],
2
+ '/new-arrivals/:country/:gender': ['EthanWng97'],
3
+ '/outlet/:country/:gender': ['EthanWng97'],
4
+ '/regear/new-arrivals': ['EthanWng97'],
5
5
  };
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/new-releases': ['NavePnow'],
2
+ '/new-releases': ['EthanWng97'],
3
3
  };
@@ -6,7 +6,7 @@ module.exports = {
6
6
  title: '栏目',
7
7
  docs: 'https://docs.rsshub.app/routes/study#zhong-guo-ji-shu-jing-ji-xue-hui-lan-mu',
8
8
  source: ['/site/term', '/'],
9
- target: (params, url) => `/cste/${new URL(url).match(/site\/term\/(\d+)\.html/)[1]}`,
9
+ target: (params, url) => `/cste/${url.match(/site\/term\/(\d+)\.html/)[1]}`,
10
10
  },
11
11
  ],
12
12
  },
@@ -1,5 +1,3 @@
1
- const utils = require('./utils');
2
-
3
1
  module.exports = {
4
2
  'dahecube.com': {
5
3
  _name: '大河财立方',
@@ -9,9 +7,47 @@ module.exports = {
9
7
  docs: 'https://docs.rsshub.app/routes/new-media#da-he-cai-li-fang',
10
8
  source: ['/channel.html', '/index.html'],
11
9
  target: (_, url) => {
12
- const id = new URL(url).searchParams.get('recid');
10
+ const id = parseInt(new URL(url).searchParams.get('recid'));
13
11
  let type = 'recommend';
14
- Object.entries(utils.TYPE).forEach(([key, value]) => {
12
+ const TypeMap = {
13
+ recommend: {
14
+ name: '推荐',
15
+ id: 1,
16
+ },
17
+ history: {
18
+ name: '党史',
19
+ id: 37,
20
+ },
21
+ stock: {
22
+ name: '豫股',
23
+ id: 2,
24
+ },
25
+ business: {
26
+ name: '财经',
27
+ id: 4,
28
+ },
29
+ education: {
30
+ name: '投教',
31
+ id: 36,
32
+ },
33
+ finance: {
34
+ name: '金融',
35
+ id: 5,
36
+ },
37
+ science: {
38
+ name: '科创',
39
+ id: 19,
40
+ },
41
+ invest: {
42
+ name: '投融',
43
+ id: 29,
44
+ },
45
+ column: {
46
+ name: '专栏',
47
+ id: 33,
48
+ },
49
+ };
50
+ Object.entries(TypeMap).forEach(([key, value]) => {
15
51
  if (value.id === id) {
16
52
  type = key;
17
53
  }
@@ -6,7 +6,7 @@ module.exports = {
6
6
  title: 'Software Update',
7
7
  docs: 'https://docs.rsshub.app/routes/program-update#fosshub-software-update',
8
8
  source: ['/'],
9
- target: (params, url) => `/fosshub/${new URL(url).match(/\/(.*?)\.html$/)[1]}`,
9
+ target: (params, url) => `/fosshub/${url.match(/\/(.*?)\.html$/)[1]}`,
10
10
  },
11
11
  ],
12
12
  },
@@ -49,6 +49,8 @@ module.exports = {
49
49
  '/pbc/tradeAnnouncement': ['nczitzk'],
50
50
  '/pbc/zcyj': ['Fatpandac'],
51
51
  '/samr/xgzlyhd/:category?/:department?': ['nczitzk'],
52
+ '/safe/bussiness/:site?': ['nczitzk'],
53
+ '/safe/complaint/:site?': ['nczitzk'],
52
54
  '/sasac/:path+': ['TonyRL'],
53
55
  '/stats/:path+': ['bigfei', 'nczitzk'],
54
56
  '/zhengce/govall/:advance?': ['ciaranchen'],
@@ -424,7 +424,7 @@ module.exports = {
424
424
  title: '新闻中心',
425
425
  docs: 'https://docs.rsshub.app/routes/government#zhong-guo-hu-lian-wang-luo-xin-xi-zhong-xin-xin-wen-zhong-xin',
426
426
  source: ['/'],
427
- target: (params, url) => `/gov/cnnic/${new URL(url).match(/cnnic\.net\.cn\/(.*)/)[1]}`,
427
+ target: (params, url) => `/gov/cnnic/${url.match(/cnnic\.net\.cn\/(.*)/)[1]}`,
428
428
  },
429
429
  ],
430
430
  },
@@ -1185,6 +1185,31 @@ module.exports = {
1185
1185
  },
1186
1186
  ],
1187
1187
  },
1188
+ 'safe.gov.cn': {
1189
+ _name: '国家外汇管理局',
1190
+ '.': [
1191
+ {
1192
+ title: '业务咨询',
1193
+ docs: 'https://docs.rsshub.app/routes/government#guo-jia-wai-hui-guan-li-ju-ye-wu-zi-xun',
1194
+ source: ['/:site/ywzx/index.html'],
1195
+ target: (params) => {
1196
+ const site = params.site;
1197
+
1198
+ return `/gov/safe/business/${site}`;
1199
+ },
1200
+ },
1201
+ {
1202
+ title: '投诉建议',
1203
+ docs: 'https://docs.rsshub.app/routes/government#guo-jia-wai-hui-guan-li-ju-tou-su-jian-yi',
1204
+ source: ['/:site/tsjy/index.html'],
1205
+ target: (params) => {
1206
+ const site = params.site;
1207
+
1208
+ return `/gov/safe/complaint/${site}`;
1209
+ },
1210
+ },
1211
+ ],
1212
+ },
1188
1213
  'sasac.gov.cn': {
1189
1214
  _name: '国务院国有资产监督管理委员会',
1190
1215
  '.': [
@@ -1230,7 +1255,7 @@ module.exports = {
1230
1255
  title: '上海市药品监督管理局',
1231
1256
  docs: 'https://docs.rsshub.app/routes/government#shang-hai-shi-ren-min-zheng-fu-shang-hai-shi-yao-pin-jian-du-guan-li-ju',
1232
1257
  source: ['/'],
1233
- target: (params, url) => `/gov/shanghai/yjj/${new URL(url).match(/yjj\.sh\.gov\.cn\/(.*)\/index.html/)[1]}`,
1258
+ target: (params, url) => `/gov/shanghai/yjj/${url.match(/yjj\.sh\.gov\.cn\/(.*)\/index.html/)[1]}`,
1234
1259
  },
1235
1260
  ],
1236
1261
  'wsbs.wgj': [
@@ -41,6 +41,8 @@ module.exports = function (router) {
41
41
  router.get('/pbc/gzlw', require('./pbc/gzlw'));
42
42
  router.get('/pbc/tradeAnnouncement', require('./pbc/tradeAnnouncement'));
43
43
  router.get('/pbc/zcyj', require('./pbc/zcyj'));
44
+ router.get('/safe/business/:site?', require('./safe/business'));
45
+ router.get('/safe/complaint/:site?', require('./safe/complaint'));
44
46
  router.get('/samr/xgzlyhd/:category?/:department?', require('./samr/xgzlyhd'));
45
47
  router.get('/sasac/:path+', require('./sasac/generic'));
46
48
  router.get(/stats(\/[\w/-]+)?/, require('./stats'));
@@ -0,0 +1,8 @@
1
+ const { processZxfkItems } = require('./util');
2
+
3
+ module.exports = async (ctx) => {
4
+ const { site = 'beijing' } = ctx.params;
5
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 3;
6
+
7
+ ctx.state.data = await processZxfkItems(site, 'ywzx', limit);
8
+ };
@@ -0,0 +1,8 @@
1
+ const { processZxfkItems } = require('./util');
2
+
3
+ module.exports = async (ctx) => {
4
+ const { site = 'beijing' } = ctx.params;
5
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 5;
6
+
7
+ ctx.state.data = await processZxfkItems(site, 'tsjy', limit);
8
+ };
@@ -0,0 +1,25 @@
1
+ <table>
2
+ <tbody>
3
+ <tr>
4
+ <th>留言人</th>
5
+ <th>留言内容</th>
6
+ <th>留言时间</th>
7
+ </tr>
8
+ {{ if message }}
9
+ {{ set object = message }}
10
+ <tr>
11
+ <td>{{ object.author }}</td>
12
+ <td>{{ object.content }}</td>
13
+ <td>{{ object.date }}</td>
14
+ </tr>
15
+ {{ /if }}
16
+ {{ if reply }}
17
+ {{ set object = reply }}
18
+ <tr style="color: #0069ae;">
19
+ <td>{{ object.author }}</td>
20
+ <td>{{ object.content }}</td>
21
+ <td>{{ object.date }}</td>
22
+ </tr>
23
+ {{ /if }}
24
+ </tbody>
25
+ </table>
@@ -0,0 +1,87 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+
7
+ const rootUrl = 'https://www.safe.gov.cn';
8
+
9
+ const zxfkCategoryApis = {
10
+ // 业务咨询 https://www.safe.gov.cn/<site>/ywzx/index.html
11
+ ywzx: 'www/busines/businessQuery?siteid=',
12
+
13
+ // 投诉建议 https://www.safe.gov.cn/<site>/tsjy/index.html
14
+ tsjy: 'www/complaint/complaintQuery?siteid=',
15
+ };
16
+
17
+ const processZxfkItems = async (site = 'beijing', category = 'ywzx', limit = '3') => {
18
+ const apiUrl = new URL(`${zxfkCategoryApis[category]}${site}`, rootUrl).href;
19
+ const currentUrl = new URL(`${site}/${category}/index.html`, rootUrl).href;
20
+
21
+ const { data: response } = await got(apiUrl);
22
+
23
+ const $ = cheerio.load(response);
24
+
25
+ const items = $('#complaint')
26
+ .slice(0, limit)
27
+ .toArray()
28
+ .map((item) => {
29
+ item = $(item);
30
+
31
+ const spans = item.find('span[objid]');
32
+
33
+ const message = {
34
+ author: spans.first().text().replace(/:$/, ''),
35
+ content: spans.eq(1).text(),
36
+ date: spans.eq(2).text(),
37
+ };
38
+
39
+ const reply = {
40
+ author: spans.eq(3).text().replace(/:$/, ''),
41
+ content: spans.eq(4).text(),
42
+ date: spans.eq(5).text(),
43
+ };
44
+
45
+ return {
46
+ title: `${message.author}: ${message.content}`,
47
+ link: new URL(item.find('.title').prop('href'), rootUrl).href,
48
+ description: art(path.join(__dirname, 'templates/message.art'), {
49
+ message,
50
+ reply,
51
+ }),
52
+ author: `${message.author}/${reply.author}`,
53
+ guid: item.find('.id').text(),
54
+ pubDate: parseDate(message.date),
55
+ updated: parseDate(reply.date),
56
+ };
57
+ });
58
+
59
+ const { data: currentResponse } = await got(currentUrl);
60
+
61
+ const content = cheerio.load(currentResponse);
62
+
63
+ const author = content('meta[name="ColumnName"]').prop('content');
64
+ const subtitle = content('meta[name="ColumnType"]').prop('content');
65
+
66
+ const imagePath = 'safe/templateresource/372b1dfdab204181b9b4f943a8e926a6';
67
+ const image = new URL(`${imagePath}/logo_06.png`, rootUrl).href;
68
+ const icon = new URL(`${imagePath}/safe.ico`, rootUrl).href;
69
+
70
+ return {
71
+ item: items,
72
+ title: `${author} - ${subtitle}`,
73
+ link: currentUrl,
74
+ description: content('meta[name="ColumnDescription"]').prop('content'),
75
+ language: 'zh',
76
+ image,
77
+ icon,
78
+ logo: icon,
79
+ subtitle,
80
+ author,
81
+ allowEmpty: true,
82
+ };
83
+ };
84
+
85
+ module.exports = {
86
+ processZxfkItems,
87
+ };
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/download/:val/:id': ['NavePnow'],
2
+ '/download/:val/:id': ['EthanWng97'],
3
3
  };
@@ -0,0 +1,87 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+
7
+ module.exports = async (ctx) => {
8
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 50;
9
+
10
+ const rootUrl = 'https://ask.imiker.com';
11
+ const apiUrl = new URL('explore/main/list/', rootUrl).href;
12
+ const currentUrl = new URL(``, rootUrl).href;
13
+
14
+ const { data: response } = await got(apiUrl, {
15
+ searchParams: {
16
+ page: 1,
17
+ page_size: limit,
18
+ type: 'jinghua',
19
+ types: 'json',
20
+ },
21
+ });
22
+
23
+ let items = response.slice(0, limit).map((item) => ({
24
+ title: item.question_content,
25
+ link: new URL(`question/${item.id}`, rootUrl).href,
26
+ description: art(path.join(__dirname, 'templates/description.art'), {
27
+ headImage: item.headimage,
28
+ author: item.nick_name,
29
+ question: item.question_detail,
30
+ }),
31
+ author: item.nick_name,
32
+ guid: `imiker-${item.id}`,
33
+ pubDate: parseDate(item.add_time_timestamp * 1000),
34
+ upvotes: item.count?.vote_count ?? 0,
35
+ comments: item.count?.answer_count ?? 0,
36
+ }));
37
+
38
+ items = await Promise.all(
39
+ items.map((item) =>
40
+ ctx.cache.tryGet(item.link, async () => {
41
+ const { data: detailResponse } = await got(item.link);
42
+
43
+ const content = cheerio.load(detailResponse);
44
+
45
+ content('h5.img-for-lazyload').each((_, e) => {
46
+ const image = content(e).find('img');
47
+
48
+ content(e).replaceWith(
49
+ art(path.join(__dirname, 'templates/description.art'), {
50
+ image: {
51
+ src: image.prop('data-original'),
52
+ alt: image.prop('alt'),
53
+ width: image.prop('data-width'),
54
+ height: image.prop('data-height'),
55
+ },
56
+ })
57
+ );
58
+ });
59
+
60
+ item.title = content('div.title h1').text();
61
+ item.description += art(path.join(__dirname, 'templates/description.art'), {
62
+ description: content('div#warp').html(),
63
+ });
64
+ item.author = content('div.name').text();
65
+
66
+ return item;
67
+ })
68
+ )
69
+ );
70
+
71
+ const author = '米课圈';
72
+ const description = '精华';
73
+ const icon = new URL('favicon.ico', rootUrl).href;
74
+
75
+ ctx.state.data = {
76
+ item: items,
77
+ title: `${author} - ${description}`,
78
+ link: currentUrl,
79
+ description,
80
+ language: 'zh',
81
+ icon,
82
+ logo: icon,
83
+ subtitle: description,
84
+ author,
85
+ allowEmpty: true,
86
+ };
87
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/ask/jinghua': ['nczitzk'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'imiker.com': {
3
+ _name: '米课',
4
+ '.': [
5
+ {
6
+ title: '米课圈精华',
7
+ docs: 'https://docs.rsshub.app/routes/new-media#mi-ke-mi-ke-quan-jing-hua',
8
+ source: ['/explore/find'],
9
+ target: '/imiker/ask/jinghua',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/ask/jinghua', require('./jinghua'));
3
+ };
@@ -0,0 +1,32 @@
1
+ {{ if image?.src }}
2
+ <figure>
3
+ <img
4
+ {{ if image.alt }}
5
+ alt="{{ image.alt }}"
6
+ {{ /if }}
7
+ {{ if image.width }}
8
+ alt="{{ image.width }}"
9
+ {{ /if }}
10
+ {{ if image.height }}
11
+ alt="{{ image.height }}"
12
+ {{ /if }}
13
+ src="{{ image.src }}">
14
+ </figure>
15
+ {{ /if }}
16
+
17
+ {{ if headImage }}
18
+ <figure>
19
+ <img src="{{ headImage }}">
20
+ {{ if author }}
21
+ <figcaption>{{ author }}</figcaption>
22
+ {{ /if }}
23
+ </figure>
24
+ {{ /if }}
25
+
26
+ {{ if question }}
27
+ <blockquote>{{ question }}</blockquote>
28
+ {{ /if }}
29
+
30
+ {{ if description }}
31
+ {{@ description }}
32
+ {{ /if }}
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
2
  '/html_clip/:user/:tag/:num?': ['BeautyyuYanli'],
3
- '/rss/:user/:tag': ['NavePnow'],
3
+ '/rss/:user/:tag': ['EthanWng97'],
4
4
  };
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  '/articles': ['LogicJake'],
3
- '/dailyquestion/:lang': ['NavePnow'],
3
+ '/dailyquestion/:lang': ['EthanWng97'],
4
4
  '/dailyquestion/solution/:lang': ['woaidouya123'],
5
5
  '/submission/:country/:user': ['NathanDai'],
6
6
  };
@@ -0,0 +1,62 @@
1
+ const { parseDate } = require('@/utils/parse-date');
2
+ const got = require('@/utils/got');
3
+ const cheerio = require('cheerio');
4
+ const config = require('@/config').value;
5
+
6
+ module.exports = async (ctx) => {
7
+ const baseUrl = 'https://www.lightnovel.us';
8
+ const { type, keywords, security_key = config.lightnovel.cookie } = ctx.params;
9
+ const { data: response } = await got({
10
+ method: 'POST',
11
+ url: `${baseUrl}/proxy/api/search/search-result`,
12
+ headers: {
13
+ // 此处是为什么
14
+ 'User-Agent': config.trueUA,
15
+ },
16
+ json: {
17
+ is_encrypted: 0,
18
+ platform: 'pc',
19
+ client: 'web',
20
+ sign: '',
21
+ gz: 0,
22
+ d: {
23
+ q: keywords,
24
+ type: 0,
25
+ page: 1,
26
+ security_key,
27
+ },
28
+ },
29
+ });
30
+ const list = response.data.articles
31
+ .map((item) => ({
32
+ title: item.title,
33
+ link: `${baseUrl}/cn/detail/${item.aid}`,
34
+ pubDate: parseDate(item.time),
35
+ author: item.author,
36
+ }))
37
+ .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 5);
38
+
39
+ const items = await Promise.all(
40
+ list.map((item) =>
41
+ ctx.cache.tryGet(item.link, async () => {
42
+ const { data: response } = await got({
43
+ method: 'GET',
44
+ url: item.link,
45
+ headers: {
46
+ 'User-Agent': config.trueUA,
47
+ },
48
+ });
49
+
50
+ const $ = cheerio.load(response);
51
+ item.description = $('#article-main-contents').html();
52
+ return item;
53
+ })
54
+ )
55
+ );
56
+
57
+ ctx.state.data = {
58
+ title: `轻之国度-追踪${keywords}更新-${type} `,
59
+ link: baseUrl,
60
+ item: items,
61
+ };
62
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/:keywords/:security_key?': ['nightmare-mio'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'lightNovel.us': {
3
+ _name: '轻之国度',
4
+ '.': [
5
+ {
6
+ title: '文章更新阅读',
7
+ docs: 'https://docs.rsshub.app/routes/anime#qing-zhi-guo-du',
8
+ source: '/',
9
+ target: '/lightnovel/:keywords/:security_key',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/:keywords/:security_key?', require('./lightNovel'));
3
+ };
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/latest-magazine/:query?': ['NavePnow'],
2
+ '/latest-magazine/:query?': ['EthanWng97'],
3
3
  };
@@ -45,7 +45,7 @@ module.exports = {
45
45
  if (!gids) {
46
46
  return '';
47
47
  }
48
- const { type = '2' } = new URL(url).searchParams;
48
+ const type = new URL(url).searchParams.get('type') || '1';
49
49
  const page_size = '20';
50
50
  const last_id = '';
51
51
  return `/mihoyo/bbs/official/${gids}/${type}/${page_size}/${last_id}`;
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/new': ['TonyRL'],
3
+ };
@@ -0,0 +1,36 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { art } = require('@/utils/render');
4
+ const { join } = require('path');
5
+
6
+ module.exports = async (ctx) => {
7
+ const baseUrl = 'https://missav.com';
8
+ const { data: response } = await got(`${baseUrl}/dm397/new`);
9
+ const $ = cheerio.load(response);
10
+
11
+ const items = $('.grid .group')
12
+ .toArray()
13
+ .map((item) => {
14
+ item = $(item);
15
+ const title = item.find('.text-secondary');
16
+ const poster = new URL(item.find('img').data('src'));
17
+ poster.searchParams.set('class', 'normal');
18
+ const video = item.find('video').data('src');
19
+ return {
20
+ title: title.text().trim(),
21
+ link: title.attr('href'),
22
+ description: art(join(__dirname, 'templates/preview.art'), {
23
+ poster: poster.href,
24
+ video,
25
+ type: video.split('.').pop(),
26
+ }),
27
+ };
28
+ });
29
+
30
+ ctx.state.data = {
31
+ title: $('head title').text(),
32
+ description: $('head meta[name="description"]').attr('content'),
33
+ link: baseUrl,
34
+ item: items,
35
+ };
36
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'missav.com': {
3
+ _name: 'MissAV.com',
4
+ '.': [
5
+ {
6
+ title: '最近更新',
7
+ docs: 'https://docs.rsshub.app/multimedia#missav-com',
8
+ source: ['/dm397/new', '/new', '/'],
9
+ target: '/missav/new',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/new', require('./new'));
3
+ };