rsshub 1.0.0-master.ff3a9ce → 1.0.0-master.ff3ea5a

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.

Potentially problematic release.


This version of rsshub might be problematic. Click here for more details.

Files changed (388) hide show
  1. package/lib/config.ts +38 -0
  2. package/lib/errors/index.tsx +3 -2
  3. package/lib/middleware/debug.ts +6 -4
  4. package/lib/middleware/header.ts +4 -2
  5. package/lib/registry.test.ts +24 -1
  6. package/lib/registry.ts +40 -11
  7. package/lib/router.js +1 -1
  8. package/lib/routes/121/namespace.ts +9 -0
  9. package/lib/routes/121/templates/description.art +17 -0
  10. package/lib/routes/121/weather-live.ts +104 -0
  11. package/lib/routes/141jav/index.ts +3 -0
  12. package/lib/routes/141ppv/index.ts +3 -0
  13. package/lib/routes/163/news/rank.ts +1 -1
  14. package/lib/routes/18comic/album.ts +59 -64
  15. package/lib/routes/18comic/index.ts +1 -0
  16. package/lib/routes/18comic/search.ts +53 -4
  17. package/lib/routes/18comic/utils.ts +70 -1
  18. package/lib/routes/2048/index.ts +1 -0
  19. package/lib/routes/30secondsofcode/utils.ts +0 -1
  20. package/lib/routes/6park/index.ts +1 -1
  21. package/lib/routes/7mmtv/index.ts +1 -0
  22. package/lib/routes/91porn/index.ts +1 -0
  23. package/lib/routes/95mm/tab.ts +1 -0
  24. package/lib/routes/agefans/detail.ts +1 -1
  25. package/lib/routes/aliyun/database-month.ts +1 -1
  26. package/lib/routes/anthropic/research.ts +112 -0
  27. package/lib/routes/apnews/topics.ts +2 -1
  28. package/lib/routes/apnews/utils.ts +1 -1
  29. package/lib/routes/apple/design.ts +54 -0
  30. package/lib/routes/apple/namespace.ts +1 -1
  31. package/lib/routes/aqara/post.ts +1 -1
  32. package/lib/routes/augmentcode/blog.ts +161 -0
  33. package/lib/routes/augmentcode/namespace.ts +9 -0
  34. package/lib/routes/augmentcode/templates/description.art +17 -0
  35. package/lib/routes/azul/namespace.ts +9 -0
  36. package/lib/routes/azul/packages.ts +105 -0
  37. package/lib/routes/banshujiang/index.ts +763 -0
  38. package/lib/routes/banshujiang/namespace.ts +9 -0
  39. package/lib/routes/banshujiang/templates/description.art +17 -0
  40. package/lib/routes/bfl/announcements.ts +1 -1
  41. package/lib/routes/bilibili/cache.ts +78 -0
  42. package/lib/routes/bilibili/danmaku.ts +1 -1
  43. package/lib/routes/bilibili/dynamic.ts +8 -2
  44. package/lib/routes/bilibili/video.ts +31 -73
  45. package/lib/routes/biquge/index.ts +1 -1
  46. package/lib/routes/bsky/keyword.ts +15 -10
  47. package/lib/routes/capitalmind/insights.ts +40 -0
  48. package/lib/routes/capitalmind/namespace.ts +8 -0
  49. package/lib/routes/capitalmind/podcasts.ts +41 -0
  50. package/lib/routes/capitalmind/utils.ts +122 -0
  51. package/lib/routes/cartoonmad/comic.ts +1 -1
  52. package/lib/routes/chikubi/index.ts +1 -0
  53. package/lib/routes/chikubi/tag.ts +1 -0
  54. package/lib/routes/chocolatey/namespace.ts +9 -0
  55. package/lib/routes/chocolatey/packages.ts +122 -0
  56. package/lib/routes/cmde/index.ts +1 -1
  57. package/lib/routes/cockroachlabs/blog.ts +113 -0
  58. package/lib/routes/cockroachlabs/namespace.ts +7 -0
  59. package/lib/routes/cool18/index.ts +4 -1
  60. package/lib/routes/coomer/index.ts +12 -6
  61. package/lib/routes/coomer/namespace.ts +1 -1
  62. package/lib/routes/copymanga/comic.ts +7 -9
  63. package/lib/routes/css-tricks/articles.ts +48 -0
  64. package/lib/routes/css-tricks/collections.ts +62 -0
  65. package/lib/routes/css-tricks/namespace.ts +8 -0
  66. package/lib/routes/css-tricks/popular.ts +39 -0
  67. package/lib/routes/css-tricks/utils.ts +103 -0
  68. package/lib/routes/cursor/changelog.ts +26 -17
  69. package/lib/routes/cursor/namespace.ts +1 -1
  70. package/lib/routes/cw/utils.ts +6 -13
  71. package/lib/routes/dealstreetasia/home.ts +1 -1
  72. package/lib/routes/dedao/index.ts +3 -3
  73. package/lib/routes/deepl/blog.ts +422 -0
  74. package/lib/routes/deepl/namespace.ts +9 -0
  75. package/lib/routes/deepl/templates/description.art +21 -0
  76. package/lib/routes/deeplearning/the-batch.ts +1 -1
  77. package/lib/routes/dev.to/guides.ts +100 -0
  78. package/lib/routes/dev.to/namespace.ts +8 -0
  79. package/lib/routes/dev.to/top.ts +105 -0
  80. package/lib/routes/dgut/jwb.ts +73 -0
  81. package/lib/routes/dgut/namespace.ts +9 -0
  82. package/lib/routes/digitalpolicyalert/activity-tracker.ts +135 -0
  83. package/lib/routes/digitalpolicyalert/namespace.ts +9 -0
  84. package/lib/routes/dnaindia/common.ts +26 -8
  85. package/lib/routes/douban/other/list.ts +3 -3
  86. package/lib/routes/e-hentai/index.ts +4 -1
  87. package/lib/routes/ehentai/tag.ts +1 -0
  88. package/lib/routes/englishhome/index.ts +55 -0
  89. package/lib/routes/englishhome/namespace.ts +6 -0
  90. package/lib/routes/epicgames/index.ts +2 -2
  91. package/lib/routes/espn/news.ts +1 -1
  92. package/lib/routes/expats/czech-news.ts +272 -0
  93. package/lib/routes/expats/namespace.ts +9 -0
  94. package/lib/routes/fanbox/index.ts +1 -0
  95. package/lib/routes/fanbox/utils.ts +1 -1
  96. package/lib/routes/fansly/tag.ts +1 -0
  97. package/lib/routes/fantia/search.ts +1 -1
  98. package/lib/routes/fantube/creator.ts +69 -0
  99. package/lib/routes/fantube/namespace.ts +7 -0
  100. package/lib/routes/fantube/templates/post.art +17 -0
  101. package/lib/routes/fantube/types.ts +100 -0
  102. package/lib/routes/fantube/utils.ts +268 -0
  103. package/lib/routes/follow/profile.ts +1 -1
  104. package/lib/routes/followin/news.ts +1 -1
  105. package/lib/routes/foresightnews/util.ts +1 -1
  106. package/lib/routes/freexcomic/book.ts +4 -1
  107. package/lib/routes/gamer/hot.ts +5 -5
  108. package/lib/routes/gaoyu/blog.ts +145 -0
  109. package/lib/routes/gaoyu/namespace.ts +9 -0
  110. package/lib/routes/gaoyu/templates/description.art +7 -0
  111. package/lib/routes/geocaching/blogs.ts +2 -2
  112. package/lib/routes/github/namespace.ts +1 -1
  113. package/lib/routes/github/private-feed.ts +229 -0
  114. package/lib/routes/github/star.ts +1 -1
  115. package/lib/routes/google/extension.ts +9 -10
  116. package/lib/routes/gov/beijing/bphc/index.ts +1 -1
  117. package/lib/routes/gov/ccdi/index.ts +1 -1
  118. package/lib/routes/gov/chongqing/sydwgkzp.ts +22 -6
  119. package/lib/routes/gov/customs/list.ts +1 -1
  120. package/lib/routes/gov/general/general.ts +1 -1
  121. package/lib/routes/gov/hangzhou/zwfw.ts +1 -1
  122. package/lib/routes/gov/pbc/goutongjiaoliu.ts +1 -1
  123. package/lib/routes/gov/shenzhen/szlh/index.ts +77 -0
  124. package/lib/routes/gov/shenzhen/szlh/namespace.ts +8 -0
  125. package/lib/routes/grist/utils.ts +5 -4
  126. package/lib/routes/hanime1/search.ts +4 -2
  127. package/lib/routes/hellogithub/report.ts +1 -1
  128. package/lib/routes/hit/hitgs.ts +240 -54
  129. package/lib/routes/hit/templates/description.art +7 -0
  130. package/lib/routes/hlju/namespace.ts +8 -0
  131. package/lib/routes/hlju/news.ts +141 -0
  132. package/lib/routes/hostmonit/cloudflareyes.ts +1 -1
  133. package/lib/routes/hotukdeals/index.ts +1 -1
  134. package/lib/routes/hyperdash/namespace.ts +7 -0
  135. package/lib/routes/hyperdash/templates/description.art +34 -0
  136. package/lib/routes/hyperdash/top-traders.ts +84 -0
  137. package/lib/routes/hyperdash/utils.ts +49 -0
  138. package/lib/routes/hypergryph/arknights/announce.ts +1 -1
  139. package/lib/routes/ielts/index.ts +1 -1
  140. package/lib/routes/infoq/topic.ts +16 -13
  141. package/lib/routes/instagram/web-api/index.ts +17 -13
  142. package/lib/routes/instagram/web-api/utils.ts +46 -63
  143. package/lib/routes/jamesclear/book-summaries.ts +40 -0
  144. package/lib/routes/jamesclear/great-speeches.ts +40 -0
  145. package/lib/routes/jamesclear/namespace.ts +8 -0
  146. package/lib/routes/jamesclear/quotes.ts +40 -0
  147. package/lib/routes/jamesclear/three-two-one.ts +41 -0
  148. package/lib/routes/jamesclear/utils.ts +22 -0
  149. package/lib/routes/japanpost/utils.ts +2 -2
  150. package/lib/routes/javbus/index.ts +3 -0
  151. package/lib/routes/javdb/tags.ts +1 -0
  152. package/lib/routes/javlibrary/star.ts +1 -0
  153. package/lib/routes/javtiful/actress.ts +3 -0
  154. package/lib/routes/javtiful/channel.ts +3 -0
  155. package/lib/routes/javtrailers/casts.ts +3 -0
  156. package/lib/routes/jetbrains/comments.ts +99 -0
  157. package/lib/routes/jetbrains/namespace.ts +8 -0
  158. package/lib/routes/jimmyspa/books.ts +1 -1
  159. package/lib/routes/jimmyspa/news.ts +1 -1
  160. package/lib/routes/jpxgmn/tab.ts +3 -0
  161. package/lib/routes/kakuyomu/works.ts +3 -0
  162. package/lib/routes/kaopu/news.ts +1 -1
  163. package/lib/routes/kemono/const.ts +1 -1
  164. package/lib/routes/kemono/index.ts +12 -11
  165. package/lib/routes/kemono/namespace.ts +1 -1
  166. package/lib/routes/kiro/blog.ts +131 -0
  167. package/lib/routes/kiro/changelog.ts +128 -0
  168. package/lib/routes/kiro/namespace.ts +9 -0
  169. package/lib/routes/konachan/post.ts +3 -0
  170. package/lib/routes/kovidgoyal/kitty/changelog.ts +83 -0
  171. package/lib/routes/kovidgoyal/namespace.ts +7 -0
  172. package/lib/routes/kunchengblog/essay.ts +1 -1
  173. package/lib/routes/landiannews/category.ts +1 -1
  174. package/lib/routes/landiannews/index.ts +1 -1
  175. package/lib/routes/landiannews/tag.ts +1 -1
  176. package/lib/routes/line/utils.ts +1 -1
  177. package/lib/routes/lineageos/changes.ts +79 -0
  178. package/lib/routes/lineageos/namespace.ts +9 -0
  179. package/lib/routes/linkedin/cn/renderer.ts +1 -1
  180. package/lib/routes/liquipedia/cs-matches.ts +42 -14
  181. package/lib/routes/literotica/new.ts +1 -0
  182. package/lib/routes/lofter/tag.ts +27 -3
  183. package/lib/routes/makerworld/contest.ts +51 -0
  184. package/lib/routes/makerworld/namespace.ts +7 -0
  185. package/lib/routes/makerworld/trending.ts +45 -0
  186. package/lib/routes/makerworld/user-upload.ts +54 -0
  187. package/lib/routes/makerworld/utils.ts +18 -0
  188. package/lib/routes/manhuagui/comic.ts +1 -1
  189. package/lib/routes/manus/blog.ts +77 -0
  190. package/lib/routes/manus/namespace.ts +7 -0
  191. package/lib/routes/mastodon/tag.ts +48 -0
  192. package/lib/routes/mathpix/blog.ts +155 -0
  193. package/lib/routes/mathpix/namespace.ts +9 -0
  194. package/lib/routes/mathpix/templates/description.art +21 -0
  195. package/lib/routes/mckinsey/cn/category-map.ts +9 -15
  196. package/lib/routes/mckinsey/cn/index.ts +77 -40
  197. package/lib/routes/melonbooks/search.ts +1 -0
  198. package/lib/routes/metacritic/index.ts +2 -2
  199. package/lib/routes/meteoblue/namespace.ts +8 -0
  200. package/lib/routes/meteoblue/weathernews.ts +75 -0
  201. package/lib/routes/meteor/index.ts +1 -1
  202. package/lib/routes/microsoft/addon.ts +7 -9
  203. package/lib/routes/mihoyo/zzz/news.ts +106 -0
  204. package/lib/routes/missav/new.ts +2 -1
  205. package/lib/routes/mit/hanlab.ts +61 -0
  206. package/lib/routes/mit/namespace.ts +6 -0
  207. package/lib/routes/mittrchina/index.ts +3 -3
  208. package/lib/routes/mixcloud/config.ts +129 -0
  209. package/lib/routes/mixcloud/index.ts +163 -107
  210. package/lib/routes/mixcloud/user-playlist.ts +31 -0
  211. package/lib/routes/mixi2/community.ts +72 -0
  212. package/lib/routes/mixi2/discovery.ts +52 -0
  213. package/lib/routes/mixi2/home.ts +51 -0
  214. package/lib/routes/mixi2/namespace.ts +8 -0
  215. package/lib/routes/mixi2/user.ts +77 -0
  216. package/lib/routes/mixi2/utils.ts +56 -0
  217. package/lib/routes/modelscope/learn.ts +94 -0
  218. package/lib/routes/moodysmismicrosite/report.ts +1 -1
  219. package/lib/routes/musify/index.ts +130 -0
  220. package/lib/routes/musify/namespace.ts +9 -0
  221. package/lib/routes/musikguru/namespace.ts +9 -0
  222. package/lib/routes/musikguru/news.ts +146 -0
  223. package/lib/routes/musikguru/templates/description.art +21 -0
  224. package/lib/routes/myfans/post.ts +1 -0
  225. package/lib/routes/nankai/cc-notice.ts +114 -0
  226. package/lib/routes/nankai/jwc.ts +131 -0
  227. package/lib/routes/nankai/namespace.ts +7 -0
  228. package/lib/routes/nankai/notice.ts +84 -0
  229. package/lib/routes/nankai/yzb.ts +97 -0
  230. package/lib/routes/neu/yz.ts +172 -0
  231. package/lib/routes/newslaundry/explainer.ts +30 -0
  232. package/lib/routes/newslaundry/namespace.ts +8 -0
  233. package/lib/routes/newslaundry/nl-cheatsheet.ts +30 -0
  234. package/lib/routes/newslaundry/nl-collaborations.ts +30 -0
  235. package/lib/routes/newslaundry/podcast.ts +61 -0
  236. package/lib/routes/newslaundry/reports.ts +30 -0
  237. package/lib/routes/newslaundry/shot.ts +30 -0
  238. package/lib/routes/newslaundry/subscriber-only.ts +30 -0
  239. package/lib/routes/newslaundry/templates/description.art +28 -0
  240. package/lib/routes/newslaundry/utils.ts +108 -0
  241. package/lib/routes/newswav/latest.ts +100 -0
  242. package/lib/routes/newswav/namespace.ts +7 -0
  243. package/lib/routes/nhentai/index.ts +1 -0
  244. package/lib/routes/nifd/research.ts +16 -0
  245. package/lib/routes/nio/namespace.ts +9 -0
  246. package/lib/routes/nio/nioradio.ts +75 -0
  247. package/lib/routes/njust/cs.ts +58 -0
  248. package/lib/routes/njust/utils.ts +1 -1
  249. package/lib/routes/ntdm/video.ts +1 -1
  250. package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
  251. package/lib/routes/oilchem/index.ts +1 -1
  252. package/lib/routes/oncc/money18.ts +1 -1
  253. package/lib/routes/openai/cookbook.ts +1 -1
  254. package/lib/routes/paulgraham/article.ts +2 -2
  255. package/lib/routes/picuki/profile.ts +4 -0
  256. package/lib/routes/pixiv/bookmarks.ts +1 -1
  257. package/lib/routes/pixiv/novel-api/series/sfw.ts +1 -1
  258. package/lib/routes/pixiv/novels.ts +2 -2
  259. package/lib/routes/pixiv/user.ts +1 -1
  260. package/lib/routes/playno1/av.ts +1 -0
  261. package/lib/routes/pornhub/model.ts +3 -7
  262. package/lib/routes/pornhub/pornstar.ts +2 -7
  263. package/lib/routes/pornhub/users.ts +2 -7
  264. package/lib/routes/pornhub/utils.ts +12 -1
  265. package/lib/routes/qingting/podcast.ts +2 -1
  266. package/lib/routes/qipamaijia/index.ts +1 -0
  267. package/lib/routes/questmobile/report.ts +1 -1
  268. package/lib/routes/railway/index.ts +73 -0
  269. package/lib/routes/railway/namespace.ts +8 -0
  270. package/lib/routes/reuters/common.ts +0 -3
  271. package/lib/routes/rockthejvm/articles.ts +167 -0
  272. package/lib/routes/rockthejvm/namespace.ts +9 -0
  273. package/lib/routes/rockthejvm/templates/description.art +7 -0
  274. package/lib/routes/samrdprc/namespace.ts +7 -0
  275. package/lib/routes/samrdprc/news.ts +79 -0
  276. package/lib/routes/sankei/namespace.ts +7 -0
  277. package/lib/routes/sankei/news.ts +68 -0
  278. package/lib/routes/sankei/topics.ts +71 -0
  279. package/lib/routes/sciencenet/user.ts +1 -1
  280. package/lib/routes/scoop/apps.ts +188 -0
  281. package/lib/routes/scoop/namespace.ts +9 -0
  282. package/lib/routes/scoop/templates/description.art +56 -0
  283. package/lib/routes/scpta/namespace.ts +8 -0
  284. package/lib/routes/scpta/news.ts +101 -0
  285. package/lib/routes/seekingalpha/index.ts +1 -1
  286. package/lib/routes/sehuatang/index.ts +29 -31
  287. package/lib/routes/setn/index.ts +11 -2
  288. package/lib/routes/seu/cyber/index.ts +78 -0
  289. package/lib/routes/sicau/jiaowu.ts +42 -34
  290. package/lib/routes/sis001/forum.ts +1 -0
  291. package/lib/routes/sjtu/seiee/icisee.ts +67 -0
  292. package/lib/routes/sketis/isabelle-dev/blog/index.ts +1 -1
  293. package/lib/routes/smartlink/index.ts +13 -3
  294. package/lib/routes/sohu/mp.ts +17 -6
  295. package/lib/routes/sotwe/namespace.ts +1 -0
  296. package/lib/routes/sotwe/user.ts +98 -0
  297. package/lib/routes/spankbang/new-videos.ts +1 -0
  298. package/lib/routes/spglobal/ratings.ts +1 -1
  299. package/lib/routes/stanford/blog.ts +77 -0
  300. package/lib/routes/stanford/namespace.ts +7 -0
  301. package/lib/routes/syosetu/index.ts +1 -1
  302. package/lib/routes/t66y/index.ts +1 -0
  303. package/lib/routes/taobao/mysql.ts +157 -0
  304. package/lib/routes/taobao/namespace.ts +2 -2
  305. package/lib/routes/techcrunch/category.ts +48 -0
  306. package/lib/routes/telegram/channel.ts +2 -2
  307. package/lib/routes/tesla/cx.ts +1 -1
  308. package/lib/routes/test/index.ts +1 -1
  309. package/lib/routes/themoviedb/episodes.ts +1 -1
  310. package/lib/routes/thewirehindi/category.ts +78 -0
  311. package/lib/routes/thewirehindi/index.ts +43 -0
  312. package/lib/routes/thewirehindi/namespace.ts +7 -0
  313. package/lib/routes/thewirehindi/templates/description.art +9 -0
  314. package/lib/routes/thewirehindi/utils.ts +33 -0
  315. package/lib/routes/threads/utils.ts +2 -2
  316. package/lib/routes/tidb/blog.ts +314 -0
  317. package/lib/routes/tidb/namespace.ts +9 -0
  318. package/lib/routes/tumblr/namespace.ts +17 -0
  319. package/lib/routes/tumblr/posts.ts +74 -0
  320. package/lib/routes/tumblr/utils.ts +110 -0
  321. package/lib/routes/tver/namespace.ts +7 -0
  322. package/lib/routes/tver/series.ts +98 -0
  323. package/lib/routes/twitter/api/web-api/login.ts +1 -3
  324. package/lib/routes/twitter/api/web-api/utils.ts +23 -1
  325. package/lib/routes/twitter/utils.ts +21 -21
  326. package/lib/routes/udn/breaking-news.ts +2 -2
  327. package/lib/routes/uestc/auto.ts +1 -1
  328. package/lib/routes/uestc/cqe.ts +1 -1
  329. package/lib/routes/uestc/scse.ts +1 -1
  330. package/lib/routes/uestc/sice.ts +1 -1
  331. package/lib/routes/uestc/sise.ts +1 -1
  332. package/lib/routes/upc/jwc.ts +32 -46
  333. package/lib/routes/uptimerobot/rss.ts +1 -1
  334. package/lib/routes/visionias/daily-news-summary.ts +65 -0
  335. package/lib/routes/visionias/monthly-magazine.ts +68 -0
  336. package/lib/routes/visionias/news-today.ts +3 -13
  337. package/lib/routes/visionias/utils.ts +5 -5
  338. package/lib/routes/visionias/weekly-focus.ts +2 -2
  339. package/lib/routes/wdfxw/bookfree.ts +528 -0
  340. package/lib/routes/wdfxw/namespace.ts +8 -0
  341. package/lib/routes/wdfxw/templates/description.art +13 -0
  342. package/lib/routes/whu/swrh.ts +1 -1
  343. package/lib/routes/windsurf/blog.ts +118 -0
  344. package/lib/routes/windsurf/changelog.ts +100 -0
  345. package/lib/routes/windsurf/namespace.ts +9 -0
  346. package/lib/routes/windsurf/templates/description.art +21 -0
  347. package/lib/routes/x6d/index.ts +1 -1
  348. package/lib/routes/xbookcn/blog.ts +1 -0
  349. package/lib/routes/xiaohongshu/util.ts +1 -3
  350. package/lib/routes/xiaoyuzhou/pickup.ts +1 -1
  351. package/lib/routes/ximalaya/album.ts +32 -70
  352. package/lib/routes/ximalaya/types.ts +48 -0
  353. package/lib/routes/ximalaya/utils.ts +9 -7
  354. package/lib/routes/xmanhua/index.ts +1 -0
  355. package/lib/routes/xueqiu/cookies.ts +1 -1
  356. package/lib/routes/xueqiu/user.ts +1 -1
  357. package/lib/routes/xwenming/index.ts +184 -0
  358. package/lib/routes/xwenming/namespace.ts +9 -0
  359. package/lib/routes/yahoo/news/utils.ts +1 -1
  360. package/lib/routes/yande/post.ts +3 -0
  361. package/lib/routes/ymgal/game.ts +1 -0
  362. package/lib/routes/youtube/api/google.ts +27 -0
  363. package/lib/routes/youtube/api/youtubei.ts +70 -20
  364. package/lib/routes/youtube/community.ts +3 -1
  365. package/lib/routes/youtube/utils.ts +16 -14
  366. package/lib/routes/zaobao/util.ts +8 -5
  367. package/lib/routes/zhihu/activities.ts +3 -0
  368. package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
  369. package/lib/routes/zhizhuan100/namespace.ts +7 -0
  370. package/lib/routes/zhizhuan100/report.ts +79 -0
  371. package/lib/routes/zimuxia/portfolio.ts +1 -1
  372. package/lib/routes/zju/sis/index.ts +161 -0
  373. package/lib/server.ts +5 -0
  374. package/lib/types.ts +58 -54
  375. package/lib/utils/helpers.ts +1 -1
  376. package/lib/utils/logger.ts +1 -1
  377. package/lib/utils/proxy/index.ts +102 -18
  378. package/lib/utils/proxy/multi-proxy.ts +139 -0
  379. package/lib/utils/proxy/unify-proxy.ts +3 -1
  380. package/lib/utils/puppeteer-utils.test.ts +1 -1
  381. package/lib/utils/puppeteer.test.ts +14 -27
  382. package/lib/utils/puppeteer.ts +51 -37
  383. package/lib/utils/readable-social.test.ts +65 -0
  384. package/lib/utils/readable-social.ts +15 -1
  385. package/lib/utils/request-rewriter/fetch.ts +42 -4
  386. package/package.json +54 -56
  387. package/lib/routes/mixcloud/queries.ts +0 -2274
  388. package/lib/routes-deprecated/dev.to/top.js +0 -40
