Skip to content

Instantly share code, notes, and snippets.

@RohanArora13
Last active June 30, 2022 16:09
Show Gist options
  • Save RohanArora13/4a72ed323d5f792caa9166f9cbdf8058 to your computer and use it in GitHub Desktop.
Save RohanArora13/4a72ed323d5f792caa9166f9cbdf8058 to your computer and use it in GitHub Desktop.
A simple way to get working proxy in selenium
from selenium import webdriver
from selenium_utilities import getChromeDriver
import time
from selenium.webdriver.common.keys import Keys
options = webdriver.ChromeOptions()
options.add_argument('--lang=en-US')
url_to_search = "https://google.com/?hl=en&lr=lang_en"
driver = webdriver.Chrome(executable_path=getChromeDriver(), chrome_options=options)
driver.get("https://www.croxyproxy.com/")
search = driver.find_element_by_id("url")
search.send_keys(url_to_search)
search.send_keys(Keys.ENTER)
time.sleep(25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment