Add LANG ENV. resolves #951

This commit is contained in:
ilike2burnthing 2023-11-14 03:56:57 +00:00 committed by GitHub
parent 220f2599ae
commit 8d7ed48f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,6 +136,10 @@ def get_webdriver(proxy: dict = None) -> WebDriver:
# https://peter.sh/experiments/chromium-command-line-switches/#use-gl # https://peter.sh/experiments/chromium-command-line-switches/#use-gl
options.add_argument('--use-gl=swiftshader') 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 # Fix for Chrome 117 | https://github.com/FlareSolverr/FlareSolverr/issues/910
if USER_AGENT is not None: if USER_AGENT is not None:
options.add_argument('--user-agent=%s' % USER_AGENT) options.add_argument('--user-agent=%s' % USER_AGENT)