feat(百度贴吧): 规则优化 (#2036)

* feat(百度贴吧) 规则优化

* feat(百度贴吧): 规则优化

---------

Co-authored-by: lisonge <i@songe.li>
This commit is contained in:
jiuqianyuan 2023-11-13 00:46:35 +08:00 committed by GitHub
parent dea3f52b11
commit 58f2f54c82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,14 +7,14 @@ export default defineAppConfig({
{
key: 0,
name: '开屏广告',
desc: '数字倒计时广告,圆形倒计时广告',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: [
{
key: 0,
quickFind: true,
name: '【跳过+倒计时】型',
matches: 'TextView[text^="跳过"][text.length<=10]',
snapshotUrls: [
'https://i.gkd.li/import/12775906',
@ -23,9 +23,15 @@ export default defineAppConfig({
'https://i.gkd.li/import/13233500',
],
},
{ key: 1, matches: '[id="com.byted.pangle:id/tt_splash_skip_btn"]' }, // 需要补充快照
{
key: 3,
key: 1,
name: '【圆圈跳过】型-来自穿山甲SDK',
matches: '[id="com.byted.pangle:id/tt_splash_skip_btn"]',
snapshotUrls: 'https://i.gkd.li/import/13322227',
},
{
key: 2,
name: '【x+关闭】型',
matches:
'TextView[text="广告"] - @LinearLayout[clickable=true] > [text="关闭"]',
snapshotUrls: 'https://i.gkd.li/import/13168386',
@ -33,146 +39,147 @@ export default defineAppConfig({
],
},
{
key: 1,
name: '任意界面-选择不喜欢理由-不感兴趣',
rules: '@View[text=null] - TextView[text="选择不喜欢理由"][index=0]',
snapshotUrls: 'https://i.gkd.li/import/12775914',
},
{
enable: false,
key: 2,
name: '首页/吧内-帖子列表-推荐列表-长得像帖子的广告卡片',
name: '信息流广告',
desc: '推荐帖子列表,评论区列表:像正常内容的广告,关闭时弹窗选原因',
activityIds: [
'com.baidu.tieba.tblauncher.MainTabActivity',
'com.baidu.tieba.pb.pb.main.PbActivity',
'com.baidu.tieba.frs.FrsActivity',
'com.baidu.tieba.tblauncher.MainTabActivity',
],
rules: [
{
key: 0,
matches:
'TextView[text$="广告"] <n RelativeLayout <n LinearLayout - RelativeLayout > LinearLayout > FrameLayout +n RelativeLayout > LinearLayout',
name: '点击广告【x】',
matches: [
// 'TextView[text$="广告"]',
'RelativeLayout > TextView[clickable=true][text$="广告"]',
// 'LinearLayout[childCount=1] > @FrameLayout[clickable=true][childCount=1][visibleToUser=true] > ImageView',
'LinearLayout[childCount=1] > @FrameLayout[clickable=true][childCount=1] > ImageView',
],
snapshotUrls: [
'https://i.gkd.li/import/12775930',
'https://i.gkd.li/import/12840951',
'https://i.gkd.li/import/12775913', // 此3条应算卡片式广告
'https://i.gkd.li/import/13043133', // 此3条应算卡片式广告
'https://i.gkd.li/import/13054256', // 此3条应算卡片式广告
'https://i.gkd.li/import/12775916',
'https://i.gkd.li/import/12775892', // 指定点击目标为具备 clickable=true 属性的 @FrameLayout防止在这个快照误触点击收藏
],
},
{
key: 1,
preKeys: 0,
name: '关闭原因-【不感兴趣】',
matches:
'RelativeLayout[childCount=2] > RelativeLayout[childCount=1][clickable=true] > ImageView',
snapshotUrls: 'https://i.gkd.li/import/13060892',
'@View[text=null] - TextView[text="选择不喜欢理由"][index=0]',
snapshotUrls: 'https://i.gkd.li/import/12775914',
},
],
},
{
key: 3,
name: '某个广告卡片',
desc: '忘记是哪个卡片了',
name: '首页-推荐-列表顶部卡片式广告',
activityIds: [
'com.baidu.tieba.tblauncher.MainTabActivity',
'com.baidu.tieba.pb.pb.main.PbActivity',
],
rules:
'TextView[text=`广告`] <n FrameLayout <n LinearLayout - RelativeLayout @FrameLayout > ImageView', // 需要补充快照
},
// key=4 的规则组已经删除, 后续不可添加 key=4 的规则组
{
key: 5,
name: '帖子评论区广告卡片',
activityIds: [
'com.baidu.tieba.pb.pb.main.PbActivity',
'com.baidu.tieba.frs.FrsActivity',
'com.baidu.tieba.tblauncher.MainTabActivity',
],
matchTime: 10000,
actionMaximum: 1,
rules: [
{
key: 0,
matches:
'TextView[text="广告"] <n FrameLayout +n RelativeLayout[id="com.baidu.tieba:id/obfuscated"] >n ImageView',
},
{
key: 1,
matches:
'TextView[text$="广告"] +n FrameLayout[id="com.baidu.tieba:id/obfuscated"] >n @FrameLayout[clickable=true] > ImageView[id=null]',
snapshotUrls: [
'https://i.gkd.li/import/12775913', // com.baidu.tieba.pb.pb.main.PbActivity
'https://i.gkd.li/import/13043133', // com.baidu.tieba.tblauncher.MainTabActivity
'https://i.gkd.li/import/13054256',
],
},
{
key: 2,
matches:
'TextView[text$="广告"] < RelativeLayout <n LinearLayout - RelativeLayout >n @FrameLayout > ImageView[id=null][desc=null]',
snapshotUrls: [
'https://i.gkd.li/import/12775916',
'https://i.gkd.li/import/12775892', // 指定点击目标为具备 clickable=true 属性的 @FrameLayout防止在这个快照误触点击收藏
],
'RelativeLayout[childCount=2] > @RelativeLayout[childCount=1][clickable=true] > ImageView',
snapshotUrls: 'https://i.gkd.li/import/13060892',
},
],
},
// 在"我的"界面中出现不停点击,问题快照: https://i.gkd.li/import/12839905
// 且现有规则缺少快照核实问题所在,故暂时移除规则
// {
// key: 6,
// name: '首页左侧游戏广告小图标',
// activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity',
// rules: [
// 'ImageView[clickable=true] - RelativeLayout[clickable=false][childCount=1] > ImageView[clickable=true]',
// ],
// },
{
key: 7,
name: '升级弹窗',
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
activityIds: 'com.baidu.tieba.UpdateDialog',
rules: '[text="稍后再说"]',
snapshotUrls: 'https://i.gkd.li/import/12496934',
},
{
enable: false,
key: 8,
name: '帖子底部广告卡片',
name: '帖子底部内容推荐卡片',
desc: '关闭时弹窗选原因',
activityIds: 'com.baidu.tieba.pb.pb.main.PbActivity',
rules:
'LinearLayout > RelativeLayout > ImageView[id=null][clickable=true]',
snapshotUrls: 'https://i.gkd.li/import/12775882',
rules: [
{
key: 0,
matches:
'LinearLayout > RelativeLayout[id!=null][clickable=false] > ImageView[id=null][clickable=true]',
snapshotUrls: 'https://i.gkd.li/import/12775882',
},
{
preKeys: 0,
name: '关闭原因-不感兴趣',
matches:
'@View[text=null] - TextView[text="选择不喜欢理由"][index=0]',
snapshotUrls: 'https://i.gkd.li/import/12775914',
},
],
},
{
key: 9,
name: '应用内广告弹窗',
activityIds: [
'com.baidu.tbadk.browser.TBWebContainerActivity',
'com.baidu.tieba.tblauncher.MainTabActivity',
],
matchLauncher: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
rules: [
{
key: 0,
name: '点击右上角x关闭',
activityIds: 'com.baidu.tbadk.browser.TBWebContainerActivity',
matches:
'View[childCount=3] > @View[clickable=true][childCount=1] > Image',
snapshotUrls: [
'https://i.gkd.li/import/13060891',
'https://i.gkd.li/import/13222361', //childCount=1否则误触这里
'https://i.gkd.li/import/13060891', // activityIds: com.baidu.tbadk.browser.TBWebContainerActivity
'https://i.gkd.li/import/13222361', // childCount=1否则误触这里
],
},
{
key: 1,
name: '点击正下方x关闭',
activityIds: [
'com.baidu.tieba.frs.FrsActivity',
'com.baidu.tieba.tblauncher.MainTabActivity',
],
matches:
'@TextView[clickable=true && text=null] - FrameLayout TextView[text="广告"]',
snapshotUrls: 'https://i.gkd.li/import/13168383',
snapshotUrls: [
'https://i.gkd.li/import/13168383', // activityIds: com.baidu.tieba.tblauncher.MainTabActivity
'https://i.gkd.li/import/13322120', // activityIds: com.miui.home.launcher.Launcher
],
},
],
},
{
key: 10,
name: '悬浮小广告',
matchDelay: 5000,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
rules: [
{
key: 0,
name: '首页右侧悬浮广告',
activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity',
matches: 'TextView[text="广告"] + ImageView[clickable=true]',
snapshotUrls: 'https://i.gkd.li/import/13115167',
matches:
'@ImageView[clickable=true] - TextView[text="广告"] < RelativeLayout + ImageView',
snapshotUrls: [
'https://i.gkd.li/import/13115167',
'https://i.gkd.li/import/13327933', // 原规则在此误触
],
},
{
key: 1,
@ -184,5 +191,15 @@ export default defineAppConfig({
},
],
},
{
enable: false,
key: 11,
name: '吧内-悬浮卡通-进吧逛逛',
actionMaximum: 1,
resetMatch: 'activity',
rules:
'[text="看到这了,进吧逛逛呗"] < LinearLayout + LinearLayout ImageView[clickable=true]',
snapshotUrls: 'https://i.gkd.li/import/13322337',
},
],
});