python实现抖音点赞功能
作者:Anber_chen 时间:2023-08-13 04:06:50
本文实例为大家分享了python实现抖音点赞功能的具体代码,供大家参考,具体内容如下
#coding=utf-8
from time import sleep, ctime
import threading
import os
import sys
import time
import subprocess
import re
#M 2018-08-11
#针对于单条控制命令的终端操作 system(func_swipe,func_trap)
#若要进行多条命令操作则可以直接move掉当前执行的函数操作 do方法中进行判断操作即可
#本地测试设备MI6
def connectDevcie():
#检查设备是否连接成功,如果成功返回True,否则返回False
try:
#获取设备列表信息,并用"\r\n"拆分
deviceInfo= subprocess.check_output('adb devices').split("\r\n")
#如果没有链接设备或者设备读取失败,第二个元素为空
if deviceInfo[1]=='':
return False
else:
return True
except Exception,e:
print "Device Connect Fail:",e
def getDeviceName():
try:
if connectDevcie():
#获取设备名
deviceInfo= subprocess.check_output('adb devices -l')
deviceName=re.findall(r'device product:(.*)\smodel',deviceInfo,re.S)[0]
return deviceName
else:
return "Connect Fail,Please reconnect Device..."
except Exception,e:
print "Get Device Name:",e
def system(func_swipe,func_trap):
while True:
os.system(func_trap)#USB命令控制点击操作-->点赞操作
os.system(func_swipe)#USB命令控制滑动操作-->上滑操作
#os.system("adb shell input tap 999 1084")#USB命令控制手指终端
print 'Start %s! %s' %(getDeviceName(),ctime())#控制台信息输出
sleep(5)#视频时间延迟5秒 如需延长或缩短时长 改变参数即可
#def move(func):
# while True:
# print 'Start %s! %s' %(func,ctime())
# sleep(5)
来源:https://blog.csdn.net/qq_26476193/article/details/82843869
标签:python,抖音,点赞
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
SQLServer数据库中开启CDC导致事务日志空间被占满的原因
2024-01-18 01:41:39
![](https://img.aspxhome.com/file/2023/5/104075_0s.png)
PLSQLDeveloper登录远程连接Oracle的操作
2023-07-23 03:34:22
![](https://img.aspxhome.com/file/2023/1/64081_0s.png)
Golang中 import cycle not allowed 问题的解决方法
2024-04-25 15:13:38
![](https://img.aspxhome.com/file/2023/1/134151_0s.png)
JavaScript中常见的几种获取元素的方式
2023-07-13 07:46:12
![](https://img.aspxhome.com/file/2023/7/55937_0s.jpg)
Python中使用双下划线防止类属性被覆盖问题
2021-05-04 04:02:44
![](https://img.aspxhome.com/file/2023/2/87722_0s.jpg)
python中ASCII码和字符的转换方法
2021-04-06 13:22:04
python3.x上post发送json数据
2021-07-03 02:07:23
![](https://img.aspxhome.com/file/2023/3/92153_0s.jpg)
对python中Json与object转化的方法详解
2022-11-13 23:42:35
![](https://img.aspxhome.com/file/2023/0/99010_0s.jpg)
MySQL表设计优化与索引 (四)
2010-10-25 19:50:00
CSS实例讲解:地图提示
2007-05-11 17:04:00
![](https://img.aspxhome.com/file/uploadpic/20075/20075111742681.jpg)
JavaScript使用Range调色及透明度实例
2024-04-16 10:36:25
pandas的apply函数用法详解
2022-05-09 11:41:16
jquery ajax 局部刷新小案例
2024-05-02 17:05:01
JS+DIV实现拖动效果
2023-07-02 05:19:37
![](https://img.aspxhome.com/file/2023/4/137004_0s.gif)
MySQL8.0+版本1045错误的问题及解决办法
2024-01-16 23:19:33
![](https://img.aspxhome.com/file/2023/9/72499_0s.png)
Mysql数据库性能优化一
2024-01-20 17:06:45
![](https://img.aspxhome.com/file/2023/2/108902_0s.png)
DreamWeaver操作超级技巧大全
2008-10-03 20:50:00
python中的多重继承实例讲解
2022-06-18 01:51:05
![](https://img.aspxhome.com/file/2023/8/95568_0s.jpg)
pytorch下tensorboard的使用程序示例
2021-10-27 01:01:16
![](https://img.aspxhome.com/file/2023/4/121014_0s.jpg)
MySQL基础教程之事务异常情况
2024-01-15 06:12:20
![](https://img.aspxhome.com/file/2023/8/128058_0s.jpg)