rsshub 1.0.0-master.d5575cf → 1.0.0-master.d5721d4

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 (856) hide show
  1. package/lib/assets/logo.svg +1 -0
  2. package/lib/config.ts +49 -1
  3. package/lib/errors/index.test.ts +15 -5
  4. package/lib/errors/index.tsx +3 -2
  5. package/lib/errors/types/captcha.ts +5 -0
  6. package/lib/index.ts +48 -14
  7. package/lib/middleware/cache.ts +4 -0
  8. package/lib/middleware/debug.ts +6 -4
  9. package/lib/middleware/header.ts +4 -2
  10. package/lib/middleware/parameter.ts +1 -1
  11. package/lib/registry.test.ts +24 -1
  12. package/lib/registry.ts +46 -13
  13. package/lib/router.js +1 -1
  14. package/lib/routes/0xxx/index.ts +169 -0
  15. package/lib/routes/0xxx/namespace.ts +9 -0
  16. package/lib/routes/0xxx/templates/description.art +50 -0
  17. package/lib/routes/10000link/info.ts +1 -1
  18. package/lib/routes/{xinhuanet → 121}/namespace.ts +3 -3
  19. package/lib/routes/121/templates/description.art +17 -0
  20. package/lib/routes/121/weather-live.ts +104 -0
  21. package/lib/routes/141jav/index.ts +3 -0
  22. package/lib/routes/141ppv/index.ts +3 -0
  23. package/lib/routes/163/news/rank.ts +1 -1
  24. package/lib/routes/18comic/album.ts +60 -64
  25. package/lib/routes/18comic/blogs.ts +1 -0
  26. package/lib/routes/18comic/index.ts +1 -0
  27. package/lib/routes/18comic/search.ts +54 -4
  28. package/lib/routes/18comic/utils.ts +70 -1
  29. package/lib/routes/199it/index.ts +1 -1
  30. package/lib/routes/2048/index.ts +1 -0
  31. package/lib/routes/21caijing/channel.ts +1 -1
  32. package/lib/routes/30secondsofcode/utils.ts +0 -1
  33. package/lib/routes/4khd/category.ts +1 -0
  34. package/lib/routes/4khd/latest.ts +1 -0
  35. package/lib/routes/4kup/category.ts +1 -0
  36. package/lib/routes/4kup/latest.ts +1 -0
  37. package/lib/routes/4kup/popular.ts +1 -0
  38. package/lib/routes/4kup/tag.ts +1 -0
  39. package/lib/routes/51cto/utils.ts +1 -1
  40. package/lib/routes/6park/index.ts +1 -1
  41. package/lib/routes/6v123/index.ts +487 -0
  42. package/lib/routes/6v123/namespace.ts +1 -0
  43. package/lib/routes/7mmtv/index.ts +1 -0
  44. package/lib/routes/8kcos/cat.ts +3 -0
  45. package/lib/routes/8kcos/latest.ts +1 -0
  46. package/lib/routes/8kcos/tag.ts +1 -0
  47. package/lib/routes/91porn/author.ts +1 -0
  48. package/lib/routes/91porn/index.ts +1 -0
  49. package/lib/routes/95mm/category.ts +1 -0
  50. package/lib/routes/95mm/tab.ts +1 -0
  51. package/lib/routes/95mm/tag.ts +1 -0
  52. package/lib/routes/aa1/60s.ts +189 -0
  53. package/lib/routes/aa1/namespace.ts +9 -0
  54. package/lib/routes/abc/index.ts +1 -1
  55. package/lib/routes/abskoop/index.ts +3 -0
  56. package/lib/routes/abskoop/nsfw.ts +3 -0
  57. package/lib/routes/acgvinyl/namespace.ts +6 -0
  58. package/lib/routes/acgvinyl/news.ts +86 -0
  59. package/lib/routes/agefans/detail.ts +1 -1
  60. package/lib/routes/aibase/daily.ts +110 -0
  61. package/lib/routes/aibase/util.ts +3 -0
  62. package/lib/routes/aliyun/database-month.ts +1 -1
  63. package/lib/routes/ally/rail.ts +1 -1
  64. package/lib/routes/amazfitwatchfaces/index.ts +1 -2
  65. package/lib/routes/android/security-bulletin.ts +61 -0
  66. package/lib/routes/anthropic/news.ts +25 -14
  67. package/lib/routes/anthropic/research.ts +112 -0
  68. package/lib/routes/apnews/mobile-api.ts +1 -1
  69. package/lib/routes/apnews/sitemap.ts +1 -1
  70. package/lib/routes/apnews/topics.ts +2 -1
  71. package/lib/routes/apnews/utils.ts +1 -1
  72. package/lib/routes/app-sales/index.ts +1 -1
  73. package/lib/routes/apple/apps.ts +2 -2
  74. package/lib/routes/apple/design.ts +54 -0
  75. package/lib/routes/apple/namespace.ts +1 -1
  76. package/lib/routes/apple/podcast.ts +58 -25
  77. package/lib/routes/apple/security-releases.ts +2 -2
  78. package/lib/routes/aqara/post.ts +1 -1
  79. package/lib/routes/asiafruitchina/categories.ts +1 -1
  80. package/lib/routes/asiantolick/index.ts +3 -0
  81. package/lib/routes/asmr-200/index.ts +1 -0
  82. package/lib/routes/augmentcode/blog.ts +161 -0
  83. package/lib/routes/augmentcode/namespace.ts +9 -0
  84. package/lib/routes/augmentcode/templates/description.art +17 -0
  85. package/lib/routes/azul/namespace.ts +9 -0
  86. package/lib/routes/azul/packages.ts +105 -0
  87. package/lib/routes/bandisoft/history.ts +2 -2
  88. package/lib/routes/bangumi.tv/group/reply.ts +1 -1
  89. package/lib/routes/banshujiang/index.ts +763 -0
  90. package/lib/routes/banshujiang/namespace.ts +9 -0
  91. package/lib/routes/banshujiang/templates/description.art +17 -0
  92. package/lib/routes/banyuetan/index.ts +1 -1
  93. package/lib/routes/baozimh/index.ts +21 -3
  94. package/lib/routes/baselang/index.ts +117 -0
  95. package/lib/routes/baselang/namespace.ts +6 -0
  96. package/lib/routes/bbc/learningenglish.ts +35 -20
  97. package/lib/routes/bestofjs/monthly.ts +137 -0
  98. package/lib/routes/bestofjs/namespace.ts +7 -0
  99. package/lib/routes/bestofjs/templates/description.art +36 -0
  100. package/lib/routes/bfl/announcements.ts +1 -1
  101. package/lib/routes/bilibili/cache.ts +97 -3
  102. package/lib/routes/bilibili/danmaku.ts +1 -1
  103. package/lib/routes/bilibili/dynamic.ts +52 -15
  104. package/lib/routes/bilibili/page.ts +1 -1
  105. package/lib/routes/bilibili/ranking.ts +25 -17
  106. package/lib/routes/bilibili/video.ts +35 -74
  107. package/lib/routes/bilibili/wasm-exec.ts +1 -1
  108. package/lib/routes/bilibili/weekly-recommend.ts +22 -6
  109. package/lib/routes/biquge/index.ts +1 -1
  110. package/lib/routes/bjp/apod.ts +1 -1
  111. package/lib/routes/bnext/index.ts +58 -0
  112. package/lib/routes/bnext/namespace.ts +7 -0
  113. package/lib/routes/bookwalker/namespace.ts +9 -0
  114. package/lib/routes/bookwalker/search.ts +114 -0
  115. package/lib/routes/bookwalker/templates/description.art +13 -0
  116. package/lib/routes/booru/mmda.ts +1 -0
  117. package/lib/routes/bsky/keyword.ts +15 -10
  118. package/lib/routes/buaa/jiaowu.ts +1 -1
  119. package/lib/routes/bullionvault/gold-news.ts +4 -4
  120. package/lib/routes/bupt/scss.ts +98 -0
  121. package/lib/routes/capitalmind/insights.ts +40 -0
  122. package/lib/routes/capitalmind/namespace.ts +8 -0
  123. package/lib/routes/capitalmind/podcasts.ts +41 -0
  124. package/lib/routes/capitalmind/utils.ts +122 -0
  125. package/lib/routes/cartoonmad/comic.ts +1 -1
  126. package/lib/routes/cast/index.ts +1 -1
  127. package/lib/routes/cbndata/information.ts +250 -0
  128. package/lib/routes/cbndata/namespace.ts +9 -0
  129. package/lib/routes/cbndata/templates/description.art +17 -0
  130. package/lib/routes/cccmc/index.ts +1 -1
  131. package/lib/routes/ccg/index.ts +181 -0
  132. package/lib/routes/ccg/namespace.ts +9 -0
  133. package/lib/routes/ccg/templates/description.art +21 -0
  134. package/lib/routes/chikubi/category.ts +1 -0
  135. package/lib/routes/chikubi/index.ts +1 -0
  136. package/lib/routes/chikubi/navigation.ts +1 -0
  137. package/lib/routes/chikubi/nipple-video-category.ts +1 -0
  138. package/lib/routes/chikubi/nipple-video-maker.ts +1 -0
  139. package/lib/routes/chikubi/search.ts +1 -0
  140. package/lib/routes/chikubi/tag.ts +1 -0
  141. package/lib/routes/chinadaily/language.ts +1 -1
  142. package/lib/routes/chinaratings/credit-research.ts +1 -1
  143. package/lib/routes/chocolatey/namespace.ts +9 -0
  144. package/lib/routes/chocolatey/packages.ts +122 -0
  145. package/lib/routes/chub/characters.ts +3 -0
  146. package/lib/routes/civitai/discussions.ts +1 -0
  147. package/lib/routes/civitai/models.ts +1 -0
  148. package/lib/routes/civitai/user.ts +3 -0
  149. package/lib/routes/cline/blog.ts +34 -23
  150. package/lib/routes/cmde/index.ts +1 -1
  151. package/lib/routes/cna/index.ts +2 -24
  152. package/lib/routes/cna/utils.ts +23 -0
  153. package/lib/routes/cna/web/index.ts +2 -22
  154. package/lib/routes/cockroachlabs/blog.ts +113 -0
  155. package/lib/routes/cockroachlabs/namespace.ts +7 -0
  156. package/lib/routes/commonhealth/index.ts +70 -0
  157. package/lib/routes/commonhealth/namespace.ts +7 -0
  158. package/lib/routes/commonhealth/templates/description.art +2 -0
  159. package/lib/routes/cool18/index.ts +4 -1
  160. package/lib/routes/coolapk/utils.ts +5 -4
  161. package/lib/routes/coolbuy/index.ts +106 -0
  162. package/lib/routes/coolbuy/namespace.ts +9 -0
  163. package/lib/routes/coolbuy/templates/description.art +48 -0
  164. package/lib/routes/coolidge/film-guide.ts +60 -0
  165. package/lib/routes/coolidge/namespace.ts +7 -0
  166. package/lib/routes/coolidge/news.ts +65 -0
  167. package/lib/routes/coolidge/templates/description.art +4 -0
  168. package/lib/routes/coomer/index.ts +15 -11
  169. package/lib/routes/coomer/namespace.ts +1 -1
  170. package/lib/routes/copymanga/comic.ts +9 -10
  171. package/lib/routes/cosplaytele/category.ts +1 -0
  172. package/lib/routes/cosplaytele/latest.ts +1 -0
  173. package/lib/routes/cosplaytele/popular.ts +1 -0
  174. package/lib/routes/cosplaytele/tag.ts +1 -0
  175. package/lib/routes/cpta/handler.ts +1 -1
  176. package/lib/routes/creative-comic/book.ts +1 -1
  177. package/lib/routes/crush/index.ts +77 -0
  178. package/lib/routes/crush/namespace.ts +7 -0
  179. package/lib/routes/css-tricks/articles.ts +48 -0
  180. package/lib/routes/css-tricks/collections.ts +62 -0
  181. package/lib/routes/css-tricks/namespace.ts +8 -0
  182. package/lib/routes/css-tricks/popular.ts +39 -0
  183. package/lib/routes/css-tricks/utils.ts +103 -0
  184. package/lib/routes/cursor/blog.ts +84 -0
  185. package/lib/routes/cursor/changelog.ts +26 -17
  186. package/lib/routes/cursor/namespace.ts +1 -1
  187. package/lib/routes/cw/utils.ts +6 -13
  188. package/lib/routes/daum/potplayer.ts +257 -0
  189. package/lib/routes/dbaplus/new.ts +392 -0
  190. package/lib/routes/dbaplus/templates/description.art +21 -0
  191. package/lib/routes/dealstreetasia/home.ts +1 -1
  192. package/lib/routes/dedao/index.ts +3 -3
  193. package/lib/routes/deepl/blog.ts +421 -0
  194. package/lib/routes/deepl/namespace.ts +9 -0
  195. package/lib/routes/deepl/templates/description.art +21 -0
  196. package/lib/routes/deeplearning/the-batch.ts +1 -1
  197. package/lib/routes/dev.to/guides.ts +100 -0
  198. package/lib/routes/dev.to/namespace.ts +8 -0
  199. package/lib/routes/dev.to/top.ts +105 -0
  200. package/lib/routes/dgut/jwb.ts +73 -0
  201. package/lib/routes/dgut/namespace.ts +9 -0
  202. package/lib/routes/diariofruticola/filtro.ts +1 -1
  203. package/lib/routes/digitalpolicyalert/activity-tracker.ts +135 -0
  204. package/lib/routes/digitalpolicyalert/namespace.ts +9 -0
  205. package/lib/routes/dlsite/campaign.ts +1 -0
  206. package/lib/routes/dlsite/ci-en/article.ts +1 -0
  207. package/lib/routes/dlsite/new.ts +1 -0
  208. package/lib/routes/dlsite/z-index/index.ts +3 -0
  209. package/lib/routes/dnaindia/common.ts +26 -8
  210. package/lib/routes/dockerhub/utils.ts +1 -1
  211. package/lib/routes/dora-world/article.ts +2 -2
  212. package/lib/routes/douban/other/list.ts +3 -3
  213. package/lib/routes/dytt/index.ts +1 -2
  214. package/lib/routes/e-hentai/index.ts +4 -1
  215. package/lib/routes/eeo/kuaixun.ts +154 -0
  216. package/lib/routes/eeo/namespace.ts +9 -0
  217. package/lib/routes/eeo/templates/description.art +7 -0
  218. package/lib/routes/ehentai/ehapi.ts +3 -3
  219. package/lib/routes/ehentai/favorites.ts +1 -0
  220. package/lib/routes/ehentai/search.ts +1 -0
  221. package/lib/routes/ehentai/tag.ts +1 -0
  222. package/lib/routes/elecfans/article.ts +64 -0
  223. package/lib/routes/elecfans/namespace.ts +7 -0
  224. package/lib/routes/elecfans/soft.ts +69 -0
  225. package/lib/routes/engineering/namespace.ts +8 -0
  226. package/lib/routes/engineering/tag.ts +55 -0
  227. package/lib/routes/englishhome/index.ts +55 -0
  228. package/lib/routes/englishhome/namespace.ts +6 -0
  229. package/lib/routes/epicgames/index.ts +2 -2
  230. package/lib/routes/espn/news.ts +1 -1
  231. package/lib/routes/eventbrite/events.ts +152 -0
  232. package/lib/routes/eventbrite/namespace.ts +7 -0
  233. package/lib/routes/eventernote/actors.ts +61 -64
  234. package/lib/routes/everia/category.ts +1 -0
  235. package/lib/routes/everia/latest.ts +1 -0
  236. package/lib/routes/everia/search.ts +1 -0
  237. package/lib/routes/everia/tag.ts +1 -0
  238. package/lib/routes/expats/czech-news.ts +272 -0
  239. package/lib/routes/expats/namespace.ts +9 -0
  240. package/lib/routes/fanbox/index.ts +1 -0
  241. package/lib/routes/fanbox/utils.ts +1 -1
  242. package/lib/routes/fangchan/list.ts +1 -1
  243. package/lib/routes/fansly/post.ts +1 -0
  244. package/lib/routes/fansly/tag.ts +1 -0
  245. package/lib/routes/fantia/search.ts +2 -1
  246. package/lib/routes/fantia/user.ts +1 -0
  247. package/lib/routes/fantube/creator.ts +69 -0
  248. package/lib/routes/fantube/namespace.ts +7 -0
  249. package/lib/routes/fantube/templates/post.art +17 -0
  250. package/lib/routes/fantube/types.ts +100 -0
  251. package/lib/routes/fantube/utils.ts +268 -0
  252. package/lib/routes/finology/tag.ts +1 -1
  253. package/lib/routes/follow/profile.ts +1 -1
  254. package/lib/routes/followin/news.ts +1 -1
  255. package/lib/routes/foresightnews/util.ts +1 -1
  256. package/lib/routes/freexcomic/book.ts +4 -1
  257. package/lib/routes/furaffinity/art.ts +1 -0
  258. package/lib/routes/furaffinity/browse.ts +1 -0
  259. package/lib/routes/furaffinity/commissions.ts +1 -0
  260. package/lib/routes/furaffinity/home.ts +1 -0
  261. package/lib/routes/furaffinity/journal-comments.ts +1 -0
  262. package/lib/routes/furaffinity/journals.ts +1 -0
  263. package/lib/routes/furaffinity/search.ts +1 -0
  264. package/lib/routes/furaffinity/shouts.ts +1 -0
  265. package/lib/routes/furaffinity/status.ts +1 -0
  266. package/lib/routes/furaffinity/submission-comments.ts +1 -0
  267. package/lib/routes/furaffinity/user.ts +1 -0
  268. package/lib/routes/furaffinity/watchers.ts +1 -0
  269. package/lib/routes/furaffinity/watching.ts +1 -0
  270. package/lib/routes/gamebase/news.ts +2 -2
  271. package/lib/routes/gamer/gnn-index.ts +8 -3
  272. package/lib/routes/gamer/hot.ts +5 -5
  273. package/lib/routes/gaoyu/blog.ts +145 -0
  274. package/lib/routes/gaoyu/namespace.ts +9 -0
  275. package/lib/routes/gaoyu/templates/description.art +7 -0
  276. package/lib/routes/gcores/categories.ts +1 -1
  277. package/lib/routes/gcores/collections.ts +1 -1
  278. package/lib/routes/gcores/tags.ts +1 -1
  279. package/lib/routes/gcores/topics.ts +1 -1
  280. package/lib/routes/gdufs/xwxy/index.ts +196 -0
  281. package/lib/routes/gelbooru/post.ts +1 -0
  282. package/lib/routes/genossenschaften/index.ts +2 -3
  283. package/lib/routes/geocaching/blogs.ts +2 -2
  284. package/lib/routes/github/activity.ts +1 -1
  285. package/lib/routes/github/namespace.ts +1 -1
  286. package/lib/routes/github/private-feed.ts +229 -0
  287. package/lib/routes/github/star.ts +1 -1
  288. package/lib/routes/gitstar-ranking/index.ts +150 -0
  289. package/lib/routes/gitstar-ranking/namespace.ts +9 -0
  290. package/lib/routes/gitstar-ranking/templates/description.art +38 -0
  291. package/lib/routes/gmu/namespace.ts +7 -0
  292. package/lib/routes/gmu/news.ts +136 -0
  293. package/lib/routes/gmu/yjs.ts +173 -0
  294. package/lib/routes/go/jihs/idwr.ts +3 -4
  295. package/lib/routes/google/extension.ts +9 -10
  296. package/lib/routes/google/jules.ts +63 -0
  297. package/lib/routes/gov/beijing/bphc/index.ts +1 -1
  298. package/lib/routes/gov/ccdi/index.ts +1 -1
  299. package/lib/routes/gov/chongqing/sydwgkzp.ts +22 -6
  300. package/lib/routes/gov/customs/list.ts +1 -1
  301. package/lib/routes/gov/general/general.ts +1 -1
  302. package/lib/routes/gov/hangzhou/zwfw.ts +1 -1
  303. package/lib/routes/gov/mem/namespace.ts +7 -0
  304. package/lib/routes/gov/mem/zfxxgkpt.ts +96 -0
  305. package/lib/routes/gov/moa/gjs.ts +1 -1
  306. package/lib/routes/gov/mot/index.ts +157 -53
  307. package/lib/routes/gov/pbc/goutongjiaoliu.ts +1 -1
  308. package/lib/routes/gov/shenzhen/szlh/index.ts +77 -0
  309. package/lib/routes/gov/shenzhen/szlh/namespace.ts +8 -0
  310. package/lib/routes/grainoil/category.ts +1 -2
  311. package/lib/routes/grist/utils.ts +5 -4
  312. package/lib/routes/gxmzu/lib.ts +2 -2
  313. package/lib/routes/gxmzu/utils/index.ts +2 -2
  314. package/lib/routes/hameln/chapter.ts +1 -1
  315. package/lib/routes/hanime1/previews.ts +1 -0
  316. package/lib/routes/hanime1/search.ts +5 -2
  317. package/lib/routes/hellogithub/index.ts +1 -1
  318. package/lib/routes/hellogithub/report.ts +1 -1
  319. package/lib/routes/hex-rays/index.ts +1 -1
  320. package/lib/routes/hit/hitgs.ts +240 -54
  321. package/lib/routes/hit/namespace.ts +1 -1
  322. package/lib/routes/hit/templates/description.art +7 -0
  323. package/lib/routes/hitsz/due-tzgg.ts +110 -0
  324. package/lib/routes/hitsz/due.ts +172 -0
  325. package/lib/routes/hlju/namespace.ts +8 -0
  326. package/lib/routes/hlju/news.ts +141 -0
  327. package/lib/routes/hostmonit/cloudflareyes.ts +1 -1
  328. package/lib/routes/hotukdeals/index.ts +1 -1
  329. package/lib/routes/hpoi/banner-item.ts +28 -11
  330. package/lib/routes/hpoi/info.ts +1 -1
  331. package/lib/routes/hudsonrivertrading/index.ts +122 -0
  332. package/lib/routes/hudsonrivertrading/namespace.ts +7 -0
  333. package/lib/routes/huggingface/daily-papers.ts +45 -9
  334. package/lib/routes/huijin-inv/namespace.ts +7 -0
  335. package/lib/routes/huijin-inv/news.ts +83 -0
  336. package/lib/routes/hupu/index.ts +170 -74
  337. package/lib/routes/hupu/types.ts +163 -0
  338. package/lib/routes/hust/gs.ts +1 -1
  339. package/lib/routes/hust/mse.ts +1 -1
  340. package/lib/routes/huxiu/util.ts +2 -2
  341. package/lib/routes/hyperdash/namespace.ts +7 -0
  342. package/lib/routes/hyperdash/templates/description.art +34 -0
  343. package/lib/routes/hyperdash/top-traders.ts +84 -0
  344. package/lib/routes/hyperdash/utils.ts +49 -0
  345. package/lib/routes/hypergryph/arknights/announce.ts +1 -1
  346. package/lib/routes/ielts/index.ts +1 -1
  347. package/lib/routes/immich/cursed-knowledge.ts +49 -0
  348. package/lib/routes/immich/namespace.ts +7 -0
  349. package/lib/routes/indianexpress/namespace.ts +10 -0
  350. package/lib/routes/indianexpress/section.ts +124 -0
  351. package/lib/routes/infoq/presentations.ts +1 -1
  352. package/lib/routes/infoq/topic.ts +16 -13
  353. package/lib/routes/instagram/common-utils.ts +3 -3
  354. package/lib/routes/instagram/web-api/index.ts +17 -13
  355. package/lib/routes/instagram/web-api/utils.ts +46 -63
  356. package/lib/routes/investor/index.ts +362 -148
  357. package/lib/routes/itch/devlog.ts +7 -3
  358. package/lib/routes/iwara/index.ts +3 -0
  359. package/lib/routes/iwara/subscriptions.ts +1 -0
  360. package/lib/routes/jamesclear/book-summaries.ts +40 -0
  361. package/lib/routes/jamesclear/great-speeches.ts +40 -0
  362. package/lib/routes/jamesclear/namespace.ts +8 -0
  363. package/lib/routes/jamesclear/quotes.ts +40 -0
  364. package/lib/routes/jamesclear/three-two-one.ts +41 -0
  365. package/lib/routes/jamesclear/utils.ts +22 -0
  366. package/lib/routes/japanpost/utils.ts +2 -2
  367. package/lib/routes/javbus/index.ts +4 -1
  368. package/lib/routes/javdb/actors.ts +1 -0
  369. package/lib/routes/javdb/index.ts +3 -0
  370. package/lib/routes/javdb/lists.ts +3 -0
  371. package/lib/routes/javdb/makers.ts +1 -0
  372. package/lib/routes/javdb/rankings.ts +1 -0
  373. package/lib/routes/javdb/search.ts +1 -0
  374. package/lib/routes/javdb/series.ts +1 -0
  375. package/lib/routes/javdb/tags.ts +1 -0
  376. package/lib/routes/javdb/videocodes.ts +1 -0
  377. package/lib/routes/javlibrary/bestrated.ts +3 -0
  378. package/lib/routes/javlibrary/bestreviews.ts +1 -0
  379. package/lib/routes/javlibrary/genre.ts +3 -0
  380. package/lib/routes/javlibrary/maker.ts +1 -0
  381. package/lib/routes/javlibrary/mostwanted.ts +3 -0
  382. package/lib/routes/javlibrary/newentries.ts +3 -0
  383. package/lib/routes/javlibrary/newrelease.ts +3 -0
  384. package/lib/routes/javlibrary/star.ts +1 -0
  385. package/lib/routes/javlibrary/update.ts +3 -0
  386. package/lib/routes/javlibrary/user.ts +3 -0
  387. package/lib/routes/javlibrary/utils.ts +1 -1
  388. package/lib/routes/javtiful/actress.ts +3 -0
  389. package/lib/routes/javtiful/channel.ts +3 -0
  390. package/lib/routes/javtrailers/casts.ts +3 -0
  391. package/lib/routes/javtrailers/categories.ts +3 -0
  392. package/lib/routes/javtrailers/studios.ts +3 -0
  393. package/lib/routes/jbma/namespace.ts +17 -0
  394. package/lib/routes/jbma/report.ts +471 -0
  395. package/lib/routes/jetbrains/comments.ts +99 -0
  396. package/lib/routes/jetbrains/namespace.ts +8 -0
  397. package/lib/routes/jimmyspa/books.ts +1 -1
  398. package/lib/routes/jimmyspa/news.ts +1 -1
  399. package/lib/routes/jingzhengu/utils.ts +1 -1
  400. package/lib/routes/jou/utils/index.ts +2 -2
  401. package/lib/routes/jpxgmn/search.ts +3 -0
  402. package/lib/routes/jpxgmn/tab.ts +3 -0
  403. package/lib/routes/jpxgmn/weekly.ts +3 -0
  404. package/lib/routes/juejin/aicoding.ts +102 -0
  405. package/lib/routes/juejin/trending.ts +70 -20
  406. package/lib/routes/juejin/utils.ts +36 -51
  407. package/lib/routes/jumeili/home.ts +1 -1
  408. package/lib/routes/kakuyomu/works.ts +4 -1
  409. package/lib/routes/kaopu/news.ts +1 -1
  410. package/lib/routes/kemono/const.ts +1 -1
  411. package/lib/routes/kemono/index.ts +23 -14
  412. package/lib/routes/kemono/namespace.ts +1 -1
  413. package/lib/routes/kemono/templates/discord.art +1 -1
  414. package/lib/routes/kiro/blog.ts +131 -0
  415. package/lib/routes/kiro/changelog.ts +128 -0
  416. package/lib/routes/kiro/namespace.ts +9 -0
  417. package/lib/routes/kisskiss/blog.ts +1 -0
  418. package/lib/routes/komiic/comic.ts +2 -1
  419. package/lib/routes/konachan/post.ts +3 -0
  420. package/lib/routes/kovidgoyal/kitty/changelog.ts +83 -0
  421. package/lib/routes/kovidgoyal/namespace.ts +7 -0
  422. package/lib/routes/koyso/index.ts +339 -0
  423. package/lib/routes/koyso/namespace.ts +9 -0
  424. package/lib/routes/koyso/templates/description.art +13 -0
  425. package/lib/routes/kpopping/kpics.ts +3 -4
  426. package/lib/routes/kpopping/news.ts +2 -2
  427. package/lib/routes/kunchengblog/essay.ts +1 -1
  428. package/lib/routes/laimanhua/index.ts +1 -0
  429. package/lib/routes/landiannews/category.ts +1 -1
  430. package/lib/routes/landiannews/index.ts +1 -1
  431. package/lib/routes/landiannews/tag.ts +1 -1
  432. package/lib/routes/letterboxd/index.ts +65 -0
  433. package/lib/routes/letterboxd/namespace.ts +8 -0
  434. package/lib/routes/lhratings/research.ts +1 -1
  435. package/lib/routes/line/utils.ts +1 -1
  436. package/lib/routes/lineageos/changes.ts +79 -0
  437. package/lib/routes/lineageos/namespace.ts +9 -0
  438. package/lib/routes/linkedin/cn/renderer.ts +1 -1
  439. package/lib/routes/liquipedia/cs-matches.ts +42 -14
  440. package/lib/routes/literotica/category.ts +3 -0
  441. package/lib/routes/literotica/new.ts +1 -0
  442. package/lib/routes/lofter/tag.ts +27 -3
  443. package/lib/routes/lovelive-anime/topics.ts +5 -6
  444. package/lib/routes/maccms/index.ts +1 -1
  445. package/lib/routes/makerworld/contest.ts +51 -0
  446. package/lib/routes/makerworld/namespace.ts +7 -0
  447. package/lib/routes/makerworld/trending.ts +45 -0
  448. package/lib/routes/makerworld/user-upload.ts +54 -0
  449. package/lib/routes/makerworld/utils.ts +18 -0
  450. package/lib/routes/mangadex/index.ts +3 -0
  451. package/lib/routes/mangadex/mdlist/feed.ts +1 -0
  452. package/lib/routes/mangadex/user/feed.ts +1 -0
  453. package/lib/routes/mangadex/user/follows.ts +1 -0
  454. package/lib/routes/manhuagui/comic.ts +2 -1
  455. package/lib/routes/manhuagui/subscribe.ts +1 -0
  456. package/lib/routes/manus/blog.ts +77 -0
  457. package/lib/routes/manus/namespace.ts +7 -0
  458. package/lib/routes/manyvids/video.ts +3 -0
  459. package/lib/routes/mastodon/tag.ts +48 -0
  460. package/lib/routes/mathpix/blog.ts +155 -0
  461. package/lib/routes/mathpix/namespace.ts +9 -0
  462. package/lib/routes/mathpix/templates/description.art +21 -0
  463. package/lib/routes/mckinsey/cn/category-map.ts +9 -15
  464. package/lib/routes/mckinsey/cn/index.ts +77 -40
  465. package/lib/routes/melonbooks/search.ts +1 -0
  466. package/lib/routes/mercari/keyword.ts +2 -1
  467. package/lib/routes/mercari/search.ts +90 -0
  468. package/lib/routes/mercari/util.ts +27 -11
  469. package/lib/routes/metacritic/index.ts +2 -2
  470. package/lib/routes/meteoblue/namespace.ts +8 -0
  471. package/lib/routes/meteoblue/weathernews.ts +75 -0
  472. package/lib/routes/meteor/index.ts +1 -1
  473. package/lib/routes/microsoft/addon.ts +7 -9
  474. package/lib/routes/mihoyo/sr/news.ts +2 -1
  475. package/lib/routes/mihoyo/zzz/news.ts +107 -0
  476. package/lib/routes/mingpao/index.ts +1 -1
  477. package/lib/routes/missav/new.ts +2 -1
  478. package/lib/routes/misskon/posts.ts +1 -0
  479. package/lib/routes/misskon/tag.ts +1 -0
  480. package/lib/routes/misskon/top.ts +1 -0
  481. package/lib/routes/mit/hanlab.ts +61 -0
  482. package/lib/routes/mit/namespace.ts +6 -0
  483. package/lib/routes/mittrchina/index.ts +3 -3
  484. package/lib/routes/mixcloud/config.ts +129 -0
  485. package/lib/routes/mixcloud/index.ts +163 -107
  486. package/lib/routes/mixcloud/user-playlist.ts +31 -0
  487. package/lib/routes/mixi2/community.ts +72 -0
  488. package/lib/routes/mixi2/discovery.ts +52 -0
  489. package/lib/routes/mixi2/home.ts +51 -0
  490. package/lib/routes/mixi2/namespace.ts +8 -0
  491. package/lib/routes/mixi2/user.ts +77 -0
  492. package/lib/routes/mixi2/utils.ts +56 -0
  493. package/lib/routes/modelscope/learn.ts +94 -0
  494. package/lib/routes/moodysmismicrosite/report.ts +1 -1
  495. package/lib/routes/musify/index.ts +129 -0
  496. package/lib/routes/musify/namespace.ts +9 -0
  497. package/lib/routes/musikguru/namespace.ts +9 -0
  498. package/lib/routes/musikguru/news.ts +146 -0
  499. package/lib/routes/musikguru/templates/description.art +21 -0
  500. package/lib/routes/mycard520/news.ts +2 -2
  501. package/lib/routes/myfans/post.ts +1 -0
  502. package/lib/routes/nankai/ai-notice.ts +142 -0
  503. package/lib/routes/nankai/cc-notice.ts +114 -0
  504. package/lib/routes/nankai/graduate-notice.ts +162 -0
  505. package/lib/routes/nankai/jwc.ts +131 -0
  506. package/lib/routes/nankai/namespace.ts +7 -0
  507. package/lib/routes/nankai/notice.ts +84 -0
  508. package/lib/routes/nankai/yzb.ts +97 -0
  509. package/lib/routes/natgeo/natgeo.ts +3 -2
  510. package/lib/routes/naturalism/namespace.ts +7 -0
  511. package/lib/routes/naturalism/new.ts +59 -0
  512. package/lib/routes/netflav/index.ts +3 -0
  513. package/lib/routes/neu/yz.ts +172 -0
  514. package/lib/routes/newslaundry/explainer.ts +30 -0
  515. package/lib/routes/newslaundry/namespace.ts +8 -0
  516. package/lib/routes/newslaundry/nl-cheatsheet.ts +30 -0
  517. package/lib/routes/newslaundry/nl-collaborations.ts +30 -0
  518. package/lib/routes/newslaundry/podcast.ts +61 -0
  519. package/lib/routes/newslaundry/reports.ts +30 -0
  520. package/lib/routes/newslaundry/shot.ts +30 -0
  521. package/lib/routes/newslaundry/subscriber-only.ts +30 -0
  522. package/lib/routes/newslaundry/templates/description.art +28 -0
  523. package/lib/routes/newslaundry/utils.ts +108 -0
  524. package/lib/routes/newswav/latest.ts +100 -0
  525. package/lib/routes/newswav/namespace.ts +7 -0
  526. package/lib/routes/nhentai/index.ts +1 -0
  527. package/lib/routes/nhentai/search.ts +1 -0
  528. package/lib/routes/nhk/news-web-easy.ts +1 -1
  529. package/lib/routes/nicovideo/mylist.ts +39 -0
  530. package/lib/routes/nicovideo/types.ts +27 -0
  531. package/lib/routes/nicovideo/utils.ts +27 -1
  532. package/lib/routes/nifd/research.ts +16 -0
  533. package/lib/routes/nikkei/cn/index.ts +1 -4
  534. package/lib/routes/nio/namespace.ts +9 -0
  535. package/lib/routes/nio/nioradio.ts +75 -0
  536. package/lib/routes/njust/cs.ts +58 -0
  537. package/lib/routes/njust/utils.ts +1 -1
  538. package/lib/routes/njxzc/utils/index.ts +2 -2
  539. package/lib/routes/notion/namespace.ts +2 -2
  540. package/lib/routes/now/news.ts +1 -1
  541. package/lib/routes/ntdm/video.ts +1 -1
  542. package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
  543. package/lib/routes/nycu/aa.ts +72 -0
  544. package/lib/routes/nycu/announcement.ts +61 -0
  545. package/lib/routes/nycu/cs.ts +54 -0
  546. package/lib/routes/nycu/namespace.ts +10 -0
  547. package/lib/routes/nycu/osa.ts +107 -0
  548. package/lib/routes/nytimes/index.ts +1 -1
  549. package/lib/routes/oilchem/index.ts +1 -1
  550. package/lib/routes/olevod/vod.ts +3 -0
  551. package/lib/routes/olevod/vodlist.ts +3 -0
  552. package/lib/routes/oncc/money18.ts +1 -1
  553. package/lib/routes/openai/cookbook.ts +1 -1
  554. package/lib/routes/oreno3d/main.ts +1 -0
  555. package/lib/routes/oschina/column.ts +1 -2
  556. package/lib/routes/oschina/event.ts +1 -1
  557. package/lib/routes/osu/beatmaps/latest-ranked.ts +2 -3
  558. package/lib/routes/papers/category.ts +3 -4
  559. package/lib/routes/patreon/feed.ts +1 -0
  560. package/lib/routes/paulgraham/article.ts +2 -2
  561. package/lib/routes/picuki/profile.ts +17 -5
  562. package/lib/routes/pixiv/bookmarks.ts +2 -1
  563. package/lib/routes/pixiv/illustfollow.ts +1 -0
  564. package/lib/routes/pixiv/novel-api/series/sfw.ts +1 -1
  565. package/lib/routes/pixiv/novel-api/user-novels/sfw.ts +1 -1
  566. package/lib/routes/pixiv/novel-series.ts +17 -3
  567. package/lib/routes/pixiv/novels.ts +3 -2
  568. package/lib/routes/pixiv/ranking.ts +1 -0
  569. package/lib/routes/pixiv/search.ts +1 -0
  570. package/lib/routes/pixiv/user.ts +2 -1
  571. package/lib/routes/pixivision/utils.ts +1 -1
  572. package/lib/routes/pku/hr.ts +1 -1
  573. package/lib/routes/pku/scc/recruit.ts +1 -1
  574. package/lib/routes/playno1/av.ts +1 -0
  575. package/lib/routes/pornhub/category-url.ts +1 -0
  576. package/lib/routes/pornhub/category.ts +1 -0
  577. package/lib/routes/pornhub/model.ts +3 -7
  578. package/lib/routes/pornhub/pornstar.ts +3 -7
  579. package/lib/routes/pornhub/search.ts +1 -0
  580. package/lib/routes/pornhub/users.ts +3 -7
  581. package/lib/routes/pornhub/utils.ts +12 -1
  582. package/lib/routes/producthunt/templates/description.art +2 -2
  583. package/lib/routes/producthunt/today.ts +17 -8
  584. package/lib/routes/ps/trophy.ts +1 -1
  585. package/lib/routes/pubscholar/utils.ts +14 -1
  586. package/lib/routes/python/namespace.ts +9 -0
  587. package/lib/routes/python/release.ts +120 -0
  588. package/lib/routes/qingting/podcast.ts +2 -1
  589. package/lib/routes/qipamaijia/index.ts +1 -0
  590. package/lib/routes/qq/lol/news.ts +1 -1
  591. package/lib/routes/questmobile/report.ts +1 -1
  592. package/lib/routes/qweather/3days.ts +14 -14
  593. package/lib/routes/qweather/now.ts +12 -10
  594. package/lib/routes/qweather/util.tsx +89 -0
  595. package/lib/routes/qwenlm/blog.ts +75 -0
  596. package/lib/routes/qwenlm/namespace.ts +6 -0
  597. package/lib/routes/radio-canada/latest.ts +30 -17
  598. package/lib/routes/railway/index.ts +73 -0
  599. package/lib/routes/railway/namespace.ts +8 -0
  600. package/lib/routes/rawkuma/manga.ts +1 -0
  601. package/lib/routes/reuters/common.ts +0 -3
  602. package/lib/routes/rockthejvm/articles.ts +167 -0
  603. package/lib/routes/rockthejvm/namespace.ts +9 -0
  604. package/lib/routes/rockthejvm/templates/description.art +7 -0
  605. package/lib/routes/ruc/ai.ts +1 -1
  606. package/lib/routes/ruc/hr.ts +1 -1
  607. package/lib/routes/samrdprc/index.ts +241 -0
  608. package/lib/routes/samrdprc/namespace.ts +7 -0
  609. package/lib/routes/samrdprc/news.ts +79 -0
  610. package/lib/routes/sankei/namespace.ts +7 -0
  611. package/lib/routes/sankei/news.ts +68 -0
  612. package/lib/routes/sankei/topics.ts +71 -0
  613. package/lib/routes/sciencenet/user.ts +1 -1
  614. package/lib/routes/scientificamerican/podcast.ts +2 -2
  615. package/lib/routes/scitechvista/index.ts +99 -0
  616. package/lib/routes/scitechvista/namespace.ts +7 -0
  617. package/lib/routes/scitechvista/templates/description.art +6 -0
  618. package/lib/routes/scoop/apps.ts +186 -0
  619. package/lib/routes/scoop/namespace.ts +9 -0
  620. package/lib/routes/scoop/templates/description.art +56 -0
  621. package/lib/routes/scpta/namespace.ts +8 -0
  622. package/lib/routes/scpta/news.ts +101 -0
  623. package/lib/routes/sdo/ff14risingstones/api.ts +78 -0
  624. package/lib/routes/sdo/ff14risingstones/constant.ts +338 -0
  625. package/lib/routes/sdo/ff14risingstones/posts.ts +80 -0
  626. package/lib/routes/sdo/ff14risingstones/strats.ts +75 -0
  627. package/lib/routes/sdo/ff14risingstones/templates/duties-party.art +41 -0
  628. package/lib/routes/sdo/ff14risingstones/templates/fc-party.art +26 -0
  629. package/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art +9 -0
  630. package/lib/routes/sdo/ff14risingstones/templates/rp-party.art +15 -0
  631. package/lib/routes/sdo/ff14risingstones/timeline.ts +31 -0
  632. package/lib/routes/sdo/ff14risingstones/types/dynamic.ts +50 -0
  633. package/lib/routes/sdo/ff14risingstones/types/index.ts +3 -0
  634. package/lib/routes/sdo/ff14risingstones/types/other.ts +57 -0
  635. package/lib/routes/sdo/ff14risingstones/types/party.ts +111 -0
  636. package/lib/routes/sdo/ff14risingstones/user-dynamics.ts +32 -0
  637. package/lib/routes/sdo/ff14risingstones/user-posts.ts +32 -0
  638. package/lib/routes/sdo/ff14risingstones/user-resently.ts +38 -0
  639. package/lib/routes/sdo/ff14risingstones/user-strats.ts +32 -0
  640. package/lib/routes/sdo/ff14risingstones/utils.ts +215 -0
  641. package/lib/routes/sdo/namespace.ts +7 -0
  642. package/lib/routes/secretsanfrancisco/namespace.ts +7 -0
  643. package/lib/routes/secretsanfrancisco/rss.ts +101 -0
  644. package/lib/routes/secretsanfrancisco/templates/description.art +9 -0
  645. package/lib/routes/seekingalpha/index.ts +1 -1
  646. package/lib/routes/sehuatang/index.ts +29 -31
  647. package/lib/routes/sehuatang/user.ts +1 -0
  648. package/lib/routes/setn/index.ts +11 -2
  649. package/lib/routes/seu/cyber/index.ts +78 -0
  650. package/lib/routes/showstart/utils.ts +1 -1
  651. package/lib/routes/shu/global.ts +6 -5
  652. package/lib/routes/shu/xxgk.ts +107 -0
  653. package/lib/routes/shuiguopai/index.ts +3 -0
  654. package/lib/routes/sicau/jiaowu.ts +42 -34
  655. package/lib/routes/sis001/author.ts +1 -0
  656. package/lib/routes/sis001/forum.ts +1 -0
  657. package/lib/routes/sjtu/jwc.ts +1 -1
  658. package/lib/routes/sjtu/seiee/icisee.ts +67 -0
  659. package/lib/routes/skeb/following-creators.ts +1 -0
  660. package/lib/routes/skeb/following-works.ts +1 -0
  661. package/lib/routes/skeb/friend-works.ts +1 -0
  662. package/lib/routes/skeb/index.ts +1 -0
  663. package/lib/routes/skeb/search.ts +1 -0
  664. package/lib/routes/skeb/works.ts +44 -25
  665. package/lib/routes/skebetter/illust.ts +1 -0
  666. package/lib/routes/skebetter/index.ts +1 -0
  667. package/lib/routes/skebetter/manga.ts +1 -0
  668. package/lib/routes/sketis/isabelle-dev/blog/index.ts +1 -1
  669. package/lib/routes/smartlink/index.ts +84 -0
  670. package/lib/routes/smartlink/namespace.ts +7 -0
  671. package/lib/routes/sohu/mp.ts +18 -7
  672. package/lib/routes/sotwe/namespace.ts +1 -0
  673. package/lib/routes/sotwe/user.ts +98 -0
  674. package/lib/routes/spankbang/new-videos.ts +1 -0
  675. package/lib/routes/spglobal/ratings.ts +1 -1
  676. package/lib/routes/sspai/index.ts +5 -1
  677. package/lib/routes/stanford/blog.ts +77 -0
  678. package/lib/routes/stanford/namespace.ts +7 -0
  679. package/lib/routes/stcn/index.ts +1 -2
  680. package/lib/routes/stcn/rank.ts +1 -2
  681. package/lib/routes/storm/channel.ts +80 -0
  682. package/lib/routes/surfshark/blog.ts +273 -77
  683. package/lib/routes/surfshark/templates/description.art +16 -4
  684. package/lib/routes/sustainabilitymag/articles.ts +1 -1
  685. package/lib/routes/syosetu/dev.ts +1 -1
  686. package/lib/routes/syosetu/index.ts +1 -1
  687. package/lib/routes/syosetu/ranking-isekai.ts +1 -1
  688. package/lib/routes/szse/disclosure/listed-notice.ts +44 -6
  689. package/lib/routes/t66y/index.ts +1 -0
  690. package/lib/routes/t66y/post.ts +1 -0
  691. package/lib/routes/taobao/mysql.ts +157 -0
  692. package/lib/routes/taobao/namespace.ts +2 -2
  693. package/lib/routes/taptap/topic.ts +16 -9
  694. package/lib/routes/techcrunch/category.ts +48 -0
  695. package/lib/routes/techcrunch/news.ts +1 -0
  696. package/lib/routes/techpowerup/index.ts +11 -11
  697. package/lib/routes/techpowerup/namespace.ts +1 -1
  698. package/lib/routes/techpowerup/review.ts +12 -12
  699. package/lib/routes/techpowerup/utils.ts +2 -2
  700. package/lib/routes/telegram/channel-media.ts +249 -0
  701. package/lib/routes/telegram/channel.ts +7 -6
  702. package/lib/routes/telegram/stories.ts +130 -0
  703. package/lib/routes/telegram/tglib/channel.ts +146 -117
  704. package/lib/routes/telegram/tglib/client.ts +37 -139
  705. package/lib/routes/tesla/cx.ts +2 -2
  706. package/lib/routes/test/index.ts +5 -1
  707. package/lib/routes/thegadgetflow/namespace.ts +7 -0
  708. package/lib/routes/thegadgetflow/rss.ts +99 -0
  709. package/lib/routes/thegadgetflow/templates/description.art +9 -0
  710. package/lib/routes/themoviedb/episodes.ts +1 -1
  711. package/lib/routes/theverge/index.ts +20 -6
  712. package/lib/routes/thewirehindi/category.ts +78 -0
  713. package/lib/routes/thewirehindi/index.ts +43 -0
  714. package/lib/routes/thewirehindi/namespace.ts +7 -0
  715. package/lib/routes/thewirehindi/templates/description.art +9 -0
  716. package/lib/routes/thewirehindi/utils.ts +33 -0
  717. package/lib/routes/threads/utils.ts +9 -5
  718. package/lib/routes/tidb/blog.ts +314 -0
  719. package/lib/routes/tidb/namespace.ts +9 -0
  720. package/lib/routes/tju/yzb/index.ts +2 -2
  721. package/lib/routes/tmtpost/column.ts +1 -1
  722. package/lib/routes/toutiao/user.ts +2 -2
  723. package/lib/routes/trendforce/namespace.ts +9 -0
  724. package/lib/routes/trendforce/new.ts +113 -0
  725. package/lib/routes/tsinghua/news.ts +87 -0
  726. package/lib/routes/tumblr/namespace.ts +17 -0
  727. package/lib/routes/tumblr/posts.ts +74 -0
  728. package/lib/routes/tumblr/utils.ts +110 -0
  729. package/lib/routes/tver/namespace.ts +7 -0
  730. package/lib/routes/tver/series.ts +98 -0
  731. package/lib/routes/twitter/api/mobile-api/api.ts +1 -1
  732. package/lib/routes/twitter/api/web-api/api.ts +5 -1
  733. package/lib/routes/twitter/api/web-api/login.ts +1 -3
  734. package/lib/routes/twitter/api/web-api/utils.ts +23 -1
  735. package/lib/routes/twitter/utils.ts +21 -21
  736. package/lib/routes/txrjy/fornumtopic.ts +2 -2
  737. package/lib/routes/typst/universe.ts +1 -1
  738. package/lib/routes/uber/blog.ts +87 -46
  739. package/lib/routes/udn/breaking-news.ts +2 -2
  740. package/lib/routes/udn/global/index.ts +37 -25
  741. package/lib/routes/udn/global/tag.ts +16 -9
  742. package/lib/routes/uestc/auto.ts +1 -1
  743. package/lib/routes/uestc/cqe.ts +1 -1
  744. package/lib/routes/uestc/scse.ts +1 -1
  745. package/lib/routes/uestc/sice.ts +1 -1
  746. package/lib/routes/uestc/sise.ts +1 -1
  747. package/lib/routes/upc/jwc.ts +32 -46
  748. package/lib/routes/uptimerobot/rss.ts +1 -1
  749. package/lib/routes/uraaka-joshi/uraaka-joshi-user.ts +1 -0
  750. package/lib/routes/uraaka-joshi/uraaka-joshi.ts +3 -0
  751. package/lib/routes/visionias/daily-news-summary.ts +65 -0
  752. package/lib/routes/visionias/monthly-magazine.ts +68 -0
  753. package/lib/routes/visionias/news-today.ts +3 -13
  754. package/lib/routes/visionias/utils.ts +5 -5
  755. package/lib/routes/visionias/weekly-focus.ts +2 -2
  756. package/lib/routes/wainao/topics.ts +1 -1
  757. package/lib/routes/warhammer-community/namespace.ts +7 -0
  758. package/lib/routes/warhammer-community/news.ts +73 -0
  759. package/lib/routes/wdfxw/bookfree.ts +528 -0
  760. package/lib/routes/wdfxw/namespace.ts +8 -0
  761. package/lib/routes/wdfxw/templates/description.art +13 -0
  762. package/lib/routes/weibo/utils.ts +17 -9
  763. package/lib/routes/whu/swrh.ts +1 -1
  764. package/lib/routes/wikipedia/current-events.ts +411 -0
  765. package/lib/routes/wikipedia/namespace.ts +7 -0
  766. package/lib/routes/windsurf/blog.ts +118 -0
  767. package/lib/routes/windsurf/changelog.ts +100 -0
  768. package/lib/routes/windsurf/namespace.ts +9 -0
  769. package/lib/routes/windsurf/templates/description.art +21 -0
  770. package/lib/routes/wnacg/category.ts +3 -0
  771. package/lib/routes/wnacg/index.ts +3 -0
  772. package/lib/routes/wnacg/tag.ts +3 -0
  773. package/lib/routes/wohnnet/index.ts +2 -2
  774. package/lib/routes/x6d/index.ts +1 -1
  775. package/lib/routes/xbookcn/blog.ts +1 -0
  776. package/lib/routes/xiaohongshu/user.ts +2 -2
  777. package/lib/routes/xiaohongshu/util.ts +15 -10
  778. package/lib/routes/xiaoyuzhou/pickup.ts +1 -1
  779. package/lib/routes/ximalaya/album.ts +32 -70
  780. package/lib/routes/ximalaya/types.ts +48 -0
  781. package/lib/routes/ximalaya/utils.ts +9 -7
  782. package/lib/routes/xjtu/ee-jzxx.ts +1 -1
  783. package/lib/routes/xjtu/zs.ts +1 -1
  784. package/lib/routes/xmanhua/index.ts +1 -0
  785. package/lib/routes/xsijishe/forum.ts +1 -0
  786. package/lib/routes/xsijishe/rank.ts +1 -0
  787. package/lib/routes/xueqiu/cookies.ts +1 -1
  788. package/lib/routes/xueqiu/user.ts +24 -1
  789. package/lib/routes/xwenming/index.ts +184 -0
  790. package/lib/routes/xwenming/namespace.ts +9 -0
  791. package/lib/routes/xyu/library.ts +63 -0
  792. package/lib/routes/xyu/namespace.ts +7 -0
  793. package/lib/routes/xyu/notices.ts +116 -0
  794. package/lib/routes/yahoo/news/utils.ts +8 -4
  795. package/lib/routes/yande/post.ts +3 -0
  796. package/lib/routes/ymgal/article.ts +1 -1
  797. package/lib/routes/ymgal/game.ts +1 -0
  798. package/lib/routes/yoasobi-music/media.ts +1 -1
  799. package/lib/routes/youtube/api/google.ts +41 -0
  800. package/lib/routes/youtube/api/subtitles.ts +86 -0
  801. package/lib/routes/youtube/api/youtubei.ts +28 -22
  802. package/lib/routes/youtube/channel.ts +1 -1
  803. package/lib/routes/youtube/community.ts +7 -5
  804. package/lib/routes/youtube/user.ts +1 -1
  805. package/lib/routes/youtube/utils.ts +16 -14
  806. package/lib/routes/yuanliao/index.ts +1 -1
  807. package/lib/routes/zaimanhua/comic.ts +1 -0
  808. package/lib/routes/zaimanhua/update.ts +1 -0
  809. package/lib/routes/zaker/utils.ts +1 -1
  810. package/lib/routes/zaobao/interactive.ts +18 -7
  811. package/lib/routes/zaobao/other.ts +3 -2
  812. package/lib/routes/zaobao/realtime.ts +3 -2
  813. package/lib/routes/zaobao/util.tsx +185 -0
  814. package/lib/routes/zaobao/zaobao.tsx +23 -0
  815. package/lib/routes/zaobao/znews.ts +3 -2
  816. package/lib/routes/zhihu/activities.ts +12 -3
  817. package/lib/routes/zhihu/answers.ts +7 -1
  818. package/lib/routes/zhihu/daily-section.ts +19 -24
  819. package/lib/routes/zhihu/daily.ts +8 -11
  820. package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
  821. package/lib/routes/zhihu/posts.ts +14 -6
  822. package/lib/routes/zhihu/question.ts +7 -1
  823. package/lib/routes/zhihu/types.ts +29 -29
  824. package/lib/routes/zhihu/utils.ts +59 -44
  825. package/lib/routes/zhizhuan100/namespace.ts +7 -0
  826. package/lib/routes/zhizhuan100/report.ts +79 -0
  827. package/lib/routes/zimuxia/portfolio.ts +1 -1
  828. package/lib/routes/zju/cse/index.ts +102 -0
  829. package/lib/routes/zju/sis/index.ts +161 -0
  830. package/lib/routes/zodgame/forum.ts +1 -0
  831. package/lib/server.ts +5 -0
  832. package/lib/types.ts +59 -55
  833. package/lib/utils/helpers.ts +1 -1
  834. package/lib/utils/logger.ts +1 -1
  835. package/lib/utils/ofetch.ts +1 -1
  836. package/lib/utils/proxy/index.ts +102 -18
  837. package/lib/utils/proxy/multi-proxy.ts +139 -0
  838. package/lib/utils/proxy/unify-proxy.ts +3 -1
  839. package/lib/utils/puppeteer-utils.test.ts +6 -6
  840. package/lib/utils/puppeteer.test.ts +14 -27
  841. package/lib/utils/puppeteer.ts +51 -37
  842. package/lib/utils/readable-social.test.ts +65 -0
  843. package/lib/utils/readable-social.ts +15 -1
  844. package/lib/utils/request-rewriter/fetch.ts +42 -4
  845. package/lib/views/index.tsx +4 -4
  846. package/package.json +76 -80
  847. package/lib/routes/gdufs/xwxy/xwxy-news.ts +0 -90
  848. package/lib/routes/hit/jwc.ts +0 -86
  849. package/lib/routes/mixcloud/queries.ts +0 -2274
  850. package/lib/routes/picuki/utils.ts +0 -19
  851. package/lib/routes/qweather/templates/3days.art +0 -22
  852. package/lib/routes/qweather/templates/now.art +0 -16
  853. package/lib/routes/xinhuanet/app.ts +0 -109
  854. package/lib/routes/zaobao/templates/zaobao.art +0 -17
  855. package/lib/routes/zaobao/util.ts +0 -195
  856. package/lib/routes-deprecated/dev.to/top.js +0 -40
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>RSSHub</title><rect width="24" height="24" fill="#ffd6a6" rx="7.636"/><path fill="#ff8549" d="M.142 6.16Q.002 6.875 0 7.635v8.728A7.636 7.636 0 0 0 7.636 24h8.728a7.7 7.7 0 0 0 1.477-.142 13.26 13.26 0 0 0 1.25-5.64c0-7.35-5.959-13.309-13.31-13.309a13.25 13.25 0 0 0-5.64 1.25"/><circle cx="5.727" cy="18.273" r="4.964" fill="#ff2900"/></svg>
package/lib/config.ts CHANGED
@@ -37,6 +37,7 @@ export type Config = {
37
37
  };
