Skip to content

Commit 7e84bc1

Browse files
committed
added window minimization
1 parent 0cd8890 commit 7e84bc1

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea

get_location_data.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@ class WebDriver:
1313
location_data = {}
1414

1515
def __init__(self):
16-
#self.PATH = "chromedriver.exe"
17-
#self.options = Options()
18-
# self.options.binary_location = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
19-
#self.options.add_argument("--headless")
20-
#self.options.add_argument("--enable-javascript")
21-
#self.driver = webdriver.Chrome(self.PATH, options=self.options)
22-
#self.driver.maximize_window()
2316
self.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
17+
self.driver.minimize_window()
2418

2519
self.location_data["name"] = "NA"
2620
self.location_data["rating"] = "NA"

scraper.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,15 @@
55
from selenium.webdriver.common.by import By
66
from selenium.webdriver.chrome.service import Service
77
from webdriver_manager.chrome import ChromeDriverManager
8+
from selenium.webdriver.chrome.options import Options
89
import time
910

1011
class WebDriver:
1112
location_data = {}
1213

1314
def __init__(self):
14-
#self.PATH = "chromedriver.exe"
15-
#self.options = Options()
16-
# self.options.binary_location = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
17-
#self.options.add_argument("--headless")
18-
#self.options.add_argument("--enable-javascript")
19-
#self.driver = webdriver.Chrome(self.PATH, options=self.options)
20-
#self.driver.maximize_window()
21-
#self.options.add_argument("--start-maximized");
2215
self.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
16+
self.driver.minimize_window()
2317

2418

2519
self.location_data["rating"] = "NA"

0 commit comments

Comments
 (0)