explaingit

g1879/drissionpage

11,943PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

DrissionPage is a Python library that lets you mix browser automation and direct HTTP requests in one script, using its own browser communication layer instead of WebDriver for faster setup and no driver version matching.

Mindmap

mindmap
  root((DrissionPage))
    What it does
      Browser automation
      HTTP requests
      Mixed mode scripts
    Features
      Multi-tab control
      Full-page screenshots
      Session attachment
      iframe search
    Tech Stack
      Python
      Chromium
    Use Cases
      Web scraping
      UI automation
      Data extraction
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Scrape JavaScript-heavy websites by mixing fast HTTP requests for static pages and browser automation for interactive sections in one script.

USE CASE 2

Automate multi-tab browser workflows without switching context between tabs.

USE CASE 3

Take full-page screenshots of web pages including content that extends beyond the visible viewport.

USE CASE 4

Attach to an already-open browser session during development to avoid restarting the browser on every code change.

Tech stack

PythonChromium

Getting it running

Difficulty · easy Time to first run · 30min

README and official documentation are written in Chinese, commercial use requires authorization from the author.

Personal, non-commercial use and study only, commercial use requires separate written authorization from the author.

In plain English

DrissionPage is a Python library for automating web browsers and making HTTP requests, with the option to combine both in a single script. Most web automation tools force you to choose between controlling a real browser (useful for pages that load content with JavaScript) and sending direct HTTP requests (faster but limited to static content). DrissionPage lets you mix these two approaches, so you can send a quick request to fetch data, then switch to browser control to handle a page that needs interaction, all within the same code. The library uses its own browser communication layer rather than WebDriver, which is the underlying standard most other Python browser automation tools rely on. According to the README, this means you do not need to download a matching driver for each browser version, and it runs faster. Other practical differences include the ability to search for elements across iframes without switching context, control multiple browser tabs at the same time without switching between them, save images directly from the browser cache, and take full-page screenshots that include content outside the visible area. It supports Chromium-based browsers such as Chrome and Edge, as well as Electron apps. The library works on Windows, Linux, and Mac and requires Python 3.6 or higher. Configuration is stored in an ini file so you do not need to repeat setup code on every run, and the library can attach to an already-open browser session rather than always starting fresh, which helps during development. The README is written in Chinese and points to an official documentation site for usage details and code examples. The license terms allow personal, non-commercial use and study, but prohibit commercial use without separate authorization from the author. The author also prohibits using the tool for scraping data that violates a site's robots rules or for activities that could harm others.

Copy-paste prompts

Prompt 1
Write a DrissionPage Python script that fetches a static page via HTTP request, then switches to browser mode to interact with a JavaScript-rendered section of the same site.
Prompt 2
Show me how to use DrissionPage to control multiple browser tabs at the same time without switching context between them.
Prompt 3
Using DrissionPage, write code to take a full-page screenshot of a webpage including content that is scrolled off-screen.
Prompt 4
How do I configure DrissionPage's ini file to attach to an already-running Chrome browser session instead of always starting a fresh one?
Open on GitHub → Explain another repo

← g1879 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.