@@ -0,0 +1,528 @@
1
+ import { type Data, type DataItem, type Route, ViewType } from '@/types';
2
+
3
+ import { art } from '@/utils/render';
4
+ import cache from '@/utils/cache';
5
+ import ofetch from '@/utils/ofetch';
6
+ import { parseDate } from '@/utils/parse-date';
7
+
8
+ import { type CheerioAPI, type Cheerio, load } from 'cheerio';
9
+ import type { Element } from 'domhandler';
10
+ import { type Context } from 'hono';
11
+ import path from 'node:path';
12
+
13
+ export const handler = async (ctx: Context): Promise<Data> => {
14
+ const { id } = ctx.req.param();
15
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10);
16
+
17
+ const baseUrl: string = 'https://www.wdfxw.net';
18
+ const targetUrl: string = new URL(`bookfree${id ? `-${id}` : ''}.html`, baseUrl).href;
19
+
20
+ const response = await ofetch(targetUrl);
21
+ const $: CheerioAPI = load(response);
22
+ const language = $('meta[http-equiv="Content-Language"]').attr('content') ?? 'zh-cn';
23
+
24
+ let items: DataItem[] = [];
25
+
26
+ items = $('ul.camWholeBoxUl li')
27
+ .slice(0, limit)
28
+ .toArray()
29
+ .map((el): Element => {
30
+ const $el: Cheerio<Element> = $(el);
31
+ const $aEl: Cheerio<Element> = $el.find('div.camLiTitleC a');
32
+
33
+ const title: string = $aEl.attr('title') ?? $aEl.text();
34
+ const image: string | undefined = $el.find('div.img img').attr('data-original') ?? $el.find('div.img img').attr('src');
35
+ const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), {
36
+ images: image
37
+ ? [
38
+ {
39
+ src: image,
40
+ alt: title,
41
+ },
42
+ ]
43
+ : undefined,
44
+ });
45
+ const linkUrl: string | undefined = $aEl.attr('href');
46
+
47
+ const processedItem: DataItem = {
48
+ title,
49
+ description,
50
+ link: linkUrl,
51
+ content: {
52
+ html: description,
53
+ text: description,
54
+ },
55
+ image,
56
+ banner: image,
57
+ language,
58
+ };
59
+
60
+ return processedItem;
61
+ });
62
+
63
+ items = await Promise.all(
64
+ items.map((item) => {
65
+ if (!item.link) {
66
+ return item;
67
+ }
68
+
69
+ return cache.tryGet(item.link, async (): Promise<DataItem> => {
70
+ const detailResponse = await ofetch(item.link);
71
+ const $$: CheerioAPI = load(detailResponse);
72
+
73
+ const title: string = $$('h1').text();
74
+ const pubDateStr: string | undefined = $$('div.uhit li')
75
+ .filter((_, el) => $$(el).text().startsWith('上传时间'))
76
+ .text()
77
+ .split(/:/)
78
+ .pop();
79
+ const categories: string[] = [
80
+ ...new Set([
81
+ ...$$('div.nav_uis a')
82
+ .slice(1)
83
+ .toArray()
84
+ .map((el) => $$(el).text()),
85
+ ...($$('meta[name="KeyWords"]').attr('content')?.split(/,/) ?? []),
86
+ ]),
87
+ ];
88
+ const authors: DataItem['author'] = $$('div.uhit li')
89
+ .filter((_, el) => $$(el).text().startsWith('上传人'))
90
+ .text()
91
+ .split(/:/)
92
+ .pop();
93
+ const upDatedStr: string | undefined = pubDateStr;
94
+
95
+ const processedItem: DataItem = {
96
+ title,
97
+ pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate,
98
+ category: categories,
99
+ author: authors,
100
+ updated: upDatedStr ? parseDate(upDatedStr) : item.updated,
101
+ language,
102
+ };
103
+
104
+ return {
105
+ ...item,
106
+ ...processedItem,
107
+ };
108
+ });
109
+ })
110
+ );
111
+
112
+ return {
113
+ title: $('title').text(),
114
+ description: $('meta[name="description"]').attr('content'),
115
+ link: targetUrl,
116
+ item: items,
117
+ allowEmpty: true,
118
+ image: $('div.xxxk_top img').attr('src'),
119
+ author: $('div.xxxk_top img').attr('alt'),
120
+ language,
121
+ id: targetUrl,
122
+ };
123
+ };
124
+
125
+ export const route: Route = {
126
+ path: '/bookfree/:id?',
127
+ name: '免费区',
128
+ url: 'www.wdfxw.net',
129
+ maintainers: ['nczitzk'],
130
+ handler,
131
+ example: '/wdfxw/bookfree',
132
+ parameters: {
133
+ category: {
134
+ description: '分类,默认为空,即全部,可在对应分类页 URL 中找到',
135
+ options: [
136
+ {
137
+ label: '全部',
138
+ value: '',
139
+ },
140
+ {
141
+ label: '行业标准',
142
+ value: '00002',
143
+ },
144
+ {
145
+ label: '国家标准GB',
146
+ value: '00001',
147
+ },
148
+ {
149
+ label: '国外标准',
150
+ value: '00003',
151
+ },
152
+ {
153
+ label: '监理资料',
154
+ value: '00004',
155
+ },
156
+ {
157
+ label: '施工组织设计',
158
+ value: '00005',
159
+ },
160
+ {
161
+ label: '土木工程毕业设计论文',
162
+ value: '00006',
163
+ },
164
+ {
165
+ label: '机械类毕业设计论文',
166
+ value: '00007',
167
+ },
168
+ {
169
+ label: '小学课件教学资料',
170
+ value: '00008',
171
+ },
172
+ {
173
+ label: '初中课件教学资料',
174
+ value: '00009',
175
+ },
176
+ {
177
+ label: '高中课件教学资料',
178
+ value: '00010',
179
+ },
180
+ {
181
+ label: '工作计划个人总结',
182
+ value: '00011',
183
+ },
184
+ {
185
+ label: '中学小学教案导学案与教学设计',
186
+ value: '00012',
187
+ },
188
+ {
189
+ label: '作文大全',
190
+ value: '00013',
191
+ },
192
+ {
193
+ label: '幼儿教育',
194
+ value: '00014',
195
+ },
196
+ {
197
+ label: '论文',
198
+ value: '00015',
199
+ },
200
+ {
201
+ label: '财务管理',
202
+ value: '00016',
203
+ },
204
+ {
205
+ label: '管理信息化',
206
+ value: '00017',
207
+ },
208
+ {
209
+ label: '行业分类',
210
+ value: '00018',
211
+ },
212
+ {
213
+ label: '合同样本',
214
+ value: '00019',
215
+ },
216
+ {
217
+ label: '品质管理',
218
+ value: '00020',
219
+ },
220
+ {
221
+ label: '企业管理',
222
+ value: '00021',
223
+ },
224
+ {
225
+ label: '人力资源',
226
+ value: '00022',
227
+ },
228
+ {
229
+ label: '生产管理',
230
+ value: '00023',
231
+ },
232
+ {
233
+ label: '市场营销',
234
+ value: '00024',
235
+ },
236
+ {
237
+ label: '制度表格',
238
+ value: '00025',
239
+ },
240
+ {
241
+ label: '行业资料',
242
+ value: '00026',
243
+ },
244
+ {
245
+ label: '国家标准',
246
+ value: '00027',
247
+ },
248
+ {
249
+ label: '软件教程',
250
+ value: '00028',
251
+ },
252
+ {
253
+ label: '标准汇编',
254
+ value: '00029',
255
+ },
256
+ {
257
+ label: '其他',
258
+ value: '00030',
259
+ },
260
+ {
261
+ label: '职业资格考试',
262
+ value: '00031',
263
+ },
264
+ {
265
+ label: '股票证券行业研究报告(研报)',
266
+ value: '00032',
267
+ },
268
+ {
269
+ label: '基金申请',
270
+ value: '00033',
271
+ },
272
+ {
273
+ label: '教师资格证考试资料',
274
+ value: '00034',
275
+ },
276
+ {
277
+ label: '专利说明书',
278
+ value: '00035',
279
+ },
280
+ ],
281
+ },
282
+ },
283
+ description: `:::tip
284
+ 订阅 [行业标准](https://www.wdfxw.net/bookfree-00002.html),其源网址为 \`https://www.wdfxw.net/bookfree-00002.html\`,请参考该 URL 指定部分构成参数,此时路由为 [\`/wdfxw/bookfree/00002\`](https://rsshub.app/wdfxw/bookfree/00002)。
285
+ :::
286
+
287
+ <details>
288
+ <summary>更多分类</summary>
289
+
290
+ | 分类 | ID |
291
+ | ------------------------------------------------------------------------- | ---------------------------------------------------- |
292
+ | [全部](https://www.wdfxw.net/bookfree.html) | [<无>](https://rsshub.app/wdfxw/bookfree) |
293
+ | [行业标准](https://www.wdfxw.net/bookfree-00002.html) | [00002](https://rsshub.app/wdfxw/bookfree/00002) |
294
+ | [国家标准 GB](https://www.wdfxw.net/bookfree-00001.html) | [00001](https://rsshub.app/wdfxw/bookfree/00001) |
295
+ | [国外标准](https://www.wdfxw.net/bookfree-00003.html) | [00003](https://rsshub.app/wdfxw/bookfree/00003) |
296
+ | [监理资料](https://www.wdfxw.net/bookfree-00004.html) | [00004](https://rsshub.app/wdfxw/bookfree/00004) |
297
+ | [施工组织设计](https://极速.wdfxw.net/bookfree-00005.html) | [00005](https://rsshub.app/wdfxw/bookfree/00005) |
298
+ | [土木工程毕业设计论文](https://www.wdfxw.net/bookfree-00006.html) | [00006](https://rsshub.app/wdfxw/bookfree/00006) |
299
+ | [机械类毕业设计论文](https://www.wdfxw.net/bookfree-00007.html) | [00007](https://rsshub.app/wdfxw/bookfree/00007) |
300
+ | [小学课件教学资料](https://www.wdfxw.net/bookfree-00008.html) | [00008](https://rsshub.app/wdfxw/bookfree/00008) |
301
+ | [初中课件教学资料](https://www.wdfxw.net/bookfree-00009.html) | [00009](https://rsshub.app/wdfxw/bookfree/00009) |
302
+ | [高中课件教学资料](https://www.wdfxw.net/bookfree-00010.html) | [00010](https://rsshub.app/wdfxw/bookfree/00010) |
303
+ | [工作计划个人总结](https://www.wdfxw.net/bookfree-00011.html) | [00011](极速//rsshub.app/wdfxw/bookfree/00011) |
304
+ | [中学小学教案导学案与教学设计](https://www.wdfxw.net/bookfree-00012.html) | [00012](https://rsshub.app/wdfxw/bookfree/00012) |
305
+ | [作文大全](https://www.wdfxw.net/bookfree-00013.html) | [00013](https://rsshub.app/wdfxw/bookfree/00013) |
306
+ | [幼儿教育](https://www.wdfxw.net/bookfree-00014.html) | [00014](https://rsshub.app/wdfxw/bookfree/00014) |
307
+ | [论文](https://www.wdfxw.net/bookfree-00015.html) | [00015](https://rsshub.app/wdfxw/bookfree/00015) |
308
+ | [财务管理](https://www.wdfxw.net/bookfree-00016.html) | [00016](https://rsshub.app/wdfxw/bookfree/00016) |
309
+ | [管理信息化](https://www.wdfxw.net/bookfree-00017.html) | [00017](https://rsshub.app/wdfxw/bookfree/00017) |
310
+ | [行业分类](https://www.wdfxw.net/bookfree-00018.html) | [00018](https://rsshub.app/wdfxw/bookfree/00018) |
311
+ | [合同样本](https://www.wdfxw.net/bookfree-00019.html) | [00019](https://rsshub.app/wdf极速xw/bookfree/00019) |
312
+ | [品质管理](https://www.wdfxw.net/bookfree-00020.html) | [00020](https://rsshub.app/wdfxw/bookfree/00020) |
313
+ | [企业管理](https://www.wdfxw.net/bookfree-00021.html) | [00021](https://rsshub.app/wdfxw/bookfree/00021) |
314
+ | [人力资源](https://www.wdfxw.net/bookfree-00022.html) | [00022](https://rsshub.app/wdfxw/bookfree/00022) |
315
+ | [生产管理](https://www.wdfxw.net/bookfree-00023.html) | [00023](https://rsshub.app/wdfxw/bookfree/00023) |
316
+ | [市场营销](https://www.wdfxw.net/bookfree-00024.html) | [00024](https://rsshub.app/wdfxw/bookfree/00024) |
317
+ | [制度表格](https://www.wdfxw.net/bookfree-00025.html) | [00025](https://rsshub.app/wdfxw/bookfree/00025) |
318
+ | [行业资料](https://www.wdfxw.net/bookfree-00026.html) | [00026](https://rsshub.app/wdfxw/bookfree/00026) |
319
+ | [国家标准](https://www.wdfxw.net/bookfree-00027.html) | [00027](https://rsshub.app/wdfxw/bookfree/00027) |
320
+ | [软件教程](https://www.wdfxw.net/bookfree-00028.html) | [00028](https://rsshub.app/wdfxw/bookfree/00028) |
321
+ | [标准汇编](https://www.wdfxw.net/bookfree-00029.html) | [00029](https://rsshub.app/wdfxw/bookfree/00029) |
322
+ | [其他](https://www.wdfxw.net/bookfree-00030.html) | [00030](https://rsshub.app/wdfxw/bookfree/00030) |
323
+ | [职业资格考试](https://www.wdfxw.net/bookfree-00031.html) | [00031](https://rsshub.app/wdfxw/bookfree/00031) |
324
+ | [股票证券行业研究报告(研报)](https://www.wdfxw.net/bookfree-00032.html) | [00032](https://rsshub.app/wdfxw/bookfree/00032) |
325
+ | [基金申请](https://www.wdfxw.net/bookfree-00033.html) | [00033](https://rsshub.app/wdfxw/bookfree/00033) |
326
+ | [教师资格证考试资料](https://www.wdfxw.net/bookfree-00034.html) | [00034](https://rsshub.app/wdfxw/bookfree/00034) |
327
+ | [专利说明书](https://www.wdfxw.net/bookfree-00035.html) | [00035](https://rsshub.app/wdfxw/bookfree/00035) |
328
+
329
+ </details>
330
+ `,
331
+ categories: ['reading'],
332
+ features: {
333
+ requireConfig: false,
334
+ requirePuppeteer: false,
335
+ antiCrawler: false,
336
+ supportRadar: true,
337
+ supportBT: false,
338
+ supportPodcast: false,
339
+ supportScihub: false,
340
+ },
341
+ radar: [
342
+ {
343
+ source: ['www.wdfxw.net'],
344
+ target: '/bookfree',
345
+ },
346
+ {
347
+ title: '全部',
348
+ source: ['www.wdfxw.net/bookfree.html'],
349
+ target: '/bookfree',
350
+ },
351
+ {
352
+ title: '行业标准',
353
+ source: ['www.wdfxw.net/bookfree-00002.html'],
354
+ target: '/bookfree/00002',
355
+ },
356
+ {
357
+ title: '国家标准GB',
358
+ source: ['www.wdfxw.net/bookfree-00001.html'],
359
+ target: '/bookfree/00001',
360
+ },
361
+ {
362
+ title: '国外标准',
363
+ source: ['www.wdfxw.net/bookfree-00003.html'],
364
+ target: '/bookfree/00003',
365
+ },
366
+ {
367
+ title: '监理资料',
368
+ source: ['www.wdfxw.net/bookfree-00004.html'],
369
+ target: '/bookfree/00004',
370
+ },
371
+ {
372
+ title: '施工组织设计',
373
+ source: ['www.wdfxw.net/bookfree-00005.html'],
374
+ target: '/bookfree/00005',
375
+ },
376
+ {
377
+ title: '土木工程毕业设计论文',
378
+ source: ['www.wdfxw.net/bookfree-00006.html'],
379
+ target: '/bookfree/00006',
380
+ },
381
+ {
382
+ title: '机械类毕业设计论文',
383
+ source: ['www.wdfxw.net/bookfree-00007.html'],
384
+ target: '/bookfree/00007',
385
+ },
386
+ {
387
+ title: '小学课件教学资料',
388
+ source: ['www.wdfxw.net/bookfree-00008.html'],
389
+ target: '/bookfree/00008',
390
+ },
391
+ {
392
+ title: '初中课件教学资料',
393
+ source: ['www.wdfxw.net/bookfree-00009.html'],
394
+ target: '/bookfree/00009',
395
+ },
396
+ {
397
+ title: '高中课件教学资料',
398
+ source: ['www.wdfxw.net/bookfree-00010.html'],
399
+ target: '/bookfree/00010',
400
+ },
401
+ {
402
+ title: '工作计划个人总结',
403
+ source: ['www.wdfxw.net/bookfree-00011.html'],
404
+ target: '/bookfree/00011',
405
+ },
406
+ {
407
+ title: '中学小学教案导学案与教学设计',
408
+ source: ['www.wdfxw.net/bookfree-00012.html'],
409
+ target: '/bookfree/00012',
410
+ },
411
+ {
412
+ title: '作文大全',
413
+ source: ['www.wdfxw.net/bookfree-00013.html'],
414
+ target: '/bookfree/00013',
415
+ },
416
+ {
417
+ title: '幼儿教育',
418
+ source: ['www.wdfxw.net/bookfree-00014.html'],
419
+ target: '/bookfree/00014',
420
+ },
421
+ {
422
+ title: '论文',
423
+ source: ['www.wdfxw.net/bookfree-00015.html'],
424
+ target: '/bookfree/00015',
425
+ },
426
+ {
427
+ title: '财务管理',
428
+ source: ['www.wdfxw.net/bookfree-00016.html'],
429
+ target: '/bookfree/00016',
430
+ },
431
+ {
432
+ title: '管理信息化',
433
+ source: ['www.wdfxw.net/bookfree-00017.html'],
434
+ target: '/bookfree/00017',
435
+ },
436
+ {
437
+ title: '行业分类',
438
+ source: ['www.wdfxw.net/bookfree-00018.html'],
439
+ target: '/bookfree/00018',
440
+ },
441
+ {
442
+ title: '合同样本',
443
+ source: ['www.wdfxw.net/bookfree-00019.html'],
444
+ target: '/bookfree/00019',
445
+ },
446
+ {
447
+ title: '品质管理',
448
+ source: ['www.wdfxw.net/bookfree-00020.html'],
449
+ target: '/bookfree/00020',
450
+ },
451
+ {
452
+ title: '企业管理',
453
+ source: ['www.wdfxw.net/bookfree-00021.html'],
454
+ target: '/bookfree/00021',
455
+ },
456
+ {
457
+ title: '人力资源',
458
+ source: ['www.wdfxw.net/bookfree-00022.html'],
459
+ target: '/bookfree/00022',
460
+ },
461
+ {
462
+ title: '生产管理',
463
+ source: ['www.wdfxw.net/bookfree-00023.html'],
464
+ target: '/bookfree/00023',
465
+ },
466
+ {
467
+ title: '市场营销',
468
+ source: ['www.wdfxw.net/bookfree-00024.html'],
469
+ target: '/bookfree/00024',
470
+ },
471
+ {
472
+ title: '制度表格',
473
+ source: ['www.wdfxw.net/bookfree-00025.html'],
474
+ target: '/bookfree/00025',
475
+ },
476
+ {
477
+ title: '行业资料',
478
+ source: ['www.wdfxw.net/bookfree-00026.html'],
479
+ target: '/bookfree/00026',
480
+ },
481
+ {
482
+ title: '国家标准',
483
+ source: ['www.wdfxw.net/bookfree-00027.html'],
484
+ target: '/bookfree/00027',
485
+ },
486
+ {
487
+ title: '软件教程',
488
+ source: ['www.wdfxw.net/bookfree-00028.html'],
489
+ target: '/bookfree/00028',
490
+ },
491
+ {
492
+ title: '标准汇编',
493
+ source: ['www.wdfxw.net/bookfree-00029.html'],
494
+ target: '/bookfree/00029',
495
+ },
496
+ {
497
+ title: '其他',
498
+ source: ['www.wdfxw.net/bookfree-00030.html'],
499
+ target: '/bookfree/00030',
500
+ },
501
+ {
502
+ title: '职业资格考试',
503
+ source: ['www.wdfxw.net/bookfree-00031.html'],
504
+ target: '/bookfree/00031',
505
+ },
506
+ {
507
+ title: '股票证券行业研究报告(研报)',
508
+ source: ['www.wdfxw.net/bookfree-00032.html'],
509
+ target: '/bookfree/00032',
510
+ },
511
+ {
512
+ title: '基金申请',
513
+ source: ['www.wdfxw.net/bookfree-00033.html'],
514
+ target: '/bookfree/00033',
515
+ },
516
+ {
517
+ title: '教师资格证考试资料',
518
+ source: ['www.wdfxw.net/bookfree-00034.html'],
519
+ target: '/bookfree/00034',
520
+ },
521
+ {
522
+ title: '专利说明书',
523
+ source: ['www.wdfxw.net/bookfree-00035.html'],
524
+ target: '/bookfree/00035',
525
+ },
526
+ ],
527
+ view: ViewType.Articles,
528
+ };
@@ -0,0 +1,8 @@
1
+ import type { Namespace } from '@/types';
2
+
3
+ export const namespace: Namespace = {
4
+ name: 'WDFXW文档分享网',
5
+ url: 'wdfxw.net',
6
+ description: '',
7
+ lang: 'zh',
8
+ };
@@ -0,0 +1,13 @@
1
+ {{ if images }}
2
+ {{ each images image }}
3
+ {{ if image?.src }}
4
+ <figure>
5
+ <img
6
+ {{ if image.alt }}
7
+ alt="{{ image.alt }}"
8
+ {{ /if }}
9
+ src="{{ image.src }}">
10
+ </figure>
11
+ {{ /if }}
12
+ {{ /each }}
13
+ {{ /if }}
@@ -94,7 +94,7 @@ async function handler(ctx) {
94
94
  const response = await got(item.link);
95
95
  const $ = load(response.data);
96
96
 
97
- return $('.v_news_content').length ? $('.v_news_content').html().trim() : ($('.prompt').length ? $('.prompt').html() : item.title);
97
+ return $('.v_news_content').length ? $('.v_news_content').html().trim() : $('.prompt').length ? $('.prompt').html() : item.title;
98
98
  } catch {
99
99
  return item.title;
100
100
  }
