feat: EveryPublish Web 管理端重构与全平台发布接入
- 新增 React + TDesign 管理端(sau_web_react),替代历史 Vue 前端 - 后端接入 11 平台登录/发布(视频+图文),check_cookie 扩展全平台 - 异步发布任务 + 实时进度监控 + 发布日志 - Open API 开放体系(API Key 鉴权 + 7 个开放接口 + API 文档页) - 账号单/批量校验与批量删除 - 全局配置(登录方式 + 发布静默模式) - 统一浏览器为系统 Chrome,品牌文案统一为 EveryPublish
This commit is contained in:
@@ -50,7 +50,7 @@ def _build_login_result(success, status, message, account_file, current_url=""):
|
||||
async def cookie_auth(account_file) -> bool:
|
||||
"""登录态是否仍有效:带 cookie 打开 Studio,没被踢到 Google 登录页且进入了频道页即有效。"""
|
||||
async with async_playwright() as playwright:
|
||||
browser = await playwright.chromium.launch(headless=True, channel="chrome")
|
||||
browser = await playwright.chromium.launch(headless=True, executable_path=LOCAL_CHROME_PATH)
|
||||
try:
|
||||
context = await browser.new_context(storage_state=account_file)
|
||||
context = await set_init_script(context)
|
||||
@@ -71,7 +71,7 @@ async def youtube_cookie_gen(account_file, headless: bool = False):
|
||||
"""交互式登录:开浏览器让用户登录 Google/YouTube,进入频道页后保存 storage_state。"""
|
||||
async with async_playwright() as playwright:
|
||||
# 登录必须显形,让用户输账号密码/二步验证
|
||||
browser = await playwright.chromium.launch(headless=False, channel="chrome")
|
||||
browser = await playwright.chromium.launch(headless=False, executable_path=LOCAL_CHROME_PATH)
|
||||
context = await browser.new_context()
|
||||
context = await set_init_script(context)
|
||||
page = await context.new_page()
|
||||
@@ -199,7 +199,7 @@ class YouTubeVideo(BaseVideoUploader):
|
||||
|
||||
async def upload(self, playwright: Playwright) -> None:
|
||||
browser = await playwright.chromium.launch(
|
||||
headless=self.headless, channel="chrome",
|
||||
headless=self.headless, executable_path=LOCAL_CHROME_PATH,
|
||||
proxy={"server": YT_PROXY} if YT_PROXY else None,
|
||||
)
|
||||
context = await browser.new_context(storage_state=self.account_file)
|
||||
|
||||
Reference in New Issue
Block a user