Easily use Selenium in Google Colab Notebooks!
Project description
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.
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.
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
Built Distribution
Close
Hashes for google_colab_selenium-1.0.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d81eb42ffcfdfe49040fd63b6ce5b11265fe6ca05eef16e2d29fa018d7230f3 |
|
MD5 | eb484ee449120dc4c76d078e8d8623fe |
|
BLAKE2b-256 | 0cc69d43ac85764c79dabda1ba22ca41c8779e2fff200feb1f295de6ec808023 |
Close
Hashes for google_colab_selenium-1.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0b6e6b10fe41a62411a95e6f0e6043bbfe2ddde2d39367db2c87e36dd328212 |
|
MD5 | 511275d53f124d4c317d17d5a23a82d6 |
|
BLAKE2b-256 | f1405f78d9136b89b44080d3d107875188ccfd39f374fba495216ecf43fb949e |