mirror of
https://git.axenov.dev/mirrors/cursor-free-vip.git
synced 2025-12-26 05:30:36 +03:00
Enhance browser configuration and path retrieval
- Updated `config.py` to include a comprehensive browser configuration section, allowing for dynamic retrieval of browser paths and drivers for Chrome, Edge, Firefox, and Brave. - Refactored `new_signup.py`, `new_tempemail.py`, and `oauth_auth.py` to utilize the new browser configuration, improving flexibility and maintainability. - Removed deprecated `get_default_chrome_path` function and replaced it with a more generalized `get_default_browser_path` function in `utils.py`. - Updated localization files to include new strings related to browser path validation and selection.
This commit is contained in:
15
config.py
15
config.py
@@ -2,7 +2,7 @@ import os
|
||||
import sys
|
||||
import configparser
|
||||
from colorama import Fore, Style
|
||||
from utils import get_user_documents_path, get_default_chrome_path, get_linux_cursor_path
|
||||
from utils import get_user_documents_path, get_linux_cursor_path, get_default_driver_path, get_default_browser_path
|
||||
import shutil
|
||||
import datetime
|
||||
|
||||
@@ -29,8 +29,19 @@ def setup_config(translator=None):
|
||||
|
||||
# Default configuration
|
||||
default_config = {
|
||||
'Browser': {
|
||||
'default_browser': 'chrome',
|
||||
'chrome_path': get_default_browser_path('chrome'),
|
||||
'edge_path': get_default_browser_path('edge'),
|
||||
'firefox_path': get_default_browser_path('firefox'),
|
||||
'brave_path': get_default_browser_path('brave'),
|
||||
'chrome_driver_path': get_default_driver_path('chrome'),
|
||||
'edge_driver_path': get_default_driver_path('edge'),
|
||||
'firefox_driver_path': get_default_driver_path('firefox'),
|
||||
'brave_driver_path': get_default_driver_path('brave')
|
||||
},
|
||||
'Chrome': {
|
||||
'chromepath': get_default_chrome_path()
|
||||
'chromepath': get_default_browser_path('chrome')
|
||||
},
|
||||
'Turnstile': {
|
||||
'handle_turnstile_time': '2',
|
||||
|
||||
Reference in New Issue
Block a user