import undetected_chromedriver as uc # pip install undetected-chromedriver
from selenium.webdriver.common.by import By
import time
if __name__ == '__main__':
print("Profile ")
options = uc.ChromeOptions()
options.user_data_dir = "C:\\User Data\\opanbrowsing"
options.add_argument(f"--profile-directory=Profile 8")
# driver = uc.Chrome(driver_executable_path="chromedriver.exe", options=options)
driver = uc.Chrome(executable_path=r"path of chromedriver.exe", chrome_options=options)
driver.get("https://www.google.com/")
time.sleep(3)
driver.get("http://iconmovie24.com/hgh/hg")
time.sleep(2)
driver.maximize_window()
time.sleep(2)
driver.minimize_window()
print("Profile 2")
driver.quit()
-----------------------------
chrome_options = uc.ChromeOptions()
chrome_options.user_data_dir = "C:/chromeProfile"
chrome_options.add_argument(f"--profile-directory=Profile {i}")
driver = uc.Chrome(executable_path="chromedriver.exe", options=chrome_options)
driver.get("https://www.google.com/")
driver.get("https://open.spotify.com")
driver.get("https://open.spotify.com/album/1MXRVqiIC44pb3sLMcKd3j?si=gySGC4DKTCyvG9nd2Pxbxg&nd=1")
chromedriver-not-recognizing-options
https://stackoverflow.com/questions/61168789/chromedriver-not-recognizing-options
----------------------------------
chromedriver downloads
https://chromedriver.chromium.org/downloads
https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/
https://stackoverflow.com/questions/61168789/chromedriver-not-recognizing-options
Post a Comment