Python library for detecting and launching browsers
Project description
License | Version | ||
Github Actions | Coverage | ||
Supported versions | Wheel | ||
Status | Downloads |
browsers
Python library for detecting and launching browsers
I recently wrote a snippet for detecting installed browsers in an OSX machine in https://github.com/mitmproxy/mitmproxy/issues/5247#issuecomment-1095337723 based on https://github.com/httptoolkit/browser-launcher and I thought this could be useful to other devs since I cannot seem to find an equivalent library in Python
Installation
pip install pybrowsers
Usage
Python
>>> import browsers
>>> browsers.get("chrome")
{'path': '/Applications/Google Chrome.app', 'display_name': 'Google Chrome', 'version': '100.0.4896.88'}
>>> browsers.launch("chrome", url="https://github.com/roniemartinez/browsers")
TODO:
- Detect browser on OSX
- Detect browser on Linux
- Detect browser on Windows
- Launch browser with arguments
- Get browser by version (support wildcards)
References
- httptoolkit/browser-launcher
- Desktop Entry Specification
- Github: webbrowser.open incomplete on Windows
- Stackoverflow: Grabbing full file version of an exe in Python
Author
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
pybrowsers-0.1.0a5.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for pybrowsers-0.1.0a5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5465a5776514985fdfaf6f2f47ba1f9a4898c4d468d16da1ad5c9dbe6eb2a2 |
|
MD5 | 3064ec251ceb32263f930537b8633868 |
|
BLAKE2b-256 | 8a9fb46ac5554517fd1a6aa5085ffb9e82a0e8cda5ba7903699a87562e259fb4 |