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,78 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import cache from '@/utils/cache';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import got from '@/utils/got';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { load } from 'cheerio';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 8 
     | 
    
         
            +
                path: '/cyber/tzgg',
         
     | 
| 
      
 9 
     | 
    
         
            +
                categories: ['university'],
         
     | 
| 
      
 10 
     | 
    
         
            +
                example: '/seu/cyber/tzgg',
         
     | 
| 
      
 11 
     | 
    
         
            +
                parameters: {},
         
     | 
| 
      
 12 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 13 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 14 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    antiCrawler: false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 18 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 19 
     | 
    
         
            +
                },
         
     | 
| 
      
 20 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 21 
     | 
    
         
            +
                    {
         
     | 
| 
      
 22 
     | 
    
         
            +
                        source: ['cyber.seu.edu.cn/tzgg/list.htm', 'cyber.seu.edu.cn/'],
         
     | 
| 
      
 23 
     | 
    
         
            +
                    },
         
     | 
| 
      
 24 
     | 
    
         
            +
                ],
         
     | 
| 
      
 25 
     | 
    
         
            +
                name: '网络空间安全学院 - 通知公告',
         
     | 
| 
      
 26 
     | 
    
         
            +
                maintainers: ['shrugginG'],
         
     | 
| 
      
 27 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 28 
     | 
    
         
            +
                description: '东南大学网络空间安全学院通知公告',
         
     | 
| 
      
 29 
     | 
    
         
            +
            };
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            async function handler() {
         
     | 
| 
      
 32 
     | 
    
         
            +
                const host = 'https://cyber.seu.edu.cn';
         
     | 
| 
      
 33 
     | 
    
         
            +
                const link = `${host}/tzgg/list.htm`;
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                const { data: response } = await got(link);
         
     | 
| 
      
 36 
     | 
    
         
            +
                const $ = load(response);
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                const list = $('#wp_news_w6 ul.wp_article_list li.list_item')
         
     | 
| 
      
 39 
     | 
    
         
            +
                    .toArray()
         
     | 
| 
      
 40 
     | 
    
         
            +
                    .map((item) => {
         
     | 
| 
      
 41 
     | 
    
         
            +
                        const e = $(item);
         
     | 
| 
      
 42 
     | 
    
         
            +
                        const a = e.find('.Article_Title a');
         
     | 
| 
      
 43 
     | 
    
         
            +
                        const title = a.text().trim();
         
     | 
| 
      
 44 
     | 
    
         
            +
                        const href = a.attr('href');
         
     | 
| 
      
 45 
     | 
    
         
            +
                        const dateText = e.find('.Article_PublishDate').text().trim();
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                        return {
         
     | 
| 
      
 48 
     | 
    
         
            +
                            title,
         
     | 
| 
      
 49 
     | 
    
         
            +
                            link: new URL(href || '', host).href,
         
     | 
| 
      
 50 
     | 
    
         
            +
                            pubDate: parseDate(dateText),
         
     | 
| 
      
 51 
     | 
    
         
            +
                            description: '',
         
     | 
| 
      
 52 
     | 
    
         
            +
                        };
         
     | 
| 
      
 53 
     | 
    
         
            +
                    });
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                const out = await Promise.all(
         
     | 
| 
      
 56 
     | 
    
         
            +
                    list.map((item) =>
         
     | 
| 
      
 57 
     | 
    
         
            +
                        cache.tryGet(item.link, async () => {
         
     | 
| 
      
 58 
     | 
    
         
            +
                            try {
         
     | 
| 
      
 59 
     | 
    
         
            +
                                const response = await got(item.link);
         
     | 
| 
      
 60 
     | 
    
         
            +
                                const $ = load(response.data);
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                                item.description = $('.wp_articlecontent').html() || $('.article-content').html() || $('.main-text').html() || $('article').html() || '';
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                                return item;
         
     | 
| 
      
 65 
     | 
    
         
            +
                            } catch {
         
     | 
| 
      
 66 
     | 
    
         
            +
                                return item;
         
     | 
| 
      
 67 
     | 
    
         
            +
                            }
         
     | 
| 
      
 68 
     | 
    
         
            +
                        })
         
     | 
| 
      
 69 
     | 
    
         
            +
                    )
         
     | 
| 
      
 70 
     | 
    
         
            +
                );
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                return {
         
     | 
| 
      
 73 
     | 
    
         
            +
                    link,
         
     | 
| 
      
 74 
     | 
    
         
            +
                    title: '东南大学网络空间安全学院 - 通知公告',
         
     | 
| 
      
 75 
     | 
    
         
            +
                    description: '东南大学网络空间安全学院通知公告RSS',
         
     | 
| 
      
 76 
     | 
    
         
            +
                    item: out,
         
     | 
| 
      
 77 
     | 
    
         
            +
                };
         
     | 
| 
      
 78 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -4,13 +4,21 @@ import { load } from 'cheerio'; 
     | 
|
| 
       4 
4 
     | 
    
         
             
            import cache from '@/utils/cache';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import timezone from '@/utils/timezone';
         
     | 
| 
      
 7 
     | 
    
         
            +
            import { Language } from '@/routes/kurogames/wutheringwaves/constants';
         
     | 
| 
       7 
8 
     | 
    
         | 
| 
       8 
9 
     | 
    
         
             
            const $get = async (url: string, encoding = 'gb2312') => new TextDecoder(encoding).decode(await ofetch(url, { responseType: 'arrayBuffer' }));
         
     | 
| 
      
 10 
     | 
    
         
            +
            const $trim = (str: string) => {
         
     | 
| 
      
 11 
     | 
    
         
            +
                let s = str.trim();
         
     | 
| 
      
 12 
     | 
    
         
            +
                s = s.startsWith('  ') ? s.slice(12) : s;
         
     | 
| 
      
 13 
     | 
    
         
            +
                s = s.endsWith('<br>') ? s.slice(0, Math.max(0, s.length - 4)) : s;
         
     | 
| 
      
 14 
     | 
    
         
            +
                return s.trim();
         
     | 
| 
      
 15 
     | 
    
         
            +
            };
         
     | 
| 
       9 
16 
     | 
    
         | 
| 
       10 
17 
     | 
    
         
             
            export const route: Route = {
         
     | 
| 
       11 
     | 
    
         
            -
                path: '/jiaowu/jxtz',
         
     | 
| 
      
 18 
     | 
    
         
            +
                path: '/jiaowu/jxtz/:detail?',
         
     | 
| 
       12 
19 
     | 
    
         
             
                categories: ['university'],
         
     | 
| 
       13 
     | 
    
         
            -
                example: '/sicau/jiaowu/jxtz',
         
     | 
| 
      
 20 
     | 
    
         
            +
                example: '/sicau/jiaowu/jxtz/detail',
         
     | 
| 
      
 21 
     | 
    
         
            +
                parameters: { detail: '是否抓取全文,该值只要不为空就抓取全文返回,否则只返回标题' },
         
     | 
| 
       14 
22 
     | 
    
         
             
                features: {
         
     | 
| 
       15 
23 
     | 
    
         
             
                    requireConfig: false,
         
     | 
| 
       16 
24 
     | 
    
         
             
                    requirePuppeteer: false,
         
     | 
| 
         @@ -27,51 +35,51 @@ export const route: Route = { 
     | 
|
| 
       27 
35 
     | 
    
         
             
                ],
         
     | 
| 
       28 
36 
     | 
    
         
             
                name: '教务处',
         
     | 
| 
       29 
37 
     | 
    
         
             
                maintainers: ['hualiong'],
         
     | 
| 
      
 38 
     | 
    
         
            +
                description: `
         
     | 
| 
      
 39 
     | 
    
         
            +
            ::: tip
         
     | 
| 
      
 40 
     | 
    
         
            +
            抓取全文返回会导致更长的响应时间,可以尝试使用 \`/sicau/jiaowu/jxtz\` 路径,这将只返回标题,然后再在应用内抓取全文内容。
         
     | 
| 
      
 41 
     | 
    
         
            +
            :::
         
     | 
| 
      
 42 
     | 
    
         
            +
            `,
         
     | 
| 
       30 
43 
     | 
    
         
             
                url: 'jiaowu.sicau.edu.cn/',
         
     | 
| 
       31 
     | 
    
         
            -
                handler: async () => {
         
     | 
| 
      
 44 
     | 
    
         
            +
                handler: async (ctx) => {
         
     | 
| 
       32 
45 
     | 
    
         
             
                    const baseUrl = 'https://jiaowu.sicau.edu.cn/web/web/web';
         
     | 
| 
      
 46 
     | 
    
         
            +
                    const { detail = null } = ctx.req.param();
         
     | 
| 
       33 
47 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                    const response = await $get(`${baseUrl}/ 
     | 
| 
      
 48 
     | 
    
         
            +
                    const response = await $get(`${baseUrl}/gwmore.asp`);
         
     | 
| 
       35 
49 
     | 
    
         
             
                    const $ = load(response);
         
     | 
| 
       36 
50 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
                     
     | 
| 
      
 51 
     | 
    
         
            +
                    let items = $('tbody > .text-c:nth-child(-n+10)')
         
     | 
| 
       38 
52 
     | 
    
         
             
                        .toArray()
         
     | 
| 
       39 
53 
     | 
    
         
             
                        .map((item) => {
         
     | 
| 
       40 
     | 
    
         
            -
                            const  
     | 
| 
       41 
     | 
    
         
            -
                            const  
     | 
| 
      
 54 
     | 
    
         
            +
                            const children = $(item).children();
         
     | 
| 
      
 55 
     | 
    
         
            +
                            const a = children.eq(2).find('a');
         
     | 
| 
       42 
56 
     | 
    
         
             
                            return {
         
     | 
| 
       43 
     | 
    
         
            -
                                 
     | 
| 
      
 57 
     | 
    
         
            +
                                category: [children.eq(1).text()],
         
     | 
| 
      
 58 
     | 
    
         
            +
                                link: `${baseUrl}/${a.attr('href')!}`,
         
     | 
| 
      
 59 
     | 
    
         
            +
                                title: a.children().first().text(),
         
     | 
| 
      
 60 
     | 
    
         
            +
                                pubDate: timezone(parseDate(children.eq(3).text(), 'YYYY-M-D'), +8),
         
     | 
| 
      
 61 
     | 
    
         
            +
                                author: children.eq(4).text(),
         
     | 
| 
      
 62 
     | 
    
         
            +
                                description: '请在应用内抓取全文内容',
         
     | 
| 
       44 
63 
     | 
    
         
             
                            } as DataItem;
         
     | 
| 
       45 
64 
     | 
    
         
             
                        });
         
     | 
| 
       46 
65 
     | 
    
         | 
| 
       47 
     | 
    
         
            -
                     
     | 
| 
       48 
     | 
    
         
            -
                         
     | 
| 
       49 
     | 
    
         
            -
                             
     | 
| 
       50 
     | 
    
         
            -
                                 
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                                const str = $('.text1[valign="bottom"]').text();
         
     | 
| 
       59 
     | 
    
         
            -
                                const match = str.match(/起草:(.+?)\[(.+?)]/)!;
         
     | 
| 
       60 
     | 
    
         
            -
                                item.author = match[1];
         
     | 
| 
       61 
     | 
    
         
            -
                                item.category = [match[2]];
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                                item.description = $('.text1[width="95%"]').html()!;
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                                return item;
         
     | 
| 
       66 
     | 
    
         
            -
                            })
         
     | 
| 
       67 
     | 
    
         
            -
                        )
         
     | 
| 
       68 
     | 
    
         
            -
                    );
         
     | 
| 
      
 66 
     | 
    
         
            +
                    if (detail) {
         
     | 
| 
      
 67 
     | 
    
         
            +
                        items = await Promise.all(
         
     | 
| 
      
 68 
     | 
    
         
            +
                            items.map((item) =>
         
     | 
| 
      
 69 
     | 
    
         
            +
                                cache.tryGet(item.link!, async () => {
         
     | 
| 
      
 70 
     | 
    
         
            +
                                    const $ = load(await $get(item.link!));
         
     | 
| 
      
 71 
     | 
    
         
            +
                                    item.description = $trim($('.text1[width="95%"] b').html()!);
         
     | 
| 
      
 72 
     | 
    
         
            +
                                    return item;
         
     | 
| 
      
 73 
     | 
    
         
            +
                                })
         
     | 
| 
      
 74 
     | 
    
         
            +
                            )
         
     | 
| 
      
 75 
     | 
    
         
            +
                        );
         
     | 
| 
      
 76 
     | 
    
         
            +
                    }
         
     | 
| 
       69 
77 
     | 
    
         | 
| 
       70 
78 
     | 
    
         
             
                    return {
         
     | 
| 
       71 
     | 
    
         
            -
                        title: '教学通知 -  
     | 
| 
       72 
     | 
    
         
            -
                        link: 'https://jiaowu.sicau.edu.cn/web/web/web/ 
     | 
| 
       73 
     | 
    
         
            -
                        language:  
     | 
| 
       74 
     | 
    
         
            -
                        item: items 
     | 
| 
      
 79 
     | 
    
         
            +
                        title: '教学通知 - 四川农业大学教务处',
         
     | 
| 
      
 80 
     | 
    
         
            +
                        link: 'https://jiaowu.sicau.edu.cn/web/web/web/gwmore.asp',
         
     | 
| 
      
 81 
     | 
    
         
            +
                        language: Language.Chinese,
         
     | 
| 
      
 82 
     | 
    
         
            +
                        item: items,
         
     | 
| 
       75 
83 
     | 
    
         
             
                    };
         
     | 
| 
       76 
84 
     | 
    
         
             
                },
         
     | 
| 
       77 
85 
     | 
    
         
             
            };
         
     | 
| 
         @@ -0,0 +1,67 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import cache from '@/utils/cache';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { load } from 'cheerio';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import timezone from '@/utils/timezone';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import ofetch from '@/utils/ofetch';
         
     | 
| 
      
 7 
     | 
    
         
            +
            import { finishArticleItem } from '@/utils/wechat-mp';
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 10 
     | 
    
         
            +
                path: '/seiee/icisee/:cat',
         
     | 
| 
      
 11 
     | 
    
         
            +
                categories: ['university'],
         
     | 
| 
      
 12 
     | 
    
         
            +
                example: '/sjtu/seiee/icisee/news',
         
     | 
| 
      
 13 
     | 
    
         
            +
                parameters: { cat: '子类别' },
         
     | 
| 
      
 14 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 15 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    antiCrawler: true,
         
     | 
| 
      
 18 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 20 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 21 
     | 
    
         
            +
                },
         
     | 
| 
      
 22 
     | 
    
         
            +
                radar: [],
         
     | 
| 
      
 23 
     | 
    
         
            +
                name: '集成电路学院(信息与电子工程学院)',
         
     | 
| 
      
 24 
     | 
    
         
            +
                maintainers: ['dzx-dzx'],
         
     | 
| 
      
 25 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 26 
     | 
    
         
            +
            };
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            async function handler(ctx) {
         
     | 
| 
      
 29 
     | 
    
         
            +
                const cat = ctx.req.param('cat');
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                const rootUrl = 'https://icisee.sjtu.edu.cn/';
         
     | 
| 
      
 32 
     | 
    
         
            +
                const currentUrl = `${rootUrl}/${cat}.html`;
         
     | 
| 
      
 33 
     | 
    
         
            +
                const response = await ofetch(currentUrl);
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                const $ = load(response);
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                const list = $('.djdt li')
         
     | 
| 
      
 38 
     | 
    
         
            +
                    .toArray()
         
     | 
| 
      
 39 
     | 
    
         
            +
                    .map((item) => {
         
     | 
| 
      
 40 
     | 
    
         
            +
                        item = $(item);
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                        return {
         
     | 
| 
      
 43 
     | 
    
         
            +
                            title: item.find('.tit').text().trim(),
         
     | 
| 
      
 44 
     | 
    
         
            +
                            link: item.find('a').attr('href'),
         
     | 
| 
      
 45 
     | 
    
         
            +
                            pubDate: timezone(parseDate(item.find('.time').text().trim())),
         
     | 
| 
      
 46 
     | 
    
         
            +
                        };
         
     | 
| 
      
 47 
     | 
    
         
            +
                    });
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                const items = await Promise.all(
         
     | 
| 
      
 50 
     | 
    
         
            +
                    list.map((item) =>
         
     | 
| 
      
 51 
     | 
    
         
            +
                        cache.tryGet(item.link, async () => {
         
     | 
| 
      
 52 
     | 
    
         
            +
                            const detailResponse = await ofetch.raw(item.link);
         
     | 
| 
      
 53 
     | 
    
         
            +
                            if (new URL(detailResponse.url).hostname !== 'mp.weixin.qq.com') {
         
     | 
| 
      
 54 
     | 
    
         
            +
                                return { ...item, description: $(detailResponse._data).find('.xwxq').html() };
         
     | 
| 
      
 55 
     | 
    
         
            +
                            }
         
     | 
| 
      
 56 
     | 
    
         
            +
                            item.link = detailResponse.url;
         
     | 
| 
      
 57 
     | 
    
         
            +
                            return await finishArticleItem(item);
         
     | 
| 
      
 58 
     | 
    
         
            +
                        })
         
     | 
| 
      
 59 
     | 
    
         
            +
                    )
         
     | 
| 
      
 60 
     | 
    
         
            +
                );
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                return {
         
     | 
| 
      
 63 
     | 
    
         
            +
                    title: $('title').text(),
         
     | 
| 
      
 64 
     | 
    
         
            +
                    link: currentUrl,
         
     | 
| 
      
 65 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 66 
     | 
    
         
            +
                };
         
     | 
| 
      
 67 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -44,7 +44,7 @@ export const route: Route = { 
     | 
|
| 
       44 
44 
     | 
    
         
             
                handler: async (ctx) => {
         
     | 
| 
       45 
45 
     | 
    
         
             
                    const baseUrl = 'https://isabelle-dev.sketis.net';
         
     | 
| 
       46 
46 
     | 
    
         
             
                    const { blog } = ctx.req.param();
         
     | 
| 
       47 
     | 
    
         
            -
                    const blogName = blog === '1' ? 'News' :  
     | 
| 
      
 47 
     | 
    
         
            +
                    const blogName = blog === '1' ? 'News' : blog === '2' ? 'Release' : 'UNKNOWN';
         
     | 
| 
       48 
48 
     | 
    
         
             
                    const url = `${baseUrl}/phame/blog/view/${blog}/`;
         
     | 
| 
       49 
49 
     | 
    
         
             
                    const response = await ofetch(url);
         
     | 
| 
       50 
50 
     | 
    
         
             
                    const $ = load(response);
         
     | 
| 
         @@ -22,10 +22,20 @@ function parseTitle(smartlinkUrl: string): string { 
     | 
|
| 
       22 
22 
     | 
    
         
             
                }
         
     | 
| 
       23 
23 
     | 
    
         
             
            }
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
      
 25 
     | 
    
         
            +
            function isYouTubeUrl(url: string): boolean {
         
     | 
| 
      
 26 
     | 
    
         
            +
                try {
         
     | 
| 
      
 27 
     | 
    
         
            +
                    const parsedUrl = new URL(url);
         
     | 
| 
      
 28 
     | 
    
         
            +
                    const hostname = parsedUrl.hostname.toLowerCase();
         
     | 
| 
      
 29 
     | 
    
         
            +
                    return hostname === 'youtube.com' || hostname === 'www.youtube.com' || hostname === 'm.youtube.com' || hostname === 'youtu.be';
         
     | 
| 
      
 30 
     | 
    
         
            +
                } catch {
         
     | 
| 
      
 31 
     | 
    
         
            +
                    return false;
         
     | 
| 
      
 32 
     | 
    
         
            +
                }
         
     | 
| 
      
 33 
     | 
    
         
            +
            }
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
       25 
35 
     | 
    
         
             
            function getTitle(item: any): string {
         
     | 
| 
       26 
     | 
    
         
            -
                return item. 
     | 
| 
       27 
     | 
    
         
            -
                    ? item.smartlink.split('?')[0] // For  
     | 
| 
       28 
     | 
    
         
            -
                    : parseTitle(item.smartlink); // Use existing parseTitle for  
     | 
| 
      
 36 
     | 
    
         
            +
                return isYouTubeUrl(item.smartlink)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    ? item.smartlink.split('?')[0] // For YouTube URLs, use the URL without query parameters
         
     | 
| 
      
 38 
     | 
    
         
            +
                    : parseTitle(item.smartlink); // Use existing parseTitle for other URLs
         
     | 
| 
       29 
39 
     | 
    
         
             
            }
         
     | 
| 
       30 
40 
     | 
    
         | 
| 
       31 
41 
     | 
    
         
             
            export const route: Route = {
         
     | 
    
        package/lib/routes/sohu/mp.ts
    CHANGED
    
    | 
         @@ -4,6 +4,7 @@ import cache from '@/utils/cache'; 
     | 
|
| 
       4 
4 
     | 
    
         
             
            import ofetch from '@/utils/ofetch';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import * as cheerio from 'cheerio';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 7 
     | 
    
         
            +
            import timezone from '@/utils/timezone';
         
     | 
| 
       7 
8 
     | 
    
         
             
            import path from 'node:path';
         
     | 
| 
       8 
9 
     | 
    
         
             
            import { art } from '@/utils/render';
         
     | 
| 
       9 
10 
     | 
    
         
             
            import CryptoJS from 'crypto-js';
         
     | 
| 
         @@ -47,6 +48,12 @@ function decryptImageUrl(cipherText) { 
     | 
|
| 
       47 
48 
     | 
    
         
             
                return cipher.toString(CryptoJS.enc.Utf8);
         
     | 
| 
       48 
49 
     | 
    
         
             
            }
         
     | 
| 
       49 
50 
     | 
    
         | 
| 
      
 51 
     | 
    
         
            +
            function createAuthToken() {
         
     | 
| 
      
 52 
     | 
    
         
            +
                const t = Date.now();
         
     | 
| 
      
 53 
     | 
    
         
            +
                const e = 't' + t;
         
     | 
| 
      
 54 
     | 
    
         
            +
                return 'v1' + t + CryptoJS.HmacSHA1(e, '439642a904ef43d092d45509cdc4391c').toString();
         
     | 
| 
      
 55 
     | 
    
         
            +
            }
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
       50 
57 
     | 
    
         
             
            function fetchArticle(item) {
         
     | 
| 
       51 
58 
     | 
    
         
             
                return cache.tryGet(item.link, async () => {
         
     | 
| 
       52 
59 
     | 
    
         
             
                    const response = await ofetch(item.link);
         
     | 
| 
         @@ -54,6 +61,7 @@ function fetchArticle(item) { 
     | 
|
| 
       54 
61 
     | 
    
         | 
| 
       55 
62 
     | 
    
         
             
                    $('.original-title, .lookall-box').remove();
         
     | 
| 
       56 
63 
     | 
    
         
             
                    item.author = item.author || $('span[data-role="original-link"] a').text();
         
     | 
| 
      
 64 
     | 
    
         
            +
                    item.pubDate = timezone(parseDate($('meta[itemprop="dateUpdate"]').attr('content')), 8);
         
     | 
| 
       57 
65 
     | 
    
         | 
| 
       58 
66 
     | 
    
         
             
                    if (/window\.sohu_mp\.article_video/.test($('script').text())) {
         
     | 
| 
       59 
67 
     | 
    
         
             
                        const videoSrc = $('script')
         
     | 
| 
         @@ -128,6 +136,8 @@ async function handler(ctx) { 
     | 
|
| 
       128 
136 
     | 
    
         
             
                        .match(/({.*})/)?.[1]
         
     | 
| 
       129 
137 
     | 
    
         
             
                );
         
     | 
| 
       130 
138 
     | 
    
         
             
                const renderData = blockRenderData[Object.keys(blockRenderData).find((e) => e.startsWith('FeedSlideloadAuthor'))];
         
     | 
| 
      
 139 
     | 
    
         
            +
                const briefIntroductionCard = blockRenderData[Object.keys(blockRenderData).find((e) => e.startsWith('BriefIntroductionCard'))].param.data.list[0];
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
       131 
141 
     | 
    
         
             
                const globalConst = JSON.parse(
         
     | 
| 
       132 
142 
     | 
    
         
             
                    $('script:contains("globalConst")')
         
     | 
| 
       133 
143 
     | 
    
         
             
                        .text()
         
     | 
| 
         @@ -153,7 +163,7 @@ async function handler(ctx) { 
     | 
|
| 
       153 
163 
     | 
    
         
             
                    },
         
     | 
| 
       154 
164 
     | 
    
         
             
                    body: {
         
     | 
| 
       155 
165 
     | 
    
         
             
                        pvId: CBDRenderConst.COMMONCONFIG.pvId || `${Date.now()}_${randomString(7)}`,
         
     | 
| 
       156 
     | 
    
         
            -
                        pageId: `${Date.now()}_${defaultSUV 
     | 
| 
      
 166 
     | 
    
         
            +
                        pageId: `${Date.now()}_${defaultSUV?.slice(0, -5)}_${randomString(3)}`,
         
     | 
| 
       157 
167 
     | 
    
         
             
                        mainContent: {
         
     | 
| 
       158 
168 
     | 
    
         
             
                            productType: contentData.businessType || '13',
         
     | 
| 
       159 
169 
     | 
    
         
             
                            productId: contentData.id || '324',
         
     | 
| 
         @@ -174,11 +184,11 @@ async function handler(ctx) { 
     | 
|
| 
       174 
184 
     | 
    
         
             
                                    size: 20,
         
     | 
| 
       175 
185 
     | 
    
         
             
                                    pro: renderData.param.pro || '0,1,3,4,5',
         
     | 
| 
       176 
186 
     | 
    
         
             
                                    feedType: renderData.param.feedType || 'XTOPIC_SYNTHETICAL',
         
     | 
| 
       177 
     | 
    
         
            -
                                    view: '',
         
     | 
| 
      
 187 
     | 
    
         
            +
                                    view: 'operateFeedMode',
         
     | 
| 
       178 
188 
     | 
    
         
             
                                    innerTag: renderData.param.data2.reqParam.content.innerTag || 'work',
         
     | 
| 
       179 
189 
     | 
    
         
             
                                    spm: renderData.param.data2.reqParam.content.spm || 'smpc.channel_248.block3_308_hHsK47_2_fd',
         
     | 
| 
       180 
190 
     | 
    
         
             
                                    page: 1,
         
     | 
| 
       181 
     | 
    
         
            -
                                    requestId: `${Date.now()} 
     | 
| 
      
 191 
     | 
    
         
            +
                                    requestId: `${Date.now()}${randomString(7)}_${contentData.id}`,
         
     | 
| 
       182 
192 
     | 
    
         
             
                                },
         
     | 
| 
       183 
193 
     | 
    
         
             
                                adInfo: {},
         
     | 
| 
       184 
194 
     | 
    
         
             
                                context: {
         
     | 
| 
         @@ -186,22 +196,23 @@ async function handler(ctx) { 
     | 
|
| 
       186 
196 
     | 
    
         
             
                                },
         
     | 
| 
       187 
197 
     | 
    
         
             
                            },
         
     | 
| 
       188 
198 
     | 
    
         
             
                        ],
         
     | 
| 
      
 199 
     | 
    
         
            +
                        asId: createAuthToken(),
         
     | 
| 
       189 
200 
     | 
    
         
             
                    },
         
     | 
| 
       190 
201 
     | 
    
         
             
                });
         
     | 
| 
       191 
202 
     | 
    
         | 
| 
       192 
203 
     | 
    
         
             
                const list = blockData.data[renderData.param.data2.reqParam.tplCompKey].list.map((item) => ({
         
     | 
| 
       193 
204 
     | 
    
         
             
                    title: item.title,
         
     | 
| 
       194 
205 
     | 
    
         
             
                    description: item.brief,
         
     | 
| 
       195 
     | 
    
         
            -
                    link: `https://www.sohu.com/a/${item.id}_${ 
     | 
| 
       196 
     | 
    
         
            -
                    author: item.authorName,
         
     | 
| 
       197 
     | 
    
         
            -
                    pubDate: parseDate(item.postTime, 'x'),
         
     | 
| 
      
 206 
     | 
    
         
            +
                    link: `https://www.sohu.com/a/${item.id}_${globalConst.mkeyConst_mkey}`,
         
     | 
| 
       198 
207 
     | 
    
         
             
                }));
         
     | 
| 
       199 
208 
     | 
    
         | 
| 
       200 
209 
     | 
    
         
             
                const items = await Promise.all(list.map((e) => fetchArticle(e)));
         
     | 
| 
       201 
210 
     | 
    
         | 
| 
       202 
211 
     | 
    
         
             
                return {
         
     | 
| 
       203 
212 
     | 
    
         
             
                    title: `搜狐号 - ${globalConst.title}`,
         
     | 
| 
      
 213 
     | 
    
         
            +
                    description: briefIntroductionCard.column_9_text,
         
     | 
| 
       204 
214 
     | 
    
         
             
                    link: originalRequest.url,
         
     | 
| 
      
 215 
     | 
    
         
            +
                    image: `https:${briefIntroductionCard.column_2_image}`,
         
     | 
| 
       205 
216 
     | 
    
         
             
                    item: items,
         
     | 
| 
       206 
217 
     | 
    
         
             
                };
         
     | 
| 
       207 
218 
     | 
    
         
             
            }
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            export { namespace } from '@/routes/twitter/namespace';
         
     | 
| 
         @@ -0,0 +1,98 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route, ViewType } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import sanitizeHtml from 'sanitize-html';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import puppeteer from '@/utils/puppeteer';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import logger from '@/utils/logger';
         
     | 
| 
      
 7 
     | 
    
         
            +
            import cache from '@/utils/cache';
         
     | 
| 
      
 8 
     | 
    
         
            +
            import { config } from '@/config';
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 11 
     | 
    
         
            +
                path: '/user/:id',
         
     | 
| 
      
 12 
     | 
    
         
            +
                categories: ['social-media'],
         
     | 
| 
      
 13 
     | 
    
         
            +
                example: '/sotwe/user/_RSSHub',
         
     | 
| 
      
 14 
     | 
    
         
            +
                parameters: {
         
     | 
| 
      
 15 
     | 
    
         
            +
                    id: 'Twitter username',
         
     | 
| 
      
 16 
     | 
    
         
            +
                },
         
     | 
| 
      
 17 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 18 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    requirePuppeteer: true,
         
     | 
| 
      
 20 
     | 
    
         
            +
                    antiCrawler: true,
         
     | 
| 
      
 21 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 23 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 24 
     | 
    
         
            +
                },
         
     | 
| 
      
 25 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 26 
     | 
    
         
            +
                    {
         
     | 
| 
      
 27 
     | 
    
         
            +
                        source: ['www.sotwe.com/:id'],
         
     | 
| 
      
 28 
     | 
    
         
            +
                        target: '/user/:id',
         
     | 
| 
      
 29 
     | 
    
         
            +
                    },
         
     | 
| 
      
 30 
     | 
    
         
            +
                ],
         
     | 
| 
      
 31 
     | 
    
         
            +
                name: 'User timeline - Sotwe',
         
     | 
| 
      
 32 
     | 
    
         
            +
                maintainers: ['TonyRL'],
         
     | 
| 
      
 33 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 34 
     | 
    
         
            +
                view: ViewType.Pictures,
         
     | 
| 
      
 35 
     | 
    
         
            +
            };
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            const renderMedia = (mediaEntities) =>
         
     | 
| 
      
 38 
     | 
    
         
            +
                mediaEntities
         
     | 
| 
      
 39 
     | 
    
         
            +
                    .map((e) => {
         
     | 
| 
      
 40 
     | 
    
         
            +
                        switch (e.type) {
         
     | 
| 
      
 41 
     | 
    
         
            +
                            case 'photo':
         
     | 
| 
      
 42 
     | 
    
         
            +
                                return `<img src="${e.mediaURL}">`;
         
     | 
| 
      
 43 
     | 
    
         
            +
                            case 'video': {
         
     | 
| 
      
 44 
     | 
    
         
            +
                                const video = e.videoInfo.variants.filter((v) => v.type === 'video/mp4').sort((a, b) => b.bitrate - a.bitrate)[0];
         
     | 
| 
      
 45 
     | 
    
         
            +
                                return `<video controls preload="metadata" poster="${e.mediaURL}"><source src="${video.url}" type="video/mp4"></video>`;
         
     | 
| 
      
 46 
     | 
    
         
            +
                            }
         
     | 
| 
      
 47 
     | 
    
         
            +
                            default:
         
     | 
| 
      
 48 
     | 
    
         
            +
                                return '';
         
     | 
| 
      
 49 
     | 
    
         
            +
                        }
         
     | 
| 
      
 50 
     | 
    
         
            +
                    })
         
     | 
| 
      
 51 
     | 
    
         
            +
                    .join('<br>');
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            const renderDescription = (item) =>
         
     | 
| 
      
 54 
     | 
    
         
            +
                `${renderMedia(item.mediaEntities)}<br>${item.text.replaceAll('\n', '<br>')}${item.quotedStatus ? `<br>${renderDescription(item.quotedStatus)}` : ''}${item.retweetedStatus ? `<br>${renderDescription(item.retweetedStatus)}` : ''}`;
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            async function handler(ctx) {
         
     | 
| 
      
 57 
     | 
    
         
            +
                const baseUrl = 'https://www.sotwe.com';
         
     | 
| 
      
 58 
     | 
    
         
            +
                const { id } = ctx.req.param();
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                const data = await cache.tryGet(
         
     | 
| 
      
 61 
     | 
    
         
            +
                    `sotwe:user:${id}`,
         
     | 
| 
      
 62 
     | 
    
         
            +
                    async () => {
         
     | 
| 
      
 63 
     | 
    
         
            +
                        const browser = await puppeteer();
         
     | 
| 
      
 64 
     | 
    
         
            +
                        const page = await browser.newPage();
         
     | 
| 
      
 65 
     | 
    
         
            +
                        await page.setRequestInterception(true);
         
     | 
| 
      
 66 
     | 
    
         
            +
                        page.on('request', (request) => {
         
     | 
| 
      
 67 
     | 
    
         
            +
                            ['document', 'script', 'xhr', 'fetch'].includes(request.resourceType()) ? request.continue() : request.abort();
         
     | 
| 
      
 68 
     | 
    
         
            +
                        });
         
     | 
| 
      
 69 
     | 
    
         
            +
                        const apiUrl = `${baseUrl}/api/v3/user/${id}/`;
         
     | 
| 
      
 70 
     | 
    
         
            +
                        logger.http(`Requesting ${apiUrl}`);
         
     | 
| 
      
 71 
     | 
    
         
            +
                        await page.goto(apiUrl, {
         
     | 
| 
      
 72 
     | 
    
         
            +
                            waitUntil: 'domcontentloaded',
         
     | 
| 
      
 73 
     | 
    
         
            +
                        });
         
     | 
| 
      
 74 
     | 
    
         
            +
                        const response = await page.evaluate(() => document.documentElement.textContent);
         
     | 
| 
      
 75 
     | 
    
         
            +
                        await page.close();
         
     | 
| 
      
 76 
     | 
    
         
            +
                        await browser.close();
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                        return JSON.parse(response || '{}');
         
     | 
| 
      
 79 
     | 
    
         
            +
                    },
         
     | 
| 
      
 80 
     | 
    
         
            +
                    config.cache.routeExpire,
         
     | 
| 
      
 81 
     | 
    
         
            +
                    false
         
     | 
| 
      
 82 
     | 
    
         
            +
                );
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                const items = data.data.map((item) => ({
         
     | 
| 
      
 85 
     | 
    
         
            +
                    title: sanitizeHtml(item.text.split('\n')[0], { allowedTags: [], allowedAttributes: {} }),
         
     | 
| 
      
 86 
     | 
    
         
            +
                    description: renderDescription(item),
         
     | 
| 
      
 87 
     | 
    
         
            +
                    link: `https://x.com/${id}/status/${item.id}`,
         
     | 
| 
      
 88 
     | 
    
         
            +
                    pubDate: parseDate(item.createdAt, 'x'),
         
     | 
| 
      
 89 
     | 
    
         
            +
                }));
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
                return {
         
     | 
| 
      
 92 
     | 
    
         
            +
                    title: `${data.info.name} @${data.info.screenName} - Twitter Profile | Sotwe`,
         
     | 
| 
      
 93 
     | 
    
         
            +
                    description: data.info.description,
         
     | 
| 
      
 94 
     | 
    
         
            +
                    link: `${baseUrl}/${id}`,
         
     | 
| 
      
 95 
     | 
    
         
            +
                    image: data.info.profileImageThumbnail,
         
     | 
| 
      
 96 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 97 
     | 
    
         
            +
                };
         
     | 
| 
      
 98 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,77 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import cache from '@/utils/cache';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import got from '@/utils/got';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { load } from 'cheerio';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import timezone from '@/utils/timezone';
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 9 
     | 
    
         
            +
                path: ['/hazyresearch/blog'],
         
     | 
| 
      
 10 
     | 
    
         
            +
                categories: ['blog'],
         
     | 
| 
      
 11 
     | 
    
         
            +
                example: '/stanford/hazyresearch/blog',
         
     | 
| 
      
 12 
     | 
    
         
            +
                parameters: {},
         
     | 
| 
      
 13 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 14 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                    antiCrawler: false,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 18 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 19 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 20 
     | 
    
         
            +
                },
         
     | 
| 
      
 21 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 22 
     | 
    
         
            +
                    {
         
     | 
| 
      
 23 
     | 
    
         
            +
                        source: ['hazyresearch.stanford.edu/blog'],
         
     | 
| 
      
 24 
     | 
    
         
            +
                    },
         
     | 
| 
      
 25 
     | 
    
         
            +
                ],
         
     | 
