Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自动打开抖音 #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified autojump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 9 additions & 17 deletions douyin-bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,15 @@
BEAUTY_THRESHOLD = 80

# 最小年龄
GIRL_MIN_AGE = 14
GIRL_MIN_AGE = 18


def yes_or_no():
"""
检查是否已经为启动程序做好了准备
"""
while True:
yes_or_no = str(input('请确保手机打开了 ADB 并连接了电脑,'
'然后打开手机软件,确定开始?[y/n]:'))
if yes_or_no == 'y':
break
elif yes_or_no == 'n':
print('谢谢使用')
exit(0)
else:
print('请重新输入')

def openDouyinByAdb():
# 检测抖音是否开启
status = adb.run("shell ps | grep com.ss.android.ugc.aweme")
if not status:
# 开启抖音
adb.run("shell am start com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.splash.SplashActivity")

def _random_bias(num):
"""
Expand Down Expand Up @@ -215,7 +206,8 @@ def main():

if __name__ == '__main__':
try:
# yes_or_no()
openDouyinByAdb()
time.sleep(1)
main()
except KeyboardInterrupt:
adb.run('kill-server')
Expand Down
Binary file modified optimized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
matplotlib==2.2.0
xlrd==1.1.0
pandas==0.22.0
numpy==1.14.1
Pillow==5.1.0
scikit-learn==0.19.1
matplotlib
xlrd
pandas
numpy
Pillow
scikit-learn