Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report