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,229 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import got from '@/utils/got';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { config } from '@/config';
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            const typeMapping: Record<string, string> = {
         
     | 
| 
      
 7 
     | 
    
         
            +
                push: 'PushEvent',
         
     | 
| 
      
 8 
     | 
    
         
            +
                pr: 'PullRequestEvent',
         
     | 
| 
      
 9 
     | 
    
         
            +
                prcomm: 'PullRequestReviewCommentEvent',
         
     | 
| 
      
 10 
     | 
    
         
            +
                issuecomm: 'IssueCommentEvent',
         
     | 
| 
      
 11 
     | 
    
         
            +
                star: 'WatchEvent',
         
     | 
| 
      
 12 
     | 
    
         
            +
                fork: 'ForkEvent',
         
     | 
| 
      
 13 
     | 
    
         
            +
                create: 'CreateEvent',
         
     | 
| 
      
 14 
     | 
    
         
            +
                delete: 'DeleteEvent',
         
     | 
| 
      
 15 
     | 
    
         
            +
                release: 'ReleaseEvent',
         
     | 
| 
      
 16 
     | 
    
         
            +
                public: 'PublicEvent',
         
     | 
| 
      
 17 
     | 
    
         
            +
                member: 'MemberEvent',
         
     | 
| 
      
 18 
     | 
    
         
            +
            };
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 21 
     | 
    
         
            +
                path: '/feed/:user/:types?',
         
     | 
| 
      
 22 
     | 
    
         
            +
                categories: ['programming'],
         
     | 
| 
      
 23 
     | 
    
         
            +
                example: '/github/feed/yihong0618/star,release,pr',
         
     | 
| 
      
 24 
     | 
    
         
            +
                parameters: {
         
     | 
| 
      
 25 
     | 
    
         
            +
                    user: 'GitHub username',
         
     | 
| 
      
 26 
     | 
    
         
            +
                    types: {
         
     | 
| 
      
 27 
     | 
    
         
            +
                        description: 'Event types to include, comma separated',
         
     | 
| 
      
 28 
     | 
    
         
            +
                        default: 'all',
         
     | 
| 
      
 29 
     | 
    
         
            +
                        options: [
         
     | 
| 
      
 30 
     | 
    
         
            +
                            {
         
     | 
| 
      
 31 
     | 
    
         
            +
                                label: 'All events',
         
     | 
| 
      
 32 
     | 
    
         
            +
                                value: 'all',
         
     | 
| 
      
 33 
     | 
    
         
            +
                            },
         
     | 
| 
      
 34 
     | 
    
         
            +
                            {
         
     | 
| 
      
 35 
     | 
    
         
            +
                                label: 'Create events',
         
     | 
| 
      
 36 
     | 
    
         
            +
                                value: 'create',
         
     | 
| 
      
 37 
     | 
    
         
            +
                            },
         
     | 
| 
      
 38 
     | 
    
         
            +
                            {
         
     | 
| 
      
 39 
     | 
    
         
            +
                                label: 'Delete events',
         
     | 
| 
      
 40 
     | 
    
         
            +
                                value: 'delete',
         
     | 
| 
      
 41 
     | 
    
         
            +
                            },
         
     | 
| 
      
 42 
     | 
    
         
            +
                            {
         
     | 
| 
      
 43 
     | 
    
         
            +
                                label: 'Fork events',
         
     | 
| 
      
 44 
     | 
    
         
            +
                                value: 'fork',
         
     | 
| 
      
 45 
     | 
    
         
            +
                            },
         
     | 
| 
      
 46 
     | 
    
         
            +
                            {
         
     | 
| 
      
 47 
     | 
    
         
            +
                                label: 'Issue comment events',
         
     | 
| 
      
 48 
     | 
    
         
            +
                                value: 'issuecomm',
         
     | 
| 
      
 49 
     | 
    
         
            +
                            },
         
     | 
| 
      
 50 
     | 
    
         
            +
                            {
         
     | 
| 
      
 51 
     | 
    
         
            +
                                label: 'Member events',
         
     | 
| 
      
 52 
     | 
    
         
            +
                                value: 'member',
         
     | 
| 
      
 53 
     | 
    
         
            +
                            },
         
     | 
| 
      
 54 
     | 
    
         
            +
                            {
         
     | 
| 
      
 55 
     | 
    
         
            +
                                label: 'Pull request events',
         
     | 
| 
      
 56 
     | 
    
         
            +
                                value: 'pr',
         
     | 
| 
      
 57 
     | 
    
         
            +
                            },
         
     | 
| 
      
 58 
     | 
    
         
            +
                            {
         
     | 
| 
      
 59 
     | 
    
         
            +
                                label: 'Pull request review comment events',
         
     | 
| 
      
 60 
     | 
    
         
            +
                                value: 'prcomm',
         
     | 
| 
      
 61 
     | 
    
         
            +
                            },
         
     | 
| 
      
 62 
     | 
    
         
            +
                            {
         
     | 
| 
      
 63 
     | 
    
         
            +
                                label: 'Public events',
         
     | 
| 
      
 64 
     | 
    
         
            +
                                value: 'public',
         
     | 
| 
      
 65 
     | 
    
         
            +
                            },
         
     | 
| 
      
 66 
     | 
    
         
            +
                            {
         
     | 
| 
      
 67 
     | 
    
         
            +
                                label: 'Push events',
         
     | 
| 
      
 68 
     | 
    
         
            +
                                value: 'push',
         
     | 
| 
      
 69 
     | 
    
         
            +
                            },
         
     | 
| 
      
 70 
     | 
    
         
            +
                            {
         
     | 
| 
      
 71 
     | 
    
         
            +
                                label: 'Release events',
         
     | 
| 
      
 72 
     | 
    
         
            +
                                value: 'release',
         
     | 
| 
      
 73 
     | 
    
         
            +
                            },
         
     | 
| 
      
 74 
     | 
    
         
            +
                            {
         
     | 
| 
      
 75 
     | 
    
         
            +
                                label: 'Watch events (stars)',
         
     | 
| 
      
 76 
     | 
    
         
            +
                                value: 'star',
         
     | 
| 
      
 77 
     | 
    
         
            +
                            },
         
     | 
| 
      
 78 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 79 
     | 
    
         
            +
                    },
         
     | 
| 
      
 80 
     | 
    
         
            +
                },
         
     | 
| 
      
 81 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 82 
     | 
    
         
            +
                    requireConfig: [
         
     | 
| 
      
 83 
     | 
    
         
            +
                        {
         
     | 
| 
      
 84 
     | 
    
         
            +
                            name: 'GITHUB_ACCESS_TOKEN',
         
     | 
| 
      
 85 
     | 
    
         
            +
                            optional: true,
         
     | 
| 
      
 86 
     | 
    
         
            +
                            description: 'GitHub access token to access private events',
         
     | 
| 
      
 87 
     | 
    
         
            +
                        },
         
     | 
| 
      
 88 
     | 
    
         
            +
                    ],
         
     | 
| 
      
 89 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 90 
     | 
    
         
            +
                    antiCrawler: false,
         
     | 
| 
      
 91 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 92 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 93 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 94 
     | 
    
         
            +
                },
         
     | 
