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
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 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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 879afc414d197d5306f115dbd6aaa081f5a91f4b4e50edc381207c69d7c8ca34 |
|
MD5 | 42678fa1216ebc068e9ed298d033b2ca |
|
BLAKE2b-256 | d69f51ad1fc1d20c23244275bd8346d2eab28432f27daa2dc016f9fca9578ec9 |
Close
Hashes for google_colab_selenium-1.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da2d76bee34390f22eedba7d8affd94abc3883a1032e1adc3ee305c31553ac0 |
|
MD5 | f8795c147a342f46494f6fff0ac01ef5 |
|
BLAKE2b-256 | 30f6e7e2f452ea05a7ec08a096c6db1f5993437663042b9078883719ad738599 |