Created
January 10, 2018 16:00
-
-
Save serenamm/7a21963f35d99c10d500f98db8fd1827 to your computer and use it in GitHub Desktop.
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 numpy as np | |
from time import sleep # So we don't request too much from the server | |
from selenium import webdriver | |
from selenium.webdriver.common import action_chains, keys | |
''' | |
Initialize Chrome Driver | |
''' | |
def initialize_browser(): | |
my_options = webdriver.ChromeOptions() | |
driver_path = "C:/Data/chromedriver.exe" | |
my_options.add_argument("--disable-extensions") | |
my_options.add_argument("--profile-directory=Default") | |
my_options.add_argument("--incognito") | |
my_options.add_argument("--disable-plugins-discovery") | |
my_options.add_argument("--start-maximized") | |
my_options.add_argument("--disable-notifications") | |
browser = webdriver.Chrome(executable_path = driver_path, chrome_options = my_options) | |
return browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment