Skip to main content

Easily use Selenium in Google Colab Notebooks!

Project description

Google-Colab-Selenium

The best way to use Selenium in Google Colab Notebooks!

  • Simple setup of Selenium and ChromeDriver.
  • Seamless integration with Google Colab.
  • Support for undetected ChromeDriver for more advanced use cases.

Open In Colab

Installation

Basic usage:

%pip install google-colab-selenium

Use undetected-chromedriver version:

%pip install google-colab-selenium[undetected]

Basic Usage

from google_colab_selenium import ChromeDriver

driver = ChromeDriver()
# Your code to interact with the driver here
# ...
driver.quit()

Undetected ChromeDriver

from google_colab_selenium import UndetectedChromeDriver

driver = UndetectedChromeDriver()
# Your code to interact with the driver here
# ...
driver.quit()

Default Options

The google-colab-selenium package is preconfigured with a set of default options optimized for Google Colab environments. These defaults include:

  • --headless: Runs Chrome in headless mode (without a GUI).
  • --no-sandbox: Disables the Chrome sandboxing feature, necessary in the Colab environment.
  • --disable-dev-shm-usage: Prevents issues with limited shared memory in Docker containers.
  • --lang=en: Sets the language to English.

You are welcome to extend or override these options based on your needs:

from selenium.webdriver.chrome.options import Options
from google_colab_selenium import ChromeDriver

custom_options = Options()
# Add your custom options here
# custom_options.add_argument("--your-option")

driver = ChromeDriver(options=custom_options)

Contributing

Contributions are welcome! If you have a suggestion or an issue, please use the issue tracker to let us know.

You can also contact me here.


Open In Colab

logo

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

google-colab-selenium-1.0.9.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

google_colab_selenium-1.0.9-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file google-colab-selenium-1.0.9.tar.gz.

File metadata

  • Download URL: google-colab-selenium-1.0.9.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for google-colab-selenium-1.0.9.tar.gz
Algorithm Hash digest
SHA256 da20caffdef185615da7603191526c9d1c30d0b60b9f81acae8f3db77ae77370
MD5 96c7ad2cc870fcfdbb885a1d4466e0b9
BLAKE2b-256 8cfdac6b668b3ac30bf8cd6d33e17e233d4955cb1cb557b78fbc1c8af3a4841c

See more details on using hashes here.

File details

Details for the file google_colab_selenium-1.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for google_colab_selenium-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 80e04c8e025c5f5ee3722ffc9318c62b9b6905374a43a5250f43220f425ab893
MD5 f049750f0ee6feacc1a1dd5eb623cff1
BLAKE2b-256 2d515bf3e0b1712ab46ee01ade41c1cea41e0aa7a0dc3187de1e7f6aff9dc153

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