selenium session, captcha
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,3 +41,4 @@ closed_trades_history.json
|
|||||||
data/cnn_training/cnn_training_data*
|
data/cnn_training/cnn_training_data*
|
||||||
testcases/*
|
testcases/*
|
||||||
testcases/negative/case_index.json
|
testcases/negative/case_index.json
|
||||||
|
chrome_user_data/*
|
||||||
|
@ -73,9 +73,16 @@ class MEXCRequestInterceptor:
|
|||||||
# Chrome options (used for Brave as it's Chromium-based)
|
# Chrome options (used for Brave as it's Chromium-based)
|
||||||
chrome_options = Options()
|
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:
|
if self.headless:
|
||||||
chrome_options.add_argument("--headless")
|
chrome_options.add_argument('--headless')
|
||||||
logger.info("Running in headless mode")
|
chrome_options.add_argument('--no-sandbox')
|
||||||
|
|
||||||
# Set the binary location for Brave
|
# Set the binary location for Brave
|
||||||
# brave_binary_path = "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
# brave_binary_path = "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
||||||
|
9351
mexc_requests_20250703_015321.json
Normal file
9351
mexc_requests_20250703_015321.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user