Download utils/browser_hook.py from supff/sau: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/supff/sau/resolve/main/utils/browser_hook.py
- Command line
-
hf download hf://spaces/supff/sau/utils/browser_hook.py
-
curl -L -o browser_hook.py https://huggingface.co/spaces/supff/sau/resolve/main/utils/browser_hook.py
500 Bytes
| 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 | |