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.
- package/lib/config.ts +38 -0
 - package/lib/errors/index.tsx +3 -2
 - package/lib/middleware/debug.ts +6 -4
 - package/lib/middleware/header.ts +4 -2
 - package/lib/registry.test.ts +24 -1
 - package/lib/registry.ts +40 -11
 - package/lib/router.js +1 -1
 - package/lib/routes/121/namespace.ts +9 -0
 - 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 +59 -64
 - package/lib/routes/18comic/index.ts +1 -0
 - package/lib/routes/18comic/search.ts +53 -4
 - package/lib/routes/18comic/utils.ts +70 -1
 - package/lib/routes/2048/index.ts +1 -0
 - package/lib/routes/30secondsofcode/utils.ts +0 -1
 - package/lib/routes/6park/index.ts +1 -1
 - package/lib/routes/7mmtv/index.ts +1 -0
 - package/lib/routes/91porn/index.ts +1 -0
 - package/lib/routes/95mm/tab.ts +1 -0
 - package/lib/routes/agefans/detail.ts +1 -1
 - package/lib/routes/aliyun/database-month.ts +1 -1
 - package/lib/routes/anthropic/research.ts +112 -0
 - package/lib/routes/apnews/topics.ts +2 -1
 - package/lib/routes/apnews/utils.ts +1 -1
 - package/lib/routes/apple/design.ts +54 -0
 - package/lib/routes/apple/namespace.ts +1 -1
 - package/lib/routes/aqara/post.ts +1 -1
 - 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/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/bfl/announcements.ts +1 -1
 - package/lib/routes/bilibili/cache.ts +78 -0
 - package/lib/routes/bilibili/danmaku.ts +1 -1
 - package/lib/routes/bilibili/dynamic.ts +8 -2
 - package/lib/routes/bilibili/video.ts +31 -73
 - package/lib/routes/biquge/index.ts +1 -1
 - package/lib/routes/bsky/keyword.ts +15 -10
 - 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/chikubi/index.ts +1 -0
 - package/lib/routes/chikubi/tag.ts +1 -0
 - package/lib/routes/chocolatey/namespace.ts +9 -0
 - package/lib/routes/chocolatey/packages.ts +122 -0
 - package/lib/routes/cmde/index.ts +1 -1
 - package/lib/routes/cockroachlabs/blog.ts +113 -0
 - package/lib/routes/cockroachlabs/namespace.ts +7 -0
 - package/lib/routes/cool18/index.ts +4 -1
 - package/lib/routes/coomer/index.ts +12 -6
 - package/lib/routes/coomer/namespace.ts +1 -1
 - package/lib/routes/copymanga/comic.ts +7 -9
 - 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/changelog.ts +26 -17
 - package/lib/routes/cursor/namespace.ts +1 -1
 - package/lib/routes/cw/utils.ts +6 -13
 - package/lib/routes/dealstreetasia/home.ts +1 -1
 - package/lib/routes/dedao/index.ts +3 -3
 - package/lib/routes/deepl/blog.ts +422 -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/digitalpolicyalert/activity-tracker.ts +135 -0
 - package/lib/routes/digitalpolicyalert/namespace.ts +9 -0
 - package/lib/routes/dnaindia/common.ts +26 -8
 - package/lib/routes/douban/other/list.ts +3 -3
 - package/lib/routes/e-hentai/index.ts +4 -1
 - package/lib/routes/ehentai/tag.ts +1 -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/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/fansly/tag.ts +1 -0
 - package/lib/routes/fantia/search.ts +1 -1
 - 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/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/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/geocaching/blogs.ts +2 -2
 - 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/google/extension.ts +9 -10
 - 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/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/grist/utils.ts +5 -4
 - package/lib/routes/hanime1/search.ts +4 -2
 - package/lib/routes/hellogithub/report.ts +1 -1
 - package/lib/routes/hit/hitgs.ts +240 -54
 - package/lib/routes/hit/templates/description.art +7 -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/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/infoq/topic.ts +16 -13
 - package/lib/routes/instagram/web-api/index.ts +17 -13
 - package/lib/routes/instagram/web-api/utils.ts +46 -63
 - 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 +3 -0
 - package/lib/routes/javdb/tags.ts +1 -0
 - package/lib/routes/javlibrary/star.ts +1 -0
 - 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/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/jpxgmn/tab.ts +3 -0
 - package/lib/routes/kakuyomu/works.ts +3 -0
 - package/lib/routes/kaopu/news.ts +1 -1
 - package/lib/routes/kemono/const.ts +1 -1
 - package/lib/routes/kemono/index.ts +12 -11
 - package/lib/routes/kemono/namespace.ts +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/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/kunchengblog/essay.ts +1 -1
 - 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/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/new.ts +1 -0
 - package/lib/routes/lofter/tag.ts +27 -3
 - 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/manhuagui/comic.ts +1 -1
 - package/lib/routes/manus/blog.ts +77 -0
 - package/lib/routes/manus/namespace.ts +7 -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/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/zzz/news.ts +106 -0
 - package/lib/routes/missav/new.ts +2 -1
 - 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 +130 -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/myfans/post.ts +1 -0
 - package/lib/routes/nankai/cc-notice.ts +114 -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/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/nifd/research.ts +16 -0
 - 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/ntdm/video.ts +1 -1
 - package/lib/routes/nuaa/utils/pypasswaf.ts +1 -1
 - package/lib/routes/oilchem/index.ts +1 -1
 - package/lib/routes/oncc/money18.ts +1 -1
 - package/lib/routes/openai/cookbook.ts +1 -1
 - package/lib/routes/paulgraham/article.ts +2 -2
 - package/lib/routes/picuki/profile.ts +4 -0
 - package/lib/routes/pixiv/bookmarks.ts +1 -1
 - package/lib/routes/pixiv/novel-api/series/sfw.ts +1 -1
 - package/lib/routes/pixiv/novels.ts +2 -2
 - package/lib/routes/pixiv/user.ts +1 -1
 - package/lib/routes/playno1/av.ts +1 -0
 - package/lib/routes/pornhub/model.ts +3 -7
 - package/lib/routes/pornhub/pornstar.ts +2 -7
 - package/lib/routes/pornhub/users.ts +2 -7
 - package/lib/routes/pornhub/utils.ts +12 -1
 - package/lib/routes/qingting/podcast.ts +2 -1
 - package/lib/routes/qipamaijia/index.ts +1 -0
 - package/lib/routes/questmobile/report.ts +1 -1
 - package/lib/routes/railway/index.ts +73 -0
 - package/lib/routes/railway/namespace.ts +8 -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/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/scoop/apps.ts +188 -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/seekingalpha/index.ts +1 -1
 - package/lib/routes/sehuatang/index.ts +29 -31
 - package/lib/routes/setn/index.ts +11 -2
 - package/lib/routes/seu/cyber/index.ts +78 -0
 - package/lib/routes/sicau/jiaowu.ts +42 -34
 - package/lib/routes/sis001/forum.ts +1 -0
 - package/lib/routes/sjtu/seiee/icisee.ts +67 -0
 - package/lib/routes/sketis/isabelle-dev/blog/index.ts +1 -1
 - package/lib/routes/smartlink/index.ts +13 -3
 - package/lib/routes/sohu/mp.ts +17 -6
 - 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/stanford/blog.ts +77 -0
 - package/lib/routes/stanford/namespace.ts +7 -0
 - package/lib/routes/syosetu/index.ts +1 -1
 - package/lib/routes/t66y/index.ts +1 -0
 - package/lib/routes/taobao/mysql.ts +157 -0
 - package/lib/routes/taobao/namespace.ts +2 -2
 - package/lib/routes/techcrunch/category.ts +48 -0
 - package/lib/routes/telegram/channel.ts +2 -2
 - package/lib/routes/tesla/cx.ts +1 -1
 - package/lib/routes/test/index.ts +1 -1
 - package/lib/routes/themoviedb/episodes.ts +1 -1
 - 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 +2 -2
 - package/lib/routes/tidb/blog.ts +314 -0
 - package/lib/routes/tidb/namespace.ts +9 -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/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/udn/breaking-news.ts +2 -2
 - 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/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/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/whu/swrh.ts +1 -1
 - 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/x6d/index.ts +1 -1
 - package/lib/routes/xbookcn/blog.ts +1 -0
 - package/lib/routes/xiaohongshu/util.ts +1 -3
 - 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/xmanhua/index.ts +1 -0
 - package/lib/routes/xueqiu/cookies.ts +1 -1
 - package/lib/routes/xueqiu/user.ts +1 -1
 - package/lib/routes/xwenming/index.ts +184 -0
 - package/lib/routes/xwenming/namespace.ts +9 -0
 - package/lib/routes/yahoo/news/utils.ts +1 -1
 - package/lib/routes/yande/post.ts +3 -0
 - package/lib/routes/ymgal/game.ts +1 -0
 - package/lib/routes/youtube/api/google.ts +27 -0
 - package/lib/routes/youtube/api/youtubei.ts +70 -20
 - package/lib/routes/youtube/community.ts +3 -1
 - package/lib/routes/youtube/utils.ts +16 -14
 - package/lib/routes/zaobao/util.ts +8 -5
 - package/lib/routes/zhihu/activities.ts +3 -0
 - package/lib/routes/zhihu/execlib/x-zse-96-v3.ts +5 -5
 - 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/sis/index.ts +161 -0
 - package/lib/server.ts +5 -0
 - package/lib/types.ts +58 -54
 - package/lib/utils/helpers.ts +1 -1
 - package/lib/utils/logger.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 +1 -1
 - 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/package.json +54 -56
 - package/lib/routes/mixcloud/queries.ts +0 -2274
 - package/lib/routes-deprecated/dev.to/top.js +0 -40
 
