rsshub 1.0.0-master.d5165be → 1.0.0-master.d5a952a

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 (297) hide show
  1. package/lib/config.js +4 -0
  2. package/lib/middleware/cache/index.js +3 -0
  3. package/lib/radar-rules.js +0 -85
  4. package/lib/router.js +30 -30
  5. package/lib/routes/bbc/index.js +1 -0
  6. package/lib/routes/nintendo/utils.js +1 -1
  7. package/lib/routes/sankakucomplex/post.js +1 -4
  8. package/lib/v2/aicaijing/index.js +73 -0
  9. package/lib/v2/aicaijing/maintainer.js +6 -0
  10. package/lib/v2/aicaijing/radar.js +31 -0
  11. package/lib/v2/aicaijing/router.js +3 -0
  12. package/lib/v2/aicaijing/templates/description.art +4 -0
  13. package/lib/v2/appledaily/index.js +7 -11
  14. package/lib/v2/baidu/maintainer.js +7 -0
  15. package/lib/v2/baidu/radar.js +52 -0
  16. package/lib/v2/baidu/router.js +7 -0
  17. package/lib/v2/baidu/templates/forum.art +1 -0
  18. package/lib/v2/baidu/templates/post.art +4 -0
  19. package/lib/v2/baidu/tieba/forum.js +64 -0
  20. package/lib/{routes → v2/baidu}/tieba/post.js +30 -16
  21. package/lib/v2/baidu/tieba/user.js +33 -0
  22. package/lib/v2/bangumi/maintainer.js +1 -0
  23. package/lib/v2/bangumi/online.js +26 -0
  24. package/lib/v2/bangumi/radar.js +13 -2
  25. package/lib/v2/bangumi/router.js +1 -0
  26. package/lib/v2/bangumi/templates/image.art +1 -0
  27. package/lib/v2/bilibili/collection.js +34 -0
  28. package/lib/v2/bilibili/maintainer.js +2 -0
  29. package/lib/v2/bilibili/radar.js +9 -0
  30. package/lib/v2/bilibili/router.js +1 -0
  31. package/lib/v2/china/maintainer.js +4 -0
  32. package/lib/v2/china/news/highlights/news.js +40 -0
  33. package/lib/v2/china/news/military/news.js +31 -0
  34. package/lib/v2/china/radar.js +21 -0
  35. package/lib/v2/china/router.js +4 -0
  36. package/lib/v2/csdn/blog.js +39 -0
  37. package/lib/v2/csdn/maintainer.js +3 -0
  38. package/lib/v2/csdn/radar.js +13 -0
  39. package/lib/v2/csdn/router.js +3 -0
  40. package/lib/v2/csu/cse.js +1 -1
  41. package/lib/v2/diershoubing/maintainer.js +3 -0
  42. package/lib/v2/diershoubing/news.js +50 -0
  43. package/lib/v2/diershoubing/radar.js +13 -0
  44. package/lib/v2/diershoubing/router.js +3 -0
  45. package/lib/v2/diershoubing/templates/news.art +9 -0
  46. package/lib/v2/douyin/live.js +4 -4
  47. package/lib/v2/douyu/group.js +45 -0
  48. package/lib/v2/douyu/maintainer.js +5 -0
  49. package/lib/v2/douyu/post.js +58 -0
  50. package/lib/v2/douyu/radar.js +27 -0
  51. package/lib/{routes → v2}/douyu/room.js +0 -0
  52. package/lib/v2/douyu/router.js +5 -0
  53. package/lib/v2/douyu/templates/description.art +14 -0
  54. package/lib/v2/ehentai/ehapi.js +44 -11
  55. package/lib/v2/ehentai/maintainer.js +3 -3
  56. package/lib/v2/github/comments.js +4 -5
  57. package/lib/v2/gocn/jobs.js +23 -0
  58. package/lib/v2/gocn/maintainer.js +2 -1
  59. package/lib/v2/gocn/radar.js +6 -0
  60. package/lib/v2/gocn/router.js +1 -0
  61. package/lib/v2/gocn/topics.js +7 -12
  62. package/lib/v2/gocn/util.js +17 -0
  63. package/lib/v2/gov/cnnic/index.js +54 -0
  64. package/lib/v2/gov/maintainer.js +2 -0
  65. package/lib/v2/gov/mofcom/article.js +68 -0
  66. package/lib/v2/gov/nrta/news.js +0 -1
  67. package/lib/v2/gov/radar.js +22 -0
  68. package/lib/v2/gov/router.js +2 -0
  69. package/lib/v2/hupu/bbs.js +23 -23
  70. package/lib/v2/huxiu/maintainer.js +1 -0
  71. package/lib/v2/huxiu/moment.js +40 -0
  72. package/lib/v2/huxiu/radar.js +6 -0
  73. package/lib/v2/huxiu/router.js +1 -0
  74. package/lib/v2/huxiu/templates/moment.art +16 -0
  75. package/lib/v2/iresearch/maintainer.js +1 -0
  76. package/lib/v2/iresearch/radar.js +7 -1
  77. package/lib/v2/iresearch/router.js +1 -0
  78. package/lib/v2/iresearch/templates/weekly.art +11 -0
  79. package/lib/v2/iresearch/weekly.js +39 -0
  80. package/lib/v2/islander/maintainer.js +4 -0
  81. package/lib/v2/islander/radar.js +19 -0
  82. package/lib/v2/islander/router.js +4 -0
  83. package/lib/v2/islander/search.js +33 -0
  84. package/lib/v2/islander/top30event.js +28 -0
  85. package/lib/v2/iwara/maintainer.js +1 -0
  86. package/lib/v2/iwara/radar.js +6 -0
  87. package/lib/v2/iwara/router.js +1 -0
  88. package/lib/v2/iwara/subscriptions.js +49 -0
  89. package/lib/v2/iwara/templates/subscriptions.art +1 -0
  90. package/lib/v2/javbus/maintainer.js +18 -0
  91. package/lib/v2/jiemian/list.js +60 -0
  92. package/lib/v2/jiemian/maintainer.js +4 -0
  93. package/lib/v2/jiemian/radar.js +19 -0
  94. package/lib/v2/jiemian/router.js +4 -0
  95. package/lib/v2/leetcode/dailyquestion-solution-cn.js +183 -0
  96. package/lib/v2/leetcode/dailyquestion-solution-en.js +213 -0
  97. package/lib/v2/leetcode/maintainer.js +1 -0
  98. package/lib/v2/leetcode/radar.js +12 -0
  99. package/lib/v2/leetcode/router.js +2 -0
  100. package/lib/v2/lovelive-anime/maintainer.js +3 -0
  101. package/lib/v2/lovelive-anime/news.js +56 -0
  102. package/lib/v2/lovelive-anime/radar.js +13 -0
  103. package/lib/v2/lovelive-anime/router.js +3 -0
  104. package/lib/v2/lovelive-anime/templates/description.art +1 -0
  105. package/lib/v2/macfilos/blog.js +61 -0
  106. package/lib/v2/macfilos/maintainer.js +3 -0
  107. package/lib/v2/macfilos/radar.js +13 -0
  108. package/lib/v2/macfilos/router.js +3 -0
  109. package/lib/v2/meteor/boards.js +11 -0
  110. package/lib/v2/meteor/index.js +45 -0
  111. package/lib/v2/meteor/maintainer.js +4 -0
  112. package/lib/v2/meteor/radar.js +19 -0
  113. package/lib/v2/meteor/router.js +4 -0
  114. package/lib/v2/meteor/templates/desc.art +7 -0
  115. package/lib/v2/meteor/utils.js +90 -0
  116. package/lib/v2/nga/post.js +61 -9
  117. package/lib/v2/nikkei-cn/index.js +4 -1
  118. package/lib/v2/nua/gra.js +56 -0
  119. package/lib/v2/nua/maintainer.js +3 -0
  120. package/lib/v2/nua/radar.js +13 -0
  121. package/lib/v2/nua/router.js +3 -0
  122. package/lib/v2/nuaa/college/cae.js +85 -0
  123. package/lib/v2/nuaa/{cs/index.js → college/cs.js} +9 -9
  124. package/lib/v2/nuaa/jwc/jwc.js +8 -8
  125. package/lib/v2/nuaa/maintainer.js +3 -2
  126. package/lib/v2/nuaa/radar.js +6 -0
  127. package/lib/v2/nuaa/router.js +3 -2
  128. package/lib/v2/nuaa/utils/pypasswaf.js +1 -3
  129. package/lib/v2/nuaa/yjsy/yjsy.js +66 -41
  130. package/lib/{routes/universities → v2}/nuist/bulletin.js +8 -8
  131. package/lib/v2/nuist/cas.js +71 -0
  132. package/lib/v2/nuist/jwc.js +43 -0
  133. package/lib/v2/nuist/library/lib.js +43 -0
  134. package/lib/v2/nuist/maintainer.js +10 -0
  135. package/lib/v2/nuist/radar.js +69 -0
  136. package/lib/v2/nuist/router.js +10 -0
  137. package/lib/v2/nuist/scs.js +49 -0
  138. package/lib/v2/nuist/sese.js +45 -0
  139. package/lib/v2/nuist/xgc.js +49 -0
  140. package/lib/v2/nuist/yjs.js +60 -0
  141. package/lib/v2/oreno3d/get_sec_page_data.js +75 -0
  142. package/lib/v2/oreno3d/main.js +157 -0
  143. package/lib/v2/oreno3d/maintainer.js +7 -0
  144. package/lib/v2/oreno3d/radar.js +52 -0
  145. package/lib/v2/oreno3d/router.js +7 -0
  146. package/lib/v2/oreno3d/templates/description.art +13 -0
  147. package/lib/v2/oschina/maintainer.js +6 -0
  148. package/lib/{routes → v2}/oschina/news.js +35 -39
  149. package/lib/v2/oschina/radar.js +33 -0
  150. package/lib/v2/oschina/router.js +6 -0
  151. package/lib/v2/oschina/topic.js +53 -0
  152. package/lib/v2/oschina/user.js +50 -0
  153. package/lib/v2/pianyuan/search.js +1 -1
  154. package/lib/v2/pianyuan/utils.js +1 -1
  155. package/lib/{routes → v2}/pixiv/api/getBookmarks.js +1 -3
  156. package/lib/{routes → v2}/pixiv/api/getIllustFollows.js +1 -3
  157. package/lib/{routes → v2}/pixiv/api/getIllusts.js +1 -3
  158. package/lib/{routes → v2}/pixiv/api/getRanking.js +1 -3
  159. package/lib/{routes → v2}/pixiv/api/getUserDetail.js +1 -3
  160. package/lib/{routes → v2}/pixiv/api/searchIllust.js +1 -3
  161. package/lib/{routes → v2}/pixiv/api/searchPopularIllust.js +1 -3
  162. package/lib/{routes → v2}/pixiv/bookmarks.js +4 -3
  163. package/lib/{routes → v2}/pixiv/constants.js +0 -0
  164. package/lib/{routes → v2}/pixiv/illustfollow.js +5 -4
  165. package/lib/v2/pixiv/maintainer.js +8 -0
  166. package/lib/v2/pixiv/novels.js +35 -0
  167. package/lib/{routes → v2}/pixiv/pixiv-got.js +1 -1
  168. package/lib/v2/pixiv/radar.js +43 -0
  169. package/lib/{routes → v2}/pixiv/ranking.js +4 -3
  170. package/lib/v2/pixiv/router.js +8 -0
  171. package/lib/{routes → v2}/pixiv/search.js +4 -3
  172. package/lib/v2/pixiv/token.js +86 -0
  173. package/lib/{routes → v2}/pixiv/user.js +4 -3
  174. package/lib/{routes → v2}/pixiv/utils.js +0 -0
  175. package/lib/v2/plurk/anonymous.js +23 -0
  176. package/lib/v2/plurk/hotlinks.js +20 -0
  177. package/lib/v2/plurk/maintainer.js +9 -0
  178. package/lib/v2/plurk/news.js +23 -0
  179. package/lib/v2/plurk/radar.js +56 -0
  180. package/lib/v2/plurk/router.js +9 -0
  181. package/lib/v2/plurk/search.js +27 -0
  182. package/lib/v2/plurk/top.js +29 -0
  183. package/lib/v2/plurk/topic.js +33 -0
  184. package/lib/v2/plurk/user.js +31 -0
  185. package/lib/v2/plurk/utils.js +56 -0
  186. package/lib/v2/polkadot/home.js +34 -0
  187. package/lib/v2/polkadot/maintainer.js +3 -0
  188. package/lib/v2/polkadot/radar.js +13 -0
  189. package/lib/v2/polkadot/router.js +3 -0
  190. package/lib/v2/remnote/changelog.js +33 -0
  191. package/lib/v2/remnote/maintainer.js +3 -0
  192. package/lib/v2/remnote/radar.js +13 -0
  193. package/lib/v2/remnote/router.js +3 -0
  194. package/lib/v2/rustcc/jobs.js +39 -0
  195. package/lib/v2/rustcc/maintainer.js +3 -0
  196. package/lib/v2/rustcc/radar.js +13 -0
  197. package/lib/v2/rustcc/router.js +3 -0
  198. package/lib/v2/segmentfault/blogs.js +38 -0
  199. package/lib/v2/segmentfault/maintainer.js +1 -0
  200. package/lib/v2/segmentfault/radar.js +8 -2
  201. package/lib/v2/segmentfault/router.js +1 -0
  202. package/lib/v2/sensortower/blog.js +69 -0
  203. package/lib/v2/sensortower/maintainer.js +3 -0
  204. package/lib/v2/sensortower/radar.js +13 -0
  205. package/lib/v2/sensortower/router.js +3 -0
  206. package/lib/v2/sensortower/templates/description.art +9 -0
  207. package/lib/v2/stheadline/maintainer.js +3 -0
  208. package/lib/v2/stheadline/radar.js +13 -0
  209. package/lib/v2/stheadline/router.js +3 -0
  210. package/lib/v2/stheadline/std/realtime.js +46 -0
  211. package/lib/v2/studygolang/jobs.js +37 -0
  212. package/lib/v2/studygolang/maintainer.js +3 -0
  213. package/lib/v2/studygolang/radar.js +13 -0
  214. package/lib/v2/studygolang/router.js +3 -0
  215. package/lib/v2/taptap/changelog.js +11 -10
  216. package/lib/v2/taptap/maintainer.js +3 -1
  217. package/lib/v2/taptap/radar.js +17 -0
  218. package/lib/v2/taptap/review.js +83 -21
  219. package/lib/v2/taptap/router.js +4 -1
  220. package/lib/v2/taptap/templates/imagePost.art +3 -0
  221. package/lib/v2/taptap/templates/videoPost.art +2 -1
  222. package/lib/v2/taptap/topic.js +36 -30
  223. package/lib/v2/taptap/utils.js +19 -13
  224. package/lib/v2/test/index.js +15 -0
  225. package/lib/v2/thenewslens/index.js +79 -0
  226. package/lib/v2/thenewslens/maintainer.js +10 -0
  227. package/lib/v2/thenewslens/radar.js +55 -0
  228. package/lib/v2/thenewslens/router.js +3 -0
  229. package/lib/v2/thenewslens/templates/description.art +6 -0
  230. package/lib/v2/trending/allTrending.js +46 -19
  231. package/lib/v2/trending/templates/content.art +1 -0
  232. package/lib/v2/trow/portal.js +13 -3
  233. package/lib/v2/twitter/maintainer.js +1 -1
  234. package/lib/v2/twitter/router.js +1 -1
  235. package/lib/v2/twitter/web-api/twitter-api.js +1 -0
  236. package/lib/v2/ustc/job.js +2 -2
  237. package/lib/v2/vom/featured.js +50 -0
  238. package/lib/v2/vom/maintainer.js +3 -0
  239. package/lib/v2/vom/radar.js +13 -0
  240. package/lib/v2/vom/router.js +3 -0
  241. package/lib/v2/warthunder/maintainer.js +3 -0
  242. package/lib/v2/warthunder/news.js +49 -0
  243. package/lib/v2/warthunder/radar.js +13 -0
  244. package/lib/v2/warthunder/router.js +3 -0
  245. package/lib/v2/warthunder/templates/description.art +1 -0
  246. package/lib/v2/wechat/feeddd.js +1 -0
  247. package/lib/v2/wizfile/index.js +41 -0
  248. package/lib/v2/wizfile/maintainer.js +3 -0
  249. package/lib/v2/wizfile/radar.js +13 -0
  250. package/lib/v2/wizfile/router.js +3 -0
  251. package/lib/v2/xjtu/dyyy/index.js +44 -0
  252. package/lib/v2/xjtu/maintainer.js +1 -0
  253. package/lib/v2/xjtu/radar.js +8 -0
  254. package/lib/v2/xjtu/router.js +1 -0
  255. package/lib/v2/xmnn/epaper.js +85 -0
  256. package/lib/v2/xmnn/maintainer.js +3 -0
  257. package/lib/v2/xmnn/radar.js +13 -0
  258. package/lib/v2/xmnn/router.js +3 -0
  259. package/lib/v2/xyzrank/index.js +111 -0
  260. package/lib/v2/xyzrank/maintainer.js +6 -0
  261. package/lib/v2/xyzrank/radar.js +31 -0
  262. package/lib/v2/xyzrank/router.js +3 -0
  263. package/lib/v2/xyzrank/templates/description.art +12 -0
  264. package/lib/v2/youtube/channel.js +1 -0
  265. package/lib/v2/youtube/user.js +1 -0
  266. package/lib/v2/zaobao/maintainer.js +1 -1
  267. package/lib/v2/zaobao/util.js +6 -6
  268. package/lib/v2/zuvio/boards.js +14 -0
  269. package/lib/v2/zuvio/radar.js +13 -0
  270. package/lib/v2/zuvio/router.js +4 -0
  271. package/lib/v2/zuvio/student5.js +58 -0
  272. package/lib/v2/zuvio/templates/img.art +2 -0
  273. package/lib/v2/zuvio/templates/link.art +7 -0
  274. package/lib/v2/zuvio/templates/ref_article.art +8 -0
  275. package/lib/v2/zuvio/templates/rss.art +1 -0
  276. package/lib/v2/zuvio/templates/youtube.art +2 -0
  277. package/lib/v2/zuvio/utils.js +61 -0
  278. package/package.json +20 -13
  279. package/lib/routes/erbingapp/news.js +0 -51
  280. package/lib/routes/jiemian/list.js +0 -48
  281. package/lib/routes/jiemian/utils.js +0 -26
  282. package/lib/routes/mofcom/article.js +0 -54
  283. package/lib/routes/oschina/topic.js +0 -54
  284. package/lib/routes/oschina/u.js +0 -57
  285. package/lib/routes/oschina/user.js +0 -57
  286. package/lib/routes/pixiv/token.js +0 -74
  287. package/lib/routes/tieba/forum.js +0 -88
  288. package/lib/routes/tieba/user.js +0 -36
  289. package/lib/routes/universities/nuist/cas.js +0 -60
  290. package/lib/routes/universities/nuist/jwc.js +0 -66
  291. package/lib/routes/universities/nuist/library/lib.js +0 -32
  292. package/lib/routes/universities/nuist/scs.js +0 -60
  293. package/lib/routes/universities/nuist/sese.js +0 -60
  294. package/lib/routes/universities/nuist/xgc.js +0 -48
  295. package/lib/routes/universities/nuist/yjs.js +0 -63
  296. package/lib/v2/appledaily/templates/content.art +0 -7
  297. package/lib/v2/hupu/templates/description.art +0 -6
