rsshub 1.0.0-master.c389e2c → 1.0.0-master.c395099

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 (179) hide show
  1. package/lib/config.js +3 -0
  2. package/lib/middleware/parameter.js +1 -1
  3. package/lib/radar-rules.js +0 -35
  4. package/lib/router.js +9 -9
  5. package/lib/utils/wechat-mp.js +1 -1
  6. package/lib/v2/0818tuan/index.js +47 -0
  7. package/lib/v2/0818tuan/maintainer.js +3 -0
  8. package/lib/v2/0818tuan/radar.js +13 -0
  9. package/lib/v2/0818tuan/router.js +3 -0
  10. package/lib/v2/50forum/radar.js +1 -1
  11. package/lib/v2/50forum/zhuanjia.js +1 -1
  12. package/lib/v2/aijishu/index.js +26 -0
  13. package/lib/v2/aijishu/maintainer.js +5 -0
  14. package/lib/v2/aijishu/radar.js +25 -0
  15. package/lib/v2/aijishu/router.js +3 -0
  16. package/lib/v2/aijishu/utils.js +36 -0
  17. package/lib/v2/amazon/kindle-software-updates.js +47 -0
  18. package/lib/v2/amazon/maintainer.js +3 -0
  19. package/lib/v2/amazon/radar.js +18 -0
  20. package/lib/v2/amazon/router.js +3 -0
  21. package/lib/v2/amazon/templates/software-description.art +4 -0
  22. package/lib/v2/arcteryx/maintainer.js +3 -0
  23. package/lib/v2/arcteryx/new-arrivals.js +49 -0
  24. package/lib/v2/arcteryx/radar.js +13 -0
  25. package/lib/v2/arcteryx/router.js +3 -0
  26. package/lib/v2/arcteryx/templates/product-description.art +6 -0
  27. package/lib/v2/bellroy/maintainer.js +3 -0
  28. package/lib/v2/bellroy/new-releases.js +26 -0
  29. package/lib/v2/bellroy/radar.js +13 -0
  30. package/lib/v2/bellroy/router.js +3 -0
  31. package/lib/v2/bilibili/hotSearch.js +25 -0
  32. package/lib/v2/bilibili/maintainer.js +1 -0
  33. package/lib/v2/bilibili/radar.js +6 -0
  34. package/lib/v2/bilibili/router.js +1 -0
  35. package/lib/v2/caai/index.js +22 -0
  36. package/lib/v2/caai/maintainer.js +3 -0
  37. package/lib/v2/caai/radar.js +13 -0
  38. package/lib/v2/caai/router.js +3 -0
  39. package/lib/v2/caai/utils.js +46 -0
  40. package/lib/v2/{ccfcv → ccf/ccfcv}/index.js +2 -2
  41. package/lib/v2/ccf/maintainer.js +5 -0
  42. package/lib/{routes → v2}/ccf/news.js +8 -14
  43. package/lib/v2/ccf/radar.js +41 -0
  44. package/lib/v2/ccf/router.js +5 -0
  45. package/lib/v2/ccf/templates/tfbd/description.art +1 -0
  46. package/lib/v2/ccf/tfbd/index.js +22 -0
  47. package/lib/v2/ccf/tfbd/utils.js +47 -0
  48. package/lib/v2/cls/depth.js +82 -0
  49. package/lib/v2/cls/hot.js +45 -0
  50. package/lib/v2/cls/maintainer.js +5 -0
  51. package/lib/v2/cls/radar.js +25 -0
  52. package/lib/v2/cls/router.js +5 -0
  53. package/lib/{routes → v2}/cls/telegraph.js +21 -3
  54. package/lib/v2/cls/templates/depth.art +10 -0
  55. package/lib/v2/cls/templates/telegraph.art +10 -0
  56. package/lib/v2/cls/utils.js +15 -0
  57. package/lib/v2/codeforces/contests.js +13 -5
  58. package/lib/v2/codeforces/templates/contest.art +2 -3
  59. package/lib/v2/discord/channel.js +38 -0
  60. package/lib/v2/discord/discord-api.js +61 -0
  61. package/lib/v2/discord/maintainer.js +3 -0
  62. package/lib/v2/discord/radar.js +13 -0
  63. package/lib/v2/discord/router.js +3 -0
  64. package/lib/v2/discord/templates/message.art +47 -0
  65. package/lib/v2/gameapps/index.js +32 -13
  66. package/lib/v2/github/comments.js +14 -15
  67. package/lib/v2/github/maintainer.js +1 -1
  68. package/lib/v2/gov/csrc/auditstatus.js +54 -0
  69. package/lib/v2/gov/csrc/news.js +69 -0
  70. package/lib/v2/gov/csrc/templates/attachment.art +3 -0
  71. package/lib/v2/gov/maintainer.js +2 -0
  72. package/lib/v2/gov/radar.js +19 -0
  73. package/lib/v2/gov/router.js +2 -0
  74. package/lib/v2/gov/stats/index.js +1 -1
  75. package/lib/v2/gov/stats/utils.js +4 -2
  76. package/lib/v2/hkepc/data.js +62 -0
  77. package/lib/v2/hkepc/index.js +55 -164
  78. package/lib/v2/infoq/utils.js +2 -1
  79. package/lib/v2/kemono/index.js +21 -17
  80. package/lib/v2/kemono/templates/discord.art +22 -0
  81. package/lib/v2/nber/index.js +48 -0
  82. package/lib/v2/nber/maintainer.js +4 -0
  83. package/lib/v2/nber/radar.js +19 -0
  84. package/lib/v2/nber/router.js +4 -0
  85. package/lib/v2/nber/template/description.art +6 -0
  86. package/lib/v2/{nikkei-asia → nikkei/asia}/index.js +16 -3
  87. package/lib/v2/nikkei/cn/index.js +90 -0
  88. package/lib/v2/nikkei/index.js +36 -0
  89. package/lib/v2/nikkei/maintainer.js +6 -0
  90. package/lib/v2/nikkei/news.js +90 -0
  91. package/lib/v2/nikkei/radar.js +59 -0
  92. package/lib/v2/nikkei/router.js +7 -0
  93. package/lib/v2/nikkei/templates/news.art +4 -0
  94. package/lib/v2/patagonia/maintainer.js +3 -0
  95. package/lib/v2/patagonia/new-arrivals.js +61 -0
  96. package/lib/v2/patagonia/radar.js +23 -0
  97. package/lib/v2/patagonia/router.js +3 -0
  98. package/lib/v2/patagonia/templates/product-description.art +4 -0
  99. package/lib/v2/picnob/maintainer.js +3 -0
  100. package/lib/v2/picnob/radar.js +13 -0
  101. package/lib/v2/picnob/router.js +3 -0
  102. package/lib/v2/picnob/templates/desc.art +13 -0
  103. package/lib/v2/picnob/user.js +61 -0
  104. package/lib/v2/qdaily/index.js +87 -0
  105. package/lib/v2/qdaily/maintainer.js +3 -0
  106. package/lib/v2/qdaily/router.js +3 -0
  107. package/lib/v2/qdaily/templates/article.art +5 -0
  108. package/lib/v2/qdaily/templates/radar.js +25 -0
  109. package/lib/v2/snowpeak/maintainer.js +3 -0
  110. package/lib/v2/snowpeak/radar.js +13 -0
  111. package/lib/v2/snowpeak/router.js +3 -0
  112. package/lib/v2/snowpeak/templates/new-arrivals.art +11 -0
  113. package/lib/v2/snowpeak/us-new-arrivals.js +45 -0
  114. package/lib/v2/sony/downloads.js +47 -0
  115. package/lib/v2/sony/maintainer.js +3 -0
  116. package/lib/v2/sony/radar.js +13 -0
  117. package/lib/v2/sony/router.js +3 -0
  118. package/lib/v2/sony/templates/software-description.art +4 -0
  119. package/lib/v2/urbandictionary/maintainer.js +3 -0
  120. package/lib/v2/urbandictionary/radar.js +13 -0
  121. package/lib/v2/urbandictionary/random.js +24 -0
  122. package/lib/v2/urbandictionary/router.js +3 -0
  123. package/lib/v2/urbandictionary/templates/definition.art +11 -0
  124. package/lib/v2/v1tx/index.js +36 -0
  125. package/lib/v2/v1tx/maintainer.js +4 -0
  126. package/lib/v2/v1tx/radar.js +13 -0
  127. package/lib/v2/{nikkei-asia → v1tx}/router.js +1 -1
  128. package/lib/v2/weekendhk/maintainer.js +4 -0
  129. package/lib/v2/weekendhk/posts.js +29 -0
  130. package/lib/v2/weekendhk/radar.js +13 -0
  131. package/lib/v2/weekendhk/router.js +3 -0
  132. package/lib/v2/wxkol/maintainer.js +3 -0
  133. package/lib/v2/wxkol/radar.js +13 -0
  134. package/lib/v2/wxkol/router.js +3 -0
  135. package/lib/v2/wxkol/show.js +80 -0
  136. package/lib/v2/xsijishe/forum.js +61 -0
  137. package/lib/v2/xsijishe/maintainer.js +3 -0
  138. package/lib/v2/xsijishe/radar.js +19 -0
  139. package/lib/v2/xsijishe/router.js +3 -0
  140. package/lib/v2/ycwb/index.js +82 -0
  141. package/lib/v2/ycwb/maintainer.js +3 -0
  142. package/lib/v2/ycwb/radar.js +12 -0
  143. package/lib/v2/ycwb/router.js +3 -0
  144. package/lib/v2/ycwb/templates/description.art +7 -0
  145. package/lib/v2/youtube/channel.js +3 -4
  146. package/lib/v2/youtube/charts.js +97 -0
  147. package/lib/v2/youtube/community.js +56 -0
  148. package/lib/v2/youtube/maintainer.js +2 -0
  149. package/lib/v2/youtube/radar.js +14 -0
  150. package/lib/v2/youtube/router.js +2 -0
  151. package/lib/v2/youtube/templates/community.art +17 -0
  152. package/lib/v2/youtube/user.js +1 -1
  153. package/lib/v2/youtube/utils.js +2 -0
  154. package/lib/v2/yuque/book.js +14 -0
  155. package/lib/v2/yuque/utils.js +4 -0
  156. package/lib/v2/zjol/maintainer.js +3 -0
  157. package/lib/v2/zjol/paper.js +88 -0
  158. package/lib/v2/zjol/radar.js +61 -0
  159. package/lib/v2/zjol/router.js +3 -0
  160. package/package.json +21 -21
  161. package/lib/routes/cls/depth.js +0 -63
  162. package/lib/routes/csrc/auditstatus.js +0 -61
  163. package/lib/routes/csrc/fashenwei.js +0 -42
  164. package/lib/routes/csrc/news.js +0 -45
  165. package/lib/routes/nikkei/index.js +0 -34
  166. package/lib/routes/nikkei/news.js +0 -155
  167. package/lib/routes/qdaily/index.js +0 -88
  168. package/lib/v2/ccfcv/maintainer.js +0 -3
  169. package/lib/v2/ccfcv/radar.js +0 -25
  170. package/lib/v2/ccfcv/router.js +0 -3
  171. package/lib/v2/hkepc/templates/image.art +0 -1
  172. package/lib/v2/nikkei-asia/maintainer.js +0 -3
  173. package/lib/v2/nikkei-asia/radar.js +0 -13
  174. package/lib/v2/nikkei-cn/index.js +0 -89
  175. package/lib/v2/nikkei-cn/maintainer.js +0 -3
  176. package/lib/v2/nikkei-cn/radar.js +0 -21
  177. package/lib/v2/nikkei-cn/router.js +0 -3
  178. /package/lib/v2/{hkepc → caai}/templates/description.art +0 -0
  179. /package/lib/v2/{ccfcv/templates → ccf/templates/ccfcv}/description.art +0 -0
