#!name = 哔哩哔哩 𝕏 #!desc = [白B专用] 哔哩哔哩增强版:包含SponsorBlock空降助手、新版gRPC卡片分区与多级子分类优化(含港澳台及快捷访问)、扫码登录原生签名修复、新版多Tab分类收藏升级、1080P高码率画质解锁、大会员凭证解锁。 #!openUrl = https://apps.apple.com/app/id736536022 #!author = TomCatXue #!homepage = https://github.com/TomCatXue/MyCookieCenter #!icon = https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/icons/bilibili_app.png #!tag = 去广告,空降助手,画质解锁,Bilibili #!source = 680bb3baca8580ec12ce372d38d23d948daa497c86aa73421b0977c472e25c23, 6395745477887a1ecf95e339076b4c05db6e454f17eba52957abbc30f60ecaa7 #!type = normal #!version = 2.8.3 #!date = 2026-11-21 14:40 [Argument] sponsorBlock = switch, true, tag = [空降助手] 跳过视频内插播广告, desc = 自动跳过视频内的赞助插播、片头、片尾等片段 displayUpList = select, "auto", "show", "hide", tag = [动态] 最常访问显示方式, desc = auto: 仅当列表中存在直播状态时显示; show: 始终显示; hide: 始终隐藏; purifyComment = switch, true, tag = [评论区] 过滤置顶广告, desc = 过滤评论区置顶广告及引流链接 optimizeRequest = switch, true, tag = [评论区] 优化加载速度, desc = 优化评论区请求 VIP = switch, false, tag = [会员] 凭证注入解锁, desc = 注入第三方大会员 Authorization 凭证以解锁大会员专属番剧(开启前请在下方填入凭证) Authorization = input, "", tag = 会员凭证 Authorization, desc = 填入抓包获取的 authorization 凭证(仅开启[会员]时需填) UserAgent = input, "", tag = 会员凭证 UserAgent, desc = 填入抓包获取的 user-agent 凭证(选填) logLevel = select, "error", "warn", "info", "debug", "off", tag = 日志等级, desc = 选择日志输出等级 [Rule] # 空降助手服务器 (必须走代理以防连接超时) DOMAIN, bsbsb.top, PROXY # 阻止B站备用域名访问 DOMAIN, api.biliapi.com, REJECT DOMAIN, app.biliapi.com, REJECT DOMAIN, api.biliapi.net, REJECT DOMAIN, app.biliapi.net, REJECT # 禁用STUN & P2P AND, ((DOMAIN-SUFFIX, chat.bilibili.com), (OR, ((DOMAIN-KEYWORD, stun), (DOMAIN-KEYWORD, tracker), (DOMAIN-KEYWORD, p2p)))), REJECT [Rewrite] # 移除直播广告 request if ${url} ~= /^https:\/\/api\.live\.bilibili\.com\/xlive\/e-commerce-interface\/v1\/ecommerce-user\/get_shopping_info\?/i then reject_dict(200) response if ${url} ~= /^https:\/\/api\.live\.bilibili\.com\/xlive\/open-interface\/v2\/tracker\/conf\?/i then response.json.jq(".data.domains=[\"wss://tracker.chat.bilibili.com\"]") # 移除直播间的游戏推广内容 request if ${url} ~= /^https:\/\/line3-h5-mobile-api\.biligame\.com\/game\/live\/large_card_material\?/i then reject_dict(200) # 移除开屏广告 response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/splash\/list\?/i then response.body.mock("text", "{\"code\":0,\"message\":\"OK\",\"ttl\":1,\"data\":{\"max_time\":0,\"min_interval\":31536000,\"pull_interval\":31536000,\"keep_ids\":[],\"show\":[],\"list\":[{}],\"splash_request_id\":\"\"}}", 200) response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/splash\/(show|event\/list2)\?/i then response.json.jq(".data |= with_entries(if .key | IN(\"show\", \"event_list\") then .value = [] else . end)") # 移除大会员广告、移除右上角活动入口 response if ${url} ~= /^https:\/\/ap[ip]\.bilibili\.com\/x\/(?:resource\/(?:top\/activity|patch\/tab(?:\/v2)?)|v2\/search\/square|vip\/ads\/materials)\?/i then response.body.mock("text", "{\"code\":-404,\"message\":\"-404\",\"ttl\":1,\"data\":null}", 200) # 修复废弃专题中心/公开课/新歌热榜接口与H5重定向 response if ${url} ~= /^https:\/\/api\.bilibili\.com\/topic\/getlist\?/i then response.body.mock("text", "{\"code\":0,\"message\":\"0\",\"ttl\":1,\"data\":{\"list\":[],\"total\":0}}", 200) request if ${url} ~= /^https:\/\/www\.bilibili\.com\/h5\/mooc/i then redirect(302, "https://m.bilibili.com/cheese/home?navhide=1") request if ${url} ~= /^https:\/\/www\.bilibili\.com\/h5\/musicplus/i then redirect(302, "https://www.bilibili.com/v/popular/rank/music") # 移除播放页开通会员横幅 response if ${url} ~= /^https:\/\/api\.bilibili\.com\/pgc\/activity\/deliver\/material\/receive\?/i then response.body.mock("text", "{\"code\":0,\"data\":{\"closeType\":\"close_win\",\"container\":[],\"showTime\":\"\"},\"message\":\"success\"}", 200) response if ${url} ~= /^https:\/\/api\.bilibili\.com\/pgc\/view\/v2\/app\/season\?/i then response.json.jq("del(.data.payment)") response if ${url} ~= /^https:\/\/api\.bilibili\.com\/pgc\/page\/channel\?/i then response.json.jq(".data.modules |= map(select(.type != \"TIP\") | if .type == \"BANNER\" then .module_data.items |= map(select(.url | startswith(\"https://www.bilibili.com/blackboard/era/\") | not)) else . end)") # 渠道转为国际版 request if ${url} ~= /^https:\/\/api\.bilibili\.com\/pgc\/page\/channel\?(.*)&mobi_app=iphone&(.*)$/i as urlMatch then url.replace("https://api.bilibili.com/pgc/page/channel?${urlMatch.1}&mobi_app=iphone_i&${urlMatch.2}") # 移除青少年模式弹窗 response if ${url} ~= /^https:\/\/grpc\.biliapi\.net\/bilibili\.app\.interface\.v1\.Teenagers\/ModeStatus$/i then response.body.mock("text", "AAAAABMKEQgCEgl0ZWVuYWdlcnMgAioA", 200, true) # 移除搜索框默认词 response if ${url} ~= /^https:\/\/grpc\.biliapi\.net\/bilibili\.app\.interface\.v1\.Search\/DefaultWords$/i then response.body.mock("text", "AAAAACEaHeaQnOe0ouinhumikeOAgeeVquWJp+aIlnVw5Li7KAE=", 200, true) # 移除视频播放结束推广/追番/点赞推荐卡片 response if ${url} ~= /^https:\/\/grpc\.biliapi\.net\/bilibili\.app\.(view\.v1\.View\/TFInfo|viewunite\.v1\.View\/(PlayPause|ViewEndPage))$/i then response.body.mock("text", "AAAAAAA=", 200, true) # 为上述 gRPC Mock 接口与原生分区接口补充 grpc-status=0 (防止新版客户端因缺少状态头触发错误断流) response if ${url} ~= /^https:\/\/grpc\.biliapi\.net\/bilibili\.app\.(interface\.v1\.(Teenagers\/ModeStatus|Search\/DefaultWords)|view\.v1\.View\/TFInfo|viewunite\.v1\.View\/(PlayPause|ViewEndPage))$/i then response.header.add("grpc-status", "0") response if ${url} ~= /^https:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.app\.show\.v1\.(Mixture\/(RegionIndex|RegionList)|Rank\/RankRegionList)$/i then response.header.add("grpc-status", "0") # 阻断 STUN 实时通信 P2P 穿透 response if ${url} ~= /^https:\/\/api\.bilibili\.com\/x\/pd-proxy\/tracker\?/i then response.json.jq(".data[][]?=\"stun.chat.bilibili.com:3478\"") # 禁用自定义皮肤 (恢复原生) #response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/resource\/show\/skin\?/i then response.json.delete("data.common_equip") # 移除首页推荐流中的商业/活动广告 (过滤广告卡片,仅保留普通视频 av) response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/feed\/index\?/i then response.json.jq("if .data.items then .data.items |= map(select((.banner_item == null) and (.ad_info == null) and (.card_goto == \"av\") and (.card_type | IN(\"small_cover_v2\", \"large_cover_single_v9\", \"large_cover_v1\")))) end") # 移除 Story 模式竖屏流商业插播广告 response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/feed\/index\/story\?/i then response.json.jq("if .data.items then .data.items |= map(select((.ad_info == null) and (.card_goto | IN(\"vertical_ad_av\", \"vertical_ad_live\", \"vertical_ad_picture\") | not)) | del(.story_cart_icon, .free_flow_toast, .image_infos, .course_info, .game_info)) end") # 我的页面升级为新版多 Tab 分类收藏 response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/account\/mine(?:\/ipad)?\?/i then response.json.jq("if .data.sections_v2 then .data.sections_v2 |= map(.items |= map(if .title == \"我的收藏\" or .id == 496 or .id == 3072 then .uri = \"bilibili://user_center/favourite?version=2\" else . end)) end | if .data.ipad_sections then .data.ipad_sections |= map(if .title == \"我的收藏\" or .id == 749 then .uri = \"bilibili://user_center/favourite?version=2\" else . end) end") # 非会员开启会员专属清晰度 (本地UI显示) response if ${url} ~= /^https:\/\/app\.bilibili\.com\/x\/v2\/account\/myinfo\?/i then response.json.jq(".data.vip |= if . != null and .status == 0 then . + { status: 1, type: 2, due_date: 9005270400000, role: 15 } else . end") [Script] # 分区列表优化 (支持 gRPC 新版卡片分组、快捷访问及 HTTP 多级子分类修复) response if ${url} ~= /^https?:\/\/app\.bili(bili\.com|api\.net)\/x\/resource\/show\/tab\/v2\?/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_region.js?v=77318078") with tag="[哔哩哔哩]首页分区入口重定向", timeout=10, requires_body=true response if ${url} ~= /^https?:\/\/(grpc|app)\.bili(bili\.com|api\.net)\/bilibili\.app\.show\.v1\.Mixture\/RegionList(?:\?.*)?$/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_region.js?v=77318078") with tag="[哔哩哔哩]全部分区优化(gRPC)", timeout=10, requires_body=true, binary_body_mode=true request if ${url} ~= /^https?:\/\/(grpc|app)\.bili(bili\.com|api\.net)\/bilibili\.app\.show\.v1\.Mixture\/RegionShortcut(?:\?.*)?$/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_region.js?v=77318078") with tag="[哔哩哔哩]快捷分区保存", timeout=10 request if ${url} ~= /^https?:\/\/app\.bili(bili\.com|api\.net)\/x\/v2\/(channel\/region\/list|region\/index)\?/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_region.js?v=77318078") with tag="[哔哩哔哩]分区列表修复(HTTP)", timeout=10, requires_body=true # 自动捕获当前用户 access_key (供扫码登录签名生成使用) request if ${url} ~= /^https?:\/\/(?:app|api)\.bilibili\.com\/x\/(?:v2\/account\/mine|v2\/account\/myinfo|member\/app\/nickfree|resource\/show\/tab)/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_qrcode.js?v=6beeac14") with tag="[哔哩哔哩]凭证捕获" # 扫码登录原生签名生成与授权修复 (自动计算真实签名授权服务端入库) request if ${url} ~= /^https:\/\/passport\.bilibili\.com\/x\/passport-login\/web\/qrcode\/(check|confirm|scene)/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_qrcode.js?v=6beeac14") with tag="[哔哩哔哩]扫码登录修复", timeout=10, requires_body=true # 空降助手与评论区/动态/画质净化 (采用 Sparkle 官方 master 脚本) request if ${url} ~= /^https:\/\/(?:grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.community\.service\.dm\.v1\.DM\/DmSegMobile$/i then script("https://raw.githubusercontent.com/kokoryh/Sparkle/master/dist/bilibili.protobuf.request.js", {${logLevel}}) with enable=${sponsorBlock}, tag="[哔哩哔哩]空降助手", timeout=10, requires_body=true, binary_body_mode=true request if ${url} ~= /^https:\/\/(?:grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.(?:app\.viewunite\.v1\.View\/View|main\.community\.reply\.v1\.Reply\/MainList)$/i then script("https://raw.githubusercontent.com/kokoryh/Sparkle/master/dist/bilibili.protobuf.request.js", {${purifyComment}, ${logLevel}}) with enable=${optimizeRequest}, tag="[哔哩哔哩]ProtoBuf Request", timeout=10, requires_body=true, binary_body_mode=true response if ${url} ~= /^https:\/\/(?:grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.(?:app\.(?:show\.v1\.Popular\/Index|dynamic\.v2\.Dynamic\/DynAll|view(?:unite)?\.v1\.View\/(?:View|ViewProgress|RelatesFeed|AIRelateAsync)|playurl\.v1\.PlayURL\/PlayView|playerunite\.v1\.Player\/PlayViewUnite)|polymer\.app\.search\.v1\.Search\/SearchAll|community\.service\.dm\.v1\.DM\/DmView|main\.community\.reply\.v1\.Reply\/MainList|pgc\.gateway\.player\.v2\.PlayURL\/PlayView)$/i then script("https://raw.githubusercontent.com/kokoryh/Sparkle/master/dist/bilibili.protobuf.response.js", {${displayUpList}, ${purifyComment}, ${sponsorBlock}, ${logLevel}}) with tag="[哔哩哔哩]ProtoBuf Response", requires_body=true, binary_body_mode=true response if ${url} ~= /^https:\/\/api\.live\.bilibili\.com\/xlive\/(?:app-interface\/v2\/index\/feed|app-room\/v1\/index\/getInfoBy(?:Room|User))\?/i then script("https://raw.githubusercontent.com/kokoryh/Sparkle/master/dist/bilibili.json.js") with tag="[哔哩哔哩]移除直播间广告", requires_body=true # 大会员专属凭证注入 (仅在开启[会员]并填写凭证时触发,用于解锁付费影视) request if ${url} ~= /^https?:\/\/(?:grpc\.biliapi\.net|app\.bilibili\.com|app\.biliapi\.net)\/(?:bilibili\.app\.(?:playerunite\.v1\.Player\/PlayViewUnite|playurl\.v1\.PlayURL\/PlayView)|bilibili\.pgc\.gateway\.player\.v2\.PlayURL\/PlayView)/i then script("https://raw.githubusercontent.com/TomCatXue/MyCookieCenter/refs/heads/main/scripts/tools/bilibili/bilibili_vip.js?v=ef79abaf", {${Authorization}, ${UserAgent}}) with enable=${VIP}, tag="[哔哩哔哩]大会员凭证注入", timeout=60, requires_body=true, binary_body_mode=true [MitM] hostname = grpc.biliapi.net, app.bilibili.com, app.biliapi.net, api.bilibili.com, api.live.bilibili.com, passport.bilibili.com, line3-h5-mobile-api.biligame.com, www.bilibili.com