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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a9b9d5f1f0a52538e5479fa03c124dd7c3d3bafb2faec83184f4c76b0ea60a1 |
|
MD5 | 0954c6f68adef593885b0f5a661eea0c |
|
BLAKE2b-256 | eaca7c62ceaaf56a5533053392aec6961c88f8de6cc5c79b2b28fcad965c50a2 |
Close
Hashes for google_colab_selenium-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74f20993b18feb04f56dddcb9185237c563be4f706765abe01be4c561e15af40 |
|
MD5 | 64b80511e9a99ae48e16dd640c822cdc |
|
BLAKE2b-256 | 4b609a4ddbe4e4c674d907fe44581d872436925204ff20f1bdaf96068f5401a3 |