Projets
Voir sur GitHub
jpjacobpadilla/Google-Colab-Selenium
À propos
La meilleure façon d’utiliser Selenium dans les notebooks Google Colab !
Autres projetsProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Original
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.
Explorer des projets similaires
Chargement…