当前位置:网站首页>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 :
边栏推荐
- Data playback partner rviz+plotjuggler
- 数据回放伴侣Rviz+plotjuggler
- ES6的详细注解
- STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
- Web page user step-by-step operation guide plug-in driver js
- Unity shader learning notes (3) URP rendering pipeline shaded PBR shader template (ASE optimized version)
- 外部中断无法进入,删代码再还原就好......记录这个想不到的bug
- 利用传统方法(N-gram,HMM等)、神经网络方法(CNN,LSTM等)和预训练方法(Bert等)的中文分词任务实现
- 在uni-app中引入uView
- Zhuanzhuanben - LAN construction - Notes
猜你喜欢
WLAN相关知识点总结
Deep learning classification network -- vggnet
Redis Key-Value数据库【初级】
从设计交付到开发,轻松畅快高效率!
Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
500. Keyboard line
Invalid operation: Load into table ‘sources_ orderdata‘ failed. Check ‘stl_ load_ errors‘ system table
Flutter hybrid development: develop a simple quick start framework | developers say · dtalk
Unity Shader 学习笔记(3)URP渲染管线带阴影PBR-Shader模板(ASE优化版本)
51 single chip microcomputer - ADC explanation (a/d conversion, d/a conversion)
随机推荐
深入学习JVM底层(四):类文件结构
LeetCode 40. 组合总和 II
Mock simulate the background return data with mockjs
sudo提权
Cookie plugin and localforce offline storage plugin
Lambda expressions and method references
Style modification of Mui bottom navigation
Regular expression summary
LeetCode 27. 移除元素
VRRP之监视上行链路
Flutter 混合开发: 开发一个简单的快速启动框架 | 开发者说·DTalk
Scheme and implementation of automatic renewal of token expiration
LeetCode 78. subset
Contest3147 - game 38 of 2021 Freshmen's personal training match_ F: Polyhedral dice
LeetCode 39. 组合总和
Spark overview
JWT tool class
BGP报文详细解释
Google Play Academy 组队 PK 赛,正式开赛!
Go 学习笔记整合