rsshub 1.0.0-master.f7add90 → 1.0.0-master.f7bfacc

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 (474) hide show
  1. package/README.md +0 -8
  2. package/lib/app.js +2 -0
  3. package/lib/config.js +17 -1
  4. package/lib/middleware/cache/memory.js +2 -2
  5. package/lib/middleware/template.js +14 -1
  6. package/lib/radar-rules.js +0 -76
  7. package/lib/radar.js +22 -3
  8. package/lib/router.js +27 -30
  9. package/lib/routes/axis-studios/work.js +0 -0
  10. package/lib/routes/blow-studio/work.js +0 -0
  11. package/lib/routes/blur-studio/index.js +0 -0
  12. package/lib/routes/digic-pictures/index.js +0 -0
  13. package/lib/routes/gov/hunan/notice.js +1 -1
  14. package/lib/routes/method-studios/index.js +0 -0
  15. package/lib/routes/ps/product.js +0 -0
  16. package/lib/routes/unit-image/films.js +0 -0
  17. package/lib/static/logo.png +0 -0
  18. package/lib/utils/puppeteer.js +2 -2
  19. package/lib/utils/request-wrapper.js +2 -2
  20. package/lib/v2/141jav/index.js +71 -0
  21. package/lib/v2/141jav/maintainer.js +3 -0
  22. package/lib/v2/141jav/radar.js +40 -0
  23. package/lib/v2/141jav/router.js +3 -0
  24. package/lib/v2/141jav/templates/description.art +47 -0
  25. package/lib/v2/141ppv/index.js +71 -0
  26. package/lib/v2/141ppv/maintainer.js +3 -0
  27. package/lib/v2/141ppv/radar.js +40 -0
  28. package/lib/v2/141ppv/router.js +3 -0
  29. package/lib/v2/141ppv/templates/description.art +47 -0
  30. package/lib/v2/3dmgame/game.js +39 -0
  31. package/lib/v2/3dmgame/maintainer.js +4 -0
  32. package/lib/v2/3dmgame/news_center.js +42 -0
  33. package/lib/v2/3dmgame/radar.js +19 -0
  34. package/lib/v2/3dmgame/router.js +4 -0
  35. package/lib/v2/3dmgame/utils.js +30 -0
  36. package/lib/v2/4ksj/forum.js +128 -0
  37. package/lib/v2/4ksj/maintainer.js +3 -0
  38. package/lib/v2/4ksj/radar.js +13 -0
  39. package/lib/v2/4ksj/router.js +3 -0
  40. package/lib/v2/4ksj/templates/description.art +56 -0
  41. package/lib/v2/5eplay/index.js +100 -0
  42. package/lib/v2/5eplay/maintainer.js +3 -0
  43. package/lib/v2/5eplay/radar.js +13 -0
  44. package/lib/v2/5eplay/router.js +3 -0
  45. package/lib/v2/5eplay/utils.js +35 -0
  46. package/lib/v2/aeon/category.js +27 -0
  47. package/lib/v2/aeon/maintainer.js +4 -0
  48. package/lib/v2/aeon/radar.js +19 -0
  49. package/lib/v2/aeon/router.js +4 -0
  50. package/lib/v2/aeon/templates/essay.art +3 -0
  51. package/lib/v2/aeon/templates/video.art +10 -0
  52. package/lib/v2/aeon/type.js +29 -0
  53. package/lib/v2/aeon/utils.js +50 -0
  54. package/lib/v2/aisixiang/column.js +36 -0
  55. package/lib/v2/aisixiang/maintainer.js +6 -0
  56. package/lib/v2/aisixiang/radar.js +29 -0
  57. package/lib/v2/aisixiang/router.js +6 -0
  58. package/lib/v2/aisixiang/thinktank.js +49 -0
  59. package/lib/v2/aisixiang/toplist.js +37 -0
  60. package/lib/v2/aisixiang/utils.js +37 -0
  61. package/lib/v2/aliresearch/information.js +57 -0
  62. package/lib/v2/aliresearch/maintainer.js +3 -0
  63. package/lib/v2/aliresearch/radar.js +13 -0
  64. package/lib/v2/aliresearch/router.js +3 -0
  65. package/lib/v2/amazon/kindle-software-updates.js +1 -0
  66. package/lib/v2/atcoder/radar.js +1 -1
  67. package/lib/v2/bad/index.js +58 -0
  68. package/lib/v2/bad/maintainer.js +3 -0
  69. package/lib/v2/bad/radar.js +13 -0
  70. package/lib/v2/bad/router.js +3 -0
  71. package/lib/v2/baozimh/index.js +1 -1
  72. package/lib/v2/bilibili/cache.js +17 -5
  73. package/lib/v2/bilibili/hotSearch.js +5 -1
  74. package/lib/v2/bilibili/userChannel.js +2 -1
  75. package/lib/v2/bilibili/userCollection.js +3 -1
  76. package/lib/v2/bilibili/utils.js +3 -3
  77. package/lib/v2/bilibili/video-all.js +7 -2
  78. package/lib/v2/bilibili/video.js +1 -1
  79. package/lib/v2/bilibili/vsearch.js +1 -1
  80. package/lib/v2/bjsk/keti.js +54 -0
  81. package/lib/v2/bjsk/maintainer.js +1 -0
  82. package/lib/v2/bjsk/radar.js +8 -0
  83. package/lib/v2/bjsk/router.js +1 -0
  84. package/lib/v2/bmkg/earthquake.js +29 -0
  85. package/lib/v2/bmkg/maintainer.js +4 -0
  86. package/lib/v2/bmkg/news.js +42 -0
  87. package/lib/v2/bmkg/radar.js +19 -0
  88. package/lib/v2/bmkg/router.js +4 -0
  89. package/lib/v2/chinathinktanks/radar.js +1 -1
  90. package/lib/v2/cls/depth.js +34 -32
  91. package/lib/v2/cls/hot.js +38 -29
  92. package/lib/v2/cls/maintainer.js +1 -1
  93. package/lib/v2/cls/radar.js +1 -1
  94. package/lib/v2/cls/telegraph.js +25 -23
  95. package/lib/v2/cls/templates/depth.art +3 -3
  96. package/lib/v2/cls/templates/telegraph.art +5 -5
  97. package/lib/v2/cls/utils.js +12 -6
  98. package/lib/v2/cneb/maintainer.js +4 -0
  99. package/lib/v2/cneb/radar.js +19 -0
  100. package/lib/v2/cneb/router.js +5 -0
  101. package/lib/v2/cneb/yjxw.js +72 -0
  102. package/lib/v2/cneb/yjxx.js +50 -0
  103. package/lib/v2/cnki/author.js +38 -26
  104. package/lib/v2/cnki/maintainer.js +1 -1
  105. package/lib/v2/comicat/maintainer.js +3 -0
  106. package/lib/v2/comicat/radar.js +11 -0
  107. package/lib/v2/comicat/router.js +3 -0
  108. package/lib/v2/comicat/search.js +42 -0
  109. package/lib/v2/coomer/utils.js +3 -1
  110. package/lib/v2/cqgas/maintainer.js +3 -0
  111. package/lib/v2/cqgas/radar.js +13 -0
  112. package/lib/v2/cqgas/router.js +3 -0
  113. package/lib/v2/cqgas/tqtz.js +36 -0
  114. package/lib/v2/cssn/iolaw.js +38 -0
  115. package/lib/v2/cssn/maintainer.js +3 -0
  116. package/lib/v2/cssn/radar.js +11 -0
  117. package/lib/v2/cssn/router.js +3 -0
  118. package/lib/v2/daily/discussed.js +73 -0
  119. package/lib/v2/daily/index.js +83 -0
  120. package/lib/v2/daily/maintainer.js +5 -0
  121. package/lib/v2/daily/radar.js +25 -0
  122. package/lib/v2/daily/router.js +5 -0
  123. package/lib/v2/daily/upvoted.js +77 -0
  124. package/lib/v2/daily/utils.js +39 -0
  125. package/lib/v2/dblp/maintainer.js +3 -0
  126. package/lib/v2/dblp/publication.js +70 -0
  127. package/lib/v2/dblp/radar.js +13 -0
  128. package/lib/v2/dblp/router.js +3 -0
  129. package/lib/v2/deadline/maintainer.js +4 -0
  130. package/lib/v2/deadline/posts.js +53 -0
  131. package/lib/v2/deadline/radar.js +13 -0
  132. package/lib/v2/deadline/router.js +3 -0
  133. package/lib/v2/deadline/templates/desc.art +10 -0
  134. package/lib/v2/devolverdigital/blog.js +50 -0
  135. package/lib/v2/devolverdigital/maintainer.js +3 -0
  136. package/lib/v2/devolverdigital/radar.js +13 -0
  137. package/lib/v2/devolverdigital/router.js +3 -0
  138. package/lib/v2/dhu/maintainer.js +1 -0
  139. package/lib/v2/dhu/radar.js +6 -0
  140. package/lib/v2/dhu/router.js +1 -0
  141. package/lib/v2/dhu/yjs/zs.js +46 -0
  142. package/lib/v2/discord/channel.js +8 -8
  143. package/lib/v2/discord/maintainer.js +1 -1
  144. package/lib/v2/discord/radar.js +2 -2
  145. package/lib/v2/discord/router.js +1 -1
  146. package/lib/v2/domp4/detail.js +26 -0
  147. package/lib/v2/dorohedoro/maintainer.js +3 -0
  148. package/lib/v2/dorohedoro/news.js +69 -0
  149. package/lib/v2/dorohedoro/radar.js +13 -0
  150. package/lib/v2/dorohedoro/router.js +3 -0
  151. package/lib/v2/duozhuayu/maintainer.js +3 -0
  152. package/lib/v2/duozhuayu/radar.js +13 -0
  153. package/lib/v2/duozhuayu/router.js +3 -0
  154. package/lib/{routes → v2}/duozhuayu/search.js +23 -32
  155. package/lib/v2/duozhuayu/templates/book.art +10 -0
  156. package/lib/v2/dxy/maintainer.js +4 -0
  157. package/lib/v2/dxy/profile/thread.js +82 -0
  158. package/lib/v2/dxy/radar.js +21 -0
  159. package/lib/v2/dxy/router.js +4 -0
  160. package/lib/v2/dxy/special.js +79 -0
  161. package/lib/v2/dxy/utils.js +72 -0
  162. package/lib/v2/eastmoney/maintainer.js +1 -0
  163. package/lib/v2/eastmoney/radar.js +8 -0
  164. package/lib/v2/eastmoney/report/index.js +41 -0
  165. package/lib/v2/eastmoney/router.js +2 -1
  166. package/lib/v2/embassy/radar.js +1 -1
  167. package/lib/v2/embassy/supportedList.js +4 -4
  168. package/lib/v2/firecore/index.js +37 -0
  169. package/lib/v2/firecore/maintainer.js +3 -0
  170. package/lib/v2/firecore/radar.js +13 -0
  171. package/lib/v2/firecore/router.js +3 -0
  172. package/lib/v2/flyert/creditcard.js +3 -0
  173. package/lib/v2/flyert/utils.js +14 -8
  174. package/lib/v2/followin/index.js +35 -0
  175. package/lib/v2/followin/kol.js +25 -0
  176. package/lib/v2/followin/maintainer.js +7 -0
  177. package/lib/v2/followin/news.js +21 -0
  178. package/lib/v2/followin/radar.js +37 -0
  179. package/lib/v2/followin/router.js +7 -0
  180. package/lib/v2/followin/tag.js +44 -0
  181. package/lib/v2/followin/templates/thread.art +15 -0
  182. package/lib/v2/followin/topic.js +25 -0
  183. package/lib/v2/followin/utils.js +84 -0
  184. package/lib/v2/freebuf/index.js +41 -0
  185. package/lib/v2/freebuf/maintainer.js +3 -0
  186. package/lib/v2/freebuf/radar.js +13 -0
  187. package/lib/v2/freebuf/router.js +3 -0
  188. package/lib/v2/freecomputerbooks/index.js +41 -13
  189. package/lib/v2/freecomputerbooks/templates/desc.art +3 -0
  190. package/lib/v2/futunn/main.js +67 -0
  191. package/lib/v2/futunn/maintainer.js +3 -0
  192. package/lib/v2/futunn/radar.js +13 -0
  193. package/lib/v2/futunn/router.js +5 -0
  194. package/lib/v2/futunn/templates/description.art +6 -0
  195. package/lib/v2/fzmtr/announcements.js +38 -0
  196. package/lib/v2/fzmtr/maintainer.js +3 -0
  197. package/lib/v2/fzmtr/radar.js +11 -0
  198. package/lib/v2/fzmtr/router.js +3 -0
  199. package/lib/v2/github/gist.js +35 -0
  200. package/lib/v2/github/maintainer.js +1 -0
  201. package/lib/v2/github/radar.js +8 -0
  202. package/lib/v2/github/router.js +1 -0
  203. package/lib/v2/gov/cac/index.js +64 -0
  204. package/lib/v2/gov/ccdi/index.js +1 -1
  205. package/lib/v2/gov/ccdi/utils.js +1 -1
  206. package/lib/v2/gov/chongqing/rsks.js +38 -0
  207. package/lib/v2/gov/maintainer.js +2 -0
  208. package/lib/v2/gov/news/index.js +10 -5
  209. package/lib/v2/gov/radar.js +23 -1
  210. package/lib/v2/gov/router.js +2 -0
  211. package/lib/v2/gq/tw/index.js +1 -1
  212. package/lib/v2/guangzhoumetro/maintainer.js +3 -0
  213. package/lib/v2/guangzhoumetro/news.js +37 -0
  214. package/lib/v2/guangzhoumetro/radar.js +11 -0
  215. package/lib/v2/guangzhoumetro/router.js +3 -0
  216. package/lib/v2/hnu/careers.js +33 -0
  217. package/lib/v2/hnu/maintainer.js +3 -0
  218. package/lib/v2/hnu/radar.js +12 -0
  219. package/lib/v2/hnu/router.js +3 -0
  220. package/lib/v2/hust/aia/news.js +0 -0
  221. package/lib/v2/hust/aia/notice.js +0 -0
  222. package/lib/v2/i-cable/category.js +74 -0
  223. package/lib/v2/i-cable/maintainer.js +3 -0
  224. package/lib/v2/i-cable/radar.js +13 -0
  225. package/lib/v2/i-cable/router.js +3 -0
  226. package/lib/v2/i-cable/templates/desc.art +8 -0
  227. package/lib/v2/ibc/maintainer.js +4 -0
  228. package/lib/{routes/maitta/index.js → v2/ibc/maitta.js} +11 -8
  229. package/lib/v2/ibc/radar.js +19 -0
  230. package/lib/v2/ibc/radio.js +73 -0
  231. package/lib/v2/ibc/router.js +4 -0
  232. package/lib/v2/ibc/templates/description.art +6 -0
  233. package/lib/v2/instructables/projects.js +1 -1
  234. package/lib/v2/ithome/radar.js +3 -3
  235. package/lib/v2/iwara/index.js +36 -24
  236. package/lib/v2/iwara/radar.js +1 -1
  237. package/lib/v2/iwara/subscriptions.js +131 -32
  238. package/lib/v2/iwara/templates/subscriptions.art +1 -1
  239. package/lib/v2/line/publisher.js +1 -1
  240. package/lib/v2/mdpi/maintainer.js +0 -0
  241. package/lib/v2/mdpi/radar.js +0 -0
  242. package/lib/v2/mdpi/router.js +0 -0
  243. package/lib/v2/mdpi/templates/description.art +0 -0
  244. package/lib/v2/medium/following.js +31 -0
  245. package/lib/v2/medium/for-you.js +31 -0
  246. package/lib/v2/medium/graphql.js +190 -0
  247. package/lib/v2/medium/list.js +32 -0
  248. package/lib/v2/medium/maintainer.js +6 -0
  249. package/lib/v2/medium/parse-article.js +60 -0
  250. package/lib/v2/medium/radar.js +23 -0
  251. package/lib/v2/medium/router.js +6 -0
  252. package/lib/v2/medium/tag.js +32 -0
  253. package/lib/v2/mihoyo/maintainer.js +1 -0
  254. package/lib/v2/mihoyo/radar.js +16 -0
  255. package/lib/v2/mihoyo/router.js +1 -0
  256. package/lib/v2/mihoyo/sr/news.js +71 -0
  257. package/lib/v2/mihoyo/templates/ys.art +4 -0
  258. package/lib/v2/mihoyo/ys/news.js +132 -52
  259. package/lib/v2/nationalgeographic/latest-stories.js +56 -0
  260. package/lib/v2/nationalgeographic/maintainer.js +3 -0
  261. package/lib/v2/nationalgeographic/radar.js +13 -0
  262. package/lib/v2/nationalgeographic/router.js +3 -0
  263. package/lib/v2/nationalgeographic/templates/stories.art +44 -0
  264. package/lib/v2/nenu/maintainer.js +4 -0
  265. package/lib/v2/nenu/radar.js +21 -0
  266. package/lib/v2/nenu/router.js +4 -0
  267. package/lib/v2/nenu/sohac.js +60 -0
  268. package/lib/v2/nenu/yjsy.js +64 -0
  269. package/lib/v2/newzmz/index.js +55 -44
  270. package/lib/v2/newzmz/maintainer.js +1 -1
  271. package/lib/v2/newzmz/radar.js +1 -1
  272. package/lib/v2/newzmz/router.js +2 -1
  273. package/lib/v2/newzmz/templates/description.art +7 -0
  274. package/lib/v2/newzmz/view.js +32 -17
  275. package/lib/v2/nhentai/util.js +2 -1
  276. package/lib/v2/nikkei/cn/index.js +2 -2
  277. package/lib/v2/nju/zcc.js +7 -13
  278. package/lib/v2/notateslaapp/maintainer.js +3 -0
  279. package/lib/v2/notateslaapp/radar.js +13 -0
  280. package/lib/v2/notateslaapp/router.js +3 -0
  281. package/lib/{routes/tesla → v2/notateslaapp}/update.js +6 -12
  282. package/lib/v2/notefolio/maintainer.js +3 -0
  283. package/lib/v2/notefolio/radar.js +13 -0
  284. package/lib/v2/notefolio/router.js +3 -0
  285. package/lib/v2/notefolio/search.js +145 -0
  286. package/lib/v2/notefolio/templates/search.art +9 -0
  287. package/lib/v2/notion/database.js +161 -0
  288. package/lib/v2/notion/maintainer.js +3 -0
  289. package/lib/v2/notion/radar.js +13 -0
  290. package/lib/v2/notion/router.js +3 -0
  291. package/lib/v2/nytimes/author.js +1 -1
  292. package/lib/v2/oeeee/app/channel.js +36 -0
  293. package/lib/v2/oeeee/app/reporter.js +30 -0
  294. package/lib/v2/oeeee/maintainer.js +5 -0
  295. package/lib/v2/oeeee/radar.js +12 -0
  296. package/lib/v2/oeeee/router.js +5 -0
  297. package/lib/v2/oeeee/templates/description.art +7 -0
  298. package/lib/v2/oeeee/utils.js +41 -0
  299. package/lib/v2/oeeee/web.js +36 -0
  300. package/lib/v2/openai/blog.js +3 -56
  301. package/lib/v2/openai/common.js +72 -0
  302. package/lib/v2/openai/maintainer.js +1 -0
  303. package/lib/v2/openai/radar.js +8 -0
  304. package/lib/v2/openai/research.js +32 -0
  305. package/lib/v2/openai/router.js +1 -0
  306. package/lib/v2/pumc/maintainer.js +3 -0
  307. package/lib/v2/pumc/mdadmission.js +62 -0
  308. package/lib/v2/pumc/radar.js +13 -0
  309. package/lib/v2/pumc/router.js +3 -0
  310. package/lib/v2/rattibha/maintainer.js +3 -0
  311. package/lib/v2/rattibha/radar.js +13 -0
  312. package/lib/v2/rattibha/router.js +3 -0
  313. package/lib/v2/rattibha/user.js +45 -0
  314. package/lib/v2/readhub/index.js +1 -1
  315. package/lib/{routes → v2}/right/forum.js +21 -23
  316. package/lib/v2/right/maintainer.js +3 -0
  317. package/lib/v2/right/radar.js +13 -0
  318. package/lib/v2/right/router.js +3 -0
  319. package/lib/v2/rsshub/radar.js +2 -2
  320. package/lib/v2/sdust/maintainer.js +3 -0
  321. package/lib/v2/sdust/radar.js +13 -0
  322. package/lib/v2/sdust/router.js +3 -0
  323. package/lib/v2/sdust/yjsy/zhaosheng.js +52 -0
  324. package/lib/v2/sehuatang/maintainer.js +1 -0
  325. package/lib/v2/sehuatang/router.js +1 -0
  326. package/lib/v2/sehuatang/user.js +113 -0
  327. package/lib/v2/shiep/config.js +64 -0
  328. package/lib/v2/shiep/index.js +13 -34
  329. package/lib/v2/shiep/radar.js +303 -15
  330. package/lib/v2/shuiguopai/index.js +1 -1
  331. package/lib/v2/sina/chuangshiji.js +17 -0
  332. package/lib/v2/sina/discovery.js +32 -0
  333. package/lib/v2/sina/finance/china.js +25 -0
  334. package/lib/v2/sina/finance/stock/usstock.js +37 -0
  335. package/lib/v2/sina/maintainer.js +8 -0
  336. package/lib/v2/sina/radar.js +49 -0
  337. package/lib/v2/sina/rollnews.js +31 -0
  338. package/lib/v2/sina/router.js +8 -0
  339. package/lib/v2/sina/sports.js +43 -0
  340. package/lib/v2/sina/templates/slide.art +3 -0
  341. package/lib/v2/sina/templates/video.art +5 -0
  342. package/lib/v2/sina/utils.js +104 -0
  343. package/lib/v2/sony/downloads.js +1 -0
  344. package/lib/v2/springer/maintainer.js +0 -0
  345. package/lib/v2/springer/radar.js +0 -0
  346. package/lib/v2/springer/router.js +0 -0
  347. package/lib/v2/springer/templates/description.art +0 -0
  348. package/lib/v2/sspai/radar.js +1 -1
  349. package/lib/v2/stbu/jsjxy.js +51 -0
  350. package/lib/v2/stbu/maintainer.js +4 -0
  351. package/lib/v2/stbu/radar.js +21 -0
  352. package/lib/v2/stbu/router.js +4 -0
  353. package/lib/v2/stbu/xyxw.js +52 -0
  354. package/lib/v2/storyfm/episodes.js +63 -0
  355. package/lib/v2/storyfm/maintainer.js +4 -0
  356. package/lib/v2/storyfm/radar.js +19 -0
  357. package/lib/v2/storyfm/router.js +4 -0
  358. package/lib/v2/storyfm/templates/description.art +6 -0
  359. package/lib/v2/sysu/maintainer.js +1 -0
  360. package/lib/v2/sysu/radar.js +8 -0
  361. package/lib/v2/sysu/router.js +1 -0
  362. package/lib/v2/sysu/ygafz.js +69 -0
  363. package/lib/v2/techpowerup/index.js +69 -0
  364. package/lib/v2/techpowerup/maintainer.js +5 -0
  365. package/lib/v2/techpowerup/radar.js +19 -0
  366. package/lib/v2/techpowerup/review.js +69 -0
  367. package/lib/v2/techpowerup/router.js +4 -0
  368. package/lib/v2/techpowerup/utils.js +84 -0
  369. package/lib/v2/telecompaper/maintainer.js +4 -0
  370. package/lib/{routes → v2}/telecompaper/news.js +1 -0
  371. package/lib/v2/telecompaper/radar.js +15 -0
  372. package/lib/v2/telecompaper/router.js +4 -0
  373. package/lib/v2/tencent/news/author.js +12 -8
  374. package/lib/v2/tiktok/user.js +5 -5
  375. package/lib/v2/tingshuitz/maintainer.js +1 -0
  376. package/lib/v2/tingshuitz/radar.js +11 -0
  377. package/lib/v2/tingshuitz/router.js +1 -0
  378. package/lib/v2/tingshuitz/shenzhen.js +29 -0
  379. package/lib/v2/tingshuitz/templates/shenzhen.art +8 -0
  380. package/lib/v2/tingtingfm/maintainer.js +3 -0
  381. package/lib/v2/tingtingfm/program.js +104 -0
  382. package/lib/v2/tingtingfm/radar.js +13 -0
  383. package/lib/v2/tingtingfm/router.js +3 -0
  384. package/lib/v2/tingtingfm/templates/audio.art +5 -0
  385. package/lib/v2/tingtingfm/utils.js +32 -0
  386. package/lib/v2/twitter/maintainer.js +1 -0
  387. package/lib/v2/twitter/radar.js +10 -0
  388. package/lib/v2/twitter/router.js +1 -0
  389. package/lib/v2/twitter/tweet.js +5 -0
  390. package/lib/v2/twitter/web-api/tweet.js +25 -0
  391. package/lib/v2/twitter/web-api/twitter-api.js +41 -2
  392. package/lib/v2/ustb/maintainer.js +2 -22
  393. package/lib/v2/ustb/radar.js +8 -0
  394. package/lib/v2/ustb/router.js +1 -0
  395. package/lib/{routes/universities → v2}/ustb/tj/news.js +11 -12
  396. package/lib/v2/utgd/category.js +68 -0
  397. package/lib/v2/utgd/maintainer.js +5 -0
  398. package/lib/v2/utgd/radar.js +25 -0
  399. package/lib/v2/utgd/router.js +5 -0
  400. package/lib/v2/utgd/templates/description.art +7 -0
  401. package/lib/v2/utgd/timeline.js +54 -0
  402. package/lib/v2/utgd/topic.js +70 -0
  403. package/lib/v2/v1tx/index.js +41 -22
  404. package/lib/v2/wechat/feeddd.js +12 -3
  405. package/lib/v2/wechat/mp.js +0 -0
  406. package/lib/v2/wechat/radar.js +2 -2
  407. package/lib/v2/weibo/group.js +93 -0
  408. package/lib/v2/weibo/keyword.js +1 -10
  409. package/lib/v2/weibo/maintainer.js +4 -3
  410. package/lib/v2/weibo/router.js +1 -0
  411. package/lib/v2/weibo/super_index.js +1 -10
  412. package/lib/v2/weibo/timeline.js +5 -5
  413. package/lib/v2/weibo/user.js +2 -8
  414. package/lib/v2/weibo/utils.js +15 -3
  415. package/lib/v2/winstall/maintainer.js +3 -0
  416. package/lib/v2/winstall/radar.js +13 -0
  417. package/lib/v2/winstall/router.js +3 -0
  418. package/lib/v2/winstall/templates/desc.art +5 -0
  419. package/lib/v2/winstall/update.js +43 -0
  420. package/lib/v2/wnacg/index.js +1 -1
  421. package/lib/v2/wnacg/templates/manga.art +4 -4
  422. package/lib/v2/wtu/index.js +37 -0
  423. package/lib/v2/wtu/job.js +80 -0
  424. package/lib/v2/wtu/maintainer.js +4 -0
  425. package/lib/v2/wtu/radar.js +22 -0
  426. package/lib/v2/wtu/router.js +4 -0
  427. package/lib/v2/xiaohongshu/maintainer.js +1 -1
  428. package/lib/v2/xiaohongshu/notes.js +16 -0
  429. package/lib/v2/xiaohongshu/router.js +1 -0
  430. package/lib/v2/xiaohongshu/util.js +122 -0
  431. package/lib/v2/yomiuri/maintainer.js +1 -1
  432. package/lib/v2/yomiuri/news.js +50 -100
  433. package/lib/v2/yomiuri/radar.js +3 -3
  434. package/lib/v2/youtube/user.js +1 -1
  435. package/lib/v2/zcool/radar.js +6 -6
  436. package/lib/v2/zhihu/answers.js +13 -9
  437. package/lib/v2/zhihu/radar.js +2 -2
  438. package/lib/v2/zhubai/maintainer.js +1 -0
  439. package/lib/v2/zhubai/radar.js +7 -0
  440. package/lib/v2/zhubai/router.js +1 -0
  441. package/lib/v2/zhubai/templates/description.art +31 -0
  442. package/lib/v2/zhubai/top20.js +57 -0
  443. package/lib/v2/zju/radar.js +1 -1
  444. package/lib/v2/zyw/hot.js +63 -0
  445. package/lib/v2/zyw/maintainer.js +3 -0
  446. package/lib/v2/zyw/radar.js +16 -0
  447. package/lib/v2/zyw/router.js +3 -0
  448. package/lib/views/error.art +7 -3
  449. package/lib/views/rss.art +1 -1
  450. package/lib/views/welcome.art +2 -2
  451. package/package.json +115 -124
  452. package/lib/routes/141jav/141jav.js +0 -37
  453. package/lib/routes/141ppv/141ppv.js +0 -37
  454. package/lib/routes/3dm/game.js +0 -42
  455. package/lib/routes/3dm/news_center.js +0 -54
  456. package/lib/routes/aeon/category.js +0 -70
  457. package/lib/routes/aisixiang/column.js +0 -37
  458. package/lib/routes/aisixiang/ranking.js +0 -37
  459. package/lib/routes/aisixiang/thinktank.js +0 -40
  460. package/lib/routes/aisixiang/utils.js +0 -39
  461. package/lib/routes/cneb/guoneinews.js +0 -27
  462. package/lib/routes/cneb/yjxx.js +0 -36
  463. package/lib/routes/futunn/highlights.js +0 -58
  464. package/lib/routes/icable/category.js +0 -64
  465. package/lib/routes/notefolio/index.js +0 -67
  466. package/lib/routes/rss3/blog.js +0 -46
  467. package/lib/routes/sina/chuangshiji.js +0 -38
  468. package/lib/routes/sina/discovery.js +0 -52
  469. package/lib/routes/sina/finance.js +0 -37
  470. package/lib/routes/sina/rollnews.js +0 -41
  471. package/lib/routes/sina/sports.js +0 -54
  472. package/lib/routes/universities/wtu/index.js +0 -34
  473. /package/lib/{routes → v2}/storyfm/index.js +0 -0
  474. /package/lib/{routes → v2}/telecompaper/search.js +0 -0
