mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 06:31:51 +09:00
[Update] new logic
This commit is contained in:
parent
95d56259e7
commit
92967ed353
38 changed files with 1516 additions and 5209 deletions
22
lib/utils/progress_checker.py
Normal file
22
lib/utils/progress_checker.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
progress_file = Path("data/scan_progress.json")
|
||||
|
||||
|
||||
def save_progress(current_progress):
|
||||
"""현재 진행 상황을 파일에 저장"""
|
||||
with open(progress_file, 'w', encoding='utf-8') as f:
|
||||
json.dump(current_progress, f, ensure_ascii=False, indent=2)
|
||||
|
||||
|
||||
def load_progress():
|
||||
"""이전 진행 상황을 파일에서 불러오기"""
|
||||
if os.path.exists(progress_file):
|
||||
try:
|
||||
with open(progress_file, 'r', encoding='utf-8') as f:
|
||||
return json.load(f)
|
||||
except:
|
||||
return None
|
||||
return None
|
||||
Loading…
Add table
Add a link
Reference in a new issue