| 1 | """Legacy direct login helper for Kuaishou. |
| 2 | |
| 3 | Current mainline usage prefers: |
| 4 | sau kuaishou login --account creator |
| 5 | """ |
| 6 | |
| 7 | import asyncio |
| 8 | from pathlib import Path |
| 9 | |
| 10 | from conf import BASE_DIR |
| 11 | from uploader.ks_uploader.main import ks_setup |
| 12 | |
| 13 | |
| 14 | def login_to_kuaishou(): |
| 15 | account_file = Path(BASE_DIR / "cookies" / "kuaishou_creator.json") |
| 16 | account_file.parent.mkdir(exist_ok=True) |
| 17 | asyncio.run(ks_setup(str(account_file), handle=True)) |
| 18 | |
| 19 | |
| 20 | if __name__ == '__main__': |
| 21 | login_to_kuaishou() |
| 22 |