from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time
options = webdriver.ChromeOptions()
options.add_argument(r"user-data-dir=C:\Users\Eugene\AppData\Local\Google\Chrome\User Data\Profile 4")
browser = webdriver.Chrome(executable_path=r'C:\Users\Eugene\Documents\Python\chromedriver.exe', chrome_options=options)
browser.get('https://www.google.com/')
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from fake_useragent import UserAgent
options = Options()
ua = UserAgent()
userAgent = ua.random
print(userAgent)
options.add_argument(f'user-agent={userAgent}')
driver = webdriver.Chrome(chrome_options=options, executable_path=r'C:\WebDrivers\ChromeDriver\chromedriver_win32\chromedriver.exe')
driver.get("https://www.google.co.in")
driver.quit()
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time
options = webdriver.ChromeOptions()
options.add_argument("--allow-profiles-outside-user-dir")
options.add_argument(r"user-data-dir=C:\Users\Eugene\AppData\Local\Google\Chrome\User Data")
options.add_argument("--profile-directory=Profile 4")
browser = webdriver.Chrome(executable_path=r'C:\Users\Eugene\Documents\Python\chromedriver.exe', chrome_options=options)
browser.get('https://www.google.com/')