Closed mzz92 closed 4 months ago
I'm glad you find the package useful!
Try this:
To add these options to the regular ChromeDriver, do the following:
import google_colab_selenium as gs
from selenium.webdriver.chrome.options import Options
options = Options()
prefs = {
"profile.managed_default_content_settings.images": 2,
"permissions.default.stylesheet": 2,
}
options.add_experimental_option("prefs", prefs)
driver = gs.Chrome(options=options)
And if you're using the Undetected-ChromeDriver package, you can use that package's custom options like so:
import google_colab_selenium as gs
import undetected_chromedriver as uc
options = uc.ChromeOptions()
prefs = {
"profile.managed_default_content_settings.images": 2,
"permissions.default.stylesheet": 2,
}
options.add_experimental_option("prefs", prefs)
driver = gs.UndetectedChrome(options=options)
This is a fantastic package. I would like to disable automatic image downloads using add_experimental_option:
However, I get this error:
Is there some other way I should be doing this? Thanks!