| 
         @@ -0,0 +1,268 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import ofetch from '@/utils/ofetch';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { load } from 'cheerio';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import cache from '@/utils/cache';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { CreatorFragment, PostReelNode } from './types';
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            export const baseUrl = 'https://www.fantube.tokyo';
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            export const getCreatorFragment = (username: string) =>
         
     | 
| 
      
 9 
     | 
    
         
            +
                cache.tryGet(`fantube:creator:${username}`, async () => {
         
     | 
| 
      
 10 
     | 
    
         
            +
                    const response = await ofetch(`${baseUrl}/r18/creator/${username}`, {
         
     | 
| 
      
 11 
     | 
    
         
            +
                        headers: {
         
     | 
| 
      
 12 
     | 
    
         
            +
                            cookie: 'fantube-ageVerified=1;',
         
     | 
| 
      
 13 
     | 
    
         
            +
                        },
         
     | 
| 
      
 14 
     | 
    
         
            +
                    });
         
     | 
| 
      
 15 
     | 
    
         
            +
                    const $ = load(response);
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                    const selfPushString = JSON.parse(
         
     | 
| 
      
 18 
     | 
    
         
            +
                        $('script:contains("creatorFragment")')
         
     | 
| 
      
 19 
     | 
    
         
            +
                            .text()
         
     | 
| 
      
 20 
     | 
    
         
            +
                            .match(/^self\.__next_f\.push\((.+?)\)$/)?.[1] || '{}'
         
     | 
| 
      
 21 
     | 
    
         
            +
                    );
         
     | 
| 
      
 22 
     | 
    
         
            +
                    const selfPushData = JSON.parse(selfPushString[1].slice(2));
         
     | 
| 
      
 23 
     | 
    
         
            +
                    // const creatorFragment = selfPushData[3].children.find((c) => c[1] === 'div')[3].children[3].creatorFragment;
         
     | 
| 
      
 24 
     | 
    
         
            +
                    const creatorFragment = selfPushData
         
     | 
| 
      
 25 
     | 
    
         
            +
                        .find((d) => d?.hasOwnProperty('children'))
         
     | 
| 
      
 26 
     | 
    
         
            +
                        .children.find((child) => Object.values(child).includes('div'))
         
     | 
| 
      
 27 
     | 
    
         
            +
                        .find((c) => c?.hasOwnProperty('children'))
         
     | 
| 
      
 28 
     | 
    
         
            +
                        .children.find((c) => c?.hasOwnProperty('creatorFragment')).creatorFragment;
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                    return creatorFragment as CreatorFragment;
         
     | 
| 
      
 31 
     | 
    
         
            +
                });
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            export const getCreatorPostReelList = (identifier: string, limit: number): Promise<PostReelNode[]> =>
         
     | 
