mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 05:21:52 +09:00
[Enhancement] 스토리지 상태 경로 설정 로직 개선: 스크립트 디렉토리 기반으로 수정
This commit is contained in:
parent
1d5e470f4e
commit
1f3b2f5c8a
1 changed files with 8 additions and 2 deletions
|
|
@ -22,8 +22,13 @@ def setup_proxy():
|
||||||
|
|
||||||
def setup_storage_state():
|
def setup_storage_state():
|
||||||
"""Setup browser storage state for session persistence."""
|
"""Setup browser storage state for session persistence."""
|
||||||
storage_state_path = Path("./data/storage_state.json").resolve()
|
# Get the script directory to ensure correct path resolution
|
||||||
storage_state_temp_path = Path("./data/storage_state_temp.json").resolve()
|
script_dir = Path(__file__).parent.parent.parent.parent
|
||||||
|
storage_state_path = script_dir / "data" / "storage_state.json"
|
||||||
|
storage_state_temp_path = script_dir / "data" / "storage_state_temp.json"
|
||||||
|
|
||||||
|
print(f"📂 Storage state path: {storage_state_path}")
|
||||||
|
print(f"📂 Temp storage state path: {storage_state_temp_path}")
|
||||||
|
|
||||||
if storage_state_path.exists():
|
if storage_state_path.exists():
|
||||||
if storage_state_temp_path.exists():
|
if storage_state_temp_path.exists():
|
||||||
|
|
@ -35,6 +40,7 @@ def setup_storage_state():
|
||||||
print(f"🔄 Using existing storage state: {storage_state_temp_path}")
|
print(f"🔄 Using existing storage state: {storage_state_temp_path}")
|
||||||
return str(storage_state_temp_path)
|
return str(storage_state_temp_path)
|
||||||
|
|
||||||
|
print("⚠️ No existing storage state found")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue