DrissionPage can now set English error and prompt messages: Set Language
DrissionPage is a Python-based web automation tool.
It can control the browser, send and receive packets, and combine the two.
You can balance the convenience of browser automation with the efficiency of requests.
It is powerful, built-in countless user-friendly design and convenient features.
Its syntax is simple and elegant, the code is small, and it is friendly to beginners.
WebSite: https://DrissionPage.cn
Project: gitee | github | gitcode
Your stars are my greatest support.💖
Support system: Windows、Linux、Mac
Python version:more than 3.6
Support browser: Chromium kernel(eg. Chrome, Edge),electron
📖 Document: Click to see
Simple and powerful!
This library uses a fully self-developed kernel with numerous built-in practical functions, and integrates and optimizes common functions. Compared with selenium, it has the following advantages:
- Not based on webdriver
- No need to download different drivers for different versions of browsers
- Run faster
- Elements can be found across iframe without cutting in and out
- Think of the iframe as a normal element for clearer logic
- Can operate multiple tabs at the same time without switching
- Can directly read the browser cache to save the image, no need to use the GUI click save
- Can take a screenshot of the entire web page, including the parts outside the viewport
- Can handle shadow-root in non-open state
In addition to the above advantages, the library also has numerous built-in user-friendly designs.
- Minimal positioning syntax, easier to find elements
- Integrate a large number of common functions, the code is more elegant, powerful and stable
- Ubiquitous waiting and automatic retries make unstable networks easier to control, programs more stable, and writing easier
- Provide powerful download tools, operating the browser can also enjoy fast and reliable download function
- Allows repeated use of an already open browser, without having to start the browser from scratch every time you run, easy debugging
- Use the ini file to save common configurations and automatically invoke them, providing convenient Settings and avoiding complicated configuration items
- Built-in lxml as a parsing engine, the parsing speed is improved by several orders of magnitude
- Packaged with POM mode, it can be used directly for testing and easy to expand
- Highly integrated convenience features, reflected in every detail
- There are many details, not listed here, welcome to practical use experience: D
Anyone is permitted to use or distribute the source code of the Project in their personal capacity, but only for learning and legitimate non-profit purposes. Individuals or organizations may not use this project in source code or binary form for commercial purposes without the authorization of the copyright holder.
Use of this project must meet the following terms, if any of the terms are violated during use, the authorization will automatically expire.
- DrissionPage is prohibited from being used in any project that may violate local legal and ethical requirements
- Use of DrissionPage in any project that may harm the interests of others is prohibited
- Use of DrissionPage for assault and harassment is prohibited
- Comply with the Robots protocol and prohibit the use of DrissionPage to collect data that is not permitted by law or system Robots protocol
All actions that occur while using DrissionPage are the user's own responsibility. All disputes and consequences arising out of any use of DrissionPage are independent of the copyright holder, The copyright holder does not assume any risk or loss arising from the use of DrissionPage. The copyright holder shall not be liable for any loss resulting from possible defects in DrissionPage.
The author is an individual developer, and the workload of developing and writing documentation is relatively heavy.
If this project was helpful to you, please give a tip to the author:)