1. 重构快手
- 图文增加 - 封面增加 2. 快手skill,cli支持
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
|
||||
def run_command(command: list[str]) -> None:
|
||||
print("Running:", " ".join(shlex.quote(part) for part in command))
|
||||
subprocess.run(command, check=True)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
account = "creator"
|
||||
|
||||
commands = [
|
||||
["sau", "kuaishou", "login", "--account", account, "--headed"],
|
||||
["sau", "kuaishou", "check", "--account", account],
|
||||
[
|
||||
"sau",
|
||||
"kuaishou",
|
||||
"upload-video",
|
||||
"--account",
|
||||
account,
|
||||
"--file",
|
||||
"videos/demo.mp4",
|
||||
"--title",
|
||||
"Kuaishou video from Python",
|
||||
"--tags",
|
||||
"cli,video",
|
||||
"--thumbnail",
|
||||
"videos/demo.png",
|
||||
"--headless",
|
||||
],
|
||||
[
|
||||
"sau",
|
||||
"kuaishou",
|
||||
"upload-note",
|
||||
"--account",
|
||||
account,
|
||||
"--images",
|
||||
"videos/1.png",
|
||||
"videos/2.png",
|
||||
"videos/3.png",
|
||||
"--note",
|
||||
"Kuaishou note from Python",
|
||||
"--tags",
|
||||
"cli,note",
|
||||
"--headless",
|
||||
],
|
||||
]
|
||||
|
||||
for command in commands:
|
||||
run_command(command)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user