| 
      
 95 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 96 
     | 
    
         
            +
                    {
         
     | 
| 
      
 97 
     | 
    
         
            +
                        source: ['github.com/:user'],
         
     | 
| 
      
 98 
     | 
    
         
            +
                        target: '/feed/:user',
         
     | 
| 
      
 99 
     | 
    
         
            +
                    },
         
     | 
| 
      
 100 
     | 
    
         
            +
                ],
         
     | 
| 
      
 101 
     | 
    
         
            +
                name: "User's Feed",
         
     | 
| 
      
 102 
     | 
    
         
            +
                maintainers: ['RtYkk'],
         
     | 
| 
      
 103 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 104 
     | 
    
         
            +
            };
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
            function formatEventItem(event: any) {
         
     | 
| 
      
 107 
     | 
    
         
            +
                const { id, type, actor, repo, payload, created_at } = event;
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                let title = '';
         
     | 
| 
      
 110 
     | 
    
         
            +
                let description = '';
         
     | 
| 
      
 111 
     | 
    
         
            +
                let link = '';
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
                switch (type) {
         
     | 
| 
      
 114 
     | 
    
         
            +
                    case 'PushEvent': {
         
     | 
| 
      
 115 
     | 
    
         
            +
                        title = `${actor.login} pushed to ${repo.name}`;
         
     | 
| 
      
 116 
     | 
    
         
            +
                        const branch = payload.ref ? payload.ref.replace('refs/heads/', '') : 'unknown';
         
     | 
| 
      
 117 
     | 
    
         
            +
                        description = `Pushed ${payload.size || 0} commit(s) to ${branch} in ${repo.name}`;
         
     | 
| 
      
 118 
     | 
    
         
            +
                        link = payload.commits.at(-1).url.replace('api.github.com/repos/', 'github.com/').replace('/commits/', '/commit/');
         
     | 
| 
      
 119 
     | 
    
         
            +
                        description += `<br><strong>Latest commit:</strong> ${payload.commits.at(-1).message}`;
         
     | 
| 
      
 120 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 121 
     | 
    
         
            +
                    }
         
     | 
| 
      
 122 
     | 
    
         
            +
                    case 'PullRequestEvent':
         
     | 
| 
      
 123 
     | 
    
         
            +
                        title = `${actor.login} ${payload.action} a pull request in ${repo.name}`;
         
     | 
| 
      
 124 
     | 
    
         
            +
                        description = `PR: ${payload.pull_request?.title || 'Unknown'}`;
         
     | 
| 
      
 125 
     | 
    
         
            +
                        link = payload.pull_request?.html_url || `https://github.com/${repo.name}`;
         
     | 
| 
      
 126 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 127 
     | 
    
         
            +
                    case 'PullRequestReviewCommentEvent':
         
     | 
| 
      
 128 
     | 
    
         
            +
                        title = `${actor.login} commented on a pull request review in ${repo.name}`;
         
     | 
| 
      
 129 
     | 
    
         
            +
                        description = `Comment: ${payload.comment?.body || 'No comment'}`;
         
     | 
| 
      
 130 
     | 
    
         
            +
                        link = payload.comment?.html_url || `https://github.com/${repo.name}`;
         
     | 
| 
      
 131 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 132 
     | 
    
         
            +
                    case 'IssueCommentEvent':
         
     | 
| 
      
 133 
     | 
    
         
            +
                        title = `${actor.login} commented on an issue in ${repo.name}`;
         
     | 
| 
      
 134 
     | 
    
         
            +
                        description = `Comment: ${payload.comment?.body || 'No comment'}`;
         
     | 
| 
      
 135 
     | 
    
         
            +
                        link = payload.comment?.html_url || `https://github.com/${repo.name}`;
         
     | 
| 
      
 136 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 137 
     | 
    
         
            +
                    case 'WatchEvent':
         
     | 
| 
      
 138 
     | 
    
         
            +
                        title = `${actor.login} starred ${repo.name}`;
         
     | 
| 
      
 139 
     | 
    
         
            +
                        description = `Starred repository ${repo.name}`;
         
     | 
| 
      
 140 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 141 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 142 
     | 
    
         
            +
                    case 'ForkEvent':
         
     | 
| 
      
 143 
     | 
    
         
            +
                        title = `${actor.login} forked ${repo.name}`;
         
     | 
| 
      
 144 
     | 
    
         
            +
                        description = `Forked repository ${repo.name}`;
         
     | 
| 
      
 145 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 146 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 147 
     | 
    
         
            +
                    case 'CreateEvent':
         
     | 
| 
      
 148 
     | 
    
         
            +
                        title = `${actor.login} created ${payload.ref_type} in ${repo.name}`;
         
     | 
| 
      
 149 
     | 
    
         
            +
                        description = `Created ${payload.ref_type}: ${payload.ref || repo.name}`;
         
     | 
| 
      
 150 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 151 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 152 
     | 
    
         
            +
                    case 'DeleteEvent':
         
     | 
| 
      
 153 
     | 
    
         
            +
                        title = `${actor.login} deleted ${payload.ref_type} in ${repo.name}`;
         
     | 
| 
      
 154 
     | 
    
         
            +
                        description = `Deleted ${payload.ref_type}: ${payload.ref}`;
         
     | 
| 
      
 155 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 156 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 157 
     | 
    
         
            +
                    case 'ReleaseEvent':
         
     | 
| 
      
 158 
     | 
    
         
            +
                        title = `${actor.login} released ${payload.release?.name || payload.release?.tag_name} in ${repo.name}`;
         
     | 
| 
      
 159 
     | 
    
         
            +
                        description = payload.release?.body || `Released ${payload.release?.tag_name}`;
         
     | 
| 
      
 160 
     | 
    
         
            +
                        link = payload.release?.html_url || `https://github.com/${repo.name}`;
         
     | 
| 
      
 161 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 162 
     | 
    
         
            +
                    case 'PublicEvent':
         
     | 
| 
      
 163 
     | 
    
         
            +
                        title = `${actor.login} made ${repo.name} public`;
         
     | 
| 
      
 164 
     | 
    
         
            +
                        description = `Repository ${repo.name} was made public`;
         
     | 
| 
      
 165 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 166 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 167 
     | 
    
         
            +
                    case 'MemberEvent':
         
     | 
| 
      
 168 
     | 
    
         
            +
                        title = `${actor.login} ${payload.action} as a member of ${repo.name}`;
         
     | 
| 
      
 169 
     | 
    
         
            +
                        description = `Member ${payload.action} in repository ${repo.name}`;
         
     | 
| 
      
 170 
     | 
    
         
            +
                        link = `https://github.com/${repo.name}`;
         
     | 
| 
      
 171 
     | 
    
         
            +
                        break;
         
     | 
| 
      
 172 
     | 
    
         
            +
                    default:
         
     | 
| 
      
 173 
     | 
    
         
            +
                        title = `${actor.login} performed ${type} in ${repo?.name || 'unknown repository'}`;
         
     | 
| 
      
 174 
     | 
    
         
            +
                        description = `Activity type: ${type}`;
         
     | 
| 
      
 175 
     | 
    
         
            +
                        link = repo ? `https://github.com/${repo.name}` : `https://github.com/${actor.login}`;
         
     | 
| 
      
 176 
     | 
    
         
            +
                }
         
     | 
| 
      
 177 
     | 
    
         
            +
             
     | 
| 
      
 178 
     | 
    
         
            +
                return {
         
     | 
| 
      
 179 
     | 
    
         
            +
                    title,
         
     | 
| 
      
 180 
     | 
    
         
            +
                    link,
         
     | 
| 
      
 181 
     | 
    
         
            +
                    description,
         
     | 
| 
      
 182 
     | 
    
         
            +
                    pubDate: parseDate(created_at),
         
     | 
| 
      
 183 
     | 
    
         
            +
                    author: actor.login,
         
     | 
| 
      
 184 
     | 
    
         
            +
                    category: [type],
         
     | 
| 
      
 185 
     | 
    
         
            +
                    guid: id,
         
     | 
| 
      
 186 
     | 
    
         
            +
                };
         
     | 
| 
      
 187 
     | 
    
         
            +
            }
         
     | 
