There are tasks in the gold rush to increase the proportion of gold coins collected the next day. Most of the tasks require browsing the specified page for more than 10 seconds, so I wrote this function to simulate browsing the mobile page for more than 10 seconds, sliding n times, and total browsing The time is more than 10 seconds.
# _*_ encoding:utf-8 _*_ import os import time import random def swip(times): shell = "adb shell input swipe 536 1519 543 1079 200" total_time = 0 for i in range(0,times): os.system(shell) delay = 5 * random.random() time.sleep(delay) total_time += delay if total_time<10: time.sleep(10 - total_time) swip(3) 1234567891011121314151617181920
Disadvantages: The starting position and ending position of each sliding are the same. I don't know if Taobao has monitoring measures. If there is, this abnormality will be found. In the future, there is a chance to change the starting position and sliding time of the sliding to random numbers.