From 200e2ddd7f89114badaf8b9cfa088a062b41f209 Mon Sep 17 00:00:00 2001 From: Lucas Faudman Date: Fri, 5 Apr 2024 14:43:14 -0700 Subject: [PATCH] fix --user-agent Selenium Option --- src/souperscraper/souperscraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/souperscraper/souperscraper.py b/src/souperscraper/souperscraper.py index 6d172bc..92defc0 100644 --- a/src/souperscraper/souperscraper.py +++ b/src/souperscraper/souperscraper.py @@ -123,7 +123,7 @@ def __init__(self, # Add user_agent to Selenium Options object if user_agent: self.selenium_options.add_argument( - f'user-agent="{user_agent}"') + f'--user-agent="{user_agent}"') # Add proxy to Selenium Options object if proxy: @@ -162,7 +162,7 @@ def __getattr__(self, attr): # Attempt to find locator and expected_condition in split_attr # If found, return a partial function with locator and expected_condition # For example: - # wait_visibility_of_element_located_by_id(locator_value) is equivalent to + # self.wait_for_visibility_of_element_located_by_id(locator_value) is equivalent to # WebDriverWait(self.webdriver, 3).until(EC.visibility_of_element_located((By.ID, locator_value)) locator = None expected_condition = None