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

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.5.tar.gz (5.7 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.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: google-colab-selenium-1.0.5.tar.gz
  • Upload date:
  • Size: 5.7 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.5.tar.gz
Algorithm Hash digest
SHA256 b0a808fa97882a5391fd6b8829544a10cc6f3d1b0901c51fc11669e86573486e
MD5 bbbd121698d6d711496462480ed3ec9d
BLAKE2b-256 513436406e7a90603fc5efe4b98f715d20fd5bf7c50a5d4b49b5891f885de25c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_colab_selenium-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2b58ddd0440c7933e247e6e5ba8b593ad4e2237a67916ccf07d81494bdc9b3f9
MD5 c7c435273f85006ee1acde66e125b509
BLAKE2b-256 fda51a6d9783c51c3fb196e6ae3baf91f3558a5ca83e0b9832d9ed5d4eb910d9

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