Ejemplo n.º 1
0
def main():

    #设置当前的设备为 (4857d2bc) ->135设备.
    oUtils.gb_devices_name = "4857d2bc"

    tok = tiktok.tiktok()

    count = 0
    maxCount = 100000

    print(
        '\n\033[1;44m----------------启动抖音开宝箱,做视频广告任务--------------------\033[0m'
    )

    while count < maxCount:

        print(">>> 开始一个20分钟的循环操作...")
        count += 1

        #等10分钟....
        #act.wait(11*60)
        print(">>> 1.开宝箱,点广告,领金币.")
        tok.openBox()

        act.wait(10 * 60)
        tok.openBox()

        #需要点击,防止睡了.

        tok.open20AdVideo()

        #进入下一次循环
        print('--- 执行次数:%d, \n' % (count))
        continue
Ejemplo n.º 2
0
def main():

    #设置当前的设备为 (8514c020) ->158设备.
    oUtils.gb_devices_name = "8514c020"

    tok = tiktok.tiktok()

    count = 0
    maxCount = 100000

    print(
        '\n\033[1;44m----------------启动抖音视频查阅自动化---------------------\033[0m')

    while count < maxCount:

        print(">>> 开始一个20分钟的循环操作...")
        count += 1

        #观看视频20分钟...
        tok.readVideo()
        act.wait(2)

        print(">>> 开宝箱,点广告,领金币.")
        tok.eatRadBagAndOpenBox()

        act.wait(2)

        #进入下一次循环
        print('--- 执行次数:%d, \n' % (count))
        continue
Ejemplo n.º 3
0
    def test_keepAlive(self):
        print("休息一秒")
        act.wait()
        print("休息5秒")
        act.wait(5)

        act.keepAlive()
Ejemplo n.º 4
0
    def test_tapWithRand(self):
        print("点击:(500,300)")
        act.tapWithRand(500, 300)
        act.wait(2)

        print("点击:(500,600)")
        act.tapWithRand(500, 600, 600)
        act.wait(2)
Ejemplo n.º 5
0
    def test_moveUpDownWithRand(self):

        print("UP:(300,500,40)")
        act.wait(2)
        act.moveUpWithRand(300, 500, 40)

        print("DOWN:(300,500,40)")
        act.wait(2)
        act.moveDownWithRand(300, 500, 40)
Ejemplo n.º 6
0
    def openBox(self):
        """开宝箱并看广告.
        """
        act.wait(3)
        #点击宝箱
        act.tapWithRand(920, 720)

        #等宝箱打开页面加载
        act.wait(4)

        #点击广告
        act.tapWithRand(550, 720)

        #等广告页面看完
        act.wait(60)

        #退出下载页面
        #oUtils.backKey()
        #act.wait(3)

        #退出广告页面
        oUtils.backKey()
        act.wait(3)

        return
Ejemplo n.º 7
0
    def readVideo(self):
        #收藏里共三个视频,循环一次10分钟.

        i = 7
        while (i > 1):

            print(">>> 正在观看第(%d)视频,时长3分钟..." % (7 - i + 1))

            act.wait(3 * 60)
            if i <= 4:
                self.moveUpVideo()

            else:
                self.moveDownVideo()
            #减一.
            i -= 1

        return
Ejemplo n.º 8
0
    def open20AdVideo(self):
        """限时任务. 半屏模式,需要装限时任务栏滑动到导航栏下.
        """

        act.wait(3)
        #半屏坐标
        act.tapWithRand(700, 380, 16)
        #等广告看完
        act.wait(60)
        #oUtils.backKey()
        #act.wait(3)
        oUtils.backKey()
        act.wait(3)
        return
Ejemplo n.º 9
0
    def eatRadBagAndOpenBox(self):
        act.tapWithRand(110, 480)
        #等任务页面加载(任务中心加载时长较大)
        act.wait(10)

        #点击宝箱
        act.tapWithRand(920, 720)

        #等宝箱打开页面加载
        act.wait(4)

        #点击广告
        act.tapWithRand(550, 720)

        #等广告页面看完
        act.wait(40)

        #退出下载页面
        oUtils.backKey()
        act.wait(3)

        #退出广告页面
        oUtils.backKey()
        act.wait(3)

        #退出任务中心页面
        oUtils.backKey()
        act.wait(3)

        #完成.
        return
Ejemplo n.º 10
0
 def moveDownVideo(self):
     act.wait(1)
     act.moveUpWithRand(780, 700, 20, 600, 300)
     act.wait(1)
     return