zoukankan      html  css  js  c++  java
  • 懒人工具 python基于adb 对某宝某活动。。。刷币

    手机规格不一样输入的像素点也不一样,demo目前比较糙 需要安装adb(具体度娘)
    打开活动界面,开启开发者调试、adb调试

    
    import os
    import time
    
    
    def Tao(i):
        time.sleep(2)
        os.system('adb shell input tap {}'.format(i))
        print('执行点击屏幕,等待两秒')
        time.sleep(2)
    
        for _ in range(5):
            print('执行滑动屏幕,循环三次')
            # 翻页  adb shell input swipe 开始位置<513 1980> 结束位置< 513 359 > 翻页时间/ms < 500 >
            os.system('adb shell input swipe 513 1580 513 359 500 ')
            os.system('adb shell input swipe 513 359 513 1700 500 ')
            time.sleep(1)
    
        print('页面等待15s')
        time.sleep(12)
    
        # os.system('adb shell input tap 984 184')
        os.system('adb shell input swipe 0 359 300 359 500 ')
    
        print('执行返回操作')
    
    
    
    if __name__ == '__main__':
        # for _ in range(15):
        #     Tao('907 1471')
        for _ in range(4):
            # Tao('878 1682')
            Tao('885 1835')
    
  • 相关阅读:
    Javascript事件处理进阶
    Restful API设计指南
    Git&GitHub
    Linux补充
    堡垒机
    Python发送邮件
    js获取当前页面url网址信息
    高并发的秒杀系统
    CMDB开发
    Tornado
  • 原文地址:https://www.cnblogs.com/xujinglog/p/13857251.html
Copyright © 2011-2022 走看看