Files
TrueGrowth/vendor/social-auto-upload/examples/get_xiaohongshu_cookie.py
Jammy 52636c91ae
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled
Track bundled vendor runtime sources
2026-07-07 10:05:50 +08:00

25 lines
624 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
当前主线优先使用 CLI
sau xiaohongshu login --account <account_name>
这个脚本保留为小红书 uploader 的调试入口 / 历史直连路径。
"""
import asyncio
from pathlib import Path
from conf import BASE_DIR
from uploader.xiaohongshu_uploader.main import xiaohongshu_setup
if __name__ == '__main__':
account_file = Path(BASE_DIR / "cookies" / "xiaohongshu_uploader" / "account.json")
account_file.parent.mkdir(exist_ok=True)
result = asyncio.run(
xiaohongshu_setup(
str(account_file),
handle=True,
return_detail=True,
)
)