diff --git a/ninjemail/utils/webdriver_utils.py b/ninjemail/utils/webdriver_utils.py index 648e53b..4cba8e0 100644 --- a/ninjemail/utils/webdriver_utils.py +++ b/ninjemail/utils/webdriver_utils.py @@ -40,6 +40,7 @@ def create_driver(browser, captcha_extension=False, proxy=None): options.add_argument('--no-sandbox') options.add_argument('--disable-gpu') options.add_argument('--headless') + custom_profile.set_preference("intl.accept_languages", "en-us") # proxy if proxy: @@ -64,7 +65,9 @@ def create_driver(browser, captcha_extension=False, proxy=None): options = ChromeOptions() options.add_argument('--no-sandbox') options.add_argument('--disable-gpu') + options.add_experimental_option('prefs', {'intl.accept_languages': 'en-us'}) options.add_argument('--headless=new') + options.add_experimental_option('excludeSwitches', ['enable-logging']) if proxy: options.add_argument(f'--proxy-server={proxy}') if captcha_extension: