jpjacobpadilla / Google-Colab-Selenium

The best way to use Selenium in Google Colab Notebooks!
https://pypi.org/project/google-colab-selenium/
MIT License
181 stars 20 forks source link

About Proxy Connect #13

Closed zeonagames closed 3 months ago

zeonagames commented 3 months ago

Hello can you help me proxy connect ? I tried this but It doesnt work, Is there a example basically proxy with undetected chrome?

import google_colab_selenium as gs from selenium.webdriver.common.proxy import Proxy, ProxyType

proxy_address = '' username = ''
password = ''

proxy = Proxy() proxy.proxy_type = ProxyType.MANUAL proxy.http_proxy = proxy_address proxy.ssl_proxy = proxy_address proxy.socks_proxy = proxy_address proxy.ftp_proxy = proxy_address

capabilities = gs.DesiredCapabilities.CHROME.copy() proxy.add_to_capabilities(capabilities)

driver = gs.UndetectedChrome(desired_capabilities=capabilities)

driver.get('https://www.google.com')

driver.quit()