💻 源代码
import subprocess
import time
def send_douyin_message(uid, message):
"""发送抖音私信"""
# 使用ADB模拟操作
cmd = f'''
adb shell am start -n com.ss.android.ugc.aweme/.main.MainActivity
time.sleep(3)
# 点击搜索
adb shell input tap 540 120
time.sleep(1)
# 输入用户ID
adb shell input text {uid}
time.sleep(2)
# 点击搜索
adb shell input tap 540 300
time.sleep(3)
# 点击进入主页
adb shell input tap 540 400
time.sleep(2)
# 点击私信
adb shell input tap 900 150
time.sleep(2)
# 输入消息
adb shell input text '{message}'
time.sleep(1)
# 发送
adb shell input tap 900 1100
'''
subprocess.run(cmd, shell=True)
def batch_confession(uids, message):
"""批量表白"""
for uid in uids:
send_douyin_message(uid, message)
print(f"已发送给用户: {uid}")
time.sleep(5) # 间隔5秒
# 示例
user_ids = ['12345678', '87654321']
message = '我发现我喜欢上你了,做我女朋友吧!💖'
batch_confession(user_ids, message)