1.png

2.png

3.png

4.png

5.png

6.png

import pyautogui  #导入鼠标键盘库
import time
#进入微信
WX_location=pyautogui.locateCenterOnScreen('1.png',confidence=0.9)
#查找精确度为1.0,即百分之百精准匹配——这其实很不方便,实际我们把精确度设为0.9更科学,既能保证不会找错对象,又不会因为默认的精确度太苛刻,明明对象存在代码却找不到而返回None
pyautogui.click(WX_location.x,WX_location.y,clicks=2,interval=0.1,duration=0.2,button="left")#点击次数默认是1
while True:Logon_location=pyautogui.locateCenterOnScreen('2.png',confidence=0.9)if Logon_location is not None:pyautogui.click(Logon_location.x,Logon_location.y,clicks=1,interval=0.2,duration=0.2,button="left")#点击次数默认是1breakprint("未找到匹配图片,0.1秒后重试")time.sleep(0.1)
#进入朋友圈
while True:Circle_location=pyautogui.locateCenterOnScreen('3.png',confidence=0.9)if Circle_location is not None:pyautogui.click(Circle_location.x,Circle_location.y,clicks=1,interval=0.2,duration=0.2,button="left")#点击次数默认是1breakprint("未找到匹配图片,0.1秒后重试")time.sleep(0.1)
#进入点赞界面while True:Comment_location=pyautogui.locateCenterOnScreen('4.png',confidence=0.9)if Comment_location is not None:pyautogui.click(Comment_location.x,Comment_location.y,clicks=1,interval=0.2,duration=0.2,button="left")#点击次数默认是1breakprint("未找到匹配图片,0.1秒后重试")time.sleep(0.1)
#点赞
roll = -100
while True:Like_location=pyautogui.locateCenterOnScreen('5.png',confidence=0.9)Liked_location=pyautogui.locateCenterOnScreen('6.png',confidence=0.9)if Liked_location is not None:while True:pyautogui.scroll(roll)  # 向下滚动100Comment_location = pyautogui.locateCenterOnScreen('4.png', confidence=0.9)if Comment_location is not None:pyautogui.click(Comment_location.x, Comment_location.y, clicks=1, interval=0.2, duration=0.2,button="left")breakprint("未找到匹配图片,0.1秒后重试")time.sleep(0.5)roll=roll-500elif Like_location is not None:pyautogui.click(Like_location.x, Like_location.y, clicks=1, interval=0.2, duration=0.2,button="left")else:while True:Comment_location = pyautogui.locateCenterOnScreen('4.png', confidence=0.9)if Comment_location is not None:pyautogui.click(Comment_location.x, Comment_location.y, clicks=1, interval=0.2, duration=0.2,button="left")  # 点击次数默认是1breakprint("未找到匹配图片,0.1秒后重试")time.sleep(0.1)

参考:

        哔哩哔哩: up主   不开心就喝水  的代码

哔哩哔哩视频链接

