HailuoAI / login.py
LTTEAM's picture
Create login.py
303ebf1 verified
raw
history blame contribute delete
704 Bytes
# login.py
import undetected_chromedriver as uc
import json
import time
TARGET_URL = "https://hailuoai.video/create"
COOKIES_FILE = "cookies.json"
def main():
# Khởi Chrome (có cửa sổ để bạn login thủ công)
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()