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.
- package/lib/assets/logo.svg +1 -0
- package/lib/config.ts +49 -1
- package/lib/errors/index.test.ts +15 -5
- package/lib/errors/index.tsx +3 -2
- package/lib/errors/types/captcha.ts +5 -0
- package/lib/index.ts +48 -14
- package/lib/middleware/cache.ts +4 -0
- package/lib/middleware/debug.ts +6 -4
- package/lib/middleware/header.ts +4 -2
- package/lib/middleware/parameter.ts +1 -1
- package/lib/registry.test.ts +24 -1
- package/lib/registry.ts +46 -13
- package/lib/router.js +1 -1
- package/lib/routes/0xxx/index.ts +169 -0
- package/lib/routes/0xxx/namespace.ts +9 -0
- package/lib/routes/0xxx/templates/description.art +50 -0
- package/lib/routes/10000link/info.ts +1 -1
- package/lib/routes/{xinhuanet → 121}/namespace.ts +3 -3
- package/lib/routes/121/templates/description.art +17 -0
- package/lib/routes/121/weather-live.ts +104 -0
- package/lib/routes/141jav/index.ts +3 -0
- package/lib/routes/141ppv/index.ts +3 -0
- package/lib/routes/163/news/rank.ts +1 -1
- package/lib/routes/18comic/album.ts +60 -64
- package/lib/routes/18comic/blogs.ts +1 -0
- package/lib/routes/18comic/index.ts +1 -0
- package/lib/routes/18comic/search.ts +54 -4
- package/lib/routes/18comic/utils.ts +70 -1
- package/lib/routes/199it/index.ts +1 -1
- package/lib/routes/2048/index.ts +1 -0
- package/lib/routes/21caijing/channel.ts +1 -1
- package/lib/routes/30secondsofcode/utils.ts +0 -1
- package/lib/routes/4khd/category.ts +1 -0
- package/lib/routes/4khd/latest.ts +1 -0
- package/lib/routes/4kup/category.ts +1 -0
- package/lib/routes/4kup/latest.ts +1 -0
- package/lib/routes/4kup/popular.ts +1 -0
- package/lib/routes/4kup/tag.ts +1 -0
- package/lib/routes/51cto/utils.ts +1 -1
- package/lib/routes/6park/index.ts +1 -1
- package/lib/routes/6v123/index.ts +487 -0
- package/lib/routes/6v123/namespace.ts +1 -0
- package/lib/routes/7mmtv/index.ts +1 -0
- package/lib/routes/8kcos/cat.ts +3 -0
- package/lib/routes/8kcos/latest.ts +1 -0
- package/lib/routes/8kcos/tag.ts +1 -0
- package/lib/routes/91porn/author.ts +1 -0
- package/lib/routes/91porn/index.ts +1 -0
- package/lib/routes/95mm/category.ts +1 -0
- package/lib/routes/95mm/tab.ts +1 -0
- package/lib/routes/95mm/tag.ts +1 -0
- package/lib/routes/aa1/60s.ts +189 -0
- package/lib/routes/aa1/namespace.ts +9 -0
- package/lib/routes/abc/index.ts +1 -1
- package/lib/routes/abskoop/index.ts +3 -0
- package/lib/routes/abskoop/nsfw.ts +3 -0
- package/lib/routes/acgvinyl/namespace.ts +6 -0
- package/lib/routes/acgvinyl/news.ts +86 -0
- package/lib/routes/agefans/detail.ts +1 -1
- package/lib/routes/aibase/daily.ts +110 -0
- package/lib/routes/aibase/util.ts +3 -0
- package/lib/routes/aliyun/database-month.ts +1 -1
- package/lib/routes/ally/rail.ts +1 -1
- package/lib/routes/amazfitwatchfaces/index.ts +1 -2
- package/lib/routes/android/security-bulletin.ts +61 -0
- package/lib/routes/anthropic/news.ts +25 -14
- package/lib/routes/anthropic/research.ts +112 -0
- package/lib/routes/apnews/mobile-api.ts +1 -1
- package/lib/routes/apnews/sitemap.ts +1 -1
- package/lib/routes/apnews/topics.ts +2 -1
- package/lib/routes/apnews/utils.ts +1 -1
- package/lib/routes/app-sales/index.ts +1 -1
- package/lib/routes/apple/apps.ts +2 -2
- package/lib/routes/apple/design.ts +54 -0
- package/lib/routes/apple/namespace.ts +1 -1
- package/lib/routes/apple/podcast.ts +58 -25
- package/lib/routes/apple/security-releases.ts +2 -2
- package/lib/routes/aqara/post.ts +1 -1
- package/lib/routes/asiafruitchina/categories.ts +1 -1
- package/lib/routes/asiantolick/index.ts +3 -0
- package/lib/routes/asmr-200/index.ts +1 -0
- package/lib/routes/augmentcode/blog.ts +161 -0
- package/lib/routes/augmentcode/namespace.ts +9 -0
- package/lib/routes/augmentcode/templates/description.art +17 -0
- package/lib/routes/azul/namespace.ts +9 -0
- package/lib/routes/azul/packages.ts +105 -0
- package/lib/routes/bandisoft/history.ts +2 -2
- package/lib/routes/bangumi.tv/group/reply.ts +1 -1
- package/lib/routes/banshujiang/index.ts +763 -0
- package/lib/routes/banshujiang/namespace.ts +9 -0
- package/lib/routes/banshujiang/templates/description.art +17 -0
- package/lib/routes/banyuetan/index.ts +1 -1
- package/lib/routes/baozimh/index.ts +21 -3
- package/lib/routes/baselang/index.ts +117 -0
- package/lib/routes/baselang/namespace.ts +6 -0
- package/lib/routes/bbc/learningenglish.ts +35 -20
- package/lib/routes/bestofjs/monthly.ts +137 -0
- package/lib/routes/bestofjs/namespace.ts +7 -0
- package/lib/routes/bestofjs/templates/description.art +36 -0
- package/lib/routes/bfl/announcements.ts +1 -1
- package/lib/routes/bilibili/cache.ts +97 -3
- package/lib/routes/bilibili/danmaku.ts +1 -1
- package/lib/routes/bilibili/dynamic.ts +52 -15
- package/lib/routes/bilibili/page.ts +1 -1
- package/lib/routes/bilibili/ranking.ts +25 -17
- package/lib/routes/bilibili/video.ts +35 -74
- package/lib/routes/bilibili/wasm-exec.ts +1 -1
- package/lib/routes/bilibili/weekly-recommend.ts +22 -6
- package/lib/routes/biquge/index.ts +1 -1
- package/lib/routes/bjp/apod.ts +1 -1
- package/lib/routes/bnext/index.ts +58 -0
- package/lib/routes/bnext/namespace.ts +7 -0
- package/lib/routes/bookwalker/namespace.ts +9 -0
- package/lib/routes/bookwalker/search.ts +114 -0
- package/lib/routes/bookwalker/templates/description.art +13 -0
- package/lib/routes/booru/mmda.ts +1 -0
- package/lib/routes/bsky/keyword.ts +15 -10
- package/lib/routes/buaa/jiaowu.ts +1 -1
- package/lib/routes/bullionvault/gold-news.ts +4 -4
- package/lib/routes/bupt/scss.ts +98 -0
- package/lib/routes/capitalmind/insights.ts +40 -0
- package/lib/routes/capitalmind/namespace.ts +8 -0
- package/lib/routes/capitalmind/podcasts.ts +41 -0
- package/lib/routes/capitalmind/utils.ts +122 -0
- package/lib/routes/cartoonmad/comic.ts +1 -1
- package/lib/routes/cast/index.ts +1 -1
- package/lib/routes/cbndata/information.ts +250 -0
- package/lib/routes/cbndata/namespace.ts +9 -0
- package/lib/routes/cbndata/templates/description.art +17 -0
- package/lib/routes/cccmc/index.ts +1 -1
- package/lib/routes/ccg/index.ts +181 -0
- package/lib/routes/ccg/namespace.ts +9 -0
- package/lib/routes/ccg/templates/description.art +21 -0
- package/lib/routes/chikubi/category.ts +1 -0
- package/lib/routes/chikubi/index.ts +1 -0
- package/lib/routes/chikubi/navigation.ts +1 -0
- package/lib/routes/chikubi/nipple-video-category.ts +1 -0
- package/lib/routes/chikubi/nipple-video-maker.ts +1 -0
- package/lib/routes/chikubi/search.ts +1 -0
- package/lib/routes/chikubi/tag.ts +1 -0
- package/lib/routes/chinadaily/language.ts +1 -1
- package/lib/routes/chinaratings/credit-research.ts +1 -1
- package/lib/routes/chocolatey/namespace.ts +9 -0
- package/lib/routes/chocolatey/packages.ts +122 -0
- package/lib/routes/chub/characters.ts +3 -0
- package/lib/routes/civitai/discussions.ts +1 -0
- package/lib/routes/civitai/models.ts +1 -0
- package/lib/routes/civitai/user.ts +3 -0
- package/lib/routes/cline/blog.ts +34 -23
- package/lib/routes/cmde/index.ts +1 -1
- package/lib/routes/cna/index.ts +2 -24
- package/lib/routes/cna/utils.ts +23 -0
- package/lib/routes/cna/web/index.ts +2 -22
- package/lib/routes/cockroachlabs/blog.ts +113 -0
- package/lib/routes/cockroachlabs/namespace.ts +7 -0
- package/lib/routes/commonhealth/index.ts +70 -0
- package/lib/routes/commonhealth/namespace.ts +7 -0
- package/lib/routes/commonhealth/templates/description.art +2 -0
- package/lib/routes/cool18/index.ts +4 -1
- package/lib/routes/coolapk/utils.ts +5 -4
- package/lib/routes/coolbuy/index.ts +106 -0
- package/lib/routes/coolbuy/namespace.ts +9 -0
- package/lib/routes/coolbuy/templates/description.art +48 -0
- package/lib/routes/coolidge/film-guide.ts +60 -0
- package/lib/routes/coolidge/namespace.ts +7 -0
- package/lib/routes/coolidge/news.ts +65 -0
- package/lib/routes/coolidge/templates/description.art +4 -0
- package/lib/routes/coomer/index.ts +15 -11
- package/lib/routes/coomer/namespace.ts +1 -1
- package/lib/routes/copymanga/comic.ts +9 -10
- package/lib/routes/cosplaytele/category.ts +1 -0
- package/lib/routes/cosplaytele/latest.ts +1 -0
- package/lib/routes/cosplaytele/popular.ts +1 -0
- package/lib/routes/cosplaytele/tag.ts +1 -0
- package/lib/routes/cpta/handler.ts +1 -1
- package/lib/routes/creative-comic/book.ts +1 -1
- package/lib/routes/crush/index.ts +77 -0
- package/lib/routes/crush/namespace.ts +7 -0
- package/lib/routes/css-tricks/articles.ts +48 -0
- package/lib/routes/css-tricks/collections.ts +62 -0
- package/lib/routes/css-tricks/namespace.ts +8 -0
- package/lib/routes/css-tricks/popular.ts +39 -0
- package/lib/routes/css-tricks/utils.ts +103 -0
- package/lib/routes/cursor/blog.ts +84 -0
- package/lib/routes/cursor/changelog.ts +26 -17
- package/lib/routes/cursor/namespace.ts +1 -1
- package/lib/routes/cw/utils.ts +6 -13
- package/lib/routes/daum/potplayer.ts +257 -0
- package/lib/routes/dbaplus/new.ts +392 -0
- package/lib/routes/dbaplus/templates/description.art +21 -0
- package/lib/routes/dealstreetasia/home.ts +1 -1
- package/lib/routes/dedao/index.ts +3 -3
- package/lib/routes/deepl/blog.ts +421 -0
- package/lib/routes/deepl/namespace.ts +9 -0
- package/lib/routes/deepl/templates/description.art +21 -0
- package/lib/routes/deeplearning/the-batch.ts +1 -1
- package/lib/routes/dev.to/guides.ts +100 -0
- package/lib/routes/dev.to/namespace.ts +8 -0
- package/lib/routes/dev.to/top.ts +105 -0
- package/lib/routes/dgut/jwb.ts +73 -0
- package/lib/routes/dgut/namespace.ts +9 -0
- package/lib/routes/diariofruticola/filtro.ts +1 -1
- package/lib/routes/digitalpolicyalert/activity-tracker.ts +135 -0
- package/lib/routes/digitalpolicyalert/namespace.ts +9 -0
- package/lib/routes/dlsite/campaign.ts +1 -0
- package/lib/routes/dlsite/ci-en/article.ts +1 -0
- package/lib/routes/dlsite/new.ts +1 -0
- package/lib/routes/dlsite/z-index/index.ts +3 -0
- package/lib/routes/dnaindia/common.ts +26 -8
- package/lib/routes/dockerhub/utils.ts +1 -1
- package/lib/routes/dora-world/article.ts +2 -2
- package/lib/routes/douban/other/list.ts +3 -3
- package/lib/routes/dytt/index.ts +1 -2
- package/lib/routes/e-hentai/index.ts +4 -1
- package/lib/routes/eeo/kuaixun.ts +154 -0
- package/lib/routes/eeo/namespace.ts +9 -0
- package/lib/routes/eeo/templates/description.art +7 -0
- package/lib/routes/ehentai/ehapi.ts +3 -3
- package/lib/routes/ehentai/favorites.ts +1 -0
- package/lib/routes/ehentai/search.ts +1 -0
- package/lib/routes/ehentai/tag.ts +1 -0
- package/lib/routes/elecfans/article.ts +64 -0
- package/lib/routes/elecfans/namespace.ts +7 -0
- package/lib/routes/elecfans/soft.ts +69 -0
- package/lib/routes/engineering/namespace.ts +8 -0
- package/lib/routes/engineering/tag.ts +55 -0
- package/lib/routes/englishhome/index.ts +55 -0
- package/lib/routes/englishhome/namespace.ts +6 -0
- package/lib/routes/epicgames/index.ts +2 -2
- package/lib/routes/espn/news.ts +1 -1
- package/lib/routes/eventbrite/events.ts +152 -0
- package/lib/routes/eventbrite/namespace.ts +7 -0
- package/lib/routes/eventernote/actors.ts +61 -64
- package/lib/routes/everia/category.ts +1 -0
- package/lib/routes/everia/latest.ts +1 -0
- package/lib/routes/everia/search.ts +1 -0
- package/lib/routes/everia/tag.ts +1 -0
- package/lib/routes/expats/czech-news.ts +272 -0
- package/lib/routes/expats/namespace.ts +9 -0
- package/lib/routes/fanbox/index.ts +1 -0
- package/lib/routes/fanbox/utils.ts +1 -1
- package/lib/routes/fangchan/list.ts +1 -1
- package/lib/routes/fansly/post.ts +1 -0
- package/lib/routes/fansly/tag.ts +1 -0
- package/lib/routes/fantia/search.ts +2 -1
- package/lib/routes/fantia/user.ts +1 -0
- package/lib/routes/fantube/creator.ts +69 -0
- package/lib/routes/fantube/namespace.ts +7 -0
- package/lib/routes/fantube/templates/post.art +17 -0
- package/lib/routes/fantube/types.ts +100 -0
- package/lib/routes/fantube/utils.ts +268 -0
- package/lib/routes/finology/tag.ts +1 -1
- package/lib/routes/follow/profile.ts +1 -1
- package/lib/routes/followin/news.ts +1 -1
- package/lib/routes/foresightnews/util.ts +1 -1
- package/lib/routes/freexcomic/book.ts +4 -1
- package/lib/routes/furaffinity/art.ts +1 -0
- package/lib/routes/furaffinity/browse.ts +1 -0
- package/lib/routes/furaffinity/commissions.ts +1 -0
- package/lib/routes/furaffinity/home.ts +1 -0
- package/lib/routes/furaffinity/journal-comments.ts +1 -0
- package/lib/routes/furaffinity/journals.ts +1 -0
- package/lib/routes/furaffinity/search.ts +1 -0
- package/lib/routes/furaffinity/shouts.ts +1 -0
- package/lib/routes/furaffinity/status.ts +1 -0
- package/lib/routes/furaffinity/submission-comments.ts +1 -0
- package/lib/routes/furaffinity/user.ts +1 -0
- package/lib/routes/furaffinity/watchers.ts +1 -0
- package/lib/routes/furaffinity/watching.ts +1 -0
- package/lib/routes/gamebase/news.ts +2 -2
- package/lib/routes/gamer/gnn-index.ts +8 -3
- package/lib/routes/gamer/hot.ts +5 -5
- package/lib/routes/gaoyu/blog.ts +145 -0
- package/lib/routes/gaoyu/namespace.ts +9 -0
- package/lib/routes/gaoyu/templates/description.art +7 -0
- package/lib/routes/gcores/categories.ts +1 -1
- package/lib/routes/gcores/collections.ts +1 -1
- package/lib/routes/gcores/tags.ts +1 -1
- package/lib/routes/gcores/topics.ts +1 -1
- package/lib/routes/gdufs/xwxy/index.ts +196 -0
- package/lib/routes/gelbooru/post.ts +1 -0
- package/lib/routes/genossenschaften/index.ts +2 -3
- package/lib/routes/geocaching/blogs.ts +2 -2
- package/lib/routes/github/activity.ts +1 -1
- package/lib/routes/github/namespace.ts +1 -1
- package/lib/routes/github/private-feed.ts +229 -0
- package/lib/routes/github/star.ts +1 -1
- package/lib/routes/gitstar-ranking/index.ts +150 -0
- package/lib/routes/gitstar-ranking/namespace.ts +9 -0
- package/lib/routes/gitstar-ranking/templates/description.art +38 -0
- package/lib/routes/gmu/namespace.ts +7 -0
- package/lib/routes/gmu/news.ts +136 -0
- package/lib/routes/gmu/yjs.ts +173 -0
- package/lib/routes/go/jihs/idwr.ts +3 -4
- package/lib/routes/google/extension.ts +9 -10
- package/lib/routes/google/jules.ts +63 -0
- package/lib/routes/gov/beijing/bphc/index.ts +1 -1
- package/lib/routes/gov/ccdi/index.ts +1 -1
- package/lib/routes/gov/chongqing/sydwgkzp.ts +22 -6
- package/lib/routes/gov/customs/list.ts +1 -1
- package/lib/routes/gov/general/general.ts +1 -1
- package/lib/routes/gov/hangzhou/zwfw.ts +1 -1
- package/lib/routes/gov/mem/namespace.ts +7 -0
- package/lib/routes/gov/mem/zfxxgkpt.ts +96 -0
- package/lib/routes/gov/moa/gjs.ts +1 -1
- package/lib/routes/gov/mot/index.ts +157 -53
- package/lib/routes/gov/pbc/goutongjiaoliu.ts +1 -1
- package/lib/routes/gov/shenzhen/szlh/index.ts +77 -0
- package/lib/routes/gov/shenzhen/szlh/namespace.ts +8 -0
- package/lib/routes/grainoil/category.ts +1 -2
- package/lib/routes/grist/utils.ts +5 -4
- package/lib/routes/gxmzu/lib.ts +2 -2
- package/lib/routes/gxmzu/utils/index.ts +2 -2
- package/lib/routes/hameln/chapter.ts +1 -1
- package/lib/routes/hanime1/previews.ts +1 -0
- package/lib/routes/hanime1/search.ts +5 -2
- package/lib/routes/hellogithub/index.ts +1 -1
- package/lib/routes/hellogithub/report.ts +1 -1
- package/lib/routes/hex-rays/index.ts +1 -1
- package/lib/routes/hit/hitgs.ts +240 -54
- package/lib/routes/hit/namespace.ts +1 -1
- package/lib/routes/hit/templates/description.art +7 -0
- package/lib/routes/hitsz/due-tzgg.ts +110 -0
- package/lib/routes/hitsz/due.ts +172 -0
- package/lib/routes/hlju/namespace.ts +8 -0
- package/lib/routes/hlju/news.ts +141 -0
- package/lib/routes/hostmonit/cloudflareyes.ts +1 -1
- package/lib/routes/hotukdeals/index.ts +1 -1
- package/lib/routes/hpoi/banner-item.ts +28 -11
- package/lib/routes/hpoi/info.ts +1 -1
- package/lib/routes/hudsonrivertrading/index.ts +122 -0
- package/lib/routes/hudsonrivertrading/namespace.ts +7 -0
- package/lib/routes/huggingface/daily-papers.ts +45 -9
- package/lib/routes/huijin-inv/namespace.ts +7 -0
- package/lib/routes/huijin-inv/news.ts +83 -0
- package/lib/routes/hupu/index.ts +170 -74
- package/lib/routes/hupu/types.ts +163 -0
- package/lib/routes/hust/gs.ts +1 -1
- package/lib/routes/hust/mse.ts +1 -1
- package/lib/routes/huxiu/util.ts +2 -2
- package/lib/routes/hyperdash/namespace.ts +7 -0
- package/lib/routes/hyperdash/templates/description.art +34 -0
- package/lib/routes/hyperdash/top-traders.ts +84 -0
- package/lib/routes/hyperdash/utils.ts +49 -0
- package/lib/routes/hypergryph/arknights/announce.ts +1 -1
- package/lib/routes/ielts/index.ts +1 -1
- package/lib/routes/immich/cursed-knowledge.ts +49 -0
- package/lib/routes/immich/namespace.ts +7 -0
- package/lib/routes/indianexpress/namespace.ts +10 -0
- package/lib/routes/indianexpress/section.ts +124 -0
- package/lib/routes/infoq/presentations.ts +1 -1
- package/lib/routes/infoq/topic.ts +16 -13
- package/lib/routes/instagram/common-utils.ts +3 -3
- package/lib/routes/instagram/web-api/index.ts +17 -13
- package/lib/routes/instagram/web-api/utils.ts +46 -63
- package/lib/routes/investor/index.ts +362 -148
- package/lib/routes/itch/devlog.ts +7 -3
- package/lib/routes/iwara/index.ts +3 -0
- package/lib/routes/iwara/subscriptions.ts +1 -0
- package/lib/routes/jamesclear/book-summaries.ts +40 -0
- package/lib/routes/jamesclear/great-speeches.ts +40 -0
- package/lib/routes/jamesclear/namespace.ts +8 -0
- package/lib/routes/jamesclear/quotes.ts +40 -0
- package/lib/routes/jamesclear/three-two-one.ts +41 -0
- package/lib/routes/jamesclear/utils.ts +22 -0
- package/lib/routes/japanpost/utils.ts +2 -2
- package/lib/routes/javbus/index.ts +4 -1
- package/lib/routes/javdb/actors.ts +1 -0
- package/lib/routes/javdb/index.ts +3 -0
- package/lib/routes/javdb/lists.ts +3 -0
- package/lib/routes/javdb/makers.ts +1 -0
- package/lib/routes/javdb/rankings.ts +1 -0
- package/lib/routes/javdb/search.ts +1 -0
- package/lib/routes/javdb/series.ts +1 -0
- package/lib/routes/javdb/tags.ts +1 -0
- package/lib/routes/javdb/videocodes.ts +1 -0
- package/lib/routes/javlibrary/bestrated.ts +3 -0
- package/lib/routes/javlibrary/bestreviews.ts +1 -0
- package/lib/routes/javlibrary/genre.ts +3 -0
- package/lib/routes/javlibrary/maker.ts +1 -0
- package/lib/routes/javlibrary/mostwanted.ts +3 -0
- package/lib/routes/javlibrary/newentries.ts +3 -0
- package/lib/routes/javlibrary/newrelease.ts +3 -0
- package/lib/routes/javlibrary/star.ts +1 -0
- package/lib/routes/javlibrary/update.ts +3 -0
- package/lib/routes/javlibrary/user.ts +3 -0
- package/lib/routes/javlibrary/utils.ts +1 -1
- package/lib/routes/javtiful/actress.ts +3 -0
- package/lib/routes/javtiful/channel.ts +3 -0
- package/lib/routes/javtrailers/casts.ts +3 -0
- package/lib/routes/javtrailers/categories.ts +3 -0
- package/lib/routes/javtrailers/studios.ts +3 -0
- package/lib/routes/jbma/namespace.ts +17 -0
- package/lib/routes/jbma/report.ts +471 -0
- package/lib/routes/jetbrains/comments.ts +99 -0
- package/lib/routes/jetbrains/namespace.ts +8 -0
- package/lib/routes/jimmyspa/books.ts +1 -1
- package/lib/routes/jimmyspa/news.ts +1 -1
- package/lib/routes/jingzhengu/utils.ts +1 -1
- package/lib/routes/jou/utils/index.ts +2 -2
- package/lib/routes/jpxgmn/search.ts +3 -0
- package/lib/routes/jpxgmn/tab.ts +3 -0
- package/lib/routes/jpxgmn/weekly.ts +3 -0
- package/lib/routes/juejin/aicoding.ts +102 -0
- package/lib/routes/juejin/trending.ts +70 -20
- package/lib/routes/juejin/utils.ts +36 -51
- package/lib/routes/jumeili/home.ts +1 -1
- package/lib/routes/kakuyomu/works.ts +4 -1
- package/lib/routes/kaopu/news.ts +1 -1
- package/lib/routes/kemono/const.ts +1 -1
- package/lib/routes/kemono/index.ts +23 -14
- package/lib/routes/kemono/namespace.ts +1 -1
- package/lib/routes/kemono/templates/discord.art +1 -1
- package/lib/routes/kiro/blog.ts +131 -0
- package/lib/routes/kiro/changelog.ts +128 -0
- package/lib/routes/kiro/namespace.ts +9 -0
- package/lib/routes/kisskiss/blog.ts +1 -0
- package/lib/routes/komiic/comic.ts +2 -1
- package/lib/routes/konachan/post.ts +3 -0
- package/lib/routes/kovidgoyal/kitty/changelog.ts +83 -0
- package/lib/routes/kovidgoyal/namespace.ts +7 -0
- package/lib/routes/koyso/index.ts +339 -0
- package/lib/routes/koyso/namespace.ts +9 -0
- package/lib/routes/koyso/templates/description.art +13 -0
- package/lib/routes/kpopping/kpics.ts +3 -4
- package/lib/routes/kpopping/news.ts +2 -2
- package/lib/routes/kunchengblog/essay.ts +1 -1
- package/lib/routes/laimanhua/index.ts +1 -0
- package/lib/routes/landiannews/category.ts +1 -1
- package/lib/routes/landiannews/index.ts +1 -1
- package/lib/routes/landiannews/tag.ts +1 -1
- package/lib/routes/letterboxd/index.ts +65 -0
- package/lib/routes/letterboxd/namespace.ts +8 -0
- package/lib/routes/lhratings/research.ts +1 -1
- package/lib/routes/line/utils.ts +1 -1
- package/lib/routes/lineageos/changes.ts +79 -0
- package/lib/routes/lineageos/namespace.ts +9 -0
- package/lib/routes/linkedin/cn/renderer.ts +1 -1
- package/lib/routes/liquipedia/cs-matches.ts +42 -14
- package/lib/routes/literotica/category.ts +3 -0
- package/lib/routes/literotica/new.ts +1 -0
- package/lib/routes/lofter/tag.ts +27 -3
- package/lib/routes/lovelive-anime/topics.ts +5 -6
- package/lib/routes/maccms/index.ts +1 -1
- package/lib/routes/makerworld/contest.ts +51 -0
- package/lib/routes/makerworld/namespace.ts +7 -0
- package/lib/routes/makerworld/trending.ts +45 -0
- package/lib/routes/makerworld/user-upload.ts +54 -0
- package/lib/routes/makerworld/utils.ts +18 -0
- package/lib/routes/mangadex/index.ts +3 -0
- package/lib/routes/mangadex/mdlist/feed.ts +1 -0
- package/lib/routes/mangadex/user/feed.ts +1 -0
- package/lib/routes/mangadex/user/follows.ts +1 -0
- package/lib/routes/manhuagui/comic.ts +2 -1
- package/lib/routes/manhuagui/subscribe.ts +1 -0
- package/lib/routes/manus/blog.ts +77 -0
- package/lib/routes/manus/namespace.ts +7 -0
- package/lib/routes/manyvids/video.ts +3 -0
- package/lib/routes/mastodon/tag.ts +48 -0
- package/lib/routes/mathpix/blog.ts +155 -0
- package/lib/routes/mathpix/namespace.ts +9 -0
- package/lib/routes/mathpix/templates/description.art +21 -0
- package/lib/routes/mckinsey/cn/category-map.ts +9 -15
- package/lib/routes/mckinsey/cn/index.ts +77 -40
- package/lib/routes/melonbooks/search.ts +1 -0
- package/lib/routes/mercari/keyword.ts +2 -1
- package/lib/routes/mercari/search.ts +90 -0
- package/lib/routes/mercari/util.ts +27 -11
- package/lib/routes/metacritic/index.ts +2 -2
- package/lib/routes/meteoblue/namespace.ts +8 -0
- package/lib/routes/meteoblue/weathernews.ts +75 -0
- package/lib/routes/meteor/index.ts +1 -1
- package/lib/routes/microsoft/addon.ts +7 -9
- package/lib/routes/mihoyo/sr/news.ts +2 -1
- package/lib/routes/mihoyo/zzz/news.ts +107 -0
- package/lib/routes/mingpao/index.ts +1 -1
- package/lib/routes/missav/new.ts +2 -1
- package/lib/routes/misskon/posts.ts +1 -0
- package/lib/routes/misskon/tag.ts +1 -0
- package/lib/routes/misskon/top.ts +1 -0
- package/lib/routes/mit/hanlab.ts +61 -0
- package/lib/routes/mit/namespace.ts +6 -0
- package/lib/routes/mittrchina/index.ts +3 -3
- package/lib/routes/mixcloud/config.ts +129 -0
- package/lib/routes/mixcloud/index.ts +163 -107
- package/lib/routes/mixcloud/user-playlist.ts +31 -0
- package/lib/routes/mixi2/community.ts +72 -0
- package/lib/routes/mixi2/discovery.ts +52 -0
- package/lib/routes/mixi2/home.ts +51 -0
- package/lib/routes/mixi2/namespace.ts +8 -0
- package/lib/routes/mixi2/user.ts +77 -0
- package/lib/routes/mixi2/utils.ts +56 -0
- package/lib/routes/modelscope/learn.ts +94 -0
- package/lib/routes/moodysmismicrosite/report.ts +1 -1
- package/lib/routes/musify/index.ts +129 -0
- package/lib/routes/musify/namespace.ts +9 -0
- package/lib/routes/musikguru/namespace.ts +9 -0
- package/lib/routes/musikguru/news.ts +146 -0
- package/lib/routes/musikguru/templates/description.art +21 -0
- package/lib/routes/mycard520/news.ts +2 -2
- package/lib/routes/myfans/post.ts +1 -0
- package/lib/routes/nankai/ai-notice.ts +142 -0
- package/lib/routes/nankai/cc-notice.ts +114 -0
- package/lib/routes/nankai/graduate-notice.ts +162 -0
- package/lib/routes/nankai/jwc.ts +131 -0
- package/lib/routes/nankai/namespace.ts +7 -0
- package/lib/routes/nankai/notice.ts +84 -0
- package/lib/routes/nankai/yzb.ts +97 -0
- package/lib/routes/natgeo/natgeo.ts +3 -2
- package/lib/routes/naturalism/namespace.ts +7 -0
- package/lib/routes/naturalism/new.ts +59 -0
- package/lib/routes/netflav/index.ts +3 -0
- package/lib/routes/neu/yz.ts +172 -0
- package/lib/routes/newslaundry/explainer.ts +30 -0
- package/lib/routes/newslaundry/namespace.ts +8 -0
- package/lib/routes/newslaundry/nl-cheatsheet.ts +30 -0
- package/lib/routes/newslaundry/nl-collaborations.ts +30 -0
- package/lib/routes/newslaundry/podcast.ts +61 -0
- package/lib/routes/newslaundry/reports.ts +30 -0
- package/lib/routes/newslaundry/shot.ts +30 -0
- package/lib/routes/newslaundry/subscriber-only.ts +30 -0
- package/lib/routes/newslaundry/templates/description.art +28 -0
- package/lib/routes/newslaundry/utils.ts +108 -0
- package/lib/routes/newswav/latest.ts +100 -0
- package/lib/routes/newswav/namespace.ts +7 -0
- package/lib/routes/nhentai/index.ts +1 -0
- package/lib/routes/nhentai/search.ts +1 -0
- package/lib/routes/nhk/news-web-easy.ts +1 -1
- package/lib/routes/nicovideo/mylist.ts +39 -0
- package/lib/routes/nicovideo/types.ts +27 -0
- package/lib/routes/nicovideo/utils.ts +27 -1
- package/lib/routes/nifd/research.ts +16 -0
- package/lib/routes/nikkei/cn/index.ts +1 -4
- package/lib/routes/nio/namespace.ts +9 -0
- package/lib/routes/nio/nioradio.ts +75 -0
- package/lib/routes/njust/cs.ts +58 -0
- package/lib/routes/njust/utils.ts +1 -1
- package/lib/routes/njxzc/utils/index.ts +2 -2
- package/lib/routes/notion/namespace.ts +2 -2
- package/lib/routes/now/news.ts +1 -1
- package/lib/routes/ntdm/video.ts +1 -1
- package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
- package/lib/routes/nycu/aa.ts +72 -0
- package/lib/routes/nycu/announcement.ts +61 -0
- package/lib/routes/nycu/cs.ts +54 -0
- package/lib/routes/nycu/namespace.ts +10 -0
- package/lib/routes/nycu/osa.ts +107 -0
- package/lib/routes/nytimes/index.ts +1 -1
- package/lib/routes/oilchem/index.ts +1 -1
- package/lib/routes/olevod/vod.ts +3 -0
- package/lib/routes/olevod/vodlist.ts +3 -0
- package/lib/routes/oncc/money18.ts +1 -1
- package/lib/routes/openai/cookbook.ts +1 -1
- package/lib/routes/oreno3d/main.ts +1 -0
- package/lib/routes/oschina/column.ts +1 -2
- package/lib/routes/oschina/event.ts +1 -1
- package/lib/routes/osu/beatmaps/latest-ranked.ts +2 -3
- package/lib/routes/papers/category.ts +3 -4
- package/lib/routes/patreon/feed.ts +1 -0
- package/lib/routes/paulgraham/article.ts +2 -2
- package/lib/routes/picuki/profile.ts +17 -5
- package/lib/routes/pixiv/bookmarks.ts +2 -1
- package/lib/routes/pixiv/illustfollow.ts +1 -0
- package/lib/routes/pixiv/novel-api/series/sfw.ts +1 -1
- package/lib/routes/pixiv/novel-api/user-novels/sfw.ts +1 -1
- package/lib/routes/pixiv/novel-series.ts +17 -3
- package/lib/routes/pixiv/novels.ts +3 -2
- package/lib/routes/pixiv/ranking.ts +1 -0
- package/lib/routes/pixiv/search.ts +1 -0
- package/lib/routes/pixiv/user.ts +2 -1
- package/lib/routes/pixivision/utils.ts +1 -1
- package/lib/routes/pku/hr.ts +1 -1
- package/lib/routes/pku/scc/recruit.ts +1 -1
- package/lib/routes/playno1/av.ts +1 -0
- package/lib/routes/pornhub/category-url.ts +1 -0
- package/lib/routes/pornhub/category.ts +1 -0
- package/lib/routes/pornhub/model.ts +3 -7
- package/lib/routes/pornhub/pornstar.ts +3 -7
- package/lib/routes/pornhub/search.ts +1 -0
- package/lib/routes/pornhub/users.ts +3 -7
- package/lib/routes/pornhub/utils.ts +12 -1
- package/lib/routes/producthunt/templates/description.art +2 -2
- package/lib/routes/producthunt/today.ts +17 -8
- package/lib/routes/ps/trophy.ts +1 -1
- package/lib/routes/pubscholar/utils.ts +14 -1
- package/lib/routes/python/namespace.ts +9 -0
- package/lib/routes/python/release.ts +120 -0
- package/lib/routes/qingting/podcast.ts +2 -1
- package/lib/routes/qipamaijia/index.ts +1 -0
- package/lib/routes/qq/lol/news.ts +1 -1
- package/lib/routes/questmobile/report.ts +1 -1
- package/lib/routes/qweather/3days.ts +14 -14
- package/lib/routes/qweather/now.ts +12 -10
- package/lib/routes/qweather/util.tsx +89 -0
- package/lib/routes/qwenlm/blog.ts +75 -0
- package/lib/routes/qwenlm/namespace.ts +6 -0
- package/lib/routes/radio-canada/latest.ts +30 -17
- package/lib/routes/railway/index.ts +73 -0
- package/lib/routes/railway/namespace.ts +8 -0
- package/lib/routes/rawkuma/manga.ts +1 -0
- package/lib/routes/reuters/common.ts +0 -3
- package/lib/routes/rockthejvm/articles.ts +167 -0
- package/lib/routes/rockthejvm/namespace.ts +9 -0
- package/lib/routes/rockthejvm/templates/description.art +7 -0
- package/lib/routes/ruc/ai.ts +1 -1
- package/lib/routes/ruc/hr.ts +1 -1
- package/lib/routes/samrdprc/index.ts +241 -0
- package/lib/routes/samrdprc/namespace.ts +7 -0
- package/lib/routes/samrdprc/news.ts +79 -0
- package/lib/routes/sankei/namespace.ts +7 -0
- package/lib/routes/sankei/news.ts +68 -0
- package/lib/routes/sankei/topics.ts +71 -0
- package/lib/routes/sciencenet/user.ts +1 -1
- package/lib/routes/scientificamerican/podcast.ts +2 -2
- package/lib/routes/scitechvista/index.ts +99 -0
- package/lib/routes/scitechvista/namespace.ts +7 -0
- package/lib/routes/scitechvista/templates/description.art +6 -0
- package/lib/routes/scoop/apps.ts +186 -0
- package/lib/routes/scoop/namespace.ts +9 -0
- package/lib/routes/scoop/templates/description.art +56 -0
- package/lib/routes/scpta/namespace.ts +8 -0
- package/lib/routes/scpta/news.ts +101 -0
- package/lib/routes/sdo/ff14risingstones/api.ts +78 -0
- package/lib/routes/sdo/ff14risingstones/constant.ts +338 -0
- package/lib/routes/sdo/ff14risingstones/posts.ts +80 -0
- package/lib/routes/sdo/ff14risingstones/strats.ts +75 -0
- package/lib/routes/sdo/ff14risingstones/templates/duties-party.art +41 -0
- package/lib/routes/sdo/ff14risingstones/templates/fc-party.art +26 -0
- package/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art +9 -0
- package/lib/routes/sdo/ff14risingstones/templates/rp-party.art +15 -0
- package/lib/routes/sdo/ff14risingstones/timeline.ts +31 -0
- package/lib/routes/sdo/ff14risingstones/types/dynamic.ts +50 -0
- package/lib/routes/sdo/ff14risingstones/types/index.ts +3 -0
- package/lib/routes/sdo/ff14risingstones/types/other.ts +57 -0
- package/lib/routes/sdo/ff14risingstones/types/party.ts +111 -0
- package/lib/routes/sdo/ff14risingstones/user-dynamics.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/user-posts.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/user-resently.ts +38 -0
- package/lib/routes/sdo/ff14risingstones/user-strats.ts +32 -0
- package/lib/routes/sdo/ff14risingstones/utils.ts +215 -0
- package/lib/routes/sdo/namespace.ts +7 -0
- package/lib/routes/secretsanfrancisco/namespace.ts +7 -0
- package/lib/routes/secretsanfrancisco/rss.ts +101 -0
- package/lib/routes/secretsanfrancisco/templates/description.art +9 -0
- package/lib/routes/seekingalpha/index.ts +1 -1
- package/lib/routes/sehuatang/index.ts +29 -31
- package/lib/routes/sehuatang/user.ts +1 -0
- package/lib/routes/setn/index.ts +11 -2
- package/lib/routes/seu/cyber/index.ts +78 -0
- package/lib/routes/showstart/utils.ts +1 -1
- package/lib/routes/shu/global.ts +6 -5
- package/lib/routes/shu/xxgk.ts +107 -0
- package/lib/routes/shuiguopai/index.ts +3 -0
- package/lib/routes/sicau/jiaowu.ts +42 -34
- package/lib/routes/sis001/author.ts +1 -0
- package/lib/routes/sis001/forum.ts +1 -0
- package/lib/routes/sjtu/jwc.ts +1 -1
- package/lib/routes/sjtu/seiee/icisee.ts +67 -0
- package/lib/routes/skeb/following-creators.ts +1 -0
- package/lib/routes/skeb/following-works.ts +1 -0
- package/lib/routes/skeb/friend-works.ts +1 -0
- package/lib/routes/skeb/index.ts +1 -0
- package/lib/routes/skeb/search.ts +1 -0
- package/lib/routes/skeb/works.ts +44 -25
- package/lib/routes/skebetter/illust.ts +1 -0
- package/lib/routes/skebetter/index.ts +1 -0
- package/lib/routes/skebetter/manga.ts +1 -0
- package/lib/routes/sketis/isabelle-dev/blog/index.ts +1 -1
- package/lib/routes/smartlink/index.ts +84 -0
- package/lib/routes/smartlink/namespace.ts +7 -0
- package/lib/routes/sohu/mp.ts +18 -7
- package/lib/routes/sotwe/namespace.ts +1 -0
- package/lib/routes/sotwe/user.ts +98 -0
- package/lib/routes/spankbang/new-videos.ts +1 -0
- package/lib/routes/spglobal/ratings.ts +1 -1
- package/lib/routes/sspai/index.ts +5 -1
- package/lib/routes/stanford/blog.ts +77 -0
- package/lib/routes/stanford/namespace.ts +7 -0
- package/lib/routes/stcn/index.ts +1 -2
- package/lib/routes/stcn/rank.ts +1 -2
- package/lib/routes/storm/channel.ts +80 -0
- package/lib/routes/surfshark/blog.ts +273 -77
- package/lib/routes/surfshark/templates/description.art +16 -4
- package/lib/routes/sustainabilitymag/articles.ts +1 -1
- package/lib/routes/syosetu/dev.ts +1 -1
- package/lib/routes/syosetu/index.ts +1 -1
- package/lib/routes/syosetu/ranking-isekai.ts +1 -1
- package/lib/routes/szse/disclosure/listed-notice.ts +44 -6
- package/lib/routes/t66y/index.ts +1 -0
- package/lib/routes/t66y/post.ts +1 -0
- package/lib/routes/taobao/mysql.ts +157 -0
- package/lib/routes/taobao/namespace.ts +2 -2
- package/lib/routes/taptap/topic.ts +16 -9
- package/lib/routes/techcrunch/category.ts +48 -0
- package/lib/routes/techcrunch/news.ts +1 -0
- package/lib/routes/techpowerup/index.ts +11 -11
- package/lib/routes/techpowerup/namespace.ts +1 -1
- package/lib/routes/techpowerup/review.ts +12 -12
- package/lib/routes/techpowerup/utils.ts +2 -2
- package/lib/routes/telegram/channel-media.ts +249 -0
- package/lib/routes/telegram/channel.ts +7 -6
- package/lib/routes/telegram/stories.ts +130 -0
- package/lib/routes/telegram/tglib/channel.ts +146 -117
- package/lib/routes/telegram/tglib/client.ts +37 -139
- package/lib/routes/tesla/cx.ts +2 -2
- package/lib/routes/test/index.ts +5 -1
- package/lib/routes/thegadgetflow/namespace.ts +7 -0
- package/lib/routes/thegadgetflow/rss.ts +99 -0
- package/lib/routes/thegadgetflow/templates/description.art +9 -0
- package/lib/routes/themoviedb/episodes.ts +1 -1
- package/lib/routes/theverge/index.ts +20 -6
- package/lib/routes/thewirehindi/category.ts +78 -0
- package/lib/routes/thewirehindi/index.ts +43 -0
- package/lib/routes/thewirehindi/namespace.ts +7 -0
- package/lib/routes/thewirehindi/templates/description.art +9 -0
- package/lib/routes/thewirehindi/utils.ts +33 -0
- package/lib/routes/threads/utils.ts +9 -5
- package/lib/routes/tidb/blog.ts +314 -0
- package/lib/routes/tidb/namespace.ts +9 -0
- package/lib/routes/tju/yzb/index.ts +2 -2
- package/lib/routes/tmtpost/column.ts +1 -1
- package/lib/routes/toutiao/user.ts +2 -2
- package/lib/routes/trendforce/namespace.ts +9 -0
- package/lib/routes/trendforce/new.ts +113 -0
- package/lib/routes/tsinghua/news.ts +87 -0
- package/lib/routes/tumblr/namespace.ts +17 -0
- package/lib/routes/tumblr/posts.ts +74 -0
- package/lib/routes/tumblr/utils.ts +110 -0
- package/lib/routes/tver/namespace.ts +7 -0
- package/lib/routes/tver/series.ts +98 -0
- package/lib/routes/twitter/api/mobile-api/api.ts +1 -1
- package/lib/routes/twitter/api/web-api/api.ts +5 -1
- package/lib/routes/twitter/api/web-api/login.ts +1 -3
- package/lib/routes/twitter/api/web-api/utils.ts +23 -1
- package/lib/routes/twitter/utils.ts +21 -21
- package/lib/routes/txrjy/fornumtopic.ts +2 -2
- package/lib/routes/typst/universe.ts +1 -1
- package/lib/routes/uber/blog.ts +87 -46
- package/lib/routes/udn/breaking-news.ts +2 -2
- package/lib/routes/udn/global/index.ts +37 -25
- package/lib/routes/udn/global/tag.ts +16 -9
- package/lib/routes/uestc/auto.ts +1 -1
- package/lib/routes/uestc/cqe.ts +1 -1
- package/lib/routes/uestc/scse.ts +1 -1
- package/lib/routes/uestc/sice.ts +1 -1
- package/lib/routes/uestc/sise.ts +1 -1
- package/lib/routes/upc/jwc.ts +32 -46
- package/lib/routes/uptimerobot/rss.ts +1 -1
- package/lib/routes/uraaka-joshi/uraaka-joshi-user.ts +1 -0
- package/lib/routes/uraaka-joshi/uraaka-joshi.ts +3 -0
- package/lib/routes/visionias/daily-news-summary.ts +65 -0
- package/lib/routes/visionias/monthly-magazine.ts +68 -0
- package/lib/routes/visionias/news-today.ts +3 -13
- package/lib/routes/visionias/utils.ts +5 -5
- package/lib/routes/visionias/weekly-focus.ts +2 -2
- package/lib/routes/wainao/topics.ts +1 -1
- package/lib/routes/warhammer-community/namespace.ts +7 -0
- package/lib/routes/warhammer-community/news.ts +73 -0
- package/lib/routes/wdfxw/bookfree.ts +528 -0
- package/lib/routes/wdfxw/namespace.ts +8 -0
- package/lib/routes/wdfxw/templates/description.art +13 -0
- package/lib/routes/weibo/utils.ts +17 -9
- package/lib/routes/whu/swrh.ts +1 -1
- package/lib/routes/wikipedia/current-events.ts +411 -0
- package/lib/routes/wikipedia/namespace.ts +7 -0
- package/lib/routes/windsurf/blog.ts +118 -0
- package/lib/routes/windsurf/changelog.ts +100 -0
- package/lib/routes/windsurf/namespace.ts +9 -0
- package/lib/routes/windsurf/templates/description.art +21 -0
- package/lib/routes/wnacg/category.ts +3 -0
- package/lib/routes/wnacg/index.ts +3 -0
- package/lib/routes/wnacg/tag.ts +3 -0
- package/lib/routes/wohnnet/index.ts +2 -2
- package/lib/routes/x6d/index.ts +1 -1
- package/lib/routes/xbookcn/blog.ts +1 -0
- package/lib/routes/xiaohongshu/user.ts +2 -2
- package/lib/routes/xiaohongshu/util.ts +15 -10
- package/lib/routes/xiaoyuzhou/pickup.ts +1 -1
- package/lib/routes/ximalaya/album.ts +32 -70
- package/lib/routes/ximalaya/types.ts +48 -0
- package/lib/routes/ximalaya/utils.ts +9 -7
- package/lib/routes/xjtu/ee-jzxx.ts +1 -1
- package/lib/routes/xjtu/zs.ts +1 -1
- package/lib/routes/xmanhua/index.ts +1 -0
- package/lib/routes/xsijishe/forum.ts +1 -0
- package/lib/routes/xsijishe/rank.ts +1 -0
- package/lib/routes/xueqiu/cookies.ts +1 -1
- package/lib/routes/xueqiu/user.ts +24 -1
- package/lib/routes/xwenming/index.ts +184 -0
- package/lib/routes/xwenming/namespace.ts +9 -0
- package/lib/routes/xyu/library.ts +63 -0
- package/lib/routes/xyu/namespace.ts +7 -0
- package/lib/routes/xyu/notices.ts +116 -0
- package/lib/routes/yahoo/news/utils.ts +8 -4
- package/lib/routes/yande/post.ts +3 -0
- package/lib/routes/ymgal/article.ts +1 -1
- package/lib/routes/ymgal/game.ts +1 -0
- package/lib/routes/yoasobi-music/media.ts +1 -1
- package/lib/routes/youtube/api/google.ts +41 -0
- package/lib/routes/youtube/api/subtitles.ts +86 -0
- package/lib/routes/youtube/api/youtubei.ts +28 -22
- package/lib/routes/youtube/channel.ts +1 -1
- package/lib/routes/youtube/community.ts +7 -5
- package/lib/routes/youtube/user.ts +1 -1
- package/lib/routes/youtube/utils.ts +16 -14
- package/lib/routes/yuanliao/index.ts +1 -1
- package/lib/routes/zaimanhua/comic.ts +1 -0
- package/lib/routes/zaimanhua/update.ts +1 -0
- package/lib/routes/zaker/utils.ts +1 -1
- package/lib/routes/zaobao/interactive.ts +18 -7
- package/lib/routes/zaobao/other.ts +3 -2
- package/lib/routes/zaobao/realtime.ts +3 -2
- package/lib/routes/zaobao/util.tsx +185 -0
- package/lib/routes/zaobao/zaobao.tsx +23 -0
- package/lib/routes/zaobao/znews.ts +3 -2
- package/lib/routes/zhihu/activities.ts +12 -3
- package/lib/routes/zhihu/answers.ts +7 -1
- package/lib/routes/zhihu/daily-section.ts +19 -24
- package/lib/routes/zhihu/daily.ts +8 -11
- package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
- package/lib/routes/zhihu/posts.ts +14 -6
- package/lib/routes/zhihu/question.ts +7 -1
- package/lib/routes/zhihu/types.ts +29 -29
- package/lib/routes/zhihu/utils.ts +59 -44
- package/lib/routes/zhizhuan100/namespace.ts +7 -0
- package/lib/routes/zhizhuan100/report.ts +79 -0
- package/lib/routes/zimuxia/portfolio.ts +1 -1
- package/lib/routes/zju/cse/index.ts +102 -0
- package/lib/routes/zju/sis/index.ts +161 -0
- package/lib/routes/zodgame/forum.ts +1 -0
- package/lib/server.ts +5 -0
- package/lib/types.ts +59 -55
- package/lib/utils/helpers.ts +1 -1
- package/lib/utils/logger.ts +1 -1
- package/lib/utils/ofetch.ts +1 -1
- package/lib/utils/proxy/index.ts +102 -18
- package/lib/utils/proxy/multi-proxy.ts +139 -0
- package/lib/utils/proxy/unify-proxy.ts +3 -1
- package/lib/utils/puppeteer-utils.test.ts +6 -6
- package/lib/utils/puppeteer.test.ts +14 -27
- package/lib/utils/puppeteer.ts +51 -37
- package/lib/utils/readable-social.test.ts +65 -0
- package/lib/utils/readable-social.ts +15 -1
- package/lib/utils/request-rewriter/fetch.ts +42 -4
- package/lib/views/index.tsx +4 -4
- package/package.json +76 -80
- package/lib/routes/gdufs/xwxy/xwxy-news.ts +0 -90
- package/lib/routes/hit/jwc.ts +0 -86
- package/lib/routes/mixcloud/queries.ts +0 -2274
- package/lib/routes/picuki/utils.ts +0 -19
- package/lib/routes/qweather/templates/3days.art +0 -22
- package/lib/routes/qweather/templates/now.art +0 -16
- package/lib/routes/xinhuanet/app.ts +0 -109
- package/lib/routes/zaobao/templates/zaobao.art +0 -17
- package/lib/routes/zaobao/util.ts +0 -195
- 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(','),
|
package/lib/errors/index.test.ts
CHANGED
|
@@ -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('
|
|
78
|
+
expect(value).toBe('12');
|
|
71
79
|
break;
|
|
72
80
|
case 'Hot Routes:':
|
|
73
|
-
expect(value).toBe('
|
|
81
|
+
expect(value).toBe('9 /test/:id/:params?<br>');
|
|
74
82
|
break;
|
|
75
83
|
case 'Hot Paths:':
|
|
76
|
-
expect(value).toBe(
|
|
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('
|
|
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
|
}
|
package/lib/errors/index.tsx
CHANGED
|
@@ -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
|
|
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':
|
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
|
-
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
logger.info(`🔗
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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;
|
package/lib/middleware/cache.ts
CHANGED
|
@@ -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) {
|
package/lib/middleware/debug.ts
CHANGED
|
@@ -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
|
|
21
|
-
|
|
22
|
-
|
|
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[
|
|
26
|
+
hasMatchedRoute && debug.routes[rPath]++;
|
|
25
27
|
|
|
26
28
|
if (ctx.res.headers.get('RSSHub-Cache-Status')) {
|
|
27
29
|
debug.hitCache++;
|
package/lib/middleware/header.ts
CHANGED
|
@@ -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 (
|
|
29
|
-
ctx.header('X-RSSHub-Route',
|
|
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.
|
|
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) => {
|
package/lib/registry.test.ts
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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
|
-
|
|
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).
|
|
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
|
|
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
|
-
|
|
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: '
|
|
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'));
|