In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Last time, I mounted the python file on the virtual machine, this time mainly set the way the virtual machine passes through the docker container.
Running
Python code running
Start a crt session
Docker run-it-v / root/docker:/root-- name python zhugeaming/python3-appium
Operation of mitmdump
Start a crt session, which can be distinguished by renaming session.
Docker run-- rm-it-v / root/docker:/root/-p 8889 root/docker:/root/ 8889-- name mitmdump zhugeaming/python3-appium mitmdump-p 8889-s / root/decode_data.py
Operation of appium
> starting a session of crt can be distinguished by renaming session. Here, you need to start three because we monitor the code of three app. Before I demonstrated whether to start multiple appium client services, here is through the container way to start 3 containers.
Docker run-- privileged-d-p 4723 name appium_douyin appium/appiumdocker run-- privileged-d-p 4725 docker run 4723-- name appium_kuaishou appium/appiumdocker run-- privileged-d-p 4727 purse 4723-- name appium_jrtt appium/appium
The setting of Night God Simulator
1. Set the network bridging mode
two。 The certificate of mitmdump inside the container needs to be installed
Certificate installation was introduced in the previous introduction to mitmproxy.
3. After setting up one, you can copy the functions of the simulator
4. Set up the local adb devices and convert it to tcp.
Adb connect 127.0.0.1:62001adb connect 127.0.0.1:62025adb connect 127.0.0.1:62026adb devicesadb-s 127.0.0.1 tcpip 5555adb 62001 tcpip 5555adb-s 127.0.0.1 tcpip 5555adb-s 127.0.1 tcpip 5555
Appium setting connection of the container
> 192.168.199.122 is the ip- Douyin of Night God Simulator.
> 192.168.199.117 is the ip- Kuaishou of Night God Simulator.
> 192.168.199.173 is the ip- of Night God Simulator Jinri Toutiao
Docker exec-it appium_douyin adb connect 192.168.199.122:5555docker exec-it appium_kuaishou adb connect 192.168.199.117:5555docker exec-it appium_jrtt adb connect 192.168.199.173it appium_kuaishou adb connect 192.168.199.117:5555docker exec 555 what if ip is misspelled? What to do if the mount is wrong # docker exec-it container name adb kill- server````! [] (modification of the python code of https://upload-images.jianshu.io/upload_images/11223715-fb9572508a1eeafb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)* handle_appium_docker.py > direct local modification, the mount code will also be changed. ! [] (the ip of the host of https://upload-images.jianshu.io/upload_images/11223715-233b196366015f20.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)> docker should also be modified in the python code to change it to the ip of the connected linux host! [] (the page xpath in https://upload-images.jianshu.io/upload_images/11223715-985aa964f84cb4f7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)> also needs to be manually modified. According to the actual situation, I will write / / android directly here. Through uiautomatorviewer.jar! [] (modification of the python code of https://upload-images.jianshu.io/upload_images/11223715-b134b601f5607bdd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)* handle_mongo.py! [] (https://upload-images.jianshu.io/upload_images/11223715-ff494634f717b607.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)#### these settings can basically be carried out. Grab our data > where to execute the code directly in python. ```pythonpython handle_appium_docker.py
Mongodb's data.
PS: computers with relatively high i7 cpu,16g memory, solid-state hard drives, try to use the real machine, if it is a real 8g run is also very 666, the enterprise still uses a real mobile phone to run. Here comprehensive actual combat, from the use of appium, the use of mobile, the use of mitmdump, are integrated together. Encounter problems in fact, Baidu and Google have similar problems, many parts of the article are references: https://github.com/appium/appium-docker-android, the largest male × × friends website is very powerful.
The original article is welcome to reprint. Reprint please indicate: reproduced from IT Story Association, thank you!
> > original link address: "docker practical articles" python's docker- to create a multi-tasking app application data capture system (part two) (35)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.