feat(alipay): add Alipay life account video uploader
- New uploader/alipay_uploader module: QR-code cookie login, upload page flow, title/desc/tags fill, thumbnail, collection and publish - sau_cli: add 'alipay login/check/upload-video' subcommands - examples: get_alipay_cookie.py and test_alipay_upload.py - utils/log.py: register alipay logger - utils/login_qrcode.py: robust QR decode on non-ASCII Windows paths (numpy imdecode with cv2.imread fallback)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""获取支付宝生活号 cookie:打开浏览器扫码登录后自动保存到 cookies/alipay_uploader/account.json"""
|
||||
import asyncio
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
|
||||
from uploader.alipay_uploader.main import alipay_cookie_gen
|
||||
|
||||
|
||||
async def main():
|
||||
account_file = Path(__file__).resolve().parents[1] / "cookies" / "alipay_uploader" / "account.json"
|
||||
await alipay_cookie_gen(str(account_file))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user