DrissionPage README

The project's README from github.com/g1879/DrissionPage. As one markdown file: README.md.

✨️ 概述

DrissionPage 是一个基于 python 的网页自动化工具。

它既能控制浏览器,也能收发数据包,还能把两者合而为一。

可兼顾浏览器自动化的便利性和 requests 的高效率。

它功能强大,内置无数人性化设计和便捷功能。

它的语法简洁而优雅,代码量少,对新手友好。

官方网站:https://DrissionPage.cn

项目地址:gitee | github | gitcode

您的星星是对我最大的支持💖


IPWO 提供全球多个地区的住宅代理 IP,为网页自动化和数据采集项目提供代理网络选择。
对于使用 DrissionPage 的开发者,可根据任务需求配置不同地区的代理,用于网页访问、跨境数据采集、市场调研及自动化测试等场景。
NextProxy 是面向开发者与企业的全球优质代理服务商,拥有 1 亿+高纯度住宅 IP,出口来自真实家庭网络,支持国家、州省及城市级定位。独立出口配合指纹隔离,可降低账号关联与风控概率,适用于跨境电商、社媒运营、广告验证和数据采集。
MangoProxy is a Residential, ISP, Mobile, and Datacenter proxy service designed for professional tasks where stability, speed, and anonymity matter.
DRISSION - 8% off Static ISP Proxies
SX.org 完美适用于数据爬取、自动化与程序开发,保障连接稳定与安全。所有新用户均可享受 3GB 免费试用。提供 24/7 全天候技术支持。

💡 理念

简洁而强大!


☀️ 特性和亮点

作者经过长期实践,踩过无数坑,总结出的经验全写到这个库里了。

🎇 强大的自研内核

本库采用全自研的内核,内置无数实用功能,对常用功能作了整合和优化,对比 selenium,有以下优点:

🎇 亮点功能

除了以上优点,本库还内置了无数人性化设计。


📝 使用条款

允许任何人以个人身份使用或分发本项目源代码,但仅限于学习和合法非盈利目的。 个人或组织如未获得版权持有人授权,不得将本项目以源代码或二进制形式用于商业行为。

使用本项目需满足以下条款,如使用过程中出现违反任意一项条款的情形,授权自动失效。

使用DrissionPage发生的一切行为均由使用人自行负责。 因使用DrissionPage进行任何行为所产生的一切纠纷及后果均与版权持有人无关, 版权持有人不承担任何使用DrissionPage带来的风险和损失。 版权持有人不对DrissionPage可能存在的缺陷导致的任何损失负任何责任。


☕ 请我喝咖啡

作者是个人开发者,开发和写文档工作量较为繁重。

如果本项目对您有所帮助,不妨打赏一下作者 :)

DrissionPage (g1879/DrissionPage)

Searching Database…

What is this?DrissionPage is a Python web automation tool that can control a browser, send and receive raw HTTP packets, or combine both in one workflow, giving you browser automation convenience together with requests-level efficiency.
Is it a replacement for Selenium, or something else?It is a library you import in Python scripts. It uses its own self-developed engine instead of WebDriver, so it does not need browser-specific driver downloads and runs faster than Selenium.
How do I add it to a project?Install it as a Python package and import it in your script to start controlling a browser or sending packets; configuration is handled through an ini file that DrissionPage reads automatically.
Do I need a special browser driver installed first?No, since it does not rely on WebDriver you skip downloading matching driver binaries for different browser versions; it ships lxml built-in for fast HTML parsing.
Can I use this for any scraping project I want?No, the terms of use restrict it to personal, non-commercial, legal learning purposes, forbid use that violates robots.txt, harms others, or involves harassment, and commercial use requires authorization from the copyright holder.
Who is this aimed at?It targets Python developers doing web scraping and automation, including beginners, since the author designed its syntax to be concise and friendly to newcomers.
Does it work on Linux and Mac, or just Windows?It is a cross-platform Python library and is tagged for Linux, macOS, and Windows.
Can it work across multiple iframes or tabs without switching context?Yes, it treats iframes as regular elements so you can locate elements across iframes without switching in and out, and it can operate multiple tabs simultaneously without switching between them.
Can it take a full-page screenshot, including content outside the viewport?Yes, it supports screenshotting the entire webpage, including parts outside the visible viewport.
Can it reuse a browser I already have open instead of launching a new one each run?Yes, it allows reusing an already-open browser so you do not need to restart the browser from scratch every run, which makes debugging more convenient.
Why did the author build a custom engine instead of just wrapping Selenium?The author wanted to avoid WebDriver's overhead (driver version mismatches, slower speed) and bake in many convenience features like built-in waits/retries, simplified element location syntax, and direct cache-based image saving, resulting in a more stable and elegant library.
Creator
g1879
Size
3.8 MB
Stars
12.5K
Age
6y
Commits · 90 Days