@@ -0,0 +1,118 @@
1
+ import { type Data, type DataItem, type Route, ViewType } from '@/types';
2
+
3
+ import { art } from '@/utils/render';
4
+ import ofetch from '@/utils/ofetch';
5
+ import { parseDate } from '@/utils/parse-date';
6
+
7
+ import { type CheerioAPI, load } from 'cheerio';
8
+ import { type Context } from 'hono';
9
+ import path from 'node:path';
10
+
11
+ export const handler = async (ctx: Context): Promise<Data> => {
12
+ const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10);
13
+
14
+ const baseUrl: string = 'https://windsurf.com';
15
+ const targetUrl: string = new URL('blog', baseUrl).href;
16
+ const apiUrl: string = new URL('api/blog', baseUrl).href;
17
+
18
+ const response = await ofetch(apiUrl, {
19
+ query: {
20
+ paginate: limit,
21
+ cursor: 0,
22
+ },
23
+ });
24
+
25
+ const targetResponse = await ofetch(targetUrl);
26
+ const $: CheerioAPI = load(targetResponse);
27
+ const language = $('html').attr('lang') ?? 'en';
28
+
29
+ const title: string = $('title').first().text();
30
+ const author: string | undefined = title.split(/\|/).pop()?.trim();
31
+
32
+ const items: DataItem[] = response.posts.slice(0, limit).map((item): DataItem => {
33
+ const title: string = item.title;
34
+ const image: string | undefined = item.images?.[0];
35
+ const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), {
36
+ images: image
37
+ ? [
38
+ {
39
+ src: image,
40
+ alt: title,
41
+ },
42
+ ]
43
+ : undefined,
44
+ intro: item.summary,
45
+ });
46
+ const pubDate: number | string = item.date;
47
+ const linkUrl: string | undefined = item.slug;
48
+ const categories: string[] = item.tags;
49
+ const authors: DataItem['author'] = item.authors.map((author) => ({
50
+ name: author,
51
+ url: undefined,
52
+ avatar: undefined,
53
+ }));
54
+ const guid: string | undefined = item.slug ? `windsurf-blog-${item.slug}` : undefined;
55
+ const updated: number | string = pubDate;
56
+
57
+ const processedItem: DataItem = {
58
+ title,
59
+ description,
60
+ pubDate: pubDate ? parseDate(pubDate) : undefined,
61
+ link: linkUrl ? new URL(`blog/${linkUrl}`, baseUrl).href : undefined,
62
+ category: categories,
63
+ author: authors,
64
+ guid,
65
+ id: guid,
66
+ content: {
67
+ html: description,
68
+ text: description,
69
+ },
70
+ image,
71
+ banner: image,
72
+ updated: updated ? parseDate(updated) : undefined,
73
+ language,
74
+ };
75
+
76
+ return processedItem;
77
+ });
78
+
79
+ return {
80
+ title,
81
+ description: $('meta[property="og:description"]').attr('content'),
82
+ link: targetUrl,
83
+ item: items,
84
+ allowEmpty: true,
85
+ image: $('meta[property="og:image"]').attr('content'),
86
+ author,
87
+ language,
88
+ id: $('meta[property="og:url"]').attr('content'),
89
+ };
90
+ };
91
+
92
+ export const route: Route = {
93
+ path: '/blog',
94
+ name: 'Blog',
95
+ url: 'windsurf.com',
96
+ maintainers: ['nczitzk'],
97
+ handler,
98
+ example: '/windsurf/blog',
99
+ parameters: undefined,
100
+ description: undefined,
101
+ categories: ['programming'],
102
+ features: {
103
+ requireConfig: false,
104
+ requirePuppeteer: false,
105
+ antiCrawler: false,
106
+ supportRadar: true,
107
+ supportBT: false,
108
+ supportPodcast: false,
109
+ supportScihub: false,
110
+ },
111
+ radar: [
112
+ {
113
+ source: ['windsurf.com/blog'],
114
+ target: '/blog',
115
+ },
116
+ ],
117
+ view: ViewType.Articles,
118
+ };