Python微信点赞相关推荐

  1. python微信点赞脚本_Python爬取微信公众号评论、点赞等相关信息

    微信公众号爬虫方案分析(爬取文艺相处公众号) 之前考虑过使用搜狗微信来爬取微信公众号信息,不过搜狗提供的数据有诸多弊端,比如文章链接是临时的,文章没有阅读量等指标,所以考虑通过手机客户端利用 Pyth ...

  2. python微信点赞收费吗_点赞关于怎样微信刷投票数,我来教你微信投票怎样花钱买票...

    揭阳都来说说快速投票什么价格?细说微信投票目前什么价格?投票的意图在于评选成果.咱们常常会在一些节目中听到主持人说"请投出您名贵的一票,为您喜爱支撑的选手加油打气",可是作为在竞赛 ...

  3. python微信点赞脚本_你写过的最好的 Python 脚本是什么?

    利用itchat模块登录网页版微信,将自己微信收到的所有消息都缓存下来,当检测到有消息撤回时,将撤回消息的缓存版本通过文件传输助手发送到自己的手机上. 于是你就可以看到别人撤回的消息是什么了!!! 效 ...

  4. python微信点赞脚本_用OpenCV-python的微信跳一跳外挂脚本

    微信跳一跳好像火了很久了,我才开始接触,作为一个手残党, 玩了几次不到20分,打算直接放弃了.但作为一个技术宅,下一反应肯定是"上脚本".最初想法是用arduino(不会可以学啊) ...

  5. python 朋友圈点赞收费吗_微信点赞扣费是真是假 微信点赞要收钱了吗

    自从微信推出以来,相信越来越多的人不仅开始以微信为主要的联系工具,还喜欢在微信的朋友圈里发自己的一些生活状态,将自己的生活与大家分享.有时候发朋友圈分享生活得到朋友的点赞的时候,自己也会觉得很开心,有 ...

  6. python微信爬取教程_[python]微信公众号文章爬取

    [python]微信公众号文章爬取 需求 爬取一些微信公众号的文章 数据来源 1.搜狗微信搜索,可以搜索微信公众号文章,但只能显示该公众号最近十篇的文章 2.通过个人微信公众号中的素材管理,查看其他微 ...

  7. python微信跳一跳小游戏刷分

    iOS #python 微信跳一跳小游戏刷分 首先我们安装Facebook的WebDriverAgent,这是一款新的iOS移动测试框架 在GitHub上找到https://github.com/fa ...

  8. python 微信bot_使用Python创建Twitter Bot

    python 微信bot Have you ever wantd to create a Twitter bot? In this tutorial John G. Fisher shows how ...

  9. python 微信bot_使用Tweepy在Python中创建Twitter Bot

    python 微信bot by Lucas Kohorst 卢卡斯·科斯特(Lucas Kohorst) 使用Tweepy在Python中创建Twitter Bot (Create a Twitter ...

最新文章

  1. 快速排序算法实现思想个人理解
  2. 使用C#格式化字符串 1
  3. Power of Two
  4. Linux多进程拷贝fork,浅析linux中fork函数
  5. C#实现WEB服务器
  6. Python与模块--01sys
  7. Loadrunner11 下载、安装及破解
  8. mappedBy作用
  9. 咱用AppDesigner开发复现了一款我国古老的桌游 —【升官图】
  10. FBReader集成后,打开书出现空白页面
  11. Proteus仿真51单片机入门
  12. Spirent Testcenter基本配置使用说明_1022
  13. C#把月日年帶有 AM、PM的时间格式转换为正常时间格式
  14. 中国的部分家长应该扪心自问一下了
  15. 2019蓝桥杯国赛总结
  16. 深圳内推 | 香港中文大学(深圳)路广利老师招聘NLP方向研究助理
  17. java怎样模拟点击网页,笔者操作Java+selenium实现网站模拟点击和页面数据爬取
  18. 使用网口转换器更换网线后无法上网
  19. 【GXOI/GZOI2019】与或和【单调栈】
  20. STM8时钟学习笔记

热门文章

  1. 计算机是如何读懂高级语言的——编译过程简述
  2. Piggy-Bank - 九度教程第 102 题
  3. 用注册表管理IE代理设置
  4. 计算机初级证书 英语怎么说,常见职业资格证书英文翻译(含英语、计算机等)...
  5. 王垠博客 linux,前段时间花了一个通宵把王垠(Yin Wang)博客的所有文章看完了...
  6. 配置微信公众号业务域名,解决“非微信官方网页,请确认是否继续访问”问题
  7. 自由浏览器 android,百度浏览器发布安卓6.1版 趣味视频弹幕吐槽不停
  8. Turtlbot仿真之Stage
  9. 碗状碎块三维模型的下载(.PLY格式)3D model file with Bowl-shaped Broken Piece (.ply format)
  10. Python 文件命名引发的module has no attribute错误