Skip to main content

The best way to use Selenium in Google Colab Notebooks!

  • Simple setup of Selenium and ChromeDriver.
  • Seamless integration with Google Colab.
  • Supports 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

import google_colab_selenium as gs

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

Undetected ChromeDriver

import google_colab_selenium as gs

driver = gs.UndetectedChrome()
# 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
import google_colab_selenium as gs

custom_options = Options()
# Add your custom options here

driver = gs.Chrome(options=custom_options)

Contributing

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



Test it out for yourself!

Open In Colab

Release files for google-colab-selenium 1.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-colab-selenium 1.0.18
File Size Uploaded
google_colab_selenium-1.0.18.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-colab-selenium 1.0.18
File Interpreter ABI Platform
google_colab_selenium-1.0.18-py3-none-any.whl Python 3 none any Details

Total release size:17.8 kB

Release files / google_colab_selenium-1.0.18.tar.gz

Download URL google_colab_selenium-1.0.18.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a807626667613dfe72b07b5569da2d2f96e3bd3d259984cde225394b9059333e
BLAKE2b-256 checksum
How to use checksums
9444ccadd66c7d322e813f4dbe27463b5005f6cc5e109b398b31f3421de31793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release files / google_colab_selenium-1.0.18-py3-none-any.whl

Download URL google_colab_selenium-1.0.18-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa0288162cb97c1c33d263cb29b73201c077733670663f883f2ae5f581ea06c7
BLAKE2b-256 checksum
How to use checksums
65d6d9f611a36dd48bab085b5de1103985d9e52c4d3f951d4c232458ee21c7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release history Release notifications | RSS feed

This release

1.0.18 This release

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page