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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a808fa97882a5391fd6b8829544a10cc6f3d1b0901c51fc11669e86573486e |
|
MD5 | bbbd121698d6d711496462480ed3ec9d |
|
BLAKE2b-256 | 513436406e7a90603fc5efe4b98f715d20fd5bf7c50a5d4b49b5891f885de25c |
Close
Hashes for google_colab_selenium-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b58ddd0440c7933e247e6e5ba8b593ad4e2237a67916ccf07d81494bdc9b3f9 |
|
MD5 | c7c435273f85006ee1acde66e125b509 |
|
BLAKE2b-256 | fda51a6d9783c51c3fb196e6ae3baf91f3558a5ca83e0b9832d9ed5d4eb910d9 |