| 
      
 26 
     | 
    
         
            +
                name: 'Hazy Research Blog',
         
     | 
| 
      
 27 
     | 
    
         
            +
                maintainers: ['dvorak0'],
         
     | 
| 
      
 28 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 29 
     | 
    
         
            +
                url: 'hazyresearch.stanford.edu/blog',
         
     | 
| 
      
 30 
     | 
    
         
            +
            };
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            async function handler() {
         
     | 
| 
      
 33 
     | 
    
         
            +
                const baseUrl = 'https://hazyresearch.stanford.edu';
         
     | 
| 
      
 34 
     | 
    
         
            +
                const currentUrl = `${baseUrl}/blog`;
         
     | 
| 
      
 35 
     | 
    
         
            +
                const { data: response } = await got(currentUrl);
         
     | 
| 
      
 36 
     | 
    
         
            +
                const $ = load(response);
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                // Parse __NEXT_DATA__ for posts
         
     | 
| 
      
 39 
     | 
    
         
            +
                const nextDataRaw = $('script#__NEXT_DATA__').text();
         
     | 
| 
      
 40 
     | 
    
         
            +
                const nextData = JSON.parse(nextDataRaw);
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                const posts = nextData.props.pageProps.posts || [];
         
     | 
| 
      
 43 
     | 
    
         
            +
                const buildId = nextData.buildId;
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                const list = posts.map((post) => ({
         
     | 
| 
      
 46 
     | 
    
         
            +
                    title: post.title,
         
     | 
| 
      
 47 
     | 
    
         
            +
                    link: `${baseUrl}/blog/${post.slug}`,
         
     | 
| 
      
 48 
     | 
    
         
            +
                    api: `${baseUrl}/_next/data/${buildId}/blog/${post.slug}.json`,
         
     | 
| 
      
 49 
     | 
    
         
            +
                    author: post.author,
         
     | 
| 
      
 50 
     | 
    
         
            +
                    pubDate: timezone(parseDate(post.dateString, 'MMM D, YYYY'), -7),
         
     | 
| 
      
 51 
     | 
    
         
            +
                }));
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                const items = await Promise.all(
         
     | 
| 
      
 54 
     | 
    
         
            +
                    list.map((item) =>
         
     | 
| 
      
 55 
     | 
    
         
            +
                        cache.tryGet(item.link, async () => {
         
     | 
| 
      
 56 
     | 
    
         
            +
                            // ✅ For full content, request real HTML page
         
     | 
| 
      
 57 
     | 
    
         
            +
                            const { data: html } = await got(item.link);
         
     | 
| 
      
 58 
     | 
    
         
            +
                            const $post = load(html);
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                            // Adjust the selector to match your page structure!
         
     | 
| 
      
 61 
     | 
    
         
            +
                            const content = $post('main [class^="Post_content"]').html();
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                            item.description = content || '';
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                            return item;
         
     | 
| 
      
 66 
     | 
    
         
            +
                        })
         
     | 
| 
      
 67 
     | 
    
         
            +
                    )
         
     | 
| 
      
 68 
     | 
    
         
            +
                );
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                return {
         
     | 
| 
      
 71 
     | 
    
         
            +
                    title: 'Hazy Research Blog',
         
     | 
| 
      
 72 
     | 
    
         
            +
                    link: currentUrl,
         
     | 
| 
      
 73 
     | 
    
         
            +
                    description: 'Research updates from Stanford Hazy Research',
         
     | 
| 
      
 74 
     | 
    
         
            +
                    language: 'en',
         
     | 
| 
      
 75 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 76 
     | 
    
         
            +
                };
         
     | 
| 
      
 77 
     | 
    
         
            +
            }
         
     |