Browser automation launcher
Project description
browser-automation-launcher
浏览器自动化启动器. 与 DrissionPage 配合使用, 实现浏览器自动化的启动和关闭.
主要功能
- 自动启动浏览器并设置浏览器参数, 例如调试端口号等 (需要指定 Chrome 浏览器的路径)
- 通过端口号接管当前已打开的 Chrome 浏览器 (只能接管通过调试模式打开的浏览器)
- 自动创建或加载浏览器用户数据目录
安装
pip install browser-automation-launcher
使用方法
from BrowserAutomationLauncher import BrowserInitOptions, Launcher
launcher = Launcher()
init_options = BrowserInitOptions()
init_options.set_basic_options(
browser_path=r'C:\Program Files\Google\Chrome\Application\chrome.exe'
)
# 设置浏览器窗口大小 (可选)
init_options.set_window_loc(width=1400, height=900, x=20, y=20)
browser = launcher.init_browser(init_options)
page = browser.chromium.latest_tab
page.get('https://www.baidu.com')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file browser_automation_launcher-1.0.5.tar.gz.
File metadata
- Download URL: browser_automation_launcher-1.0.5.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d2afbfa04ee0fe9b82d58596b305edeb14415fd11ea0c1fa9f8dbb55c380bd1
|
|
| MD5 |
22f67c5811a932a0e5f31111ac0a940e
|
|
| BLAKE2b-256 |
c32f7b52fafc817cd39b897c373ff14c50515062a99ac2a9bda762902bac945e
|
File details
Details for the file browser_automation_launcher-1.0.5-py3-none-any.whl.
File metadata
- Download URL: browser_automation_launcher-1.0.5-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48a2549672a53fe270433af6154c9c668fefd6f173c67bb54929387c0db93289
|
|
| MD5 |
41fa7eb4261c73eaac5be07cb0f600a9
|
|
| BLAKE2b-256 |
7e6e1ebe93f77d836d83ae91e80565677d81ab6d3ef78d4125b0d38d789837bd
|