| 
      
 34 
     | 
    
         
            +
                cache.tryGet(`fantube:creatorPostReelList:${identifier}:${limit}`, async () => {
         
     | 
| 
      
 35 
     | 
    
         
            +
                    const response = await ofetch('https://api.prd.fantube.tokyo/graphql', {
         
     | 
| 
      
 36 
     | 
    
         
            +
                        headers: {
         
     | 
| 
      
 37 
     | 
    
         
            +
                            Referer: baseUrl,
         
     | 
| 
      
 38 
     | 
    
         
            +
                        },
         
     | 
| 
      
 39 
     | 
    
         
            +
                        body: JSON.stringify({
         
     | 
| 
      
 40 
     | 
    
         
            +
                            query: `query CreatorPostReelList($identifier: String!, $first: Int, $after: String, $last: Int, $before: String) {
         
     | 
| 
      
 41 
     | 
    
         
            +
              posts(
         
     | 
| 
      
 42 
     | 
    
         
            +
                where: {status: {equals: PUBLISHED}, creator: {is: {identifier: {equals: $identifier}}}}
         
     | 
| 
      
 43 
     | 
    
         
            +
                orderBy: [{pinnedAt: {nulls: last, sort: desc}}, {order: asc}, {createdAt: desc}, {id: desc}]
         
     | 
| 
      
 44 
     | 
    
         
            +
                first: $first
         
     | 
| 
      
 45 
     | 
    
         
            +
                after: $after
         
     | 
| 
      
 46 
     | 
    
         
            +
                last: $last
         
     | 
| 
      
 47 
     | 
    
         
            +
                before: $before
         
     | 
| 
      
 48 
     | 
    
         
            +
              ) {
         
     | 
| 
      
 49 
     | 
    
         
            +
                nodes {
         
     | 
| 
      
 50 
     | 
    
         
            +
                  ...PostSwiper_Post
         
     | 
| 
      
 51 
     | 
    
         
            +
                }
         
     | 
| 
      
 52 
     | 
    
         
            +
                pageInfo {
         
     | 
| 
      
 53 
     | 
    
         
            +
                  hasNextPage
         
     | 
| 
      
 54 
     | 
    
         
            +
                  endCursor
         
     | 
| 
      
 55 
     | 
    
         
            +
                  hasPreviousPage
         
     | 
| 
      
 56 
     | 
    
         
            +
                  startCursor
         
     | 
| 
      
 57 
     | 
    
         
            +
                }
         
     | 
| 
      
 58 
     | 
    
         
            +
              }
         
     | 
| 
      
 59 
     | 
    
         
            +
            }
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            fragment PostSwiper_Post on Post {
         
     | 
| 
      
 62 
     | 
    
         
            +
              id
         
     | 
| 
      
 63 
     | 
    
         
            +
              title
         
     | 
| 
      
 64 
     | 
    
         
            +
              isFavorite
         
     | 
| 
      
 65 
     | 
    
         
            +
              favoritesCount
         
     | 
| 
      
 66 
     | 
    
         
            +
              ...PostSwiperSlide_Post
         
     | 
| 
      
 67 
     | 
    
         
            +
            }
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            fragment PostSwiperSlide_Post on Post {
         
     | 
| 
      
 70 
     | 
    
         
            +
              id
         
     | 
| 
      
 71 
     | 
    
         
            +
              type
         
     | 
| 
      
 72 
     | 
    
         
            +
              title
         
     | 
| 
      
 73 
     | 
    
         
            +
              price
         
     | 
| 
      
 74 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 75 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 76 
     | 
    
         
            +
              }
         
     | 
| 
      
 77 
     | 
    
         
            +
              ...PostVideoElement_Post
         
     | 
| 
      
 78 
     | 
    
         
            +
              ...PostImageElement_Post
         
     | 
| 
      
 79 
     | 
    
         
            +
            }
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
            fragment PostVideoElement_Post on Post {
         
     | 
| 
      
 82 
     | 
    
         
            +
              id
         
     | 
| 
      
 83 
     | 
    
         
            +
              title
         
     | 
| 
      
 84 
     | 
    
         
            +
              contentData {
         
     | 
| 
      
 85 
     | 
    
         
            +
                ... on PostVideoType {
         
     | 
| 
      
 86 
     | 
    
         
            +
                  __typename
         
     | 
| 
      
 87 
     | 
    
         
            +
                  videoUrl
         
     | 
| 
      
 88 
     | 
    
         
            +
                  isSample
         
     | 
| 
      
 89 
     | 
    
         
            +
                  noSample
         
     | 
| 
      
 90 
     | 
    
         
            +
                  durationSeconds
         
     | 
| 
      
 91 
     | 
    
         
            +
                }
         
     | 
| 
      
 92 
     | 
    
         
            +
              }
         
     | 
| 
      
 93 
     | 
    
         
            +
              isFavorite
         
     | 
| 
      
 94 
     | 
    
         
            +
              sampleVideoId
         
     | 
| 
      
 95 
     | 
    
         
            +
              thumbnailUrl
         
     | 
| 
      
 96 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 97 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 98 
     | 
    
         
            +
              }
         
     | 
| 
      
 99 
     | 
    
         
            +
              ...PostInfo_Post
         
     | 
| 
      
 100 
     | 
    
         
            +
              ...VideoControlIcons_Post
         
     | 
| 
      
 101 
     | 
    
         
            +
              ...PurchaseWrapper_Post
         
     | 
| 
      
 102 
     | 
    
         
            +
            }
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            fragment PostInfo_Post on Post {
         
     | 
| 
      
 105 
     | 
    
         
            +
              title
         
     | 
| 
      
 106 
     | 
    
         
            +
              description
         
     | 
| 
      
 107 
     | 
    
         
            +
              publishStartAt
         
     | 
| 
      
 108 
     | 
    
         
            +
              price
         
     | 
| 
      
 109 
     | 
    
         
            +
              isBuyEnabled
         
     | 
| 
      
 110 
     | 
    
         
            +
              ...Profile_Post
         
     | 
| 
      
 111 
     | 
    
         
            +
            }
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
            fragment Profile_Post on Post {
         
     | 
| 
      
 114 
     | 
    
         
            +
              id
         
     | 
| 
      
 115 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 116 
     | 
    
         
            +
                id
         
     | 
| 
      
 117 
     | 
    
         
            +
                isSelf
         
     | 
| 
      
 118 
     | 
    
         
            +
                identifier
         
     | 
| 
      
 119 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 120 
     | 
    
         
            +
                avatarImageUrl
         
     | 
| 
      
 121 
     | 
    
         
            +
                following
         
     | 
| 
      
 122 
     | 
    
         
            +
              }
         
     | 
| 
      
 123 
     | 
    
         
            +
            }
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
            fragment VideoControlIcons_Post on Post {
         
     | 
| 
      
 126 
     | 
    
         
            +
              id
         
     | 
| 
      
 127 
     | 
    
         
            +
              isMine
         
     | 
| 
      
 128 
     | 
    
         
            +
              pinnedAt
         
     | 
| 
      
 129 
     | 
    
         
            +
              favoritesCount
         
     | 
| 
      
 130 
     | 
    
         
            +
              ...PostComment_Post
         
     | 
| 
      
 131 
     | 
    
         
            +
            }
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            fragment PostComment_Post on Post {
         
     | 
| 
      
 134 
     | 
    
         
            +
              id
         
     | 
| 
      
 135 
     | 
    
         
            +
              isMine
         
     | 
| 
      
 136 
     | 
    
         
            +
              canComment
         
     | 
| 
      
 137 
     | 
    
         
            +
              comments(
         
     | 
| 
      
 138 
     | 
    
         
            +
                where: {OR: [{parentPostComment: {is: {isDeleted: {equals: false}}}}, {parentPostCommentId: {equals: null}}], isDeleted: {equals: false}}
         
     | 
| 
      
 139 
     | 
    
         
            +
              ) {
         
     | 
| 
      
 140 
     | 
    
         
            +
                totalCount
         
     | 
| 
      
 141 
     | 
    
         
            +
              }
         
     | 
| 
      
 142 
     | 
    
         
            +
              ...PostCommentReplyDrawer_Post
         
     | 
| 
      
 143 
     | 
    
         
            +
            }
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
            fragment PostCommentReplyDrawer_Post on Post {
         
     | 
| 
      
 146 
     | 
    
         
            +
              id
         
     | 
| 
      
 147 
     | 
    
         
            +
              isMine
         
     | 
| 
      
 148 
     | 
    
         
            +
              canComment
         
     | 
| 
      
 149 
     | 
    
         
            +
            }
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
            fragment PurchaseWrapper_Post on Post {
         
     | 
| 
      
 152 
     | 
    
         
            +
              id
         
     | 
| 
      
 153 
     | 
    
         
            +
              title
         
     | 
| 
      
 154 
     | 
    
         
            +
              price
         
     | 
| 
      
 155 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 156 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 157 
     | 
    
         
            +
              }
         
     | 
| 
      
 158 
     | 
    
         
            +
              ...PostPurchaseDialog_Post
         
     | 
| 
      
 159 
     | 
    
         
            +
              ...PostPurchaseSingleDialog_Post
         
     | 
| 
      
 160 
     | 
    
         
            +
            }
         
     | 
| 
      
 161 
     | 
    
         
            +
             
     | 
| 
      
 162 
     | 
    
         
            +
            fragment PostPurchaseDialog_Post on Post {
         
     | 
| 
      
 163 
     | 
    
         
            +
              id
         
     | 
| 
      
 164 
     | 
    
         
            +
              isBuyEnabled
         
     | 
| 
      
 165 
     | 
    
         
            +
              price
         
     | 
| 
      
 166 
     | 
    
         
            +
              thumbnailUrl
         
     | 
| 
      
 167 
     | 
    
         
            +
              title
         
     | 
| 
      
 168 
     | 
    
         
            +
              planPosts(
         
     | 
| 
      
 169 
     | 
    
         
            +
                orderBy: [{plan: {deleteRequestAt: {sort: desc, nulls: first}}}, {plan: {isRecommended: desc}}, {plan: {price: asc}}]
         
     | 
| 
      
 170 
     | 
    
         
            +
              ) {
         
     | 
| 
      
 171 
     | 
    
         
            +
                nodes {
         
     | 
| 
      
 172 
     | 
    
         
            +
                  plan {
         
     | 
| 
      
 173 
     | 
    
         
            +
                    id
         
     | 
| 
      
 174 
     | 
    
         
            +
                    title
         
     | 
| 
      
 175 
     | 
    
         
            +
                    price
         
     | 
| 
      
 176 
     | 
    
         
            +
                    ...PlanSwiper_Plan
         
     | 
| 
      
 177 
     | 
    
         
            +
                  }
         
     | 
| 
      
 178 
     | 
    
         
            +
                }
         
     | 
| 
      
 179 
     | 
    
         
            +
              }
         
     | 
| 
      
 180 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 181 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 182 
     | 
    
         
            +
              }
         
     | 
| 
      
 183 
     | 
    
         
            +
              ...PostPurchaseSingleDialog_Post
         
     | 
| 
      
 184 
     | 
    
         
            +
            }
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
            fragment PlanSwiper_Plan on Plan {
         
     | 
| 
      
 187 
     | 
    
         
            +
              id
         
     | 
| 
      
 188 
     | 
    
         
            +
              ...PlanSwiperItem_Plan
         
     | 
| 
      
 189 
     | 
    
         
            +
            }
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
      
 191 
     | 
    
         
            +
            fragment PlanSwiperItem_Plan on Plan {
         
     | 
| 
      
 192 
     | 
    
         
            +
              id
         
     | 
| 
      
 193 
     | 
    
         
            +
              title
         
     | 
| 
      
 194 
     | 
    
         
            +
              price
         
     | 
| 
      
 195 
     | 
    
         
            +
              isArchive
         
     | 
| 
      
 196 
     | 
    
         
            +
              isRecommended
         
     | 
| 
      
 197 
     | 
    
         
            +
              deleteRequestAt
         
     | 
| 
      
 198 
     | 
    
         
            +
              isSubscribing
         
     | 
| 
      
 199 
     | 
    
         
            +
              subscriptionCloseAt
         
     | 
| 
      
 200 
     | 
    
         
            +
              capacity
         
     | 
| 
      
 201 
     | 
    
         
            +
              subscribersCount
         
     | 
| 
      
 202 
     | 
    
         
            +
              planPosts(
         
     | 
| 
      
 203 
     | 
    
         
            +
                where: {post: {is: {status: {equals: PUBLISHED}}}}
         
     | 
| 
      
 204 
     | 
    
         
            +
                first: 7
         
     | 
| 
      
 205 
     | 
    
         
            +
                orderBy: [{createdAt: desc}]
         
     | 
| 
      
 206 
     | 
    
         
            +
              ) {
         
     | 
| 
      
 207 
     | 
    
         
            +
                nodes {
         
     | 
| 
      
 208 
     | 
    
         
            +
                  post {
         
     | 
| 
      
 209 
     | 
    
         
            +
                    id
         
     | 
| 
      
 210 
     | 
    
         
            +
                    thumbnailUrl
         
     | 
| 
      
 211 
     | 
    
         
            +
                    title
         
     | 
| 
      
 212 
     | 
    
         
            +
                  }
         
     | 
| 
      
 213 
     | 
    
         
            +
                }
         
     | 
| 
      
 214 
     | 
    
         
            +
                totalCount
         
     | 
| 
      
 215 
     | 
    
         
            +
              }
         
     | 
| 
      
 216 
     | 
    
         
            +
              ...PlanUnavailableNote_Plan
         
     | 
| 
      
 217 
     | 
    
         
            +
            }
         
     | 
| 
      
 218 
     | 
    
         
            +
             
     | 
| 
      
 219 
     | 
    
         
            +
            fragment PlanUnavailableNote_Plan on Plan {
         
     | 
| 
      
 220 
     | 
    
         
            +
              capacity
         
     | 
| 
      
 221 
     | 
    
         
            +
              subscribersCount
         
     | 
| 
      
 222 
     | 
    
         
            +
              subscriptionCloseAt
         
     | 
| 
      
 223 
     | 
    
         
            +
              deleteRequestAt
         
     | 
| 
      
 224 
     | 
    
         
            +
            }
         
     | 
| 
      
 225 
     | 
    
         
            +
             
     | 
| 
      
 226 
     | 
    
         
            +
            fragment PostPurchaseSingleDialog_Post on Post {
         
     | 
| 
      
 227 
     | 
    
         
            +
              id
         
     | 
| 
      
 228 
     | 
    
         
            +
              price
         
     | 
| 
      
 229 
     | 
    
         
            +
              thumbnailUrl
         
     | 
| 
      
 230 
     | 
    
         
            +
              title
         
     | 
| 
      
 231 
     | 
    
         
            +
              isBuyEnabled
         
     | 
| 
      
 232 
     | 
    
         
            +
            }
         
     | 
| 
      
 233 
     | 
    
         
            +
             
     | 
| 
      
 234 
     | 
    
         
            +
            fragment PostImageElement_Post on Post {
         
     | 
| 
      
 235 
     | 
    
         
            +
              id
         
     | 
| 
      
 236 
     | 
    
         
            +
              title
         
     | 
| 
      
 237 
     | 
    
         
            +
              contentData {
         
     | 
| 
      
 238 
     | 
    
         
            +
                __typename
         
     | 
| 
      
 239 
     | 
    
         
            +
                ... on PostImageType {
         
     | 
| 
      
 240 
     | 
    
         
            +
                  encrypted
         
     | 
| 
      
 241 
     | 
    
         
            +
                  imageUrls
         
     | 
| 
      
 242 
     | 
    
         
            +
                  count
         
     | 
| 
      
 243 
     | 
    
         
            +
                }
         
     | 
| 
      
 244 
     | 
    
         
            +
              }
         
     | 
| 
      
 245 
     | 
    
         
            +
              isFavorite
         
     | 
| 
      
 246 
     | 
    
         
            +
              creator {
         
     | 
| 
      
 247 
     | 
    
         
            +
                displayName
         
     | 
| 
      
 248 
     | 
    
         
            +
              }
         
     | 
| 
      
 249 
     | 
    
         
            +
              ...PostInfo_Post
         
     | 
| 
      
 250 
     | 
    
         
            +
              ...ImageControlIcons_Post
         
     | 
| 
      
 251 
     | 
    
         
            +
              ...PurchaseWrapper_Post
         
     | 
| 
      
 252 
     | 
    
         
            +
            }
         
     | 
| 
      
 253 
     | 
    
         
            +
             
     | 
| 
      
 254 
     | 
    
         
            +
            fragment ImageControlIcons_Post on Post {
         
     | 
| 
      
 255 
     | 
    
         
            +
              id
         
     | 
| 
      
 256 
     | 
    
         
            +
              isMine
         
     | 
| 
      
 257 
     | 
    
         
            +
              pinnedAt
         
     | 
| 
      
 258 
     | 
    
         
            +
              favoritesCount
         
     | 
| 
      
 259 
     | 
    
         
            +
              ...PostComment_Post
         
     | 
| 
      
 260 
     | 
    
         
            +
            }`,
         
     | 
| 
      
 261 
     | 
    
         
            +
                            variables: { identifier, first: limit, after: '' },
         
     | 
| 
      
 262 
     | 
    
         
            +
                            operationName: 'CreatorPostReelList',
         
     | 
| 
      
 263 
     | 
    
         
            +
                        }),
         
     | 
| 
      
 264 
     | 
    
         
            +
                        method: 'POST',
         
     | 
| 
      
 265 
     | 
    
         
            +
                    });
         
     | 
| 
      
 266 
     | 
    
         
            +
             
     | 
| 
      
 267 
     | 
    
         
            +
                    return response.data.posts.nodes as PostReelNode[];
         
     | 
| 
      
 268 
     | 
    
         
            +
                });
         
     | 
