Skip to content

Commit

Permalink
feat(腾讯视频): 分段广告-卡片广告(补充规则#09)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlctate committed Nov 10, 2024
1 parent 22a3e73 commit 6040ad4
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 32 deletions.
20 changes: 12 additions & 8 deletions src/apps/com.taobao.idlefish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ export default defineGkdApp({
},
{
key: 5,
name: '分段广告-搜索结果页广告',
name: '分段广告-搜索页面广告',
activityIds:
'com.idlefish.flutterbridge.flutterboost.boost.FishFlutterBoostActivity',
rules: [
{
key: 0,
matches: '@View[clickable=true] > ImageView[index=2][desc$="广告"]',
excludeMatches: '@[clickable=true] > [desc^="反馈成功"]',
actionDelay: 900,
action: 'longClick',
matches: '@View[clickable=true] > [clickable=true][desc$="广告"]',
excludeMatches: '@View[clickable=true] > [desc^="反馈成功"]',
snapshotUrls: [
'https://i.gkd.li/i/14723597',
'https://i.gkd.li/i/14723718', // excludeMatches
Expand All @@ -70,7 +71,7 @@ export default defineGkdApp({
preKeys: [0],
key: 1,
matches:
'View[desc^="不喜欢该商品"] > ImageView[index=1][visibleToUser=true]',
'View[desc.length=25][desc^="不喜欢该商品"] > ImageView[index=1][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/14723632',
},
],
Expand All @@ -96,7 +97,7 @@ export default defineGkdApp({
rules: [
{
key: 1,
actionDelay: 1200,
actionDelay: 2000,
name: '点击[赚骰子]-有领取奖励',
matches:
'View[text="领"] <2 @View[index=1] +3 View > View[text="赚"]',
Expand All @@ -111,7 +112,7 @@ export default defineGkdApp({
},
{
key: 3,
actionDelay: 1000,
actionDelay: 800,
name: '领取任务',
matches: '[id="taskWrap"] >3 [text="领取奖励"]',
snapshotUrls: [
Expand All @@ -122,6 +123,7 @@ export default defineGkdApp({
{
preKeys: [3],
key: 4,
actionDelay: 500,
name: '点击x[关闭底部弹窗]',
matches:
'View[id="taskWrap"] > @View[index=1] +3 View >2 View[text!="领取奖励"]',
Expand Down Expand Up @@ -170,9 +172,9 @@ export default defineGkdApp({
},
{
key: 2,
actionDelay: 3000,
actionDelay: 2000,
name: '点击[扱骰子]',
matches: '@View[id="mapDiceBtn"] > View[text.length>1]',
matches: '@View[id="mapDiceBtn"] > View[text!="赚"]',
snapshotUrls: 'https://i.gkd.li/i/17606060',
},
{
Expand All @@ -190,13 +192,15 @@ export default defineGkdApp({
rules: [
{
key: 0,
actionDelay: 1200,
matches:
'ScrollView > @* > [desc="关注上新" || desc$="俱乐部" || desc="闲鱼精选"]',
action: 'longClick',
snapshotUrls: 'https://i.gkd.li/i/17690274',
exampleUrls: 'https://e.gkd.li/da3b020c-b649-434f-a984-35b9e025023b',
},
{
preKeys: [0],
key: 1,
matches: '[vid="id_pager"] >9 [desc="删除"]',
snapshotUrls: 'https://i.gkd.li/i/17690302',
Expand Down
5 changes: 2 additions & 3 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,21 +732,20 @@ export default defineGkdApp({
rules: [
{
key: 1,
actionDelay: 500,
actionDelay: 300,
name: '点击[打卡]',
matches: '@LinearLayout[clickable=true] > TextView[text^="打卡"]',
snapshotUrls: 'https://i.gkd.li/i/17566121',
},
{
key: 2,
actionDelay: 100,
name: '点击[立即打卡]',
matches: '[text="立即打卡"][clickable=true]',
snapshotUrls: 'https://i.gkd.li/i/17552369',
},
{
preKeys: [2],
actionDelay: 300,
actionDelay: 350,
name: '点击[返回]',
matches: 'TextView[desc="返回"][clickable=true]',
snapshotUrls: 'https://i.gkd.li/i/17568038',
Expand Down
35 changes: 14 additions & 21 deletions src/apps/com.tencent.qqlive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export default defineGkdApp({
key: 4,
name: '分段广告-卡片广告',
fastQuery: true,
activityIds: '.ona.activity.SplashHomeActivity',
rules: [
{
key: 0,
name: '首页顶部卡片广告',
activityIds: 'com.tencent.qqlive.ona.activity.SplashHomeActivity',
matches:
'RelativeLayout[clickable=true] >2 ImageView +(3,4) ImageView[clickable=true]',
snapshotUrls: [
Expand All @@ -59,19 +59,14 @@ export default defineGkdApp({
{
key: 1,
name: '首页顶部背景广告',
activityIds: 'com.tencent.qqlive.ona.activity.SplashHomeActivity',
matches: '[text="关闭广告"][clickable=true]',
snapshotUrls: 'https://i.gkd.li/i/12700518',
},
{
key: 2,
name: '个人中心页卡片广告',
activityIds: [
'com.tencent.qqlive.ona.activity.SplashHomeActivity',
'com.tencent.qqlive.ona.offline.client.group.DownloadGroupActivity',
],
matches:
'ViewGroup[clickable=true] >2 TextView + LinearLayout + ImageView[clickable=true]',
activityIds: '.ona.offline.client.group.DownloadGroupActivity',
matches: 'ViewGroup > ImageView[index=2][clickable=true]',
snapshotUrls: [
'https://i.gkd.li/i/12700175',
'https://i.gkd.li/i/13759380',
Expand All @@ -80,20 +75,16 @@ export default defineGkdApp({
{
key: 3,
name: '个人中心页顶部背景广告',
activityIds: 'com.tencent.qqlive.ona.activity.SplashHomeActivity',
matches:
'RelativeLayout > FrameLayout + @ImageView[clickable=true] + ImageView + ImageView',
snapshotUrls: 'https://i.gkd.li/i/12777344',
},
{
key: 4,
name: '点击右上角[广告]-1',
activityIds: [
'com.tencent.qqlive.ona.activity.SplashHomeActivity',
'com.tencent.qqlive.ona.activity.VideoDetailActivity',
],
activityIds: '.ona.activity.VideoDetailActivity',
matches:
'RelativeLayout[clickable=false] > @FrameLayout[clickable=true] > ImageView[desc="the ad tag"]',
'RelativeLayout > @FrameLayout[clickable=true] > ImageView[desc="the ad tag"]',
snapshotUrls: [
'https://i.gkd.li/i/12737313',
'https://i.gkd.li/i/13685842',
Expand All @@ -102,29 +93,34 @@ export default defineGkdApp({
{
key: 5,
name: '点击右上角[广告]-2',
activityIds: ['.ona.activity.SplashHomeActivity'],
matches:
'RelativeLayout[childCount=3] > ImageView[index=2][clickable=true]',
snapshotUrls: ['https://i.gkd.li/i/17586123'],
},
{
key: 6,
name: '点击右下角关闭',
name: '点击右下角关闭-1',
matches:
// 'ImageView[childCount=0] <2 RelativeLayout +2 RelativeLayout >2 RelativeLayout[childCount=3] > ImageView',
'TextView[text="立即下载"] < RelativeLayout[childCount=2] + ImageView',
snapshotUrls: 'https://i.gkd.li/i/13426421',
},
{
key: 7,
name: '点击右下角关闭-2',
matches:
'View[childCount=4] > @View[index=3][clickable=true] - View > TextView[text="立即下载"]',
snapshotUrls: 'https://i.gkd.li/i/17692384',
},
{
key: 8,
fastQuery: true,
matches: '[id="com.tencent.qqlive:id/feed_icon"][clickable=true]',
snapshotUrls: 'https://i.gkd.li/i/14318802',
},

// 以下是配合本规则组内其他key使用的规则,反馈界面的规则都是一样的
{
preKeys: 7,
preKeys: [8],
key: 96,
fastQuery: true,
matches:
Expand All @@ -134,7 +130,6 @@ export default defineGkdApp({
{
key: 97,
name: '广告反馈卡片-点击不感兴趣',
activityIds: 'com.tencent.qqlive.ona.activity.SplashHomeActivity',
matches: '@FrameLayout[clickable=true] >3 [text="不感兴趣"]',
snapshotUrls: 'https://i.gkd.li/i/13695084',
},
Expand All @@ -144,7 +139,6 @@ export default defineGkdApp({
fastQuery: true,
activityIds: [
'com.tencent.qqlive.qaduikit.common.dialog.feedback.variable.QAdFeedbackVariableDislikeItemDialog',
'com.tencent.qqlive.ona.activity.SplashHomeActivity',
'com.tencent.qqlive.ona.activity.VideoDetailActivity',
'com.tencent.qqlive.ona.offline.client.group.DownloadGroupActivity',
],
Expand All @@ -164,7 +158,6 @@ export default defineGkdApp({
fastQuery: true,
activityIds: [
'com.tencent.qqlive.qaduikit.common.dialog.feedback.variable.QAdFeedbackVariableDislikeItemDialog',
'com.tencent.qqlive.ona.activity.SplashHomeActivity',
'com.tencent.qqlive.ona.activity.VideoDetailActivity',
'com.tencent.qqlive.ona.offline.client.group.DownloadGroupActivity',
],
Expand Down
27 changes: 27 additions & 0 deletions src/apps/mark.via.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { defineGkdApp } from '@gkd-kit/define';

export default defineGkdApp({
id: 'mark.via',
name: 'Via',
groups: [
{
key: 1,
name: '全屏广告-弹窗广告',
desc: '点击关闭',
activityIds: '.Shell',
rules: [
{
key: 1,
matches: 'TextView + Button[width=80]',
snapshotUrls: 'https://i.gkd.li/i/17690798',
exampleUrls: 'https://e.gkd.li/c12f1e9f-792a-4f5a-8222-e3c9d3ce4db2',
},
{
key: 2,
matches: '@TextView +2 [text="立即打开"]',
snapshotUrls: 'https://i.gkd.li/i/17690798',
},
],
},
],
});

0 comments on commit 6040ad4

Please sign in to comment.