From 8d7ed48f217aa4afe5eb6d0ae4e9c62b37b3a35b Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Tue, 14 Nov 2023 03:56:57 +0000 Subject: [PATCH] Add LANG ENV. resolves #951 --- src/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.py b/src/utils.py index 86bd6ad..dc71e3b 100644 --- a/src/utils.py +++ b/src/utils.py @@ -136,6 +136,10 @@ def get_webdriver(proxy: dict = None) -> WebDriver: # https://peter.sh/experiments/chromium-command-line-switches/#use-gl options.add_argument('--use-gl=swiftshader') + language = os.environ.get('LANG', None) + if language is not None: + options.add_argument('--lang=%s' % language) + # Fix for Chrome 117 | https://github.com/FlareSolverr/FlareSolverr/issues/910 if USER_AGENT is not None: options.add_argument('--user-agent=%s' % USER_AGENT)