Track bundled vendor runtime sources
This commit is contained in:
17
vendor/social-auto-upload/utils/browser_hook.py
vendored
Normal file
17
vendor/social-auto-upload/utils/browser_hook.py
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
from conf import LOCAL_CHROME_HEADLESS, LOCAL_CHROME_PATH
|
||||
|
||||
def get_browser_options():
|
||||
options = {
|
||||
'headless': LOCAL_CHROME_HEADLESS,
|
||||
'args': [
|
||||
'--disable-blink-features=AutomationControlled',
|
||||
'--lang=zh-CN',
|
||||
'--disable-infobars',
|
||||
'--start-maximized',
|
||||
'--no-sandbox',
|
||||
'--disable-web-security'
|
||||
]
|
||||
}
|
||||
if LOCAL_CHROME_PATH:
|
||||
options['executable_path'] = LOCAL_CHROME_PATH
|
||||
return options
|
||||
Reference in New Issue
Block a user