淘寶天貓自動領取喵幣

話不多說上代碼

手機連接電腦 打開做任務領喵幣界面  

需要安裝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

程序就會自動幫你領取喵幣啦~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章