forked from Q5678/YoutubeAds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
YoutubeAds.conf
29 lines (23 loc) · 1.74 KB
/
YoutubeAds.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
########################################
#应用名称: Youtube Block AD
#脚本作者: @DivineEngine,@app2smile,@Maasea,@ddgksf2013
#更新时间: 2022-11-12
#使用说明: 用于视频、瀑布流、搜索、播放页、短视频及贴片广告,不适用允许 UDP 转发的节点及 Premium
#通知频道: https://t.me/ddgksf2021
#原始仓库: https://github.com/DivineEngine
#原始仓库: https://github.com/Maasea
#原始仓库: https://github.com/app2smile
#脚本地址: https://codeberg.org/ddgksf2013/Cuttlefish/raw/branch/master/Rewrite/AdBlock/YoutubeAds.conf
########################################
hostname = -redirector*.googlevideo.com,*.googlevideo.com,www.youtube.com,s.youtube.com,youtubei.googleapis.com
# ======= 视频广告请求 ======= #
#^https?:\/\/[\w-]+\.googlevideo\.com\/initplayback.+&oad url script-echo-response https://raw.githubusercontent.com/Maasea/sgmodule/master/Script/Youtube/tinygif.gif
(^https?:\/\/[\w-]+\.googlevideo\.com\/(?!dclk_video_ads).+?)&ctier=L(&.+?),ctier,(.+) url 302 $1$2$3
^https?:\/\/[\w-]+\.googlevideo\.com\/(?!(dclk_video_ads|videoplayback\?)).+&oad url reject-200
# ======= 瀑布流|搜索|播放页|短视频|贴片 广告 ======= #
^https:\/\/youtubei\.googleapis\.com\/youtubei\/v\d\/(browse|next|player|search|reel\/reel_watch_sequence|guide) url script-response-body https://raw.githubusercontent.com/Maasea/sgmodule/master/Script/Youtube/youtube.js
# ======= 通用广告请求 ======= #
#^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v\d\/player\/ad_break url reject
^https?:\/\/(www|s)\.youtube\.com\/api\/stats\/ads url reject-200
^https?:\/\/(www|s)\.youtube\.com\/(pagead|ptracking) url reject-200
^https?:\/\/s\.youtube\.com\/api\/stats\/qoe\?adcontext url reject-200