当前位置:网站首页>30行代码实现微信朋友圈自动点赞
30行代码实现微信朋友圈自动点赞
2022-08-09 12:23:00 【xindoo】
首先祝大家新年快乐,过年了,允许我水一篇博客。不知道大家都回老家了没,不过我是没有回去,晚上吃完年夜饭看到很多人发朋友圈,为了增进和大家的友谊,于是就想着给大家点个赞,无奈内容太多了,就搞个自动化脚本,原理和前两天我写的30行代码实现蚂蚁森林自动偷能量一样,这里不再赘述,直接上代码。
import uiautomator2 as u2
import time
# d = u2.connect()
d = u2.connect("192.168.0.102")
# d.app_start("com.tencent.mm")
# time.sleep(0.3)
# d(text="发现").click()
# time.sleep(0.3)
# d(text="朋友圈").click()
def click():
time.sleep(0.2)
d.xpath("//*[@resource-id='com.tencent.mm:id/kn']").click()
time.sleep(0.2)
if d.xpath("//*[@text='赞']").exists:
time.sleep(0.2)
d(text="赞").click()
time.sleep(0.1)
return True
time.sleep(0.3)
return False
def swipeDown():
a = d.xpath("//*[@resource-id='com.tencent.mm:id/kn']")
y = a.get().bounds
dist = y[3]
if dist < 200:
dist = 220
d.swipe(300, dist, 300, 50, 0.2)
time.sleep(0.1)
cnt = 0
while True:
if d.xpath("//*[@text='5小时前']").exists:
break
if click() == False:
cnt = cnt + 1
if cnt > 2:
break
swipeDown()
边栏推荐
- Simple understanding of ThreadLocal
- 放下手机吧:实验表明花20分钟思考和上网冲浪同样快乐
- 2022年非一线IT行业就业前景?
- 00后写个暑假作业,被监控成这笔样
- 告别手摇织布机的AI时代
- Manchester city launch emotional intelligence scarf can be detected, give the fans
- The core key points of microservice architecture
- Two minutes recording can pass by second language!The volcano how to practice and become voice tone reproduction technology?
- How to save Simulink simulation model as image or PDF
- Reading and writing after separation, performance were up 100%
猜你喜欢
Do you know the difference between comments, keywords, and identifiers?
李开复花上千万投的缝纫机器人,团队出自大疆
MySQL 原理与优化,Group By 优化 技巧
Report: The number of students who want to learn AI has increased by 200%, and there are not enough teachers
h264 protocol
一甲子,正青春,CCF创建六十周年庆典在苏州举行
The new features of ABP 6.0.0 - rc. 1
告别手摇织布机的AI时代
【HCIP持续更新】IS-IS协议原理与配置
Manchester city launch emotional intelligence scarf can be detected, give the fans
随机推荐
go基础之web获取参数
使用RecyclerView实现三级折叠列表
国产抗新冠口服药每瓶不超300元/ 我国IPv6网络全面建成/ 谷歌入局折叠屏手机...今日更多新鲜事在此...
MySQL 原理与优化,Group By 优化 技巧
无需精子卵子子宫体外培育胚胎,Cell论文作者这番话让网友们炸了
批量读取word docx文件指定表格内容,保存在excel文件中
Manchester city launch emotional intelligence scarf can be detected, give the fans
Flutter入门进阶之旅(十)Dialog&Toast
Too much volume... Tencent was asked on the side that the memory was full, what would happen?
两分钟录音就可秒变语言通!火山语音音色复刻技术如何修炼而成?
你没见过的《老友记》镜头,AI给补出来了|ECCV 2022
AI basketball referee, walking is special, ask harden care don't care
ABAP interview questions: how to use the System CALL interface of the ABAP programming language, direct execution ABAP server operating System's shell command?
腾讯发布第二代四足机器人Max,梅花桩上完成跳跃、空翻
AQS Synchronization Component - FutureTask Analysis and Use Cases
Scala Advanced (7): Collection Content Summary (Part 1)
字符串转换整数 (atoi)
单面线路板与精密多层PCB线路板区别有哪些?
FFmpeg compiles and installs on win10 (configure libx264)
在已打开图片上加水印(文字)