话不多说上代码
手机连接电脑 打开做任务领喵币界面
需要安装adb程序哦
# 天猫自动刷猫币
import time, os
def screen(i):
# 文件名
fileName = 'screen.png'
# 文件路径
filePath = '/sdcard/tmp/' + fileName
# 截图
pushScreen = 'adb shell screencap -p ' + filePath
pullScreen = 'adb pull ' + filePath
# os.system(pushScreen)
# os.system(pullScreen)
time.sleep(2)
# #在当前屏幕中查找指定图片(图片需要由系统截图功能截取的图)
# coords = pyautogui.locateOnScreen()
# x,y=pyautogui.center(coords)
# 点击屏幕位置
quliulan = 'adb shell input tap 895 1214'
os.system(quliulan)
time.sleep(2)
# 滑动
huadong = 'adb shell input swipe 800 800 800 400'
os.system(huadong)
print('滑动:', i, '次')
time.sleep(3)
# 滑动
huadong = 'adb shell input swipe 800 800 800 400'
os.system(huadong)
time.sleep(17)
# 返回
# quliulan = 'adb shell input tap 947 1793'
quliulan = 'adb shell input keyevent 4'
os.system(quliulan)
print('返回活动列表')
i += 1
screen(i)
i = 1
screen(i)
# 点击位置 (x,y)
# adb shell input tap 250 250
# 滑动
# adb shell input swipe 800 800 800 400
# 截图和上传命令
# adb shell screencap -p /sdcard/tmp/screen.png
# adb pull /wamp/Apache24/htdocs/python/2020/tianmao/screen.png
程序就会自动帮你领取喵币啦~