Valid content filter, language detect on min chars, fetch missingkids.org
This commit is contained in:
14
app_selenium/utils.py
Normal file
14
app_selenium/utils.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
|
||||
def get_chrome_options():
|
||||
"""Sets chrome options for Selenium.
|
||||
Chrome options for headless browser is enabled.
|
||||
"""
|
||||
chrome_options = Options()
|
||||
chrome_options.add_argument("--headless")
|
||||
chrome_options.add_argument("--no-sandbox")
|
||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||
chrome_prefs = {}
|
||||
chrome_options.experimental_options["prefs"] = chrome_prefs
|
||||
chrome_prefs["profile.default_content_settings"] = {"images": 2}
|
||||
return chrome_options
|
||||
Reference in New Issue
Block a user