Easily use Selenium in Google Colab Notebooks!
Project description
The best way to use Selenium in Google Colab Notebooks!
- Simple setup of Selenium and ChromeDriver.
- Seamless integration with Google Colab.
- Supports 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 me know.
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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd282055f727ca5bc1090e9e68bd2cd51a7aebf3c65b7477323c474cd134915b |
|
MD5 | fdee0880bf9d12798d4f9ddb5c6b2c61 |
|
BLAKE2b-256 | ed6cea9131738576eaff4e0a810eb7c2ca9d89492b3bd4c46d2776f5ac44dec9 |
Close
Hashes for google_colab_selenium-1.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125387ef616a85268f066a64b8dd46c9f95ab21f994bc6bf0bdf11dc34d50ea1 |
|
MD5 | f9844ba33da6e9aedfbb8f026397fa98 |
|
BLAKE2b-256 | 4b3c4ab98be46603eed8bf37c012096e97f7b8ec975484a2e513e0451d52bdc6 |