| 
         @@ -36,7 +36,7 @@ async function handler(ctx: Context): Promise<Data> { 
     | 
|
| 
       36 
36 
     | 
    
         
             
                const handleOrId = ctx.req.param('uid');
         
     | 
| 
       37 
37 
     | 
    
         
             
                const host = 'https://api.follow.is';
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                const handle = isBizId(handleOrId || '') ? handleOrId :  
     | 
| 
      
 39 
     | 
    
         
            +
                const handle = isBizId(handleOrId || '') ? handleOrId : handleOrId.startsWith('@') ? handleOrId.slice(1) : handleOrId;
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
41 
     | 
    
         
             
                const searchParams = new URLSearchParams({ handle });
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
         @@ -49,7 +49,7 @@ async function handler(ctx) { 
     | 
|
| 
       49 
49 
     | 
    
         
             
                const items = await Promise.all(list.map((item) => parseItem(item, cache.tryGet)));
         
     | 
| 
       50 
50 
     | 
    
         | 
| 
       51 
51 
     | 
    
         
             
                return {
         
     | 
| 
       52 
     | 
    
         
            -
                    title: `${lang === 'en' ? 'News' :  
     | 
| 
      
 52 
     | 
    
         
            +
                    title: `${lang === 'en' ? 'News' : lang === 'vi' ? 'Bản tin' : '快讯'} - Followin`,
         
     | 
| 
       53 
53 
     | 
    
         
             
                    link: `${baseUrl}/${lang}/news`,
         
     | 
| 
       54 
54 
     | 
    
         
             
                    image: favicon,
         
     | 
| 
       55 
55 
     | 
    
         
             
                    language: lang,
         
     | 
| 
         @@ -45,7 +45,7 @@ const processItems = async (apiUrl, limit, ...parameters) => { 
     | 
|
| 
       45 
45 
     | 
    
         
             
                let items = JSON.parse(String(zlib.inflateSync(Buffer.from(response.data?.list ?? response.data, 'base64'))));
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
47 
     | 
    
         
             
                items = (items?.list ?? items).slice(0, limit).map((item) => {
         
     | 
| 
       48 
     | 
    
         
            -
                    const sourceType = item.source_type ?? (item.source_link ? (item.column?.title ? 'article' : 'news') :  
     | 
| 
      
 48 
     | 
    
         
            +
                    const sourceType = item.source_type ?? (item.source_link ? (item.column?.title ? 'article' : 'news') : item.event_type ? 'event' : constants.defaultType);
         
     | 
| 
       49 
49 
     | 
    
         | 
| 
       50 
50 
     | 
    
         
             
                    item = item.source_type ? item[item.source_type] : item;
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
         @@ -30,7 +30,7 @@ const handler = async (ctx) => { 
     | 
|
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
                const list = $('#detail-list-select > li > a')
         
     | 
| 
       32 
32 
     | 
    
         
             
                    .toArray()
         
     | 
| 
       33 
     | 
    
         
            -
                    . 
     | 
| 
      
 33 
     | 
    
         
            +
                    .toReversed()
         
     | 
| 
       34 
34 
     | 
    
         
             
                    .slice(0, limit)
         
     | 
| 
       35 
35 
     | 
    
         
             
                    .map((item) => {
         
     | 
| 
       36 
36 
     | 
    
         
             
                        const $item = $(item);
         
     | 
| 
         @@ -81,4 +81,7 @@ export const route: Route = { 
     | 
|
| 
       81 
81 
     | 
    
         
             
                maintainers: ['junfengP'],
         
     | 
| 
       82 
82 
     | 
    
         
             
                handler,
         
     | 
| 
       83 
83 
     | 
    
         
             
                url: 'www.jjmhw.cc',
         
     | 
| 
      
 84 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 85 
     | 
    
         
            +
                    nsfw: true,
         
     | 
| 
      
 86 
     | 
    
         
            +
                },
         
     | 
| 
       84 
87 
     | 
    
         
             
            };
         
     | 
    
        package/lib/routes/gamer/hot.ts
    CHANGED
    
    | 
         @@ -19,13 +19,13 @@ export const route: Route = { 
     | 
|
| 
       19 
19 
     | 
    
         
             
                    supportPodcast: false,
         
     | 
| 
       20 
20 
     | 
    
         
             
                    supportScihub: false,
         
     | 
| 
       21 
21 
     | 
    
         
             
                },
         
     | 
| 
       22 
     | 
    
         
            -
                name: ' 
     | 
| 
       23 
     | 
    
         
            -
                maintainers: ['nczitzk', 'TonyRL'],
         
     | 
| 
      
 22 
     | 
    
         
            +
                name: '本板推薦',
         
     | 
| 
      
 23 
     | 
    
         
            +
                maintainers: ['nczitzk', 'TonyRL', 'kennyfong19931'],
         
     | 
| 
       24 
24 
     | 
    
         
             
                handler,
         
     | 
| 
       25 
25 
     | 
    
         
             
            };
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
            async function handler(ctx) {
         
     | 
| 
       28 
     | 
    
         
            -
                const rootUrl = `https://forum.gamer.com.tw/ 
     | 
| 
      
 28 
     | 
    
         
            +
                const rootUrl = `https://forum.gamer.com.tw/B.php?bsn=${ctx.req.param('bsn')}`;
         
     | 
| 
       29 
29 
     | 
    
         
             
                const response = await got({
         
     | 
| 
       30 
30 
     | 
    
         
             
                    url: rootUrl,
         
     | 
| 
       31 
31 
     | 
    
         
             
                    headers: {
         
     | 
| 
         @@ -34,12 +34,12 @@ async function handler(ctx) { 
     | 
|
| 
       34 
34 
     | 
    
         
             
                });
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
                const $ = load(response.data);
         
     | 
| 
       37 
     | 
    
         
            -
                const list = $('div. 
     | 
| 
      
 37 
     | 
    
         
            +
                const list = $('div.popular__card-list div.popular__card-img a')
         
     | 
| 
       38 
38 
     | 
    
         
             
                    .toArray()
         
     | 
| 
       39 
39 
     | 
    
         
             
                    .map((item) => {
         
     | 
| 
       40 
40 
     | 
    
         
             
                        item = $(item);
         
     | 
| 
       41 
41 
     | 
    
         
             
                        return {
         
     | 
| 
       42 
     | 
    
         
            -
                            link:  
     | 
| 
      
 42 
     | 
    
         
            +
                            link: item.attr('href'),
         
     | 
| 
       43 
43 
     | 
    
         
             
                        };
         
     | 
| 
       44 
44 
     | 
    
         
             
                    });
         
     | 
| 
       45 
45 
     | 
    
         | 
| 
         @@ -0,0 +1,145 @@ 
     | 
|
| 
      
 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 limit: number = Number.parseInt(ctx.req.query('limit') ?? '20', 10);
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                const baseUrl: string = 'https://www.gaoyu.me';
         
     | 
| 
      
 17 
     | 
    
         
            +
                const targetUrl: string = new URL('blog', baseUrl).href;
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                const response = await ofetch(targetUrl);
         
     | 
| 
      
 20 
     | 
    
         
            +
                const $: CheerioAPI = load(response);
         
     | 
| 
      
 21 
     | 
    
         
            +
                const language = $('html').attr('lang') ?? 'zh-cn';
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                const authors: DataItem['author'] = [
         
     | 
| 
      
 24 
     | 
    
         
            +
                    {
         
     | 
| 
      
 25 
     | 
    
         
            +
                        name: 'Yu Gao',
         
     | 
| 
      
 26 
     | 
    
         
            +
                        url: baseUrl,
         
     | 
| 
      
 27 
     | 
    
         
            +
                        avatar: undefined,
         
     | 
| 
      
 28 
     | 
    
         
            +
                    },
         
     | 
| 
      
 29 
     | 
    
         
            +
                ];
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                let items: DataItem[] = [];
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                items = $('a.flex-col')
         
     | 
| 
      
 34 
     | 
    
         
            +
                    .slice(0, limit)
         
     | 
| 
      
 35 
     | 
    
         
            +
                    .toArray()
         
     | 
| 
      
 36 
     | 
    
         
            +
                    .map((el): Element => {
         
     | 
| 
      
 37 
     | 
    
         
            +
                        const $el: Cheerio<Element> = $(el);
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                        const title: string = $el.find('p.text-neutral-900').text();
         
     | 
| 
      
 40 
     | 
    
         
            +
                        const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), {
         
     | 
| 
      
 41 
     | 
    
         
            +
                            intro: $el.find('p.text-neutral-600').last().html(),
         
     | 
| 
      
 42 
     | 
    
         
            +
                        });
         
     | 
| 
      
 43 
     | 
    
         
            +
                        const pubDateStr: string | undefined = $el.find('p.text-neutral-600').first().text();
         
     | 
| 
      
 44 
     | 
    
         
            +
                        const linkUrl: string | undefined = $el.attr('href');
         
     | 
| 
      
 45 
     | 
    
         
            +
                        const upDatedStr: string | undefined = pubDateStr;
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                        const processedItem: DataItem = {
         
     | 
| 
      
 48 
     | 
    
         
            +
                            title,
         
     | 
| 
      
 49 
     | 
    
         
            +
                            description,
         
     | 
| 
      
 50 
     | 
    
         
            +
                            pubDate: pubDateStr ? parseDate(pubDateStr) : undefined,
         
     | 
| 
      
 51 
     | 
    
         
            +
                            link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined,
         
     | 
| 
      
 52 
     | 
    
         
            +
                            author: authors,
         
     | 
| 
      
 53 
     | 
    
         
            +
                            content: {
         
     | 
| 
      
 54 
     | 
    
         
            +
                                html: description,
         
     | 
| 
      
 55 
     | 
    
         
            +
                                text: description,
         
     | 
| 
      
 56 
     | 
    
         
            +
                            },
         
     | 
| 
      
 57 
     | 
    
         
            +
                            updated: upDatedStr ? parseDate(upDatedStr) : undefined,
         
     | 
| 
      
 58 
     | 
    
         
            +
                            language,
         
     | 
| 
      
 59 
     | 
    
         
            +
                        };
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                        return processedItem;
         
     | 
| 
      
 62 
     | 
    
         
            +
                    });
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                items = await Promise.all(
         
     | 
| 
      
 65 
     | 
    
         
            +
                    items.map((item) => {
         
     | 
| 
      
 66 
     | 
    
         
            +
                        if (!item.link) {
         
     | 
| 
      
 67 
     | 
    
         
            +
                            return item;
         
     | 
| 
      
 68 
     | 
    
         
            +
                        }
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                        return cache.tryGet(item.link, async (): Promise<DataItem> => {
         
     | 
| 
      
 71 
     | 
    
         
            +
                            const detailResponse = await ofetch(item.link);
         
     | 
| 
      
 72 
     | 
    
         
            +
                            const $$: CheerioAPI = load(detailResponse);
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                            const title: string = $$('h1.title').text();
         
     | 
| 
      
 75 
     | 
    
         
            +
                            const description: string | undefined =
         
     | 
| 
      
 76 
     | 
    
         
            +
                                item.description +
         
     | 
| 
      
 77 
     | 
    
         
            +
                                art(path.join(__dirname, 'templates/description.art'), {
         
     | 
| 
      
 78 
     | 
    
         
            +
                                    description: $$('article.prose').html(),
         
     | 
| 
      
 79 
     | 
    
         
            +
                                });
         
     | 
| 
      
 80 
     | 
    
         
            +
                            const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content');
         
     | 
| 
      
 81 
     | 
    
         
            +
                            const image: string | undefined = $$('meta[property="og:image"]').attr('content');
         
     | 
| 
      
 82 
     | 
    
         
            +
                            const upDatedStr: string | undefined = pubDateStr;
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                            const processedItem: DataItem = {
         
     | 
| 
      
 85 
     | 
    
         
            +
                                title,
         
     | 
| 
      
 86 
     | 
    
         
            +
                                description,
         
     | 
| 
      
 87 
     | 
    
         
            +
                                pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate,
         
     | 
| 
      
 88 
     | 
    
         
            +
                                author: authors,
         
     | 
| 
      
 89 
     | 
    
         
            +
                                content: {
         
     | 
| 
      
 90 
     | 
    
         
            +
                                    html: description,
         
     | 
| 
      
 91 
     | 
    
         
            +
                                    text: description,
         
     | 
| 
      
 92 
     | 
    
         
            +
                                },
         
     | 
| 
      
 93 
     | 
    
         
            +
                                image,
         
     | 
| 
      
 94 
     | 
    
         
            +
                                banner: image,
         
     | 
| 
      
 95 
     | 
    
         
            +
                                updated: upDatedStr ? parseDate(upDatedStr) : item.updated,
         
     | 
| 
      
 96 
     | 
    
         
            +
                                language,
         
     | 
| 
      
 97 
     | 
    
         
            +
                            };
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                            return {
         
     | 
| 
      
 100 
     | 
    
         
            +
                                ...item,
         
     | 
| 
      
 101 
     | 
    
         
            +
                                ...processedItem,
         
     | 
| 
      
 102 
     | 
    
         
            +
                            };
         
     | 
| 
      
 103 
     | 
    
         
            +
                        });
         
     | 
| 
      
 104 
     | 
    
         
            +
                    })
         
     | 
| 
      
 105 
     | 
    
         
            +
                );
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                return {
         
     | 
| 
      
 108 
     | 
    
         
            +
                    title: $('title').text(),
         
     | 
| 
      
 109 
     | 
    
         
            +
                    description: $('meta[property="og:description"]').attr('content'),
         
     | 
| 
      
 110 
     | 
    
         
            +
                    link: targetUrl,
         
     | 
| 
      
 111 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 112 
     | 
    
         
            +
                    allowEmpty: true,
         
     | 
| 
      
 113 
     | 
    
         
            +
                    author: $('meta[property="og:site_name"]').attr('content'),
         
     | 
| 
      
 114 
     | 
    
         
            +
                    language,
         
     | 
| 
      
 115 
     | 
    
         
            +
                    id: targetUrl,
         
     | 
| 
      
 116 
     | 
    
         
            +
                };
         
     | 
| 
      
 117 
     | 
    
         
            +
            };
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 120 
     | 
    
         
            +
                path: '/blog',
         
     | 
| 
      
 121 
     | 
    
         
            +
                name: 'Blog',
         
     | 
| 
      
 122 
     | 
    
         
            +
                url: 'www.gaoyu.me',
         
     | 
| 
      
 123 
     | 
    
         
            +
                maintainers: ['nczitzk'],
         
     | 
| 
      
 124 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 125 
     | 
    
         
            +
                example: '/gaoyu/blog',
         
     | 
| 
      
 126 
     | 
    
         
            +
                parameters: undefined,
         
     | 
| 
      
 127 
     | 
    
         
            +
                description: undefined,
         
     | 
| 
      
 128 
     | 
    
         
            +
                categories: ['blog'],
         
     | 
| 
      
 129 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 130 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 131 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 132 
     | 
    
         
            +
                    antiCrawler: false,
         
     | 
| 
      
 133 
     | 
    
         
            +
                    supportRadar: true,
         
     | 
| 
      
 134 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 135 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 136 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 137 
     | 
    
         
            +
                },
         
     | 
| 
      
 138 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 139 
     | 
    
         
            +
                    {
         
     | 
| 
      
 140 
     | 
    
         
            +
                        source: ['www.gaoyu.me/blog'],
         
     | 
| 
      
 141 
     | 
    
         
            +
                        target: '/blog',
         
     | 
| 
      
 142 
     | 
    
         
            +
                    },
         
     | 
| 
      
 143 
     | 
    
         
            +
                ],
         
     | 
| 
      
 144 
     | 
    
         
            +
                view: ViewType.Articles,
         
     | 
| 
      
 145 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -74,7 +74,7 @@ async function handler(ctx) { 
     | 
|
| 
       74 
74 
     | 
    
         
             
                const items = response.map((item) => {
         
     | 
| 
       75 
75 
     | 
    
         
             
                    const media = item._embedded['wp:featuredmedia'][0];
         
     | 
| 
       76 
76 
     | 
    
         
             
                    const mediaDetails = media?.media_details;
         
     | 
| 
       77 
     | 
    
         
            -
                    const mediaSize = mediaDetails 
     | 
| 
      
 77 
     | 
    
         
            +
                    const mediaSize = mediaDetails?.sizes.large || mediaDetails?.sizes.full;
         
     | 
| 
       78 
78 
     | 
    
         
             
                    return {
         
     | 
| 
       79 
79 
     | 
    
         
             
                        title: item.title.rendered.trim(),
         
     | 
| 
       80 
80 
     | 
    
         
             
                        link: item.link,
         
     | 
| 
         @@ -84,7 +84,7 @@ async function handler(ctx) { 
     | 
|
| 
       84 
84 
     | 
    
         
             
                        updated: parseDate(item.modified_gmt),
         
     | 
| 
       85 
85 
     | 
    
         
             
                        author: item._embedded.author[0].name,
         
     | 
| 
       86 
86 
     | 
    
         
             
                        category: item._embedded['wp:term'][0].map((category) => category.name.trim()),
         
     | 
| 
       87 
     | 
    
         
            -
                        media:  
     | 
| 
      
 87 
     | 
    
         
            +
                        media: mediaSize
         
     | 
| 
       88 
88 
     | 
    
         
             
                            ? {
         
     | 
| 
       89 
89 
     | 
    
         
             
                                  content: {
         
     | 
| 
       90 
90 
     | 
    
         
             
                                      url: media.source_url,
         
     | 
| 
         @@ -9,7 +9,7 @@ GitHub provides some official RSS feeds: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            -   Repo releases: \`https://github.com/:owner/:repo/releases.atom\`
         
     | 
| 
       10 
10 
     | 
    
         
             
            -   Repo commits: \`https://github.com/:owner/:repo/commits.atom\`
         
     | 
| 
       11 
11 
     | 
    
         
             
            -   User activities: \`https://github.com/:user.atom\`
         
     | 
| 
       12 
     | 
    
         
            -
            -   Private feed: \`https://github.com/:user.private.atom?token=:secret\` (You can  
     | 
| 
      
 12 
     | 
    
         
            +
            -   Private feed: \`https://github.com/:user.private.atom?token=:secret\` (Note: You can ONLY obtain this url via an [API](https://docs.github.com/en/rest/activity/feeds?apiVersion=2022-11-28) call with a [Personal Access Token](https://github.com/settings/tokens/new) with **ENOUGH** scopes now.)
         
     | 
| 
       13 
13 
     | 
    
         
             
            -   Wiki history: \`https://github.com/:owner/:repo/wiki.atom\`
         
     | 
| 
       14 
14 
     | 
    
         
             
            :::`,
         
     | 
| 
       15 
15 
     | 
    
         
             
                lang: 'en',
         
     |