当前位置:网站首页>It is said that Kwai will pay for the Tiktok super fast version of the video? How can you miss this opportunity to collect wool?
It is said that Kwai will pay for the Tiktok super fast version of the video? How can you miss this opportunity to collect wool?
2022-07-02 06:13:00 【Python is the best language in the world】
Preface
New year at home , The elders of the family are tiktok. , And then we can get tiktok. . Although only a few dollars a day , But for the older generation , Fifty cents is a huge sum . So I think I'll write a script to collect the wool , Since an account can be swiped for several yuan a day , What about the ten accounts ? I don't say much nonsense , The official start of the .
One 、 Project brief introduction
Watch Kwai speed video , There can be gold coins , But you need people to slide one video at a time , utilize Python The power of , Automatic video brushing through code , While effectively liberating your hands, you can collect some wool and make money for breakfast .
Software preparation :
1、Python Environmental installation https://www.python.org/downloads/
2、 Night God Simulator https://www.yeshen.com/
3、adb Tools (git The code package has been downloaded , Take it and use it directly )
At present, it is windows Lower operation ~
Two 、 Start thinking
2.1 install Python
If only Python To process data 、 Reptiles 、 Data analysis or automated scripts 、 Machine learning, etc , I suggest using Python Based on the environment +jupyter that will do , Installation and use reference Windows/Mac install 、 Use Python Environmental Science +jupyter notebook
If you want to use Python Conduct web Project development, etc , It is recommended to use Python Based on the environment +Pycharm, Installation and use reference :Windows Lower installation 、 Use Pycharm course , It's all over and Mac Let's play around Python- install & Use Python/PyCharm .( Now I prefer open source VS Code)
( For specific steps, you can see the articles recommended above ) Write a simple version here (windows Next ), Download it Python Installation package , What we're downloading right now is 3.7 Version of , Click next to install , After installed , Click on the lower left corner of the computer : Start -> function -> Input cmd, Then enter windows Command line input interface , Input python, If the following interface appears ( chart 1) explain python Successfully installed .
chart 1
If there is an error, it cannot run , It should be the reason why the environment variable is not set , Can be set up windows environment variable Here's the picture 2.
chart 2 Set the environment variable , Variable value is python The installation directory
2.2 Install the night God Simulator
Browser direct access to night God https://www.yeshen.com/, Then click download now , You can download the corresponding installation package , I also downloaded one here , Stored in Baidu cloud disk , The official account is directly required if you need it. 「 Jane said Python」 reply : Night God ( Personally, I think it's faster to download directly from the official website ).
After the download , Click the installation package to install directly , Just keep clicking next ( The following figure is for an old watch mac Installed , It's simpler ), After installation, two shortcuts will appear on the desktop : Night God Simulator , Night God opens more devices .
2.3 model Quick Kwai version configuration in simulator
Click the app icon , Turn on the night God Simulator , Search for : Kwai speed version , Then click the Install button to install .
One more thing , Asked the official at present Mac It does not support direct Android multi opening , But I found out , You can try to use the night God Virtual Box install windows virtual machine , Then download it in the virtual machine windows Version night God , Then drive more ... I didn't try .
( The following is a widnows operation ) About windows How to achieve more , You can view the official documents of night God , It's simple :https://support.yeshen.com/zh-CN/often/dk
The setting of multiple switches is specially explained here , The simulator I added by default ,i5+8G Desktop on 3 A simulator , The computer will have some cards . Because we just need to make the simulator run Kwai speed version , Here, let's lower the configuration of the simulator . Pictured 3 To map 5 operation .
chart 3 Night God opens more devices , Add multiple simulators
chart 4 Set up Simulator
chart 5 Set simulator configuration
notes : How to view nocturnal simulator port ( Back Python Call multi open use ), Look at the picture below 6 To map 7 operation .
Enter the installation directory of the machine , Use notepad perhaps The text tool opens
chart 6
chart 7
2.4 download adb Tools
You can directly visit the corresponding system link below to download , It can also be directly in the official account 「 Jane said Python」 reply : Night God , I've packed it for everyone ~ And the source code of this project .
Windows edition :https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Mac edition :https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Linux edition :https://dl.google.com/android/repository/platform-tools-latest-linux.zip
After the download , You can choose to adb.exe Store in any directory , Remember to add an environment variable to it ( It's OK to , Directly in adb.exe The directory is opened cmd, Then run the code ).
2.5 Start Python Script writing
The main idea is , utilize adb Tools , adopt Python Automatic operation of Android simulator .
At present, there are several problems that can be optimized later , I hope those who are interested can discuss it together :
1) At present, it is used to generate a random time as the time of upward sliding , Some of the Kwai speed version has some short videos. , How to judge the time of upward stroke by timing and turning on the interface ?
2) Sliding verification will be encountered when brushing video , How to automatically verify ?
3) And the last one is app It will automatically turn off , How to restart automatically ?
4) reflection : How to realize multiple mobile phone numbers ?
The following is all the source code of this project , Welcome to exchange and study ~
# -*- coding: utf-8 -*-
import time
import subprocess
import random
# Connect the simulator
def connect():
return subprocess.run("adb connect 127.0.0.1:62001",shell=True)
# Automation
def move_up():
state=connect()
print(" state :",state)
# towards adb dispatch orders : Slide the screen up
cmd="adb -s 127.0.0.1:62001 shell input swipe 310 650 310 200"
# towards adb dispatch orders : Click on the screen
cmd_point="adb -s 127.0.0.1:62001 shell input tap 310 310"
# loop 1000 Time
for i in range(1000):
index = random.sample(range(5,15),10)
print(index)
res=subprocess.run(cmd,shell=True)
res_point=subprocess.run(cmd_point,shell=True)
time.sleep(index[0])
print(res)
print("------------------------------")
res=int(str(res).replace(")","").split("=")[-1])
print(res)
print("------------------------------")
if res!=0:
connect()
# Pause 5 second
time.sleep(5)
print(" The first %d A video "%i)
if __name__=="__main__":
move_up()
In addition, the author also wrote a windows Script files 1.bat, We need to pay attention to , Below adb Indicates that you are local adb.exe In the directory ,a1.py Means the above python Script path , Please make sure the input is correct , If you can't find a file or something , There should be a problem with the file path .
cd adb :: Get into d disc adb Catalog
python a1.py :: function python Script
The source code and related programs of this project have been opened to the public GitHub,
2.6 Run script program
Copy the source code to D disc , Turn on the night God Simulator , Running multiple simulators , Landing Kwai speed Extreme Edition .
Run the code inside 1.bat , All right. , Now the computer will automatically start watching and brushing videos , We minimize the window , Playing games , Watch the movie ...
Running effect :
边栏推荐
- LeetCode 40. 组合总和 II
- STC8H8K系列汇编和C51实战——数码管显示ADC、按键串口回复按键号与ADC数值
- Compte à rebours de 3 jours pour l'inscription à l'accélérateur de démarrage Google Sea, Guide de démarrage collecté à l'avance!
- Contest3147 - game 38 of 2021 Freshmen's personal training match_ 1: Maximum palindromes
- 官方零基础入门 Jetpack Compose 的中文课程来啦!
- Linkage between esp8266 and stc8h8k single chip microcomputer - Weather Clock
- 神机百炼3.53-Kruskal
- STC8H8K系列汇编和C51实战——串口发送菜单界面选择不同功能
- Zabbix Server trapper 命令注入漏洞 (CVE-2017-2824)
- Linear DP (split)
猜你喜欢
ROS2----LifecycleNode生命周期节点总结
The official zero foundation introduction jetpack compose Chinese course is coming!
深入学习JVM底层(四):类文件结构
Let every developer use machine learning technology
LeetCode 78. subset
Spark overview
WLAN相关知识点总结
Zhuanzhuanben - LAN construction - Notes
Problems encountered in uni app development (continuous update)
51单片机——ADC讲解(A/D转换、D/A转换)
随机推荐
Unity Shader 学习笔记(3)URP渲染管线带阴影PBR-Shader模板(ASE优化版本)
Stc8h8k series assembly and C51 actual combat - serial port sending menu interface to select different functions
亚马逊aws数据湖工作之坑1
经典文献阅读之--SuMa++
复杂 json数据 js前台解析 详细步骤《案例:一》
Browser principle mind map
LeetCode 90. Subset II
51 single chip microcomputer - ADC explanation (a/d conversion, d/a conversion)
Leverage Google cloud infrastructure and landing area to build enterprise level cloud native excellent operation capability
Contest3147 - game 38 of 2021 Freshmen's personal training match_ E: Listen to songs and know music
穀歌出海創業加速器報名倒計時 3 天,創業人闖關指南提前收藏!
Lambda 表达式 和 方法引用
Mathematical statistics and machine learning
Detailed explanation of BGP message
加密压缩文件解密技巧
STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
Ti millimeter wave radar learning (I)
No subject alternative DNS name matching updates. jenkins. IO found, the reason for the error and how to solve it
Detailed steps of JS foreground parsing of complex JSON data "case: I"
LeetCode 78. 子集