@@ -0,0 +1,25 @@
1
+ // const config = require('@/config').value;
2
+ const { getUser, getUserTweet } = require('./twitter-api');
3
+ const utils = require('../utils');
4
+ const { fallback, queryToBoolean } = require('@/utils/readable-social');
5
+ const config = require('@/config').value;
6
+
7
+ module.exports = async (ctx) => {
8
+ const id = ctx.params.id;
9
+ const status = ctx.params.status;
10
+ const routeParams = new URLSearchParams(ctx.params.original);
11
+ const original = fallback(undefined, queryToBoolean(routeParams.get('original')), false);
12
+ const params = { focalTweetId: status };
13
+ const userInfo = await getUser(ctx.cache, id);
14
+ const data = await getUserTweet(ctx.cache, id, params);
15
+ const profileImageUrl = userInfo.profile_image_url || userInfo.profile_image_url_https;
16
+ const item = original && config.isPackage ? data : utils.ProcessFeed(ctx, { data });
17
+
18
+ ctx.state.data = {
19
+ title: `Twitter @${userInfo.name}`,
20
+ link: `https://twitter.com/${id}/status/${status}`,
21
+ image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'),
22
+ description: userInfo.description,
23
+ item,
24
+ };
25
+ };
@@ -111,11 +111,47 @@ const timelineKeywords = (keywords, params = {}) =>
111
111
  pc: 1,
