modified main.py with a new test case

This commit is contained in:
Shaghayegh
2023-04-14 09:19:29 +02:00
parent f56dc86e67
commit c61d4e6aee
21 changed files with 9163 additions and 2646 deletions
+3 -4
View File
@@ -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()