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
@@ -1,5 +1,47 @@
1
1
  const { parseDate } = require('@/utils/parse-date');
2
2
 
3
+ const generateDescription = (target, init) =>
4
+ target.content.reduce((description, item) => {
5
+ switch (item.type) {
6
+ case 'text':
7
+ description += `<div>${item.content}</div>`;
8
+ break;
9
+
10
+ case 'image':
11
+ description += `<img src="${item.url.replace(/_.+\.jpg/g, '.jpg')}" />`;
12
+ break;
13
+
14
+ case 'video':
15
+ try {
16
+ description += `<video
17
+ controls="controls"
18
+ width="${item.playlist.hd.width}"
19
+ height="${item.playlist.hd.height}"
20
+ poster="${item.cover_info.thumbnail}"
21
+ src="${item.playlist.hd.play_url}"
22
+ >`;
23
+ } catch (e) {
24
+ description += `<video
25
+ controls="controls"
26
+ width="${item.playlist.pop().width}"
27
+ height="${item.playlist.pop().height}"
28
+ poster="${item.thumbnail}"
29
+ src="${item.playlist.pop().play_url}"
30
+ >`;
31
+ }
32
+ break;
33
+
34
+ case 'link':
35
+ description += `<div><a href="${item.url}">${item.title}</a><br><img src="${item.image_url}" /></div>`;
36
+ break;
37
+
38
+ default:
39
+ description += '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
40
+ }
41
+
42
+ return description;
43
+ }, init);
44
+
3
45
  module.exports = {
4
46
  generateData: (data) =>
5
47
  data.map((item) => {
@@ -8,47 +50,13 @@ module.exports = {
8
50
  const author = target.author.name;
9
51
  const title = `${author}:${target.excerpt_title}`;
10
52
  const link = `https://www.zhihu.com/pin/${target.id}`;
11
- const description = target.content.reduce((description, item) => {
12
- switch (item.type) {
13
- case 'text':
14
- description += `<div>${item.content}</div>`;
15
- break;
16
-
17
- case 'image':
18
- description += `<img src="${item.url.replace(/_.+\.jpg/g, '.jpg')}" />`;
19
- break;
20
-
21
- case 'video':
22
- try {
23
- description += `<video
24
- controls="controls"
25
- width="${item.playlist.hd.width}"
26
- height="${item.playlist.hd.height}"
27
- poster="${item.cover_info.thumbnail}"
28
- src="${item.playlist.hd.play_url}"
29
- >`;
30
- } catch (e) {
31
- description += `<video
32
- controls="controls"
33
- width="${item.playlist.pop().width}"
34
- height="${item.playlist.pop().height}"
35
- poster="${item.thumbnail}"
36
- src="${item.playlist.pop().play_url}"
37
- >`;
38
- }
39
- break;
40
-
41
- case 'link':
42
- description += `<div><a href="${item.url}">${item.title}</a><br><img src="${item.image_url}" /></div>`;
43
- break;
44
-
45
- default:
46
- description += '未知类型,请点击<a href="https://github.com/DIYgod/RSSHub/issues">链接</a>提交issue';
47
- }
48
-
49
- return description;
50
- }, `<a href="https://www.zhihu.com${target.author.url}">${author}</a>:`);
51
-
53
+ let description = generateDescription(target, `<a href="https://www.zhihu.com${target.author.url}">${author}</a>:`);
54
+ if (target.origin_pin !== undefined) {
55
+ const t = target.origin_pin;
56
+ const origin_link = `<a href="https://www.zhihu.com/pin/${t.id}">转发原文</a>:`;
57
+ const origin_description = generateDescription(t, `<a href="https://www.zhihu.com${t.author.url}">${t.author.name}</a>:`);
58
+ description = `${description} ${origin_link} ${origin_description}`;
59
+ }
52
60
  return {
53
61
  title,
54
62
  description,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsshub",
3
- "version": "1.0.0-master.fe4f650",
3
+ "version": "1.0.0-master.fe560d2",
4
4
  "description": "Make RSS Great Again!",
5
5
  "main": "lib/pkg.js",
6
6
  "files": [
@@ -50,24 +50,24 @@
50
50
  "devDependencies": {
51
51
  "@napi-rs/pinyin": "1.7.1",
52
52
  "@types/koa": "2.13.5",
53
- "@vercel/nft": "0.22.1",
53
+ "@vercel/nft": "0.22.6",
54
54
  "@vuepress/plugin-back-to-top": "1.9.7",
55
55
  "@vuepress/plugin-google-analytics": "1.9.7",
56
56
  "@vuepress/plugin-pwa": "1.9.7",
57
57
  "@vuepress/shared-utils": "1.9.7",
58
58
  "cross-env": "7.0.3",
59
- "eslint": "8.26.0",
59
+ "eslint": "8.30.0",
60
60
  "eslint-config-prettier": "8.5.0",
61
61
  "eslint-plugin-prettier": "4.2.1",
62
- "eslint-plugin-yml": "1.2.0",
63
- "fs-extra": "10.1.0",
64
- "jest": "29.2.2",
65
- "jest-junit": "14.0.1",
66
- "meilisearch": "0.29.0",
62
+ "eslint-plugin-yml": "1.4.0",
63
+ "fs-extra": "11.1.0",
64
+ "jest": "29.3.1",
65
+ "jest-junit": "15.0.0",
66
+ "meilisearch": "0.30.0",
67
67
  "mockdate": "3.0.5",
68
68
  "nock": "13.2.9",
69
69
  "nodemon": "2.0.20",
70
- "prettier": "2.7.1",
70
+ "prettier": "2.8.1",
71
71
  "prettier-check": "2.0.0",
72
72
  "pretty-quick": "3.1.3",
73
73
  "remark": "13.0.0",
@@ -80,7 +80,7 @@
80
80
  "request-promise-native": "1.0.9",
81
81
  "staged-git-files": "1.3.0",
82
82
  "string-width": "4.2.3",
83
- "supertest": "6.3.1",
83
+ "supertest": "6.3.3",
84
84
  "tosource": "2.0.0-alpha.3",
85
85
  "unified": "9.2.2",
86
86
  "vuepress": "1.9.7",
@@ -91,52 +91,52 @@
91
91
  "dependencies": {
92
92
  "@koa/router": "12.0.0",
93
93
  "@postlight/parser": "2.2.3",
94
- "@sentry/node": "7.17.3",
94
+ "@sentry/node": "7.28.1",
95
95
  "aes-js": "3.1.2",
96
96
  "art-template": "4.13.2",
97
97
  "bbcodejs": "0.0.4",
98
98
  "cheerio": "1.0.0-rc.12",
99
- "chrono-node": "2.4.1",
99
+ "chrono-node": "2.5.0",
100
100
  "city-timezones": "1.2.1",
101
101
  "crypto-js": "4.1.1",
102
102
  "currency-symbol-map": "5.1.0",
103
- "dayjs": "1.11.6",
103
+ "dayjs": "1.11.7",
104
104
  "dotenv": "16.0.3",
105
105
  "emailjs-imap-client": "3.1.0",
106
106
  "entities": "3.0.1",
107
107
  "etag": "1.8.1",
108
108
  "fanfou-sdk": "4.2.0",
109
109
  "git-rev-sync": "3.0.2",
110
- "googleapis": "109.0.0",
111
- "got": "11.8.5",
110
+ "googleapis": "110.0.0",
111
+ "got": "11.8.6",
112
112
  "https-proxy-agent": "5.0.1",
113
113
  "iconv-lite": "0.6.3",
114
114
  "instagram-private-api": "1.45.3",
115
- "ioredis": "5.2.3",
115
+ "ioredis": "5.2.4",
116
116
  "ip-regex": "4.3.0",
117
117
  "is-localhost-ip": "2.0.0",
118
- "jsdom": "20.0.2",
118
+ "jsdom": "20.0.3",
119
119
  "json-bigint": "1.0.0",
120
- "json5": "2.2.1",
121
- "koa": "2.13.4",
120
+ "json5": "2.2.2",
121
+ "koa": "2.14.1",
122
122
  "koa-basic-auth": "4.0.0",
123
123
  "koa-favicon": "2.1.0",
124
124
  "koa-mount": "4.0.0",
125
- "lru-cache": "7.14.0",
125
+ "lru-cache": "7.14.1",
126
126
  "lz-string": "1.4.4",
127
- "mailparser": "3.5.0",
127
+ "mailparser": "3.6.3",
128
128
  "markdown-it": "13.0.1",
129
129
  "module-alias": "2.2.2",
130
130
  "parse-torrent": "9.1.5",
131
131
  "pidusage": "3.0.2",
132
132
  "plist": "3.0.6",
133
133
  "proxy-chain": "2.2.0",
134
- "puppeteer": "19.0.0",
134
+ "puppeteer": "19.4.1",
135
135
  "puppeteer-extra": "3.3.4",
136
136
  "puppeteer-extra-plugin-stealth": "2.11.1",
137
- "query-string": "7.1.1",
138
- "rand-user-agent": "1.0.88",
139
- "re2": "1.17.7",
137
+ "query-string": "7.1.3",
138
+ "rand-user-agent": "1.0.96",
139
+ "re2": "1.18.0",
140
140
  "require-all": "3.0.0",
141
141
  "rss-parser": "3.12.0",
142
142
  "showdown": "2.1.0",
@@ -146,8 +146,7 @@
146
146
  "tiny-async-pool": "2.1.0",
147
147
  "torrent-search-api": "2.1.4",
148
148
  "tough-cookie": "4.1.2",
149
- "tunnel": "0.0.6",
150
- "twitter-api-v2": "1.12.9",
149
+ "twitter-api-v2": "1.13.0",
151
150
  "winston": "3.8.2",
152
151
  "xml2js": "0.4.23"
153
152
  },
@@ -1,33 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const response = await got({
6
- method: 'get',
7
- url: 'https://www.foreverblog.cn/feeds.html',
8
- });
9
-
10
- const data = response.data;
11
-
12
- const $ = cheerio.load(data);
13
- const list = $('article[class="post post-type-normal"]');
14
-
15
- ctx.state.data = {
16
- title: '十年之约 - 订阅',
17
- link: 'https://www.foreverblog.cn/feeds.html',
18
- language: 'zh-cn',
19
- item:
20
- list &&
21
- list
22
- .map((index, item) => {
23
- item = $(item);
24
- return {
25
- title: item.find('a.post-title-link>span').text(),
26
- description: item.find('div.post-author').text(),
27
- link: item.find('a.post-title-link').attr('href'),
28
- pubDate: item.find('time.post-time').text(),
29
- };
30
- })
31
- .get(),
32
- };
33
- };
@@ -1,59 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const { advance } = ctx.params;
6
- const link = `http://sousuo.gov.cn/list.htm`;
7
- const params = new URLSearchParams({
8
- n: 20,
9
- t: 'govall',
10
- sort: 'pubtime',
11
- advance: 'true',
12
- });
13
- const query = `${params.toString()}&${advance}`;
14
- const res = await got.get(link, {
15
- searchParams: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)),
16
- });
17
- const $list = cheerio.load(res.data);
18
-
19
- ctx.state.data = {
20
- title: `信息稿件 - 中国政府网`,
21
- link: `${link}?${query}`,
22
- item: await Promise.all(
23
- $list('body > div.dataBox > table > tbody > tr')
24
- .slice(1)
25
- .map(async (_, el) => {
26
- const item = $list(el);
27
-
28
- const number = item.find('td.info').next();
29
- const title = item.find('td.info > a');
30
- const href = title.attr('href');
31
-
32
- const key = `gov_zhengce: ${href}`;
33
- let description;
34
- const value = await ctx.cache.get(key);
35
-
36
- if (value) {
37
- description = value;
38
- } else {
39
- try {
40
- const contentData = await got.get(href);
41
- const $content = cheerio.load(contentData.data);
42
- description = $content('#UCAP-CONTENT').html();
43
- } catch (error) {
44
- description = '文章已被删除';
45
- }
46
-
47
- ctx.cache.set(key, description);
48
- }
49
-
50
- return {
51
- title: number.text() + ' | ' + title.text(),
52
- description,
53
- link: href,
54
- };
55
- })
56
- .get()
57
- ),
58
- };
59
- };
@@ -1,53 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
- const queryString = require('query-string');
4
-
5
- module.exports = async (ctx) => {
6
- const { pcodeJiguan } = ctx.params;
7
- const link = `http://sousuo.gov.cn/list.htm`;
8
- const res = await got.get(link, {
9
- searchParams: queryString.stringify({
10
- n: 20,
11
- sort: 'pubtime',
12
- t: 'paper',
13
- pcodeJiguan: pcodeJiguan ? pcodeJiguan : '',
14
- }),
15
- });
16
- const $list = cheerio.load(res.data);
17
-
18
- ctx.state.data = {
19
- title: `最新文件 - 中国政府网`,
20
- link,
21
- item: await Promise.all(
22
- $list('body > div.dataBox > table > tbody > tr')
23
- .slice(1)
24
- .map(async (_, el) => {
25
- const item = $list(el);
26
-
27
- const number = item.find('td.info').next();
28
- const title = item.find('td.info > a');
29
- const href = title.attr('href');
30
-
31
- const key = `gov_zhengce: ${href}`;
32
- let description;
33
- const value = await ctx.cache.get(key);
34
-
35
- if (value) {
36
- description = value;
37
- } else {
38
- const contentData = await got.get(href);
39
- const $content = cheerio.load(contentData.data);
40
- description = $content('#UCAP-CONTENT').html();
41
- ctx.cache.set(key, description);
42
- }
43
-
44
- return {
45
- title: number.text() + ' | ' + title.text(),
46
- description,
47
- link: href,
48
- };
49
- })
50
- .get()
51
- ),
52
- };
53
- };
@@ -1,42 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const link = `http://www.gov.cn/zhengce/zuixin.htm`;
6
- const listData = await got.get(link);
7
- const $list = cheerio.load(listData.data);
8
- ctx.state.data = {
9
- title: `最新政策 - 中国政府网`,
10
- link,
11
- item: await Promise.all(
12
- $list('.news_box .list li:not(.line)')
13
- .map(async (_, el) => {
14
- const $el = $list(el);
15
- const $a = $el.find('h4 a');
16
- const href = $a.attr('href');
17
- const link = href.startsWith('/zhengce') ? `http://www.gov.cn${href}` : href;
18
- const key = `gov_zhengce_zuixin: ${link}`;
19
- let description;
20
- const value = await ctx.cache.get(key);
21
-
22
- if (value) {
23
- description = value;
24
- } else {
25
- const contentData = await got.get(link);
26
- const $content = cheerio.load(contentData.data);
27
- description = $content('#UCAP-CONTENT').html();
28
- ctx.cache.set(key, description);
29
- }
30
-
31
- return {
32
- title: $a.text(),
33
- description,
34
- guid: href,
35
- link,
36
- pubDate: new Date($el.find('.date').text()).toUTCString(),
37
- };
38
- })
39
- .get()
40
- ),
41
- };
42
- };
@@ -1,33 +0,0 @@
1
- const got = require('@/utils/got');
2
-
3
- module.exports = async (ctx) => {
4
- const id = ctx.params.id;
5
- const url = `https://play.lang.live/${id}`;
6
-
7
- const api = `https://game-api.lang.live/webapi/v1/room/info?room_id=${id}`;
8
- const response = await got({
9
- method: 'get',
10
- url: api,
11
- });
12
-
13
- let item = [];
14
- let name = '';
15
- if (response.data.data.live_info.live_status === 1) {
16
- name = response.data.data.live_info.nickname;
17
- item = [
18
- {
19
- title: response.data.data.live_info.nickname + '开播了',
20
- link: url,
21
- guid: response.data.data.live_info.live_id,
22
- description: response.data.data.live_info.describe,
23
- },
24
- ];
25
- }
26
-
27
- ctx.state.data = {
28
- title: `${name}的浪Play直播`,
29
- link: url,
30
- item,
31
- allowEmpty: true,
32
- };
33
- };
@@ -1,45 +0,0 @@
1
- const cheerio = require('cheerio');
2
- const got = require('@/utils/got');
3
-
4
- module.exports = async (ctx) => {
5
- const url = `http://nautil.us/term/f/${ctx.params.tid}`;
6
-
7
- const res = await got.get(url);
8
- const $ = cheerio.load(res.data);
9
- const list = $('article.search-result').get();
10
-
11
- const out = await Promise.all(
12
- list.map(async (item) => {
13
- const $ = cheerio.load(item);
14
- const title = $('h3 > a').text();
15
- const partial = $('h3 > a').attr('href');
16
- const address = `http://nautil.us${partial}`;
17
- const cache = await ctx.cache.get(address);
18
- if (cache) {
19
- return Promise.resolve(JSON.parse(cache));
20
- }
21
- const res = await got.get(address);
22
- const capture = cheerio.load(res.data);
23
- capture('div.reco').remove();
24
- const banner = capture('div.banner').html();
25
- const textWithTime = capture('div.byline').text();
26
- const author = capture('div.byline > span:nth-child(2)').text();
27
- const contents = banner + capture('div.page-content').html();
28
- const single = {
29
- title,
30
- author,
31
- description: contents,
32
- link: address,
33
- guid: address,
34
- pubDate: new Date(textWithTime).toUTCString(),
35
- };
36
- ctx.cache.set(address, JSON.stringify(single));
37
- return Promise.resolve(single);
38
- })
39
- );
40
- ctx.state.data = {
41
- title: 'Nautilus | ' + $('title').text(),
42
- link: url,
43
- item: out,
44
- };
45
- };
@@ -1,34 +0,0 @@
1
- const got = require('@/utils/got');
2
- const cheerio = require('cheerio');
3
-
4
- module.exports = async (ctx) => {
5
- const response = await got({
6
- method: 'get',
7
- url: 'https://www.nintendo.com/nintendo-direct/archive/',
8
- });
9
- const data = response.data;
10
-
11
- const $ = cheerio.load(data);
12
- const list = $('.news-tiles li').get().slice(0, 9);
13
-
14
- const result = list.map((item) => {
15
- const $ = cheerio.load(item);
16
- return {
17
- title: $('.b7').html(),
18
- cover: $('img ').attr('src').replace('../', 'https://www.nintendo.com/nintendo-direct/'),
19
- des: $('p').html(),
20
- url: $('a').attr('href').replace('../', 'https://www.nintendo.com/nintendo-direct/'),
21
- };
22
- });
23
-
24
- ctx.state.data = {
25
- title: `Nintendo Direct (任天堂直面会)`,
26
- link: `https://www.nintendo.com/nintendo-direct/archive/`,
27
- description: `最新的任天堂直面会日程信息`,
28
- item: result.map((item) => ({
29
- title: item.title,
30
- description: `<img src="${item.cover}" /><br>${item.des}`,
31
- link: item.url,
32
- })),
33
- };
34
- };
@@ -1,51 +0,0 @@
1
- const got = require('@/utils/got');
2
- const util = require('./utils');
3
- const software_url = 'https://www.nintendoswitch.com.cn/software/';
4
-
5
- module.exports = async (ctx) => {
6
- const response = await got({
7
- method: 'get',
8
- url: software_url,
9
- });
10
-
11
- // 获取Nuxt对象
12
- const result = await util.nuxtReader(response.data);
13
-
14
- /* expectedReleaseNS[]
15
- coverImageUrl: "//switch-cn.gtgres.com/global-images/c50e3390-14e5-11ea-9b40-236e671bca9e.png"
16
- expectedReleaseDate: 0
17
- expectedReleaseDateFuzzy: ""
18
- gameName: "Mario Tennis Aces"
19
- id: 1852
20
- newsPageUrl: ""
21
- softwareData[]
22
- gameProductCode: "HAC-P-ADALB"
23
- image: "//switch-cn.gtgres.com/global-images/c247f0e0-1654-11ea-9b40-236e671bca9e.png"
24
- name: "新 超级马力欧兄弟U 豪华版"
25
- nsUid: "70010000027088"
26
- publisher: "任天堂"
27
- releaseDatetime: 1575907200000
28
- softcardType: (2)[]
29
- */
30
- if (!result.softwareData) {
31
- throw new Error('软件信息不存在,请报告这个问题');
32
- }
33
-
34
- let data = result.softwareData.map((item) => ({
35
- title: item.name,
36
- author: item.publisher,
37
- description: util.generateImageLink(`https${item.image}`),
38
- category: item.softcardType,
39
- link: `${software_url}${item.nsUid}`,
40
- pubDate: new Date(parseInt(item.releaseTime)).toUTCString(),
41
- }));
42
-
43
- data = await util.ProcessItemChina(data, ctx.cache);
44
-
45
- ctx.state.data = {
46
- title: `Nintendo eShop (国服) 新游戏`,
47
- link: `https://www.nintendo.com.hk/topics`,
48
- description: `Nintendo (国服) 新上架的游戏`,
49
- item: data,
50
- };
51
- };
@@ -1,26 +0,0 @@
1
- const got = require('@/utils/got');
2
- const util = require('./utils');
3
-
4
- module.exports = async (ctx) => {
5
- const response = await got({
6
- method: 'get',
7
- url: 'https://www.nintendo.com.hk/data/json/switch_software.json',
8
- });
9
- const data = response.data.slice(0, 9).filter(({ link }) => link.startsWith('https://'));
10
-
11
- // 获取游戏描述
12
- const result = await util.ProcessItem(data, ctx.cache);
13
-
14
- ctx.state.data = {
15
- title: `Nintendo eShop (港服) 新游戏`,
16
- link: `https://www.nintendo.com.hk/software/switch/index.html`,
17
- description: `Nintendo eShop (港服) 新上架的游戏`,
18
- item: result.map((item) => ({
19
- title: item.title,
20
- description: `<img src="https://www.nintendo.com.hk/software/img/bnr/${item.thumb_img}"><br><strong>发售日期:</strong>${item.release_date}<br><strong>价格:</strong>${item.price}港币<br><strong>支持中文:</strong>${
21
- item.lang === 'CN' ? '是' : '否'
22
- }<br><strong>发行商:</strong>${item.maker_publisher}<br>${item.content}`,
23
- link: item.link,
24
- })),
25
- };
26
- };
@@ -1,20 +0,0 @@
1
- const got = require('@/utils/got');
2
-
3
- module.exports = async (ctx) => {
4
- const response = await got({
5
- method: 'get',
6
- url: `https://search.nintendo.jp/nintendo_soft/search.json?opt_sshow=1&fq=ssitu_s%3Aonsale%20OR%20ssitu_s%3Apreorder%20OR%20memo_bg%3Aforced&limit=24&page=1&c=50310840317994813&opt_osale=1&opt_hard=1_HAC&sort=sodate%20desc%2Cscore`,
7
- });
8
- const data = response.data.result.items.slice(0, 9);
9
-
10
- ctx.state.data = {
11
- title: `Nintendo eShop (日服) 新游戏`,
12
- link: `https://www.nintendo.co.jp/software/switch/index.html`,
13
- description: `Nintendo eShop (日服) 新上架的游戏`,
14
- item: data.map((item) => ({
15
- title: item.title,
16
- description: `<img src="https://img-eshop.cdn.nintendo.net/i/${item.iurl}.jpg"><br><strong>发售日期:</strong>${item.pdate}<br><strong>价格:</strong>${item.dprice}円`,
17
- link: `https://ec.nintendo.com/JP/ja/titles/${item.id}`,
18
- })),
19
- };
20
- };