Created
April 7, 2025 12:48
-
-
Save Bruno-Messias/65e1062bb682d385b6a8e5803a0aab23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
chromedriver_path = "path/to/chromedriver" | |
options = webdriver.ChromeOptions() | |
options.add_experimental_option("prefs", { | |
"profile.default_content_settings.popups": 0, | |
"download.prompt_for_download": False, | |
"download.directory_upgrade": True, | |
"safebrowsing.enabled": True, | |
"profile.default_content_setting_values.automatic_downloads": 1, | |
}) | |
options.add_argument("--lang=pt-BR") | |
options.add_argument("--headless=new") | |
options.add_argument("--no-sandbox") | |
options.add_argument("--disable-dev-shm-usage") | |
driver = webdriver.Chrome(service=Service(chromedriver_path), options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment