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,44 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+
5
+ const baseUrl = 'https://www.paradigm.xyz';
6
+
7
+ module.exports = async (ctx) => {
8
+ const url = `${baseUrl}/writing`;
9
+
10
+ const response = await got(url);
11
+ const $ = cheerio.load(response.data);
12
+
13
+ const nextData = JSON.parse($('#__NEXT_DATA__').text());
14
+ const buildId = nextData.buildId;
15
+ const list = nextData.props.pageProps.posts.map((item) => ({
16
+ title: item.title,
17
+ link: `${baseUrl}${item.slug}`,
18
+ api: `${baseUrl}/_next/data/${buildId}${item.slug}.json`,
19
+ author: item.authors.map((author) => author.name).join(', '),
20
+ pubDate: parseDate(item.originalDate),
21
+ category: item.tags,
22
+ }));
23
+
24
+ const items = await Promise.all(
25
+ list.map((item) =>
26
+ ctx.cache.tryGet(item.link, async () => {
27
+ const response = await got(item.api);
28
+ const $ = cheerio.load(response.data.pageProps.content, null, false);
29
+
30
+ // Remove the TOC
31
+ $('.toc').remove();
32
+ item.description = $.html();
33
+
34
+ return item;
35
+ })
36
+ )
37
+ );
38
+
39
+ ctx.state.data = {
40
+ title: 'Paradigm - Writing',
41
+ link: url,
42
+ item: items,
43
+ };
44
+ };
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/profile/:id/:functionalFlag?': ['hoilc', 'Rongronggg9'],
2
+ '/profile/:id/:functionalFlag?': ['hoilc', 'Rongronggg9', 'devinmugen'],
3
3
  };
@@ -4,8 +4,12 @@ const chrono = require('chrono-node');
4
4
  const { art } = require('@/utils/render');
5
5
  const path = require('path');
6
6
  const config = require('@/config').value;
7
+ const { puppeteerGet } = require('./utils');
7
8
 
