| 1 | """ |
| 2 | 当前主线优先使用 CLI: |
| 3 | |
| 4 | sau xiaohongshu login --account <account_name> |
| 5 | |
| 6 | 这个脚本保留为小红书 uploader 的调试入口 / 历史直连路径。 |
| 7 | """ |
| 8 | |
| 9 | import asyncio |
| 10 | from pathlib import Path |
| 11 | |
| 12 | from conf import BASE_DIR |
| 13 | from uploader.xiaohongshu_uploader.main import xiaohongshu_setup |
| 14 | |
| 15 | if __name__ == '__main__': |
| 16 | account_file = Path(BASE_DIR / "cookies" / "xiaohongshu_uploader" / "account.json") |
| 17 | account_file.parent.mkdir(exist_ok=True) |
| 18 | result = asyncio.run( |
| 19 | xiaohongshu_setup( |
| 20 | str(account_file), |
| 21 | handle=True, |
| 22 | return_detail=True, |
| 23 | ) |
| 24 | ) |
| 25 |