112
112
  });
113
113
 
114
+ // https://github.com/mikf/gallery-dl/blob/a53cfc845e12d9e98fefd07e43ebffaec488c18f/gallery_dl/extractor/twitter.py#L795-L805
115
+ const tweetDetail = (userId, params) =>
116
+ paginationTweets(
117
+ '/graphql/ItejhtHVxU7ksltgMmyaLA/TweetDetail',
118
+ userId,
119
+ {
120
+ ...params,
121
+ with_rux_injections: false,
122
+ withCommunity: true,
123
+ withQuickPromoteEligibilityTweetFields: false,
124
+ withBirdwatchNotes: false,
125
+ },
126
+ ['threaded_conversation_with_injections']
127
+ );
128
+
114
129
  function gatherLegacyFromData(entries, filter = 'tweet-') {
115
130
  const tweets = [];
131
+ const filte_entries = [];
116
132
  entries.forEach((entry) => {
117
- if (entry.entryId && entry.entryId.includes(filter)) {
118
- const tweet = entry.content.itemContent.tweet_results?.result;
133
+ const entryId = entry.entryId;
134
+ if (entryId) {
135
+ if (filter === 'none') {
136
+ if (entryId.startsWith('tweet-')) {
137
+ filte_entries.push(entry);
138
+ } else if (entryId.startsWith('homeConversation-') || entryId.startsWith('conversationthread-')) {
139
+ filte_entries.push(...entry.content.items);
140
+ }
141
+ } else {
142
+ if (entryId.startsWith(filter)) {
143
+ filte_entries.push(entry);
144
+ }
145
+ }
146
+ }
147
+ });
148
+ filte_entries.forEach((entry) => {
149
+ if (entry.entryId) {
150
+ const content = entry.content || entry.item;
151
+ let tweet = content?.itemContent?.tweet_results?.result;
152
+ if (tweet && tweet.tweet) {
153
+ tweet = tweet.tweet;
154
+ }
119
155
  if (tweet) {
120
156
  const retweet = tweet.legacy?.retweeted_status_result?.result;
121
157
  for (const t of [tweet, retweet]) {
@@ -175,6 +211,7 @@ const getUserTweetsByID = async (id, params = {}) => gatherLegacyFromData(await
175
211
  const getUserTweetsAndRepliesByID = async (id, params = {}) => gatherLegacyFromData(await timelineTweetsAndReplies(id, params));
176
212
  const getUserMediaByID = async (id, params = {}) => gatherLegacyFromData(await timelineMedia(id, params));
177
213
  const getUserLikesByID = async (id, params = {}) => gatherLegacyFromData(await timelineLikes(id, params));
214
+ const getUserTweetByStatus = async (id, params = {}) => gatherLegacyFromData(await tweetDetail(id, params), 'none');
178
215
 
179
216
  const excludeRetweet = function (tweets) {
180
217
  const excluded = [];
@@ -206,6 +243,7 @@ const getUserTweets = (cache, screenName, params = {}) => cacheTryGet(cache, scr
206
243
  const getUserTweetsAndReplies = (cache, screenName, params = {}) => cacheTryGet(cache, screenName, params, getUserTweetsAndRepliesByID);
207
244
  const getUserMedia = (cache, screenName, params = {}) => cacheTryGet(cache, screenName, params, getUserMediaByID);
208
245
  const getUserLikes = (cache, screenName, params = {}) => cacheTryGet(cache, screenName, params, getUserLikesByID);
246
+ const getUserTweet = (cache, screenName, params) => cacheTryGet(cache, screenName, params, getUserTweetByStatus);
209
247
 
210
248
  const getSearch = async (keywords, params = {}) => gatherLegacyFromLegacyApiData(await timelineKeywords(keywords, params), 'sq-I-t-');
211
249
 
@@ -217,4 +255,5 @@ module.exports = {
217
255
  getUserLikes,
218
256
  excludeRetweet,
219
257
  getSearch,
258
+ getUserTweet,
220
259
  };
@@ -1,25 +1,5 @@
1
1
  module.exports = {
2
- '/yjsy/news/adma': ['DA1Y1'],
3
- '/yjsy/news/all': ['DA1Y1'],
4
- '/yjsy/news/cicst': ['DA1Y1'],
5
- '/yjsy/news/cres': ['DA1Y1'],
6
- '/yjsy/news/huasheng': ['DA1Y1'],
7
- '/yjsy/news/iet': ['DA1Y1'],
8
- '/yjsy/news/ihmm': ['DA1Y1'],
9
- '/yjsy/news/marx': ['DA1Y1'],
10
- '/yjsy/news/me': ['DA1Y1'],
11
- '/yjsy/news/metall': ['DA1Y1'],
12
- '/yjsy/news/mse': ['DA1Y1'],
13
- '/yjsy/news/ncms': ['DA1Y1'],
14
- '/yjsy/news/saee': ['DA1Y1'],
15
- '/yjsy/news/scce': ['DA1Y1'],
16
- '/yjsy/news/sd': ['DA1Y1'],
17
- '/yjsy/news/seee': ['DA1Y1'],
18
- '/yjsy/news/sem': ['DA1Y1'],
19
- '/yjsy/news/sfs': ['DA1Y1'],
20
- '/yjsy/news/shuli': ['DA1Y1'],
21
- '/yjsy/news/skl': ['DA1Y1'],
22
- '/yjsy/news/slam': ['DA1Y1'],
23
- '/yjsy/news/wenfa': ['DA1Y1'],
2
+ '/tj/news/:type?': ['henbf'],
3
+ '/yjsy/news/:type': ['DA1Y1'],
24
4
  '/yzxc/tzgg': ['yanbot-team'],
25
5
  };
@@ -9,6 +9,14 @@ module.exports = {
9
9
  target: '/ustb/yjsy/news/:type',
10
10
  },
11
11
  ],
12
+ tj: [
13
+ {
14
+ title: '天津学院',
15
+ docs: 'https://docs.rsshub.app/university.html#bei-jing-ke-ji-da-xue',
16
+ source: ['/*'],
17
+ target: '/ustb/tj/news/all',
18
+ },
19
+ ],
12
20
  yzxc: [
13
21
  {
14
22
  title: '研究生招生信息网',
@@ -1,4 +1,5 @@
1
1
  module.exports = function (router) {
2
+ router.get('/tj/news/:type?', require('./tj/news'));
2
3
  router.get('/yjsy/news/:type', require('./yjsy/news'));
3
4
  router.get('/yzxc/tzgg', require('./yzxc/tzgg'));
4
5
  };
@@ -1,7 +1,7 @@
1
1
  const got = require('@/utils/got');
2
2
  const cheerio = require('cheerio');
3
- const dayjs = require('dayjs');
4
- const _ = require('lodash');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const timezone = require('@/utils/timezone');
5
5
 
6
6
  const baseUrl = 'http://tj.ustb.edu.cn';
7
7
  const maps = {
@@ -22,18 +22,17 @@ const maps = {
22
22
  function getNews(data) {
23
23
  const $ = cheerio.load(data);
24
24
  return $('div[class="classnews"] ul li a')
25
- .slice(0, 5)
26
- .map((_, elem) => ({
25
+ .toArray()
26
+ .map((elem) => ({
27
27
  link: baseUrl + elem.attribs.href,
28
28
  title: elem.children[0].data,
29
- pubDate: dayjs(elem.attribs.href.split('/')[3].split('.')[0]).toString(),
30
- }))
31
- .get();
29
+ pubDate: timezone(parseDate(elem.attribs.href.split('/')[3].split('.')[0].substring(0, 14), 'YYYYMMDDHHmmss'), 8),
30
+ }));
32
31
  }
33
32
 
34
33
  module.exports = async (ctx) => {
35
34
  let type = ctx.params.type || 'all';
36
- if (!_.includes(_.keys(maps), type)) {
35
+ if (!Object.keys(maps).includes(type)) {
37
36
  type = 'all';
38
37
  }
39
38
 
@@ -46,14 +45,14 @@ module.exports = async (ctx) => {
46
45
  if (type === 'all') {
47
46
  const all = await Promise.all(
48
47
  Object.values(maps).map(async (link) => {
49
- const response = await got.get(baseUrl + link);
48
+ const response = await got(baseUrl + link);
50
49
  const news = getNews(response.data);
51
- return Promise.resolve(news);
50
+ return news;
52
51
  })
53
52
  );
54
- responseData.item = _.orderBy(_.flatMapDepth(all), (res) => new Date(res.pubDate), ['desc']);
53
+ responseData.item = all.flatMap((res) => res);
55
54
  } else {
56
- const response = await got.get(baseUrl + maps[type]);
55
+ const response = await got(baseUrl + maps[type]);
57
56
  const news = getNews(response.data);
58
57
  responseData.item = news;
59
58
  }
@@ -0,0 +1,68 @@
1
+ const got = require('@/utils/got');
2
+ const timezone = require('@/utils/timezone');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+ const md = require('markdown-it')({
7
+ html: true,
8
+ });
9
+
10
+ module.exports = async (ctx) => {
11
+ const category = ctx.params.category ?? 'method';
12
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 20;
13
+
14
+ const rootUrl = 'https://utgd.net';
15
+ const apiUrl = `${rootUrl}/api/v2/pages/`;
16
+ const currentUrl = `${rootUrl}/category/s/${category}`;
17
+ const slugUrl = `${rootUrl}/api/v2/category/slug/${category}/`;
18
+
19
+ let response = await got({
20
+ method: 'get',
21
+ url: slugUrl,
22
+ });
23
+
24
+ const data = response.data;
25
+
26
+ response = await got({
27
+ method: 'get',
28
+ url: apiUrl,
29
+ searchParams: {
30
+ type: 'article.Article',
31
+ fields: `article_category(category_name),article_tag(tag_name),title,article_image,article_author,article_content,article_published_time`,
32
+ article_category: data.id,
33
+ order: '-article_published_time',
34
+ limit,
35
+ },
36
+ });
37
+
38
+ const items = await Promise.all(
39
+ response.data.items.map((item) =>
40
+ ctx.cache.tryGet(`untag-${item.id}`, async () => {
41
+ const authorResponse = await got({
42
+ method: 'get',
43
+ url: `${rootUrl}/api/v2/user/profile/${item.article_author.id}/`,
44
+ });
45
+
46
+ return {
47
+ title: item.title,
48
+ link: `${rootUrl}/article/${item.id}`,
49
+ description: art(path.join(__dirname, 'templates/description.art'), {
50
+ image: item.article_image,
51
+ description: md.render(item.article_content),
52
+ }),
53
+ author: authorResponse.data.display_name,
54
+ pubDate: timezone(parseDate(item.article_published_time), +8),
55
+ category: [...item.article_category.map((c) => c.category_name), ...item.article_tag.map((t) => t.tag_name)],
56
+ };
57
+ })
58
+ )
59
+ );
60
+
61
+ ctx.state.data = {
62
+ title: `UNTAG - ${data.category_name}`,
63
+ link: currentUrl,
64
+ item: items,
65
+ image: data.category_image,
66
+ description: data.category_description,
67
+ };
68
+ };
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ '/timeline': ['nczitzk'],
3
+ '/topic/:topic?': ['nczitzk'],
4
+ '/:category?': ['nczitzk'],
5
+ };
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ 'utgd.net': {
3
+ _name: 'UNTAG',
4
+ '.': [
5
+ {
6
+ title: '时间线',
7
+ docs: 'https://docs.rsshub.app/new-media.html#untag-shi-jian-xian',
8
+ source: ['/'],
9
+ target: '/utgd/timeline',
10
+ },
11
+ {
12
+ title: '分类',
13
+ docs: 'https://docs.rsshub.app/new-media.html#untag-fen-lei',
14
+ source: ['/category/s/:category', '/'],
15
+ target: '/utgd/:category',
16
+ },
17
+ {
18
+ title: '专题',
19
+ docs: 'https://docs.rsshub.app/new-media.html#untag-zhuan-ti',
20
+ source: ['/topic', '/'],
21
+ target: '/utgd/topic/:topic',
22
+ },
23
+ ],
24
+ },
25
+ };
@@ -0,0 +1,5 @@
1
+ module.exports = function (router) {
2
+ router.get('/timeline', require('./timeline'));
3
+ router.get('/topic/:topic?', require('./topic'));
4
+ router.get('/:category?', require('./category'));
5
+ };
@@ -0,0 +1,7 @@
1
+ {{ if image }}
2
+ <img src="{{ image }}">
3
+ <br>
4
+ {{ /if }}
5
+ {{ if description }}
6
+ {{@ description }}
7
+ {{ /if }}
@@ -0,0 +1,54 @@
1
+ const got = require('@/utils/got');
2
+ const timezone = require('@/utils/timezone');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+ const md = require('markdown-it')({
7
+ html: true,
8
+ });
9
+
10
+ module.exports = async (ctx) => {
11
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 20;
12
+
13
+ const rootUrl = 'https://utgd.net';
14
+ const apiUrl = `${rootUrl}/api/v2/timeline/?page=1&page_size=${limit}`;
15
+
16
+ const response = await got({
17
+ method: 'get',
18
+ url: apiUrl,
19
+ });
20
+
21
+ const items = await Promise.all(
22
+ response.data.results.slice(0, limit).map((item) =>
23
+ ctx.cache.tryGet(`untag-${item.id}`, async () => {
24
+ const detailResponse = await got({
25
+ method: 'get',
26
+ url: `${rootUrl}/api/v2/pages/${item.id}/`,
27
+ searchParams: {
28
+ fields: 'article_content,article_category(category_name),article_tag(tag_name)',
29
+ },
30
+ });
31
+
32
+ const data = detailResponse.data;
33
+
34
+ return {
35
+ title: item.title,
36
+ link: `${rootUrl}/article/${item.id}`,
37
+ description: art(path.join(__dirname, 'templates/description.art'), {
38
+ image: item.article_image,
39
+ description: md.render(data.article_content),
40
+ }),
41
+ author: item.article_author_displayname,
42
+ pubDate: timezone(parseDate(item.article_published_time), +8),
43
+ category: [...data.article_category.map((c) => c.category_name), ...data.article_tag.map((t) => t.tag_name)],
44
+ };
45
+ })
46
+ )
47
+ );
48
+
49
+ ctx.state.data = {
50
+ title: 'UNTAG',
51
+ link: rootUrl,
52
+ item: items,
53
+ };
54
+ };
@@ -0,0 +1,70 @@
1
+ const got = require('@/utils/got');
2
+ const timezone = require('@/utils/timezone');
3
+ const { parseDate } = require('@/utils/parse-date');
4
+ const { art } = require('@/utils/render');
5
+ const path = require('path');
6
+ const md = require('markdown-it')({
7
+ html: true,
8
+ });
9
+
10
+ module.exports = async (ctx) => {
11
+ const topic = ctx.params.topic ?? '在线阅读专栏';
12
+ const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 20;
13
+
14
+ const rootUrl = 'https://utgd.net';
15
+ const currentUrl = `${rootUrl}/topic`;
16
+ const topicUrl = `${rootUrl}/api/v2/topic/`;
17
+
18
+ let response = await got({
19
+ method: 'get',
20
+ url: topicUrl,
21
+ });
22
+
23
+ const topicItems = response.data.filter((i) => i.title === topic);
24
+
25
+ if (!topicItems) {
26
+ throw Error(`No topic named ${topic}`);
27
+ }
28
+
29
+ const topicItem = topicItems[0];
30
+
31
+ const apiUrl = `${rootUrl}/api/v2/topic/${topicItem.id}/article/`;
32
+
33
+ response = await got({
34
+ method: 'get',
35
+ url: apiUrl,
36
+ });
37
+
38
+ const items = await Promise.all(
39
+ response.data.slice(0, limit).map((item) =>
40
+ ctx.cache.tryGet(`untag-${item.id}`, async () => {
41
+ const detailResponse = await got({
42
+ method: 'get',
43
+ url: `${rootUrl}/api/v2/pages/${item.id}/`,
44
+ searchParams: {
45
+ fields: 'article_content',
46
+ },
47
+ });
48
+
49
+ return {
50
+ title: item.title,
51
+ link: `${rootUrl}/article/${item.id}`,
52
+ description: art(path.join(__dirname, 'templates/description.art'), {
53
+ image: item.article_image,
54
+ description: md.render(detailResponse.data.article_content),
55
+ }),
56
+ author: item.article_author_displayname,
57
+ pubDate: timezone(parseDate(item.article_published_time), +8),
58
+ category: [...item.article_category.map((c) => c.name), ...item.article_tag.map((t) => t.name)],
59
+ };
60
+ })
61
+ )
62
+ );
63
+
64
+ ctx.state.data = {
65
+ title: `UNTAG - ${topicItem.title}`,
66
+ link: currentUrl,
67
+ item: items,
68
+ description: topicItem.summary,
69
+ };
70
+ };
@@ -4,31 +4,50 @@ const { parseDate } = require('@/utils/parse-date');
4
4
 
5
5
  module.exports = async (ctx) => {
6
6
  const baseUrl = 'https://www.v1tx.com';
7
- const response = await got(`${baseUrl}/wp-json/wp/v2/posts`, {
8
- searchParams: {
9
- per_page: ctx.query.limit ?? 100,
10
- },
11
- });
12
-
13
- const items = response.data.map((item) => {
14
- const $ = cheerio.load(item.content.rendered, null, false);
15
- $('figure > picture > source').remove();
16
- $('img').each((_, img) => {
17
- img.attribs.src = img.attribs.src.replace(/-1024x\d+\.jpg/, '.webp').replace('.jpg', '.webp');
18
- delete img.attribs.srcset;
7
+ const { data: response } = await got(baseUrl);
8
+
9
+ const $ = cheerio.load(response);
10
+ const list = $('h2.entry-title a')
11
+ .toArray()
12
+ .map((item) => {
13
+ item = $(item);
14
+ return {
15
+ title: item.text(),
16
+ link: item.attr('href'),
17
+ };
19
18
  });
20
- return {
21
- title: item.title.rendered,
22
- link: item.link,
23
- guid: item.guid.rendered,
24
- description: $.html(),
25
- pubDate: parseDate(item.date_gmt),
26
- };
27
- });
19
+
20
+ const items = await Promise.all(
21
+ list.map((item) =>
22
+ ctx.cache.tryGet(item.link, async () => {
23
+ const { data: response } = await got(item.link);
24
+ const $ = cheerio.load(response);
25
+
26
+ const data = JSON.parse($('script[type="application/ld+json"]').text());
27
+
28
+ $('.entry-content figure > picture > source, noscript').remove();
29
+ $('.entry-content img').each((_, img) => {
30
+ if (img.attribs.src.startsWith('data:')) {
31
+ img.attribs.src = img.attribs['data-lazy-src'];
32
+ delete img.attribs['data-lazy-src'];
33
+ delete img.attribs['data-lazy-srcset'];
34
+ }
35
+ img.attribs.src = img.attribs.src.replace(/-1024x\d+\.jpg/, '.webp').replace('.jpg', '.webp');
36
+ delete img.attribs.srcset;
37
+ });
38
+
39
+ item.pubDate = parseDate(data.datePublished);
40
+ item.updated = parseDate(data.dateModified);
41
+ item.description = $('.entry-content').html();
42
+
43
+ return item;
44
+ })
45
+ )
46
+ );
28
47
 
29
48
  ctx.state.data = {
30
- title: 'v1tx - 发现实用工具与软件',
31
- description: 'v1tx.com 专注于发现新应用,推荐各种效率工具、软件、APP,包括Windows、Mac、Android、iOS、网页等多平台应用,让每个人找到适合的软件并掌握使用技巧',
49
+ title: $('head title').text(),
50
+ description: $('head meta[name="description"]').attr('content'),
32
51
  link: baseUrl,
33
52
  image: `${baseUrl}/wp-content/uploads/2018/10/cropped-Favicon.webp`,
34
53
  item: items,
@@ -5,10 +5,19 @@ const { finishArticleItem } = require('@/utils/wechat-mp');
5
5
  module.exports = async (ctx) => {
6
6
  const id = ctx.params.id;
7
7
 
8
- const baseUrl = 'https://api.feeddd.org';
9
- const apiUrl = `${baseUrl}/feeds/${id}/json`;
8
+ const baseUrl = 'https://feed.hamibot.com';
9
+ const apiUrl = `${baseUrl}/api/feeds/${id}/json`;
10
10
 
11
- const response = await got(apiUrl);
11
+ let response;
12
+
13
+ try {
14
+ response = await got(apiUrl);
15
+ } catch (error) {
16
+ if (error.name === 'HTTPError' && error.response.statusCode === 404) {
17
+ throw Error('该公众号不存在,有关如何获取公众号 id,详见 https://docs.rsshub.app/new-media.html#wei-xin-gong-zhong-hao-feeddd-lai-yuan');
18
+ }
19
+ throw error;
20
+ }
12
21
 
13
22
  let items = response.data.items.map((item) => ({
14
23
  title: item.title,
File without changes
@@ -32,9 +32,9 @@ module.exports = {
32
32
  },
33
33
  ],
34
34
  },
35
- 'feeddd.org': {
35
+ 'hamibot.com': {
36
36
  _name: '微信',
37
- '.': [
37
+ feed: [
38
38
  {
39
39
  title: '公众号(feeddd 来源)',
40
40
  docs: 'https://docs.rsshub.app/new-media.html#wei-xin',
@@ -0,0 +1,93 @@
1
+ const querystring = require('querystring');
2
+ const got = require('@/utils/got');
3
+ const config = require('@/config').value;
4
+ const weiboUtils = require('./utils');
5
+ const { fallback, queryToBoolean } = require('@/utils/readable-social');
6
+
7
+ module.exports = async (ctx) => {
8
+ if (!config.weibo_cookies) {
9
+ throw 'Weibo Group Timeline is not available due to the absense of [Weibo Cookies]. Check <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config tutorial</a>';
10
+ }
11
+
12
+ const gid = ctx.params.gid;
13
+ const groupName = ctx.params.gname || '微博分组';
14
+ let displayVideo = '1';
15
+ let displayArticle = '0';
16
+ let displayComments = '0';
17
+ if (ctx.params.routeParams) {
18
+ if (ctx.params.routeParams === '1' || ctx.params.routeParams === '0') {
19
+ displayVideo = ctx.params.routeParams;
20
+ } else {
21
+ const routeParams = querystring.parse(ctx.params.routeParams);
22
+ displayVideo = fallback(undefined, queryToBoolean(routeParams.displayVideo), true) ? '1' : '0';
23
+ displayArticle = fallback(undefined, queryToBoolean(routeParams.displayArticle), false) ? '1' : '0';
24
+ displayComments = fallback(undefined, queryToBoolean(routeParams.displayComments), false) ? '1' : '0';
25
+ }
26
+ }
27
+
28
+ const responseData = await ctx.cache.tryGet(
29
+ `weibo:group:index:${gid}`,
30
+ async () => {
31
+ const _r = await got({
32
+ method: 'get',
33
+ url: `https://m.weibo.cn/feed/group?gid=${gid}`,
34
+ headers: {
35
+ Referer: `https://m.weibo.cn/`,
36
+ 'MWeibo-Pwa': 1,
37
+ 'X-Requested-With': 'XMLHttpRequest',
38
+ Cookie: config.weibo.cookies,
39
+ },
40
+ });
41
+ return _r.data.data;
42
+ },
43
+ config.cache.routeExpire,
44
+ false
45
+ );
46
+
47
+ const resultItems = await Promise.all(
48
+ responseData.statuses.map(async (item) => {
49
+ const retweet = item.retweeted_status;
50
+ if (retweet && retweet.isLongText) {
51
+ const retweetData = await ctx.cache.tryGet(`weibo:retweeted:${retweet.user.id}:${retweet.bid}`, () => weiboUtils.getShowData(retweet.user.id, retweet.bid));
52
+ if (retweetData !== undefined && retweetData.text) {
53
+ item.retweeted_status.text = retweetData.text;
54
+ }
55
+ }
56
+
57
+ const formatExtended = weiboUtils.formatExtended(ctx, item);
58
+ let description = formatExtended.description;
59
+
60
+ if (displayVideo === '1') {
61
+ if (item.retweeted_status) {
62
+ description = weiboUtils.formatVideo(description, item.retweeted_status);
63
+ } else {
64
+ description = weiboUtils.formatVideo(description, item);
65
+ }
66
+ }
67
+
68
+ if (displayComments === '1') {
69
+ description = await weiboUtils.formatComments(ctx, description, item);
70
+ }
71
+
72
+ if (displayArticle === '1') {
73
+ if (item.retweeted_status) {
74
+ description = await weiboUtils.formatArticle(ctx, description, item.retweeted_status);
75
+ } else {
76
+ description = await weiboUtils.formatArticle(ctx, description, item);
77
+ }
78
+ }
79
+
80
+ return {
81
+ ...formatExtended,
82
+ description,
83
+ };
84
+ })
85
+ );
86
+
87
+ ctx.state.data = weiboUtils.sinaimgTvax({
88
+ title: groupName,
89
+ link: `https://weibo.com/mygroups?gid=${gid}`,
90
+ description: '微博自定义分组',
91
+ item: resultItems,
92
+ });
93
+ };