modified main.py with a new test case
This commit is contained in:
@@ -14,9 +14,9 @@ import pandas as pd
|
||||
|
||||
class ScrapeWithSelenium:
|
||||
def __init__(self, urls, body_wait_time, xpath_wait_time, config_xpath, website_name):
|
||||
# self.options = webdriver.ChromeOptions()
|
||||
# self.options.add_argument('--headless')
|
||||
self.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
|
||||
self.options = webdriver.ChromeOptions()
|
||||
self.options.add_argument('--headless')
|
||||
self.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=self.options)
|
||||
self.config_xpath = config_xpath
|
||||
self.website_name = website_name
|
||||
self.driver.maximize_window()
|
||||
@@ -25,7 +25,6 @@ class ScrapeWithSelenium:
|
||||
self.urls = urls if urls else []
|
||||
self.items = []
|
||||
self.config = ConfigParser()
|
||||
# I should pass this as argument
|
||||
with codecs.open(os.getcwd() + config_xpath , 'r', encoding='utf-8') as f :
|
||||
self.config.read_file(f)
|
||||
self.run()
|
||||
|
||||
Reference in New Issue
Block a user