package/lib/config.js CHANGED
@@ -124,6 +124,9 @@ const calculateValue = () => {
124
124
  username: envs.DIDA365_USERNAME,
125
125
  password: envs.DIDA365_PASSWORD,
126
126
  },
127
+ discord: {
128
+ authorization: envs.DISCORD_AUTHORIZATION,
129
+ },
127
130
  discuz: {
128
131
  cookies: discuz_cookies,
129
132
  },
@@ -313,7 +313,7 @@ module.exports = async (ctx, next) => {
313
313
  }
314
314
  });
315
315
  } else {
316
- throw Error(`Invalid parameter <code>brief=${ctx.query.brief}</code>. Please check the doc https://docs.rsshub.app/parameter.html#shu-chu-jian-xun`);
316
+ throw Error(`Invalid parameter brief. Please check the doc https://docs.rsshub.app/parameter.html#shu-chu-jian-xun`);
317
317
  }
318
318
  }
319
319
 
@@ -231,30 +231,6 @@ module.exports = {
231
231
  },
232
232
  ],
233
233
  },
234
- 'qdaily.com': {
235
- _name: '好奇心日报',
236
- www: [
237
- {
238
- title: '标签',
239
- docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao',
240
- source: '/tags/:idd',
241
- target: (params) => `/qdaily/tag/${params.idd.replace('.html', '')}`,
242
- },
243
- {
244
- title: '栏目',
245
- docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao',
246
- source: '/special_columns/:idd',
247
- target: (params) => `/qdaily/column/${params.idd.replace('.html', '')}`,
248
- },
249
- {
250
- title: '分类',
251
- docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao',
252
- source: '/categories/:idd',
253
- target: (params) => `/qdaily/category/${params.idd.replace('.html', '')}`,
254
- },
255
- ],
256
- },
257
-
258
234
  '3ycy.com': {
259
235
  _name: '三界异次元',
260
236
  www: [
@@ -435,17 +411,6 @@ module.exports = {
435
411
  },
436
412
  ],
437
413
  },
