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,71 @@
1
+ const { getData } = require('./utils');
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 province = ctx.params.province || '';
8
+ const city = ctx.params.city || '';
9
+
10
+ const link = 'https://news.qq.com/zt2020/page/feiyan.htm#/';
11
+ const item = [];
12
+
13
+ const diseaseh5Shelf = (await getData(['diseaseh5Shelf']))?.data?.diseaseh5Shelf || {};
14
+ const { lastUpdateTime, areaTree } = diseaseh5Shelf;
15
+ const nationalData = areaTree?.[0];
16
+ const provinceList = nationalData?.children;
17
+
18
+ let todayConfirm = 0;
19
+ let totalNowConfirm = 0;
20
+ let totalConfirm = 0;
21
+ let totalDead = 0;
22
+ let coronavirusData = {};
23
+ let placeName = '';
24
+
25
+ if (!province || province === '中国' || province === '全国') {
26
+ // 没有传参则取全国
27
+ coronavirusData = nationalData;
28
+ placeName = '中国';
29
+ } else {
30
+ // 分省份获取
31
+ coronavirusData = provinceList?.find((e) => e.name === province);
32
+ placeName = province;
33
+ if (city) {
34
+ // 继续获取 区县 数据
35
+ coronavirusData = coronavirusData?.children?.find((e) => e.name === city);
36
+ if (coronavirusData) {
37
+ placeName = `${province}-${city}`;
38
+ }
39
+ }
40
+ }
41
+ if (!coronavirusData) {
42
+ throw new Error(`未找到 ${placeName} 的疫情数据,请检查输入的省市名称是否正确`);
43
+ }
44
+ todayConfirm = coronavirusData.today?.confirm;
45
+ totalNowConfirm = coronavirusData.total?.nowConfirm;
46
+ totalConfirm = coronavirusData.total?.confirm;
47
+ totalDead = coronavirusData.total?.dead;
48
+ const pubDate = parseDate(coronavirusData.total?.mtime || lastUpdateTime);
49
+
50
+ const title = `${placeName} - 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪`;
51
+
52
+ const info = {
53
+ title: `${placeName} - 疫情数据`,
54
+ description: art(path.join(__dirname, '../../templates/coronavirus/data.art'), {
55
+ todayConfirm,
56
+ totalNowConfirm,
57
+ totalConfirm,
58
+ totalDead,
59
+ }),
60
+ pubDate,
61
+ guid: `${link}${placeName}?pubDate=${pubDate.toISOString()}`,
62
+ };
63
+
64
+ item.push(info);
65
+
66
+ ctx.state.data = {
67
+ title,
68
+ link,
69
+ item,
70
+ };
71
+ };
@@ -0,0 +1,34 @@
1
+ const { getData } = require('./utils');
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 title = '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪';
8
+ const link = 'https://news.qq.com/zt2020/page/feiyan.htm#/';
9
+ const item = [];
10
+
11
+ const chinaTotal = (await getData(['diseaseh5Shelf']))?.data?.diseaseh5Shelf?.chinaTotal || {};
12
+ const { localConfirmH5, localWzzAdd, confirmAdd, localConfirm, nowLocalWzz, highRiskAreaNum, mtime } = chinaTotal;
13
+ const pubDate = parseDate(mtime);
14
+ const info = {
15
+ title: '中国本土数据统计',
16
+ description: art(path.join(__dirname, '../../templates/coronavirus/chinaTotal.art'), {
17
+ localConfirmH5,
18
+ localWzzAdd,
19
+ confirmAdd,
20
+ localConfirm,
21
+ nowLocalWzz,
22
+ highRiskAreaNum,
23
+ }),
24
+ pubDate,
25
+ guid: `${link}total?pubDate=${pubDate.toISOString()}`,
26
+ };
27
+ item.push(info);
28
+
29
+ ctx.state.data = {
30
+ title,
31
+ link,
32
+ item,
33
+ };
34
+ };
@@ -0,0 +1,17 @@
1
+ const got = require('@/utils/got');
2
+
3
+ /**
4
+ *
5
+ *
6
+ * @author CaoMeiYouRen
7
+ * @date 2022-12-18
8
+ * @param {string[]} [modules=[]] localCityNCOVDataList,diseaseh5Shelf,nowConfirmStatis,provinceCompare,FAutoforeignList,FAutoCountryConfirmAdd,WomWorld,WomAboard,VaccineTopData
9
+ */
10
+ const getData = async (modules = []) => {
11
+ const response = await got('https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=' + modules.join(','));
12
+ return response.data;
13
+ };
14
+
15
+ module.exports = {
16
+ getData,
17
+ };
@@ -27,6 +27,14 @@ module.exports = {
27
27
  target: (params, url) => `/wechat/mp/msgalbum/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('album_id')}`,
28
28
  },