38
38
  // proxy
39
39
  proxyUri?: string;
40
+ proxyUris?: string[];
40
41
  proxy: {
41
42
  protocol?: string;
42
43
  host?: string;
@@ -44,6 +45,8 @@ export type Config = {
44
45
  auth?: string;
45
46
  url_regex: string;
46
47
  strategy: 'on_retry' | 'all';
48
+ failoverTimeout?: number;
49
+ healthCheckInterval?: number;
47
50
  };
48
51
  pacUri?: string;
49
52
  pacScript?: string;
@@ -73,6 +76,7 @@ export type Config = {
73
76
  allow_user_hotlink_template: boolean;
74
77
  filter_regex_engine: string;
75
78
  allow_user_supply_unsafe_domain: boolean;
79
+ disable_nsfw: boolean;
76
80
  };
77
81
  suffix?: string;
78
82
  titleLengthLimit: number;
@@ -98,6 +102,7 @@ export type Config = {
98
102
  cookies: Record<string, string | undefined>;
99
103
  dmImgList?: string;
100
104
  dmImgInter?: string;
105
+ excludeSubtitles?: boolean;
101
106
  };
102
107
  bitbucket: {
103
108
  username?: string;
@@ -182,6 +187,7 @@ export type Config = {
182
187
  };
183
188
  hefeng: {
184
189
  key?: string;
190
+ apiHost?: string;
185
191
  };
186
192
  infzm: {
187
193
  cookie?: string;
@@ -216,6 +222,9 @@ export type Config = {
216
222
  lightnovel: {
217
223
  cookie?: string;
218
224
  };
225
+ lofter: {
226
+ cookies?: string;
227
+ };
219
228
  lorientlejour: {
220
229
  token?: string;
221
230
  username?: string;
@@ -255,6 +264,10 @@ export type Config = {
255
264
  misskey: {
256
265
  accessToken?: string;
257
266
  };
267
+ mixi2: {
268
+ authToken?: string;
269
+ authKey?: string;
270
+ };
258
271
  mox: {
259
272
  cookie: string;
260
273
  };
@@ -313,6 +326,10 @@ export type Config = {
313
326
  scihub: {
314
327
  host?: string;
315
328
  };
329
+ sdo: {
330
+ ff14risingstones?: string;
331
+ ua?: string;
332
+ };
316
333
  sis001: {
317
334
  baseUrl?: string;
318
335
  };
@@ -348,6 +365,11 @@ export type Config = {
348
365
  tsdm39: {
349
366
  cookie: string;
350
367
  };
368
+ tumblr: {
369
+ clientId?: string;
370
+ clientSecret?: string;
371
+ refreshToken?: string;
372
+ };
351
373
  twitter: {
352
374
  username?: string[];
353
375
  password?: string[];
@@ -456,7 +478,7 @@ const calculateValue = () => {
456
478
  const _value = {
457
479
  // app config
458
480
  disallowRobot: toBoolean(envs.DISALLOW_ROBOT, false),
459
- enableCluster: envs.ENABLE_CLUSTER,
481
+ enableCluster: toBoolean(envs.ENABLE_CLUSTER, false),
460
482
  isPackage: !!envs.IS_PACKAGE,
461
483
  nodeName: envs.NODE_NAME,
462
484
  puppeteerWSEndpoint: envs.PUPPETEER_WS_ENDPOINT,
@@ -487,6 +509,11 @@ const calculateValue = () => {
487
509
  },
488
510
  // proxy
489
511
  proxyUri: envs.PROXY_URI,
512
+ proxyUris: envs.PROXY_URIS
513
+ ? envs.PROXY_URIS.split(',')
514
+ .map((uri) => uri.trim())
515
+ .filter(Boolean)
516
+ : undefined,
490
517
  proxy: {
491
518
  protocol: envs.PROXY_PROTOCOL,
492
519
  host: envs.PROXY_HOST,
@@ -494,6 +521,8 @@ const calculateValue = () => {
494
521
  auth: envs.PROXY_AUTH,
495
522
  url_regex: envs.PROXY_URL_REGEX || '.*',
496
523
  strategy: envs.PROXY_STRATEGY || 'all', // all / on_retry
524
+ failoverTimeout: toInt(envs.PROXY_FAILOVER_TIMEOUT, 5000),
525
+ healthCheckInterval: toInt(envs.PROXY_HEALTH_CHECK_INTERVAL, 60000),
497
526
  },
498
527
  pacUri: envs.PAC_URI,
499
528
  pacScript: envs.PAC_SCRIPT,
@@ -524,6 +553,7 @@ const calculateValue = () => {
524
553
  allow_user_hotlink_template: toBoolean(envs.ALLOW_USER_HOTLINK_TEMPLATE, false),
525
554
  filter_regex_engine: envs.FILTER_REGEX_ENGINE || 're2',
526
555
  allow_user_supply_unsafe_domain: toBoolean(envs.ALLOW_USER_SUPPLY_UNSAFE_DOMAIN, false),
556
+ disable_nsfw: toBoolean(envs.DISABLE_NSFW, false),
527
557
  },
528
558
  suffix: envs.SUFFIX,
529
559
  titleLengthLimit: toInt(envs.TITLE_LENGTH_LIMIT, 150),
@@ -549,6 +579,7 @@ const calculateValue = () => {
549
579
  cookies: bilibili_cookies,
550
580
  dmImgList: envs.BILIBILI_DM_IMG_LIST,
551
581
  dmImgInter: envs.BILIBILI_DM_IMG_INTER,
582
+ excludeSubtitles: toBoolean(envs.BILIBILI_EXCLUDE_SUBTITLES, false),
552
583
  },
553
584
  bitbucket: {
554
585
  username: envs.BITBUCKET_USERNAME,
@@ -633,6 +664,7 @@ const calculateValue = () => {
633
664
  },
634
665
  hefeng: {
635
666
  key: envs.HEFENG_KEY,
667
+ apiHost: envs.HEFENG_API_HOST,
636
668
  },
637
669
  infzm: {
638
670
  cookie: envs.INFZM_COOKIE,
@@ -667,6 +699,9 @@ const calculateValue = () => {
667
699
  lightnovel: {
668
700
  cookie: envs.SECURITY_KEY,
669
701
  },
702
+ lofter: {
703
+ cookies: envs.LOFTER_COOKIE,
704
+ },
670
705
  lorientlejour: {
671
706
  token: envs.LORIENTLEJOUR_TOKEN,
672
707
  username: envs.LORIENTLEJOUR_USERNAME,
@@ -706,6 +741,10 @@ const calculateValue = () => {
706
741
  misskey: {
707
742
  accessToken: envs.MISSKEY_ACCESS_TOKEN,
708
743
  },
744
+ mixi2: {
745
+ authToken: envs.MIXI2_AUTH_TOKEN,
746
+ authKey: envs.MIXI2_AUTH_KEY,
747
+ },
709
748
  mox: {
710
749
  cookie: envs.MOX_COOKIE,
711
750
  },
@@ -764,6 +803,10 @@ const calculateValue = () => {
764
803
  scihub: {
765
804
  host: envs.SCIHUB_HOST || 'https://sci-hub.se/',
766
805
  },
806
+ sdo: {
807
+ ff14risingstones: envs.SDO_FF14RISINGSTONES,
808
+ ua: envs.SDO_UA,
809
+ },
767
810
  sis001: {
768
811
  baseUrl: envs.SIS001_BASE_URL || 'https://sis001.com',
769
812
  },
@@ -799,6 +842,11 @@ const calculateValue = () => {
799
842
  tsdm39: {
800
843
  cookie: envs.TSDM39_COOKIES,
801
844
  },
845
+ tumblr: {
846
+ clientId: envs.TUMBLR_CLIENT_ID,
847
+ clientSecret: envs.TUMBLR_CLIENT_SECRET,
848
+ refreshToken: envs.TUMBLR_REFRESH_TOKEN,
849
+ },
802
850
  twitter: {
803
851
  username: envs.TWITTER_USERNAME?.split(','),
804
852
  password: envs.TWITTER_PASSWORD?.split(','),
@@ -55,6 +55,14 @@ describe('invalid-parameter-error', () => {
55
55
  }, 20000);
56
56
  });
57
57
 
58
+ describe('captcha-error', () => {
59
+ it(`captcha-error`, async () => {
60
+ const response = await request.get('/test/captcha-error');
61
+ expect(response.status).toBe(503);
62
+ expect(response.text).toMatch('CaptchaError: Test captcha error');
63
+ }, 20000);
64
+ });
65
+
58
66
  describe('route throws an error', () => {
59
67
  it('route path error should have path mounted', async () => {
60
68
  await request.get('/test/error');
@@ -67,19 +75,21 @@ describe('route throws an error', () => {
67
75
  const value = $(item).find('.debug-value').html()?.trim();
68
76
  switch (key) {
69
77
  case 'Request Amount:':
70
- expect(value).toBe('11');
78
+ expect(value).toBe('12');
71
79
  break;
72
80
  case 'Hot Routes:':
73
- expect(value).toBe('8 /test/:id/:params?<br>');
81
+ expect(value).toBe('9 /test/:id/:params?<br>');
74
82
  break;
75
83
  case 'Hot Paths:':
76
- expect(value).toBe('2 /test/error<br>2 /test/slow<br>2 /test/slow4<br>1 /test/httperror<br>1 /test/config-not-found-error<br>1 /test/invalid-parameter-error<br>1 /thisDoesNotExist<br>1 /<br>');
84
+ expect(value).toBe(
85
+ '2 /test/error<br>2 /test/slow<br>2 /test/slow4<br>1 /test/httperror<br>1 /test/config-not-found-error<br>1 /test/invalid-parameter-error<br>1 /test/captcha-error<br>1 /thisDoesNotExist<br>1 /<br>'
86
+ );
77
87
  break;
78
88
  case 'Hot Error Routes:':
79
- expect(value).toBe('5 /test/:id/:params?<br>');
89
+ expect(value).toBe('6 /test/:id/:params?<br>');
80
90
  break;
81
91
  case 'Hot Error Paths:':
82
- expect(value).toBe('2 /test/error<br>1 /test/httperror<br>1 /test/slow4<br>1 /test/config-not-found-error<br>1 /test/invalid-parameter-error<br>1 /thisDoesNotExist<br>');
92
+ expect(value).toBe('2 /test/error<br>1 /test/httperror<br>1 /test/slow4<br>1 /test/config-not-found-error<br>1 /test/invalid-parameter-error<br>1 /test/captcha-error<br>1 /thisDoesNotExist<br>');
83
93
  break;
84
94
  default:
85
95
  }
@@ -1,4 +1,5 @@
1
1
  import { type NotFoundHandler, type ErrorHandler } from 'hono';
2
+ import { routePath } from 'hono/route';
2
3
  import { getDebugInfo, setDebugInfo } from '@/utils/debug-info';
3
4
  import { config } from '@/config';
4
5
  import * as Sentry from '@sentry/node';
@@ -11,7 +12,7 @@ import { requestMetric } from '@/utils/otel';
11
12
 
12
13
  export const errorHandler: ErrorHandler = (error, ctx) => {
13
14
  const requestPath = ctx.req.path;
14
- const matchedRoute = ctx.req.routePath;
15
+ const matchedRoute = routePath(ctx);
15
16
  const hasMatchedRoute = matchedRoute !== '/*';
16
17
 
17
18
  const debug = getDebugInfo();
@@ -42,7 +43,7 @@ export const errorHandler: ErrorHandler = (error, ctx) => {
42
43
  });
43
44
  }
44
45
 
45
- let errorMessage = process.env.NODE_ENV === 'production' ? error.message : error.stack || error.message;
46
+ let errorMessage = (process.env.NODE_ENV || process.env.VERCEL_ENV) === 'production' ? error.message : error.stack || error.message;
46
47
  switch (error.constructor.name) {
47
48
  case 'HTTPError':
48
49
  case 'RequestError':
@@ -0,0 +1,5 @@
1
+ class CaptchaError extends Error {
2
+ name = 'CaptchaError';
3
+ }
4
+
5
+ export default CaptchaError;
package/lib/index.ts CHANGED
@@ -3,25 +3,59 @@ import logger from '@/utils/logger';
3
3
  import { getLocalhostAddress } from '@/utils/common-utils';
4
4
  import { config } from '@/config';
5
5
  import app from '@/app';
6
+ import os from 'node:os';
7
+ import cluster from 'node:cluster';
8
+ import process from 'node:process';
6
9
 
7
10
  const port = config.connect.port;
8
11
  const hostIPList = getLocalhostAddress();
9
12
 
10
- logger.info(`🎉 RSSHub is running on port ${port}! Cheers!`);
11
- logger.info(`🔗 Local: 👉 http://localhost:${port}`);
12
- if (config.listenInaddrAny) {
13
- for (const ip of hostIPList) {
14
- logger.info(`🔗 Network: 👉 http://${ip}:${port}`);
13
+ let server;
14
+ if (config.enableCluster) {
15
+ if (cluster.isPrimary) {
16
+ logger.info(`🎉 RSSHub is running on port ${port}! Cheers!`);
17
+ logger.info(`🔗 Local: 👉 http://localhost:${port}`);
18
+ if (config.listenInaddrAny) {
19
+ for (const ip of hostIPList) {
20
+ logger.info(`🔗 Network: 👉 http://${ip}:${port}`);
21
+ }
22
+ }
23
+
24
+ logger.info(`Primary ${process.pid} is running`);
25
+
26
+ const numCPUs = os.availableParallelism();
27
+
28
+ for (let i = 0; i < numCPUs; i++) {
29
+ cluster.fork();
30
+ }
31
+ } else {
32
+ logger.info(`Worker ${process.pid} is running`);
33
+ serve({
34
+ fetch: app.fetch,
35
+ hostname: config.listenInaddrAny ? '::' : '127.0.0.1',
36
+ port,
37
+ serverOptions: {
38
+ maxHeaderSize: 1024 * 32,
39
+ },
40
+ });
41
+ }
42
+ } else {
43
+ logger.info(`🎉 RSSHub is running on port ${port}! Cheers!`);
44
+ logger.info(`🔗 Local: 👉 http://localhost:${port}`);
45
+ if (config.listenInaddrAny) {
46
+ for (const ip of hostIPList) {
47
+ logger.info(`🔗 Network: 👉 http://${ip}:${port}`);
48
+ }
15
49
  }
16
- }
17
50
 
18
- const server = serve({
19
- fetch: app.fetch,
20
- hostname: config.listenInaddrAny ? '::' : '127.0.0.1',
21
- port,
22
- serverOptions: {
23
- maxHeaderSize: 1024 * 32,
24
- },
25
- });
51
+ server = serve({
52
+ fetch: app.fetch,
53
+ hostname: config.listenInaddrAny ? '::' : '127.0.0.1',
54
+ port,
55
+ serverOptions: {
56
+ maxHeaderSize: 1024 * 32,
57
+ },
58
+ });
59
+ }
26
60
 
27
61
  export default server;
@@ -55,6 +55,10 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
55
55
  // Doesn't hit the cache? We need to let others know!
56
56
  await cacheModule.globalCache.set(controlKey, '1', config.cache.requestTimeout);
57
57
 
58
+ // let routers control cache
59
+ ctx.set('cacheKey', key);
60
+ ctx.set('cacheControlKey', controlKey);
61
+
58
62
  try {
59
63
  await next();
60
64
  } catch (error) {
@@ -1,4 +1,5 @@
1
1
  import { MiddlewareHandler } from 'hono';
2
+ import { routePath } from 'hono/route';
2
3
  import { getDebugInfo, setDebugInfo } from '@/utils/debug-info';
3
4
 
4
5
  const middleware: MiddlewareHandler = async (ctx, next) => {
@@ -17,11 +18,12 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
17
18
 
18
19
  {
19
20
  const debug = getDebugInfo();
20
- const hasMatchedRoute = ctx.req.routePath !== '/*';
21
- if (!debug.routes[ctx.req.routePath] && hasMatchedRoute) {
22
- debug.routes[ctx.req.routePath] = 0;
21
+ const rPath = routePath(ctx);
22
+ const hasMatchedRoute = rPath !== '/*';
23
+ if (!debug.routes[rPath] && hasMatchedRoute) {
24
+ debug.routes[rPath] = 0;
23
25
  }
24
- hasMatchedRoute && debug.routes[ctx.req.routePath]++;
26
+ hasMatchedRoute && debug.routes[rPath]++;
25
27
 
26
28
  if (ctx.res.headers.get('RSSHub-Cache-Status')) {
27
29
  debug.hitCache++;
@@ -1,4 +1,5 @@
1
1
  import { MiddlewareHandler } from 'hono';
2
+ import { routePath } from 'hono/route';
2
3
  import etagCalculate from 'etag';
3
4
  import { config } from '@/config';
4
5
  import { Data } from '@/types';
@@ -24,9 +25,10 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
24
25
  ctx.header('Access-Control-Allow-Origin', config.allowOrigin || new URL(ctx.req.url).host);
25
26
 
26
27
  await next();
28
+ const rPath = routePath(ctx);
27
29
 
28
- if (ctx.req.routePath !== '/*') {
29
- ctx.header('X-RSSHub-Route', ctx.req.routePath);
30
+ if (rPath !== '/*') {
31
+ ctx.header('X-RSSHub-Route', rPath);
30
32
  }
31
33
 
32
34
  const data: Data = ctx.get('data');
@@ -80,7 +80,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
80
80
 
81
81
  // sort items
82
82
  if (ctx.req.query('sorted') !== 'false') {
83
- data.item = data.item.sort((a: DataItem, b: DataItem) => +new Date(b.pubDate || 0) - +new Date(a.pubDate || 0));
83
+ data.item = data.item.toSorted((a: DataItem, b: DataItem) => +new Date(b.pubDate || 0) - +new Date(a.pubDate || 0));
84
84
  }
85
85
 
86
86
  const handleItem = (item: DataItem) => {
@@ -1,4 +1,4 @@
1
- import { describe, expect, it } from 'vitest';
1
+ import { describe, expect, it, vi } from 'vitest';
2
2
  import app from '@/app';
3
3
  import { config } from '@/config';
4
4
 
@@ -37,4 +37,27 @@ describe('registry', () => {
37
37
  expect(response.headers.get('cache-control')).toBe('no-cache');
38
38
  expect(await response.text()).toBe('ok');
39
39
  });
40
+
41
+ it('namespaces respects DISABLE_NSFW=true', async () => {
42
+ vi.resetModules();
43
+ vi.stubEnv('DISABLE_NSFW', 'true');
44
+
45
+ const { namespaces } = await import('./registry');
46
+
47
+ // All routes in all namespaces should not have nsfw features
48
+ for (const ns of Object.values(namespaces)) {
49
+ for (const route of Object.values(ns.routes)) {
50
+ expect(route.features?.nsfw).not.toBe(true);
51
+ }
52
+ }
53
+ expect(namespaces['2048']).toBeUndefined();
54
+ });
55
+
56
+ it('namespaces includes NSFW routes when DISABLE_NSFW=false', async () => {
57
+ vi.resetModules();
58
+ vi.stubEnv('DISABLE_NSFW', 'false');
59
+
60
+ const { namespaces } = await import('./registry');
61
+ expect(namespaces['2048']).toBeDefined();
62
+ });
40
63
  });
package/lib/registry.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { APIRoute, Namespace, Route } from '@/types';
2
2
  import { directoryImport } from 'directory-import';
3
3
  import { Hono, type Handler } from 'hono';
4
+ import { routePath } from 'hono/route';
4
5
  import path from 'node:path';
5
6
  import { serveStatic } from '@hono/node-server/serve-static';
6
7
  import { config } from '@/config';
@@ -13,16 +14,34 @@ import logger from '@/utils/logger';
13
14
 
14
15
  const __dirname = import.meta.dirname;
15
16
 
17
+ function isSafeRoutes(routes: RoutesType): boolean {
18
+ return Object.values(routes).every((route: Route) => !route.features?.nsfw);
19
+ }
20
+
21
+ function safeNamespaces(namespaces: NamespacesType): NamespacesType {
22
+ const safe: NamespacesType = {};
23
+
24
+ for (const [key, value] of Object.entries(namespaces)) {
25
+ if (value.routes === null || value.routes === undefined || isSafeRoutes(value.routes)) {
26
+ safe[key] = value;
27
+ }
28
+ }
29
+ return safe;
30
+ }
31
+
16
32
  let modules: Record<string, { route: Route } | { namespace: Namespace }> = {};
17
- let namespaces: Record<
33
+
34
+ type RoutesType = Record<
35
+ string,
36
+ Route & {
37
+ location: string;
38
+ }
39
+ >;
40
+
41
+ export type NamespacesType = Record<
18
42
  string,
19
43
  Namespace & {
20
- routes: Record<
21
- string,
22
- Route & {
23
- location: string;
24
- }
25
- >;
44
+ routes: RoutesType;
26
45
  apiRoutes: Record<
27
46
  string,
28
47
  APIRoute & {
@@ -30,15 +49,21 @@ let namespaces: Record<
30
49
  }
31
50
  >;
32
51
  }
33
- > = {};
52
+ >;
34
53
 
35
- switch (process.env.NODE_ENV) {
54
+ let namespaces: NamespacesType = {};
55
+
56
+ switch (process.env.NODE_ENV || process.env.VERCEL_ENV) {
36
57
  case 'production':
37
58
  namespaces = (await import('../assets/build/routes.js')).default;
38
59
  break;
39
60
  case 'test':
40
61
  // @ts-expect-error
41
62
  namespaces = await import('../assets/build/routes.json');
63
+ if (namespaces.default) {
64
+ // @ts-ignore
65
+ namespaces = namespaces.default;
66
+ }
42
67
  break;
43
68
  default:
44
69
  modules = directoryImport({
@@ -47,6 +72,10 @@ switch (process.env.NODE_ENV) {
47
72
  }) as typeof modules;
48
73
  }
49
74
 
75
+ if (config.feature.disable_nsfw) {
76
+ namespaces = safeNamespaces(namespaces);
77
+ }
78
+
50
79
  if (Object.keys(modules).length) {
51
80
  for (const module in modules) {
52
81
  const content = modules[module] as
@@ -126,7 +155,7 @@ const sortRoutes = (
126
155
  }
127
156
  >
128
157
  ) =>
129
- Object.entries(routes).sort(([pathA], [pathB]) => {
158
+ Object.entries(routes).toSorted(([pathA], [pathB]) => {
130
159
  const segmentsA = pathA.split('/');
131
160
  const segmentsB = pathB.split('/');
132
161
  const lenA = segmentsA.length;
@@ -158,7 +187,7 @@ for (const namespace in namespaces) {
158
187
 
159
188
  for (const [path, routeData] of sortedRoutes) {
160
189
  const wrappedHandler: Handler = async (ctx) => {
161
- logger.debug(`Matched route: ${ctx.req.routePath}`);
190
+ logger.debug(`Matched route: ${routePath(ctx)}`);
162
191
  if (!ctx.get('data')) {
163
192
  if (typeof routeData.handler !== 'function') {
164
193
  if (process.env.NODE_ENV === 'test') {
@@ -169,7 +198,11 @@ for (const namespace in namespaces) {
169
198
  routeData.handler = route.handler;
170
199
  }
171
200
  }
172
- ctx.set('data', await routeData.handler(ctx));
201
+ const response = await routeData.handler(ctx);
202
+ if (response instanceof Response) {
203
+ return response;
204
+ }
205
+ ctx.set('data', response);
173
206
  }
174
207
  };
175
208
  subApp.get(path, wrappedHandler);
@@ -222,7 +255,7 @@ if (config.debugInfo) {
222
255
  app.use(
223
256
  '/*',
224
257
  serveStatic({
225
- root: './lib/assets',
258
+ root: path.join(__dirname, 'assets'),
226
259
  rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path),
227
260
  })
228
261
  );
package/lib/router.js CHANGED
@@ -1357,7 +1357,7 @@ router.get('/forum4399/:mtag', lazyloadRouteHandler('./routes/game4399/forum'));
1357
1357
  router.get('/nudt/yjszs/:id?', lazyloadRouteHandler('./routes/universities/nudt/yjszs'));
1358
1358
 
1359
1359
  // dev.to
1360
- router.get('/dev.to/top/:period', lazyloadRouteHandler('./routes/dev.to/top'));
1360
+ // router.get('/dev.to/top/:period', lazyloadRouteHandler('./routes/dev.to/top'));
1361
1361
 
1362
1362
  // GameRes 游资网
1363
1363
  router.get('/gameres/hot', lazyloadRouteHandler('./routes/gameres/hot'));