rsshub 1.0.0-master.fc5a2f6 → 1.0.0-master.fc648b5

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 (292) hide show
  1. package/lib/config.js +4 -0
  2. package/lib/middleware/anti-hotlink.js +90 -22
  3. package/lib/middleware/parameter.js +65 -32
  4. package/lib/middleware/templates/iframe.art +14 -0
  5. package/lib/radar-rules.js +0 -92
  6. package/lib/router.js +22 -22
  7. package/lib/routes/agefans/update.js +1 -1
  8. package/lib/routes/novel/biqugeinfo.js +2 -2
  9. package/lib/routes/universities/uestc/sice.js +12 -33
  10. package/lib/routes/weibo/user.js +10 -19
  11. package/lib/v2/19lou/index.js +74 -0
  12. package/lib/v2/19lou/maintainer.js +3 -0
  13. package/lib/v2/19lou/radar.js +29 -0
  14. package/lib/v2/19lou/router.js +3 -0
  15. package/lib/v2/36kr/router.js +1 -1
  16. package/lib/v2/36kr/user.js +47 -22
  17. package/lib/v2/acfun/article.js +100 -0
  18. package/lib/{routes → v2}/acfun/bangumi.js +7 -7
  19. package/lib/v2/acfun/maintainer.js +5 -0
  20. package/lib/v2/acfun/radar.js +25 -0
  21. package/lib/v2/acfun/router.js +5 -0
  22. package/lib/v2/acfun/video.js +45 -0
  23. package/lib/v2/agora0/index.js +54 -0
  24. package/lib/v2/agora0/maintainer.js +3 -0
  25. package/lib/v2/agora0/radar.js +13 -0
  26. package/lib/v2/agora0/router.js +3 -0
  27. package/lib/v2/apnews/maintainer.js +3 -0
  28. package/lib/v2/apnews/radar.js +13 -0
  29. package/lib/v2/apnews/router.js +3 -0
  30. package/lib/v2/apnews/templates/description.art +14 -0
  31. package/lib/v2/apnews/topics.js +44 -0
  32. package/lib/v2/appleinsider/index.js +59 -0
  33. package/lib/v2/appleinsider/maintainer.js +3 -0
  34. package/lib/v2/appleinsider/radar.js +13 -0
  35. package/lib/v2/appleinsider/router.js +3 -0
  36. package/lib/v2/cbnweek/index.js +46 -0
  37. package/lib/v2/cbnweek/maintainer.js +3 -0
  38. package/lib/v2/cbnweek/radar.js +13 -0
  39. package/lib/v2/cbnweek/router.js +3 -0
  40. package/lib/v2/ccac/news.js +12 -3
  41. package/lib/v2/cde/index.js +2 -2
  42. package/lib/v2/cde/maintainer.js +1 -0
  43. package/lib/v2/cde/radar.js +22 -4
  44. package/lib/v2/cde/router.js +1 -0
  45. package/lib/v2/cde/templates/xxgk/breakthroughCure.art +18 -0
  46. package/lib/v2/cde/templates/xxgk/cliniCal.art +16 -0
  47. package/lib/v2/cde/templates/xxgk/priorityApproval.art +18 -0
  48. package/lib/v2/cde/utils.js +2 -2
  49. package/lib/v2/cde/xxgk.js +73 -0
  50. package/lib/v2/chinadegrees/maintainer.js +3 -0
  51. package/lib/v2/chinadegrees/province.js +66 -0
  52. package/lib/v2/chinadegrees/radar.js +13 -0
  53. package/lib/v2/chinadegrees/router.js +3 -0
  54. package/lib/v2/chinadegrees/templates/description.art +4 -0
  55. package/lib/v2/cnjxol/index.js +94 -0
  56. package/lib/v2/cnjxol/maintainer.js +4 -0
  57. package/lib/v2/cnjxol/radar.js +19 -0
  58. package/lib/v2/cnjxol/router.js +3 -0
  59. package/lib/v2/cnjxol/templates/description.art +2 -0
  60. package/lib/v2/cscse/maintainer.js +3 -0
  61. package/lib/v2/cscse/radar.js +13 -0
  62. package/lib/v2/cscse/router.js +3 -0
  63. package/lib/v2/cscse/tzgg.js +54 -0
  64. package/lib/v2/dgjyw/index.js +67 -0
  65. package/lib/v2/dgjyw/maintainer.js +3 -0
  66. package/lib/v2/dgjyw/radar.js +13 -0
  67. package/lib/v2/dgjyw/router.js +3 -0
  68. package/lib/v2/domp4/detail.js +67 -0
  69. package/lib/v2/domp4/latest.js +31 -0
  70. package/lib/v2/domp4/maintainer.js +4 -0
  71. package/lib/v2/domp4/radar.js +25 -0
  72. package/lib/v2/domp4/router.js +4 -0
  73. package/lib/v2/domp4/utils.js +72 -0
  74. package/lib/v2/douyin/hashtag.js +5 -43
  75. package/lib/v2/douyin/live.js +68 -0
  76. package/lib/v2/douyin/maintainer.js +2 -0
  77. package/lib/v2/douyin/radar.js +8 -0
  78. package/lib/v2/douyin/router.js +1 -0
  79. package/lib/v2/douyin/user.js +5 -43
  80. package/lib/v2/douyin/utils.js +50 -0
  81. package/lib/v2/economist/full.js +6 -4
  82. package/lib/v2/elsevier/issue.js +62 -0
  83. package/lib/v2/elsevier/journal.js +72 -0
  84. package/lib/v2/elsevier/maintainer.js +2 -2
  85. package/lib/v2/elsevier/radar.js +5 -5
  86. package/lib/v2/elsevier/router.js +4 -2
  87. package/lib/v2/elsevier/templates/description.art +5 -5
  88. package/lib/v2/gov/beijing/jw/tzgg.js +58 -0
  89. package/lib/v2/gov/customs/list.js +21 -17
  90. package/lib/v2/gov/customs/utils.js +9 -5
  91. package/lib/v2/gov/maintainer.js +3 -0
  92. package/lib/v2/gov/nmpa/generic.js +76 -0
  93. package/lib/v2/gov/pbc/goutongjiaoliu.js +20 -15
  94. package/lib/v2/gov/pbc/tradeAnnouncement.js +18 -14
  95. package/lib/v2/gov/radar.js +57 -27
  96. package/lib/v2/gov/router.js +3 -0
  97. package/lib/v2/gov/xuzhou/hrss.js +54 -0
  98. package/lib/v2/hackertalk/index.js +23 -0
  99. package/lib/v2/hackertalk/maintainer.js +3 -0
  100. package/lib/v2/hackertalk/radar.js +13 -0
  101. package/lib/v2/hackertalk/router.js +3 -0
  102. package/lib/v2/hashnode/blog.js +62 -0
  103. package/lib/v2/hashnode/maintainer.js +3 -0
  104. package/lib/v2/hashnode/radar.js +13 -0
  105. package/lib/v2/hashnode/router.js +3 -0
  106. package/lib/v2/hashnode/templates/description.art +2 -0
  107. package/lib/v2/hdu/cs/{index.js → notice.js} +1 -4
  108. package/lib/v2/hdu/cs/pg.js +54 -0
  109. package/lib/v2/hdu/maintainer.js +1 -0
  110. package/lib/v2/hdu/radar.js +6 -0
  111. package/lib/v2/hdu/router.js +2 -1
  112. package/lib/v2/heu/gx/list.js +2 -2
  113. package/lib/v2/heu/job/list.js +2 -2
  114. package/lib/v2/heu/uae/list.js +2 -2
  115. package/lib/v2/heu/yjsy/list.js +2 -2
  116. package/lib/v2/hk01/channel.js +40 -0
  117. package/lib/{routes → v2}/hk01/hot.js +2 -1
  118. package/lib/v2/hk01/issue.js +41 -0
  119. package/lib/v2/hk01/maintainer.js +7 -0
  120. package/lib/v2/hk01/radar.js +37 -0
  121. package/lib/v2/hk01/router.js +7 -0
  122. package/lib/{routes → v2}/hk01/tag.js +2 -1
  123. package/lib/{routes → v2}/hk01/zone.js +3 -2
  124. package/lib/v2/hotukdeals/index.js +1 -1
  125. package/lib/v2/ieee/journal.js +78 -0
  126. package/lib/v2/ieee/maintainer.js +2 -2
  127. package/lib/v2/ieee/radar.js +4 -4
  128. package/lib/v2/ieee/{latestdate.js → recent.js} +34 -42
  129. package/lib/v2/ieee/router.js +4 -2
  130. package/lib/v2/ieee/templates/description.art +5 -5
  131. package/lib/v2/ielts/index.js +7 -2
  132. package/lib/v2/keep/maintainer.js +3 -0
  133. package/lib/v2/keep/radar.js +13 -0
  134. package/lib/v2/keep/router.js +3 -0
  135. package/lib/v2/keep/templates/user.art +16 -0
  136. package/lib/{routes → v2}/keep/user.js +14 -4
  137. package/lib/v2/mdpi/journal.js +65 -0
  138. package/lib/v2/mdpi/maintainer.js +3 -0
  139. package/lib/v2/mdpi/radar.js +13 -0
  140. package/lib/v2/mdpi/router.js +3 -0
  141. package/lib/v2/mdpi/templates/description.art +12 -0
  142. package/lib/v2/mindmeister/example.js +44 -0
  143. package/lib/v2/mindmeister/maintainer.js +3 -0
  144. package/lib/v2/mindmeister/radar.js +13 -0
  145. package/lib/v2/mindmeister/router.js +3 -0
  146. package/lib/v2/mindmeister/templates/image.art +1 -0
  147. package/lib/v2/mirror/index.js +34 -0
  148. package/lib/v2/mirror/maintainer.js +3 -0
  149. package/lib/v2/mirror/radar.js +17 -0
  150. package/lib/v2/mirror/router.js +3 -0
  151. package/lib/v2/nbd/radar.js +2 -2
  152. package/lib/v2/ncwu/maintainer.js +3 -0
  153. package/lib/v2/ncwu/notice.js +27 -0
  154. package/lib/v2/ncwu/radar.js +13 -0
  155. package/lib/v2/ncwu/router.js +3 -0
  156. package/lib/v2/netease/exclusive.js +148 -0
  157. package/lib/v2/netease/maintainer.js +1 -0
  158. package/lib/v2/netease/radar.js +8 -0
  159. package/lib/v2/netease/router.js +1 -0
  160. package/lib/v2/netease/templates/exclusive.art +11 -0
  161. package/lib/v2/nju/rczp.js +34 -24
  162. package/lib/v2/njust/utils.js +4 -0
  163. package/lib/v2/nuaa/utils/pypasswaf.js +4 -5
  164. package/lib/v2/nyaa/maintainer.js +4 -0
  165. package/lib/v2/nyaa/radar.js +32 -0
  166. package/lib/v2/nyaa/router.js +4 -0
  167. package/lib/{routes → v2}/nyaa/search.js +4 -2
  168. package/lib/v2/nytimes/daily_briefing_chinese.js +47 -41
  169. package/lib/v2/nytimes/index.js +3 -3
  170. package/lib/v2/nytimes/maintainer.js +1 -1
  171. package/lib/v2/nytimes/templates/image.art +3 -0
  172. package/lib/v2/nytimes/utils.js +7 -1
  173. package/lib/v2/oceanengine/arithmeticIndex.js +145 -0
  174. package/lib/v2/oceanengine/maintainer.js +3 -0
  175. package/lib/v2/oceanengine/radar.js +13 -0
  176. package/lib/v2/oceanengine/router.js +3 -0
  177. package/lib/v2/oceanengine/templates/content.art +14 -0
  178. package/lib/v2/openwrt/maintainer.js +3 -0
  179. package/lib/v2/openwrt/radar.js +13 -0
  180. package/lib/v2/openwrt/releases.js +25 -0
  181. package/lib/v2/openwrt/router.js +3 -0
  182. package/lib/v2/pincong/utils.js +7 -1
  183. package/lib/v2/pku/maintainer.js +3 -0
  184. package/lib/v2/pku/radar.js +20 -0
  185. package/lib/v2/pku/router.js +3 -0
  186. package/lib/v2/pku/ss/admission.js +53 -0
  187. package/lib/v2/pku/ss/notice.js +53 -0
  188. package/lib/v2/pku/ss/pg_admin.js +53 -0
  189. package/lib/v2/prestige-av/maintainer.js +3 -0
  190. package/lib/v2/prestige-av/radar.js +18 -0
  191. package/lib/v2/prestige-av/router.js +3 -0
  192. package/lib/{routes → v2}/prestige-av/series.js +8 -5
  193. package/lib/v2/qq/kg/cache.js +28 -0
  194. package/lib/v2/qq/kg/reply.js +21 -0
  195. package/lib/v2/qq/kg/user.js +50 -0
  196. package/lib/v2/qq/maintainer.js +2 -0
  197. package/lib/v2/qq/radar.js +14 -0
  198. package/lib/v2/qq/router.js +2 -0
  199. package/lib/v2/samsung/maintainer.js +3 -0
  200. package/lib/v2/samsung/radar.js +13 -0
  201. package/lib/v2/samsung/research/blog.js +49 -0
  202. package/lib/v2/samsung/router.js +3 -0
  203. package/lib/v2/{jasa/latest.js → scitation/journal.js} +24 -27
  204. package/lib/v2/scitation/maintainer.js +4 -0
  205. package/lib/v2/scitation/radar.js +19 -0
  206. package/lib/v2/scitation/router.js +4 -0
  207. package/lib/v2/scitation/section.js +90 -0
  208. package/lib/v2/scitation/templates/description.art +11 -0
  209. package/lib/v2/shuiguopai/index.js +76 -0
  210. package/lib/v2/shuiguopai/maintainer.js +3 -0
  211. package/lib/v2/shuiguopai/radar.js +13 -0
  212. package/lib/v2/shuiguopai/router.js +3 -0
  213. package/lib/v2/shuiguopai/templates/description.art +6 -0
  214. package/lib/v2/springer/journal.js +72 -0
  215. package/lib/v2/springer/maintainer.js +3 -0
  216. package/lib/v2/springer/radar.js +13 -0
  217. package/lib/v2/springer/router.js +3 -0
  218. package/lib/v2/springer/templates/description.art +12 -0
  219. package/lib/v2/supchina/index.js +67 -0
  220. package/lib/v2/supchina/maintainer.js +4 -0
  221. package/lib/v2/supchina/podcasts.js +66 -0
  222. package/lib/v2/supchina/radar.js +19 -0
  223. package/lib/v2/supchina/router.js +4 -0
  224. package/lib/v2/techflow520/index.js +34 -0
  225. package/lib/v2/techflow520/maintainer.js +4 -0
  226. package/lib/v2/techflow520/newsflash.js +32 -0
  227. package/lib/v2/techflow520/radar.js +19 -0
  228. package/lib/v2/techflow520/router.js +4 -0
  229. package/lib/v2/tencent/cloud/column.js +51 -0
  230. package/lib/v2/tencent/maintainer.js +1 -0
  231. package/lib/v2/tencent/radar.js +11 -0
  232. package/lib/v2/tencent/router.js +1 -0
  233. package/lib/v2/test/index.js +16 -1
  234. package/lib/v2/tiktok/user.js +28 -38
  235. package/lib/v2/trending/allTrending.js +169 -0
  236. package/lib/v2/trending/maintainer.js +3 -0
  237. package/lib/v2/trending/radar.js +35 -0
  238. package/lib/v2/trending/router.js +3 -0
  239. package/lib/v2/trending/templates/content.art +24 -0
  240. package/lib/v2/u3c3/index.js +59 -0
  241. package/lib/v2/u3c3/maintainer.js +3 -0
  242. package/lib/v2/u3c3/radar.js +29 -0
  243. package/lib/v2/u3c3/router.js +3 -0
  244. package/lib/v2/uraaka-joshi/uraaka-joshi-user.js +7 -1
  245. package/lib/v2/uraaka-joshi/uraaka-joshi.js +8 -1
  246. package/lib/v2/vlive/index.js +71 -0
  247. package/lib/v2/vlive/maintainer.js +3 -0
  248. package/lib/v2/vlive/radar.js +13 -0
  249. package/lib/v2/vlive/router.js +3 -0
  250. package/lib/v2/vlive/templates/post.art +8 -0
  251. package/lib/v2/vlive/templates/video.art +3 -0
  252. package/lib/v2/xiaohongshu/util.js +6 -6
  253. package/lib/v2/xjtu/2yuan/news.js +61 -0
  254. package/lib/v2/xjtu/dean.js +83 -0
  255. package/lib/{routes/universities → v2}/xjtu/ee.js +5 -5
  256. package/lib/{routes/universities → v2}/xjtu/gs/tzgg.js +6 -6
  257. package/lib/v2/xjtu/international.js +51 -0
  258. package/lib/v2/xjtu/job.js +81 -0
  259. package/lib/v2/xjtu/maintainer.js +9 -0
  260. package/lib/v2/xjtu/radar.js +53 -0
  261. package/lib/v2/xjtu/router.js +9 -0
  262. package/lib/v2/xjtu/std.js +58 -0
  263. package/lib/v2/xjtu/templates/attachments.art +3 -0
  264. package/lib/v2/xjtu/templates/std.art +4 -0
  265. package/lib/v2/xueqiu/column.js +42 -0
  266. package/lib/v2/xueqiu/maintainer.js +1 -0
  267. package/lib/v2/xueqiu/radar.js +6 -0
  268. package/lib/v2/xueqiu/router.js +1 -0
  269. package/lib/v2/zhangyoubao/index.js +42 -0
  270. package/lib/v2/zhangyoubao/maintainer.js +3 -0
  271. package/lib/v2/zhangyoubao/radar.js +13 -0
  272. package/lib/v2/zhangyoubao/router.js +3 -0
  273. package/lib/v2/zhangyoubao/templates/article.art +1 -0
  274. package/package.json +20 -19
  275. package/lib/routes/acfun/video.js +0 -44
  276. package/lib/routes/apnews/topics.js +0 -43
  277. package/lib/routes/dgjyw/index.js +0 -66
  278. package/lib/routes/hk01/channel.js +0 -22
  279. package/lib/routes/hk01/issue.js +0 -22
  280. package/lib/routes/mirror/entries.js +0 -80
  281. package/lib/routes/universities/ncwu/notice.js +0 -42
  282. package/lib/routes/universities/xjtu/dean.js +0 -86
  283. package/lib/routes/universities/xjtu/international.js +0 -53
  284. package/lib/routes/universities/xjtu/job.js +0 -50
  285. package/lib/v2/elsevier/latest.js +0 -87
  286. package/lib/v2/elsevier/volume.js +0 -75
  287. package/lib/v2/ieee/latestvol.js +0 -87
  288. package/lib/v2/jasa/maintainer.js +0 -4
  289. package/lib/v2/jasa/radar.js +0 -19
  290. package/lib/v2/jasa/router.js +0 -4
  291. package/lib/v2/jasa/section.js +0 -95
  292. package/lib/v2/jasa/templates/description.art +0 -11
