Python抖音自动点赞源码调用百度AI集合ADB写的一个抖音根据颜值点赞加关注的脚本,感觉有很多地方需要完善请大佬指正,手机连接上电脑,手机进入抖音之后运行
from aip import AipFace
import base64
import os
import time
""" 你的 APPID AK SK """
APP_ID = ''
API_KEY = ''
SECRET_KEY = ''
client = AipFace(APP_ID, API_KEY, SECRET_KEY)
def main():
time.sleep(3)
i = 0
while i < 3:
os.system('adb shell screencap -p /sdcard/screen.png')
os.system('adb pull /sdcard/screen.png')
beaut = beautySum()
if beaut == -1:
i = 3
if beaut > 70:
os.system('adb shell input tap 1000 1100')
os.system('adb shell input tap 700 700 && adb shell input tap 700 700')
print('点赞加关注')
i = 3
elif beaut > 60:
print('已点赞' + str(beaut))
os.system('adb shell input tap 700 700 && adb shell input tap 700 700')
i = 3
i = i + 1
os.system('adb shell input swipe 100 1500 100 750 100')
def beautySum():
with open("screen.png", "rb") as f: # 转为二进制格式
base64_data = base64.b64encode(f.read()) # 使用base64进行加密
image = str(base64_data, encoding='UTF-8')
imageType = "BASE64"
""" 调用人脸检测 """
options = {}
options["face_field"] = "age,beauty,gender"
options["max_face_num"] = 2
options["face_type"] = "LIVE"
options["liveness_control"] = "LOW"
a = client.detect(image, imageType, options)
if a['error_msg'] == 'pic not has face':
print('无脸')
return 0
else:
if a['result']['face_list'][0]['gender']['type'] == 'male':
print('男性跳过')
return -1
print(a['result']['face_list'][0]['beauty'])
return a['result']['face_list'][0]['beauty']
if __name__ == '__main__':
i = 0
while i < 3:
main()
版权声明
版权说明: 仅限用于学习和研究目的;不得将上述内容用于商业和非法用途!否则一切后果自负。我们非常重视版权问题,如有侵权请邮件至(171373236#qq.com)与我们联系处理,敬请谅解!





















