chromedriver_linux64.zip
überprüft
chmod 777 <heruntergeladene Datei>
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def lambda_handler(event, context):
options = Options()
options.binary_location = '/opt/chrome/headless-chromium'
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--single-process')
options.add_argument('--disable-dev-shm-usage')
browser = webdriver.Chrome('/opt/chrome/chromedriver', chrome_options=options)
browser.get('https://www.google.com')
title = browser.title
browser.close()
browser.quit()
return {"title": title}
https://blog.ikedaosushi.com/entry/2018/12/22/231421 https://qiita.com/nabehide/items/754eb7b7e9fff9a1047d
macOS 10.15.4 Python 3.7.7
Recommended Posts