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.
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.
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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | da20caffdef185615da7603191526c9d1c30d0b60b9f81acae8f3db77ae77370 |
|
MD5 | 96c7ad2cc870fcfdbb885a1d4466e0b9 |
|
BLAKE2b-256 | 8cfdac6b668b3ac30bf8cd6d33e17e233d4955cb1cb557b78fbc1c8af3a4841c |
Close
Hashes for google_colab_selenium-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e04c8e025c5f5ee3722ffc9318c62b9b6905374a43a5250f43220f425ab893 |
|
MD5 | f049750f0ee6feacc1a1dd5eb623cff1 |
|
BLAKE2b-256 | 2d515bf3e0b1712ab46ee01ade41c1cea41e0aa7a0dc3187de1e7f6aff9dc153 |