rsshub 1.0.0-master.fe4f650 → 1.0.0-master.fe560d2

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 (335) hide show
  1. package/README.md +3 -3
  2. package/lib/config.js +1 -1
  3. package/lib/middleware/parameter.js +3 -3
  4. package/lib/radar-rules.js +0 -46
  5. package/lib/router.js +28 -28
  6. package/lib/routes/v2ex/post.js +3 -0
  7. package/lib/utils/puppeteer-utils.js +63 -0
  8. package/lib/utils/puppeteer.js +13 -8
  9. package/lib/utils/request-wrapper.js +38 -100
  10. package/lib/utils/unify-proxy.js +116 -0
  11. package/lib/utils/wechat-mp.js +2 -0
  12. package/lib/v2/18comic/utils.js +2 -2
  13. package/lib/v2/36kr/index.js +29 -24
  14. package/lib/v2/agora0/maintainer.js +1 -0
  15. package/lib/v2/agora0/pen0.js +43 -0
  16. package/lib/v2/agora0/radar.js +12 -1
  17. package/lib/v2/agora0/router.js +1 -0
  18. package/lib/v2/aiea/index.js +39 -0
  19. package/lib/v2/aiea/maintainer.js +3 -0
  20. package/lib/v2/aiea/radar.js +13 -0
  21. package/lib/v2/aiea/router.js +3 -0
  22. package/lib/v2/baidu/radar.js +6 -6
  23. package/lib/v2/bangumi/online/online.js +4 -2
  24. package/lib/v2/bangumi/tv/group/reply.js +13 -1
  25. package/lib/v2/bangumi/tv/group/topic.js +22 -9
  26. package/lib/v2/bilibili/cache.js +34 -1
  27. package/lib/v2/bilibili/userCollection.js +1 -2
  28. package/lib/v2/bilibili/utils.js +10 -0
  29. package/lib/v2/bilibili/video-all.js +5 -2
  30. package/lib/v2/bilibili/video.js +3 -1
  31. package/lib/v2/bytes/bytes.js +25 -0
  32. package/lib/v2/bytes/maintainer.js +4 -0
  33. package/lib/v2/bytes/radar.js +13 -0
  34. package/lib/v2/bytes/router.js +3 -0
  35. package/lib/v2/caijing/maintainer.js +3 -0
  36. package/lib/v2/caijing/radar.js +13 -0
  37. package/lib/v2/caijing/roll.js +46 -0
  38. package/lib/v2/caijing/router.js +3 -0
  39. package/lib/v2/cdzjryb/maintainer.js +3 -0
  40. package/lib/v2/cdzjryb/projectList.js +49 -0
  41. package/lib/v2/cdzjryb/radar.js +13 -0
  42. package/lib/v2/cdzjryb/router.js +3 -0
  43. package/lib/v2/cdzjryb/templates/projectList.art +23 -0
  44. package/lib/v2/chsi/kydt.js +51 -0
  45. package/lib/v2/chsi/maintainer.js +3 -0
  46. package/lib/v2/chsi/radar.js +13 -0
  47. package/lib/v2/chsi/router.js +3 -0
  48. package/lib/v2/cnbeta/radar.js +6 -6
  49. package/lib/v2/cnbeta/router.js +1 -1
  50. package/lib/v2/cnbeta/type.js +6 -12
  51. package/lib/v2/cnbeta/utils.js +5 -8
  52. package/lib/v2/cngal/entry.js +25 -0
  53. package/lib/v2/cngal/maintainer.js +4 -0
  54. package/lib/v2/cngal/radar.js +19 -0
  55. package/lib/v2/cngal/router.js +4 -0
  56. package/lib/v2/cngal/templates/entry-description.art +4 -0
  57. package/lib/v2/cngal/templates/weekly-description.art +4 -0
  58. package/lib/v2/cngal/weekly.js +20 -0
  59. package/lib/v2/cnki/author.js +45 -0
  60. package/lib/v2/cnki/journals.js +2 -23
  61. package/lib/v2/cnki/maintainer.js +1 -0
  62. package/lib/v2/cnki/radar.js +8 -0
  63. package/lib/v2/cnki/router.js +1 -0
  64. package/lib/v2/cnki/utils.js +26 -0
  65. package/lib/v2/codeforces/maintainer.js +1 -0
  66. package/lib/v2/codeforces/radar.js +8 -0
  67. package/lib/v2/codeforces/recent_actions.js +47 -0
  68. package/lib/v2/codeforces/router.js +1 -0
  69. package/lib/v2/curius/links.js +43 -0
  70. package/lib/v2/curius/maintainer.js +3 -0
  71. package/lib/v2/curius/radar.js +13 -0
  72. package/lib/v2/curius/router.js +3 -0
  73. package/lib/v2/curius/templates/description.art +16 -0
  74. package/lib/v2/douyin/hashtag.js +20 -19
  75. package/lib/v2/douyin/live.js +2 -21
  76. package/lib/v2/douyin/user.js +2 -17
  77. package/lib/v2/douyin/utils.js +85 -0
  78. package/lib/v2/{acm-ecnu → ecnu}/contest.js +1 -4
  79. package/lib/v2/ecnu/maintainer.js +4 -0
  80. package/lib/v2/ecnu/radar.js +30 -0
  81. package/lib/v2/ecnu/router.js +4 -0
  82. package/lib/v2/{acm-ecnu → ecnu}/templates/description.art +0 -0
  83. package/lib/v2/ecnu/yjs.js +37 -0
  84. package/lib/v2/ehentai/ehapi.js +23 -12
  85. package/lib/v2/foresightnews/index.js +8 -11
  86. package/lib/v2/foreverblog/feeds.js +36 -0
  87. package/lib/v2/foreverblog/maintainer.js +3 -0
  88. package/lib/v2/foreverblog/radar.js +13 -0
  89. package/lib/v2/foreverblog/router.js +3 -0
  90. package/lib/v2/freewechat/maintainer.js +3 -0
  91. package/lib/v2/freewechat/profile.js +61 -0
  92. package/lib/v2/freewechat/radar.js +13 -0
  93. package/lib/v2/freewechat/router.js +3 -0
  94. package/lib/v2/gcores/category.js +16 -6
  95. package/lib/v2/good/index.js +15 -14
  96. package/lib/v2/gov/customs/list.js +1 -1
  97. package/lib/v2/gov/dianbai/dianbai.js +18 -0
  98. package/lib/v2/gov/gaozhou/gaozhou.js +19 -0
  99. package/lib/v2/gov/general/general.js +250 -0
  100. package/lib/v2/gov/general/templates/zcjdpt.art +128 -0
  101. package/lib/v2/gov/gz/index.js +38 -0
  102. package/lib/v2/gov/huazhou/huazhou.js +19 -0
  103. package/lib/v2/gov/hunan/changsha/major-email.js +52 -0
  104. package/lib/v2/gov/maintainer.js +19 -2
  105. package/lib/v2/gov/maoming/maoming.js +417 -0
  106. package/lib/v2/gov/maonan/maonan.js +100 -0
  107. package/lib/v2/gov/mgs/mgs.js +19 -0
  108. package/lib/v2/gov/mmht/mmht.js +19 -0
  109. package/lib/v2/gov/nmpa/generic.js +1 -1
  110. package/lib/v2/gov/radar.js +197 -0
  111. package/lib/v2/gov/router.js +18 -2
  112. package/lib/v2/gov/sasac/generic.js +42 -0
  113. package/lib/v2/gov/sdb/sdb.js +19 -0
  114. package/lib/v2/gov/shanghai/yjj/index.js +3 -1
  115. package/lib/v2/gov/xinyi/xinyi.js +19 -0
  116. package/lib/v2/gov/zhengce/govall.js +55 -0
  117. package/lib/v2/gov/zhengce/wenjian.js +47 -0
  118. package/lib/v2/gov/zhengce/zhengceku.js +22 -0
  119. package/lib/v2/gov/zhengce/zuixin.js +39 -0
  120. package/lib/v2/guanhai/index.js +47 -0
  121. package/lib/v2/guanhai/maintainer.js +4 -0
  122. package/lib/v2/guanhai/radar.js +13 -0
  123. package/lib/v2/guanhai/router.js +3 -0
  124. package/lib/v2/hackernews/index.js +6 -0
  125. package/lib/v2/hellogithub/volume.js +15 -32
  126. package/lib/v2/{heu → hrbeu}/gx/card.js +5 -10
  127. package/lib/v2/{heu → hrbeu}/gx/list.js +12 -20
  128. package/lib/v2/hrbeu/job/bigemploy.js +25 -0
  129. package/lib/v2/{heu → hrbeu}/job/calendar.js +8 -16
  130. package/lib/v2/{heu → hrbeu}/job/list.js +11 -16
  131. package/lib/v2/{heu → hrbeu}/maintainer.js +2 -1
  132. package/lib/v2/{heu → hrbeu}/radar.js +18 -10
  133. package/lib/v2/{heu → hrbeu}/router.js +3 -2
  134. package/lib/v2/{heu → hrbeu}/uae/list.js +12 -17
  135. package/lib/v2/hrbeu/ugs/news.js +98 -0
  136. package/lib/v2/{heu → hrbeu}/yjsy/list.js +8 -16
  137. package/lib/v2/ieee-security/maintainer.js +3 -0
  138. package/lib/v2/ieee-security/radar.js +13 -0
  139. package/lib/v2/ieee-security/router.js +3 -0
  140. package/lib/v2/ieee-security/sp.js +36 -0
  141. package/lib/v2/javbus/index.js +8 -2
  142. package/lib/v2/javbus/templates/description.art +12 -1
  143. package/lib/v2/jike/user.js +1 -0
  144. package/lib/v2/lang/maintainer.js +3 -0
  145. package/lib/v2/lang/radar.js +13 -0
  146. package/lib/v2/lang/room.js +40 -0
  147. package/lib/v2/lang/router.js +3 -0
  148. package/lib/v2/lang/templates/room.art +1 -0
  149. package/lib/v2/liulinblog/utils.js +7 -4
  150. package/lib/v2/luogu/daily.js +1 -1
  151. package/lib/v2/mangadex/index.js +73 -0
  152. package/lib/v2/mangadex/maintainer.js +3 -0
  153. package/lib/v2/mangadex/radar.js +13 -0
  154. package/lib/v2/mangadex/router.js +3 -0
  155. package/lib/v2/mihoyo/ys/news.js +3 -2
  156. package/lib/v2/mirror/index.js +15 -8
  157. package/lib/v2/mrdx/daily.js +79 -0
  158. package/lib/v2/mrdx/maintainer.js +3 -0
  159. package/lib/v2/mrdx/radar.js +13 -0
  160. package/lib/v2/mrdx/router.js +3 -0
  161. package/lib/v2/mrdx/utils.js +17 -0
  162. package/lib/v2/mtime/news.js +1 -1
  163. package/lib/v2/nautil/maintainer.js +3 -0
  164. package/lib/v2/nautil/radar.js +13 -0
  165. package/lib/v2/nautil/router.js +3 -0
  166. package/lib/v2/nautil/templates/description.art +6 -0
  167. package/lib/v2/nautil/topics.js +57 -0
  168. package/lib/v2/ndss-symposium/maintainer.js +3 -0
  169. package/lib/v2/ndss-symposium/ndss.js +80 -0
  170. package/lib/v2/ndss-symposium/radar.js +13 -0
  171. package/lib/v2/ndss-symposium/router.js +3 -0
  172. package/lib/v2/nextapple/realtime.js +1 -1
  173. package/lib/v2/nintendo/direct.js +31 -0
  174. package/lib/v2/nintendo/eshop_cn.js +44 -0
  175. package/lib/v2/nintendo/eshop_hk.js +79 -0
  176. package/lib/v2/nintendo/eshop_jp.js +34 -0
  177. package/lib/v2/nintendo/eshop_us.js +32 -0
  178. package/lib/v2/nintendo/maintainer.js +7 -0
  179. package/lib/v2/nintendo/news.js +23 -0
  180. package/lib/v2/nintendo/news_china.js +35 -0
  181. package/lib/v2/nintendo/radar.js +70 -0
  182. package/lib/v2/nintendo/router.js +10 -0
  183. package/lib/{routes → v2}/nintendo/system-update.js +2 -2
  184. package/lib/v2/nintendo/templates/direct.art +6 -0
  185. package/lib/v2/nintendo/templates/eshop_cn.art +21 -0
  186. package/lib/v2/nintendo/templates/eshop_hk.art +61 -0
  187. package/lib/v2/nintendo/templates/eshop_jp.art +3 -0
  188. package/lib/v2/nintendo/templates/eshop_us.art +24 -0
  189. package/lib/{routes → v2}/nintendo/utils.js +34 -50
  190. package/lib/v2/njxzc/home.js +13 -9
  191. package/lib/v2/nmtv/column.js +53 -0
  192. package/lib/v2/nmtv/maintainer.js +3 -0
  193. package/lib/v2/nmtv/radar.js +13 -0
  194. package/lib/v2/nmtv/router.js +3 -0
  195. package/lib/v2/nmtv/templates/description.art +9 -0
  196. package/lib/v2/nua/lib.js +39 -0
  197. package/lib/v2/nua/maintainer.js +1 -0
  198. package/lib/v2/nua/radar.js +8 -0
  199. package/lib/v2/nua/router.js +1 -0
  200. package/lib/v2/nua/utils.js +7 -12
  201. package/lib/v2/nuaa/utils/pypasswaf.js +3 -2
  202. package/lib/v2/nyaa/main.js +16 -23
  203. package/lib/v2/nyaa/maintainer.js +7 -4
  204. package/lib/v2/nyaa/radar.js +27 -29
  205. package/lib/v2/nyaa/router.js +4 -2
  206. package/lib/v2/odaily/post.js +15 -20
  207. package/lib/v2/odaily/utils.js +1 -1
  208. package/lib/v2/paradigm/maintainer.js +3 -0
  209. package/lib/v2/paradigm/radar.js +13 -0
  210. package/lib/v2/paradigm/router.js +3 -0
  211. package/lib/v2/paradigm/writing.js +44 -0
  212. package/lib/v2/picuki/maintainer.js +1 -1
  213. package/lib/v2/picuki/profile.js +10 -8
  214. package/lib/v2/picuki/utils.js +21 -0
  215. package/lib/v2/pixiv/api/getRanking.js +1 -1
  216. package/lib/v2/pixiv/ranking.js +3 -0
  217. package/lib/v2/producthunt/templates/descImg.art +2 -2
  218. package/lib/v2/qlu/maintainer.js +3 -0
  219. package/lib/v2/qlu/notice.js +54 -0
  220. package/lib/v2/qlu/radar.js +13 -0
  221. package/lib/v2/qlu/router.js +3 -0
  222. package/lib/v2/reactnewsletter/maintainer.js +4 -0
  223. package/lib/v2/reactnewsletter/radar.js +13 -0
  224. package/lib/v2/reactnewsletter/reactnewsletter.js +25 -0
  225. package/lib/v2/reactnewsletter/router.js +3 -0
  226. package/lib/v2/researchgate/maintainer.js +3 -0
  227. package/lib/v2/researchgate/publications.js +70 -0
  228. package/lib/v2/researchgate/radar.js +13 -0
  229. package/lib/v2/researchgate/router.js +3 -0
  230. package/lib/v2/saraba1st/digest.js +79 -0
  231. package/lib/v2/saraba1st/maintainer.js +1 -0
  232. package/lib/v2/saraba1st/radar.js +12 -3
  233. package/lib/v2/saraba1st/router.js +1 -0
  234. package/lib/v2/saraba1st/templates/digest.art +5 -0
  235. package/lib/v2/sctv/maintainer.js +1 -1
  236. package/lib/v2/sctv/programme.js +39 -17
  237. package/lib/v2/sctv/router.js +1 -1
  238. package/lib/v2/shmtu/jwc.js +57 -0
  239. package/lib/v2/shmtu/maintainer.js +5 -0
  240. package/lib/v2/shmtu/portal.js +81 -0
  241. package/lib/v2/shmtu/radar.js +29 -0
  242. package/lib/v2/shmtu/router.js +5 -0
  243. package/lib/v2/shmtu/templates/portal.art +30 -0
  244. package/lib/v2/shmtu/www.js +58 -0
  245. package/lib/v2/sigsac/ccs.js +57 -0
  246. package/lib/v2/sigsac/maintainer.js +3 -0
  247. package/lib/v2/sigsac/radar.js +13 -0
  248. package/lib/v2/sigsac/router.js +3 -0
  249. package/lib/v2/simpleinfo/index.js +50 -0
  250. package/lib/v2/simpleinfo/maintainer.js +3 -0
  251. package/lib/v2/simpleinfo/radar.js +19 -0
  252. package/lib/v2/simpleinfo/router.js +3 -0
  253. package/lib/v2/simpleinfo/templates/description.art +6 -0
  254. package/lib/v2/sse/maintainer.js +1 -1
  255. package/lib/v2/telegram/channel.js +54 -38
  256. package/lib/v2/tencent/maintainer.js +2 -0
  257. package/lib/v2/tencent/news/coronavirus/data.js +71 -0
  258. package/lib/v2/tencent/news/coronavirus/total.js +34 -0
  259. package/lib/v2/tencent/news/coronavirus/utils.js +17 -0
  260. package/lib/v2/tencent/radar.js +8 -0
  261. package/lib/v2/tencent/router.js +2 -0
  262. package/lib/v2/tencent/templates/coronavirus/chinaTotal.art +6 -0
  263. package/lib/v2/tencent/templates/coronavirus/data.art +4 -0
  264. package/lib/v2/test/index.js +8 -0
  265. package/lib/v2/theverge/index.js +9 -1
  266. package/lib/v2/theverge/maintainer.js +1 -1
  267. package/lib/v2/theverge/radar.js +2 -2
  268. package/lib/v2/theverge/router.js +1 -1
  269. package/lib/v2/tingshuitz/changsha.js +43 -0
  270. package/lib/v2/tingshuitz/maintainer.js +1 -0
  271. package/lib/v2/tingshuitz/radar.js +10 -0
  272. package/lib/v2/tingshuitz/router.js +1 -0
  273. package/lib/v2/twitter/web-api/twitter-api.js +19 -15
  274. package/lib/v2/twreporter/category.js +17 -8
  275. package/lib/v2/uber/blog.js +59 -0
  276. package/lib/v2/uber/maintainer.js +3 -0
  277. package/lib/v2/uber/radar.js +13 -0
  278. package/lib/v2/uber/router.js +3 -0
  279. package/lib/v2/usenix/maintainer.js +3 -0
  280. package/lib/v2/usenix/radar.js +13 -0
  281. package/lib/v2/usenix/router.js +3 -0
  282. package/lib/v2/usenix/usenix.js +63 -0
  283. package/lib/v2/usepanda/index.js +26 -0
  284. package/lib/v2/usepanda/maintainer.js +3 -0
  285. package/lib/v2/usepanda/radar.js +11 -0
  286. package/lib/v2/usepanda/router.js +3 -0
  287. package/lib/v2/uw/gix/news.js +67 -0
  288. package/lib/v2/uw/maintainer.js +3 -0
  289. package/lib/v2/uw/radar.js +13 -0
  290. package/lib/v2/uw/router.js +3 -0
  291. package/lib/v2/verse/articles.js +42 -0
  292. package/lib/v2/verse/maintainer.js +3 -0
  293. package/lib/v2/verse/radar.js +13 -0
  294. package/lib/v2/verse/router.js +3 -0
  295. package/lib/{routes → v2}/weibo/keyword.js +2 -2
  296. package/lib/v2/weibo/maintainer.js +8 -0
  297. package/lib/v2/weibo/oasis/user.js +20 -0
  298. package/lib/v2/weibo/radar.js +48 -0
  299. package/lib/v2/weibo/router.js +8 -0
  300. package/lib/{routes → v2}/weibo/search/hot.js +2 -0
  301. package/lib/{routes → v2}/weibo/super_index.js +2 -2
  302. package/lib/{routes → v2}/weibo/timeline.js +2 -2
  303. package/lib/{routes → v2}/weibo/user.js +2 -2
  304. package/lib/{routes → v2}/weibo/utils.js +49 -14
  305. package/lib/v2/ymgal/article.js +61 -0
  306. package/lib/v2/ymgal/game.js +41 -0
  307. package/lib/v2/ymgal/maintainer.js +4 -0
  308. package/lib/v2/ymgal/radar.js +31 -0
  309. package/lib/v2/ymgal/router.js +4 -0
  310. package/lib/v2/ymgal/templates/description.art +7 -0
  311. package/lib/v2/zhihu/pin/utils.js +49 -41
  312. package/package.json +26 -27
  313. package/lib/routes/blogs/foreverblog.js +0 -33
  314. package/lib/routes/gov/zhengce/govall.js +0 -59
  315. package/lib/routes/gov/zhengce/wenjian.js +0 -53
  316. package/lib/routes/gov/zhengce/zuixin.js +0 -42
  317. package/lib/routes/langlive/room.js +0 -33
  318. package/lib/routes/nautilus/topics.js +0 -45
  319. package/lib/routes/nintendo/direct.js +0 -34
  320. package/lib/routes/nintendo/eshop_cn.js +0 -51
  321. package/lib/routes/nintendo/eshop_hk.js +0 -26
  322. package/lib/routes/nintendo/eshop_jp.js +0 -20
  323. package/lib/routes/nintendo/eshop_us.js +0 -36
  324. package/lib/routes/nintendo/news.js +0 -25
  325. package/lib/routes/nintendo/news_china.js +0 -41
  326. package/lib/routes/researchgate/publications.js +0 -60
  327. package/lib/routes/universities/ecnuyjs/ecnuyjs.js +0 -23
  328. package/lib/routes/universities/shmtu/jwc.js +0 -75
  329. package/lib/routes/universities/shmtu/www.js +0 -61
  330. package/lib/routes/weibo/oasis/user.js +0 -17
  331. package/lib/v2/acm-ecnu/maintainer.js +0 -3
  332. package/lib/v2/acm-ecnu/radar.js +0 -19
  333. package/lib/v2/acm-ecnu/router.js +0 -3
  334. package/lib/v2/cnbeta/index.js +0 -16
  335. package/lib/v2/heu/job/bigemploy.js +0 -42
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/security-privacy', require('./sp'));
3
+ };
@@ -0,0 +1,36 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const url = 'https://www.ieee-security.org/';
5
+ // https://www.ieee-security.org/TC/SP2023/program-papers.html
6
+
7
+ module.exports = async (ctx) => {
8
+ const last = new Date().getFullYear() + 1;
9
+ const urlList = Array.from({ length: last - 2020 }, (_, v) => `${url}TC/SP${v + 2020}/program-papers.html`);
10
+ const responses = await got.all(urlList.map((url) => got(url)));
11
+
12
+ const items = responses.map((response) => {
13
+ const $ = cheerio.load(response.data);
14
+ return $('div.panel-body > div.list-group-item')
15
+ .toArray()
16
+ .map((item) => {
17
+ item = $(item);
18
+ const title = item.find('b').text().trim();
19
+ const link = response.url;
20
+ return {
21
+ title,
22
+ author: item.html().trim().split('<br>')[1].trim(),
23
+ link: `${link}#${title}`,
24
+ pubDate: parseDate(link.match(/SP(\d{4})/)[1], 'YYYY'),
25
+ };
26
+ });
27
+ });
28
+
29
+ ctx.state.data = {
30
+ title: 'S&P',
31
+ link: `${url}TC/SP-Index.html`,
32
+ description: 'IEEE Symposium on Security and Privacy Accepted Papers',
33
+ allowEmpty: true,
34
+ item: items.flat(),
35
+ };
36
+ };
@@ -4,6 +4,11 @@ const { parseDate } = require('@/utils/parse-date');
4
4
  const { art } = require('@/utils/render');
