mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 03:51:52 +09:00
- Removed old llm_login and session scripts, replacing them with a new structure for handling SSO login and session management. - Introduced a new prompt system for collecting SSO redirect URLs, ensuring compliance with security protocols. - Implemented a robust backend notification system for tracking scan initiation. - Enhanced browser profile configuration and resource management for improved session handling. - Added utility functions for environment variable checks and logging. - Updated the overall architecture to improve maintainability and readability.
29 lines
No EOL
688 B
Python
29 lines
No EOL
688 B
Python
from func import *
|
|
import clean_resources as clean_resources_func
|
|
|
|
# Initialize configuration
|
|
proxy_url = setup_proxy()
|
|
storage_state_path = setup_storage_state()
|
|
|
|
# Create browser profile
|
|
profile = BrowserProfile(
|
|
# Security settings
|
|
disable_security=True,
|
|
stealth=True,
|
|
|
|
# Display settings
|
|
headless=False,
|
|
device_scale_factor=1,
|
|
window_size={"width": 1600, "height": 900},
|
|
viewport={"width": 1600, "height": 900},
|
|
|
|
# Data persistence
|
|
user_data_dir=None,
|
|
storage_state=storage_state_path,
|
|
|
|
# Network settings
|
|
proxy={"server": proxy_url} if proxy_url else None,
|
|
|
|
# Additional arguments
|
|
args=get_browser_args(),
|
|
) |