rsshub 1.0.0-master.b088a98 → 1.0.0-master.b0cb871

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 (210) hide show
  1. package/README.md +0 -8
  2. package/lib/config.js +10 -1
  3. package/lib/middleware/cache/memory.js +2 -2
  4. package/lib/middleware/template.js +14 -1
  5. package/lib/radar.js +22 -3
  6. package/lib/router.js +17 -20
  7. package/lib/routes/axis-studios/work.js +0 -0
  8. package/lib/routes/blow-studio/work.js +0 -0
  9. package/lib/routes/blur-studio/index.js +0 -0
  10. package/lib/routes/digic-pictures/index.js +0 -0
  11. package/lib/routes/gov/hunan/notice.js +1 -1
  12. package/lib/routes/method-studios/index.js +0 -0
  13. package/lib/routes/ps/product.js +0 -0
  14. package/lib/routes/unit-image/films.js +0 -0
  15. package/lib/utils/puppeteer.js +2 -2
  16. package/lib/utils/request-wrapper.js +2 -2
  17. package/lib/v2/3dmgame/game.js +39 -0
  18. package/lib/v2/3dmgame/maintainer.js +4 -0
  19. package/lib/v2/3dmgame/news_center.js +42 -0
  20. package/lib/v2/3dmgame/radar.js +19 -0
  21. package/lib/v2/3dmgame/router.js +4 -0
  22. package/lib/v2/3dmgame/utils.js +30 -0
  23. package/lib/v2/amazon/kindle-software-updates.js +1 -0
  24. package/lib/v2/atcoder/radar.js +1 -1
  25. package/lib/v2/bilibili/userChannel.js +2 -1
  26. package/lib/v2/bilibili/userCollection.js +3 -1
  27. package/lib/v2/bilibili/vsearch.js +1 -1
  28. package/lib/v2/bjsk/keti.js +54 -0
  29. package/lib/v2/bjsk/maintainer.js +1 -0
  30. package/lib/v2/bjsk/radar.js +8 -0
  31. package/lib/v2/bjsk/router.js +1 -0
  32. package/lib/v2/chinathinktanks/radar.js +1 -1
  33. package/lib/v2/cls/depth.js +34 -32
  34. package/lib/v2/cls/hot.js +38 -29
  35. package/lib/v2/cls/maintainer.js +1 -1
  36. package/lib/v2/cls/radar.js +1 -1
  37. package/lib/v2/cls/telegraph.js +25 -23
  38. package/lib/v2/cls/templates/depth.art +3 -3
  39. package/lib/v2/cls/templates/telegraph.art +5 -5
  40. package/lib/v2/cls/utils.js +12 -6
  41. package/lib/v2/cneb/maintainer.js +4 -0
  42. package/lib/v2/cneb/radar.js +19 -0
  43. package/lib/v2/cneb/router.js +5 -0
  44. package/lib/v2/cneb/yjxw.js +72 -0
  45. package/lib/v2/cneb/yjxx.js +50 -0
  46. package/lib/v2/duozhuayu/maintainer.js +3 -0
  47. package/lib/v2/duozhuayu/radar.js +13 -0
  48. package/lib/v2/duozhuayu/router.js +3 -0
  49. package/lib/{routes → v2}/duozhuayu/search.js +23 -32
  50. package/lib/v2/duozhuayu/templates/book.art +10 -0
  51. package/lib/v2/embassy/radar.js +1 -1
  52. package/lib/v2/flyert/creditcard.js +3 -0
  53. package/lib/v2/flyert/utils.js +14 -8
  54. package/lib/v2/freebuf/index.js +41 -0
  55. package/lib/v2/freebuf/maintainer.js +3 -0
  56. package/lib/v2/freebuf/radar.js +13 -0
  57. package/lib/v2/freebuf/router.js +3 -0
  58. package/lib/v2/freecomputerbooks/index.js +41 -13
  59. package/lib/v2/freecomputerbooks/templates/desc.art +3 -0
  60. package/lib/v2/github/gist.js +35 -0
  61. package/lib/v2/github/maintainer.js +1 -0
  62. package/lib/v2/github/radar.js +8 -0
  63. package/lib/v2/github/router.js +1 -0
  64. package/lib/v2/gov/cac/index.js +64 -0
  65. package/lib/v2/gov/ccdi/index.js +1 -1
  66. package/lib/v2/gov/ccdi/utils.js +1 -1
  67. package/lib/v2/gov/maintainer.js +1 -0
  68. package/lib/v2/gov/radar.js +12 -1
  69. package/lib/v2/gov/router.js +1 -0
  70. package/lib/v2/gq/tw/index.js +1 -1
  71. package/lib/v2/hnu/careers.js +33 -0
  72. package/lib/v2/hnu/maintainer.js +3 -0
  73. package/lib/v2/hnu/radar.js +12 -0
  74. package/lib/v2/hnu/router.js +3 -0
  75. package/lib/v2/hust/aia/news.js +0 -0
  76. package/lib/v2/hust/aia/notice.js +0 -0
  77. package/lib/v2/i-cable/category.js +74 -0
  78. package/lib/v2/i-cable/maintainer.js +3 -0
  79. package/lib/v2/i-cable/radar.js +13 -0
  80. package/lib/v2/i-cable/router.js +3 -0
  81. package/lib/v2/i-cable/templates/desc.art +8 -0
  82. package/lib/v2/ibc/maintainer.js +4 -0
  83. package/lib/{routes/maitta/index.js → v2/ibc/maitta.js} +11 -8
  84. package/lib/v2/ibc/radar.js +19 -0
  85. package/lib/v2/ibc/radio.js +73 -0
  86. package/lib/v2/ibc/router.js +4 -0
  87. package/lib/v2/ibc/templates/description.art +6 -0
  88. package/lib/v2/ithome/radar.js +3 -3
  89. package/lib/v2/iwara/radar.js +1 -1
  90. package/lib/v2/iwara/subscriptions.js +131 -32
  91. package/lib/v2/iwara/templates/subscriptions.art +1 -1
  92. package/lib/v2/mdpi/maintainer.js +0 -0
  93. package/lib/v2/mdpi/radar.js +0 -0
  94. package/lib/v2/mdpi/router.js +0 -0
  95. package/lib/v2/mdpi/templates/description.art +0 -0
  96. package/lib/v2/medium/following.js +31 -0
  97. package/lib/v2/medium/for-you.js +31 -0
  98. package/lib/v2/medium/graphql.js +190 -0
  99. package/lib/v2/medium/list.js +32 -0
  100. package/lib/v2/medium/maintainer.js +6 -0
  101. package/lib/v2/medium/parse-article.js +60 -0
  102. package/lib/v2/medium/radar.js +23 -0
  103. package/lib/v2/medium/router.js +6 -0
  104. package/lib/v2/medium/tag.js +32 -0
  105. package/lib/v2/mihoyo/maintainer.js +1 -0
  106. package/lib/v2/mihoyo/radar.js +16 -0
  107. package/lib/v2/mihoyo/router.js +1 -0
  108. package/lib/v2/mihoyo/sr/news.js +71 -0
  109. package/lib/v2/mihoyo/templates/ys.art +4 -0
  110. package/lib/v2/mihoyo/ys/news.js +132 -52
  111. package/lib/v2/newzmz/index.js +55 -44
  112. package/lib/v2/newzmz/maintainer.js +1 -1
  113. package/lib/v2/newzmz/radar.js +1 -1
  114. package/lib/v2/newzmz/router.js +2 -1
  115. package/lib/v2/newzmz/templates/description.art +7 -0
  116. package/lib/v2/newzmz/view.js +32 -17
  117. package/lib/v2/nytimes/author.js +1 -1
  118. package/lib/v2/oeeee/app/channel.js +36 -0
  119. package/lib/v2/oeeee/app/reporter.js +30 -0
  120. package/lib/v2/oeeee/maintainer.js +5 -0
  121. package/lib/v2/oeeee/radar.js +12 -0
  122. package/lib/v2/oeeee/router.js +5 -0
  123. package/lib/v2/oeeee/templates/description.art +7 -0
  124. package/lib/v2/oeeee/utils.js +41 -0
  125. package/lib/v2/oeeee/web.js +36 -0
  126. package/lib/v2/openai/blog.js +3 -56
  127. package/lib/v2/openai/common.js +72 -0
  128. package/lib/v2/openai/maintainer.js +1 -0
  129. package/lib/v2/openai/radar.js +8 -0
  130. package/lib/v2/openai/research.js +32 -0
  131. package/lib/v2/openai/router.js +1 -0
  132. package/lib/v2/pumc/maintainer.js +3 -0
  133. package/lib/v2/pumc/mdadmission.js +62 -0
  134. package/lib/v2/pumc/radar.js +13 -0
  135. package/lib/v2/pumc/router.js +3 -0
  136. package/lib/v2/readhub/index.js +1 -1
  137. package/lib/{routes → v2}/right/forum.js +21 -23
  138. package/lib/v2/right/maintainer.js +3 -0
  139. package/lib/v2/right/radar.js +13 -0
  140. package/lib/v2/right/router.js +3 -0
  141. package/lib/v2/rsshub/radar.js +2 -2
  142. package/lib/v2/sdust/maintainer.js +3 -0
  143. package/lib/v2/sdust/radar.js +13 -0
  144. package/lib/v2/sdust/router.js +3 -0
  145. package/lib/v2/sdust/yjsy/zhaosheng.js +52 -0
  146. package/lib/v2/sina/chuangshiji.js +17 -0
  147. package/lib/v2/sina/discovery.js +32 -0
  148. package/lib/v2/sina/finance/china.js +25 -0
  149. package/lib/v2/sina/finance/stock/usstock.js +37 -0
  150. package/lib/v2/sina/maintainer.js +8 -0
  151. package/lib/v2/sina/radar.js +49 -0
  152. package/lib/v2/sina/rollnews.js +31 -0
  153. package/lib/v2/sina/router.js +8 -0
  154. package/lib/v2/sina/sports.js +43 -0
  155. package/lib/v2/sina/templates/slide.art +3 -0
  156. package/lib/v2/sina/templates/video.art +5 -0
  157. package/lib/v2/sina/utils.js +104 -0
  158. package/lib/v2/sony/downloads.js +1 -0
  159. package/lib/v2/springer/maintainer.js +0 -0
  160. package/lib/v2/springer/radar.js +0 -0
  161. package/lib/v2/springer/router.js +0 -0
  162. package/lib/v2/springer/templates/description.art +0 -0
  163. package/lib/v2/sspai/radar.js +1 -1
  164. package/lib/v2/stbu/jsjxy.js +51 -0
  165. package/lib/v2/stbu/maintainer.js +4 -0
  166. package/lib/v2/stbu/radar.js +21 -0
  167. package/lib/v2/stbu/router.js +4 -0
  168. package/lib/v2/stbu/xyxw.js +52 -0
  169. package/lib/v2/storyfm/episodes.js +63 -0
  170. package/lib/v2/storyfm/maintainer.js +4 -0
  171. package/lib/v2/storyfm/radar.js +19 -0
  172. package/lib/v2/storyfm/router.js +4 -0
  173. package/lib/v2/storyfm/templates/description.art +6 -0
  174. package/lib/v2/sysu/maintainer.js +1 -0
  175. package/lib/v2/sysu/radar.js +8 -0
  176. package/lib/v2/sysu/router.js +1 -0
  177. package/lib/v2/sysu/ygafz.js +69 -0
  178. package/lib/v2/telecompaper/maintainer.js +4 -0
  179. package/lib/{routes → v2}/telecompaper/news.js +1 -0
  180. package/lib/v2/telecompaper/radar.js +15 -0
  181. package/lib/v2/telecompaper/router.js +4 -0
  182. package/lib/v2/twitter/maintainer.js +1 -0
  183. package/lib/v2/twitter/radar.js +10 -0
  184. package/lib/v2/twitter/router.js +1 -0
  185. package/lib/v2/twitter/tweet.js +5 -0
  186. package/lib/v2/twitter/web-api/tweet.js +25 -0
  187. package/lib/v2/twitter/web-api/twitter-api.js +41 -2
  188. package/lib/v2/ustb/maintainer.js +2 -22
  189. package/lib/v2/ustb/radar.js +8 -0
  190. package/lib/v2/ustb/router.js +1 -0
  191. package/lib/{routes/universities → v2}/ustb/tj/news.js +11 -12
  192. package/lib/v2/wechat/mp.js +0 -0
  193. package/lib/v2/zcool/radar.js +6 -6
  194. package/lib/v2/zhihu/answers.js +13 -9
  195. package/lib/v2/zhihu/radar.js +2 -2
  196. package/lib/v2/zju/radar.js +1 -1
  197. package/package.json +109 -121
  198. package/lib/routes/3dm/game.js +0 -42
  199. package/lib/routes/3dm/news_center.js +0 -54
  200. package/lib/routes/cneb/guoneinews.js +0 -27
  201. package/lib/routes/cneb/yjxx.js +0 -36
  202. package/lib/routes/icable/category.js +0 -64
  203. package/lib/routes/rss3/blog.js +0 -46
  204. package/lib/routes/sina/chuangshiji.js +0 -38
  205. package/lib/routes/sina/discovery.js +0 -52
  206. package/lib/routes/sina/finance.js +0 -37
  207. package/lib/routes/sina/rollnews.js +0 -41
  208. package/lib/routes/sina/sports.js +0 -54
  209. /package/lib/{routes → v2}/storyfm/index.js +0 -0
  210. /package/lib/{routes → v2}/telecompaper/search.js +0 -0