| 
      
 188 
     | 
    
         
            +
             
     | 
| 
      
 189 
     | 
    
         
            +
            async function handler(ctx) {
         
     | 
| 
      
 190 
     | 
    
         
            +
                const user = ctx.req.param('user');
         
     | 
| 
      
 191 
     | 
    
         
            +
                const types = ctx.req.param('types') || 'all';
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
                const isAuthenticated = config.github && config.github.access_token;
         
     | 
| 
      
 194 
     | 
    
         
            +
             
     | 
| 
      
 195 
     | 
    
         
            +
                const headers: Record<string, string> = {};
         
     | 
| 
      
 196 
     | 
    
         
            +
                if (isAuthenticated) {
         
     | 
| 
      
 197 
     | 
    
         
            +
                    headers.Authorization = `token ${config.github.access_token}`;
         
     | 
| 
      
 198 
     | 
    
         
            +
                }
         
     | 
| 
      
 199 
     | 
    
         
            +
             
     | 
| 
      
 200 
     | 
    
         
            +
                const response = await got({
         
     | 
| 
      
 201 
     | 
    
         
            +
                    method: 'get',
         
     | 
| 
      
 202 
     | 
    
         
            +
                    url: `https://api.github.com/users/${user}/received_events`,
         
     | 
| 
      
 203 
     | 
    
         
            +
                    headers,
         
     | 
| 
      
 204 
     | 
    
         
            +
                    searchParams: {
         
     | 
| 
      
 205 
     | 
    
         
            +
                        per_page: 100,
         
     | 
| 
      
 206 
     | 
    
         
            +
                    },
         
     | 
| 
      
 207 
     | 
    
         
            +
                });
         
     | 
| 
      
 208 
     | 
    
         
            +
             
     | 
| 
      
 209 
     | 
    
         
            +
                // Parse requested event types and map short names to full event types
         
     | 
| 
      
 210 
     | 
    
         
            +
                let filteredEventTypes: string[] = [];
         
     | 
| 
      
 211 
     | 
    
         
            +
                if (types !== 'all') {
         
     | 
| 
      
 212 
     | 
    
         
            +
                    filteredEventTypes = types.split(',').map((type) => {
         
     | 
| 
      
 213 
     | 
    
         
            +
                        const trimmedType = type.trim();
         
     | 
| 
      
 214 
     | 
    
         
            +
                        return typeMapping[trimmedType] || trimmedType;
         
     | 
| 
      
 215 
     | 
    
         
            +
                    });
         
     | 
| 
      
 216 
     | 
    
         
            +
                }
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
                const items = response.data.filter((event) => filteredEventTypes.length === 0 || filteredEventTypes.includes(event.type)).map((event) => formatEventItem(event));
         
     | 
| 
      
 219 
     | 
    
         
            +
             
     | 
| 
      
 220 
     | 
    
         
            +
                const typeFilter = types === 'all' ? 'All Events' : `Events: ${types}`;
         
     | 
| 
      
 221 
     | 
    
         
            +
                const feedType = isAuthenticated ? 'Private Feed' : 'Public Feed';
         
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
      
 223 
     | 
    
         
            +
                return {
         
     | 
| 
      
 224 
     | 
    
         
            +
                    title: `${user}'s GitHub ${feedType} - ${typeFilter}`,
         
     | 
| 
      
 225 
     | 
    
         
            +
                    link: `https://github.com/${user}`,
         
     | 
| 
      
 226 
     | 
    
         
            +
                    description: `GitHub events received by ${user}${types === 'all' ? '' : ` (filtered: ${types})`}${isAuthenticated ? ' - includes private events' : ' - public events only'}`,
         
     | 
| 
      
 227 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 228 
     | 
    
         
            +
                };
         
     | 
| 
      
 229 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import { Route } from '@/types';
         
     | 
| 
       2 
     | 
    
         
            -
            import  
     | 
| 
      
 2 
     | 
    
         
            +
            import ofetch from '@/utils/ofetch';
         
     | 
| 
       3 
3 
     | 
    
         
             
            import { load } from 'cheerio';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
       4 
5 
     | 
    
         | 
| 
       5 
6 
     | 
    
         
             
            export const route: Route = {
         
     | 
| 
       6 
7 
     | 
    
         
             
                path: '/chrome/extension/:id',
         
     | 
| 
         @@ -28,25 +29,23 @@ export const route: Route = { 
     | 
|
| 
       28 
29 
     | 
    
         
             
            async function handler(ctx) {
         
     | 
| 
       29 
30 
     | 
    
         
             
                const id = ctx.req.param('id');
         
     | 
| 
       30 
31 
     | 
    
         | 
| 
       31 
     | 
    
         
            -
                const response = await  
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                    url: `https://chrome.google.com/webstore/detail/${id}?hl=en`,
         
     | 
| 
       34 
     | 
    
         
            -
                });
         
     | 
| 
       35 
     | 
    
         
            -
                const $ = load(response.data);
         
     | 
| 
      
 32 
     | 
    
         
            +
                const response = await ofetch(`https://chrome.google.com/webstore/detail/${id}?hl=en`);
         
     | 
| 
      
 33 
     | 
    
         
            +
                const $ = load(response);
         
     | 
| 
       36 
34 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
                const version = 'v' + $('. 
     | 
| 
      
 35 
     | 
    
         
            +
                const version = 'v' + $('.nBZElf').text();
         
     | 
| 
       38 
36 
     | 
    
         | 
| 
       39 
37 
     | 
    
         
             
                return {
         
     | 
| 
       40 
38 
     | 
    
         
             
                    title: $('.Pa2dE').text() + ' - Google Chrome Extension',
         
     | 
| 
       41 
39 
     | 
    
         
             
                    link: `https://chrome.google.com/webstore/detail/${id}`,
         
     | 
| 
      
 40 
     | 
    
         
            +
                    image: $('.rBxtY').attr('src'),
         
     | 
| 
       42 
41 
     | 
    
         
             
                    item: [
         
     | 
| 
       43 
42 
     | 
    
         
             
                        {
         
     | 
| 
       44 
43 
     | 
    
         
             
                            title: version,
         
     | 
| 
       45 
     | 
    
         
            -
                            description: $('. 
     | 
| 
      
 44 
     | 
    
         
            +
                            description: $('.JJ3H1e').html(),
         
     | 
| 
       46 
45 
     | 
    
         
             
                            link: `https://chrome.google.com/webstore/detail/${id}`,
         
     | 
| 
       47 
     | 
    
         
            -
                            pubDate:  
     | 
| 
      
 46 
     | 
    
         
            +
                            pubDate: parseDate($('.uBIrad div').last().text()),
         
     | 
| 
       48 
47 
     | 
    
         
             
                            guid: version,
         
     | 
| 
       49 
     | 
    
         
            -
                            author: $('. 
     | 
| 
      
 48 
     | 
    
         
            +
                            author: $('.cJI8ee').text(),
         
     | 
| 
       50 
49 
     | 
    
         
             
                        },
         
     | 
| 
       51 
50 
     | 
    
         
             
                    ],
         
     | 
| 
       52 
51 
     | 
    
         
             
                };
         
     | 
| 
         @@ -32,7 +32,7 @@ async function handler(ctx) { 
     | 
|
| 
       32 
32 
     | 
    
         
             
                const defaultPath = 'announcement';
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
34 
     | 
    
         
             
                const pathname = getSubPath(ctx).replaceAll(/(^\/beijing\/bphc|\/$)/g, '');
         
     | 
| 
       35 
     | 
    
         
            -
                const key = pathname === '' ? defaultPath :  
     | 
| 
      
 35 
     | 
    
         
            +
                const key = pathname === '' ? defaultPath : pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
         
     | 
| 
       36 
36 
     | 
    
         
             
                const obj = mapping[key];
         
     | 
| 
       37 
37 
     | 
    
         
             
                const currentUrl = `${rootUrl}${obj.list}`;
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
         @@ -13,7 +13,7 @@ async function handler(ctx) { 
     | 
|
| 
       13 
13 
     | 
    
         
             
                const defaultPath = '/yaowenn/';
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                let pathname = getSubPath(ctx).replaceAll(/(^\/ccdi|\/$)/g, '');
         
     | 
| 
       16 
     | 
    
         
            -
                pathname = pathname === '' ? defaultPath :  
     | 
| 
      
 16 
     | 
    
         
            +
                pathname = pathname === '' ? defaultPath : pathname.endsWith('/') ? pathname : pathname + '/';
         
     | 
| 
       17 
17 
     | 
    
         
             
                const currentUrl = `${rootUrl}${pathname}`;
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                const { list, title } = await parseNewsList(currentUrl, '.list_news_dl2 li', ctx);
         
     | 
| 
         @@ -24,15 +24,31 @@ export const route: Route = { 
     | 
|
| 
       24 
24 
     | 
    
         
             
            };
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
            async function handler(ctx: Context): Promise<Data> {
         
     | 
| 
      
 27 
     | 
    
         
            +
                const current = currentYear();
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       27 
29 
     | 
    
         
             
                // 获取用户输入的 year
         
     | 
| 
       28 
     | 
    
         
            -
                const { year 
     | 
| 
      
 30 
     | 
    
         
            +
                const { year: tempYear } = ctx.req.param();
         
     | 
| 
      
 31 
     | 
    
         
            +
                const year = /^\d{4}$/.test(tempYear) ? +tempYear : current;
         
     | 
| 
       29 
32 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
                // 替换 url
         
     | 
| 
       31 
     | 
    
         
            -
                const  
     | 
| 
      
 33 
     | 
    
         
            +
                // 替换 url, 如果是今年的话因为 url 格式不一样,所以我们先默认跳去首页获取 meta 信息里的跳转地址
         
     | 
| 
      
 34 
     | 
    
         
            +
                const yearPart = year === current ? '' : `sydwgkzp${year}/`;
         
     | 
| 
      
 35 
     | 
    
         
            +
                let sydwgkzpUrl = `https://rlsbj.cq.gov.cn/zwxx_182/sydw/${yearPart}`;
         
     | 
| 
       32 
36 
     | 
    
         | 
| 
       33 
37 
     | 
    
         
             
                const { data: response } = await got(sydwgkzpUrl);
         
     | 
| 
       34 
38 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                 
     | 
| 
      
 39 
     | 
    
         
            +
                let $ = load(response);
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                // 检查是否存在 <meta http-equiv="Refresh"> 跳转
         
     | 
| 
      
 42 
     | 
    
         
            +
                const metaRefresh = $('meta[http-equiv="Refresh"]').attr('content');
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                // 如果存在的话就使用 meta 提供的链接, 然后重新获取一次页面的内容
         
     | 
| 
      
 45 
     | 
    
         
            +
                if (metaRefresh) {
         
     | 
| 
      
 46 
     | 
    
         
            +
                    const redirectPath = metaRefresh.split('URL=')[1];
         
     | 
| 
      
 47 
     | 
    
         
            +
                    sydwgkzpUrl = new URL(redirectPath, sydwgkzpUrl).href;
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                    const { data: newResponse } = await got(sydwgkzpUrl);
         
     | 
| 
      
 50 
     | 
    
         
            +
                    $ = load(newResponse);
         
     | 
| 
      
 51 
     | 
    
         
            +
                }
         
     | 
| 
       36 
52 
     | 
    
         | 
| 
       37 
53 
     | 
    
         
             
                // 获取所有的标题
         
     | 
| 
       38 
54 
     | 
    
         
             
                const list = $('ul[class="rsj-list1"] > li')
         
     | 
| 
         @@ -44,7 +60,7 @@ async function handler(ctx: Context): Promise<Data> { 
     | 
|
| 
       44 
60 
     | 
    
         
             
                            // 文章标题
         
     | 
| 
       45 
61 
     | 
    
         
             
                            title: title.text(),
         
     | 
| 
       46 
62 
     | 
    
         
             
                            // 文章链接
         
     | 
| 
       47 
     | 
    
         
            -
                            link:  
     | 
| 
      
 63 
     | 
    
         
            +
                            link: new URL(title.attr('href'), sydwgkzpUrl).href,
         
     | 
| 
       48 
64 
     | 
    
         
             
                            // 文章发布日期
         
     | 
| 
       49 
65 
     | 
    
         
             
                            pubDate: parseDate(item.find('span').text()),
         
     | 
| 
       50 
66 
     | 
    
         
             
                        };
         
     | 
| 
         @@ -64,7 +80,7 @@ async function handler(ctx: Context): Promise<Data> { 
     | 
|
| 
       64 
80 
     | 
    
         
             
                );
         
     | 
| 
       65 
81 
     | 
    
         | 
| 
       66 
82 
     | 
    
         
             
                return {
         
     | 
| 
       67 
     | 
    
         
            -
                    title:  
     | 
| 
      
 83 
     | 
    
         
            +
                    title: `重庆市事业单位${year}年公开招聘`,
         
     | 
| 
       68 
84 
     | 
    
         
             
                    link: sydwgkzpUrl,
         
     | 
| 
       69 
85 
     | 
    
         
             
                    item: items,
         
     | 
| 
       70 
86 
     | 
    
         
             
                };
         
     | 
| 
         @@ -101,7 +101,7 @@ const gdgov = async (info, ctx) => { 
     | 
|
| 
       101 
101 
     | 
    
         | 
| 
       102 
102 
     | 
    
         
             
                path.splice(0, 2 + pathstartat);
         
     | 
| 
       103 
103 
     | 
    
         
             
                let pathname = path.join('/');
         
     | 
| 
       104 
     | 
    
         
            -
                pathname = pathname === '' ? defaultPath :  
     | 
| 
      
 104 
     | 
    
         
            +
                pathname = pathname === '' ? defaultPath : pathname.endsWith('/') ? pathname : pathname + '/';
         
     | 
| 
       105 
105 
     | 
    
         
             
                const currentUrl = `${rootUrl}/${pathname}`;
         
     | 
| 
       106 
106 
     | 
    
         | 
| 
       107 
107 
     | 
    
         
             
                let $ = '';
         
     | 
| 
         @@ -38,7 +38,7 @@ async function handler() { 
     | 
|
| 
       38 
38 
     | 
    
         
             
                const host = 'https://www.hangzhou.gov.cn/col/col1256349/index.html';
         
     | 
| 
       39 
39 
     | 
    
         
             
                const response = await ofetch(host);
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
                const browser = await puppeteer( 
     | 
| 
      
 41 
     | 
    
         
            +
                const browser = await puppeteer();
         
     | 
| 
       42 
42 
     | 
    
         
             
                const link = host;
         
     | 
| 
       43 
43 
     | 
    
         
             
                const formatted = response
         
     | 
| 
       44 
44 
     | 
    
         
             
                    .replace('<script type="text/xml">', '')
         
     | 
| 
         @@ -32,7 +32,7 @@ export const route: Route = { 
     | 
|
| 
       32 
32 
     | 
    
         
             
            async function handler() {
         
     | 
| 
       33 
33 
     | 
    
         
             
                const link = 'http://www.pbc.gov.cn/goutongjiaoliu/113456/113469/index.html';
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                const browser = await puppeteer( 
     | 
| 
      
 35 
     | 
    
         
            +
                const browser = await puppeteer();
         
     | 
| 
       36 
36 
     | 
    
         
             
                const page = await browser.newPage();
         
     | 
| 
       37 
37 
     | 
    
         
             
                await page.setRequestInterception(true);
         
     | 
| 
       38 
38 
     | 
    
         
             
                page.on('request', (request) => {
         
     | 
| 
         @@ -0,0 +1,77 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { Route } from '@/types';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import ofetch from '@/utils/ofetch';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { load } from 'cheerio';
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { parseDate } from '@/utils/parse-date';
         
     | 
| 
      
 5 
     | 
    
         
            +
            import timezone from '@/utils/timezone';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import InvalidParameterError from '@/errors/types/invalid-parameter';
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            const config = {
         
     | 
| 
      
 9 
     | 
    
         
            +
                tzgg: {
         
     | 
| 
      
 10 
     | 
    
         
            +
                    link: 'tzgg/',
         
     | 
| 
      
 11 
     | 
    
         
            +
                    title: '通知公告',
         
     | 
| 
      
 12 
     | 
    
         
            +
                },
         
     | 
| 
      
 13 
     | 
    
         
            +
            };
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            export const route: Route = {
         
     | 
| 
      
 16 
     | 
    
         
            +
                path: '/shenzhen/szlh/zwfw/zffw/:caty',
         
     | 
| 
      
 17 
     | 
    
         
            +
                categories: ['government'],
         
     | 
| 
      
 18 
     | 
    
         
            +
                example: '/gov/shenzhen/szlh/zwfw/zffw/tzgg',
         
     | 
| 
      
 19 
     | 
    
         
            +
                parameters: { caty: '信息类别' },
         
     | 
| 
      
 20 
     | 
    
         
            +
                features: {
         
     | 
| 
      
 21 
     | 
    
         
            +
                    requireConfig: false,
         
     | 
| 
      
 22 
     | 
    
         
            +
                    requirePuppeteer: false,
         
     | 
| 
      
 23 
     | 
    
         
            +
                    antiCrawler: false,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    supportBT: false,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    supportPodcast: false,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    supportScihub: false,
         
     | 
| 
      
 27 
     | 
    
         
            +
                },
         
     | 
| 
      
 28 
     | 
    
         
            +
                radar: [
         
     | 
| 
      
 29 
     | 
    
         
            +
                    {
         
     | 
| 
      
 30 
     | 
    
         
            +
                        source: ['szlh.gov.cn/zwfw/zffw/:caty'],
         
     | 
| 
      
 31 
     | 
    
         
            +
                    },
         
     | 
| 
      
 32 
     | 
    
         
            +
                ],
         
     | 
| 
      
 33 
     | 
    
         
            +
                name: '深圳市罗湖区人民政府',
         
     | 
| 
      
 34 
     | 
    
         
            +
                maintainers: ['lonn'],
         
     | 
| 
      
 35 
     | 
    
         
            +
                handler,
         
     | 
| 
      
 36 
     | 
    
         
            +
                description: `| 通知公告 |
         
     | 
| 
      
 37 
     | 
    
         
            +
            | :------: |
         
     | 
| 
      
 38 
     | 
    
         
            +
            |   tzgg   |`,
         
     | 
| 
      
 39 
     | 
    
         
            +
            };
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            async function handler(ctx) {
         
     | 
| 
      
 42 
     | 
    
         
            +
                const baseUrl = 'http://www.szlh.gov.cn/zwfw/zffw/';
         
     | 
| 
      
 43 
     | 
    
         
            +
                const cfg = config[ctx.req.param('caty')];
         
     | 
| 
      
 44 
     | 
    
         
            +
                if (!cfg) {
         
     | 
| 
      
 45 
     | 
    
         
            +
                    throw new InvalidParameterError('Bad category. See <a href="https://docs.rsshub.app/routes/government#深圳市罗湖区人民政府">docs</a>');
         
     | 
| 
      
 46 
     | 
    
         
            +
                }
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                const currentUrl = new URL(cfg.link, baseUrl).href;
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                const response = await ofetch(currentUrl);
         
     | 
| 
      
 51 
     | 
    
         
            +
                const $ = load(response);
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                const items = $('div.lists ul li')
         
     | 
| 
      
 54 
     | 
    
         
            +
                    .toArray()
         
     | 
| 
      
 55 
     | 
    
         
            +
                    .map((item) => {
         
     | 
| 
      
 56 
     | 
    
         
            +
                        item = $(item);
         
     | 
| 
      
 57 
     | 
    
         
            +
                        const a = item.find('a').first();
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                        // Extract the date from <i>
         
     | 
| 
      
 60 
     | 
    
         
            +
                        const date = a.find('i').text().trim();
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                        // Clone and remove <i> to get only the visible text
         
     | 
| 
      
 63 
     | 
    
         
            +
                        const textOnly = a.clone().find('i').remove().end().text().trim();
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                        return {
         
     | 
| 
      
 66 
     | 
    
         
            +
                            title: textOnly,
         
     | 
| 
      
 67 
     | 
    
         
            +
                            link: a.attr('href'),
         
     | 
| 
      
 68 
     | 
    
         
            +
                            pubDate: timezone(parseDate(date, 'YYYY-MM-DD'), 0),
         
     | 
| 
      
 69 
     | 
    
         
            +
                        };
         
     | 
| 
      
 70 
     | 
    
         
            +
                    });
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                return {
         
     | 
| 
      
 73 
     | 
    
         
            +
                    title: '深圳市罗湖区人民政府 - ' + cfg.title,
         
     | 
| 
      
 74 
     | 
    
         
            +
                    link: currentUrl,
         
     | 
| 
      
 75 
     | 
    
         
            +
                    item: items,
         
     | 
| 
      
 76 
     | 
    
         
            +
                };
         
     | 
| 
      
 77 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -6,16 +6,17 @@ const getData = (url) => ofetch(url); 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            const getList = (data) =>
         
     | 
| 
       8 
8 
     | 
    
         
             
                data.map((value) => {
         
     | 
| 
       9 
     | 
    
         
            -
                    const { id, title, content, date_gmt, modified_gmt, link,  
     | 
| 
       10 
     | 
    
         
            -
                    const {  
     | 
| 
      
 9 
     | 
    
         
            +
                    const { id, title, content, date_gmt, modified_gmt, link, _embedded, featured_media } = value;
         
     | 
| 
      
 10 
     | 
    
         
            +
                    const { 'wp:featuredmedia': media, author } = _embedded;
         
     | 
| 
      
 11 
     | 
    
         
            +
                    const image = media?.find((v) => v.id === featured_media) || { source_url: '' };
         
     | 
| 
       11 
12 
     | 
    
         
             
                    return {
         
     | 
| 
       12 
13 
     | 
    
         
             
                        id,
         
     | 
| 
       13 
14 
     | 
    
         
             
                        title: title.rendered,
         
     | 
| 
       14 
15 
     | 
    
         
             
                        description: content.rendered,
         
     | 
| 
       15 
16 
     | 
    
         
             
                        link,
         
     | 
| 
       16 
     | 
    
         
            -
                        itunes_item_image: image. 
     | 
| 
      
 17 
     | 
    
         
            +
                        itunes_item_image: image.source_url,
         
     | 
| 
       17 
18 
     | 
    
         
             
                        category: _embedded['wp:term'][0].map((v) => v.name),
         
     | 
| 
       18 
     | 
    
         
            -
                        author: author 
     | 
| 
      
 19 
     | 
    
         
            +
                        author: author?.map((v) => v.name).join(', '),
         
     | 
| 
       19 
20 
     | 
    
         
             
                        pubDate: timezone(parseDate(date_gmt), 0),
         
     | 
| 
       20 
21 
     | 
    
         
             
                        updated: timezone(parseDate(modified_gmt), 0),
         
     | 
| 
       21 
22 
     | 
    
         
             
                    };
         
     | 
| 
         @@ -43,7 +43,7 @@ async function handler(ctx) { 
     | 
|
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
                        return {
         
     | 
| 
       45 
45 
     | 
    
         
             
                            title,
         
     | 
| 
       46 
     | 
    
         
            -
                            videoLink,
         
     | 
| 
      
 46 
     | 
    
         
            +
                            link: videoLink,
         
     | 
| 
       47 
47 
     | 
    
         
             
                            description: `<img src="${imageSrc}">`,
         
     | 
| 
       48 
48 
     | 
    
         
             
                        };
         
     | 
| 
       49 
49 
     | 
    
         
             
                    });
         
     | 
| 
         @@ -79,7 +79,9 @@ export const route: Route = { 
     | 
|
| 
       79 
79 
     | 
    
         
             
            | \`sort\`            | 搜索结果排序,默认 \`最新上市\`   | \`最新上市\` / \`最新上傳\` / \`本日排行\` / \`本週排行\` / \`本月排行\` / \`觀看次數\` / \`讚好比例\` / \`他們在看\` |
         
     | 
| 
       80 
80 
     | 
    
         
             
            | \`year\`, \`month\` | 筛选发布时间,默认为 \`全部时间\` | 例如:\`year=2025&month=5\`                                                                                           |
         
     | 
| 
       81 
81 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
      
 82 
     | 
    
         
            +
            ::: tip
         
     | 
| 
      
 83 
     | 
    
         
            +
            如果你不确定标签或类型的具体名字,可以直接去原网址选好筛选条件后,把网址中的参数复制过来使用。例如: \`https://hanime1.me/search?query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\`,\`/search?\`后面的部分就是参数了,最后得到**类似**这样的路由 \`https://rsshub.app/hanime1/search/query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\`
         
     | 
| 
      
 84 
     | 
    
         
            +
            :::
         
     | 
| 
       83 
85 
     | 
    
         
             
            `,
         
     | 
| 
       84 
86 
     | 
    
         
             
                    },
         
     | 
| 
       85 
87 
     | 
    
         
             
                },
         
     | 
| 
         @@ -25,7 +25,7 @@ export const route: Route = { 
     | 
|
| 
       25 
25 
     | 
    
         
             
            async function handler(ctx) {
         
     | 
| 
       26 
26 
     | 
    
         
             
                let type = ctx.req.param('type') ?? 'tiobe';
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
                type = type === 'webserver' ? 'netcraft' :  
     | 
| 
      
 28 
     | 
    
         
            +
                type = type === 'webserver' ? 'netcraft' : type === 'db' ? 'db-engines' : type;
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
                const rootUrl = 'https://hellogithub.com';
         
     | 
| 
       31 
31 
     | 
    
         
             
                const currentUrl = `${rootUrl}/report/${type}`;
         
     |