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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18b3d9b8668e93ffdeae178299f6134790ef44041439c7d7d691a30a17481d11 |
|
MD5 | cf13ff646634dc7e50018361828611b7 |
|
BLAKE2b-256 | 04c450e93922857abbf8fd0727df810ead0d4c410e3c2cf8403a1696291f19b6 |
Close
Hashes for google_colab_selenium-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ca37494f22e2d4bb6b5cd177987edff811b0816a01d6102f6510b2645292afa |
|
MD5 | 5cea6eb217f81c9305c4bf6f1d9b3f4a |
|
BLAKE2b-256 | 4387cdf22f7d3b9f2a4cc833883974bf76b0254481f1fc2b3c35060fe3a0844c |