当前位置:网站首页>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.zipAfter 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 :

边栏推荐
- Redis key value database [seckill]
- Stc8h8k Series Assembly and c51 Real combat - NIXIE TUBE displays ADC, Key Series port reply Key number and ADC value
- LeetCode 83. 删除排序链表中的重复元素
- BGP 路由優選規則和通告原則
- ESP8266与STC8H8K单片机联动——天气时钟
- CNN visualization technology -- detailed explanation of cam & grad cam and concise implementation of pytorch
- 穀歌出海創業加速器報名倒計時 3 天,創業人闖關指南提前收藏!
- 经典文献阅读之--SuMa++
- No subject alternative DNS name matching updates. jenkins. IO found, the reason for the error and how to solve it
- BGP 路由优选规则和通告原则
猜你喜欢

步骤详解 | 助您轻松提交 Google Play 数据安全表单

State machine in BGP

Regular expression summary

From design delivery to development, easy and efficient!

Contest3147 - game 38 of 2021 Freshmen's personal training match_ G: Flower bed

经典文献阅读之--Deformable DETR

Deep learning classification network -- alexnet

线性dp(拆分篇)

Contest3147 - game 38 of 2021 Freshmen's personal training match_ A: chicken

Reading classic literature -- Suma++
随机推荐
Frequently asked questions about jetpack compose and material you
State machine in BGP
穀歌出海創業加速器報名倒計時 3 天,創業人闖關指南提前收藏!
Web page user step-by-step operation guide plug-in driver js
BGP中的状态机
Introduce uview into uni app
深入了解JUC并发(一)什么是JUC
Little bear sect manual query and ADC in-depth study
LeetCode 77. combination
Eco express micro engine system has supported one click deployment to cloud hosting
[C language] screening method for prime numbers
Redis key value database [advanced]
Scheme and implementation of automatic renewal of token expiration
Invalid operation: Load into table ‘sources_ orderdata‘ failed. Check ‘stl_ load_ errors‘ system table
Detailed notes of ES6
Go learning notes integration
51单片机——ADC讲解(A/D转换、D/A转换)
Replace Django database with MySQL (attributeerror: 'STR' object has no attribute 'decode')
Deep learning classification network -- Network in network
Redis key value database [primary]