rsshub 1.0.0-master.c2da065 → 1.0.0-master.c2f2a15

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 (563) hide show
  1. package/lib/config.js +0 -3
  2. package/lib/middleware/parameter.js +8 -1
  3. package/lib/radar-rules.js +0 -111
  4. package/lib/router.js +53 -56
  5. package/lib/routes/fanxinzhui/latest.js +12 -13
  6. package/lib/routes/fashionnetwork/headline.js +11 -12
  7. package/lib/routes/fashionnetwork/news.js +11 -12
  8. package/lib/routes/questmobile/report.js +13 -14
  9. package/lib/routes/rss3/blog.js +11 -12
  10. package/lib/utils/wechat-mp.js +2 -2
  11. package/lib/v2/163/ds.js +33 -0
  12. package/lib/v2/163/dy.js +29 -0
  13. package/lib/v2/163/dy2.js +42 -0
  14. package/lib/v2/{netease → 163}/exclusive.js +0 -0
  15. package/lib/v2/163/maintainer.js +20 -0
  16. package/lib/v2/163/music/artist-songs.js +39 -0
  17. package/lib/{routes/ncm → v2/163/music}/artist.js +10 -4
  18. package/lib/{routes/ncm → v2/163/music}/djradio.js +3 -5
  19. package/lib/v2/163/music/maintainer.js +3 -0
  20. package/lib/v2/163/music/playlist.js +55 -0
  21. package/lib/v2/163/music/userevents.js +52 -0
  22. package/lib/{routes/ncm → v2/163/music}/userplaylist.js +10 -12
  23. package/lib/{routes/ncm → v2/163/music}/userplayrecords.js +11 -13
  24. package/lib/v2/{netease → 163/news}/rank.js +20 -19
  25. package/lib/{routes/netease → v2/163}/news/special.js +11 -18
  26. package/lib/v2/163/open/vip.js +63 -0
  27. package/lib/v2/163/radar.js +155 -0
  28. package/lib/v2/{netease → 163}/renjian.js +11 -8
  29. package/lib/v2/163/router.js +20 -0
  30. package/lib/v2/163/templates/ds.art +7 -0
  31. package/lib/v2/163/templates/dy.art +6 -0
  32. package/lib/v2/{netease → 163}/templates/exclusive.art +0 -0
  33. package/lib/{routes/ncm/templates → v2/163/templates/music}/djradio-content.art +0 -0
  34. package/lib/v2/163/templates/music/playlist.art +4 -0
  35. package/lib/v2/163/templates/music/userevents.art +7 -0
  36. package/lib/v2/163/templates/music/userplaylist.art +16 -0
  37. package/lib/v2/163/templates/music/userplayrecords.art +7 -0
  38. package/lib/v2/163/templates/open.art +12 -0
  39. package/lib/v2/{netease → 163}/today.js +2 -2
  40. package/lib/v2/163/utils.js +40 -0
  41. package/lib/v2/18comic/album.js +2 -1
  42. package/lib/v2/18comic/blogs.js +2 -1
  43. package/lib/v2/18comic/radar.js +39 -29
  44. package/lib/v2/18comic/utils.js +6 -10
  45. package/lib/v2/500px/maintainer.js +4 -0
  46. package/lib/v2/500px/radar.js +19 -0
  47. package/lib/v2/500px/router.js +4 -0
  48. package/lib/v2/500px/templates/tribeSet.art +6 -0
  49. package/lib/v2/500px/templates/user.art +3 -0
  50. package/lib/v2/500px/tribeSet.js +29 -0
  51. package/lib/v2/500px/user.js +32 -0
  52. package/lib/v2/500px/utils.js +122 -0
  53. package/lib/v2/52hrtt/index.js +12 -13
  54. package/lib/v2/52hrtt/symposium.js +12 -13
  55. package/lib/v2/591/list.js +144 -0
  56. package/lib/v2/591/radar.js +16 -0
  57. package/lib/v2/591/router.js +3 -0
  58. package/lib/v2/591/templates/house.art +52 -0
  59. package/lib/v2/7mmtv/index.js +15 -23
  60. package/lib/v2/7mmtv/templates/description.art +5 -1
  61. package/lib/v2/abmedia/category.js +1 -1
  62. package/lib/v2/acg17/maintainer.js +3 -0
  63. package/lib/v2/acg17/post.js +20 -0
  64. package/lib/v2/acg17/radar.js +13 -0
  65. package/lib/v2/acg17/router.js +3 -0
  66. package/lib/v2/aeaweb/index.js +81 -0
  67. package/lib/v2/aeaweb/maintainer.js +3 -0
  68. package/lib/v2/aeaweb/radar.js +13 -0
  69. package/lib/v2/aeaweb/router.js +3 -0
  70. package/lib/v2/aeaweb/templates/description.art +3 -0
  71. package/lib/v2/ally/rail.js +41 -42
  72. package/lib/v2/annualreviews/index.js +68 -0
  73. package/lib/v2/annualreviews/maintainer.js +3 -0
  74. package/lib/v2/annualreviews/radar.js +13 -0
  75. package/lib/v2/annualreviews/router.js +3 -0
  76. package/lib/v2/apple/exchange_repair.js +28 -21
  77. package/lib/v2/baidu/maintainer.js +1 -0
  78. package/lib/v2/baidu/radar.js +8 -0
  79. package/lib/v2/baidu/router.js +1 -0
  80. package/lib/v2/baidu/templates/top.art +9 -0
  81. package/lib/v2/baidu/top.js +34 -0
  82. package/lib/v2/bdys/index.js +98 -0
  83. package/lib/v2/bdys/maintainer.js +3 -0
  84. package/lib/v2/bdys/radar.js +20 -0
  85. package/lib/v2/bdys/router.js +3 -0
  86. package/lib/v2/bdys/templates/desc.art +21 -0
  87. package/lib/v2/bilibili/video-all.js +1 -1
  88. package/lib/v2/bioone/featured.js +10 -8
  89. package/lib/v2/bioone/journal.js +28 -26
  90. package/lib/v2/bjfu/it/utils.js +3 -3
  91. package/lib/v2/bjp/apod.js +43 -0
  92. package/lib/v2/bjp/maintainer.js +3 -0
  93. package/lib/v2/bjp/radar.js +13 -0
  94. package/lib/v2/bjp/router.js +3 -0
  95. package/lib/v2/bjsk/index.js +52 -0
  96. package/lib/v2/bjsk/maintainer.js +3 -0
  97. package/lib/v2/bjsk/radar.js +13 -0
  98. package/lib/v2/bjsk/router.js +3 -0
  99. package/lib/v2/bjwxdxh/index.js +52 -0
  100. package/lib/v2/bjwxdxh/maintainer.js +3 -0
  101. package/lib/v2/bjwxdxh/radar.js +13 -0
  102. package/lib/v2/bjwxdxh/router.js +3 -0
  103. package/lib/v2/blockbeats/index.js +28 -35
  104. package/lib/v2/blockbeats/maintainer.js +1 -1
  105. package/lib/v2/blockbeats/radar.js +3 -3
  106. package/lib/v2/bloomberg/utils.js +13 -11
  107. package/lib/v2/bnu/fdy.js +41 -0
  108. package/lib/v2/bnu/lib.js +40 -0
  109. package/lib/v2/bnu/maintainer.js +3 -0
  110. package/lib/v2/bnu/radar.js +23 -5
  111. package/lib/v2/bnu/router.js +2 -0
  112. package/lib/v2/byteclicks/index.js +22 -0
  113. package/lib/v2/byteclicks/maintainer.js +4 -0
  114. package/lib/v2/byteclicks/radar.js +19 -0
  115. package/lib/v2/byteclicks/router.js +4 -0
  116. package/lib/v2/byteclicks/tag.js +30 -0
  117. package/lib/v2/byteclicks/utils.js +13 -0
  118. package/lib/v2/caareviews/utils.js +2 -2
  119. package/lib/v2/caixin/article.js +27 -0
  120. package/lib/v2/caixin/blog.js +58 -0
  121. package/lib/v2/caixin/category.js +56 -0
  122. package/lib/{routes → v2}/caixin/database.js +14 -14
  123. package/lib/v2/caixin/k.js +40 -0
  124. package/lib/v2/caixin/latest.js +50 -0
  125. package/lib/v2/caixin/maintainer.js +8 -0
  126. package/lib/v2/caixin/radar.js +43 -0
  127. package/lib/v2/caixin/router.js +8 -0
  128. package/lib/v2/caixin/templates/article.art +38 -0
  129. package/lib/v2/caixin/utils.js +52 -0
  130. package/lib/v2/cartoonmad/comic.js +70 -0
  131. package/lib/v2/cartoonmad/maintainer.js +3 -0
  132. package/lib/v2/cartoonmad/radar.js +13 -0
  133. package/lib/v2/cartoonmad/router.js +3 -0
  134. package/lib/v2/cartoonmad/templates/chapter.art +1 -0
  135. package/lib/{routes/universities → v2}/cas/cg/index.js +4 -2
  136. package/lib/{routes/universities → v2}/cas/iee/kydt.js +7 -5
  137. package/lib/v2/cas/maintainer.js +6 -0
  138. package/lib/v2/cas/mesalab/kb.js +41 -0
  139. package/lib/v2/cas/radar.js +40 -0
  140. package/lib/v2/cas/router.js +6 -0
  141. package/lib/v2/cas/sim/kyjz.js +47 -0
  142. package/lib/v2/cast/index.js +74 -0
  143. package/lib/v2/cast/maintainer.js +3 -0
  144. package/lib/v2/cast/radar.js +13 -0
  145. package/lib/v2/cast/router.js +3 -0
  146. package/lib/v2/cctv/lm.js +22 -23
  147. package/lib/v2/chaincatcher/home.js +50 -0
  148. package/lib/v2/chaincatcher/maintainer.js +4 -0
  149. package/lib/v2/chaincatcher/news.js +40 -0
  150. package/lib/v2/chaincatcher/radar.js +19 -0
  151. package/lib/v2/chaincatcher/router.js +4 -0
  152. package/lib/v2/chaincatcher/templates/home.art +4 -0
  153. package/lib/v2/chinacef/experts.js +1 -1
  154. package/lib/v2/chinacef/hot.js +1 -1
  155. package/lib/v2/chinacef/index.js +1 -1
  156. package/lib/v2/chinafactcheck/index.js +1 -1
  157. package/lib/v2/chinathinktanks/viewpoint.js +12 -13
  158. package/lib/v2/ciidbnu/index.js +14 -15
  159. package/lib/v2/clickme/index.js +56 -0
  160. package/lib/v2/clickme/maintainer.js +3 -0
  161. package/lib/v2/clickme/radar.js +21 -0
  162. package/lib/v2/clickme/router.js +3 -0
  163. package/lib/v2/coindesk/index.js +36 -0
  164. package/lib/v2/coindesk/maintainer.js +3 -0
  165. package/lib/v2/coindesk/radar.js +13 -0
  166. package/lib/v2/coindesk/router.js +3 -0
  167. package/lib/v2/copymanga/comic.js +110 -0
  168. package/lib/v2/copymanga/maintainer.js +3 -0
  169. package/lib/v2/copymanga/radar.js +19 -0
  170. package/lib/v2/copymanga/router.js +3 -0
  171. package/lib/v2/copymanga/templates/comic.art +4 -0
  172. package/lib/v2/crac/index.js +46 -0
  173. package/lib/v2/crac/maintainer.js +3 -0
  174. package/lib/v2/crac/radar.js +13 -0
  175. package/lib/v2/crac/router.js +3 -0
  176. package/lib/v2/crossbell/feeds/following.js +29 -0
  177. package/lib/v2/crossbell/maintainer.js +6 -0
  178. package/lib/v2/crossbell/notes/character.js +22 -0
  179. package/lib/v2/crossbell/notes/index.js +16 -0
  180. package/lib/v2/crossbell/notes/source.js +19 -0
  181. package/lib/v2/crossbell/notes/utils.js +18 -0
  182. package/lib/v2/crossbell/radar.js +24 -0
  183. package/lib/v2/crossbell/router.js +6 -0
  184. package/lib/v2/csu/career.js +51 -0
  185. package/lib/v2/csu/mail.js +30 -26
  186. package/lib/v2/csu/maintainer.js +2 -0
  187. package/lib/v2/csu/radar.js +10 -2
  188. package/lib/v2/csu/router.js +1 -1
  189. package/lib/v2/csu/utils.js +17 -0
  190. package/lib/v2/dcard/section.js +1 -1
  191. package/lib/v2/dcfever/maintainer.js +6 -0
  192. package/lib/v2/dcfever/news.js +36 -0
  193. package/lib/v2/dcfever/radar.js +37 -0
  194. package/lib/v2/dcfever/reviews.js +29 -0
  195. package/lib/v2/dcfever/router.js +6 -0
  196. package/lib/v2/dcfever/templates/trading.art +14 -0
  197. package/lib/v2/dcfever/trading-search.js +39 -0
  198. package/lib/v2/dcfever/trading.js +39 -0
  199. package/lib/v2/dcfever/utils.js +78 -0
  200. package/lib/v2/disinformationindex/blog.js +12 -13
  201. package/lib/{routes → v2}/dlsite/campaign.js +22 -24
  202. package/lib/v2/dlsite/maintainer.js +4 -0
  203. package/lib/{routes → v2}/dlsite/new.js +27 -28
  204. package/lib/v2/dlsite/radar.js +15 -0
  205. package/lib/v2/dlsite/router.js +4 -0
  206. package/lib/v2/dtcj/datainsight.js +13 -14
  207. package/lib/v2/eastday/24.js +14 -15
  208. package/lib/v2/economist/full.js +2 -2
  209. package/lib/v2/ehentai/ehapi.js +10 -5
  210. package/lib/v2/ehentai/favorites.js +2 -2
  211. package/lib/v2/ehentai/search.js +2 -2
  212. package/lib/v2/ehentai/tag.js +1 -1
  213. package/lib/v2/eleduck/jobs.js +38 -0
  214. package/lib/v2/eleduck/maintainer.js +4 -0
  215. package/lib/v2/eleduck/posts.js +41 -0
  216. package/lib/v2/eleduck/radar.js +25 -0
  217. package/lib/v2/eleduck/router.js +4 -0
  218. package/lib/v2/famitsu/category.js +62 -0
  219. package/lib/v2/famitsu/maintainer.js +3 -0
  220. package/lib/v2/famitsu/radar.js +13 -0
  221. package/lib/v2/famitsu/router.js +3 -0
  222. package/lib/v2/fffdm/maintainer.js +3 -0
  223. package/lib/v2/fffdm/manhua/manhua.js +55 -0
  224. package/lib/v2/fffdm/radar.js +14 -0
  225. package/lib/v2/fffdm/router.js +3 -0
  226. package/lib/v2/fffdm/templates/manhua.art +5 -0
  227. package/lib/v2/fjksbm/index.js +53 -0
  228. package/lib/v2/fjksbm/maintainer.js +3 -0
  229. package/lib/v2/fjksbm/radar.js +13 -0
  230. package/lib/v2/fjksbm/router.js +3 -0
  231. package/lib/v2/flyert/utils.js +3 -3
  232. package/lib/v2/furstar/templates/description.art +1 -1
  233. package/lib/v2/gelonghui/hot-article.js +33 -0
  234. package/lib/v2/gelonghui/live.js +31 -0
  235. package/lib/v2/gelonghui/radar.js +12 -0
  236. package/lib/v2/gelonghui/router.js +2 -0
  237. package/lib/v2/gelonghui/templates/live.art +7 -0
  238. package/lib/v2/gelonghui/utils.js +6 -0
  239. package/lib/v2/github/maintainer.js +1 -0
  240. package/lib/v2/github/radar.js +35 -29
  241. package/lib/v2/github/router.js +1 -0
  242. package/lib/v2/github/wiki.js +32 -0
  243. package/lib/v2/gocn/topics.js +1 -1
  244. package/lib/v2/google/sitesRecentChanges.js +12 -13
  245. package/lib/v2/gov/beijing/bphc/index.js +1 -1
  246. package/lib/v2/gov/ccdi/utils.js +1 -1
  247. package/lib/v2/gov/maintainer.js +2 -0
  248. package/lib/v2/gov/moe/moe.js +4 -4
  249. package/lib/v2/gov/moe/s78.js +44 -0
  250. package/lib/v2/gov/pbc/utils.js +2 -2
  251. package/lib/v2/gov/radar.js +17 -0
  252. package/lib/v2/gov/router.js +2 -0
  253. package/lib/v2/gov/sichuan/deyang/govpulicinfo.js +3 -3
  254. package/lib/v2/gov/stats/utils.js +2 -2
  255. package/lib/v2/gov/wuhan/whyw.js +44 -0
  256. package/lib/v2/guandian/radar.js +8 -6
  257. package/lib/v2/gzh360/universal.js +3 -3
  258. package/lib/v2/gzh360/utils.js +2 -2
  259. package/lib/v2/hellogithub/maintainer.js +1 -1
  260. package/lib/v2/hellogithub/volume.js +13 -12
  261. package/lib/{routes/universities → v2}/hitsz/article.js +13 -15
  262. package/lib/v2/hitsz/maintainer.js +3 -0
  263. package/lib/v2/hitsz/radar.js +13 -0
  264. package/lib/v2/hitsz/router.js +3 -0
  265. package/lib/v2/hk01/utils.js +2 -2
  266. package/lib/v2/hljucm/maintainer.js +3 -0
  267. package/lib/v2/hljucm/radar.js +13 -0
  268. package/lib/v2/hljucm/router.js +3 -0
  269. package/lib/v2/hljucm/yjsy.js +56 -0
  270. package/lib/v2/hrbust/jwzx.js +36 -0
  271. package/lib/v2/hrbust/maintainer.js +3 -0
  272. package/lib/v2/hrbust/radar.js +13 -0
  273. package/lib/v2/hrbust/router.js +3 -0
  274. package/lib/v2/hrbust/templates/description.art +1 -0
  275. package/lib/v2/hrbust/utils.js +71 -0
  276. package/lib/v2/hunanpea/maintainer.js +3 -0
  277. package/lib/v2/hunanpea/radar.js +13 -0
  278. package/lib/v2/hunanpea/router.js +3 -0
  279. package/lib/v2/hunanpea/rsks.js +42 -0
  280. package/lib/v2/ikea/cn/family_offers.js +70 -0
  281. package/lib/v2/ikea/cn/low_price.js +22 -0
  282. package/lib/v2/ikea/cn/new.js +39 -0
  283. package/lib/v2/ikea/cn/utils.js +42 -0
  284. package/lib/v2/ikea/gb/new.js +54 -0
  285. package/lib/v2/ikea/gb/offer.js +69 -0
  286. package/lib/v2/ikea/maintainer.js +7 -0
  287. package/lib/v2/ikea/radar.js +42 -0
  288. package/lib/v2/ikea/router.js +7 -0
  289. package/lib/v2/ikea/templates/cn/product.art +14 -0
  290. package/lib/v2/ikea/templates/new.art +7 -0
  291. package/lib/v2/ikea/templates/offer.art +3 -0
  292. package/lib/v2/inewsweek/index.js +53 -0
  293. package/lib/v2/inewsweek/maintainer.js +3 -0
  294. package/lib/v2/inewsweek/radar.js +13 -0
  295. package/lib/v2/inewsweek/router.js +3 -0
  296. package/lib/v2/inoreader/index.js +46 -0
  297. package/lib/v2/inoreader/maintainer.js +3 -0
  298. package/lib/v2/inoreader/radar.js +17 -0
  299. package/lib/v2/inoreader/router.js +3 -0
  300. package/lib/v2/iqiyi/album.js +62 -0
  301. package/lib/v2/iqiyi/maintainer.js +4 -0
  302. package/lib/v2/iqiyi/radar.js +24 -0
  303. package/lib/v2/iqiyi/router.js +4 -0
  304. package/lib/v2/iqiyi/templates/album.art +1 -0
  305. package/lib/{routes → v2}/iqiyi/video.js +0 -0
  306. package/lib/v2/issuehunt/funded.js +28 -0
  307. package/lib/v2/issuehunt/maintainer.js +3 -0
  308. package/lib/v2/issuehunt/radar.js +13 -0
  309. package/lib/v2/issuehunt/router.js +3 -0
  310. package/lib/v2/jiaoliudao/index.js +35 -0
  311. package/lib/v2/jiaoliudao/maintainer.js +3 -0
  312. package/lib/v2/jiaoliudao/radar.js +13 -0
  313. package/lib/v2/jiaoliudao/router.js +3 -0
  314. package/lib/v2/jike/user.js +0 -1
  315. package/lib/v2/jin10/index.js +58 -0
  316. package/lib/v2/jin10/maintainer.js +3 -0
  317. package/lib/v2/jin10/radar.js +13 -0
  318. package/lib/v2/jin10/router.js +3 -0
  319. package/lib/v2/jin10/templates/description.art +2 -0
  320. package/lib/v2/ke/maintainer.js +3 -0
  321. package/lib/v2/ke/radar.js +13 -0
  322. package/lib/v2/ke/results.js +36 -0
  323. package/lib/v2/ke/router.js +3 -0
  324. package/lib/v2/kimlaw/maintainer.js +3 -0
  325. package/lib/v2/kimlaw/radar.js +13 -0
  326. package/lib/v2/kimlaw/router.js +3 -0
  327. package/lib/v2/kimlaw/thesis.js +44 -0
  328. package/lib/v2/layoffs/index.js +51 -21
  329. package/lib/v2/learnblockchain/maintainer.js +3 -0
  330. package/lib/v2/learnblockchain/posts.js +43 -0
  331. package/lib/v2/learnblockchain/radar.js +19 -0
  332. package/lib/v2/learnblockchain/router.js +3 -0
  333. package/lib/v2/linkedin/cn/index.js +13 -0
  334. package/lib/v2/linkedin/cn/renderer.js +179 -0
  335. package/lib/v2/linkedin/cn/utils.js +122 -0
  336. package/lib/v2/linkedin/maintainer.js +1 -0
  337. package/lib/v2/linkedin/radar.js +15 -1
  338. package/lib/v2/linkedin/router.js +1 -0
  339. package/lib/v2/linkedin/templates/cn/posting.art +25 -0
  340. package/lib/v2/lofter/user.js +2 -2
  341. package/lib/v2/mclaren/index.js +96 -0
  342. package/lib/v2/mclaren/maintainer.js +3 -0
  343. package/lib/v2/mclaren/radar.js +29 -0
  344. package/lib/v2/mclaren/router.js +3 -0
  345. package/lib/v2/mclaren/templates/desc.art +6 -0
  346. package/lib/v2/minecraft/maintainer.js +3 -0
  347. package/lib/v2/minecraft/radar.js +13 -0
  348. package/lib/v2/minecraft/router.js +3 -0
  349. package/lib/{routes → v2}/minecraft/version.js +1 -1
  350. package/lib/v2/misskey/featured-notes.js +29 -0
  351. package/lib/v2/misskey/maintainer.js +3 -0
  352. package/lib/v2/misskey/radar.js +35 -0
  353. package/lib/v2/misskey/router.js +3 -0
  354. package/lib/v2/misskey/templates/note.art +23 -0
  355. package/lib/v2/misskey/utils.js +31 -0
  356. package/lib/v2/mixcloud/index.js +130 -0
  357. package/lib/v2/mixcloud/maintainer.js +3 -0
  358. package/lib/v2/mixcloud/queries.js +1520 -0
  359. package/lib/v2/mixcloud/radar.js +37 -0
  360. package/lib/v2/mixcloud/router.js +3 -0
  361. package/lib/v2/mysql/release.js +9 -2
  362. package/lib/v2/nbd/index.js +6 -6
  363. package/lib/v2/njnu/ceai/utils.js +3 -3
  364. package/lib/v2/njnu/jwc/utils.js +3 -3
  365. package/lib/v2/nua/utils.js +2 -2
  366. package/lib/v2/odaily/activity.js +13 -14
  367. package/lib/v2/odaily/user.js +14 -15
  368. package/lib/v2/oilchem/index.js +20 -21
  369. package/lib/v2/oncc/maintainer.js +1 -0
  370. package/lib/v2/oncc/money18.js +115 -0
  371. package/lib/v2/oncc/radar.js +13 -5
  372. package/lib/v2/oncc/router.js +1 -0
  373. package/lib/v2/oncc/templates/money18.art +6 -0
  374. package/lib/{routes → v2}/phoronix/index.js +42 -46
  375. package/lib/v2/phoronix/maintainer.js +3 -0
  376. package/lib/v2/phoronix/radar.js +13 -0
  377. package/lib/v2/phoronix/router.js +3 -0
  378. package/lib/v2/pixiv/api/getRanking.js +1 -1
  379. package/lib/v2/pixiv/ranking.js +3 -0
  380. package/lib/v2/piyao/jrpy.js +39 -0
  381. package/lib/v2/piyao/maintainer.js +3 -0
  382. package/lib/v2/piyao/radar.js +13 -0
  383. package/lib/v2/piyao/router.js +3 -0
  384. package/lib/v2/pku/ss/admission.js +4 -42
  385. package/lib/v2/pku/ss/common.js +37 -0
  386. package/lib/v2/pku/ss/notice.js +4 -42
  387. package/lib/v2/pku/ss/pg_admin.js +4 -42
  388. package/lib/v2/qq/fact/index.js +61 -0
  389. package/lib/v2/qq/maintainer.js +1 -0
  390. package/lib/v2/qq/radar.js +8 -0
  391. package/lib/v2/qq/router.js +1 -0
  392. package/lib/v2/qq/templates/article.art +19 -0
  393. package/lib/v2/rodong/maintainer.js +3 -0
  394. package/lib/v2/rodong/news.js +45 -0
  395. package/lib/v2/rodong/radar.js +13 -0
  396. package/lib/v2/rodong/router.js +3 -0
  397. package/lib/v2/ruancan/category.js +8 -0
  398. package/lib/v2/ruancan/index.js +3 -55
  399. package/lib/v2/ruancan/maintainer.js +3 -3
  400. package/lib/v2/ruancan/radar.js +12 -6
  401. package/lib/v2/ruancan/router.js +4 -1
  402. package/lib/v2/ruancan/search.js +8 -0
  403. package/lib/v2/ruancan/user.js +8 -0
  404. package/lib/v2/ruancan/utils.js +66 -0
  405. package/lib/v2/sdu/extractor/index.js +5 -5
  406. package/lib/v2/sdu/extractor/sdrj.js +2 -2
  407. package/lib/v2/sdu/extractor/view.js +2 -2
  408. package/lib/v2/sdu/extractor/wh/jwc.js +2 -2
  409. package/lib/v2/sdu/extractor/wh/news.js +2 -2
  410. package/lib/v2/sdu/wh/jwc.js +1 -1
  411. package/lib/v2/sdu/wh/news.js +1 -1
  412. package/lib/v2/shmeea/self-study.js +4 -4
  413. package/lib/v2/sicau/dky.js +12 -13
  414. package/lib/v2/sicau/yan.js +13 -14
  415. package/lib/v2/skysports/maintainer.js +3 -0
  416. package/lib/{routes → v2}/skysports/news.js +10 -8
  417. package/lib/v2/skysports/radar.js +13 -0
  418. package/lib/v2/skysports/router.js +3 -0
  419. package/lib/v2/sspai/bookmarks.js +41 -0
  420. package/lib/v2/sspai/maintainer.js +1 -0
  421. package/lib/v2/sspai/radar.js +6 -0
  422. package/lib/v2/sspai/router.js +1 -0
  423. package/lib/v2/stcn/index.js +25 -32
  424. package/lib/v2/stcn/maintainer.js +0 -3
  425. package/lib/v2/stcn/radar.js +4 -22
  426. package/lib/v2/stcn/router.js +1 -1
  427. package/lib/v2/swjtu/jtys/yjs.js +55 -0
  428. package/lib/v2/swjtu/jyzpxx.js +27 -0
  429. package/lib/v2/swjtu/maintainer.js +4 -0
  430. package/lib/v2/swjtu/radar.js +21 -0
  431. package/lib/v2/swjtu/router.js +4 -0
  432. package/lib/v2/swjtu/templates/job_desc.art +19 -0
  433. package/lib/v2/swjtu/templates/job_detail.art +21 -0
  434. package/lib/v2/swjtu/utils.js +33 -0
  435. package/lib/v2/telegram/channel.js +24 -4
  436. package/lib/v2/thepaper/maintainer.js +2 -1
  437. package/lib/v2/thepaper/radar.js +6 -0
  438. package/lib/v2/thepaper/router.js +2 -1
  439. package/lib/v2/thepaper/sidebar.js +24 -0
  440. package/lib/v2/thepaper/utils.js +51 -65
  441. package/lib/v2/twitter/utils.js +0 -1
  442. package/lib/v2/twitter/web-api/twitter-api.js +5 -5
  443. package/lib/v2/u9a9/index.js +66 -0
  444. package/lib/v2/u9a9/maintainer.js +4 -0
  445. package/lib/v2/u9a9/radar.js +19 -0
  446. package/lib/v2/u9a9/router.js +4 -0
  447. package/lib/v2/uber/blog.js +20 -21
  448. package/lib/v2/uptimerobot/maintainer.js +3 -0
  449. package/lib/v2/uptimerobot/radar.js +13 -0
  450. package/lib/v2/uptimerobot/router.js +3 -0
  451. package/lib/v2/uptimerobot/rss.js +126 -0
  452. package/lib/v2/uptimerobot/templates/rss.art +20 -0
  453. package/lib/v2/vocus/maintainer.js +4 -0
  454. package/lib/v2/vocus/publication.js +42 -0
  455. package/lib/v2/vocus/radar.js +19 -0
  456. package/lib/v2/vocus/router.js +4 -0
  457. package/lib/v2/vocus/user.js +43 -0
  458. package/lib/v2/vocus/utils.js +51 -0
  459. package/lib/v2/wechat/ce.js +2 -2
  460. package/lib/v2/wechat/data258.js +1 -1
  461. package/lib/v2/wechat/ershcimi.js +1 -1
  462. package/lib/v2/wechat/feeddd.js +1 -1
  463. package/lib/v2/wechat/feeds.js +1 -1
  464. package/lib/v2/wechat/maintainer.js +1 -1
  465. package/lib/v2/wechat/mp.js +2 -2
  466. package/lib/v2/wechat/msgalbum.js +2 -2
  467. package/lib/v2/wechat/radar.js +9 -9
  468. package/lib/v2/wechat/router.js +1 -1
  469. package/lib/v2/wechat/wechat2rss.js +28 -0
  470. package/lib/v2/wfu/news.js +1 -1
  471. package/lib/v2/who/news-room.js +17 -18
  472. package/lib/v2/who/news.js +11 -12
  473. package/lib/v2/woshipm/bookmarks.js +34 -0
  474. package/lib/v2/woshipm/latest.js +27 -0
  475. package/lib/v2/woshipm/maintainer.js +7 -0
  476. package/lib/v2/woshipm/popular.js +33 -0
  477. package/lib/v2/woshipm/radar.js +39 -0
  478. package/lib/v2/woshipm/router.js +7 -0
  479. package/lib/{routes → v2}/woshipm/user_article.js +9 -15
  480. package/lib/v2/woshipm/utils.js +21 -0
  481. package/lib/v2/woshipm/wen.js +36 -0
  482. package/lib/v2/wp-china/news.js +12 -13
  483. package/lib/v2/wyzxwk/article.js +20 -21
  484. package/lib/v2/x6d/index.js +59 -0
  485. package/lib/v2/x6d/maintainer.js +3 -0
  486. package/lib/v2/x6d/radar.js +13 -0
  487. package/lib/v2/x6d/router.js +3 -0
  488. package/lib/v2/xaufe/jiaowu.js +72 -0
  489. package/lib/v2/xaufe/maintainer.js +3 -0
  490. package/lib/v2/xaufe/radar.js +11 -0
  491. package/lib/v2/xaufe/router.js +3 -0
  492. package/lib/v2/xiaomiyoupin/crowdfunding.js +43 -0
  493. package/lib/v2/xiaomiyoupin/latest.js +15 -0
  494. package/lib/v2/xiaomiyoupin/maintainer.js +4 -0
  495. package/lib/v2/xiaomiyoupin/radar.js +19 -0
  496. package/lib/v2/xiaomiyoupin/router.js +4 -0
  497. package/lib/v2/xiaomiyoupin/templates/goods.art +27 -0
  498. package/lib/v2/xiaomiyoupin/utils.js +21 -0
  499. package/lib/v2/yahoo/maintainer.js +3 -0
  500. package/lib/{routes/yahoo-news → v2/yahoo/news}/index.js +7 -9
  501. package/lib/v2/yahoo/radar.js +13 -0
  502. package/lib/v2/yahoo/router.js +3 -0
  503. package/lib/v2/yicai/utils.js +1 -1
  504. package/lib/v2/youtube/user.js +15 -3
  505. package/lib/v2/youtube/utils.js +1 -1
  506. package/lib/v2/yuque/book.js +79 -0
  507. package/lib/v2/yuque/maintainer.js +3 -0
  508. package/lib/v2/yuque/radar.js +13 -0
  509. package/lib/v2/yuque/router.js +3 -0
  510. package/lib/v2/yuque/utils.js +46 -0
  511. package/lib/v2/zhibo8/forum.js +15 -16
  512. package/lib/v2/zhibo8/luxiang.js +38 -0
  513. package/lib/v2/zhibo8/maintainer.js +1 -0
  514. package/lib/v2/zhibo8/more.js +12 -17
  515. package/lib/v2/zhibo8/post.js +28 -18
  516. package/lib/v2/zhibo8/radar.js +8 -0
  517. package/lib/v2/zhibo8/router.js +1 -0
  518. package/package.json +15 -14
  519. package/lib/routes/baidu/topwords.js +0 -38
  520. package/lib/routes/bjp/apod.js +0 -48
  521. package/lib/routes/caixin/article.js +0 -46
  522. package/lib/routes/caixin/blog.js +0 -62
  523. package/lib/routes/caixin/category.js +0 -48
  524. package/lib/routes/caixin/latest.js +0 -75
  525. package/lib/routes/caixin/yxnews.js +0 -30
  526. package/lib/routes/cartoonmad/comic.js +0 -69
  527. package/lib/routes/clickme/index.js +0 -76
  528. package/lib/routes/copymanga/comic.js +0 -74
  529. package/lib/routes/eleduck/jobs.js +0 -38
  530. package/lib/routes/fzdm/manhua.js +0 -62
  531. package/lib/routes/ikea/uk/new.js +0 -20
  532. package/lib/routes/ikea/uk/offer.js +0 -64
  533. package/lib/routes/iqiyi/dongman.js +0 -42
  534. package/lib/routes/jinshi/index.js +0 -35
  535. package/lib/routes/mi/youpin/crowdfunding.js +0 -39
  536. package/lib/routes/mi/youpin/new.js +0 -26
  537. package/lib/routes/ncm/playlist.js +0 -45
  538. package/lib/routes/netease/ds.js +0 -41
  539. package/lib/routes/netease/dy.js +0 -54
  540. package/lib/routes/netease/dy2.js +0 -62
  541. package/lib/routes/netease/open/latest.js +0 -68
  542. package/lib/routes/netease/open/vip.js +0 -39
  543. package/lib/routes/swjtu/tl/news.js +0 -35
  544. package/lib/routes/tencent/factcheck/index.js +0 -51
  545. package/lib/routes/universities/cas/mesalab/kb.js +0 -45
  546. package/lib/routes/universities/cas/sim/academic.js +0 -59
  547. package/lib/routes/vocus/publication.js +0 -19
  548. package/lib/routes/vocus/utils.js +0 -29
  549. package/lib/routes/woshipm/bookmarks.js +0 -45
  550. package/lib/routes/woshipm/latest.js +0 -45
  551. package/lib/routes/woshipm/popular.js +0 -38
  552. package/lib/routes/woshipm/wen.js +0 -39
  553. package/lib/routes/x6d/index.js +0 -64
  554. package/lib/routes/yuque/doc.js +0 -60
  555. package/lib/v2/csu/job.js +0 -34
  556. package/lib/v2/mp4er/index.js +0 -83
  557. package/lib/v2/mp4er/maintainer.js +0 -3
  558. package/lib/v2/mp4er/radar.js +0 -13
  559. package/lib/v2/mp4er/router.js +0 -3
  560. package/lib/v2/netease/maintainer.js +0 -6
  561. package/lib/v2/netease/radar.js +0 -37
  562. package/lib/v2/netease/router.js +0 -6
  563. package/lib/v2/wechat/wemp.js +0 -58
