ADB模式控制手机
采用Python的UIAUTOMATOR2控制aAPP进行阅读注释基本都写了 大家看注释就可以了
关于adb的安装和UIAUTOMATOR2的安装网络上太多了我这里就不说了
快手极速版邀请码:846722277
import random import time import uiautomator2 as u2 class KuaiShou(): def __init__(self): pass def auto(self,splash_time,silder_time): """ 自动阅读快手极速版 :param splash_time: app启动时间 :param silder_time: 屏幕滑动时间 :return: """ d = u2.connect('9b3ad0dc') #链接设备 我的设备ID是9b3ad0dc d.healthcheck() d.debug = True d.app_start('com.kuaishou.nebula') # 启动app引号内为包名称com.kuaishou.nebula/com.yxcorp.gifshow.HomeActivity time.sleep(splash_time) #app启动等待时间 x = d.window_size()[0] #屏幕的宽度 y = d.window_size()[1] # 屏幕的高度 while 1: x1 = random.randint(x * 0.8, x * 0.9) y1 = y * 0.85 x2 = random.randint(x * 0.8, x * 0.9) y2 = y * 0.2 d.swipe(x1, y1, x2, y2) # 滑动屏幕 time.sleep(silder_time) #延时等待 pass if __name__ == "__main__": KuaiShou().auto(20,15)