This commit is contained in:
949036910@qq.com
2026-06-03 21:21:42 +08:00
parent 97d4d7c477
commit bbdee469fc
4 changed files with 180 additions and 21 deletions

View File

@@ -1,6 +1,10 @@
"use strict";
const { newPublishPage, LOGIN_URLS } = require("./publish_browser.js");
const {
newLoginPage,
detachLoginBrowser,
LOGIN_URLS,
} = require("./publish_browser.js");
const OPEN_URLS = {
douyin: "https://creator.douyin.com/creator-micro/content/upload",
@@ -20,8 +24,14 @@ globalThis.__nodejsMain = async function main(params) {
return { success: false, message: `不支持的平台: ${platform}` };
}
const page = await newPublishPage(platform, accountId, cookies);
const page = await newLoginPage(platform, accountId, cookies);
await page.goto(targetUrl, { waitUntil: "domcontentloaded", timeout: 60000 });
try {
await page.bringToFront();
} catch {
/* ignore */
}
await detachLoginBrowser(platform, accountId);
return {
success: true,