remove profile

main
saif 2025-08-12 16:59:27 +05:00
parent c2ac97f4b7
commit 53b1d8225f
1 changed files with 0 additions and 3 deletions

View File

@ -37,11 +37,8 @@ def get_driver():
options.add_argument("--disable-blink-features=AutomationControlled") # Removes automation flag
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument("user-data-dir=/home/ec2-user/keyword_ranking_crawler/chrome_profile")
options.add_argument("profile-directory=Default")
options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36")
options.add_argument("--start-maximized")
driver = webdriver.Chrome( service=Service(ChromeDriverManager().install()),options=options)
# Remove navigator.webdriver
driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {