mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-17 07:18:24 +08:00
docs: add Selector.md
This commit is contained in:
193
Selectors.md
Normal file
193
Selectors.md
Normal file
@@ -0,0 +1,193 @@
|
||||
# 一些比较通用的规则以及适用场景
|
||||
|
||||
## 开屏广告(全局规则)
|
||||
|
||||
### 通用情况
|
||||
|
||||
适用于```"跳过"文本属性可快速查询```的情况
|
||||
|
||||
- 选择器
|
||||
|
||||
```txt
|
||||
[text*="跳过"][text.length<10][visibleToUser=true]
|
||||
```
|
||||
|
||||
适用于```"跳过"文本属性不可快速查询```和```无"跳过"文本属性```的情况
|
||||
|
||||
- 选择器
|
||||
|
||||
```txt
|
||||
[childCount=0][visibleToUser=true][(text.length<10 && (text*="跳过" || text*="跳過" || text~="(?is).*skip.*")) || id$="tt_splash_skip_btn" || vid~="(?is).*skip.*" || (vid~="(?is).*count.*" && vid~="(?is).*down.*" && vid!~="(?is).*load.*" && vid!~="(?is).*time.*" && vid!~="(?is).*hour.*" && vid!~="(?is).*minute.*" && vid!~="(?is).*second.*" && vid!~="(?is).*timing.*" && vid!~="(?is).*add.*" && vid!~="(?is).*ead.*" && text!~="([01]?[0-9]|2[0-3])[::][0-5][0-9]") || (desc.length<10 && (desc*="跳过" || desc*="跳過" || desc~="(?is).*skip.*"))]
|
||||
```
|
||||
|
||||
### 字节开屏广告
|
||||
|
||||
右上角是圆形跳过按钮,被一个黄色圆圈包围 **(不可快速查询!)**
|
||||
|
||||
- 选择器
|
||||
|
||||
```txt
|
||||
FrameLayout > FrameLayout[childCount>2] > @View[clickable=true][visibleToUser=true] + TextView[visibleToUser=true][text=null]
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
| | | | |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
|  |  |  |  |
|
||||
|
||||
### 排除搜索页
|
||||
|
||||
由于上面有两个选择器都匹配```跳过```字样,虽然开屏广告规则限制了```匹配时间、匹配次数、以及文本长度```,但还是可能存在误触的情况,特别是在应用的搜索页,所以可使用以下选择器来排除匹配应用的搜索页面 **(可快速查询!)**
|
||||
|
||||
- 选择器
|
||||
|
||||
```txt
|
||||
[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数组 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
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!*="卸载"][name!$=".CheckBox"][childCount=0][visibleToUser=true]',
|
||||
'[text*="更新" || text*="下载" || text*="安装" || text*="升级" || text*="查看" || text*="体验" || text*="确定" || text*="确认"][text.length<6][name!$=".CheckBox"][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" || vid="iv_close" || vid="iv_cancel" || vid="img_close" || vid="iv_upgrade_close" || vid="btn_close" || vid="update_undo" || vid="upgrade_dialog_close_btn" || vid="ivCancel" || vid="ivClose" || vid="imgClose" || vid="iv_negative" || vid="iv_close_update_dialog"][name!$=".CheckBox"][childCount=0][visibleToUser=true]',
|
||||
],
|
||||
```
|
||||
|
||||
## 青少年模式(全局规则)
|
||||
|
||||
- matches数组 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
|
||||
@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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
@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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
@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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
@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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
@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 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
@ImageView[childCount=0][text=null][visibleToUser=true] < FrameLayout[childCount=1] <3 FrameLayout[childCount=3] < FrameLayout[childCount=2] +5 FrameLayout[childCount=4] > [text^="扭动或点击"]
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
| | | | |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
|  |  |  |  |
|
||||
|
||||
### 快手广告
|
||||
|
||||
- 选择器,关闭按钮在左上角,```广告```字样在左下角 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
ImageView[childCount=0][text=null] < @ViewGroup[childCount=1][clickable=true][visibleToUser=true] < ViewGroup +n ViewGroup[childCount=2] > [text="广告"]
|
||||
```
|
||||
|
||||
- matches数组,下方倒计时和关闭按钮用竖线隔开 **(可快速查询!)**
|
||||
|
||||
```txt
|
||||
matches: [
|
||||
'[text="广告"]',
|
||||
'@ImageView[clickable=true] - [text="|"] - [text$="s"]',
|
||||
],
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
| | | | |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
|  |  |  |  |
|
||||
|
||||
### 字节广告
|
||||
|
||||
有```反馈```字样
|
||||
|
||||
- 选择器-1 **(可覆盖 95% 的情况,不可快速查询!)**
|
||||
|
||||
```txt
|
||||
@Image[childCount=0][text=""][width<60 && height<60] < View[childCount=1] + View +n View > View[childCount=1] > TextView[text$="广告"]
|
||||
],
|
||||
```
|
||||
|
||||
- 选择器-2 **(不可快速查询!)**
|
||||
|
||||
```txt
|
||||
@Image[childCount=0][text=""][width<60 && height<60] < View[childCount=1] + View > [text="反馈"]
|
||||
],
|
||||
```
|
||||
|
||||
- 选择器-3 **(不可快速查询!)**
|
||||
|
||||
```txt
|
||||
[text="反馈"] +(1,2) View[childCount=1] > Image[childCount=0][text=""][width<60 && height<60]
|
||||
],
|
||||
```
|
||||
|
||||
- 选择器-4 **(不可快速查询!)**
|
||||
|
||||
```txt
|
||||
[text="反馈"] - View[childCount=1] > Image[childCount=0][text=""][width<60 && height<60]
|
||||
],
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
| | | | |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
|  |  |  |  |
|
||||
Reference in New Issue
Block a user