Created
March 13, 2021 17:57
-
-
Save samirsaci/3631ff8b4b44d46daf67f6354b126c6e to your computer and use it in GitHub Desktop.
Initialize Selenium Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from selenium import webdriver | |
from bs4 import BeautifulSoup as soup | |
# Chromedrive setting | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.add_argument("--headless") | |
chrome_options.add_argument("--disable-dev-shm-usage") | |
chrome_options.add_argument("--no-sandbox") | |
chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") | |
driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment