1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| import asyncio
| import sys
| from datetime import datetime
| from auto_media_publisher.utils.uploader_helper import create_media_uploader
| from auto_media_publisher.utils.utils_file import load_json
|
| async def main():
| if len(sys.argv) < 3:
| print("python test_upload.py [user] [PLATFORM] [proxy] [JSON_PATH] ")
| print("python test_upload.py 18918594752 xiaohongshu None data/video_final/18918594752bukebuke/test.json")
| print("[PLATFORM] douyin, kuaishou, shipinhao, xiaohongshu, bilibili, baijiahao, tiktok, twitterX, all")
| return
|
| handler = await create_media_uploader(user=sys.argv[1],platform=sys.argv[2],proxy=sys.argv[3])
| await handler.upload(load_json(sys.argv[4]))
|
| if __name__ == "__main__":
| asyncio.run(main())
|
|