438
- 'nikkei.com': {
439
- _name: '日本経済新聞',
440
- www: [
441
- {
442
- title: 'ホームページ',
443
- docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen',
444
- source: '/',
445
- target: '/nikkei/index',
446
- },
447
- ],
448
- },
449
414
  'last.fm': {
450
415
  _name: 'Last.fm',
451
416
  www: [
package/lib/router.js CHANGED
@@ -173,7 +173,7 @@ router.get('/geektime/news', lazyloadRouteHandler('./routes/geektime/news'));
173
173
  // router.get('/jiemian/list/:cid', lazyloadRouteHandler('./routes/jiemian/list.js'));
174
174
 
175
175
  // 好奇心日报
176
- router.get('/qdaily/:type/:id', lazyloadRouteHandler('./routes/qdaily/index'));
176
+ // router.get('/qdaily/:type/:id', lazyloadRouteHandler('./routes/qdaily/index'));
177
177
 
178
178
  // 爱奇艺
179
179
  // router.get('/iqiyi/dongman/:id', lazyloadRouteHandler('./routes/iqiyi/dongman'));
@@ -1754,9 +1754,9 @@ router.get('/8btc/news/flash', lazyloadRouteHandler('./routes/8btc/news/flash'))
1754
1754
  router.get('/vuevideo/:userid', lazyloadRouteHandler('./routes/vuevideo/user'));
1755
1755
 
1756
1756
  // 证监会
1757
- router.get('/csrc/news/:suffix?', lazyloadRouteHandler('./routes/csrc/news'));
1758
- router.get('/csrc/fashenwei', lazyloadRouteHandler('./routes/csrc/fashenwei'));
1759
- router.get('/csrc/auditstatus/:apply_id', lazyloadRouteHandler('./routes/csrc/auditstatus'));
1757
+ // router.get('/csrc/news/:suffix?', lazyloadRouteHandler('./routes/csrc/news'));
1758
+ // router.get('/csrc/fashenwei', lazyloadRouteHandler('./routes/csrc/fashenwei'));
1759
+ // router.get('/csrc/auditstatus/:apply_id', lazyloadRouteHandler('./routes/csrc/auditstatus'));
1760
1760
 
1761
1761
  // LWN.net Alerts
1762
1762
  router.get('/lwn/alerts/:distributor', lazyloadRouteHandler('./routes/lwn/alerts'));
@@ -2402,8 +2402,8 @@ router.get('/coronavirus/yahoo-japan/:tdfk?', lazyloadRouteHandler('./routes/cor
2402
2402
  router.get('/njfu/jwc/:category?', lazyloadRouteHandler('./routes/universities/njfu/jwc'));
2403
2403
 
2404
2404
  // 日本経済新聞
2405
- router.get('/nikkei/index', lazyloadRouteHandler('./routes/nikkei/index'));
2406
- router.get('/nikkei/:category/:article_type?', lazyloadRouteHandler('./routes/nikkei/news'));
2405
+ // router.get('/nikkei/index', lazyloadRouteHandler('./routes/nikkei/index'));
2406
+ // router.get('/nikkei/:category/:article_type?', lazyloadRouteHandler('./routes/nikkei/news'));
2407
2407
 
2408
2408
  // MQube
2409
2409
  router.get('/mqube/user/:user', lazyloadRouteHandler('./routes/mqube/user'));
@@ -2862,8 +2862,8 @@ router.get('/gov/caict/caictgd', lazyloadRouteHandler('./routes/gov/caict/caictg
2862
2862
  router.get('/cs/news/:caty', lazyloadRouteHandler('./routes/cs/news'));
2863
2863
 
2864
2864
  // 财联社
2865
- router.get('/cls/depth/:category?', lazyloadRouteHandler('./routes/cls/depth'));
2866
- router.get('/cls/telegraph/:category?', lazyloadRouteHandler('./routes/cls/telegraph'));
2865
+ // router.get('/cls/depth/:category?', lazyloadRouteHandler('./routes/cls/depth'));
2866
+ // router.get('/cls/telegraph/:category?', lazyloadRouteHandler('./routes/cls/telegraph'));
2867
2867
 
2868
2868
  // hentai-cosplays
2869
2869
  router.get('/hentai-cosplays/:type?/:name?', lazyloadRouteHandler('./routes/hentai-cosplays/hentai-cosplays'));
@@ -3541,7 +3541,7 @@ router.get('/vgn/:platform?', lazyloadRouteHandler('./routes/vgn/index'));
3541
3541
  router.get('/iea/:category?', lazyloadRouteHandler('./routes/iea/index'));
3542
3542
 
3543
3543
  // 中国计算机学会
3544
- router.get('/ccf/news/:category?', lazyloadRouteHandler('./routes/ccf/news'));
3544
+ // router.get('/ccf/news/:category?', lazyloadRouteHandler('./routes/ccf/news'));
3545
3545
 
3546
3546
  // The Brain
3547
3547
  router.get('/thebrain/:category?', lazyloadRouteHandler('./routes/thebrain/blog'));
@@ -222,7 +222,7 @@ const fetchArticle = (ctx, url, bypassHostCheck = false) => {
222
222
 
223
223
  let mpName = $('.profile_nickname').first().text();
224
224
  mpName = mpName && mpName.trim();
225
- return { title, author, description, summary, pubDate, mpName, link: url };
225
+ return { title, author, description, summary, pubDate, mpName, link: response.url };
226
226
  });
227
227
  };
228
228
 
@@ -0,0 +1,47 @@
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
+
6
+ module.exports = async (ctx) => {
7
+ const baseUrl = 'http://www.0818tuan.com';
8
+ const { listId = '1' } = ctx.params;
9
+ const url = `${baseUrl}/list-${listId}-0.html`;
10
+
11
+ const { data: response } = await got(url);
12
+ const $ = cheerio.load(response);
13
+
14
+ const list = $(listId === '3' ? '.col-xs-12 .thumbnail > a' : '.col-md-8 .list-group > a')
15
+ .toArray()
16
+ .map((item) => {
17
+ item = $(item);
18
+ return {
19
+ title: item.attr('title'),
20
+ link: `${baseUrl}${item.attr('href')}`,
21
+ };
22
+ })
23
+ .filter((i) => !i.link.includes('m.0818tuan.com/tb1111.php'));
24
+
25
+ const items = await Promise.all(
26
+ list.map((item) =>
27
+ ctx.cache.tryGet(item.link, async () => {
28
+ const { data: response } = await got(item.link);
29
+ const $ = cheerio.load(response);
30
+
31
+ $('.pageLink, .alert, p[style="margin:15px;"]').remove();
32
+
33
+ item.description = $('.post-content').html();
34
+ item.pubDate = timezone(parseDate($('.panel-body > .text-center').text().replace('时间:', ''), 'YYYY-MM-DD HH:mm:ss'), +8);
35
+
36
+ return item;
37
+ })
38
+ )
39
+ );
40
+
41
+ ctx.state.data = {
42
+ title: $('head title').text(),
43
+ link: url,
44
+ image: 'http://www.0818tuan.com/favicon.ico',
45
+ item: items,
46
+ };
47
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/:listId?': ['TonyRL'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ '0818tuan.com': {
3
+ _name: '0818 团',
4
+ '.': [
5
+ {
6
+ title: '分类',
7
+ docs: 'https://docs.rsshub.app/shopping.html#_0818-tuan',
8
+ source: ['/:listId', '/'],
9
+ target: (params) => `/0818tuan${params.listId ? '/' + params.listId.replace('list-', '').replace('-0.html', '') : ''}`,
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/:listId?', require('./index'));
3
+ };
@@ -4,7 +4,7 @@ module.exports = {
4
4
  '.': [
5
5
  {
6
6
  title: '专家文章',
7
- docs: 'https://docs.rsshub.app/new-media.html#jing-ji-50-ren-lun-tan',
7
+ docs: 'https://docs.rsshub.app/study.html#jing-ji-50-ren-lun-tan',
8
8
  source: ['/home/article/index/category/zhuanjia.html', '/'],
9
9
  target: '/50forum',
10
10
  },
@@ -20,7 +20,7 @@ module.exports = async (ctx) => {
20
20
  .map((item) => {
21
21
  item = $(item);
22
22
  const link = rootUrl + item.attr('href');
23
- const reg = /^(.+)\[(.+)\](.+)$/;
23
+ const reg = /^(.+)\[(.*)\](.+)$/;
24
24
  const keyword = reg.exec(item.text().trim());
25
25
  return {
26
26
  title: keyword[1],
@@ -0,0 +1,26 @@
1
+ const utils = require('./utils');
2
+ const got = require('@/utils/got');
3
+ const cheerio = require('cheerio');
4
+
5
+ module.exports = async (ctx) => {
6
+ const { type, name = 'newest' } = ctx.params;
7
+ const u = name === 'newest' ? `https://aijishu.com/` : `https://aijishu.com/${type}/${name}`;
8
+ const html = await got(u);
9
+
10
+ const $ = cheerio.load(html.data);
11
+ const title = $('title').text();
12
+ const api_path = $('li[data-js-stream-load-more]').attr('data-api-url');
13
+
14
+ const channel_url = `https://aijishu.com${api_path}?page=1`;
15
+ const channel_url_resp = await got(channel_url);
16
+ const resp = channel_url_resp.data;
17
+ const list = resp.data.rows;
18
+
19
+ const items = await Promise.all(list.filter((item) => item?.url?.startsWith('/a/') || item?.object?.url.startsWith('/a/')).map((item) => utils.parseArticle(item, ctx)));
20
+
21
+ ctx.state.data = {
22
+ title: title.split(' - ').slice(0, 2).join(' - '),
23
+ link: u,
24
+ item: items,
25
+ };
26
+ };
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ '/blog/:name': ['bigfei'],
3
+ '/channel/:name': ['bigfei'],
4
+ '/u/:name': ['bigfei'],
5
+ };
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ aijishu: {
3
+ _name: '极术社区',
4
+ www: [
5
+ {
6
+ title: '频道',
7
+ docs: 'https://docs.rsshub.app/programming.html#ji-shu-she-qu',
8
+ source: ['/channel/:name'],
9
+ target: '/aijishu/channel/:name',
10
+ },
11
+ {
12
+ title: '用户',
13
+ docs: 'https://docs.rsshub.app/programming.html#ji-shu-she-qu',
14
+ source: ['/u/:name'],
15
+ target: '/aijishu/u/:name',
16
+ },
17
+ {
18
+ title: '专栏',
19
+ docs: 'https://docs.rsshub.app/programming.html#ji-shu-she-qu',
20
+ source: ['/blog/:name'],
21
+ target: '/aijishu/blog/:name',
22
+ },
23
+ ],
24
+ },
25
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/:type/:name?', require('.'));
3
+ };
@@ -0,0 +1,36 @@
1
+ const got = require('@/utils/got');
2
+ const { parseRelativeDate, parseDate } = require('@/utils/parse-date');
3
+ const cheerio = require('cheerio');
4
+
5
+ const parseArticle = (item, ctx) => {
6
+ const articleUrl = `https://aijishu.com${item.url || item.object.url}`;
7
+ return ctx.cache.tryGet(articleUrl, async () => {
8
+ const d1 = parseDate(item.createdDate, ['YYYY-MM-DD', 'M-DD']);
9
+ const d2 = parseRelativeDate(item.createdDate);
10
+
11
+ let resp, desc;
12
+ try {
13
+ resp = await got(articleUrl);
14
+ const $ = cheerio.load(resp.data);
15
+ desc = $('article.fmt').html();
16
+ } catch (e) {
17
+ if (e.response.status === 403) {
18
+ // skip it
19
+ } else {
20
+ throw e;
21
+ }
22
+ }
23
+
24
+ const article_item = {
25
+ title: item.title || item.object.title,
26
+ link: articleUrl,
27
+ description: desc,
28
+ pubDate: d1.toString() === 'Invalid Date' ? d2 : d1,
29
+ };
30
+ return article_item;
31
+ });
32
+ };
33
+
34
+ module.exports = {
35
+ parseArticle,
36
+ };
@@ -0,0 +1,47 @@
1
+ const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
4
+ const cheerio = require('cheerio');
5
+ const host = 'https://www.amazon.com';
6
+ module.exports = async (ctx) => {
7
+ const url = host + '/gp/help/customer/display.html';
8
+ const nodeIdValue = 'GKMQC26VQQMM8XSW';
9
+ const response = await got({
10
+ method: 'get',
11
+ url,
12
+ searchParams: {
13
+ nodeId: nodeIdValue,
14
+ },
15
+ });
16
+ const data = response.data;
17
+
18
+ const $ = cheerio.load(data);
19
+ const list = $('.a-row.cs-help-landing-section.help-display-cond')
20
+ .map(function () {
21
+ const data = {};
22
+ data.title = $(this).find('.sectiontitle').text();
23
+ data.link = $(this).find('a').eq(0).attr('href');
24
+ data.version = $(this).find('li').first().text();
25
+ data.website = `${url}?nodeId=${nodeIdValue}`;
26
+ data.description = $(this)
27
+ .find('.a-column.a-span8')
28
+ .html()
29
+ .replace(/[\n\t]/g, '');
30
+ return data;
31
+ })
32
+ .get();
33
+ ctx.state.data = {
34
+ title: 'Kindle E-Reader Software Updates',
35
+ link: `${url}?nodeId=${nodeIdValue}`,
36
+ description: 'Kindle E-Reader Software Updates',
37
+ item: list.map((item) => ({
38
+ title: item.title + ' - ' + item.version,
39
+ description:
40
+ item.description +
41
+ art(path.join(__dirname, 'templates/software-description.art'), {
42
+ item,
43
+ }),
44
+ link: item.link,
45
+ })),
46
+ };
47
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/kindle/software-updates': ['NavePnow'],
3
+ };
@@ -0,0 +1,18 @@
1
+ module.exports = {
2
+ 'amazon.com': {
3
+ _name: 'Amazon',
4
+ '.': [
5
+ {
6
+ title: 'Kindle 软件更新',
7
+ docs: 'https://docs.rsshub.app/program-update.html#amazon',
8
+ source: ['/gp/help/customer/display.html'],
9
+ target: (_, url) => {
10
+ const nodeId = new URL(url).searchParams.get('nodeId');
11
+ if (nodeId === 'GKMQC26VQQMM8XSW') {
12
+ return '/amazon/kindle/software-updates';
13
+ }
14
+ },
15
+ },
16
+ ],
17
+ },
18
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/kindle/software-updates', require('./kindle-software-updates'));
3
+ };
@@ -0,0 +1,4 @@
1
+ <div>
2
+ <br><br>
3
+ <a href={{item.website}}>Kindle Website</a>
4
+ </div>
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/new-arrivals/:country/:gender': ['NavePnow'],
3
+ };
@@ -0,0 +1,49 @@
1
+ const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
4
+
5
+ const attributeSet = new Set(['name', 'image', 'short_description', 'slug']);
6
+ function generateRssData(item, index, arr) {
7
+ const attributes = item.attribute;
8
+ const data = {};
9
+
10
+ attributes.forEach((attribute) => {
11
+ const key = attribute.name;
12
+ const value = attribute.value[0].value;
13
+ if (attributeSet.has(key)) {
14
+ data[key] = value;
15
+ }
16
+ });
17
+ arr[index] = data;
18
+ }
19
+ module.exports = async (ctx) => {
20
+ const { country, gender } = ctx.params;
21
+ const host = `https://arcteryx.com/${country}/en/`;
22
+ const url = `${host}api/fredhopper/query`;
23
+ const productUrl = `${host}shop/`;
24
+ const pageUrl = `${host}c/${gender}/new-arrivals`;
25
+ const response = await got({
26
+ method: 'get',
27
+ url,
28
+ searchParams: {
29
+ fh_location: `//catalog01/en_CA/gender>{${gender}}/intended_use>{newarrivals}`,
30
+ fh_country: country,
31
+ fh_view_size: 'all',
32
+ },
33
+ });
34
+ const items = response.data.universes.universe[1]['items-section'].items.item;
35
+ items.forEach(generateRssData);
36
+
37
+ ctx.state.data = {
38
+ title: `Arcteryx - New Arrivals(${country.toUpperCase()}) - ${gender.toUpperCase()}`,
39
+ link: pageUrl,
40
+ description: `Arcteryx - New Arrivals(${country.toUpperCase()}) - ${gender.toUpperCase()}`,
41
+ item: items.map((item) => ({
42
+ title: item.name,
43
+ link: productUrl + item.slug,
44
+ description: art(path.join(__dirname, 'templates/product-description.art'), {
45
+ item,
46
+ }),
47
+ })),
48
+ };
49
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'arcteryx.com': {
3
+ _name: 'Arcteryx',
4
+ '.': [
5
+ {
6
+ title: '新发布',
7
+ docs: 'https://docs.rsshub.app/shopping.html#arcteryx',
8
+ source: ['/:country/en/c/:gender/new-arrivals'],
9
+ target: '/arcteryx/new-arrivals/:country/:gender',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/new-arrivals/:country/:gender', require('./new-arrivals'));
3
+ };
@@ -0,0 +1,6 @@
1
+ <div>
2
+ <img src={{item.image}}>
3
+ <br><br>
4
+ {{item.short_description}}
5
+ <br><br>
6
+ </div>
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/new-releases': ['NavePnow'],
3
+ };
@@ -0,0 +1,26 @@
1
+ const got = require('@/utils/got');
2
+
3
+ module.exports = async (ctx) => {
4
+ const host = 'https://bellroy.com';
5
+ const url = 'https://production.products.boobook-services.com/products';
6
+ const response = await got({
7
+ method: 'get',
8
+ url,
9
+ searchParams: {
10
+ currency_identifier: '1abe985632a1392e6a94b885fe193d5943b7c213',
11
+ price_group: 'bellroy.com',
12
+ 'filter[dimensions][web_new_release]': 'new_style',
13
+ },
14
+ });
15
+ const data = response.data.products;
16
+
17
+ ctx.state.data = {
18
+ title: 'Bellroy - New Releases',
19
+ link: 'https://bellroy.com/collection/new-releases',
20
+ description: 'Bellroy - New Releases',
21
+ item: data.map((item) => ({
22
+ title: item.attributes.name + ' - ' + item.attributes.dimensions.color,
23
+ link: host + item.attributes.canonical_uri,
24
+ })),
25
+ };
26
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'bellroy.com': {
3
+ _name: 'Bellroy',
4
+ '.': [
5
+ {
6
+ title: '新发布',
7
+ docs: 'https://docs.rsshub.app/shopping.html#bellroy',
8
+ source: ['/collection/new-releases', '/'],
9
+ target: '/bellroy/new-releases',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/new-releases', require('./new-releases'));
3
+ };
@@ -0,0 +1,25 @@
1
+ const got = require('@/utils/got');
2
+
3
+ module.exports = async (ctx) => {
4
+ const url = `https://api.bilibili.com/x/web-interface/wbi/search/square?limit=10&platform=web&wts=${Math.floor(Date.now() / 1000)}`;
5
+ const response = await got({
6
+ method: 'get',
7
+ url,
8
+ headers: {
9
+ Referer: `https://api.bilibili.com`,
10
+ },
11
+ });
12
+ const trending = response?.data?.data?.trending;
13
+ const title = trending?.title;
14
+ const list = trending?.list || [];
15
+ ctx.state.data = {
16
+ title,
17
+ link: url,
18
+ description: 'bilibili热搜',
19
+ item: list.map((item) => ({
20
+ title: item.keyword,
21
+ description: `${item.keyword}<br>${item.icon ? `<img src="${item.icon}">` : ''}`,
22
+ link: item.link || item.goto || `https://search.bilibili.com/all?${new URLSearchParams({ keyword: item.keyword })}&from_source=webtop_search`,
23
+ })),
24
+ };
25
+ };
@@ -8,6 +8,7 @@ module.exports = {
8
8
  '/followings/article/:uid': ['woshiluo'],
9
9
  '/followings/dynamic/:uid/:disableEmbed?': ['TigerCubDen'],
10
10
  '/followings/video/:uid/:disableEmbed?': ['LogicJake'],
11
+ '/hot-search': ['CaoMeiYouRen'],
11
12
  '/link/news/:product': ['Qixingchen'],
12
13
  '/live/area/:areaID/:order': ['Qixingchen'],
13
14
  '/live/room/:roomID': ['Qixingchen'],
@@ -34,6 +34,12 @@ module.exports = {
34
34
  source: '/video/online.html',
35
35
  target: '/bilibili/online',
36
36
  },
37
+ {
38
+ title: 'bilibili热搜',
39
+ docs: 'https://docs.rsshub.app/social-media.html#bilibili',
40
+ source: '/',
41
+ target: '/bilibili/hot-search',
42
+ },
37
43
  ],
38
44
  space: [
39
45
  {
@@ -9,6 +9,7 @@ module.exports = (router) => {
9
9
  router.get('/followings/dynamic/:uid/:disableEmbed?', require('./followings_dynamic'));
10
10
  router.get('/followings/video/:uid/:disableEmbed?', require('./followings_video'));
11
11
  router.get('/link/news/:product', require('./linkNews'));
12
+ router.get('/hot-search', require('./hotSearch'));
12
13
  router.get('/live/area/:areaID/:order', require('./liveArea'));
13
14
  router.get('/live/room/:roomID', require('./liveRoom'));
14
15
  router.get('/live/search/:key/:order', require('./liveSearch'));
@@ -0,0 +1,22 @@
1
+ const utils = require('./utils');
2
+ const got = require('@/utils/got');
3
+ const cheerio = require('cheerio');
4
+
5
+ module.exports = async (ctx) => {
6
+ const base = utils.urlBase(ctx.params.caty);
7
+ const res = await got(base);
8
+ const info = utils.fetchAllArticles(res.data);
9
+ const $ = cheerio.load(res.data);
10
+
11
+ const details = await Promise.all(info.map((e) => utils.detailPage(e, ctx.cache)));
12
+
13
+ ctx.state.json = {
14
+ info,
15
+ };
16
+
17
+ ctx.state.data = {
18
+ title: '中国人工智能学会 - ' + $('.article-list h1').text(),
19
+ link: base,
20
+ item: details,
21
+ };
22
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/:caty': ['tudou027'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'caai.cn': {
3
+ _name: '中国人工智能学会',
4
+ '.': [
5
+ {
6
+ title: '学会动态',
7
+ docs: 'https://docs.rsshub.app/study.html#zhong-guo-ren-gong-zhi-neng-xue-hui',
8
+ source: ['/index.php'],
9
+ target: (_, url) => `/caai/${url.match(/\/(\d+)\.html/)[1]}`,
10
+ },
11
+ ],
12
+ },
13
+ };