mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-17 07:18:24 +08:00
23 KiB
23 KiB
一些比较通用的规则以及适用场景
开屏广告(全局规则)
通用情况
适用于大部分的情况
- 选择器
anyMatches: [
'[text*="跳过"][text.length<10][visibleToUser=true]', // 可快速查询
'[childCount=0][visibleToUser=true][(text.length<10 && (text*="跳过" || text*="跳過" || text~="(?is).*skip.*")) || (vid~="(?is).*skip.*" && text!="帮助" && text!="取消") || id$="tt_splash_skip_btn" || (desc.length<10 && (desc*="跳过" || desc*="跳過" || desc~="(?is).*skip.*"))]', // 不可快速查询
],
字节开屏广告
右上角是圆形跳过按钮,被一个黄色圆圈包围 (不可快速查询!)
- 选择器
anyMatches: [
'@View[text=null][clickable=true][childCount=0][visibleToUser=true][width<200&&height<200] +(1,2) TextView[index=parent.childCount.minus(1)][text=null] <n FrameLayout[childCount>2] >(7,8,9,10) [text*="第三方应用" || text*="扭动手机" || text*="点击或上滑"][visibleToUser=true]', // 可快速查询
'FrameLayout > FrameLayout[childCount>2] > @View[text=null][clickable=true][childCount=0][visibleToUser=true][width<200&&height<200] +(1,2) TextView[index=parent.childCount.minus(1)][text=null][visibleToUser=true]', // 不可快速查询
],
示例:
排除匹配搜索页
由于上面有两个选择器都匹配 跳过 字样,虽然开屏广告规则限制了 匹配时间、匹配次数、以及文本长度 ,但还是可能存在误触的情况,特别是在应用的搜索页,所以可使用以下选择器来排除匹配应用的搜索页面 (可快速查询!)
- 选择器
[text*="搜索" || text^="猜你" || text="历史记录" || text$="在搜"][text.length>3 && text.length<6][visibleToUser=true]
之所以限制文本长度 [text.length>3 && text.length<6] ,是因为有部分应用在加载开屏广告时会把首页的节点也加载出来,而大部分应用的首页顶部都会有一个搜索框,可能也会有“搜索”两个字,如果排除匹配内包含了 vid*="search" 和 text="搜索" ,那么这种情况下无法跳过开屏广告,并且 vid*="search" 不支持快速查询,所以去掉了 vid*="search" 和 text="搜索" ,使得排除匹配选择器只能匹配上大部分应用搜索页存在的文本:搜索记录 、搜索历史 、搜索发现 、历史记录 、最近搜索 、猜你想搜 、猜你想看 、最近在搜 、大家都在搜 等等,这样就能实现仅排除匹配应用的搜索页,而不排除匹配应用的首页,避免出现上述无法跳过开屏广告的情况
更新提示(全局规则)
- matches数组 (可快速查询!)
matches: [
'[text*="内测" || text*="测试版" || text*="新版" || text*="更新" || text*="升级" || text*="体验" || text*="內測" || text*="測試版" || text*="升級" || text*="體驗" || text*="Update" || text*="Upgrade" || text*="Experience"][text!*="自动" && text!*="自動" && text!*="成功" && text!*="失败" && text!*="失敗" && text!*="检查更新" && text!*="检测更新" && text!*="卸载"][childCount=0][visibleToUser=true]',
'[text*="更新" || text*="下载" || text*="安装" || text*="升级" || text*="查看" || text*="体验" || text*="确定" || text*="确认"][text.length<6][childCount=0][visibleToUser=true]',
'([text*="不再提醒" || text$="再说" || text$="拒绝" || text$="再想想" || text*="再看看" || text^="忽略" || text^="暂不" || text^="放弃" || text^="取消" || text$="不要" || text$="再說" || text$="暫不" || text$="拒絕" || text*="稍后" || text^="关闭" || text$="Later" || text^="Ignore" || text^="Not now" || text^="Cancel"][!(text*="取消"&&text*="忽略")][text.length<6][childCount=0][visibleToUser=true]) || ([vid="iv_close" || vid="iv_cancel" || vid="close" || vid="Close" || vid="img_close" || vid="btn_close" || vid="ivCancel" || vid="tvCancel" || vid="cancel" || vid="Cancel" || vid="ivClose" || vid="imgClose" || vid="iv_negative" || vid="update_close_icon"][childCount=0][visibleToUser=true])',
],
青少年模式(全局规则)
- matches数组 (可快速查询!)
matches: [
'[text*="青少年" || text*="未成年" || text*="儿童"][text*="模式" || text*="守护"][text.length<15][childCount=0][visibleToUser=true]',
'[text*="知道了" || text*="关闭" || text*="我已知晓" || text*="已满"][text.length<8][childCount=0][visibleToUser=true]',
],
弹窗广告
腾讯广告
前两个可适用于大部分情况,底部有醒目文本按钮
- 选择器-1 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][desc=null][id=null][visibleToUser=true][width<90 && height<90] < FrameLayout[childCount=1][text=null][desc=null][id=null][parent.childCount>3] +n FrameLayout >(1,2) [text^="立即" || text="查看详情" || text="了解更多" || text="去微信看看" || text$="应用" || text="进入小程序" || text="领取优惠" || text="跳转微信"]
- 选择器-2 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][desc=null][id=null][visibleToUser=true][width<90 && height<90] < FrameLayout[childCount=1][text=null][desc=null][id=null] <2 FrameLayout[childCount=5] + FrameLayout[childCount=2] > [text^="立即" || text="查看详情" || text="了解更多" || text="去逛逛" || text="去微信看看" || text$="应用" || text="进入小程序" || text="领取优惠" || text="跳转微信"]
- 选择器-3 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][desc=null][id=null][visibleToUser=true][width<90 && height<90] < FrameLayout[childCount=1][text=null][desc=null][id=null] <(2,3) FrameLayout[childCount=4] +(1,2) FrameLayout[childCount=2] >2 [text^="立即" || text="去逛逛"]
- 选择器-4 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][desc=null][id=null][visibleToUser=true][width<90 && height<90] < FrameLayout[childCount=1][text=null][desc=null][id=null] - FrameLayout[childCount>2] >3 [text^="立即" || text$="应用" || text="了解更多" || text="查看详情"]
示例图:
京东广告
底部有 扭动或点击 字样,下方有圆形波浪
- 选择器-1 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][visibleToUser=true] < FrameLayout[childCount=1] <2 FrameLayout[childCount=2] <2 FrameLayout[childCount=2] <2 FrameLayout[childCount=2] - FrameLayout > [text^="扭动或点击"]
- 选择器-2 (可快速查询!)
示例:
@ImageView[childCount=0][text=null][visibleToUser=true] < FrameLayout[childCount=1] <3 FrameLayout[childCount=3] < FrameLayout[childCount=2] +5 FrameLayout[childCount=4] > [text^="扭动或点击"]
示例图:
快手广告
- 选择器,关闭按钮在左上角,
广告字样在左下角 (可快速查询!)
示例:
ImageView[childCount=0][text=null] < @ViewGroup[childCount=1][clickable=true][visibleToUser=true] < ViewGroup +n ViewGroup[childCount=2] > [text="广告"]
- matches数组,下方倒计时和关闭按钮用竖线隔开 (可快速查询!)
示例:
matches: [
'[text="广告"]',
'@ImageView[clickable=true] - [text="|"] - [text$="s"]',
],
示例图:
字节广告
有 反馈 字样
- 选择器-1 (可覆盖 95% 的情况,不可快速查询!)
示例:
@Image[childCount=0][text=""][width<60 && height<60] < View[childCount=1] + View +n View > View[childCount=1] > TextView[text$="广告"]
- 选择器-2 (不可快速查询!)
@Image[childCount=0][text=""][width<60 && height<60] < View[childCount=1] + View > [text="反馈"]
- 选择器-3 (不可快速查询!)
[text="反馈"] +(1,2) View[childCount=1] > Image[childCount=0][text=""][width<60 && height<60]
- 选择器-4 (不可快速查询!)
[text="反馈"] - View[childCount=1] > Image[childCount=0][text=""][width<60 && height<60]
示例图:
卡片广告
- 选择器-1 (可快速查询!)
@ImageView[childCount=0][visibleToUser=true] < FrameLayout[childCount=1] - LinearLayout[childCount=2] > [text="下载应用" || text="立即下载" || text="查看详情" || text="领取优惠" || text="进入小程序" || text="了解更多"][visibleToUser=true]
示例:
示例图:
- 选择器-2 (可快速查询!)
@View[clickable=true][childCount=0][visibleToUser=true] < FrameLayout[desc^="dislike"] + FrameLayout >2 [text="广告"]
示例图: