微信朋友圈自动点赞

import time

import uiautomator2 as ui2

d = ui2.connect('http://172.18.105.47:7912')
d.app_start("com.tencent.mm", stop="True")
fs = d(resourceId="com.tencent.mm:id/sh")[2]
time.sleep(1)
fs.click()
pyq = d(resourceId="android:id/title")
if len(pyq):
    time.sleep(1)
    pyq[0].click()
stop_flag = False
while not stop_flag:
    eud = d(resourceId="com.tencent.mm:id/eud")
    for i in eud:
        # likeandcommand = d(resourceId="com.tencent.mm:id/eop",description="评论")
        likeandcommand = i.child(resourceId="com.tencent.mm:id/eop")

        if len(likeandcommand):
            for item in likeandcommand:
                item.click()
                d.toast.show("准备点赞")
                like = d(resourceId="com.tencent.mm:id/eoc", text="赞")
                if len(like):
                    like[0].click()
                time.sleep(1)
    d.swipe(0.2, 0.9, 0.2, 0.55)
    time.sleep(1)

转载于:https://www.cnblogs.com/c-x-a/p/11586702.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值