@@ -0,0 +1,81 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const timezone = require('@/utils/timezone');
4
+ const path = require('path');
5
+ const { art } = require('@/utils/render');
6
+
7
+ const baseUrl = 'https://job.xjtu.edu.cn';
8
+ const arr = {
9
+ zxgg: '中心公告',
10
+ xds: '选调生',
11
+ zddw: '重点单位',
12
+ gjzz: '国际组织',
13
+ cxcy: '创新创业',
14
+ jysx: '就业实习',
15
+ };
16
+
17
+ module.exports = async (ctx) => {
18
+ const subpath = ctx.params.subpath ?? 'zxgg';
19
+ const getTzgg = await got.post(`${baseUrl}/xsfw/sys/jyxtgktapp/modules/jywzManage/getTzgg.do`, {
20
+ form: {
21
+ requestParamStr: '{"pageSize":7,"pageNumber":1}',
22
+ },
23
+ https: {
24
+ rejectUnauthorized: false,
25
+ },
26
+ });
27
+
28
+ const menuid = getTzgg.data.data.find((item) => item.menutitle === arr[subpath]).menuid;
29
+ const { data } = await got.post(`${baseUrl}/xsfw/sys/jyxtgktapp/modules/jywzManage/getMhcxWzData.do`, {
30
+ form: {
31
+ requestParamStr: `{"pageSize":4,"pageNumber":1,"LMDM":${menuid}}`,
32
+ },
33
+ https: {
34
+ rejectUnauthorized: false,
35
+ },
36
+ });
37
+ const list = data.data.map((item) => ({
38
+ title: item.menutitle,
39
+ description: item.NR,
40
+ pubDate: timezone(parseDate(item.SBSJ), +8),
41
+ guid: item.menuid,
42
+ link: `${baseUrl}/xsfw/sys/emaphome/website/template/detail.html?menuid=${item.menuid}&msg=TZGG&msgChild=NRXQ`,
43
+ }));
44
+
45
+ const items = await Promise.all(
46
+ list.map((item) =>
47
+ ctx.cache.tryGet(item.link, async () => {
48
+ const response = await got.post(`${baseUrl}/xsfw/sys/jyxtgktapp/modules/jywzManage/getWzone.do`, {
49
+ form: {
50
+ requestParamStr: `{"WID":${item.guid}}`,
51
+ },
52
+ https: {
53
+ rejectUnauthorized: false,
54
+ },
55
+ });
56
+
57
+ let attachments = '';
58
+ if (response.data.data[0].FJ) {
59
+ const attachmentData = await got(`${baseUrl}/xsfw/sys/emapcomponent/file/getUploadedAttachment.do?fileToken=${response.data.data[0].FJ}`, {
60
+ https: {
61
+ rejectUnauthorized: false,
62
+ },
63
+ });
64
+ attachments = art(path.join(__dirname, 'templates/attachments.art'), {
65
+ items: attachmentData.data.items,
66
+ });
67
+ }
68
+
69
+ item.author = response.data.data[0].CZZXM;
70
+ item.description = response.data.data[0].NR + attachments;
71
+ return item;
72
+ })
73
+ )
74
+ );
75
+
76
+ ctx.state.data = {
77
+ title: `西安交通大学学生就业创业信息网 - ${arr[subpath]}`,
78
+ link: baseUrl,
79
+ item: items,
80
+ };
81
+ };
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ '/2yuan/news/:id?': ['nczitzk'],
3
+ '/dean/:subpath+': ['hoilc'],
4
+ '/ee/:id?': ['DylanXie123'],
5
+ '/gs/tzgg': ['nczitzk'],
6
+ '/international/:subpath+': ['guitaoliu'],
7
+ '/job/:subpath?': ['DylanXie123'],
8
+ '/std/:category?': ['nczitzk'],
9
+ };
@@ -0,0 +1,53 @@
1
+ module.exports = {
2
+ 'xjtu.edu.cn': {
3
+ _name: '西安交通大学',
4
+ '2yuan': [
5
+ {
6
+ title: '第二附属医院新闻',
7
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-di-er-fu-shu-yi-yuan-xin-wen',
8
+ source: ['/'],
9
+ target: (params, url) => `/xjtu/2yuan/news/${new URL(url).toString().match(/\/Columns\/(\d+)\//)[1]}`,
10
+ },
11
+ ],
12
+ dean: [
13
+ {
14
+ title: '教务处',
15
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-jiao-wu-chu',
16
+ source: ['/'],
17
+ target: '/xjtu/dean/:subpath+',
18
+ },
19
+ ],
20
+ ee: [
21
+ {
22
+ title: '电气学院',
23
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-dian-qi-xue-yuan',
24
+ source: ['/'],
25
+ target: '/xjtu/ee/:id?',
26
+ },
27
+ ],
28
+ gs: [
29
+ {
30
+ title: '研究生院通知公告',
31
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-yan-jiu-sheng-xue-yuan-tong-zhi-gong-gao',
32
+ source: ['/'],
33
+ target: '/xjtu/gs/tzgg',
34
+ },
35
+ ],
36
+ international: [
37
+ {
38
+ title: '国际处通知',
39
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-guo-ji-chu-tong-zhi',
40
+ source: ['/'],
41
+ target: '/xjtu/international/:subpath+',
42
+ },
43
+ ],
44
+ std: [
45
+ {
46
+ title: '科技在线',
47
+ docs: 'https://docs.rsshub.app/university.html#xi-an-jiao-tong-da-xue-ke-ji-zai-xian',
48
+ source: ['/tzgg/:category', '/'],
49
+ target: (params, url) => `/xjtu/std/${new URL(url).toString().match(/\/(\w+)\.htm/)[1]}`,
50
+ },
51
+ ],
52
+ },
53
+ };
@@ -0,0 +1,9 @@
1
+ module.exports = function (router) {
2
+ router.get('/2yuan/news/:id?', require('./2yuan/news'));
3
+ router.get('/dean/:subpath+', require('./dean'));
4
+ router.get('/ee/:id?', require('./ee'));
5
+ router.get('/gs/tzgg', require('./gs/tzgg'));
6
+ router.get('/international/:subpath+', require('./international'));
7
+ router.get('/job/:subpath?', require('./job'));
8
+ router.get('/std/:category?', require('./std'));
9
+ };
@@ -0,0 +1,58 @@
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
+ const { art } = require('@/utils/render');
6
+ const path = require('path');
7
+
8
+ module.exports = async (ctx) => {
9
+ const category = ctx.params.category ?? '';
10
+
11
+ const rootUrl = 'http://std.xjtu.edu.cn';
12
+ const currentUrl = `${rootUrl}/tzgg${category ? `/${category}` : ''}.htm`;
13
+
14
+ const response = await got({
15
+ method: 'get',
16
+ url: currentUrl,
17
+ });
18
+
19
+ const $ = cheerio.load(response.data);
20
+
21
+ let items = $('.c1017')
22
+ .toArray()
23
+ .map((item) => {
24
+ item = $(item);
25
+
26
+ return {
27
+ title: item.text(),
28
+ link: `${rootUrl}/${item.attr('href')}`,
29
+ };
30
+ });
31
+
32
+ items = await Promise.all(
33
+ items.map((item) =>
34
+ ctx.cache.tryGet(item.link, async () => {
35
+ const detailResponse = await got({
36
+ method: 'get',
37
+ url: item.link,
38
+ });
39
+
40
+ const content = cheerio.load(detailResponse.data);
41
+
42
+ item.description = art(path.join(__dirname, 'templates/std.art'), {
43
+ description: content('#vsb_newscontent').html(),
44
+ attachments: content('#vsb_newscontent').parent().next().next().next().html(),
45
+ });
46
+ item.pubDate = timezone(parseDate(content('#vsb_newscontent').parent().prev().prev().text().split('&nbsp')[0], 'YYYY年MM月DD日 HH:mm'), +8);
47
+
48
+ return item;
49
+ })
50
+ )
51
+ );
52
+
53
+ ctx.state.data = {
54
+ title: $('title').text(),
55
+ link: currentUrl,
56
+ item: items,
57
+ };
58
+ };
@@ -0,0 +1,3 @@
1
+ {{ each items }}
2
+ <a href="{{ $value.fileUrl }}" rel="noreferrer">{{ $value.name }}</a><br>
3
+ {{ /each }}
@@ -0,0 +1,4 @@
1
+ {{@ description }}
2
+ {{ if attachments }}
3
+ {{@ attachments }}
4
+ {{ /if }}
@@ -0,0 +1,42 @@
1
+ const got = require('@/utils/got');
2
+ const { JSDOM } = require('jsdom');
3
+ const { CookieJar } = require('tough-cookie');
4
+ const { parseDate } = require('@/utils/parse-date');
5
+ const cookieJar = new CookieJar();
6
+ const baseUrl = 'https://xueqiu.com';
7
+
8
+ module.exports = async (ctx) => {
9
+ const { id } = ctx.params;
10
+ const pageUrl = `${baseUrl}/${id}/column`;
11
+
12
+ const pageData = await got(pageUrl, {
13
+ cookieJar,
14
+ });
15
+ const { window } = new JSDOM(pageData.data, {
16
+ runScripts: 'dangerously',
17
+ });
18
+ const SNOWMAN_TARGET = window.SNOWMAN_TARGET;
19
+
20
+ const { data } = await got(`${baseUrl}/statuses/original/timeline.json`, {
21
+ cookieJar,
22
+ searchParams: {
23
+ user_id: id,
24
+ page: 1,
25
+ },
26
+ });
27
+
28
+ const items = data.list.map((item) => ({
29
+ title: item.title,
30
+ description: item.description,
31
+ pubDate: parseDate(item.created_at, 'x'),
32
+ link: `${baseUrl}${item.target}`,
33
+ author: SNOWMAN_TARGET.screen_name,
34
+ }));
35
+
36
+ ctx.state.data = {
37
+ title: `${SNOWMAN_TARGET.screen_name} - 雪球`,
38
+ link: pageUrl,
39
+ description: SNOWMAN_TARGET.description,
40
+ item: items,
41
+ };
42
+ };
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
+ '/column/:id': ['TonyRL'],
2
3
  '/favorite/:id': ['imlonghao'],