package/README.md CHANGED
@@ -33,14 +33,6 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以
33
33
 
34
34
  ## Special Thanks
35
35
 
36
- ### Special Sponsors
37
-
38
- <p>
39
- <a href="https://rss3.io/" target="_blank"><img height="50px" src="https://i.imgur.com/vHtI4bz.png"></a>
40
- </p>
41
-
42
- [![](https://opencollective.com/static/images/become_sponsor.svg)](https://docs.rsshub.app/en/support/)
43
-
44
36
  ### Contributors
45
37
 
46
38
  [![](https://opencollective.com/RSSHub/contributors.svg?width=890)](https://github.com/DIYgod/RSSHub/graphs/contributors)
package/lib/config.js CHANGED
@@ -9,6 +9,7 @@ const calculateValue = () => {
9
9
  const twitter_tokens = {};
10
10
  const email_config = {};
11
11
  const discuz_cookies = {};
12
+ const medium_cookies = {};
12
13
 
13
14
  for (const name in envs) {
14
15
  if (name.startsWith('BILIBILI_COOKIE_')) {
@@ -23,6 +24,9 @@ const calculateValue = () => {
23
24
  } else if (name.startsWith('DISCUZ_COOKIE_')) {
24
25
  const cid = name.slice(14);
25
26
  discuz_cookies[cid] = envs[name];
27
+ } else if (name.startsWith('MEDIUM_COOKIE_')) {
28
+ const username = name.slice(14).toLowerCase();
29
+ medium_cookies[username] = envs[name];
26
30
  }
27
31
  }
28
32
 
@@ -194,7 +198,8 @@ const calculateValue = () => {
194
198
  cookie: envs.IG_COOKIE,
195
199
  },
196
200
  iwara: {
197
- cookie: envs.IWARA_COOKIE,
201
+ username: envs.IWARA_USERNAME,
202
+ password: envs.IWARA_PASSWORD,
198
203
  },
199
204
  lastfm: {
200
205
  api_key: envs.LASTFM_API_KEY,
@@ -207,6 +212,10 @@ const calculateValue = () => {
207
212
  accessToken: envs.MASTODON_API_ACCESS_TOKEN,
208
213
  acctDomain: envs.MASTODON_API_ACCT_DOMAIN,
209
214
  },
215
+ medium: {
216
+ cookies: medium_cookies,
217
+ articleCookie: envs.MEDIUM_ARTICLE_COOKIE || '',
218
+ },
210
219
  miniflux: {
211
220
  instance: envs.MINIFLUX_INSTANCE || 'https://reader.miniflux.app',
212
221
  token: envs.MINIFLUX_TOKEN || '',
@@ -1,9 +1,9 @@
1
- const Lru = require('lru-cache');
1
+ const { LRUCache } = require('lru-cache');
2
2
  const config = require('@/config').value;
3
3
 
4
4
  const status = { available: false };
5
5
 
6
- const memoryCache = new Lru({
6
+ const memoryCache = new LRUCache({
7
7
  ttl: config.cache.routeExpire * 1000,
8
8
  max: config.memory.max,
9
9
  });
@@ -1,7 +1,7 @@
1
1
  const { art, json } = require('@/utils/render');
2
2
  const path = require('path');
3
3
  const config = require('@/config').value;
4
- const typeRegex = /\.(atom|rss|debug\.json|json)$/;
4
+ const typeRegex = /\.(atom|rss|debug\.json|json|\d+\.debug\.html)$/;
5
5
  const { collapseWhitespace, convertDateToISO8601 } = require('@/utils/common-utils');
6
6
 
7
7
  module.exports = async (ctx, next) => {
@@ -26,6 +26,19 @@ module.exports = async (ctx, next) => {
26
26
  ctx.body = JSON.stringify({ message: 'plugin does not set debug json' });
27
27
  }
28
28
  }
29
+ if (outputType.endsWith('.debug.html') && config.debugInfo) {
30
+ ctx.set({
31
+ 'Content-Type': 'text/html; charset=UTF-8',
32
+ });
33
+
34
+ const index = parseInt(outputType.match(/(\d+)\.debug\.html$/)[1]);
35
+ if (!(ctx.state.data && ctx.state.data.item && ctx.state.data.item[index])) {
36
+ ctx.body = `ctx.state.data.item[${index}] not found`;
37
+ } else {
38
+ ctx.body = ctx.state.data.item[index].description;
39
+ }
40
+ }
41
+
29
42
  if (outputType === 'json') {
30
43
  ctx.set({ 'Content-Type': 'application/feed+json; charset=UTF-8' });
31
44
  }
package/lib/radar.js CHANGED
@@ -43,9 +43,28 @@ const validateRadarRules = (rule, dir) => {
43
43
  if (!item.docs.startsWith('https://docs.rsshub.app/')) {
44
44
  throw Error(`Radar rules for "${host}" in "${dir}" should start with 'https://docs.rsshub.app/'.`);
45
45
  }
46
- if ((Array.isArray(item.source) && item.source.some((s) => s.includes('#') || s.includes('='))) || (typeof item.source === 'string' && (item.source.includes('#') || item.source.includes('=')))) {
47
- // Some will try to match '/some/path?a=1' which is not supported
48
- throw Error(`Radar rules for "${host}" in "${dir}" cannot match URL hash or URL search parameters.`);
46
+ if (Array.isArray(item.source)) {
47
+ if (!item.source.length) {
48
+ // check for []
49
+ throw Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`);
50
+ }
51
+ if (item.source.some((s) => s.includes('#') || s.includes('='))) {
52
+ // Some will try to match '/some/path?a=1' which is not supported
53
+ throw Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" cannot match URL hash or URL search parameters.`);
54
+ }
55
+ if (item.source.some((s) => !s.length)) {
56
+ // check for ['/some/thing', ''] and ['']
57
+ throw Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`);
58
+ }
59
+ }
60
+ if (typeof item.source === 'string') {
61
+ if (!item.source.length) {
62
+ // check for ''
63
+ throw Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" should not be empty.`);
64
+ }
65
+ if (item.source.includes('#') || item.source.includes('=')) {
66
+ throw Error(`Radar rule of "${item.title}" for subdomain "${host}" in "${dir}" cannot match URL hash or URL search parameters.`);
67
+ }
49
68
  }
50
69
  for (const key in item) {
51
70
  if (key !== 'title' && key !== 'docs' && key !== 'source' && key !== 'target') {
package/lib/router.js CHANGED
@@ -242,8 +242,8 @@ router.get('/yande.re/post/popular_recent/:period', lazyloadRouteHandler('./rout
242
242
  // router.get('/nytimes/:lang?', lazyloadRouteHandler('./routes/nytimes/index'));
243
243
 
244
244
  // 3dm
245
- router.get('/3dm/:name/:type', lazyloadRouteHandler('./routes/3dm/game'));
246
- router.get('/3dm/news', lazyloadRouteHandler('./routes/3dm/news_center'));
245
+ // router.get('/3dm/:name/:type', lazyloadRouteHandler('./routes/3dm/game'));
246
+ // router.get('/3dm/news', lazyloadRouteHandler('./routes/3dm/news_center'));
247
247
 
248
248
  // 喜马拉雅
249
249
  router.get('/ximalaya/:type/:id/:all?', lazyloadRouteHandler('./routes/ximalaya/album'));
@@ -748,7 +748,7 @@ router.get('/shu/:type?', lazyloadRouteHandler('./routes/universities/shu/index'
748
748
  router.get('/shu/jwc/:type?', lazyloadRouteHandler('./routes/universities/shu/jwc'));
749
749
 
750
750
  // 北京科技大学天津学院
751
- router.get('/ustb/tj/news/:type?', lazyloadRouteHandler('./routes/universities/ustb/tj/news'));
751
+ // router.get('/ustb/tj/news/:type?', lazyloadRouteHandler('./routes/universities/ustb/tj/news'));
752
752
 
753
753
  // 深圳大学
754
754
  // router.get('/szu/yz/:type?', lazyloadRouteHandler('./routes/universities/szu/yz'));
@@ -1164,7 +1164,7 @@ router.get('/allpoetry/:order?', lazyloadRouteHandler('./routes/allpoetry/order'
1164
1164
  // router.get('/wallstreetcn/live/:channel?', lazyloadRouteHandler('./routes/wallstreetcn/live'));
1165
1165
 
1166
1166
  // 多抓鱼搜索
1167
- router.get('/duozhuayu/search/:wd', lazyloadRouteHandler('./routes/duozhuayu/search'));
1167
+ // router.get('/duozhuayu/search/:wd', lazyloadRouteHandler('./routes/duozhuayu/search'));
1168
1168
 
1169
1169
  // 创业邦
1170
1170
  router.get('/cyzone/author/:id', lazyloadRouteHandler('./routes/cyzone/author'));
@@ -1247,19 +1247,19 @@ router.get('/fitchratings/site/:type', lazyloadRouteHandler('./routes/fitchratin
1247
1247
  // router.get('/mpaypass/main/:type?', lazyloadRouteHandler('./routes/mpaypass/main'));
1248
1248
 
1249
1249
  // 新浪科技探索
1250
- router.get('/sina/discovery/:type', lazyloadRouteHandler('./routes/sina/discovery'));
1250
+ // router.get('/sina/discovery/:type', lazyloadRouteHandler('./routes/sina/discovery'));
1251
1251
 
1252
1252
  // 新浪科技滚动新闻
1253
- router.get('/sina/rollnews', lazyloadRouteHandler('./routes/sina/rollnews'));
1253
+ // router.get('/sina/rollnews', lazyloadRouteHandler('./routes/sina/rollnews'));
1254
1254
 
1255
1255
  // 新浪体育
1256
- router.get('/sina/sports/:type', lazyloadRouteHandler('./routes/sina/sports'));
1256
+ // router.get('/sina/sports/:type', lazyloadRouteHandler('./routes/sina/sports'));
1257
1257
 
1258
1258
  // 新浪专栏创事记
1259
- router.get('/sina/csj', lazyloadRouteHandler('./routes/sina/chuangshiji'));
1259
+ // router.get('/sina/csj', lazyloadRouteHandler('./routes/sina/chuangshiji'));
1260
1260
 
1261
1261
  // 新浪财经-国內
1262
- router.get('/sina/finance', lazyloadRouteHandler('./routes/sina/finance'));
1262
+ // router.get('/sina/finance', lazyloadRouteHandler('./routes/sina/finance'));
1263
1263
 
1264
1264
  // Animen
1265
1265
  router.get('/animen/news/:type', lazyloadRouteHandler('./routes/animen/news'));
@@ -1360,7 +1360,7 @@ router.get('/ui-cn/user/:id', lazyloadRouteHandler('./routes/ui-cn/user'));
1360
1360
  router.get('/juesheng', lazyloadRouteHandler('./routes/juesheng'));
1361
1361
 
1362
1362
  // 播客IBCラジオ イヤーマイッタマイッタ
1363
- router.get('/maitta', lazyloadRouteHandler('./routes/maitta'));
1363
+ // router.get('/maitta', lazyloadRouteHandler('./routes/maitta'));
1364
1364
 
1365
1365
  // 一些博客
1366
1366
  // 敬维-以认真的态度做完美的事情: https://jingwei.link/
@@ -1925,7 +1925,7 @@ router.get('/ctfhub/search/:limit?/:form?/:class?/:title?', lazyloadRouteHandler
1925
1925
  router.get('/liwushuo/index', lazyloadRouteHandler('./routes/liwushuo/index.js'));
1926
1926
 
1927
1927
  // 故事fm
1928
- router.get('/storyfm/index', lazyloadRouteHandler('./routes/storyfm/index.js'));
1928
+ // router.get('/storyfm/index', lazyloadRouteHandler('./routes/storyfm/index.js'));
1929
1929
 
1930
1930
  // 中国日报
1931
1931
  router.get('/chinadaily/english/:category', lazyloadRouteHandler('./routes/chinadaily/english.js'));
@@ -2017,8 +2017,8 @@ router.get('/latexstudio/home', lazyloadRouteHandler('./routes/latexstudio/home'
2017
2017
  router.get('/jskou/:type?', lazyloadRouteHandler('./routes/jskou/index'));
2018
2018
 
2019
2019
  // 国家应急广播
2020
- router.get('/cneb/yjxx', lazyloadRouteHandler('./routes/cneb/yjxx'));
2021
- router.get('/cneb/guoneinews', lazyloadRouteHandler('./routes/cneb/guoneinews'));
2020
+ // router.get('/cneb/yjxx', lazyloadRouteHandler('./routes/cneb/yjxx'));
2021
+ // router.get('/cneb/guoneinews', lazyloadRouteHandler('./routes/cneb/guoneinews'));
2022
2022
 
2023
2023
  // 邮箱
2024
2024
  router.get('/mail/imap/:email', lazyloadRouteHandler('./routes/mail/imap'));
@@ -3046,8 +3046,8 @@ router.get('/141ppv/:type/:key?', lazyloadRouteHandler('./routes/141ppv/141ppv')
3046
3046
  router.get('/curiouscat/user/:id', lazyloadRouteHandler('./routes/curiouscat/user'));
3047
3047
 
3048
3048
  // Telecompaper
3049
- router.get('/telecompaper/news/:caty/:year?/:country?/:type?', lazyloadRouteHandler('./routes/telecompaper/news'));
3050
- router.get('/telecompaper/search/:keyword?/:company?/:sort?/:period?', lazyloadRouteHandler('./routes/telecompaper/search'));
3049
+ // router.get('/telecompaper/news/:caty/:year?/:country?/:type?', lazyloadRouteHandler('./routes/telecompaper/news'));
3050
+ // router.get('/telecompaper/search/:keyword?/:company?/:sort?/:period?', lazyloadRouteHandler('./routes/telecompaper/search'));
3051
3051
 
3052
3052
  // 水木社区
3053
3053
  router.get('/newsmth/account/:id', lazyloadRouteHandler('./routes/newsmth/account'));
@@ -3459,7 +3459,7 @@ router.get('/zhimap/:categoryUuid?/:recommend?', lazyloadRouteHandler('./routes/
3459
3459
  // router.get('/fantia/user/:id', lazyloadRouteHandler('./routes/fantia/user'));
3460
3460
 
3461
3461
  // i-Cable
3462
- router.get('/icable/:category/:option?', lazyloadRouteHandler('./routes/icable/category'));
3462
+ // router.get('/icable/:category/:option?', lazyloadRouteHandler('./routes/icable/category'));
3463
3463
 
3464
3464
  // ProcessOn
3465
3465
  router.get('/processon/popular/:cate?/:sort?', lazyloadRouteHandler('./routes/processon/popular'));
@@ -3979,7 +3979,7 @@ router.get('/fnal/news/:category?', lazyloadRouteHandler('./routes/fnal/news'));
3979
3979
  router.get('/x410/news', lazyloadRouteHandler('./routes/x410/news'));
3980
3980
 
3981
3981
  // 恩山无线论坛
3982
- router.get('/right/forum/:id?', lazyloadRouteHandler('./routes/right/forum'));
3982
+ // router.get('/right/forum/:id?', lazyloadRouteHandler('./routes/right/forum'));
3983
3983
 
3984
3984
  // 香港經濟日報 migrated to v2
3985
3985
  // router.get('/hket/:category?', lazyloadRouteHandler('./routes/hket/index'));
@@ -4024,9 +4024,6 @@ router.get('/sbs/chinese/:category?/:id?/:dialect?/:language?', lazyloadRouteHan
4024
4024
  // QuestMobile
4025
4025
  router.get('/questmobile/report/:category?/:label?', lazyloadRouteHandler('./routes/questmobile/report'));
4026
4026
 
4027
- // RSS3
4028
- router.get('/rss3/blog', lazyloadRouteHandler('./routes/rss3/blog'));
4029
-
4030
4027
  // 星球日报
4031
4028
  // router.get('/odaily/activity', lazyloadRouteHandler('./routes/odaily/activity'));
4032
4029
  // router.get('/odaily/newsflash', lazyloadRouteHandler('./routes/odaily/newsflash'));
File without changes
File without changes
File without changes
File without changes
@@ -3,7 +3,7 @@ const got = require('@/utils/got');
3
3
  module.exports = async (ctx) => {
4
4
  const type = ctx.params.type || 'all';
5
5
  const rssData = {
6
- isType: ctx.params.type ? true : false,
6
+ isType: !!ctx.params.type,
7
7
  Title: `湖南省政府采购网`,
8
8
  Desc: `湖南省政府采购网`,
9
9
  Link: `http://www.ccgp-hunan.gov.cn/page/notice/more.jsp`,
File without changes
File without changes
File without changes
@@ -6,7 +6,7 @@ const logger = require('./logger');
6
6
 
7
7
  const options = {
8
8
  args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-infobars', '--window-position=0,0', '--ignore-certificate-errors', '--ignore-certificate-errors-spki-list', `--user-agent=${config.ua}`],
9
- headless: true,
9
+ headless: 'new',
10
10
  ignoreHTTPSErrors: true,
11
11
  };
12
12
 
@@ -20,7 +20,7 @@ module.exports = async (extraOptions = {}) => {
20
20
  const { addExtra } = require('puppeteer-extra');
21
21
  puppeteer = addExtra(puppeteer);
22
22
 
23
- // workaround for vercel/nft #54 and #283
23
+ // workaround for vercel/nft #54, #283, #304
24
24
  require('puppeteer-extra-plugin-stealth/evasions/chrome.app');
25
25
  require('puppeteer-extra-plugin-stealth/evasions/chrome.csi');
26
26
  require('puppeteer-extra-plugin-stealth/evasions/chrome.loadTimes');
@@ -7,10 +7,10 @@ const https = require('https');
7
7
  let agent = null;
8
8
  if (proxyUri) {
9
9
  if (proxyUri.startsWith('http')) {
10
- const HttpsProxyAgent = require('https-proxy-agent');
10
+ const { HttpsProxyAgent } = require('https-proxy-agent');
11
11
  agent = new HttpsProxyAgent(proxyUri);
12
12
  } else if (proxyUri.startsWith('socks')) {
13
- const SocksProxyAgent = require('socks-proxy-agent').SocksProxyAgent;
13
+ const { SocksProxyAgent } = require('socks-proxy-agent');
14
14
  agent = new SocksProxyAgent(proxyUri);
15
15
  }
16
16
  }
@@ -0,0 +1,39 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { parseArticle } = require('./utils');
5
+
6
+ module.exports = async (ctx) => {
7
+ const { name, type = 'news' } = ctx.params;
8
+ const url = `https://www.3dmgame.com/games/${name}/${type}/`;
9
+
10
+ const { data: response } = await got(url);
11
+ const $ = cheerio.load(response);
12
+ let listSelector;
13
+ if (type === 'resource') {
14
+ listSelector = $('.ZQ_Left .Llis_4 .lis li, .zq_left .rigtbox7 li').toArray();
15
+ } else {
16
+ listSelector = $('.ZQ_Left .lis, .zq_left .newsleft li').toArray();
17
+ }
18
+
19
+ const list = listSelector.map((i) => {
20
+ i = $(i);
21
+ const a = i.find('a[href]').last();
22
+ const time = i.find('.time');
23
+ return {
24
+ title: a.text(),
25
+ description: i.find('.miaoshu').text(),
26
+ link: a.attr('href'),
27
+ pubDate: time.length ? parseDate(time.text().trim()) : null, // 2020-12-31
28
+ };
29
+ });
30
+
31
+ const items = await Promise.all(list.map((item) => parseArticle(item, ctx.cache.tryGet)));
32
+
33
+ ctx.state.data = {
34
+ title: $('head title').text().split('_')[0],
35
+ description: $('head meta[name="Description"]').attr('content'),
36
+ link: url,
37
+ item: items,
38
+ };
39
+ };
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ '/news/:category?': ['zhboner'],
3
+ '/:name/:type?': ['sinchang', 'jacky2001114', 'HenryQW'],
4
+ };
@@ -0,0 +1,42 @@
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 { parseArticle } = require('./utils');
6
+
7
+ module.exports = async (ctx) => {
8
+ const { category = '' } = ctx.params;
9
+ const isArcPost = category && !isNaN(category); // https://www.3dmgame.com/news/\d+/
10
+ const url = `https://www.3dmgame.com/${category && category !== 'news_36_1' ? 'news/' : ''}${category ? category : 'news'}/`;
11
+ const res = await got(url);
12
+ const $ = cheerio.load(res.data);
13
+ const list = $(isArcPost ? '.selectarcpost' : '.selectpost')
14
+ .toArray()
15
+ .map((item) => {
16
+ item = $(item);
17
+ if (isArcPost) {
18
+ return {
19
+ title: item.find('.bt').text(),
20
+ link: item.attr('href'),
21
+ description: item.find('p').text(),
22
+ pubDate: timezone(parseDate(item.find('.time').text().trim()), 8),
23
+ };
24
+ }
25
+ const a = item.find('.text a');
26
+ return {
27
+ title: a.text(),
28
+ link: a.attr('href'),
29
+ description: item.find('.miaoshu').text(),
30
+ pubDate: timezone(parseDate(item.find('.time').text().trim()), 8),
31
+ };
32
+ });
33
+
34
+ const out = await Promise.all(list.map((item) => parseArticle(item, ctx.cache.tryGet)));
35
+
36
+ ctx.state.data = {
37
+ title: '3DM - ' + $('title').text().split('_')[0],
38
+ description: $('meta[name="Description"]').attr('content'),
39
+ link: url,
40
+ item: out,
41
+ };
42
+ };
@@ -0,0 +1,19 @@
1
+ module.exports = {
2
+ '3dmgame.com': {
3
+ _name: '3DMGame',
4
+ '.': [
5
+ {
6
+ title: '新闻中心',
7
+ docs: 'https://docs.rsshub.app/game.html#_3dmgame',
8
+ source: ['/news/:category?', '/news'],
9
+ target: '/3dmgame/news/:category?',
10
+ },
11
+ {
12
+ title: '游戏资讯',
13
+ docs: 'https://docs.rsshub.app/game.html#_3dmgame',
14
+ source: ['/games/:name/:type'],
15
+ target: '/3dmgame/:name/:type?',
16
+ },
17
+ ],
18
+ },
19
+ };
@@ -0,0 +1,4 @@
1
+ module.exports = (router) => {
2
+ router.get('/news/:category?', require('./news_center'));
3
+ router.get('/:name/:type?', require('./game'));
4
+ };
@@ -0,0 +1,30 @@
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
+ const parseArticle = (item, tryGet) =>
7
+ tryGet(item.link, async () => {
8
+ const { data: response } = await got(item.link);
9
+ const $ = cheerio.load(response);
10
+
11
+ if (item.link.startsWith('https://dl.3dmgame.com/')) {
12
+ const lis = $('.patchtop .lis');
13
+ const [, category, pubDate, author] = lis.text().match(/补丁类型:(.*?)\n.*整理时间:(.*?)\n.*补丁制作:(.*?)\n/s);
14
+
15
+ item.description = lis.html() + $('.L_title').html() + $('.GmL_1').html();
16
+ item.category = category;
17
+ item.pubDate = timezone(parseDate(pubDate), 8);
18
+ item.author = author;
19
+ } else {
20
+ item.description = $('.news_warp_center').html();
21
+ item.pubDate = timezone(parseDate($('.time span').text()), 8);
22
+ item.author = $('.intem li:nth-child(2) .name').text().trim();
23
+ }
24
+
25
+ return item;
26
+ });
27
+
28
+ module.exports = {
29
+ parseArticle,
30
+ };
@@ -41,6 +41,7 @@ module.exports = async (ctx) => {
41
41
  art(path.join(__dirname, 'templates/software-description.art'), {
42
42
  item,
43
43
  }),
44
+ guid: item.title + ' - ' + item.version,
44
45
  link: item.link,
45
46
  })),
46
47
  };
@@ -11,7 +11,7 @@ module.exports = {
11
11
  {
12
12
  title: 'Contests',
13
13
  docs: 'https://docs.rsshub.app/programming.html#atcoder-contests',
14
- source: ['/contests/archive', '/contests', ''],
14
+ source: ['/contests/archive', '/contests'],
15
15
  target: (params, url) =>
16
16
  `/atcoder/content/${new URL(url).searchParams.get('lang') ?? 'en'}/${new URL(url).searchParams.get('ratedType') ?? '0'}/${new URL(url).searchParams.get('category') ?? '0'}/${
17
17
  new URL(url).searchParams.get('keyword') ?? ''
@@ -11,6 +11,7 @@ module.exports = async (ctx) => {
11
11
  const uid = parseInt(ctx.params.uid);
12
12
  const sid = parseInt(ctx.params.sid);
13
13
  const disableEmbed = ctx.params.disableEmbed;
14
+ const limit = ctx.query.limit ?? 25;
14
15
 
15
16
  const link = `https://space.bilibili.com/${uid}/channel/seriesdetail?sid=${sid}`;
16
17
 
@@ -31,7 +32,7 @@ module.exports = async (ctx) => {
31
32
  return;
32
33
  }
33
34
  const [userName, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
34
- const host = `https://api.bilibili.com/x/series/archives?mid=${uid}&series_id=${sid}&only_normal=true&sort=desc&pn=1&ps=10`;
35
+ const host = `https://api.bilibili.com/x/series/archives?mid=${uid}&series_id=${sid}&only_normal=true&sort=desc&pn=1&ps=${limit}`;
35
36
 
36
37
  const response = await got(host, {
37
38
  headers: {
@@ -11,9 +11,11 @@ module.exports = async (ctx) => {
11
11
  const uid = parseInt(ctx.params.uid);
12
12
  const sid = parseInt(ctx.params.sid);
13
13
  const disableEmbed = ctx.params.disableEmbed;
14
+ const limit = ctx.query.limit ?? 25;
15
+
14
16
  const link = `https://space.bilibili.com/${uid}/channel/collectiondetail?sid=${sid}`;
15
17
  const [userName, face] = await cache.getUsernameAndFaceFromUID(ctx, uid);
16
- const host = `https://api.bilibili.com/x/polymer/space/seasons_archives_list?mid=${uid}&season_id=${sid}&sort_reverse=true&page_num=1&page_size=10`;
18
+ const host = `https://api.bilibili.com/x/polymer/space/seasons_archives_list?mid=${uid}&season_id=${sid}&sort_reverse=true&page_num=1&page_size=${limit}`;
17
19
 
18
20
  const response = await got(host, {
19
21
  headers: {
@@ -15,7 +15,7 @@ module.exports = async (ctx) => {
15
15
  const data = await ctx.cache.tryGet(
16
16
  `bilibili:vsearch:${tids}:${kw}:${order}`,
17
17
  async () => {
18
- await got('https://www.bilibili.com', {
18
+ await got('https://passport.bilibili.com/login', {
19
19
  cookieJar,
20
20
  });
21
21
 
@@ -0,0 +1,54 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+
5
+ module.exports = async (ctx) => {
6
+ const id = ctx.params.id ?? '402881027cbb8c6f017cbb8e17710002';
7
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 100;
8
+
9
+ const rootUrl = 'https://keti.bjsk.org.cn';
10
+ const currentUrl = `${rootUrl}/articleAction!to_moreList.action?entity.columnId=${id}&pagination.pageSize=${limit}`;
11
+
12
+ const response = await got({
13
+ method: 'get',
14
+ url: currentUrl,
15
+ });
16
+
17
+ const $ = cheerio.load(response.data);
18
+
19
+ let items = $('a.news')
20
+ .toArray()
21
+ .map((item) => {
22
+ item = $(item);
23
+
24
+ return {
25
+ title: item.find('.zizizi').text(),
26
+ link: `${rootUrl}${item.attr('href')}`,
27
+ pubDate: parseDate(item.find('.date').text()),
28
+ };
29
+ });
30
+
31
+ items = await Promise.all(
32
+ items.map((item) =>
33
+ ctx.cache.tryGet(item.link, async () => {
34
+ const detailResponse = await got({
35
+ method: 'get',
36
+ url: item.link,
37
+ });
38
+
39
+ const content = cheerio.load(detailResponse.data);
40
+
41
+ item.description = content('.d_text').html();
42
+ item.author = content('div.d_information p span').last().text();
43
+
44
+ return item;
45
+ })
46
+ )
47
+ );
48
+
49
+ ctx.state.data = {
50
+ title: `北京社科基金项目管理平台 - ${$('.noticetop').text()}`,
51
+ link: currentUrl,
52
+ item: items,
53
+ };
54
+ };
@@ -1,3 +1,4 @@
1
1
  module.exports = {
2
+ '/keti/:id?': ['nczitzk'],
2
3
  '/:path?': ['TonyRL'],
3
4
  };
@@ -9,5 +9,13 @@ module.exports = {
9
9
  target: (_, url) => `/bjsk/${url.split('/')[3].replace('.html', '')}`,
10
10
  },
11
11
  ],
12
+ keti: [
13
+ {
14
+ title: '基金项目管理平台',
15
+ docs: 'https://docs.rsshub.app/government.html#bei-jing-she-ke-wang',
16
+ source: ['/indexAction!to_index.action', '/'],
17
+ target: '/bjsk/keti/:id',
18
+ },
19
+ ],
12
20
  },
13
21
  };
@@ -1,3 +1,4 @@
1
1
  module.exports = (router) => {
2
+ router.get('/keti/:id?', require('./keti'));
2
3
  router.get('/:path?', require('./index'));
3
4
  };
@@ -5,7 +5,7 @@ module.exports = {
5
5
  {
6
6
  title: '观点与实践',
7
7
  docs: 'https://docs.rsshub.app/study.html#zhong-guo-zhi-ku-wang',
8
- source: '',
8
+ source: '/',
9
9
  target: (params, url) => `/chinathinktanks/${new URL(url).searchParams.get('id')}`,
10
10
  },
11
11
  ],