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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b976f65962e36a2f837febde8ec03e44222460f0716cfa3263127bf327414033 |
|
MD5 | cc31d0fe4400c3048a3d0f634092f45e |
|
BLAKE2b-256 | 59a1fbdf28526f000e626413a0fb681df871dd57c9fb0c83a1dc852de4937fb9 |
Close
Hashes for google_colab_selenium-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4f1909c3c3f623aec4b1b28fb349b8f647a029dd3178be22524f7eccdea95ad |
|
MD5 | 53994472ced47fc1728d10da8da13b17 |
|
BLAKE2b-256 | 21b5165fa8005905e15da0a8e1fd90ea40cb8422ba4422a7dfb073f5bda9dd62 |