29
29
  ],
30
+ news: [
31
+ {
32
+ title: '腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪',
33
+ docs: 'https://docs.rsshub.app/other.html#xin-guan-fei-yan-yi-qing-xin-wen-dong-tai',
34
+ source: ['/zt2020/page/feiyan.htm#/'],
35
+ target: '/tencent/news/coronavirus/total',
36
+ },
37
+ ],
30
38
  pvp: [
31
39
  {
32
40
  title: '王者荣耀 - 新闻中心',
@@ -1,5 +1,7 @@
1
1
  module.exports = (router) => {
2
2
  router.get('/cloud/column/:id?/:tag?', require('./cloud/column'));
3
+ router.get('/news/coronavirus/data/:province?/:city?', require('./news/coronavirus/data'));
4
+ router.get('/news/coronavirus/total', require('./news/coronavirus/total'));
3
5
  router.get('/pvp/newsindex/:type', require('./pvp/newsindex'));
4
6
  router.get('/qq/sdk/changelog/:platform', require('./qq/sdk/changelog'));
5
7
  };
@@ -0,0 +1,6 @@
1
+ <p>本土确诊:</p><p>+{{@localConfirmH5}}</p></br>
2
+ <p>本土无症状:</p><p>+{{@localWzzAdd}}</p></br>
3
+ <p>确诊病例:</p><p>+{{@confirmAdd}}</p></br>
4
+ <p>现有本土确诊:</p><p>{{@localConfirm}}</p></br>
5
+ <p>现有本土无症状:</p><p>{{@nowLocalWzz}}</p></br>
6
+ <p>高风险地区:</p><p>{{@highRiskAreaNum}}</p></br>
@@ -0,0 +1,4 @@
1
+ <p>新增确诊:</p><p>+{{@todayConfirm}}</p></br>
2
+ <p>现有确诊:</p><p>{{@totalNowConfirm}}</p></br>
3
+ <p>累计确诊:</p><p>{{@totalConfirm}}</p></br>
4
+ <p>累计死亡:</p><p>{{@totalDead}}</p></br>
@@ -33,6 +33,14 @@ module.exports = async (ctx) => {
33
33
  author: `DIYgod0`,
34
34
  category: ['Category0', 'Category1', 'Category2'],
35
35
  },
36
+ {
37
+ title: 'Filter Title3',
38
+ description: 'Description3',
39
+ pubDate: new Date(`2019-3-1`).toUTCString(),
40
+ link: `https://github.com/DIYgod/RSSHub/issues/1`,
41
+ author: `DIYgod0`,
42
+ category: 'Category3',
43
+ },
36
44
  ];
37
45
  } else if (ctx.params.id === 'long') {
38
46
  item.push({
@@ -3,7 +3,15 @@ const parser = require('@/utils/rss-parser');
3
3
  const cheerio = require('cheerio');
4
4
 
5
5
  module.exports = async (ctx) => {
6
- const feed = await parser.parseURL('https://www.theverge.com/rss/index.xml');
6
+ let link;
7
+
8
+ if (ctx.params.hub) {
9
+ link = `https://www.theverge.com/${ctx.params.hub}/rss/index.xml`;
10
+ } else {
11
+ link = 'https://www.theverge.com/rss/index.xml';
12
+ }
13
+
14
+ const feed = await parser.parseURL(link);
7
15
 
8
16
  const items = await Promise.all(
9
17
  feed.items.map((item) =>
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- '/': ['HenryQW'],
2
+ '/:hub?': ['HenryQW', 'vbali'],
3
3
  };
@@ -5,8 +5,8 @@ module.exports = {
5
5
  {
6
6
  title: 'The Verge',
7
7
  docs: 'https://docs.rsshub.app/new-media.html#the-verge',
8
- source: ['/rss/index.xml', '/'],
9
- target: '/theverge',
8
+ source: ['/:hub', '/'],
9
+ target: '/theverge/:hub?',
10
10
  },
11
11
  ],
12
12
  },
@@ -1,3 +1,3 @@
1
1
  module.exports = (router) => {
2
- router.get('/', require('./index'));
2
+ router.get('/:hub?', require('./index'));
3
3
  };
@@ -0,0 +1,43 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const baseUrl = 'http://www.supplywater.com';
5
+
6
+ module.exports = async (ctx) => {
7
+ const { channelId = 78 } = ctx.params;
8
+ const listPage = await got('http://www.supplywater.com/tstz-' + channelId + '.aspx');
9
+ const $ = cheerio.load(listPage.data);
10
+ const pageName = $('.mainRightBox .news-title').text();
11
+ const list = $('.mainRightBox .announcements-title a')
12
+ .map((_, item) => {
13
+ item = $(item);
14
+
15
+ return {
16
+ title: item.text().trim(),
17
+ link: baseUrl + item.attr('href').trim(),
18
+ };
19
+ })
20
+ .get();
21
+
22
+ const items = await Promise.all(
23
+ list.map(async (item) => {
24
+ const postPage = await got(item.link);
25
+ const $ = cheerio.load(postPage.data);
26
+
27
+ const data = {
28
+ title: item.title,
29
+ description: $('.mainRightBox div:last').html().trim(),
30
+ pubDate: parseDate($('.mainRightBox .gxsj span:first').text() + ' +0800', 'YYYY/M/D H:m:s ZZ'),
31
+ link: item.link,
32
+ author: $('.mainRightBox .gxsj span:last').text(),
33
+ };
34
+ return data;
35
+ })
36
+ );
37
+
38
+ ctx.state.data = {
39
+ title: `${pageName}通知 - 长沙水业集团`,
40
+ link: `${baseUrl}/fuwuzhinan.aspx`,
41
+ item: items,
42
+ };
43
+ };
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
+ '/changsha/:channelId?': ['shansing'],
2
3
  '/dalian': ['DIYgod'],
3
4
  '/dongguan': ['victoriqueko'],
4
5
  '/guangzhou': ['xyqfer'],
@@ -32,6 +32,16 @@ module.exports = {
32
32
  },
33
33
  ],
34
34
  },
35
+ 'supplywater.com': {
36
+ _name: '停水通知',
37
+ www: [
38
+ {
39
+ title: '长沙市',
40
+ docs: 'https://docs.rsshub.app/forecast.html#ting-shui-tong-zhi',
41
+ source: ['/*'],
42
+ },
43
+ ],
44
+ },
35
45
  'whwater.com': {
36
46
  _name: '停水通知',
37
47
  '.': [
@@ -1,4 +1,5 @@
1
1
  module.exports = (router) => {
2
+ router.get('/changsha/:channelId?', require('./changsha'));
2
3
  router.get('/dalian', require('./dalian'));
3
4
  router.get('/dongguan', require('./dongguan'));
4
5
  router.get('/guangzhou', require('./guangzhou'));
@@ -115,24 +115,28 @@ function gatherLegacyFromData(entries, filter = 'tweet-') {
115
115
  const tweets = [];
116
116
  entries.forEach((entry) => {
117
117
  if (entry.entryId && entry.entryId.includes(filter)) {
118
- const tweet = entry.content.itemContent.tweet_results.result;
119
- const retweet = tweet.legacy.retweeted_status_result?.result;
120
- for (const t of [tweet, retweet]) {
121
- if (!t?.legacy) {
122
- continue;
118
+ const tweet = entry.content.itemContent.tweet_results?.result;
119
+ if (tweet) {
120
+ const retweet = tweet.legacy?.retweeted_status_result?.result;
121
+ for (const t of [tweet, retweet]) {
122
+ if (!t?.legacy) {
123
+ continue;
124
+ }
125
+ t.legacy.user = t.core.user_results.result.legacy;
126
+ const quote = t.quoted_status_result?.result;
127
+ if (quote) {
128
+ t.legacy.quoted_status = quote.legacy;
129
+ t.legacy.quoted_status.user = quote.core.user_results.result.legacy;
130
+ }
123
131
  }
124
- t.legacy.user = t.core.user_results.result.legacy;
125
- const quote = t.quoted_status_result?.result;
126
- if (quote) {
127
- t.legacy.quoted_status = quote.legacy;
128
- t.legacy.quoted_status.user = quote.core.user_results.result.legacy;
132
+ const legacy = tweet.legacy;
133
+ if (legacy) {
134
+ if (retweet) {
135
+ legacy.retweeted_status = retweet.legacy;
136
+ }
137
+ tweets.push(legacy);
129
138
  }
130
139
  }
131
- const legacy = tweet.legacy;
132
- if (retweet) {
133
- legacy.retweeted_status = retweet.legacy;
134
- }
135
- tweets.push(legacy);
136
140
  }
137
141
  });
138
142
  return tweets;
@@ -8,16 +8,25 @@ module.exports = async (ctx) => {
8
8
  const url = baseURL + `/categories/${ctx.params.cid}`;
9
9
  const res = await got(url);
10
10
  const $ = cheerio.load(res.data);
11
- const list = $('.lnKPLr').get();
12
- const category = $('.kCfkTU').text();
11
+ const regexp = /^window\.__REDUX_STATE__=(.*);$/gm;
12
+ const raw = $('script[charset="UTF-8"]').html().replace(regexp, '$1');
13
+ const list = JSON.parse(raw);
14
+ const ids = list.entities.posts.allIds;
15
+
16
+ const links = [];
17
+ const titles = [];
18
+ const category = list.entities.posts.byId[ids[0]].categories[0].name;
19
+
20
+ for (const id of ids) {
21
+ links.push(baseURL + '/a/' + list.entities.posts.byId[id].slug);
22
+ titles.push(list.entities.posts.byId[id].title);
23
+ }
13
24
 
14
25
  const out = await Promise.all(
15
- list.map((item) => {
16
- const $ = cheerio.load(item);
17
- const address = baseURL + $('a').attr('href');
18
- const title = $('.list-item__Title-sc-1dx5lew-5').text();
19
- return ctx.cache.tryGet(address, async () => {
20
- const single = await fetch(address);
26
+ links.map((item, index) => {
27
+ const title = titles[index];
28
+ return ctx.cache.tryGet(item, async () => {
29
+ const single = await fetch(item);
21
30
  single.title = title;
22
31
  return single;
23
32
  });
@@ -0,0 +1,59 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+
4
+ const rootURL = 'https://www.uber.com';
5
+ const apiURL = 'https://blogapi.uber.com';
6
+
7
+ module.exports = async (ctx) => {
8
+ let maxPage = Number(ctx.params.maxPage);
9
+ if (Number.isNaN(maxPage)) {
10
+ maxPage = 1;
11
+ }
12
+
13
+ let pages = await Promise.all(
14
+ [...Array(maxPage).keys()].map((pageIdx) =>
15
+ got(`${apiURL}/wp-json/blog/v1/data`, {
16
+ searchParams: {
17
+ page: pageIdx + 1,
18
+ parent: 'pittsburgh',
19
+ slug: 'engineering',
20
+ },
21
+ })
22
+ )
23
+ );
24
+ pages = pages.map((page) => page.data);
25
+
26
+ const result = await Promise.all(
27
+ pages.map(
28
+ async (page) =>
29
+ await Promise.all(
30
+ page.posts.map((post) =>
31
+ ctx.cache.tryGet(`${rootURL}${post.link}`, async () => {
32
+ let { data: article } = await got(`${apiURL}/wp-json/blog/v1/data`, {
33
+ searchParams: {
34
+ slug: post.link.replace(/\//g, '').replace('blog', ''),
35
+ },
36
+ });
37
+ article = article.article;
38
+
39
+ return {
40
+ link: article.link,
41
+ title: article.title,
42
+ description: article.content,
43
+ pubDate: parseDate(article.created),
44
+ author: article.author,
45
+ category: article.categories.map((category) => category.category_name),
46
+ };
47
+ })
48
+ )
49
+ )
50
+ )
51
+ );
52
+
53
+ ctx.state.data = {
54
+ title: `Uber Engineering Blog`,
55
+ link: rootURL + '/blog/engineering',
56
+ description: 'The technology behind Uber Engineering',
57
+ item: result.flat(),
58
+ };
59
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/blog/:maxPage?': ['hulb'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'uber.com': {
3
+ _name: 'Uber Blog',
4
+ www: [
5
+ {
6
+ title: 'Engineering',
7
+ docs: 'https://docs.rsshub.app/blog.html#you-bu',
8
+ source: ['/blog/pittsburgh/engineering'],
9
+ target: '/uber/blog',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/blog/:maxPage?', require('./blog'));
3
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/usenix-security-sympoium': ['ZeddYu'],
3
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ 'usenix.org': {
3
+ _name: 'USENIX',
4
+ '.': [
5
+ {
6
+ title: 'Security Symposia',
7
+ docs: 'https://docs.rsshub.app/journal.html#usenix',
8
+ source: ['/conferences/all', '/conferences', '/'],
9
+ target: '/usenix/usenix-security-sympoium',
10
+ },
11
+ ],
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = (router) => {
2
+ router.get('/usenix-security-sympoium', require('./usenix'));
3
+ };
@@ -0,0 +1,63 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const url = 'https://www.usenix.org';
4
+ const { parseDate } = require('@/utils/parse-date');
5
+
6
+ const seasons = ['spring', 'summer', 'fall', 'winter'];
7
+
8
+ module.exports = async (ctx) => {
9
+ const last = new Date().getFullYear() + 1;
10
+ const urlList = Array.from({ length: last - 2020 }, (_, v) => `${url}/conference/usenixsecurity${v + 20}`)
11
+ .map((url) => seasons.map((season) => `${url}/${season}-accepted-papers`))
12
+ .flat();
13
+ const responses = await got.all(
14
+ urlList.map(async (url) => {
15
+ let res;
16
+ try {
17
+ res = await got(url);
18
+ } catch (e) {
19
+ // ignore 404
20
+ }
21
+ return res;
22
+ })
23
+ );
24
+
25
+ const list = responses
26
+ .filter((element) => element)
27
+ .map((response) => {
28
+ const $ = cheerio.load(response.data);
29
+ const pubDate = parseDate($('meta[property=article:modified_time]').attr('content'));
30
+ return $('article.node-paper')
31
+ .toArray()
32
+ .map((item) => {
33
+ item = $(item);
34
+ return {
35
+ title: item.find('h2.node-title > a').text().trim(),
36
+ link: `${url}${item.find('h2.node-title > a').attr('href')}`,
37
+ author: item.find('div.field.field-name-field-paper-people-text.field-type-text-long.field-label-hidden p').text().trim(),
38
+ pubDate,
39
+ };
40
+ });
41
+ })
42
+ .flat();
43
+
44
+ const items = await Promise.all(
45
+ list.map((item) =>
46
+ ctx.cache.tryGet(item.link, async () => {
47
+ const response = await got(item.link);
48
+ const $ = cheerio.load(response.data);
49
+ item.description = $('.content').html();
50
+
51
+ return item;
52
+ })
53
+ )
54
+ );
55
+
56
+ ctx.state.data = {
57
+ title: 'USENIX',
58
+ link: url,
59
+ description: 'USENIX Security Symposium Accpeted Papers',
60
+ allowEmpty: true,
61
+ item: items,
62
+ };
63
+ };
@@ -0,0 +1,26 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+
4
+ module.exports = async (ctx) => {
5
+ const feedId = ctx.params.id;
6
+ const limit = ctx.query.limit ?? 30; // 默认30条
7
+
8
+ const rootUrl = 'https://api-panda.com/v4/';
9
+ const apiUrl = `${rootUrl}articles?feeds=${feedId}&limit=${limit}&page=1&sort=popular`;
10
+
11
+ const { data } = await got(apiUrl);
12
+
13
+ const items = data.map((item) => ({
14
+ title: `${item.title} 🌟 ${item.source.likesCount}`,
15
+ author: item.source.username,
16
+ pubDate: parseDate(item.source.createdAt),
17
+ link: item.source.targetUrl,
18
+ description: item.description,
19
+ }));
20
+
21
+ ctx.state.data = {
22
+ title: 'Panda Feeds',
23
+ link: 'https://usepanda.com/',
24
+ item: items,
25
+ };
26
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/feeds/:id': ['lyrl'],
3
+ };
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ 'usepanda.com': {
3
+ _name: 'Panda',
4
+ '.': [
5
+ {
6
+ title: 'Feeds',
7
+ docs: 'https://docs.rsshub.app/other.html#panda',
8
+ },
9
+ ],
10
+ },
11
+ };
@@ -0,0 +1,3 @@
1
+ module.exports = function (router) {
2
+ router.get('/feeds/:id', require('./index'));
3
+ };