3
4
  '/fund/:id': ['HenryQW', 'NathanDai'],
4
5
  '/hots': ['hillerliao'],
@@ -31,6 +31,12 @@ module.exports = {
31
31
  source: ['/u/:id'],
32
32
  target: '/xueqiu/user_stock/:id',
33
33
  },
34
+ {
35
+ title: '用户专栏',
36
+ docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
37
+ source: ['/:id/column'],
38
+ target: '/xueqiu/column/:id',
39
+ },
34
40
  {
35
41
  title: '组合最新调仓信息',
36
42
  docs: 'https://docs.rsshub.app/finance.html#xue-qiu',
@@ -1,4 +1,5 @@
1
1
  module.exports = (router) => {
2
+ router.get('/column/:id', require('./column'));
2
3
  router.get('/favorite/:id', require('./favorite'));
3
4
  router.get('/fund/:id', require('./fund'));
4
5
  router.get('/hots', require('./hots'));
@@ -0,0 +1,42 @@
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;
8
+ const map = new Map([
9
+ ['lol', { title: '英雄联盟', id: 1 }],
10
+ ['lscs', { title: '炉石传说', id: 2 }],
11
+ ['dnf', { title: 'DNF', id: 3 }],
12
+ ['swxf', { title: '守望先锋', id: 15 }],
13
+ ['yxzj', { title: '王者荣耀', id: 38 }],
14
+ ['steam', { title: '单机综合', id: 59 }],
15
+ ['mobile', { title: '手游综合', id: 62 }],
16
+ ['lolchess', { title: '云顶之弈', id: 67 }],
17
+ ['blzz', { title: '部落冲突', id: 91 }],
18
+ ['hszz', { title: '皇室战争', id: 106 }],
19
+ ['dnfm', { title: 'DNF手游', id: 116 }],
20
+ ['brawlstars', { title: '荒野乱斗', id: 129 }],
21
+ ]);
22
+ const url = 'https://platform.service.zhangyoubao.com/service/rest';
23
+ const res = await got
24
+ .post(url, {
25
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
26
+ body: 'api=recommend.list&apiVersion=v2&game=platform&os=ios&params[game_tag_id]=' + map.get(category).id,
27
+ })
28
+ .json();
29
+ const items = res.data.map((item) => ({
30
+ title: item.article.title,
31
+ link: 'https://mobile.zhangyoubao.com/' + category + '/article/' + item.article.id_for_web,
32
+ description: art(path.join(__dirname, 'templates/article.art'), { image: item.article.recommend_covers[0] }),
33
+ pubDate: parseDate(item.article.publish_time, 'X'),
34
+ }));
35
+
36
+ ctx.state.data = {
37
+ title: '掌游宝' + map.get(category).title + '分区',
38
+ link: 'https://mobile.zhangyoubao.com/' + category,
39
+ description: '掌游宝' + map.get(category).title + '分区',
40
+ item: items,
41
+ };
42
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/:category': ['ztmzzz'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'zhangyoubao.com': {
3
+ _name: '掌游宝',
4
+ mobile: [
5
+ {
6
+ title: '推荐',
7
+ docs: 'https://docs.rsshub.app/game.html#zhang-you-bao-tui-jian',
8
+ source: ['/:category/'],
9
+ target: '/zhangyoubao/:category',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/:category', require('./index'));
3
+ };
@@ -0,0 +1 @@
1
+ <img src="{{ image }}" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsshub",
3
- "version": "1.0.0-master.fc5a2f6",
3
+ "version": "1.0.0-master.fc648b5",
4
4
  "description": "Make RSS Great Again!",
5
5
  "main": "lib/pkg.js",
6
6
  "files": [
@@ -43,22 +43,22 @@
43
43
  "devDependencies": {
44
44
  "@napi-rs/pinyin": "1.7.0",
45
45
  "@types/koa": "2.13.4",
46
- "@vercel/nft": "0.19.1",
46
+ "@vercel/nft": "0.20.1",
47
47
  "@vuepress/plugin-back-to-top": "1.9.7",
48
48
  "@vuepress/plugin-google-analytics": "1.9.7",
49
49
  "@vuepress/plugin-pwa": "1.9.7",
50
50
  "@vuepress/shared-utils": "1.9.7",
51
51
  "cross-env": "7.0.3",
52
- "eslint": "8.17.0",
52
+ "eslint": "8.18.0",
53
53
  "eslint-config-prettier": "8.5.0",
54
- "eslint-plugin-prettier": "4.0.0",
54
+ "eslint-plugin-prettier": "4.2.1",
55
55
  "eslint-plugin-yml": "1.0.0",
56
56
  "fs-extra": "10.1.0",
57
- "jest": "28.1.1",
57
+ "jest": "28.1.2",
58
58
  "mockdate": "3.0.5",
59
- "nock": "13.2.6",
60
- "nodemon": "2.0.16",
61
- "prettier": "2.6.2",
59
+ "nock": "13.2.8",
60
+ "nodemon": "2.0.18",
61
+ "prettier": "2.7.1",
62
62
  "prettier-check": "2.0.0",
63
63
  "pretty-quick": "3.1.3",
64
64
  "remark": "13.0.0",
@@ -79,11 +79,11 @@
79
79
  "dependencies": {
80
80
  "@koa/router": "10.1.1",
81
81
  "@postlight/mercury-parser": "2.2.1",
82
- "@sentry/node": "7.1.1",
82
+ "@sentry/node": "7.4.1",
83
83
  "aes-js": "3.1.2",
84
84
  "art-template": "4.13.2",
85
85
  "bbcodejs": "0.0.4",
86
- "cheerio": "1.0.0-rc.11",
86
+ "cheerio": "1.0.0-rc.12",
87
87
  "chrono-node": "2.3.8",
88
88
  "city-timezones": "1.2.0",
89
89
  "crypto-js": "4.1.1",
@@ -95,22 +95,22 @@
95
95
  "etag": "1.8.1",
96
96
  "fanfou-sdk": "4.2.0",
97
97
  "git-rev-sync": "3.0.2",
98
- "googleapis": "101.0.0",
98
+ "googleapis": "104.0.0",
99
99
  "got": "11.8.5",
100
100
  "https-proxy-agent": "5.0.1",
101
101
  "iconv-lite": "0.6.3",
102
102
  "instagram-private-api": "1.45.3",
103
- "ioredis": "5.0.6",
103
+ "ioredis": "5.1.0",
104
104
  "ip-regex": "4.3.0",
105
105
  "is-localhost-ip": "1.4.0",
106
- "jsdom": "19.0.0",
106
+ "jsdom": "20.0.0",
107
107
  "json-bigint": "1.0.0",
108
108
  "json5": "2.2.1",
109
109
  "koa": "2.13.4",
110
110
  "koa-basic-auth": "4.0.0",
111
111
  "koa-favicon": "2.1.0",
112
112
  "koa-mount": "4.0.0",
113
- "lru-cache": "7.10.1",
113
+ "lru-cache": "7.12.0",
114
114
  "lz-string": "1.4.4",
115
115
  "mailparser": "3.5.0",
116
116
  "markdown-it": "13.0.1",
@@ -119,10 +119,11 @@
119
119
  "pidusage": "3.0.0",
120
120
  "plist": "3.0.5",
121
121
  "puppeteer": "13.7.0",
122
- "puppeteer-extra": "3.2.3",
123
- "puppeteer-extra-plugin-stealth": "2.9.0",
122
+ "puppeteer-extra": "3.3.0",
123
+ "puppeteer-extra-plugin-stealth": "2.10.1",
124
124
  "query-string": "7.1.1",
125
- "rand-user-agent": "1.0.66",
125
+ "rand-user-agent": "1.0.69",
126
+ "re2": "1.17.7",
126
127
  "require-all": "3.0.0",
127
128
  "rss-parser": "3.12.0",
128
129
  "showdown": "2.1.0",
@@ -133,8 +134,8 @@
133
134
  "torrent-search-api": "2.1.4",
134
135
  "tough-cookie": "4.0.0",
135
136
  "tunnel": "0.0.6",
136
- "twitter-api-v2": "1.12.2",
137
- "winston": "3.7.2",
137
+ "twitter-api-v2": "1.12.3",
138
+ "winston": "3.8.1",
138
139
  "xml2js": "0.4.23"
139
140
  },
140
141
  "jest": {
@@ -1,44 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const uid = ctx.params.uid;
6
- const url = `http://www.acfun.cn/u/${uid}.aspx`;
7
- const host = 'http://www.acfun.cn';
8
- const response = await got({
9
- method: 'get',
10
- url,
11
- headers: {
12
- Referer: host,
13
- },
14
- });
15
- const data = response.data;
16
-
17
- const $ = cheerio.load(data);
18
- const title = $('title').text();
19
- const description = $('.preview').text();
20
- const list = $('#ac-space-video-list a').get();
21
-
22
- ctx.state.data = {
23
- title,
24
- link: url,
25
- description,
26
- item: list
27
- .map((item) => {
28
- const $ = cheerio.load(item);
29
-
30
- const itemTitle = $('p.title').text();
31
- const itemImg = $('figure img').attr('src');
32
- const itemUrl = $('a').attr('href');
33
- const itemDate = $('.date').text();
34
-
35
- return {
36
- title: itemTitle,
37
- description: `<img src="${itemImg}">`,
38
- link: host + itemUrl,
39
- pubDate: new Date(itemDate).toUTCString(),
40
- };
41
- })
42
- .reverse(),
43
- };
44
- };
@@ -1,43 +0,0 @@
1
- const cheerio = require('cheerio');
2
-
3
- const HOME_PAGE = 'https://apnews.com';
4
-
5
- module.exports = async (ctx) => {
6
- const topic = ctx.params.topic;
7
-
8
- const browser = await require('@/utils/puppeteer')();
9
- const page = await browser.newPage();
10
- const url_link = `${HOME_PAGE}/hub/${topic}`;
11
- await page.goto(url_link);
12
- const html = await page.evaluate(() => document.documentElement.innerHTML);
13
- browser.close();
14
-
15
- const $ = cheerio.load(html);
16
-
17
- const list = $('div.FeedCard');
18
-
19
- ctx.state.data = {
20
- title: $('.Body div').find('h1[class^=hubTitle]').text(),
21
- link: HOME_PAGE,
22
- item: list
23
- .slice(0, 5)
24
- .map((index, item) => {
25
- item = $(item);
26
- const title = item.find('h3[class^=Component-heading-]').text();
27
- const link = item.find('a[class^=Component-headline-]').attr('href');
28
- const pubDate = item.find('span[class^=Timestamp]').attr('title');
29
- const text = item.find('div[class^=content]').text();
30
- const imageUrl = item.find('img[class^=image-]').attr('src');
31
- const author = item.find('span[class^=Component-bylines-]').text().slice(3);
32
-
33
- return {
34
- title,
35
- description: `<img src="${imageUrl}">` + text,
36
- link: `${HOME_PAGE}${link}`,
37
- pubDate,
38
- author,
39
- };
40
- })
41
- .get(),
42
- };
43
- };
@@ -1,66 +0,0 @@
1
- const url = require('url');
2
- const got = require('@/utils/got');
3
- const cheerio = require('cheerio');
4
-
5
- const rootUrl = 'http://zxls.dgjyw.com/';
6
-
7
- const config = {
8
- news: {
9
- link: '/node/57620',
10
- title: '动态',
11
- },
12
- announcement: {
13
- link: '/node/57725',
14
- title: '公示',
15
- },
16
- notice: {
17
- link: '/node/57621',
18
- title: '通知',
19
- },
20
- };
21
-
22
- module.exports = async (ctx) => {
23
- const cfg = config[ctx.params.type];
24
- if (!cfg) {
25
- throw Error('Bad category. See <a href="https://docs.rsshub.app/other.html#dong-guan-jiao-yan-wang">docs</a>');
26
- }
27
-
28
- const currentUrl = url.resolve(rootUrl, cfg.link);
29
- const response = await got({
30
- method: 'get',
31
- url: currentUrl,
32
- });
33
- const $ = cheerio.load(response.data);
34
- const list = $('ul.list-ul')
35
- .eq(2)
36
- .find('li')
37
- .slice(0, 20)
38
- .map((_, item) => {
39
- item = $(item);
40
- const a = item.find('a[title]');
41
- return {
42
- title: a.text(),
43
- link: a.attr('href'),
44
- pubDate: new Date(new Date().getFullYear().toString().substr(0, 2) + item.find('span').text()).toUTCString(),
45
- };
46
- })
47
- .get();
48
-
49
- const items = await Promise.all(
50
- list.map((item) =>
51
- ctx.cache.tryGet(item.link, async () => {
52
- const res = await got({ method: 'get', url: item.link });
53
- const content = cheerio.load(res.data);
54
-
55
- item.description = content('div.text').html();
56
- return item;
57
- })
58
- )
59
- );
60
-
61
- ctx.state.data = {
62
- title: '东莞教研网 - ' + cfg.title,
63
- link: rootUrl,
64
- item: items,
65
- };
66
- };
@@ -1,22 +0,0 @@
1
- const got = require('@/utils/got');
2
-
3
- module.exports = async (ctx) => {
4
- const id = ctx.params.id;
5
-
6
- const response = await got(`https://web-data.api.hk01.com/v2/page/category/${id}`);
7
- const data = response.data;
8
- const list = data.sections[0].items;
9
-
10
- ctx.state.data = {
11
- title: `香港01 - ${data.category.publishName}`,
12
- description: data.meta.metaDesc,
13
- link: data.category.publishUrl,
14
- item: list.map((item) => ({
15
- title: item.data.title,
16
- author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '),
17
- description: `<p>${item.data.description}…</p><img style="width: 100%" src="${item.data.mainImage.cdnUrl}" />`,
18
- pubDate: new Date(item.data.lastModifyTime * 1000),
19
- link: item.data.canonicalUrl,
20
- })),
21
- };
22
- };