Skip to main content

A utility for launching browsers with specific profiles, URLs, and incognito mode from Python or the command line.

Project description

browser_launcher

A utility for launching browsers (Chrome, Firefox, and alternatives) with specific profiles, URLs, and incognito/private mode from Python or the command line.

Features

  • Launch Chrome or Firefox with a specific user profile and URL
  • Support for incognito/private mode
  • List available browser profiles
  • List available browsers (including alternatives like Edge, Opera, Brave, etc.)
  • Simple command-line interface (CLI)
  • Usable as a Python library

Installation

pip install browser_launcher

Or install from source:

git clone https://github.com/mexyusef/browser_launcher.git
cd browser_launcher
pip install .

Usage

Command Line

List Chrome profiles:

browser-launcher list-profiles --browser chrome

List Firefox profiles:

browser-launcher list-profiles --browser firefox

List all available browsers:

browser-launcher list-browsers

Launch Firefox with a specific profile and URL (incognito):

browser-launcher launch --browser firefox --profile myprofile --url https://gmail.com --incognito

Launch Chrome with a specific profile and URL:

browser-launcher launch --browser chrome --profile "Profile 1" --url https://example.com

Python Library

from browser_launcher.profile_manager import BrowserProfileManager, LaunchOptions

mgr = BrowserProfileManager()
options = LaunchOptions(incognito=True)
mgr.launch_browser(
    browser_type="firefox",
    profile="myprofile",
    url="https://gmail.com",
    options=options
)

License

MIT License. See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browser_launcher-0.0.1.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browser_launcher-0.0.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file browser_launcher-0.0.1.tar.gz.

File metadata

  • Download URL: browser_launcher-0.0.1.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for browser_launcher-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e288c4e0dcaeb2146e57bd29a69556498fe44a1f1e3b6b87e610427a89fa2b02
MD5 e21d28ff9eb2c6254f8c87cf12d77727
BLAKE2b-256 66182965f8632c52788d2b9fa4cf9ac608c4fa7b873b11c69ea79dd497a1721d

See more details on using hashes here.

File details

Details for the file browser_launcher-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for browser_launcher-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abe493933826eccf546e56f523a99e5718662cf6858937da9d56c3c7e6dd8cb7
MD5 6ffb65c73bf4a8e776fe21a53a211a92
BLAKE2b-256 ccbc540ce87ae0c35c14b3cebd5587a2452d57a3edcdc025470fc5abd05d2755

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page