Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the techniques for speeding up the running of Python code

Shulou Source: shulou.com Published: 2022-06-01 20:02:37 10月03日 Update

This article mainly explains "what are the skills for speeding up the running of Python code". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the skills for accelerating the running of Python code?"

Need to install:

1.JDK-Download JDK,Appium requires that the user must configure the JAVA environment, or start the Seesion error.

2.Appium-Download Appium, please search the installation process by yourself.

3.Android SDK-Download SDK

4. Selenium-A lower version of the Python Selenium library is recommended, and errors may be reported in the higher version of Chrome.

5. Chromedriver.exe-Download Chromedriver, make sure the versions match, and then place the .exe program in the directory ".. Python\ Python36\ Scripts".

6. Pymongo

7. MongoDB Server-Download MongoDB

Crawl train of thought

Crawl ideas:

Simulated login

Grasping dynamics

Save data

Installation and configuration of Android SDK

Open Android Studio, select "Configure- > SDK Manager- > Apperance&Behavior- > System Settings- > Android SDK", and select the SDK corresponding to the Android version. In addition, you also need to add the path where the SDK is located to the system environment variable, otherwise an error will be reported.

Desired Capabilites parameter

They are: platfornName, deviceName, appPackage, appActivity. The first two can be obtained from the following command, as long as you connect the phone and open USB for debugging:

For the text input box, just click "send text" on the far right.

"whether to match the address book"

Select "No" here, reason: after logging in to Wechat, local data will be loaded automatically, which takes a long time. If you match your friends in the address book, it will take more time, and you may not be able to get the node within the TIMEOUT time, resulting in the termination of the program. I chose "yes" here, as shown in the picture:

Date processing

The implementation of date processing is as follows:

Note:

All nodes in the code must be obtained in advance through the new Session created by Appium (the vivo_x7 and Mi_8 nodes in the same version of Wechat are the same, the rest of the models are unknown)

It is recommended to use high-performance mobile phone testing (MI_8 | MI_9, etc.)

Thank you for your reading, the above is "what are the skills for accelerating the running of Python code?" after the study of this article, I believe you have a deeper understanding of the skills of accelerated running of Python code, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Code version skill run selection idea node learning content suggestion mobile phone data date environment program communication address book processing login configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Redmi OPPO Reno Shulou Technology macOS