@@ -187,9 +187,9 @@ const normalizeUrl = (url, bypassHostCheck = false) => {
187
187
  * @param {boolean} bypassHostCheck - Whether to bypass host check.
188
188
  * @return {Promise<object>} - An object containing the article and its metadata.
189
189
  */
190
- const fetchArticle = async (ctx, url, bypassHostCheck = false) => {
190
+ const fetchArticle = (ctx, url, bypassHostCheck = false) => {
191
191
  url = normalizeUrl(url, bypassHostCheck);
192
- return await ctx.cache.tryGet(url, async () => {
192
+ return ctx.cache.tryGet(url, async () => {
193
193
  const response = await got(url);
194
194
  const $ = cheerio.load(response.data);
195
195
 
@@ -0,0 +1,33 @@
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
+ const root_url = 'https://inf.ds.163.com';
7
+
8
+ module.exports = async (ctx) => {
9
+ const id = ctx.params.id;
10
+
11
+ const current_url = `${root_url}/v1/web/feed/basic/getSomeOneFeeds?feedTypes=1,2,3,4,6,7,10,11&someOneUid=${id}`;
12
+ const response = await got({
13
+ method: 'get',
14
+ url: current_url,
15
+ });
16
+ const data = response.data.result.feeds;
17
+
18
+ const list = data.map((feed) => ({
19
+ title: JSON.parse(feed.content).body.text,
20
+ link: `https://ds.163.com/feed/${feed.id}`,
21
+ description: art(path.resolve(__dirname, 'templates/ds.art'), {
22
+ text: JSON.parse(feed.content).body.text,
23
+ medias: JSON.parse(feed.content).body.media,
24
+ }),
25
+ pubDate: parseDate(feed.updateTime),
26
+ }));
27
+
28
+ ctx.state.data = {
29
+ title: `${response.data.result.userInfos[0].user.nick} 的动态`,
30
+ link: `https://ds.163.com/user/${id}`,
31
+ item: list,
32
+ };
33
+ };
@@ -0,0 +1,29 @@
1
+ const got = require('@/utils/got');
2
+ const { parseDate } = require('@/utils/parse-date');
3
+ const timezone = require('@/utils/timezone');
4
+ const { parseDyArticle } = require('./utils');
5
+
6
+ module.exports = async (ctx) => {
7
+ const { id } = ctx.params;
8
+
9
+ const response = await got(`https://dy.163.com/v2/article/list.do?pageNo=1&wemediaId=${id}&size=10`);
10
+ const charset = response.headers['content-type'].split('=')[1];
11
+
12
+ const list = response.data.data.list.map((e) => ({
13
+ title: e.title,
14
+ link: 'https://www.163.com/dy/article/' + e.docid + '.html',
15
+ pubDate: timezone(parseDate(e.ptime), 8),
16
+ author: e.source,
17
+ imgsrc: e.imgsrc,
18
+ }));
19
+
20
+ const items = await Promise.all(list.map((e) => parseDyArticle(charset, e, ctx.cache.tryGet)));
21
+
22
+ ctx.state.data = {
23
+ title: `网易号 - ${list[0].author}`,
24
+ link: items[0].feedLink,
25
+ description: items[0].feedDescription,
26
+ image: items[0].feedImage,
27
+ item: items,
28
+ };
29
+ };
@@ -0,0 +1,42 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const iconv = require('iconv-lite');
4
+ const { parseDate } = require('@/utils/parse-date');
5
+ const timezone = require('@/utils/timezone');
6
+ const { parseDyArticle } = require('./utils');
7
+
8
+ module.exports = async (ctx) => {
9
+ const { id } = ctx.params;
10
+ const limit = ctx.query.limit ?? 30;
11
+ const url = `https://www.163.com/dy/media/${id}.html`;
12
+
13
+ const response = await got(url, { responseType: 'buffer' });
14
+
15
+ const charset = response.headers['content-type'].split('=')[1];
16
+ const data = iconv.decode(response.data, charset);
17
+ const $ = cheerio.load(data);
18
+
19
+ const list = $('.tab_content ul li')
20
+ .slice(0, limit)
21
+ .toArray()
22
+ .map((item) => {
23
+ item = $(item);
24
+ return {
25
+ title: item.find('h4 a').text(),
26
+ link: item.find('a').first().attr('href'),
27
+ pubDate: timezone(parseDate(item.find('.time').text()), 8),
28
+ imgsrc: item.find('a img').attr('src'),
29
+ };
30
+ });
31
+
32
+ const items = await Promise.all(list.map((item) => parseDyArticle(charset, item, ctx.cache.tryGet)));
33
+
34
+ ctx.state.data = {
35
+ title: `${$('head title').text()} - 网易号`,
36
+ link: url,
37
+ description: $('.icon_line.desc').text(),
38
+ image: $('.head_img').attr('src'),
39
+ item: items,
40
+ author: $('h2').text(),
41
+ };
42
+ };
File without changes
@@ -0,0 +1,20 @@
1
+ module.exports = {
2
+ '/exclusive/:id?': ['nczitzk'],
3
+ '/ds/:id': ['luyuhuang'],
4
+ '/dy/:id': ['HendricksZheng'],
5
+ '/dy2/:id': ['mjysci'],
6
+
7
+ '/music/artist/:id': ['metowolf'],
8
+ '/music/artist/songs/:id': ['ZhongMingKun'],
9
+ '/music/djradio/:id': ['magic-akari'],
10
+ '/music/playlist/:id': ['DIYgod'],
11
+ '/music/user/events/:id': ['Master-Hash'],
12
+ '/music/user/playlist/:uid': ['DIYgod'],
13
+ '/music/user/playrecords/:uid/:type?': ['alfredcai'],
14
+
15
+ '/news/rank/:category?/:type?/:time?': ['nczitzk'],
16
+ '/news/special/:type?': ['nczitzk'],
17
+ '/open/vip': ['hoilc'],
18
+ '/renjian/:category?': ['nczitzk'],
19
+ '/today/:need_content?': ['nczitzk'],
20
+ };
@@ -0,0 +1,39 @@
1
+ const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
4
+
5
+ module.exports = async (ctx) => {
6
+ const { id } = ctx.params;
7
+
8
+ const { data } = await got(`https://music.163.com/api/v1/artist/songs`, {
9
+ headers: {
10
+ Referer: 'https://music.163.com/',
11
+ },
12
+ searchParams: {
13
+ id,
14
+ private_cloud: 'true',
15
+ work_type: 1,
16
+ order: 'time',
17
+ offset: 0,
18
+ limit: 100,
19
+ },
20
+ });
21
+
22
+ const artist = data.songs.find(({ ar }) => ar[0].id === parseInt(id)).ar[0];
23
+ const items = data.songs.map((song) => ({
24
+ title: `${song.name} - ${song.ar.map(({ name }) => name).join(' / ')}`,
25
+ description: art(path.join(__dirname, '../templates/music/playlist.art'), {
26
+ singer: song.ar.map(({ name }) => name).join(' / '),
27
+ album: song.al.name,
28
+ picUrl: song.al.picUrl,
29
+ }),
30
+ link: `https://music.163.com/#/song?id=${song.id}`,
31
+ }));
32
+
33
+ ctx.state.data = {
34
+ title: `${artist.name} - 歌手歌曲`,
35
+ link: `https://music.163.com/#/artist?id=${id}`,
36
+ description: `网易云音乐 - 歌手歌曲 - ${artist.name}`,
37
+ item: items,
38
+ };
39
+ };
@@ -1,11 +1,11 @@
1
1
  const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
2
4
 
3
5
  module.exports = async (ctx) => {
4
6
  const id = ctx.params.id;
5
7
 
6
- const response = await got({
7
- method: 'get',
8
- url: `https://music.163.com/api/artist/albums/${id}`,
8
+ const response = await got(`https://music.163.com/api/artist/albums/${id}`, {
9
9
  headers: {
10
10
  Referer: 'https://music.163.com/',
11
11
  },
@@ -17,11 +17,17 @@ module.exports = async (ctx) => {
17
17
  title: data.artist.name,
18
18
  link: `https://music.163.com/#/artist/album?id=${id}`,
19
19
  description: `网易云音乐歌手专辑 - ${data.artist.name}`,
20
+ image: data.artist.img1v1Url || data.artist.picUrl,
20
21
  item: data.hotAlbums.map((item) => {
21
22
  const singer = item.artists.length === 1 ? item.artists[0].name : item.artists.reduce((prev, cur) => (prev.name || prev) + '/' + cur.name);
22
23
  return {
23
24
  title: `${item.name} - ${singer}`,
24
- description: `歌手:${singer}<br>专辑:${item.name}<br>日期:${new Date(item.publishTime).toLocaleDateString()}<br><img src="${item.picUrl}">`,
25
+ description: art(path.join(__dirname, '../templates/music/playlist.art'), {
26
+ singer,
27
+ album: item.name,
28
+ date: new Date(item.publishTime).toLocaleDateString(),
29
+ picUrl: item.picUrl,
30
+ }),
25
31
  link: `https://music.163.com/#/album?id=${item.id}`,
26
32
  pubDate: new Date(item.publishTime),
27
33
  published: new Date(item.publishTime),
@@ -6,10 +6,8 @@ const path = require('path');
6
6
  module.exports = async (ctx) => {
7
7
  const id = ctx.params.id;
8
8
 
9
- const ProcessFeed = async (limit, offset) =>
10
- await got({
11
- method: 'post',
12
- url: 'https://music.163.com/api/dj/program/byradio',
9
+ const ProcessFeed = (limit, offset) =>
10
+ got.post('https://music.163.com/api/dj/program/byradio', {
13
11
  headers: {
14
12
  Referer: 'https://music.163.com/',
15
13
  },
@@ -40,7 +38,7 @@ module.exports = async (ctx) => {
40
38
  const duration = ~~(pg.duration / 1000);
41
39
  const mm_ss_duration = `${(duration / 60).toFixed(0).padStart(2, '0')}:${(duration % 60).toFixed(0).padStart(2, '0')}`;
42
40
 
43
- const html = art(path.join(__dirname, 'templates/djradio-content.art'), {
41
+ const html = art(path.join(__dirname, '../templates/music/djradio-content.art'), {
44
42
  pg,
45
43
  description,
46
44
  itunes_duration: mm_ss_duration,
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ '/user/events/:id': ['Master-Hash'],
3
+ };
@@ -0,0 +1,55 @@
1
+ const got = require('@/utils/got');
2
+ const config = require('@/config').value;
3
+ const { art } = require('@/utils/render');
4
+ const path = require('path');
5
+
6
+ module.exports = async (ctx) => {
7
+ if (!config.ncm || !config.ncm.cookies) {
8
+ throw '163 Music RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
9
+ }
10
+
11
+ const id = ctx.params.id;
12
+
13
+ const response = await got.post('https://music.163.com/api/v3/playlist/detail', {
14
+ headers: {
15
+ Referer: 'https://music.163.com/',
16
+ Cookie: config.ncm.cookies,
17
+ },
18
+ form: {
19
+ id,
20
+ },
21
+ });
22
+
23
+ const data = response.data.playlist;
24
+ const songinfo = await got('https://music.163.com/api/song/detail', {
25
+ headers: {
26
+ Referer: 'https://music.163.com',
27
+ },
28
+ searchParams: {
29
+ ids: `[${data.trackIds.slice(0, 201).map((item) => item.id)}]`,
30
+ },
31
+ });
32
+ const songs = songinfo.data.songs;
33
+
34
+ ctx.state.data = {
35
+ title: data.name,
36
+ link: `https://music.163.com/#/playlist?id=${id}`,
37
+ description: `网易云音乐歌单 - ${data.name}`,
38
+ item: data.trackIds.slice(0, 201).map((item) => {
39
+ const thisSong = songs.find((element) => element.id === item.id);
40
+ const singer = thisSong.artists.length === 1 ? thisSong.artists[0].name : thisSong.artists.reduce((prev, cur) => (prev.name || prev) + '/' + cur.name);
41
+ return {
42
+ title: `${thisSong.name} - ${singer}`,
43
+ description: art(path.join(__dirname, '../templates/music/playlist.art'), {
44
+ singer,
45
+ album: thisSong.album.name,
46
+ date: new Date(thisSong.album.publishTime).toLocaleDateString(),
47
+ picUrl: thisSong.album.picUrl,
48
+ }),
49
+ link: `https://music.163.com/#/song?id=${item.id}`,
50
+ pubDate: new Date(item.at),
51
+ author: singer,
52
+ };
53
+ }),
54
+ };
55
+ };
@@ -0,0 +1,52 @@
1
+ const path = require('path');
2
+ const got = require('@/utils/got');
3
+ const { art } = require('@/utils/render');
4
+ const renderDescription = (info) => art(path.join(__dirname, '../templates/music/userevents.art'), info);
5
+
6
+ module.exports = async (ctx) => {
7
+ const { id } = ctx.params;
8
+
9
+ const response = await got(`https://music.163.com/api/event/get/${id}`, {
10
+ headers: {
11
+ Referer: 'https://music.163.com/',
12
+ },
13
+ });
14
+
15
+ const { data } = response;
16
+ const { nickname, signature, avatarUrl } = data.events[0].user;
17
+
18
+ ctx.state.data = {
19
+ title: `${nickname}的云村动态`,
20
+ link: `https://music.163.com/#/user/event?id=${id}`,
21
+ description: `网易云音乐用户动态 - ${signature}`,
22
+ icon: avatarUrl,
23
+ image: avatarUrl,
24
+ item: data.events.map((item) => {
25
+ const title = item.info.commentThread.resourceTitle;
26
+ const userId = item.user.userId;
27
+ const description = JSON.parse(item.json).msg;
28
+ const pics = item.pics.map(({ originUrl }) => originUrl);
29
+ const eventId = item.id;
30
+
31
+ /**
32
+ * @todo 根据 `item.info.commentThread.resourceInfo.eventType` 生成 Media
33
+ * 17 分享节目
34
+ * 18 分享单曲
35
+ * 19 分享专辑
36
+ * 35 空
37
+ * 因为我不需要,我就不写了。
38
+ * 因为 api 并没有 mp3 URL,生成 `media` 字段会有困难。
39
+ */
40
+ return {
41
+ title,
42
+ description: renderDescription({ description, pics }),
43
+ link: `https://music.163.com/#/event?id=${eventId}&uid=${userId}`,
44
+ pubDate: new Date(item.eventTime),
45
+ published: new Date(item.eventTime),
46
+ author: nickname,
47
+ upvotes: item.info.likedCount,
48
+ comments: item.info.commentCount,
49
+ };
50
+ }),
51
+ };
52
+ };
@@ -1,11 +1,11 @@
1
1
  const got = require('@/utils/got');
2
+ const { art } = require('@/utils/render');
3
+ const path = require('path');
2
4
 
3
5
  module.exports = async (ctx) => {
4
6
  const uid = ctx.params.uid;
5
7
 
6
- const response = await got({
7
- method: 'post',
8
- url: 'http://music.163.com/api/user/playlist',
8
+ const response = await got.post('https://music.163.com/api/user/playlist', {
9
9
  headers: {
10
10
  Referer: 'https://music.163.com/',
11
11
  },
@@ -24,23 +24,21 @@ module.exports = async (ctx) => {
24
24
 
25
25
  ctx.state.data = {
26
26
  title: `${nickname} 的所有歌单`,
27
- link: `http://music.163.com/user/home?id=${uid}`,
27
+ link: `https://music.163.com/user/home?id=${uid}`,
28
28
  subtitle: signature,
29
29
  description: signature,
30
30
  author: nickname,
31
31
  updated: response.headers.date,
32
32
  icon: avatarUrl,
33
+ image: avatarUrl,
33
34
  item: playlist.map((pl) => {
34
- const image = `<img src=${pl.coverImgUrl} />`;
35
-
36
- const description = `<div>${(pl.description || '')
37
- .split('\n')
38
- .map((p) => `<p>${p}</p>`)
39
- .join('')}</div>`;
40
-
41
35
  const src = `http://music.163.com/playlist/${pl.id}`;
42
36
 
43
- const html = image + description + `<div><a href="${src}">查看歌单</a></div>`;
37
+ const html = art(path.join(__dirname, '../templates/music/userplaylist.art'), {
38
+ image: pl.coverImgUrl,
39
+ description: (pl.description || '').split('\n'),
40
+ src,
41
+ });
44
42
 
45
43
  return {
46
44
  title: pl.name,
@@ -1,5 +1,7 @@
1
1
  const got = require('@/utils/got');
2
2
  const config = require('@/config').value;
3
+ const { art } = require('@/utils/render');
4
+ const path = require('path');
3
5
 
4
6
  const headers = {
5
7
  cookie: config.ncm.cookies,
@@ -17,18 +19,14 @@ function getItem(records) {
17
19
 
18
20
  return records.map((record, index) => {
19
21
  const song = record.song;
20
- const album = song.al ? `<img src=${song.al.picUrl} />` : '';
21
-
22
- const artists = song.ar.map((a) => `<a href="https://music.163.com/artist?id=${a.id}">${a.name}</a>`).join(`/`);
23
22
 
24
23
  const artists_paintext = song.ar.map((a) => a.name).join('/');
25
24
 
26
- const html = `<div>
27
- 排行:${index + 1} 播放次数:${record.playCount} 得分:${record.score}<br>
28
- 歌曲:<a href="http://music.163.com/song?id=${song.id}">${song.name}</a><br>
29
- 歌手:${artists}<br>
30
- 歌曲图:${album}<br>
31
- </div>`;
25
+ const html = art(path.join(__dirname, '../templates/music/userplayrecords.art'), {
26
+ index,
27
+ record,
28
+ song,
29
+ });
32
30
 
33
31
  return {
34
32
  title: `[${index + 1}] ${song.name} - ${artists_paintext}`,
@@ -43,14 +41,14 @@ module.exports = async (ctx) => {
43
41
  const uid = ctx.params.uid;
44
42
  const type = parseInt(ctx.params.type) || 0;
45
43
 
46
- const url = `http://music.163.com/api/v1/play/record?uid=${uid}&type=${type}`;
47
- const response = await got({ url, headers });
44
+ const url = `https://music.163.com/api/v1/play/record?uid=${uid}&type=${type}`;
45
+ const response = await got(url, { headers });
48
46
 
49
47
  const records = type === 1 ? response.data.weekData : response.data.allData;
50
48
 
51
49
  ctx.state.data = {
52
- title: type === 1 ? `听歌榜单(最近一周)- ${uid}` : `听歌榜单(所有时间)- ${uid}`,
53
- link: `http://music.163.com/user/home?id=${uid}`,
50
+ title: `${type === 1 ? '听歌榜单(最近一周)' : '听歌榜单(所有时间}'} - ${uid}}`,
51
+ link: `https://music.163.com/user/home?id=${uid}`,
54
52
  updated: response.headers.date,
55
53
  item: getItem(records),
56
54
  };
@@ -3,7 +3,7 @@ const cheerio = require('cheerio');
3
3
  const iconv = require('iconv-lite');
4
4
  const { parseDate } = require('@/utils/parse-date');
5
5
 
6
- const rootUrl = 'http://news.163.com';
6
+ const rootUrl = 'https://news.163.com';
7
7
 
8
8
  const config = {
9
9
  whole: {
@@ -23,7 +23,7 @@ const config = {
23
23
  title: '体育',
24
24
  },
25
25
  money: {
26
- link: 'http://money.163.com/special/002526BH/rank.html',
26
+ link: 'https://money.163.com/special/002526BH/rank.html',
27
27
  title: '财经',
28
28
  },
29
29
  tech: {
@@ -99,21 +99,27 @@ module.exports = async (ctx) => {
99
99
  const list = $('div.tabContents')
100
100
  .eq(timeRange[time].index + (category === 'whole' ? (type === 'click' ? -1 : 2) : type === 'click' ? 0 : 2))
101
101
  .find('table tbody tr td a')
102
- .map((_, item) => {
102
+ .toArray()
103
+ .map((item) => {
103
104
  item = $(item);
104
105
 
105
106
  return {
106
107
  link: item.attr('href'),
107
108
  };
108
- })
109
- .get();
109
+ });
110
110
 
111
111
  const items = await Promise.all(
112
112
  list.map((item) =>
113
113
  ctx.cache.tryGet(item.link, async () => {
114
114
  try {
115
- const category = item.link.split('.163.com')[0].split('//').pop().split('.').pop();
116
- const link = `https://3g.163.com/${category}/article/${item.link.split('/').pop()}`;
115
+ let link;
116
+ if (category === 'auto' || category === 'house' || category === 'travel') {
117
+ const category = item.link.split('.163.com')[0].split('//').pop().split('.').pop();
118
+ link = `https://3g.163.com/${category}/article/${item.link.split('/').pop()}`;
119
+ } else {
120
+ const pathname = new URL(item.link).pathname;
121
+ link = `https://3g.163.com${pathname}`;
122
+ }
117
123
 
118
124
  const detailResponse = await got({
119
125
  method: 'get',
@@ -121,16 +127,19 @@ module.exports = async (ctx) => {
121
127
  });
122
128
  const content = cheerio.load(detailResponse.data);
123
129
 
124
- content('.bot_word').remove();
130
+ content('.bot_word, .js-open-app, .s-img').remove();
125
131
  content('video').each(function () {
126
132
  content(this).attr('src', content(this).attr('data-src'));
127
133
  });
134
+ content('.article-body .image-lazy').each((_, elem) => {
135
+ elem.attribs.src = elem.attribs['data-src'] ? elem.attribs['data-src'] : elem.attribs.src;
136
+ });
128
137
 
129
138
  item.title = content('meta[property="og:title"]').attr('content').replace('_手机网易网', '');
130
139
  item.pubDate = parseDate(content('meta[property="og:release_date"]').attr('content'));
131
- item.description = content('.content').html();
140
+ item.description = content('.article-body').html();
132
141
  } catch (err) {
133
- return Promise.resolve('');
142
+ return '';
134
143
  }
135
144
 
136
145
  return item;
@@ -138,17 +147,9 @@ module.exports = async (ctx) => {
138
147
  )
139
148
  );
140
149
 
141
- for (let i = 0; i < items.length; i++) {
142
- if (items[i] === undefined) {
143
- items.splice(i, 1);
144
- } else if (items[i].title === undefined) {
145
- items.splice(i, 1);
146
- }
147
- }
148
-
149
150
  ctx.state.data = {
150
151
  title: `网易新闻${timeRange[time].title}${type === 'click' ? '点击' : '跟帖'}榜 - ${cfg.title}`,
151
152
  link: currentUrl,
152
- item: items,
153
+ item: items.filter((item) => item),
153
154
  };
154
155
  };
@@ -1,5 +1,5 @@
1
1
  const got = require('@/utils/got');
2
- const date = require('@/utils/date');
2
+ const { parseDate } = require('@/utils/parse-date');
3
3
  const cheerio = require('cheerio');
4
4
  const typeMap = {
5
5
  1: '轻松一刻',
@@ -73,8 +73,8 @@ module.exports = async (ctx) => {
73
73
  default:
74
74
  break;
75
75
  }
76
- const url = `https://3g.163.com/touch/reconstruct/article/list/${type}/0-10.html`;
77
- const response = await got.get(url);
76
+ const url = `https://3g.163.com/touch/reconstruct/article/list/${type}/0-20.html`;
77
+ const response = await got(url);
78
78
  const data = response.data;
79
79
  const matches = data.replace(/\s/g, '').match(/artiList\((.*?)\]\}\)/);
80
80
  const articlelist0 = matches[1].replace(/".*?wangning/, '"articles') + ']}';
@@ -82,11 +82,8 @@ module.exports = async (ctx) => {
82
82
  const articles = articlelist.articles;
83
83
 
84
84
  const items = await Promise.all(
85
- articles.map(async (article) => {
86
- const title = article.title;
85
+ articles.map((article) => {
87
86
  let url = article.url;
88
- const time0 = article.ptime;
89
- const time = time0.slice(0, 10) + ' ' + time0.slice(10);
90
87
  if (url === null || article.skipType === 'video') {
91
88
  const skipurl = article.skipURL;
92
89
  const vid = skipurl.match(/vid=(.*?)$/);
@@ -94,20 +91,16 @@ module.exports = async (ctx) => {
94
91
  url = `https://3g.163.com/exclusive/video/${vid[1]}.html`;
95
92
  }
96
93
  }
97
- const content = await ctx.cache.tryGet(url, async () => {
98
- const article_response = await got.get(url);
94
+ return ctx.cache.tryGet(url, async () => {
95
+ const article_response = await got(url);
99
96
  const $ = cheerio.load(article_response.data);
100
97
 
101
- return $('div[class="content"]').html() ? $('div[class="content"]').html() : $('div[class="video"]').html();
102
- });
98
+ article.link = url;
99
+ article.description = $('.article-body').html() ? $('.article-body').html() : $('div[class="video"]').html();
100
+ article.pubDate = parseDate(article.ptime);
103
101
 
104
- const list = {
105
- title,
106
- link: url,
107
- description: content,
108
- pubDate: date(time),
109
- };
110
- return Promise.resolve(list);
102
+ return article;
103
+ });
111
104
  })
112
105
  );
113
106
 
@@ -0,0 +1,63 @@
1
+ const got = require('@/utils/got');
2
+ const cheerio = require('cheerio');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+
7
+ module.exports = async (ctx) => {
8
+ const url = 'https://vip.open.163.com';
9
+
10
+ const list_response = await got(url);
11
+ const $ = cheerio.load(list_response.data);
12
+ const initialState = JSON.parse(
13
+ $('script')
14
+ .text()
15
+ .match(/window\.__INITIAL_STATE__=(.*);\(function\(\)\{var/)[1]
16
+ );
17
+
18
+ const list = Object.values(initialState.courseindex.myModules).flatMap((mod) =>
19
+ mod.contents.map((item) => ({
20
+ title: `${item.title} - ${item.subtitle}`,
21
+ author: item.authorName,
22
+ pubDate: parseDate(item.publishTime, 'x'),
23
+ link: `${url}/courses/${item.courseUid}/`,
24
+ courseUid: item.courseUid,
25
+ category: mod.name,
26
+ }))
27
+ );
28
+
29
+ const items = await Promise.all(
30
+ list.map((item) =>
31
+ ctx.cache.tryGet(item.link, async () => {
32
+ const {
33
+ data: { data },
34
+ } = await got.post(`${url}/open/trade/pc/course/getCourseInfo.do`, {
35
+ form: {
36
+ courseUid: item.courseUid,
37
+ version: 1,
38
+ },
39
+ });
40
+
41
+ const $ = cheerio.load(data.courseInfo.description, null, false);
42
+ $('img').each((_, img) => {
43
+ img.attribs.src = img.attribs.src.split('?')[0];
44
+ delete img.attribs.width;
45
+ });
46
+
47
+ item.category = [item.category, data.courseInfo.firstClassifyName, data.courseInfo.secondClassifyName];
48
+ item.description = art(path.join(__dirname, '../templates/open.art'), {
49
+ data,
50
+ description: $.html(),
51
+ });
52
+
53
+ return item;
54
+ })
55
+ )
56
+ );
57
+
58
+ ctx.state.data = {
59
+ title: '网易公开课 - 精品课程',
60
+ link: url,
61
+ item: items,
62
+ };
63
+ };