5
5
  const path = require('path');
6
6
 
7
+ const toSize = (raw) => {
8
+ const matches = raw.match(/(\d+(\.\d+)?)(\w+)/);
9
+ return matches[3] === 'GB' ? matches[1] * 1024 : matches[1];
10
+ };
11
+
7
12
  module.exports = async (ctx) => {
8
13
  const isWestern = /^\/western/.test(ctx.path);
9
14
 
@@ -19,7 +24,7 @@ module.exports = async (ctx) => {
19
24
  const $ = cheerio.load(response.data);
20
25
 
21
26
  let items = $('.movie-box')
22
- .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 30)
27
+ .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 50)
23
28
  .toArray()
24
29
  .map((item) => {
25
30
  item = $(item);
@@ -98,11 +103,12 @@ module.exports = async (ctx) => {
98
103
  link: td.first().attr('href'),
99
104
  size: td.eq(1).text().trim(),
100
105
  date: td.last().text().trim(),
106
+ score: content(tr).find('a').length ** 8 * toSize(td.eq(1).text().trim()),
101
107
  };
102
108
  });
103
109
 
104
110
  if (magnets) {
105
- item.enclosure_url = magnets[0].link;
111
+ item.enclosure_url = magnets.sort((a, b) => b.score - a.score)[0].link;
106
112
  item.enclosure_type = 'application/x-bittorrent';
107
113
  }