package/lib/config.js CHANGED
@@ -134,6 +134,7 @@ const calculateValue = () => {
134
134
  ipb_pass_hash: envs.EH_IPB_PASS_HASH,
135
135
  sk: envs.EH_SK,
136
136
  igneous: envs.EH_IGNEOUS,
137
+ star: envs.EH_STAR,
137
138
  img_proxy: envs.EH_IMG_PROXY,
138
139
  },
139
140
  email: {
@@ -178,6 +179,9 @@ const calculateValue = () => {
178
179
  password: envs.IG_PASSWORD,
179
180
  proxy: envs.IG_PROXY,
180
181
  },
182
+ iwara: {
183
+ cookie: envs.IWARA_COOKIE,
184
+ },
181
185
  lastfm: {
182
186
  api_key: envs.LASTFM_API_KEY,
183
187
  },
@@ -56,6 +56,9 @@ module.exports = function (app) {
56
56
  app.context.cache = {
57
57
  ...cacheModule,
58
58
  tryGet: async (key, getValueFunc, maxAge = config.cache.contentExpire, refresh = true) => {
59
+ if (typeof key !== 'string') {
60
+ throw Error('Cache key must be a string');
61
+ }
59
62
  let v = await get(key, refresh);
60
63
  if (!v) {
61
64
  v = await getValueFunc();
@@ -45,41 +45,6 @@ module.exports = {
45
45
  },
46
46
  ],
47
47
  },
48
- 'pixiv.net': {
49
- _name: 'Pixiv',
50
- www: [
51
- {
52
- title: '用户收藏',
53
- docs: 'https://docs.rsshub.app/social-media.html#pixiv',
54
- source: '/users/:id/bookmarks/artworks',
55
- target: '/pixiv/user/bookmarks/:id',
56
- },
57
- {
58
- title: '用户动态',
59
- docs: 'https://docs.rsshub.app/social-media.html#pixiv',
60
- source: '/users/:id',
61
- target: '/pixiv/user/:id',
62
- },
63
- {
64
- title: '排行榜',
65
- docs: 'https://docs.rsshub.app/social-media.html#pixiv',
66
- source: '/ranking.php',
67
- target: (params, url) => `/pixiv/ranking/${new URL(url).searchParams.get('mode') || 'daily'}`,
68
- },
69
- {
70
- title: '关键词',
71
- docs: 'https://docs.rsshub.app/social-media.html#pixiv',
72
- source: ['/tags/:keyword', '/tags/:keyword/:type?'],
73
- target: (params, url) => `/pixiv/search/:keyword/${new URL(url).searchParams.get('order')}/${new URL(url).searchParams.get('mode')}`,
74
- },
75
- {
76
- title: '关注的新作品',
77
- docs: 'https://docs.rsshub.app/social-media.html#pixiv',
78
- source: '/bookmark_new_illust.php',
79
- target: '/pixiv/user/illustfollows',
80
- },
81
- ],
82
- },
83
48
  'smzdm.com': {
84
49
  _name: '什么值得买',
85
50
  www: [
@@ -246,56 +211,6 @@ module.exports = {
246
211
  },
247
212
  ],
248
213
  },
249
- 'baidu.com': {
250
- _name: '贴吧',
251
- tieba: [
252
- {
253
- title: '帖子列表',
254
- docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
255
- source: 'f',
256
- target: (params, url) => {
257
- const type = new URL(url).searchParams.get('tab');
258
- if (!type || type === 'main') {
259
- return `/tieba/forum/${new URL(url).searchParams.get('kw')}`;
260
- }
261
- },
262
- },
263
- {
264
- title: '精品帖子',
265
- docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
266
- source: 'f',
267
- target: (params, url) => {
268
- const type = new URL(url).searchParams.get('tab');
269
- if (type === 'good') {
270
- return `/tieba/forum/good/${new URL(url).searchParams.get('kw')}`;
271
- }
272
- },
273
- },
274
- {
275
- title: '帖子动态',
276
- docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
277
- source: '/p/:id',
278
- target: '/tieba/post/:id',
279
- },
280
- {
281
- title: '只看楼主',
282
- docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
283
- source: '/p/:id',
284
- target: '/tieba/post/lz/:id',
285
- },
286
- {
287
- title: '用户帖子',
288
- docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
289
- source: '/home/main',
290
- target: (params, url) => {
291
- const uid = new URL(url).searchParams.get('un');
292
- if (uid) {
293
- return `/tieba/user/${uid}`;
294
- }
295
- },
296
- },
297
- ],
298
- },
299
214
  'wineyun.com': {
300
215
  _name: '酒云网',
301
216
  www: [
package/lib/router.js CHANGED
@@ -54,12 +54,12 @@ router.get('/weibo/search/hot', lazyloadRouteHandler('./routes/weibo/search/hot'
54
54
  router.get('/weibo/super_index/:id/:type?/:routeParams?', lazyloadRouteHandler('./routes/weibo/super_index'));
55
55
  router.get('/weibo/oasis/user/:userid', lazyloadRouteHandler('./routes/weibo/oasis/user'));
56
56
 
57
- // 贴吧
58
- router.get('/tieba/forum/:kw', lazyloadRouteHandler('./routes/tieba/forum'));
59
- router.get('/tieba/forum/good/:kw/:cid?', lazyloadRouteHandler('./routes/tieba/forum'));
60
- router.get('/tieba/post/:id', lazyloadRouteHandler('./routes/tieba/post'));
61
- router.get('/tieba/post/lz/:id', lazyloadRouteHandler('./routes/tieba/post'));
62
- router.get('/tieba/user/:uid', lazyloadRouteHandler('./routes/tieba/user'));
57
+ // 贴吧 migrated to v2
58
+ // router.get('/tieba/forum/:kw', lazyloadRouteHandler('./routes/tieba/forum'));
59
+ // router.get('/tieba/forum/good/:kw/:cid?', lazyloadRouteHandler('./routes/tieba/forum'));
60
+ // router.get('/tieba/post/:id', lazyloadRouteHandler('./routes/tieba/post'));
61
+ // router.get('/tieba/post/lz/:id', lazyloadRouteHandler('./routes/tieba/post'));
62
+ // router.get('/tieba/user/:uid', lazyloadRouteHandler('./routes/tieba/user'));
63
63
 
64
64
  // 网易云音乐
65
65
  router.get('/ncm/playlist/:id', lazyloadRouteHandler('./routes/ncm/playlist'));
@@ -116,12 +116,12 @@ router.get('/mzitu/category/:category', lazyloadRouteHandler('./routes/mzitu/cat
116
116
  router.get('/mzitu/post/:id', lazyloadRouteHandler('./routes/mzitu/post'));
117
117
  router.get('/mzitu/tag/:tag', lazyloadRouteHandler('./routes/mzitu/tag'));
118
118
 
119
- // pixiv
120
- router.get('/pixiv/user/bookmarks/:id', lazyloadRouteHandler('./routes/pixiv/bookmarks'));
121
- router.get('/pixiv/user/illustfollows', lazyloadRouteHandler('./routes/pixiv/illustfollow'));
122
- router.get('/pixiv/user/:id', lazyloadRouteHandler('./routes/pixiv/user'));
123
- router.get('/pixiv/ranking/:mode/:date?', lazyloadRouteHandler('./routes/pixiv/ranking'));
124
- router.get('/pixiv/search/:keyword/:order?/:mode?', lazyloadRouteHandler('./routes/pixiv/search'));
119
+ // pixiv migrated to v2
120
+ // router.get('/pixiv/user/bookmarks/:id', lazyloadRouteHandler('./routes/pixiv/bookmarks'));
121
+ // router.get('/pixiv/user/illustfollows', lazyloadRouteHandler('./routes/pixiv/illustfollow'));
122
+ // router.get('/pixiv/user/:id', lazyloadRouteHandler('./routes/pixiv/user'));
123
+ // router.get('/pixiv/ranking/:mode/:date?', lazyloadRouteHandler('./routes/pixiv/ranking'));
124
+ // router.get('/pixiv/search/:keyword/:order?/:mode?', lazyloadRouteHandler('./routes/pixiv/search'));
125
125
 
126
126
  // pixiv-fanbox
127
127
  router.get('/fanbox/:user?', lazyloadRouteHandler('./routes/fanbox/main'));
@@ -170,7 +170,7 @@ router.get('/geektime/column/:cid', lazyloadRouteHandler('./routes/geektime/colu
170
170
  router.get('/geektime/news', lazyloadRouteHandler('./routes/geektime/news'));
171
171
 
172
172
  // 界面新闻
173
- router.get('/jiemian/list/:cid', lazyloadRouteHandler('./routes/jiemian/list.js'));
173
+ // router.get('/jiemian/list/:cid', lazyloadRouteHandler('./routes/jiemian/list.js'));
174
174
 
175
175
  // 好奇心日报
176
176
  router.get('/qdaily/:type/:id', lazyloadRouteHandler('./routes/qdaily/index'));
@@ -188,7 +188,7 @@ router.get('/dribbble/user/:name', lazyloadRouteHandler('./routes/dribbble/user'
188
188
  router.get('/dribbble/keyword/:keyword', lazyloadRouteHandler('./routes/dribbble/keyword'));
189
189
 
190
190
  // 斗鱼
191
- router.get('/douyu/room/:id', lazyloadRouteHandler('./routes/douyu/room'));
191
+ // router.get('/douyu/room/:id', lazyloadRouteHandler('./routes/douyu/room'));
192
192
 
193
193
  // 虎牙
194
194
  router.get('/huya/live/:id', lazyloadRouteHandler('./routes/huya/live'));
@@ -396,11 +396,11 @@ router.get('/gwern/:category', lazyloadRouteHandler('./routes/gwern/category'));
396
396
  // LinkedKeeper
397
397
  router.get('/linkedkeeper/:type/:id?', lazyloadRouteHandler('./routes/linkedkeeper/index'));
398
398
 
399
- // 开源中国
400
- router.get('/oschina/news/:category?', lazyloadRouteHandler('./routes/oschina/news'));
401
- router.get('/oschina/user/:id', lazyloadRouteHandler('./routes/oschina/user'));
402
- router.get('/oschina/u/:id', lazyloadRouteHandler('./routes/oschina/u'));
403
- router.get('/oschina/topic/:topic', lazyloadRouteHandler('./routes/oschina/topic'));
399
+ // 开源中国 migrated to v2
400
+ // router.get('/oschina/news/:category?', lazyloadRouteHandler('./routes/oschina/news'));
401
+ // router.get('/oschina/user/:id', lazyloadRouteHandler('./routes/oschina/user'));
402
+ // router.get('/oschina/u/:id', lazyloadRouteHandler('./routes/oschina/u'));
403
+ // router.get('/oschina/topic/:topic', lazyloadRouteHandler('./routes/oschina/topic'));
404
404
 
405
405
  // MIT Technology Review
406
406
  router.get('/technologyreview', lazyloadRouteHandler('./routes/technologyreview/index'));
@@ -614,14 +614,14 @@ router.get('/cqu/sci/:category', lazyloadRouteHandler('./routes/universities/cqu
614
614
  router.get('/cqu/net/:category', lazyloadRouteHandler('./routes/universities/cqu/net/info'));
615
615
 
616
616
  // 南京信息工程大学
617
- router.get('/nuist/bulletin/:category?', lazyloadRouteHandler('./routes/universities/nuist/bulletin'));
618
- router.get('/nuist/jwc/:category?', lazyloadRouteHandler('./routes/universities/nuist/jwc'));
619
- router.get('/nuist/yjs/:category?', lazyloadRouteHandler('./routes/universities/nuist/yjs'));
620
- router.get('/nuist/xgc', lazyloadRouteHandler('./routes/universities/nuist/xgc'));
621
- router.get('/nuist/scs/:category?', lazyloadRouteHandler('./routes/universities/nuist/scs'));
622
- router.get('/nuist/lib', lazyloadRouteHandler('./routes/universities/nuist/library/lib'));
623
- router.get('/nuist/sese/:category?', lazyloadRouteHandler('./routes/universities/nuist/sese'));
624
- router.get('/nuist/cas/:category?', lazyloadRouteHandler('./routes/universities/nuist/cas'));
617
+ // router.get('/nuist/bulletin/:category?', lazyloadRouteHandler('./routes/universities/nuist/bulletin'));
618
+ // router.get('/nuist/jwc/:category?', lazyloadRouteHandler('./routes/universities/nuist/jwc'));
619
+ // router.get('/nuist/yjs/:category?', lazyloadRouteHandler('./routes/universities/nuist/yjs'));
620
+ // router.get('/nuist/xgc', lazyloadRouteHandler('./routes/universities/nuist/xgc'));
621
+ // router.get('/nuist/scs/:category?', lazyloadRouteHandler('./routes/universities/nuist/scs'));
622
+ // router.get('/nuist/lib', lazyloadRouteHandler('./routes/universities/nuist/library/lib'));
623
+ // router.get('/nuist/sese/:category?', lazyloadRouteHandler('./routes/universities/nuist/sese'));
624
+ // router.get('/nuist/cas/:category?', lazyloadRouteHandler('./routes/universities/nuist/cas'));
625
625
 
626
626
  // 成都信息工程大学
627
627
  router.get('/cuit/cxxww/:type?', lazyloadRouteHandler('./routes/universities/cuit/cxxww'));
@@ -1945,8 +1945,8 @@ router.get('/dhl/:id', lazyloadRouteHandler('./routes/dhl/shipment-tracking'));
1945
1945
  // Japanpost
1946
1946
  router.get('/japanpost/track/:reqCode/:locale?', lazyloadRouteHandler('./routes/japanpost/track'));
1947
1947
 
1948
- // 中华人民共和国商务部
1949
- router.get('/mofcom/article/:suffix', lazyloadRouteHandler('./routes/mofcom/article'));
1948
+ // 中华人民共和国商务部 migrated to v2
1949
+ // router.get('/mofcom/article/:suffix', lazyloadRouteHandler('./routes/mofcom/article'));
1950
1950
 
1951
1951
  // 品玩
1952
1952
  router.get('/pingwest/status', lazyloadRouteHandler('./routes/pingwest/status'));
@@ -2962,7 +2962,7 @@ router.get('/tapechat/questionbox/:sharecode/:pagesize?', lazyloadRouteHandler('
2962
2962
  router.get('/amd/graphicsdrivers/:id/:rid?', lazyloadRouteHandler('./routes/amd/graphicsdrivers'));
2963
2963
 
2964
2964
  // 二柄APP
2965
- router.get('/erbingapp/news', lazyloadRouteHandler('./routes/erbingapp/news'));
2965
+ // router.get('/erbingapp/news', lazyloadRouteHandler('./routes/erbingapp/news'));
2966
2966
 
2967
2967
  // 电商报
2968
2968
  router.get('/dsb/area/:area', lazyloadRouteHandler('./routes/dsb/area'));
@@ -85,6 +85,7 @@ module.exports = async (ctx) => {
85
85
  ctx.state.data = {
86
86
  title,
87
87
  link,
88
+ image: 'https://www.bbc.com/favicon.ico',
88
89
  description: title,
89
90
  item: items,
90
91
  };
@@ -65,7 +65,7 @@ const ProcessItem = (list, caches) =>
65
65
  const ProcessNews = (list, caches) =>
66
66
  Promise.all(
67
67
  list.map(async (item) => {
68
- const other = await caches.tryGet(item.link, () => loadNews('https://www.nintendo.com.hk' + item.url));
68
+ const other = await caches.tryGet(item.url, () => loadNews('https://www.nintendo.com.hk' + item.url));
69
69
  return Promise.resolve(Object.assign({}, item, other));
70
70
  })
71
71
  );
@@ -7,10 +7,7 @@ module.exports = async (ctx) => {
7
7
  url: 'https://idol.sankakucomplex.com/post/atom',
8
8
  });
9
9
 
10
- const $ = cheerio.load(response.data, {
11
- normalizeWhitespace: true,
12
- xmlMode: true,
13
- });
10
+ const $ = cheerio.load(response.data);
14
11
 
15
12
  ctx.state.data = {
16
13
  title: 'Posts | Idol Complex - Idol & Cosplay Images',
@@ -0,0 +1,73 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const { art } = require('@/utils/render');
4
+ const path = require('path');
5
+
6
+ module.exports = async (ctx) => {
7
+ const category = ctx.params.category ?? 'latest';
8
+ const id = ctx.params.id ?? 14;
9
+
10
+ const titles = {
11
+ 14: '热点 - 最新',
12
+ 5: '热点 - 科技',
13
+ 9: '热点 - 消费',
14
+ 7: '热点 - 出行',
15
+ 13: '热点 - 文娱',
16
+ 10: '热点 - 教育',
17
+ 25: '热点 - 地产',
18
+ 11: '热点 - 更多',
19
+ 28: '深度 - 出行',
20
+ 29: '深度 - 科技',
21
+ 31: '深度 - 消费',
22
+ 33: '深度 - 教育',
23
+ 34: '深度 - 更多',
24
+ 8: '深度 - 地产',
25
+ 6: '深度 - 文娱',
26
+ };
27
+
28
+ const categories = {
29
+ latest: {
30
+ url: '',
31
+ title: '最新文章',
32
+ },
33
+ recommend: {
34
+ url: '&isRecommend=true',
35
+ title: '推荐资讯',
36
+ },
37
+ cover: {
38
+ url: '&position=1',
39
+ title: '封面文章',
40
+ },
41
+ information: {
42
+ url: `&categoryId=${id}`,
43
+ title: titles[id],
44
+ },
45
+ };
46
+
47
+ const rootUrl = 'https://www.aicaijing.com.cn';
48
+ const apiRootUrl = 'https://api.aicaijing.com.cn';
49
+ const apiUrl = `${apiRootUrl}/article/detail/list?size=${ctx.query.limit ?? 50}&page=1${categories[category].url}`;
50
+
51
+ const response = await got({
52
+ method: 'get',
53
+ url: apiUrl,
54
+ });
55
+
56
+ const items = response.data.data.items.map((item) => ({
57
+ title: item.title,
58
+ link: `${rootUrl}/article/${item.articleId}`,
59
+ author: item.userInfo.nickname,
60
+ pubDate: parseDate(item.createTime),
61
+ category: [item.category.name].concat(item.tags.map((t) => t.name)),
62
+ description: art(path.join(__dirname, 'templates/description.art'), {
63
+ image: item.cover,
64
+ description: item.content,
65
+ }),
66
+ }));
67
+
68
+ ctx.state.data = {
69
+ title: `AI 财经社 - ${categories[category].title}`,
70
+ link: rootUrl,
71
+ item: items,
72
+ };
73
+ };
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ '/cover': ['nczitzk'],
3
+ '/information/:id?': ['nczitzk'],
4
+ '/latest': ['nczitzk'],
5
+ '/recommend': ['nczitzk'],
6
+ };
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+ 'aicaijing.com': {
3
+ _name: 'AI 财经社',
4
+ www: [
5
+ {
6
+ title: '最新文章',
7
+ docs: 'https://docs.rsshub.app/finance.html#ai-cai-jing-she-zui-xin-wen-zhang',
8
+ source: ['/'],
9
+ target: '/aicaijing/latest',
10
+ },
11
+ {
12
+ title: '封面文章',
13
+ docs: 'https://docs.rsshub.app/finance.html#ai-cai-jing-she-feng-mian-wen-zhang',
14
+ source: ['/'],
15
+ target: '/aicaijing/cover',
16
+ },
17
+ {
18
+ title: '推荐资讯',
19
+ docs: 'https://docs.rsshub.app/finance.html#ai-cai-jing-she-tui-jian-zi-xun',
20
+ source: ['/'],
21
+ target: '/aicaijing/recommend',
22
+ },
23
+ {
24
+ title: '热点 & 深度',
25
+ docs: 'https://docs.rsshub.app/finance.html#ai-cai-jing-she-re-dian-shen-du',
26
+ source: ['/information/:id', '/'],
27
+ target: '/aicaijing/information/:id?',
28
+ },
29
+ ],
30
+ },
31
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/:category?/:id?', require('./'));
3
+ };
@@ -0,0 +1,4 @@
1
+ {{ if image }}
2
+ <img src="{{ image }}">
3
+ {{ /if }}
4
+ {{@ description }}
@@ -1,8 +1,7 @@
1
1
  const got = require('@/utils/got');
2
2
  const cheerio = require('cheerio');
3
3
  const { parseDate } = require('@/utils/parse-date');
4
- const path = require('path');
5
- const { art } = require('@/utils/render');
4
+ const timezone = require('@/utils/timezone');
6
5
 
7
6
  const rootUrl = 'https://tw.appledaily.com';
8
7
 
@@ -26,7 +25,7 @@ const channelMap = {
26
25
 
27
26
  module.exports = async (ctx) => {
28
27
  const channel = ctx.params.channel ?? 'home';
29
- const url = `${rootUrl}${channel === 'home' ? '/home' : `/realtime/${channel}`}`;
28
+ const url = `${rootUrl}${channel === 'home' ? '/' : `/realtime/${channel}`}`;
30
29
 
31
30
  const response = await got.get(url);
32
31
  const $ = cheerio.load(response.data);
@@ -34,8 +33,8 @@ module.exports = async (ctx) => {
34
33
  .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 25)
35
34
  .map((_, item) => {
36
35
  const title = $(item).find('span.headline').text();
37
- const link = rootUrl + $(item).find('a').attr('href');
38
- const pubDate = parseDate($(item).find('div.timestamp').text(), 'YYYY/MM/DD HH:mm');
36
+ const link = $(item).find('a').attr('href');
37
+ const pubDate = timezone(parseDate($(item).find('div.timestamp').text(), 'YYYY/MM/DD HH:mm'), +8);
39
38
 
40
39
  return {
41
40
  title,
@@ -48,13 +47,10 @@ module.exports = async (ctx) => {
48
47
  const items = await Promise.all(
49
48
  list.map((item) =>
50
49
  ctx.cache.tryGet(item.link, async () => {
51
- const detailResponse = await got.get(item.link);
50
+ const detailResponse = await got(item.link);
52
51
  const content = cheerio.load(detailResponse.data);
53
- const dataJs = content('script#fusion-metadata').html();
54
- const descDataJSON = JSON.parse(dataJs.match(/Fusion.globalContent=(.*);Fusion.globalConte/)[1]);
55
- item.description = art(path.join(__dirname, 'templates/content.art'), {
56
- content_elements: descDataJSON.content_elements,
57
- });
52
+ content('.TW-DESKTOP-AD, .TW-MOBILE-AD, .TW-MOBILE-AD-WRAP').remove();
53
+ item.description = content('div.promo-item-container.box--position-relative') + content('#articleBody').html();
58
54
 
59
55
  return item;
60
56
  })
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ '/tieba/forum/:kw': ['u3u'],
3
+ '/tieba/forum/good/:kw/:cid?': ['u3u'],
4
+ '/tieba/post/:id': ['u3u'],
5
+ '/tieba/post/lz/:id': ['u3u'],
6
+ '/tieba/user/:uid': ['igxlin', 'nczitzk'],
7
+ };
@@ -0,0 +1,52 @@
1
+ module.exports = {
2
+ 'baidu.com': {
3
+ _name: '贴吧',
4
+ tieba: [
5
+ {
6
+ title: '帖子列表',
7
+ docs: 'https://docs.rsshub.app/bbs.html#bai-du-tie-ba',
8
+ source: 'f',
9
+ target: (params, url) => {
10
+ const type = new URL(url).searchParams.get('tab');
11
+ if (!type || type === 'main') {
12
+ return `/tieba/forum/${new URL(url).searchParams.get('kw')}`;
13
+ }
14
+ },
15
+ },
16
+ {
17
+ title: '精品帖子',
18
+ docs: 'https://docs.rsshub.app/bbs.html#bai-du-tie-ba',
19
+ source: 'f',
20
+ target: (params, url) => {
21
+ const type = new URL(url).searchParams.get('tab');
22
+ if (type === 'good') {
23
+ return `/tieba/forum/good/${new URL(url).searchParams.get('kw')}`;
24
+ }
25
+ },
26
+ },
27
+ {
28
+ title: '帖子动态',
29
+ docs: 'https://docs.rsshub.app/bbs.html#bai-du-tie-ba',
30
+ source: '/p/:id',
31
+ target: '/tieba/post/:id',
32
+ },
33
+ {
34
+ title: '只看楼主',
35
+ docs: 'https://docs.rsshub.app/bbs.html#bai-du-tie-ba',
36
+ source: '/p/:id',
37
+ target: '/tieba/post/lz/:id',
38
+ },
39
+ {
40
+ title: '用户帖子',
41
+ docs: 'https://docs.rsshub.app/bbs.html#tie-ba',
42
+ source: '/home/main',
43
+ target: (params, url) => {
44
+ const uid = new URL(url).searchParams.get('un');
45
+ if (uid) {
46
+ return `/tieba/user/${uid}`;
47
+ }
48
+ },
49
+ },
50
+ ],
51
+ },
52
+ };
@@ -0,0 +1,7 @@
1
+ module.exports = (router) => {
2
+ router.get('/tieba/forum/:kw', require('./tieba/forum'));
3
+ router.get('/tieba/forum/good/:kw/:cid?', require('./tieba/forum'));
4
+ router.get('/tieba/post/:id', require('./tieba/post'));
5
+ router.get('/tieba/post/lz/:id', require('./tieba/post'));
6
+ router.get('/tieba/user/:uid', require('./tieba/user'));
7
+ };
@@ -0,0 +1 @@
1
+ <p>{{ details }}</p><p>{{@ medias }}</p><p>作者:{{ author_name }}</p>
@@ -0,0 +1,4 @@
1
+ <p>{{@ pubContent }}</p><br>
2
+ 作者:{{ author }}<br>
3
+ 楼层:{{ num }}<br>
4
+ {{ from }}
@@ -0,0 +1,64 @@
1
+ const cheerio = require('cheerio');
2
+ const got = require('@/utils/got');
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
+
8
+ module.exports = async (ctx) => {
9
+ const { kw, cid } = ctx.params;
10
+
11
+ // PC端:https://tieba.baidu.com/f?kw=${encodeURIComponent(kw)}
12
+ // 移动端接口:https://tieba.baidu.com/mo/q/m?kw=${encodeURIComponent(kw)}&lp=5024&forum_recommend=1&lm=0&cid=0&has_url_param=1&pn=0&is_ajax=1
13
+ const params = { kw: encodeURIComponent(kw) };
14
+ ctx._matchedRoute.includes('good') && (params.tab = 'good');
15
+ cid && (params.cid = cid);
16
+ const { data } = await got(`https://tieba.baidu.com/f`, {
17
+ headers: {
18
+ Referer: 'https://tieba.baidu.com/',
19
+ },
20
+ searchParams: params,
21
+ });
22
+
23
+ const threadListHTML = cheerio
24
+ .load(data)('code[id="pagelet_html_frs-list/pagelet/thread_list"]')
25
+ .contents()
26
+ .filter((e) => e.nodeType === '8');
27
+
28
+ const $ = cheerio.load(threadListHTML.prevObject[0].data);
29
+ const list = $('#thread_list > .j_thread_list[data-field]')
30
+ .toArray()
31
+ .map((element) => {
32
+ const item = $(element);
33
+ const { id, author_name } = item.data('field');
34
+ const time = item.find('.threadlist_reply_date').text().trim();
35
+ const title = item.find('a.j_th_tit').text().trim();
36
+ const details = item.find('.threadlist_abs').text().trim();
37
+ const medias = item
38
+ .find('.threadlist_media img')
39
+ .toArray()
40
+ .map((element) => {
41
+ const item = $(element);
42
+ return `<img src="${item.attr('bpic')?.split('?tbpicau')[0]}">`;
43
+ })
44
+ .join('');
45
+
46
+ return {
47
+ title,
48
+ description: art(path.join(__dirname, '../templates/forum.art'), {
49
+ details,
50
+ medias,
51
+ author_name,
52
+ }),
53
+ pubDate: timezone(parseDate(time, ['HH:mm', 'M-D']), +8),
54
+ link: `https://tieba.baidu.com/p/${id}`,
55
+ };
56
+ });
57
+
58
+ ctx.state.data = {
59
+ title: `${kw}吧`,
60
+ description: cheerio.load(data)('meta[name="description"]').attr('content'),
61
+ link: `https://tieba.baidu.com/f?kw=${encodeURIComponent(kw)}`,
62
+ item: list,
63
+ };
64
+ };