| |
| import undetected_chromedriver as uc |
| import json |
| import time |
|
|
| TARGET_URL = "https://hailuoai.video/create" |
| COOKIES_FILE = "cookies.json" |
|
|
| def main(): |
| |
| driver = uc.Chrome() |
| driver.get(TARGET_URL) |
| print("👉 Vui lòng login vào hailuoai.video trong cửa sổ này.") |
| input("⏳ Sau khi login xong, nhấn Enter ở đây để lưu cookies…") |
| cookies = driver.get_cookies() |
| with open(COOKIES_FILE, 'w', encoding='utf-8') as f: |
| json.dump(cookies, f, ensure_ascii=False, indent=2) |
| print(f"✅ Đã lưu cookies vào {COOKIES_FILE}") |
| driver.quit() |
|
|
| if __name__ == "__main__": |
| main() |
|
|