#!name=YouTube
#!desc=某些APP要清除缓存或者重新安装拦截广告才会生效！
#!author=奶思
#!homepage=https://github.com/fmz200/wool_scripts
#!icon=https://raw.githubusercontent.com/fmz200/wool_scripts/main/icons/gif/naisi-01.gif
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Loon/plugin/split/partY/YouTube.lpx
#!tg-group=https://t.me/lanjieguanggao
#!date=2025-08-21 22:37:00
#############################################

[Argument]
youtube_enable = switch,true,false,tag=YouTube-脚本开关

[Rewrite]
# 播放页广告
^https:\/\/rr[\w-]+\.googlevideo\.com\/initplayback\? reject-dict


[Script]
# 响应体
http-response ^https:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/(browse|next|player|search|reel\/reel_watch_sequence|guide|account\/get_setting|get_watch) script-path=https://raw.githubusercontent.com/Maasea/sgmodule/refs/heads/master/Script/Youtube/youtube.response.js, requires-body=true, binary-body-mode=true, timeout=60, tag=YouTube响应体, enable={youtube_enable}


[MITM]
hostname = rr*.googlevideo.com, youtubei.googleapis.com