108
114
  } catch (e) {
@@ -9,9 +9,20 @@
9
9
  {{/if}}
10
10
  <br>
11
11
  <h4>磁力連結投稿</h4>
12
+ <table>
13
+ <tr>
14
+ <th>磁力名稱</th>
15
+ <th>檔案大小</th>
16
+ <th>分享日期</th>
17
+ </tr>
12
18
  {{each magnets magnet}}
13
- <li><a href="{{ magnet.link }}">{{ magnet.title }} [{{ magnet.size }}] ({{ magnet.date }})</a></li>
19
+ <tr>
20
+ <td><a href="{{ magnet.link }}">{{ magnet.title }}</a></td>
21
+ <td>{{ magnet.size }}</td>
22
+ <td>{{ magnet.date }}</td>
23
+ </tr>
14
24
  {{/each}}
25
+ </table>
15
26
  <h4>樣品圖像</h4>
16
27
  {{each thumbs}}
17
28
  <img src="{{ $value }}">
@@ -140,6 +140,7 @@ module.exports = async (ctx) => {
140
140
 
141
141
  ctx.state.data = {
142
142
  title: `${data.user.screenName}的即刻动态`,
143
+ description: data.user.bio,
143
144
  link: `https://m.okjike.com/users/${id}`,
144
145
  image: data.user.avatarImage.picUrl,
145
146
  item: items,
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/live/room/:id': ['MittWillson'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'lang.live': {
3
+ _name: '浪 Play 直播',
4
+ '.': [
5
+ {
6
+ title: '直播间开播',
7
+ docs: 'https://docs.rsshub.app/live.html#lang-play-yuan-zhi-bo',
8
+ source: ['/room/:id'],
9
+ target: '/lang/live/room/:id',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,40 @@
1
+ const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
4
+
5
+ module.exports = async (ctx) => {
6
+ const id = ctx.params.id;
7
+ const url = `https://www.lang.live/room/${id}`;
8
+
9
+ const api = 'https://api.lang.live/langweb/v1/room/liveinfo';
10
+ const {
11
+ data: { data },
12
+ } = await got(api, {
13
+ searchParams: {
14
+ room_id: id,
15
+ },
16
+ });
17
+
18
+ let item = [];
19
+ const name = data.live_info.nickname;
20
+ if (data.live_info.live_status === 1) {
21
+ item = [
22
+ {
23
+ title: `${name} 开播了`,
24
+ link: url,
25
+ guid: `lang:live:room:${id}:${data.live_info.live_id}`,
26
+ description: art(path.join(__dirname, 'templates/room.art'), {
27
+ live_info: data.live_info,
28
+ }),
29
+ },
30
+ ];
31
+ }
32
+
33
+ ctx.state.data = {
34
+ title: `${name} 的浪 Play 直播`,
35
+ description: data.live_info.sign,
36
+ link: url,
37
+ item,
38
+ allowEmpty: true,
39
+ };
40
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/live/room/:id', require('./room'));
3
+ };
@@ -0,0 +1 @@
1
+ <img src="{{ live_info.headimg }}">
@@ -4,12 +4,12 @@ const { parseDate } = require('@/utils/parse-date');
4
4
 
5
5
  const processList = (res) => {
6
6
  const $ = cheerio.load(res.data);
7
- const list = $('div.posts-wrapper > div.col-lg-12')
7
+ const list = $('div.archive.container > div.row > div > div > div.row.posts-wrapper.scroll > div')
8
8
  .map((_, item) => ({
9
9
  title: $(item).find('h2.entry-title').text(),
10
10
  link: $(item).find('h2.entry-title > a').attr('href'),
11
11
  pubDate: parseDate($(item).find('time').attr('datetime')),
12
- author: $(item).find('span.meta-author > a').attr('title'),
12
+ author: '60秒读懂世界',
13
13
  }))
14
14
  .get();
15
15
 
@@ -22,8 +22,11 @@ const processItems = async (list, ctx) => {
22
22
  ctx.cache.tryGet(item.link, async () => {
23
23
  const detailResponse = await got(item.link);
24
24
  const $ = cheerio.load(detailResponse.data);
25
-
26
- item.description = $('div.entry-wrapper').html();
25
+ const fullContent = $('div > div.entry-wrapper > div.entry-content');
26
+ fullContent.find('img').remove();
27
+ fullContent.find('div.pt-0').remove();
28
+ fullContent.find('div.post-note').remove();
29
+ item.description = fullContent.html();
27
30
 
28
31
  return item;
29
32
  })
@@ -21,7 +21,7 @@ module.exports = async (ctx) => {
21
21
  link,
22
22
  author: firstPost.find('p').eq(1).text(),
23
23
  guid: `${link}#${issueHeading}`,
24
- pubDate: parseDate(issueHeading.match(/(\d{4} 年 \d{2} 月 \d{2} 日)/)[1], 'YYYY 年 MMDD 日'),
24
+ pubDate: parseDate(issueHeading.match(/(\d{4} 年 \d{1,2} 月 \d{1,2} 日)/)[1], 'YYYY 年 MD 日'),
25
25
  },
26
26
  ];
27
27
 
@@ -0,0 +1,73 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const { RequestInProgressError } = require('@/errors');
4
+
5
+ module.exports = async (ctx) => {
6
+ const { id, lang } = ctx.params;
7
+ let data = (await got.get(`https://api.mangadex.org/manga/${id}`)).data;
8
+ if (data.result === 'error') {
9
+ throw new RequestInProgressError(data.errors[0].detail);
10
+ }
11
+ data = data.data;
12
+ let title;
13
+ if (lang) {
14
+ title = data.attributes.title[lang];
15
+ if (!title) {
16
+ title = data.attributes.altTitles.find((altTitle) => altTitle[lang])?.[lang];
17
+ }
18
+ }
19
+ if (!title) {
20
+ title = data.attributes.title[data.attributes.originalLanguage];
21
+ if (!title) {
22
+ title = data.attributes.altTitles.find((altTitle) => altTitle[data.attributes.originalLanguage])?.[data.attributes.originalLanguage];
23
+ if (!title) {
24
+ title = Object.values(data.attributes.title)[0];
25
+ }
26
+ }
27
+ }
28
+ let description;
29
+ if (lang) {
30
+ description = data.attributes.description[lang];
31
+ }
32
+ if (!description) {
33
+ description = data.attributes.description[data.attributes.originalLanguage];
34
+ if (!description) {
35
+ description = Object.values(data.attributes.description)[0];
36
+ }
37
+ }
38
+
39
+ let url = `https://api.mangadex.org/manga/${id}/feed?order[publishAt]=desc`;
40
+ if (lang) {
41
+ url += `&translatedLanguage[]=${lang}`;
42
+ }
43
+ data = (await got.get(url)).data;
44
+ if (data.result === 'error') {
45
+ throw new RequestInProgressError(data.errors[0].detail);
46
+ }
47
+ ctx.state.data = {
48
+ title: `${title} - MangaDex`,
49
+ link: `https://mangadex.org/title/${id}`,
50
+ description,
51
+ allowEmpty: true,
52
+ item: data.data.map((chapter) => {
53
+ const title = [];
54
+ if (chapter.attributes.volume) {
55
+ title.push(`Vol. ${chapter.attributes.volume}`);
56
+ }
57
+ if (chapter.attributes.chapter) {
58
+ title.push(`Ch. ${chapter.attributes.chapter}`);
59
+ }
60
+ if (chapter.attributes.title) {
61
+ title.push(chapter.attributes.title);
62
+ }
63
+ return {
64
+ title: title.join(' '),
65
+ link: `https://mangadex.org/chapter/${chapter.id}`,
66
+ pubDate: parseDate(chapter.attributes.publishAt),
67
+ };
68
+ }),
69
+ };
70
+ if (lang) {
71
+ ctx.state.data.language = lang;
72
+ }
73
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/:id/:lang?': ['vzz64'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'mangadex.org': {
3
+ _name: 'MangaDex',
4
+ '.': [
5
+ {
6
+ title: '漫画更新',
7
+ docs: 'https://docs.rsshub.app/anime.html#mangadex',
8
+ source: ['/title/:id/*', '/title/:id'],
9
+ target: '/mangadex/:id',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/:id/:lang?', require('./index'));
3
+ };
@@ -43,12 +43,13 @@ const titles = {
43
43
  module.exports = async (ctx) => {
44
44
  const location = ctx.params.location ?? 'main';
45
45
  const category = ctx.params.category ?? 'latest';
46
+ const limit = ctx.query.limit ? Number(ctx.query.limit) : 30;
46
47
 
47
48
  const is_zh_CN = location === 'main';
48
49
 
49
50
  const rootUrl = is_zh_CN
50
- ? `https://ys.mihoyo.com/content/ysCn/getContentList?pageSize=5&pageNum=1&channelId=${config[category][location]}`
51
- : `https://genshin.mihoyo.com/content/yuanshen/getContentList?pageSize=5&pageNum=1&channelId=${config[category][location]}`;
51
+ ? `https://ys.mihoyo.com/content/ysCn/getContentList?pageSize=${limit}&pageNum=1&channelId=${config[category][location]}`
52
+ : `https://genshin.mihoyo.com/content/yuanshen/getContentList?pageSize=${limit}&pageNum=1&channelId=${config[category][location]}`;
52
53
 
53
54
  const response = await got(rootUrl);
54
55
 
@@ -15,16 +15,23 @@ module.exports = async (ctx) => {
15
15
 
16
16
  const data = JSON.parse(response.data.match(/"__NEXT_DATA__" type="application\/json">({"props":.*})<\/script>/)[1]);
17
17
 
18
- const items = data.props.pageProps.project.posts.map((item) => ({
19
- title: item.title,
20
- description: md.render(item.truncatedBody),
21
- link: `${currentUrl}/${item._id}`,
22
- pubDate: parseDate(item.timestamp, 'X'),
23
- author: item.publisher.project.displayName,
24
- }));
18
+ const items = Object.keys(data.props.pageProps.__APOLLO_STATE__)
19
+ .filter((key) => key.startsWith('entry:'))
20
+ .map((key) => {
21
+ const item = data.props.pageProps.__APOLLO_STATE__[key];
22
+ return {
23
+ title: item.title,
24
+ description: md.render(item.body),
25
+ link: `${currentUrl}/${item._id}`,
26
+ pubDate: parseDate(item.publishedAtTimestamp, 'X'),
27
+ author: data.props.pageProps.publicationLayoutProject.displayName,
28
+ };
29
+ });
25
30
 
26
31
  ctx.state.data = {
27
- title: `${data.props.pageProps.project.displayName} - Mirror`,
32
+ title: `${data.props.pageProps.publicationLayoutProject.displayName} - Mirror`,
33
+ description: data.props.pageProps.publicationLayoutProject.description,
34
+ image: data.props.pageProps.publicationLayoutProject.avatarURL,
28
35
  link: currentUrl,
29
36
  item: items,
30
37
  };
@@ -0,0 +1,79 @@
1
+ const cheerio = require('cheerio');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const { getElementChildrenInnerText } = require('./utils');
4
+ const dayjs = require('dayjs');
5
+ const utc = require('dayjs/plugin/utc');
6
+ dayjs.extend(utc);
7
+
8
+ const got = require('@/utils/got');
9
+
10
+ module.exports = async (ctx) => {
11
+ const dateFormatted = dayjs().utcOffset(8).format('YYYYMMDD');
12
+
13
+ const baseUrl = `http://mrdx.cn/content/${dateFormatted}`;
14
+ const link = `${baseUrl}/Page01DK.htm`;
15
+
16
+ const indexPageResponse = await got({
17
+ url: link,
18
+ method: 'get',
19
+ });
20
+ const $ = cheerio.load(indexPageResponse.data);
21
+
22
+ // 当日所有文章Url在<a>的`daoxiang` attribute中
23
+ // 其站点使用**非标准**的HTML语法
24
+ // eg: `<a class="foo" daoxiang="foo-bar.htm">Lorem ipsum</a>`
25
+ const passagesList = $('.listdaohang > ul > li a')
26
+ .toArray()
27
+ .map((item) => ({
28
+ link: new URL(`${baseUrl}/${item.attribs.daoxiang}`).href,
29
+ }));
30
+
31
+ const passages = await Promise.all(
32
+ passagesList.map((passage) =>
33
+ ctx.cache.tryGet(passage.link, async () => {
34
+ const response = await got({
35
+ url: passage.link,
36
+ method: 'get',
37
+ });
38
+
39
+ const $ = cheerio.load(response.data);
40
+
41
+ // 标题在`h2`,`h3`,`h4`,`h5`中,有多余空格和换行符
42
+ // 但是Middleware会处理
43
+ const title =
44
+ getElementChildrenInnerText($('.bggray > .margin15 > h2')[0]) +
45
+ getElementChildrenInnerText($('.bggray > .margin15 > h3')[0]) +
46
+ getElementChildrenInnerText($('.bggray > .margin15 > h4')[0]) +
47
+ getElementChildrenInnerText($('.bggray > .margin15 > h5')[0]);
48
+
49
+ // 作者和发布时间
50
+ // 中间用超多空格分隔
51
+ // 头尾均有多余空格
52
+ // eg: 新华每日电讯 2022年12月21日
53
+ const [author, pubDate] = getElementChildrenInnerText($('.shijian')[0])
54
+ .split(' ')
55
+ .filter((item) => item !== '')
56
+ .map((item) => item.trim());
57
+
58
+ const content = $('.contenttext').html();
59
+
60
+ return {
61
+ title,
62
+ author,
63
+ pubDate: parseDate(pubDate, 'YYYY年MM月DD日'),
64
+ guid: passage.link,
65
+ link: passage.link,
66
+ description: content,
67
+ };
68
+ })
69
+ )
70
+ );
71
+
72
+ ctx.state.data = {
73
+ title: '新华每日电讯',
74
+ link,
75
+ item: passages,
76
+ description:
77
+ '中国报纸发行前三强。位列《人民日报》,《参考消息》之后。《新华每日电讯》是新华社出版的一份新闻电讯报,1993年创办,具有很高的权威性和准确性,有“一报在手,便知天下”之美誉。《新华每日电讯》为对开八版日报,集中刊登[新华社]每天向国内播发的电讯稿及图片稿。打开《新华每日电讯》,中国和全世界每天发生的重大事件便将一目了然。在人类生活节奏日益加快的当今世界,《新华每日电讯》以最便捷、最醒目的方式为公众提供最重要的新闻报道,受到公众的喜爱和拥护。',
78
+ };
79
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/today': ['Dustin-Jiang'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exportss = {
2
+ 'mrdx.cn': {
3
+ _name: '新华每日电讯',
4
+ '.': [
5
+ {
6
+ title: '今日',
7
+ docs: 'https://docs.rsshub.app/traditional-media.html#xin-hua-mei-ri-dian-xun',
8
+ source: ['*'],
9
+ target: '/mrdx/today',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/today', require('./daily'));
3
+ };
@@ -0,0 +1,17 @@
1
+ function getElementChildrenInnerText(element) {
2
+ let text = '';
3
+ for (const child of element.children) {
4
+ if (child.type === 'text') {
5
+ text += child.data.trim();
6
+ }
7
+ if (child.children !== undefined) {
8
+ text += getElementChildrenInnerText(child);
9
+ }
10
+ }
11
+
12
+ return text;
13
+ }
14
+
15
+ module.exports = {
16
+ getElementChildrenInnerText,
17
+ };
@@ -5,7 +5,7 @@ const { parseDate } = require('@/utils/parse-date');
5
5
  const asyncPool = require('tiny-async-pool');
6
6
 
7
7
  module.exports = async (ctx) => {
8
- const link = 'https://news.mtime.com';
8
+ const link = 'http://news.mtime.com';
9
9
  const response = await got(link, {
10
10
  https: {
11
11
  rejectUnauthorized: false,
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/topic/:tid': ['emdoe'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'nautil.us': {
3
+ _name: 'Nautilus',
4
+ '.': [
5
+ {
6
+ title: 'Topics',
7
+ docs: 'https://docs.rsshub.app/en/new-media.html#nautilus',
8
+ source: ['/topics/:tid'],
9
+ target: '/nautil/topic/:tid',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/topic/:tid', require('./topics'));
3
+ };
@@ -0,0 +1,6 @@
1
+ {{ if head.og_image }}
2
+ {{ each head.og_image img }}
3
+ <img src="{{ img.url.split('?')[0] }}">
4
+ {{ /each }}
5
+ {{ /if }}
6
+ {{@ rendered }}
@@ -0,0 +1,57 @@
1
+ const cheerio = require('cheerio');
2
+ const got = require('@/utils/got');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+ const baseUrl = 'https://nautil.us';
7
+
8
+ module.exports = async (ctx) => {
9
+ const categoryIdMap = await ctx.cache.tryGet('nautil:categories', async () => {
10
+ const { data } = await got(`${baseUrl}/wp-json/wp/v2/categories`, {
11
+ searchParams: {
12
+ per_page: 100,
13
+ },
14
+ });
15
+ return data.map((item) => ({
16
+ id: item.id,
17
+ name: item.name,
18
+ slug: item.slug,
19
+ }));
20
+ });
21
+
22
+ const { data: list } = await got(`${baseUrl}/wp-json/wp/v2/posts`, {
23
+ searchParams: {
24
+ categories: categoryIdMap.find((item) => item.slug === ctx.params.tid.toLowerCase()).id,
25
+ per_page: ctx.query.limit ? parseInt(ctx.query.limit) : 20,
26
+ },
27
+ });
28
+
29
+ const out = list.map((item) => {
30
+ const head = item.yoast_head_json;
31
+ const $ = cheerio.load(item.content.rendered, null, false);
32
+ // lazyload images
33
+ $('img').each((_, e) => {
34
+ e = $(e);
35
+ e.attr('src', e.attr('data-src') ?? e.attr('srcset'));
36
+ e.attr('src', e.attr('src').split('?')[0]);
37
+ e.removeAttr('data-src');
38
+ e.removeAttr('srcset');
39
+ });
40
+ return {
41
+ title: item.title.rendered,
42
+ author: item.yoast_head_json.author,
43
+ description: art(path.join(__dirname, 'templates/description.art'), {
44
+ head,
45
+ rendered: $.html(),
46
+ }),
47
+ link: item.link,
48
+ pubDate: parseDate(item.date_gmt),
49
+ };
50
+ });
51
+
52
+ ctx.state.data = {
53
+ title: 'Nautilus | ' + categoryIdMap.find((item) => item.slug === ctx.params.tid.toLowerCase()).name,
54
+ link: `${baseUrl}/topics/${ctx.params.tid}/`,
55
+ item: out,
56
+ };
57
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/ndss': ['ZeddYu'],
3
+ };