From c933543e5c4d650022451a1b29e41d419f6e0ef9 Mon Sep 17 00:00:00 2001 From: Deroino <117969239+Deroino@users.noreply.github.com> Date: Sat, 8 Nov 2025 04:22:06 +0800 Subject: [PATCH 1/2] chore(windows): add Windows batch script for one-click startup Add a Windows batch script to launch both backend and frontend servers with a single click. This script: - Starts the Python backend server in a new window - Starts the Vue.js frontend server in another window - Includes proper window titles and logging - Automatically closes the launcher window after 10 seconds --- start-win.bat | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 start-win.bat diff --git a/start-win.bat b/start-win.bat new file mode 100644 index 0000000..d83e77c --- /dev/null +++ b/start-win.bat @@ -0,0 +1,27 @@ +@echo off +TITLE One-Click Starter for social-auto-upload + +ECHO ================================================== +ECHO Starting social-auto-upload Servers... +ECHO ================================================== +ECHO. + +ECHO [1/2] Starting Python Backend Server in a new window... +REM The START command launches a new process. +REM The first quoted string "SAU Backend" is the title of the new window. +REM cmd /k runs the command and keeps the window open to show logs. +START "SAU Backend" cmd /k "python sau_backend.py" + +ECHO [2/2] Starting Vue.js Frontend Server in another new window... +START "SAU Frontend" cmd /k "cd sau_frontend && npm run dev -- --host 0.0.0.0" + +ECHO. +ECHO ================================================== +ECHO Done. +ECHO Two new windows have been opened for the backend +ECHO and frontend servers. You can monitor logs there. +ECHO ================================================== +ECHO. + +ECHO This window will close in 10 seconds... +timeout /t 10 /nobreak > nul From 250d7424b18526f355a00c444072a7ad4c846be1 Mon Sep 17 00:00:00 2001 From: Leo Song Date: Sun, 9 Nov 2025 15:23:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=8B=E5=89=8DPR?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- myUtils/auth.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/myUtils/auth.py b/myUtils/auth.py index ea10093..908374e 100644 --- a/myUtils/auth.py +++ b/myUtils/auth.py @@ -7,7 +7,7 @@ from xhs import XhsClient from conf import BASE_DIR from utils.base_social_media import set_init_script -from utils.log import tencent_logger, kuaishou_logger +from utils.log import tencent_logger, kuaishou_logger, douyin_logger from pathlib import Path from uploader.xhs_uploader.main import sign_local @@ -27,13 +27,13 @@ async def cookie_auth_douyin(account_file): # 等待“扫码登录”元素出现,超时 5 秒(如果 5 秒没出现,说明 cookie 有效) try: await page.get_by_text("扫码登录").wait_for(timeout=5000) - logger.error("[+] cookie 失效,需要扫码登录") + douyin_logger.error("[+] cookie 失效,需要扫码登录") return False except: - logger.success("[+] cookie 有效") + douyin_logger.success("[+] cookie 有效") return True except: - logger.error("[+] 等待5秒 cookie 失效") + douyin_logger.error("[+] 等待5秒 cookie 失效") await context.close() await browser.close() return False