8
9
  module.exports = async (ctx) => {
10
+ // use Puppeteer due to the obstacle by cloudflare challenge
11
+ const browser = await require('@/utils/puppeteer')();
12
+
9
13
  const id = ctx.params.id;
10
14
  const displayVideo = ctx.params.functionalFlag !== '0';
11
15
  const includeStories = ctx.params.functionalFlag === '10';
@@ -15,8 +19,8 @@ module.exports = async (ctx) => {
15
19
  const data = await ctx.cache.tryGet(
16
20
  profileUrl,
17
21
  async () => {
18
- const _r = await got(profileUrl);
19
- return _r.data;
22
+ const _r = await puppeteerGet(profileUrl, browser);
23
+ return _r;
20
24
  },
21
25
  config.cache.routeExpire,
22
26
  false
@@ -31,12 +35,8 @@ module.exports = async (ctx) => {
31
35
 
32
36
  async function getMedia(url) {
33
37
  const getPost = async () => {
34
- const response = await got(url, {
35
- headers: {
36
- Referer: profileUrl,
37
- },
38
- });
39
- return response.data;
38
+ const response = await puppeteerGet(url, browser);
39
+ return response;
40
40
  };
41
41
  let data = await ctx.cache.tryGet(url, getPost);
42
42
  if (Object.prototype.toString.call(data) === '[object Object]') {
@@ -178,6 +178,8 @@ module.exports = async (ctx) => {
178
178
  }
179
179
  }
180
180
 
181
+ await browser.close();
182
+
181
183
  ctx.state.data = {
182
184
  title: `${profileName} (@${id}) - Picuki`,
183
185
  link: profileUrl,
@@ -0,0 +1,21 @@
1
+ const puppeteerGet = async (url, browser) => {
2
+ const page = await browser.newPage();
3
+ // await page.setExtraHTTPHeaders({ referer: host });
4
+ await page.setRequestInterception(true);
5
+ page.on('request', (request) => {
6
+ request.resourceType() === 'document' ? request.continue() : request.abort();
7
+ });
8
+ await page.goto(url, {
9
+ waitUntil: 'domcontentloaded',
10
+ });
11
+
12
+ await page.waitForSelector('.wrapper');
13
+
14
+ const html = await page.evaluate(() => document.documentElement.innerHTML);
15
+ await page.close();
16
+ return html;
17
+ };
18
+
19
+ module.exports = {
20
+ puppeteerGet,
21
+ };
@@ -3,7 +3,7 @@ const maskHeader = require('../constants').maskHeader;
3
3
  const assert = require('assert');
4
4
  const queryString = require('query-string');
5
5
 
6
- const allowMode = ['day', 'week', 'month', 'day_male', 'day_female', 'week_original', 'week_rookie', 'day_r18', 'day_male_r18', 'day_female_r18', 'week_r18', 'week_r18g'];
6
+ const allowMode = ['day', 'week', 'month', 'day_male', 'day_female', 'day_ai', 'week_original', 'week_rookie', 'day_r18', 'day_male_r18', 'day_female_r18', 'week_r18', 'week_r18g'];
7
7
 
8
8
  /**
9
9
  * 获取某天的排行榜
@@ -17,6 +17,7 @@ const titles = {
17
17
  day_female_r18: 'pixiv R-18 受女性欢迎排行',
18
18
  week_r18: 'pixiv R-18 周排行',
19
19
  week_r18g: 'pixiv R-18G 排行',
20
+ day_ai: 'AI 生成作品排行榜',
20
21
  };
21
22
 
22
23
  const links = {
@@ -25,6 +26,7 @@ const links = {
25
26
  month: 'https://www.pixiv.net/ranking.php?mode=monthly',
26
27
  day_male: 'https://www.pixiv.net/ranking.php?mode=male',
27
28
  day_female: 'https://www.pixiv.net/ranking.php?mode=female',
29
+ day_ai: 'https://www.pixiv.net/ranking.php?mode=daily_ai',
28
30
  week_original: 'https://www.pixiv.net/ranking.php?mode=original',
29
31
  week_rookie: 'https://www.pixiv.net/ranking.php?mode=rookie',
30
32
  day_r18: 'https://www.pixiv.net/ranking.php?mode=daily_r18',
@@ -40,6 +42,7 @@ const alias = {
40
42
  monthly: 'month',
41
43
  male: 'day_male',
42
44
  female: 'day_female',
45
+ daily_ai: 'day_ai',
43
46
  original: 'week_original',
44
47
  rookie: 'week_rookie',
45
48
  daily_r18: 'day_r18',
@@ -1,5 +1,5 @@
1
1
  <br>
2
- {{ each descData.structuredData.json.screenshot }}
3
- <img src="{{ $value }}">
2
+ {{ each descData.structuredData.screenshot }}
3
+ <img src="{{ $value }}">
4
4
  {{ /each }}
5
5
 
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/notice': ['SunBK201'],
3
+ };
@@ -0,0 +1,54 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const timezone = require('@/utils/timezone');
4
+ const { parseDate } = require('@/utils/parse-date');
5
+
6
+ const host = 'https://www.qlu.edu.cn';
7
+
8
+ module.exports = async (ctx) => {
9
+ const response = await got({
10
+ method: 'get',
11
+ url: `${host}/tzggsh/list1.htm`,
12
+ });
13
+
14
+ const $ = cheerio.load(response.data);
15
+ const list = $('ul.news_list.list2').children();
16
+
17
+ const items = await Promise.all(
18
+ list.map((i, item) => {
19
+ item = $(item);
20
+ const itemTitle = item.find('.news_title').children().text();
21
+ const itemDate = item.find('.news_year').text() + item.find('.news_days').text();
22
+ const path = item.find('.news_title').children().attr('href');
23
+ let itemUrl = '';
24
+ if (!path.startsWith('https://') && !path.startsWith('http://')) {
25
+ itemUrl = host + path;
26
+ } else {
27
+ itemUrl = path;
28
+ }
29
+ return ctx.cache.tryGet(itemUrl, async () => {
30
+ let description = '';
31
+ if (!path.startsWith('https://') && !path.startsWith('http://')) {
32
+ const result = await got(itemUrl);
33
+ const $ = cheerio.load(result.data);
34
+ description = $('.read').html().trim();
35
+ } else {
36
+ description = itemTitle;
37
+ }
38
+ return {
39
+ title: itemTitle,
40
+ link: itemUrl,
41
+ pubDate: timezone(parseDate(itemDate), 8),
42
+ description,
43
+ };
44
+ });
45
+ })
46
+ );
47
+
48
+ ctx.state.data = {
49
+ title: `齐鲁工业大学 - 通知公告`,
50
+ link: `${host}/tzggsh/list1.htm`,
51
+ description: '齐鲁工业大学 - 通知公告',
52
+ item: items,
53
+ };
54
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'qlu.edu.cn': {
3
+ _name: '齐鲁工业大学',
4
+ '.': [
5
+ {
6
+ title: '通知公告',
7
+ docs: 'https://docs.rsshub.app/university.html#qi-lu-gong-ye-da-xue',
8
+ source: ['/tzggsh/list1.htm'],
9
+ target: '/qlu/notice',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/notice', require('./notice'));
3
+ };
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ '': ['meixger'],
3
+ '/': ['meixger'],
4
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'bytes.dev': {
3
+ _name: 'ui.dev',
4
+ '.': [
5
+ {
6
+ title: 'React Newsletter',
7
+ docs: 'https://docs.rsshub.app/en/programming.html#ui-dev-bytes',
8
+ source: ['/issues', '/'],
9
+ target: '/reactnewsletter',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,25 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const currentURL = 'https://reactnewsletter.com/issues';
4
+ const { parseDate } = require('@/utils/parse-date');
5
+
6
+ module.exports = async (ctx) => {
7
+ const resp = await got(currentURL);
8
+ const $ = cheerio.load(resp.data);
9
+ const text = $('script#__NEXT_DATA__').text();
10
+ const json = JSON.parse(text);
11
+
12
+ const items = json.props.pageProps.issues.map((item) => ({
13
+ title: item.title,
14
+ pubDate: parseDate(item.date),
15
+ description: item.summary,
16
+ link: `/issues/${item.slug}`,
17
+ }));
18
+
19
+ ctx.state.data = {
20
+ title: 'reactnewsletter.dev',
21
+ description: 'Stay up to date on the latest React news, tutorials, resources, and more. Delivered every Tuesday, for free.',
22
+ link: currentURL,
23
+ item: items,
24
+ };
25
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/', require('./reactnewsletter'));
3
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/publications/:username': ['nczitzk'],
3
+ };
@@ -0,0 +1,70 @@
1
+ const cheerio = require('cheerio');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+
4
+ module.exports = async (ctx) => {
5
+ const id = ctx.params.id;
6
+
7
+ const rootUrl = 'https://www.researchgate.net';
8
+ const currentUrl = `${rootUrl}/profile/${id}`;
9
+ const browser = await require('@/utils/puppeteer')();
10
+ const page = await browser.newPage();
11
+ await page.setRequestInterception(true);
12
+ page.on('request', (request) => {
13
+ request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
14
+ });
15
+ await page.goto(currentUrl);
16
+ const response = await page.evaluate(() => document.documentElement.innerHTML);
17
+ await page.close();
18
+
19
+ const $ = cheerio.load(response);
20
+
21
+ const list = $('div[itemprop="headline"] a')
22
+ .toArray()
23
+ .slice(0, ctx.query.limit ? Number(ctx.query.limit) : 15)
24
+ .map((item) => {
25
+ item = $(item);
26
+ return {
27
+ title: item.text(),
28
+ link: item.attr('href'),
29
+ };
30
+ });
31
+
32
+ const items = await Promise.all(
33
+ list.map((item) =>
34
+ ctx.cache.tryGet(item.link, async () => {
35
+ const page = await browser.newPage();
36
+ await page.setRequestInterception(true);
37
+ page.on('request', (request) => {
38
+ request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort();
39
+ });
40
+ await page.goto(item.link);
41
+ const detailResponse = await page.evaluate(() => document.documentElement.innerHTML);
42
+ await page.close();
43
+ const content = cheerio.load(detailResponse);
44
+
45
+ item.doi = content('meta[property="citation_doi"]').attr('content');
46
+ item.pubDate = parseDate(content('meta[property="citation_publication_date"]').attr('content'));
47
+
48
+ const authors = [];
49
+
50
+ content('meta[property="citation_author"]').each(function () {
51
+ authors.push(content(this).attr('content'));
52
+ });
53
+
54
+ item.author = authors.join(', ');
55
+
56
+ item.description = content('div[itemprop="description"]').html();
57
+
58
+ return item;
59
+ })
60
+ )
61
+ );
62
+
63
+ await browser.close();
64
+
65
+ ctx.state.data = {
66
+ title: `${$('meta[property="profile:username"]').attr('content')}'s Publications - ResearchGate`,
67
+ link: currentUrl,
68
+ item: items,
69
+ };
70
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'researchgate.net': {
3
+ _name: 'ResearchGate',
4
+ '.': [
5
+ {
6
+ title: 'Publications',
7
+ docs: 'https://docs.rsshub.app/study.html#researchgate',
8
+ source: ['/profile/:username'],
9
+ target: '/researchgate/publications/:username',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/publications/:id', require('./publications'));
3
+ };
@@ -0,0 +1,79 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const config = require('@/config').value;
4
+ const { parseDate } = require('@/utils/parse-date');
5
+ const timezone = require('@/utils/timezone');
6
+ const { art } = require('@/utils/render');
7
+ const path = require('path');
8
+
9
+ module.exports = async (ctx) => {
10
+ const tid = ctx.params.tid;
11
+ const cookieString = config.saraba1st.cookie ? config.saraba1st.cookie : '';
12
+ const res = await got('https://bbs.saraba1st.com/2b/' + tid + '.html', {
13
+ headers: {
14
+ Cookie: cookieString,
15
+ },
16
+ });
17
+ const $ = cheerio.load(res.data);
18
+ const title = $('head title').text().replace(/-.*/, '');
19
+ const list = $('#threadlisttableid tbody[id^="normalthread_"] tr');
20
+ const count = list
21
+ .slice(0, ctx.query.limit ? Number(ctx.query.limit) : 20)
22
+ .toArray()
23
+ .map((each) => {
24
+ each = $(each);
25
+ const floor = each.find('th.new a.s.xst').text();
26
+ const floorUrl = each.find('th.new a.s.xst').attr('href');
27
+ return {
28
+ title: `${title}:${floor}`,
29
+ link: new URL(floorUrl, 'https://bbs.saraba1st.com/2b/').href,
30
+ author: each.find('td.by cite').text(),
31
+ pubDate: timezone(parseDate(each.find('td.by em').first().text()), +8),
32
+ };
33
+ });
34
+
35
+ const resultItems = await Promise.all(
36
+ count.map((i) =>
37
+ ctx.cache.tryGet(i.link, async () => {
38
+ i.description = await fetchContent(i.link);
39
+ return i;
40
+ })
41
+ )
42
+ );
43
+
44
+ ctx.state.data = {
45
+ title: `Stage1 论坛 - ${title}`,
46
+ link: `https://bbs.saraba1st.com/2b/${tid}.html`,
47
+ // item: await resultItems,
48
+ item: resultItems,
49
+ };
50
+ };
51
+
52
+ async function fetchContent(url) {
53
+ // Fetch the subpageinof
54
+ const cookieString = config.saraba1st.cookie ? config.saraba1st.cookie : '';
55
+ const subres = await got(url, {
56
+ headers: {
57
+ Cookie: cookieString,
58
+ },
59
+ });
60
+ const subind = cheerio.load(subres.data);
61
+ const stubS = subind('<div>');
62
+ subind('#postlist')
63
+ .find('div[id*="post_"] ')
64
+ .each(function () {
65
+ if (subind(this).find('td[id*="postmessage_"]').length > 0) {
66
+ const section = art(path.join(__dirname, 'templates/digest.art'), {
67
+ author: {
68
+ link: subind(this).find('.pls.favatar div.authi a').attr('href'),
69
+ name: subind(this).find('.pls.favatar div.authi').text(),
70
+ postinfo: subind(this).find('div.authi em[id*=authorposton]').text(),
71
+ },
72
+ msg: subind(this).find('td[id*="postmessage_"]').html(),
73
+ });
74
+ stubS.append(section);
75
+ }
76
+ });
77
+
78
+ return stubS.html();
79
+ }
@@ -1,3 +1,4 @@
1
1
  module.exports = {
2
+ '/digest/:tid': ['shinemoon'],
2
3
  '/thread/:tid': ['zengxs'],
3
4
  };
@@ -3,12 +3,21 @@ module.exports = {
3
3
  _name: 'Saraba1st',
4
4
  bbs: [
5
5
  {
6
- title: '帖子',
6
+ title: '论坛',
7
7
  docs: 'https://docs.rsshub.app/bbs.html#saraba1st',
8
8
  source: '/2b/:id',
9
9
  target: (params) => {
10
- const id = params.id.includes('thread') ? params.id.split('-')[1] : '';
11
- return id ? `/saraba1st/thread/${id}` : '';
10
+ let id = params.id;
11
+ // For Digest
12
+ if (id.match('forum') !== null) {
13
+ id = id.substring(0, id.length - 5);
14
+ return `/saraba1st/digest/${id}`;
15
+ }
16
+ // For Thread
17
+ else if (id.match('thread') !== null) {
18
+ id = params.id.includes('thread') ? params.id.split('-')[1] : '';
19
+ return id ? `/saraba1st/thread/${id}` : '';
20
+ }
12
21
  },
13
22
  },
14
23
  ],
@@ -1,3 +1,4 @@
1
1
  module.exports = (router) => {
2
2
  router.get('/thread/:tid', require('./thread'));
3
+ router.get('/digest/:tid', require('./digest'));
3
4
  };
@@ -0,0 +1,5 @@
1
+ <div class="quoted" style="background:rgba(220,220,220,0.3);">
2
+ <a style="text-decoration: none;" href="https://bbs.saraba1st.com/2b/{{ author.link }}">{{ author.name }}</a>
3
+ <span style="text-decoration: none;color:#aaa;">{{ author.postinfo }}</span>
4
+ </div>
5
+ <div class="content" style="margin-bottom:20px!important;">{{@ msg }}</div>
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/programme/:id?': ['nczitzk'],
2
+ '/programme/:id?/:limit?/:isFull?': ['nczitzk'],
3
3
  };
@@ -6,11 +6,13 @@ const path = require('path');
6
6
 
7
7
  module.exports = async (ctx) => {
8
8
  const id = ctx.params.id ?? '1';
9
+ const limit = ctx.params.limit ? parseInt(ctx.params.limit) : 15;
10
+ const isFull = /t|y/i.test(ctx.params.isFull ?? 'true');
9
11
 
10
12
  const rootUrl = 'https://www.sctv.com';
11
13
  const apiRootUrl = 'https://kscgc.sctv-tf.com';
12
- const apiUrl = `${apiRootUrl}//sctv/lookback/${id}/index.json`;
13
- const listUrl = `${apiRootUrl}//sctv/lookback/index/lookbackList.json`;
14
+ const apiUrl = `${apiRootUrl}/sctv/lookback/${id}/date.json`;
15
+ const listUrl = `${apiRootUrl}/sctv/lookback/index/lookbackList.json`;
14
16
  const currentUrl = `${rootUrl}/column/detail?programmeIndex=/sctv/lookback/${id}/index.json`;
15
17
 
16
18
  let response = await got({
@@ -18,23 +20,43 @@ module.exports = async (ctx) => {
18
20
  url: apiUrl,
19
21
  });
20
22
 
21
- const programmeUrl = `${apiRootUrl}/${response.data.data.programmeUrl}`;
23
+ let items = [];
22
24
 
23
- response = await got({
24
- method: 'get',
25
- url: programmeUrl,
26
- });
27
-
28
- const items = response.data.data.programmeList.map((item) => ({
29
- title: item.programmeTitle,
30
- link: item.programmeUrl,
31
- pubDate: timezone(parseDate(item.pubTime), +8),
32
- description: art(path.join(__dirname, 'templates/description.art'), {
33
- cover: item.programmeImage,
34
- video: item.programmeUrl,
35
- }),
25
+ const array = response.data.data.programmeArray.slice(0, limit).map((list) => ({
26
+ guid: list.id,
27
+ link: `${apiRootUrl}${list.programmeListUrl}`,
36
28
  }));
37
29
 
30
+ await Promise.all(
31
+ array.map((list) =>
32
+ ctx.cache.tryGet(list.link, async () => {
33
+ const detailResponse = await got({
34
+ method: 'get',
35
+ url: list.link,
36
+ });
37
+
38
+ const currentItems = detailResponse.data.data.programmeList.map((item) => ({
39
+ guid: item.id,
40
+ title: item.programmeTitle,
41
+ link: item.programmeUrl,
42
+ pubDate: timezone(parseDate(item.pubTime), +8),
43
+ description: art(path.join(__dirname, 'templates/description.art'), {
44
+ cover: item.programmeImage,
45
+ video: item.programmeUrl,
46
+ }),
47
+ }));
48
+
49
+ let currentFullItems = [];
50
+
51
+ if (isFull) {
52
+ currentFullItems = currentItems.filter((item) => /(\d{4}\.\d{2}\.\d{2})/.test(item.title));
53
+ }
54
+
55
+ items = [...items, ...(currentFullItems.length === 0 ? currentItems : currentFullItems)];
56
+ })
57
+ )
58
+ );
59
+
38
60
  response = await got({
39
61
  method: 'get',
40
62
  url: listUrl,
@@ -52,7 +74,7 @@ module.exports = async (ctx) => {
52
74
  ctx.state.data = {
53
75
  title: `四川广播电视台 - ${name}`,
54
76
  link: currentUrl,
55
- item: items,
77
+ item: items.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 100),
56
78
  image: cover,
57
79
  };
58
80
  };
@@ -1,3 +1,3 @@
1
1
  module.exports = function (router) {
2
- router.get('/programme/:id?', require('./programme'));
2
+ router.get('/programme/:id?/:limit?/:isFull?', require('./programme'));
3
3
  };