selenium session, captcha
This commit is contained in:
@ -73,9 +73,16 @@ class MEXCRequestInterceptor:
|
||||
# Chrome options (used for Brave as it's Chromium-based)
|
||||
chrome_options = Options()
|
||||
|
||||
# Set up Chrome options with a user data directory to persist session
|
||||
user_data_dir = os.path.join(os.getcwd(), 'chrome_user_data')
|
||||
os.makedirs(user_data_dir, exist_ok=True)
|
||||
chrome_options.add_argument(f'--user-data-dir={user_data_dir}')
|
||||
chrome_options.add_argument('--disable-extensions')
|
||||
chrome_options.add_argument('--disable-gpu')
|
||||
chrome_options.add_argument('--window-size=1920,1080')
|
||||
if self.headless:
|
||||
chrome_options.add_argument("--headless")
|
||||
logger.info("Running in headless mode")
|
||||
chrome_options.add_argument('--headless')
|
||||
chrome_options.add_argument('--no-sandbox')
|
||||
|
||||
# Set the binary location for Brave
|
||||
# brave_binary_path = "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
||||
|
Reference in New Issue
Block a user